@uzum-tech/ui 1.5.2 → 1.5.4

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 (200) hide show
  1. package/README.md +0 -1
  2. package/dist/index.js +1147 -628
  3. package/dist/index.prod.js +3 -3
  4. package/es/_internal/checkbox/src/use-checkbox.js +3 -3
  5. package/es/_internal/radio/src/use-radio.js +3 -3
  6. package/es/_mixins/use-form-item.d.ts +4 -4
  7. package/es/_mixins/use-form-item.js +4 -4
  8. package/es/_styles/common/dark.js +1 -1
  9. package/es/_styles/common/light.d.ts +3 -0
  10. package/es/_styles/common/light.js +1 -1
  11. package/es/_utils/composable/composables.d.ts +11 -0
  12. package/es/_utils/composable/composables.js +40 -0
  13. package/es/_utils/index.d.ts +1 -1
  14. package/es/_utils/index.js +1 -1
  15. package/es/_utils/uzum/index.d.ts +1 -0
  16. package/es/_utils/uzum/index.js +1 -0
  17. package/es/_utils/uzum/value.d.ts +1 -0
  18. package/es/_utils/uzum/value.js +9 -0
  19. package/es/_utils/vue/resolve-slot.d.ts +1 -1
  20. package/es/alert/styles/light.js +6 -6
  21. package/es/auto-complete/src/AutoComplete.js +10 -10
  22. package/es/avatar/src/Avatar.d.ts +6 -0
  23. package/es/avatar/src/Avatar.js +9 -3
  24. package/es/card-list/src/CardList.js +1 -1
  25. package/es/card-list/src/CardListItem.d.ts +13 -0
  26. package/es/card-list/src/CardListItem.js +11 -4
  27. package/es/card-list/src/interface.d.ts +1 -0
  28. package/es/card-list/src/styles/index.cssr.js +6 -6
  29. package/es/card-list/styles/light.js +2 -2
  30. package/es/cascader/src/Cascader.js +7 -7
  31. package/es/checkbox/src/CheckboxGroup.js +9 -9
  32. package/es/collapse/src/Collapse.d.ts +47 -14
  33. package/es/collapse/src/Collapse.js +6 -3
  34. package/es/collapse/src/CollapseItem.js +3 -2
  35. package/es/collapse/src/styles/index.cssr.js +27 -7
  36. package/es/collapse/styles/light.d.ts +4 -1
  37. package/es/collapse/styles/light.js +6 -3
  38. package/es/color-picker/src/ColorPicker.js +6 -6
  39. package/es/components.d.ts +1 -0
  40. package/es/components.js +1 -0
  41. package/es/config-provider/src/internal-interface.d.ts +2 -0
  42. package/es/data-table/src/DataTable.d.ts +7 -0
  43. package/es/data-table/src/DataTable.js +21 -10
  44. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  45. package/es/data-table/src/TableParts/Body.js +8 -6
  46. package/es/data-table/src/TableParts/Cell.js +85 -23
  47. package/es/data-table/src/interface.d.ts +14 -6
  48. package/es/data-table/src/interface.js +1 -1
  49. package/es/data-table/src/styles/index.cssr.js +5 -3
  50. package/es/data-table/src/use-mask.d.ts +3 -6
  51. package/es/data-table/src/utils.d.ts +2 -1
  52. package/es/data-table/src/utils.js +13 -0
  53. package/es/date-picker/src/DatePicker.js +7 -7
  54. package/es/dialog/src/DialogProvider.d.ts +6 -0
  55. package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
  56. package/es/dynamic-tags/src/DynamicTags.js +3 -3
  57. package/es/dynamic-tags/styles/light.d.ts +1 -0
  58. package/es/input/src/Input.js +8 -8
  59. package/es/input-number/src/InputNumber.js +7 -7
  60. package/es/input-otp/index.d.ts +3 -0
  61. package/es/input-otp/index.js +1 -0
  62. package/es/input-otp/src/InputOtp.d.ts +871 -0
  63. package/es/input-otp/src/InputOtp.js +250 -0
  64. package/es/input-otp/src/public-types.d.ts +25 -0
  65. package/es/input-otp/src/public-types.js +1 -0
  66. package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
  67. package/es/input-otp/src/styles/index.cssr.js +20 -0
  68. package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  69. package/es/input-otp/src/styles/input-otp-rtl.cssr.js +5 -0
  70. package/es/input-otp/styles/dark.d.ts +3 -0
  71. package/es/input-otp/styles/dark.js +12 -0
  72. package/es/input-otp/styles/index.d.ts +4 -0
  73. package/es/input-otp/styles/index.js +3 -0
  74. package/es/input-otp/styles/light.d.ts +83 -0
  75. package/es/input-otp/styles/light.js +22 -0
  76. package/es/input-otp/styles/rtl.d.ts +2 -0
  77. package/es/input-otp/styles/rtl.js +5 -0
  78. package/es/legacy-transfer/src/Transfer.js +3 -3
  79. package/es/list/src/ListItem.js +8 -4
  80. package/es/mention/src/Mention.js +7 -7
  81. package/es/radio/src/RadioGroup.js +5 -5
  82. package/es/rate/src/Rate.js +3 -3
  83. package/es/select/src/Select.js +7 -7
  84. package/es/slider/src/Slider.js +3 -3
  85. package/es/styles.d.ts +1 -0
  86. package/es/styles.js +1 -0
  87. package/es/switch/src/Switch.js +7 -7
  88. package/es/tag/src/Tag.d.ts +27 -13
  89. package/es/tag/src/Tag.js +7 -2
  90. package/es/tag/src/styles/index.cssr.js +13 -3
  91. package/es/tag/styles/light.d.ts +1 -0
  92. package/es/tag/styles/light.js +7 -6
  93. package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
  94. package/es/themes/dark.js +2 -0
  95. package/es/themes/light.js +2 -0
  96. package/es/time-picker/src/TimePicker.js +7 -7
  97. package/es/transfer/src/Transfer.js +3 -3
  98. package/es/tree-select/src/TreeSelect.js +5 -5
  99. package/es/version.d.ts +1 -1
  100. package/es/version.js +1 -1
  101. package/lib/_internal/checkbox/src/use-checkbox.js +3 -3
  102. package/lib/_internal/radio/src/use-radio.js +3 -3
  103. package/lib/_mixins/use-form-item.d.ts +4 -4
  104. package/lib/_mixins/use-form-item.js +4 -4
  105. package/lib/_styles/common/dark.js +1 -1
  106. package/lib/_styles/common/light.d.ts +3 -0
  107. package/lib/_styles/common/light.js +1 -1
  108. package/lib/_utils/composable/composables.d.ts +11 -0
  109. package/lib/_utils/composable/composables.js +47 -0
  110. package/lib/_utils/index.d.ts +1 -1
  111. package/lib/_utils/index.js +2 -1
  112. package/lib/_utils/uzum/index.d.ts +1 -0
  113. package/lib/_utils/uzum/index.js +3 -1
  114. package/lib/_utils/uzum/value.d.ts +1 -0
  115. package/lib/_utils/uzum/value.js +12 -0
  116. package/lib/_utils/vue/resolve-slot.d.ts +1 -1
  117. package/lib/alert/styles/light.js +6 -6
  118. package/lib/auto-complete/src/AutoComplete.js +10 -10
  119. package/lib/avatar/src/Avatar.d.ts +6 -0
  120. package/lib/avatar/src/Avatar.js +9 -3
  121. package/lib/card-list/src/CardList.js +1 -1
  122. package/lib/card-list/src/CardListItem.d.ts +13 -0
  123. package/lib/card-list/src/CardListItem.js +11 -4
  124. package/lib/card-list/src/interface.d.ts +1 -0
  125. package/lib/card-list/src/styles/index.cssr.js +5 -5
  126. package/lib/card-list/styles/light.js +2 -2
  127. package/lib/cascader/src/Cascader.js +7 -7
  128. package/lib/checkbox/src/CheckboxGroup.js +9 -9
  129. package/lib/collapse/src/Collapse.d.ts +47 -14
  130. package/lib/collapse/src/Collapse.js +6 -3
  131. package/lib/collapse/src/CollapseItem.js +3 -2
  132. package/lib/collapse/src/styles/index.cssr.js +27 -7
  133. package/lib/collapse/styles/light.d.ts +4 -1
  134. package/lib/collapse/styles/light.js +6 -3
  135. package/lib/color-picker/src/ColorPicker.js +6 -6
  136. package/lib/components.d.ts +1 -0
  137. package/lib/components.js +1 -0
  138. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  139. package/lib/data-table/src/DataTable.d.ts +7 -0
  140. package/lib/data-table/src/DataTable.js +21 -10
  141. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  142. package/lib/data-table/src/TableParts/Body.js +8 -6
  143. package/lib/data-table/src/TableParts/Cell.js +84 -22
  144. package/lib/data-table/src/interface.d.ts +14 -6
  145. package/lib/data-table/src/interface.js +1 -1
  146. package/lib/data-table/src/styles/index.cssr.js +5 -3
  147. package/lib/data-table/src/use-mask.d.ts +3 -6
  148. package/lib/data-table/src/utils.d.ts +2 -1
  149. package/lib/data-table/src/utils.js +14 -1
  150. package/lib/date-picker/src/DatePicker.js +7 -7
  151. package/lib/dialog/src/DialogProvider.d.ts +6 -0
  152. package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
  153. package/lib/dynamic-tags/src/DynamicTags.js +3 -3
  154. package/lib/dynamic-tags/styles/light.d.ts +1 -0
  155. package/lib/input/src/Input.js +8 -8
  156. package/lib/input-number/src/InputNumber.js +7 -7
  157. package/lib/input-otp/index.d.ts +3 -0
  158. package/lib/input-otp/index.js +9 -0
  159. package/lib/input-otp/src/InputOtp.d.ts +871 -0
  160. package/lib/input-otp/src/InputOtp.js +256 -0
  161. package/lib/input-otp/src/public-types.d.ts +25 -0
  162. package/lib/input-otp/src/public-types.js +2 -0
  163. package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
  164. package/lib/input-otp/src/styles/index.cssr.js +25 -0
  165. package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  166. package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
  167. package/lib/input-otp/styles/dark.d.ts +3 -0
  168. package/lib/input-otp/styles/dark.js +14 -0
  169. package/lib/input-otp/styles/index.d.ts +4 -0
  170. package/lib/input-otp/styles/index.js +12 -0
  171. package/lib/input-otp/styles/light.d.ts +83 -0
  172. package/lib/input-otp/styles/light.js +25 -0
  173. package/lib/input-otp/styles/rtl.d.ts +2 -0
  174. package/lib/input-otp/styles/rtl.js +11 -0
  175. package/lib/legacy-transfer/src/Transfer.js +3 -3
  176. package/lib/list/src/ListItem.js +8 -4
  177. package/lib/mention/src/Mention.js +7 -7
  178. package/lib/radio/src/RadioGroup.js +5 -5
  179. package/lib/rate/src/Rate.js +3 -3
  180. package/lib/select/src/Select.js +7 -7
  181. package/lib/slider/src/Slider.js +3 -3
  182. package/lib/styles.d.ts +1 -0
  183. package/lib/styles.js +106 -103
  184. package/lib/switch/src/Switch.js +7 -7
  185. package/lib/tag/src/Tag.d.ts +27 -13
  186. package/lib/tag/src/Tag.js +7 -2
  187. package/lib/tag/src/styles/index.cssr.js +13 -3
  188. package/lib/tag/styles/light.d.ts +1 -0
  189. package/lib/tag/styles/light.js +7 -6
  190. package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
  191. package/lib/themes/dark.js +2 -0
  192. package/lib/themes/light.js +2 -0
  193. package/lib/time-picker/src/TimePicker.js +7 -7
  194. package/lib/transfer/src/Transfer.js +3 -3
  195. package/lib/tree-select/src/TreeSelect.js +5 -5
  196. package/lib/version.d.ts +1 -1
  197. package/lib/version.js +1 -1
  198. package/package.json +1 -1
  199. package/volar.d.ts +1 -0
  200. package/web-types.json +131 -4
