@ironsource/shared-ui 2.1.3-rc.8 → 2.1.3

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 (122) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_d6680a72_lang.css +1 -0
  2. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_2e91704b_lang.css +1 -0
  3. package/AppHeader.vue_vue_type_style_index_0_scoped_8ffac784_lang.css +1 -0
  4. package/Autocomplete.vue_vue_type_style_index_0_scoped_429e5745_lang.css +1 -0
  5. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_23e22560_lang.css +1 -0
  6. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +1 -0
  7. package/DataGrid.vue_vue_type_style_index_0_scoped_bddb537c_lang.css +1 -0
  8. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c3033d90_lang.css +1 -0
  9. package/DialogV4.vue_vue_type_style_index_0_scoped_ea9275e6_lang.css +1 -0
  10. package/DropdownV4.vue_vue_type_style_index_0_scoped_24014c62_lang.css +1 -0
  11. package/FormCard.vue_vue_type_style_index_0_scoped_fa761e4d_lang.css +1 -0
  12. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +1 -0
  13. package/HelpIcon.vue_vue_type_style_index_0_scoped_7a611779_lang.css +1 -0
  14. package/OptionV4.vue_vue_type_style_index_0_scoped_cae6bfd4_lang.css +1 -0
  15. package/TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css +1 -0
  16. package/TextAreaV4.vue_vue_type_style_index_0_scoped_0336a92f_lang.css +1 -0
  17. package/TextField.vue_vue_type_style_index_0_scoped_95e25718_lang.css +1 -0
  18. package/components/alert/Alert.vue.d.ts +14 -7
  19. package/components/alert/Alert.vue.js +2 -2
  20. package/components/alert/Alert.vue2.js +30 -29
  21. package/components/alert/index.d.ts +176 -38
  22. package/components/appHeader/AppHeader.vue.d.ts +5 -0
  23. package/components/appHeader/AppHeader.vue.js +2 -2
  24. package/components/appHeader/AppHeader.vue2.js +49 -37
  25. package/components/appHeader/index.d.ts +9 -0
  26. package/components/autocomplete/Autocomplete.vue.d.ts +140 -0
  27. package/components/autocomplete/Autocomplete.vue.js +7 -0
  28. package/components/autocomplete/Autocomplete.vue2.js +99 -0
  29. package/components/autocomplete/index.d.ts +459 -0
  30. package/components/autocomplete/index.js +6 -0
  31. package/components/checkbox/v3/index.d.ts +12 -12
  32. package/components/checkbox/v4/index.d.ts +12 -12
  33. package/components/chip/v3/Chip.vue.d.ts +1 -1
  34. package/components/chip/v3/index.d.ts +20 -20
  35. package/components/chip/v4/ChipV4.vue.d.ts +1 -1
  36. package/components/chip/v4/index.d.ts +20 -20
  37. package/components/dialog/v4/DialogV4.vue.js +4 -4
  38. package/components/dialog/v4/DialogV4.vue2.js +2 -2
  39. package/components/dialog/v4/index.d.ts +16 -16
  40. package/components/dropdown/common/Dropdown.common.d.ts +1 -0
  41. package/components/dropdown/common/Dropdown.common.js +34 -33
  42. package/components/dropdown/v3/Dropdown.vue.d.ts +11 -11
  43. package/components/dropdown/v3/index.d.ts +159 -159
  44. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +4 -4
  45. package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
  46. package/components/dropdown/v4/AppDropdownTrigger.vue2.js +31 -31
  47. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +71 -0
  48. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +7 -0
  49. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +36 -0
  50. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.d.ts +66 -0
  51. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +7 -0
  52. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +50 -0
  53. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +1 -1
  54. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +7 -7
  55. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  56. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +1 -1
  57. package/components/dropdown/v4/DropdownV4.vue.d.ts +29 -22
  58. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  59. package/components/dropdown/v4/DropdownV4.vue2.js +143 -130
  60. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  61. package/components/dropdown/v4/OptionV4.vue2.js +96 -86
  62. package/components/dropdown/v4/dropdownStoryArgs.d.ts +9 -0
  63. package/components/dropdown/v4/index.d.ts +705 -610
  64. package/components/dropdown/v4/index.js +16 -10
  65. package/components/filterDropdown/index.d.ts +8 -8
  66. package/components/forms/FormCard.vue.js +3 -3
  67. package/components/forms/FormCard.vue2.js +1 -1
  68. package/components/forms/FormRow.vue.d.ts +10 -0
  69. package/components/forms/FormRow.vue.js +3 -3
  70. package/components/forms/FormRow.vue2.js +22 -29
  71. package/components/forms/index.d.ts +39 -1
  72. package/components/includeExclude/IncludeExclude.vue.d.ts +3 -3
  73. package/components/includeExclude/IncludeExcludeAppHeader.vue.d.ts +2 -2
  74. package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +3 -3
  75. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +3 -3
  76. package/components/includeExclude/index.d.ts +168 -168
  77. package/components/input/v3/Input.vue.d.ts +3 -3
  78. package/components/input/v3/index.d.ts +82 -82
  79. package/components/input/v4/TextField.vue.d.ts +6 -6
  80. package/components/input/v4/TextField.vue.js +3 -3
  81. package/components/input/v4/TextField.vue2.js +2 -2
  82. package/components/input/v4/index.d.ts +115 -115
  83. package/components/multibar/MultiBarMenu.vue2.js +13 -11
  84. package/components/table/common/Table.types.d.ts +3 -0
  85. package/components/table/v4/DataGrid.vue.d.ts +2 -2
  86. package/components/table/v4/DataGrid.vue.js +3 -3
  87. package/components/table/v4/DataGrid.vue2.js +147 -137
  88. package/components/table/v4/DataGridMenu.vue2.js +13 -11
  89. package/components/table/v4/HelpIcon.vue.d.ts +40 -0
  90. package/components/table/v4/HelpIcon.vue.js +7 -0
  91. package/components/table/v4/HelpIcon.vue2.js +32 -0
  92. package/components/table/v4/index.d.ts +39 -39
  93. package/components/table-cells/v4/EditableV4.vue.d.ts +1 -1
  94. package/components/table-cells/v4/index.d.ts +20 -20
  95. package/components/tabs/v4/TabsV4.vue.js +4 -4
  96. package/components/tabs/v4/TabsV4.vue2.js +4 -4
  97. package/components/textArea/v4/TextAreaV4.vue.d.ts +13 -3
  98. package/components/textArea/v4/TextAreaV4.vue.js +2 -2
  99. package/components/textArea/v4/TextAreaV4.vue2.js +25 -25
  100. package/components/textArea/v4/index.d.ts +41 -23
  101. package/components/toggle/v3/Toggle.vue.d.ts +1 -1
  102. package/components/toggle/v3/index.d.ts +9 -9
  103. package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
  104. package/components/toggle/v4/index.d.ts +28 -28
  105. package/index.d.ts +2242 -1912
  106. package/index.js +74 -70
  107. package/package.json +5 -3
  108. package/testids/index.d.ts +3 -1
  109. package/testids/index.js +10 -10
  110. package/Alert.vue_vue_type_style_index_0_scoped_203b6bd1_lang.css +0 -1
  111. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_5d9c6052_lang.css +0 -1
  112. package/AppHeader.vue_vue_type_style_index_0_scoped_95908b8d_lang.css +0 -1
  113. package/DataGrid.vue_vue_type_style_index_0_scoped_4baf9e57_lang.css +0 -1
  114. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_f0c4710f_lang.css +0 -1
  115. package/DialogV4.vue_vue_type_style_index_0_scoped_7422cf08_lang.css +0 -1
  116. package/DropdownV4.vue_vue_type_style_index_0_scoped_78c1497e_lang.css +0 -1
  117. package/FormCard.vue_vue_type_style_index_0_scoped_276bd901_lang.css +0 -1
  118. package/FormRow.vue_vue_type_style_index_0_scoped_39f48410_lang.css +0 -1
  119. package/OptionV4.vue_vue_type_style_index_0_scoped_d2743070_lang.css +0 -1
  120. package/TabsV4.vue_vue_type_style_index_0_scoped_bab86b0a_lang.css +0 -1
  121. package/TextAreaV4.vue_vue_type_style_index_0_scoped_6e91a617_lang.css +0 -1
  122. package/TextField.vue_vue_type_style_index_0_scoped_dca4c102_lang.css +0 -1
