@youcan/celeste 0.6.62 → 0.6.63

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 CHANGED
@@ -3313,7 +3313,7 @@ to {
3313
3313
  display: flex;
3314
3314
  flex-direction: column;
3315
3315
  gap: var(--spacing-4);
3316
- }.celeste-dropdown-menu-item[data-v-149975fd] {
3316
+ }.celeste-dropdown-menu-item[data-v-1c18b80a] {
3317
3317
  display: flex;
3318
3318
  align-items: center;
3319
3319
  padding: var(--spacing-8);
@@ -3326,21 +3326,21 @@ to {
3326
3326
  cursor: pointer;
3327
3327
  gap: var(--spacing-8);
3328
3328
  }
3329
- .celeste-dropdown-menu-item i[data-v-149975fd] {
3329
+ .celeste-dropdown-menu-item i[data-v-1c18b80a] {
3330
3330
  color: var(--color-icon-sub-600);
3331
3331
  }
3332
- .celeste-dropdown-menu-item[data-v-149975fd]:focus-visible, .celeste-dropdown-menu-item[data-v-149975fd]:not([data-disabled]):hover, .celeste-dropdown-menu-item[data-highlighted][data-v-149975fd] {
3332
+ .celeste-dropdown-menu-item[data-v-1c18b80a]:focus-visible, .celeste-dropdown-menu-item[data-v-1c18b80a]:not([data-disabled]):hover, .celeste-dropdown-menu-item[data-highlighted][data-v-1c18b80a] {
3333
3333
  outline: none;
3334
3334
  background: var(--color-bg-weak-50);
3335
3335
  }
3336
- .celeste-dropdown-menu-item .celeste-dropdown-menu-item-body[data-v-149975fd] {
3336
+ .celeste-dropdown-menu-item .celeste-dropdown-menu-item-body[data-v-1c18b80a] {
3337
3337
  display: flex;
3338
3338
  flex: 1;
3339
3339
  align-items: center;
3340
3340
  gap: var(--spacing-4);
3341
3341
  }
3342
- .celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-149975fd],
3343
- .celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-149975fd] {
3342
+ .celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-1c18b80a],
3343
+ .celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] {
3344
3344
  display: flex;
3345
3345
  align-items: center;
3346
3346
  justify-content: center;
@@ -3348,20 +3348,20 @@ to {
3348
3348
  height: fit-content;
3349
3349
  color: var(--color-icon-sub-600);
3350
3350
  }
3351
- .celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-149975fd] i,
3352
- .celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-149975fd] i {
3351
+ .celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-1c18b80a] i,
3352
+ .celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] i {
3353
3353
  color: var(--color-icon-sub-600);
3354
3354
  }
3355
- .celeste-dropdown-menu-item[data-disabled][data-v-149975fd] {
3355
+ .celeste-dropdown-menu-item[data-disabled][data-v-1c18b80a] {
3356
3356
  color: var(--color-text-disabled-300);
3357
- cursor: auto;
3357
+ pointer-events: none;
3358
3358
  }
3359
- .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-149975fd],
3360
- .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-149975fd] {
3359
+ .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-1c18b80a],
3360
+ .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] {
3361
3361
  color: var(--color-text-disabled-300);
3362
3362
  }
3363
- .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-149975fd] i,
3364
- .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-149975fd] i {
3363
+ .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-1c18b80a] i,
3364
+ .celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] i {
3365
3365
  color: var(--color-icon-disabled-300);
3366
3366
  }.celeste-dropdown-menu-label[data-v-392ac57c] {
3367
3367
  display: flex;
@@ -3480,7 +3480,7 @@ to {
3480
3480
  }
3481
3481
  .celeste-dropdown-menu-trigger[data-disabled][data-v-003a2030] i {
3482
3482
  color: var(--color-icon-disabled-300);
3483
- }[data-v-3405639f] {
3483
+ }[data-v-1da28738] {
3484
3484
  box-sizing: border-box;
3485
3485
  }.celeste-file-upload-area[data-v-cfdea6ac] {
3486
3486
  display: flex;
@@ -50,5 +50,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
50
50
  };
51
51
  }
52
52
  });
53
- const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-149975fd"]]);
53
+ const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-1c18b80a"]]);
54
54
  module.exports = dropdownMenuItem;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  const Mo = require("vue");
3
3
  const useDelegatedProps = require("./use-delegated-props.js");
4
+ const clsx = require("./chunks/clsx.js");
4
5
  const index = require("./chunks/index.js");
5
6
  ;/* empty css */
6
7
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
@@ -10,24 +11,26 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
10
11
  defaultOpen: { type: Boolean },
11
12
  open: { type: Boolean },
12
13
  dir: {},
13
- modal: { type: Boolean }
14
+ modal: { type: Boolean },
15
+ class: {}
14
16
  },
15
- setup(__props) {
17
+ emits: ["update:open"],
18
+ setup(__props, { emit: __emit }) {
16
19
  const props = __props;
17
- const delegatedProps = useDelegatedProps.useDelegatedProps(props, "open");
18
- const open = Mo.ref(false);
20
+ const emits = __emit;
21
+ const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
22
+ const forwarded = index.xe(delegatedProps, emits);
19
23
  return (_ctx, _cache) => {
20
- return Mo.openBlock(), Mo.createBlock(Mo.unref(index.sh), Mo.mergeProps(Mo.unref(delegatedProps), {
21
- open: open.value,
22
- "onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
24
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index.sh), Mo.mergeProps(Mo.unref(forwarded), {
25
+ class: Mo.unref(clsx.clsx)("celeste-dropdown-menu", props.class)
23
26
  }), {
24
27
  default: Mo.withCtx(() => [
25
28
  Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
26
29
  ]),
27
30
  _: 3
28
- }, 16, ["open"]);
31
+ }, 16, ["class"]);
29
32
  };
30
33
  }
