@ironsource/shared-ui 1.4.2-test.7 → 1.4.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.
Files changed (206) hide show
  1. package/AddFilterButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  2. package/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  3. package/AutocompleteDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  4. package/AutocompleteInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  5. package/Banner.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  6. package/Button.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  7. package/CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  8. package/Checkbox.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  9. package/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  10. package/DatePicker.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  11. package/DatePickerMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  12. package/DateRange.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  13. package/Dialog.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  14. package/DollarInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  15. package/Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  16. package/FilterDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  17. package/FiltersPanel.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  18. package/FloatingToolbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  19. package/Heading.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  20. package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  21. package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  22. package/Menu.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  23. package/PasswordInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  24. package/PercentageInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  25. package/README.md +1 -1
  26. package/RadioButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  27. package/RadioGroup.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  28. package/Search.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  29. package/Switch.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  30. package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  31. package/Tabs.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  32. package/Text.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  33. package/TextArea.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  34. package/TextWithTitleContent.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  35. package/Toggle.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  36. package/components/appIcon/AppIcon.vue.d.ts +1 -1
  37. package/components/appIcon/AppIcon.vue.js +3 -3
  38. package/components/appIcon/index.d.ts +1 -1
  39. package/components/appTrigger/AppTrigger.vue.d.ts +6 -1
  40. package/components/appTrigger/AppTrigger.vue.js +49 -39
  41. package/components/appTrigger/index.d.ts +12 -1
  42. package/components/autocompleteDropdown/AutocompleteDropdown.vue.d.ts +6 -1
  43. package/components/autocompleteDropdown/AutocompleteDropdown.vue.js +20 -19
  44. package/components/autocompleteDropdown/AutocompleteInput.vue.d.ts +6 -1
  45. package/components/autocompleteDropdown/AutocompleteInput.vue.js +19 -13
  46. package/components/autocompleteDropdown/GroupOption.vue.d.ts +1 -1
  47. package/components/autocompleteDropdown/GroupOption.vue.js +3 -4
  48. package/components/autocompleteDropdown/index.d.ts +12 -1
  49. package/components/banner/Banner.vue.d.ts +10 -1
  50. package/components/banner/Banner.vue.js +24 -13
  51. package/components/banner/index.d.ts +10 -1
  52. package/components/button/Button.vue.d.ts +6 -1
  53. package/components/button/Button.vue.js +17 -15
  54. package/components/button/ButtonBase.vue.d.ts +1 -1
  55. package/components/button/ButtonBase.vue.js +11 -12
  56. package/components/button/IconButton.vue.d.ts +1 -1
  57. package/components/button/IconButton.vue.js +5 -5
  58. package/components/button/ScrollButton.vue.d.ts +1 -1
  59. package/components/button/ScrollButton.vue.js +8 -9
  60. package/components/button/index.d.ts +20 -9
  61. package/components/checkbox/Checkbox.vue.d.ts +6 -1
  62. package/components/checkbox/Checkbox.vue.js +33 -28
  63. package/components/checkbox/index.d.ts +12 -1
  64. package/components/chip/Chip.vue.d.ts +6 -1
  65. package/components/chip/Chip.vue.js +16 -11
  66. package/components/chip/index.d.ts +12 -1
  67. package/components/datePicker/DatePicker.vue.d.ts +6 -1
  68. package/components/datePicker/DatePicker.vue.js +22 -17
  69. package/components/datePicker/DatePickerMonth.vue.d.ts +6 -1
  70. package/components/datePicker/DatePickerMonth.vue.js +9 -7
  71. package/components/datePicker/index.d.ts +12 -1
  72. package/components/dateRange/CalendarMonth.vue.d.ts +6 -1
  73. package/components/dateRange/CalendarMonth.vue.js +58 -41
  74. package/components/dateRange/DateRange.vue.d.ts +6 -1
  75. package/components/dateRange/DateRange.vue.js +72 -61
  76. package/components/dateRange/DateRangePicker.vue.d.ts +6 -1
  77. package/components/dateRange/index.d.ts +12 -1
  78. package/components/dialog/Dialog.vue.d.ts +6 -1
  79. package/components/dialog/Dialog.vue.js +49 -34
  80. package/components/dialog/index.d.ts +12 -1
  81. package/components/dropdown/Dropdown.vue.d.ts +6 -1
  82. package/components/dropdown/Dropdown.vue.js +112 -88
  83. package/components/dropdown/Label.vue.d.ts +1 -1
  84. package/components/dropdown/Label.vue.js +3 -4
  85. package/components/dropdown/Option.vue.d.ts +1 -1
  86. package/components/dropdown/Option.vue.js +16 -17
  87. package/components/dropdown/SearchInput.vue.d.ts +1 -1
  88. package/components/dropdown/SearchInput.vue.js +6 -6
  89. package/components/dropdown/index.d.ts +409 -1
  90. package/components/emptyState/EmptyState.vue.d.ts +1 -1
  91. package/components/emptyState/EmptyState.vue.js +19 -21
  92. package/components/emptyState/index.d.ts +4 -4
  93. package/components/filterDropdown/AddFilterButton.vue.d.ts +3 -1
  94. package/components/filterDropdown/AddFilterButton.vue.js +11 -9
  95. package/components/filterDropdown/FilterDropdown.vue.d.ts +6 -1
  96. package/components/filterDropdown/FilterDropdown.vue.js +21 -20
  97. package/components/filterDropdown/index.d.ts +19 -2
  98. package/components/filtersPanel/FilterSearchInput.vue.d.ts +1 -1
  99. package/components/filtersPanel/FilterSearchInput.vue.js +7 -7
  100. package/components/filtersPanel/FiltersPanel.vue.d.ts +6 -1
  101. package/components/filtersPanel/FiltersPanel.vue.js +15 -12
  102. package/components/filtersPanel/index.d.ts +1 -1
  103. package/components/floatingToolbar/FloatingToolbar.vue.d.ts +1 -1
  104. package/components/floatingToolbar/FloatingToolbar.vue.js +3 -3
  105. package/components/floatingToolbar/index.d.ts +1 -1
  106. package/components/icon/Icon.vue.d.ts +1 -1
  107. package/components/icon/Icon.vue.js +4 -5
  108. package/components/icon/icons/index.d.ts +0 -3
  109. package/components/icon/icons/index.vue.js +0 -3
  110. package/components/icon/index.d.ts +1 -4
  111. package/components/icon/storyComponents/Code.vue.d.ts +1 -1
  112. package/components/icon/storyComponents/IconWrapper.vue.d.ts +1 -1
  113. package/components/icon/storyComponents/Page.vue.d.ts +1 -1
  114. package/components/includeExclude/IncludeExclude.vue.d.ts +6 -14
  115. package/components/includeExclude/IncludeExclude.vue.js +123 -187
  116. package/components/includeExclude/IncludeExcludeAppHeader.vue.d.ts +1 -1
  117. package/components/includeExclude/IncludeExcludeAppHeader.vue.js +22 -24
  118. package/components/includeExclude/IncludeExcludeAppTrigger.vue.d.ts +1 -1
  119. package/components/includeExclude/IncludeExcludeAppTrigger.vue.js +19 -22
  120. package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
  121. package/components/includeExclude/IncludeExcludeChipFilter.vue.js +40 -42
  122. package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
  123. package/components/includeExclude/IncludeExcludeOption.vue.js +21 -22
  124. package/components/includeExclude/includeExcludeMocks.d.ts +0 -12
  125. package/components/includeExclude/index.d.ts +28 -32
  126. package/components/includeExclude/index.vue.js +0 -3
  127. package/components/input/DollarInput.vue.d.ts +2 -2
  128. package/components/input/DollarInput.vue.js +3 -4
  129. package/components/input/Input.vue.d.ts +11 -1
  130. package/components/input/Input.vue.js +87 -64
  131. package/components/input/PasswordInput.vue.d.ts +2 -2
  132. package/components/input/PasswordInput.vue.js +3 -4
  133. package/components/input/PercentageInput.vue.d.ts +2 -2
  134. package/components/input/PercentageInput.vue.js +3 -4
  135. package/components/input/index.d.ts +36 -2
  136. package/components/menu/Menu.vue.d.ts +6 -1
  137. package/components/menu/Menu.vue.js +10 -8
  138. package/components/menu/index.d.ts +12 -1
  139. package/components/menuItem/MenuItem.vue.d.ts +1 -1
  140. package/components/menuItem/MenuItem.vue.js +3 -4
  141. package/components/menuItem/index.d.ts +1 -1
  142. package/components/popover/Popover.vue.d.ts +6 -1
  143. package/components/popover/Popover.vue.js +11 -9
  144. package/components/popover/index.d.ts +12 -1
  145. package/components/radioButton/RadioButton.vue.d.ts +6 -1
  146. package/components/radioButton/RadioButton.vue.js +24 -17
  147. package/components/radioButton/RadioGroup.vue.d.ts +6 -1
  148. package/components/radioButton/RadioGroup.vue.js +12 -8
  149. package/components/radioButton/index.d.ts +24 -2
  150. package/components/radioButton/useRadio.d.ts +1 -1
  151. package/components/search/Search.vue.d.ts +6 -1
  152. package/components/search/Search.vue.js +27 -21
  153. package/components/search/index.d.ts +12 -1
  154. package/components/skeleton/Skeleton.vue.d.ts +1 -1
  155. package/components/skeleton/Skeleton.vue.js +2 -2
  156. package/components/skeleton/index.d.ts +1 -1
  157. package/components/snackbar/Snackbar.vue.d.ts +1 -1
  158. package/components/snackbar/Snackbar.vue.js +26 -26
  159. package/components/switch/Switch.vue.d.ts +6 -1
  160. package/components/switch/Switch.vue.js +24 -16
  161. package/components/switch/index.d.ts +12 -1
  162. package/components/table/Table.types.d.ts +0 -1
  163. package/components/table/Table.vue.d.ts +6 -11
  164. package/components/table/Table.vue.js +80 -79
  165. package/components/table/TableHeaderSorter.vue.d.ts +1 -1
  166. package/components/table/TableHeaderSorter.vue.js +4 -4
  167. package/components/table/index.d.ts +12 -23
  168. package/components/table-cells/Editable.vue.d.ts +1 -1
  169. package/components/table-cells/Editable.vue.js +4 -4
  170. package/components/table-cells/index.d.ts +1 -1
  171. package/components/tabs/Tabs.vue.d.ts +6 -1
  172. package/components/tabs/Tabs.vue.js +29 -25
  173. package/components/tabs/index.d.ts +12 -1
  174. package/components/textArea/TextArea.vue.d.ts +6 -1
  175. package/components/textArea/TextArea.vue.js +32 -26
  176. package/components/textArea/index.d.ts +12 -1
  177. package/components/toggle/Toggle.vue.d.ts +11 -1
  178. package/components/toggle/Toggle.vue.js +48 -32
  179. package/components/toggle/index.d.ts +23 -1
  180. package/components/tooltip/TextWithTitleContent.vue.d.ts +16 -3
  181. package/components/tooltip/TextWithTitleContent.vue.js +17 -13
  182. package/components/tooltip/Tooltip.vue.d.ts +6 -1
  183. package/components/tooltip/Tooltip.vue.js +18 -15
  184. package/components/tooltip/index.d.ts +12 -1
  185. package/components/tooltip/storybookComponents/CustomTooltip.vue.d.ts +1 -1
  186. package/components/typography/Heading.vue.d.ts +6 -1
  187. package/components/typography/Heading.vue.js +10 -7
  188. package/components/typography/Text.vue.d.ts +6 -1
  189. package/components/typography/Text.vue.js +10 -6
  190. package/components/typography/index.d.ts +24 -2
  191. package/consts/regex.d.ts +1 -0
  192. package/consts/regex.vue.js +3 -0
  193. package/consts/style.d.ts +1 -0
  194. package/consts/style.vue.js +3 -0
  195. package/index.vue.js +3 -4
  196. package/package.json +4 -5
  197. package/testids/index.d.ts +146 -0
  198. package/testids/index.vue.js +170 -0
  199. package/utils/style.d.ts +1 -0
  200. package/utils/style.vue.js +5 -0
  201. package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
  202. package/components/icon/icons/TableEdit.vue.d.ts +0 -2
  203. package/components/icon/icons/TableEdit.vue.js +0 -24
  204. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +0 -43
  205. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.js +0 -123
  206. package/components/table/Pagination.vue.d.ts +0 -43
