@youcan/celeste 0.6.94 → 0.6.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/celeste.css CHANGED
@@ -2704,13 +2704,13 @@ to {
2704
2704
  .celeste-dropdown-items-group[data-v-66b5c9e4] [data-radix-vue-combobox-item] {
2705
2705
  width: auto;
2706
2706
  height: auto;
2707
- }.celeste-dropdown-input[data-v-bd59a65e] {
2707
+ }.celeste-dropdown-input[data-v-32b6a3f8] {
2708
2708
  display: flex;
2709
2709
  align-items: center;
2710
2710
  gap: var(--spacing-4);
2711
2711
  background-color: var(--color-bg-white-0);
2712
2712
  }
2713
- .celeste-dropdown-input[data-v-bd59a65e] .celeste-text-input-wrapper {
2713
+ .celeste-dropdown-input[data-v-32b6a3f8] .celeste-text-input-wrapper {
2714
2714
  width: 100%;
2715
2715
  border: none;
2716
2716
  border-radius: var(--radius-8) var(--radius-8) 0 0;
@@ -3012,21 +3012,21 @@ to {
3012
3012
  height: 40px;
3013
3013
  padding: var(--spacing-10);
3014
3014
  border-radius: var(--radius-10);
3015
- }[data-v-71e04f0f] {
3015
+ }[data-v-7baed4e9] {
3016
3016
  box-sizing: border-box;
3017
3017
  }
3018
- .celeste-dropdown-anchor-trigger-prefix[data-v-71e04f0f] {
3018
+ .celeste-dropdown-anchor-trigger-prefix[data-v-7baed4e9] {
3019
3019
  display: flex;
3020
3020
  align-items: center;
3021
3021
  justify-content: center;
3022
3022
  }
3023
- .celeste-dropdown-anchor-trigger-prefix-selected[data-v-71e04f0f] {
3023
+ .celeste-dropdown-anchor-trigger-prefix-selected[data-v-7baed4e9] {
3024
3024
  display: flex;
3025
3025
  align-items: center;
3026
3026
  justify-content: center;
3027
3027
  }
3028
- .celeste-dropdown-item-image[data-v-71e04f0f],
3029
- .selected-dropdown-image[data-v-71e04f0f] {
3028
+ .celeste-dropdown-item-image[data-v-7baed4e9],
3029
+ .selected-dropdown-image[data-v-7baed4e9] {
3030
3030
  display: flex;
3031
3031
  align-items: center;
3032
3032
  justify-content: center;
@@ -3036,7 +3036,7 @@ to {
3036
3036
  object-fit: cover;
3037
3037
  border-radius: var(--radius-full);
3038
3038
  }
3039
- .celeste-dropdown-trigger-label[data-v-71e04f0f] {
3039
+ .celeste-dropdown-trigger-label[data-v-7baed4e9] {
3040
3040
  display: flex;
3041
3041
  flex: 1 0 0;
3042
3042
  align-items: center;
@@ -3048,12 +3048,12 @@ to {
3048
3048
  cursor: pointer;
3049
3049
  gap: var(--spacing-8);
3050
3050
  }
3051
- .celeste-dropdown-trigger-label span[data-v-71e04f0f] {
3051
+ .celeste-dropdown-trigger-label span[data-v-7baed4e9] {
3052
3052
  overflow: hidden;
3053
3053
  text-overflow: ellipsis;
3054
3054
  white-space: nowrap;
3055
3055
  }
3056
- .celeste-dropdown-trigger[data-v-71e04f0f] {
3056
+ .celeste-dropdown-trigger[data-v-7baed4e9] {
3057
3057
  display: flex;
3058
3058
  place-items: center center;
3059
3059
  transition-property: transform;
@@ -3064,7 +3064,7 @@ to {
3064
3064
  color: var(--color-icon-soft-400);
3065
3065
  cursor: pointer;
3066
3066
  }
3067
- .celeste-dropdown-inner-input[data-v-71e04f0f] {
3067
+ .celeste-dropdown-inner-input[data-v-7baed4e9] {
3068
3068
  display: flex;
3069
3069
  position: sticky;
3070
3070
  z-index: 50;
@@ -3073,7 +3073,7 @@ to {
3073
3073
  gap: var(--spacing-4);
3074
3074
  background-color: var(--color-bg-white-0);
3075
3075
  }
3076
- .celeste-dropdown-inner-input.sr-only[data-v-71e04f0f] {
3076
+ .celeste-dropdown-inner-input.sr-only[data-v-7baed4e9] {
3077
3077
  position: absolute;
3078
3078
  width: 1px;
3079
3079
  height: 1px;
@@ -15,7 +15,8 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
15
15
  as: {},
16
16
  class: {},
17
17
  textInputProps: {},
18
- searchable: { type: Boolean }
18
+ searchable: { type: Boolean },
19
+ placeholder: {}
19
20
  }, {
20
21
  "modelValue": {},
21
22
  "modelModifiers": {}
@@ -25,14 +26,14 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
25
26
  const props = __props;
26
27
  const model = No.useModel(__props, "modelValue");
27
28
  const comboboxInputProps = No.computed(() => {
28
- const { class: _class, textInputProps: _textInputProps, ...rest } = props;
29
+ const { class: _class, textInputProps: _textInputProps, placeholder: _placeholder, ...rest } = props;
29
30
  return rest;
30
31
  });
31
32
  const textInputProps = No.computed(() => {
32
33
  return {
33
34
  type: "search",
34
35
  size: "sm",
35
- placeholder: "Search",
36
+ placeholder: props.placeholder ?? "Search",
36
37
  ...props.textInputProps
37
38
  };
38
39
  });
@@ -60,5 +61,5 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
60
61
  };
61
62
  }
62
63
  });
63
- const ComboboxInput = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-bd59a65e"]]);
64
+ const ComboboxInput = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-32b6a3f8"]]);
64
65
  module.exports = ComboboxInput;
@@ -44,6 +44,7 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
44
44
  valueBy: {},
45
45
  labelBy: {},
46
46
  placeholder: { default: "Select" },
47
+ searchPlaceholder: {},
47
48
  type: {},
48
49
  size: { default: "md" },
49
50
  emptyLabel: {},
@@ -79,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
79
80
  valueBy,
80
81
  labelBy,
81
82
  placeholder,
83
+ searchPlaceholder,
82
84
  type,
83
85
  size,
84
86
  emptyLabel,
@@ -180,7 +182,10 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
180
182
  No.createElementVNode("div", {
181
183
  class: No.normalizeClass(["celeste-dropdown-inner-input", { "sr-only": !_ctx.searchable }])
182
184
  }, [
183
- No.createVNode(comboboxInput, { searchable: _ctx.searchable }, null, 8, ["searchable"]),
185
+ No.createVNode(comboboxInput, {
186
+ searchable: _ctx.searchable,
187
+ placeholder: _ctx.searchPlaceholder
188
+ }, null, 8, ["searchable", "placeholder"]),
184
189
  _ctx.searchable ? (No.openBlock(), No.createBlock(comboboxSeparator, { key: 0 })) : No.createCommentVNode("", true)
185
190
  ], 2),
186
191
  No.createVNode(comboboxEmpty, null, No.createSlots({ _: 2 }, [
@@ -231,5 +236,5 @@ const _sfc_main = /* @__PURE__ */ No.defineComponent({
231
236
  };
232
237
  }
233
238
  });
234
- const combobox = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-71e04f0f"]]);
239
+ const combobox = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-7baed4e9"]]);
235
240
  module.exports = combobox;
@@ -5,6 +5,7 @@ type __VLS_Props = ComboboxInputProps & {
5
5
  class?: HTMLAttributes['class'];
6
6
  textInputProps?: Partial<TextInputProps>;
7
7
  searchable?: boolean;
8
+ placeholder?: string;
8
9
  };
9
10
  type __VLS_PublicProps = {
10
11
  modelValue?: string | undefined;
@@ -6,6 +6,7 @@ export interface ComboboxPropsType extends ComboboxRootProps {
6
6
  valueBy?: string;
7
7
  labelBy?: string;
8
8
  placeholder?: string;
9
+ searchPlaceholder?: string;
9
10
  type?: 'normal' | 'compact' | 'inline' | 'compact-input';
10
11
  size?: 'xs' | 'sm' | 'md';
11
12
  emptyLabel?: string;
@@ -14,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  as: {},
15
15
  class: {},
16
16
  textInputProps: {},
17
- searchable: { type: Boolean }
17
+ searchable: { type: Boolean },
18
+ placeholder: {}
18
19
  }, {
19
20
  "modelValue": {},
20
21
  "modelModifiers": {}
@@ -24,14 +25,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
25
  const props = __props;
25
26
  const model = useModel(__props, "modelValue");
26
27
  const comboboxInputProps = computed(() => {
27
- const { class: _class, textInputProps: _textInputProps, ...rest } = props;
28
+ const { class: _class, textInputProps: _textInputProps, placeholder: _placeholder, ...rest } = props;
28
29
  return rest;
29
30
  });
30
31
  const textInputProps = computed(() => {
31
32
  return {
32
33
  type: "search",
33
34
  size: "sm",
34
- placeholder: "Search",
35
+ placeholder: props.placeholder ?? "Search",
35
36
  ...props.textInputProps
36
37
  };
37
38
  });
@@ -59,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  };
60
61
  }
61
62
  });
62
- const ComboboxInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bd59a65e"]]);
63
+ const ComboboxInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-32b6a3f8"]]);
63
64
  export {
64
65
  ComboboxInput as default
65
66
  };
@@ -43,6 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
43
  valueBy: {},
44
44
  labelBy: {},
45
45
  placeholder: { default: "Select" },
46
+ searchPlaceholder: {},
46
47
  type: {},
47
48
  size: { default: "md" },
48
49
  emptyLabel: {},
@@ -78,6 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
79
  valueBy,
79
80
  labelBy,
80
81
  placeholder,
82
+ searchPlaceholder,
81
83
  type,
82
84
  size,
83
85
  emptyLabel,
@@ -179,7 +181,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
179
181
  createElementVNode("div", {
180
182
  class: normalizeClass(["celeste-dropdown-inner-input", { "sr-only": !_ctx.searchable }])
181
183
  }, [
182
- createVNode(ComboboxInput, { searchable: _ctx.searchable }, null, 8, ["searchable"]),
184
+ createVNode(ComboboxInput, {
185
+ searchable: _ctx.searchable,
186
+ placeholder: _ctx.searchPlaceholder
187
+ }, null, 8, ["searchable", "placeholder"]),
183
188
  _ctx.searchable ? (openBlock(), createBlock(ComboboxSeparator, { key: 0 })) : createCommentVNode("", true)
184
189
  ], 2),
185
190
  createVNode(ComboboxEmpty, null, createSlots({ _: 2 }, [
@@ -230,7 +235,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
230
235
  };
231
236
  }
232
237
  });
233
- const combobox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71e04f0f"]]);
238
+ const combobox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7baed4e9"]]);
234
239
  export {
235
240
  combobox as default
236
241
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/celeste",
3
3
  "type": "module",
4
- "version": "0.6.94",
4
+ "version": "0.6.96",
5
5
  "author": "YouCan <tech@youcan.shop>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -48,8 +48,8 @@
48
48
  "radix-vue": "^1.9.17",
49
49
  "tinycolor2": "^1.6.0",
50
50
  "vue-sonner": "^2.0.9",
51
- "@youcan/celeste-icons": "0.6.94",
52
- "@youcan/celeste-tokens": "0.6.94"
51
+ "@youcan/celeste-tokens": "0.6.96",
52
+ "@youcan/celeste-icons": "0.6.96"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@chromatic-com/storybook": "^4.1.3",
@@ -8,12 +8,13 @@ const props = defineProps<ComboboxInputProps & {
8
8
  class?: HTMLAttributes['class'];
9
9
  textInputProps?: Partial<TextInputProps>;
10
10
  searchable?: boolean;
11
+ placeholder?: string;
11
12
  }>();
12
13
 
13
14
  const model = defineModel<string | undefined>();
14
15
 
15
16
  const comboboxInputProps = computed(() => {
16
- const { class: _class, textInputProps: _textInputProps, ...rest } = props;
17
+ const { class: _class, textInputProps: _textInputProps, placeholder: _placeholder, ...rest } = props;
17
18
  return rest;
18
19
  });
19
20
 
@@ -21,7 +22,7 @@ const textInputProps = computed((): TextInputProps => {
21
22
  return {
22
23
  type: 'search',
23
24
  size: 'sm',
24
- placeholder: 'Search',
25
+ placeholder: props.placeholder ?? 'Search',
25
26
  ...props.textInputProps,
26
27
  };
27
28
  });
@@ -30,6 +30,7 @@ const delegatedProps = computed(() => {
30
30
  valueBy,
31
31
  labelBy,
32
32
  placeholder,
33
+ searchPlaceholder,
33
34
  type,
34
35
  size,
35
36
  emptyLabel,
@@ -117,6 +118,7 @@ export interface ComboboxPropsType extends ComboboxRootProps {
117
118
  valueBy?: string;
118
119
  labelBy?: string;
119
120
  placeholder?: string;
121
+ searchPlaceholder?: string;
120
122
  type?: 'normal' | 'compact' | 'inline' | 'compact-input';
121
123
  size?: 'xs' | 'sm' | 'md';
122
124
  emptyLabel?: string;
@@ -183,7 +185,7 @@ export default {
183
185
 
184
186
  <ComboboxList>
185
187
  <div class="celeste-dropdown-inner-input" :class="{ 'sr-only': !searchable }">
186
- <ComboboxInput :searchable="searchable" />
188
+ <ComboboxInput :searchable="searchable" :placeholder="searchPlaceholder" />
187
189
  <ComboboxSeparator v-if="searchable" />
188
190
  </div>
189
191
 
@@ -89,6 +89,7 @@ export const Searchable: Story = {
89
89
  valueBy: 'id',
90
90
  placeholder: 'Search and select',
91
91
  searchable: true,
92
+ searchPlaceholder: 'Search Users',
92
93
  },
93
94
 
94
95
  render: args => ({