sprintify-ui 0.11.22 → 0.11.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.
@@ -22422,6 +22422,14 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
22422
22422
  focusOnMount: {
22423
22423
  default: !1,
22424
22424
  type: Boolean
22425
+ },
22426
+ optionColor: {
22427
+ default: void 0,
22428
+ type: Function
22429
+ },
22430
+ optionIcon: {
22431
+ default: void 0,
22432
+ type: Function
22425
22433
  }
22426
22434
  },
22427
22435
  emits: ["update:modelValue", "typing", "focus", "scrollBottom"],
@@ -22496,6 +22504,8 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
22496
22504
  max: n.max,
22497
22505
  filter: () => !0,
22498
22506
  "focus-on-mount": n.focusOnMount,
22507
+ "option-color": n.optionColor,
22508
+ "option-icon": n.optionIcon,
22499
22509
  onOpen: m,
22500
22510
  onTyping: h,
22501
22511
  onScrollBottom: g(v),
@@ -22516,7 +22526,7 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
22516
22526
  ])
22517
22527
  ]),
22518
22528
  _: 3
22519
- }, 8, ["loading", "loading-bottom", "model-value", "disabled", "placeholder", "options", "value-key", "label-key", "has-error", "max", "focus-on-mount", "onScrollBottom"]));
22529
+ }, 8, ["loading", "loading-bottom", "model-value", "disabled", "placeholder", "options", "value-key", "label-key", "has-error", "max", "focus-on-mount", "option-color", "option-icon", "onScrollBottom"]));
22520
22530
  }
22521
22531
  }), oI = { class: "inline-block w-[320px] input-rounded bg-white shadow-2xl" }, iI = { class: "flex grow items-center" }, sI = { class: "shrink-0" }, lI = /* @__PURE__ */ te({
22522
22532
  __name: "BaseDropdownAutocomplete",
@@ -84,6 +84,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
84
84
  default: boolean;
85
85
  type: BooleanConstructor;
86
86
  };
87
+ optionColor: {
88
+ default: undefined;
89
+ type: PropType<(option: RawOption) => string>;
90
+ };
91
+ optionIcon: {
92
+ default: undefined;
93
+ type: PropType<(option: RawOption) => string>;
94
+ };
87
95
  }>, {
88
96
  focus: () => void | undefined;
89
97
  blur: () => void | undefined;
@@ -140,6 +148,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
140
148
  default: boolean;
141
149
  type: BooleanConstructor;
142
150
  };
151
+ optionColor: {
152
+ default: undefined;
153
+ type: PropType<(option: RawOption) => string>;
154
+ };
155
+ optionIcon: {
156
+ default: undefined;
157
+ type: PropType<(option: RawOption) => string>;
158
+ };
143
159
  }>> & Readonly<{
144
160
  onFocus?: ((...args: any[]) => any) | undefined;
145
161
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -151,6 +167,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
151
167
  disabled: boolean;
152
168
  hasError: boolean;
153
169
  max: number;
170
+ optionColor: (option: RawOption) => string;
171
+ optionIcon: (option: RawOption) => string;
154
172
  focusOnMount: boolean;
155
173
  queryKey: string;
156
174
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.11.22",
3
+ "version": "0.11.23",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "generate-llm-txt": "node scripts/generate-llm-txt.js",
@@ -47,6 +47,30 @@ const Template = (args) => {
47
47
  export const Demo = Template.bind({});
48
48
  Demo.args = {};
49
49
 
50
+ export const OptionColor = Template.bind({});
51
+ OptionColor.args = {};
52
+
53
+ export const OptionIcon = Template.bind({});
54
+ OptionIcon.args = {
55
+ optionColor: undefined,
56
+ optionIcon: (option) => {
57
+ if (option.type === "work") return "heroicons:briefcase";
58
+ if (option.type === "personal") return "heroicons:user";
59
+ if (option.type === "family") return "heroicons:home";
60
+ return "heroicons:tag";
61
+ },
62
+ };
63
+
64
+ export const OptionIconWithColor = Template.bind({});
65
+ OptionIconWithColor.args = {
66
+ optionIcon: (option) => {
67
+ if (option.type === "work") return "heroicons:briefcase";
68
+ if (option.type === "personal") return "heroicons:user";
69
+ if (option.type === "family") return "heroicons:home";
70
+ return "heroicons:tag";
71
+ },
72
+ };
73
+
50
74
  export const LabelFunction = Template.bind({});
51
75
  LabelFunction.args = {
52
76
  labelKey: (option) => {
@@ -13,6 +13,8 @@
13
13
  :max="max"
14
14
  :filter="() => true"
15
15
  :focus-on-mount="focusOnMount"
16
+ :option-color="optionColor"
17
+ :option-icon="optionIcon"
16
18
  @open="onOpen"
17
19
  @typing="onTyping"
18
20
  @scroll-bottom="scrollBottom"
@@ -116,6 +118,14 @@ const props = defineProps({
116
118
  default: false,
117
119
  type: Boolean,
118
120
  },
121
+ optionColor: {
122
+ default: undefined,
123
+ type: Function as PropType<(option: RawOption) => string>,
124
+ },
125
+ optionIcon: {
126
+ default: undefined,
127
+ type: Function as PropType<(option: RawOption) => string>,
128
+ },
119
129
  });
120
130
 
121
131
  defineEmits(['update:modelValue', 'typing', 'focus', 'scrollBottom']);