@@ -1,9 +1,10 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, toDisplayString, createVNode, unref } from 'vue';
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode, toDisplayString, createVNode } from 'vue';
2
2
  import Icon from '../icon/Icon.vue.js';
3
+ import { ChipTestIdModifiers } from '../../testids/index.vue.js';
3
4
  /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
4
5
 
5
6
  import "../../Chip.vue_vue_type_style_index_0_scoped_true_lang.css";
6
- const _hoisted_1 = ["disabled"];
7
+ const _hoisted_1 = ["disabled", "data-testid"];
7
8
  const _hoisted_2 = {
8
9
  key: 0,
9
10
  class: "icon icon--start"
@@ -16,13 +17,15 @@ const _hoisted_4 = {
16
17
  key: 1,
17
18
  class: "icon icon--end"
18
19
  };
19
- const _sfc_main = defineComponent({
20
+ const _hoisted_5 = ["data-testid"];
21
+ const _sfc_main = /* @__PURE__ */ defineComponent({
20
22
  __name: "Chip",
21
23
  props: {
22
24
  selected: { type: Boolean, default: false },
23
25
  clearable: { type: Boolean, default: false },
24
26
  prefix: { default: null },
25
- disabled: { type: Boolean, default: false }
27
+ disabled: { type: Boolean, default: false },
28
+ testId: { default: "" }
26
29
  },
27
30
  emits: ["cleared"],
28
31
  setup(__props, { emit }) {
@@ -32,33 +35,35 @@ const _sfc_main = defineComponent({
32
35
  };
33
36
  return (_ctx, _cache) => {
34
37
  return openBlock(), createElementBlock("button", {
35
- class: normalizeClass(["chip-container", { selected: _ctx.selected, disabled: _ctx.disabled }]),
36
- disabled: _ctx.disabled
38
+ class: normalizeClass(["chip-container", { selected: __props.selected, disabled: __props.disabled }]),
39
+ disabled: __props.disabled,
40
+ "data-testid": `${__props.testId}-${unref(ChipTestIdModifiers).WRAPPER}`
37
41
  }, [
38
42
  _ctx.$slots["icon-start"] ? (openBlock(), createElementBlock("span", _hoisted_2, [
39
43
  renderSlot(_ctx.$slots, "icon-start", {}, void 0, true)
40
44
  ])) : createCommentVNode("", true),
41
45
  createElementVNode("span", null, [
42
- !!_ctx.prefix ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.prefix) + ":", 1)) : createCommentVNode("", true),
46
+ !!__props.prefix ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.prefix) + ":", 1)) : createCommentVNode("", true),
43
47
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
44
48
  ]),
45
49
  _ctx.$slots["icon-end"] ? (openBlock(), createElementBlock("span", _hoisted_4, [
46
50
  renderSlot(_ctx.$slots, "icon-end", {}, void 0, true)
47
51
  ])) : createCommentVNode("", true),
48
- _ctx.clearable ? (openBlock(), createElementBlock("button", {
52
+ __props.clearable ? (openBlock(), createElementBlock("button", {
49
53
  key: 2,
50
54
  class: "clear-icon",
55
+ "data-testid": `${__props.testId}-${unref(ChipTestIdModifiers).CLEAR}`,
51
56
  onClick: cleared
52
57
  }, [
53
58
  createVNode(unref(Icon), {
54
- name: "close",
59
+ name: "close-bold",
55
60
  "font-size": "sm"
56
61
  })
57
- ])) : createCommentVNode("", true)
62
+ ], 8, _hoisted_5)) : createCommentVNode("", true)
58
63
  ], 10, _hoisted_1);
59
64
  };
60
65
  }
