@youcan/celeste 0.6.68 → 0.6.69
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 +14 -14
- package/dist/cjs/digit-input-group.js +1 -1
- package/dist/cjs/digit-input-slot.js +1 -1
- package/dist/es/digit-input-group.js +1 -1
- package/dist/es/digit-input-slot.js +1 -1
- package/package.json +3 -3
- package/src/components/digit-input/digit-input-group.vue +1 -0
- package/src/components/digit-input/digit-input-slot.vue +2 -3
- package/src/components/digit-input/stories/digit-input.stories.ts +28 -0
package/dist/celeste.css
CHANGED
|
@@ -3201,21 +3201,21 @@ to {
|
|
|
3201
3201
|
.celeste-counter-input-wrapper:has(.celeste-counter-input:hover:not(:focus, :disabled)) {
|
|
3202
3202
|
--celeste-counter-input-border-color: transparent;
|
|
3203
3203
|
--celeste-counter-input-bg-color: var(--color-bg-weak-50);
|
|
3204
|
-
}.celeste-digit-input-group[data-v-
|
|
3204
|
+
}.celeste-digit-input-group[data-v-44b2fcc1] {
|
|
3205
3205
|
display: flex;
|
|
3206
3206
|
align-items: center;
|
|
3207
|
+
max-width: 100%;
|
|
3207
3208
|
gap: var(--spacing-10);
|
|
3208
|
-
}.celeste-digit-input-slot[data-v-
|
|
3209
|
+
}.celeste-digit-input-slot[data-v-5a1bb76d] {
|
|
3209
3210
|
--celeste-digit-input-border-color: var(--color-stroke-soft-200);
|
|
3210
3211
|
--celeste-digit-input-drop-shadow: var(--shadow-regular-xs);
|
|
3211
3212
|
--celeste-digit-input-placeholder-color: var(--color-text-soft-400);
|
|
3212
3213
|
display: flex;
|
|
3213
3214
|
box-sizing: border-box;
|
|
3214
|
-
flex
|
|
3215
|
-
flex-shrink: 1;
|
|
3215
|
+
flex: 1 1 0;
|
|
3216
3216
|
align-items: center;
|
|
3217
3217
|
justify-content: center;
|
|
3218
|
-
min-width:
|
|
3218
|
+
min-width: 32px;
|
|
3219
3219
|
max-width: 64px;
|
|
3220
3220
|
padding: 0;
|
|
3221
3221
|
transition: all var(--animation-fast) ease-out;
|
|
@@ -3230,21 +3230,21 @@ to {
|
|
|
3230
3230
|
text-align: center;
|
|
3231
3231
|
aspect-ratio: 1;
|
|
3232
3232
|
}
|
|
3233
|
-
.celeste-digit-input-slot[data-v-
|
|
3233
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]::-moz-placeholder {
|
|
3234
3234
|
-moz-transition: color var(--animation-fast) ease-out;
|
|
3235
3235
|
transition: color var(--animation-fast) ease-out;
|
|
3236
3236
|
color: var(--celeste-digit-input-placeholder-color);
|
|
3237
3237
|
}
|
|
3238
|
-
.celeste-digit-input-slot[data-v-
|
|
3238
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]::placeholder {
|
|
3239
3239
|
transition: color var(--animation-fast) ease-out;
|
|
3240
3240
|
color: var(--celeste-digit-input-placeholder-color);
|
|
3241
3241
|
}
|
|
3242
|
-
.celeste-digit-input-slot[data-v-
|
|
3242
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]:focus {
|
|
3243
3243
|
--celeste-digit-input-border-color: var(--color-stroke-strong-950);
|
|
3244
3244
|
--celeste-digit-input-placeholder-color: var(--color-text-sub-600);
|
|
3245
3245
|
outline-color: var(--color-stroke-soft-200);
|
|
3246
3246
|
}
|
|
3247
|
-
.celeste-digit-input-slot[data-v-
|
|
3247
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]:disabled {
|
|
3248
3248
|
--celeste-digit-input-border-color: transparent;
|
|
3249
3249
|
--celeste-digit-input-drop-shadow: none;
|
|
3250
3250
|
--celeste-digit-input-placeholder-color: var(--color-text-disabled-300);
|
|
@@ -3253,20 +3253,20 @@ to {
|
|
|
3253
3253
|
color: var(--color-text-disabled-300);
|
|
3254
3254
|
pointer-events: none;
|
|
3255
3255
|
}
|
|
3256
|
-
.celeste-digit-input-slot[data-v-
|
|
3256
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]:disabled::-moz-placeholder {
|
|
3257
3257
|
color: currentcolor;
|
|
3258
3258
|
}
|
|
3259
|
-
.celeste-digit-input-slot[data-v-
|
|
3259
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]:disabled::placeholder {
|
|
3260
3260
|
color: currentcolor;
|
|
3261
3261
|
}
|
|
3262
|
-
[data-error=true] .celeste-digit-input-slot[data-v-
|
|
3262
|
+
[data-error=true] .celeste-digit-input-slot[data-v-5a1bb76d] {
|
|
3263
3263
|
--celeste-digit-input-border-color: var(--color-state-error-base);
|
|
3264
3264
|
}
|
|
3265
|
-
[data-error=true] .celeste-digit-input-slot[data-v-
|
|
3265
|
+
[data-error=true] .celeste-digit-input-slot[data-v-5a1bb76d]:focus {
|
|
3266
3266
|
--celeste-digit-input-border-color: var(--color-state-error-base);
|
|
3267
3267
|
outline-color: var(--color-state-error-lighter);
|
|
3268
3268
|
}
|
|
3269
|
-
.celeste-digit-input-slot[data-v-
|
|
3269
|
+
.celeste-digit-input-slot[data-v-5a1bb76d]:hover:not(:focus, :disabled) {
|
|
3270
3270
|
--celeste-digit-input-border-color: transparent;
|
|
3271
3271
|
--celeste-digit-input-placeholder-color: var(--color-text-sub-600);
|
|
3272
3272
|
background-color: var(--color-bg-weak-50);
|
|
@@ -28,5 +28,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
const digitInputGroup = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
31
|
+
const digitInputGroup = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-44b2fcc1"]]);
|
|
32
32
|
module.exports = digitInputGroup;
|
|
@@ -25,5 +25,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const digitInputSlot = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
28
|
+
const digitInputSlot = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5a1bb76d"]]);
|
|
29
29
|
module.exports = digitInputSlot;
|
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
const digitInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
30
|
+
const digitInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44b2fcc1"]]);
|
|
31
31
|
export {
|
|
32
32
|
digitInputGroup as default
|
|
33
33
|
};
|
|
@@ -24,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
const digitInputSlot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
27
|
+
const digitInputSlot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5a1bb76d"]]);
|
|
28
28
|
export {
|
|
29
29
|
digitInputSlot as default
|
|
30
30
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/celeste",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.69",
|
|
5
5
|
"author": "YouCan <tech@youcan.shop>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"youcan",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"radix-vue": "^1.9.12",
|
|
45
45
|
"tinycolor2": "^1.6.0",
|
|
46
46
|
"vue-sonner": "^2.0.2",
|
|
47
|
-
"@youcan/celeste-icons": "0.6.
|
|
48
|
-
"@youcan/celeste-tokens": "0.6.
|
|
47
|
+
"@youcan/celeste-icons": "0.6.69",
|
|
48
|
+
"@youcan/celeste-tokens": "0.6.69"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@chromatic-com/storybook": "^4.1.1",
|
|
@@ -23,11 +23,10 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
23
23
|
|
|
24
24
|
display: flex;
|
|
25
25
|
box-sizing: border-box;
|
|
26
|
-
flex
|
|
27
|
-
flex-shrink: 1;
|
|
26
|
+
flex: 1 1 0;
|
|
28
27
|
align-items: center;
|
|
29
28
|
justify-content: center;
|
|
30
|
-
min-width:
|
|
29
|
+
min-width: 32px;
|
|
31
30
|
max-width: 64px;
|
|
32
31
|
padding: 0;
|
|
33
32
|
transition: all var(--animation-fast) ease-out;
|
|
@@ -218,3 +218,31 @@ export const ErrorState: Story = {
|
|
|
218
218
|
`,
|
|
219
219
|
}),
|
|
220
220
|
};
|
|
221
|
+
|
|
222
|
+
export const Responsive: Story = {
|
|
223
|
+
args: {
|
|
224
|
+
otp: true,
|
|
225
|
+
placeholder: '●',
|
|
226
|
+
type: 'number',
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
render: args => ({
|
|
230
|
+
components: { DigitInput, DigitInputSlot, DigitInputGroup },
|
|
231
|
+
setup() {
|
|
232
|
+
const value = ref(['', '', '', '', '', '']);
|
|
233
|
+
return { args, value };
|
|
234
|
+
},
|
|
235
|
+
template: `
|
|
236
|
+
<div style="max-width: 320px; border: 1px dashed #ccc; padding: 16px;">
|
|
237
|
+
<p style="margin-bottom: 12px; font-size: 12px; color: #666;">Container width: 320px (small mobile)</p>
|
|
238
|
+
<DigitInput v-bind="args" v-model="value">
|
|
239
|
+
<DigitInputGroup>
|
|
240
|
+
<DigitInputSlot v-for="(id, idx) in 3" :key="id" :index="idx" />
|
|
241
|
+
<i class="i-celeste-subtract-line" style="width: 16px; flex-shrink: 0;" />
|
|
242
|
+
<DigitInputSlot v-for="(id, idx) in 3" :key="id + 3" :index="idx + 3" />
|
|
243
|
+
</DigitInputGroup>
|
|
244
|
+
</DigitInput>
|
|
245
|
+
</div>
|
|
246
|
+
`,
|
|
247
|
+
}),
|
|
248
|
+
};
|