@uzum-tech/ui 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/index.js +312 -314
  2. package/dist/index.prod.js +3 -3
  3. package/es/_internal/typography/src/styles/text.cssr.js +0 -1
  4. package/es/_internal/typography/styles/light.js +1 -1
  5. package/es/data-table/src/DataTable.d.ts +3 -0
  6. package/es/data-table/src/DataTable.js +1 -0
  7. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  8. package/es/data-table/src/TableParts/Body.js +3 -3
  9. package/es/data-table/src/interface.d.ts +2 -0
  10. package/es/data-table/src/interface.js +1 -1
  11. package/es/list/src/List.d.ts +41 -55
  12. package/es/list/src/List.js +6 -10
  13. package/es/list/src/ListItem.d.ts +84 -25
  14. package/es/list/src/ListItem.js +116 -98
  15. package/es/list/src/interface.d.ts +1 -0
  16. package/es/list/src/props.d.ts +70 -31
  17. package/es/list/src/props.js +25 -5
  18. package/es/list/src/styles/index.cssr.js +32 -90
  19. package/es/list/styles/light.d.ts +5 -8
  20. package/es/list/styles/light.js +6 -9
  21. package/es/tag/src/styles/index.cssr.js +5 -1
  22. package/es/tag/styles/light.js +2 -2
  23. package/es/upload/src/UploadFile.js +4 -3
  24. package/es/version.d.ts +1 -1
  25. package/es/version.js +1 -1
  26. package/lib/_internal/typography/src/styles/text.cssr.js +0 -1
  27. package/lib/_internal/typography/styles/light.js +1 -1
  28. package/lib/data-table/src/DataTable.d.ts +3 -0
  29. package/lib/data-table/src/DataTable.js +1 -0
  30. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  31. package/lib/data-table/src/TableParts/Body.js +3 -3
  32. package/lib/data-table/src/interface.d.ts +2 -0
  33. package/lib/data-table/src/interface.js +1 -1
  34. package/lib/list/src/List.d.ts +41 -55
  35. package/lib/list/src/List.js +6 -10
  36. package/lib/list/src/ListItem.d.ts +84 -25
  37. package/lib/list/src/ListItem.js +115 -97
  38. package/lib/list/src/interface.d.ts +1 -0
  39. package/lib/list/src/props.d.ts +70 -31
  40. package/lib/list/src/props.js +25 -5
  41. package/lib/list/src/styles/index.cssr.js +32 -90
  42. package/lib/list/styles/light.d.ts +5 -8
  43. package/lib/list/styles/light.js +6 -9
  44. package/lib/tag/src/styles/index.cssr.js +5 -1
  45. package/lib/tag/styles/light.js +2 -2
  46. package/lib/upload/src/UploadFile.js +4 -3
  47. package/lib/version.d.ts +1 -1
  48. package/lib/version.js +1 -1
  49. package/package.json +1 -1
  50. package/web-types.json +62 -35
@@ -2,10 +2,13 @@ import { h, defineComponent, inject, computed, ref } from 'vue';
2
2
  import { call, createRefFromPropsAndInjection, throwError } from '../../_utils';
3
3
  import { listInjectionKey, listItemProps } from './props';
4
4
  import { ChevronRightIcon } from '../../_internal/icons';