31
34
  });
32
- const dropdownMenu = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-3405639f"]]);
35
+ const dropdownMenu = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-1da28738"]]);
33
36
  module.exports = dropdownMenu;
@@ -1,4 +1,8 @@
1
+ import { HTMLAttributes } from 'vue';
1
2
  import { DropdownMenuRootProps } from 'radix-vue';
3
+ type __VLS_Props = DropdownMenuRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
2
6
  declare function __VLS_template(): {
3
7
  attrs: Partial<{}>;
4
8
  slots: {
@@ -8,7 +12,11 @@ declare function __VLS_template(): {
8
12
  rootEl: any;
9
13
  };
10
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<DropdownMenuRootProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DropdownMenuRootProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "update:open": (payload: boolean) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ "onUpdate:open"?: ((payload: boolean) => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
21
  export default _default;
14
22
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
49
  };
50
50
  }
51
51
  });
52
- const dropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-149975fd"]]);
52
+ const dropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1c18b80a"]]);
53
53
  export {
54
54
  dropdownMenuItem as default
55
55
  };
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
1
+ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
2
2
  import { useDelegatedProps } from "./use-delegated-props.js";
3
- import { af as sh } from "./chunks/index.js";
3
+ import { c as clsx } from "./chunks/clsx.js";
4
+ import { x as xe, af as sh } from "./chunks/index.js";
4
5
  /* empty css */
5
6
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -9,26 +10,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  defaultOpen: { type: Boolean },
10
11
  open: { type: Boolean },
11
12
  dir: {},
12
- modal: { type: Boolean }
13
+ modal: { type: Boolean },
14
+ class: {}
13
15
  },
14
- setup(__props) {
16
+ emits: ["update:open"],
17
+ setup(__props, { emit: __emit }) {
15
18
  const props = __props;
16
- const delegatedProps = useDelegatedProps(props, "open");
17
- const open = ref(false);
19
+ const emits = __emit;
20
+ const delegatedProps = useDelegatedProps(props, "class");
21
+ const forwarded = xe(delegatedProps, emits);
18
22
  return (_ctx, _cache) => {
19
- return openBlock(), createBlock(unref(sh), mergeProps(unref(delegatedProps), {
20
- open: open.value,
21
- "onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
23
+ return openBlock(), createBlock(unref(sh), mergeProps(unref(forwarded), {
24
+ class: unref(clsx)("celeste-dropdown-menu", props.class)
22
25
  }), {
23
26
  default: withCtx(() => [
24
27
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
25
28
  ]),
26
29
  _: 3
27
- }, 16, ["open"]);
30
+ }, 16, ["class"]);
28
31
  };
29
32
  }
30
33
  });
31
- const dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3405639f"]]);
34
+ const dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1da28738"]]);
32
35
  export {
33
36
  dropdownMenu as default
34
37
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/celeste",
3
3
  "type": "module",
4
- "version": "0.6.62",
4
+ "version": "0.6.63",
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.62",
48
- "@youcan/celeste-tokens": "0.6.62"
47
+ "@youcan/celeste-icons": "0.6.63",
48
+ "@youcan/celeste-tokens": "0.6.63"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@chromatic-com/storybook": "^4.1.1",
@@ -78,7 +78,7 @@ const forwardedProps = useForwardProps(delegatedProps);
78
78
 
79
79
  &[data-disabled] {
80
80
  color: var(--color-text-disabled-300);
81
- cursor: auto;
81
+ pointer-events: none;
82
82
 
83
83
  .celeste-dropdown-menu-item-prefix,
84
84
  .celeste-dropdown-menu-item-suffix {
@@ -1,17 +1,22 @@
1
1
  <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
2
3
  import { useDelegatedProps } from '@/composables/use-delegated-props';
3
- import { DropdownMenuRoot, type DropdownMenuRootProps } from 'radix-vue';
4
- import { ref } from 'vue';
4
+ import clsx from 'clsx';
5
+ import { DropdownMenuRoot, type DropdownMenuRootEmits, type DropdownMenuRootProps } from 'radix-vue';
6
+ import { useForwardPropsEmits } from 'radix-vue';
5
7
 
6
- const props = defineProps<DropdownMenuRootProps>();
8
+ const props = defineProps<DropdownMenuRootProps & { class?: HTMLAttributes['class'] }>();
9
+ const emits = defineEmits<DropdownMenuRootEmits>();
7
10
 
8
- const delegatedProps = useDelegatedProps(props, 'open');
9
-
10
- const open = ref(false);
11
+ const delegatedProps = useDelegatedProps(props, 'class');
12
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
11
13
  </script>
12
14
 
13
15
  <template>
14
- <DropdownMenuRoot v-bind="delegatedProps" v-model:open="open">
16
+ <DropdownMenuRoot
17
+ v-bind="forwarded"
18
+ :class="clsx('celeste-dropdown-menu', props.class)"
19
+ >
15
20
  <slot />
16
21
  </DropdownMenuRoot>
17
22
  </template>
@@ -103,7 +103,7 @@ export const Default: Story = {
103
103
  <DropdownMenuLabel>
104
104
  Account
105
105
  </DropdownMenuLabel>
106
- <DropdownMenuItem>
106
+ <DropdownMenuItem disabled>
107
107
  Add Account
108
108
  <template #prefix>
109
109
  <i class="i-celeste-add-line" />