@youcan/celeste 0.6.29 → 0.6.31
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 +4244 -0
- package/dist/cjs/alert.js +111 -0
- package/dist/cjs/alpha-slider.js +3 -0
- package/dist/cjs/badge.js +55 -0
- package/dist/cjs/button.js +39 -0
- package/dist/cjs/checkbox-label.js +112 -0
- package/dist/cjs/checkbox.js +3 -0
- package/dist/cjs/chunks/_plugin-vue_export-helper.js +9 -0
- package/dist/cjs/chunks/alpha-slider.js +127 -0
- package/dist/cjs/chunks/checkbox.vue_vue_type_style_index_0_lang.js +38 -0
- package/dist/cjs/chunks/clsx.js +15 -0
- package/dist/cjs/chunks/combobox-anchor.js +31 -0
- package/dist/cjs/chunks/content-divider.vue_vue_type_style_index_0_lang.js +52 -0
- package/dist/cjs/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +51 -0
- package/dist/cjs/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +49 -0
- package/dist/cjs/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +32 -0
- package/dist/cjs/chunks/dropdown-menu-sub.js +25 -0
- package/dist/cjs/chunks/index.js +9300 -0
- package/dist/cjs/chunks/index2.js +1457 -0
- package/dist/cjs/chunks/index3.js +16457 -0
- package/dist/cjs/chunks/modal-close.js +22 -0
- package/dist/cjs/chunks/modal-trigger.js +22 -0
- package/dist/cjs/chunks/modal.js +26 -0
- package/dist/cjs/chunks/popover.js +26 -0
- package/dist/cjs/chunks/scroll-area.js +41 -0
- package/dist/cjs/chunks/select-group.js +22 -0
- package/dist/cjs/chunks/select.js +38 -0
- package/dist/cjs/chunks/slider.vue_vue_type_style_index_0_lang.js +52 -0
- package/dist/cjs/chunks/sonner.js +1153 -0
- package/dist/cjs/chunks/switch.vue_vue_type_style_index_0_lang.js +38 -0
- package/dist/cjs/chunks/use-color-model.js +992 -0
- package/dist/cjs/color-area.js +175 -0
- package/dist/cjs/color-picker.js +514 -0
- package/dist/cjs/color-swatch.js +59 -0
- package/dist/cjs/color.js +102 -0
- package/dist/cjs/combobox-anchor.js +3 -0
- package/dist/cjs/combobox-empty.js +32 -0
- package/dist/cjs/combobox-group.js +42 -0
- package/dist/cjs/combobox-input.js +63 -0
- package/dist/cjs/combobox-item.js +109 -0
- package/dist/cjs/combobox-list.js +62 -0
- package/dist/cjs/combobox-root.js +40 -0
- package/dist/cjs/combobox-separator.js +32 -0
- package/dist/cjs/combobox-trigger.js +47 -0
- package/dist/cjs/combobox.js +233 -0
- package/dist/cjs/command-group.js +41 -0
- package/dist/cjs/command-input.js +42 -0
- package/dist/cjs/command-item.js +34 -0
- package/dist/cjs/command-list.js +52 -0
- package/dist/cjs/command-root.js +45 -0
- package/dist/cjs/command-separator.js +32 -0
- package/dist/cjs/compact-button.js +42 -0
- package/dist/cjs/config.js +136 -0
- package/dist/cjs/content-divider.js +3 -0
- package/dist/cjs/context-menu-item.js +134 -0
- package/dist/cjs/crypto.js +8 -0
- package/dist/cjs/dropdown-item.js +99 -0
- package/dist/cjs/dropdown-menu-content.js +3 -0
- package/dist/cjs/dropdown-menu-group.js +24 -0
- package/dist/cjs/dropdown-menu-item.js +68 -0
- package/dist/cjs/dropdown-menu-label.js +31 -0
- package/dist/cjs/dropdown-menu-separator.js +25 -0
- package/dist/cjs/dropdown-menu-sub-content.js +3 -0
- package/dist/cjs/dropdown-menu-sub-trigger.js +3 -0
- package/dist/cjs/dropdown-menu-sub.js +3 -0
- package/dist/cjs/dropdown-menu-trigger.js +26 -0
- package/dist/cjs/dropdown-menu.js +32 -0
- package/dist/cjs/dropdown.js +291 -0
- package/dist/cjs/extra-settings.js +155 -0
- package/dist/cjs/fancy-button.js +38 -0
- package/dist/cjs/hint-text.js +36 -0
- package/dist/cjs/hue-slider.js +133 -0
- package/dist/cjs/index.js +229 -0
- package/dist/cjs/label.js +55 -0
- package/dist/cjs/link-bubble.js +228 -0
- package/dist/cjs/link-button.js +44 -0
- package/dist/cjs/modal-body.js +22 -0
- package/dist/cjs/modal-close.js +3 -0
- package/dist/cjs/modal-content.js +48 -0
- package/dist/cjs/modal-footer.js +22 -0
- package/dist/cjs/modal-header.js +81 -0
- package/dist/cjs/modal-trigger.js +3 -0
- package/dist/cjs/modal.js +3 -0
- package/dist/cjs/popover-content.js +104 -0
- package/dist/cjs/popover-trigger.js +24 -0
- package/dist/cjs/popover.js +3 -0
- package/dist/cjs/rich-editor.js +4996 -0
- package/dist/cjs/scroll-area.js +3 -0
- package/dist/cjs/scroll-bar.js +39 -0
- package/dist/cjs/segmented-control-item.js +41 -0
- package/dist/cjs/segmented-control.js +40 -0
- package/dist/cjs/select-content.js +61 -0
- package/dist/cjs/select-group.js +3 -0
- package/dist/cjs/select-icon.js +25 -0
- package/dist/cjs/select-item.js +44 -0
- package/dist/cjs/select-label.js +32 -0
- package/dist/cjs/select-separator.js +26 -0
- package/dist/cjs/select-trigger.js +40 -0
- package/dist/cjs/select-value.js +31 -0
- package/dist/cjs/select.js +3 -0
- package/dist/cjs/shims.js +1 -0
- package/dist/cjs/slider.js +3 -0
- package/dist/cjs/social-button.js +45 -0
- package/dist/cjs/sonner-alert.js +41 -0
- package/dist/cjs/sonner.js +3 -0
- package/dist/cjs/status-badge.js +49 -0
- package/dist/cjs/switch.js +3 -0
- package/dist/cjs/tab-menu-content.js +32 -0
- package/dist/cjs/tab-menu-item.js +44 -0
- package/dist/cjs/tab-menu-list.js +34 -0
- package/dist/cjs/tab-menu.js +32 -0
- package/dist/cjs/text-input-affix.js +27 -0
- package/dist/cjs/text-input-button.js +31 -0
- package/dist/cjs/text-input.js +119 -0
- package/dist/cjs/textarea.js +56 -0
- package/dist/cjs/tooltip.js +115 -0
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/use-color-model.js +6 -0
- package/dist/cjs/use-delegated-props.js +14 -0
- package/dist/cjs/use-user-select.js +39 -0
- package/dist/components/alert/alert.d.ts +30 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/badge/badge.d.ts +17 -0
- package/dist/components/badge/index.d.ts +4 -0
- package/dist/components/badge/status-badge.d.ts +13 -0
- package/dist/components/button/button.d.ts +22 -0
- package/dist/components/button/compact-button.d.ts +15 -0
- package/dist/components/button/fancy-button.d.ts +20 -0
- package/dist/components/button/index.d.ts +10 -0
- package/dist/components/button/link-button.d.ts +22 -0
- package/dist/components/button/social-button.d.ts +10 -0
- package/dist/components/checkbox/checkbox-label.d.ts +32 -0
- package/dist/components/checkbox/checkbox.d.ts +11 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/color-picker/alpha-slider.d.ts +15 -0
- package/dist/components/color-picker/color-area.d.ts +9 -0
- package/dist/components/color-picker/color-picker.d.ts +47 -0
- package/dist/components/color-picker/color-swatch.d.ts +19 -0
- package/dist/components/color-picker/composable/use-color-model.d.ts +7 -0
- package/dist/components/color-picker/composable/use-user-select.d.ts +8 -0
- package/dist/components/color-picker/hue-slider.d.ts +14 -0
- package/dist/components/color-picker/index.d.ts +10 -0
- package/dist/components/combobox/combobox-anchor.d.ts +22 -0
- package/dist/components/combobox/combobox-empty.d.ts +22 -0
- package/dist/components/combobox/combobox-group.d.ts +23 -0
- package/dist/components/combobox/combobox-input.d.ts +17 -0
- package/dist/components/combobox/combobox-item.d.ts +31 -0
- package/dist/components/combobox/combobox-list.d.ts +36 -0
- package/dist/components/combobox/combobox-root.d.ts +29 -0
- package/dist/components/combobox/combobox-separator.d.ts +22 -0
- package/dist/components/combobox/combobox-trigger.d.ts +20 -0
- package/dist/components/combobox/combobox.d.ts +42 -0
- package/dist/components/combobox/index.d.ts +20 -0
- package/dist/components/content-divider/content-divider.d.ts +10 -0
- package/dist/components/content-divider/index.d.ts +2 -0
- package/dist/components/dropdown/context-menu-item.d.ts +39 -0
- package/dist/components/dropdown/dropdown-item.d.ts +30 -0
- package/dist/components/dropdown/dropdown.d.ts +55 -0
- package/dist/components/dropdown/index.d.ts +6 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +36 -0
- package/dist/components/dropdown-menu/dropdown-menu-group.d.ts +18 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +26 -0
- package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +22 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +7 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +38 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +22 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +22 -0
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +18 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +18 -0
- package/dist/components/dropdown-menu/index.d.ts +20 -0
- package/dist/components/hint-text/hint-text.d.ts +11 -0
- package/dist/components/hint-text/index.d.ts +2 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/label.d.ts +29 -0
- package/dist/components/modal/index.d.ts +14 -0
- package/dist/components/modal/modal-body.d.ts +21 -0
- package/dist/components/modal/modal-close.d.ts +18 -0
- package/dist/components/modal/modal-content.d.ts +37 -0
- package/dist/components/modal/modal-footer.d.ts +21 -0
- package/dist/components/modal/modal-header.d.ts +16 -0
- package/dist/components/modal/modal-trigger.d.ts +18 -0
- package/dist/components/modal/modal.d.ts +22 -0
- package/dist/components/popover/index.d.ts +6 -0
- package/dist/components/popover/popover-content.d.ts +41 -0
- package/dist/components/popover/popover-trigger.d.ts +18 -0
- package/dist/components/popover/popover.d.ts +22 -0
- package/dist/components/rich-editor/config.d.ts +33 -0
- package/dist/components/rich-editor/extra-settings.d.ts +6 -0
- package/dist/components/rich-editor/index.d.ts +2 -0
- package/dist/components/rich-editor/link-bubble.d.ts +11 -0
- package/dist/components/rich-editor/rich-editor.d.ts +55 -0
- package/dist/components/rich-editor/types.d.ts +19 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +22 -0
- package/dist/components/scroll-area/scroll-bar.d.ts +9 -0
- package/dist/components/segmented-control/index.d.ts +4 -0
- package/dist/components/segmented-control/segmented-control-item.d.ts +22 -0
- package/dist/components/segmented-control/segmented-control.d.ts +26 -0
- package/dist/components/select/index.d.ts +18 -0
- package/dist/components/select/select-content.d.ts +33 -0
- package/dist/components/select/select-group.d.ts +18 -0
- package/dist/components/select/select-icon.d.ts +21 -0
- package/dist/components/select/select-item.d.ts +22 -0
- package/dist/components/select/select-label.d.ts +22 -0
- package/dist/components/select/select-separator.d.ts +7 -0
- package/dist/components/select/select-trigger.d.ts +28 -0
- package/dist/components/select/select-value.d.ts +22 -0
- package/dist/components/select/select.d.ts +28 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/slider.d.ts +13 -0
- package/dist/components/sonner/index.d.ts +4 -0
- package/dist/components/sonner/sonner-alert.d.ts +13 -0
- package/dist/components/sonner/sonner.d.ts +5 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.d.ts +11 -0
- package/dist/components/tab-menu/index.d.ts +8 -0
- package/dist/components/tab-menu/tab-menu-content.d.ts +22 -0
- package/dist/components/tab-menu/tab-menu-item.d.ts +24 -0
- package/dist/components/tab-menu/tab-menu-list.d.ts +22 -0
- package/dist/components/tab-menu/tab-menu.d.ts +23 -0
- package/dist/components/text-input/index.d.ts +6 -0
- package/dist/components/text-input/text-input-affix.d.ts +23 -0
- package/dist/components/text-input/text-input-button.d.ts +23 -0
- package/dist/components/text-input/text-input.d.ts +32 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.d.ts +22 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +29 -0
- package/dist/composables/use-delegated-props.d.ts +2 -0
- package/dist/es/alert.js +112 -0
- package/dist/es/alpha-slider.js +4 -0
- package/dist/es/badge.js +56 -0
- package/dist/es/button.js +40 -0
- package/dist/es/checkbox-label.js +113 -0
- package/dist/es/checkbox.js +4 -0
- package/dist/es/chunks/_plugin-vue_export-helper.js +10 -0
- package/dist/es/chunks/alpha-slider.js +128 -0
- package/dist/es/chunks/checkbox.vue_vue_type_style_index_0_lang.js +39 -0
- package/dist/es/chunks/clsx.js +16 -0
- package/dist/es/chunks/combobox-anchor.js +32 -0
- package/dist/es/chunks/content-divider.vue_vue_type_style_index_0_lang.js +53 -0
- package/dist/es/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +52 -0
- package/dist/es/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +50 -0
- package/dist/es/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +33 -0
- package/dist/es/chunks/dropdown-menu-sub.js +26 -0
- package/dist/es/chunks/index.js +9285 -0
- package/dist/es/chunks/index2.js +1457 -0
- package/dist/es/chunks/index3.js +16458 -0
- package/dist/es/chunks/modal-close.js +23 -0
- package/dist/es/chunks/modal-trigger.js +23 -0
- package/dist/es/chunks/modal.js +27 -0
- package/dist/es/chunks/popover.js +27 -0
- package/dist/es/chunks/scroll-area.js +42 -0
- package/dist/es/chunks/select-group.js +23 -0
- package/dist/es/chunks/select.js +39 -0
- package/dist/es/chunks/slider.vue_vue_type_style_index_0_lang.js +53 -0
- package/dist/es/chunks/sonner.js +1154 -0
- package/dist/es/chunks/switch.vue_vue_type_style_index_0_lang.js +39 -0
- package/dist/es/chunks/use-color-model.js +993 -0
- package/dist/es/color-area.js +176 -0
- package/dist/es/color-picker.js +515 -0
- package/dist/es/color-swatch.js +60 -0
- package/dist/es/color.js +102 -0
- package/dist/es/combobox-anchor.js +4 -0
- package/dist/es/combobox-empty.js +33 -0
- package/dist/es/combobox-group.js +43 -0
- package/dist/es/combobox-input.js +64 -0
- package/dist/es/combobox-item.js +110 -0
- package/dist/es/combobox-list.js +63 -0
- package/dist/es/combobox-root.js +41 -0
- package/dist/es/combobox-separator.js +33 -0
- package/dist/es/combobox-trigger.js +48 -0
- package/dist/es/combobox.js +234 -0
- package/dist/es/command-group.js +42 -0
- package/dist/es/command-input.js +43 -0
- package/dist/es/command-item.js +35 -0
- package/dist/es/command-list.js +53 -0
- package/dist/es/command-root.js +46 -0
- package/dist/es/command-separator.js +33 -0
- package/dist/es/compact-button.js +43 -0
- package/dist/es/config.js +136 -0
- package/dist/es/content-divider.js +4 -0
- package/dist/es/context-menu-item.js +135 -0
- package/dist/es/crypto.js +8 -0
- package/dist/es/dropdown-item.js +100 -0
- package/dist/es/dropdown-menu-content.js +4 -0
- package/dist/es/dropdown-menu-group.js +25 -0
- package/dist/es/dropdown-menu-item.js +69 -0
- package/dist/es/dropdown-menu-label.js +32 -0
- package/dist/es/dropdown-menu-separator.js +26 -0
- package/dist/es/dropdown-menu-sub-content.js +4 -0
- package/dist/es/dropdown-menu-sub-trigger.js +4 -0
- package/dist/es/dropdown-menu-sub.js +4 -0
- package/dist/es/dropdown-menu-trigger.js +27 -0
- package/dist/es/dropdown-menu.js +33 -0
- package/dist/es/dropdown.js +292 -0
- package/dist/es/extra-settings.js +156 -0
- package/dist/es/fancy-button.js +39 -0
- package/dist/es/hint-text.js +37 -0
- package/dist/es/hue-slider.js +134 -0
- package/dist/es/index.js +229 -0
- package/dist/es/label.js +56 -0
- package/dist/es/link-bubble.js +229 -0
- package/dist/es/link-button.js +45 -0
- package/dist/es/modal-body.js +23 -0
- package/dist/es/modal-close.js +4 -0
- package/dist/es/modal-content.js +49 -0
- package/dist/es/modal-footer.js +23 -0
- package/dist/es/modal-header.js +82 -0
- package/dist/es/modal-trigger.js +4 -0
- package/dist/es/modal.js +4 -0
- package/dist/es/popover-content.js +105 -0
- package/dist/es/popover-trigger.js +25 -0
- package/dist/es/popover.js +4 -0
- package/dist/es/rich-editor.js +4997 -0
- package/dist/es/scroll-area.js +4 -0
- package/dist/es/scroll-bar.js +40 -0
- package/dist/es/segmented-control-item.js +42 -0
- package/dist/es/segmented-control.js +41 -0
- package/dist/es/select-content.js +62 -0
- package/dist/es/select-group.js +4 -0
- package/dist/es/select-icon.js +26 -0
- package/dist/es/select-item.js +45 -0
- package/dist/es/select-label.js +33 -0
- package/dist/es/select-separator.js +27 -0
- package/dist/es/select-trigger.js +41 -0
- package/dist/es/select-value.js +32 -0
- package/dist/es/select.js +4 -0
- package/dist/es/shims.js +1 -0
- package/dist/es/slider.js +4 -0
- package/dist/es/social-button.js +46 -0
- package/dist/es/sonner-alert.js +42 -0
- package/dist/es/sonner.js +4 -0
- package/dist/es/status-badge.js +50 -0
- package/dist/es/switch.js +4 -0
- package/dist/es/tab-menu-content.js +33 -0
- package/dist/es/tab-menu-item.js +45 -0
- package/dist/es/tab-menu-list.js +35 -0
- package/dist/es/tab-menu.js +33 -0
- package/dist/es/text-input-affix.js +28 -0
- package/dist/es/text-input-button.js +32 -0
- package/dist/es/text-input.js +120 -0
- package/dist/es/textarea.js +57 -0
- package/dist/es/tooltip.js +116 -0
- package/dist/es/types.js +1 -0
- package/dist/es/use-color-model.js +6 -0
- package/dist/es/use-delegated-props.js +14 -0
- package/dist/es/use-user-select.js +39 -0
- package/dist/index.d.ts +5 -0
- package/dist/utils/color.d.ts +26 -0
- package/dist/utils/crypto.d.ts +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/sonner.d.ts +19 -0
- package/package.json +15 -4
- package/src/components/index.ts +2 -0
- package/src/components/rich-editor/config.ts +150 -0
- package/src/components/rich-editor/extra-settings.vue +151 -0
- package/src/components/rich-editor/index.ts +2 -0
- package/src/components/rich-editor/link-bubble.vue +288 -0
- package/src/components/rich-editor/rich-editor.vue +428 -0
- package/src/components/rich-editor/stories/rich-editor.stories.ts +87 -0
- package/src/components/rich-editor/types.ts +21 -0
- package/src/components/sonner/index.ts +5 -0
- package/src/components/sonner/sonner-alert.vue +54 -0
- package/src/components/sonner/sonner.vue +13 -0
- package/src/components/sonner/stories/sonner.stories.ts +194 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/sonner.ts +72 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
|
+
import { T as qv, Y as Yv } from "./chunks/index.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "command-group",
|
|
6
|
+
props: {
|
|
7
|
+
asChild: { type: Boolean },
|
|
8
|
+
as: {},
|
|
9
|
+
class: {},
|
|
10
|
+
heading: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props;
|
|
16
|
+
return delegated;
|
|
17
|
+
});
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createBlock(unref(qv), mergeProps(delegatedProps.value, {
|
|
20
|
+
class: ["celeste-command-group", props.class]
|
|
21
|
+
}), {
|
|
22
|
+
default: withCtx(() => [
|
|
23
|
+
_ctx.heading ? (openBlock(), createBlock(unref(Yv), {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "celeste-command-label"
|
|
26
|
+
}, {
|
|
27
|
+
default: withCtx(() => [
|
|
28
|
+
createTextVNode(toDisplayString(_ctx.heading), 1)
|
|
29
|
+
]),
|
|
30
|
+
_: 1
|
|
31
|
+
})) : createCommentVNode("", true),
|
|
32
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
33
|
+
]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 16, ["class"]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const commandGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04d6d7e5"]]);
|
|
40
|
+
export {
|
|
41
|
+
commandGroup as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, mergeProps } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { A as At, U as Wv } from "./chunks/index.js";
|
|
4
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
+
const _hoisted_1 = {
|
|
6
|
+
class: "celeste-command-input",
|
|
7
|
+
"cmdk-input-wrapper": ""
|
|
8
|
+
};
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...{
|
|
11
|
+
inheritAttrs: false
|
|
12
|
+
},
|
|
13
|
+
__name: "command-input",
|
|
14
|
+
props: {
|
|
15
|
+
type: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
autoFocus: { type: Boolean },
|
|
18
|
+
asChild: { type: Boolean },
|
|
19
|
+
as: {},
|
|
20
|
+
class: {}
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const delegatedProps = computed(() => {
|
|
25
|
+
const { class: _, ...delegated } = props;
|
|
26
|
+
return delegated;
|
|
27
|
+
});
|
|
28
|
+
const forwardedProps = At(delegatedProps);
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
31
|
+
_cache[0] || (_cache[0] = createElementVNode("i", { class: "celeste-command-input-icon i-celeste-search-line" }, null, -1)),
|
|
32
|
+
createVNode(unref(Wv), mergeProps({ ...unref(forwardedProps), ..._ctx.$attrs }, {
|
|
33
|
+
"auto-focus": "",
|
|
34
|
+
class: unref(clsx)("celeste-command-input-primitive", props.class)
|
|
35
|
+
}), null, 16, ["class"])
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const commandInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0407a5d5"]]);
|
|
41
|
+
export {
|
|
42
|
+
commandInput as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { x as xe, X as Qv } from "./chunks/index.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "command-item",
|
|
5
|
+
props: {
|
|
6
|
+
value: {},
|
|
7
|
+
disabled: { type: Boolean },
|
|
8
|
+
asChild: { type: Boolean },
|
|
9
|
+
as: {},
|
|
10
|
+
class: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["select"],
|
|
13
|
+
setup(__props, { emit: __emit }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const emits = __emit;
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _, ...delegated } = props;
|
|
18
|
+
return delegated;
|
|
19
|
+
});
|
|
20
|
+
const forwarded = xe(delegatedProps, emits);
|
|
21
|
+
return (_ctx, _cache) => {
|
|
22
|
+
return openBlock(), createBlock(unref(Qv), mergeProps(unref(forwarded), {
|
|
23
|
+
class: ["celeste-command-item", props.class]
|
|
24
|
+
}), {
|
|
25
|
+
default: withCtx(() => [
|
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16, ["class"]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
_sfc_main as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, renderSlot } from "vue";
|
|
2
|
+
import { x as xe, $ as Xv } from "./chunks/index.js";
|
|
3
|
+
const _hoisted_1 = { role: "presentation" };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "command-list",
|
|
6
|
+
props: {
|
|
7
|
+
forceMount: { type: Boolean },
|
|
8
|
+
position: {},
|
|
9
|
+
bodyLock: { type: Boolean },
|
|
10
|
+
dismissable: { type: Boolean, default: false },
|
|
11
|
+
side: {},
|
|
12
|
+
sideOffset: {},
|
|
13
|
+
align: {},
|
|
14
|
+
alignOffset: {},
|
|
15
|
+
avoidCollisions: { type: Boolean },
|
|
16
|
+
collisionBoundary: {},
|
|
17
|
+
collisionPadding: {},
|
|
18
|
+
arrowPadding: {},
|
|
19
|
+
sticky: {},
|
|
20
|
+
hideWhenDetached: { type: Boolean },
|
|
21
|
+
updatePositionStrategy: {},
|
|
22
|
+
prioritizePosition: { type: Boolean },
|
|
23
|
+
asChild: { type: Boolean },
|
|
24
|
+
as: {},
|
|
25
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
26
|
+
class: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
29
|
+
setup(__props, { emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emits = __emit;
|
|
32
|
+
const delegatedProps = computed(() => {
|
|
33
|
+
const { class: _, ...delegated } = props;
|
|
34
|
+
return delegated;
|
|
35
|
+
});
|
|
36
|
+
const forwarded = xe(delegatedProps, emits);
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(unref(Xv), mergeProps(unref(forwarded), {
|
|
39
|
+
class: ["celeste-command-list", props.class]
|
|
40
|
+
}), {
|
|
41
|
+
default: withCtx(() => [
|
|
42
|
+
createElementVNode("div", _hoisted_1, [
|
|
43
|
+
renderSlot(_ctx.$slots, "default")
|
|
44
|
+
])
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 16, ["class"]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
_sfc_main as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { x as xe, a1 as Hv } from "./chunks/index.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "command-root",
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: { default: "" },
|
|
7
|
+
defaultValue: {},
|
|
8
|
+
open: { type: Boolean, default: true },
|
|
9
|
+
defaultOpen: { type: Boolean },
|
|
10
|
+
searchTerm: {},
|
|
11
|
+
selectedValue: {},
|
|
12
|
+
multiple: { type: Boolean },
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
name: {},
|
|
15
|
+
dir: {},
|
|
16
|
+
filterFunction: {},
|
|
17
|
+
displayValue: {},
|
|
18
|
+
resetSearchTermOnBlur: { type: Boolean },
|
|
19
|
+
asChild: { type: Boolean },
|
|
20
|
+
as: {},
|
|
21
|
+
class: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue", "update:open", "update:searchTerm", "update:selectedValue"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emits = __emit;
|
|
27
|
+
const delegatedProps = computed(() => {
|
|
28
|
+
const { class: _, ...delegated } = props;
|
|
29
|
+
return delegated;
|
|
30
|
+
});
|
|
31
|
+
const forwarded = xe(delegatedProps, emits);
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createBlock(unref(Hv), mergeProps(unref(forwarded), {
|
|
34
|
+
class: ["celeste-command-root", props.class]
|
|
35
|
+
}), {
|
|
36
|
+
default: withCtx(() => [
|
|
37
|
+
renderSlot(_ctx.$slots, "default")
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16, ["class"]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
_sfc_main as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { a2 as tm } from "./chunks/index.js";
|
|
4
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "command-separator",
|
|
7
|
+
props: {
|
|
8
|
+
asChild: { type: Boolean },
|
|
9
|
+
as: {},
|
|
10
|
+
class: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props;
|
|
16
|
+
return delegated;
|
|
17
|
+
});
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createBlock(unref(tm), mergeProps(delegatedProps.value, {
|
|
20
|
+
class: unref(clsx)("celeste-command-separator", props.class)
|
|
21
|
+
}), {
|
|
22
|
+
default: withCtx(() => [
|
|
23
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
}, 16, ["class"]);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const commandSeparator = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-547148a7"]]);
|
|
31
|
+
export {
|
|
32
|
+
commandSeparator as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, normalizeClass, withCtx, createElementVNode } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { f as O } from "./chunks/index.js";
|
|
4
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "compact-button",
|
|
7
|
+
props: {
|
|
8
|
+
class: {},
|
|
9
|
+
icon: {},
|
|
10
|
+
size: { default: "lg" },
|
|
11
|
+
rounded: { type: Boolean },
|
|
12
|
+
variant: { default: "stroke" },
|
|
13
|
+
asChild: { type: Boolean },
|
|
14
|
+
as: { default: "button" }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createBlock(unref(O), {
|
|
20
|
+
as: _ctx.as,
|
|
21
|
+
"as-child": _ctx.asChild,
|
|
22
|
+
class: normalizeClass(unref(clsx)(
|
|
23
|
+
"celeste-cbutton",
|
|
24
|
+
`celeste-cbutton-${_ctx.size}`,
|
|
25
|
+
`celeste-cbutton-${_ctx.variant}`,
|
|
26
|
+
_ctx.rounded && `celeste-cbutton-rounded`,
|
|
27
|
+
props.class
|
|
28
|
+
))
|
|
29
|
+
}, {
|
|
30
|
+
default: withCtx(() => [
|
|
31
|
+
createElementVNode("i", {
|
|
32
|
+
class: normalizeClass(_ctx.icon)
|
|
33
|
+
}, null, 2)
|
|
34
|
+
]),
|
|
35
|
+
_: 1
|
|
36
|
+
}, 8, ["as", "as-child", "class"]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const CompactButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c062bacd"]]);
|
|
41
|
+
export {
|
|
42
|
+
CompactButton as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
const fullToolbar = ref([
|
|
3
|
+
{
|
|
4
|
+
slug: "heading",
|
|
5
|
+
name: "Text styles",
|
|
6
|
+
children: [
|
|
7
|
+
{ option: "p", name: "Normal text", active: "paragraph" },
|
|
8
|
+
{ option: "1", name: "Heading 1", active: { level: 1 } },
|
|
9
|
+
{ option: "2", name: "Heading 2", active: { level: 2 } },
|
|
10
|
+
{ option: "3", name: "Heading 3", active: { level: 3 } },
|
|
11
|
+
{ option: "4", name: "Heading 4", active: { level: 4 } },
|
|
12
|
+
{ option: "5", name: "Heading 5", active: { level: 5 } },
|
|
13
|
+
{ option: "6", name: "Heading 6", active: { level: 6 } }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{ type: "divider" },
|
|
17
|
+
{
|
|
18
|
+
slug: "fontSize",
|
|
19
|
+
name: "Font size",
|
|
20
|
+
children: [
|
|
21
|
+
{ option: "8px", name: "8", active: { fontSize: "8px" } },
|
|
22
|
+
{ option: "10px", name: "10", active: { fontSize: "10px" } },
|
|
23
|
+
{ option: "12px", name: "12", active: { fontSize: "12px" } },
|
|
24
|
+
{ option: "14px", name: "14", active: { fontSize: "14px" } },
|
|
25
|
+
{ option: "16px", name: "16", active: { fontSize: "16px" } },
|
|
26
|
+
{ option: "18px", name: "18", active: { fontSize: "18px" } },
|
|
27
|
+
{ option: "24px", name: "24", active: { fontSize: "24px" } },
|
|
28
|
+
{ option: "30px", name: "30", active: { fontSize: "30px" } },
|
|
29
|
+
{ option: "36px", name: "36", active: { fontSize: "36px" } },
|
|
30
|
+
{ option: "48px", name: "48", active: { fontSize: "48px" } },
|
|
31
|
+
{ option: "60px", name: "60", active: { fontSize: "60px" } },
|
|
32
|
+
{ option: "72px", name: "72", active: { fontSize: "72px" } },
|
|
33
|
+
{ option: "96px", name: "96", active: { fontSize: "96px" } }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{ type: "divider" },
|
|
37
|
+
{
|
|
38
|
+
slug: "color",
|
|
39
|
+
name: "Text color",
|
|
40
|
+
children: [
|
|
41
|
+
{ option: "#000000", name: "Black", icon: "i-celeste-circle-fill", active: { color: "#000000" } },
|
|
42
|
+
{ option: "#7B7B7B", name: "Gray", icon: "i-celeste-circle-fill", active: { color: "#7B7B7B" } },
|
|
43
|
+
{ option: "#335CFF", name: "Blue", icon: "i-celeste-circle-fill", active: { color: "#335CFF" } },
|
|
44
|
+
{ option: "#FA7319", name: "Orange", icon: "i-celeste-circle-fill", active: { color: "#FA7319" } },
|
|
45
|
+
{ option: "#7D52F4", name: "Purple", icon: "i-celeste-circle-fill", active: { color: "#7D52F4" } },
|
|
46
|
+
{ option: "#47C2FF", name: "Sky", icon: "i-celeste-circle-fill", active: { color: "#47C2FF" } }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{ type: "divider" },
|
|
50
|
+
{ slug: "bold", name: "Bold", icon: "i-celeste-bold", active: "bold" },
|
|
51
|
+
{ slug: "italic", name: "Italic", icon: "i-celeste-italic", active: "italic" },
|
|
52
|
+
{ slug: "underline", name: "Underline", icon: "i-celeste-underline", active: "underline" },
|
|
53
|
+
{ slug: "strike", name: "Strike", icon: "i-celeste-strikethrough", active: "strike" },
|
|
54
|
+
{ type: "divider" },
|
|
55
|
+
{ slug: "bulletList", name: "Bulleted list", icon: "i-celeste-list-unordered", active: "bulletList" },
|
|
56
|
+
{ slug: "orderedList", name: "Numbered list", icon: "i-celeste-list-ordered", active: "orderedList" },
|
|
57
|
+
{ type: "divider" },
|
|
58
|
+
{
|
|
59
|
+
slug: "align",
|
|
60
|
+
name: "Text alignment",
|
|
61
|
+
children: [
|
|
62
|
+
{ option: "left", name: "Left align", icon: "i-celeste-align-left", active: { textAlign: "left" } },
|
|
63
|
+
{ option: "center", name: "Center align", icon: "i-celeste-align-center", active: { textAlign: "center" } },
|
|
64
|
+
{ option: "right", name: "Right align", icon: "i-celeste-align-right", active: { textAlign: "right" } },
|
|
65
|
+
{ option: "justify", name: "Justify", icon: "i-celeste-align-justify", active: { textAlign: "justify" } }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{ type: "divider" },
|
|
69
|
+
{ slug: "link", name: "Insert Link", icon: "i-celeste-link", active: "link" },
|
|
70
|
+
{ type: "divider" },
|
|
71
|
+
{ slug: "undo", name: "Undo", icon: "i-celeste-arrow-go-back-line", active: "undo" },
|
|
72
|
+
{ slug: "redo", name: "Redo", icon: "i-celeste-arrow-go-forward-line", active: "redo" },
|
|
73
|
+
{ slug: "clear", name: "Clear style", icon: "i-celeste-format-clear", active: "clear" }
|
|
74
|
+
]);
|
|
75
|
+
function onActionClick(editor, slug, option = null, showLinkBubble) {
|
|
76
|
+
var _a;
|
|
77
|
+
const chain = editor.chain().focus();
|
|
78
|
+
if (!chain) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const actionTriggers = {
|
|
82
|
+
heading: () => {
|
|
83
|
+
if (!option) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (option === "p") {
|
|
87
|
+
chain.setParagraph().run();
|
|
88
|
+
} else {
|
|
89
|
+
const headingLevel = Number(option);
|
|
90
|
+
chain.toggleHeading({ level: headingLevel }).run();
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
fontSize: () => {
|
|
94
|
+
editor.chain().focus().setFontSize(option ?? "16px").run();
|
|
95
|
+
},
|
|
96
|
+
color: () => {
|
|
97
|
+
editor.chain().focus().setColor(option ?? "#000000").run();
|
|
98
|
+
},
|
|
99
|
+
bold: () => chain.toggleBold().run(),
|
|
100
|
+
italic: () => chain.toggleItalic().run(),
|
|
101
|
+
underline: () => chain.toggleUnderline().run(),
|
|
102
|
+
strike: () => chain.toggleStrike().run(),
|
|
103
|
+
bulletList: () => chain.toggleBulletList().run(),
|
|
104
|
+
orderedList: () => chain.toggleOrderedList().run(),
|
|
105
|
+
align: () => chain.setTextAlign(option ?? "left").run(),
|
|
106
|
+
link: () => {
|
|
107
|
+
if (showLinkBubble) {
|
|
108
|
+
showLinkBubble();
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
undo: () => chain.undo().run(),
|
|
112
|
+
redo: () => chain.redo().run(),
|
|
113
|
+
clear: () => chain.clearNodes().unsetAllMarks().run()
|
|
114
|
+
};
|
|
115
|
+
(_a = actionTriggers[slug]) == null ? void 0 : _a.call(actionTriggers);
|
|
116
|
+
}
|
|
117
|
+
function selectedOption(editor, children) {
|
|
118
|
+
if (!Array.isArray(children)) {
|
|
119
|
+
return "";
|
|
120
|
+
}
|
|
121
|
+
for (const child of children) {
|
|
122
|
+
if (Object.prototype.hasOwnProperty.call(child.active, "fontSize")) {
|
|
123
|
+
const currentFontSize = editor.getAttributes("textStyle").fontSize || "16px";
|
|
124
|
+
return currentFontSize;
|
|
125
|
+
}
|
|
126
|
+
if (editor.isActive(child.active)) {
|
|
127
|
+
return child.option;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return children[0].option;
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
fullToolbar,
|
|
134
|
+
onActionClick,
|
|
135
|
+
selectedOption
|
|
136
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode, toDisplayString, createBlock, mergeProps, createVNode, withCtx, normalizeProps } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { m as mg, h as hg } from "./chunks/index.js";
|
|
4
|
+
import Badge from "./badge.js";
|
|
5
|
+
import Button from "./button.js";
|
|
6
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
7
|
+
const _hoisted_1 = ["aria-disabled"];
|
|
8
|
+
const _hoisted_2 = { class: "celeste-context-menu-item-info" };
|
|
9
|
+
const _hoisted_3 = ["innerHTML"];
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "celeste-context-menu-item-sublabel"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "celeste-context-menu-item-description"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "celeste-context-menu-item-shortcut"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_7 = { class: "celeste-context-menu-item-switch" };
|
|
23
|
+
const _hoisted_8 = { class: "celeste-context-menu-item-button" };
|
|
24
|
+
const _hoisted_9 = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "celeste-context-menu-item-suffix"
|
|
27
|
+
};
|
|
28
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
29
|
+
__name: "context-menu-item",
|
|
30
|
+
props: /* @__PURE__ */ mergeModels({
|
|
31
|
+
size: { default: "sm" },
|
|
32
|
+
class: {},
|
|
33
|
+
label: {},
|
|
34
|
+
sublabel: {},
|
|
35
|
+
description: {},
|
|
36
|
+
disabled: { type: Boolean, default: false },
|
|
37
|
+
focused: { type: Boolean, default: false },
|
|
38
|
+
badgeProps: {},
|
|
39
|
+
shortcut: {},
|
|
40
|
+
toggle: { type: Boolean },
|
|
41
|
+
selected: { type: Boolean },
|
|
42
|
+
buttonProps: {},
|
|
43
|
+
rightIcon: {}
|
|
44
|
+
}, {
|
|
45
|
+
"selected": { type: Boolean },
|
|
46
|
+
"selectedModifiers": {}
|
|
47
|
+
}),
|
|
48
|
+
emits: ["update:selected"],
|
|
49
|
+
setup(__props) {
|
|
50
|
+
const props = __props;
|
|
51
|
+
const selectedModel = useModel(__props, "selected");
|
|
52
|
+
const mergedBadgeProps = computed(() => ({
|
|
53
|
+
...props.badgeProps,
|
|
54
|
+
disabled: props.disabled
|
|
55
|
+
}));
|
|
56
|
+
const mergedButtonProps = computed(() => {
|
|
57
|
+
return props.buttonProps ? {
|
|
58
|
+
size: props.size === "sm" ? "xxs" : "xs",
|
|
59
|
+
variant: props.size === "sm" ? "ghost" : "lighter",
|
|
60
|
+
disabled: props.disabled,
|
|
61
|
+
...props.buttonProps
|
|
62
|
+
} : null;
|
|
63
|
+
});
|
|
64
|
+
return (_ctx, _cache) => {
|
|
65
|
+
return openBlock(), createElementBlock("div", {
|
|
66
|
+
tabindex: "0",
|
|
67
|
+
"aria-disabled": _ctx.disabled,
|
|
68
|
+
class: normalizeClass(unref(clsx)(
|
|
69
|
+
"celeste-context-menu-item",
|
|
70
|
+
`celeste-context-menu-item-size-${_ctx.size}`,
|
|
71
|
+
{ "celeste-context-menu-item-disabled": _ctx.disabled },
|
|
72
|
+
{ "celeste-context-menu-item-selected": __props.selected },
|
|
73
|
+
{ "celeste-context-menu-item-focused": _ctx.focused }
|
|
74
|
+
))
|
|
75
|
+
}, [
|
|
76
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: normalizeClass(unref(clsx)(
|
|
79
|
+
"celeste-context-menu-item-prefix",
|
|
80
|
+
`celeste-context-menu-item-prefix-${_ctx.size}`
|
|
81
|
+
))
|
|
82
|
+
}, [
|
|
83
|
+
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
84
|
+
], 2)) : createCommentVNode("", true),
|
|
85
|
+
createElementVNode("div", _hoisted_2, [
|
|
86
|
+
createElementVNode("div", {
|
|
87
|
+
class: normalizeClass(unref(clsx)(
|
|
88
|
+
"celeste-context-menu-item-header",
|
|
89
|
+
`celeste-context-menu-item-header-${_ctx.size}`
|
|
90
|
+
))
|
|
91
|
+
}, [
|
|
92
|
+
createElementVNode("span", {
|
|
93
|
+
class: "celeste-context-menu-item-label",
|
|
94
|
+
innerHTML: _ctx.label
|
|
95
|
+
}, null, 8, _hoisted_3),
|
|
96
|
+
_ctx.sublabel ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(_ctx.sublabel), 1)) : createCommentVNode("", true)
|
|
97
|
+
], 2),
|
|
98
|
+
props.description && props.size === "lg" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true)
|
|
99
|
+
]),
|
|
100
|
+
mergedBadgeProps.value ? (openBlock(), createBlock(Badge, mergeProps({ key: 1 }, mergedBadgeProps.value, { class: "celeste-context-menu-item-badge" }), null, 16)) : createCommentVNode("", true),
|
|
101
|
+
_ctx.shortcut ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.shortcut), 1)) : createCommentVNode("", true),
|
|
102
|
+
createElementVNode("span", _hoisted_7, [
|
|
103
|
+
createVNode(unref(mg), {
|
|
104
|
+
checked: selectedModel.value,
|
|
105
|
+
"onUpdate:checked": _cache[0] || (_cache[0] = ($event) => selectedModel.value = $event),
|
|
106
|
+
disabled: _ctx.disabled,
|
|
107
|
+
class: "celeste-switch-root"
|
|
108
|
+
}, {
|
|
109
|
+
default: withCtx(() => [
|
|
110
|
+
createVNode(unref(hg), { class: "celeste-switch-thumb" })
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
}, 8, ["checked", "disabled"])
|
|
114
|
+
]),
|
|
115
|
+
createElementVNode("span", _hoisted_8, [
|
|
116
|
+
mergedButtonProps.value ? (openBlock(), createBlock(Button, normalizeProps(mergeProps({ key: 0 }, mergedButtonProps.value)), {
|
|
117
|
+
default: withCtx(() => [
|
|
118
|
+
renderSlot(_ctx.$slots, "button-label", {}, void 0, true)
|
|
119
|
+
]),
|
|
120
|
+
_: 3
|
|
121
|
+
}, 16)) : createCommentVNode("", true)
|
|
122
|
+
]),
|
|
123
|
+
_ctx.rightIcon ? (openBlock(), createElementBlock("span", _hoisted_9, [
|
|
124
|
+
createElementVNode("i", {
|
|
125
|
+
class: normalizeClass(_ctx.rightIcon)
|
|
126
|
+
}, null, 2)
|
|
127
|
+
])) : createCommentVNode("", true)
|
|
128
|
+
], 10, _hoisted_1);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const contextMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3d94f388"]]);
|
|
133
|
+
export {
|
|
134
|
+
contextMenuItem as default
|
|
135
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function uid(prefix = "", random = false) {
|
|
2
|
+
const sec = Date.now() * 1e3 + Math.random() * 1e3;
|
|
3
|
+
const id = sec.toString(16).replace(/\./g, "").padEnd(14, "0");
|
|
4
|
+
return `${prefix}${id}${random ? `.${Math.trunc(Math.random() * 1e8)}` : ""}`;
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
uid
|
|
8
|
+
};
|