constants.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import type {
  2. BuiltinThemeType,
  3. SupportedLanguagesType,
  4. } from '@vben-core/typings';
  5. interface Language {
  6. key: SupportedLanguagesType;
  7. text: string;
  8. }
  9. interface BuiltinThemePreset {
  10. color: string;
  11. darkPrimaryColor?: string;
  12. primaryColor?: string;
  13. type: BuiltinThemeType;
  14. }
  15. /**
  16. * Supported languages
  17. */
  18. const SUPPORT_LANGUAGES: Language[] = [
  19. {
  20. key: 'zh-CN',
  21. text: '简体中文',
  22. },
  23. {
  24. key: 'en-US',
  25. text: 'English',
  26. },
  27. ];
  28. const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
  29. {
  30. color: 'hsl(231 98% 65%)',
  31. type: 'default',
  32. },
  33. {
  34. color: 'hsl(245 82% 67%)',
  35. type: 'violet',
  36. },
  37. {
  38. color: 'hsl(347 77% 60%)',
  39. type: 'pink',
  40. },
  41. {
  42. color: 'hsl(0 75% 42%)',
  43. type: 'rose',
  44. },
  45. {
  46. color: 'hsl(212 100% 45%)',
  47. type: 'sky-blue',
  48. },
  49. {
  50. color: 'hsl(211 91% 39%)',
  51. type: 'deep-blue',
  52. },
  53. {
  54. color: 'hsl(161 90% 43%)',
  55. type: 'green',
  56. },
  57. {
  58. color: 'hsl(181 84% 32%)',
  59. type: 'deep-green',
  60. },
  61. {
  62. color: 'hsl(18 89% 40%)',
  63. type: 'orange',
  64. },
  65. {
  66. color: 'hsl(42 84% 61%)',
  67. type: 'yellow',
  68. },
  69. {
  70. color: 'hsl(240 5% 26%)',
  71. darkPrimaryColor: 'hsl(0 0% 98%)',
  72. primaryColor: 'hsl(240 5.9% 10%)',
  73. type: 'zinc',
  74. },
  75. {
  76. color: 'hsl(0 0% 25%)',
  77. darkPrimaryColor: 'hsl(0 0% 98%)',
  78. primaryColor: 'hsl(240 5.9% 10%)',
  79. type: 'neutral',
  80. },
  81. {
  82. color: 'hsl(215 25% 27%)',
  83. darkPrimaryColor: 'hsl(0 0% 98%)',
  84. primaryColor: 'hsl(240 5.9% 10%)',
  85. type: 'slate',
  86. },
  87. {
  88. color: 'hsl(217 19% 27%)',
  89. darkPrimaryColor: 'hsl(0 0% 98%)',
  90. primaryColor: 'hsl(240 5.9% 10%)',
  91. type: 'gray',
  92. },
  93. {
  94. color: '',
  95. type: 'custom',
  96. },
  97. ];
  98. export const COLOR_PRESETS = [...BUILT_IN_THEME_PRESETS].slice(0, 7);
  99. export { BUILT_IN_THEME_PRESETS, SUPPORT_LANGUAGES };
  100. export type { BuiltinThemePreset };