sprintify-ui 0.10.35 → 0.10.37

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.
@@ -10701,7 +10701,7 @@ const Dc = /* @__PURE__ */ Uo(Gv, [["render", Zv]]), Qv = { class: "relative w-f
10701
10701
  return o.showEmptyOption && (M = [
10702
10702
  { value: null, label: o.emptyOptionLabel, option: null },
10703
10703
  ...M
10704
- ]), C.value === !1 ? M : M.filter((R) => o.filter !== void 0 ? o.filter(R) : R.label ? R.label.toLowerCase().includes(g.value.toLowerCase()) : !1);
10704
+ ]), C.value === !1 ? M : M.filter((R) => o.filter !== void 0 ? o.filter(R, g.value + "") : R.label ? R.label.toLowerCase().includes(g.value.toLowerCase()) : !1);
10705
10705
  });
10706
10706
  Ye(
10707
10707
  () => O.value,
@@ -11448,6 +11448,10 @@ const c0 = {
11448
11448
  default: void 0,
11449
11449
  type: String
11450
11450
  },
11451
+ filter: {
11452
+ default: void 0,
11453
+ type: Function
11454
+ },
11451
11455
  dropdownShow: {
11452
11456
  default: "focus",
11453
11457
  type: String
@@ -11522,6 +11526,7 @@ const c0 = {
11522
11526
  "has-error": t.hasError,
11523
11527
  inline: t.inline,
11524
11528
  size: t.size,
11529
+ filter: t.filter,
11525
11530
  "dropdown-show": t.dropdownShow,
11526
11531
  "show-model-value": t.showModelValue,
11527
11532
  "show-empty-option": t.showEmptyOption,
@@ -11542,7 +11547,7 @@ const c0 = {
11542
11547
  ue(u.$slots, "footer", ft(pt(p)))
11543
11548
  ]),
11544
11549
  _: 3
11545
- }, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "show-remove-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
11550
+ }, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "filter", "dropdown-show", "show-model-value", "show-empty-option", "show-remove-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
11546
11551
  }