5
- import { UBaseIcon, UBaseLoading, UBaseSkeleton } from '../../_internal';
5
+ import { UBaseIcon, UBaseSkeleton, InternalUText } from '../../_internal';
6
+ import { UAvatar } from '../../avatar';
7
+ import { UIcon } from '../../icon';
8
+ import { UBadge } from '../../badge';
6
9
  export default defineComponent({
7
10
  name: 'ListItem',
8
- props: listItemProps,
11
+ props: Object.assign({}, listItemProps),
9
12
  setup(props, { slots }) {
10
13
  const listInjection = inject(listInjectionKey, null);
11
14
  if (!listInjection) {
@@ -20,23 +23,21 @@ export default defineComponent({
20
23
  const mergedHoverable = createRef('hoverable');
21
24
  const mergedDisabled = createRef('disabled');
22
25
  const mergedLoading = createRef('loading');
23
- const mergedLoadingSkeleton = createRef('loadingSkeleton');
26
+ const mergedShowIcon = createRef('showIcon');
27
+ const mergedRounded = createRef('rounded');
24
28
  const mergedClickHandler = createRef('onClick');
25
29
  const mergedKeypressHandler = createRef('onKeypress');
26
30
  const mergedPressHandler = createRef('onPress');
27
31
  const mergedBlurHandler = createRef('onBlur');
28
32
  const mergedFocusHandler = createRef('onFocus');
29
- const hasFocus = computed(() => {
30
- return !mergedDisabled.value && mergedHoverable.value;
31
- });
33
+ const hasFocus = computed(() => !mergedDisabled.value && mergedHoverable.value);
32
34
  const isPressed = ref(false);
33
35
  const handleClick = (e) => {
34
36
  if (!mergedDisabled.value) {
35
37
  if (mergedClickHandler.value)
36
38
  call(mergedClickHandler.value, e);
37
- if (e.which === 1 || e.button === 0) {
39
+ if (e.which === 1 || e.button === 0)
38
40
  handlePress('mouseup');
39
- }
40
41
  }
41
42
  };
42
43
  const handleKeyPress = (e) => {
@@ -44,61 +45,45 @@ export default defineComponent({
44
45
  const { code } = e;
45
46
  if (code === 'Enter' || code === 'Space' || code === 'NumpadEnter') {
46
47
  e.preventDefault();
47
- if (!e.repeat) {
48
+ if (!e.repeat)
48
49
  handlePress('keyup');
49
- }
50
50
  }
51
51
  if (mergedKeypressHandler.value)
52
52
  call(mergedKeypressHandler.value, e);
53
53
  }
54
54
  };
55
55
  const handleBlur = (e) => {
56
- if (hasFocus.value) {
57
- if (mergedBlurHandler.value)
58
- call(mergedBlurHandler.value, e);
56
+ if (hasFocus.value && mergedBlurHandler.value) {
57
+ call(mergedBlurHandler.value, e);
59
58
  }
60
59
  };
61
60
  const handleFocus = (e) => {
62
- if (hasFocus.value) {
63
- if (mergedFocusHandler.value)
64
- call(mergedFocusHandler.value, e);
61
+ if (hasFocus.value && mergedFocusHandler.value) {
62
+ call(mergedFocusHandler.value, e);
65
63
  }
66
64
  };
67
65
  const handlePress = (eventName) => {
68
- if (mergedDisabled.value ||
69
- mergedLoading.value ||
70
- mergedLoadingSkeleton.value) {
66
+ if (mergedDisabled.value || mergedLoading.value)
71
67
  return;
72
- }
73
68
  if (mergedPressHandler.value)
74
69
  call(mergedPressHandler.value);
75
70
  if (hasFocus.value) {
76
71
  isPressed.value = true;
77
72
  window.addEventListener(eventName, () => {
78
73
  isPressed.value = false;
79
- }, {
80
- once: true,
81
- passive: true
82
- });
74
+ }, { once: true, passive: true });
83
75
  }
84
76
  };
85
- const resolveFirst = (name) => {
86
- if (!(name in props))
87
- return null;
88
- return props[name] || slots[name] || listInjection[name].value || null;
89
- };
77
+ const resolveSlot = (name) => slots[name] || null;
90
78
  return {
91
79
  mergedClsPrefix: listInjection.mergedClsPrefix,
92
- mergedShowIcon: createRef('showIcon'),
93
- mergedDescriptionFirst: createRef('descriptionFirst'),
94
- mergedColumnsEven: createRef('columnsEven'),
95
- mergedRounded: createRef('rounded'),
80
+ mergedHoverable,
96
81
  mergedDisabled,
97
82
  mergedLoading,
98
- mergedLoadingSkeleton,
99
- mergedHoverable,
83
+ mergedShowIcon,
84
+ mergedRounded,
100
85
  mergedTag: createRef('tag'),
101
- resolveFirst,
86
+ resolveSlot,
102
87
  hasFocus,
103
88
  isPressed,
104
89
  handleClick,
@@ -106,14 +91,18 @@ export default defineComponent({
106
91
  handleBlur,
107
92
  handleFocus,
108
93
  bordered: listInjection.bordered,
109
- showDivider: listInjection.showDivider
94
+ showDivider: listInjection.showDivider,
95
+ size: listInjection.size
110
96
  };
111
97
  },
112
98
  render() {
113
- const { $slots, mergedClsPrefix, resolveFirst, showDivider } = this;
99
+ var _a, _b, _c, _d, _e, _f;
100
+ const { $slots, mergedClsPrefix, showDivider, prefixAlign, suffixAlign, size, resolveSlot } = this;
114
101
  const mergedTag = this.mergedTag || 'ul';
102
+ const skeletonOn = !!this.mergedLoading;
115
103
  const sharedCls = [
116
104
  `${mergedClsPrefix}-list-item`,
105
+ `${mergedClsPrefix}-list-item--${size}`,
117
106
  this.mergedHoverable && `${mergedClsPrefix}-list-item--hoverable`,
118
107
  this.mergedRounded && `${mergedClsPrefix}-list-item--rounded`,
119
108
  this.mergedDisabled && `${mergedClsPrefix}-list-item--disabled`,
@@ -127,70 +116,99 @@ export default defineComponent({
127
116
  onBlur: this.handleBlur,
128
117
  onFocus: this.handleFocus
129
118
  };
130
- const prefixNode = $slots.prefix && (h("div", { class: `${mergedClsPrefix}-list-item__prefix` }, $slots.prefix()));
131
- const suffixNode = $slots.suffix && (h("div", { class: `${mergedClsPrefix}-list-item__suffix` }, $slots.suffix()));
132
- if ($slots.default) {
133
- return h(mergedTag, Object.assign({ class: [...sharedCls] }, sharedAttrs), [
134
- prefixNode,
135
- h("div", { class: `${mergedClsPrefix}-list-item__main` }, $slots.default()),
136
- suffixNode,
137
- showDivider && h("hr", { class: `${mergedClsPrefix}-list-item__divider` })
138
- ]);
119
+ function renderIcon(icon) {
120
+ return () => h(UIcon, null, { default: () => h(icon) });
139
121
  }
140
- else {
141
- let avatarNode, headerNode, descriptionNode, headerSideNode, descriptionSideNode, iconNode;
142
- const resolveAvatar = resolveFirst('avatar');
143
- const resolveHeader = resolveFirst('header');
144
- const resolveDescription = resolveFirst('description');
145
- const resolveHeaderSide = resolveFirst('headerSide');
146
- const resolveDescriptionSide = resolveFirst('descriptionSide');
147
- const resolveIcon = resolveFirst('icon');
148
- if (this.mergedLoading) {
149
- iconNode = (h("div", { class: `${mergedClsPrefix}-list-item__icon` },
150
- h(UBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", strokeWidth: 20 })));
122
+ const renderAvatar = () => {
123
+ if (!Object.values(this.avatar).length)
124
+ return null;
125
+ const Avatar = (h(UAvatar, Object.assign({ size: size }, this.avatar, { icon: undefined }), renderIcon(this.avatar.icon)));
126
+ return this.avatar.hasBadge ? (h(UBadge, Object.assign({}, this.badge), Avatar)) : (Avatar);
127
+ };
128
+ const prefixSkeletonSizes = {
129
+ large: 54,
130
+ medium: 48,
131
+ small: 42
132
+ };
133
+ const prefixSkeletonSize = prefixSkeletonSizes[size];
134
+ const prefixSkeletonborderRadius = this.avatar.circle ? 100 : 12;
135
+ const prefixNode = $slots.prefix || renderAvatar() ? (h("div", { class: `${mergedClsPrefix}-list-item__prefix ${mergedClsPrefix}-align-${prefixAlign}` }, skeletonOn || this.loadingPrefix ? (h(UBaseSkeleton, { width: `${prefixSkeletonSize}px`, height: `${prefixSkeletonSize}px`, style: { borderRadius: `${prefixSkeletonborderRadius}px` } })) : $slots.prefix ? ($slots.prefix()) : (renderAvatar()))) : null;
136
+ const header = ((_a = this.header) === null || _a === void 0 ? void 0 : _a.text) || resolveSlot('header');
137
+ const description = ((_b = this.description) === null || _b === void 0 ? void 0 : _b.text) || resolveSlot('description');
138
+ const hasLeft = !!(header || description);
139
+ const textVariant = {
140
+ large: {
141
+ title: 'body-l-medium',
142
+ subtitle: 'body-m-medium'
143
+ },
144
+ medium: {
145
+ title: 'body-m-medium',
146
+ subtitle: 'body-s-medium'
147
+ },
148
+ small: {
149
+ title: 'body-l-medium',
150
+ subtitle: 'body-m-medium'
151
151
  }
152
- if (this.mergedLoadingSkeleton) {
153
- avatarNode = resolveAvatar && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__avatar`, circle: true, height: "48px" }));
154
- headerNode = resolveHeader && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__title`, text: true, sharp: false, style: "border-radius: 4px;" }));
155
- descriptionNode = resolveDescription && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__subtitle`, text: true, sharp: false, width: "82%", style: "border-radius: 4px;" }));
156
- headerSideNode = resolveHeaderSide && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__title`, text: true, sharp: false, width: "60%", style: "border-radius: 4px;" }));
157
- descriptionSideNode = resolveDescriptionSide && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__subtitle`, text: true, sharp: false, style: "border-radius: 4px;" }));
158
- iconNode = resolveIcon && (h(UBaseSkeleton, { class: `${mergedClsPrefix}-list-item__icon`, circle: true, height: "24px" }));
152
+ };
153
+ const defaultHeaderProps = {
154
+ position: 'top',
155
+ variant: textVariant[size].title,
156
+ align: 'center',
157
+ skeleton: {
158
+ sharp: false,
159
+ height: '24px'
159
160
  }
160
- else {
161
- avatarNode = resolveAvatar && (h("div", { class: `${mergedClsPrefix}-list-item__avatar` }, resolveAvatar()));
162
- headerNode = resolveHeader && (h("div", { class: `${mergedClsPrefix}-list-item__title` }, resolveHeader()));
163
- descriptionNode = resolveDescription && (h("div", { class: `${mergedClsPrefix}-list-item__subtitle` }, resolveDescription()));
164
- headerSideNode = resolveHeaderSide && (h("div", { class: `${mergedClsPrefix}-list-item__title` }, resolveHeaderSide()));
165
- descriptionSideNode = resolveDescriptionSide && (h("div", { class: `${mergedClsPrefix}-list-item__subtitle` }, resolveDescriptionSide()));
166
- iconNode = this.mergedShowIcon ? (h("div", { class: `${mergedClsPrefix}-list-item__icon` }, resolveIcon ? (h("div", { class: `${mergedClsPrefix}-list-item__subtitle` }, resolveIcon())) : (h(UBaseIcon, { clsPrefix: mergedClsPrefix }, () => h(ChevronRightIcon, null))))) : null;
161
+ };
162
+ const defaultDescriptionProps = {
163
+ position: 'bottom',
164
+ variant: textVariant[size].subtitle,
165
+ skeleton: {
166
+ sharp: false,
167
+ height: '24px'
167
168
  }
168
- const leftNode = headerNode || descriptionNode ? (h("div", { class: `${mergedClsPrefix}-list-item__content ${mergedClsPrefix}-list-item__content--left` },
169
- headerNode,
170
- descriptionNode)) : null;
171
- const rightNode = headerSideNode || descriptionSideNode ? (h("div", { class: `${mergedClsPrefix}-list-item__content ${mergedClsPrefix}-list-item__content--right` },
172
- headerSideNode,
173
- descriptionSideNode)) : null;
174
- return h(mergedTag, Object.assign({ class: [
175
- ...sharedCls,
176
- `${mergedClsPrefix}-list-item--default`,
177
- this.mergedDescriptionFirst &&
178
- `${mergedClsPrefix}-list-item--description-first`,
179
- this.mergedColumnsEven &&
180
- `${mergedClsPrefix}-list-item--columns-even`,
181
- this.mergedLoadingSkeleton &&
182
- `${mergedClsPrefix}-list-item--loading-skeleton`
183
- ] }, sharedAttrs), [
184
- prefixNode,
185
- h("div", { class: `${mergedClsPrefix}-list-item__main` },
186
- avatarNode,
187
- h("div", { class: `${mergedClsPrefix}-list-item__text` },
188
- leftNode,
189
- rightNode),
190
- iconNode),
191
- suffixNode,
192
- showDivider && h("hr", { class: `${mergedClsPrefix}-list-item__divider` })
193
- ]);
169
+ };
170
+ const headerProps = Object.assign(Object.assign(Object.assign({}, defaultHeaderProps), this.header), { skeleton: Object.assign(Object.assign({}, defaultHeaderProps.skeleton), (_c = this.header) === null || _c === void 0 ? void 0 : _c.skeleton) });
171
+ const descriptionProps = Object.assign(Object.assign(Object.assign({}, defaultDescriptionProps), this.description), { skeleton: Object.assign(Object.assign({}, defaultDescriptionProps.skeleton), (_d = this.description) === null || _d === void 0 ? void 0 : _d.skeleton) });
172
+ function renderTextNode(content, props, classSuffix) {
173
+ return content ? (h(InternalUText, Object.assign({}, props, { text: undefined, align: undefined, skeleton: undefined, class: `${mergedClsPrefix}-list-item__${classSuffix}` }), skeletonOn || (props === null || props === void 0 ? void 0 : props.loading) ? (h(UBaseSkeleton, Object.assign({}, props.skeletonPro, { style: { borderRadius: '6px' } }))) : typeof content === 'string' ? (props.text) : (content()))) : null;
194
174
  }
175
+ const headerNode = renderTextNode(header, headerProps, 'title');
176
+ const descriptionNode = renderTextNode(description, descriptionProps, 'subtitle');
177
+ const headerSide = ((_e = this.headerSide) === null || _e === void 0 ? void 0 : _e.text) || resolveSlot('headerSide');
178
+ const descriptionSide = ((_f = this.descriptionSide) === null || _f === void 0 ? void 0 : _f.text) || resolveSlot('descriptionSide');
179
+ const hasRight = !!(headerSide || descriptionSide);
180
+ const headerSideProps = Object.assign(Object.assign({}, defaultHeaderProps), this.headerSide);
181
+ const descriptionSideProps = Object.assign(Object.assign({}, defaultDescriptionProps), this.descriptionSide);
182
+ const headerSideNode = renderTextNode(headerSide, headerSideProps, 'title');
183
+ const descriptionSideNode = renderTextNode(descriptionSide, descriptionSideProps, 'subtitle');
184
+ const leftNode = hasLeft ? (h("div", { class: [
185
+ `${mergedClsPrefix}-list-item__content`,
186
+ `${mergedClsPrefix}-list-item__content--left`,
187
+ headerProps.align && `${mergedClsPrefix}-align-${headerProps.align}`,
188
+ !(headerSide || descriptionSide) &&
189
+ `${mergedClsPrefix}-list-item__content--full`
190
+ ] }, (headerProps === null || headerProps === void 0 ? void 0 : headerProps.position) === 'top' && descriptionProps.position === 'bottom'
191
+ ? [headerNode, descriptionNode]
192
+ : [descriptionNode, headerNode])) : null;
193
+ const rightNode = hasRight ? (h("div", { class: [
194
+ `${mergedClsPrefix}-list-item__content`,
195
+ `${mergedClsPrefix}-list-item__content--right`,
196
+ headerSideProps.align &&
197
+ `${mergedClsPrefix}-align-${headerSideProps.align}`,
198
+ !(header || description) &&
199
+ `${mergedClsPrefix}-list-item__content--full`
200
+ ] }, (headerSideProps === null || headerSideProps === void 0 ? void 0 : headerSideProps.position) === 'top' && descriptionSideProps.position === 'bottom'
201
+ ? [headerSideNode, descriptionSideNode]
202
+ : [descriptionSideNode, headerSideNode])) : null;
203
+ const suffixIcon = !skeletonOn && this.mergedShowIcon ? (h(UBaseIcon, { clsPrefix: mergedClsPrefix }, () => h(ChevronRightIcon, null))) : null;
204
+ const suffixSkeletonSize = 24;
205
+ const suffixNode = (h("div", { class: `${mergedClsPrefix}-list-item__suffix ${mergedClsPrefix}-align-${suffixAlign}` }, (skeletonOn || this.loadingSuffix) && this.mergedShowIcon ? (h(UBaseSkeleton, { width: `${suffixSkeletonSize}px`, height: `${suffixSkeletonSize}px`, circle: true })) : ([$slots.suffix ? $slots.suffix() : suffixIcon])));
206
+ return h(mergedTag, Object.assign({ class: sharedCls }, sharedAttrs), [
207
+ prefixNode,
208
+ h("div", { class: `${mergedClsPrefix}-list-item__main` },
209
+ h("div", { class: `${mergedClsPrefix}-list-item__text` }, $slots.default ? $slots.default() : [leftNode, rightNode])),
210
+ suffixNode,
211
+ showDivider && h("hr", { class: `${mergedClsPrefix}-list-item__divider` })
212
+ ]);
195
213
  }
196
214
  });
@@ -1,6 +1,7 @@
1
1
  import { ExtractPublicPropTypes } from '../../_utils';
2
2
  import type { PropType, Ref } from 'vue';
3
3
  import { VNodeChild } from 'vue';
4
+ export type Size = 'small' | 'medium' | 'large';
4
5
  export interface BooleanProp {
5
6
  type: BooleanConstructor;
6
7
  default: undefined;
@@ -1,6 +1,10 @@
1
1
  import { ArrayMouseHandler, ArrayKeyboardHandler, ArrayEmptyHandler, ArrayFocusHandler, ExtractPublicPropTypes } from '../../_utils';
2
- import type { PropType, Ref } from 'vue';
3
- import { ListItemPropsBoolean, ListItemPropsRenderable, ExtractIntoInjection, ListInjectionBoolean, ListInjectionRenderable } from './interface';
2
+ import type { Component, PropType, Ref } from 'vue';
3
+ import { ListItemPropsBoolean, ListItemPropsRenderable, ExtractIntoInjection, ListInjectionBoolean, ListInjectionRenderable, Size } from './interface';
4
+ import { InternalTextProps } from '../../_internal/typography';
5
+ import { SkeletonProps } from '../../_internal/skeleton';
6
+ import { AvatarProps } from '../../avatar';
7
+ import { BadgeProps } from '../../badge';
4
8
  export declare const listItemPropsBoolean: Array<keyof ListItemPropsBoolean>;
5
9
  export declare const listItemPropsRenderable: Array<keyof ListItemPropsRenderable>;
6
10
  export declare const listItemBaseProps: {
@@ -39,11 +43,55 @@ export declare const listItemBaseProps: {
39
43
  icon: import("./interface").RenderableProp;
40
44
  avatar: import("./interface").RenderableProp;
41
45
  };
46
+ export type HeaderPropObject = InternalTextProps & Partial<{
47
+ loading: boolean;
48
+ position: 'top' | 'bottom';
49
+ skeleton: SkeletonProps;
50
+ align: 'stretch' | 'start' | 'center' | 'end';
51
+ }>;
52
+ export type DescriptionPropsObject = InternalTextProps & Partial<{
53
+ loading: boolean;
54
+ position: 'top' | 'bottom';
55
+ skeleton: SkeletonProps;
56
+ }>;
42
57
  export declare const listItemProps: {
58
+ avatar: {
59
+ type: PropType<AvatarProps & {
60
+ icon: Component;
61
+ hasBadge?: boolean;
62
+ }>;
63
+ default: () => {};
64
+ };
65
+ badge: {
66
+ type: PropType<BadgeProps>;
67
+ default: () => {};
68
+ };
43
69
  tag: {
44
70
  type: StringConstructor;
45
71
  default: undefined;
46
72
  };
73
+ prefixAlign: {
74
+ type: PropType<"start" | "center" | "end">;
75
+ default: string;
76
+ };
77
+ suffixAlign: {
78
+ type: PropType<"start" | "center" | "end">;
79
+ default: string;
80
+ };
81
+ loadingPrefix: BooleanConstructor;
82
+ loadingSuffix: BooleanConstructor;
83
+ header: {
84
+ type: PropType<HeaderPropObject>;
85
+ };
86
+ description: {
87
+ type: PropType<DescriptionPropsObject>;
88
+ };
89
+ headerSide: {
90
+ type: PropType<HeaderPropObject>;
91
+ };
92
+ descriptionSide: {
93
+ type: PropType<DescriptionPropsObject>;
94
+ };
47
95
  onClick: {
48
96
  type: PropType<ArrayMouseHandler | undefined>;
49
97
  default: undefined;
@@ -72,14 +120,13 @@ export declare const listItemProps: {
72
120
  disabled: import("./interface").BooleanProp;
73
121
  loading: import("./interface").BooleanProp;
74
122
  loadingSkeleton: import("./interface").BooleanProp;
75
- header: import("./interface").RenderableProp;
76
- description: import("./interface").RenderableProp;
77
- headerSide: import("./interface").RenderableProp;
78
- descriptionSide: import("./interface").RenderableProp;
79
123
  icon: import("./interface").RenderableProp;
80
- avatar: import("./interface").RenderableProp;
81
124
  };
82
125
  export declare const listProps: {
126
+ size: {
127
+ type: PropType<Size>;
128
+ default: string;
129
+ };
83
130
  showIcon: {
84
131
  type: BooleanConstructor;
85
132
  default: boolean;
@@ -129,18 +176,12 @@ export declare const listProps: {
129
176
  icon: import("./interface").RenderableProp;
130
177
  avatar: import("./interface").RenderableProp;
131
178
  theme: PropType<import("../../_mixins").Theme<"List", {
132
- padding: string;
133
179
  iconSize: string;
134
180
  iconSpace: string;
135
181
  suffixSpace: string;
136
182
  prefixSpace: string;
137
- titleSize: string;
138
- titleLineHeight: string;
139
- subtitleSize: string;
140
- subtitleLineHeight: string;
141
183
  subtitleColor: string;
142
184
  avatarSpace: string;
143
- minHeight: string;
144
185
  colorFocus: string;
145
186
  pressedScale: string;
146
187
  textColorDisabled: string;
@@ -154,22 +195,19 @@ export declare const listProps: {
154
195
  borderColor: string;
155
196
  borderColorModal: string;
156
197
  borderColorPopover: string;
157
- borderRadius: string;
158
- fontSize: string;
198
+ borderRadiusLarge: string;
199
+ borderRadiusMedium: string;
200
+ borderRadiusSmall: string;
201
+ padding: string;
202
+ suffixSize: string;
159
203
  }, any>>;
160
204
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"List", {
161
- padding: string;
162
205
  iconSize: string;
163
206
  iconSpace: string;
164
207
  suffixSpace: string;
165
208
  prefixSpace: string;
166
- titleSize: string;
167
- titleLineHeight: string;
168
- subtitleSize: string;
169
- subtitleLineHeight: string;
170
209
  subtitleColor: string;
171
210
  avatarSpace: string;
172
- minHeight: string;
173
211
  colorFocus: string;
174
212
  pressedScale: string;
175
213
  textColorDisabled: string;
@@ -183,22 +221,19 @@ export declare const listProps: {
183
221
  borderColor: string;
184
222
  borderColorModal: string;
185
223
  borderColorPopover: string;
186
- borderRadius: string;
187
- fontSize: string;
224
+ borderRadiusLarge: string;
225
+ borderRadiusMedium: string;
226
+ borderRadiusSmall: string;
227
+ padding: string;
228
+ suffixSize: string;
188
229
  }, any>>>;
189
230
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"List", {
190
- padding: string;
191
231
  iconSize: string;
192
232
  iconSpace: string;
193
233
  suffixSpace: string;
194
234
  prefixSpace: string;
195
- titleSize: string;
196
- titleLineHeight: string;
197
- subtitleSize: string;
198
- subtitleLineHeight: string;
199
235
  subtitleColor: string;
200
236
  avatarSpace: string;
201
- minHeight: string;
202
237
  colorFocus: string;
203
238
  pressedScale: string;
204
239
  textColorDisabled: string;
@@ -212,8 +247,11 @@ export declare const listProps: {
212
247
  borderColor: string;
213
248
  borderColorModal: string;
214
249
  borderColorPopover: string;
215
- borderRadius: string;
216
- fontSize: string;
250
+ borderRadiusLarge: string;
251
+ borderRadiusMedium: string;
252
+ borderRadiusSmall: string;
253
+ padding: string;
254
+ suffixSize: string;
217
255
  }, any>>>;
218
256
  };
219
257
  export type ListInjection = ExtractIntoInjection<typeof listItemBaseProps> & ListInjectionBoolean & ListInjectionRenderable & {
@@ -222,6 +260,7 @@ export type ListInjection = ExtractIntoInjection<typeof listItemBaseProps> & Lis
222
260
  bordered: Ref<boolean>;
223
261
  clickable: Ref<boolean>;
224
262
  showDivider: Ref<boolean>;
263
+ size: Ref<Size>;
225
264
  };
226
265
  export declare const listInjectionKey: import("vue").InjectionKey<ListInjection>;
227
266
  export type ListItemProps = ExtractPublicPropTypes<typeof listItemProps>;
@@ -7,8 +7,7 @@ export const listItemPropsBoolean = [
7
7
  'hoverable',
8
8
  'rounded',
9
9
  'disabled',
10
- 'loading',
11
- 'loadingSkeleton'
10
+ 'loading'
12
11
  ];
13
12
  export const listItemPropsRenderable = [
14
13
  'header',
@@ -42,11 +41,32 @@ export const listItemBaseProps = Object.assign(Object.assign(Object.assign({}, l
42
41
  type: [Function, Array, undefined],
43
42
  default: undefined
44
43
  } });
45
- export const listItemProps = Object.assign(Object.assign({}, listItemBaseProps), { tag: {
44
+ const headerProps = {
45
+ type: Object
46
+ };
47
+ const descriptionProps = {
48
+ type: Object
49
+ };
50
+ export const listItemProps = Object.assign(Object.assign({}, listItemBaseProps), { avatar: {
51
+ type: Object,
52
+ default: () => ({})
53
+ }, badge: {
54
+ type: Object,
55
+ default: () => ({})
56
+ }, tag: {
46
57
  type: String,
47
58
  default: undefined
48
- } });
49
- export const listProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), listItemBaseProps), { showIcon: {
59
+ }, prefixAlign: {
60
+ type: String,
61
+ default: 'start'
62
+ }, suffixAlign: {
63
+ type: String,
64
+ default: 'start'
65
+ }, loadingPrefix: Boolean, loadingSuffix: Boolean, header: headerProps, description: descriptionProps, headerSide: headerProps, descriptionSide: descriptionProps });
66
+ export const listProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), listItemBaseProps), { size: {
67
+ type: [String],
68
+ default: 'medium'
69
+ }, showIcon: {
50
70
  type: Boolean,
51
71
  default: true
52
72
  }, tag: {