@@ -9,7 +9,7 @@ export declare const collapseProps: {
9
9
  readonly expandedNames: PropType<string | number | Array<string | number> | null>;
10
10
  readonly arrowPlacement: {
11
11
  readonly type: PropType<ArrowPlacement>;
12
- readonly default: "left";
12
+ readonly default: "right-edge";
13
13
  };
14
14
  readonly accordion: {
15
15
  readonly type: BooleanConstructor;
@@ -40,8 +40,11 @@ export declare const collapseProps: {
40
40
  arrowSize: string;
41
41
  arrowColor: string;
42
42
  arrowColorDisabled: string;
43
- itemMargin: string;
44
43
  titlePadding: string;
44
+ backgroundColor: string;
45
+ borderRadius: string;
46
+ padding: string;
47
+ boxSizing: string;
45
48
  }, any>>;
46
49
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
47
50
  titleFontSize: string;
@@ -56,8 +59,11 @@ export declare const collapseProps: {
56
59
  arrowSize: string;
57
60
  arrowColor: string;
58
61
  arrowColorDisabled: string;
59
- itemMargin: string;
60
62
  titlePadding: string;
63
+ backgroundColor: string;
64
+ borderRadius: string;
65
+ padding: string;
66
+ boxSizing: string;
61
67
  }, any>>>;
62
68
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
63
69
  titleFontSize: string;
@@ -72,8 +78,11 @@ export declare const collapseProps: {
72
78
  arrowSize: string;
73
79
  arrowColor: string;
74
80
  arrowColorDisabled: string;
75
- itemMargin: string;
76
81
  titlePadding: string;
82
+ backgroundColor: string;
83
+ borderRadius: string;
84
+ padding: string;
85
+ boxSizing: string;
77
86
  }, any>>>;
78
87
  };
79
88
  export type CollapseProps = ExtractPublicPropTypes<typeof collapseProps>;
@@ -93,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{
93
102
  readonly expandedNames: PropType<string | number | Array<string | number> | null>;
94
103
  readonly arrowPlacement: {
95
104
  readonly type: PropType<ArrowPlacement>;
96
- readonly default: "left";
105
+ readonly default: "right-edge";
97
106
  };
98
107
  readonly accordion: {
99
108
  readonly type: BooleanConstructor;
@@ -124,8 +133,11 @@ declare const _default: import("vue").DefineComponent<{
124
133
  arrowSize: string;
125
134
  arrowColor: string;
126
135
  arrowColorDisabled: string;
127
- itemMargin: string;
128
136
  titlePadding: string;
137
+ backgroundColor: string;
138
+ borderRadius: string;
139
+ padding: string;
140
+ boxSizing: string;
129
141
  }, any>>;
130
142
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
131
143
  titleFontSize: string;
@@ -140,8 +152,11 @@ declare const _default: import("vue").DefineComponent<{
140
152
  arrowSize: string;
141
153
  arrowColor: string;
142
154
  arrowColorDisabled: string;
143
- itemMargin: string;
144
155
  titlePadding: string;
156
+ backgroundColor: string;
157
+ borderRadius: string;
158
+ padding: string;
159
+ boxSizing: string;
145
160
  }, any>>>;
146
161
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
147
162
  titleFontSize: string;
@@ -156,8 +171,11 @@ declare const _default: import("vue").DefineComponent<{
156
171
  arrowSize: string;
157
172
  arrowColor: string;
158
173
  arrowColorDisabled: string;
159
- itemMargin: string;
160
174
  titlePadding: string;
175
+ backgroundColor: string;
176
+ borderRadius: string;
177
+ padding: string;
178
+ boxSizing: string;
161
179
  }, any>>>;
162
180
  }, {
163
181
  rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
@@ -176,8 +194,11 @@ declare const _default: import("vue").DefineComponent<{
176
194
  arrowSize: string;
177
195
  arrowColor: string;
178
196
  arrowColorDisabled: string;
179
- itemMargin: string;
180
197
  titlePadding: string;
198
+ backgroundColor: string;
199
+ borderRadius: string;
200
+ padding: string;
201
+ boxSizing: string;
181
202
  };
182
203
  peers: any;
183
204
  peerOverrides: {
@@ -200,7 +221,10 @@ declare const _default: import("vue").DefineComponent<{
200
221
  '--u-arrow-size': string;
201
222
  '--u-arrow-color': string;
202
223
  '--u-arrow-color-disabled': string;
203
- '--u-item-margin': string;
224
+ '--u-background-color': string;
225
+ '--u-border-radius': string;
226
+ '--u-padding': string;
227
+ '--u-box-sizing': string;
204
228
  }> | undefined;
205
229
  themeClass: Ref<string> | undefined;
206
230
  onRender: (() => void) | undefined;
@@ -212,7 +236,7 @@ declare const _default: import("vue").DefineComponent<{
212
236
  readonly expandedNames: PropType<string | number | Array<string | number> | null>;
213
237
  readonly arrowPlacement: {
214
238
  readonly type: PropType<ArrowPlacement>;
215
- readonly default: "left";
239
+ readonly default: "right-edge";
216
240
  };
217
241
  readonly accordion: {
218
242
  readonly type: BooleanConstructor;
@@ -243,8 +267,11 @@ declare const _default: import("vue").DefineComponent<{
243
267
  arrowSize: string;
244
268
  arrowColor: string;
245
269
  arrowColorDisabled: string;
246
- itemMargin: string;
247
270
  titlePadding: string;
271
+ backgroundColor: string;
272
+ borderRadius: string;
273
+ padding: string;
274
+ boxSizing: string;
248
275
  }, any>>;
249
276
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
250
277
  titleFontSize: string;
@@ -259,8 +286,11 @@ declare const _default: import("vue").DefineComponent<{
259
286
  arrowSize: string;
260
287
  arrowColor: string;
261
288
  arrowColorDisabled: string;
262
- itemMargin: string;
263
289
  titlePadding: string;
290
+ backgroundColor: string;
291
+ borderRadius: string;
292
+ padding: string;
293
+ boxSizing: string;
264
294
  }, any>>>;
265
295
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
266
296
  titleFontSize: string;
@@ -275,8 +305,11 @@ declare const _default: import("vue").DefineComponent<{
275
305
  arrowSize: string;
276
306
  arrowColor: string;
277
307
  arrowColorDisabled: string;
278
- itemMargin: string;
279
308
  titlePadding: string;
309
+ backgroundColor: string;
310
+ borderRadius: string;
311
+ padding: string;
312
+ boxSizing: string;
280
313
  }, any>>>;
281
314
  }>>, {
282
315
  readonly displayDirective: "show" | "if";
@@ -10,7 +10,7 @@ export const collapseProps = Object.assign(Object.assign({}, useTheme.props), {
10
10
  default: null
11
11
  }, expandedNames: [Array, String], arrowPlacement: {
12
12
  type: String,
13
- default: 'left'
13
+ default: 'right-edge'
14
14
  }, accordion: {
15
15
  type: Boolean,
16
16
  default: false
@@ -101,7 +101,7 @@ export default defineComponent({
101
101
  });
102
102
  const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);
103
103
  const cssVarsRef = computed(() => {
104
- const { common: { cubicBezierEaseInOut }, self: { titleFontWeight, dividerColor, titlePadding, titleTextColor, titleTextColorDisabled, textColor, arrowColor, fontSize, titleFontSize, arrowColorDisabled, itemMargin, lineHeight, titleLineHeight, arrowSize } } = themeRef.value;
104
+ const { common: { cubicBezierEaseInOut }, self: { titleFontWeight, dividerColor, titlePadding, titleTextColor, titleTextColorDisabled, textColor, arrowColor, fontSize, titleFontSize, arrowColorDisabled, lineHeight, titleLineHeight, arrowSize, backgroundColor, borderRadius, padding, boxSizing } } = themeRef.value;
105
105
  return {
106
106
  '--u-font-size': fontSize,
107
107
  '--u-bezier': cubicBezierEaseInOut,
@@ -117,7 +117,10 @@ export default defineComponent({
117
117
  '--u-arrow-size': arrowSize,
118
118
  '--u-arrow-color': arrowColor,
119
119
  '--u-arrow-color-disabled': arrowColorDisabled,
120
- '--u-item-margin': itemMargin
120
+ '--u-background-color': backgroundColor,
121
+ '--u-border-radius': borderRadius,
122
+ '--u-padding': padding,
123
+ '--u-box-sizing': boxSizing
121
124
  };
122
125
  });
123
126
  const themeClassHandle = inlineThemeDisabled
@@ -61,6 +61,7 @@ export default defineComponent({
61
61
  return collapseProps.arrowPlacement;
62
62
  }),
63
63
  handleClick(e) {
64
+ e.stopPropagation();
64
65
  if (UCollapse && !props.disabled) {
65
66
  UCollapse.toggleItem(collapsedRef.value, mergedNameRef.value, e);
66
67
  }
@@ -85,12 +86,12 @@ export default defineComponent({
85
86
  `${mergedClsPrefix}-collapse-item--${arrowPlacement}-arrow-placement`,
86
87
  disabled && `${mergedClsPrefix}-collapse-item--disabled`,
87
88
  !collapsed && `${mergedClsPrefix}-collapse-item--active`
88
- ] },
89
+ ], onClick: this.handleClick },
89
90
  h("div", { class: [
90
91
  `${mergedClsPrefix}-collapse-item__header`,
91
92
  !collapsed && `${mergedClsPrefix}-collapse-item__header--active`
92
93
  ] },
93
- h("div", { class: `${mergedClsPrefix}-collapse-item__header-main`, onClick: this.handleClick },
94
+ h("div", { class: `${mergedClsPrefix}-collapse-item__header-main` },
94
95
  arrowPlacement !== 'right-edge' && arrowNode,
95
96
  headerNode),
96
97
  resolveWrappedSlotWithProps(headerExtraSlot, { collapsed }, (children) => (h("div", { class: `${mergedClsPrefix}-collapse-item__header-extra`, onClick: this.handleClick }, children))),
@@ -12,15 +12,24 @@ import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-
12
12
  // --u-arrow-color
13
13
  // --u-arrow-color-disabled
14
14
  // --u-title-text-color-disabled
15
- // --u-item-margin
16
- export default cB('collapse', 'width: 100%;', [cB('collapse-item', `
15
+ // --u-background-color
16
+ // --u-border-radius
17
+ // --u-padding
18
+ // --u-box-sizing
19
+ export default cB('collapse', `
20
+ width: 100%;
21
+ background-color: var(--u-background-color);
22
+ border-radius: var(--u-border-radius);
23
+ box-sizing: var(--u-box-sizing);
24
+ `, [cB('collapse-item', `
17
25
  font-size: var(--u-font-size);
18
26
  line-height: var(--u-line-height);
19
27
  color: var(--u-text-color);
20
28
  transition:
21
29
  color .3s var(--u-bezier),
22
30
  border-color .3s var(--u-bezier);
23
- margin: var(--u-item-margin);
31
+ padding: var(--u-padding);
32
+ cursor: pointer;
24
33
  `, [cM('disabled', [cE('header', 'cursor: not-allowed;', [cE('header-main', `
25
34
  color: var(--u-title-text-color-disabled);
26
35
  `), cB('collapse-item-arrow', `
@@ -28,9 +37,22 @@ export default cB('collapse', 'width: 100%;', [cB('collapse-item', `
28
37
  `)])]), cB('collapse-item', 'margin-left: 32px;'), c('&:first-child', 'margin-top: 0;'), c('&:first-child >', [cE('header', 'padding-top: 0;')]), cM('left-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-right: 4px;')])]), cM('right-arrow-placement', [cE('header', [cB('collapse-item-arrow', `
29
38
  margin-left: 4px;
30
39
  order: 1;
31
- `)])]), cM('right-edge-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-left: auto;')])]), cE('content-wrapper', [cE('content-inner', 'padding-top: 16px;'), fadeInHeightExpandTransition({
40
+ `)])]), cM('right-edge-arrow-placement', [cE('header', [cB('collapse-item-arrow', `
41
+ margin-left: auto;
42
+ display: flex;
43
+ width: 28px;
44
+ height: 28px;
45
+ justify-content: center;
46
+ align-items: center;
47
+ border-radius: 100px;
48
+ background: #F3F4F6;
49
+ `, [cB('base-icon', `
50
+ transform: scaleY(1) rotate(90deg);
51
+ transition:
52
+ transform .15s var(--u-bezier)
53
+ `)])])]), cE('content-wrapper', [cE('content-inner', 'padding-top: 16px;'), fadeInHeightExpandTransition({
32
54
  duration: '0.15s'
33
- })]), cM('active', [cE('header', [cM('active', [cB('collapse-item-arrow', 'transform: rotate(90deg);')])])]), c('&:not(:first-child)', 'border-top: 1px solid var(--u-divider-color);'), cE('header', `
55
+ })]), cM('active', [cE('header', [cM('active', [cB('collapse-item-arrow', [cB('base-icon', 'transform: scaleY(-1) rotate(90deg)')])])])]), cE('header', `
34
56
  font-size: var(--u-title-font-size);
35
57
  line-height: var(--u-title-line-height);
36
58
  display: flex;
@@ -38,9 +60,7 @@ export default cB('collapse', 'width: 100%;', [cB('collapse-item', `
38
60
  align-items: center;
39
61
  transition: color .3s var(--u-bezier);
40
62
  position: relative;
41
- padding: var(--u-title-padding);
42
63
  color: var(--u-title-text-color);
43
- cursor: pointer;
44
64
  `, [cE('header-main', `
45
65
  display: flex;
46
66
  flex-wrap: nowrap;
@@ -13,8 +13,11 @@ export declare const self: (vars: ThemeCommonVars) => {
13
13
  arrowSize: string;
14
14
  arrowColor: string;
15
15
  arrowColorDisabled: string;
16
- itemMargin: string;
17
16
  titlePadding: string;
17
+ backgroundColor: string;
18
+ borderRadius: string;
19
+ padding: string;
20
+ boxSizing: string;
18
21
  };
19
22
  export type CollapseThemeVars = ReturnType<typeof self>;
20
23
  declare const collapseLight: Theme<'Collapse', CollapseThemeVars>;
@@ -1,6 +1,6 @@
1
1
  import { commonLight } from '../../_styles/common';
2
2
  export const self = (vars) => {
3
- const { fontWeight, fontBodyLarge, lineHeightBodyLarge, elementsQuaternary, textPrimary, textSecondary, fontBodyMedium, lineHeightBodyMedium, iconSmall } = vars;
3
+ const { fontWeight, fontBodyLarge, lineHeightBodyLarge, elementsQuaternary, textPrimary, textSecondary, fontBodyMedium, lineHeightBodyMedium, iconSmall, containerPrimary } = vars;
4
4
  return {
5
5
  titleFontSize: fontBodyLarge,
6
6
  titleLineHeight: lineHeightBodyLarge,
@@ -14,8 +14,11 @@ export const self = (vars) => {
14
14
  arrowSize: iconSmall,
15
15
  arrowColor: textPrimary,
16
16
  arrowColorDisabled: textSecondary,
17
- itemMargin: '16px 0 0 0',
18
- titlePadding: '16px 0 0 0'
17
+ titlePadding: '16px 0 0 0',
18
+ backgroundColor: containerPrimary,
19
+ borderRadius: '20px',
20
+ padding: '24px',
21
+ boxSizing: 'border-box'
19
22
  };
20
23
  };
21
24
  const collapseLight = {
@@ -255,14 +255,14 @@ export default defineComponent({
255
255
  else {
256
256
  upcomingValue = null;
257
257
  }
258
- const { nTriggerFormChange, nTriggerFormInput } = formItem;
258
+ const { triggerFormChange, triggerFormInput } = formItem;
259
259
  const { onUpdateValue, 'onUpdate:value': _onUpdateValue } = props;
260
260
  if (onUpdateValue)
261
261
  call(onUpdateValue, value);
262
262
  if (_onUpdateValue)
263
263
  call(_onUpdateValue, value);
264
- nTriggerFormChange();
265
- nTriggerFormInput();
264
+ triggerFormChange();
265
+ triggerFormInput();
266
266
  uncontrolledValueRef.value = value;
267
267
  }
268
268
  function handleInputUpdateValue(value) {
@@ -273,7 +273,7 @@ export default defineComponent({
273
273
  const { value } = mergedValueRef;
274
274
  // no value & only hue changes will complete with no value
275
275
  if (value) {
276
- const { nTriggerFormChange, nTriggerFormInput } = formItem;
276
+ const { triggerFormChange, triggerFormInput } = formItem;
277
277
  const { onComplete } = props;
278
278
  if (onComplete) {
279
279
  ;
@@ -285,8 +285,8 @@ export default defineComponent({
285
285
  undoStack.splice(valueIndex + 1, undoStack.length, value);
286
286
  valueIndexRef.value = valueIndex + 1;
287
287
  }
288
- nTriggerFormChange();
289
- nTriggerFormInput();
288
+ triggerFormChange();
289
+ triggerFormInput();
290
290
  }
291
291
  }
292
292
  function undo() {
@@ -44,6 +44,7 @@ export * from './icon-wrapper';
44
44
  export * from './image';
45
45
  export * from './input';
46
46
  export * from './input-number';
47
+ export * from './input-otp';
47
48
  export * from './layout';
48
49
  export * from './legacy-grid';
49
50
  export * from './legacy-transfer';
package/es/components.js CHANGED
@@ -44,6 +44,7 @@ export * from './icon-wrapper';
44
44
  export * from './image';
45
45
  export * from './input';
46
46
  export * from './input-number';
47
+ export * from './input-otp';
47
48
  export * from './layout';
48
49
  export * from './legacy-grid';
49
50
  export * from './legacy-transfer';
@@ -37,6 +37,7 @@ import type { IconWrapperTheme } from '../../icon-wrapper/styles';
37
37
  import type { ImageTheme } from '../../image/styles';
38
38
  import type { InputTheme } from '../../input/styles';
39
39
  import type { InputNumberTheme } from '../../input-number/styles';
40
+ import type { InputOtpTheme } from '../../input-otp/styles';
40
41
  import type { LayoutTheme } from '../../layout/styles';
41
42
  import type { LegacyTransferTheme } from '../../legacy-transfer/styles';
42
43
  import type { ListTheme } from '../../list/styles';
@@ -190,6 +191,7 @@ export interface GlobalThemeWithoutCommon {
190
191
  InternalSelectMenu?: InternalSelectMenuTheme;
191
192
  InternalSelection?: InternalSelectionTheme;
192
193
  AccountOption?: AccountOptionTheme;
194
+ InputOtp?: InputOtpTheme;
193
195
  }
194
196
  export interface GlobalComponentConfig {
195
197
  Pagination?: {
@@ -91,6 +91,7 @@ declare const _default: import("vue").DefineComponent<{
91
91
  readonly type: import("vue").PropType<import("../../_internal").BaseLoadingExposedProps>;
92
92
  readonly default: {};
93
93
  };
94
+ readonly emptyProps: import("vue").PropType<Partial<import("../..").EmptyProps>>;
94
95
  readonly onLoad: import("vue").PropType<import("./interface").DataTableOnLoad>;
95
96
  readonly 'onUpdate:page': import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
96
97
  readonly onUpdatePage: import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
@@ -2872,6 +2873,11 @@ declare const _default: import("vue").DefineComponent<{
2872
2873
  page: (page: number) => void;
2873
2874
  sort: (columnKey: import("./interface").ColumnKey, order: import("./interface").SortOrder) => void;
2874
2875
  scrollTo: import("../../scrollbar/src/Scrollbar").ScrollTo;
2876
+ getData: () => {
2877
+ data: import("./interface").InternalRowData[];
2878
+ totalRows: import("./interface").InternalRowData | null;
2879
+ };
2880
+ getTotalRowData: () => import("./interface").InternalRowData | null;
2875
2881
  clearFilter: () => void;
2876
2882
  mainTableInstRef: import("vue").Ref<{
2877
2883
  getHeaderElement: () => HTMLElement | null;
@@ -4363,6 +4369,7 @@ declare const _default: import("vue").DefineComponent<{
4363
4369
  readonly type: import("vue").PropType<import("../../_internal").BaseLoadingExposedProps>;
4364
4370
  readonly default: {};
4365
4371
  };
4372
+ readonly emptyProps: import("vue").PropType<Partial<import("../..").EmptyProps>>;
4366
4373
  readonly onLoad: import("vue").PropType<import("./interface").DataTableOnLoad>;
4367
4374
  readonly 'onUpdate:page': import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
4368
4375
  readonly onUpdatePage: import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
@@ -13,7 +13,6 @@ import { useResizable } from './use-resizable';
13
13
  import { dataTableInjectionKey, dataTableProps } from './interface';
14
14
  import { useGroupHeader } from './use-group-header';
15
15
  import { useExpand } from './use-expand';
16
- import { processMaskedValue } from './use-mask';
17
16
  import style from './styles/index.cssr';
18
17
  export default defineComponent({
19
18
  name: 'DataTable',
@@ -93,7 +92,7 @@ export default defineComponent({
93
92
  return;
94
93
  if (!('totalRow' in col) || !col.totalRow)
95
94
  return;
96
- const { key, totalRow, render, mask } = col;
95
+ const { key, totalRow, render } = col;
97
96
  if (!totalRow)
98
97
  return;
99
98
  if (totalRow.type === 'default') {
@@ -106,18 +105,12 @@ export default defineComponent({
106
105
  return Number(renderedValue) || 0;
107
106
  });
108
107
  const sum = values.reduce((sum, val) => sum + val, 0);
109
- const finalValue = mask
110
- ? processMaskedValue(String(sum), mask)
111
- : sum;
112
- summaryRow[key] = { value: finalValue };
108
+ summaryRow[key] = { value: sum };
113
109
  }
114
110
  else {
115
111
  const values = pageData.map((row) => Number(row[key]) || 0);
116
112
  const sum = values.reduce((sum, val) => sum + val, 0);
117
- const finalValue = mask
118
- ? processMaskedValue(String(sum), mask)
119
- : sum;
120
- summaryRow[key] = { value: finalValue };
113
+ summaryRow[key] = { value: sum };
121
114
  }
122
115
  }
123
116
  else {
@@ -307,6 +300,7 @@ export default defineComponent({
307
300
  handleTableBodyScroll,
308
301
  setHeaderScrollLeft,
309
302
  renderCell: toRef(props, 'renderCell'),
303
+ emptyPropsRef: toRef(props, 'emptyProps'),
310
304
  handleEdit
311
305
  });
312
306
  const exposedMethods = {
@@ -320,6 +314,23 @@ export default defineComponent({
320
314
  scrollTo: (arg0, arg1) => {
321
315
  var _a;
322
316
  (_a = mainTableInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg0, arg1);
317
+ },
318
+ getData: () => {
319
+ const originalData = props.data || [];
320
+ const totalRowData = autoSummaryRef.value && rawPaginatedDataRef.value
321
+ ? autoSummaryRef.value(rawPaginatedDataRef.value)
322
+ : null;
323
+ return {
324
+ data: originalData,
325
+ totalRows: totalRowData
326
+ };
327
+ },
328
+ getTotalRowData: () => {
329
+ if (autoSummaryRef.value && rawPaginatedDataRef.value) {
330
+ const summaryResult = autoSummaryRef.value(rawPaginatedDataRef.value);
331
+ return summaryResult;
332
+ }
333
+ return null;
323
334
  }
324
335
  };
325
336
  const cssVarsRef = computed(() => {
@@ -1430,6 +1430,7 @@ declare const _default: import("vue").DefineComponent<{
1430
1430
  }) => void;
1431
1431
  handleUpdateExpanded: (key: RowKey, tmNode: TmNode | null) => void;
1432
1432
  renderCell: import("vue").Ref<((value: any, rowData: object, column: import("../interface").TableBaseColumn) => import("vue").VNodeChild) | undefined>;
1433
+ emptyPropsRef: import("vue").Ref<Partial<import("../../../empty").EmptyProps> | undefined>;
1433
1434
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "edit"[], "edit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1434
1435
  onEdit: PropType<(value: string, row: string, key: string) => void>;
1435
1436
  onResize: PropType<(e: ResizeObserverEntry) => void>;
@@ -94,7 +94,7 @@ export default defineComponent({
94
94
  bodyStyle: Object
95
95
  },
96
96
  setup(props) {
97
- const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, loadingSkeletonRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, summaryPlacementRef, treeMateRef, scrollbarPropsRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell
97
+ const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, loadingSkeletonRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, summaryPlacementRef, treeMateRef, scrollbarPropsRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell, emptyPropsRef
98
98
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
99
99
  } = inject(dataTableInjectionKey);
100
100
  const scrollbarInstRef = ref(null);
@@ -342,10 +342,11 @@ export default defineComponent({
342
342
  handleCheckboxUpdateChecked,
343
343
  handleRadioUpdateChecked,
344
344
  handleUpdateExpanded,
345
- renderCell }, exposedMethods);
345
+ renderCell,
346
+ emptyPropsRef }, exposedMethods);
346
347
  },
347
348
  render() {
348
- const { mergedTheme, scrollX, mergedClsPrefix, virtualScroll, maxHeight, mergedTableLayout, flexHeight, loadingKeySet, onResize, setHeaderScrollLeft } = this;
349
+ const { mergedTheme, scrollX, mergedClsPrefix, virtualScroll, maxHeight, mergedTableLayout, flexHeight, loadingKeySet, onResize, setHeaderScrollLeft, emptyPropsRef } = this;
349
350
  const scrollable = scrollX !== undefined || maxHeight !== undefined || flexHeight;
350
351
  // For a basic table with auto layout whose content may overflow we will
351
352
  // make it scrollable, which differs from browser's native behavior.
@@ -560,6 +561,7 @@ export default defineComponent({
560
561
  `${mergedClsPrefix}-data-table-td--last-row`,
561
562
  'editable' in column &&
562
563
  column.editable &&
564
+ !isSummary &&
563
565
  `${mergedClsPrefix}-data-table-td--editable`
564
566
  ] }),
565
567
  column.fixed && (h("div", { class: `${mergedClsPrefix}-data-table-td__shadow-holder` })),
@@ -596,7 +598,7 @@ export default defineComponent({
596
598
  }))) : null));
597
599
  }
598
600
  else {
599
- if (this.loading) {
601
+ if (this.loading || this.loadingSkeleton) {
600
602
  return (h("table", { class: `${mergedClsPrefix}-data-table-table`, onMouseleave: handleMouseleaveTable, style: {
601
603
  tableLayout: this.mergedTableLayout
602
604
  } },
@@ -615,12 +617,12 @@ export default defineComponent({
615
617
  }
616
618
  }
617
619
  }));
618
- if (this.empty) {
620
+ if (this.empty && !this.loadingSkeleton) {
619
621
  const createEmptyNode = () => (h("div", { class: [
620
622
  `${mergedClsPrefix}-data-table-empty`,
621
623
  this.loading && `${mergedClsPrefix}-data-table-empty--hide`
622
624
  ], style: this.bodyStyle, ref: "emptyElRef" }, resolveSlot(this.dataTableSlots.empty, () => [
623
- h(UEmpty, { size: "large", theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
625
+ h(UEmpty, Object.assign({ size: "large", theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty }, emptyPropsRef))
624
626
  ])));
625
627
  if (this.shouldDisplaySomeTablePart) {
626
628
  return (h(Fragment, null,