@lobehub/ui 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/es/ActionIcon/index.js +2 -2
  2. package/es/ActionIcon/style.js +1 -1
  3. package/es/EditableMessageList/index.js +6 -6
  4. package/es/EditableText/index.js +1 -4
  5. package/es/Highlighter/style.js +1 -2
  6. package/es/Icon/index.d.ts +1 -0
  7. package/es/Icon/index.js +5 -2
  8. package/es/Input/index.d.ts +13 -0
  9. package/es/Input/index.js +38 -0
  10. package/es/Input/style.d.ts +6 -0
  11. package/es/Input/style.js +12 -0
  12. package/es/Markdown/style.js +1 -1
  13. package/es/MessageInput/index.d.ts +2 -0
  14. package/es/MessageInput/index.js +10 -8
  15. package/es/SearchBar/index.d.ts +1 -2
  16. package/es/SearchBar/index.js +9 -18
  17. package/es/SearchBar/style.d.ts +1 -3
  18. package/es/SearchBar/style.js +6 -8
  19. package/es/Snippet/style.js +1 -2
  20. package/es/StroyBook/style.js +1 -1
  21. package/es/ThemeProvider/index.d.ts +2 -6
  22. package/es/ThemeProvider/index.js +8 -18
  23. package/es/components/ControlInput.d.ts +1 -1
  24. package/es/components/ControlInput.js +20 -23
  25. package/es/index.d.ts +1 -0
  26. package/es/index.js +1 -0
  27. package/es/styles/algorithms/generateColorPalette.d.ts +11 -0
  28. package/es/styles/algorithms/generateColorPalette.js +31 -0
  29. package/es/styles/{customStylish.d.ts → algorithms/generateCustomStylish.d.ts} +1 -1
  30. package/es/styles/{customStylish.js → algorithms/generateCustomStylish.js} +1 -1
  31. package/es/styles/algorithms/generateCustomToken.d.ts +3 -0
  32. package/es/styles/algorithms/generateCustomToken.js +57 -0
  33. package/es/styles/algorithms/generateTheme.d.ts +5 -0
  34. package/es/styles/algorithms/generateTheme.js +18 -0
  35. package/es/styles/colors.d.ts +38 -0
  36. package/es/styles/colors.js +176 -0
  37. package/es/styles/index.d.ts +3 -3
  38. package/es/styles/index.js +3 -3
  39. package/es/styles/theme/base.d.ts +2 -2
  40. package/es/styles/theme/base.js +8 -14
  41. package/es/styles/theme/dark.d.ts +3 -4
  42. package/es/styles/theme/dark.js +40 -71
  43. package/es/styles/theme/light.d.ts +3 -4
  44. package/es/styles/theme/light.js +41 -32
  45. package/es/types/customToken.d.ts +1027 -0
  46. package/es/types/global.d.ts +12 -0
  47. package/es/types/index.d.ts +5 -17
  48. package/es/types/index.js +1 -0
  49. package/lib/ActionIcon/index.js +2 -2
  50. package/lib/ActionIcon/style.js +2 -2
  51. package/lib/EditableMessageList/index.js +6 -6
  52. package/lib/EditableText/index.js +1 -1
  53. package/lib/Highlighter/style.js +1 -2
  54. package/lib/Icon/index.d.ts +1 -0
  55. package/lib/Icon/index.js +5 -2
  56. package/lib/Input/index.d.ts +13 -0
  57. package/lib/Input/index.js +45 -0
  58. package/lib/Input/style.d.ts +6 -0
  59. package/lib/Input/style.js +70 -0
  60. package/lib/Markdown/style.js +5 -1
  61. package/lib/MessageInput/index.d.ts +2 -0
  62. package/lib/MessageInput/index.js +6 -5
  63. package/lib/SearchBar/index.d.ts +1 -2
  64. package/lib/SearchBar/index.js +8 -26
  65. package/lib/SearchBar/style.d.ts +1 -3
  66. package/lib/SearchBar/style.js +1 -20
  67. package/lib/Snippet/style.js +1 -2
  68. package/lib/StroyBook/style.js +6 -1
  69. package/lib/ThemeProvider/index.d.ts +2 -6
  70. package/lib/ThemeProvider/index.js +12 -23
  71. package/lib/components/ControlInput.d.ts +1 -1
  72. package/lib/components/ControlInput.js +9 -19
  73. package/lib/index.d.ts +1 -0
  74. package/lib/index.js +5 -0
  75. package/lib/styles/algorithms/generateColorPalette.d.ts +11 -0
  76. package/lib/styles/algorithms/generateColorPalette.js +72 -0
  77. package/lib/styles/{customStylish.d.ts → algorithms/generateCustomStylish.d.ts} +1 -1
  78. package/lib/styles/{customStylish.js → algorithms/generateCustomStylish.js} +11 -7
  79. package/lib/styles/algorithms/generateCustomToken.d.ts +3 -0
  80. package/lib/styles/{customToken.js → algorithms/generateCustomToken.js} +42 -17
  81. package/lib/styles/algorithms/generateTheme.d.ts +5 -0
  82. package/lib/styles/algorithms/generateTheme.js +59 -0
  83. package/lib/styles/colors.d.ts +38 -0
  84. package/lib/styles/colors.js +1828 -0
  85. package/lib/styles/index.d.ts +3 -3
  86. package/lib/styles/index.js +18 -4
  87. package/lib/styles/theme/base.d.ts +2 -2
  88. package/lib/styles/theme/base.js +10 -16
  89. package/lib/styles/theme/dark.d.ts +3 -4
  90. package/lib/styles/theme/dark.js +46 -96
  91. package/lib/styles/theme/light.d.ts +3 -4
  92. package/lib/styles/theme/light.js +48 -38
  93. package/lib/types/customToken.d.ts +1027 -0
  94. package/lib/types/global.d.ts +12 -0
  95. package/lib/types/index.d.ts +5 -17
  96. package/lib/{styles/theme → types}/index.js +3 -18
  97. package/package.json +1 -1
  98. package/es/styles/algorithms/colorRelationship.d.ts +0 -6
  99. package/es/styles/algorithms/colorRelationship.js +0 -88
  100. package/es/styles/algorithms/index.d.ts +0 -15
  101. package/es/styles/algorithms/index.js +0 -66
  102. package/es/styles/algorithms/paletteGenerator.d.ts +0 -51
  103. package/es/styles/algorithms/paletteGenerator.js +0 -74
  104. package/es/styles/antdTheme.d.ts +0 -2
  105. package/es/styles/antdTheme.js +0 -4
  106. package/es/styles/customToken.d.ts +0 -65
  107. package/es/styles/customToken.js +0 -24
  108. package/es/styles/theme/index.d.ts +0 -2
  109. package/es/styles/theme/index.js +0 -2
  110. package/lib/styles/algorithms/colorRelationship.d.ts +0 -6
  111. package/lib/styles/algorithms/colorRelationship.js +0 -87
  112. package/lib/styles/algorithms/index.d.ts +0 -15
  113. package/lib/styles/algorithms/index.js +0 -81
  114. package/lib/styles/algorithms/paletteGenerator.d.ts +0 -51
  115. package/lib/styles/algorithms/paletteGenerator.js +0 -91
  116. package/lib/styles/antdTheme.d.ts +0 -2
  117. package/lib/styles/antdTheme.js +0 -30
  118. package/lib/styles/customToken.d.ts +0 -65
  119. package/lib/styles/theme/index.d.ts +0 -2
