vueless 0.0.153 → 0.0.155
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.
- package/composable.adjustElementPosition/index.js +98 -0
- package/package.json +1 -1
- package/ui.button/Docs.mdx +1 -1
- package/ui.button-link/Docs.mdx +1 -1
- package/ui.button-toggle/Docs.mdx +1 -1
- package/ui.button-toggle-item/Docs.mdx +1 -1
- package/ui.container-accordion/Docs.mdx +1 -1
- package/ui.container-card/Docs.mdx +1 -1
- package/ui.container-divider/Docs.mdx +1 -1
- package/ui.container-group/Docs.mdx +1 -1
- package/ui.container-groups/Docs.mdx +1 -1
- package/ui.container-modal/Docs.mdx +1 -1
- package/ui.container-modal-confirm/Docs.mdx +1 -1
- package/ui.container-page/Docs.mdx +1 -1
- package/ui.container-row/Docs.mdx +1 -1
- package/ui.data-list/Docs.mdx +25 -1
- package/ui.data-list/composables/attrs.composable.js +7 -7
- package/ui.data-list/configs/default.config.js +5 -4
- package/ui.data-list/index.stories.js +38 -17
- package/ui.data-list/index.vue +27 -26
- package/ui.data-table/Docs.mdx +1 -1
- package/ui.dropdown-badge/Docs.mdx +1 -1
- package/ui.dropdown-button/Docs.mdx +1 -1
- package/ui.dropdown-item/Docs.mdx +1 -1
- package/ui.dropdown-link/Docs.mdx +1 -1
- package/ui.dropdown-list/Docs.mdx +1 -1
- package/ui.form-calendar/Docs.mdx +1 -1
- package/ui.form-checkbox/Docs.mdx +1 -1
- package/ui.form-checkbox-group/Docs.mdx +1 -1
- package/ui.form-checkbox-multi-state/Docs.mdx +1 -1
- package/ui.form-color-picker/Docs.mdx +1 -1
- package/ui.form-date-picker/Docs.mdx +1 -1
- package/ui.form-date-picker/composables/attrs.composable.js +10 -3
- package/ui.form-date-picker/configs/default.config.js +7 -3
- package/ui.form-date-picker/index.stories.js +21 -3
- package/ui.form-date-picker/index.vue +42 -7
- package/ui.form-date-picker-range/Docs.mdx +1 -1
- package/ui.form-date-picker-range/composables/attrs.composable.js +8 -2
- package/ui.form-date-picker-range/configs/default.config.js +7 -3
- package/ui.form-date-picker-range/index.stories.js +21 -3
- package/ui.form-date-picker-range/index.vue +43 -15
- package/ui.form-input/Docs.mdx +1 -1
- package/ui.form-input-file/Docs.mdx +1 -1
- package/ui.form-input-money/Docs.mdx +1 -1
- package/ui.form-input-number/Docs.mdx +1 -1
- package/ui.form-input-rating/Docs.mdx +1 -1
- package/ui.form-input-search/Docs.mdx +1 -1
- package/ui.form-label/Docs.mdx +1 -1
- package/ui.form-radio/Docs.mdx +1 -1
- package/ui.form-radio-card/Docs.mdx +1 -1
- package/ui.form-radio-group/Docs.mdx +1 -1
- package/ui.form-select/Docs.mdx +1 -1
- package/ui.form-switch/Docs.mdx +1 -1
- package/ui.form-textarea/Docs.mdx +1 -1
- package/ui.image-avatar/Docs.mdx +1 -1
- package/ui.image-icon/Docs.mdx +1 -1
- package/ui.image-logo/Docs.mdx +1 -1
- package/ui.loader/Docs.mdx +1 -1
- package/ui.loader-rendering/Docs.mdx +3 -0
- package/ui.loader-top/Docs.mdx +5 -5
- package/ui.navigation-pagination/Docs.mdx +1 -1
- package/ui.navigation-progress/Docs.mdx +1 -1
- package/ui.navigation-stepper/Docs.mdx +1 -1
- package/ui.navigation-tab/Docs.mdx +1 -1
- package/ui.navigation-tabs/Docs.mdx +1 -1
- package/ui.other-dot/Docs.mdx +1 -1
- package/ui.text-alert/Docs.mdx +1 -1
- package/ui.text-badge/Docs.mdx +1 -1
- package/ui.text-block/Docs.mdx +1 -1
- package/ui.text-empty/Docs.mdx +1 -1
- package/ui.text-file/Docs.mdx +1 -1
- package/ui.text-files/Docs.mdx +1 -1
- package/ui.text-header/Docs.mdx +1 -1
- package/ui.text-money/Docs.mdx +1 -1
- package/ui.text-notify/Docs.mdx +1 -1
- package/web-types.json +44 -22
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ref, computed, toValue } from "vue";
|
|
2
|
+
|
|
3
|
+
export const POSITION = {
|
|
4
|
+
left: "left",
|
|
5
|
+
right: "right",
|
|
6
|
+
top: "top",
|
|
7
|
+
bottom: "bottom",
|
|
8
|
+
auto: "auto",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function useAdjustElementPosition(
|
|
12
|
+
anchorElement,
|
|
13
|
+
targetElement,
|
|
14
|
+
position,
|
|
15
|
+
preferredPosition,
|
|
16
|
+
) {
|
|
17
|
+
const preferredOpenDirectionY = ref(preferredPosition?.y || POSITION.bottom);
|
|
18
|
+
const preferredOpenDirectionX = ref(preferredPosition?.x || POSITION.left);
|
|
19
|
+
|
|
20
|
+
const localAnchorElement = computed(() => toValue(anchorElement));
|
|
21
|
+
const localTargetElement = computed(() => toValue(targetElement));
|
|
22
|
+
const localPosition = computed(() => toValue(position));
|
|
23
|
+
const localPreferredPosition = computed(() => toValue(preferredPosition));
|
|
24
|
+
|
|
25
|
+
const isTop = computed(() => {
|
|
26
|
+
if (localPosition.value.y !== POSITION.auto) {
|
|
27
|
+
return localPosition.value.y === POSITION.top;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return preferredOpenDirectionY.value === POSITION.top;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const isLeft = computed(() => {
|
|
34
|
+
if (localPosition.value.x !== POSITION.auto) {
|
|
35
|
+
return localPosition.value.x === POSITION.left;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return preferredOpenDirectionX.value === POSITION.right;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const isBottom = computed(() => {
|
|
42
|
+
if (localPosition.value.y !== POSITION.auto) {
|
|
43
|
+
return localPosition.value.y === POSITION.bottom;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return preferredOpenDirectionY.value === POSITION.bottom;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const isRight = computed(() => {
|
|
50
|
+
if (localPosition.value.x !== POSITION.auto) {
|
|
51
|
+
return localPosition.value.y === POSITION.right;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return preferredOpenDirectionX.value === POSITION.right;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
function adjustPositionY() {
|
|
58
|
+
if (typeof window === "undefined") return;
|
|
59
|
+
|
|
60
|
+
const spaceAbove = localAnchorElement.value.getBoundingClientRect().top;
|
|
61
|
+
const spaceBelow = window.innerHeight - localAnchorElement.value.getBoundingClientRect().bottom;
|
|
62
|
+
const hasEnoughSpaceBelow =
|
|
63
|
+
spaceBelow > localTargetElement.value.getBoundingClientRect().height;
|
|
64
|
+
const hasEnoughSpaceAbove =
|
|
65
|
+
spaceAbove > localTargetElement.value.getBoundingClientRect().height;
|
|
66
|
+
|
|
67
|
+
if (localPreferredPosition.value.y === POSITION.top) {
|
|
68
|
+
preferredOpenDirectionY.value =
|
|
69
|
+
hasEnoughSpaceBelow || spaceBelow > spaceAbove ? POSITION.bottom : POSITION.top;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (localPreferredPosition.value.y === POSITION.bottom) {
|
|
73
|
+
preferredOpenDirectionY.value =
|
|
74
|
+
hasEnoughSpaceAbove || spaceAbove > spaceBelow ? POSITION.top : POSITION.bottom;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function adjustPositionX() {
|
|
79
|
+
if (typeof window === "undefined") return;
|
|
80
|
+
|
|
81
|
+
const spaceRight = localAnchorElement.value.getBoundingClientRect().right;
|
|
82
|
+
const spaceLeft = window.innerWidth - localAnchorElement.value.getBoundingClientRect().left;
|
|
83
|
+
const hasEnoughSpaceLeft = spaceLeft > localTargetElement.value.getBoundingClientRect().width;
|
|
84
|
+
const hasEnoughSpaceRight = spaceRight > localTargetElement.value.getBoundingClientRect().width;
|
|
85
|
+
|
|
86
|
+
if (localPreferredPosition.value.x === POSITION.left) {
|
|
87
|
+
preferredOpenDirectionX.value =
|
|
88
|
+
hasEnoughSpaceRight || spaceRight > spaceLeft ? POSITION.right : POSITION.left;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (localPreferredPosition.value.x === POSITION.right) {
|
|
92
|
+
preferredOpenDirectionX.value =
|
|
93
|
+
hasEnoughSpaceLeft || spaceLeft > spaceRight ? POSITION.left : POSITION.right;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return { isTop, isRight, isBottom, isLeft, adjustPositionY, adjustPositionX };
|
|
98
|
+
}
|
package/package.json
CHANGED
package/ui.button/Docs.mdx
CHANGED
package/ui.button-link/Docs.mdx
CHANGED
package/ui.data-list/Docs.mdx
CHANGED
|
@@ -12,5 +12,29 @@ import defaultConfig from "./configs/default.config?raw"
|
|
|
12
12
|
<Controls of={stories.Default} />
|
|
13
13
|
<Stories of={stories} />
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Configuring items in a list
|
|
16
|
+
You can configure any item in a list by passing the following params.
|
|
17
|
+
|
|
18
|
+
<Source code={`
|
|
19
|
+
<UDataList :list="list" />
|
|
20
|
+
|
|
21
|
+
const list = [
|
|
22
|
+
{
|
|
23
|
+
id: 1, // unique item identifier
|
|
24
|
+
label: "Rent", // item label
|
|
25
|
+
children: [ // nested items
|
|
26
|
+
{ label: "Office", id: 11 },
|
|
27
|
+
{ label: "Shops", id: 12, children: [...] }, // children of subitems
|
|
28
|
+
],
|
|
29
|
+
isHiddenEdit: true, // hide edit button
|
|
30
|
+
isHiddenDelete: true, // hide delete button
|
|
31
|
+
isHiddenActions: true, // hide default and custom action buttons
|
|
32
|
+
isHiddenCustomActions: true, // hide only custom action buttons
|
|
33
|
+
isDisabledNesting: true, // disable nesting for the item
|
|
34
|
+
}
|
|
35
|
+
{...}
|
|
36
|
+
];
|
|
37
|
+
`} language="jsx" dark />
|
|
38
|
+
|
|
39
|
+
## Default config
|
|
16
40
|
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -5,7 +5,7 @@ import { cx } from "../../service.ui";
|
|
|
5
5
|
|
|
6
6
|
export function useAttrs(props) {
|
|
7
7
|
const { config, getAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
8
|
-
const {
|
|
8
|
+
const { labelCrossed } = config.value;
|
|
9
9
|
|
|
10
10
|
const wrapperAttrs = getAttrs("wrapper");
|
|
11
11
|
const dividerAttrs = getAttrs("divider", { isComponent: true });
|
|
@@ -19,15 +19,16 @@ export function useAttrs(props) {
|
|
|
19
19
|
const dragIconAttrs = getAttrs("dragIcon", { isComponent: true });
|
|
20
20
|
const nestedAttrs = getAttrs("nested", { isComponent: true });
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const labelAttrsRaw = getAttrs("label");
|
|
23
23
|
|
|
24
|
-
const
|
|
25
|
-
...
|
|
26
|
-
class: cx([
|
|
24
|
+
const labelAttrs = computed(() => (isActive) => ({
|
|
25
|
+
...labelAttrsRaw,
|
|
26
|
+
class: cx([labelAttrsRaw.value.class, isActive !== undefined && !isActive ? labelCrossed : ""]),
|
|
27
27
|
}));
|
|
28
28
|
|
|
29
29
|
return {
|
|
30
30
|
config,
|
|
31
|
+
hasSlotContent,
|
|
31
32
|
wrapperAttrs,
|
|
32
33
|
dividerAttrs,
|
|
33
34
|
emptyAttrs,
|
|
@@ -35,9 +36,8 @@ export function useAttrs(props) {
|
|
|
35
36
|
nestedAttrs,
|
|
36
37
|
itemWrapperAttrs,
|
|
37
38
|
itemAttrs,
|
|
38
|
-
|
|
39
|
+
labelAttrs,
|
|
39
40
|
customActionsAttrs,
|
|
40
|
-
hasSlotContent,
|
|
41
41
|
deleteIconAttrs,
|
|
42
42
|
editIconAttrs,
|
|
43
43
|
dragIconAttrs,
|
|
@@ -12,8 +12,8 @@ export default /*tw*/ {
|
|
|
12
12
|
`,
|
|
13
13
|
dragIcon: "icon-drag cursor-move opacity-100 fill-gray-400 md:fill-gray-500",
|
|
14
14
|
dragIconName: "drag_indicator",
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
label: "text-base font-normal text-gray-900 flex-auto pt-px",
|
|
16
|
+
labelCrossed: "line-through",
|
|
17
17
|
customActions: `
|
|
18
18
|
space-x-5 opacity-50 md:flex md:items-center md:opacity-0
|
|
19
19
|
group-hover/item:md:block group-hover/item:opacity-100
|
|
@@ -24,13 +24,14 @@ export default /*tw*/ {
|
|
|
24
24
|
editIconName: "edit_note",
|
|
25
25
|
nested: "group/nested ml-6",
|
|
26
26
|
i18n: {
|
|
27
|
-
delete: "Delete",
|
|
28
27
|
edit: "Edit",
|
|
28
|
+
delete: "Delete",
|
|
29
|
+
emptyTitle: "",
|
|
30
|
+
emptyDescription: "There is no data in the list.",
|
|
29
31
|
},
|
|
30
32
|
defaultVariants: {
|
|
31
33
|
animationDuration: 200,
|
|
32
34
|
nesting: false,
|
|
33
35
|
upperlined: false,
|
|
34
|
-
hideEmptyStateForNesting: false,
|
|
35
36
|
},
|
|
36
37
|
};
|
|
@@ -2,6 +2,7 @@ import { getArgTypes, getSlotNames } from "../service.storybook";
|
|
|
2
2
|
|
|
3
3
|
import UDataList from "../ui.data-list";
|
|
4
4
|
import UIcon from "../ui.image-icon";
|
|
5
|
+
import URow from "../ui.container-row";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The `UDataList` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.data-list)
|
|
@@ -13,24 +14,24 @@ export default {
|
|
|
13
14
|
args: {
|
|
14
15
|
list: [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
label: "Salary",
|
|
17
18
|
id: 1,
|
|
18
19
|
children: [
|
|
19
|
-
{
|
|
20
|
-
{
|
|
21
|
-
{
|
|
20
|
+
{ label: "IT", id: 1.1 },
|
|
21
|
+
{ label: "HR", id: 1.2 },
|
|
22
|
+
{ label: "C Level", id: 1.3 },
|
|
22
23
|
],
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
|
|
26
|
+
label: "Rent",
|
|
26
27
|
id: 2,
|
|
27
28
|
children: [
|
|
28
|
-
{
|
|
29
|
-
{
|
|
29
|
+
{ label: "Office", id: 2.1 },
|
|
30
|
+
{ label: "Shops", id: 2.2 },
|
|
30
31
|
],
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
|
-
|
|
34
|
+
label: "Marketing",
|
|
34
35
|
id: 3,
|
|
35
36
|
},
|
|
36
37
|
],
|
|
@@ -48,7 +49,11 @@ const DefaultTemplate = (args) => ({
|
|
|
48
49
|
return { args, slots };
|
|
49
50
|
},
|
|
50
51
|
template: `
|
|
51
|
-
<UDataList v-bind="args" @dragSort="onDragSort"
|
|
52
|
+
<UDataList v-bind="args" @dragSort="onDragSort">
|
|
53
|
+
<template v-for="(slot, index) of slots" :key="index" v-slot:[slot]>
|
|
54
|
+
<template v-if="args[slot]">{{ args[slot] }}</template>
|
|
55
|
+
</template>
|
|
56
|
+
</UDataList>
|
|
52
57
|
`,
|
|
53
58
|
methods: {
|
|
54
59
|
onDragSort(value) {
|
|
@@ -58,7 +63,7 @@ const DefaultTemplate = (args) => ({
|
|
|
58
63
|
});
|
|
59
64
|
|
|
60
65
|
const SlotTemplate = (args) => ({
|
|
61
|
-
components: { UDataList, UIcon },
|
|
66
|
+
components: { UDataList, UIcon, URow },
|
|
62
67
|
setup() {
|
|
63
68
|
return { args };
|
|
64
69
|
},
|
|
@@ -77,17 +82,33 @@ const SlotTemplate = (args) => ({
|
|
|
77
82
|
export const Default = DefaultTemplate.bind({});
|
|
78
83
|
Default.args = {};
|
|
79
84
|
|
|
85
|
+
export const emptyState = DefaultTemplate.bind({});
|
|
86
|
+
emptyState.args = {
|
|
87
|
+
list: [],
|
|
88
|
+
emptyTitle: "The list is empty.",
|
|
89
|
+
emptyDescription: "There is no data in the list.",
|
|
90
|
+
};
|
|
91
|
+
|
|
80
92
|
export const nesting = DefaultTemplate.bind({});
|
|
81
93
|
nesting.args = { nesting: true };
|
|
82
94
|
|
|
83
|
-
export const
|
|
84
|
-
|
|
95
|
+
export const slotLabel = SlotTemplate.bind({});
|
|
96
|
+
slotLabel.args = {
|
|
97
|
+
slotTemplate: `
|
|
98
|
+
<template #label="{ item }">
|
|
99
|
+
<URow gap="xs" align="center">
|
|
100
|
+
{{ item.label }}
|
|
101
|
+
<UIcon name="check" color="green" size="sm" />
|
|
102
|
+
</URow>
|
|
103
|
+
</template>
|
|
104
|
+
`,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const slotActions = SlotTemplate.bind({});
|
|
108
|
+
slotActions.args = {
|
|
85
109
|
slotTemplate: `
|
|
86
|
-
<template #
|
|
87
|
-
<UIcon
|
|
88
|
-
name="star"
|
|
89
|
-
color="red"
|
|
90
|
-
/>
|
|
110
|
+
<template #actions>
|
|
111
|
+
<UIcon interactive name="star" color="red" />
|
|
91
112
|
</template>
|
|
92
113
|
`,
|
|
93
114
|
};
|
package/ui.data-list/index.vue
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<UEmpty
|
|
6
6
|
v-if="!hideEmptyStateForNesting && !list?.length"
|
|
7
|
-
:
|
|
8
|
-
:
|
|
7
|
+
:title="emptyTitle || currentLocale.emptyTitle"
|
|
8
|
+
:description="emptyDescription || currentLocale.emptyDescription"
|
|
9
9
|
v-bind="emptyAttrs"
|
|
10
10
|
/>
|
|
11
11
|
|
|
@@ -27,19 +27,20 @@
|
|
|
27
27
|
<div :data-cy="`${dataCy}-item-${element.id}`" v-bind="itemAttrs">
|
|
28
28
|
<UIcon internal :name="config.dragIconName" color="gray" v-bind="dragIconAttrs" />
|
|
29
29
|
|
|
30
|
-
<div v-bind="
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<div v-bind="labelAttrs(element.isActive)">
|
|
31
|
+
<!-- @slot Use it to modify label. -->
|
|
32
|
+
<slot name="label" :item="element">
|
|
33
|
+
{{ element.label }}
|
|
33
34
|
</slot>
|
|
34
35
|
</div>
|
|
35
36
|
|
|
36
|
-
<template v-if="!element.
|
|
37
|
+
<template v-if="!element.isHiddenActions">
|
|
37
38
|
<div
|
|
38
|
-
v-if="hasSlotContent($slots['
|
|
39
|
+
v-if="hasSlotContent($slots['actions']) && !element.isHiddenCustomActions"
|
|
39
40
|
v-bind="customActionsAttrs"
|
|
40
41
|
>
|
|
41
|
-
<!-- @slot Use it to add
|
|
42
|
-
<slot name="
|
|
42
|
+
<!-- @slot Use it to add custom actions. -->
|
|
43
|
+
<slot name="actions" :item="element" />
|
|
43
44
|
</div>
|
|
44
45
|
|
|
45
46
|
<UIcon
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
:data-cy="`${dataCy}-delete`"
|
|
52
53
|
:tooltip="currentLocale.delete"
|
|
53
54
|
v-bind="deleteIconAttrs"
|
|
54
|
-
@click="onClickDelete(element.id, element.
|
|
55
|
+
@click="onClickDelete(element.id, element.label)"
|
|
55
56
|
/>
|
|
56
57
|
|
|
57
58
|
<UIcon
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
:data-cy="`${dataCy}-edit`"
|
|
64
65
|
:tooltip="currentLocale.edit"
|
|
65
66
|
v-bind="editIconAttrs"
|
|
66
|
-
@click="onClickEdit(element.id)"
|
|
67
|
+
@click="onClickEdit(element.id, element.label)"
|
|
67
68
|
/>
|
|
68
69
|
</template>
|
|
69
70
|
</div>
|
|
@@ -82,13 +83,13 @@
|
|
|
82
83
|
>
|
|
83
84
|
<template #default="{ item }">
|
|
84
85
|
<slot :item="item">
|
|
85
|
-
<div v-bind="
|
|
86
|
+
<div v-bind="labelAttrs" v-text="item.label" />
|
|
86
87
|
</slot>
|
|
87
88
|
</template>
|
|
88
89
|
|
|
89
|
-
<template #
|
|
90
|
-
<!-- @slot Use it to add
|
|
91
|
-
<slot name="
|
|
90
|
+
<template #actions="{ item }">
|
|
91
|
+
<!-- @slot Use it to add custom actions. -->
|
|
92
|
+
<slot name="actions" :item="item" />
|
|
92
93
|
</template>
|
|
93
94
|
</UDataList>
|
|
94
95
|
</div>
|
|
@@ -132,14 +133,6 @@ const props = defineProps({
|
|
|
132
133
|
default: "",
|
|
133
134
|
},
|
|
134
135
|
|
|
135
|
-
/**
|
|
136
|
-
* Enables nesting.
|
|
137
|
-
*/
|
|
138
|
-
nesting: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: UIService.get(defaultConfig, UDataListName).default.nesting,
|
|
141
|
-
},
|
|
142
|
-
|
|
143
136
|
/**
|
|
144
137
|
* Empty state title.
|
|
145
138
|
*/
|
|
@@ -164,6 +157,14 @@ const props = defineProps({
|
|
|
164
157
|
default: UIService.get(defaultConfig, UDataListName).default.animationDuration,
|
|
165
158
|
},
|
|
166
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Enables nesting.
|
|
162
|
+
*/
|
|
163
|
+
nesting: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: UIService.get(defaultConfig, UDataListName).default.nesting,
|
|
166
|
+
},
|
|
167
|
+
|
|
167
168
|
/**
|
|
168
169
|
* Add line divider above the list.
|
|
169
170
|
*/
|
|
@@ -173,12 +174,12 @@ const props = defineProps({
|
|
|
173
174
|
},
|
|
174
175
|
|
|
175
176
|
/**
|
|
177
|
+
* Disable empty state for nested elements if empty (internal props).
|
|
176
178
|
* @ignore
|
|
177
|
-
* Disable empty state for nested elements if empty (internal prorps).
|
|
178
179
|
*/
|
|
179
180
|
hideEmptyStateForNesting: {
|
|
180
181
|
type: Boolean,
|
|
181
|
-
default:
|
|
182
|
+
default: false,
|
|
182
183
|
},
|
|
183
184
|
|
|
184
185
|
/**
|
|
@@ -209,7 +210,7 @@ const {
|
|
|
209
210
|
nestedAttrs,
|
|
210
211
|
itemWrapperAttrs,
|
|
211
212
|
itemAttrs,
|
|
212
|
-
|
|
213
|
+
labelAttrs,
|
|
213
214
|
customActionsAttrs,
|
|
214
215
|
deleteIconAttrs,
|
|
215
216
|
editIconAttrs,
|
package/ui.data-table/Docs.mdx
CHANGED
|
@@ -12,7 +12,7 @@ import defaultConfig from "./configs/default.config?raw"
|
|
|
12
12
|
<Controls of={stories.Default} />
|
|
13
13
|
<Stories of={stories} />
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Default config
|
|
16
16
|
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
17
17
|
|
|
18
18
|
## Formatting tokens
|
|
@@ -12,7 +12,7 @@ import defaultConfig from "./configs/default.config?raw"
|
|
|
12
12
|
<Controls of={stories.Default} />
|
|
13
13
|
<Stories of={stories} />
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Default config
|
|
16
16
|
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
17
17
|
|
|
18
18
|
## Formatting tokens
|