@youcan/celeste 0.6.38 → 0.6.40

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 (53) hide show
  1. package/dist/celeste.css +71 -0
  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/components/digit-input/digit-input-group.d.ts +22 -0
  13. package/dist/components/digit-input/digit-input-slot.d.ts +7 -0
  14. package/dist/components/digit-input/digit-input.d.ts +32 -0
  15. package/dist/components/digit-input/index.d.ts +6 -0
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/es/chunks/index.js +241 -39
  18. package/dist/es/chunks/index2.js +36 -1448
  19. package/dist/es/chunks/index3.js +1335 -16336
  20. package/dist/es/chunks/index4.js +16458 -0
  21. package/dist/es/digit-input-group.js +32 -0
  22. package/dist/es/digit-input-slot.js +29 -0
  23. package/dist/es/digit-input.js +47 -0
  24. package/dist/es/dropdown-menu-content.js +1 -1
  25. package/dist/es/dropdown-menu-group.js +1 -1
  26. package/dist/es/dropdown-menu-item.js +1 -1
  27. package/dist/es/dropdown-menu-label.js +1 -1
  28. package/dist/es/dropdown-menu-separator.js +1 -1
  29. package/dist/es/dropdown-menu-sub-content.js +1 -1
  30. package/dist/es/dropdown-menu-sub-trigger.js +1 -1
  31. package/dist/es/dropdown-menu-trigger.js +1 -1
  32. package/dist/es/dropdown-menu.js +1 -1
  33. package/dist/es/index.js +9 -0
  34. package/dist/es/link-bubble.js +1 -1
  35. package/dist/es/modal-content.js +1 -1
  36. package/dist/es/modal-header.js +1 -1
  37. package/dist/es/popover-content.js +1 -1
  38. package/dist/es/popover-trigger.js +1 -1
  39. package/dist/es/progress-bar.js +1 -1
  40. package/dist/es/progress-circle.js +1 -1
  41. package/dist/es/rich-editor.js +1 -1
  42. package/dist/es/select-content.js +1 -1
  43. package/dist/es/select-item.js +1 -1
  44. package/dist/es/select-trigger.js +1 -1
  45. package/dist/es/select-value.js +1 -1
  46. package/dist/es/tooltip.js +1 -1
  47. package/package.json +4 -3
  48. package/src/components/digit-input/digit-input-group.vue +24 -0
  49. package/src/components/digit-input/digit-input-slot.vue +87 -0
  50. package/src/components/digit-input/digit-input.vue +37 -0
  51. package/src/components/digit-input/index.ts +8 -0
  52. package/src/components/digit-input/stories/digit-input.stories.ts +220 -0
  53. package/src/components/index.ts +1 -0