61
66
  });
62
- var Chip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-68f9a601"]]);
67
+ var Chip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5d0f8d76"]]);
63
68
 
64
69
  export { Chip as default };
@@ -1,4 +1,9 @@
1
1
  declare const ChipTypes: () => import("vue").DefineComponent<{
2
+ testId: {
3
+ type: import("vue").PropType<string>;
4
+ } & {
5
+ default: string;
6
+ };
2
7
  disabled: {
3
8
  type: import("vue").PropType<boolean>;
4
9
  } & {
@@ -20,6 +25,11 @@ declare const ChipTypes: () => import("vue").DefineComponent<{
20
25
  default: any;
21
26
  };
22
27
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "cleared"[], "cleared", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
28
+ testId: {
29
+ type: import("vue").PropType<string>;
30
+ } & {
31
+ default: string;
32
+ };
23
33
  disabled: {
24
34
  type: import("vue").PropType<boolean>;
25
35
  } & {
@@ -43,10 +53,11 @@ declare const ChipTypes: () => import("vue").DefineComponent<{
43
53
  }>> & {
44
54
  onCleared?: (...args: any[]) => any;
45
55
  }, {
56
+ testId: string;
46
57
  disabled: boolean;
47
58
  selected: boolean;
48
59
  clearable: boolean;
49
60
  prefix: string;
50
- }, {}>[];
61
+ }>[];
51
62
  export { default as Chip } from './Chip.vue';
52
63
  export { ChipTypes };
@@ -4,12 +4,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
4
4
  allowFutureDates?: boolean;
5
5
  dateFormat?: string;
6
6
  placeholder?: string;
7
+ testId?: string;
7
8
  }>, {
8
9
  uniqueId: number;
9
10
  modelValue: any;
10
11
  dateFormat: string;
11
12
  placeholder: string;
12
13
  allowFutureDates: boolean;
14
+ testId: string;
13
15
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
16
  "update:modelValue": (val: string | Date) => void;
15
17
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -18,21 +20,24 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
18
20
  allowFutureDates?: boolean;
19
21
  dateFormat?: string;
20
22
  placeholder?: string;
23
+ testId?: string;
21
24
  }>, {
22
25
  uniqueId: number;
23
26
  modelValue: any;
24
27
  dateFormat: string;
25
28
  placeholder: string;
26
29
  allowFutureDates: boolean;
30
+ testId: string;
27
31
  }>>> & {
28
32
  "onUpdate:modelValue"?: (val: string | Date) => any;
29
33
  }, {
34
+ testId: string;
30
35
  modelValue: Date | string;
31
36
  placeholder: string;
32
37
  uniqueId: string | number;
33
38
  allowFutureDates: boolean;
34
39
  dateFormat: string;
35
- }, {}>;
40
+ }>;
36
41
  export default _default;
