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.
@@ -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="option" size="xs" block />
79
- <UInput label="Name" />
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="Lastname" />
135
+ <UInput label="First Name" />
136
+ <UInput label="Last Name" />
101
137
  `,
102
138
  };
103
-
104
- export const NestedRows = DefaultTemplate.bind({});
105
- NestedRows.args = {
106
- slotTemplate: `
107
- <UInput label="Name" />
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 TextBlocksExample = DefaultTemplate.bind({});
117
- TextBlocksExample.args = {
147
+ export const SlotDefault = DefaultTemplate.bind({});
148
+ SlotDefault.args = {
118
149
  slotTemplate: `
119
- <p>
120
- Lorem ipsum dolor sit amet, consectetur adipiscing elit,
121
- sed do eiusmod tempor incididunt ut labore et dolore magna
122
- aliqua. Ut enim ad minim veniam, quis nostrud exercitation
123
- ullamco laboris nisi ut aliquip ex ea commodo consequat.
124
- Duis aute irure dolor in reprehenderit in voluptate velit
125
- esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
126
- occaecat cupidatat non proident, sunt in culpa qui officia
127
- deserunt mollit anim id est laborum.
128
- </p>
129
-
130
- <p>
131
- Lorem ipsum dolor sit amet, consectetur adipiscing elit,
132
- sed do eiusmod tempor incididunt ut labore et dolore magna
133
- aliqua. Ut enim ad minim veniam, quis nostrud exercitation
134
- ullamco laboris nisi ut aliquip ex ea commodo consequat.
135
- Duis aute irure dolor in reprehenderit in voluptate velit
136
- esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
137
- occaecat cupidatat non proident, sunt in culpa qui officia
138
- deserunt mollit anim id est laborum.
139
- </p>
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
  };
@@ -30,7 +30,7 @@ export interface Props {
30
30
  | "baseline";
31
31
 
32
32
  /**
33
- * Items horizontally align (justify-content).
33
+ * Items horizontal align (justify-content).
34
34
  */
35
35
  justify?: "start" | "end" | "center" | "around" | "evenly" | "between";
36
36
 
@@ -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
- id: getRandomId(),
70
- isChecked: false,
71
- rowDate: new Date().toString(),
72
- key_1: "Info",
73
- key_2: "Statistics",
74
- key_3: "Reports",
75
- key_4: "Discounts",
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, row: getDateDividerRow };
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: Array(10)
335
- .fill({})
336
- .map(() => getDateDividerRow()),
351
+ rows: dateDividerCustomLabelRows,
337
352
  dateDivider: [
338
353
  {
339
- date: new Date().toString(),
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
  },