@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,156 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
+
import CompactButton from "./compact-button.js";
|
|
3
|
+
import SelectContent from "./select-content.js";
|
|
4
|
+
import SelectIcon from "./select-icon.js";
|
|
5
|
+
import SelectItem from "./select-item.js";
|
|
6
|
+
import SelectTrigger from "./select-trigger.js";
|
|
7
|
+
import { _ as _sfc_main$1 } from "./chunks/select.js";
|
|
8
|
+
import Tooltip from "./tooltip.js";
|
|
9
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
10
|
+
const _hoisted_1 = { class: "show-more-wrapper" };
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "extra-settings",
|
|
13
|
+
props: {
|
|
14
|
+
editor: {}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const defaultValue = ref("");
|
|
19
|
+
const extraSettings = [
|
|
20
|
+
{
|
|
21
|
+
name: "Copy",
|
|
22
|
+
icon: "i-celeste-file-copy-line"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "Cut",
|
|
26
|
+
icon: "i-celeste-scissors-line"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "Delete",
|
|
30
|
+
icon: "i-celeste-delete-bin-4-line"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "Duplicate",
|
|
34
|
+
icon: "i-celeste-add-circle-line"
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
function selectedText(editor) {
|
|
38
|
+
const { from, to } = editor.state.selection;
|
|
39
|
+
const text = editor.state.doc.textBetween(from, to, "\n");
|
|
40
|
+
return text || null;
|
|
41
|
+
}
|
|
42
|
+
async function copySelectionToClipboard(editor) {
|
|
43
|
+
const text = selectedText(editor);
|
|
44
|
+
if (!text) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
if (!window.isSecureContext) {
|
|
49
|
+
throw new Error("Clipboard API is not available in insecure contexts");
|
|
50
|
+
}
|
|
51
|
+
const copyText = await navigator.clipboard.writeText(text);
|
|
52
|
+
return copyText;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error(error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function cutSelection(editor) {
|
|
58
|
+
await copySelectionToClipboard(editor);
|
|
59
|
+
deleteSelection(editor);
|
|
60
|
+
}
|
|
61
|
+
function deleteSelection(editor) {
|
|
62
|
+
return editor.commands.deleteSelection();
|
|
63
|
+
}
|
|
64
|
+
function duplicateSelection(editor) {
|
|
65
|
+
const { to } = editor.state.selection;
|
|
66
|
+
const text = selectedText(editor);
|
|
67
|
+
if (!text) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
return editor.commands.insertContentAt(to, text);
|
|
71
|
+
}
|
|
72
|
+
function clearSelectedValue() {
|
|
73
|
+
defaultValue.value = "";
|
|
74
|
+
}
|
|
75
|
+
function onActionClick(name, editor) {
|
|
76
|
+
switch (name) {
|
|
77
|
+
case "Copy":
|
|
78
|
+
copySelectionToClipboard(editor);
|
|
79
|
+
break;
|
|
80
|
+
case "Cut":
|
|
81
|
+
cutSelection(editor);
|
|
82
|
+
break;
|
|
83
|
+
case "Delete":
|
|
84
|
+
deleteSelection(editor);
|
|
85
|
+
break;
|
|
86
|
+
case "Duplicate":
|
|
87
|
+
duplicateSelection(editor);
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return (_ctx, _cache) => {
|
|
92
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
93
|
+
createVNode(_sfc_main$1, {
|
|
94
|
+
modelValue: defaultValue.value,
|
|
95
|
+
"onUpdate:modelValue": [
|
|
96
|
+
_cache[0] || (_cache[0] = ($event) => defaultValue.value = $event),
|
|
97
|
+
_cache[1] || (_cache[1] = ($event) => onActionClick($event, props.editor))
|
|
98
|
+
],
|
|
99
|
+
"onUpdate:open": clearSelectedValue
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [
|
|
102
|
+
createVNode(SelectTrigger, { variant: "inline" }, {
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
createVNode(Tooltip, {
|
|
105
|
+
title: "Extra settings",
|
|
106
|
+
variant: "dark"
|
|
107
|
+
}, {
|
|
108
|
+
default: withCtx(() => [
|
|
109
|
+
createVNode(CompactButton, {
|
|
110
|
+
icon: "i-celeste-more-2-line",
|
|
111
|
+
variant: "ghost"
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}),
|
|
119
|
+
createVNode(SelectContent, {
|
|
120
|
+
align: "end",
|
|
121
|
+
width: "fit"
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(extraSettings, (item, index) => {
|
|
125
|
+
return createVNode(SelectItem, {
|
|
126
|
+
key: index,
|
|
127
|
+
value: item.name
|
|
128
|
+
}, {
|
|
129
|
+
default: withCtx(() => [
|
|
130
|
+
createVNode(SelectIcon, null, {
|
|
131
|
+
default: withCtx(() => [
|
|
132
|
+
createElementVNode("i", {
|
|
133
|
+
class: normalizeClass(item.icon)
|
|
134
|
+
}, null, 2)
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, 1024),
|
|
138
|
+
createElementVNode("span", null, toDisplayString(item.name), 1)
|
|
139
|
+
]),
|
|
140
|
+
_: 2
|
|
141
|
+
}, 1032, ["value"]);
|
|
142
|
+
}), 64))
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 8, ["modelValue"])
|
|
149
|
+
]);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
const ExtraSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-49d51443"]]);
|
|
154
|
+
export {
|
|
155
|
+
ExtraSettings as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, normalizeClass, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { f as O } from "./chunks/index.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "fancy-button",
|
|
8
|
+
props: {
|
|
9
|
+
class: {},
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
intent: { default: "primary" },
|
|
12
|
+
asChild: { type: Boolean },
|
|
13
|
+
as: { default: "button" }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return openBlock(), createBlock(unref(O), {
|
|
19
|
+
as: _ctx.as,
|
|
20
|
+
"as-child": _ctx.asChild,
|
|
21
|
+
class: normalizeClass(unref(clsx)(
|
|
22
|
+
"celeste-fbutton",
|
|
23
|
+
`celeste-fbutton-${_ctx.intent}`,
|
|
24
|
+
`celeste-fbutton-${_ctx.size}`,
|
|
25
|
+
props.class
|
|
26
|
+
))
|
|
27
|
+
}, {
|
|
28
|
+
default: withCtx(() => [
|
|
29
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
30
|
+
]),
|
|
31
|
+
_: 3
|
|
32
|
+
}, 8, ["as", "as-child", "class"]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const fancyButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cc3b0550"]]);
|
|
37
|
+
export {
|
|
38
|
+
fancyButton as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
+
const _hoisted_1 = ["role"];
|
|
5
|
+
const _hoisted_2 = { key: 1 };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "hint-text",
|
|
8
|
+
props: {
|
|
9
|
+
text: {},
|
|
10
|
+
icon: {},
|
|
11
|
+
class: {},
|
|
12
|
+
state: { default: "default" }
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return openBlock(), createElementBlock("div", {
|
|
18
|
+
role: props.state === "error" ? "alert" : "note",
|
|
19
|
+
class: normalizeClass(unref(clsx)(
|
|
20
|
+
"celeste-hint-text",
|
|
21
|
+
`celeste-hint-text-${_ctx.state}`,
|
|
22
|
+
props.class
|
|
23
|
+
))
|
|
24
|
+
}, [
|
|
25
|
+
_ctx.icon ? (openBlock(), createElementBlock("i", {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: normalizeClass(_ctx.icon)
|
|
28
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
29
|
+
_ctx.text ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(_ctx.text), 1)) : createCommentVNode("", true)
|
|
30
|
+
], 10, _hoisted_1);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const hintText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-37aef9f7"]]);
|
|
35
|
+
export {
|
|
36
|
+
hintText as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent, useModel, ref, useTemplateRef, watch, computed, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeStyle } from "vue";
|
|
2
|
+
import { getAbsolutePosition, getPageXYFromEvent, resolveArrowDirection } from "./color.js";
|
|
3
|
+
import { useUserPageSelection } from "./use-user-select.js";
|
|
4
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
+
const _hoisted_1 = { class: "celeste-color-slider" };
|
|
6
|
+
const _hoisted_2 = ["aria-valuenow"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "hue-slider",
|
|
9
|
+
props: {
|
|
10
|
+
"modelValue": {
|
|
11
|
+
default: 0
|
|
12
|
+
},
|
|
13
|
+
"modelModifiers": {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const hue = useModel(__props, "modelValue");
|
|
18
|
+
const pullDirection = ref();
|
|
19
|
+
const containerRef = useTemplateRef("slider-track");
|
|
20
|
+
const { preventPageUserSelect, allowPageUserSelect } = useUserPageSelection();
|
|
21
|
+
watch(hue, (newHue, oldHue) => {
|
|
22
|
+
if (newHue !== 0 && newHue - oldHue > 0)
|
|
23
|
+
pullDirection.value = "right";
|
|
24
|
+
if (newHue !== 0 && newHue - oldHue < 0)
|
|
25
|
+
pullDirection.value = "left";
|
|
26
|
+
});
|
|
27
|
+
const pointerLeft = computed(
|
|
28
|
+
() => {
|
|
29
|
+
if (hue.value === 0 && pullDirection.value === "right")
|
|
30
|
+
return "100%";
|
|
31
|
+
return `${hue.value * 100 / 360}%`;
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
const trackThumbBg = computed(() => {
|
|
35
|
+
return `hsl(${hue.value}, 100%, 50%)`;
|
|
36
|
+
});
|
|
37
|
+
function handleChange(e, skip) {
|
|
38
|
+
if (!skip) {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
}
|
|
41
|
+
const container = containerRef.value;
|
|
42
|
+
if (!container) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const containerWidth = container.clientWidth;
|
|
46
|
+
const { x: xOffset } = getAbsolutePosition(container);
|
|
47
|
+
const { x: pageX } = getPageXYFromEvent(e);
|
|
48
|
+
const left = pageX - xOffset;
|
|
49
|
+
let h;
|
|
50
|
+
let percent;
|
|
51
|
+
if (left < 0) {
|
|
52
|
+
h = 0;
|
|
53
|
+
} else if (left > containerWidth) {
|
|
54
|
+
h = 360;
|
|
55
|
+
} else {
|
|
56
|
+
percent = left * 100 / containerWidth;
|
|
57
|
+
h = Math.round(360 * percent / 100);
|
|
58
|
+
}
|
|
59
|
+
if (hue.value !== h) {
|
|
60
|
+
emitChange(h);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function emitChange(h) {
|
|
64
|
+
hue.value = h;
|
|
65
|
+
}
|
|
66
|
+
function handleMouseDown(e) {
|
|
67
|
+
handleChange(e, true);
|
|
68
|
+
preventPageUserSelect();
|
|
69
|
+
window.addEventListener("mousemove", handleChange);
|
|
70
|
+
window.addEventListener("mouseup", handleMouseUp);
|
|
71
|
+
}
|
|
72
|
+
function handleMouseUp() {
|
|
73
|
+
allowPageUserSelect();
|
|
74
|
+
unbindEventListeners();
|
|
75
|
+
}
|
|
76
|
+
function unbindEventListeners() {
|
|
77
|
+
window.removeEventListener("mousemove", handleChange);
|
|
78
|
+
window.removeEventListener("mouseup", handleMouseUp);
|
|
79
|
+
}
|
|
80
|
+
function handleKeyDown(e) {
|
|
81
|
+
const direction = resolveArrowDirection(e);
|
|
82
|
+
if (!direction) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
const currentValue = hue.value;
|
|
87
|
+
let newValue;
|
|
88
|
+
switch (direction) {
|
|
89
|
+
case "left": {
|
|
90
|
+
newValue = currentValue - 1 < 0 ? 0 : Math.floor(currentValue - 1);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case "right": {
|
|
94
|
+
newValue = currentValue + 1 > 360 ? 360 : Math.ceil(currentValue + 1);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (typeof newValue !== "undefined") {
|
|
99
|
+
emitChange(newValue);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
onUnmounted(() => {
|
|
103
|
+
unbindEventListeners();
|
|
104
|
+
});
|
|
105
|
+
return (_ctx, _cache) => {
|
|
106
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
107
|
+
createElementVNode("div", {
|
|
108
|
+
ref: "slider-track",
|
|
109
|
+
class: "slider-track",
|
|
110
|
+
role: "slider",
|
|
111
|
+
"aria-valuenow": hue.value,
|
|
112
|
+
"aria-valuemin": "0",
|
|
113
|
+
"aria-valuemax": "360",
|
|
114
|
+
"aria-label": "Hue",
|
|
115
|
+
tabindex: "0",
|
|
116
|
+
onMousedown: handleMouseDown,
|
|
117
|
+
onTouchmovePassive: handleChange,
|
|
118
|
+
onTouchstartPassive: handleChange,
|
|
119
|
+
onKeydown: handleKeyDown
|
|
120
|
+
}, [
|
|
121
|
+
createElementVNode("div", {
|
|
122
|
+
class: "celeste-color-thumb",
|
|
123
|
+
style: normalizeStyle({ left: pointerLeft.value, background: trackThumbBg.value }),
|
|
124
|
+
role: "presentation"
|
|
125
|
+
}, null, 4)
|
|
126
|
+
], 40, _hoisted_2)
|
|
127
|
+
]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const HueSlider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cb479a28"]]);
|
|
132
|
+
export {
|
|
133
|
+
HueSlider as default
|
|
134
|
+
};
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import Alert from "./alert.js";
|
|
2
|
+
import Badge from "./badge.js";
|
|
3
|
+
import statusBadge from "./status-badge.js";
|
|
4
|
+
import Button from "./button.js";
|
|
5
|
+
import CompactButton from "./compact-button.js";
|
|
6
|
+
import fancyButton from "./fancy-button.js";
|
|
7
|
+
import LinkButton from "./link-button.js";
|
|
8
|
+
import socialButton from "./social-button.js";
|
|
9
|
+
import checkboxLabel from "./checkbox-label.js";
|
|
10
|
+
import { _ as _sfc_main } from "./chunks/checkbox.vue_vue_type_style_index_0_lang.js";
|
|
11
|
+
import { _ as _sfc_main$1 } from "./chunks/combobox-anchor.js";
|
|
12
|
+
import ComboboxEmpty from "./combobox-empty.js";
|
|
13
|
+
import ComboboxGroup from "./combobox-group.js";
|
|
14
|
+
import ComboboxInput from "./combobox-input.js";
|
|
15
|
+
import ComboboxItem from "./combobox-item.js";
|
|
16
|
+
import ComboboxList from "./combobox-list.js";
|
|
17
|
+
import ComboboxRoot from "./combobox-root.js";
|
|
18
|
+
import ComboboxSeparator from "./combobox-separator.js";
|
|
19
|
+
import ComboboxTrigger from "./combobox-trigger.js";
|
|
20
|
+
import combobox from "./combobox.js";
|
|
21
|
+
import { _ as _sfc_main$2 } from "./chunks/content-divider.vue_vue_type_style_index_0_lang.js";
|
|
22
|
+
import contextMenuItem from "./context-menu-item.js";
|
|
23
|
+
import DropdownItem from "./dropdown-item.js";
|
|
24
|
+
import dropdown from "./dropdown.js";
|
|
25
|
+
import { _ as _sfc_main$3 } from "./chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js";
|
|
26
|
+
import dropdownMenuGroup from "./dropdown-menu-group.js";
|
|
27
|
+
import dropdownMenuItem from "./dropdown-menu-item.js";
|
|
28
|
+
import dropdownMenuLabel from "./dropdown-menu-label.js";
|
|
29
|
+
import dropdownMenuSeparator from "./dropdown-menu-separator.js";
|
|
30
|
+
import { _ as _sfc_main$5 } from "./chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js";
|
|
31
|
+
import { _ as _sfc_main$6 } from "./chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js";
|
|
32
|
+
import { _ as _sfc_main$4 } from "./chunks/dropdown-menu-sub.js";
|
|
33
|
+
import dropdownMenuTrigger from "./dropdown-menu-trigger.js";
|
|
34
|
+
import dropdownMenu from "./dropdown-menu.js";
|
|
35
|
+
import hintText from "./hint-text.js";
|
|
36
|
+
import Label from "./label.js";
|
|
37
|
+
import modalBody from "./modal-body.js";
|
|
38
|
+
import { _ as _sfc_main$8 } from "./chunks/modal-close.js";
|
|
39
|
+
import modalContent from "./modal-content.js";
|
|
40
|
+
import modalFooter from "./modal-footer.js";
|
|
41
|
+
import modalHeader from "./modal-header.js";
|
|
42
|
+
import { _ as _sfc_main$9 } from "./chunks/modal-trigger.js";
|
|
43
|
+
import { _ as _sfc_main$7 } from "./chunks/modal.js";
|
|
44
|
+
import PopoverContent from "./popover-content.js";
|
|
45
|
+
import PopoverTrigger from "./popover-trigger.js";
|
|
46
|
+
import { _ as _sfc_main$a } from "./chunks/popover.js";
|
|
47
|
+
import richEditor from "./rich-editor.js";
|
|
48
|
+
import { _ as _sfc_main$b } from "./chunks/scroll-area.js";
|
|
49
|
+
import segmentedControlItem from "./segmented-control-item.js";
|
|
50
|
+
import segmentedControl from "./segmented-control.js";
|
|
51
|
+
import SelectContent from "./select-content.js";
|
|
52
|
+
import { _ as _sfc_main$d } from "./chunks/select-group.js";
|
|
53
|
+
import SelectIcon from "./select-icon.js";
|
|
54
|
+
import SelectItem from "./select-item.js";
|
|
55
|
+
import selectLabel from "./select-label.js";
|
|
56
|
+
import selectSeparator from "./select-separator.js";
|
|
57
|
+
import SelectTrigger from "./select-trigger.js";
|
|
58
|
+
import SelectValue from "./select-value.js";
|
|
59
|
+
import { _ as _sfc_main$c } from "./chunks/select.js";
|
|
60
|
+
import { _ as _sfc_main$e } from "./chunks/slider.vue_vue_type_style_index_0_lang.js";
|
|
61
|
+
import sonnerAlert from "./sonner-alert.js";
|
|
62
|
+
import { _ as _sfc_main$f } from "./chunks/sonner.js";
|
|
63
|
+
import { _ as _sfc_main$g } from "./chunks/switch.vue_vue_type_style_index_0_lang.js";
|
|
64
|
+
import tabMenuContent from "./tab-menu-content.js";
|
|
65
|
+
import tabMenuItem from "./tab-menu-item.js";
|
|
66
|
+
import tabMenuList from "./tab-menu-list.js";
|
|
67
|
+
import tabMenu from "./tab-menu.js";
|
|
68
|
+
import TextInputAffix from "./text-input-affix.js";
|
|
69
|
+
import TextInputButton from "./text-input-button.js";
|
|
70
|
+
import TextInput from "./text-input.js";
|
|
71
|
+
import textarea from "./textarea.js";
|
|
72
|
+
import Tooltip from "./tooltip.js";
|
|
73
|
+
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74
|
+
__proto__: null,
|
|
75
|
+
Alert,
|
|
76
|
+
Badge,
|
|
77
|
+
Button,
|
|
78
|
+
Checkbox: _sfc_main,
|
|
79
|
+
CheckboxLabel: checkboxLabel,
|
|
80
|
+
Combobox: combobox,
|
|
81
|
+
ComboboxAnchor: _sfc_main$1,
|
|
82
|
+
ComboboxEmpty,
|
|
83
|
+
ComboboxGroup,
|
|
84
|
+
ComboboxInput,
|
|
85
|
+
ComboboxItem,
|
|
86
|
+
ComboboxList,
|
|
87
|
+
ComboboxRoot,
|
|
88
|
+
ComboboxSeparator,
|
|
89
|
+
ComboboxTrigger,
|
|
90
|
+
CompactButton,
|
|
91
|
+
ContentDivider: _sfc_main$2,
|
|
92
|
+
ContextMenuItem: contextMenuItem,
|
|
93
|
+
Dropdown: dropdown,
|
|
94
|
+
DropdownItem,
|
|
95
|
+
DropdownMenu: dropdownMenu,
|
|
96
|
+
DropdownMenuContent: _sfc_main$3,
|
|
97
|
+
DropdownMenuGroup: dropdownMenuGroup,
|
|
98
|
+
DropdownMenuItem: dropdownMenuItem,
|
|
99
|
+
DropdownMenuLabel: dropdownMenuLabel,
|
|
100
|
+
DropdownMenuSeparator: dropdownMenuSeparator,
|
|
101
|
+
DropdownMenuSub: _sfc_main$4,
|
|
102
|
+
DropdownMenuSubContent: _sfc_main$5,
|
|
103
|
+
DropdownMenuSubTrigger: _sfc_main$6,
|
|
104
|
+
DropdownMenuTrigger: dropdownMenuTrigger,
|
|
105
|
+
FancyButton: fancyButton,
|
|
106
|
+
HintText: hintText,
|
|
107
|
+
Label,
|
|
108
|
+
LinkButton,
|
|
109
|
+
Modal: _sfc_main$7,
|
|
110
|
+
ModalBody: modalBody,
|
|
111
|
+
ModalClose: _sfc_main$8,
|
|
112
|
+
ModalContent: modalContent,
|
|
113
|
+
ModalFooter: modalFooter,
|
|
114
|
+
ModalHeader: modalHeader,
|
|
115
|
+
ModalTrigger: _sfc_main$9,
|
|
116
|
+
Popover: _sfc_main$a,
|
|
117
|
+
PopoverContent,
|
|
118
|
+
PopoverTrigger,
|
|
119
|
+
RichEditor: richEditor,
|
|
120
|
+
ScrollArea: _sfc_main$b,
|
|
121
|
+
SegmentedControl: segmentedControl,
|
|
122
|
+
SegmentedControlItem: segmentedControlItem,
|
|
123
|
+
Select: _sfc_main$c,
|
|
124
|
+
SelectContent,
|
|
125
|
+
SelectGroup: _sfc_main$d,
|
|
126
|
+
SelectIcon,
|
|
127
|
+
SelectItem,
|
|
128
|
+
SelectLabel: selectLabel,
|
|
129
|
+
SelectSeparator: selectSeparator,
|
|
130
|
+
SelectTrigger,
|
|
131
|
+
SelectValue,
|
|
132
|
+
Slider: _sfc_main$e,
|
|
133
|
+
SocialButton: socialButton,
|
|
134
|
+
Sonner: _sfc_main$f,
|
|
135
|
+
SonnerAlert: sonnerAlert,
|
|
136
|
+
StatusBadge: statusBadge,
|
|
137
|
+
Switch: _sfc_main$g,
|
|
138
|
+
TabMenu: tabMenu,
|
|
139
|
+
TabMenuContent: tabMenuContent,
|
|
140
|
+
TabMenuItem: tabMenuItem,
|
|
141
|
+
TabMenuList: tabMenuList,
|
|
142
|
+
TextInput,
|
|
143
|
+
TextInputAffix,
|
|
144
|
+
TextInputButton,
|
|
145
|
+
Textarea: textarea,
|
|
146
|
+
Tooltip
|
|
147
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
148
|
+
const Celeste = {
|
|
149
|
+
install(vue) {
|
|
150
|
+
Object.entries(components).forEach(([name, component]) => {
|
|
151
|
+
vue.component(name, component);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
Alert,
|
|
157
|
+
Badge,
|
|
158
|
+
Button,
|
|
159
|
+
Celeste,
|
|
160
|
+
_sfc_main as Checkbox,
|
|
161
|
+
checkboxLabel as CheckboxLabel,
|
|
162
|
+
combobox as Combobox,
|
|
163
|
+
_sfc_main$1 as ComboboxAnchor,
|
|
164
|
+
ComboboxEmpty,
|
|
165
|
+
ComboboxGroup,
|
|
166
|
+
ComboboxInput,
|
|
167
|
+
ComboboxItem,
|
|
168
|
+
ComboboxList,
|
|
169
|
+
ComboboxRoot,
|
|
170
|
+
ComboboxSeparator,
|
|
171
|
+
ComboboxTrigger,
|
|
172
|
+
CompactButton,
|
|
173
|
+
_sfc_main$2 as ContentDivider,
|
|
174
|
+
contextMenuItem as ContextMenuItem,
|
|
175
|
+
dropdown as Dropdown,
|
|
176
|
+
DropdownItem,
|
|
177
|
+
dropdownMenu as DropdownMenu,
|
|
178
|
+
_sfc_main$3 as DropdownMenuContent,
|
|
179
|
+
dropdownMenuGroup as DropdownMenuGroup,
|
|
180
|
+
dropdownMenuItem as DropdownMenuItem,
|
|
181
|
+
dropdownMenuLabel as DropdownMenuLabel,
|
|
182
|
+
dropdownMenuSeparator as DropdownMenuSeparator,
|
|
183
|
+
_sfc_main$4 as DropdownMenuSub,
|
|
184
|
+
_sfc_main$5 as DropdownMenuSubContent,
|
|
185
|
+
_sfc_main$6 as DropdownMenuSubTrigger,
|
|
186
|
+
dropdownMenuTrigger as DropdownMenuTrigger,
|
|
187
|
+
fancyButton as FancyButton,
|
|
188
|
+
hintText as HintText,
|
|
189
|
+
Label,
|
|
190
|
+
LinkButton,
|
|
191
|
+
_sfc_main$7 as Modal,
|
|
192
|
+
modalBody as ModalBody,
|
|
193
|
+
_sfc_main$8 as ModalClose,
|
|
194
|
+
modalContent as ModalContent,
|
|
195
|
+
modalFooter as ModalFooter,
|
|
196
|
+
modalHeader as ModalHeader,
|
|
197
|
+
_sfc_main$9 as ModalTrigger,
|
|
198
|
+
_sfc_main$a as Popover,
|
|
199
|
+
PopoverContent,
|
|
200
|
+
PopoverTrigger,
|
|
201
|
+
richEditor as RichEditor,
|
|
202
|
+
_sfc_main$b as ScrollArea,
|
|
203
|
+
segmentedControl as SegmentedControl,
|
|
204
|
+
segmentedControlItem as SegmentedControlItem,
|
|
205
|
+
_sfc_main$c as Select,
|
|
206
|
+
SelectContent,
|
|
207
|
+
_sfc_main$d as SelectGroup,
|
|
208
|
+
SelectIcon,
|
|
209
|
+
SelectItem,
|
|
210
|
+
selectLabel as SelectLabel,
|
|
211
|
+
selectSeparator as SelectSeparator,
|
|
212
|
+
SelectTrigger,
|
|
213
|
+
SelectValue,
|
|
214
|
+
_sfc_main$e as Slider,
|
|
215
|
+
socialButton as SocialButton,
|
|
216
|
+
_sfc_main$f as Sonner,
|
|
217
|
+
sonnerAlert as SonnerAlert,
|
|
218
|
+
statusBadge as StatusBadge,
|
|
219
|
+
_sfc_main$g as Switch,
|
|
220
|
+
tabMenu as TabMenu,
|
|
221
|
+
tabMenuContent as TabMenuContent,
|
|
222
|
+
tabMenuItem as TabMenuItem,
|
|
223
|
+
tabMenuList as TabMenuList,
|
|
224
|
+
TextInput,
|
|
225
|
+
TextInputAffix,
|
|
226
|
+
TextInputButton,
|
|
227
|
+
textarea as Textarea,
|
|
228
|
+
Tooltip
|
|
229
|
+
};
|
package/dist/es/label.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
2
|
+
import Tooltip from "./tooltip.js";
|
|
3
|
+
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
4
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
5
|
+
import { S as Oh } from "./chunks/index.js";
|
|
6
|
+
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
7
|
+
const _hoisted_1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "celeste-sublabel"
|
|
10
|
+
};
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "label",
|
|
13
|
+
props: {
|
|
14
|
+
for: {},
|
|
15
|
+
asChild: { type: Boolean },
|
|
16
|
+
as: {},
|
|
17
|
+
sublabel: {},
|
|
18
|
+
information: {},
|
|
19
|
+
required: { type: Boolean },
|
|
20
|
+
disabled: { type: Boolean },
|
|
21
|
+
class: {}
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const delegatedProps = useDelegatedProps(props, "class");
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createBlock(unref(Oh), mergeProps(unref(delegatedProps), {
|
|
28
|
+
"aria-required": _ctx.required,
|
|
29
|
+
"aria-disabled": _ctx.disabled,
|
|
30
|
+
class: unref(clsx)("celeste-label", props.class)
|
|
31
|
+
}), {
|
|
32
|
+
default: withCtx(() => [
|
|
33
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
34
|
+
renderSlot(_ctx.$slots, "button", { class: "celeste-label-button" }, void 0, true),
|
|
35
|
+
_ctx.sublabel ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.sublabel), 1)) : createCommentVNode("", true),
|
|
36
|
+
_ctx.information ? (openBlock(), createBlock(Tooltip, {
|
|
37
|
+
key: 1,
|
|
38
|
+
title: _ctx.information
|
|
39
|
+
}, {
|
|
40
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
41
|
+
createElementVNode("button", { class: "celeste-label-info" }, [
|
|
42
|
+
createElementVNode("i", { class: "i-celeste-information-2-fill" })
|
|
43
|
+
], -1)
|
|
44
|
+
])),
|
|
45
|
+
_: 1
|
|
46
|
+
}, 8, ["title"])) : createCommentVNode("", true)
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 16, ["aria-required", "aria-disabled", "class"]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const Label = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4768213c"]]);
|
|
54
|
+
export {
|
|
55
|
+
Label as default
|
|
56
|
+
};
|