@@ -0,0 +1,32 @@
1
+ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
+ import { c as clsx } from "./chunks/clsx.js";
3
+ import { A as At, f as O } from "./chunks/index.js";
4
+ import { r as reactiveOmit } from "./chunks/index2.js";
5
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "digit-input-group",
8
+ props: {
9
+ asChild: { type: Boolean },
10
+ as: {},
11
+ class: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const delegatedProps = reactiveOmit(props, "class");
16
+ const forwardedProps = At(delegatedProps);
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createBlock(unref(O), mergeProps(unref(forwardedProps), {
19
+ class: unref(clsx)("celeste-digit-input-group", props.class)
20
+ }), {
21
+ default: withCtx(() => [
22
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
23
+ ]),
24
+ _: 3
25
+ }, 16, ["class"]);
26
+ };
27
+ }
28
+ });
29
+ const digitInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1a28428d"]]);
30
+ export {
31
+ digitInputGroup as default
32
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent, openBlock, createBlock, unref, mergeProps } from "vue";
2
+ import { c as clsx } from "./chunks/clsx.js";
3
+ import { A as At, a0 as $y } from "./chunks/index.js";
4
+ import { r as reactiveOmit } from "./chunks/index2.js";
5
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "digit-input-slot",
8
+ props: {
9
+ index: {},
10
+ disabled: { type: Boolean },
11
+ asChild: { type: Boolean },
12
+ as: {},
13
+ class: {}
14
+ },
15
+ setup(__props) {
16
+ const props = __props;
17
+ const delegatedProps = reactiveOmit(props, "class");
18
+ const forwardedProps = At(delegatedProps);
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createBlock(unref($y), mergeProps(unref(forwardedProps), {
21
+ class: unref(clsx)("celeste-digit-input-slot", props.class)
22
+ }), null, 16, ["class"]);
23
+ };
24
+ }
25
+ });
26
+ const digitInputSlot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-86327944"]]);
27
+ export {
28
+ digitInputSlot as default
29
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
+ import { c as clsx } from "./chunks/clsx.js";
3
+ import { x as xe, a1 as Dy } from "./chunks/index.js";
4
+ import { r as reactiveOmit } from "./chunks/index2.js";
5
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "digit-input",
8
+ props: {
9
+ modelValue: { default: () => [] },
10
+ defaultValue: {},
11
+ placeholder: {},
12
+ mask: { type: Boolean },
13
+ otp: { type: Boolean },
14
+ type: {},
15
+ dir: {},
16
+ name: {},
17
+ disabled: { type: Boolean },
18
+ required: { type: Boolean },
19
+ id: {},
20
+ asChild: { type: Boolean },
21
+ as: {},
22
+ class: {},
23
+ hasError: { type: Boolean, default: false }
24
+ },
25
+ emits: ["update:modelValue", "complete"],
26
+ setup(__props, { emit: __emit }) {
27
+ const props = __props;
28
+ const emits = __emit;
29
+ const delegatedProps = reactiveOmit(props, "class", "hasError");
30
+ const forwarded = xe(delegatedProps, emits);
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createBlock(unref(Dy), mergeProps(unref(forwarded), {
33
+ class: unref(clsx)("celeste-digit-input", props.class),
34
+ "data-error": _ctx.hasError
35
+ }), {
36
+ default: withCtx(() => [
37
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
38
+ ]),
39
+ _: 3
40
+ }, 16, ["class", "data-error"]);
41
+ };
42
+ }
43
+ });
44
+ const digitInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be93d7bf"]]);
45
+ export {
46
+ digitInput as default
47
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { x as xe, a0 as ih, a1 as uh } from "./chunks/index.js";
4
+ import { x as xe, a2 as ih, a3 as uh } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "dropdown-menu-content",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
- import { a2 as fh } from "./chunks/index.js";
2
+ import { a4 as fh } from "./chunks/index.js";
3
3
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "dropdown-menu-group",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { A as At, a3 as ch } from "./chunks/index.js";
4
+ import { A as At, a5 as ch } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = {
7
7
  key: 0,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { A as At, a4 as hh } from "./chunks/index.js";
4
+ import { A as At, a6 as hh } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "dropdown-menu-label",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { a5 as ph } from "./chunks/index.js";
4
+ import { a7 as ph } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "dropdown-menu-separator",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { x as xe, a0 as ih, a6 as Ch } from "./chunks/index.js";
4
+ import { x as xe, a2 as ih, a8 as Ch } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "dropdown-menu-sub-content",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { A as At, a7 as wh } from "./chunks/index.js";
4
+ import { A as At, a9 as wh } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = {
7
7
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
- import { A as At, a8 as rh } from "./chunks/index.js";
2
+ import { A as At, aa as rh } from "./chunks/index.js";
3
3
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "dropdown-menu-trigger",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
- import { a9 as sh } from "./chunks/index.js";
3
+ import { ab as sh } from "./chunks/index.js";
4
4
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "dropdown-menu",
package/dist/es/index.js CHANGED
@@ -19,6 +19,9 @@ import ComboboxSeparator from "./combobox-separator.js";
19
19
  import ComboboxTrigger from "./combobox-trigger.js";
20
20
  import combobox from "./combobox.js";
21
21
  import { _ as _sfc_main$2 } from "./chunks/content-divider.vue_vue_type_style_index_0_lang.js";
22
+ import digitInputGroup from "./digit-input-group.js";
23
+ import digitInputSlot from "./digit-input-slot.js";
24
+ import digitInput from "./digit-input.js";
22
25
  import contextMenuItem from "./context-menu-item.js";
23
26
  import DropdownItem from "./dropdown-item.js";
24
27
  import dropdown from "./dropdown.js";
@@ -95,6 +98,9 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
95
98
  CompactButton,
96
99
  ContentDivider: _sfc_main$2,
97
100
  ContextMenuItem: contextMenuItem,
101
+ DigitInput: digitInput,
102
+ DigitInputGroup: digitInputGroup,
103
+ DigitInputSlot: digitInputSlot,
98
104
  Dropdown: dropdown,
99
105
  DropdownItem,
100
106
  DropdownMenu: dropdownMenu,
@@ -230,6 +236,9 @@ export {
230
236
  _sfc_main$2 as ContentDivider,
231
237
  contextMenuItem as ContextMenuItem,
232
238
  DEFAULT_SWATCH,
239
+ digitInput as DigitInput,
240
+ digitInputGroup as DigitInputGroup,
241
+ digitInputSlot as DigitInputSlot,
233
242
  dropdown as Dropdown,
234
243
  DropdownItem,
235
244
  dropdownMenu as DropdownMenu,
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  const props = __props;
29
29
  const emit = __emit;
30
30
  const BubbleMenu = defineAsyncComponent(
31
- () => import("./chunks/index2.js").then((m) => m.BubbleMenu)
31
+ () => import("./chunks/index3.js").then((m) => m.BubbleMenu)
32
32
  );
33
33
  const href = ref("");
34
34
  const openInNewTab = ref(false);
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, Transition, mergeProps, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { x as xe, aa as Dv, ab as Eu, ac as xu } from "./chunks/index.js";
4
+ import { x as xe, ac as Dv, ad as Eu, ae as xu } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "modal-content",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createBlock, withCtx, toDisplayString, createVNode } from "vue";
2
2
  import CompactButton from "./compact-button.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { ad as Pu, ae as Du, a as Gl } from "./chunks/index.js";
4
+ import { af as Pu, ag as Du, a as Gl } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = ["data-dismissible", "data-alignment", "data-type"];
7
7
  const _hoisted_2 = {
@@ -2,7 +2,7 @@ import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, m
2
2
  import CompactButton from "./compact-button.js";
3
3
  import { useDelegatedProps } from "./use-delegated-props.js";
4
4
  import { c as clsx } from "./chunks/clsx.js";
5
- import { x as xe, af as bs, ag as ws, ah as _s, ai as xs } from "./chunks/index.js";
5
+ import { x as xe, ah as bs, ai as ws, aj as _s, ak as xs } from "./chunks/index.js";
6
6
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
7
7
  const _hoisted_1 = ["data-icon-size"];
8
8
  const _hoisted_2 = { class: "celeste-popover-title" };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
- import { aj as gs } from "./chunks/index.js";
2
+ import { al as gs } from "./chunks/index.js";
3
3
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "popover-trigger",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, useCssVars, computed, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, renderSlot, createTextVNode, createVNode, unref, mergeProps, withCtx } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { ak as By, al as Iy } from "./chunks/index.js";
4
+ import { am as By, an as Iy } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = ["data-layout"];
7
7
  const _hoisted_2 = {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, useCssVars, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, createElementBlock, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { ak as By, al as Iy } from "./chunks/index.js";
4
+ import { am as By, an as Iy } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = ["width", "height"];
7
7
  const _hoisted_2 = ["cx", "cy", "r"];
@@ -7,7 +7,7 @@ import SelectTrigger from "./select-trigger.js";
7
7
  import SelectValue from "./select-value.js";
8
8
  import { _ as _sfc_main$1 } from "./chunks/select.js";
9
9
  import Tooltip from "./tooltip.js";
10
- import { M as Mark, m as mergeAttributes, e as markPasteRule, c as Plugin, P as PluginKey, f as combineTransactionSteps, h as getChangedRanges, j as findChildrenInRange, l as getMarksBetween, n as getAttributes, E as Extension, o as dropPoint, S as Selection, k as keydownHandler, N as NodeSelection, F as Fragment, b as Slice, T as TextSelection, D as DecorationSet, q as Decoration, r as Mapping, s as callOrReturn, t as getExtensionField, u as isNodeEmpty, v as isNodeSelection, w as Node3, x as wrappingInputRule, y as markInputRule, z as textblockTypeInputRule, A as canInsertNode, B as nodeInputRule, C as getNodeType, G as getNodeAtPosition, H as isNodeActive, I as isAtStartOfNode, J as isAtEndOfNode, K as Editor$1 } from "./chunks/index3.js";
10
+ import { M as Mark, m as mergeAttributes, e as markPasteRule, c as Plugin, P as PluginKey, f as combineTransactionSteps, h as getChangedRanges, j as findChildrenInRange, l as getMarksBetween, n as getAttributes, E as Extension, o as dropPoint, S as Selection, k as keydownHandler, N as NodeSelection, F as Fragment, b as Slice, T as TextSelection, D as DecorationSet, q as Decoration, r as Mapping, s as callOrReturn, t as getExtensionField, u as isNodeEmpty, v as isNodeSelection, w as Node3, x as wrappingInputRule, y as markInputRule, z as textblockTypeInputRule, A as canInsertNode, B as nodeInputRule, C as getNodeType, G as getNodeAtPosition, H as isNodeActive, I as isAtStartOfNode, J as isAtEndOfNode, K as Editor$1 } from "./chunks/index4.js";
11
11
  import { fullToolbar, onActionClick, selectedOption } from "./config.js";
12
12
  import ExtraSettings from "./extra-settings.js";
13
13
  import LinkBubble from "./link-bubble.js";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { x as xe, am as zy, an as Ky, ao as Xy } from "./chunks/index.js";
4
+ import { x as xe, ao as zy, ap as Ky, aq as Xy } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "select-content",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, createElementVNode } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { ap as jy, aq as Yy, ar as Uy } from "./chunks/index.js";
4
+ import { ar as jy, as as Yy, at as Uy } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "select-item",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createVNode, createElementVNode } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { as as Ly, at as eg } from "./chunks/index.js";
4
+ import { au as Ly, av as eg } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "select-trigger",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { au as Qy } from "./chunks/index.js";
4
+ import { aw as Qy } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "select-value",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
2
2
  import CompactButton from "./compact-button.js";
3
3
  import { c as clsx } from "./chunks/clsx.js";
4
- import { x as xe, av as Lg, aw as zg, ax as Kg, ay as jg, az as Hg, aA as Wg } from "./chunks/index.js";
4
+ import { x as xe, ax as Lg, ay as zg, az as Kg, aA as jg, aB as Hg, aC as Wg } from "./chunks/index.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
6
  const _hoisted_1 = { class: "celeste-tooltip-content-box" };
7
7
  const _hoisted_2 = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/celeste",
3
3
  "type": "module",
4
- "version": "0.6.38",
4
+ "version": "0.6.40",
5
5
  "author": "YouCan <tech@youcan.shop>",
6
6
  "keywords": [
7
7
  "youcan",
@@ -39,13 +39,14 @@
39
39
  "@tiptap/pm": "^3.0.7",
40
40
  "@tiptap/starter-kit": "^3.0.7",
41
41
  "@tiptap/vue-3": "^3.0.7",
42
+ "@vueuse/core": "^13.6.0",
42
43
  "clsx": "^2.1.1",
43
44
  "radix-vue": "^1.9.12",
44
45
  "storybook-rtl-addon": "^0.3.3",
45
46
  "tinycolor2": "^1.6.0",
46
47
  "vue-sonner": "^2.0.2",
47
- "@youcan/celeste-icons": "0.6.38",
48
- "@youcan/celeste-tokens": "0.6.38"
48
+ "@youcan/celeste-icons": "0.6.40",
49
+ "@youcan/celeste-tokens": "0.6.40"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@chromatic-com/storybook": "^4.0.0",
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { reactiveOmit } from '@vueuse/core';
4
+ import clsx from 'clsx';
5
+ import { Primitive, type PrimitiveProps, useForwardProps } from 'radix-vue';
6
+
7
+ const props = defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>();
8
+ const delegatedProps = reactiveOmit(props, 'class');
9
+ const forwardedProps = useForwardProps(delegatedProps);
10
+ </script>
11
+
12
+ <template>
13
+ <Primitive v-bind="forwardedProps" :class="clsx('celeste-digit-input-group', props.class)">
14
+ <slot />
15
+ </Primitive>
16
+ </template>
17
+
18
+ <style scoped lang="scss">
19
+ .celeste-digit-input-group {
20
+ display: flex;
21
+ align-items: center;
22
+ gap: var(--spacing-10);
23
+ }
24
+ </style>
@@ -0,0 +1,87 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { reactiveOmit } from '@vueuse/core';
4
+ import clsx from 'clsx';
5
+ import { PinInputInput, type PinInputInputProps, useForwardProps } from 'radix-vue';
6
+
7
+ const props = defineProps<PinInputInputProps & { class?: HTMLAttributes['class'] }>();
8
+
9
+ const delegatedProps = reactiveOmit(props, 'class');
10
+
11
+ const forwardedProps = useForwardProps(delegatedProps);
12
+ </script>
13
+
14
+ <template>
15
+ <PinInputInput v-bind="forwardedProps" :class="clsx('celeste-digit-input-slot', props.class)" />
16
+ </template>
17
+
18
+ <style scoped lang="scss">
19
+ .celeste-digit-input-slot {
20
+ --celeste-digit-input-border-color: var(--color-stroke-soft-200);
21
+ --celeste-digit-input-drop-shadow: var(--shadow-regular-xs);
22
+ --celeste-digit-input-placeholder-color: var(--color-text-soft-400);
23
+
24
+ display: flex;
25
+ box-sizing: border-box;
26
+ flex-grow: 1;
27
+ align-items: center;
28
+ justify-content: center;
29
+ width: 64px;
30
+ height: 64px;
31
+ padding: 0;
32
+ transition: all var(--animation-fast) ease-out;
33
+ border: 1px solid var(--celeste-digit-input-border-color);
34
+ border-radius: var(--radius-10);
35
+ outline: 2px solid transparent;
36
+ outline-offset: 2px;
37
+ background-color: var(--color-bg-white-0);
38
+ box-shadow: var(--celeste-digit-input-drop-shadow);
39
+ color: var(--color-text-strong-950);
40
+ font: var(--title-h5-title);
41
+ text-align: center;
42
+
43
+ &::placeholder {
44
+ transition: color var(--animation-fast) ease-out;
45
+ color: var(--celeste-digit-input-placeholder-color);
46
+ }
47
+
48
+ &:focus {
49
+ --celeste-digit-input-border-color: var(--color-stroke-strong-950);
50
+ --celeste-digit-input-placeholder-color: var(--color-text-sub-600);
51
+
52
+ outline-color: var(--color-stroke-soft-200);
53
+ }
54
+
55
+ &:disabled {
56
+ --celeste-digit-input-border-color: transparent;
57
+ --celeste-digit-input-drop-shadow: none;
58
+ --celeste-digit-input-placeholder-color: var(--color-text-disabled-300);
59
+
60
+ background-color: var(--color-bg-weak-50);
61
+ box-shadow: none;
62
+ color: var(--color-text-disabled-300);
63
+ pointer-events: none;
64
+
65
+ &::placeholder {
66
+ color: currentcolor;
67
+ }
68
+ }
69
+
70
+ [data-error='true'] & {
71
+ --celeste-digit-input-border-color: var(--color-state-error-base);
72
+
73
+ &:focus {
74
+ --celeste-digit-input-border-color: var(--color-state-error-base);
75
+
76
+ outline-color: var(--color-state-error-lighter);
77
+ }
78
+ }
79
+
80
+ &:hover:not(:focus, :disabled) {
81
+ --celeste-digit-input-border-color: transparent;
82
+ --celeste-digit-input-placeholder-color: var(--color-text-sub-600);
83
+
84
+ background-color: var(--color-bg-weak-50);
85
+ }
86
+ }
87
+ </style>
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { reactiveOmit } from '@vueuse/core';
4
+ import clsx from 'clsx';
5
+ import { PinInputRoot, type PinInputRootEmits, type PinInputRootProps, useForwardPropsEmits } from 'radix-vue';
6
+
7
+ const props = withDefaults(defineProps<PinInputRootProps & {
8
+ class?: HTMLAttributes['class'];
9
+ hasError?: boolean;
10
+ }>(), {
11
+ modelValue: () => [],
12
+ hasError: false,
13
+ });
14
+ const emits = defineEmits<PinInputRootEmits>();
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class', 'hasError');
17
+
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
19
+ </script>
20
+
21
+ <template>
22
+ <PinInputRoot
23
+ v-bind="forwarded"
24
+ :class="clsx('celeste-digit-input', props.class)"
25
+ :data-error="hasError"
26
+ >
27
+ <slot />
28
+ </PinInputRoot>
29
+ </template>
30
+
31
+ <style scoped lang="scss">
32
+ .celeste-digit-input {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--spacing-10);
36
+ }
37
+ </style>
@@ -0,0 +1,8 @@
1
+ export * from './digit-input-group.vue';
2
+ export { default as DigitInputGroup } from './digit-input-group.vue';
3
+
4
+ export * from './digit-input-slot.vue';
5
+ export { default as DigitInputSlot } from './digit-input-slot.vue';
6
+
7
+ export * from './digit-input.vue';
8
+ export { default as DigitInput } from './digit-input.vue';