@youcan/celeste 0.6.48 → 0.6.50
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/dist/celeste.css +333 -120
- package/dist/cjs/chunks/counter-input.vue_vue_type_style_index_0_lang.js +70 -0
- package/dist/cjs/chunks/index.js +684 -0
- package/dist/cjs/counter-input.js +3 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/modal-header.js +1 -1
- package/dist/cjs/popover-content.js +5 -8
- package/dist/cjs/radio-group-card.js +110 -0
- package/dist/cjs/radio-group-label.js +109 -0
- package/dist/components/counter-input/counter-input.d.ts +17 -0
- package/dist/components/counter-input/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/radio-group/index.d.ts +4 -0
- package/dist/components/radio-group/radio-group-card.d.ts +34 -0
- package/dist/components/radio-group/radio-group-label.d.ts +29 -0
- package/dist/es/button.js +1 -1
- package/dist/es/checkbox-card.js +1 -1
- package/dist/es/checkbox-label.js +1 -1
- package/dist/es/chunks/counter-input.vue_vue_type_style_index_0_lang.js +71 -0
- package/dist/es/chunks/index.js +754 -70
- package/dist/es/chunks/index3.js +1 -1
- package/dist/es/chunks/radio-group-item.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/chunks/switch.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/combobox-group.js +1 -1
- package/dist/es/combobox-input.js +1 -1
- package/dist/es/combobox-item.js +1 -1
- package/dist/es/combobox-list.js +1 -1
- package/dist/es/combobox-root.js +1 -1
- package/dist/es/combobox-separator.js +1 -1
- package/dist/es/combobox-trigger.js +1 -1
- package/dist/es/command-group.js +1 -1
- package/dist/es/command-input.js +1 -1
- package/dist/es/command-item.js +1 -1
- package/dist/es/command-list.js +1 -1
- package/dist/es/command-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/compact-button.js +1 -1
- package/dist/es/context-menu-item.js +1 -1
- package/dist/es/counter-input.js +4 -0
- package/dist/es/digit-input-group.js +1 -1
- package/dist/es/digit-input-slot.js +1 -1
- package/dist/es/digit-input.js +1 -1
- package/dist/es/dropdown-menu-content.js +1 -1
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-sub-content.js +1 -1
- package/dist/es/dropdown-menu-sub-trigger.js +1 -1
- package/dist/es/dropdown-menu-trigger.js +1 -1
- package/dist/es/dropdown-menu.js +1 -1
- package/dist/es/dropdown.js +1 -1
- package/dist/es/fancy-button.js +1 -1
- package/dist/es/index.js +48 -39
- package/dist/es/label.js +1 -1
- package/dist/es/link-button.js +1 -1
- package/dist/es/modal-content.js +1 -1
- package/dist/es/modal-header.js +2 -2
- package/dist/es/popover-content.js +7 -10
- package/dist/es/popover-trigger.js +1 -1
- package/dist/es/progress-bar.js +1 -1
- package/dist/es/progress-circle.js +1 -1
- package/dist/es/radio-group-card.js +111 -0
- package/dist/es/radio-group-label.js +110 -0
- package/dist/es/scroll-bar.js +1 -1
- package/dist/es/segmented-control-item.js +1 -1
- package/dist/es/segmented-control.js +1 -1
- package/dist/es/select-content.js +1 -1
- package/dist/es/select-item.js +1 -1
- package/dist/es/select-trigger.js +1 -1
- package/dist/es/select-value.js +1 -1
- package/dist/es/social-button.js +1 -1
- package/dist/es/tab-menu-content.js +1 -1
- package/dist/es/tab-menu-item.js +1 -1
- package/dist/es/tab-menu-list.js +1 -1
- package/dist/es/tab-menu.js +1 -1
- package/dist/es/tag.js +1 -1
- package/dist/es/text-input.js +1 -1
- package/dist/es/tooltip.js +1 -1
- package/package.json +3 -3
- package/src/components/counter-input/counter-input.vue +131 -0
- package/src/components/counter-input/index.ts +2 -0
- package/src/components/counter-input/stories/counter-input.stories.ts +149 -0
- package/src/components/digit-input/stories/digit-input.stories.ts +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/modal/modal-header.vue +1 -1
- package/src/components/popover/popover-content.vue +3 -7
- package/src/components/radio-group/index.ts +6 -0
- package/src/components/radio-group/radio-group-card.vue +221 -0
- package/src/components/radio-group/radio-group-label.vue +108 -0
- package/src/components/radio-group/stories/radio-group-card.stories.ts +297 -0
- package/src/components/radio-group/stories/radio-group.stories.ts +25 -15
- package/src/components/text-input/stories/text-input.stories.ts +1 -1
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// @unocss-include
|
|
2
|
+
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
4
|
+
import Badge from '@/components/badge/badge.vue';
|
|
5
|
+
import { ref } from 'vue';
|
|
6
|
+
import RadioGroupCard from '../radio-group-card.vue';
|
|
7
|
+
import RadioGroupItem from '../radio-group-item.vue';
|
|
8
|
+
import RadioGroup from '../radio-group.vue';
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof RadioGroupCard> = {
|
|
11
|
+
title: 'Components/Radio Group/RadioGroupCard',
|
|
12
|
+
component: RadioGroupCard,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof RadioGroupCard>;
|
|
18
|
+
|
|
19
|
+
export const Default: Story = {
|
|
20
|
+
args: {},
|
|
21
|
+
|
|
22
|
+
render: args => ({
|
|
23
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem },
|
|
24
|
+
setup() {
|
|
25
|
+
const selectedValue = ref();
|
|
26
|
+
return { args, selectedValue };
|
|
27
|
+
},
|
|
28
|
+
template: `
|
|
29
|
+
<div style="display: flex; justify-content: center;">
|
|
30
|
+
<div style="max-width: 400px;">
|
|
31
|
+
<RadioGroup v-model="selectedValue">
|
|
32
|
+
<RadioGroupCard v-bind="args">
|
|
33
|
+
<RadioGroupItem value="option1" />
|
|
34
|
+
|
|
35
|
+
<template #label>
|
|
36
|
+
Basic Label
|
|
37
|
+
</template>
|
|
38
|
+
</RadioGroupCard>
|
|
39
|
+
</RadioGroup>
|
|
40
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
41
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
`,
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const WithIcon: Story = {
|
|
50
|
+
args: {},
|
|
51
|
+
|
|
52
|
+
render: args => ({
|
|
53
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem },
|
|
54
|
+
setup() {
|
|
55
|
+
const selectedValue = ref();
|
|
56
|
+
return { args, selectedValue };
|
|
57
|
+
},
|
|
58
|
+
template: `
|
|
59
|
+
<div style="display: flex; justify-content: center;">
|
|
60
|
+
<div style="max-width: 400px;">
|
|
61
|
+
<RadioGroup v-model="selectedValue">
|
|
62
|
+
<RadioGroupCard v-bind="args">
|
|
63
|
+
<RadioGroupItem value="option1" />
|
|
64
|
+
|
|
65
|
+
<template #icon>
|
|
66
|
+
<i i-celeste-user-6-line />
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<template #label>
|
|
70
|
+
Settings
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template #sublabel>
|
|
74
|
+
(Configure options)
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<template #description>
|
|
78
|
+
Customize your application settings and preferences.
|
|
79
|
+
</template>
|
|
80
|
+
</RadioGroupCard>
|
|
81
|
+
</RadioGroup>
|
|
82
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
83
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`,
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const WithImage: Story = {
|
|
92
|
+
args: {},
|
|
93
|
+
|
|
94
|
+
render: args => ({
|
|
95
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem },
|
|
96
|
+
setup() {
|
|
97
|
+
const selectedValue = ref();
|
|
98
|
+
return { args, selectedValue };
|
|
99
|
+
},
|
|
100
|
+
template: `
|
|
101
|
+
<div style="display: flex; justify-content: center;">
|
|
102
|
+
<div style="max-width: 400px;">
|
|
103
|
+
<RadioGroup v-model="selectedValue">
|
|
104
|
+
<RadioGroupCard v-bind="args">
|
|
105
|
+
<RadioGroupItem value="option1" />
|
|
106
|
+
|
|
107
|
+
<template #image>
|
|
108
|
+
<img src="https://placehold.co/48" alt="Preview" />
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<template #label>
|
|
112
|
+
Image Option
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<template #description>
|
|
116
|
+
An option with an image preview.
|
|
117
|
+
</template>
|
|
118
|
+
</RadioGroupCard>
|
|
119
|
+
</RadioGroup>
|
|
120
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
121
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`,
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const WithBadge: Story = {
|
|
130
|
+
args: {},
|
|
131
|
+
|
|
132
|
+
render: args => ({
|
|
133
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem, Badge },
|
|
134
|
+
setup() {
|
|
135
|
+
const selectedValue = ref();
|
|
136
|
+
return { args, selectedValue };
|
|
137
|
+
},
|
|
138
|
+
template: `
|
|
139
|
+
<div style="display: flex; justify-content: center;">
|
|
140
|
+
<div style="max-width: 400px;">
|
|
141
|
+
<RadioGroup v-model="selectedValue">
|
|
142
|
+
<RadioGroupCard v-bind="args">
|
|
143
|
+
<RadioGroupItem value="option1" />
|
|
144
|
+
|
|
145
|
+
<template #label>
|
|
146
|
+
Label
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<template #sublabel>
|
|
150
|
+
(Sublabel)
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<template #badge>
|
|
154
|
+
<Badge
|
|
155
|
+
label="NEW"
|
|
156
|
+
state="information"
|
|
157
|
+
variant="light"
|
|
158
|
+
size="sm"
|
|
159
|
+
/>
|
|
160
|
+
</template>
|
|
161
|
+
|
|
162
|
+
<template #description>
|
|
163
|
+
Access premium features with advanced capabilities.
|
|
164
|
+
</template>
|
|
165
|
+
</RadioGroupCard>
|
|
166
|
+
</RadioGroup>
|
|
167
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
168
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
`,
|
|
173
|
+
}),
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const Disabled: Story = {
|
|
177
|
+
args: {
|
|
178
|
+
disabled: true,
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
render: args => ({
|
|
182
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem, Badge },
|
|
183
|
+
setup() {
|
|
184
|
+
const selectedValue = ref();
|
|
185
|
+
return { args, selectedValue };
|
|
186
|
+
},
|
|
187
|
+
template: `
|
|
188
|
+
<div style="display: flex; justify-content: center;">
|
|
189
|
+
<div style="max-width: 400px;">
|
|
190
|
+
<RadioGroup v-model="selectedValue">
|
|
191
|
+
<RadioGroupCard v-bind="args">
|
|
192
|
+
<RadioGroupItem value="option1" disabled />
|
|
193
|
+
|
|
194
|
+
<template #icon>
|
|
195
|
+
<i i-celeste-lock-line />
|
|
196
|
+
</template>
|
|
197
|
+
|
|
198
|
+
<template #label>
|
|
199
|
+
Disabled Option
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<template #description>
|
|
203
|
+
This option is currently disabled and cannot be selected.
|
|
204
|
+
</template>
|
|
205
|
+
</RadioGroupCard>
|
|
206
|
+
</RadioGroup>
|
|
207
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
208
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
`,
|
|
213
|
+
}),
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const Multiple: Story = {
|
|
217
|
+
args: {},
|
|
218
|
+
|
|
219
|
+
render: args => ({
|
|
220
|
+
components: { RadioGroup, RadioGroupCard, RadioGroupItem, Badge },
|
|
221
|
+
setup() {
|
|
222
|
+
const selectedValue = ref();
|
|
223
|
+
return { args, selectedValue };
|
|
224
|
+
},
|
|
225
|
+
template: `
|
|
226
|
+
<div style="display: flex; justify-content: center;">
|
|
227
|
+
<div style="max-width: 400px; display: flex; flex-direction: column; gap: 1rem;">
|
|
228
|
+
<RadioGroup v-model="selectedValue">
|
|
229
|
+
<RadioGroupCard v-bind="args">
|
|
230
|
+
<RadioGroupItem value="email" />
|
|
231
|
+
|
|
232
|
+
<template #icon>
|
|
233
|
+
<i i-celeste-mail-line />
|
|
234
|
+
</template>
|
|
235
|
+
|
|
236
|
+
<template #label>
|
|
237
|
+
Email Notifications
|
|
238
|
+
</template>
|
|
239
|
+
|
|
240
|
+
<template #description>
|
|
241
|
+
Receive updates via email.
|
|
242
|
+
</template>
|
|
243
|
+
</RadioGroupCard>
|
|
244
|
+
|
|
245
|
+
<RadioGroupCard v-bind="args">
|
|
246
|
+
<RadioGroupItem value="push" />
|
|
247
|
+
|
|
248
|
+
<template #icon>
|
|
249
|
+
<i i-celeste-notification-line />
|
|
250
|
+
</template>
|
|
251
|
+
|
|
252
|
+
<template #label>
|
|
253
|
+
Push Notifications
|
|
254
|
+
</template>
|
|
255
|
+
|
|
256
|
+
<template #badge>
|
|
257
|
+
<Badge
|
|
258
|
+
label="RECOMMENDED"
|
|
259
|
+
state="success"
|
|
260
|
+
variant="light"
|
|
261
|
+
size="sm"
|
|
262
|
+
/>
|
|
263
|
+
</template>
|
|
264
|
+
|
|
265
|
+
<template #description>
|
|
266
|
+
Get instant push notifications on your device.
|
|
267
|
+
</template>
|
|
268
|
+
</RadioGroupCard>
|
|
269
|
+
|
|
270
|
+
<RadioGroupCard v-bind="args">
|
|
271
|
+
<RadioGroupItem value="sms" />
|
|
272
|
+
|
|
273
|
+
<template #icon>
|
|
274
|
+
<i i-celeste-message-line />
|
|
275
|
+
</template>
|
|
276
|
+
|
|
277
|
+
<template #label>
|
|
278
|
+
SMS Notifications
|
|
279
|
+
</template>
|
|
280
|
+
|
|
281
|
+
<template #sublabel>
|
|
282
|
+
(Required)
|
|
283
|
+
</template>
|
|
284
|
+
|
|
285
|
+
<template #description>
|
|
286
|
+
Receive notifications via SMS text messages.
|
|
287
|
+
</template>
|
|
288
|
+
</RadioGroupCard>
|
|
289
|
+
</RadioGroup>
|
|
290
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
291
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
`,
|
|
296
|
+
}),
|
|
297
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { ref } from 'vue';
|
|
2
3
|
import RadioGroupItem from '../radio-group-item.vue';
|
|
4
|
+
import RadioGroupLabel from '../radio-group-label.vue';
|
|
3
5
|
import RadioGroup from '../radio-group.vue';
|
|
4
6
|
|
|
5
7
|
const meta: Meta<typeof RadioGroup> = {
|
|
@@ -24,25 +26,33 @@ export const Default: Story = {
|
|
|
24
26
|
},
|
|
25
27
|
|
|
26
28
|
render: args => ({
|
|
27
|
-
components: { RadioGroup, RadioGroupItem },
|
|
29
|
+
components: { RadioGroup, RadioGroupItem, RadioGroupLabel },
|
|
28
30
|
setup() {
|
|
29
|
-
|
|
31
|
+
const selectedValue = ref();
|
|
32
|
+
return { args, selectedValue };
|
|
30
33
|
},
|
|
31
34
|
template: `
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
<div>
|
|
36
|
+
<RadioGroup v-bind="args" v-model="selectedValue" style="display: flex; gap: 8px;">
|
|
37
|
+
<RadioGroupLabel>
|
|
38
|
+
<RadioGroupItem id="r1" value="option1" />
|
|
39
|
+
<template #label>Option 1</template>
|
|
40
|
+
</RadioGroupLabel>
|
|
41
|
+
|
|
42
|
+
<RadioGroupLabel>
|
|
43
|
+
<RadioGroupItem id="r2" value="option2" />
|
|
44
|
+
<template #label>Option 2</template>
|
|
45
|
+
</RadioGroupLabel>
|
|
46
|
+
|
|
47
|
+
<RadioGroupLabel>
|
|
48
|
+
<RadioGroupItem id="r3" value="option3" />
|
|
49
|
+
<template #label>Option 3</template>
|
|
50
|
+
</RadioGroupLabel>
|
|
51
|
+
</RadioGroup>
|
|
52
|
+
<div style="margin-top: 16px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-family: monospace;">
|
|
53
|
+
<strong>Selected:</strong> {{ selectedValue ? selectedValue : 'None' }}
|
|
44
54
|
</div>
|
|
45
|
-
</
|
|
55
|
+
</div>
|
|
46
56
|
`,
|
|
47
57
|
}),
|
|
48
58
|
};
|