@uzum-tech/ui 1.5.3 → 1.5.5

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 (84) hide show
  1. package/dist/index.js +153 -85
  2. package/dist/index.prod.js +3 -3
  3. package/es/_utils/css/index.d.ts +1 -0
  4. package/es/_utils/css/index.js +1 -0
  5. package/es/_utils/css/normalize-size.d.ts +1 -0
  6. package/es/_utils/css/normalize-size.js +6 -0
  7. package/es/_utils/index.d.ts +1 -1
  8. package/es/_utils/index.js +1 -1
  9. package/es/avatar/src/Avatar.js +1 -7
  10. package/es/badge/src/Badge.d.ts +13 -0
  11. package/es/badge/src/Badge.js +5 -4
  12. package/es/badge/src/styles/index.cssr.js +5 -6
  13. package/es/badge/styles/light.d.ts +1 -0
  14. package/es/badge/styles/light.js +2 -1
  15. package/es/collapse/src/Collapse.d.ts +47 -14
  16. package/es/collapse/src/Collapse.js +6 -3
  17. package/es/collapse/src/CollapseItem.js +3 -2
  18. package/es/collapse/src/styles/index.cssr.js +27 -7
  19. package/es/collapse/styles/light.d.ts +4 -1
  20. package/es/collapse/styles/light.js +6 -3
  21. package/es/data-table/src/DataTable.d.ts +2 -0
  22. package/es/data-table/src/DataTable.js +1 -0
  23. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  24. package/es/data-table/src/TableParts/Body.js +5 -4
  25. package/es/data-table/src/interface.d.ts +3 -0
  26. package/es/data-table/src/interface.js +1 -1
  27. package/es/date-picker/src/DatePicker.d.ts +3 -0
  28. package/es/date-picker/src/DatePicker.js +2 -2
  29. package/es/date-picker/src/interface.d.ts +1 -0
  30. package/es/date-picker/src/panel/use-calendar.js +5 -2
  31. package/es/date-picker/src/panel/use-dual-calendar.js +6 -3
  32. package/es/date-picker/src/utils.d.ts +1 -1
  33. package/es/date-picker/src/utils.js +3 -2
  34. package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
  35. package/es/dynamic-tags/styles/light.d.ts +1 -0
  36. package/es/tag/src/Tag.d.ts +27 -13
  37. package/es/tag/src/Tag.js +7 -2
  38. package/es/tag/src/styles/index.cssr.js +13 -3
  39. package/es/tag/styles/light.d.ts +1 -0
  40. package/es/tag/styles/light.js +7 -6
  41. package/es/version.d.ts +1 -1
  42. package/es/version.js +1 -1
  43. package/lib/_utils/css/index.d.ts +1 -0
  44. package/lib/_utils/css/index.js +3 -1
  45. package/lib/_utils/css/normalize-size.d.ts +1 -0
  46. package/lib/_utils/css/normalize-size.js +10 -0
  47. package/lib/_utils/index.d.ts +1 -1
  48. package/lib/_utils/index.js +2 -1
  49. package/lib/avatar/src/Avatar.js +1 -7
  50. package/lib/badge/src/Badge.d.ts +13 -0
  51. package/lib/badge/src/Badge.js +4 -3
  52. package/lib/badge/src/styles/index.cssr.js +5 -6
  53. package/lib/badge/styles/light.d.ts +1 -0
  54. package/lib/badge/styles/light.js +2 -1
  55. package/lib/collapse/src/Collapse.d.ts +47 -14
  56. package/lib/collapse/src/Collapse.js +6 -3
  57. package/lib/collapse/src/CollapseItem.js +3 -2
  58. package/lib/collapse/src/styles/index.cssr.js +27 -7
  59. package/lib/collapse/styles/light.d.ts +4 -1
  60. package/lib/collapse/styles/light.js +6 -3
  61. package/lib/data-table/src/DataTable.d.ts +2 -0
  62. package/lib/data-table/src/DataTable.js +1 -0
  63. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  64. package/lib/data-table/src/TableParts/Body.js +5 -4
  65. package/lib/data-table/src/interface.d.ts +3 -0
  66. package/lib/data-table/src/interface.js +1 -1
  67. package/lib/date-picker/src/DatePicker.d.ts +3 -0
  68. package/lib/date-picker/src/DatePicker.js +2 -2
  69. package/lib/date-picker/src/interface.d.ts +1 -0
  70. package/lib/date-picker/src/panel/use-calendar.js +5 -2
  71. package/lib/date-picker/src/panel/use-dual-calendar.js +6 -3
  72. package/lib/date-picker/src/utils.d.ts +1 -1
  73. package/lib/date-picker/src/utils.js +3 -2
  74. package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
  75. package/lib/dynamic-tags/styles/light.d.ts +1 -0
  76. package/lib/tag/src/Tag.d.ts +27 -13
  77. package/lib/tag/src/Tag.js +7 -2
  78. package/lib/tag/src/styles/index.cssr.js +13 -3
  79. package/lib/tag/styles/light.d.ts +1 -0
  80. package/lib/tag/styles/light.js +7 -6
  81. package/lib/version.d.ts +1 -1
  82. package/lib/version.js +1 -1
  83. package/package.json +1 -1
  84. package/web-types.json +23 -1
