@youcan/celeste 0.6.37 → 0.6.39

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 (56) hide show
  1. package/dist/celeste.css +77 -7
  2. package/dist/cjs/chunks/index.js +203 -1
  3. package/dist/cjs/chunks/index2.js +35 -1448
  4. package/dist/cjs/chunks/index3.js +1336 -16336
  5. package/dist/cjs/chunks/index4.js +16457 -0
  6. package/dist/cjs/digit-input-group.js +31 -0
  7. package/dist/cjs/digit-input-slot.js +28 -0
  8. package/dist/cjs/digit-input.js +46 -0
  9. package/dist/cjs/index.js +9 -0
  10. package/dist/cjs/link-bubble.js +1 -1
  11. package/dist/cjs/rich-editor.js +1 -1
  12. package/dist/cjs/text-input-button.js +2 -2
  13. package/dist/components/digit-input/digit-input-group.d.ts +22 -0
  14. package/dist/components/digit-input/digit-input-slot.d.ts +7 -0
  15. package/dist/components/digit-input/digit-input.d.ts +32 -0
  16. package/dist/components/digit-input/index.d.ts +6 -0
  17. package/dist/components/index.d.ts +1 -0
  18. package/dist/es/chunks/index.js +241 -39
  19. package/dist/es/chunks/index2.js +36 -1448
  20. package/dist/es/chunks/index3.js +1335 -16336
  21. package/dist/es/chunks/index4.js +16458 -0
  22. package/dist/es/digit-input-group.js +32 -0
  23. package/dist/es/digit-input-slot.js +29 -0
  24. package/dist/es/digit-input.js +47 -0
  25. package/dist/es/dropdown-menu-content.js +1 -1
  26. package/dist/es/dropdown-menu-group.js +1 -1
  27. package/dist/es/dropdown-menu-item.js +1 -1
  28. package/dist/es/dropdown-menu-label.js +1 -1
  29. package/dist/es/dropdown-menu-separator.js +1 -1
  30. package/dist/es/dropdown-menu-sub-content.js +1 -1
  31. package/dist/es/dropdown-menu-sub-trigger.js +1 -1
  32. package/dist/es/dropdown-menu-trigger.js +1 -1
  33. package/dist/es/dropdown-menu.js +1 -1
  34. package/dist/es/index.js +9 -0
  35. package/dist/es/link-bubble.js +1 -1
  36. package/dist/es/modal-content.js +1 -1
  37. package/dist/es/modal-header.js +1 -1
  38. package/dist/es/popover-content.js +1 -1
  39. package/dist/es/popover-trigger.js +1 -1
  40. package/dist/es/progress-bar.js +1 -1
  41. package/dist/es/progress-circle.js +1 -1
  42. package/dist/es/rich-editor.js +1 -1
  43. package/dist/es/select-content.js +1 -1
  44. package/dist/es/select-item.js +1 -1
  45. package/dist/es/select-trigger.js +1 -1
  46. package/dist/es/select-value.js +1 -1
  47. package/dist/es/text-input-button.js +2 -2
  48. package/dist/es/tooltip.js +1 -1
  49. package/package.json +4 -3
  50. package/src/components/digit-input/digit-input-group.vue +24 -0
  51. package/src/components/digit-input/digit-input-slot.vue +86 -0
  52. package/src/components/digit-input/digit-input.vue +37 -0
  53. package/src/components/digit-input/index.ts +8 -0
  54. package/src/components/digit-input/stories/digit-input.stories.ts +220 -0
  55. package/src/components/index.ts +1 -0
  56. package/src/components/text-input/text-input-button.vue +1 -0
