constants.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import type { BuiltinThemeType, TimezoneOption } from '@vben-core/typings';
  2. interface BuiltinThemePreset {
  3. color: string;
  4. darkPrimaryColor?: string;
  5. primaryColor?: string;
  6. type: BuiltinThemeType;
  7. }
  8. const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
  9. {
  10. color: 'hsl(212 100% 45%)',
  11. type: 'default',
  12. },
  13. {
  14. color: 'hsl(245 82% 67%)',
  15. type: 'violet',
  16. },
  17. {
  18. color: 'hsl(347 77% 60%)',
  19. type: 'pink',
  20. },
  21. {
  22. color: 'hsl(42 84% 61%)',
  23. type: 'yellow',
  24. },
  25. {
  26. color: 'hsl(231 98% 65%)',
  27. type: 'sky-blue',
  28. },
  29. {
  30. color: 'hsl(161 90% 43%)',
  31. type: 'green',
  32. },
  33. {
  34. color: 'hsl(240 5% 26%)',
  35. darkPrimaryColor: 'hsl(0 0% 98%)',
  36. primaryColor: 'hsl(240 5.9% 10%)',
  37. type: 'zinc',
  38. },
  39. {
  40. color: 'hsl(181 84% 32%)',
  41. type: 'deep-green',
  42. },
  43. {
  44. color: 'hsl(211 91% 39%)',
  45. type: 'deep-blue',
  46. },
  47. {
  48. color: 'hsl(18 89% 40%)',
  49. type: 'orange',
  50. },
  51. {
  52. color: 'hsl(0 75% 42%)',
  53. type: 'rose',
  54. },
  55. {
  56. color: 'hsl(0 0% 25%)',
  57. darkPrimaryColor: 'hsl(0 0% 98%)',
  58. primaryColor: 'hsl(240 5.9% 10%)',
  59. type: 'neutral',
  60. },
  61. {
  62. color: 'hsl(215 25% 27%)',
  63. darkPrimaryColor: 'hsl(0 0% 98%)',
  64. primaryColor: 'hsl(240 5.9% 10%)',
  65. type: 'slate',
  66. },
  67. {
  68. color: 'hsl(217 19% 27%)',
  69. darkPrimaryColor: 'hsl(0 0% 98%)',
  70. primaryColor: 'hsl(240 5.9% 10%)',
  71. type: 'gray',
  72. },
  73. {
  74. color: '',
  75. type: 'custom',
  76. },
  77. ];
  78. /**
  79. * 时区选项
  80. */
  81. const DEFAULT_TIME_ZONE_OPTIONS: TimezoneOption[] = [
  82. {
  83. offset: -5,
  84. timezone: 'America/New_York',
  85. label: 'America/New_York(GMT-5)',
  86. },
  87. {
  88. offset: 0,
  89. timezone: 'Europe/London',
  90. label: 'Europe/London(GMT0)',
  91. },
  92. {
  93. offset: 8,
  94. timezone: 'Asia/Shanghai',
  95. label: 'Asia/Shanghai(GMT+8)',
  96. },
  97. {
  98. offset: 9,
  99. timezone: 'Asia/Tokyo',
  100. label: 'Asia/Tokyo(GMT+9)',
  101. },
  102. {
  103. offset: 9,
  104. timezone: 'Asia/Seoul',
  105. label: 'Asia/Seoul(GMT+9)',
  106. },
  107. ];
  108. export const COLOR_PRESETS = [...BUILT_IN_THEME_PRESETS].slice(0, 7);
  109. export { BUILT_IN_THEME_PRESETS, DEFAULT_TIME_ZONE_OPTIONS };
  110. export type { BuiltinThemePreset };