@@ -1,10 +1,10 @@
1
- import "../../AppHeader.vue_vue_type_style_index_0_scoped_95908b8d_lang.css"; import { defineComponent as p, computed as o, openBlock as u, createElementBlock as f, normalizeClass as y, createElementVNode as n, createVNode as i, unref as e, mergeProps as h, withCtx as x, createTextVNode as I, toDisplayString as v } from "vue";
2
- import z from "../icon/v4/IconV4.vue.js";
3
- import g from "../typography/v4/Typography.vue.js";
4
- import C from "../inlineCopy/InlineCopy.vue.js";
5
- import { useTestIdAttrs as T } from "../../utils/testIds.js";
1
+ import "../../AppHeader.vue_vue_type_style_index_0_scoped_8ffac784_lang.css"; import { defineComponent as h, computed as o, openBlock as m, createElementBlock as d, normalizeClass as I, createElementVNode as n, mergeProps as r, unref as e, createVNode as i, withCtx as x, createTextVNode as z, toDisplayString as v, createCommentVNode as A } from "vue";
2
+ import c from "../icon/v4/IconV4.vue.js";
3
+ import b from "../typography/v4/Typography.vue.js";
4
+ import g from "../inlineCopy/InlineCopy.vue.js";
5
+ import { useTestIdAttrs as C } from "../../utils/testIds.js";
6
6
  import { AppHeaderTestIdModifiers as s } from "../../testids/index.js";
