@opentiny/vue-theme 3.6.7 → 3.8.2

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 (312) hide show
  1. package/action-menu/index.css +1 -1
  2. package/alert/aurora-theme.js +14 -0
  3. package/alert/index.css +1 -1
  4. package/alert/smb-theme.js +39 -0
  5. package/anchor/index.css +1 -1
  6. package/autocomplete/index.css +1 -1
  7. package/badge/index.css +1 -1
  8. package/badge/smb-theme.js +3 -0
  9. package/base/index.css +1 -1
  10. package/breadcrumb/aurora-theme.js +3 -0
  11. package/breadcrumb/index.css +1 -1
  12. package/breadcrumb/smb-theme.js +7 -0
  13. package/button/aurora-theme.js +3 -0
  14. package/button/index.css +1 -1
  15. package/button/smb-theme.js +45 -0
  16. package/button-group/index.css +1 -1
  17. package/button-group/smb-theme.js +29 -0
  18. package/calendar/index.css +1 -1
  19. package/card-item/index.css +1 -1
  20. package/card-template/index.css +1 -1
  21. package/carousel/index.css +1 -1
  22. package/cascader/aurora-theme.js +3 -0
  23. package/cascader/index.css +1 -1
  24. package/cascader-menu/aurora-theme.js +3 -0
  25. package/cascader-menu/index.css +1 -1
  26. package/cascader-node/aurora-theme.js +8 -0
  27. package/cascader-node/index.css +1 -1
  28. package/cascader-panel/aurora-theme.js +3 -0
  29. package/cascader-panel/index.css +1 -1
  30. package/checkbox/aurora-theme.js +5 -0
  31. package/checkbox/index.css +1 -1
  32. package/checkbox/smb-theme.js +17 -0
  33. package/checkbox-button/aurora-theme.js +3 -0
  34. package/checkbox-button/index.css +1 -1
  35. package/checkbox-button/smb-theme.js +27 -0
  36. package/checkbox-group/index.css +1 -1
  37. package/checkbox-group/smb-theme.js +4 -0
  38. package/collapse/index.css +1 -1
  39. package/collapse-item/aurora-theme.js +22 -0
  40. package/collapse-item/index.css +1 -1
  41. package/collapse-item/smb-theme.js +15 -0
  42. package/crop/index.css +1 -1
  43. package/date-panel/index.css +1 -1
  44. package/date-table/index.css +1 -1
  45. package/date-table/smb-theme.js +8 -0
  46. package/dept/index.css +1 -1
  47. package/dialog-box/index.css +1 -1
  48. package/dialog-box/smb-theme.js +13 -0
  49. package/dialog-select/index.css +1 -0
  50. package/drop-roles/index.css +1 -1
  51. package/dropdown/index.css +1 -1
  52. package/dropdown/smb-theme.js +12 -0
  53. package/dropdown-item/index.css +1 -1
  54. package/dropdown-item/smb-theme.js +14 -0
  55. package/dropdown-menu/index.css +1 -1
  56. package/dropdown-menu/smb-theme.js +4 -0
  57. package/error-page/index.css +1 -1
  58. package/file-upload/aurora-theme.js +6 -0
  59. package/filter-box/index.css +1 -0
  60. package/filter-panel/index.css +1 -0
  61. package/floatbar/index.css +1 -1
  62. package/flowchart/index.css +1 -0
  63. package/form/index.css +1 -1
  64. package/form/smb-theme.js +5 -0
  65. package/form-item/index.css +1 -1
  66. package/form-item/smb-theme.js +14 -0
  67. package/grid/aurora-theme.js +15 -0
  68. package/grid/index.css +1 -1
  69. package/grid/smb-theme.js +20 -0
  70. package/grid-toolbar/index.css +1 -0
  71. package/guide/index.css +1 -0
  72. package/image/index.css +1 -1
  73. package/images/credit-background.jpeg +0 -0
  74. package/images/empty-noaccess.png +0 -0
  75. package/images/empty-noaccess.svg +20 -0
  76. package/images/empty-nodata.png +0 -0
  77. package/images/empty-nodata.svg +24 -0
  78. package/images/empty-nonetwork.png +0 -0
  79. package/images/empty-nonetwork.svg +25 -0
  80. package/images/empty-nonotice.png +0 -0
  81. package/images/empty-nonotice.svg +23 -0
  82. package/images/empty-noresult.png +0 -0
  83. package/images/empty-noresult.svg +23 -0
  84. package/images/empty-page-noaccess.png +0 -0
  85. package/images/empty-page-noaccess.svg +50 -0
  86. package/images/empty-page-nonetwork.png +0 -0
  87. package/images/empty-page-nonetwork.svg +44 -0
  88. package/images/empty-page-nothing.png +0 -0
  89. package/images/empty-page-nothing.svg +38 -0
  90. package/images/empty-page-servererror.png +0 -0
  91. package/images/empty-page-servererror.svg +55 -0
  92. package/images/icon_operation.svg +1 -1
  93. package/images/icon_operation_bubble.svg +1 -1
  94. package/images/image-error.jpg +0 -0
  95. package/images/image-error.svg +6 -0
  96. package/images/loading-64.gif +0 -0
  97. package/images/select-nodata.png +0 -0
  98. package/index.css +1 -1
  99. package/input/aurora-theme.js +4 -0
  100. package/input/index.css +1 -1
  101. package/input/smb-theme.js +19 -0
  102. package/ip-address/aurora-theme.js +4 -0
  103. package/ip-address/index.css +1 -1
  104. package/ip-address/smb-theme.js +10 -0
  105. package/link/index.css +1 -1
  106. package/link/smb-theme.js +13 -0
  107. package/loading/index.css +1 -1
  108. package/loading/smb-theme.js +19 -0
  109. package/lowcode.css +1 -1
  110. package/menubar/index.css +1 -1
  111. package/milestone/index.css +1 -1
  112. package/modal/index.css +1 -1
  113. package/modal/smb-theme.js +21 -0
  114. package/nav-menu/index.css +1 -1
  115. package/nav-menu/smb-theme.js +3 -0
  116. package/notify/index.css +1 -1
  117. package/notify/smb-theme.js +22 -0
  118. package/numeric/index.css +1 -1
  119. package/numeric/smb-theme.js +10 -0
  120. package/option/index.css +1 -1
  121. package/option/smb-theme.js +13 -0
  122. package/option-group/index.css +1 -1
  123. package/option-group/smb-theme.js +5 -0
  124. package/package.json +5 -4
  125. package/pager/index.css +1 -1
  126. package/pager/smb-theme.js +42 -0
  127. package/popeditor/index.css +1 -1
  128. package/popover/index.css +1 -1
  129. package/popover/smb-theme.js +10 -0
  130. package/progress/aurora-theme.js +3 -0
  131. package/progress/index.css +1 -1
  132. package/progress/smb-theme.js +4 -0
  133. package/radio/aurora-theme.js +9 -0
  134. package/radio/index.css +1 -1
  135. package/radio/smb-theme.js +11 -0
  136. package/radio-button/index.css +1 -1
  137. package/radio-group/index.css +1 -1
  138. package/rate/index.css +1 -1
  139. package/recycle-scroller/index.css +1 -0
  140. package/roles/index.css +1 -1
  141. package/scrollbar/index.css +1 -1
  142. package/scrollbar/smb-theme.js +7 -0
  143. package/search/aurora-theme.js +3 -0
  144. package/search/index.css +1 -1
  145. package/search/smb-theme.js +9 -0
  146. package/select/index.css +1 -1
  147. package/select/smb-theme.js +11 -0
  148. package/select-dropdown/index.css +1 -1
  149. package/select-dropdown/smb-theme.js +27 -0
  150. package/selected-box/index.css +1 -0
  151. package/selector/index.css +1 -1
  152. package/slider/aurora-theme.js +15 -0
  153. package/slider/index.css +1 -1
  154. package/slider/smb-theme.js +1 -0
  155. package/split/aurora-theme.js +3 -0
  156. package/split/index.css +1 -1
  157. package/steps/index.css +1 -1
  158. package/steps/smb-theme.js +25 -0
  159. package/svgs/add-circle.svg +26 -0
  160. package/svgs/arrow-bottom.svg +6 -0
  161. package/svgs/audio.svg +8 -0
  162. package/svgs/calendar.svg +28 -26
  163. package/svgs/down-ward.svg +10 -0
  164. package/svgs/error.svg +10 -17
  165. package/svgs/excel-type.svg +11 -0
  166. package/svgs/expand.svg +7 -0
  167. package/svgs/eyeclose.svg +41 -17
  168. package/svgs/eyeopen.svg +21 -18
  169. package/svgs/file-type.svg +14 -0
  170. package/svgs/left-frozen.svg +1 -1
  171. package/svgs/left-ward-arrow.svg +11 -0
  172. package/svgs/loading-shadow.svg +19 -0
  173. package/svgs/mic.svg +6 -0
  174. package/svgs/mobile-checkbox-half.svg +10 -0
  175. package/svgs/mobile-checkbox-selected.svg +10 -0
  176. package/svgs/mobile-checkbox.svg +10 -0
  177. package/svgs/mobile-radio-selected.svg +9 -0
  178. package/svgs/mobile-radio.svg +10 -0
  179. package/svgs/other-type.svg +11 -0
  180. package/svgs/pdf-type.svg +11 -0
  181. package/svgs/picture-type.svg +11 -0
  182. package/svgs/ppt-type.svg +11 -0
  183. package/svgs/prompt-exclamation.svg +7 -0
  184. package/svgs/prompt.svg +6 -0
  185. package/svgs/put-away.svg +8 -0
  186. package/svgs/replies.svg +1 -1
  187. package/svgs/right-frozen.svg +1 -1
  188. package/svgs/sent.svg +1 -1
  189. package/svgs/sort-triangle-ascending.svg +9 -0
  190. package/svgs/sort-triangle-descending.svg +9 -0
  191. package/svgs/sort-triangle.svg +12 -0
  192. package/svgs/stretch.svg +48 -0
  193. package/svgs/success.svg +10 -16
  194. package/svgs/text-type.svg +11 -0
  195. package/svgs/triangle-down.svg +6 -15
  196. package/svgs/unsent.svg +1 -1
  197. package/svgs/up-ward.svg +11 -0
  198. package/svgs/video-type.svg +14 -0
  199. package/svgs/warning-triangle.svg +8 -16
  200. package/svgs/word-type.svg +11 -0
  201. package/svgs/zip-type.svg +16 -0
  202. package/switch/aurora-theme.js +10 -0
  203. package/switch/index.css +1 -1
  204. package/switch/smb-theme.js +12 -0
  205. package/table/index.css +1 -1
  206. package/tabs/aurora-theme.js +16 -0
  207. package/tabs/index.css +1 -1
  208. package/tabs/smb-theme.js +15 -0
  209. package/tag/aurora-theme.js +33 -0
  210. package/tag/index.css +1 -1
  211. package/tag/smb-theme.js +22 -0
  212. package/tall-storage/index.css +1 -1
  213. package/text-popup/aurora-theme.js +5 -0
  214. package/text-popup/index.css +1 -1
  215. package/text-popup/smb-theme.js +7 -0
  216. package/textarea/index.css +1 -0
  217. package/textarea/smb-theme.js +24 -0
  218. package/theme/aurora-theme/component.js +25 -0
  219. package/theme/aurora-theme/index.js +430 -0
  220. package/theme/index.js +17 -0
  221. package/theme/infinity-theme/index.js +24 -24
  222. package/theme/smb-theme/component.js +43 -0
  223. package/theme/smb-theme/index.js +342 -0
  224. package/theme/utils.js +12 -0
  225. package/theme-tool.js +23 -16
  226. package/theme.config.js +34 -13
  227. package/time-select/index.css +1 -1
  228. package/tip/index.css +1 -1
  229. package/toggle-menu/index.css +1 -1
  230. package/tooltip/aurora-theme.js +5 -0
  231. package/tooltip/index.css +1 -1
  232. package/tooltip/smb-theme.js +18 -0
  233. package/transfer/aurora-theme.js +8 -0
  234. package/transfer/index.css +1 -1
  235. package/tree/index.css +1 -1
  236. package/tree-menu/index.css +1 -1
  237. package/upload/index.css +1 -1
  238. package/upload-dragger/index.css +1 -1
  239. package/upload-list/index.css +1 -1
  240. package/user-card/index.css +1 -1
  241. package/user-link/index.css +1 -1
  242. package/wizard/index.css +1 -1
  243. package/action-menu/index.js +0 -13
  244. package/alert/index.js +0 -40
  245. package/anchor/index.js +0 -20
  246. package/autocomplete/index.js +0 -25
  247. package/breadcrumb/index.js +0 -24
  248. package/breadcrumb-item/index.js +0 -15
  249. package/button/index.js +0 -105
  250. package/button-group/index.js +0 -34
  251. package/carousel/index.js +0 -39
  252. package/cascader/index.js +0 -41
  253. package/cascader-menu/index.js +0 -20
  254. package/cascader-node/index.js +0 -25
  255. package/cascader-panel/index.js +0 -22
  256. package/collapse/index.js +0 -15
  257. package/collapse-item/index.js +0 -32
  258. package/crop/index.js +0 -31
  259. package/detail-page/index.js +0 -25
  260. package/dialog-box/index.js +0 -38
  261. package/drop-times/index.js +0 -15
  262. package/dropdown/index.js +0 -15
  263. package/dropdown-item/index.js +0 -27
  264. package/dropdown-menu/index.js +0 -18
  265. package/fall-menu/index.js +0 -27
  266. package/file-upload/index.js +0 -15
  267. package/floatbar/index.js +0 -21
  268. package/form/index.js +0 -15
  269. package/form-item/index.js +0 -24
  270. package/fullscreen/index.js +0 -15
  271. package/grid/index.js +0 -65
  272. package/image/index.js +0 -17
  273. package/index.js +0 -16
  274. package/input/index.js +0 -34
  275. package/ip-address/index.js +0 -25
  276. package/link/index.js +0 -41
  277. package/link-menu/index.js +0 -24
  278. package/loading/index.js +0 -21
  279. package/milestone/index.js +0 -26
  280. package/modal/index.js +0 -47
  281. package/nav-menu/index.js +0 -28
  282. package/notify/index.js +0 -41
  283. package/numeric/index.js +0 -26
  284. package/option/index.js +0 -26
  285. package/option-group/index.js +0 -18
  286. package/pager/index.js +0 -40
  287. package/popover/index.js +0 -30
  288. package/progress/index.js +0 -23
  289. package/radio/index.js +0 -42
  290. package/rate/index.js +0 -18
  291. package/scrollbar/index.js +0 -15
  292. package/search/index.js +0 -34
  293. package/select/index.js +0 -27
  294. package/select-dropdown/index.js +0 -33
  295. package/slide-bar/index.js +0 -20
  296. package/slider/index.js +0 -52
  297. package/split/index.js +0 -23
  298. package/steps/index.js +0 -49
  299. package/switch/index.js +0 -29
  300. package/tabs/index.js +0 -60
  301. package/tag/index.js +0 -54
  302. package/text-popup/index.js +0 -18
  303. package/toggle-menu/index.js +0 -24
  304. package/tooltip/index.js +0 -41
  305. package/transfer/index.js +0 -47
  306. package/tree/index.js +0 -27
  307. package/tree-menu/index.js +0 -22
  308. package/upload/index.js +0 -22
  309. package/upload-dragger/index.js +0 -26
  310. package/upload-list/index.js +0 -28
  311. package/vars/index.js +0 -169
  312. package/wizard/index.js +0 -21
