sprintify-ui 0.12.1 → 0.12.2

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.
@@ -142,6 +142,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
142
142
  default: undefined;
143
143
  type: PropType<(option: RawOption) => string>;
144
144
  };
145
+ optionSubtitle: {
146
+ default: undefined;
147
+ type: PropType<(option: RawOption) => string>;
148
+ };
145
149
  twInput: {
146
150
  default: undefined;
147
151
  type: PropType<string | string[]>;
@@ -267,6 +271,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
267
271
  default: undefined;
268
272
  type: PropType<(option: RawOption) => string>;
269
273
  };
274
+ optionSubtitle: {
275
+ default: undefined;
276
+ type: PropType<(option: RawOption) => string>;
277
+ };
270
278
  twInput: {
271
279
  default: undefined;
272
280
  type: PropType<string | string[]>;
@@ -300,6 +308,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
300
308
  loadingBottom: boolean;
301
309
  optionColor: (option: RawOption) => string;
302
310
  optionIcon: (option: RawOption) => string;
311
+ optionSubtitle: (option: RawOption) => string;
303
312
  dropdownShow: "always" | "focus";
304
313
  showModelValue: boolean;
305
314
  focusOnMount: boolean;
@@ -51,6 +51,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
51
51
  default: undefined;
52
52
  type: PropType<(option: RawOption) => string>;
53
53
  };
54
+ optionSubtitle: {
55
+ default: undefined;
56
+ type: PropType<(option: RawOption) => string>;
57
+ };
54
58
  twDrawer: {
55
59
  type: StringConstructor;
56
60
  default: string;
@@ -93,6 +97,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
93
97
  default: undefined;
94
98
  type: PropType<(option: RawOption) => string>;
95
99
  };
100
+ optionSubtitle: {
101
+ default: undefined;
102
+ type: PropType<(option: RawOption) => string>;
103
+ };
96
104
  twDrawer: {
97
105
  type: StringConstructor;
98
106
  default: string;
@@ -109,6 +117,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
109
117
  loadingBottom: boolean;
110
118
  optionColor: (option: RawOption) => string;
111
119
  optionIcon: (option: RawOption) => string;
120
+ optionSubtitle: (option: RawOption) => string;
112
121
  twDrawer: string;
113
122
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
114
123
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -123,6 +123,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
123
123
  default: undefined;
124
124
  type: PropType<(option: RawOption) => string>;
125
125
  };
126
+ optionSubtitle: {
127
+ default: undefined;
128
+ type: PropType<(option: RawOption) => string>;
129
+ };
126
130
  icon: {
127
131
  default: undefined;
128
132
  type: PropType<string>;
@@ -232,6 +236,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
232
236
  default: undefined;
233
237
  type: PropType<(option: RawOption) => string>;
234
238
  };
239
+ optionSubtitle: {
240
+ default: undefined;
241
+ type: PropType<(option: RawOption) => string>;
242
+ };
235
243
  icon: {
236
244
  default: undefined;
237
245
  type: PropType<string>;
@@ -260,6 +268,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
260
268
  visibleFocus: boolean;
261
269
  optionColor: (option: RawOption) => string;
262
270
  optionIcon: (option: RawOption) => string;
271
+ optionSubtitle: (option: RawOption) => string;
263
272
  dropdownShow: "always" | "focus";
264
273
  showModelValue: boolean;
265
274
  focusOnMount: boolean;
@@ -126,6 +126,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
126
126
  default: undefined;
127
127
  type: PropType<(option: RawOption) => string>;
128
128
  };
129
+ optionSubtitle: {
130
+ default: undefined;
131
+ type: PropType<(option: RawOption) => string>;
132
+ };
129
133
  }>, {
130
134
  focus: () => void | undefined;
131
135
  blur: () => void | undefined;
@@ -227,6 +231,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
227
231
  default: undefined;
228
232
  type: PropType<(option: RawOption) => string>;
229
233
  };
