@uzum-tech/ui 1.2.4 → 1.3.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 (232) hide show
  1. package/dist/index.js +460 -301
  2. package/dist/index.prod.js +2 -2
  3. package/es/_internal/select-menu/src/SelectMenu.d.ts +2 -0
  4. package/es/_internal/select-menu/src/SelectOption.js +1 -1
  5. package/es/_internal/selection/src/Selection.d.ts +2 -0
  6. package/es/_internal/selection/src/Selection.js +3 -1
  7. package/es/_styles/common/dark.js +1 -1
  8. package/es/_styles/common/light.d.ts +2 -0
  9. package/es/_styles/common/light.js +1 -1
  10. package/es/alert/src/Alert.d.ts +2 -0
  11. package/es/auto-complete/src/AutoComplete.d.ts +2 -0
  12. package/es/avatar-group/src/AvatarGroup.d.ts +2 -0
  13. package/es/calendar/src/Calendar.d.ts +2 -0
  14. package/es/card/src/Card.d.ts +2 -0
  15. package/es/cascader/src/Cascader.d.ts +2 -0
  16. package/es/cascader/src/CascaderMenu.d.ts +2 -0
  17. package/es/cascader/src/CascaderOption.d.ts +2 -0
  18. package/es/cascader/src/CascaderSelectMenu.d.ts +2 -0
  19. package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
  20. package/es/checkbox/src/Checkbox.d.ts +2 -0
  21. package/es/collapse/src/Collapse.d.ts +2 -0
  22. package/es/color-picker/src/ColorInputUnit.d.ts +2 -0
  23. package/es/data-table/src/DataTable.d.ts +2 -0
  24. package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  25. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  26. package/es/data-table/src/TableParts/Body.d.ts +2 -0
  27. package/es/data-table/src/TableParts/Cell.d.ts +4 -0
  28. package/es/data-table/src/TableParts/Header.d.ts +2 -0
  29. package/es/data-table/styles/light.js +2 -2
  30. package/es/date-picker/src/DatePicker.d.ts +2 -0
  31. package/es/date-picker/src/panel/date.d.ts +2 -0
  32. package/es/date-picker/src/panel/daterange.d.ts +2 -0
  33. package/es/date-picker/src/panel/datetime.d.ts +2 -0
  34. package/es/date-picker/src/panel/datetimerange.d.ts +2 -0
  35. package/es/date-picker/src/panel/panelMonth.d.ts +4 -0
  36. package/es/date-picker/src/panel/panelMonthContent.d.ts +2 -0
  37. package/es/date-picker/src/panel/panelYear.d.ts +4 -0
  38. package/es/date-picker/src/panel/panelYearContent.d.ts +2 -0
  39. package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
  40. package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  41. package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
  42. package/es/dialog/src/Dialog.d.ts +2 -0
  43. package/es/dialog/src/DialogProvider.d.ts +4 -0
  44. package/es/drawer/src/Drawer.d.ts +24 -0
  45. package/es/drawer/src/Drawer.js +4 -2
  46. package/es/drawer/src/DrawerBodyWrapper.d.ts +4 -0
  47. package/es/drawer/src/DrawerContent.d.ts +4 -0
  48. package/es/drawer/src/styles/index.cssr.js +4 -0
  49. package/es/drawer/styles/_common.d.ts +2 -0
  50. package/es/drawer/styles/_common.js +3 -1
  51. package/es/drawer/styles/light.d.ts +4 -0
  52. package/es/dropdown/src/Dropdown.d.ts +2 -0
  53. package/es/dynamic-input/src/DynamicInput.d.ts +2 -0
  54. package/es/dynamic-input/src/InputPreset.d.ts +2 -0
  55. package/es/dynamic-input/src/PairPreset.d.ts +2 -0
  56. package/es/dynamic-tags/src/DynamicTags.d.ts +2 -0
  57. package/es/ellipsis/src/Ellipsis.d.ts +2 -0
  58. package/es/input/src/Input.d.ts +2 -0
  59. package/es/input-number/src/InputNumber.d.ts +2 -0
  60. package/es/layout/src/Layout.d.ts +4 -0
  61. package/es/layout/src/LayoutContent.d.ts +2 -0
  62. package/es/layout/src/LayoutSider.d.ts +2 -0
  63. package/es/legacy-transfer/src/Transfer.d.ts +2 -0
  64. package/es/legacy-transfer/src/TransferFilter.d.ts +2 -0
  65. package/es/legacy-transfer/src/TransferList.d.ts +2 -0
  66. package/es/legacy-transfer/src/TransferListItem.d.ts +2 -0
  67. package/es/log/src/Log.d.ts +2 -0
  68. package/es/mention/src/Mention.d.ts +2 -0
  69. package/es/menu/src/Menu.d.ts +2 -0
  70. package/es/menu/src/MenuOption.d.ts +2 -0
  71. package/es/menu/src/Submenu.d.ts +2 -0
  72. package/es/modal/src/BodyWrapper.d.ts +2 -0
  73. package/es/notification/src/NotificationContainer.d.ts +2 -0
  74. package/es/pagination/src/Pagination.d.ts +2 -0
  75. package/es/popconfirm/src/Popconfirm.d.ts +2 -0
  76. package/es/popselect/src/Popselect.d.ts +2 -0
  77. package/es/popselect/src/PopselectPanel.d.ts +2 -0
  78. package/es/select/src/Select.d.ts +2 -0
  79. package/es/status/src/Status.d.ts +36 -6
  80. package/es/status/src/Status.js +28 -22
  81. package/es/status/src/interface.d.ts +3 -0
  82. package/es/status/src/interface.js +1 -0
  83. package/es/status/src/styles/index.cssr.js +5 -1
  84. package/es/status/styles/light.d.ts +2 -0
  85. package/es/status/styles/light.js +3 -1
  86. package/es/steps/src/Step.d.ts +12 -6
  87. package/es/steps/src/Step.js +77 -45
  88. package/es/steps/src/Steps.d.ts +63 -13
  89. package/es/steps/src/Steps.js +6 -2
  90. package/es/steps/src/interface.d.ts +13 -0
  91. package/es/steps/src/interface.js +1 -0
  92. package/es/steps/src/styles/index.cssr.js +24 -1
  93. package/es/steps/styles/light.d.ts +4 -0
  94. package/es/steps/styles/light.js +5 -1
  95. package/es/tag/src/Tag.js +1 -1
  96. package/es/tag/src/styles/index.cssr.js +0 -4
  97. package/es/theme-editor/src/ThemeEditor.d.ts +2 -0
  98. package/es/time-picker/src/Panel.d.ts +2 -0
  99. package/es/time-picker/src/TimePicker.d.ts +2 -0
  100. package/es/tooltip/src/Tooltip.d.ts +2 -0
  101. package/es/transfer/src/Transfer.d.ts +2 -0
  102. package/es/transfer/src/TransferFilter.d.ts +2 -0
  103. package/es/transfer/src/TransferList.d.ts +2 -0
  104. package/es/transfer/src/TransferListItem.d.ts +2 -0
  105. package/es/tree/src/Tree.d.ts +2 -0
  106. package/es/tree/src/TreeNodeCheckbox.d.ts +2 -0
  107. package/es/tree-select/src/TreeSelect.d.ts +2 -0
  108. package/es/upload/src/Upload.d.ts +3 -1
  109. package/es/upload/src/Upload.js +5 -4
  110. package/es/upload/src/UploadFile.d.ts +2 -0
  111. package/es/upload/src/UploadProgress.d.ts +2 -0
  112. package/es/upload/src/UploadTrigger.js +2 -2
  113. package/es/upload/src/interface.d.ts +2 -2
  114. package/es/upload/src/styles/index.cssr.js +1 -1
  115. package/es/version.d.ts +1 -1
  116. package/es/version.js +1 -1
  117. package/lib/_internal/select-menu/src/SelectMenu.d.ts +2 -0
  118. package/lib/_internal/select-menu/src/SelectOption.js +5 -2
  119. package/lib/_internal/selection/src/Selection.d.ts +2 -0
  120. package/lib/_internal/selection/src/Selection.js +6 -4
  121. package/lib/_styles/common/dark.js +1 -1
  122. package/lib/_styles/common/light.d.ts +2 -0
  123. package/lib/_styles/common/light.js +1 -1
  124. package/lib/alert/src/Alert.d.ts +2 -0
  125. package/lib/auto-complete/src/AutoComplete.d.ts +2 -0
  126. package/lib/avatar-group/src/AvatarGroup.d.ts +2 -0
  127. package/lib/calendar/src/Calendar.d.ts +2 -0
  128. package/lib/card/src/Card.d.ts +2 -0
  129. package/lib/cascader/src/Cascader.d.ts +2 -0
  130. package/lib/cascader/src/CascaderMenu.d.ts +2 -0
  131. package/lib/cascader/src/CascaderOption.d.ts +2 -0
  132. package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -0
  133. package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
  134. package/lib/checkbox/src/Checkbox.d.ts +2 -0
  135. package/lib/collapse/src/Collapse.d.ts +2 -0
  136. package/lib/color-picker/src/ColorInputUnit.d.ts +2 -0
  137. package/lib/data-table/src/DataTable.d.ts +2 -0
  138. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  139. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  140. package/lib/data-table/src/TableParts/Body.d.ts +2 -0
  141. package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
  142. package/lib/data-table/src/TableParts/Header.d.ts +2 -0
  143. package/lib/data-table/styles/light.js +2 -2
  144. package/lib/date-picker/src/DatePicker.d.ts +2 -0
  145. package/lib/date-picker/src/panel/date.d.ts +2 -0
  146. package/lib/date-picker/src/panel/daterange.d.ts +2 -0
  147. package/lib/date-picker/src/panel/datetime.d.ts +2 -0
  148. package/lib/date-picker/src/panel/datetimerange.d.ts +2 -0
  149. package/lib/date-picker/src/panel/panelMonth.d.ts +4 -0
  150. package/lib/date-picker/src/panel/panelMonthContent.d.ts +2 -0
  151. package/lib/date-picker/src/panel/panelYear.d.ts +4 -0
  152. package/lib/date-picker/src/panel/panelYearContent.d.ts +2 -0
  153. package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
  154. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  155. package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
  156. package/lib/dialog/src/Dialog.d.ts +2 -0
  157. package/lib/dialog/src/DialogProvider.d.ts +4 -0
  158. package/lib/drawer/src/Drawer.d.ts +24 -0
  159. package/lib/drawer/src/Drawer.js +4 -2
  160. package/lib/drawer/src/DrawerBodyWrapper.d.ts +4 -0
  161. package/lib/drawer/src/DrawerContent.d.ts +4 -0
  162. package/lib/drawer/src/styles/index.cssr.js +4 -0
  163. package/lib/drawer/styles/_common.d.ts +2 -0
  164. package/lib/drawer/styles/_common.js +3 -1
  165. package/lib/drawer/styles/light.d.ts +4 -0
  166. package/lib/dropdown/src/Dropdown.d.ts +2 -0
  167. package/lib/dynamic-input/src/DynamicInput.d.ts +2 -0
  168. package/lib/dynamic-input/src/InputPreset.d.ts +2 -0
  169. package/lib/dynamic-input/src/PairPreset.d.ts +2 -0
  170. package/lib/dynamic-tags/src/DynamicTags.d.ts +2 -0
  171. package/lib/ellipsis/src/Ellipsis.d.ts +2 -0
  172. package/lib/input/src/Input.d.ts +2 -0
  173. package/lib/input-number/src/InputNumber.d.ts +2 -0
  174. package/lib/layout/src/Layout.d.ts +4 -0
  175. package/lib/layout/src/LayoutContent.d.ts +2 -0
  176. package/lib/layout/src/LayoutSider.d.ts +2 -0
  177. package/lib/legacy-transfer/src/Transfer.d.ts +2 -0
  178. package/lib/legacy-transfer/src/TransferFilter.d.ts +2 -0
  179. package/lib/legacy-transfer/src/TransferList.d.ts +2 -0
  180. package/lib/legacy-transfer/src/TransferListItem.d.ts +2 -0
  181. package/lib/log/src/Log.d.ts +2 -0
  182. package/lib/mention/src/Mention.d.ts +2 -0
  183. package/lib/menu/src/Menu.d.ts +2 -0
  184. package/lib/menu/src/MenuOption.d.ts +2 -0
  185. package/lib/menu/src/Submenu.d.ts +2 -0
  186. package/lib/modal/src/BodyWrapper.d.ts +2 -0
  187. package/lib/notification/src/NotificationContainer.d.ts +2 -0
  188. package/lib/pagination/src/Pagination.d.ts +2 -0
  189. package/lib/popconfirm/src/Popconfirm.d.ts +2 -0
  190. package/lib/popselect/src/Popselect.d.ts +2 -0
  191. package/lib/popselect/src/PopselectPanel.d.ts +2 -0
  192. package/lib/select/src/Select.d.ts +2 -0
  193. package/lib/status/src/Status.d.ts +36 -6
  194. package/lib/status/src/Status.js +27 -21
  195. package/lib/status/src/interface.d.ts +3 -0
  196. package/lib/status/src/interface.js +2 -0
  197. package/lib/status/src/styles/index.cssr.js +5 -1
  198. package/lib/status/styles/light.d.ts +2 -0
  199. package/lib/status/styles/light.js +3 -1
  200. package/lib/steps/src/Step.d.ts +12 -6
  201. package/lib/steps/src/Step.js +77 -45
  202. package/lib/steps/src/Steps.d.ts +63 -13
  203. package/lib/steps/src/Steps.js +6 -2
  204. package/lib/steps/src/interface.d.ts +13 -0
  205. package/lib/steps/src/interface.js +2 -0
  206. package/lib/steps/src/styles/index.cssr.js +24 -1
  207. package/lib/steps/styles/light.d.ts +4 -0
  208. package/lib/steps/styles/light.js +5 -1
  209. package/lib/tag/src/Tag.js +1 -1
  210. package/lib/tag/src/styles/index.cssr.js +0 -4
  211. package/lib/theme-editor/src/ThemeEditor.d.ts +2 -0
  212. package/lib/time-picker/src/Panel.d.ts +2 -0
  213. package/lib/time-picker/src/TimePicker.d.ts +2 -0
  214. package/lib/tooltip/src/Tooltip.d.ts +2 -0
  215. package/lib/transfer/src/Transfer.d.ts +2 -0
  216. package/lib/transfer/src/TransferFilter.d.ts +2 -0
  217. package/lib/transfer/src/TransferList.d.ts +2 -0
  218. package/lib/transfer/src/TransferListItem.d.ts +2 -0
  219. package/lib/tree/src/Tree.d.ts +2 -0
  220. package/lib/tree/src/TreeNodeCheckbox.d.ts +2 -0
  221. package/lib/tree-select/src/TreeSelect.d.ts +2 -0
  222. package/lib/upload/src/Upload.d.ts +3 -1
  223. package/lib/upload/src/Upload.js +5 -4
  224. package/lib/upload/src/UploadFile.d.ts +2 -0
  225. package/lib/upload/src/UploadProgress.d.ts +2 -0
  226. package/lib/upload/src/UploadTrigger.js +2 -2
  227. package/lib/upload/src/interface.d.ts +2 -2
  228. package/lib/upload/src/styles/index.cssr.js +1 -1
  229. package/lib/version.d.ts +1 -1
  230. package/lib/version.js +1 -1
  231. package/package.json +1 -1
  232. 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,4 +1,5 @@