@@ -0,0 +1,220 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { ref } from 'vue';
3
+ import DigitInputGroup from '../digit-input-group.vue';
4
+ import DigitInputSlot from '../digit-input-slot.vue';
5
+ import DigitInput from '../digit-input.vue';
6
+
7
+ const meta: Meta<typeof DigitInput> = {
8
+ title: 'Components/DigitInput',
9
+ component: DigitInput,
10
+ argTypes: {
11
+ modelValue: {
12
+ control: { type: 'object' },
13
+ description: 'Array of string values for each input',
14
+ },
15
+ disabled: {
16
+ control: { type: 'boolean' },
17
+ description: 'Whether the input is disabled',
18
+ },
19
+ placeholder: {
20
+ control: { type: 'text' },
21
+ description: 'Placeholder character for empty slots',
22
+ defaultValue: '●',
23
+ },
24
+ mask: {
25
+ control: { type: 'boolean' },
26
+ description: 'Whether to mask the input (for passwords)',
27
+ },
28
+ otp: {
29
+ control: { type: 'boolean' },
30
+ description: 'Whether this is for OTP input',
31
+ },
32
+ type: {
33
+ control: { type: 'select' },
34
+ options: ['text', 'password', 'number'],
35
+ description: 'Input type',
36
+ },
37
+ hasError: {
38
+ control: { type: 'boolean' },
39
+ description: 'Whether the input has an error state',
40
+ },
41
+ },
42
+ };
43
+
44
+ export default meta;
45
+
46
+ type Story = StoryObj<typeof DigitInput>;
47
+
48
+ export const Default: Story = {
49
+ args: {
50
+ placeholder: '●',
51
+ },
52
+
53
+ render: args => ({
54
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
55
+ setup() {
56
+ const value = ref(['', '', '', '']);
57
+ return { args, value };
58
+ },
59
+ template: `
60
+ <DigitInput v-bind="args" v-model="value">
61
+ <DigitInputGroup>
62
+ <DigitInputSlot v-for="(item, index) in 4" :key="index" :index="index" />
63
+ </DigitInputGroup>
64
+ </DigitInput>
65
+ `,
66
+ }),
67
+ };
68
+
69
+ export const WithPlaceholder: Story = {
70
+ args: {
71
+ placeholder: '●',
72
+ },
73
+
74
+ render: args => ({
75
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
76
+ setup() {
77
+ const value = ref(['', '', '', '', '', '']);
78
+ return { args, value };
79
+ },
80
+ template: `
81
+ <DigitInput v-bind="args" v-model="value">
82
+ <DigitInputGroup>
83
+ <DigitInputSlot v-for="(item, index) in 6" :key="index" :index="index" />
84
+ </DigitInputGroup>
85
+ </DigitInput>
86
+ `,
87
+ }),
88
+ };
89
+
90
+ export const OTPInput: Story = {
91
+ args: {
92
+ otp: true,
93
+ placeholder: '●',
94
+ type: 'number',
95
+ },
96
+
97
+ render: args => ({
98
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
99
+ setup() {
100
+ const value = ref(['', '', '', '', '', '']);
101
+ return { args, value };
102
+ },
103
+ template: `
104
+ <DigitInput v-bind="args" v-model="value">
105
+ <DigitInputGroup>
106
+ <DigitInputSlot v-for="(item, index) in 6" :key="index" :index="index" />
107
+ </DigitInputGroup>
108
+ </DigitInput>
109
+ `,
110
+ }),
111
+ };
112
+
113
+ export const PasswordInput: Story = {
114
+ args: {
115
+ mask: true,
116
+ type: 'number',
117
+ placeholder: '●',
118
+ },
119
+
120
+ render: args => ({
121
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
122
+ setup() {
123
+ const value = ref(['', '', '', '']);
124
+ return { args, value };
125
+ },
126
+ template: `
127
+ <DigitInput v-bind="args" v-model="value">
128
+ <DigitInputGroup>
129
+ <DigitInputSlot v-for="(item, index) in 4" :key="index" :index="index" />
130
+ </DigitInputGroup>
131
+ </DigitInput>
132
+ `,
133
+ }),
134
+ };
135
+
136
+ export const Disabled: Story = {
137
+ args: {
138
+ disabled: true,
139
+ placeholder: '●',
140
+ },
141
+
142
+ render: args => ({
143
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
144
+ setup() {
145
+ const value = ref(['1', '2', '3', '']);
146
+ return { args, value };
147
+ },
148
+ template: `
149
+ <DigitInput v-bind="args" v-model="value">
150
+ <DigitInputGroup>
151
+ <DigitInputSlot v-for="(item, index) in 4" :key="index" :index="index" />
152
+ </DigitInputGroup>
153
+ </DigitInput>
154
+ `,
155
+ }),
156
+ };
157
+
158
+ export const LongerInput: Story = {
159
+ args: {
160
+ placeholder: '●',
161
+ },
162
+
163
+ render: args => ({
164
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
165
+ setup() {
166
+ const value = ref(['', '', '', '', '', '', '', '']);
167
+ return { args, value };
168
+ },
169
+ template: `
170
+ <DigitInput v-bind="args" v-model="value">
171
+ <DigitInputGroup>
172
+ <DigitInputSlot v-for="(item, index) in 8" :key="index" :index="index" />
173
+ </DigitInputGroup>
174
+ </DigitInput>
175
+ `,
176
+ }),
177
+ };
178
+
179
+ export const PrefilledValue: Story = {
180
+ args: {
181
+ placeholder: '●',
182
+ },
183
+
184
+ render: args => ({
185
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
186
+ setup() {
187
+ const value = ref(['1', '2', '3', '4']);
188
+ return { args, value };
189
+ },
190
+ template: `
191
+ <DigitInput v-bind="args" v-model="value">
192
+ <DigitInputGroup>
193
+ <DigitInputSlot v-for="(item, index) in 4" :key="index" :index="index" />
194
+ </DigitInputGroup>
195
+ </DigitInput>
196
+ `,
197
+ }),
198
+ };
199
+
200
+ export const ErrorState: Story = {
201
+ args: {
202
+ placeholder: '●',
203
+ hasError: true,
204
+ },
205
+
206
+ render: args => ({
207
+ components: { DigitInput, DigitInputSlot, DigitInputGroup },
208
+ setup() {
209
+ const value = ref(['1', '2', '', '']);
210
+ return { args, value };
211
+ },
212
+ template: `
213
+ <DigitInput v-bind="args" v-model="value">
214
+ <DigitInputGroup>
215
+ <DigitInputSlot v-for="(item, index) in 4" :key="index" :index="index" />
216
+ </DigitInputGroup>
217
+ </DigitInput>
218
+ `,
219
+ }),
220
+ };
@@ -4,6 +4,7 @@ export * from './button';
4
4
  export * from './checkbox';
5
5
  export * from './combobox';
6
6
  export * from './content-divider';
7
+ export * from './digit-input';
7
8
  export * from './dropdown';
8
9
  export * from './dropdown-menu';
9
10
  export * from './hint-text';
@@ -14,6 +14,7 @@ const delegatedProps = useDelegatedProps(props, 'class');
14
14
 
15
15
  <template>
16
16
  <Button
17
+ tabindex="-1"
17
18
  v-bind="delegatedProps"
18
19
  size="sm"
19
20
  intent="neutral"