@youcan/celeste 0.6.21 → 0.6.23

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.
Files changed (38) hide show
  1. package/dist/celeste.css +396 -419
  2. package/dist/cjs/color-picker.js +1 -2
  3. package/dist/cjs/combobox-input.js +4 -8
  4. package/dist/cjs/combobox-list.js +3 -2
  5. package/dist/cjs/combobox-trigger.js +2 -1
  6. package/dist/cjs/combobox.js +29 -23
  7. package/dist/cjs/index.js +0 -3
  8. package/dist/cjs/text-input-affix.js +1 -2
  9. package/dist/cjs/text-input-button.js +2 -3
  10. package/dist/cjs/text-input.js +81 -4
  11. package/dist/components/combobox/combobox.d.ts +1 -0
  12. package/dist/components/dropdown/dropdown.d.ts +1 -1
  13. package/dist/components/text-input/index.d.ts +0 -2
  14. package/dist/components/text-input/text-input-affix.d.ts +1 -4
  15. package/dist/components/text-input/text-input.d.ts +6 -1
  16. package/dist/es/color-picker.js +1 -2
  17. package/dist/es/combobox-input.js +5 -9
  18. package/dist/es/combobox-list.js +3 -2
  19. package/dist/es/combobox-trigger.js +2 -1
  20. package/dist/es/combobox.js +30 -24
  21. package/dist/es/index.js +3 -6
  22. package/dist/es/text-input-affix.js +1 -2
  23. package/dist/es/text-input-button.js +2 -3
  24. package/dist/es/text-input.js +82 -5
  25. package/package.json +3 -3
  26. package/src/components/combobox/combobox-input.vue +3 -2
  27. package/src/components/combobox/combobox-list.vue +15 -35
  28. package/src/components/combobox/combobox-trigger.vue +1 -0
  29. package/src/components/combobox/combobox.vue +9 -4
  30. package/src/components/text-input/index.ts +0 -3
  31. package/src/components/text-input/stories/text-input.stories.ts +142 -45
  32. package/src/components/text-input/text-input-affix.vue +5 -12
  33. package/src/components/text-input/text-input-button.vue +8 -3
  34. package/src/components/text-input/text-input.vue +129 -64
  35. package/dist/cjs/text-input-icon.js +0 -29
  36. package/dist/components/text-input/text-input-icon.d.ts +0 -10
  37. package/dist/es/text-input-icon.js +0 -30
  38. package/src/components/text-input/text-input-icon.vue +0 -37
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, openBlock, createBlock, mergeProps, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, toDisplayString, createSlots, createTextVNode, Fragment, renderList } from "vue";
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
2
  import { x as xe } from "./chunks/index.js";
3
3
  import Badge from "./badge.js";
4
4
  import { _ as _sfc_main$2 } from "./chunks/combobox-anchor.js";
@@ -11,24 +11,28 @@ import { _ as _sfc_main$1 } from "./chunks/combobox-root.js";
11
11
  import ComboboxSeparator from "./combobox-separator.js";
12
12
  import ComboboxTrigger from "./combobox-trigger.js";