37
42
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
43
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,21 +1,23 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, unref, renderSlot, withDirectives, vModelText, normalizeClass, createVNode, createCommentVNode } from 'vue';
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, unref, createElementVNode, renderSlot, withDirectives, isRef, vModelText, normalizeClass, createVNode, createCommentVNode } from 'vue';
2
2
  import { onClickOutside } from '@vueuse/core';
3
3
  import { useToggle } from '../../composables/useToggle.vue.js';
4
4
  import DatePickerMonth from './DatePickerMonth.vue.js';
5
5
  import { isValid, format, parse, isFuture } from 'date-fns';
6
+ import { DatePickerTestIdModifiers } from '../../testids/index.vue.js';
6
7
  /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
7
8
 
8
9
  import "../../DatePicker.vue_vue_type_style_index_0_scoped_true_lang.css";
9
- const _hoisted_1 = ["id"];
10
- const _hoisted_2 = ["placeholder"];
11
- const _sfc_main = defineComponent({
10
+ const _hoisted_1 = ["id", "data-testid"];
11
+ const _hoisted_2 = ["placeholder", "data-testid"];
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  __name: "DatePicker",
13
14
  props: {
14
15
  uniqueId: { default: Date.now() },
15
16
  modelValue: { default: null },
16
17
  allowFutureDates: { type: Boolean, default: false },
17
18
  dateFormat: { default: "yyyy-MM-d" },
18
- placeholder: { default: "" }
19
+ placeholder: { default: "" },
20
+ testId: { default: "" }
19
21
  },
20
22
  emits: ["update:modelValue"],
21
23
  setup(__props, { emit }) {
@@ -79,27 +81,29 @@ const _sfc_main = defineComponent({
79
81
  );
80
82
  return (_ctx, _cache) => {
81
83
  return openBlock(), createElementBlock("div", {
82
- id: componentId.value,
84
+ id: unref(componentId),
83
85
  ref_key: "datePicker",
84
86
  ref: datePicker,
85
- class: "date-picker"
87
+ class: "date-picker",
88
+ "data-testid": `${__props.testId}-${unref(DatePickerTestIdModifiers).WRAPPER}`
86
89
  }, [
87
90
  createElementVNode("div", {
88
91
  ref_key: "buttonRef",
89
92
  ref: buttonRef,
90
93
  onClick: _cache[2] || (_cache[2] = ($event) => unref(toggle)())
91
94
  }, [
92
- renderSlot(_ctx.$slots, "default", { formattedDate: formattedValue.value }, () => [
95
+ renderSlot(_ctx.$slots, "default", { formattedDate: unref(formattedValue) }, () => [
93
96
  withDirectives(createElementVNode("input", {
94
97
  ref_key: "input",
95
98
  ref: input,
96
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formattedValue.value = $event),
99
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(formattedValue) ? formattedValue.value = $event : null),
97
100
  type: "text",
98
101
  class: "input",
99
- placeholder: _ctx.placeholder,
102
+ placeholder: __props.placeholder,
103
+ "data-testid": `${__props.testId}-${unref(DatePickerTestIdModifiers).INPUT}`,
100
104
  onInput: _cache[1] || (_cache[1] = ($event) => handleInput($event))
101
105
  }, null, 40, _hoisted_2), [
102
- [vModelText, formattedValue.value]
106
+ [vModelText, unref(formattedValue)]
103
107
  ])
104
108
  ], true)
105
109
  ], 512),
@@ -107,19 +111,20 @@ const _sfc_main = defineComponent({
107
111
  key: 0,
108
112
  ref_key: "popup",
109
113
  ref: popup,
110
- class: normalizeClass(["date-picker-popup", { "align-right": nearTheEdge.value }])
114
+ class: normalizeClass(["date-picker-popup", { "align-right": unref(nearTheEdge) }])
111
115
  }, [
112
116
  createVNode(DatePickerMonth, {
113
- id: componentId.value + "-month",
114
- "model-value": valueAsDate.value,
115
- "allow-future-dates": _ctx.allowFutureDates,
117
+ id: unref(componentId) + "-month",
118
+ "model-value": unref(valueAsDate),
119
+ "allow-future-dates": __props.allowFutureDates,
120
+ "test-id": __props.testId,
116
121
  "onUpdate:modelValue": updateValue
117
- }, null, 8, ["id", "model-value", "allow-future-dates"])
122
+ }, null, 8, ["id", "model-value", "allow-future-dates", "test-id"])
118
123
  ], 2)) : createCommentVNode("", true)
119
124
  ], 8, _hoisted_1);
120
125
  };
121
126
  }
