@youcan/celeste 0.6.27 → 0.6.29
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/package.json +3 -3
- package/src/components/checkbox/checkbox-label.vue +112 -0
- package/src/components/checkbox/checkbox.vue +2 -1
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/checkbox/stories/checkbox.stories.ts +37 -20
- package/dist/celeste.css +0 -3996
- package/dist/cjs/alert.js +0 -111
- package/dist/cjs/alpha-slider.js +0 -3
- package/dist/cjs/badge.js +0 -55
- package/dist/cjs/button.js +0 -39
- package/dist/cjs/checkbox.js +0 -3
- package/dist/cjs/chunks/_plugin-vue_export-helper.js +0 -9
- package/dist/cjs/chunks/alpha-slider.js +0 -127
- package/dist/cjs/chunks/checkbox.vue_vue_type_style_index_0_lang.js +0 -38
- package/dist/cjs/chunks/clsx.js +0 -15
- package/dist/cjs/chunks/combobox-anchor.js +0 -31
- package/dist/cjs/chunks/content-divider.vue_vue_type_style_index_0_lang.js +0 -52
- package/dist/cjs/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +0 -51
- package/dist/cjs/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +0 -49
- package/dist/cjs/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +0 -32
- package/dist/cjs/chunks/dropdown-menu-sub.js +0 -25
- package/dist/cjs/chunks/index.js +0 -9073
- package/dist/cjs/chunks/modal-close.js +0 -22
- package/dist/cjs/chunks/modal-trigger.js +0 -22
- package/dist/cjs/chunks/modal.js +0 -26
- package/dist/cjs/chunks/popover.js +0 -26
- package/dist/cjs/chunks/scroll-area.js +0 -41
- package/dist/cjs/chunks/select-group.js +0 -22
- package/dist/cjs/chunks/select.js +0 -38
- package/dist/cjs/chunks/slider.vue_vue_type_style_index_0_lang.js +0 -52
- package/dist/cjs/chunks/switch.vue_vue_type_style_index_0_lang.js +0 -38
- package/dist/cjs/chunks/use-color-model.js +0 -992
- package/dist/cjs/color-area.js +0 -175
- package/dist/cjs/color-picker.js +0 -514
- package/dist/cjs/color-swatch.js +0 -59
- package/dist/cjs/color.js +0 -102
- package/dist/cjs/combobox-anchor.js +0 -3
- package/dist/cjs/combobox-empty.js +0 -32
- package/dist/cjs/combobox-group.js +0 -42
- package/dist/cjs/combobox-input.js +0 -63
- package/dist/cjs/combobox-item.js +0 -109
- package/dist/cjs/combobox-list.js +0 -62
- package/dist/cjs/combobox-root.js +0 -40
- package/dist/cjs/combobox-separator.js +0 -32
- package/dist/cjs/combobox-trigger.js +0 -47
- package/dist/cjs/combobox.js +0 -233
- package/dist/cjs/command-group.js +0 -41
- package/dist/cjs/command-input.js +0 -42
- package/dist/cjs/command-item.js +0 -34
- package/dist/cjs/command-list.js +0 -52
- package/dist/cjs/command-root.js +0 -45
- package/dist/cjs/command-separator.js +0 -32
- package/dist/cjs/compact-button.js +0 -42
- package/dist/cjs/content-divider.js +0 -3
- package/dist/cjs/context-menu-item.js +0 -134
- package/dist/cjs/crypto.js +0 -8
- package/dist/cjs/dropdown-item.js +0 -99
- package/dist/cjs/dropdown-menu-content.js +0 -3
- package/dist/cjs/dropdown-menu-group.js +0 -24
- package/dist/cjs/dropdown-menu-item.js +0 -68
- package/dist/cjs/dropdown-menu-label.js +0 -31
- package/dist/cjs/dropdown-menu-separator.js +0 -25
- package/dist/cjs/dropdown-menu-sub-content.js +0 -3
- package/dist/cjs/dropdown-menu-sub-trigger.js +0 -3
- package/dist/cjs/dropdown-menu-sub.js +0 -3
- package/dist/cjs/dropdown-menu-trigger.js +0 -26
- package/dist/cjs/dropdown-menu.js +0 -32
- package/dist/cjs/dropdown.js +0 -291
- package/dist/cjs/fancy-button.js +0 -38
- package/dist/cjs/hint-text.js +0 -36
- package/dist/cjs/hue-slider.js +0 -133
- package/dist/cjs/index.js +0 -217
- package/dist/cjs/label.js +0 -55
- package/dist/cjs/link-button.js +0 -44
- package/dist/cjs/modal-body.js +0 -22
- package/dist/cjs/modal-close.js +0 -3
- package/dist/cjs/modal-content.js +0 -48
- package/dist/cjs/modal-footer.js +0 -22
- package/dist/cjs/modal-header.js +0 -81
- package/dist/cjs/modal-trigger.js +0 -3
- package/dist/cjs/modal.js +0 -3
- package/dist/cjs/popover-content.js +0 -104
- package/dist/cjs/popover-trigger.js +0 -24
- package/dist/cjs/popover.js +0 -3
- package/dist/cjs/scroll-area.js +0 -3
- package/dist/cjs/scroll-bar.js +0 -39
- package/dist/cjs/segmented-control-item.js +0 -41
- package/dist/cjs/segmented-control.js +0 -40
- package/dist/cjs/select-content.js +0 -61
- package/dist/cjs/select-group.js +0 -3
- package/dist/cjs/select-icon.js +0 -25
- package/dist/cjs/select-item.js +0 -44
- package/dist/cjs/select-label.js +0 -32
- package/dist/cjs/select-separator.js +0 -26
- package/dist/cjs/select-trigger.js +0 -40
- package/dist/cjs/select-value.js +0 -31
- package/dist/cjs/select.js +0 -3
- package/dist/cjs/shims.js +0 -1
- package/dist/cjs/slider.js +0 -3
- package/dist/cjs/social-button.js +0 -45
- package/dist/cjs/status-badge.js +0 -49
- package/dist/cjs/switch.js +0 -3
- package/dist/cjs/tab-menu-content.js +0 -32
- package/dist/cjs/tab-menu-item.js +0 -44
- package/dist/cjs/tab-menu-list.js +0 -34
- package/dist/cjs/tab-menu.js +0 -32
- package/dist/cjs/text-input-affix.js +0 -27
- package/dist/cjs/text-input-button.js +0 -31
- package/dist/cjs/text-input.js +0 -119
- package/dist/cjs/textarea.js +0 -56
- package/dist/cjs/tooltip.js +0 -115
- package/dist/cjs/use-color-model.js +0 -6
- package/dist/cjs/use-delegated-props.js +0 -14
- package/dist/cjs/use-user-select.js +0 -39
- package/dist/components/alert/alert.d.ts +0 -30
- package/dist/components/alert/index.d.ts +0 -2
- package/dist/components/badge/badge.d.ts +0 -17
- package/dist/components/badge/index.d.ts +0 -4
- package/dist/components/badge/status-badge.d.ts +0 -13
- package/dist/components/button/button.d.ts +0 -22
- package/dist/components/button/compact-button.d.ts +0 -15
- package/dist/components/button/fancy-button.d.ts +0 -20
- package/dist/components/button/index.d.ts +0 -10
- package/dist/components/button/link-button.d.ts +0 -22
- package/dist/components/button/social-button.d.ts +0 -10
- package/dist/components/checkbox/checkbox.d.ts +0 -11
- package/dist/components/checkbox/index.d.ts +0 -2
- package/dist/components/color-picker/alpha-slider.d.ts +0 -15
- package/dist/components/color-picker/color-area.d.ts +0 -9
- package/dist/components/color-picker/color-picker.d.ts +0 -47
- package/dist/components/color-picker/color-swatch.d.ts +0 -19
- package/dist/components/color-picker/composable/use-color-model.d.ts +0 -7
- package/dist/components/color-picker/composable/use-user-select.d.ts +0 -8
- package/dist/components/color-picker/hue-slider.d.ts +0 -14
- package/dist/components/color-picker/index.d.ts +0 -10
- package/dist/components/combobox/combobox-anchor.d.ts +0 -22
- package/dist/components/combobox/combobox-empty.d.ts +0 -22
- package/dist/components/combobox/combobox-group.d.ts +0 -23
- package/dist/components/combobox/combobox-input.d.ts +0 -17
- package/dist/components/combobox/combobox-item.d.ts +0 -31
- package/dist/components/combobox/combobox-list.d.ts +0 -36
- package/dist/components/combobox/combobox-root.d.ts +0 -29
- package/dist/components/combobox/combobox-separator.d.ts +0 -22
- package/dist/components/combobox/combobox-trigger.d.ts +0 -20
- package/dist/components/combobox/combobox.d.ts +0 -42
- package/dist/components/combobox/index.d.ts +0 -20
- package/dist/components/content-divider/content-divider.d.ts +0 -10
- package/dist/components/content-divider/index.d.ts +0 -2
- package/dist/components/dropdown/context-menu-item.d.ts +0 -39
- package/dist/components/dropdown/dropdown-item.d.ts +0 -30
- package/dist/components/dropdown/dropdown.d.ts +0 -55
- package/dist/components/dropdown/index.d.ts +0 -6
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +0 -36
- package/dist/components/dropdown-menu/dropdown-menu-group.d.ts +0 -18
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +0 -26
- package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +0 -22
- package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +0 -7
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +0 -38
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +0 -22
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +0 -22
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +0 -18
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +0 -18
- package/dist/components/dropdown-menu/index.d.ts +0 -20
- package/dist/components/hint-text/hint-text.d.ts +0 -11
- package/dist/components/hint-text/index.d.ts +0 -2
- package/dist/components/index.d.ts +0 -21
- package/dist/components/label/index.d.ts +0 -2
- package/dist/components/label/label.d.ts +0 -29
- package/dist/components/modal/index.d.ts +0 -14
- package/dist/components/modal/modal-body.d.ts +0 -21
- package/dist/components/modal/modal-close.d.ts +0 -18
- package/dist/components/modal/modal-content.d.ts +0 -37
- package/dist/components/modal/modal-footer.d.ts +0 -21
- package/dist/components/modal/modal-header.d.ts +0 -16
- package/dist/components/modal/modal-trigger.d.ts +0 -18
- package/dist/components/modal/modal.d.ts +0 -22
- package/dist/components/popover/index.d.ts +0 -6
- package/dist/components/popover/popover-content.d.ts +0 -41
- package/dist/components/popover/popover-trigger.d.ts +0 -18
- package/dist/components/popover/popover.d.ts +0 -22
- package/dist/components/scroll-area/index.d.ts +0 -2
- package/dist/components/scroll-area/scroll-area.d.ts +0 -22
- package/dist/components/scroll-area/scroll-bar.d.ts +0 -9
- package/dist/components/segmented-control/index.d.ts +0 -4
- package/dist/components/segmented-control/segmented-control-item.d.ts +0 -22
- package/dist/components/segmented-control/segmented-control.d.ts +0 -26
- package/dist/components/select/index.d.ts +0 -18
- package/dist/components/select/select-content.d.ts +0 -33
- package/dist/components/select/select-group.d.ts +0 -18
- package/dist/components/select/select-icon.d.ts +0 -21
- package/dist/components/select/select-item.d.ts +0 -22
- package/dist/components/select/select-label.d.ts +0 -22
- package/dist/components/select/select-separator.d.ts +0 -7
- package/dist/components/select/select-trigger.d.ts +0 -28
- package/dist/components/select/select-value.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -28
- package/dist/components/slider/index.d.ts +0 -2
- package/dist/components/slider/slider.d.ts +0 -13
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/switch.d.ts +0 -11
- package/dist/components/tab-menu/index.d.ts +0 -8
- package/dist/components/tab-menu/tab-menu-content.d.ts +0 -22
- package/dist/components/tab-menu/tab-menu-item.d.ts +0 -24
- package/dist/components/tab-menu/tab-menu-list.d.ts +0 -22
- package/dist/components/tab-menu/tab-menu.d.ts +0 -23
- package/dist/components/text-input/index.d.ts +0 -6
- package/dist/components/text-input/text-input-affix.d.ts +0 -23
- package/dist/components/text-input/text-input-button.d.ts +0 -23
- package/dist/components/text-input/text-input.d.ts +0 -32
- package/dist/components/textarea/index.d.ts +0 -2
- package/dist/components/textarea/textarea.d.ts +0 -22
- package/dist/components/tooltip/index.d.ts +0 -2
- package/dist/components/tooltip/tooltip.d.ts +0 -29
- package/dist/composables/use-delegated-props.d.ts +0 -2
- package/dist/es/alert.js +0 -112
- package/dist/es/alpha-slider.js +0 -4
- package/dist/es/badge.js +0 -56
- package/dist/es/button.js +0 -40
- package/dist/es/checkbox.js +0 -4
- package/dist/es/chunks/_plugin-vue_export-helper.js +0 -10
- package/dist/es/chunks/alpha-slider.js +0 -128
- package/dist/es/chunks/checkbox.vue_vue_type_style_index_0_lang.js +0 -39
- package/dist/es/chunks/clsx.js +0 -16
- package/dist/es/chunks/combobox-anchor.js +0 -32
- package/dist/es/chunks/content-divider.vue_vue_type_style_index_0_lang.js +0 -53
- package/dist/es/chunks/dropdown-menu-content.vue_vue_type_style_index_0_lang.js +0 -52
- package/dist/es/chunks/dropdown-menu-sub-content.vue_vue_type_style_index_0_lang.js +0 -50
- package/dist/es/chunks/dropdown-menu-sub-trigger.vue_vue_type_style_index_0_lang.js +0 -33
- package/dist/es/chunks/dropdown-menu-sub.js +0 -26
- package/dist/es/chunks/index.js +0 -9058
- package/dist/es/chunks/modal-close.js +0 -23
- package/dist/es/chunks/modal-trigger.js +0 -23
- package/dist/es/chunks/modal.js +0 -27
- package/dist/es/chunks/popover.js +0 -27
- package/dist/es/chunks/scroll-area.js +0 -42
- package/dist/es/chunks/select-group.js +0 -23
- package/dist/es/chunks/select.js +0 -39
- package/dist/es/chunks/slider.vue_vue_type_style_index_0_lang.js +0 -53
- package/dist/es/chunks/switch.vue_vue_type_style_index_0_lang.js +0 -39
- package/dist/es/chunks/use-color-model.js +0 -993
- package/dist/es/color-area.js +0 -176
- package/dist/es/color-picker.js +0 -515
- package/dist/es/color-swatch.js +0 -60
- package/dist/es/color.js +0 -102
- package/dist/es/combobox-anchor.js +0 -4
- package/dist/es/combobox-empty.js +0 -33
- package/dist/es/combobox-group.js +0 -43
- package/dist/es/combobox-input.js +0 -64
- package/dist/es/combobox-item.js +0 -110
- package/dist/es/combobox-list.js +0 -63
- package/dist/es/combobox-root.js +0 -41
- package/dist/es/combobox-separator.js +0 -33
- package/dist/es/combobox-trigger.js +0 -48
- package/dist/es/combobox.js +0 -234
- package/dist/es/command-group.js +0 -42
- package/dist/es/command-input.js +0 -43
- package/dist/es/command-item.js +0 -35
- package/dist/es/command-list.js +0 -53
- package/dist/es/command-root.js +0 -46
- package/dist/es/command-separator.js +0 -33
- package/dist/es/compact-button.js +0 -43
- package/dist/es/content-divider.js +0 -4
- package/dist/es/context-menu-item.js +0 -135
- package/dist/es/crypto.js +0 -8
- package/dist/es/dropdown-item.js +0 -100
- package/dist/es/dropdown-menu-content.js +0 -4
- package/dist/es/dropdown-menu-group.js +0 -25
- package/dist/es/dropdown-menu-item.js +0 -69
- package/dist/es/dropdown-menu-label.js +0 -32
- package/dist/es/dropdown-menu-separator.js +0 -26
- package/dist/es/dropdown-menu-sub-content.js +0 -4
- package/dist/es/dropdown-menu-sub-trigger.js +0 -4
- package/dist/es/dropdown-menu-sub.js +0 -4
- package/dist/es/dropdown-menu-trigger.js +0 -27
- package/dist/es/dropdown-menu.js +0 -33
- package/dist/es/dropdown.js +0 -292
- package/dist/es/fancy-button.js +0 -39
- package/dist/es/hint-text.js +0 -37
- package/dist/es/hue-slider.js +0 -134
- package/dist/es/index.js +0 -217
- package/dist/es/label.js +0 -56
- package/dist/es/link-button.js +0 -45
- package/dist/es/modal-body.js +0 -23
- package/dist/es/modal-close.js +0 -4
- package/dist/es/modal-content.js +0 -49
- package/dist/es/modal-footer.js +0 -23
- package/dist/es/modal-header.js +0 -82
- package/dist/es/modal-trigger.js +0 -4
- package/dist/es/modal.js +0 -4
- package/dist/es/popover-content.js +0 -105
- package/dist/es/popover-trigger.js +0 -25
- package/dist/es/popover.js +0 -4
- package/dist/es/scroll-area.js +0 -4
- package/dist/es/scroll-bar.js +0 -40
- package/dist/es/segmented-control-item.js +0 -42
- package/dist/es/segmented-control.js +0 -41
- package/dist/es/select-content.js +0 -62
- package/dist/es/select-group.js +0 -4
- package/dist/es/select-icon.js +0 -26
- package/dist/es/select-item.js +0 -45
- package/dist/es/select-label.js +0 -33
- package/dist/es/select-separator.js +0 -27
- package/dist/es/select-trigger.js +0 -41
- package/dist/es/select-value.js +0 -32
- package/dist/es/select.js +0 -4
- package/dist/es/shims.js +0 -1
- package/dist/es/slider.js +0 -4
- package/dist/es/social-button.js +0 -46
- package/dist/es/status-badge.js +0 -50
- package/dist/es/switch.js +0 -4
- package/dist/es/tab-menu-content.js +0 -33
- package/dist/es/tab-menu-item.js +0 -45
- package/dist/es/tab-menu-list.js +0 -35
- package/dist/es/tab-menu.js +0 -33
- package/dist/es/text-input-affix.js +0 -28
- package/dist/es/text-input-button.js +0 -32
- package/dist/es/text-input.js +0 -120
- package/dist/es/textarea.js +0 -57
- package/dist/es/tooltip.js +0 -116
- package/dist/es/use-color-model.js +0 -6
- package/dist/es/use-delegated-props.js +0 -14
- package/dist/es/use-user-select.js +0 -39
- package/dist/index.d.ts +0 -5
- package/dist/utils/color.d.ts +0 -26
- package/dist/utils/crypto.d.ts +0 -1
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { Z as Zv } from "./chunks/index.js";
|
|
4
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "combobox-empty",
|
|
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(Zv), mergeProps(delegatedProps.value, {
|
|
20
|
-
class: unref(clsx)("celeste-dropdown-empty-list", 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 ComboboxEmpty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-450bfb63"]]);
|
|
31
|
-
export {
|
|
32
|
-
ComboboxEmpty as default
|
|
33
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { B as qv, Y as Yv } from "./chunks/index.js";
|
|
4
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "combobox-group",
|
|
7
|
-
props: {
|
|
8
|
-
asChild: { type: Boolean },
|
|
9
|
-
as: {},
|
|
10
|
-
class: {},
|
|
11
|
-
heading: {}
|
|
12
|
-
},
|
|
13
|
-
setup(__props) {
|
|
14
|
-
const props = __props;
|
|
15
|
-
const delegatedProps = computed(() => {
|
|
16
|
-
const { class: _, ...delegated } = props;
|
|
17
|
-
return delegated;
|
|
18
|
-
});
|
|
19
|
-
return (_ctx, _cache) => {
|
|
20
|
-
return openBlock(), createBlock(unref(qv), mergeProps(delegatedProps.value, {
|
|
21
|
-
class: unref(clsx)(props.class, "celeste-dropdown-items-group")
|
|
22
|
-
}), {
|
|
23
|
-
default: withCtx(() => [
|
|
24
|
-
_ctx.heading ? (openBlock(), createBlock(unref(Yv), {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: ""
|
|
27
|
-
}, {
|
|
28
|
-
default: withCtx(() => [
|
|
29
|
-
createTextVNode(toDisplayString(_ctx.heading), 1)
|
|
30
|
-
]),
|
|
31
|
-
_: 1
|
|
32
|
-
})) : createCommentVNode("", true),
|
|
33
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
34
|
-
]),
|
|
35
|
-
_: 3
|
|
36
|
-
}, 16, ["class"]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const ComboboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-66b5c9e4"]]);
|
|
41
|
-
export {
|
|
42
|
-
ComboboxGroup as default
|
|
43
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, createElementVNode } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { D as Wv } from "./chunks/index.js";
|
|
4
|
-
import TextInput from "./text-input.js";
|
|
5
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "combobox-input",
|
|
8
|
-
props: /* @__PURE__ */ mergeModels({
|
|
9
|
-
type: {},
|
|
10
|
-
disabled: { type: Boolean },
|
|
11
|
-
autoFocus: { type: Boolean },
|
|
12
|
-
asChild: { type: Boolean },
|
|
13
|
-
as: {},
|
|
14
|
-
class: {},
|
|
15
|
-
textInputProps: {},
|
|
16
|
-
searchable: { type: Boolean }
|
|
17
|
-
}, {
|
|
18
|
-
"modelValue": {},
|
|
19
|
-
"modelModifiers": {}
|
|
20
|
-
}),
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(__props) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const model = useModel(__props, "modelValue");
|
|
25
|
-
const comboboxInputProps = computed(() => {
|
|
26
|
-
const { class: _class, textInputProps: _textInputProps, ...rest } = props;
|
|
27
|
-
return rest;
|
|
28
|
-
});
|
|
29
|
-
const textInputProps = computed(() => {
|
|
30
|
-
return {
|
|
31
|
-
type: "search",
|
|
32
|
-
size: "sm",
|
|
33
|
-
placeholder: "Search",
|
|
34
|
-
...props.textInputProps
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
return (_ctx, _cache) => {
|
|
38
|
-
return openBlock(), createBlock(unref(Wv), mergeProps(comboboxInputProps.value, {
|
|
39
|
-
class: unref(clsx)("celeste-dropdown-input", props.class),
|
|
40
|
-
readonly: !props.searchable,
|
|
41
|
-
as: "div"
|
|
42
|
-
}), {
|
|
43
|
-
default: withCtx(() => [
|
|
44
|
-
createVNode(TextInput, mergeProps(textInputProps.value, {
|
|
45
|
-
modelValue: model.value,
|
|
46
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
47
|
-
readonly: !props.searchable,
|
|
48
|
-
style: !props.searchable ? "opacity: 0; height: 1px; padding: 0; border: none;" : ""
|
|
49
|
-
}), {
|
|
50
|
-
leadingIcon: withCtx(() => _cache[1] || (_cache[1] = [
|
|
51
|
-
createElementVNode("i", { "i-celeste-search-2-line": "" }, null, -1)
|
|
52
|
-
])),
|
|
53
|
-
_: 1
|
|
54
|
-
}, 16, ["modelValue", "readonly", "style"])
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 16, ["class", "readonly"]);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const ComboboxInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bd59a65e"]]);
|
|
62
|
-
export {
|
|
63
|
-
ComboboxInput as default
|
|
64
|
-
};
|
package/dist/es/combobox-item.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, createCommentVNode, createElementBlock, renderSlot, toDisplayString } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { x as xe, E as Qv } from "./chunks/index.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "./chunks/checkbox.vue_vue_type_style_index_0_lang.js";
|
|
5
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
|
-
const _hoisted_1 = ["aria-disabled"];
|
|
7
|
-
const _hoisted_2 = { class: "celeste-dropdown-item-info" };
|
|
8
|
-
const _hoisted_3 = ["innerHTML"];
|
|
9
|
-
const _hoisted_4 = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "celeste-dropdown-item-sublabel"
|
|
12
|
-
};
|
|
13
|
-
const _hoisted_5 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "celeste-dropdown-item-description"
|
|
16
|
-
};
|
|
17
|
-
const _hoisted_6 = {
|
|
18
|
-
key: 2,
|
|
19
|
-
class: "celeste-dropdown-item-suffix"
|
|
20
|
-
};
|
|
21
|
-
const _hoisted_7 = {
|
|
22
|
-
key: 3,
|
|
23
|
-
class: "i-celeste-check-fill"
|
|
24
|
-
};
|
|
25
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
-
__name: "combobox-item",
|
|
27
|
-
props: {
|
|
28
|
-
class: {},
|
|
29
|
-
label: {},
|
|
30
|
-
size: { default: "sm" },
|
|
31
|
-
checkbox: { type: Boolean },
|
|
32
|
-
sublabel: {},
|
|
33
|
-
description: {},
|
|
34
|
-
selected: { type: [Boolean, String] },
|
|
35
|
-
focused: { type: Boolean },
|
|
36
|
-
value: { type: [String, Number, Boolean, Object] },
|
|
37
|
-
icon: {},
|
|
38
|
-
image: {},
|
|
39
|
-
disabled: { type: Boolean }
|
|
40
|
-
},
|
|
41
|
-
emits: ["select"],
|
|
42
|
-
setup(__props, { emit: __emit }) {
|
|
43
|
-
const props = __props;
|
|
44
|
-
const emits = __emit;
|
|
45
|
-
const delegatedProps = computed(() => {
|
|
46
|
-
const { class: _, ...delegated } = props;
|
|
47
|
-
return delegated;
|
|
48
|
-
});
|
|
49
|
-
const forwarded = xe(delegatedProps, emits);
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return openBlock(), createBlock(unref(Qv), mergeProps(unref(forwarded), {
|
|
52
|
-
disabled: _ctx.disabled,
|
|
53
|
-
"as-child": ""
|
|
54
|
-
}), {
|
|
55
|
-
default: withCtx(() => [
|
|
56
|
-
createElementVNode("div", {
|
|
57
|
-
tabindex: "0",
|
|
58
|
-
"aria-disabled": _ctx.disabled,
|
|
59
|
-
class: normalizeClass(unref(clsx)(
|
|
60
|
-
props.class,
|
|
61
|
-
"celeste-dropdown-item",
|
|
62
|
-
{ "celeste-dropdown-item-disabled": _ctx.disabled },
|
|
63
|
-
{ "celeste-dropdown-item-selected": _ctx.selected },
|
|
64
|
-
{ "celeste-dropdown-item-focused": _ctx.focused }
|
|
65
|
-
))
|
|
66
|
-
}, [
|
|
67
|
-
_ctx.checkbox && _ctx.size === "sm" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
68
|
-
key: 0,
|
|
69
|
-
checked: _ctx.selected,
|
|
70
|
-
disabled: _ctx.disabled
|
|
71
|
-
}, null, 8, ["checked", "disabled"])) : createCommentVNode("", true),
|
|
72
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
|
73
|
-
key: 1,
|
|
74
|
-
class: normalizeClass(unref(clsx)(
|
|
75
|
-
"celeste-dropdown-item-prefix",
|
|
76
|
-
`celeste-dropdown-item-prefix-${_ctx.size}`
|
|
77
|
-
))
|
|
78
|
-
}, [
|
|
79
|
-
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
80
|
-
], 2)) : createCommentVNode("", true),
|
|
81
|
-
createElementVNode("div", _hoisted_2, [
|
|
82
|
-
createElementVNode("div", {
|
|
83
|
-
class: normalizeClass(unref(clsx)(
|
|
84
|
-
"celeste-dropdown-item-header",
|
|
85
|
-
`celeste-dropdown-item-header-${_ctx.size}`
|
|
86
|
-
))
|
|
87
|
-
}, [
|
|
88
|
-
createElementVNode("span", {
|
|
89
|
-
class: "celeste-dropdown-item-label",
|
|
90
|
-
innerHTML: _ctx.label
|
|
91
|
-
}, null, 8, _hoisted_3),
|
|
92
|
-
_ctx.sublabel ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(_ctx.sublabel), 1)) : createCommentVNode("", true)
|
|
93
|
-
], 2),
|
|
94
|
-
_ctx.description && _ctx.size === "lg" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true)
|
|
95
|
-
]),
|
|
96
|
-
_ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
97
|
-
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
98
|
-
])) : createCommentVNode("", true),
|
|
99
|
-
_ctx.selected ? (openBlock(), createElementBlock("i", _hoisted_7)) : createCommentVNode("", true)
|
|
100
|
-
], 10, _hoisted_1)
|
|
101
|
-
]),
|
|
102
|
-
_: 3
|
|
103
|
-
}, 16, ["disabled"]);
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
const ComboboxItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c2bd0ae"]]);
|
|
108
|
-
export {
|
|
109
|
-
ComboboxItem as default
|
|
110
|
-
};
|
package/dist/es/combobox-list.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { x as xe, H as nm, X as Xv, J as Jv } from "./chunks/index.js";
|
|
4
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "combobox-list",
|
|
7
|
-
props: {
|
|
8
|
-
forceMount: { type: Boolean },
|
|
9
|
-
position: { default: "popper" },
|
|
10
|
-
bodyLock: { type: Boolean },
|
|
11
|
-
dismissable: { type: Boolean },
|
|
12
|
-
side: {},
|
|
13
|
-
sideOffset: { default: 4 },
|
|
14
|
-
align: { default: "start" },
|
|
15
|
-
alignOffset: {},
|
|
16
|
-
avoidCollisions: { type: Boolean },
|
|
17
|
-
collisionBoundary: {},
|
|
18
|
-
collisionPadding: {},
|
|
19
|
-
arrowPadding: {},
|
|
20
|
-
sticky: {},
|
|
21
|
-
hideWhenDetached: { type: Boolean },
|
|
22
|
-
updatePositionStrategy: {},
|
|
23
|
-
prioritizePosition: { type: Boolean },
|
|
24
|
-
asChild: { type: Boolean },
|
|
25
|
-
as: {},
|
|
26
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
27
|
-
class: {}
|
|
28
|
-
},
|
|
29
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
30
|
-
setup(__props, { emit: __emit }) {
|
|
31
|
-
const props = __props;
|
|
32
|
-
const emits = __emit;
|
|
33
|
-
const delegatedProps = computed(() => {
|
|
34
|
-
const { class: _, ...delegated } = props;
|
|
35
|
-
return delegated;
|
|
36
|
-
});
|
|
37
|
-
const forwarded = xe(delegatedProps, emits);
|
|
38
|
-
return (_ctx, _cache) => {
|
|
39
|
-
return openBlock(), createBlock(unref(nm), null, {
|
|
40
|
-
default: withCtx(() => [
|
|
41
|
-
createVNode(unref(Xv), mergeProps(unref(forwarded), {
|
|
42
|
-
class: unref(clsx)("celeste-dropdown-content", props.class)
|
|
43
|
-
}), {
|
|
44
|
-
default: withCtx(() => [
|
|
45
|
-
createVNode(unref(Jv), { class: "celeste-dropdown-items-viewport" }, {
|
|
46
|
-
default: withCtx(() => [
|
|
47
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
})
|
|
51
|
-
]),
|
|
52
|
-
_: 3
|
|
53
|
-
}, 16, ["class"])
|
|
54
|
-
]),
|
|
55
|
-
_: 3
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
const ComboboxList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dc6bae8b"]]);
|
|
61
|
-
export {
|
|
62
|
-
ComboboxList as default
|
|
63
|
-
};
|
package/dist/es/combobox-root.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { x as xe, I as Hv } from "./chunks/index.js";
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "combobox-root",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {},
|
|
8
|
-
defaultValue: {},
|
|
9
|
-
open: { type: Boolean },
|
|
10
|
-
defaultOpen: { type: Boolean },
|
|
11
|
-
searchTerm: {},
|
|
12
|
-
selectedValue: {},
|
|
13
|
-
multiple: { type: Boolean },
|
|
14
|
-
disabled: { type: Boolean },
|
|
15
|
-
name: {},
|
|
16
|
-
dir: {},
|
|
17
|
-
filterFunction: { type: Function },
|
|
18
|
-
displayValue: { type: Function },
|
|
19
|
-
resetSearchTermOnBlur: { type: Boolean },
|
|
20
|
-
asChild: { type: Boolean },
|
|
21
|
-
as: {}
|
|
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 forwarded = xe(props, emits);
|
|
28
|
-
return (_ctx, _cache) => {
|
|
29
|
-
return openBlock(), createBlock(unref(Hv), mergeProps({ class: "celeste-combobox-root" }, unref(forwarded)), {
|
|
30
|
-
default: withCtx(() => [
|
|
31
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
32
|
-
]),
|
|
33
|
-
_: 3
|
|
34
|
-
}, 16);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const ComboboxRoot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-29e14e56"]]);
|
|
39
|
-
export {
|
|
40
|
-
ComboboxRoot as default
|
|
41
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { L 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: "combobox-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-dropdown-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 ComboboxSeparator = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-987226c9"]]);
|
|
31
|
-
export {
|
|
32
|
-
ComboboxSeparator as default
|
|
33
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
|
-
import { c as clsx } from "./chunks/clsx.js";
|
|
3
|
-
import { A as At, U as Uv } from "./chunks/index.js";
|
|
4
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "combobox-trigger",
|
|
7
|
-
props: {
|
|
8
|
-
class: {},
|
|
9
|
-
size: {},
|
|
10
|
-
filled: { type: Boolean },
|
|
11
|
-
type: { default: "normal" },
|
|
12
|
-
error: { type: Boolean },
|
|
13
|
-
disabled: { type: Boolean },
|
|
14
|
-
asChild: { type: Boolean },
|
|
15
|
-
as: {}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const delegatedProps = computed(() => {
|
|
20
|
-
const { class: _, ...delegated } = props;
|
|
21
|
-
return delegated;
|
|
22
|
-
});
|
|
23
|
-
const forwarded = At(delegatedProps);
|
|
24
|
-
return (_ctx, _cache) => {
|
|
25
|
-
return openBlock(), createBlock(unref(Uv), mergeProps(unref(forwarded), {
|
|
26
|
-
type: "button",
|
|
27
|
-
tabindex: "0",
|
|
28
|
-
class: unref(clsx)(
|
|
29
|
-
"celeste-dropdown-anchor-trigger",
|
|
30
|
-
`celeste-dropdown-anchor-trigger-size-${props.size}`,
|
|
31
|
-
`celeste-dropdown-anchor-trigger-type-${props.type}`,
|
|
32
|
-
{ "celeste-dropdown-anchor-trigger-error": props.error },
|
|
33
|
-
{ "celeste-dropdown-anchor-trigger-filled": _ctx.filled },
|
|
34
|
-
props.class
|
|
35
|
-
)
|
|
36
|
-
}), {
|
|
37
|
-
default: withCtx(() => [
|
|
38
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
39
|
-
]),
|
|
40
|
-
_: 3
|
|
41
|
-
}, 16, ["class"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const ComboboxTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bddcd2de"]]);
|
|
46
|
-
export {
|
|
47
|
-
ComboboxTrigger as default
|
|
48
|
-
};
|
package/dist/es/combobox.js
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, mergeProps, unref, withCtx, createVNode, normalizeClass, createElementBlock, createElementVNode, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, toDisplayString, createSlots, createTextVNode, Fragment, renderList } from "vue";
|
|
2
|
-
import { x as xe } from "./chunks/index.js";
|
|
3
|
-
import Badge from "./badge.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "./chunks/combobox-anchor.js";
|
|
5
|
-
import ComboboxEmpty from "./combobox-empty.js";
|
|
6
|
-
import ComboboxGroup from "./combobox-group.js";
|
|
7
|
-
import ComboboxInput from "./combobox-input.js";
|
|
8
|
-
import ComboboxItem from "./combobox-item.js";
|
|
9
|
-
import ComboboxList from "./combobox-list.js";
|
|
10
|
-
import ComboboxRoot from "./combobox-root.js";
|
|
11
|
-
import ComboboxSeparator from "./combobox-separator.js";
|
|
12
|
-
import ComboboxTrigger from "./combobox-trigger.js";
|
|
13
|
-
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
14
|
-
const _hoisted_1 = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "celeste-dropdown-anchor-trigger-prefix"
|
|
17
|
-
};
|
|
18
|
-
const _hoisted_2 = { class: "celeste-dropdown-anchor-trigger-prefix-selected" };
|
|
19
|
-
const _hoisted_3 = { key: 1 };
|
|
20
|
-
const _hoisted_4 = ["src"];
|
|
21
|
-
const _hoisted_5 = {
|
|
22
|
-
key: 1,
|
|
23
|
-
class: "celeste-dropdown-anchor-trigger-prefix"
|
|
24
|
-
};
|
|
25
|
-
const _hoisted_6 = {
|
|
26
|
-
key: 2,
|
|
27
|
-
class: "celeste-dropdown-input"
|
|
28
|
-
};
|
|
29
|
-
const _hoisted_7 = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "celeste-input-badge"
|
|
32
|
-
};
|
|
33
|
-
const _hoisted_8 = ["src"];
|
|
34
|
-
const __default__ = {
|
|
35
|
-
inheritAttrs: false
|
|
36
|
-
};
|
|
37
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
|
-
...__default__,
|
|
39
|
-
__name: "combobox",
|
|
40
|
-
props: {
|
|
41
|
-
options: {},
|
|
42
|
-
valueBy: {},
|
|
43
|
-
labelBy: {},
|
|
44
|
-
placeholder: { default: "Select" },
|
|
45
|
-
type: {},
|
|
46
|
-
size: { default: "md" },
|
|
47
|
-
emptyLabel: {},
|
|
48
|
-
badgeProps: {},
|
|
49
|
-
searchable: { type: Boolean },
|
|
50
|
-
class: {},
|
|
51
|
-
modelValue: {},
|
|
52
|
-
defaultValue: {},
|
|
53
|
-
open: { type: Boolean },
|
|
54
|
-
defaultOpen: { type: Boolean },
|
|
55
|
-
searchTerm: {},
|
|
56
|
-
selectedValue: {},
|
|
57
|
-
multiple: { type: Boolean },
|
|
58
|
-
disabled: { type: Boolean },
|
|
59
|
-
name: {},
|
|
60
|
-
dir: {},
|
|
61
|
-
filterFunction: {},
|
|
62
|
-
displayValue: {},
|
|
63
|
-
resetSearchTermOnBlur: { type: Boolean },
|
|
64
|
-
asChild: { type: Boolean },
|
|
65
|
-
as: {}
|
|
66
|
-
},
|
|
67
|
-
emits: ["update:modelValue", "update:open", "update:searchTerm", "update:selectedValue"],
|
|
68
|
-
setup(__props, { emit: __emit }) {
|
|
69
|
-
const props = __props;
|
|
70
|
-
const emits = __emit;
|
|
71
|
-
const delegatedProps = computed(() => {
|
|
72
|
-
const {
|
|
73
|
-
open,
|
|
74
|
-
filterFunction: filterFunction2,
|
|
75
|
-
options,
|
|
76
|
-
valueBy,
|
|
77
|
-
labelBy,
|
|
78
|
-
placeholder,
|
|
79
|
-
type,
|
|
80
|
-
size,
|
|
81
|
-
emptyLabel,
|
|
82
|
-
badgeProps,
|
|
83
|
-
searchable,
|
|
84
|
-
class: _class,
|
|
85
|
-
...delegated
|
|
86
|
-
} = props;
|
|
87
|
-
return delegated;
|
|
88
|
-
});
|
|
89
|
-
const forwarded = xe(delegatedProps, emits);
|
|
90
|
-
const model = computed(() => props.modelValue);
|
|
91
|
-
const label = computed(() => {
|
|
92
|
-
if (!model.value)
|
|
93
|
-
return props.placeholder;
|
|
94
|
-
if (Array.isArray(model.value)) {
|
|
95
|
-
if (model.value.length === 0)
|
|
96
|
-
return props.placeholder;
|
|
97
|
-
return model.value.map((item) => props.labelBy ? item[props.labelBy] : item.label).join(", ");
|
|
98
|
-
}
|
|
99
|
-
return props.labelBy ? model.value[props.labelBy] : model.value.label;
|
|
100
|
-
});
|
|
101
|
-
function isSelected(value) {
|
|
102
|
-
if (!Array.isArray(props.modelValue) || !props.multiple)
|
|
103
|
-
return;
|
|
104
|
-
if (value === void 0 || value === null)
|
|
105
|
-
return false;
|
|
106
|
-
return props.modelValue.some((selectedItem) => {
|
|
107
|
-
const { value: selectedValue } = selectedItem;
|
|
108
|
-
if (props.valueBy && Object.prototype.hasOwnProperty.call(value, props.valueBy) && Object.prototype.hasOwnProperty.call(selectedValue, props.valueBy)) {
|
|
109
|
-
return value[props.valueBy] === selectedValue[props.valueBy];
|
|
110
|
-
}
|
|
111
|
-
return selectedValue === value;
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
function filterFunction(list, searchTerm) {
|
|
115
|
-
return list.filter((option) => {
|
|
116
|
-
const { value, label: label2 } = option;
|
|
117
|
-
if (!value || !label2)
|
|
118
|
-
return false;
|
|
119
|
-
if (props.valueBy && typeof value === "object" && props.valueBy in value) {
|
|
120
|
-
return String(value[props.valueBy]).toLowerCase().includes(searchTerm.toLowerCase()) || label2.toString().toLowerCase().includes(searchTerm.toLowerCase());
|
|
121
|
-
}
|
|
122
|
-
return value.toString().toLowerCase().includes(searchTerm.toLowerCase()) || label2.toString().toLowerCase().includes(searchTerm.toLowerCase());
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
const mergedBadgeProps = computed(() => ({
|
|
126
|
-
...props.badgeProps,
|
|
127
|
-
disabled: props.disabled
|
|
128
|
-
}));
|
|
129
|
-
return (_ctx, _cache) => {
|
|
130
|
-
return openBlock(), createBlock(ComboboxRoot, mergeProps(unref(forwarded), { "filter-function": filterFunction }), {
|
|
131
|
-
default: withCtx(() => [
|
|
132
|
-
createVNode(_sfc_main$1, { "as-child": "" }, {
|
|
133
|
-
default: withCtx(() => [
|
|
134
|
-
createVNode(ComboboxTrigger, {
|
|
135
|
-
type: _ctx.type,
|
|
136
|
-
filled: !!model.value,
|
|
137
|
-
size: _ctx.size,
|
|
138
|
-
class: normalizeClass(props.class)
|
|
139
|
-
}, {
|
|
140
|
-
default: withCtx(() => [
|
|
141
|
-
model.value && !Array.isArray(model.value) && (model.value.icon || model.value.image) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
142
|
-
createElementVNode("div", _hoisted_2, [
|
|
143
|
-
model.value.icon ? (openBlock(), createElementBlock("i", {
|
|
144
|
-
key: 0,
|
|
145
|
-
class: normalizeClass(model.value.icon)
|
|
146
|
-
}, null, 2)) : createCommentVNode("", true),
|
|
147
|
-
model.value.image ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
148
|
-
renderSlot(_ctx.$slots, "image", normalizeProps(guardReactiveProps({ selected: model.value })), () => [
|
|
149
|
-
createElementVNode("img", {
|
|
150
|
-
src: model.value.image,
|
|
151
|
-
alt: "Selected option",
|
|
152
|
-
class: "selected-dropdown-image"
|
|
153
|
-
}, null, 8, _hoisted_4)
|
|
154
|
-
], true)
|
|
155
|
-
])) : createCommentVNode("", true)
|
|
156
|
-
])
|
|
157
|
-
])) : _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
158
|
-
renderSlot(_ctx.$slots, "prefix", { class: "celeste-dropdown-anchor-trigger-prefix-default" }, void 0, true)
|
|
159
|
-
])) : createCommentVNode("", true),
|
|
160
|
-
_ctx.type !== "inline" ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
161
|
-
createElementVNode("span", null, toDisplayString(label.value), 1),
|
|
162
|
-
mergedBadgeProps.value && _ctx.badgeProps ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
163
|
-
createVNode(Badge, normalizeProps(guardReactiveProps(mergedBadgeProps.value)), null, 16)
|
|
164
|
-
])) : createCommentVNode("", true)
|
|
165
|
-
])) : createCommentVNode("", true),
|
|
166
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "celeste-dropdown-trigger" }, [
|
|
167
|
-
createElementVNode("i", { class: "i-celeste-arrow-down-s-line" })
|
|
168
|
-
], -1))
|
|
169
|
-
]),
|
|
170
|
-
_: 3
|
|
171
|
-
}, 8, ["type", "filled", "size", "class"])
|
|
172
|
-
]),
|
|
173
|
-
_: 3
|
|
174
|
-
}),
|
|
175
|
-
createVNode(ComboboxList, null, {
|
|
176
|
-
default: withCtx(() => [
|
|
177
|
-
createElementVNode("div", {
|
|
178
|
-
class: normalizeClass(["celeste-dropdown-inner-input", { "sr-only": !_ctx.searchable }])
|
|
179
|
-
}, [
|
|
180
|
-
createVNode(ComboboxInput, { searchable: _ctx.searchable }, null, 8, ["searchable"]),
|
|
181
|
-
_ctx.searchable ? (openBlock(), createBlock(ComboboxSeparator, { key: 0 })) : createCommentVNode("", true)
|
|
182
|
-
], 2),
|
|
183
|
-
createVNode(ComboboxEmpty, null, createSlots({ _: 2 }, [
|
|
184
|
-
_ctx.emptyLabel ? {
|
|
185
|
-
name: "default",
|
|
186
|
-
fn: withCtx(() => [
|
|
187
|
-
createTextVNode(toDisplayString(_ctx.emptyLabel), 1)
|
|
188
|
-
]),
|
|
189
|
-
key: "0"
|
|
190
|
-
} : void 0
|
|
191
|
-
]), 1024),
|
|
192
|
-
createVNode(ComboboxGroup, null, {
|
|
193
|
-
default: withCtx(() => [
|
|
194
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (option) => {
|
|
195
|
-
return openBlock(), createBlock(ComboboxItem, {
|
|
196
|
-
key: option.label,
|
|
197
|
-
label: option.label,
|
|
198
|
-
sublabel: option.sublabel,
|
|
199
|
-
description: option.description,
|
|
200
|
-
checkbox: props.multiple,
|
|
201
|
-
value: option,
|
|
202
|
-
selected: isSelected(option.value)
|
|
203
|
-
}, {
|
|
204
|
-
prefix: withCtx(() => [
|
|
205
|
-
option.icon ? (openBlock(), createElementBlock("i", {
|
|
206
|
-
key: 0,
|
|
207
|
-
class: normalizeClass(option.icon)
|
|
208
|
-
}, null, 2)) : createCommentVNode("", true),
|
|
209
|
-
option.image ? (openBlock(), createElementBlock("img", {
|
|
210
|
-
key: 1,
|
|
211
|
-
src: option.image,
|
|
212
|
-
alt: "option",
|
|
213
|
-
class: "celeste-dropdown-item-image"
|
|
214
|
-
}, null, 8, _hoisted_8)) : createCommentVNode("", true)
|
|
215
|
-
]),
|
|
216
|
-
_: 2
|
|
217
|
-
}, 1032, ["label", "sublabel", "description", "checkbox", "value", "selected"]);
|
|
218
|
-
}), 128))
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
})
|
|
222
|
-
]),
|
|
223
|
-
_: 1
|
|
224
|
-
})
|
|
225
|
-
]),
|
|
226
|
-
_: 3
|
|
227
|
-
}, 16);
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
const combobox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e3715243"]]);
|
|
232
|
-
export {
|
|
233
|
-
combobox as default
|
|
234
|
-
};
|