234
+ optionSubtitle: {
235
+ default: undefined;
236
+ type: PropType<(option: RawOption) => string>;
237
+ };
230
238
  }>> & Readonly<{
231
239
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
232
240
  }>, {
@@ -245,6 +253,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
245
253
  primaryKey: string;
246
254
  optionColor: (option: RawOption) => string;
247
255
  optionIcon: (option: RawOption) => string;
256
+ optionSubtitle: (option: RawOption) => string;
248
257
  dropdownShow: "always" | "focus";
249
258
  showModelValue: boolean;
250
259
  focusOnMount: boolean;
@@ -24,6 +24,7 @@ type __VLS_Props = {
24
24
  select?: SelectConfiguration;
25
25
  optionColor?: (option: RawOption) => string;
26
26
  optionIcon?: (option: RawOption) => string;
27
+ optionSubtitle?: (option: RawOption) => string;
27
28
  icon?: string;
28
29
  };
29
30
  declare var __VLS_10: {
@@ -84,6 +85,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
84
85
  primaryKey: string;
85
86
  optionColor: (option: RawOption) => string;
86
87
  optionIcon: (option: RawOption) => string;
88
+ optionSubtitle: (option: RawOption) => string;
87
89
  dropdownShow: "focus" | "always";
88
90
  showModelValue: boolean;
89
91
  focusOnMount: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "generate-llm-txt": "node scripts/generate-llm-txt.js",
@@ -31,6 +31,11 @@ export default {
31
31
  if (option.type === "jedi") return "fa7-solid:jedi";
32
32
  if (option.type === "sith") return "fa7-brands:sith";
33
33
  return "mdi:help-circle-outline";
34
+ },
35
+ optionSubtitle: (option) => {
36
+ if (option.type === "jedi") return "Jedi";
37
+ if (option.type === "sith") return "Sith";
38
+ return "Unknown";
34
39
  }
35
40
  },
36
41
  decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
@@ -89,6 +89,7 @@
89
89
  :keywords="keywords"
90
90
  :option-color="optionColor"
91
91
  :option-icon="optionIcon"
92
+ :option-subtitle="optionSubtitle"
92
93
  tw-drawer="p-1"
93
94
  @select="onSelect"
94
95
  @scroll-bottom="emit('scrollBottom')"
@@ -241,6 +242,10 @@ const props = defineProps({
241
242
  default: undefined,
242
243
  type: Function as PropType<(option: RawOption) => string>,
243
244
  },
245
+ optionSubtitle: {
246
+ default: undefined,
247
+ type: Function as PropType<(option: RawOption) => string>,
248
+ },
244
249
  twInput: {
245
250
  default: undefined,
246
251
  type: [String, Array] as PropType<string | string[]>,
@@ -48,7 +48,7 @@
48
48
  :active="focusOption && focusOption.value == option.value"
49
49
  >
50
50
  <div
51
- class="flex items-center rounded px-[0.75em] py-[0.5em]"
51
+ class="flex items-center rounded px-[0.75em]"
52
52
  :class="[optionClass(option), optionSizeClass]"
53
53
  >
54
54
  <div
@@ -75,7 +75,12 @@
75
75
  />
76
76
  </div>
77
77
  <div class="grow">
78
- {{ option.label }}
78
+ <p class="block">
79
+ {{ option.label }}
80
+ </p>
81
+ <small v-if="optionSubtitle" class="block text-xs text-slate-500 -mt-[0.075em]">
82
+ {{ option.option ? optionSubtitle(option.option) : '' }}
83
+ </small>
79
84
  </div>
80
85
  <div class="shrink-0">
81
86
  <BaseIcon
@@ -188,6 +193,10 @@ const props = defineProps({
188
193
  default: undefined,
189
194
  type: Function as PropType<(option: RawOption) => string>,
190
195
  },
196
+ optionSubtitle: {
197
+ default: undefined,
198
+ type: Function as PropType<(option: RawOption) => string>,
199
+ },
191
200
  twDrawer: {
192
201
  type: String,
193
202
  default: '',
@@ -392,13 +401,20 @@ const optionClass = (option: NormalizedOption) => {
392
401
  };
393
402
 
394
403
  const optionSizeClass = computed(() => {
404
+
405
+ let paddingClass = "py-[0.5em]";
406
+
407
+ if (props.optionSubtitle) {
408
+ paddingClass = "py-[0.4em]";
409
+ }
410
+
395
411
  if (props.size == 'xs') {
396
- return 'text-xs';
412
+ return 'text-xs ' + paddingClass;
397
413
  }
398
414
  if (props.size == 'sm') {
399
- return 'text-sm';
415
+ return 'text-sm ' + paddingClass;
400
416
  }
401
- return 'text-sm';
417
+ return 'text-sm ' + paddingClass;
402
418
  });
403
419
 
404
420
  const optionIconClass = computed(() => {
@@ -25,6 +25,7 @@
25
25
  :filter="filterOptions"
26
26
  :option-color="optionColor"
27
27
  :option-icon="optionIcon"
28
+ :option-subtitle="optionSubtitle"
28
29
  :icon="icon"
29
30
  :tw-input="twInput"
30
31
  @clear="onClear"
@@ -179,6 +180,10 @@ const props = defineProps({
179
180
  default: undefined,
180
181
  type: Function as PropType<(option: RawOption) => string>,
181
182
  },
183
+ optionSubtitle: {
184
+ default: undefined,
185
+ type: Function as PropType<(option: RawOption) => string>,
186
+ },
182
187
  icon: {
183
188
  default: undefined,
184
189
  type: [String] as PropType<string>,
@@ -24,6 +24,7 @@
24
24
  :icon="icon"
25
25
  :option-color="optionColor"
26
26
  :option-icon="optionIcon"
27
+ :option-subtitle="optionSubtitle"
27
28
  @update:model-value="onUpdate"
28
29
  >
29
30
  <template #option="optionProps">
@@ -148,6 +149,10 @@ const props = defineProps({
148
149
  default: undefined,
149
150
  type: Function as PropType<(option: RawOption) => string>,
150
151
  },
152
+ optionSubtitle: {
153
+ default: undefined,
154
+ type: Function as PropType<(option: RawOption) => string>,
155
+ },
151
156
  });
152
157
 
153
158
  const emit = defineEmits(['update:modelValue']);
@@ -22,6 +22,7 @@
22
22
  :select="select"
23
23
  :option-color="optionColor"
24
24
  :option-icon="optionIcon"
25
+ :option-subtitle="optionSubtitle"
25
26
  :icon="icon"
26
27
  @update:model-value="onUpdate"
27
28
  >
@@ -79,6 +80,7 @@ const props = withDefaults(
79
80
  select?: SelectConfiguration;
80
81
  optionColor?: (option: RawOption) => string;
81
82
  optionIcon?: (option: RawOption) => string;
83
+ optionSubtitle?: (option: RawOption) => string;
82
84
  icon?: string;
83
85
  }>(),
84
86
  {
@@ -103,6 +105,7 @@ const props = withDefaults(
103
105
  select: undefined,
104
106
  optionColor: undefined,
105
107
  optionIcon: undefined,
108
+ optionSubtitle: undefined,
106
109
  icon: undefined,
107
110
  }
108
111
  );