package/theme/index.js CHANGED
@@ -10,10 +10,13 @@
10
10
  *
11
11
  */
12
12
 
13
+ import { flattenObject } from './utils'
13
14
  import { impressionTheme } from './impression-theme'
14
15
  import { infinityTheme } from './infinity-theme'
15
16
  import { deepTheme } from './deep-theme'
16
17
  import { galaxyTheme } from './galaxy-theme'
18
+ import * as auroraTheme from './aurora-theme'
19
+ import * as smbTheme from './smb-theme'
17
20
 
18
21
  export const tinyImpressionTheme = {
19
22
  id: 'tiny-impression-theme',
@@ -42,3 +45,17 @@ export const tinyGalaxyTheme = {
42
45
  cnName: '追光',
43
46
  data: galaxyTheme
44
47
  }
48
+
49
+ export const tinyAuroraTheme = {
50
+ id: 'tiny-aurora-theme',
51
+ name: 'Aurora',
52
+ cnName: 'Aurora',
53
+ data: flattenObject(auroraTheme)
54
+ }
55
+
56
+ export const tinySmbTheme = {
57
+ id: 'tiny-smb-theme',
58
+ name: 'SMB',
59
+ cnName: 'SMB',
60
+ data: flattenObject(smbTheme)
61
+ }
@@ -29,7 +29,7 @@ export const infinityTheme = {
29
29
  'ti-common-color-border': '#d7d8da',
30
30
  'ti-base-color-brand-5': '#526ecc',
31
31
  'ti-common-size-height-normal': '32px',
32
- 'ti-common-box-shadow': '0 4px 8px 0 rgba(37,43,58,.2)',
32
+ 'ti-common-shadow-2-down': '0 4px 8px 0 rgba(37,43,58,.2)',
33
33
  'ti-common-color-hover-background': '#f2f2f3',
34
34
  'ti-common-color-selected-background': '#f2f5fc',
35
35
  'ti-common-dropdown-gap': '8px',
@@ -55,7 +55,7 @@ export const infinityTheme = {
55
55
  'ti-checkbox-border-color-hover': '#252b3a',
56
56
  'ti-checkbox-icon-height': '6px',
57
57
  'ti-checkbox-icon-width': '3px',
58
- 'ti-checkbox-icon-top': '2px',
58
+ 'ti-checkbox-icon-margin-top': '2px',
59
59
  'ti-picker-panel-border-color': '#fff',
60
60
  'ti-radio-inner-size': '10px',
61
61
  'ti-radio-bordered-checked-hover-border-color': 'var(--ti-base-color-brand-8)',
@@ -88,7 +88,7 @@ export const infinityTheme = {
88
88
  'ti-slider-margin-right': '0',
89
89
  'ti-slider-margin-left': '-4px',
90
90
  'ti-time-panel-border-color': 'transparent',
91
- 'ti-time-panel-box-shadow': 'var(--ti-common-box-shadow)',
91
+ 'ti-time-panel-box-shadow': 'var(--ti-common-shadow-2-down)',
92
92
  'ti-time-spinner-item-font-weight': 'normal',
93
93
  'ti-time-panel-content-split-line-display': 'none',
94
94
  'ti-time-spinner-item-bg-color': '#f2f5fc',
@@ -150,19 +150,19 @@ export const infinityTheme = {
150
150
 
151
151
  'ti-dropdown-menu-padding-vertical': '12px',
152
152
  'ti-dropdown-menu-padding-horizontal': '12px',
153
- 'ti-dropdown-menu-box-shadow': 'var(--ti-common-box-shadow)',
153
+ 'ti-dropdown-menu-box-shadow': 'var(--ti-common-shadow-2-down)',
154
154
  'ti-dropdown-menu-margin-vertical': '8px',
155
- 'ti-dropdown-menu-item-height': '36px',
156
- 'ti-dropdown-menu-item-padding-vertical': '0',
157
- 'ti-dropdown-menu-item-padding-horizontal': '12px',
158
- 'ti-dropdown-menu-item-hover-bg-color': '#f2f2f3',
159
- 'ti-dropdown-menu-item-active-bg-color': 'var(--ti-dropdown-menu-item-hover-bg-color)',
160
- 'ti-dropdown-menu-item-text-color': '#252b3a',
161
- 'ti-dropdown-menu-item-hover-text-color': 'var(--ti-dropdown-menu-item-text-color)',
162
- 'ti-dropdown-menu-item-active-text-color': 'var(--ti-dropdown-menu-item-text-color)',
163
- 'ti-dropdown-menu-item-border-radius': 'var(--ti-common-border-radius-normal)',
164
- 'ti-dropdown-menu-item-disabled-text-color': '#cfd0d3',
165
- 'ti-dropdown-menu-item-max-width': '100%',
155
+ 'ti-dropdown-item-height': '36px',
156
+ 'ti-dropdown-item-padding-vertical': '0',
157
+ 'ti-dropdown-item-padding-horizontal': '12px',
158
+ 'ti-dropdown-item-hover-bg-color': '#f2f2f3',
159
+ 'ti-dropdown-item-active-bg-color': 'var(--ti-dropdown-item-hover-bg-color)',
160
+ 'ti-dropdown-item-text-color': '#252b3a',
161
+ 'ti-dropdown-item-hover-text-color': 'var(--ti-dropdown-item-text-color)',
162
+ 'ti-dropdown-item-active-text-color': 'var(--ti-dropdown-item-text-color)',
163
+ 'ti-dropdown-item-border-radius': 'var(--ti-common-border-radius-normal)',
164
+ 'ti-dropdown-item-disabled-text-color': '#cfd0d3',
165
+ 'ti-dropdown-item-max-width': '100%',
166
166
  'ti-split-trigger-bg-color': '#f2f2f3',
167
167
  'ti-split-trigger-bar-bg-color': 'var(--ti-split-trigger-bg-color)',
168
168
  'ti-split-trigger-hover-bg-color': '#7693f5',
@@ -172,7 +172,7 @@ export const infinityTheme = {
172
172
  'ti-split-trigger-bar-margin-top': '2px',
173
173
  'ti-split-trigger-con-col-cursor': 'col-resize',
174
174
  'ti-split-trigger-con-row-cursor': 'row-resize',
175
- 'ti-picker-panel-box-shadow': 'var(--ti-common-box-shadow)',
175
+ 'ti-picker-panel-box-shadow': 'var(--ti-common-shadow-2-down)',
176
176
  'ti-date-picker-width': '249px',
177
177
  'ti-date-picker-font-size': '12px',
178
178
  'ti-date-table-td-today-border-color': 'transparent',
@@ -380,19 +380,19 @@ export const infinityTheme = {
380
380
  'ti-cascader-node-selectable-text-color': 'var(--ti-base-color-brand-7)',
381
381
  'ti-cascader-node-hover-text-color': 'var(--ti-base-color-brand-7)',
382
382
  // select
383
- 'ti-select-input-caret-text-color': 'var(--ti-base-color-common-5)',
384
- 'ti-select-input-caret-hover-text-color': 'var(--ti-base-color-common-7)',
383
+ 'ti-select-input-caret-icon-color': 'var(--ti-base-color-common-5)',
384
+ 'ti-select-input-caret-hover-icon-color': 'var(--ti-base-color-common-7)',
385
385
  // option
386
386
  'ti-select-dropdown-list-padding-top': 'var(--ti-common-space-3x)',
387
387
  'ti-select-dropdown-list-padding-horizontal': 'var(--ti-common-space-3x)',
388
388
  'ti-select-dropdown-list-padding-bottom': 'var(--ti-common-space-3x)',
389
389
  'ti-select-dropdown-border-color': 'var(--ti-base-color-white)',
390
- 'ti-select-dropdown-item-padding-vertical': '0',
391
- 'ti-select-dropdown-item-padding-horizontal': 'var(--ti-common-space-3x)',
392
- 'ti-select-dropdown-item-margin-top': 'var(--ti-common-space-base)',
393
- 'ti-select-dropdown-item-height': '36px',
394
- 'ti-select-dropdown-item-selected-text-color': 'var(--ti-common-color-info-normal)',
395
- 'ti-select-dropdown-item-selected-bg-color': 'var(--ti-base-color-brand-1)',
390
+ 'ti-option-padding-vertical': '0',
391
+ 'ti-option-padding-horizontal': 'var(--ti-common-space-3x)',
392
+ 'ti-option-margin-top': 'var(--ti-common-space-base)',
393
+ 'ti-option-height': '36px',
394
+ 'ti-option-selected-text-color': 'var(--ti-common-color-info-normal)',
395
+ 'ti-option-selected-bg-color': 'var(--ti-base-color-brand-1)',
396
396
  // form-item
397
397
  'ti-form-item-error-text-color': 'var(--ti-base-color-error-3)',
398
398
  'ti-form-item-error-bg-color': '#ffd5d4',
@@ -0,0 +1,43 @@
1
+ export * from '../../alert/smb-theme'
2
+ export * from '../../badge/smb-theme'
3
+ export * from '../../breadcrumb/smb-theme'
4
+ export * from '../../button/smb-theme'
5
+ export * from '../../button-group/smb-theme'
6
+ export * from '../../checkbox/smb-theme'
7
+ export * from '../../checkbox-button/smb-theme'
8
+ export * from '../../checkbox-group/smb-theme'
9
+ export * from '../../collapse-item/smb-theme'
10
+ export * from '../../date-table/smb-theme'
11
+ export * from '../../dialog-box/smb-theme'
12
+ export * from '../../dropdown/smb-theme'
13
+ export * from '../../dropdown-item/smb-theme'
14
+ export * from '../../dropdown-menu/smb-theme'
15
+ export * from '../../form-item/smb-theme'
16
+ export * from '../../form/smb-theme'
17
+ export * from '../../grid/smb-theme'
18
+ export * from '../../input/smb-theme'
19
+ export * from '../../ip-address/smb-theme'
20
+ export * from '../../link/smb-theme'
21
+ export * from '../../loading/smb-theme'
22
+ export * from '../../modal/smb-theme'
23
+ export * from '../../nav-menu/smb-theme'
24
+ export * from '../../notify/smb-theme'
25
+ export * from '../../numeric/smb-theme'
26
+ export * from '../../option/smb-theme'
27
+ export * from '../../option-group/smb-theme'
28
+ export * from '../../pager/smb-theme'
29
+ export * from '../../popover/smb-theme'
30
+ export * from '../../progress/smb-theme'
31
+ export * from '../../radio/smb-theme'
32
+ export * from '../../scrollbar/smb-theme'
33
+ export * from '../../search/smb-theme'
34
+ export * from '../../select/smb-theme'
35
+ export * from '../../select-dropdown/smb-theme'
36
+ export * from '../../slider/smb-theme'
37
+ export * from '../../steps/smb-theme'
38
+ export * from '../../switch/smb-theme'
39
+ export * from '../../tabs/smb-theme'
40
+ export * from '../../tag/smb-theme'
41
+ export * from '../../text-popup/smb-theme'
42
+ export * from '../../textarea/smb-theme'
43
+ export * from '../../tooltip/smb-theme'
@@ -0,0 +1,342 @@
1
+ export const tinyBaseSmbTheme = {
2
+ /* 基础色 */
3
+
4
+ // 品牌色
5
+ 'ti-base-color-brand': '#191919',
6
+ 'ti-base-color-brand-1': '#595959',
7
+ 'ti-base-color-brand-2': '#1476FF',
8
+ 'ti-base-color-brand-3': '#7693F5',
9
+ 'ti-base-color-brand-4': '#96ADFA',
10
+ 'ti-base-color-brand-5': '#C2C2C2',
11
+ 'ti-base-color-brand-6': 'var(--ti-base-color-brand)',
12
+ 'ti-base-color-brand-7': '#1476FF80', // 50% 透明度
13
+ 'ti-base-color-brand-8': '#1476ff26', // 15% 透明度 4.28修改
14
+ 'ti-base-color-brand-9': '#80808080', // 50% 透明度
15
+
16
+ // 中立色
17
+ 'ti-base-color-common': '#191919',
18
+ 'ti-base-color-common-1': '#595959',
19
+ 'ti-base-color-common-2': '#808080',
20
+ 'ti-base-color-common-3': '#C2C2C2',
21
+ 'ti-base-color-common-4': '#DBDBDB',
22
+ 'ti-base-color-common-5': '#00000014', // 新风格专用,分隔线 8% 透明度
23
+ 'ti-base-color-common-6': '#00000026', // 15%透明度 4.28新增
24
+ 'ti-base-color-bg': '#F5F5F5',
25
+ 'ti-base-color-bg-1': '#0000000D', // 5% 透明度
26
+ 'ti-base-color-bg-2': '#FAFAFA',
27
+ 'ti-base-color-bg-3': '#191919',
28
+ 'ti-base-color-bg-4': '#595959',
29
+ 'ti-base-color-bg-5': '#FFFFFF',
30
+ 'ti-base-color-bg-6': '#5959591A', // 10% 透明度
31
+ 'ti-base-color-bg-7': '#00000000',
32
+
33
+ // 功能色
34
+ 'ti-base-color-success-bg': '#5CB3001A', // 10% 透明度
35
+ 'ti-base-color-success-border': '#5CB3001A', // 10% 透明度
36
+ 'ti-base-color-success': '#5CB300',
37
+ 'ti-base-color-success-text': '#5CB300',
38
+ 'ti-base-color-error-bg': '#F230301A', // 10% 透明度
39
+ 'ti-base-color-error-border': '#F230301A', // 10% 透明度
40
+ 'ti-base-color-error': '#F23030',
41
+ 'ti-base-color-error-text': '#F23030',
42
+ 'ti-base-color-warn-bg': '#FF88001A', // 10% 透明度
43
+ 'ti-base-color-warn-border': '#FF88001A', // 10% 透明度
44
+ 'ti-base-color-warn': '#FF8800',
45
+ 'ti-base-color-warn-text': '#FF8800',
46
+ 'ti-base-color-prompt-bg': '#1476FF1A', // 10% 透明度
47
+ 'ti-base-color-prompt-border': '#1476FF1A', // 10% 透明度
48
+ 'ti-base-color-prompt': '#1476FF',
49
+ 'ti-base-color-prompt-text': '#1476FF',
50
+ 'ti-base-color-error-icon-from': '#FF41A1',
51
+ 'ti-base-color-error-icon-to': '#FF8A5B',
52
+ 'ti-base-color-warn-icon-from': '#FF5541',
53
+ 'ti-base-color-warn-icon-to': '#FFD347',
54
+ 'ti-base-color-prompt-icon-from': '#7769E8',
55
+ 'ti-base-color-prompt-icon-to': '#58BBFF',
56
+ 'ti-base-color-warn-1': '#F7D916',
57
+ 'ti-base-color-icon-info': '#1476FF',
58
+ 'ti-base-color-data-3': '#6E51E0',
59
+ 'ti-base-color-data-4': '#5CB300',
60
+ 'ti-base-color-data-5': '#FCBE1E',
61
+ 'ti-base-color-data-2': '#0BB8B2', // 新风格专用
62
+ 'ti-base-color-data-6': '#33BCF2', // 新风格专用
63
+ 'ti-base-color-data-7': '#BA53E6', // 新风格专用
64
+ 'ti-base-color-data-8': '#EB4696', // 新风格专用
65
+
66
+ /* 场景色 */
67
+
68
+ // 功能色
69
+ 'ti-common-color-success-bg': 'var(--ti-base-color-success-bg)',
70
+ 'ti-common-color-success-border': 'var(--ti-base-color-success-border)',
71
+ 'ti-common-color-success': 'var(--ti-base-color-success)',
72
+ 'ti-common-color-text-success': 'var(--ti-base-color-success-text)',
73
+ 'ti-common-color-error-bg': 'var(--ti-base-color-error-bg)',
74
+ 'ti-common-color-error-border': 'var(--ti-base-color-error)',
75
+ 'ti-common-color-error-border-secondary': 'var(--ti-base-color-error-border)',
76
+ 'ti-common-color-error': 'var(--ti-base-color-error)',
77
+ 'ti-common-color-error-text': 'var(--ti-base-color-error-text)',
78
+ 'ti-common-color-warn-bg': 'var(--ti-base-color-warn-bg)',
79
+ 'ti-common-color-warn-border': 'var(--ti-base-color-warn-border)',
80
+ 'ti-common-color-warn': 'var(--ti-base-color-warn)',
81
+ 'ti-common-color-warn-text': 'var(--ti-base-color-warn-text)',
82
+ 'ti-common-color-prompt-bg': 'var(--ti-base-color-prompt-bg)',
83
+ 'ti-common-color-prompt-border': 'var(--ti-base-color-prompt-border)',
84
+ 'ti-common-color-prompt': 'var(--ti-base-color-prompt)',
85
+ 'ti-common-color-prompt-text': 'var(--ti-base-color-prompt-text)',
86
+ 'ti-common-color-warn-secondary': 'var(--ti-base-color-warn-1)',
87
+
88
+ // 文本色
89
+ 'ti-common-color-error-icon-from': 'var(--ti-base-color-error-icon-from)',
90
+ 'ti-common-color-error-icon-to': 'var(--ti-base-color-error-icon-to)',
91
+ 'ti-common-color-warn-icon-from': 'var(--ti-base-color-warn-icon-from)',
92
+ 'ti-common-color-warn-icon-to': 'var(--ti-base-color-warn-icon-to)',
93
+ 'ti-common-color-prompt-icon-from': 'var(--ti-base-color-prompt-icon-from)',
94
+ 'ti-common-color-prompt-icon-to': 'var(--ti-base-color-prompt-icon-to)',
95
+ 'ti-common-color-text-primary': 'var(--ti-base-color-common)',
96
+ 'ti-common-color-text-secondary': 'var(--ti-base-color-common-1)',
97
+ 'ti-common-color-text-weaken': 'var(--ti-base-color-common-2)',
98
+ 'ti-common-color-text-disabled': 'var(--ti-base-color-common-3)',
99
+ 'ti-common-color-text-highlight': 'var(--ti-base-color-brand-2)',
100
+ 'ti-common-color-text-link': 'var(--ti-base-color-brand)',
101
+ 'ti-common-color-text-link-hover': 'var(--ti-base-color-brand-1)',
102
+ 'ti-common-color-text-white': 'var(--ti-base-color-white)',
103
+ 'ti-common-color-text-darkbg': 'var(--ti-base-color-common-3)',
104
+ 'ti-common-color-text-darkbg-disabled': 'var(--ti-base-color-common-1)',
105
+ 'ti-common-color-text-gray-disabled': 'var(--ti-base-color-brand-3)',
106
+ 'ti-common-color-text-important': 'var(--ti-base-base-color-error-text)',
107
+ 'ti-common-color-text-link-darkbg': 'var(--ti-base-color-brand-4)',
108
+ 'ti-common-color-text-link-darkbg-hover': 'var(--ti-base-color-brand-5)',
109
+ 'ti-common-color-text-gray': 'var(--ti-base-color-common)',
110
+
111
+ // 图标色
112
+ 'ti-common-color-icon': 'var(--ti-base-color-common)', // 5.12新增
113
+ 'ti-common-color-icon-normal': 'var(--ti-base-color-common-2)', // 5.12修改
114
+ 'ti-common-color-icon-hover': 'var(--ti-base-color-common)', // 5.12修改
115
+ 'ti-common-color-icon-active': 'var(--ti-base-color-common)', // 5.12修改
116
+ 'ti-common-color-icon-disabled': 'var(--ti-base-color-common-3)',
117
+ 'ti-common-color-icon-white': 'var(--ti-base-color-white)',
118
+ 'ti-common-color-icon-graybg-normal': 'var(--ti-base-color-common-3)',
119
+ 'ti-common-color-icon-graybg-hover': 'var(--ti-base-color-brand)',
120
+ 'ti-common-color-icon-graybg-active': 'var(--ti-base-color-brand)',
121
+ 'ti-common-color-icon-graybg-disabled': 'var(--ti-base-color-common-4)',
122
+ 'ti-common-color-icon-darkbg-normal': 'var(--ti-base-color-common-3)',
123
+ 'ti-common-color-icon-darkbg-hover': 'var(--ti-base-color-brand-3)',
124
+ 'ti-common-color-icon-darkbg-active': 'var(--ti-base-color-brand-3)',
125
+ 'ti-common-color-icon-darkbg-disabled': 'var(--ti-base-color-common-1)',
126
+ 'ti-common-color-icon-info': 'var(--ti-base-color-icon-info)',
127
+
128
+ // 线条色
129
+ 'ti-common-color-line-normal': 'var(--ti-base-color-common-3)',
130
+ 'ti-common-color-line-hover': 'var(--ti-base-color-common)',
131
+ 'ti-common-color-line-active': 'var(--ti-base-color-common)',
132
+ 'ti-common-color-line-disabled': 'var(--ti-base-color-common-4)',
133
+ 'ti-common-color-line-dividing': 'var(--ti-base-color-common-5)',
134
+ 'ti-common-color-dash-line-normal': 'var(--ti-base-color-brand)',
135
+ 'ti-common-color-dash-line-hover': 'var(--ti-base-color-brand-1)',
136
+
137
+ // 背景色
138
+ 'ti-common-color-bg-normal': 'var(--ti-base-color-bg)',
139
+ 'ti-common-color-bg-disabled': 'var(--ti-base-color-bg-1)',
140
+ 'ti-common-color-bg-emphasize': 'var(--ti-base-color-brand)',
141
+ 'ti-common-color-bg-hover': 'var(--ti-base-color-brand-1)',
142
+ 'ti-common-color-bg-gray': 'var(--ti-base-color-bg-2)',
143
+ 'ti-common-color-bg-secondary': 'var(--ti-base-color-common-2)',
144
+ 'ti-common-color-bg-primary': 'var(--ti-base-color-bg-3)',
145
+ 'ti-common-color-bg-primary-hover': 'var(--ti-base-color-bg-4)',
146
+ 'ti-common-color-bg-primary-active': 'var(--ti-base-color-bg-4)',
147
+ 'ti-common-color-bg-minor': 'var(--ti-base-color-bg-7)',
148
+ 'ti-common-color-bg-minor-hover': 'var(--ti-base-color-bg-7)',
149
+ 'ti-common-color-bg-minor-active': 'var(--ti-base-color-bg-7)',
150
+ 'ti-common-color-bg-navigation': 'var(--ti-base-color-bg-5)',
151
+ 'ti-common-color-bg-white-normal': 'var(--ti-base-color-white)',
152
+ 'ti-common-color-bg-white-emphasize': 'var(--ti-base-color-bg-1)',
153
+ 'ti-common-color-bg-light-normal': 'var(--ti-base-color-brand-6)',
154
+ 'ti-common-color-bg-light-emphasize': 'var(--ti-base-color-brand-7)',
155
+ 'ti-common-color-bg-dark-normal': 'var(--ti-base-color-brand-8)',
156
+ 'ti-common-color-bg-dark-emphasize': 'var(--ti-base-color-brand-9)',
157
+ 'ti-common-color-bg-dark-active': 'var(--ti-base-color-bg-normal)',
158
+ 'ti-common-color-bg-dark-disabled': 'var(--ti-base-color-common-4)',
159
+ 'ti-common-color-bg-dark-deep': 'var(--ti-base-color-white)',
160
+ 'ti-common-color-bg-dark-select': 'var(--ti-base-color-white)',
161
+
162
+ // 图表色
163
+ 'ti-common-color-data-1': 'var(--ti-base-color-icon-info)',
164
+ 'ti-common-color-data-2': 'var(--ti-base-color-data-2)',
165
+ 'ti-common-color-data-3': 'var(--ti-base-color-data-3)',
166
+ 'ti-common-color-data-4': 'var(--ti-base-color-data-4)',
167
+ 'ti-common-color-data-5': 'var(--ti-base-color-data-5)',
168
+ 'ti-common-color-data-6': 'var(--ti-base-color-data-6)',
169
+ 'ti-common-color-data-7': 'var(--ti-base-color-data-7)',
170
+ 'ti-common-color-data-8': 'var(--ti-base-color-data-8)',
171
+
172
+ /* 字号 */
173
+ 'ti-common-font-size-base': '14px', // 正文
174
+ 'ti-common-font-size-0': '12px', // 辅助文本
175
+ 'ti-common-font-size-1': '14px',
176
+ 'ti-common-font-size-2': '16px',
177
+ 'ti-common-font-size-3': '18px',
178
+ 'ti-common-font-size-4': '20px',
179
+ 'ti-common-font-size-5': '24px',
180
+ 'ti-common-font-size-6': '32px',
181
+ 'ti-common-font-size-7': '36px',
182
+ 'ti-common-font-size-8': '40px',
183
+ 'ti-common-font-size-9': '48px',
184
+ 'ti-common-font-size-10': '56px',
185
+ 'ti-common-line-number': '1.5',
186
+
187
+ /* 字体 */
188
+ 'ti-common-font-family':
189
+ '"Helvetica", "Arial", "PingFangSC-Regular", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Microsoft JhengHei"',
190
+
191
+ /* 间距 */
192
+ 'ti-common-space-base': '4px',
193
+ 'ti-common-space-2x': 'calc(var(--ti-common-space-base) * 2)',
194
+ 'ti-common-space-3x': 'calc(var(--ti-common-space-base) * 3)',
195
+ 'ti-common-space-4x': 'calc(var(--ti-common-space-base) * 4)',
196
+ 'ti-common-space-5x': 'calc(var(--ti-common-space-base) * 5)',
197
+ 'ti-common-space-6x': 'calc(var(--ti-common-space-base) * 6)',
198
+ 'ti-common-space-8x': 'calc(var(--ti-common-space-base) * 8)',
199
+ 'ti-common-space-10x': 'calc(var(--ti-common-space-base) * 10)',
200
+ 'ti-common-space-6': '6px',
201
+ 'ti-common-space-10': '10px',
202
+ 'ti-common-space-0': '0px',
203
+ 'ti-common-space-2': '2px',
204
+
205
+ /* 阴影 */
206
+ 'ti-common-shadow-1-up': '0 -1px 3px 0 rgba(0,0,0,0.08)',
207
+ 'ti-common-shadow-1-down': '0 1px 3px 0 rgba(0,0,0,0.08)',
208
+ 'ti-common-shadow-1-left': '-1px 0px3px 0 rgba(0,0,0,0.08)',
209
+ 'ti-common-shadow-1-right': '1px 0px 3px 0 rgba(0,0,0,0.08)',
210
+ 'ti-common-shadow-2-up': ' 0 -2px 12px 0 rgba(0,0,0,0.08)',
211
+ 'ti-common-shadow-2-down': '0 2px 12px 0 rgba(0,0,0,0.08)',
212
+ 'ti-common-shadow-2-left': '-2px 0 12px 0 rgba(0,0,0,0.08)',
213
+ 'ti-common-shadow-2-right': '2px 0 12px 0 rgba(0,0,0,0.08)',
214
+ 'ti-common-shadow-3-up': '0 -2px 12px 0 rgba(0,0,0,0.08)',
215
+ 'ti-common-shadow-3-down': '0 2px 12px 0 rgba(0,0,0,0.08)',
216
+ 'ti-common-shadow-3-left': '-2px 0 12px 0 rgba(0,0,0,0.08)',
217
+ 'ti-common-shadow-3-right': '2px 0 12px 0 rgba(0,0,0,0.08)',
218
+ 'ti-common-shadow-4-up': '0 -4px 22px 0 rgba(0,0,0,0.08)',
219
+ 'ti-common-shadow-4-down': '0 4px 22px 0 rgba(0,0,0,0.08)',
220
+ 'ti-common-shadow-4-left': '-4px 0 22px 0 rgba(0,0,0,0.08)',
221
+ 'ti-common-shadow-4-right': '4px 0 22px 0 rgba(0,0,0,0.08)',
222
+
223
+ /* 圆角 */
224
+ 'ti-common-border-radius-normal': 'var(--ti-common-border-radius-3)',
225
+ 'ti-common-border-radius-1': '2px',
226
+ 'ti-common-border-radius-2': '4px',
227
+ 'ti-common-border-radius-3': '6px',
228
+ 'ti-common-border-radius-4': '8px',
229
+ 'ti-common-border-radius-5': '12px',
230
+ 'ti-common-border-radius-6': '16px',
231
+ 'ti-common-border-radius-7': '24px',
232
+ 'ti-common-border-radius-8': '32px',
233
+ 'ti-common-border-radius-9': '48px',
234
+ 'ti-common-border-radius-10': '100px',
235
+
236
+ /* 2023.4.17 新增 */
237
+
238
+ /* 主要 */
239
+ 'ti-common-color-primary-normal': 'var(--ti-base-color-brand)',
240
+ 'ti-common-color-primary-hover': 'var(--ti-base-color-brand-1)',
241
+ 'ti-common-color-primary-active': 'var(--ti-base-color-brand-1)',
242
+ 'ti-common-color-primary-disabled': 'var(--ti-base-color-bg-1)',
243
+ 'ti-common-color-primary-disabled-border': 'var(--ti-base-color-bg-1)',
244
+ 'ti-common-color-primary-disabled-text': 'var(--ti-base-color-common-3)',
245
+
246
+ /* 成功 */
247
+ 'ti-common-color-success-normal': 'var(--ti-base-color-success)',
248
+ 'ti-common-color-success-hover': '#b9e683',
249
+ 'ti-common-color-success-active': '#b9e683',
250
+ 'ti-common-color-success-disabled': 'var(--ti-base-color-bg-1)',
251
+ 'ti-common-color-success-disabled-border': 'var(--ti-base-color-bg-1)',
252
+ 'ti-common-color-success-disabled-text': 'var(--ti-base-color-common-3)',
253
+
254
+ /* 警告 */
255
+ 'ti-common-color-warning-normal': 'var(--ti-base-color-warn)',
256
+ 'ti-common-color-warning-hover': '#fcc98b',
257
+ 'ti-common-color-warning-active': '#fcc98b',
258
+ 'ti-common-color-warning-disabled': 'var(--ti-base-color-bg-1)',
259
+ 'ti-common-color-warning-disabled-border': 'var(--ti-base-color-bg-1)',
260
+ 'ti-common-color-warning-disabled-text': 'var(--ti-base-color-common-3)',
261
+
262
+ /* 失败 */
263
+ 'ti-common-color-danger-normal': 'var(--ti-base-color-error)',
264
+ 'ti-common-color-danger-hover': '#faa9a5',
265
+ 'ti-common-color-danger-active': '#faa9a5',
266
+ 'ti-common-color-danger-disabled': 'var(--ti-base-color-bg-1)',
267
+ 'ti-common-color-danger-disabled-border': 'var(--ti-base-color-bg-1)',
268
+ 'ti-common-color-danger-disabled-text': 'var(--ti-base-color-common-3)',
269
+
270
+ /* 信息 */
271
+ 'ti-common-color-info-normal': 'var(--ti-base-color-common)',
272
+ 'ti-common-color-info-hover': 'var(--ti-base-color-common-1)',
273
+ 'ti-common-color-info-active': 'var(--ti-base-color-common-1)',
274
+ 'ti-common-color-info-disabled': 'var(--ti-base-color-bg-1)',
275
+ 'ti-common-color-info-disabled-border': 'var(--ti-base-color-bg-1)',
276
+ 'ti-common-color-info-disabled-text': 'var(--ti-base-color-common-3)',
277
+
278
+ 'ti-common-color-light': 'var(--ti-base-color-bg-5)',
279
+ 'ti-common-color-dark': '#000',
280
+
281
+ /* 边框/分割线颜色 */
282
+ 'ti-common-color-border': '#999999',
283
+ 'ti-common-color-border-hover': 'var(--ti-base-color-brand)',
284
+
285
+ /* 背景色 */
286
+ 'ti-common-color-hover-background': 'var(--ti-base-color-bg);',
287
+ 'ti-common-color-selected-background': 'var(--ti-base-color-bg)',
288
+
289
+ /* 文本色 */
290
+ 'ti-common-color-selected-text-color': 'var(--ti-base-color-brand)',
291
+ 'ti-common-color-placeholder': 'var(--ti-base-color-common-2)',
292
+
293
+ /* 间距 */
294
+ 'ti-common-dropdown-gap': '4px',
295
+
296
+ /* 字重 */
297
+ 'ti-common-font-weight-light': '100',
298
+ 'ti-common-font-weight-normal': '400',
299
+ 'ti-common-font-weight-bold': '600',
300
+
301
+ /* 字体 */
302
+ 'ti-common-font-family-normal': 'var(--ti-common-font-family)',
303
+
304
+ /* 宽 */
305
+ 'ti-common-size-width-large': '152px',
306
+ 'ti-common-size-width-medium': '120px',
307
+ 'ti-common-size-width-normal': '104px', // Default
308
+ 'ti-common-size-width-small': '80px',
309
+ 'ti-common-size-width-minor': '30px',
310
+ 'ti-common-size-width-mini': '24px',
311
+
312
+ /* 高 */
313
+ 'ti-common-size-height-large': '48px',
314
+ 'ti-common-size-height-medium': '40px',
315
+ 'ti-common-size-height-normal': '32px', // Default
316
+ 'ti-common-size-height-small': '24px',
317
+ 'ti-common-size-height-minor': '30px',
318
+ 'ti-common-size-height-mini': '24px',
319
+
320
+ /* 行高 */
321
+ 'ti-common-line-height-base': '18px', // 跟字号对应
322
+ 'ti-common-line-height-1': '22px',
323
+ 'ti-common-line-height-2': '24px',
324
+ 'ti-common-line-height-3': '28px',
325
+ 'ti-common-line-height-4': '30px',
326
+ 'ti-common-line-height-5': '36px',
327
+ 'ti-common-line-height-6': '48px',
328
+ 'ti-common-line-height-7': '54px',
329
+ 'ti-common-line-height-8': '60px',
330
+ 'ti-common-line-height-9': '72px',
331
+ 'ti-common-line-height-10': '84px',
332
+
333
+ /* 滚动条 */
334
+ 'ti-common-scrollbar-width': '8px',
335
+ 'ti-common-scrollbar-track-piece-bg-color': 'var(--ti-base-color-bg-5)',
336
+ 'ti-common-scrollbar-thumb-bg-color': 'var(--ti-base-color-common-4)',
337
+ 'ti-common-scrollbar-thumb-border-radius': '4px',
338
+ 'ti-common-scrollbar-thumb-hover-bg-color': 'var(--ti-base-color-common-4)',
339
+ 'ti-common-scrollbar-thumb-active-bg-color': 'var(--ti-base-color-common-4)'
340
+ }
341
+
342
+ export * from './component'
package/theme/utils.js ADDED
@@ -0,0 +1,12 @@
1
+ export function flattenObject(obj) {
2
+ const result = {}
3
+
4
+ Object.entries(obj).forEach(([key, val]) => {
5
+ if (val && typeof val === 'object')
6
+ Object.assign(result, val)
7
+ else
8
+ result[key] = val
9
+ })
10
+
11
+ return result
12
+ }
package/theme-tool.js CHANGED
@@ -1,16 +1,16 @@
1
1
  /**
2
- * Copyright (c) 2022 - present TinyVue Authors.
3
- * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
- *
5
- * Use of this source code is governed by an MIT-style license.
6
- *
7
- * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
- * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
- * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
- *
11
- */
12
-
13
- import components from './theme.config'
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+
13
+ import definedComponents from './theme.config'
14
14
 
15
15
  /**
16
16
  * TinyVue主题切换类 负责CSS变量主题的装卸,主题元数据转换成主题数据
@@ -73,31 +73,38 @@ export default class TinyThemeTool {
73
73
  }
74
74
  }
75
75
  this.contentElement.textContent = this.formatCSSVariables(currentTheme.data)
76
+
76
77
  this.contentElement.setAttribute('tiny-theme', this.currentTheme.id)
77
78
  }
78
79
 
80
+ // 通过 `组件css变量`,来推导出组件名: 从 ti-checkbox-button-bg-color, 推导出 checkbox-button
79
81
  findClassName(name) {
80
82
  const compNameList = name.split('-')
81
83
  if (compNameList.length < 2) {
82
84
  return false
83
85
  }
84
- const compLength = components.length
86
+ const compLength = definedComponents.length
85
87
  let compName = ''
86
88
  for (let i = 0; i < compLength; i++) {
87
- if (components[i] === `${compNameList[1]}-${compNameList[2]}`) {
88
- compName = `tiny-${components[i]}`
89
+ // 先试试是不是双段式的组件名: 比如dialog-box 这种
90
+ if (definedComponents[i] === `${compNameList[1]}-${compNameList[2]}`) {
91
+ compName = `tiny-${definedComponents[i]}`
89
92
  break
90
93
  }
91
94
  }
95
+ // 不是双段的组件,则取第一位为组件名
92
96
  if (!compName) {
93
97
  compName = `tiny-${compNameList[1]}`
94
98
  }
99
+
100
+ // 提高权重,促使主题变换成功
101
+ compName = `${compName}[class*=tiny]`
95
102
  return compName
96
103
  }
97
104
 
98
105
  formatCSSVariables(themeData) {
99
106
  const componentsMap = {}
100
- let rootCssVar = ':root {'
107
+ let rootCssVar = 'html:root {'
101
108
  let componentsCssVar = ''
102
109
 
103
110
  Object.keys(themeData).forEach((item) => {