@@ -1,2 +1,3 @@
1
1
  export { formatLength } from './format-length';
2
2
  export { color2Class } from './color-to-class';
3
+ export { resolveSize } from './normalize-size';
@@ -1,2 +1,3 @@
1
1
  export { formatLength } from './format-length';
2
2
  export { color2Class } from './color-to-class';
3
+ export { resolveSize } from './normalize-size';
@@ -0,0 +1 @@
1
+ export declare const resolveSize: (value: string | number | undefined, fallback: string) => string;
@@ -0,0 +1,6 @@
1
+ export const resolveSize = (value, fallback) => {
2
+ if (value === undefined)
3
+ return fallback;
4
+ value = String(value);
5
+ return /^\d+$/.test(value) ? `${value}px` : value;
6
+ };
@@ -2,7 +2,7 @@ export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, g
2
2
  export type { MaybeArray } from './vue';
3
3
  export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute, isArrayShallowEqual } from './uzum';
4
4
  export type { ExtractPublicPropTypes, ExtractInternalPropTypes, Mutable } from './uzum';
5
- export { formatLength, color2Class } from './css';
5
+ export { formatLength, color2Class, resolveSize } from './css';
6
6
  export { createKey } from './cssr';
7
7
  export { isJsdom } from './env/is-jsdom';
8
8
  export { isBrowser } from './env/is-browser';
@@ -1,6 +1,6 @@
1
1
  export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, getFirstSlotVNode, createDataKey, createRefSetter, createInjectionKey, resolveSlot, resolveSlotWithProps, resolveWrappedSlot, isSlotEmpty, mergeEventHandlers, isNodeVShowFalse, resolveWrappedSlotWithProps, Wrapper } from './vue';
2
2
  export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute, isArrayShallowEqual } from './uzum';
3
- export { formatLength, color2Class } from './css';
3
+ export { formatLength, color2Class, resolveSize } from './css';
4
4
  export { createKey } from './cssr';
5
5
  export { isJsdom } from './env/is-jsdom';
6
6
  export { isBrowser } from './env/is-browser';
@@ -4,7 +4,7 @@ import { isImageSupportNativeLazy } from '../../_utils/env/is-native-lazy-load';
4
4
  import { observeIntersection } from '../../image/src/utils';
5
5
  import { tagInjectionKey } from '../../tag/src/Tag';
6
6
  import { useConfig, useTheme, useThemeClass } from '../../_mixins';
7
- import { createKey, resolveWrappedSlot, resolveSlot } from '../../_utils';
7
+ import { createKey, resolveWrappedSlot, resolveSlot, resolveSize } from '../../_utils';
8
8
  import { avatarLight } from '../styles';
9
9
  import { avatarGroupInjectionKey } from './context';
10
10
  import { USkeleton } from '../../skeleton';