@@ -1,33 +1,42 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { genMapTokenAlgorithm } from "../algorithms";
3
- import { baseTheme } from "./base";
4
- var lightMode = genMapTokenAlgorithm('light');
5
- export var lightColorPalettes = lightMode.palettes;
6
- export var lightTheme = {
7
- token: _objectSpread(_objectSpread({}, baseTheme.token), {}, {
8
- colorTextLightSolid: '#ffffff',
9
- colorBgLayout: '#fafafa',
10
- colorBgContainer: '#ffffff',
11
- colorBgElevated: '#f2f2f2',
12
- colorBgSpotlight: '#999999',
13
- colorBorder: '#eaeaea',
14
- colorBorderSecondary: '#eaeaea',
15
- colorText: '#000000',
16
- colorTextSecondary: '#444444',
17
- colorTextTertiary: '#666666',
18
- colorTextQuaternary: '#888888',
19
- colorPrimary: '#000000',
20
- colorFill: 'rgba(0,0,0,0.1)',
21
- colorFillSecondary: 'rgba(0,0,0,0.075)',
22
- colorFillTertiary: 'rgba(0,0,0,0.05)',
23
- colorFillQuaternary: 'rgba(0,0,0,0)',
24
- boxShadow: '0 12px 20px 6px rgb(104 112 118 / 0.08)',
25
- boxShadowSecondary: '0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)',
26
- colorLinkHover: '#3291ff',
27
- colorLink: '#0070f3',
28
- colorLinkActive: '#0761d1'
29
- }),
30
- algorithm: function algorithm(seedToken, mapToken) {
31
- return _objectSpread(_objectSpread({}, mapToken), lightMode.tokens);
32
- }
33
- };
2
+ import { generateColorNeutralPalette, generateColorPalette } from "../algorithms/generateColorPalette";
3
+ import { colorScales } from "../colors";
4
+ import { baseToken } from "./base";
5
+ var primaryToken = generateColorPalette({
6
+ type: 'Primary',
7
+ scale: colorScales.bnw,
8
+ appearance: 'light'
9
+ });
10
+ var neutralToken = generateColorNeutralPalette({
11
+ scale: colorScales.gray,
12
+ appearance: 'light'
13
+ });
14
+ var successToken = generateColorPalette({
15
+ type: 'Success',
16
+ scale: colorScales.grass,
17
+ appearance: 'light'
18
+ });
19
+ var warningToken = generateColorPalette({
20
+ type: 'Warning',
21
+ scale: colorScales.orange,
22
+ appearance: 'light'
23
+ });
24
+ var errorToken = generateColorPalette({
25
+ type: 'Error',
26
+ scale: colorScales.tomato,
27
+ appearance: 'light'
28
+ });
29
+ var infoToken = generateColorPalette({
30
+ type: 'Info',
31
+ scale: colorScales.blue,
32
+ appearance: 'light'
33
+ });
34
+ var lightBaseToken = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, baseToken), primaryToken), neutralToken), successToken), warningToken), errorToken), infoToken), {}, {
35
+ colorTextLightSolid: neutralToken.colorBgLayout,
36
+ colorLinkHover: infoToken.colorInfoTextHover,
37
+ colorLink: infoToken.colorInfoText,
38
+ colorLinkActive: infoToken.colorInfoTextActive,
39
+ boxShadow: '0 12px 20px 6px rgb(104 112 118 / 0.08)',
40
+ boxShadowSecondary: '0 2px 8px 2px rgb(104 112 118 / 0.07), 0 2px 4px -1px rgb(104 112 118 / 0.04)'
41
+ });
42
+ export default lightBaseToken;