vueless 0.0.800 → 0.0.802
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/package.json +1 -1
- package/ui.container-accordion/storybook/stories.ts +66 -23
- package/ui.container-card/UCard.vue +16 -10
- package/ui.container-card/config.ts +3 -1
- package/ui.container-card/storybook/stories.ts +67 -64
- package/ui.container-col/storybook/stories.ts +91 -14
- package/ui.container-divider/storybook/stories.ts +32 -9
- package/ui.container-divider/types.ts +1 -1
- package/ui.container-group/UGroup.vue +2 -2
- package/ui.container-group/storybook/stories.ts +58 -47
- package/ui.container-groups/storybook/stories.ts +39 -6
- package/ui.container-modal/UModal.vue +9 -16
- package/ui.container-modal/config.ts +0 -1
- package/ui.container-modal/storybook/stories.ts +164 -79
- package/ui.container-modal/types.ts +1 -1
- package/ui.container-modal-confirm/UModalConfirm.vue +8 -12
- package/ui.container-modal-confirm/storybook/stories.ts +165 -60
- package/ui.container-modal-confirm/types.ts +1 -1
- package/ui.container-page/UPage.vue +10 -23
- package/ui.container-page/storybook/stories.ts +106 -66
- package/ui.container-row/storybook/stories.ts +74 -41
- package/ui.container-row/types.ts +1 -1
- package/ui.data-table/config.ts +1 -1
- package/ui.data-table/storybook/stories.ts +30 -15
|
@@ -15,7 +15,7 @@ import type { Props } from "../types.ts";
|
|
|
15
15
|
|
|
16
16
|
interface URowArgs extends Props {
|
|
17
17
|
slotTemplate?: string;
|
|
18
|
-
enum: "gap" | "align";
|
|
18
|
+
enum: "gap" | "align" | "justify" | "content";
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export default {
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
} as Meta;
|
|
34
34
|
|
|
35
35
|
const defaultTemplate = `
|
|
36
|
-
<UInput label="Name" />
|
|
36
|
+
<UInput label="Name" placeholder="Please enter your name..." />
|
|
37
37
|
<UButton label="Submit" size="xs" block />
|
|
38
38
|
`;
|
|
39
39
|
|
|
@@ -69,14 +69,16 @@ const EnumVariantTemplate: StoryFn<URowArgs> = (args: URowArgs, { argTypes }) =>
|
|
|
69
69
|
v-bind="args"
|
|
70
70
|
:[args.enum]="option"
|
|
71
71
|
:key="index"
|
|
72
|
+
class="border border-brand-500 rounded p-2"
|
|
73
|
+
:class="{ 'h-24': args.enum === 'align' }"
|
|
72
74
|
>
|
|
73
75
|
<template v-if="isGapEnum">
|
|
74
76
|
<UInput :label="option" />
|
|
75
77
|
<UInput :label="option" />
|
|
76
78
|
</template>
|
|
77
79
|
<template v-else>
|
|
78
|
-
<UButton :label="
|
|
79
|
-
<
|
|
80
|
+
<UButton :label="args.enum" />
|
|
81
|
+
<UButton :label="option" />
|
|
80
82
|
</template>
|
|
81
83
|
</URow>
|
|
82
84
|
</UCol>
|
|
@@ -86,56 +88,87 @@ const EnumVariantTemplate: StoryFn<URowArgs> = (args: URowArgs, { argTypes }) =>
|
|
|
86
88
|
export const Default = DefaultTemplate.bind({});
|
|
87
89
|
Default.args = {};
|
|
88
90
|
|
|
91
|
+
export const Reverse = DefaultTemplate.bind({});
|
|
92
|
+
Reverse.args = { reverse: true };
|
|
93
|
+
Reverse.parameters = {
|
|
94
|
+
docs: {
|
|
95
|
+
description: {
|
|
96
|
+
story: "Reverse nested items order.",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
89
101
|
export const Gap = EnumVariantTemplate.bind({});
|
|
90
|
-
Gap.args = { enum: "gap" };
|
|
102
|
+
Gap.args = { enum: "gap", config: { wrapper: "border-none" } };
|
|
103
|
+
Gap.parameters = {
|
|
104
|
+
docs: {
|
|
105
|
+
description: {
|
|
106
|
+
story: "The distance between nested elements.",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
91
110
|
|
|
92
111
|
export const Align = EnumVariantTemplate.bind({});
|
|
93
112
|
Align.args = { enum: "align" };
|
|
113
|
+
Align.parameters = {
|
|
114
|
+
docs: {
|
|
115
|
+
description: {
|
|
116
|
+
story: "Items vertical align (align-items).",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const Justify = EnumVariantTemplate.bind({});
|
|
122
|
+
Justify.args = { enum: "justify" };
|
|
123
|
+
Justify.parameters = {
|
|
124
|
+
docs: {
|
|
125
|
+
description: {
|
|
126
|
+
story: "Items horizontal align (justify-content).",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
};
|
|
94
130
|
|
|
95
131
|
export const NoMobile = DefaultTemplate.bind({});
|
|
96
132
|
NoMobile.args = {
|
|
97
133
|
noMobile: true,
|
|
98
134
|
slotTemplate: `
|
|
99
|
-
<UInput label="Name" />
|
|
100
|
-
<UInput label="
|
|
135
|
+
<UInput label="First Name" />
|
|
136
|
+
<UInput label="Last Name" />
|
|
101
137
|
`,
|
|
102
138
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<URow>
|
|
110
|
-
<UInput label="Lastname" />
|
|
111
|
-
<UInput label="Age"/>
|
|
112
|
-
</URow>
|
|
113
|
-
`,
|
|
139
|
+
NoMobile.parameters = {
|
|
140
|
+
docs: {
|
|
141
|
+
description: {
|
|
142
|
+
story: "Disables mobile adaptivity.",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
114
145
|
};
|
|
115
146
|
|
|
116
|
-
export const
|
|
117
|
-
|
|
147
|
+
export const SlotDefault = DefaultTemplate.bind({});
|
|
148
|
+
SlotDefault.args = {
|
|
118
149
|
slotTemplate: `
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
150
|
+
<template #default>
|
|
151
|
+
<p>
|
|
152
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
153
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
154
|
+
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
|
|
155
|
+
ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
156
|
+
Duis aute irure dolor in reprehenderit in voluptate velit
|
|
157
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
|
|
158
|
+
occaecat cupidatat non proident, sunt in culpa qui officia
|
|
159
|
+
deserunt mollit anim id est laborum.
|
|
160
|
+
</p>
|
|
161
|
+
|
|
162
|
+
<p>
|
|
163
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
164
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
165
|
+
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
|
|
166
|
+
ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
167
|
+
Duis aute irure dolor in reprehenderit in voluptate velit
|
|
168
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
|
|
169
|
+
occaecat cupidatat non proident, sunt in culpa qui officia
|
|
170
|
+
deserunt mollit anim id est laborum.
|
|
171
|
+
</p>
|
|
172
|
+
</template>
|
|
140
173
|
`,
|
|
141
174
|
};
|
package/ui.data-table/config.ts
CHANGED
|
@@ -49,7 +49,7 @@ export default /*tw*/ {
|
|
|
49
49
|
bodyRowBeforeChecked: "{>bodyRowChecked} !p-0",
|
|
50
50
|
bodyRowBeforeCell: "{>bodyCellBase} py-1",
|
|
51
51
|
bodyRowAfter: "!p-0",
|
|
52
|
-
bodyRowDateDivider: "",
|
|
52
|
+
bodyRowDateDivider: "first:hidden",
|
|
53
53
|
bodyRowCheckedDateDivider: "{>bodyRowChecked} {>bodyRowChecked}",
|
|
54
54
|
bodyCellBase: {
|
|
55
55
|
base: "p-4 truncate align-top",
|
|
@@ -64,16 +64,30 @@ export default {
|
|
|
64
64
|
},
|
|
65
65
|
} as Meta;
|
|
66
66
|
|
|
67
|
-
function getDateDividerRow() {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
function getDateDividerRow(rowAmount: number) {
|
|
68
|
+
return Array(rowAmount)
|
|
69
|
+
.fill({})
|
|
70
|
+
.map((_, index) => {
|
|
71
|
+
let rowDate = new Date().toString();
|
|
72
|
+
|
|
73
|
+
if (index > Math.round(rowAmount / 2)) {
|
|
74
|
+
const date = new Date();
|
|
75
|
+
|
|
76
|
+
date.setFullYear(date.getFullYear() + 1);
|
|
77
|
+
|
|
78
|
+
rowDate = date.toDateString();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
id: getRandomId(),
|
|
83
|
+
isChecked: false,
|
|
84
|
+
rowDate,
|
|
85
|
+
key_1: "Info",
|
|
86
|
+
key_2: "Statistics",
|
|
87
|
+
key_3: "Reports",
|
|
88
|
+
key_4: "Discounts",
|
|
89
|
+
};
|
|
90
|
+
});
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
function getNestedRow() {
|
|
@@ -327,16 +341,17 @@ export const Compact = DefaultTemplate.bind({});
|
|
|
327
341
|
Compact.args = { compact: true };
|
|
328
342
|
|
|
329
343
|
export const DateDivider = DefaultTemplate.bind({});
|
|
330
|
-
DateDivider.args = { dateDivider: true,
|
|
344
|
+
DateDivider.args = { dateDivider: true, rows: getDateDividerRow(10) };
|
|
331
345
|
|
|
332
346
|
export const DateDividerCustomLabel = DefaultTemplate.bind({});
|
|
347
|
+
|
|
348
|
+
const dateDividerCustomLabelRows = getDateDividerRow(10);
|
|
349
|
+
|
|
333
350
|
DateDividerCustomLabel.args = {
|
|
334
|
-
rows:
|
|
335
|
-
.fill({})
|
|
336
|
-
.map(() => getDateDividerRow()),
|
|
351
|
+
rows: dateDividerCustomLabelRows,
|
|
337
352
|
dateDivider: [
|
|
338
353
|
{
|
|
339
|
-
date:
|
|
354
|
+
date: dateDividerCustomLabelRows.at(6)!.rowDate,
|
|
340
355
|
label: "Custom label for specific date",
|
|
341
356
|
config: { label: "!text-orange-400", divider: "!border-orange-300" },
|
|
342
357
|
},
|