13
13
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
14
- const _hoisted_1 = { class: "celeste-dropdown-anchor-trigger-prefix" };
15
- const _hoisted_2 = {
14
+ const _hoisted_1 = {
16
15
  key: 0,
17
- class: "celeste-dropdown-anchor-trigger-prefix-selected"
16
+ class: "celeste-dropdown-anchor-trigger-prefix"
18
17
  };
18
+ const _hoisted_2 = { class: "celeste-dropdown-anchor-trigger-prefix-selected" };
19
19
  const _hoisted_3 = { key: 1 };
20
20
  const _hoisted_4 = ["src"];
21
21
  const _hoisted_5 = {
22
- key: 0,
22
+ key: 1,
23
+ class: "celeste-dropdown-anchor-trigger-prefix"
24
+ };
25
+ const _hoisted_6 = {
26
+ key: 2,
23
27
  class: "celeste-dropdown-input"
24
28
  };
25
- const _hoisted_6 = { key: 0 };
26
- const _hoisted_7 = { key: 1 };
27
- const _hoisted_8 = {
29
+ const _hoisted_7 = { key: 0 };
30
+ const _hoisted_8 = { key: 1 };
31
+ const _hoisted_9 = {
28
32
  key: 2,
29
33
  class: "celeste-input-badge"
30
34
  };
31
- const _hoisted_9 = ["src"];
35
+ const _hoisted_10 = ["src"];
32
36
  const __default__ = {
33
37
  inheritAttrs: false
34
38
  };
@@ -40,10 +44,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
44
  valueBy: {},
41
45
  placeholder: { default: "Select" },
42
46
  type: {},
43
- size: { default: "sm" },
47
+ size: { default: "md" },
44
48
  emptyLabel: {},
45
49
  badgeProps: {},
46
50
  searchable: { type: Boolean },
51
+ class: {},
47
52
  modelValue: {},
48
53
  defaultValue: {},
49
54
  open: { type: Boolean },
@@ -76,6 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
81
  emptyLabel,
77
82
  badgeProps,
78
83
  searchable,
84
+ class: _class,
79
85
  ...delegated
80
86
  } = props;
81
87
  return delegated;
@@ -118,11 +124,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
124
  createVNode(ComboboxTrigger, {
119
125
  type: _ctx.type,
120
126
  filled: !!model.value,
121
- size: _ctx.size
127
+ size: _ctx.size,
128
+ class: normalizeClass(props.class)
122
129
  }, {
123
130
  default: withCtx(() => [
124
- createElementVNode("div", _hoisted_1, [
125
- model.value && !Array.isArray(model.value) ? (openBlock(), createElementBlock("div", _hoisted_2, [
131
+ model.value && !Array.isArray(model.value) && (model.value.icon || model.value.image) ? (openBlock(), createElementBlock("div", _hoisted_1, [
132
+ createElementVNode("div", _hoisted_2, [
126
133
  model.value.icon ? (openBlock(), createElementBlock("i", {
127
134
  key: 0,
128
135
  class: normalizeClass(model.value.icon)
@@ -136,14 +143,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
143
  }, null, 8, _hoisted_4)
137
144
  ], true)
138
145
  ])) : createCommentVNode("", true)
139
- ])) : renderSlot(_ctx.$slots, "prefix", {
140
- key: 1,
141
- class: "celeste-dropdown-anchor-trigger-prefix-default"
142
- }, void 0, true)
143
- ]),
144
- _ctx.type !== "inline" ? (openBlock(), createElementBlock("div", _hoisted_5, [
145
- _ctx.multiple ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.placeholder), 1)) : (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(model.value && !Array.isArray(model.value) ? model.value.label : props.placeholder), 1)),
146
- mergedBadgeProps.value && _ctx.badgeProps ? (openBlock(), createElementBlock("span", _hoisted_8, [
146
+ ])
147
+ ])) : _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_5, [
148
+ renderSlot(_ctx.$slots, "prefix", { class: "celeste-dropdown-anchor-trigger-prefix-default" }, void 0, true)
149
+ ])) : createCommentVNode("", true),
150
+ _ctx.type !== "inline" ? (openBlock(), createElementBlock("div", _hoisted_6, [
151
+ _ctx.multiple ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(_ctx.placeholder), 1)) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(model.value && !Array.isArray(model.value) ? model.value.label : props.placeholder), 1)),
152
+ mergedBadgeProps.value && _ctx.badgeProps ? (openBlock(), createElementBlock("span", _hoisted_9, [
147
153
  createVNode(Badge, normalizeProps(guardReactiveProps(mergedBadgeProps.value)), null, 16)
148
154
  ])) : createCommentVNode("", true)
149
155
  ])) : createCommentVNode("", true),
@@ -152,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
152
158
  ], -1))
153
159
  ]),
154
160
  _: 3
155
- }, 8, ["type", "filled", "size"])
161
+ }, 8, ["type", "filled", "size", "class"])
156
162
  ]),
157
163
  _: 3
158
164
  }),
@@ -195,7 +201,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
195
201
  src: option.image,
196
202
  alt: "option",
197
203
  class: "celeste-dropdown-item-image"