@@ -103,12 +103,6 @@ export default defineComponent({
103
103
  const getBackgroundColor = (color) => {
104
104
  return props.disabled || size === 'small' ? 'rgba(0,0,0,0)' : color;
105
105
  };
106
- const resolveSize = (value, fallback) => {
107
- if (value === undefined)
108
- return fallback;
109
- value = String(value);
110
- return /^\d+$/.test(value) ? `${value}px` : value;
111
- };
112
106
  return {
113
107
  '--u-font-size': fontSize,
114
108
  '--u-font-weight': fontWeight,
@@ -16,6 +16,7 @@ export declare const badgeProps: {
16
16
  readonly processing: BooleanConstructor;
17
17
  readonly color: StringConstructor;
18
18
  readonly textColor: StringConstructor;
19
+ readonly dotSize: PropType<string | number>;
19
20
  readonly offset: PropType<readonly [number | string, number | string]>;
20
21
  readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
21
22
  color: string;
@@ -32,6 +33,7 @@ export declare const badgeProps: {
32
33
  textColorError: string;
33
34
  textColorWarning: string;
34
35
  borderColor: string;
36
+ dotSize: string;
35
37
  }, any>>;
36
38
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
37
39
  color: string;
@@ -48,6 +50,7 @@ export declare const badgeProps: {
48
50
  textColorError: string;
49
51
  textColorWarning: string;
50
52
  borderColor: string;
53
+ dotSize: string;
51
54
  }, any>>>;
52
55
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
53
56
  color: string;
@@ -64,6 +67,7 @@ export declare const badgeProps: {
64
67
  textColorError: string;
65
68
  textColorWarning: string;
66
69
  borderColor: string;
70
+ dotSize: string;
67
71
  }, any>>>;
68
72
  };
69
73
  export type BadgeProps = ExtractPublicPropTypes<typeof badgeProps>;
@@ -83,6 +87,7 @@ declare const _default: import("vue").DefineComponent<{
83
87
  readonly processing: BooleanConstructor;
84
88
  readonly color: StringConstructor;
85
89
  readonly textColor: StringConstructor;
90
+ readonly dotSize: PropType<string | number>;
86
91
  readonly offset: PropType<readonly [number | string, number | string]>;
87
92
  readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
88
93
  color: string;
@@ -99,6 +104,7 @@ declare const _default: import("vue").DefineComponent<{
99
104
  textColorError: string;
100
105
  textColorWarning: string;
101
106
  borderColor: string;
107
+ dotSize: string;
102
108
  }, any>>;
103
109
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
104
110
  color: string;
@@ -115,6 +121,7 @@ declare const _default: import("vue").DefineComponent<{
115
121
  textColorError: string;
116
122
  textColorWarning: string;
117
123
  borderColor: string;
124
+ dotSize: string;
118
125
  }, any>>>;
119
126
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
120
127
  color: string;
@@ -131,6 +138,7 @@ declare const _default: import("vue").DefineComponent<{
131
138
  textColorError: string;
132
139
  textColorWarning: string;
133
140
  borderColor: string;
141
+ dotSize: string;
134
142
  }, any>>>;
135
143
  }, {
136
144
  rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
@@ -147,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
147
155
  '--u-ripple-bezier': string;
148
156
  '--u-text-color': string;
149
157
  '--u-border-color': string;
158
+ '--u-dot-size': string;
150
159
  }> | undefined;
151
160
  themeClass: import("vue").Ref<string> | undefined;
152
161
  onRender: (() => void) | undefined;
@@ -169,6 +178,7 @@ declare const _default: import("vue").DefineComponent<{
169
178
  readonly processing: BooleanConstructor;
170
179
  readonly color: StringConstructor;
171
180
  readonly textColor: StringConstructor;
181
+ readonly dotSize: PropType<string | number>;
172
182
  readonly offset: PropType<readonly [number | string, number | string]>;
173
183
  readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
174
184
  color: string;
@@ -185,6 +195,7 @@ declare const _default: import("vue").DefineComponent<{
185
195
  textColorError: string;
186
196
  textColorWarning: string;
187
197
  borderColor: string;
198
+ dotSize: string;
188
199
  }, any>>;
189
200
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
190
201
  color: string;
@@ -201,6 +212,7 @@ declare const _default: import("vue").DefineComponent<{
201
212
  textColorError: string;
202
213
  textColorWarning: string;
203
214
  borderColor: string;
215
+ dotSize: string;
204
216
  }, any>>>;
205
217
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
206
218
  color: string;
@@ -217,6 +229,7 @@ declare const _default: import("vue").DefineComponent<{
217
229
  textColorError: string;
218
230
  textColorWarning: string;
219
231
  borderColor: string;
232
+ dotSize: string;
220
233
  }, any>>>;
221
234
  }>>, {
222
235
  readonly type: "default" | "info" | "success" | "warning" | "error" | "prime";
@@ -1,7 +1,7 @@
1
1
  import { h, computed, onMounted, ref, defineComponent, Transition } from 'vue';
2
2
  import { useConfig, useTheme, useThemeClass } from '../../_mixins';
3
3
  import { UBaseSlotMachine, UBaseWave } from '../../_internal';
4
- import { color2Class, createKey, getTitleAttribute, isSlotEmpty, resolveSlot } from '../../_utils';
4
+ import { color2Class, createKey, getTitleAttribute, isSlotEmpty, resolveSize, resolveSlot } from '../../_utils';
5
5
  import { badgeLight } from '../styles';
6
6
  import style from './styles/index.cssr';
7
7
  import { useRtl } from '../../_mixins/use-rtl';
@@ -11,7 +11,7 @@ export const badgeProps = Object.assign(Object.assign({}, useTheme.props), { val
11
11
  }, show: {
12
12
  type: Boolean,
13
13
  default: true
14
- }, showZero: Boolean, processing: Boolean, color: String, textColor: String, offset: Array });
14
+ }, showZero: Boolean, processing: Boolean, color: String, textColor: String, dotSize: [String, Number], offset: Array });
15
15
  export default defineComponent({
16
16
  name: 'Badge',
17
17
  props: badgeProps,
@@ -39,7 +39,7 @@ export default defineComponent({
39
39
  const rtlEnabledRef = useRtl('Badge', mergedRtlRef, mergedClsPrefixRef);
40
40
  const cssVarsRef = computed(() => {
41
41
  const { type, color: propColor, textColor: propTextColor } = props;
42
- const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [createKey('color', type)]: color, [createKey('textColor', type)]: textColor, fontSize, borderColor } } = themeRef.value;
42
+ const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [createKey('color', type)]: color, [createKey('textColor', type)]: textColor, fontSize, borderColor, dotSize } } = themeRef.value;
43
43
  return {
44
44
  '--u-font-size': fontSize,
45
45
  '--u-color': propColor || color,
@@ -47,7 +47,8 @@ export default defineComponent({
47
47
  '--u-bezier': cubicBezierEaseInOut,
48
48
  '--u-ripple-bezier': cubicBezierEaseOut,
49
49
  '--u-text-color': propTextColor || textColor,
50
- '--u-border-color': borderColor
50
+ '--u-border-color': borderColor,
51
+ '--u-dot-size': resolveSize(props.dotSize, dotSize)
51
52
  };
52
53
  });
53
54
  const themeClassHandle = inlineThemeDisabled
@@ -29,13 +29,14 @@ export default c([c('@keyframes badge-wave-spread', {
29
29
  transformOrigin: 'left bottom',
30
30
  originalTransform: 'translateX(0)'
31
31
  })])]), cM('dot', [cB('badge-sup', `
32
- height: 8px;
33
- width: 8px;
32
+ height: var(--u-dot-size);
33
+ width: var(--u-dot-size);
34
+ justify-content: center;
35
+ overflow: hidden;
34
36
  padding: 0;
35
- min-width: 8px;
36
37
  left: 100%;
37
38
  bottom: calc(100% - 4px);
38
- `, [c('::before', 'border-radius: 4px;')])]), cB('badge-sup', `
39
+ `, [c('::before', 'border-radius: 4px;'), c('img', 'width: 100%')])]), cB('badge-sup', `
39
40
  background: var(--u-color);
40
41
  transition:
41
42
  background-color .3s var(--u-bezier),
@@ -86,8 +87,6 @@ export default c([c('@keyframes badge-wave-spread', {
86
87
  border-radius: 100px;
87
88
  `), cM('dot', [cB('badge-sup', `
88
89
  transform: none;
89
- width: 12px;
90
- height: 12px;
91
90
  transform: none;
92
91
  left: auto;
93
92
  right: 0;
@@ -15,6 +15,7 @@ export declare const self: (vars: ThemeCommonVars) => {
15
15
  textColorError: string;
16
16
  textColorWarning: string;
17
17
  borderColor: string;
18
+ dotSize: string;
18
19
  };
19
20
  export type BadgeThemeVars = ReturnType<typeof self>;
20
21
  declare const badgeLight: Theme<'Badge', BadgeThemeVars>;
@@ -15,7 +15,8 @@ export const self = (vars) => {
15
15
  textColorSuccess: textQuaternary,
16
16
  textColorError: textQuaternary,
17
17
  textColorWarning: textQuaternary,
18
- borderColor: staticWhite
18
+ borderColor: staticWhite,
19
+ dotSize: '12px'
19
20
  };
20
21
  };
21
22
  const badgeLight = {
@@ -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 = {
@@ -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"]>;
@@ -4368,6 +4369,7 @@ declare const _default: import("vue").DefineComponent<{
4368
4369
  readonly type: import("vue").PropType<import("../../_internal").BaseLoadingExposedProps>;
4369
4370
  readonly default: {};
4370
4371
  };
4372
+ readonly emptyProps: import("vue").PropType<Partial<import("../..").EmptyProps>>;
4371
4373
  readonly onLoad: import("vue").PropType<import("./interface").DataTableOnLoad>;
4372
4374
  readonly 'onUpdate:page': import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
4373
4375
  readonly onUpdatePage: import("vue").PropType<import("../../pagination").PaginationProps["onUpdate:page"]>;
@@ -300,6 +300,7 @@ export default defineComponent({
300
300
  handleTableBodyScroll,
301
301
  setHeaderScrollLeft,
302
302
  renderCell: toRef(props, 'renderCell'),
303
+ emptyPropsRef: toRef(props, 'emptyProps'),
303
304
  handleEdit
304
305
  });
305
306
  const exposedMethods = {
@@ -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.
@@ -621,7 +622,7 @@ export default defineComponent({
621
622
  `${mergedClsPrefix}-data-table-empty`,
622
623
  this.loading && `${mergedClsPrefix}-data-table-empty--hide`
623
624
  ], style: this.bodyStyle, ref: "emptyElRef" }, resolveSlot(this.dataTableSlots.empty, () => [
624
- 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))
625
626
  ])));
626
627
  if (this.shouldDisplaySomeTablePart) {
627
628
  return (h(Fragment, null,