122
127
  });
123
- var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1f4328e0"]]);
128
+ var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71f15c18"]]);
124
129
 
125
130
  export { DatePicker as default };
@@ -3,29 +3,34 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
3
3
  modelValue?: Date;
4
4
  includeToday?: boolean;
5
5
  allowFutureDates?: boolean;
6
+ testId?: string;
6
7
  }>, {
7
8
  uniqueId: number;
8
9
  modelValue: any;
9
10
  includeToday: boolean;
10
11
  allowFutureDates: boolean;
12
+ testId: string;
11
13
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
14
  uniqueId?: string | number;
13
15
  modelValue?: Date;
14
16
  includeToday?: boolean;
15
17
  allowFutureDates?: boolean;
18
+ testId?: string;
16
19
  }>, {
17
20
  uniqueId: number;
18
21
  modelValue: any;
19
22
  includeToday: boolean;
20
23
  allowFutureDates: boolean;
24
+ testId: string;
21
25
  }>>> & {
22
26
  "onUpdate:modelValue"?: (...args: any[]) => any;
23
27
  }, {
28
+ testId: string;
24
29
  modelValue: Date;
25
30
  uniqueId: string | number;
26
31
  includeToday: boolean;
27
32
  allowFutureDates: boolean;
28
- }, {}>;
33
+ }>;
29
34
  export default _default;