7
- const A = { class: "image-container" }, N = ["src", "alt"], S = { class: "icon-container" }, b = { class: "name-container" }, D = /* @__PURE__ */ p({
7
+ const T = { class: "image-container" }, N = ["src", "alt"], w = ["data-platform"], B = { class: "name-container" }, M = /* @__PURE__ */ h({
8
8
  __name: "AppHeader",
9
9
  props: {
10
10
  image: { default: "" },
@@ -12,58 +12,70 @@ const A = { class: "image-container" }, N = ["src", "alt"], S = { class: "icon-c
12
12
  platform: { default: "android" },
13
13
  appKey: { default: "" },
14
14
  testId: { default: "" },
15
- type: { default: "normal" }
15
+ type: { default: "normal" },
16
+ showAbIcon: { type: Boolean, default: !1 }
16
17
  },
17
18
  setup(t) {
18
- const a = t, l = o(
19
+ const a = t, p = o(
19
20
  () => a.platform ? a.platform.toLowerCase() : ""
20
- ), r = o(
21
+ ), f = o(
21
22
  () => a.type === "normal" ? "24px" : "20px"
22
- ), d = o(
23
+ ), u = o(
23
24
  () => a.type === "small" ? "18px" : null
24
- ), m = o(
25
+ ), y = o(
25
26
  () => a.type === "normal" ? "h2" : "subtitle1"
26
- ), c = T(a.testId, s);
27
- return (E, V) => (u(), f("div", {
28
- class: y(["app-header", `size-${t.type}`])
27
+ ), l = C(a.testId, s);
28
+ return (P, S) => (m(), d("div", {
29
+ class: I(["app-header", `size-${t.type}`])
29
30
  }, [
30
- n("div", A, [
31
+ n("div", T, [
31
32
  n("img", {
32
33
  src: t.image,
33
34
  alt: t.name
34
35
  }, null, 8, N)
35
36
  ]),
36
- n("div", S, [
37
- i(e(z), {
37
+ n("div", r({
38
+ class: "icon-container",
39
+ "data-platform": t.platform
40
+ }, e(l)[e(s).APP_PLATFORM]), [
41
+ i(e(c), {
38
42
  type: "branded",
39
- name: e(l),
40
- size: e(r)
43
+ name: e(p),
44
+ size: e(f)
41
45
  }, null, 8, ["name", "size"])
42
- ]),
43
- n("div", b, [
44
- i(e(g), h({
45
- variant: e(m),
46
+ ], 16, w),
47
+ n("div", B, [
48
+ i(e(b), r({
49
+ variant: e(y),
46
50
  class: "title"
47
- }, e(c)[e(s).TITLE]), {
51
+ }, e(l)[e(s).TITLE]), {
48
52
  default: x(() => [
49
- I(v(t.name), 1)
53
+ z(v(t.name), 1)
50
54
  ]),
51
55
  _: 1
52
56
  }, 16, ["variant"]),
53
- n("div", null, [
54
- i(e(C), {
55
- text: t.appKey,
56
- size: "medium",
57
- class: "inline-copy",
58
- "hide-text-value": t.type === "small",
59
- "test-id": t.testId,
60
- "icon-size": e(d)
61
- }, null, 8, ["text", "hide-text-value", "test-id", "icon-size"])
62
- ])
63
- ])
57
+ i(e(g), {
58
+ text: t.appKey,
59
+ size: "medium",
60
+ class: "inline-copy",
61
+ "hide-text-value": t.type === "small",
62
+ "test-id": t.testId,
63
+ "icon-size": e(u)
64
+ }, null, 8, ["text", "hide-text-value", "test-id", "icon-size"])
65
+ ]),
66
+ t.showAbIcon ? (m(), d("div", r({
67
+ key: 0,
68
+ class: "ab-icon-wrapper"
69
+ }, e(l)[e(s).AB_ICON]), [
70
+ i(e(c), {
71
+ type: "ab-test",
72
+ name: "ab",
73
+ size: "28px"
74
+ })
75
+ ], 16)) : A("", !0)
64
76
  ], 2));
65
77
  }
66
78
  });
67
79
  export {
68
- D as default
80
+ M as default
69
81
  };
@@ -29,6 +29,10 @@ declare const AppHeaderTypes: () => import("vue").DefineComponent<{
29
29
  required: true;
30
30
  default: string;
31
31
  };
32
+ showAbIcon: {
33
+ type: import("vue").PropType<boolean>;
34
+ default: boolean;
35
+ };
32
36
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
37
  name: {
34
38
  type: import("vue").PropType<string>;
@@ -59,6 +63,10 @@ declare const AppHeaderTypes: () => import("vue").DefineComponent<{
59
63
  required: true;
60
64
  default: string;
61
65
  };
66
+ showAbIcon: {
67
+ type: import("vue").PropType<boolean>;
68
+ default: boolean;
69
+ };
62
70
  }>>, {
63
71
  name: string;
64
72
  type: "small" | "normal";
@@ -66,5 +74,6 @@ declare const AppHeaderTypes: () => import("vue").DefineComponent<{
66
74
  testId: string;
67
75
  platform: "android" | "ios";
68
76
  appKey: string;
77
+ showAbIcon: boolean;
69
78
  }>[];
70
79
  export { AppHeader, AppHeaderTypes };
@@ -0,0 +1,140 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ modelValue?: string | number;
3
+ placeholder?: string;
4
+ disabled?: boolean;
5
+ size?: "small" | "medium" | "large";
6
+ label?: string;
7
+ labelDirection?: "top" | "inside";
8
+ mandatory?: boolean;
9
+ hoverHelpText?: string;
10
+ hoverHelpTextPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
11
+ feedbackVariant?: "success" | "warning" | "error";
12
+ feedbackText?: string;
13
+ showFeedbackTextIcon?: boolean;
14
+ inlineError?: boolean;
15
+ inlineErrorText?: string;
16
+ options: unknown[] | {
17
+ id: string;
18
+ text: string;
19
+ }[];
20
+ displayValue: (option: unknown) => string;
21
+ optionNameKey?: string;
22
+ optionsListWidth?: string;
23
+ onSearch?: (option: any, term: string) => boolean;
24
+ testId?: string;
25
+ }>, {
26
+ modelValue: string;
27
+ placeholder: string;
28
+ disabled: boolean;
29
+ size: string;
30
+ label: string;
31
+ labelDirection: string;
32
+ mandatory: boolean;
33
+ hoverHelpText: string;
34
+ hoverHelpTextPlacement: string;
35
+ inlineError: boolean;
36
+ inlineErrorText: string;
37
+ feedbackText: string;
38
+ feedbackVariant: any;
39
+ showFeedbackTextIcon: boolean;
40
+ onSearch: any;
41
+ optionNameKey: string;
42
+ optionsListWidth: any;
43
+ testId: string;
44
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ "update:modelValue": (value: string | number) => void;
46
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
47
+ modelValue?: string | number;
48
+ placeholder?: string;
49
+ disabled?: boolean;
50
+ size?: "small" | "medium" | "large";
51
+ label?: string;
52
+ labelDirection?: "top" | "inside";
53
+ mandatory?: boolean;
54
+ hoverHelpText?: string;
55
+ hoverHelpTextPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
56
+ feedbackVariant?: "success" | "warning" | "error";
57
+ feedbackText?: string;
58
+ showFeedbackTextIcon?: boolean;
59
+ inlineError?: boolean;
60
+ inlineErrorText?: string;
61
+ options: unknown[] | {
62
+ id: string;
63
+ text: string;
64
+ }[];
65
+ displayValue: (option: unknown) => string;
66
+ optionNameKey?: string;
67
+ optionsListWidth?: string;
68
+ onSearch?: (option: any, term: string) => boolean;
69
+ testId?: string;
70
+ }>, {
71
+ modelValue: string;
72
+ placeholder: string;
73
+ disabled: boolean;
74
+ size: string;
75
+ label: string;
76
+ labelDirection: string;
77
+ mandatory: boolean;
78
+ hoverHelpText: string;
79
+ hoverHelpTextPlacement: string;
80
+ inlineError: boolean;
81
+ inlineErrorText: string;
82
+ feedbackText: string;
83
+ feedbackVariant: any;
84
+ showFeedbackTextIcon: boolean;
85
+ onSearch: any;
86
+ optionNameKey: string;
87
+ optionsListWidth: any;
88
+ testId: string;
89
+ }>>> & {
90
+ "onUpdate:modelValue"?: (value: string | number) => any;
91
+ }, {
92
+ label: string;
93
+ disabled: boolean;
94
+ size: "small" | "medium" | "large";
95
+ mandatory: boolean;
96
+ testId: string;
97
+ hoverHelpText: string;
98
+ hoverHelpTextPlacement: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
99
+ modelValue: string | number;
100
+ placeholder: string;
101
+ labelDirection: "top" | "inside";
102
+ inlineError: boolean;
103
+ inlineErrorText: string;
104
+ feedbackText: string;
105
+ feedbackVariant: "success" | "warning" | "error";
106
+ showFeedbackTextIcon: boolean;
107
+ onSearch: (option: any, term: string) => boolean;
108
+ optionNameKey: string;
109
+ optionsListWidth: string;
110
+ }>, {
111
+ default?(_: {
112
+ option: unknown;
113
+ selected: boolean;
114
+ active: boolean;
115
+ disabled: any;
116
+ }): any;
117
+ }>;
118
+ export default _default;
119
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
120
+ type __VLS_TypePropsToRuntimeProps<T> = {
121
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
122
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
123
+ } : {
124
+ type: import('vue').PropType<T[K]>;
125
+ required: true;
126
+ };
127
+ };
128
+ type __VLS_WithDefaults<P, D> = {
129
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
130
+ default: D[K];
131
+ }> : P[K];
132
+ };
133
+ type __VLS_Prettify<T> = {
134
+ [K in keyof T]: T[K];
135
+ } & {};
136
+ type __VLS_WithTemplateSlots<T, S> = T & {
137
+ new (): {
138
+ $slots: S;
139
+ };
140
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Autocomplete.vue2.js";
2
+ /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../Autocomplete.vue_vue_type_style_index_0_scoped_429e5745_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-429e5745"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,99 @@
1
+ import "../../Autocomplete.vue_vue_type_style_index_0_scoped_429e5745_lang.css"; import { defineComponent as b, computed as h, ref as s, watchEffect as x, openBlock as y, createBlock as k, unref as r, withCtx as f, createVNode as V, isRef as w, renderSlot as T, normalizeProps as g, guardReactiveProps as F } from "vue";
2
+ import I from "../dropdown/v4/DropdownV4.vue.js";
3
+ import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
+ import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
+ import "../dropdown/v4/ChipDropdownTrigger.vue.js";
6
+ import "../dropdown/v4/AppDropdownTrigger.vue.js";
7
+ import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
8
+ import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
9
+ import "../dropdown/v4/OptionV4.vue.js";
10
+ import B from "../input/v4/TextField.vue.js";
11
+ import { useVModel as S } from "@vueuse/core";
12
+ const K = /* @__PURE__ */ b({
13
+ __name: "Autocomplete",
14
+ props: {
15
+ modelValue: { default: "" },
16
+ placeholder: { default: "" },
17
+ disabled: { type: Boolean, default: !1 },
18
+ size: { default: "small" },
19
+ label: { default: "" },
20
+ labelDirection: { default: "top" },
21
+ mandatory: { type: Boolean, default: !1 },
22
+ hoverHelpText: { default: "" },
23
+ hoverHelpTextPlacement: { default: "top" },
24
+ feedbackVariant: { default: null },
25
+ feedbackText: { default: "" },
26
+ showFeedbackTextIcon: { type: Boolean, default: !1 },
27
+ inlineError: { type: Boolean, default: !1 },
28
+ inlineErrorText: { default: "" },
29
+ options: null,
30
+ displayValue: null,
31
+ optionNameKey: { default: "" },
32
+ optionsListWidth: { default: null },
33
+ onSearch: { type: Function, default: null },
34
+ testId: { default: "" }
35
+ },
36
+ emits: ["update:modelValue"],
37
+ setup(e, { emit: c }) {
38
+ const a = e, n = S(a, "modelValue", c), m = (t) => {
39
+ t !== void 0 && (n.value = a.displayValue(t));
40
+ }, p = (t, l) => a.displayValue(t).toLowerCase().replace(/\s+/g, "").includes(l.toLowerCase().replace(/\s+/g, "")), d = h(() => {
41
+ const t = n.value.toString();
42
+ return (a.options || []).filter((l) => a.displayValue(l) !== t).filter(
43
+ (l) => a.onSearch !== null ? a.onSearch(l, t) : p(l, t)
44
+ );
45
+ }), o = s(!1), u = s(!1);
46
+ x(() => {
47
+ a.disabled ? o.value = !1 : u.value && d.value.length ? o.value = !0 : d.value.length === 0 && (o.value = !1);
48
+ });
49
+ const v = () => {
50
+ a.disabled || !o.value && d.value.length && (o.value = !0);
51
+ };
52
+ return (t, l) => (y(), k(r(I), {
53
+ "is-open": o.value,
54
+ "onUpdate:is-open": l[3] || (l[3] = (i) => o.value = i),
55
+ class: "autocomplete-dropdown",
56
+ "display-value": e.displayValue,
57
+ options: r(d),
58
+ "option-name-key": e.optionNameKey,
59
+ "options-list-width": e.optionsListWidth,
60
+ disabled: e.disabled,
61
+ "search-auto-focus": !1,
62
+ "full-width": !1,
63
+ "test-id": e.testId,
64
+ "onUpdate:selected": m
65
+ }, {
66
+ "dropdown-trigger": f(() => [
67
+ V(r(B), {
68
+ modelValue: r(n),
69
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => w(n) ? n.value = i : null),
70
+ class: "autocomplete-field",
71
+ placeholder: e.placeholder,
72
+ disabled: e.disabled,
73
+ size: e.size,
74
+ label: e.label,
75
+ "label-direction": e.labelDirection,
76
+ mandatory: e.mandatory,
77
+ "hover-help-text": e.hoverHelpText,
78
+ "hover-help-text-placemen": e.hoverHelpTextPlacement,
79
+ "test-id": e.testId,
80
+ "feedback-variant": e.feedbackVariant,
81
+ "feedback-text": e.feedbackText,
82
+ "show-feedback-text-icon": e.showFeedbackTextIcon,
83
+ "inline-error": e.inlineError,
84
+ "inline-error-text": e.inlineErrorText,
85
+ onFocusin: l[1] || (l[1] = (i) => u.value = !0),
86
+ onFocusout: l[2] || (l[2] = (i) => u.value = !1),
87
+ onClick: v
88
+ }, null, 8, ["modelValue", "placeholder", "disabled", "size", "label", "label-direction", "mandatory", "hover-help-text", "hover-help-text-placemen", "test-id", "feedback-variant", "feedback-text", "show-feedback-text-icon", "inline-error", "inline-error-text"])
89
+ ]),
90
+ default: f((i) => [
91
+ T(t.$slots, "default", g(F(i)), void 0, !0)
92
+ ]),
93
+ _: 3
94
+ }, 8, ["is-open", "display-value", "options", "option-name-key", "options-list-width", "disabled", "test-id"]));
95
+ }
96
+ });
97
+ export {
98
+ K as default
99
+ };