@uzum-tech/ui 1.2.4 → 1.3.1

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 (248) hide show
  1. package/dist/index.js +436 -301
  2. package/dist/index.prod.js +2 -2
  3. package/es/_internal/icons/CheckmarkCircle.d.ts +2 -0
  4. package/es/_internal/icons/CheckmarkCircle.js +9 -0
  5. package/es/_internal/icons/DismissCircle.d.ts +2 -0
  6. package/es/_internal/icons/DismissCircle.js +9 -0
  7. package/es/_internal/icons/Edit.d.ts +2 -0
  8. package/es/_internal/icons/Edit.js +9 -0
  9. package/es/_internal/icons/index.d.ts +3 -0
  10. package/es/_internal/icons/index.js +3 -0
  11. package/es/_internal/select-menu/src/SelectMenu.d.ts +2 -0
  12. package/es/_internal/select-menu/src/SelectOption.js +1 -1
  13. package/es/_internal/selection/src/Selection.d.ts +2 -0
  14. package/es/_internal/selection/src/Selection.js +3 -1
  15. package/es/_styles/common/dark.js +1 -1
  16. package/es/_styles/common/light.d.ts +2 -0
  17. package/es/_styles/common/light.js +1 -1
  18. package/es/alert/src/Alert.d.ts +2 -0
  19. package/es/auto-complete/src/AutoComplete.d.ts +2 -0
  20. package/es/avatar-group/src/AvatarGroup.d.ts +2 -0
  21. package/es/calendar/src/Calendar.d.ts +2 -0
  22. package/es/card/src/Card.d.ts +2 -0
  23. package/es/cascader/src/Cascader.d.ts +2 -0
  24. package/es/cascader/src/CascaderMenu.d.ts +2 -0
  25. package/es/cascader/src/CascaderOption.d.ts +2 -0
  26. package/es/cascader/src/CascaderSelectMenu.d.ts +2 -0
  27. package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
  28. package/es/checkbox/src/Checkbox.d.ts +2 -0
  29. package/es/collapse/src/Collapse.d.ts +2 -0
  30. package/es/color-picker/src/ColorInputUnit.d.ts +2 -0
  31. package/es/data-table/src/DataTable.d.ts +2 -0
  32. package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  33. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  34. package/es/data-table/src/TableParts/Body.d.ts +2 -0
  35. package/es/data-table/src/TableParts/Cell.d.ts +4 -0
  36. package/es/data-table/src/TableParts/Header.d.ts +2 -0
  37. package/es/data-table/styles/light.js +2 -2
  38. package/es/date-picker/src/DatePicker.d.ts +2 -0
  39. package/es/date-picker/src/panel/date.d.ts +2 -0
  40. package/es/date-picker/src/panel/daterange.d.ts +2 -0
  41. package/es/date-picker/src/panel/datetime.d.ts +2 -0
  42. package/es/date-picker/src/panel/datetimerange.d.ts +2 -0
  43. package/es/date-picker/src/panel/panelMonth.d.ts +4 -0
  44. package/es/date-picker/src/panel/panelMonthContent.d.ts +2 -0
  45. package/es/date-picker/src/panel/panelYear.d.ts +4 -0
  46. package/es/date-picker/src/panel/panelYearContent.d.ts +2 -0
  47. package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
  48. package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  49. package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
  50. package/es/dialog/src/Dialog.d.ts +2 -0
  51. package/es/dialog/src/DialogProvider.d.ts +4 -0
  52. package/es/drawer/src/Drawer.d.ts +24 -0
  53. package/es/drawer/src/Drawer.js +4 -2
  54. package/es/drawer/src/DrawerBodyWrapper.d.ts +4 -0
  55. package/es/drawer/src/DrawerContent.d.ts +4 -0
  56. package/es/drawer/src/styles/index.cssr.js +4 -0
  57. package/es/drawer/styles/_common.d.ts +2 -0
  58. package/es/drawer/styles/_common.js +3 -1
  59. package/es/drawer/styles/light.d.ts +4 -0
  60. package/es/dropdown/src/Dropdown.d.ts +2 -0
  61. package/es/dynamic-input/src/DynamicInput.d.ts +2 -0
  62. package/es/dynamic-input/src/InputPreset.d.ts +2 -0
  63. package/es/dynamic-input/src/PairPreset.d.ts +2 -0
  64. package/es/dynamic-tags/src/DynamicTags.d.ts +2 -0
  65. package/es/ellipsis/src/Ellipsis.d.ts +2 -0
  66. package/es/input/src/Input.d.ts +2 -0
  67. package/es/input-number/src/InputNumber.d.ts +2 -0
  68. package/es/layout/src/Layout.d.ts +4 -0
  69. package/es/layout/src/LayoutContent.d.ts +2 -0
  70. package/es/layout/src/LayoutSider.d.ts +2 -0
  71. package/es/legacy-transfer/src/Transfer.d.ts +2 -0
  72. package/es/legacy-transfer/src/TransferFilter.d.ts +2 -0
  73. package/es/legacy-transfer/src/TransferList.d.ts +2 -0
  74. package/es/legacy-transfer/src/TransferListItem.d.ts +2 -0
  75. package/es/log/src/Log.d.ts +2 -0
  76. package/es/mention/src/Mention.d.ts +2 -0
  77. package/es/menu/src/Menu.d.ts +2 -0
  78. package/es/menu/src/MenuOption.d.ts +2 -0
  79. package/es/menu/src/Submenu.d.ts +2 -0
  80. package/es/modal/src/BodyWrapper.d.ts +2 -0
  81. package/es/notification/src/NotificationContainer.d.ts +2 -0
  82. package/es/pagination/src/Pagination.d.ts +2 -0
  83. package/es/popconfirm/src/Popconfirm.d.ts +2 -0
  84. package/es/popselect/src/Popselect.d.ts +2 -0
  85. package/es/popselect/src/PopselectPanel.d.ts +2 -0
  86. package/es/select/src/Select.d.ts +2 -0
  87. package/es/status/src/Status.d.ts +36 -6
  88. package/es/status/src/Status.js +28 -22
  89. package/es/status/src/interface.d.ts +3 -0
  90. package/es/status/src/interface.js +1 -0
  91. package/es/status/src/styles/index.cssr.js +5 -1
  92. package/es/status/styles/light.d.ts +2 -0
  93. package/es/status/styles/light.js +3 -1
  94. package/es/steps/src/Step.d.ts +12 -6
  95. package/es/steps/src/Step.js +77 -46
  96. package/es/steps/src/Steps.d.ts +63 -13
  97. package/es/steps/src/Steps.js +6 -2
  98. package/es/steps/src/interface.d.ts +13 -0
  99. package/es/steps/src/interface.js +1 -0
  100. package/es/steps/src/styles/index.cssr.js +24 -1
  101. package/es/steps/styles/light.d.ts +4 -0
  102. package/es/steps/styles/light.js +5 -1
  103. package/es/tag/src/Tag.js +1 -1
  104. package/es/tag/src/styles/index.cssr.js +0 -4
  105. package/es/theme-editor/src/ThemeEditor.d.ts +2 -0
  106. package/es/time-picker/src/Panel.d.ts +2 -0
  107. package/es/time-picker/src/TimePicker.d.ts +2 -0
  108. package/es/tooltip/src/Tooltip.d.ts +2 -0
  109. package/es/transfer/src/Transfer.d.ts +2 -0
  110. package/es/transfer/src/TransferFilter.d.ts +2 -0
  111. package/es/transfer/src/TransferList.d.ts +2 -0
  112. package/es/transfer/src/TransferListItem.d.ts +2 -0
  113. package/es/tree/src/Tree.d.ts +2 -0
  114. package/es/tree/src/TreeNodeCheckbox.d.ts +2 -0
  115. package/es/tree-select/src/TreeSelect.d.ts +2 -0
  116. package/es/upload/src/Upload.d.ts +3 -1
  117. package/es/upload/src/Upload.js +5 -4
  118. package/es/upload/src/UploadFile.d.ts +2 -0
  119. package/es/upload/src/UploadProgress.d.ts +2 -0
  120. package/es/upload/src/UploadTrigger.js +2 -2
  121. package/es/upload/src/interface.d.ts +2 -2
  122. package/es/upload/src/styles/index.cssr.js +1 -1
  123. package/es/version.d.ts +1 -1
  124. package/es/version.js +1 -1
  125. package/lib/_internal/icons/CheckmarkCircle.d.ts +2 -0
  126. package/lib/_internal/icons/CheckmarkCircle.js +11 -0
  127. package/lib/_internal/icons/DismissCircle.d.ts +2 -0
  128. package/lib/_internal/icons/DismissCircle.js +11 -0
  129. package/lib/_internal/icons/Edit.d.ts +2 -0
  130. package/lib/_internal/icons/Edit.js +11 -0
  131. package/lib/_internal/icons/index.d.ts +3 -0
  132. package/lib/_internal/icons/index.js +7 -1
  133. package/lib/_internal/select-menu/src/SelectMenu.d.ts +2 -0
  134. package/lib/_internal/select-menu/src/SelectOption.js +5 -2
  135. package/lib/_internal/selection/src/Selection.d.ts +2 -0
  136. package/lib/_internal/selection/src/Selection.js +6 -4
  137. package/lib/_styles/common/dark.js +1 -1
  138. package/lib/_styles/common/light.d.ts +2 -0
  139. package/lib/_styles/common/light.js +1 -1
  140. package/lib/alert/src/Alert.d.ts +2 -0
  141. package/lib/auto-complete/src/AutoComplete.d.ts +2 -0
  142. package/lib/avatar-group/src/AvatarGroup.d.ts +2 -0
  143. package/lib/calendar/src/Calendar.d.ts +2 -0
  144. package/lib/card/src/Card.d.ts +2 -0
  145. package/lib/cascader/src/Cascader.d.ts +2 -0
  146. package/lib/cascader/src/CascaderMenu.d.ts +2 -0
  147. package/lib/cascader/src/CascaderOption.d.ts +2 -0
  148. package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -0
  149. package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
  150. package/lib/checkbox/src/Checkbox.d.ts +2 -0
  151. package/lib/collapse/src/Collapse.d.ts +2 -0
  152. package/lib/color-picker/src/ColorInputUnit.d.ts +2 -0
  153. package/lib/data-table/src/DataTable.d.ts +2 -0
  154. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  155. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  156. package/lib/data-table/src/TableParts/Body.d.ts +2 -0
  157. package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
  158. package/lib/data-table/src/TableParts/Header.d.ts +2 -0
  159. package/lib/data-table/styles/light.js +2 -2
  160. package/lib/date-picker/src/DatePicker.d.ts +2 -0
  161. package/lib/date-picker/src/panel/date.d.ts +2 -0
  162. package/lib/date-picker/src/panel/daterange.d.ts +2 -0
  163. package/lib/date-picker/src/panel/datetime.d.ts +2 -0
  164. package/lib/date-picker/src/panel/datetimerange.d.ts +2 -0
  165. package/lib/date-picker/src/panel/panelMonth.d.ts +4 -0
  166. package/lib/date-picker/src/panel/panelMonthContent.d.ts +2 -0
  167. package/lib/date-picker/src/panel/panelYear.d.ts +4 -0
  168. package/lib/date-picker/src/panel/panelYearContent.d.ts +2 -0
  169. package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
  170. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  171. package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
  172. package/lib/dialog/src/Dialog.d.ts +2 -0
  173. package/lib/dialog/src/DialogProvider.d.ts +4 -0
  174. package/lib/drawer/src/Drawer.d.ts +24 -0
  175. package/lib/drawer/src/Drawer.js +4 -2
  176. package/lib/drawer/src/DrawerBodyWrapper.d.ts +4 -0
  177. package/lib/drawer/src/DrawerContent.d.ts +4 -0
  178. package/lib/drawer/src/styles/index.cssr.js +4 -0
  179. package/lib/drawer/styles/_common.d.ts +2 -0
  180. package/lib/drawer/styles/_common.js +3 -1
  181. package/lib/drawer/styles/light.d.ts +4 -0
  182. package/lib/dropdown/src/Dropdown.d.ts +2 -0
  183. package/lib/dynamic-input/src/DynamicInput.d.ts +2 -0
  184. package/lib/dynamic-input/src/InputPreset.d.ts +2 -0
  185. package/lib/dynamic-input/src/PairPreset.d.ts +2 -0
  186. package/lib/dynamic-tags/src/DynamicTags.d.ts +2 -0
  187. package/lib/ellipsis/src/Ellipsis.d.ts +2 -0
  188. package/lib/input/src/Input.d.ts +2 -0
  189. package/lib/input-number/src/InputNumber.d.ts +2 -0
  190. package/lib/layout/src/Layout.d.ts +4 -0
  191. package/lib/layout/src/LayoutContent.d.ts +2 -0
  192. package/lib/layout/src/LayoutSider.d.ts +2 -0
  193. package/lib/legacy-transfer/src/Transfer.d.ts +2 -0
  194. package/lib/legacy-transfer/src/TransferFilter.d.ts +2 -0
  195. package/lib/legacy-transfer/src/TransferList.d.ts +2 -0
  196. package/lib/legacy-transfer/src/TransferListItem.d.ts +2 -0
  197. package/lib/log/src/Log.d.ts +2 -0
  198. package/lib/mention/src/Mention.d.ts +2 -0
  199. package/lib/menu/src/Menu.d.ts +2 -0
  200. package/lib/menu/src/MenuOption.d.ts +2 -0
  201. package/lib/menu/src/Submenu.d.ts +2 -0
  202. package/lib/modal/src/BodyWrapper.d.ts +2 -0
  203. package/lib/notification/src/NotificationContainer.d.ts +2 -0
  204. package/lib/pagination/src/Pagination.d.ts +2 -0
  205. package/lib/popconfirm/src/Popconfirm.d.ts +2 -0
  206. package/lib/popselect/src/Popselect.d.ts +2 -0
  207. package/lib/popselect/src/PopselectPanel.d.ts +2 -0
  208. package/lib/select/src/Select.d.ts +2 -0
  209. package/lib/status/src/Status.d.ts +36 -6
  210. package/lib/status/src/Status.js +27 -21
  211. package/lib/status/src/interface.d.ts +3 -0
  212. package/lib/status/src/interface.js +2 -0
  213. package/lib/status/src/styles/index.cssr.js +5 -1
  214. package/lib/status/styles/light.d.ts +2 -0
  215. package/lib/status/styles/light.js +3 -1
  216. package/lib/steps/src/Step.d.ts +12 -6
  217. package/lib/steps/src/Step.js +76 -45
  218. package/lib/steps/src/Steps.d.ts +63 -13
  219. package/lib/steps/src/Steps.js +6 -2
  220. package/lib/steps/src/interface.d.ts +13 -0
  221. package/lib/steps/src/interface.js +2 -0
  222. package/lib/steps/src/styles/index.cssr.js +24 -1
  223. package/lib/steps/styles/light.d.ts +4 -0
  224. package/lib/steps/styles/light.js +5 -1
  225. package/lib/tag/src/Tag.js +1 -1
  226. package/lib/tag/src/styles/index.cssr.js +0 -4
  227. package/lib/theme-editor/src/ThemeEditor.d.ts +2 -0
  228. package/lib/time-picker/src/Panel.d.ts +2 -0
  229. package/lib/time-picker/src/TimePicker.d.ts +2 -0
  230. package/lib/tooltip/src/Tooltip.d.ts +2 -0
  231. package/lib/transfer/src/Transfer.d.ts +2 -0
  232. package/lib/transfer/src/TransferFilter.d.ts +2 -0
  233. package/lib/transfer/src/TransferList.d.ts +2 -0
  234. package/lib/transfer/src/TransferListItem.d.ts +2 -0
  235. package/lib/tree/src/Tree.d.ts +2 -0
  236. package/lib/tree/src/TreeNodeCheckbox.d.ts +2 -0
  237. package/lib/tree-select/src/TreeSelect.d.ts +2 -0
  238. package/lib/upload/src/Upload.d.ts +3 -1
  239. package/lib/upload/src/Upload.js +5 -4
  240. package/lib/upload/src/UploadFile.d.ts +2 -0
  241. package/lib/upload/src/UploadProgress.d.ts +2 -0
  242. package/lib/upload/src/UploadTrigger.js +2 -2
  243. package/lib/upload/src/interface.d.ts +2 -2
  244. package/lib/upload/src/styles/index.cssr.js +1 -1
  245. package/lib/version.d.ts +1 -1
  246. package/lib/version.js +1 -1
  247. package/package.json +1 -1
  248. package/web-types.json +29 -4