1
1
  import { h, defineComponent, computed, inject } from 'vue';
2
+ import { Edit24Regular as EditIcon, CheckmarkCircle24Regular as HistoryFinishIcon, DismissCircle24Regular as HistoryErrorIcon } from '@vicons/fluent';
2
3
  import { CheckmarkIcon as FinishedIcon, CloseIcon as ErrorIcon } from '../../_internal/icons';
3
4
  import { UIconSwitchTransition, UBaseIcon } from '../../_internal';
4
5
  import { call, createKey, resolveSlot, resolveWrappedSlot, throwError } from '../../_utils';
@@ -10,6 +11,7 @@ export const stepProps = {
10
11
  description: String,
11
12
  disabled: Boolean,
12
13
  noIcon: Boolean,
14
+ variant: String,
13
15
  // index will be filled by parent steps, not user
14
16
  internalIndex: {
15
17
  type: Number,
@@ -25,38 +27,43 @@ export default defineComponent({
25
27
  throwError('step', '`u-step` must be placed inside `u-steps`.');
26
28
  const { inlineThemeDisabled } = useConfig();
27
29
  const { props: stepsProps, mergedThemeRef, mergedClsPrefixRef, stepsSlots } = USteps;
28
- const verticalRef = computed(() => {
29
- return stepsProps.vertical;
30
- });
31
- const noIconRef = computed(() => {
32
- return props.noIcon;
30
+ const variantRef = computed(() => stepsProps.variant || 'default');
31
+ const noIconRef = computed(() => props.noIcon);
32
+ const variantBehaviors = computed(() => {
33
+ const variant = variantRef.value;
34
+ return {
35
+ variant,
36
+ isVerticalOrHistory: stepsProps.vertical || variant === 'history',
37
+ shouldRenderSplitor: !stepsProps.vertical && variant !== 'history'
38
+ };
33
39
  });
34
40
  const mergedStatusRef = computed(() => {
35
41
  const { status } = props;
36
- if (status) {
42
+ if (status)
37
43
  return status;
38
- }
39
- else {
40
- const { internalIndex } = props;
41
- const { current } = stepsProps;
44
+ const { internalIndex } = props;
45
+ const { current, status: stepsStatus } = stepsProps;
46
+ if (variantRef.value === 'history') {
42
47
  if (current === undefined)
43
48
  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
- }
49
+ if (internalIndex < current)
50
+ return 'process';
51
+ if (internalIndex === current)
52
+ return stepsStatus || 'process';
53
+ return 'wait';
53
54
  }
54
- return 'process';
55
+ if (current === undefined)
56
+ return 'process';
57
+ if (internalIndex < current)
58
+ return 'finish';
59
+ if (internalIndex === current)
60
+ return stepsStatus || 'process';
61
+ return 'wait';
55
62
  });
56
63
  const cssVarsRef = computed(() => {
57
64
  const { value: status } = mergedStatusRef;
58
65
  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;
66
+ 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
67
  return {
61
68
  '--u-bezier': cubicBezierEaseInOut,
62
69
  '--u-description-text-color': descriptionTextColor,
@@ -69,7 +76,8 @@ export default defineComponent({
69
76
  '--u-indicator-text-color': indicatorTextColor,
70
77
  '--u-splitor-color': splitorColor,
71
78
  '--u-step-header-font-size': stepHeaderFontSize,
72
- '--u-step-header-font-weight': stepHeaderFontWeight
79
+ '--u-step-header-font-weight': stepHeaderFontWeight,
80
+ '--u-step-icon-color': indicatorIconColor
73
81
  };
74
82
  });
75
83
  const themeClassHandle = inlineThemeDisabled
@@ -94,28 +102,51 @@ export default defineComponent({
94
102
  }
95
103
  : undefined;
96
104
  });
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
- }));
105
+ const iconRenderer = {
106
+ history: {
107
+ finish: () => renderFinishIcon('history'),
108
+ error: () => renderErrorIcon('history'),
109
+ default: () => resolveWrappedSlot(slots.icon, (icon) => icon || renderHistoryIcon())
110
+ },
111
+ default: {
112
+ finish: () => renderFinishIcon(),
113
+ error: () => renderErrorIcon(),
114
+ default: () => resolveWrappedSlot(slots.icon, (icon) => icon || renderInternalIndex())
115
+ }
116
+ };
104
117
  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
- });
118
+ const variant = variantBehaviors.value.variant;
119
+ const status = mergedStatusRef.value;
120
+ const rendererGroup = iconRenderer[variant] || iconRenderer.default;
121
+ if (status in rendererGroup) {
122
+ return rendererGroup[status]();
123
+ }
124
+ return rendererGroup.default();
113
125
  };
126
+ const renderFinishIcon = (variant = 'default') => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "finish" }, {
127
+ default: () => variant === 'history'
128
+ ? resolveSlot(stepsSlots['finish-icon'], () => [
129
+ h(HistoryFinishIcon, null)
130
+ ])
131
+ : resolveSlot(stepsSlots['finish-icon'], () => [h(FinishedIcon, null)])
132
+ }));
133
+ const renderErrorIcon = (variant = 'default') => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "error" }, {
134
+ default: () => variant === 'history'
135
+ ? resolveSlot(stepsSlots['error-icon'], () => [
136
+ h(HistoryErrorIcon, null)
137
+ ])
138
+ : resolveSlot(stepsSlots['error-icon'], () => [h(ErrorIcon, null)])
139
+ }));
140
+ const renderHistoryIcon = () => (h(UBaseIcon, { clsPrefix: mergedClsPrefixRef.value, key: "history" }, {
141
+ default: () => resolveSlot(stepsSlots['history-icon'], () => [h(EditIcon, null)])
142
+ }));
143
+ const renderInternalIndex = () => (h("div", { key: props.internalIndex, class: `${mergedClsPrefixRef.value}-step-indicator-slot__index` }, props.internalIndex));
114
144
  return {
115
145
  renderIcon,
116
146
  stepsSlots,
117
147
  mergedClsPrefix: mergedClsPrefixRef,
118
- vertical: verticalRef,
148
+ variantBehaviors,
149
+ variant: variantRef,
119
150
  noIcon: noIconRef,
120
151
  mergedStatus: mergedStatusRef,
121
152
  handleStepClick,
@@ -125,7 +156,7 @@ export default defineComponent({
125
156
  };
126
157
  },
127
158
  render() {
128
- const { mergedClsPrefix, onRender, handleStepClick, disabled, renderIcon } = this;
159
+ const { mergedClsPrefix, onRender, handleStepClick, disabled, renderIcon, variantBehaviors, noIcon } = this;
129
160
  const descriptionNode = resolveWrappedSlot(this.$slots.default, (children) => {
130
161
  const mergedDescription = children || this.description;
131
162
  if (mergedDescription) {
@@ -140,17 +171,18 @@ export default defineComponent({
140
171
  !disabled && handleStepClick && `${mergedClsPrefix}-step--clickable`,
141
172
  this.themeClass,
142
173
  descriptionNode && `${mergedClsPrefix}-step--show-description`,
143
- `${mergedClsPrefix}-step--${this.mergedStatus}-status`
174
+ `${mergedClsPrefix}-step--${this.mergedStatus}-status`,
175
+ `${mergedClsPrefix}-step--${this.variant}-variant`
144
176
  ], style: this.cssVars, onClick: handleStepClick },
145
- this.vertical || !this.noIcon ? (h("div", { class: `${mergedClsPrefix}-step-indicator` },
177
+ variantBehaviors.isVerticalOrHistory || !noIcon ? (h("div", { class: `${mergedClsPrefix}-step-indicator` },
146
178
  h("div", { class: `${mergedClsPrefix}-step-indicator-slot` },
147
179
  h(UIconSwitchTransition, null, { default: renderIcon })),
148
- this.vertical ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null)) : null,
180
+ variantBehaviors.isVerticalOrHistory ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null)) : null,
149
181
  h("div", { class: `${mergedClsPrefix}-step-content` },
150
- h("div", { class: `${mergedClsPrefix}-step-content-header ${mergedClsPrefix}-step-content-header${this.noIcon ? '--column' : ''}` },
182
+ h("div", { class: `${mergedClsPrefix}-step-content-header ${mergedClsPrefix}-step-content-header${noIcon ? '--column' : ''}` },
151
183
  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),
184
+ noIcon && variantBehaviors.shouldRenderSplitor ? (h("div", { class: `${mergedClsPrefix}-step-splitor-no-icon` })) : null,
185
+ !noIcon && variantBehaviors.shouldRenderSplitor ? (h("div", { class: `${mergedClsPrefix}-step-splitor` })) : null),
154
186
  descriptionNode)));
155
187
  }
156
188
  });