30
35
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
36
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -6,13 +6,14 @@ import { startOfMonth, differenceInMonths, addMonths, subMonths } from 'date-fns
6
6
  /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
7
7
 
8
8
  import "../../DatePickerMonth.vue_vue_type_style_index_0_scoped_true_lang.css";
9
- const _sfc_main = defineComponent({
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "DatePickerMonth",
11
11
  props: {
12
12
  uniqueId: { default: Date.now() },
13
13
  modelValue: { default: null },
14
14
  includeToday: { type: Boolean, default: true },
15
- allowFutureDates: { type: Boolean, default: false }
15
+ allowFutureDates: { type: Boolean, default: false },
16
+ testId: { default: "" }
16
17
  },
17
18
  emits: ["update:modelValue"],
18
19
  setup(__props, { emit }) {
@@ -79,21 +80,22 @@ const _sfc_main = defineComponent({
79
80
  };
80
81
  return (_ctx, _cache) => {
81
82
  return openBlock(), createBlock(CalendarMonth, {
82
- id: _ctx.uniqueId,
83
+ id: __props.uniqueId,
83
84
  type: "month",
84
85
  class: "date-picker-month",
85
- range: selectedRange.value,
86
- navigation: navigation.value,
86
+ range: unref(selectedRange),
87
+ navigation: unref(navigation),
87
88
  year: unref(monthData).year,
88
89
  days: unref(monthData).days,
89
90
  weeks: unref(monthData).weeks,
90
91
  month: unref(monthData).month,
92
+ "test-id": __props.testId,
91
93
  onSelectionChanged: handleSelection,
92
94
  onNavigation: handleNavigation
93
- }, null, 8, ["id", "range", "navigation", "year", "days", "weeks", "month"]);
95
+ }, null, 8, ["id", "range", "navigation", "year", "days", "weeks", "month", "test-id"]);
94
96
  };
95
97
  }
96
98
  });
97
- var DatePickerMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7dbe885c"]]);
99
+ var DatePickerMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-79208613"]]);
98
100
 
99
101
  export { DatePickerMonth as default };
@@ -1,4 +1,9 @@
1
1
  declare const DatePickerTypes: () => import("vue").DefineComponent<{
2
+ testId: {
3
+ type: import("vue").PropType<string>;
4
+ } & {
5
+ default: string;
6
+ };
2
7
  modelValue: {
3
8
  type: import("vue").PropType<string | Date>;
4
9
  } & {
@@ -27,6 +32,11 @@ declare const DatePickerTypes: () => import("vue").DefineComponent<{
27
32
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
33
  "update:modelValue": (val: string | Date) => void;
29
34
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
+ testId: {
36
+ type: import("vue").PropType<string>;
37
+ } & {
38
+ default: string;
39
+ };
30
40
  modelValue: {
31
41
  type: import("vue").PropType<string | Date>;
32
42
  } & {
@@ -55,11 +65,12 @@ declare const DatePickerTypes: () => import("vue").DefineComponent<{
55
65
  }>> & {
56
66
  "onUpdate:modelValue"?: (val: string | Date) => any;
57
67
  }, {
68
+ testId: string;
58
69
  modelValue: string | Date;
59
70
  placeholder: string;
60
71
  uniqueId: string | number;
61
72
  allowFutureDates: boolean;
62
73
  dateFormat: string;
63
- }, {}>[];
74
+ }>[];
64
75
  export { default as DatePicker } from './DatePicker.vue';
65
76
  export { DatePickerTypes };
@@ -15,10 +15,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
15
15
  id?: string | number;
16
16
  allowedDays?: number;
17
17
  maxAllowedDate?: Date;
18
+ testId?: string;
18
19
  }>, {
19
20
  id: number;
20
21
  allowedDays: any;
21
22
  maxAllowedDate: any;
23
+ testId: string;
22
24
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("navigation" | "selectionChanged")[], "navigation" | "selectionChanged", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
23
25
  year: number;
24
26
  days: Record<string, Day>;
@@ -35,18 +37,21 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
35
37
  id?: string | number;
36
38
  allowedDays?: number;
37
39
  maxAllowedDate?: Date;
40
+ testId?: string;
38
41
  }>, {
39
42
  id: number;
40
43
  allowedDays: any;
41
44
  maxAllowedDate: any;
45
+ testId: string;
42
46
  }>>> & {
43
47
  onNavigation?: (...args: any[]) => any;
44
48
  onSelectionChanged?: (...args: any[]) => any;
45
49
  }, {
50
+ testId: string;
46
51
  id: string | number;
47
52
  allowedDays: number;
48
53
  maxAllowedDate: Date;
49
- }, {}>;
54
+ }>;
50
55
  export default _default;
51
56
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
52
57
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,35 +1,36 @@
1
- import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, createElementVNode, unref, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass } from 'vue';
1
+ import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, unref, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass } from 'vue';
2
2
  import dateServices from './DateServices.vue.js';