@@ -1,9 +1,13 @@
1
1
  import { type PropType } from 'vue';
2
- import type { ExtractPublicPropTypes } from '../../_utils';
2
+ import { type ExtractPublicPropTypes } from '../../_utils';
3
+ import { StatusTypes } from './interface';
4
+ import { VNodeChild } from 'vue';
3
5
  export declare const statusProps: {
4
6
  color: StringConstructor;
7
+ filled: BooleanConstructor;
8
+ noIcon: BooleanConstructor;
5
9
  type: {
6
- type: PropType<"default" | "error" | "success" | "warning">;
10
+ type: PropType<StatusTypes>;
7
11
  default: string;
8
12
  };
9
13
  theme: PropType<import("../../_mixins").Theme<"Status", {
@@ -11,9 +15,11 @@ export declare const statusProps: {
11
15
  lineHeight: string;
12
16
  fontWeight: string;
13
17
  iconSize: string;
18
+ iconColor: string;
14
19
  iconSpacing: string;
15
20
  textColor: string;
16
21
  successColor: string;
22
+ infoColor: string;
17
23
  warningColor: string;
18
24
  dangerColor: string;
19
25
  }, any>>;
@@ -22,9 +28,11 @@ export declare const statusProps: {
22
28
  lineHeight: string;
23
29
  fontWeight: string;
24
30
  iconSize: string;
31
+ iconColor: string;
25
32
  iconSpacing: string;
26
33
  textColor: string;
27
34
  successColor: string;
35
+ infoColor: string;
28
36
  warningColor: string;
29
37
  dangerColor: string;
30
38
  }, any>>>;
@@ -33,9 +41,11 @@ export declare const statusProps: {
33
41
  lineHeight: string;
34
42
  fontWeight: string;
35
43
  iconSize: string;
44
+ iconColor: string;
36
45
  iconSpacing: string;
37
46
  textColor: string;
38
47
  successColor: string;
48
+ infoColor: string;
39
49
  warningColor: string;
40
50
  dangerColor: string;
41
51
  }, any>>>;
@@ -43,8 +53,10 @@ export declare const statusProps: {
43
53
  export type StatusProps = ExtractPublicPropTypes<typeof statusProps>;
44
54
  declare const _default: import("vue").DefineComponent<{
45
55
  color: StringConstructor;
56
+ filled: BooleanConstructor;
57
+ noIcon: BooleanConstructor;
46
58
  type: {
47
- type: PropType<"default" | "error" | "success" | "warning">;
59
+ type: PropType<StatusTypes>;
48
60
  default: string;
49
61
  };
50
62
  theme: PropType<import("../../_mixins").Theme<"Status", {
@@ -52,9 +64,11 @@ declare const _default: import("vue").DefineComponent<{
52
64
  lineHeight: string;
53
65
  fontWeight: string;
54
66
  iconSize: string;
67
+ iconColor: string;
55
68
  iconSpacing: string;
56
69
  textColor: string;
57
70
  successColor: string;
71
+ infoColor: string;
58
72
  warningColor: string;
59
73
  dangerColor: string;
60
74
  }, any>>;
@@ -63,9 +77,11 @@ declare const _default: import("vue").DefineComponent<{
63
77
  lineHeight: string;
64
78
  fontWeight: string;
65
79
  iconSize: string;
80
+ iconColor: string;
66
81
  iconSpacing: string;
67
82
  textColor: string;
68
83
  successColor: string;
84
+ infoColor: string;
69
85
  warningColor: string;
70
86
  dangerColor: string;
71
87
  }, any>>>;
@@ -74,30 +90,36 @@ declare const _default: import("vue").DefineComponent<{
74
90
  lineHeight: string;
75
91
  fontWeight: string;
76
92
  iconSize: string;
93
+ iconColor: string;
77
94
  iconSpacing: string;
78
95
  textColor: string;
79
96
  successColor: string;
97
+ infoColor: string;
80
98
  warningColor: string;
81
99
  dangerColor: string;
82
100
  }, any>>>;
83
101
  }, {
84
102
  mergedClsPrefix: import("vue").Ref<string>;
85
- mergedRenderIcon: import("vue").ComputedRef<import("vue").Slot<any> | (() => JSX.Element)>;
103
+ mergedRenderIcon: () => VNodeChild;
86
104
  cssVars: import("vue").ComputedRef<{
87
105
  '--u-bezier': string;
88
106
  '--u-text-color': string;
107
+ '--u-background-color': string;
89
108
  '--u-font-size': string;
90
109
  '--u-font-weight': string;
91
110
  '--u-line-height': string;
92
111
  '--u-icon-size': string;
112
+ '--u-icon-color': string;
93
113
  '--u-icon-spacing': string;
94
114
  }> | undefined;
95
115
  themeClass: import("vue").Ref<string> | undefined;
96
116
  onRender: (() => void) | undefined;
97
117
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
98
118
  color: StringConstructor;
119
+ filled: BooleanConstructor;
120
+ noIcon: BooleanConstructor;
99
121
  type: {
100
- type: PropType<"default" | "error" | "success" | "warning">;
122
+ type: PropType<StatusTypes>;
101
123
  default: string;
102
124
  };
103
125
  theme: PropType<import("../../_mixins").Theme<"Status", {
@@ -105,9 +127,11 @@ declare const _default: import("vue").DefineComponent<{
105
127
  lineHeight: string;
106
128
  fontWeight: string;
107
129
  iconSize: string;
130
+ iconColor: string;
108
131
  iconSpacing: string;
109
132
  textColor: string;
110
133
  successColor: string;
134
+ infoColor: string;
111
135
  warningColor: string;
112
136
  dangerColor: string;
113
137
  }, any>>;
@@ -116,9 +140,11 @@ declare const _default: import("vue").DefineComponent<{
116
140
  lineHeight: string;
117
141
  fontWeight: string;
118
142
  iconSize: string;
143
+ iconColor: string;
119
144
  iconSpacing: string;
120
145
  textColor: string;
121
146
  successColor: string;
147
+ infoColor: string;
122
148
  warningColor: string;
123
149
  dangerColor: string;
124
150
  }, any>>>;
@@ -127,13 +153,17 @@ declare const _default: import("vue").DefineComponent<{
127
153
  lineHeight: string;
128
154
  fontWeight: string;
129
155
  iconSize: string;
156
+ iconColor: string;
130
157
  iconSpacing: string;
131
158
  textColor: string;
132
159
  successColor: string;
160
+ infoColor: string;
133
161
  warningColor: string;
134
162
  dangerColor: string;
135
163
  }, any>>>;
136
164
  }>>, {
137
- type: "default" | "error" | "success" | "warning";
165
+ type: StatusTypes;
166
+ filled: boolean;
167
+ noIcon: boolean;
138
168
  }, {}>;
139
169
  export default _default;
@@ -1,10 +1,11 @@
1
1
  import { h, defineComponent, computed } from 'vue';
2
2
  import { UBaseIcon } from '../../_internal/icon';
3
- import { SuccessIcon, WarningIcon, ErrorIcon, InactiveIcon } from '../../_internal/icons';
3
+ import { SuccessIcon, WarningIcon, ErrorIcon, InactiveIcon, InfoIcon } from '../../_internal/icons';
4
4
  import { useConfig, useTheme, useThemeClass } from '../../_mixins';
5
+ import { resolveWrappedSlot } from '../../_utils';
5
6
  import { statusLight } from '../styles';
6
7
  import style from './styles/index.cssr';
7
- export const statusProps = Object.assign(Object.assign({}, useTheme.props), { color: String, type: {
8
+ export const statusProps = Object.assign(Object.assign({}, useTheme.props), { color: String, filled: Boolean, noIcon: Boolean, type: {
8
9
  type: String,
9
10
  default: 'default'
10
11
  } });
@@ -14,28 +15,28 @@ export default defineComponent({
14
15
  setup(props, { slots }) {
15
16
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
16
17
  const themeRef = useTheme('Status', '-status', style, statusLight, props, mergedClsPrefixRef);
17
- const mergedRenderIconRef = computed(() => {
18
- if (slots.icon) {
19
- return slots.icon;
20
- }
21
- switch (props.type) {
22
- case 'success':
23
- return () => h(SuccessIcon, null);
24
- case 'warning':
25
- return () => h(WarningIcon, null);
26
- case 'error':
27
- return () => h(ErrorIcon, null);
28
- case 'default':
29
- return () => h(InactiveIcon, null);
30
- }
31
- });
18
+ const iconRenderer = {
19
+ success: () => h(SuccessIcon, null),
20
+ info: () => h(InfoIcon, null),
21
+ warning: () => h(WarningIcon, null),
22
+ error: () => h(ErrorIcon, null),
23
+ default: () => resolveWrappedSlot(slots.icon, (icon) => icon) ||
24
+ h(InactiveIcon, null)
25
+ };
26
+ const renderIcon = () => {
27
+ const renderer = iconRenderer[props.type] || iconRenderer.default;
28
+ return renderer();
29
+ };
32
30
  const cssVarsRef = computed(() => {
33
- const { common: { cubicBezierEaseInOut }, self: { textColor, warningColor, dangerColor, successColor, iconSize, fontSize, lineHeight, fontWeight, iconSpacing } } = themeRef.value;
31
+ const { common: { cubicBezierEaseInOut }, self: { textColor, warningColor, dangerColor, successColor, infoColor, iconSize, iconColor, fontSize, lineHeight, fontWeight, iconSpacing } } = themeRef.value;
34
32
  let color = textColor;
35
33
  switch (props.type) {
36
34
  case 'success':
37
35
  color = successColor;
38
36
  break;
37
+ case 'info':
38
+ color = infoColor;
39
+ break;
39
40
  case 'warning':
40
41
  color = warningColor;
41
42
  break;
@@ -46,10 +47,14 @@ export default defineComponent({
46
47
  return {
47
48
  '--u-bezier': cubicBezierEaseInOut,
48
49
  '--u-text-color': props.color || color,
50
+ '--u-background-color': props.filled
51
+ ? `${props.color || color}10`
52
+ : 'transparent',
49
53
  '--u-font-size': fontSize,
50
54
  '--u-font-weight': fontWeight,
51
55
  '--u-line-height': lineHeight,
52
56
  '--u-icon-size': iconSize,
57
+ '--u-icon-color': iconColor || props.color || color,
53
58
  '--u-icon-spacing': iconSpacing
54
59
  };
55
60
  });
@@ -60,7 +65,7 @@ export default defineComponent({
60
65
  : undefined;
61
66
  return {
62
67
  mergedClsPrefix: mergedClsPrefixRef,
63
- mergedRenderIcon: mergedRenderIconRef,
68
+ mergedRenderIcon: renderIcon,
64
69
  cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
65
70
  themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
66
71
  onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
@@ -72,10 +77,11 @@ export default defineComponent({
72
77
  return (h("div", { class: [
73
78
  `${mergedClsPrefix}-status`,
74
79
  `${mergedClsPrefix}-status--${this.type}`,
75
- this.themeClass
80
+ this.themeClass,
81
+ { [`${mergedClsPrefix}-status--filled`]: this.filled }
76
82
  ], style: this.cssVars },
77
- h("div", { class: `${mergedClsPrefix}-status__icon` },
78
- h(UBaseIcon, { clsPrefix: mergedClsPrefix }, { default: this.mergedRenderIcon })),
83
+ !this.noIcon && (h("div", { class: `${mergedClsPrefix}-status__icon` },
84
+ h(UBaseIcon, { clsPrefix: mergedClsPrefix }, { default: this.mergedRenderIcon }))),
79
85
  $slots.default && (h("span", { class: `${mergedClsPrefix}-status__description` }, $slots.default()))));
80
86
  }
81
87
  });
@@ -0,0 +1,3 @@
1
+ import { VNodeChild } from 'vue';
2
+ export type StatusTypes = 'success' | 'info' | 'warning' | 'error' | 'default';
3
+ export type IconRenderer = Record<StatusTypes, () => VNodeChild>;
@@ -0,0 +1 @@
1
+ export {};
@@ -7,16 +7,20 @@ import { c, cB, cE } from '../../../_utils/cssr';
7
7
  // --u-text-color
8
8
  // --u-extra-text-color
9
9
  export default cB('status', `
10
- display: flex;
10
+ display: inline-flex;
11
11
  font-size: var(--u-font-size);
12
12
  line-height: var(--u-line-height);
13
13
  font-weight: var(--u-font-weight);
14
14
  color: var(--u-text-color);
15
+ padding: 2px 8px;
16
+ border-radius: 16px;
17
+ background-color: var(--u-background-color);
15
18
  `, [cE('icon', `
16
19
  display: flex;
17
20
  align-items: center;
18
21
  height: var(--u-line-height);
19
22
  font-size: var(--u-icon-size);
23
+ color: var(--u-icon-color);
20
24
  margin-right: var(--u-icon-spacing);
21
25
  flex-shrink: 0;
22
26
  `, [c('&:last-child', `
@@ -5,9 +5,11 @@ export declare const self: (vars: ThemeCommonVars) => {
5
5
  lineHeight: string;
6
6
  fontWeight: string;
7
7
  iconSize: string;
8
+ iconColor: string;
8
9
  iconSpacing: string;
9
10
  textColor: string;
10
11
  successColor: string;
12
+ infoColor: string;
11
13
  warningColor: string;
12
14
  dangerColor: string;
13
15
  };
@@ -1,14 +1,16 @@
1
1
  import { commonLight } from '../../_styles/common';
2
2
  export const self = (vars) => {
3
- const { fontBodyMedium, lineHeightBodyMedium, fontWeightStrong, iconSmall, textSecondary, staticGreen, staticOrange, staticRed } = vars;
3
+ const { fontBodyMedium, lineHeightBodyMedium, fontWeightStrong, iconSmall, textSecondary, staticGreen, staticOrange, staticRed, staticDeepBlue } = vars;
4
4
  return {
5
5
  fontSize: fontBodyMedium,
6
6
  lineHeight: lineHeightBodyMedium,
7
7
  fontWeight: fontWeightStrong,
8
8
  iconSize: iconSmall,
9
+ iconColor: '',
9
10
  iconSpacing: '8px',
10
11
  textColor: textSecondary,
11
12
  successColor: staticGreen,
13
+ infoColor: staticDeepBlue,
12
14
  warningColor: staticOrange,
13
15
  dangerColor: staticRed
14
16
  };
@@ -1,11 +1,13 @@
1
1
  import { type PropType, VNodeChild } from 'vue';
2
+ import type { StepsStatus, StepsVariant, VariantBehaviors } from './interface';
2
3
  import type { ExtractPublicPropTypes } from '../../_utils';
3
4
  export declare const stepProps: {
4
- readonly status: PropType<"wait" | "error" | "finish" | "process">;
5
+ readonly status: PropType<StepsStatus>;
5
6
  readonly title: StringConstructor;
6
7
  readonly description: StringConstructor;
7
8
  readonly disabled: BooleanConstructor;
8
9
  readonly noIcon: BooleanConstructor;
10
+ readonly variant: PropType<StepsVariant>;
9
11
  readonly internalIndex: {
10
12
  readonly type: NumberConstructor;
11
13
  readonly default: 0;
@@ -13,11 +15,12 @@ export declare const stepProps: {
13
15
  };
14
16
  export type StepProps = ExtractPublicPropTypes<typeof stepProps>;
15
17
  declare const _default: import("vue").DefineComponent<{
16
- readonly status: PropType<"wait" | "error" | "finish" | "process">;
18
+ readonly status: PropType<StepsStatus>;
17
19
  readonly title: StringConstructor;
18
20
  readonly description: StringConstructor;
19
21
  readonly disabled: BooleanConstructor;
20
22
  readonly noIcon: BooleanConstructor;
23
+ readonly variant: PropType<StepsVariant>;
21
24
  readonly internalIndex: {
22
25
  readonly type: NumberConstructor;
23
26
  readonly default: 0;
@@ -28,9 +31,10 @@ declare const _default: import("vue").DefineComponent<{
28
31
  [name: string]: import("vue").Slot<any> | undefined;
29
32
  }>;
30
33
  mergedClsPrefix: import("vue").Ref<string>;
31
- vertical: import("vue").ComputedRef<boolean>;
34
+ variantBehaviors: import("vue").ComputedRef<VariantBehaviors>;
35
+ variant: import("vue").ComputedRef<StepsVariant>;
32
36
  noIcon: import("vue").ComputedRef<boolean>;
33
- mergedStatus: import("vue").ComputedRef<"wait" | "error" | "finish" | "process">;
37
+ mergedStatus: import("vue").ComputedRef<StepsStatus>;
34
38
  handleStepClick: import("vue").ComputedRef<(() => void) | undefined>;
35
39
  cssVars: import("vue").ComputedRef<{
36
40
  '--u-bezier': string;
@@ -45,22 +49,24 @@ declare const _default: import("vue").DefineComponent<{
45
49
  '--u-splitor-color': string;
46
50
  '--u-step-header-font-size': string;
47
51
  '--u-step-header-font-weight': string;
52
+ '--u-step-icon-color': string;
48
53
  }> | undefined;
49
54
  themeClass: import("vue").Ref<string> | undefined;
50
55
  onRender: (() => void) | undefined;
51
56
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
52
- readonly status: PropType<"wait" | "error" | "finish" | "process">;
57
+ readonly status: PropType<StepsStatus>;
53
58
  readonly title: StringConstructor;
54
59
  readonly description: StringConstructor;
55
60
  readonly disabled: BooleanConstructor;
56
61
  readonly noIcon: BooleanConstructor;
62
+ readonly variant: PropType<StepsVariant>;
57
63
  readonly internalIndex: {
58
64
  readonly type: NumberConstructor;
59
65
  readonly default: 0;
60
66
  };
61
67
  }>>, {
62
68
  readonly disabled: boolean;
63
- readonly internalIndex: number;
64
69
  readonly noIcon: boolean;
70
+ readonly internalIndex: number;
65
71
  }, {}>;
66
72
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { h, defineComponent, computed, inject } from 'vue';
2
- import { CheckmarkIcon as FinishedIcon, CloseIcon as ErrorIcon } from '../../_internal/icons';
2
+ import { EditIcon, CheckmarkIcon as FinishedIcon, CloseIcon as ErrorIcon, CheckmarkCircleIcon as HistoryFinishIcon, DismissCircleIcon as HistoryErrorIcon } from '../../_internal/icons';
3
3
  import { UIconSwitchTransition, UBaseIcon } from '../../_internal';
4
4
  import { call, createKey, resolveSlot, resolveWrappedSlot, throwError } from '../../_utils';
5
5
  import { stepsInjectionKey } from './Steps';
@@ -10,6 +10,7 @@ export const stepProps = {
10
10
  description: String,
11
11
  disabled: Boolean,
12
12
  noIcon: Boolean,
13
+ variant: String,
13
14
  // index will be filled by parent steps, not user
14
15
  internalIndex: {
15
16
  type: Number,
@@ -25,38 +26,43 @@ export default defineComponent({
25
26
  throwError('step', '`u-step` must be placed inside `u-steps`.');
26
27
  const { inlineThemeDisabled } = useConfig();
27
28
  const { props: stepsProps, mergedThemeRef, mergedClsPrefixRef, stepsSlots } = USteps;
28
- const verticalRef = computed(() => {
29
- return stepsProps.vertical;
30
- });
31
- const noIconRef = computed(() => {
32
- return props.noIcon;
29
+ const variantRef = computed(() => stepsProps.variant || 'default');
30
+ const noIconRef = computed(() => props.noIcon);
31
+ const variantBehaviors = computed(() => {
32
+ const variant = variantRef.value;
33
+ return {
34
+ variant,
35
+ isVerticalOrHistory: stepsProps.vertical || variant === 'history',
36
+ shouldRenderSplitor: !stepsProps.vertical && variant !== 'history'
37
+ };
33
38
  });
34
39
  const mergedStatusRef = computed(() => {
35
40
  const { status } = props;
36
- if (status) {
41
+ if (status)
37
42
  return status;
38
- }
39
- else {
40
- const { internalIndex } = props;
41
- const { current } = stepsProps;
43
+ const { internalIndex } = props;
44
+ const { current, status: stepsStatus } = stepsProps;
45
+ if (variantRef.value === 'history') {
42
46
  if (current === undefined)
43
47
  return 'process';
44
- if (internalIndex < current) {
45
- return 'finish';
46
- }
47
- else if (internalIndex === current) {
48
- return stepsProps.status || 'process';
49
- }
50
- else if (internalIndex > current) {
51
- return 'wait';
52
- }
48
+ if (internalIndex < current)
49
+ return 'process';
50
+ if (internalIndex === current)
51
+ return stepsStatus || 'process';
52
+ return 'wait';
53
53
  }
54
- return 'process';
54
+ if (current === undefined)
55
+ return 'process';
56
+ if (internalIndex < current)
57
+ return 'finish';
58
+ if (internalIndex === current)
59
+ return stepsStatus || 'process';
60
+ return 'wait';
55
61
  });
56
62
  const cssVarsRef = computed(() => {
57
63
  const { value: status } = mergedStatusRef;
58
64
  const { size } = stepsProps;
59
- const { common: { cubicBezierEaseInOut }, self: { stepHeaderFontWeight, [createKey('stepHeaderFontSize', size)]: stepHeaderFontSize, [createKey('indicatorIndexFontSize', size)]: indicatorIndexFontSize, [createKey('indicatorSize', size)]: indicatorSize, [createKey('indicatorIconSize', size)]: indicatorIconSize, [createKey('indicatorTextColor', status)]: indicatorTextColor, [createKey('indicatorBorderColor', status)]: indicatorBorderColor, [createKey('headerTextColor', status)]: headerTextColor, [createKey('splitorColor', status)]: splitorColor, [createKey('indicatorColor', status)]: indicatorColor, [createKey('descriptionTextColor', status)]: descriptionTextColor } } = mergedThemeRef.value;
65
+ const { common: { cubicBezierEaseInOut }, self: { stepHeaderFontWeight, [createKey('stepHeaderFontSize', size)]: stepHeaderFontSize, [createKey('indicatorIndexFontSize', size)]: indicatorIndexFontSize, [createKey('indicatorSize', size)]: indicatorSize, [createKey('indicatorIconSize', size)]: indicatorIconSize, [createKey('indicatorTextColor', status)]: indicatorTextColor, [createKey('indicatorBorderColor', status)]: indicatorBorderColor, [createKey('headerTextColor', status)]: headerTextColor, [createKey('splitorColor', status)]: splitorColor, [createKey('indicatorColor', status)]: indicatorColor, [createKey('descriptionTextColor', status)]: descriptionTextColor, [createKey('indicatorIconColor', status)]: indicatorIconColor } } = mergedThemeRef.value;
60
66
  return {
61
67
  '--u-bezier': cubicBezierEaseInOut,
62
68
  '--u-description-text-color': descriptionTextColor,
@@ -69,7 +75,8 @@ export default defineComponent({
69
75
  '--u-indicator-text-color': indicatorTextColor,
70
76
  '--u-splitor-color': splitorColor,
71
77
  '--u-step-header-font-size': stepHeaderFontSize,
72
- '--u-step-header-font-weight': stepHeaderFontWeight
78
+ '--u-step-header-font-weight': stepHeaderFontWeight,
79
+ '--u-step-icon-color': indicatorIconColor
73
80
  };
74
81
  });
75
82
  const themeClassHandle = inlineThemeDisabled
@@ -94,28 +101,51 @@ export default defineComponent({
94
101
  }
95
102
  : undefined;
96
103
  });
97
- const renderInternalIndex = () => (h("div", { key: props.internalIndex, class: `${mergedClsPrefixRef.value}-step-indicator-slot__index` }, props.internalIndex));
98
- const renderFinishIcon = () => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "finish" }, {
99
- default: () => resolveSlot(stepsSlots['finish-icon'], () => [h(FinishedIcon, null)])
100
- }));
101
- const renderErrorIcon = () => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "error" }, {
102
- default: () => resolveSlot(stepsSlots['error-icon'], () => [h(ErrorIcon, null)])
103
- }));
104
+ const iconRenderer = {
105
+ history: {
106
+ finish: () => renderFinishIcon('history'),
107
+ error: () => renderErrorIcon('history'),
108
+ default: () => resolveWrappedSlot(slots.icon, (icon) => icon || renderHistoryIcon())
109
+ },
110
+ default: {
111
+ finish: () => renderFinishIcon(),
112
+ error: () => renderErrorIcon(),
113
+ default: () => resolveWrappedSlot(slots.icon, (icon) => icon || renderInternalIndex())
114
+ }
115
+ };
104
116
  const renderIcon = () => {
105
- return resolveWrappedSlot(slots.icon, (icon) => {
106
- const mergedStatus = mergedStatusRef.value;
107
- if (mergedStatus === 'finish')
108
- return renderFinishIcon();
109
- if (mergedStatus === 'error')
110
- return renderErrorIcon();
111
- return icon || renderInternalIndex();
112
- });
117
+ const variant = variantBehaviors.value.variant;
118
+ const status = mergedStatusRef.value;
119
+ const rendererGroup = iconRenderer[variant] || iconRenderer.default;
120
+ if (status in rendererGroup) {
121
+ return rendererGroup[status]();
122
+ }
123
+ return rendererGroup.default();
113
124
  };
125
+ const renderFinishIcon = (variant = 'default') => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "finish" }, {
126
+ default: () => variant === 'history'
127
+ ? resolveSlot(stepsSlots['finish-icon'], () => [
128
+ h(HistoryFinishIcon, null)
129
+ ])
130
+ : resolveSlot(stepsSlots['finish-icon'], () => [h(FinishedIcon, null)])
131
+ }));
132
+ const renderErrorIcon = (variant = 'default') => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "error" }, {
133
+ default: () => variant === 'history'
134
+ ? resolveSlot(stepsSlots['error-icon'], () => [
135
+ h(HistoryErrorIcon, null)
136
+ ])
137
+ : resolveSlot(stepsSlots['error-icon'], () => [h(ErrorIcon, null)])
138
+ }));
139
+ const renderHistoryIcon = () => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "history" }, {
140
+ default: () => resolveSlot(stepsSlots['history-icon'], () => [h(EditIcon, null)])
141
+ }));
142
+ const renderInternalIndex = () => (h("div", { key: props.internalIndex, class: `${mergedClsPrefixRef.value}-step-indicator-slot__index` }, props.internalIndex));
114
143
  return {
115
144
  renderIcon,
116
145
  stepsSlots,
117
146
  mergedClsPrefix: mergedClsPrefixRef,
118
- vertical: verticalRef,
147
+ variantBehaviors,
148
+ variant: variantRef,
119
149
  noIcon: noIconRef,
120
150
  mergedStatus: mergedStatusRef,
121
151
  handleStepClick,
@@ -125,7 +155,7 @@ export default defineComponent({
125
155
  };
126
156
  },
127
157
  render() {
128
- const { mergedClsPrefix, onRender, handleStepClick, disabled, renderIcon } = this;
158
+ const { mergedClsPrefix, onRender, handleStepClick, disabled, renderIcon, variantBehaviors, noIcon } = this;
129
159
  const descriptionNode = resolveWrappedSlot(this.$slots.default, (children) => {
130
160
  const mergedDescription = children || this.description;
131
161
  if (mergedDescription) {
@@ -140,17 +170,18 @@ export default defineComponent({
140
170
  !disabled && handleStepClick && `${mergedClsPrefix}-step--clickable`,
141
171
  this.themeClass,
142
172
  descriptionNode && `${mergedClsPrefix}-step--show-description`,
143
- `${mergedClsPrefix}-step--${this.mergedStatus}-status`
173
+ `${mergedClsPrefix}-step--${this.mergedStatus}-status`,
174
+ `${mergedClsPrefix}-step--${this.variant}-variant`
144
175
  ], style: this.cssVars, onClick: handleStepClick },
145
- this.vertical || !this.noIcon ? (h("div", { class: `${mergedClsPrefix}-step-indicator` },
176
+ variantBehaviors.isVerticalOrHistory || !noIcon ? (h("div", { class: `${mergedClsPrefix}-step-indicator` },
146
177
  h("div", { class: `${mergedClsPrefix}-step-indicator-slot` },
147
178
  h(UIconSwitchTransition, null, { default: renderIcon })),
148
- this.vertical ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null)) : null,
179
+ variantBehaviors.isVerticalOrHistory ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null)) : null,
149
180
  h("div", { class: `${mergedClsPrefix}-step-content` },
150
- h("div", { class: `${mergedClsPrefix}-step-content-header ${mergedClsPrefix}-step-content-header${this.noIcon ? '--column' : ''}` },
181
+ h("div", { class: `${mergedClsPrefix}-step-content-header ${mergedClsPrefix}-step-content-header${noIcon ? '--column' : ''}` },
151
182
  h("div", { class: `${mergedClsPrefix}-step-content-header__title` }, resolveSlot(this.$slots.title, () => [this.title])),
152
- this.noIcon && !this.vertical ? (h("div", { class: `${mergedClsPrefix}-step-splitor-no-icon` })) : null,
153
- !this.vertical && !this.noIcon ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null),
183
+ noIcon && variantBehaviors.shouldRenderSplitor ? (h("div", { class: `${mergedClsPrefix}-step-splitor-no-icon` })) : null,
184
+ !noIcon && variantBehaviors.shouldRenderSplitor ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null),
154
185
  descriptionNode)));
155
186
  }
156
187
  });