198
- }, null, 8, _hoisted_9)) : createCommentVNode("", true)
204
+ }, null, 8, _hoisted_10)) : createCommentVNode("", true)
199
205
  ]),
200
206
  _: 2
201
207
  }, 1032, ["label", "sublabel", "description", "checkbox", "value", "selected"]);
@@ -212,7 +218,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
212
218
  };
213
219
  }
214
220
  });
215
- const combobox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6216767"]]);
221
+ const combobox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-268c7202"]]);
216
222
  export {
217
223
  combobox as default
218
224
  };
package/dist/es/index.js CHANGED
@@ -62,8 +62,7 @@ import tabMenuItem from "./tab-menu-item.js";
62
62
  import tabMenuList from "./tab-menu-list.js";
63
63
  import tabMenu from "./tab-menu.js";
64
64
  import textInputAffix from "./text-input-affix.js";
65
- import textInputButton from "./text-input-button.js";
66
- import TextInputIcon from "./text-input-icon.js";
65
+ import TextInputButton from "./text-input-button.js";
67
66
  import TextInput from "./text-input.js";
68
67
  import textarea from "./textarea.js";
69
68
  import Tooltip from "./tooltip.js";
@@ -134,8 +133,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
134
133
  TabMenuList: tabMenuList,
135
134
  TextInput,
136
135
  TextInputAffix: textInputAffix,
137
- TextInputButton: textInputButton,
138
- TextInputIcon,
136
+ TextInputButton,
139
137
  Textarea: textarea,
140
138
  Tooltip
141
139
  }, Symbol.toStringTag, { value: "Module" }));
@@ -213,8 +211,7 @@ export {
213
211
  tabMenuList as TabMenuList,
214
212
  TextInput,
215
213
  textInputAffix as TextInputAffix,
216
- textInputButton as TextInputButton,
217
- TextInputIcon,
214
+ TextInputButton,
218
215
  textarea as Textarea,
219
216
  Tooltip
220
217
  };
@@ -7,7 +7,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "text-input-affix",
8
8
  props: {
9
9
  class: {},
10
- variant: { default: "prefix" },
11
10
  inline: { type: Boolean },
12
11
  asKbd: { type: Boolean }
13
12
  },
@@ -23,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
22
  };
24
23
  }
25
24
  });
26
- const textInputAffix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d015986a"]]);
25
+ const textInputAffix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2d8a1dbc"]]);
27
26
  export {
28
27
  textInputAffix as default
29
28
  };
@@ -2,7 +2,6 @@ import { defineComponent, openBlock, createBlock, mergeProps, unref, withCtx, re
2
2
  import Button from "./button.js";
3
3
  import { useDelegatedProps } from "./use-delegated-props.js";
4
4
  import { c as clsx } from "./chunks/clsx.js";
5
- /* empty css */
6
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
7
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
7
  __name: "text-input-button",
@@ -27,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
26
  };
28
27
  }
29
28
  });
30
- const textInputButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-82489224"]]);
29
+ const TextInputButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7d21364e"]]);
31
30
  export {
32
- textInputButton as default
31
+ TextInputButton as default
33
32
  };
@@ -1,8 +1,11 @@
1
- import { defineComponent, mergeModels, useModel, openBlock, createElementBlock, normalizeClass, unref, withDirectives, createElementVNode, mergeProps, vModelDynamic, renderSlot } from "vue";
1
+ import { defineComponent, mergeModels, computed, useModel, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, renderSlot, withDirectives, createElementVNode, mergeProps, vModelDynamic, createBlock } from "vue";
2
+ import { uid } from "./crypto.js";
2
3
  import { c as clsx } from "./chunks/clsx.js";
4
+ import { f as O } from "./chunks/index.js";
5
+ import TextInputButton from "./text-input-button.js";
3
6
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
- const _hoisted_1 = ["size", "has-error"];
5
- const _hoisted_2 = ["type"];
7
+ const _hoisted_1 = ["for", "size", "has-error"];
8
+ const _hoisted_2 = ["id", "type"];
6
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
10
  __name: "text-input",
