@youcan/celeste 0.17.2 → 0.18.0
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/ai/README.md +1 -1
- package/ai/component-registry.json +2 -2
- package/ai/icons.json +2 -2
- package/ai/tokens.json +2 -2
- package/dist/celeste.css +205 -144
- package/dist/cjs/chunks/ComboboxItem.cjs +6 -0
- package/dist/cjs/chunks/combobox-item.cjs +63 -7
- package/dist/cjs/chunks/combobox-list.cjs +1 -1
- package/dist/cjs/chunks/combobox-trigger.cjs +1 -1
- package/dist/cjs/chunks/combobox.cjs +2 -2
- package/dist/cjs/chunks/components.cjs +1 -1
- package/dist/cjs/chunks/text-input-affix.cjs +1 -1
- package/dist/cjs/chunks/text-input-button.cjs +1 -1
- package/dist/cjs/chunks/text-input.cjs +2 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/chunks/ComboboxItem.js +1 -1
- package/dist/es/chunks/combobox-item.js +65 -9
- package/dist/es/chunks/combobox-list.js +1 -1
- package/dist/es/chunks/combobox-trigger.js +1 -1
- package/dist/es/chunks/combobox.js +2 -2
- package/dist/es/chunks/components.js +1 -1
- package/dist/es/chunks/text-input-affix.js +1 -1
- package/dist/es/chunks/text-input-button.js +1 -1
- package/dist/es/chunks/text-input.js +2 -1
- package/dist/es/index.js +1 -1
- package/package.json +3 -3
- package/src/components/combobox/combobox-item.vue +15 -7
- package/src/components/combobox/combobox-list.vue +2 -2
- package/src/components/combobox/combobox-trigger.vue +38 -0
- package/src/components/combobox/combobox.vue +2 -0
- package/src/components/text-input/stories/text-input.stories.ts +53 -3
- package/src/components/text-input/text-input-affix.vue +7 -3
- package/src/components/text-input/text-input-button.vue +6 -2
- package/src/components/text-input/text-input.vue +45 -34
|
@@ -194,3 +194,9 @@ Object.defineProperty(exports, "ComboboxItem_default", {
|
|
|
194
194
|
return ComboboxItem_default;
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
|
+
Object.defineProperty(exports, "injectListboxItemContext", {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function() {
|
|
200
|
+
return injectListboxItemContext;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
@@ -1,9 +1,66 @@
|
|
|
1
1
|
const require_clsx = require("./clsx.cjs");
|
|
2
2
|
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper.cjs");
|
|
3
|
+
const require_Primitive = require("./Primitive.cjs");
|
|
4
|
+
const require_useForwardExpose = require("./useForwardExpose.cjs");
|
|
3
5
|
const require_useForwardPropsEmits = require("./useForwardPropsEmits.cjs");
|
|
4
6
|
const require_ComboboxItem = require("./ComboboxItem.cjs");
|
|
5
7
|
const require_checkbox = require("./checkbox.cjs");
|
|
6
8
|
let vue = require("vue");
|
|
9
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Listbox/ListboxItemIndicator.js
|
|
10
|
+
var ListboxItemIndicator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
11
|
+
__name: "ListboxItemIndicator",
|
|
12
|
+
props: {
|
|
13
|
+
asChild: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
as: {
|
|
18
|
+
type: null,
|
|
19
|
+
required: false,
|
|
20
|
+
default: "span"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
require_useForwardExpose.useForwardExpose();
|
|
26
|
+
const itemContext = require_ComboboxItem.injectListboxItemContext();
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return (0, vue.unref)(itemContext).isSelected.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_Primitive.Primitive), (0, vue.mergeProps)({
|
|
29
|
+
key: 0,
|
|
30
|
+
"aria-hidden": "true"
|
|
31
|
+
}, props), {
|
|
32
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16)) : (0, vue.createCommentVNode)("v-if", true);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Combobox/ComboboxItemIndicator.js
|
|
40
|
+
var ComboboxItemIndicator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
41
|
+
__name: "ComboboxItemIndicator",
|
|
42
|
+
props: {
|
|
43
|
+
asChild: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
as: {
|
|
48
|
+
type: null,
|
|
49
|
+
required: false,
|
|
50
|
+
default: "span"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
setup(__props) {
|
|
54
|
+
const props = __props;
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(ListboxItemIndicator_default), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(props)), {
|
|
57
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
7
64
|
//#region src/components/combobox/combobox-item.vue?vue&type=script&setup=true&lang.ts
|
|
8
65
|
var _hoisted_1 = ["aria-disabled"];
|
|
9
66
|
var _hoisted_2 = { class: "celeste-dropdown-item-info" };
|
|
@@ -20,10 +77,6 @@ var _hoisted_6 = {
|
|
|
20
77
|
key: 2,
|
|
21
78
|
class: "celeste-dropdown-item-suffix"
|
|
22
79
|
};
|
|
23
|
-
var _hoisted_7 = {
|
|
24
|
-
key: 3,
|
|
25
|
-
class: "i-celeste-check-fill"
|
|
26
|
-
};
|
|
27
80
|
var combobox_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
28
81
|
__name: "combobox-item",
|
|
29
82
|
props: {
|
|
@@ -68,7 +121,7 @@ var combobox_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0
|
|
|
68
121
|
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", {
|
|
69
122
|
tabindex: "0",
|
|
70
123
|
"aria-disabled": __props.disabled,
|
|
71
|
-
class: (0, vue.normalizeClass)((0, vue.unref)(require_clsx.clsx)(props.class, "celeste-dropdown-item", { "celeste-dropdown-item-disabled": __props.disabled }, { "celeste-dropdown-item-
|
|
124
|
+
class: (0, vue.normalizeClass)((0, vue.unref)(require_clsx.clsx)(props.class, "celeste-dropdown-item", { "celeste-dropdown-item-disabled": __props.disabled }, { "celeste-dropdown-item-focused": __props.focused }))
|
|
72
125
|
}, [
|
|
73
126
|
__props.checkbox && __props.size === "sm" ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_checkbox.checkbox_default, {
|
|
74
127
|
key: 0,
|
|
@@ -84,7 +137,10 @@ var combobox_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0
|
|
|
84
137
|
innerHTML: __props.label
|
|
85
138
|
}, null, 8, _hoisted_3), __props.sublabel ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4, (0, vue.toDisplayString)(__props.sublabel), 1)) : (0, vue.createCommentVNode)("", true)], 2), __props.description && __props.size === "lg" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_5, (0, vue.toDisplayString)(__props.description), 1)) : (0, vue.createCommentVNode)("", true)]),
|
|
86
139
|
_ctx.$slots.suffix ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6, [(0, vue.renderSlot)(_ctx.$slots, "suffix", {}, void 0, true)])) : (0, vue.createCommentVNode)("", true),
|
|
87
|
-
|
|
140
|
+
(0, vue.createVNode)((0, vue.unref)(ComboboxItemIndicator_default), { "as-child": "" }, {
|
|
141
|
+
default: (0, vue.withCtx)(() => [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("i", { class: "celeste-dropdown-item-indicator i-celeste-check-line" }, null, -1)])]),
|
|
142
|
+
_: 1
|
|
143
|
+
})
|
|
88
144
|
], 10, _hoisted_1)]),
|
|
89
145
|
_: 3
|
|
90
146
|
}, 16, ["disabled"]);
|
|
@@ -93,7 +149,7 @@ var combobox_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0
|
|
|
93
149
|
});
|
|
94
150
|
//#endregion
|
|
95
151
|
//#region src/components/combobox/combobox-item.vue
|
|
96
|
-
var combobox_item_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_item_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
152
|
+
var combobox_item_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_item_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-7b0de826"]]);
|
|
97
153
|
//#endregion
|
|
98
154
|
Object.defineProperty(exports, "combobox_item_default", {
|
|
99
155
|
enumerable: true,
|
|
@@ -160,7 +160,7 @@ var combobox_list_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0
|
|
|
160
160
|
});
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/components/combobox/combobox-list.vue
|
|
163
|
-
var combobox_list_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_list_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
163
|
+
var combobox_list_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_list_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d0001b47"]]);
|
|
164
164
|
//#endregion
|
|
165
165
|
Object.defineProperty(exports, "combobox_list_default", {
|
|
166
166
|
enumerable: true,
|
|
@@ -101,7 +101,7 @@ var combobox_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
101
101
|
});
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region src/components/combobox/combobox-trigger.vue
|
|
104
|
-
var combobox_trigger_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_trigger_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
104
|
+
var combobox_trigger_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_trigger_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-7924a538"]]);
|
|
105
105
|
//#endregion
|
|
106
106
|
Object.defineProperty(exports, "combobox_trigger_default", {
|
|
107
107
|
enumerable: true,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper.cjs");
|
|
2
2
|
const require_badge = require("./badge.cjs");
|
|
3
3
|
const require_useForwardPropsEmits = require("./useForwardPropsEmits.cjs");
|
|
4
|
+
const require_combobox_item = require("./combobox-item.cjs");
|
|
4
5
|
const require_combobox_anchor = require("./combobox-anchor.cjs");
|
|
5
6
|
const require_combobox_empty = require("./combobox-empty.cjs");
|
|
6
7
|
const require_combobox_list = require("./combobox-list.cjs");
|
|
7
8
|
const require_combobox_trigger = require("./combobox-trigger.cjs");
|
|
8
9
|
const require_combobox_group = require("./combobox-group.cjs");
|
|
9
10
|
const require_combobox_input = require("./combobox-input.cjs");
|
|
10
|
-
const require_combobox_item = require("./combobox-item.cjs");
|
|
11
11
|
const require_combobox_root = require("./combobox-root.cjs");
|
|
12
12
|
const require_combobox_separator = require("./combobox-separator.cjs");
|
|
13
13
|
let vue = require("vue");
|
|
@@ -201,7 +201,7 @@ var combobox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue
|
|
|
201
201
|
});
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region src/components/combobox/combobox.vue
|
|
204
|
-
var combobox_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
204
|
+
var combobox_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(combobox_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b1f5501b"]]);
|
|
205
205
|
//#endregion
|
|
206
206
|
Object.defineProperty(exports, "combobox_default", {
|
|
207
207
|
enumerable: true,
|
|
@@ -7,6 +7,7 @@ const require_status_badge = require("./status-badge.cjs");
|
|
|
7
7
|
const require_tooltip_content = require("./tooltip-content.cjs");
|
|
8
8
|
const require_collapsible_content = require("./collapsible-content.cjs");
|
|
9
9
|
const require_collapsible_trigger = require("./collapsible-trigger.cjs");
|
|
10
|
+
const require_combobox_item = require("./combobox-item.cjs");
|
|
10
11
|
const require_combobox_anchor = require("./combobox-anchor.cjs");
|
|
11
12
|
const require_combobox_empty = require("./combobox-empty.cjs");
|
|
12
13
|
const require_combobox_list = require("./combobox-list.cjs");
|
|
@@ -80,7 +81,6 @@ const require_color_swatch = require("./color-swatch.cjs");
|
|
|
80
81
|
const require_hue_slider = require("./hue-slider.cjs");
|
|
81
82
|
const require_combobox_group = require("./combobox-group.cjs");
|
|
82
83
|
const require_combobox_input = require("./combobox-input.cjs");
|
|
83
|
-
const require_combobox_item = require("./combobox-item.cjs");
|
|
84
84
|
const require_combobox_root = require("./combobox-root.cjs");
|
|
85
85
|
const require_combobox_separator = require("./combobox-separator.cjs");
|
|
86
86
|
const require_combobox = require("./combobox.cjs");
|
|
@@ -26,7 +26,7 @@ var text_input_affix_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
26
26
|
});
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/components/text-input/text-input-affix.vue
|
|
29
|
-
var text_input_affix_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_affix_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
29
|
+
var text_input_affix_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_affix_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b03a423e"]]);
|
|
30
30
|
//#endregion
|
|
31
31
|
Object.defineProperty(exports, "text_input_affix_default", {
|
|
32
32
|
enumerable: true,
|
|
@@ -40,7 +40,7 @@ var text_input_button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
40
40
|
});
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/components/text-input/text-input-button.vue
|
|
43
|
-
var text_input_button_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_button_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
43
|
+
var text_input_button_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_button_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d9fba798"]]);
|
|
44
44
|
//#endregion
|
|
45
45
|
Object.defineProperty(exports, "text_input_button_default", {
|
|
46
46
|
enumerable: true,
|
|
@@ -94,6 +94,7 @@ var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, v
|
|
|
94
94
|
}, {
|
|
95
95
|
default: (0, vue.withCtx)(() => [showClearButton.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_text_input_button.text_input_button_default, {
|
|
96
96
|
key: 0,
|
|
97
|
+
inline: "",
|
|
97
98
|
type: "button",
|
|
98
99
|
"aria-label": "Clear search",
|
|
99
100
|
onClick: clearInput
|
|
@@ -109,7 +110,7 @@ var text_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, v
|
|
|
109
110
|
});
|
|
110
111
|
//#endregion
|
|
111
112
|
//#region src/components/text-input/text-input.vue
|
|
112
|
-
var text_input_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
113
|
+
var text_input_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(text_input_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-2139c861"]]);
|
|
113
114
|
//#endregion
|
|
114
115
|
Object.defineProperty(exports, "text_input_default", {
|
|
115
116
|
enumerable: true,
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -8,6 +8,7 @@ const require_components = require("./chunks/components.cjs");
|
|
|
8
8
|
const require_tooltip_content = require("./chunks/tooltip-content.cjs");
|
|
9
9
|
const require_collapsible_content = require("./chunks/collapsible-content.cjs");
|
|
10
10
|
const require_collapsible_trigger = require("./chunks/collapsible-trigger.cjs");
|
|
11
|
+
const require_combobox_item = require("./chunks/combobox-item.cjs");
|
|
11
12
|
const require_combobox_anchor = require("./chunks/combobox-anchor.cjs");
|
|
12
13
|
const require_combobox_empty = require("./chunks/combobox-empty.cjs");
|
|
13
14
|
const require_combobox_list = require("./chunks/combobox-list.cjs");
|
|
@@ -88,7 +89,6 @@ const require_color_swatch = require("./chunks/color-swatch.cjs");
|
|
|
88
89
|
const require_hue_slider = require("./chunks/hue-slider.cjs");
|
|
89
90
|
const require_combobox_group = require("./chunks/combobox-group.cjs");
|
|
90
91
|
const require_combobox_input = require("./chunks/combobox-input.cjs");
|
|
91
|
-
const require_combobox_item = require("./chunks/combobox-item.cjs");
|
|
92
92
|
const require_combobox_root = require("./chunks/combobox-root.cjs");
|
|
93
93
|
const require_combobox_separator = require("./chunks/combobox-separator.cjs");
|
|
94
94
|
const require_combobox = require("./chunks/combobox.cjs");
|
|
@@ -1,9 +1,66 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx.js";
|
|
2
2
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { t as Primitive } from "./Primitive.js";
|
|
4
|
+
import { t as useForwardExpose } from "./useForwardExpose.js";
|
|
3
5
|
import { t as useForwardPropsEmits } from "./useForwardPropsEmits.js";
|
|
4
|
-
import { t as ComboboxItem_default } from "./ComboboxItem.js";
|
|
6
|
+
import { n as injectListboxItemContext, t as ComboboxItem_default } from "./ComboboxItem.js";
|
|
5
7
|
import { t as checkbox_default } from "./checkbox.js";
|
|
6
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
8
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
9
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Listbox/ListboxItemIndicator.js
|
|
10
|
+
var ListboxItemIndicator_default = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "ListboxItemIndicator",
|
|
12
|
+
props: {
|
|
13
|
+
asChild: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
as: {
|
|
18
|
+
type: null,
|
|
19
|
+
required: false,
|
|
20
|
+
default: "span"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
useForwardExpose();
|
|
26
|
+
const itemContext = injectListboxItemContext();
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return unref(itemContext).isSelected.value ? (openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
29
|
+
key: 0,
|
|
30
|
+
"aria-hidden": "true"
|
|
31
|
+
}, props), {
|
|
32
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16)) : createCommentVNode("v-if", true);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.41_typescript@6.0.3_/node_modules/reka-ui/dist/Combobox/ComboboxItemIndicator.js
|
|
40
|
+
var ComboboxItemIndicator_default = /* @__PURE__ */ defineComponent({
|
|
41
|
+
__name: "ComboboxItemIndicator",
|
|
42
|
+
props: {
|
|
43
|
+
asChild: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
as: {
|
|
48
|
+
type: null,
|
|
49
|
+
required: false,
|
|
50
|
+
default: "span"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
setup(__props) {
|
|
54
|
+
const props = __props;
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return openBlock(), createBlock(unref(ListboxItemIndicator_default), normalizeProps(guardReactiveProps(props)), {
|
|
57
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
7
64
|
//#region src/components/combobox/combobox-item.vue?vue&type=script&setup=true&lang.ts
|
|
8
65
|
var _hoisted_1 = ["aria-disabled"];
|
|
9
66
|
var _hoisted_2 = { class: "celeste-dropdown-item-info" };
|
|
@@ -20,10 +77,6 @@ var _hoisted_6 = {
|
|
|
20
77
|
key: 2,
|
|
21
78
|
class: "celeste-dropdown-item-suffix"
|
|
22
79
|
};
|
|
23
|
-
var _hoisted_7 = {
|
|
24
|
-
key: 3,
|
|
25
|
-
class: "i-celeste-check-fill"
|
|
26
|
-
};
|
|
27
80
|
//#endregion
|
|
28
81
|
//#region src/components/combobox/combobox-item.vue
|
|
29
82
|
var combobox_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -70,7 +123,7 @@ var combobox_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
70
123
|
default: withCtx(() => [createElementVNode("div", {
|
|
71
124
|
tabindex: "0",
|
|
72
125
|
"aria-disabled": __props.disabled,
|
|
73
|
-
class: normalizeClass(unref(clsx)(props.class, "celeste-dropdown-item", { "celeste-dropdown-item-disabled": __props.disabled }, { "celeste-dropdown-item-
|
|
126
|
+
class: normalizeClass(unref(clsx)(props.class, "celeste-dropdown-item", { "celeste-dropdown-item-disabled": __props.disabled }, { "celeste-dropdown-item-focused": __props.focused }))
|
|
74
127
|
}, [
|
|
75
128
|
__props.checkbox && __props.size === "sm" ? (openBlock(), createBlock(checkbox_default, {
|
|
76
129
|
key: 0,
|
|
@@ -86,12 +139,15 @@ var combobox_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
86
139
|
innerHTML: __props.label
|
|
87
140
|
}, null, 8, _hoisted_3), __props.sublabel ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.sublabel), 1)) : createCommentVNode("", true)], 2), __props.description && __props.size === "lg" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(__props.description), 1)) : createCommentVNode("", true)]),
|
|
88
141
|
_ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "suffix", {}, void 0, true)])) : createCommentVNode("", true),
|
|
89
|
-
|
|
142
|
+
createVNode(unref(ComboboxItemIndicator_default), { "as-child": "" }, {
|
|
143
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("i", { class: "celeste-dropdown-item-indicator i-celeste-check-line" }, null, -1)])]),
|
|
144
|
+
_: 1
|
|
145
|
+
})
|
|
90
146
|
], 10, _hoisted_1)]),
|
|
91
147
|
_: 3
|
|
92
148
|
}, 16, ["disabled"]);
|
|
93
149
|
};
|
|
94
150
|
}
|
|
95
|
-
}), [["__scopeId", "data-v-
|
|
151
|
+
}), [["__scopeId", "data-v-7b0de826"]]);
|
|
96
152
|
//#endregion
|
|
97
153
|
export { combobox_item_default as t };
|
|
@@ -98,6 +98,6 @@ var combobox_trigger_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
98
98
|
}, 16, ["class"]);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
}), [["__scopeId", "data-v-
|
|
101
|
+
}), [["__scopeId", "data-v-7924a538"]]);
|
|
102
102
|
//#endregion
|
|
103
103
|
export { combobox_trigger_default as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { t as badge_default } from "./badge.js";
|
|
3
3
|
import { t as useForwardPropsEmits } from "./useForwardPropsEmits.js";
|
|
4
|
+
import { t as combobox_item_default } from "./combobox-item.js";
|
|
4
5
|
import { t as combobox_anchor_default } from "./combobox-anchor.js";
|
|
5
6
|
import { t as combobox_empty_default } from "./combobox-empty.js";
|
|
6
7
|
import { t as combobox_list_default } from "./combobox-list.js";
|
|
7
8
|
import { t as combobox_trigger_default } from "./combobox-trigger.js";
|
|
8
9
|
import { t as combobox_group_default } from "./combobox-group.js";
|
|
9
10
|
import { t as combobox_input_default } from "./combobox-input.js";
|
|
10
|
-
import { t as combobox_item_default } from "./combobox-item.js";
|
|
11
11
|
import { t as combobox_root_default } from "./combobox-root.js";
|
|
12
12
|
import { t as combobox_separator_default } from "./combobox-separator.js";
|
|
13
13
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
@@ -200,6 +200,6 @@ var combobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
200
200
|
}, 16);
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
}), [["__scopeId", "data-v-
|
|
203
|
+
}), [["__scopeId", "data-v-b1f5501b"]]);
|
|
204
204
|
//#endregion
|
|
205
205
|
export { combobox_default as t };
|
|
@@ -7,6 +7,7 @@ import { t as status_badge_default } from "./status-badge.js";
|
|
|
7
7
|
import { t as tooltip_content_default } from "./tooltip-content.js";
|
|
8
8
|
import { t as collapsible_content_default } from "./collapsible-content.js";
|
|
9
9
|
import { t as collapsible_trigger_default } from "./collapsible-trigger.js";
|
|
10
|
+
import { t as combobox_item_default } from "./combobox-item.js";
|
|
10
11
|
import { t as combobox_anchor_default } from "./combobox-anchor.js";
|
|
11
12
|
import { t as combobox_empty_default } from "./combobox-empty.js";
|
|
12
13
|
import { t as combobox_list_default } from "./combobox-list.js";
|
|
@@ -80,7 +81,6 @@ import { t as color_swatch_default } from "./color-swatch.js";
|
|
|
80
81
|
import { t as hue_slider_default } from "./hue-slider.js";
|
|
81
82
|
import { t as combobox_group_default } from "./combobox-group.js";
|
|
82
83
|
import { t as combobox_input_default } from "./combobox-input.js";
|
|
83
|
-
import { t as combobox_item_default } from "./combobox-item.js";
|
|
84
84
|
import { t as combobox_root_default } from "./combobox-root.js";
|
|
85
85
|
import { t as combobox_separator_default } from "./combobox-separator.js";
|
|
86
86
|
import { t as combobox_default } from "./combobox.js";
|
|
@@ -24,6 +24,6 @@ var text_input_affix_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
24
24
|
return openBlock(), createElementBlock("span", mergeProps(unref(delegatedProps), { class: unref(clsx)("celeste-text-input-affix", props.class) }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
}), [["__scopeId", "data-v-
|
|
27
|
+
}), [["__scopeId", "data-v-b03a423e"]]);
|
|
28
28
|
//#endregion
|
|
29
29
|
export { text_input_affix_default as t };
|
|
@@ -38,6 +38,6 @@ var text_input_button_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
38
38
|
}, 16, ["class"]);
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
}), [["__scopeId", "data-v-
|
|
41
|
+
}), [["__scopeId", "data-v-d9fba798"]]);
|
|
42
42
|
//#endregion
|
|
43
43
|
export { text_input_button_default as t };
|
|
@@ -96,6 +96,7 @@ var text_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
96
96
|
}, {
|
|
97
97
|
default: withCtx(() => [showClearButton.value ? (openBlock(), createBlock(text_input_button_default, {
|
|
98
98
|
key: 0,
|
|
99
|
+
inline: "",
|
|
99
100
|
type: "button",
|
|
100
101
|
"aria-label": "Clear search",
|
|
101
102
|
onClick: clearInput
|
|
@@ -108,6 +109,6 @@ var text_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
108
109
|
], 10, _hoisted_1);
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
}), [["__scopeId", "data-v-
|
|
112
|
+
}), [["__scopeId", "data-v-2139c861"]]);
|
|
112
113
|
//#endregion
|
|
113
114
|
export { text_input_default as t };
|
package/dist/es/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { n as sidebar_separator_default, t as components_exports } from "./chunk
|
|
|
7
7
|
import { t as tooltip_content_default } from "./chunks/tooltip-content.js";
|
|
8
8
|
import { t as collapsible_content_default } from "./chunks/collapsible-content.js";
|
|
9
9
|
import { t as collapsible_trigger_default } from "./chunks/collapsible-trigger.js";
|
|
10
|
+
import { t as combobox_item_default } from "./chunks/combobox-item.js";
|
|
10
11
|
import { t as combobox_anchor_default } from "./chunks/combobox-anchor.js";
|
|
11
12
|
import { t as combobox_empty_default } from "./chunks/combobox-empty.js";
|
|
12
13
|
import { t as combobox_list_default } from "./chunks/combobox-list.js";
|
|
@@ -87,7 +88,6 @@ import { t as color_swatch_default } from "./chunks/color-swatch.js";
|
|
|
87
88
|
import { t as hue_slider_default } from "./chunks/hue-slider.js";
|
|
88
89
|
import { t as combobox_group_default } from "./chunks/combobox-group.js";
|
|
89
90
|
import { t as combobox_input_default } from "./chunks/combobox-input.js";
|
|
90
|
-
import { t as combobox_item_default } from "./chunks/combobox-item.js";
|
|
91
91
|
import { t as combobox_root_default } from "./chunks/combobox-root.js";
|
|
92
92
|
import { t as combobox_separator_default } from "./chunks/combobox-separator.js";
|
|
93
93
|
import { t as combobox_default } from "./chunks/combobox.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/celeste",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"author": "YouCan <tech@youcan.shop>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"reka-ui": "~2.10.5",
|
|
53
53
|
"tinycolor2": "^1.6.0",
|
|
54
54
|
"vue-sonner": "^2.0.9",
|
|
55
|
-
"@youcan/celeste-icons": "0.
|
|
56
|
-
"@youcan/celeste-tokens": "0.
|
|
55
|
+
"@youcan/celeste-icons": "0.18.0",
|
|
56
|
+
"@youcan/celeste-tokens": "0.18.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@chromatic-com/storybook": "^5.3.0",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { ComboboxItemEmits } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { ComboboxItem, useForwardPropsEmits } from 'reka-ui';
|
|
5
|
+
import { ComboboxItem, ComboboxItemIndicator, useForwardPropsEmits } from 'reka-ui';
|
|
6
6
|
import { computed } from 'vue';
|
|
7
7
|
import Checkbox from '../checkbox/checkbox.vue';
|
|
8
8
|
|
|
@@ -48,7 +48,6 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
48
48
|
props.class,
|
|
49
49
|
'celeste-dropdown-item',
|
|
50
50
|
{ 'celeste-dropdown-item-disabled': disabled },
|
|
51
|
-
{ 'celeste-dropdown-item-selected': selected },
|
|
52
51
|
{ 'celeste-dropdown-item-focused': focused },
|
|
53
52
|
)"
|
|
54
53
|
>
|
|
@@ -83,7 +82,9 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
83
82
|
<div v-if="$slots.suffix" class="celeste-dropdown-item-suffix">
|
|
84
83
|
<slot name="suffix" />
|
|
85
84
|
</div>
|
|
86
|
-
<
|
|
85
|
+
<ComboboxItemIndicator as-child>
|
|
86
|
+
<i class="celeste-dropdown-item-indicator i-celeste-check-line" />
|
|
87
|
+
</ComboboxItemIndicator>
|
|
87
88
|
</div>
|
|
88
89
|
</ComboboxItem>
|
|
89
90
|
</template>
|
|
@@ -91,8 +92,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
91
92
|
<style lang="scss" scoped>
|
|
92
93
|
.celeste-dropdown-item {
|
|
93
94
|
display: flex;
|
|
95
|
+
position: relative;
|
|
94
96
|
align-items: center;
|
|
95
97
|
padding: var(--spacing-8);
|
|
98
|
+
padding-inline-end: var(--spacing-36);
|
|
96
99
|
transition-property: background-color;
|
|
97
100
|
transition-duration: var(--animation-fast);
|
|
98
101
|
transition-timing-function: ease-out;
|
|
@@ -159,6 +162,15 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
159
162
|
color: var(--color-icon-sub-600);
|
|
160
163
|
}
|
|
161
164
|
|
|
165
|
+
&-indicator {
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 50%;
|
|
168
|
+
width: 20px;
|
|
169
|
+
height: 20px;
|
|
170
|
+
transform: translateY(-50%);
|
|
171
|
+
inset-inline-end: var(--spacing-8);
|
|
172
|
+
}
|
|
173
|
+
|
|
162
174
|
&-disabled {
|
|
163
175
|
color: var(--color-text-disabled-300);
|
|
164
176
|
cursor: not-allowed;
|
|
@@ -174,10 +186,6 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
174
186
|
}
|
|
175
187
|
}
|
|
176
188
|
|
|
177
|
-
&-selected {
|
|
178
|
-
background: var(--color-bg-weak-50);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
189
|
.celeste-dropdown-item-info {
|
|
182
190
|
display: flex;
|
|
183
191
|
flex: 1 0 0;
|
|
@@ -39,14 +39,14 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
39
39
|
div:deep(.celeste-dropdown-content) {
|
|
40
40
|
--dropdown-height: 300px;
|
|
41
41
|
--dropdown-min-width: var(--reka-combobox-trigger-width, 300px);
|
|
42
|
-
--dropdown-width: max(var(--reka-popper-anchor-width), 300px);
|
|
43
42
|
|
|
44
43
|
display: flex;
|
|
45
44
|
z-index: 50;
|
|
46
45
|
box-sizing: border-box;
|
|
47
46
|
flex-direction: column;
|
|
48
|
-
width:
|
|
47
|
+
width: max-content;
|
|
49
48
|
min-width: var(--dropdown-min-width);
|
|
49
|
+
max-width: max(var(--reka-popper-anchor-width), 320px);
|
|
50
50
|
max-height: var(--dropdown-height);
|
|
51
51
|
margin-top: var(--spacing-10);
|
|
52
52
|
padding: var(--spacing-8);
|
|
@@ -197,6 +197,19 @@ const forwarded = useForwardProps(delegatedProps);
|
|
|
197
197
|
border: none;
|
|
198
198
|
border-radius: 0;
|
|
199
199
|
box-shadow: none;
|
|
200
|
+
gap: 0;
|
|
201
|
+
|
|
202
|
+
:deep(.celeste-dropdown-anchor-trigger-prefix) {
|
|
203
|
+
margin-inline-end: var(--spacing-8);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:deep(.celeste-dropdown-trigger) {
|
|
207
|
+
margin-inline-start: var(--spacing-2);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&.celeste-dropdown-anchor-trigger-filled:not([data-disabled]) :deep(.celeste-dropdown-trigger i) {
|
|
211
|
+
color: var(--color-icon-sub-600);
|
|
212
|
+
}
|
|
200
213
|
|
|
201
214
|
&:deep(.celeste-dropdown-trigger-label) {
|
|
202
215
|
flex: inherit;
|
|
@@ -206,6 +219,31 @@ const forwarded = useForwardProps(delegatedProps);
|
|
|
206
219
|
&[data-state='open'] {
|
|
207
220
|
box-shadow: none;
|
|
208
221
|
}
|
|
222
|
+
|
|
223
|
+
&:focus-visible {
|
|
224
|
+
background: var(--color-bg-weak-50);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&.celeste-dropdown-anchor-trigger-size-md {
|
|
228
|
+
padding-inline: var(--spacing-10) var(--spacing-8);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&.celeste-dropdown-anchor-trigger-size-sm {
|
|
232
|
+
padding-inline: var(--spacing-8);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&.celeste-dropdown-anchor-trigger-size-xs {
|
|
236
|
+
padding-inline: var(--spacing-8) var(--spacing-6);
|
|
237
|
+
|
|
238
|
+
:deep(.celeste-dropdown-anchor-trigger-prefix) {
|
|
239
|
+
margin-inline-end: var(--spacing-6);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
:deep(.celeste-dropdown-anchor-trigger-prefix :is(i, .selected-dropdown-image)) {
|
|
243
|
+
width: 16px;
|
|
244
|
+
height: 16px;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
209
247
|
}
|
|
210
248
|
|
|
211
249
|
&.celeste-dropdown-anchor-trigger-type-inline {
|
|
@@ -253,6 +253,7 @@ const filteredOptions = computed(() => props.ignoreFilter
|
|
|
253
253
|
align-items: center;
|
|
254
254
|
justify-content: center;
|
|
255
255
|
width: 20px;
|
|
256
|
+
max-width: none;
|
|
256
257
|
height: 20px;
|
|
257
258
|
object-fit: cover;
|
|
258
259
|
border-radius: var(--radius-full);
|
|
@@ -274,6 +275,7 @@ const filteredOptions = computed(() => props.ignoreFilter
|
|
|
274
275
|
overflow: hidden;
|
|
275
276
|
text-overflow: ellipsis;
|
|
276
277
|
white-space: nowrap;
|
|
278
|
+
unicode-bidi: plaintext;
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
|