3
3
  import { navigatePrev, navigateNext } from './consts.vue.js';
4
4
  import Heading from '../typography/Heading.vue.js';
5
5
  import Text from '../typography/Text.vue.js';
6
- import '../button/Button.vue.js';
7
- import IconButton from '../button/IconButton.vue.js';
8
- import '../button/ScrollButton.vue.js';
9
- import { isBefore, isAfter, isSameDay } from 'date-fns';
6
+ import Icon from '../icon/Icon.vue.js';
7
+ import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
8
+ /* empty css *//* empty css */import IconButton from '../button/IconButton.vue.js';
9
+ import { CalendarMonthTestIdModifiers } from '../../testids/index.vue.js';
10
+ /* empty css */import 'floating-vue';
11
+ /* empty css *//* empty css */import { isBefore, isAfter, isSameDay } from 'date-fns';
10
12
  import AngleLeft from '../icon/icons/AngleLeft.vue.js';
11
13
  import AngleRight from '../icon/icons/AngleRight.vue.js';
12
- import Icon from '../icon/Icon.vue.js';
13
- /* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
14
-
14
+ /* empty css */
15
15
  import "../../CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css";
16
- const _hoisted_1 = ["id"];
17
- const _hoisted_2 = { class: "month-header" };
18
- const _hoisted_3 = { class: "days-header" };
19
- const _hoisted_4 = { class: "days-wrapper" };
20
- const _sfc_main = defineComponent({
16
+ const _hoisted_1 = ["id", "data-testid"];
17
+ const _hoisted_2 = ["data-testid"];
18
+ const _hoisted_3 = ["data-testid"];
19
+ const _hoisted_4 = ["data-testid"];
20
+ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  __name: "CalendarMonth",
22
22
  props: {
23
- year: {},
24
- days: {},
25
- weeks: {},
26
- month: {},
27
- navigation: {},
28
- range: {},
29
- type: {},
23
+ year: null,
24
+ days: null,
25
+ weeks: null,
26
+ month: null,
27
+ navigation: null,
28
+ range: null,
29
+ type: null,
30
30
  id: { default: Date.now() },
31
31
  allowedDays: { default: null },
32
- maxAllowedDate: { default: null }
32
+ maxAllowedDate: { default: null },
33
+ testId: { default: "" }
33
34
  },
34
35
  emits: ["selectionChanged", "navigation"],
35
36
  setup(__props, { emit }) {
@@ -219,17 +220,19 @@ const _sfc_main = defineComponent({
219
220
  });
220
221
  return (_ctx, _cache) => {
221
222
  return openBlock(), createElementBlock("div", {
222
- id: "datepickerCalendar" + _ctx.id,
223
- class: "calendar-month"
223
+ id: "datepickerCalendar" + __props.id,
224
+ class: "calendar-month",
225
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).WRAPPER}`
224
226
  }, [
225
227
  createElementVNode("span", {
226
228
  onClick: _cache[0] || (_cache[0] = ($event) => navigate(unref(navigatePrev)))
227
229
  }, [
228
- _ctx.navigation === unref(navigatePrev) || _ctx.navigation === "all" ? (openBlock(), createBlock(unref(IconButton), {
230
+ __props.navigation === unref(navigatePrev) || __props.navigation === "all" ? (openBlock(), createBlock(unref(IconButton), {
229
231
  key: 0,
230
232
  variant: "borderless",
231
233
  size: "md",
232
- class: "previous"
234
+ class: "previous",
235
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).PREVIOUS}`
233
236
  }, {
234
237
  default: withCtx(() => [
235
238
  createVNode(Icon, null, {
@@ -240,16 +243,17 @@ const _sfc_main = defineComponent({
240
243
  })
241
244
  ]),
242
245
  _: 1
243
- })) : createCommentVNode("", true)
246
+ }, 8, ["data-testid"])) : createCommentVNode("", true)
244
247
  ]),