8
11
  props: /* @__PURE__ */ mergeModels({
@@ -16,15 +19,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
19
  emits: ["update:modelValue"],
17
20
  setup(__props) {
18
21
  const props = __props;
22
+ const id = computed(() => props.id || uid());
19
23
  const modelValue = useModel(__props, "modelValue");
24
+ const showClearButton = computed(() => {
25
+ return props.type === "search" && modelValue.value && String(modelValue.value).length > 0;
26
+ });
27
+ function clearInput() {
28
+ modelValue.value = "";
29
+ }
20
30
  return (_ctx, _cache) => {
21
31
  return openBlock(), createElementBlock("label", {
32
+ for: id.value,
22
33
  size: _ctx.size,
23
34
  role: "presentation",
24
35
  "has-error": _ctx.hasError,
25
36
  class: normalizeClass(unref(clsx)("celeste-text-input-wrapper", props.class))
26
37
  }, [
38
+ createVNode(unref(O), {
39
+ "as-child": "",
40
+ class: "celeste-text-input-icon celeste-text-input-leading-icon"
41
+ }, {
42
+ default: withCtx(() => [
43
+ renderSlot(_ctx.$slots, "leadingIcon", {}, void 0, true)
44
+ ]),
45
+ _: 3
46
+ }),
47
+ createVNode(unref(O), {
48
+ "as-child": "",
49
+ class: "celeste-text-input-node celeste-text-input-leading-node"
50
+ }, {
51
+ default: withCtx(() => [
52
+ renderSlot(_ctx.$slots, "leadingNode", {}, void 0, true)
53
+ ]),
54
+ _: 3
55
+ }),
56
+ createVNode(unref(O), {
57
+ inline: "",
58
+ "as-child": "",
59
+ class: "celeste-text-input-inline-node celeste-text-input-leading-inline-node"
60
+ }, {
61
+ default: withCtx(() => [
62
+ renderSlot(_ctx.$slots, "leadingInlineNode", {}, void 0, true)
63
+ ]),
64
+ _: 3
65
+ }),
27
66
  withDirectives(createElementVNode("input", mergeProps({
67
+ id: id.value,
28
68
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
29
69
  }, _ctx.$attrs, {
30
70
  type: _ctx.type,
@@ -32,12 +72,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
72
  }), null, 16, _hoisted_2), [
33
73
  [vModelDynamic, modelValue.value]
34
74
  ]),
35
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
75
+ createVNode(unref(O), {
76
+ "as-child": "",
77
+ class: "celeste-text-input-icon celeste-text-input-trailing-icon"
78
+ }, {
79
+ default: withCtx(() => [
80
+ renderSlot(_ctx.$slots, "trailingIcon", {}, void 0, true)
81
+ ]),
82
+ _: 3
83
+ }),
84
+ createVNode(unref(O), {
85
+ "as-child": "",
86
+ class: "celeste-text-input-node celeste-text-input-trailing-node"
87
+ }, {
88
+ default: withCtx(() => [
89
+ renderSlot(_ctx.$slots, "trailingNode", {}, void 0, true)
90
+ ]),
91
+ _: 3
92
+ }),
93
+ createVNode(unref(O), {
94
+ inline: "",
95
+ "as-child": "",
96
+ class: "celeste-text-input-inline-node celeste-text-input-trailing-inline-node"
97
+ }, {
98
+ default: withCtx(() => [
99
+ showClearButton.value ? (openBlock(), createBlock(TextInputButton, {
100
+ key: 0,
101
+ type: "button",
102
+ "aria-label": "Clear search",
103
+ onClick: clearInput
104
+ }, {
105
+ default: withCtx(() => _cache[1] || (_cache[1] = [
106
+ createElementVNode("i", { class: "i-celeste-close-line" }, null, -1)
107
+ ])),
108
+ _: 1
109
+ })) : renderSlot(_ctx.$slots, "trailingInlineNode", { key: 1 }, void 0, true)
110
+ ]),
111
+ _: 3
112
+ })
36
113
  ], 10, _hoisted_1);
37
114
  };
38
115
  }
39
116
  });