11547
11552
  }), x0 = /* @__PURE__ */ Q({
11548
11553
  __name: "BaseBelongsToFetch",
@@ -17435,8 +17440,12 @@ const _b = ["align", "colspan"], Ib = ["innerHTML"], cd = /* @__PURE__ */ Q({
17435
17440
  key: 0,
17436
17441
  class: "flex h-5 w-5 shrink-0 grow-0"
17437
17442
  }, zb = ["checked", "disabled"], Ob = ["onClick"], Rb = ["innerHTML"], Lb = {
17438
- viewBox: "0 0 20 20",
17439
- class: "h-5 w-5"
17443
+ width: "11",
17444
+ height: "11",
17445
+ viewBox: "0 0 11 11",
17446
+ fill: "none",
17447
+ class: "block",
17448
+ xmlns: "http://www.w3.org/2000/svg"
17440
17449
  }, Fb = ["opacity"], Pb = ["opacity"], Nb = ["onClick"], Vb = ["onClick"], jb = ["disabled", "checked"], js = "disabled:bg-slate-100 group-hover:shadow-md disabled:border-slate-300 disabled:cursor-not-allowed duration-300 cursor-pointer focus:ring-blue-300 border border-slate-300 shadow h-[18px] w-[18px] rounded", Hb = /* @__PURE__ */ Q({
17441
17450
  name: "BaseDataTableTemplate",
17442
17451
  inheritAttrs: !1,
@@ -17779,13 +17788,13 @@ const _b = ["align", "colspan"], Ib = ["innerHTML"], cd = /* @__PURE__ */ Q({
17779
17788
  ], 64)) : Z("", !0),
17780
17789
  E("button", {
17781
17790
  type: "button",
17782
- class: j(["flex gap-1 w-full items-center bg-transparent text-left text-sm font-medium leading-tight text-slate-900", [
17791
+ class: j(["flex gap-2 w-full items-start bg-transparent text-left text-sm font-medium leading-tight text-slate-900", [
17783
17792
  Ee.sortable ? "cursor-pointer" : "",
17784
- Ee.align == "right" ? "justify-start flex-row-reverse" : ""
17793
+ Ee.align == "right" ? "justify-start flex-row-reverse text-right" : ""
17785
17794
  ]]),
17786
17795
  onClick: (M) => y(Ee, void 0, M)
17787
17796
  }, [
17788
- E("span", {
17797
+ E("div", {
17789
17798
  class: j(["whitespace-nowrap text-slate-600", {
17790
17799
  "text-[12px]": t.size == "sm",
17791
17800
  "text-xs": t.size == "md"
@@ -17794,20 +17803,20 @@ const _b = ["align", "colspan"], Ib = ["innerHTML"], cd = /* @__PURE__ */ Q({
17794
17803
  }, null, 10, Rb),
17795
17804
  Ee.sortable ? (b(), z("div", {
17796
17805
  key: 0,
17797
- class: j([
17806
+ class: j(["h-4 relative top-0.5", [
17798
17807
  u.value === Ee ? "" : "opacity-0 duration-200 group-hover:opacity-100"
17799
- ])
17808
+ ]])
17800
17809
  }, [
17801
17810
  (b(), z("svg", Lb, [
17802
17811
  E("path", {
17803
17812
  opacity: d.value ? "1" : "0.5",
17804
- fill: "currentColor",
17805
- d: "M9.116 4.823a1.25 1.25 0 0 1 1.768 0l2.646 2.647a.75.75 0 0 1-1.06 1.06l-2.47-2.47-2.47 2.47a.75.75 0 1 1-1.06-1.06l2.646-2.647Z"
17813
+ d: "M4.88471 0.366233C5.00079 0.250125 5.1386 0.158021 5.29028 0.0951819C5.44196 0.0323429 5.60453 0 5.76871 0C5.93289 0 6.09546 0.0323429 6.24714 0.0951819C6.39882 0.158021 6.53663 0.250125 6.65271 0.366233L9.29871 3.01323C9.43119 3.15541 9.50331 3.34345 9.49988 3.53776C9.49646 3.73206 9.41774 3.91744 9.28033 4.05485C9.14292 4.19227 8.95753 4.27098 8.76323 4.27441C8.56893 4.27784 8.38088 4.20571 8.23871 4.07323L5.76871 1.60323L3.29871 4.07323C3.23005 4.14692 3.14725 4.20602 3.05525 4.24701C2.96325 4.28801 2.86393 4.31005 2.76323 4.31182C2.66253 4.3136 2.5625 4.29508 2.46911 4.25736C2.37572 4.21963 2.29089 4.16349 2.21967 4.09227C2.14845 4.02105 2.09231 3.93622 2.05459 3.84283C2.01686 3.74944 1.99834 3.64941 2.00012 3.54871C2.00189 3.44801 2.02394 3.34869 2.06493 3.25669C2.10592 3.1647 2.16502 3.08189 2.23871 3.01323L4.88471 0.366233Z",
17814
+ fill: "black"
17806
17815
  }, null, 8, Fb),
17807
17816
  E("path", {
17808
17817
  opacity: d.value ? "0.5" : "1",
17809
- fill: "currentColor",
17810
- d: "M9.116 15.177a1.25 1.25 0 0 0 1.768 0l2.646-2.647a.75.75 0 0 0-1.06-1.06l-2.47 2.47-2.47-2.47a.75.75 0 0 0-1.06 1.06l2.646 2.647Z"
17818
+ d: "M4.84729 10.6083C4.96337 10.7244 5.10118 10.8165 5.25286 10.8793C5.40454 10.9422 5.56711 10.9745 5.73129 10.9745C5.89547 10.9745 6.05804 10.9422 6.20972 10.8793C6.3614 10.8165 6.49921 10.7244 6.61529 10.6083L9.26129 7.96129C9.39377 7.81912 9.4659 7.63107 9.46247 7.43677C9.45904 7.24247 9.38033 7.05708 9.24291 6.91967C9.1055 6.78226 8.92011 6.70354 8.72581 6.70012C8.53151 6.69669 8.34347 6.76881 8.20129 6.90129L5.73129 9.37129L3.26129 6.90129C3.11912 6.76881 2.93107 6.69669 2.73677 6.70012C2.54247 6.70354 2.35708 6.78226 2.21967 6.91967C2.08226 7.05708 2.00355 7.24247 2.00012 7.43677C1.99669 7.63107 2.06881 7.81912 2.20129 7.96129L4.84729 10.6083Z",
17819
+ fill: "black"
17811
17820
  }, null, 8, Pb)
17812
17821
  ]))
17813
17822
  ], 2)) : Z("", !0)
@@ -449,7 +449,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
449
449
  };
450
450
  filter: {
451
451
  default: undefined;
452
- type: PropType<(option: NormalizedOption) => boolean>;
452
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
453
453
  };
454
454
  hasError: {
455
455
  default: boolean;
@@ -589,7 +589,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
589
589
  };
590
590
  filter: {
591
591
  default: undefined;
592
- type: PropType<(option: NormalizedOption) => boolean>;
592
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
593
593
  };
594
594
  hasError: {
595
595
  default: boolean;
@@ -650,7 +650,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
650
650
  onScrollBottom?: ((...args: any[]) => any) | undefined;
651
651
  onTyping?: ((...args: any[]) => any) | undefined;
652
652
  }>, {
653
- filter: (option: NormalizedOption) => boolean;
653
+ filter: (option: NormalizedOption, keywords: string) => boolean;
654
654
  select: SelectConfiguration | undefined;
655
655
  size: "xs" | "sm" | "md" | "lg" | "xl";
656
656
  required: boolean;
@@ -719,7 +719,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
719
719
  };
720
720
  filter: {
721
721
  default: undefined;
722
- type: PropType<(option: NormalizedOption) => boolean>;
722
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
723
723
  };
724
724
  hasError: {
725
725
  default: boolean;
@@ -832,7 +832,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
832
832
  };
833
833
  filter: {
834
834
  default: undefined;
835
- type: PropType<(option: NormalizedOption) => boolean>;
835
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
836
836
  };
837
837
  hasError: {
838
838
  default: boolean;
@@ -893,7 +893,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
893
893
  onScrollBottom?: ((...args: any[]) => any) | undefined;
894
894
  onTyping?: ((...args: any[]) => any) | undefined;
895
895
  }>, {
896
- filter: (option: NormalizedOption) => boolean;
896
+ filter: (option: NormalizedOption, keywords: string) => boolean;
897
897
  select: SelectConfiguration | undefined;
898
898
  size: "xs" | "sm" | "md" | "lg" | "xl";
899
899
  required: boolean;
@@ -12,7 +12,7 @@ declare const autocomplete: import("vue").Ref<({
12
12
  $: import("vue").ComponentInternalInstance;
13
13
  $data: {};
14
14
  $props: Partial<{
15
- filter: (option: import("@/types").NormalizedOption) => boolean;
15
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
16
16
  select: SelectConfiguration | undefined;
17
17
  size: "xs" | "sm" | "md" | "lg" | "xl";
18
18
  required: boolean;
@@ -49,7 +49,7 @@ declare const autocomplete: import("vue").Ref<({
49
49
  readonly showEmptyOption: boolean;
50
50
  readonly showRemoveButton: boolean;
51
51
  readonly emptyOptionLabel: string;
52
- readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
52
+ readonly filter?: ((option: import("@/types").NormalizedOption, keywords: string) => boolean) | undefined;
53
53
  readonly select?: SelectConfiguration | undefined;
54
54
  readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
55
55
  readonly required?: boolean | undefined;
@@ -127,7 +127,7 @@ declare const autocomplete: import("vue").Ref<({
127
127
  };
128
128
  filter: {
129
129
  default: undefined;
130
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
130
+ type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
131
131
  };
132
132
  hasError: {
133
133
  default: boolean;
@@ -200,7 +200,7 @@ declare const autocomplete: import("vue").Ref<({
200
200
  scrollBottom: (...args: any[]) => void;
201
201
  typing: (...args: any[]) => void;
202
202
  }, string, {
203
- filter: (option: import("@/types").NormalizedOption) => boolean;
203
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
204
204
  select: SelectConfiguration | undefined;
205
205
  size: "xs" | "sm" | "md" | "lg" | "xl";
206
206
  required: boolean;
@@ -242,7 +242,7 @@ declare const autocomplete: import("vue").Ref<({
242
242
  $nextTick: typeof import("vue").nextTick;
243
243
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
244
244
  } & Readonly<{
245
- filter: (option: import("@/types").NormalizedOption) => boolean;
245
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
246
246
  select: SelectConfiguration | undefined;
247
247
  size: "xs" | "sm" | "md" | "lg" | "xl";
248
248
  required: boolean;
@@ -310,7 +310,7 @@ declare const autocomplete: import("vue").Ref<({
310
310
  };
311
311
  filter: {
312
312
  default: undefined;
313
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
313
+ type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
314
314
  };
315
315
  hasError: {
316
316
  default: boolean;
@@ -408,7 +408,7 @@ declare const autocomplete: import("vue").Ref<({
408
408
  $: import("vue").ComponentInternalInstance;
409
409
  $data: {};
410
410
  $props: Partial<{
411
- filter: (option: import("@/types").NormalizedOption) => boolean;
411
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
412
412
  select: SelectConfiguration | undefined;
413
413
  size: "xs" | "sm" | "md" | "lg" | "xl";
414
414
  required: boolean;
@@ -445,7 +445,7 @@ declare const autocomplete: import("vue").Ref<({
445
445
  readonly showEmptyOption: boolean;
446
446
  readonly showRemoveButton: boolean;
447
447
  readonly emptyOptionLabel: string;
448
- readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
448
+ readonly filter?: ((option: import("@/types").NormalizedOption, keywords: string) => boolean) | undefined;
449
449
  readonly select?: SelectConfiguration | undefined;
450
450
  readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
451
451
  readonly required?: boolean | undefined;
@@ -523,7 +523,7 @@ declare const autocomplete: import("vue").Ref<({
523
523
  };
524
524
  filter: {
525
525
  default: undefined;
526
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
526
+ type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
527
527
  };
528
528
  hasError: {
529
529
  default: boolean;
@@ -596,7 +596,7 @@ declare const autocomplete: import("vue").Ref<({
596
596
  scrollBottom: (...args: any[]) => void;
597
597
  typing: (...args: any[]) => void;
598
598
  }, string, {
599
- filter: (option: import("@/types").NormalizedOption) => boolean;
599
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
600
600
  select: SelectConfiguration | undefined;
601
601
  size: "xs" | "sm" | "md" | "lg" | "xl";
602
602
  required: boolean;
@@ -638,7 +638,7 @@ declare const autocomplete: import("vue").Ref<({
638
638
  $nextTick: typeof import("vue").nextTick;
639
639
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
640
640
  } & Readonly<{
641
- filter: (option: import("@/types").NormalizedOption) => boolean;
641
+ filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
642
642
  select: SelectConfiguration | undefined;
643
643
  size: "xs" | "sm" | "md" | "lg" | "xl";
644
644
  required: boolean;
@@ -706,7 +706,7 @@ declare const autocomplete: import("vue").Ref<({
706
706
  };
707
707
  filter: {
708
708
  default: undefined;
709
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
709
+ type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
710
710
  };
711
711
  hasError: {
712
712
  default: boolean;
@@ -1,12 +1,12 @@
1
1
  import { PropType } from 'vue';
2
2
  import BaseAutocomplete from './BaseAutocomplete.vue';
3
- import { RawOption, SelectConfiguration } from '@/types';
3
+ import { NormalizedOption, RawOption, SelectConfiguration } from '@/types';
4
4
  import { Size } from '@/utils/sizes';
5
5
  declare const autocomplete: import("vue").Ref<({
6
6
  $: import("vue").ComponentInternalInstance;
7
7
  $data: {};
8
8
  $props: Partial<{
9
- filter: (option: import("@/types").NormalizedOption) => boolean;
9
+ filter: (option: NormalizedOption, keywords: string) => boolean;
10
10
  select: SelectConfiguration | undefined;
11
11
  size: "xs" | "sm" | "md" | "lg" | "xl";
12
12
  required: boolean;
@@ -43,7 +43,7 @@ declare const autocomplete: import("vue").Ref<({
43
43
  readonly showEmptyOption: boolean;
44
44
  readonly showRemoveButton: boolean;
45
45
  readonly emptyOptionLabel: string;
46
- readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
46
+ readonly filter?: ((option: NormalizedOption, keywords: string) => boolean) | undefined;
47
47
  readonly select?: SelectConfiguration | undefined;
48
48
  readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
49
49
  readonly required?: boolean | undefined;
@@ -121,7 +121,7 @@ declare const autocomplete: import("vue").Ref<({
121
121
  };
122
122
  filter: {
123
123
  default: undefined;
124
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
124
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
125
125
  };
126
126
  hasError: {
127
127
  default: boolean;
@@ -194,7 +194,7 @@ declare const autocomplete: import("vue").Ref<({
194
194
  scrollBottom: (...args: any[]) => void;
195
195
  typing: (...args: any[]) => void;
196
196
  }, string, {
197
- filter: (option: import("@/types").NormalizedOption) => boolean;
197
+ filter: (option: NormalizedOption, keywords: string) => boolean;
198
198
  select: SelectConfiguration | undefined;
199
199
  size: "xs" | "sm" | "md" | "lg" | "xl";
200
200
  required: boolean;
@@ -236,7 +236,7 @@ declare const autocomplete: import("vue").Ref<({
236
236
  $nextTick: typeof import("vue").nextTick;
237
237
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
238
238
  } & Readonly<{
239
- filter: (option: import("@/types").NormalizedOption) => boolean;
239
+ filter: (option: NormalizedOption, keywords: string) => boolean;
240
240
  select: SelectConfiguration | undefined;
241
241
  size: "xs" | "sm" | "md" | "lg" | "xl";
242
242
  required: boolean;
@@ -304,7 +304,7 @@ declare const autocomplete: import("vue").Ref<({
304
304
  };
305
305
  filter: {
306
306
  default: undefined;
307
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
307
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
308
308
  };
309
309
  hasError: {
310
310
  default: boolean;
@@ -395,14 +395,14 @@ declare const autocomplete: import("vue").Ref<({
395
395
  open: () => void;
396
396
  close: () => void;
397
397
  keywords: import("vue").ComputedRef<string>;
398
- options: import("@/types").NormalizedOption[];
398
+ options: NormalizedOption[];
399
399
  }) => any) | undefined;
400
400
  };
401
401
  }) | null, ({
402
402
  $: import("vue").ComponentInternalInstance;
403
403
  $data: {};
404
404
  $props: Partial<{
405
- filter: (option: import("@/types").NormalizedOption) => boolean;
405
+ filter: (option: NormalizedOption, keywords: string) => boolean;
406
406
  select: SelectConfiguration | undefined;
407
407
  size: "xs" | "sm" | "md" | "lg" | "xl";
408
408
  required: boolean;
@@ -439,7 +439,7 @@ declare const autocomplete: import("vue").Ref<({
439
439
  readonly showEmptyOption: boolean;
440
440
  readonly showRemoveButton: boolean;
441
441
  readonly emptyOptionLabel: string;
442
- readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
442
+ readonly filter?: ((option: NormalizedOption, keywords: string) => boolean) | undefined;
443
443
  readonly select?: SelectConfiguration | undefined;
444
444
  readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
445
445
  readonly required?: boolean | undefined;
@@ -517,7 +517,7 @@ declare const autocomplete: import("vue").Ref<({
517
517
  };
518
518
  filter: {
519
519
  default: undefined;
520
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
520
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
521
521
  };
522
522
  hasError: {
523
523
  default: boolean;
@@ -590,7 +590,7 @@ declare const autocomplete: import("vue").Ref<({
590
590
  scrollBottom: (...args: any[]) => void;
591
591
  typing: (...args: any[]) => void;
592
592
  }, string, {
593
- filter: (option: import("@/types").NormalizedOption) => boolean;
593
+ filter: (option: NormalizedOption, keywords: string) => boolean;
594
594
  select: SelectConfiguration | undefined;
595
595
  size: "xs" | "sm" | "md" | "lg" | "xl";
596
596
  required: boolean;
@@ -632,7 +632,7 @@ declare const autocomplete: import("vue").Ref<({
632
632
  $nextTick: typeof import("vue").nextTick;
633
633
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
634
634
  } & Readonly<{
635
- filter: (option: import("@/types").NormalizedOption) => boolean;
635
+ filter: (option: NormalizedOption, keywords: string) => boolean;
636
636
  select: SelectConfiguration | undefined;
637
637
  size: "xs" | "sm" | "md" | "lg" | "xl";
638
638
  required: boolean;
@@ -700,7 +700,7 @@ declare const autocomplete: import("vue").Ref<({
700
700
  };
701
701
  filter: {
702
702
  default: undefined;
703
- type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
703
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
704
704
  };
705
705
  hasError: {
706
706
  default: boolean;
@@ -791,7 +791,7 @@ declare const autocomplete: import("vue").Ref<({
791
791
  open: () => void;
792
792
  close: () => void;
793
793
  keywords: import("vue").ComputedRef<string>;
794
- options: import("@/types").NormalizedOption[];
794
+ options: NormalizedOption[];
795
795
  }) => any) | undefined;
796
796
  };
797
797
  }) | null>;
@@ -821,7 +821,7 @@ declare var __VLS_10: {
821
821
  open: () => void;
822
822
  close: () => void;
823
823
  keywords: import("vue").ComputedRef<string>;
824
- options: import("@/types").NormalizedOption[];
824
+ options: NormalizedOption[];
825
825
  };
826
826
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
827
827
  option?: (props: typeof __VLS_10) => any;
@@ -875,6 +875,10 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
875
875
  default: undefined;
876
876
  type: PropType<Size>;
877
877
  };
878
+ filter: {
879
+ default: undefined;
880
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
881
+ };
878
882
  dropdownShow: {
879
883
  default: string;
880
884
  type: PropType<"focus" | "always">;
@@ -959,6 +963,10 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
959
963
  default: undefined;
960
964
  type: PropType<Size>;
961
965
  };
966
+ filter: {
967
+ default: undefined;
968
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
969
+ };
962
970
  dropdownShow: {
963
971
  default: string;
964
972
  type: PropType<"focus" | "always">;
@@ -994,6 +1002,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
994
1002
  }>> & Readonly<{
995
1003
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
996
1004
  }>, {
1005
+ filter: (option: NormalizedOption, keywords: string) => boolean;
997
1006
  select: SelectConfiguration | undefined;
998
1007
  size: "xs" | "sm" | "md" | "lg" | "xl";
999
1008
  required: boolean;
@@ -1057,6 +1066,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
1057
1066
  default: undefined;
1058
1067
  type: PropType<Size>;
1059
1068
  };
1069
+ filter: {
1070
+ default: undefined;
1071
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
1072
+ };
1060
1073
  dropdownShow: {
1061
1074
  default: string;
1062
1075
  type: PropType<"focus" | "always">;
@@ -1142,6 +1155,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
1142
1155
  default: undefined;
1143
1156
  type: PropType<Size>;
1144
1157
  };
1158
+ filter: {
1159
+ default: undefined;
1160
+ type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
1161
+ };
1145
1162
  dropdownShow: {
1146
1163
  default: string;
1147
1164
  type: PropType<"focus" | "always">;
@@ -1177,6 +1194,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
1177
1194
  }>> & Readonly<{
1178
1195
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1179
1196
  }>, {
1197
+ filter: (option: NormalizedOption, keywords: string) => boolean;
1180
1198
  select: SelectConfiguration | undefined;
1181
1199
  size: "xs" | "sm" | "md" | "lg" | "xl";
1182
1200
  required: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.35",
3
+ "version": "0.10.37",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -179,7 +179,7 @@ const props = defineProps({
179
179
  },
180
180
  filter: {
181
181
  default: undefined,
182
- type: Function as PropType<(option: NormalizedOption) => boolean>,
182
+ type: Function as PropType<(option: NormalizedOption, keywords: string) => boolean>,
183
183
  },
184
184
  hasError: {
185
185
  default: false,
@@ -308,7 +308,7 @@ const filteredNormalizedOptions = computed((): NormalizedOption[] => {
308
308
 
309
309
  return options.filter((option) => {
310
310
  if (props.filter !== undefined) {
311
- return props.filter(option);
311
+ return props.filter(option, keywords.value + '');
312
312
  }
313
313
  if (!option.label) {
314
314
  return false;
@@ -12,6 +12,7 @@
12
12
  :has-error="hasError"
13
13
  :inline="inline"
14
14
  :size="size"
15
+ :filter="filter"
15
16
  :dropdown-show="dropdownShow"
16
17
  :show-model-value="showModelValue"
17
18
  :show-empty-option="showEmptyOption"
@@ -46,7 +47,7 @@
46
47
  <script lang="ts" setup>
47
48
  import { PropType } from 'vue';
48
49
  import BaseAutocomplete from './BaseAutocomplete.vue';
49
- import { RawOption, SelectConfiguration } from '@/types';
50
+ import { NormalizedOption, RawOption, SelectConfiguration } from '@/types';
50
51
  import { Size } from '@/utils/sizes';
51
52
 
52
53
  const props = defineProps({
@@ -96,6 +97,10 @@ const props = defineProps({
96
97
  default: undefined,
97
98
  type: String as PropType<Size>,
98
99
  },
100
+ filter: {
101
+ default: undefined,
102
+ type: Function as PropType<(option: NormalizedOption, keywords: string) => boolean>,
103
+ },
99
104
  dropdownShow: {
100
105
  default: 'focus',
101
106
  type: String as PropType<'focus' | 'always'>,
@@ -55,14 +55,14 @@
55
55
 
56
56
  <button
57
57
  type="button"
58
- class="flex gap-1 w-full items-center bg-transparent text-left text-sm font-medium leading-tight text-slate-900"
58
+ class="flex gap-2 w-full items-start bg-transparent text-left text-sm font-medium leading-tight text-slate-900"
59
59
  :class="[
60
60
  column.sortable ? 'cursor-pointer' : '',
61
- column.align == 'right' ? 'justify-start flex-row-reverse' : ''
61
+ column.align == 'right' ? 'justify-start flex-row-reverse text-right' : ''
62
62
  ]"
63
63
  @click="sort(column, undefined, $event as any)"
64
64
  >
65
- <span
65
+ <div
66
66
  class="whitespace-nowrap text-slate-600"
67
67
  :class="{
68
68
  'text-[12px]': size == 'sm',
@@ -70,8 +70,10 @@
70
70
  }"
71
71
  v-html="column.label"
72
72
  />
73
+ <!-- h-4 is used to make sure the tooltip icon is always smaller than label and avoid alignment issues when icon is not present -->
73
74
  <div
74
75
  v-if="column.sortable"
76
+ class="h-4 relative top-0.5"
75
77
  :class="[
76
78
  currentSortColumn === column
77
79
  ? ''
@@ -79,18 +81,23 @@
79
81
  ]"
80
82
  >
81
83
  <svg
82
- viewBox="0 0 20 20"
83
- class="h-5 w-5"
84
+ width="11"
85
+ height="11"
86
+ viewBox="0 0 11 11"
87
+ fill="none"
88
+ class="block"
89
+ xmlns="http://www.w3.org/2000/svg"
84
90
  >
85
91
  <path
86
92
  :opacity="!isAsc ? '0.5' : '1'"
87
- fill="currentColor"
88
- d="M9.116 4.823a1.25 1.25 0 0 1 1.768 0l2.646 2.647a.75.75 0 0 1-1.06 1.06l-2.47-2.47-2.47 2.47a.75.75 0 1 1-1.06-1.06l2.646-2.647Z"
93
+ d="M4.88471 0.366233C5.00079 0.250125 5.1386 0.158021 5.29028 0.0951819C5.44196 0.0323429 5.60453 0 5.76871 0C5.93289 0 6.09546 0.0323429 6.24714 0.0951819C6.39882 0.158021 6.53663 0.250125 6.65271 0.366233L9.29871 3.01323C9.43119 3.15541 9.50331 3.34345 9.49988 3.53776C9.49646 3.73206 9.41774 3.91744 9.28033 4.05485C9.14292 4.19227 8.95753 4.27098 8.76323 4.27441C8.56893 4.27784 8.38088 4.20571 8.23871 4.07323L5.76871 1.60323L3.29871 4.07323C3.23005 4.14692 3.14725 4.20602 3.05525 4.24701C2.96325 4.28801 2.86393 4.31005 2.76323 4.31182C2.66253 4.3136 2.5625 4.29508 2.46911 4.25736C2.37572 4.21963 2.29089 4.16349 2.21967 4.09227C2.14845 4.02105 2.09231 3.93622 2.05459 3.84283C2.01686 3.74944 1.99834 3.64941 2.00012 3.54871C2.00189 3.44801 2.02394 3.34869 2.06493 3.25669C2.10592 3.1647 2.16502 3.08189 2.23871 3.01323L4.88471 0.366233Z"
94
+ fill="black"
89
95
  ></path>
90
96
  <path
91
97
  :opacity="isAsc ? '0.5' : '1'"
92
- fill="currentColor"
93
- d="M9.116 15.177a1.25 1.25 0 0 0 1.768 0l2.646-2.647a.75.75 0 0 0-1.06-1.06l-2.47 2.47-2.47-2.47a.75.75 0 0 0-1.06 1.06l2.646 2.647Z"
98
+
99
+ d="M4.84729 10.6083C4.96337 10.7244 5.10118 10.8165 5.25286 10.8793C5.40454 10.9422 5.56711 10.9745 5.73129 10.9745C5.89547 10.9745 6.05804 10.9422 6.20972 10.8793C6.3614 10.8165 6.49921 10.7244 6.61529 10.6083L9.26129 7.96129C9.39377 7.81912 9.4659 7.63107 9.46247 7.43677C9.45904 7.24247 9.38033 7.05708 9.24291 6.91967C9.1055 6.78226 8.92011 6.70354 8.72581 6.70012C8.53151 6.69669 8.34347 6.76881 8.20129 6.90129L5.73129 9.37129L3.26129 6.90129C3.11912 6.76881 2.93107 6.69669 2.73677 6.70012C2.54247 6.70354 2.35708 6.78226 2.21967 6.91967C2.08226 7.05708 2.00355 7.24247 2.00012 7.43677C1.99669 7.63107 2.06881 7.81912 2.20129 7.96129L4.84729 10.6083Z"
100
+ fill="black"
94
101
  ></path>
95
102
  </svg>
96
103
  </div>