245
248
  createElementVNode("span", {
246
249
  onClick: _cache[1] || (_cache[1] = ($event) => navigate(unref(navigateNext)))
247
250
  }, [
248
- _ctx.navigation === unref(navigateNext) || _ctx.navigation === "all" ? (openBlock(), createBlock(unref(IconButton), {
251
+ __props.navigation === unref(navigateNext) || __props.navigation === "all" ? (openBlock(), createBlock(unref(IconButton), {
249
252
  key: 0,
250
253
  class: "next",
251
254
  variant: "borderless",
252
- size: "md"
255
+ size: "md",
256
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).NEXT}`
253
257
  }, {
254
258
  default: withCtx(() => [
255
259
  createVNode(Icon, null, {
@@ -260,16 +264,25 @@ const _sfc_main = defineComponent({
260
264
  })
261
265
  ]),
262
266
  _: 1
263
- })) : createCommentVNode("", true)
267
+ }, 8, ["data-testid"])) : createCommentVNode("", true)
264
268
  ]),
265
- createElementVNode("div", _hoisted_2, [
266
- createVNode(Heading, { level: "6" }, {
269
+ createElementVNode("div", {
270
+ class: "month-header",
271
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).MONTH_HEADER}`
272
+ }, [
273
+ createVNode(Heading, {
274
+ level: "6",
275
+ "test-id": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).MONTH_HEADER_TEXT}`
276
+ }, {
267
277
  default: withCtx(() => [
268
- createTextVNode(toDisplayString(monthName.value) + " " + toDisplayString(_ctx.year), 1)
278
+ createTextVNode(toDisplayString(unref(monthName)) + " " + toDisplayString(__props.year), 1)
269
279
  ]),
270
280
  _: 1
271
- }),
272
- createElementVNode("div", _hoisted_3, [
281
+ }, 8, ["test-id"]),
282
+ createElementVNode("div", {
283
+ class: "days-header",
284
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).DAYS_HEADER}`
285
+ }, [
273
286
  (openBlock(), createElementBlock(Fragment, null, renderList(dayNames, (weekDay, index) => {
274
287
  return createVNode(unref(Text), {
275
288
  key: index,
@@ -281,10 +294,13 @@ const _sfc_main = defineComponent({
281
294
  _: 2
282
295
  }, 1024);
283
296
  }), 64))
284
- ])
285
- ]),
286
- createElementVNode("div", _hoisted_4, [
287
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weeks, (week, weekIndex) => {
297
+ ], 8, _hoisted_3)
298
+ ], 8, _hoisted_2),
299
+ createElementVNode("div", {
300
+ class: "days-wrapper",
301
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).DAYS_WRAPPER}`
302
+ }, [
303
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.weeks, (week, weekIndex) => {
288
304
  return openBlock(), createElementBlock("div", { key: weekIndex }, [
289
305
  (openBlock(true), createElementBlock(Fragment, null, renderList(week, (day, dayIndex) => {
290
306
  return openBlock(), createBlock(unref(Text), {
@@ -299,21 +315,22 @@ const _sfc_main = defineComponent({
299
315
  "end-day": isEndDay(day)
300
316
  }]),
301
317
  size: "sm",
318
+ "data-testid": `${__props.testId}-${unref(CalendarMonthTestIdModifiers).DAY}-${day.value}`,
302
319
  onClick: ($event) => day.disabled || day.isFuture || selectDay(day)
303
320
  }, {
304
321
  default: withCtx(() => [
305
322
  createTextVNode(toDisplayString(day.value), 1)
306
323
  ]),
307
324
  _: 2
308
- }, 1032, ["class", "onClick"]);
325
+ }, 1032, ["class", "data-testid", "onClick"]);
309
326
  }), 128))
310
327
  ]);
311
328
  }), 128))
312
- ])
329
+ ], 8, _hoisted_4)
313
330
  ], 8, _hoisted_1);
314
331
  };
315
332
  }
316
333
  });
317
- var CalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b6b53aec"]]);
334
+ var CalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aeb1d6d4"]]);
318
335
 
319
336
  export { CalendarMonth as default };
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  openOnTop: boolean;
18
18
  showPresets: boolean;
19
19
  maxDate?: Date;
20
+ testId?: string;
20
21
  }>, {
21
22
  types: () => string[];
22
23
  includeToday: boolean;
@@ -31,6 +32,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
31
32
  openOnTop: boolean;
32
33
  showPresets: boolean;
33
34
  maxDate: any;
35
+ testId: string;
34
36
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("opened" | "rangeTypeChanged" | "currentDateChanged" | "rangeChanged" | "dateRangePresetNameChanged" | "dismissed")[], "opened" | "rangeTypeChanged" | "currentDateChanged" | "rangeChanged" | "dateRangePresetNameChanged" | "dismissed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
35
37
  range: {
36
38
  from: Date;
@@ -49,6 +51,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
49
51
  openOnTop: boolean;
50
52
  showPresets: boolean;
51
53
  maxDate?: Date;
54
+ testId?: string;
52
55
  }>, {
53
56
  types: () => string[];
54
57
  includeToday: boolean;
@@ -63,6 +66,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
63
66
  openOnTop: boolean;
64
67
  showPresets: boolean;
65
68
  maxDate: any;
69
+ testId: string;
66
70
  }>>> & {
67
71
  onOpened?: (...args: any[]) => any;
68
72
  onRangeTypeChanged?: (...args: any[]) => any;
@@ -71,6 +75,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
71
75
  onDateRangePresetNameChanged?: (...args: any[]) => any;
72
76
  onDismissed?: (...args: any[]) => any;
73
77
  }, {
78
+ testId: string;
74
79
  disabled: boolean;
75
80
  allowedDays: number;
76
81
  uniqueId: string | number;
@@ -84,7 +89,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
84
89
  openOnTop: boolean;
85
90
  showPresets: boolean;
86
91
  maxDate: Date;
87
- }, {}>;
92
+ }>;
88
93
  export default _default;
89
94
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
90
95
  type __VLS_TypePropsToRuntimeProps<T> = {