40
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a9e9157b"]]);
117
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-db633aec"]]);
41
118
  export {
42
119
  TextInput as default
43
120
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/celeste",
3
3
  "type": "module",
4
- "version": "0.6.21",
4
+ "version": "0.6.23",
5
5
  "author": "YouCan <tech@youcan.shop>",
6
6
  "keywords": [
7
7
  "youcan",
@@ -32,8 +32,8 @@
32
32
  "clsx": "^2.1.1",
33
33
  "radix-vue": "^1.9.12",
34
34
  "tinycolor2": "^1.6.0",
35
- "@youcan/celeste-icons": "0.6.21",
36
- "@youcan/celeste-tokens": "0.6.21"
35
+ "@youcan/celeste-icons": "0.6.23",
36
+ "@youcan/celeste-tokens": "0.6.23"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@chromatic-com/storybook": "^4.0.0",
@@ -2,7 +2,6 @@
2
2
  import clsx from 'clsx';
3
3
  import { ComboboxInput, type ComboboxInputProps } from 'radix-vue';
4
4
  import { computed, type HTMLAttributes } from 'vue';
5
- import TextInputIcon from '../text-input/text-input-icon.vue';
6
5
  import TextInput, { type TextInputProps } from '../text-input/text-input.vue';
7
6
 
8
7
  const props = defineProps<ComboboxInputProps & {
@@ -41,7 +40,9 @@ const textInputProps = computed((): TextInputProps => {
41
40
  :readonly="!props.searchable"
42
41
  :style="!props.searchable ? 'opacity: 0; height: 1px; padding: 0; border: none;' : ''"
43
42
  >
44
- <TextInputIcon v-if="props.searchable" icon="i-celeste-search-2-line" />
43
+ <template #leadingIcon>
44
+ <i i-celeste-search-2-line />
45
+ </template>
45
46
  </TextInput>
46
47
  </ComboboxInput>
47
48
  </template>
@@ -6,9 +6,10 @@ import { computed, type HTMLAttributes } from 'vue';
6
6
 
7
7
  const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), {
8
8
  position: 'popper',
9
- align: 'start',
9
+ align: 'center',
10
10
  sideOffset: 4,
11
11
  });
12
+
12
13
  const emits = defineEmits<ComboboxContentEmits>();
13
14
 
14
15
  const delegatedProps = computed(() => {
@@ -24,6 +25,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
24
25
  <ComboboxPortal>
25
26
  <ComboboxContent
26
27
  v-bind="forwarded"
28
+ force-mount
27
29
  :class="clsx('celeste-dropdown-content', props.class)"
28
30
  >
29
31
  <ComboboxViewport class="celeste-dropdown-items-viewport">
@@ -36,65 +38,43 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
36
38
  <style lang="scss" scoped>
37
39
  .celeste-dropdown-content,
38
40
  div:deep(.celeste-dropdown-content) {
39
- --dropdown-width: fit-content;
41
+ --dropdown-width: 100%;
40
42
  --dropdown-height: 300px;
41
- --dropdown-min-width: var(--radix-combobox-trigger-width, 300px);
42
43
 
43
44
  display: flex;
44
45
  z-index: 50;
45
46
  box-sizing: border-box;
46
47
  flex-direction: column;
47
48
  width: var(--dropdown-width);
48
- min-width: var(--dropdown-min-width);
49
+ min-width: 300px;
49
50
  max-height: var(--dropdown-height);
50
51
  margin-top: var(--spacing-10);
51
52
  padding: var(--spacing-8);
52
- overflow: visible;
53
- transform-origin: var(--radix-combobox-content-transform-origin);
54
- animation-duration: var(--animation-fast);
55
- animation-timing-function: ease-out;
53
+ overflow: hidden;
54
+ transition-property: background-color, transform, opacity;
55
+ transition-duration: var(--animation-fast);
56
+ transition-timing-function: ease-out;
56
57
  border: 1px solid var(--color-stroke-soft-200);
57
58
  border-radius: var(--radius-16);
58
59
  background-color: var(--color-bg-white-0);
59
60
  box-shadow: var(--shadow-regular-md);
60
61
  gap: var(--spacing-4);
61
62
 
62
- &[data-state='open'] {
63
- animation-name: slide-up-and-fade;
64
- }
65
-
66
63
  &[data-state='closed'] {
67
- animation-name: slide-down-and-fade;
68
- }
69
- }
70
-
71
- div:deep(.celeste-dropdown-items-viewport) {
72
- display: flex;
73
- flex-direction: column;
74
- gap: var(--spacing-4);
75
- }
76
-
77
- @keyframes slide-up-and-fade {
78
- from {
79
64
  transform: translateY(10px);
80
65
  opacity: 0;
66
+ pointer-events: none;
81
67
  }
82
68
 
83
- to {
69
+ &[data-state='open'] {
84
70
  transform: translateY(0);
85
71
  opacity: 1;
86
72
  }
87
73
  }
88
74
 
89
- @keyframes slide-down-and-fade {
90
- from {
91
- transform: translateY(0);
92
- opacity: 1;
93
- }
94
-
95
- to {
96
- transform: translateY(10px);
97
- opacity: 0;
98
- }
75
+ div:deep(.celeste-dropdown-items-viewport) {
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: var(--spacing-4);
99
79
  }
100
80
  </style>
@@ -30,6 +30,7 @@ export interface CustomComboboxTriggerProps extends ComboboxTriggerProps {
30
30
  <template>
31
31
  <ComboboxTrigger
32
32
  v-bind="forwarded"
33
+ type="button"
33
34
  tabindex="0"
34
35
  :class="clsx(
35
36
  'celeste-dropdown-anchor-trigger',
@@ -18,7 +18,7 @@ import ComboboxTrigger from './combobox-trigger.vue';
18
18
 
19
19
  const props = withDefaults(defineProps<ComboboxPropsType>(), {
20
20
  placeholder: 'Select',
21
- size: 'sm',
21
+ size: 'md',
22
22
  });
23
23
  const emits = defineEmits<ComboboxRootEmits>();
24
24
 
@@ -34,6 +34,7 @@ const delegatedProps = computed(() => {
34
34
  emptyLabel,
35
35
  badgeProps,
36
36
  searchable,
37
+ class: _class,
37
38
  ...delegated
38
39
  } = props;
39
40
 
@@ -101,6 +102,7 @@ export interface ComboboxPropsType extends ComboboxRootProps {
101
102
  emptyLabel?: string;
102
103
  badgeProps?: BadgeProps;
103
104
  searchable?: boolean;
105
+ class?: string;
104
106
  }
105
107
 
106
108
  export default {
@@ -118,9 +120,10 @@ export default {
118
120
  :type="type"
119
121
  :filled="!!model"
120
122
  :size="size"
123
+ :class="props.class"
121
124
  >
122
- <div class="celeste-dropdown-anchor-trigger-prefix">
123
- <div v-if="model && !Array.isArray(model)" class="celeste-dropdown-anchor-trigger-prefix-selected">
125
+ <div v-if="model && !Array.isArray(model) && (model.icon || model.image)" class="celeste-dropdown-anchor-trigger-prefix">
126
+ <div class="celeste-dropdown-anchor-trigger-prefix-selected">
124
127
  <i v-if="model.icon" :class="model.icon" />
125
128
  <div v-if="model.image">
126
129
  <slot name="image" v-bind="{ selected: model }">
@@ -132,8 +135,10 @@ export default {
132
135
  </slot>
133
136
  </div>
134
137
  </div>
138
+ </div>
139
+
140
+ <div v-else-if="$slots.prefix" class="celeste-dropdown-anchor-trigger-prefix">
135
141
  <slot
136
- v-else
137
142
  name="prefix"
138
143
  class="celeste-dropdown-anchor-trigger-prefix-default"
139
144
  />
@@ -4,8 +4,5 @@ export { default as TextInputAffix } from './text-input-affix.vue';
4
4
  export * from './text-input-button.vue';
5
5
  export { default as TextInputButton } from './text-input-button.vue';
6
6
 
7
- export * from './text-input-icon.vue';
8
- export { default as TextInputIcon } from './text-input-icon.vue';
9
-
10
7
  export * from './text-input.vue';
11
8
  export { default as TextInput } from './text-input.vue';