@eightshift/ui-components 1.3.1 → 1.4.0

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 (110) hide show
  1. package/dist/{Button-DTARR6Ff.js → Button-uYE9D_E3.js} +6 -5
  2. package/dist/{ColorSwatch-5bZ_yIMB.js → ColorSwatch-Bev-9Vbr.js} +4 -4
  3. package/dist/{Dialog-DJgS0mAg.js → Dialog-CGE2ficT.js} +17 -15
  4. package/dist/{FieldError-CviphIN5.js → FieldError-CBPJ4Xx8.js} +2 -2
  5. package/dist/{FocusScope-BjM5iOQC.js → FocusScope-CVd6C65L.js} +24 -8
  6. package/dist/{GridList-DjRnMEae.js → GridList-PBJsm70G.js} +156 -116
  7. package/dist/{Group-BQu67pVS.js → Group-WZgNv9RE.js} +3 -3
  8. package/dist/Hidden-YSmyVF_5.js +45 -0
  9. package/dist/{Input-DWRQF0ro.js → Input-CaS4qmLb.js} +10 -9
  10. package/dist/{Label-BXvY41yE.js → Label-yZgqvhXc.js} +3 -2
  11. package/dist/ListBox-MZyPpwvj.js +567 -0
  12. package/dist/{Select-49a62830.esm-BnlXlUnT.js → Select-49a62830.esm-CqLHaIei.js} +1 -1
  13. package/dist/{SelectionManager-JxXmb3-k.js → SelectionManager-CvRaua4m.js} +1580 -1484
  14. package/dist/{Separator-CX64zwq8.js → Separator-C7Few7L6.js} +80 -62
  15. package/dist/{Slider-Clme2C36.js → Slider-D8a63VhT.js} +14 -12
  16. package/dist/{Text-qjognpzK.js → Text-D8qh3_U7.js} +1 -1
  17. package/dist/{VisuallyHidden-BZPezMV5.js → VisuallyHidden-DD480kAb.js} +2 -2
  18. package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
  19. package/dist/{ariaHideOutside-BZ5z6iCD.js → ariaHideOutside-BzxkODNq.js} +1 -9
  20. package/dist/assets/style.css +1 -1
  21. package/dist/assets/wp-ui-enhancements.css +1 -1
  22. package/dist/components/animated-visibility/animated-visibility.js +311 -198
  23. package/dist/components/base-control/base-control.js +1 -1
  24. package/dist/components/button/button.js +274 -9
  25. package/dist/components/checkbox/checkbox.js +171 -1
  26. package/dist/components/color-pickers/color-picker.js +1 -1
  27. package/dist/components/color-pickers/color-swatch.js +3 -3
  28. package/dist/components/color-pickers/gradient-editor.js +3 -3
  29. package/dist/components/color-pickers/solid-color-picker.js +46 -32
  30. package/dist/components/component-toggle/component-toggle.js +2 -2
  31. package/dist/components/container-panel/container-panel.js +2 -2
  32. package/dist/components/draggable-list/draggable-list-item.js +3 -3
  33. package/dist/components/draggable-list/draggable-list.js +3671 -6
  34. package/dist/components/expandable/expandable.js +7 -4
  35. package/dist/components/index.js +4 -4
  36. package/dist/components/input-field/input-field.js +7 -7
  37. package/dist/components/link-input/link-input.js +1519 -489
  38. package/dist/components/list-box/list-box.js +2 -2
  39. package/dist/components/matrix-align/matrix-align.js +3 -3
  40. package/dist/components/menu/menu.js +164 -466
  41. package/dist/components/modal/modal.js +7 -7
  42. package/dist/components/number-picker/number-picker.js +22 -17
  43. package/dist/components/option-select/option-select.js +6 -4
  44. package/dist/components/placeholders/file-placeholder.js +1 -1
  45. package/dist/components/popover/popover.js +3 -3
  46. package/dist/components/radio/radio.js +13 -13
  47. package/dist/components/repeater/repeater-context.js +5 -0
  48. package/dist/components/repeater/repeater-item.js +46 -91
  49. package/dist/components/repeater/repeater.js +5130 -175
  50. package/dist/components/responsive/responsive-legacy.js +3 -3
  51. package/dist/components/responsive/responsive.js +3 -3
  52. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  53. package/dist/components/select/async-multi-select.js +3 -3
  54. package/dist/components/select/async-single-select.js +2 -2
  55. package/dist/components/select/custom-select-default-components.js +1 -1
  56. package/dist/components/select/multi-select-components.js +1 -1
  57. package/dist/components/select/multi-select.js +5 -5
  58. package/dist/components/select/react-select-component-wrappers.js +1 -1
  59. package/dist/components/select/single-select.js +2 -2
  60. package/dist/components/select/styles.js +1 -1
  61. package/dist/components/slider/column-config-slider.js +3 -3
  62. package/dist/components/slider/slider.js +3 -3
  63. package/dist/components/slider/utils.js +1 -1
  64. package/dist/components/tabs/tabs.js +46 -71
  65. package/dist/components/toggle/switch.js +6 -6
  66. package/dist/components/toggle/toggle.js +1 -1
  67. package/dist/components/toggle-button/toggle-button.js +7 -7
  68. package/dist/components/tooltip/tooltip.js +3 -3
  69. package/dist/{context-BG_1RnbC.js → context-Bon2Gyx5.js} +1 -1
  70. package/dist/{default-i18n-BqwLkgZv.js → default-i18n-BqWys-1G.js} +1 -1
  71. package/dist/{focusSafely-DGZ4R5fj.js → focusSafely-PMGZgZ9-.js} +33 -26
  72. package/dist/getScrollParent-B3XgpXBL.js +10 -0
  73. package/dist/icons/icons.js +205 -0
  74. package/dist/icons/jsx-svg.js +2 -2
  75. package/dist/{index-CAPcSs9K.js → index-BTCzc3zb.js} +1 -1
  76. package/dist/{index-a301f526.esm-ByOfDxiG.js → index-a301f526.esm-B9tWL9yi.js} +80 -603
  77. package/dist/index.js +4 -4
  78. package/dist/{intlStrings-CkuKCPkT.js → intlStrings-KQxgp5tS.js} +14 -9
  79. package/dist/{multi-select-components-7vKCF8dG.js → multi-select-components-DTvEidE3.js} +1 -1
  80. package/dist/react-jsx-parser.min-CAGfntg1.js +13425 -0
  81. package/dist/{react-select-async.esm-5zW9Dv9E.js → react-select-async.esm-8Rba_3KV.js} +3 -3
  82. package/dist/{react-select.esm-Bi6uzjbT.js → react-select.esm-DkSeQzOP.js} +3 -3
  83. package/dist/{textSelection-BLyBtNe2.js → textSelection-DS7-670U.js} +1 -1
  84. package/dist/{tooltip-DSk8I1SO.js → tooltip-C9mg1CP5.js} +54 -18
  85. package/dist/{useButton-EJ9c8fmq.js → useButton-BPY4yXUo.js} +3 -3
  86. package/dist/{useEvent-Cxq_BzP_.js → useEvent-DDLT851Z.js} +1 -1
  87. package/dist/{useFocusRing-Dg5Y_10S.js → useFocusRing-DsxEaA2J.js} +1 -1
  88. package/dist/{useFocusable-CQZyQp4q.js → useFocusable-BFKHuYS9.js} +2 -2
  89. package/dist/{useFormReset-DJMtIgSL.js → useFormReset-BCPbwfnH.js} +1 -1
  90. package/dist/{useFormValidationState-DDC_nImg.js → useFormValidationState-DC5jbhBW.js} +2 -2
  91. package/dist/{useHasTabbableChild-M3O3VIil.js → useHasTabbableChild-Byd7ylXD.js} +2 -2
  92. package/dist/{useLabel-6NqYraET.js → useLabel-DuJhImKc.js} +2 -2
  93. package/dist/{useLabels-D2RG7TdI.js → useLabels-JaBafrnV.js} +1 -1
  94. package/dist/{useListData-BpYQj7kK.js → useListData-B5Pk32vd.js} +6 -3
  95. package/dist/{useListState-IllYYnXV.js → useListState-Csx05BmT.js} +6 -3
  96. package/dist/{useLocalizedStringFormatter-Cwm_siat.js → useLocalizedStringFormatter-CVIIVTgz.js} +1 -1
  97. package/dist/useMenuTrigger-CMgzyMKW.js +246 -0
  98. package/dist/{useNumberFieldState-CVJOJnF1.js → useNumberFieldState-BVFqhboT.js} +12 -11
  99. package/dist/{useNumberFormatter-DVZRQXk3.js → useNumberFormatter-BEeBSV-N.js} +1 -1
  100. package/dist/{usePress-CiXj8dLE.js → usePress-CY8MpqYD.js} +58 -16
  101. package/dist/useSingleSelectListState-CzZUgAt0.js +37 -0
  102. package/dist/{useToggle-CV-IX6nL.js → useToggle-CJp2Fh_L.js} +4 -4
  103. package/dist/{useToggleState-DHIdITtQ.js → useToggleState-B4--Ski0.js} +1 -1
  104. package/dist/{utils-DC-UMp1n.js → utils-B4IdLYb8.js} +48 -85
  105. package/package.json +24 -21
  106. package/dist/Checkbox-CiJIVbAP.js +0 -174
  107. package/dist/ListBox-DTKMdjQC.js +0 -4216
  108. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -8
  109. package/dist/button-IxfzzzbP.js +0 -277
  110. package/dist/react-jsx-parser.min-DhrYeqLL.js +0 -4563
@@ -1,256 +1,1269 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1, a as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-DTARR6Ff.js";
3
- import { $ as $a049562f99e7db0e$export$f9c6924e160136d1, a as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-BQu67pVS.js";
4
- import { b as $2d73ec29415bd339$export$712718f7aec83d5, $ as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-DWRQF0ro.js";
5
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BXvY41yE.js";
6
- import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DC-UMp1n.js";
7
- import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-CviphIN5.js";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1, a as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-uYE9D_E3.js";
3
+ import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, c as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-B4IdLYb8.js";
4
+ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-CBPJ4Xx8.js";
8
5
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
9
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-qjognpzK.js";
6
+ import { $ as $a049562f99e7db0e$export$f9c6924e160136d1, a as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-WZgNv9RE.js";
7
+ import { b as $2d73ec29415bd339$export$712718f7aec83d5, $ as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CaS4qmLb.js";
8
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-yZgqvhXc.js";
9
+ import { b as $b1f0cad8af73213b$export$3585ede4d035bf14, c as $b1f0cad8af73213b$export$9145995848b05025, d as $eed445e0843c11d0$export$7ff8f37d2d81a48d, e as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-MZyPpwvj.js";
10
+ import { f as $de32f1b87079253c$export$d2f961adcb0afbe, i as $07b14b47974efb58$export$9b9a0cd73afb7ca4, $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-CGE2ficT.js";
11
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-D8qh3_U7.js";
12
+ import { i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, k as $c5a24bc478652b5f$export$1005530eda016c13, e as $e1995378a142960e$export$bf788dd355e3a401 } from "../../SelectionManager-CvRaua4m.js";
10
13
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
11
- import React__default, { useReducer, useRef, useEffect, forwardRef, createContext, useMemo, useState } from "react";
12
- import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../focusSafely-DGZ4R5fj.js";
13
- import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-Cwm_siat.js";
14
- import { $ as $13c3c67164f4d5be$export$4c260019440d418f, B as Button } from "../../button-IxfzzzbP.js";
15
- import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
14
+ import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $9daab02d461809db$export$683480f191c0e3ea, T as Tooltip } from "../../tooltip-C9mg1CP5.js";
15
+ import React__default, { useCallback, useMemo, useRef, useEffect, useState, useReducer, forwardRef, createContext, cloneElement } from "react";
16
+ import { b as $325a3faab7a68acd$export$a16aca283550c30d, c as $2a25aae57d74318e$export$a05409b8bb224a5a, a as $453cc9f0df89c0a5$export$77d5aafae4e095b2 } from "../../Separator-C7Few7L6.js";
17
+ import { c as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidationState-DC5jbhBW.js";
18
+ import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-CzZUgAt0.js";
19
+ import { a as $a02d57049d202695$export$d085fb9e920b5ca7 } from "../../useListState-Csx05BmT.js";
20
+ import { w as $c87311424ea30a05$export$e1865c3bedcd822b, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../focusSafely-PMGZgZ9-.js";
21
+ import { $ as $319e236875307eab$export$a9b970dcc4ae71a9 } from "../../LiveAnnouncer-D8h-3GrG.js";
22
+ import { $ as $5e3802645cc19319$export$1c3ebcada18427bf } from "../../ariaHideOutside-BzxkODNq.js";
23
+ import { b as $ea8dcbcb9ea1b556$export$9a302a45f65d0572 } from "../../usePress-CY8MpqYD.js";
24
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-JaBafrnV.js";
25
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-CVIIVTgz.js";
26
+ import { $ as $168583247155ddda$export$dc9c12ed27dd1b49 } from "../../useMenuTrigger-CMgzyMKW.js";
27
+ import { _ as __ } from "../../default-i18n-BqWys-1G.js";
16
28
  import { icons } from "../../icons/icons.js";
17
29
  import { c as clsx } from "../../lite-DVmmD_-j.js";
18
30
  import { Spacer } from "../spacer/spacer.js";
19
- import { T as Tooltip } from "../../tooltip-DSk8I1SO.js";
20
31
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
21
32
  import { BaseControl } from "../base-control/base-control.js";
22
33
  import { RichLabel } from "../rich-label/rich-label.js";
23
- import { Popover } from "../popover/popover.js";
24
- import { a as $0d86e9c8f07f9a7b$export$79c0c687a5963b0a } from "../../useListData-BpYQj7kK.js";
25
- var $03c9a1a10de12f06$exports = {};
26
- $03c9a1a10de12f06$exports = {
27
- "Clear search": `مسح البحث`
34
+ import { $ as $0d86e9c8f07f9a7b$export$79c0c687a5963b0a } from "../../useListData-B5Pk32vd.js";
35
+ function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
36
+ let collator = $325a3faab7a68acd$export$a16aca283550c30d({
37
+ usage: "search",
38
+ ...options
39
+ });
40
+ let startsWith = useCallback((string, substring) => {
41
+ if (substring.length === 0) return true;
42
+ string = string.normalize("NFC");
43
+ substring = substring.normalize("NFC");
44
+ return collator.compare(string.slice(0, substring.length), substring) === 0;
45
+ }, [
46
+ collator
47
+ ]);
48
+ let endsWith = useCallback((string, substring) => {
49
+ if (substring.length === 0) return true;
50
+ string = string.normalize("NFC");
51
+ substring = substring.normalize("NFC");
52
+ return collator.compare(string.slice(-substring.length), substring) === 0;
53
+ }, [
54
+ collator
55
+ ]);
56
+ let contains = useCallback((string, substring) => {
57
+ if (substring.length === 0) return true;
58
+ string = string.normalize("NFC");
59
+ substring = substring.normalize("NFC");
60
+ let scan = 0;
61
+ let sliceLen = substring.length;
62
+ for (; scan + sliceLen <= string.length; scan++) {
63
+ let slice = string.slice(scan, scan + sliceLen);
64
+ if (collator.compare(substring, slice) === 0) return true;
65
+ }
66
+ return false;
67
+ }, [
68
+ collator
69
+ ]);
70
+ return useMemo(() => ({
71
+ startsWith,
72
+ endsWith,
73
+ contains
74
+ }), [
75
+ startsWith,
76
+ endsWith,
77
+ contains
78
+ ]);
79
+ }
80
+ var $02cb4c75c506befe$exports = {};
81
+ $02cb4c75c506befe$exports = {
82
+ "buttonLabel": `عرض المقترحات`,
83
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
84
+ one: () => `${formatter.number(args.optionCount)} خيار`,
85
+ other: () => `${formatter.number(args.optionCount)} خيارات`
86
+ })} متاحة.`,
87
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
88
+ true: () => `المجموعة المدخلة ${args.groupTitle}, مع ${formatter.plural(args.groupCount, {
89
+ one: () => `${formatter.number(args.groupCount)} خيار`,
90
+ other: () => `${formatter.number(args.groupCount)} خيارات`
91
+ })}. `,
92
+ other: ``
93
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
94
+ true: `, محدد`,
95
+ other: ``
96
+ }, args.isSelected)}`,
97
+ "listboxLabel": `مقترحات`,
98
+ "selectedAnnouncement": (args) => `${args.optionText}، محدد`
99
+ };
100
+ var $568b8163f1e56faf$exports = {};
101
+ $568b8163f1e56faf$exports = {
102
+ "buttonLabel": `Покажи предложения`,
103
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
104
+ one: () => `${formatter.number(args.optionCount)} опция`,
105
+ other: () => `${formatter.number(args.optionCount)} опции`
106
+ })} на разположение.`,
107
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
108
+ true: () => `Въведена група ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
109
+ one: () => `${formatter.number(args.groupCount)} опция`,
110
+ other: () => `${formatter.number(args.groupCount)} опции`
111
+ })}. `,
112
+ other: ``
113
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
114
+ true: `, избрани`,
115
+ other: ``
116
+ }, args.isSelected)}`,
117
+ "listboxLabel": `Предложения`,
118
+ "selectedAnnouncement": (args) => `${args.optionText}, избрани`
119
+ };
120
+ var $87581c0202d106b8$exports = {};
121
+ $87581c0202d106b8$exports = {
122
+ "buttonLabel": `Zobrazit doporučení`,
123
+ "countAnnouncement": (args, formatter) => `K dispozici ${formatter.plural(args.optionCount, {
124
+ one: () => `je ${formatter.number(args.optionCount)} možnost`,
125
+ other: () => `jsou/je ${formatter.number(args.optionCount)} možnosti/-í`
126
+ })}.`,
127
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
128
+ true: () => `Zadaná skupina „${args.groupTitle}“ ${formatter.plural(args.groupCount, {
129
+ one: () => `s ${formatter.number(args.groupCount)} možností`,
130
+ other: () => `se ${formatter.number(args.groupCount)} možnostmi`
131
+ })}. `,
132
+ other: ``
133
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
134
+ true: ` (vybráno)`,
135
+ other: ``
136
+ }, args.isSelected)}`,
137
+ "listboxLabel": `Návrhy`,
138
+ "selectedAnnouncement": (args) => `${args.optionText}, vybráno`
139
+ };
140
+ var $a10a0369f5433ed1$exports = {};
141
+ $a10a0369f5433ed1$exports = {
142
+ "buttonLabel": `Vis forslag`,
143
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
144
+ one: () => `${formatter.number(args.optionCount)} mulighed tilgængelig`,
145
+ other: () => `${formatter.number(args.optionCount)} muligheder tilgængelige`
146
+ })}.`,
147
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
148
+ true: () => `Angivet gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
149
+ one: () => `${formatter.number(args.groupCount)} mulighed`,
150
+ other: () => `${formatter.number(args.groupCount)} muligheder`
151
+ })}. `,
152
+ other: ``
153
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
154
+ true: `, valgt`,
155
+ other: ``
156
+ }, args.isSelected)}`,
157
+ "listboxLabel": `Forslag`,
158
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
159
+ };
160
+ var $bfd288727d5cb166$exports = {};
161
+ $bfd288727d5cb166$exports = {
162
+ "buttonLabel": `Empfehlungen anzeigen`,
163
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
164
+ one: () => `${formatter.number(args.optionCount)} Option`,
165
+ other: () => `${formatter.number(args.optionCount)} Optionen`
166
+ })} verfügbar.`,
167
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
168
+ true: () => `Eingetretene Gruppe ${args.groupTitle}, mit ${formatter.plural(args.groupCount, {
169
+ one: () => `${formatter.number(args.groupCount)} Option`,
170
+ other: () => `${formatter.number(args.groupCount)} Optionen`
171
+ })}. `,
172
+ other: ``
173
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
174
+ true: `, ausgewählt`,
175
+ other: ``
176
+ }, args.isSelected)}`,
177
+ "listboxLabel": `Empfehlungen`,
178
+ "selectedAnnouncement": (args) => `${args.optionText}, ausgewählt`
179
+ };
180
+ var $ca177778f9a74e3c$exports = {};
181
+ $ca177778f9a74e3c$exports = {
182
+ "buttonLabel": `Προβολή προτάσεων`,
183
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
184
+ one: () => `${formatter.number(args.optionCount)} επιλογή`,
185
+ other: () => `${formatter.number(args.optionCount)} επιλογές `
186
+ })} διαθέσιμες.`,
187
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
188
+ true: () => `Εισαγμένη ομάδα ${args.groupTitle}, με ${formatter.plural(args.groupCount, {
189
+ one: () => `${formatter.number(args.groupCount)} επιλογή`,
190
+ other: () => `${formatter.number(args.groupCount)} επιλογές`
191
+ })}. `,
192
+ other: ``
193
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
194
+ true: `, επιλεγμένο`,
195
+ other: ``
196
+ }, args.isSelected)}`,
197
+ "listboxLabel": `Προτάσεις`,
198
+ "selectedAnnouncement": (args) => `${args.optionText}, επιλέχθηκε`
199
+ };
200
+ var $9b5aa79ef84beb6c$exports = {};
201
+ $9b5aa79ef84beb6c$exports = {
202
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
203
+ true: () => `Entered group ${args.groupTitle}, with ${formatter.plural(args.groupCount, {
204
+ one: () => `${formatter.number(args.groupCount)} option`,
205
+ other: () => `${formatter.number(args.groupCount)} options`
206
+ })}. `,
207
+ other: ``
208
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
209
+ true: `, selected`,
210
+ other: ``
211
+ }, args.isSelected)}`,
212
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
213
+ one: () => `${formatter.number(args.optionCount)} option`,
214
+ other: () => `${formatter.number(args.optionCount)} options`
215
+ })} available.`,
216
+ "selectedAnnouncement": (args) => `${args.optionText}, selected`,
217
+ "buttonLabel": `Show suggestions`,
218
+ "listboxLabel": `Suggestions`
219
+ };
220
+ var $57968e8209de2557$exports = {};
221
+ $57968e8209de2557$exports = {
222
+ "buttonLabel": `Mostrar sugerencias`,
223
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
224
+ one: () => `${formatter.number(args.optionCount)} opción`,
225
+ other: () => `${formatter.number(args.optionCount)} opciones`
226
+ })} disponible(s).`,
227
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
228
+ true: () => `Se ha unido al grupo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
229
+ one: () => `${formatter.number(args.groupCount)} opción`,
230
+ other: () => `${formatter.number(args.groupCount)} opciones`
231
+ })}. `,
232
+ other: ``
233
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
234
+ true: `, seleccionado`,
235
+ other: ``
236
+ }, args.isSelected)}`,
237
+ "listboxLabel": `Sugerencias`,
238
+ "selectedAnnouncement": (args) => `${args.optionText}, seleccionado`
239
+ };
240
+ var $60690790bf4c1c6a$exports = {};
241
+ $60690790bf4c1c6a$exports = {
242
+ "buttonLabel": `Kuva soovitused`,
243
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
244
+ one: () => `${formatter.number(args.optionCount)} valik`,
245
+ other: () => `${formatter.number(args.optionCount)} valikud`
246
+ })} saadaval.`,
247
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
248
+ true: () => `Sisestatud rühm ${args.groupTitle}, valikuga ${formatter.plural(args.groupCount, {
249
+ one: () => `${formatter.number(args.groupCount)} valik`,
250
+ other: () => `${formatter.number(args.groupCount)} valikud`
251
+ })}. `,
252
+ other: ``
253
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
254
+ true: `, valitud`,
255
+ other: ``
256
+ }, args.isSelected)}`,
257
+ "listboxLabel": `Soovitused`,
258
+ "selectedAnnouncement": (args) => `${args.optionText}, valitud`
259
+ };
260
+ var $1101246e8c7d9357$exports = {};
261
+ $1101246e8c7d9357$exports = {
262
+ "buttonLabel": `Näytä ehdotukset`,
263
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
264
+ one: () => `${formatter.number(args.optionCount)} vaihtoehto`,
265
+ other: () => `${formatter.number(args.optionCount)} vaihtoehdot`
266
+ })} saatavilla.`,
267
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
268
+ true: () => `Mentiin ryhmään ${args.groupTitle}, ${formatter.plural(args.groupCount, {
269
+ one: () => `${formatter.number(args.groupCount)} vaihtoehdon`,
270
+ other: () => `${formatter.number(args.groupCount)} vaihtoehdon`
271
+ })} kanssa.`,
272
+ other: ``
273
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
274
+ true: `, valittu`,
275
+ other: ``
276
+ }, args.isSelected)}`,
277
+ "listboxLabel": `Ehdotukset`,
278
+ "selectedAnnouncement": (args) => `${args.optionText}, valittu`
279
+ };
280
+ var $6404b5cb5b241730$exports = {};
281
+ $6404b5cb5b241730$exports = {
282
+ "buttonLabel": `Afficher les suggestions`,
283
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
284
+ one: () => `${formatter.number(args.optionCount)} option`,
285
+ other: () => `${formatter.number(args.optionCount)} options`
286
+ })} disponible(s).`,
287
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
288
+ true: () => `Groupe ${args.groupTitle} rejoint, avec ${formatter.plural(args.groupCount, {
289
+ one: () => `${formatter.number(args.groupCount)} option`,
290
+ other: () => `${formatter.number(args.groupCount)} options`
291
+ })}. `,
292
+ other: ``
293
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
294
+ true: `, sélectionné(s)`,
295
+ other: ``
296
+ }, args.isSelected)}`,
297
+ "listboxLabel": `Suggestions`,
298
+ "selectedAnnouncement": (args) => `${args.optionText}, sélectionné`
299
+ };
300
+ var $dfeafa702e92e31f$exports = {};
301
+ $dfeafa702e92e31f$exports = {
302
+ "buttonLabel": `הצג הצעות`,
303
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
304
+ one: () => `אפשרות ${formatter.number(args.optionCount)}`,
305
+ other: () => `${formatter.number(args.optionCount)} אפשרויות`
306
+ })} במצב זמין.`,
307
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
308
+ true: () => `נכנס לקבוצה ${args.groupTitle}, עם ${formatter.plural(args.groupCount, {
309
+ one: () => `אפשרות ${formatter.number(args.groupCount)}`,
310
+ other: () => `${formatter.number(args.groupCount)} אפשרויות`
311
+ })}. `,
312
+ other: ``
313
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
314
+ true: `, נבחר`,
315
+ other: ``
316
+ }, args.isSelected)}`,
317
+ "listboxLabel": `הצעות`,
318
+ "selectedAnnouncement": (args) => `${args.optionText}, נבחר`
319
+ };
320
+ var $2d125e0b34676352$exports = {};
321
+ $2d125e0b34676352$exports = {
322
+ "buttonLabel": `Prikaži prijedloge`,
323
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
324
+ one: () => `${formatter.number(args.optionCount)} opcija`,
325
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
326
+ })}.`,
327
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
328
+ true: () => `Unesena skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
329
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
330
+ other: () => `${formatter.number(args.groupCount)} opcije/a`
331
+ })}. `,
332
+ other: ``
333
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
334
+ true: `, odabranih`,
335
+ other: ``
336
+ }, args.isSelected)}`,
337
+ "listboxLabel": `Prijedlozi`,
338
+ "selectedAnnouncement": (args) => `${args.optionText}, odabrano`
339
+ };
340
+ var $ea029611d7634059$exports = {};
341
+ $ea029611d7634059$exports = {
342
+ "buttonLabel": `Javaslatok megjelenítése`,
343
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
344
+ one: () => `${formatter.number(args.optionCount)} lehetőség`,
345
+ other: () => `${formatter.number(args.optionCount)} lehetőség`
346
+ })} áll rendelkezésre.`,
347
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
348
+ true: () => `Belépett a(z) ${args.groupTitle} csoportba, amely ${formatter.plural(args.groupCount, {
349
+ one: () => `${formatter.number(args.groupCount)} lehetőséget`,
350
+ other: () => `${formatter.number(args.groupCount)} lehetőséget`
351
+ })} tartalmaz. `,
352
+ other: ``
353
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
354
+ true: `, kijelölve`,
355
+ other: ``
356
+ }, args.isSelected)}`,
357
+ "listboxLabel": `Javaslatok`,
358
+ "selectedAnnouncement": (args) => `${args.optionText}, kijelölve`
359
+ };
360
+ var $77f075bb86ad7091$exports = {};
361
+ $77f075bb86ad7091$exports = {
362
+ "buttonLabel": `Mostra suggerimenti`,
363
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
364
+ one: () => `${formatter.number(args.optionCount)} opzione disponibile`,
365
+ other: () => `${formatter.number(args.optionCount)} opzioni disponibili`
366
+ })}.`,
367
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
368
+ true: () => `Ingresso nel gruppo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
369
+ one: () => `${formatter.number(args.groupCount)} opzione`,
370
+ other: () => `${formatter.number(args.groupCount)} opzioni`
371
+ })}. `,
372
+ other: ``
373
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
374
+ true: `, selezionato`,
375
+ other: ``
376
+ }, args.isSelected)}`,
377
+ "listboxLabel": `Suggerimenti`,
378
+ "selectedAnnouncement": (args) => `${args.optionText}, selezionato`
379
+ };
380
+ var $6e87462e84907983$exports = {};
381
+ $6e87462e84907983$exports = {
382
+ "buttonLabel": `候補を表示`,
383
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
384
+ one: () => `${formatter.number(args.optionCount)} 個のオプション`,
385
+ other: () => `${formatter.number(args.optionCount)} 個のオプション`
386
+ })}を利用できます。`,
387
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
388
+ true: () => `入力されたグループ ${args.groupTitle}、${formatter.plural(args.groupCount, {
389
+ one: () => `${formatter.number(args.groupCount)} 個のオプション`,
390
+ other: () => `${formatter.number(args.groupCount)} 個のオプション`
391
+ })}を含む。`,
392
+ other: ``
393
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
394
+ true: `、選択済み`,
395
+ other: ``
396
+ }, args.isSelected)}`,
397
+ "listboxLabel": `候補`,
398
+ "selectedAnnouncement": (args) => `${args.optionText}、選択済み`
399
+ };
400
+ var $9246f2c6edc6b232$exports = {};
401
+ $9246f2c6edc6b232$exports = {
402
+ "buttonLabel": `제안 사항 표시`,
403
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
404
+ one: () => `${formatter.number(args.optionCount)}개 옵션`,
405
+ other: () => `${formatter.number(args.optionCount)}개 옵션`
406
+ })}을 사용할 수 있습니다.`,
407
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
408
+ true: () => `입력한 그룹 ${args.groupTitle}, ${formatter.plural(args.groupCount, {
409
+ one: () => `${formatter.number(args.groupCount)}개 옵션`,
410
+ other: () => `${formatter.number(args.groupCount)}개 옵션`
411
+ })}. `,
412
+ other: ``
413
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
414
+ true: `, 선택됨`,
415
+ other: ``
416
+ }, args.isSelected)}`,
417
+ "listboxLabel": `제안`,
418
+ "selectedAnnouncement": (args) => `${args.optionText}, 선택됨`
419
+ };
420
+ var $e587accc6c0a434c$exports = {};
421
+ $e587accc6c0a434c$exports = {
422
+ "buttonLabel": `Rodyti pasiūlymus`,
423
+ "countAnnouncement": (args, formatter) => `Yra ${formatter.plural(args.optionCount, {
424
+ one: () => `${formatter.number(args.optionCount)} parinktis`,
425
+ other: () => `${formatter.number(args.optionCount)} parinktys (-ių)`
426
+ })}.`,
427
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
428
+ true: () => `Įvesta grupė ${args.groupTitle}, su ${formatter.plural(args.groupCount, {
429
+ one: () => `${formatter.number(args.groupCount)} parinktimi`,
430
+ other: () => `${formatter.number(args.groupCount)} parinktimis (-ių)`
431
+ })}. `,
432
+ other: ``
433
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
434
+ true: `, pasirinkta`,
435
+ other: ``
436
+ }, args.isSelected)}`,
437
+ "listboxLabel": `Pasiūlymai`,
438
+ "selectedAnnouncement": (args) => `${args.optionText}, pasirinkta`
439
+ };
440
+ var $03a1900e7400b5ab$exports = {};
441
+ $03a1900e7400b5ab$exports = {
442
+ "buttonLabel": `Rādīt ieteikumus`,
443
+ "countAnnouncement": (args, formatter) => `Pieejamo opciju skaits: ${formatter.plural(args.optionCount, {
444
+ one: () => `${formatter.number(args.optionCount)} opcija`,
445
+ other: () => `${formatter.number(args.optionCount)} opcijas`
446
+ })}.`,
447
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
448
+ true: () => `Ievadīta grupa ${args.groupTitle}, ar ${formatter.plural(args.groupCount, {
449
+ one: () => `${formatter.number(args.groupCount)} opciju`,
450
+ other: () => `${formatter.number(args.groupCount)} opcijām`
451
+ })}. `,
452
+ other: ``
453
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
454
+ true: `, atlasīta`,
455
+ other: ``
456
+ }, args.isSelected)}`,
457
+ "listboxLabel": `Ieteikumi`,
458
+ "selectedAnnouncement": (args) => `${args.optionText}, atlasīta`
459
+ };
460
+ var $1387676441be6cf6$exports = {};
461
+ $1387676441be6cf6$exports = {
462
+ "buttonLabel": `Vis forslag`,
463
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
464
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
465
+ other: () => `${formatter.number(args.optionCount)} alternativer`
466
+ })} finnes.`,
467
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
468
+ true: () => `Angitt gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
469
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
470
+ other: () => `${formatter.number(args.groupCount)} alternativer`
471
+ })}. `,
472
+ other: ``
473
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
474
+ true: `, valgt`,
475
+ other: ``
476
+ }, args.isSelected)}`,
477
+ "listboxLabel": `Forslag`,
478
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
28
479
  };
29
- var $4da0c2ffa4ba4159$exports = {};
30
- $4da0c2ffa4ba4159$exports = {
31
- "Clear search": `Изчистване на търсене`
480
+ var $17e82ebf0f8ab91f$exports = {};
481
+ $17e82ebf0f8ab91f$exports = {
482
+ "buttonLabel": `Suggesties weergeven`,
483
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
484
+ one: () => `${formatter.number(args.optionCount)} optie`,
485
+ other: () => `${formatter.number(args.optionCount)} opties`
486
+ })} beschikbaar.`,
487
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
488
+ true: () => `Groep ${args.groupTitle} ingevoerd met ${formatter.plural(args.groupCount, {
489
+ one: () => `${formatter.number(args.groupCount)} optie`,
490
+ other: () => `${formatter.number(args.groupCount)} opties`
491
+ })}. `,
492
+ other: ``
493
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
494
+ true: `, geselecteerd`,
495
+ other: ``
496
+ }, args.isSelected)}`,
497
+ "listboxLabel": `Suggesties`,
498
+ "selectedAnnouncement": (args) => `${args.optionText}, geselecteerd`
32
499
  };
33
- var $8c59fd0c2c96821b$exports = {};
34
- $8c59fd0c2c96821b$exports = {
35
- "Clear search": `Vymazat hledání`
500
+ var $2f5377d3471630e5$exports = {};
501
+ $2f5377d3471630e5$exports = {
502
+ "buttonLabel": `Wyświetlaj sugestie`,
503
+ "countAnnouncement": (args, formatter) => `dostępna/dostępne(-nych) ${formatter.plural(args.optionCount, {
504
+ one: () => `${formatter.number(args.optionCount)} opcja`,
505
+ other: () => `${formatter.number(args.optionCount)} opcje(-i)`
506
+ })}.`,
507
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
508
+ true: () => `Dołączono do grupy ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
509
+ one: () => `${formatter.number(args.groupCount)} opcją`,
510
+ other: () => `${formatter.number(args.groupCount)} opcjami`
511
+ })}. `,
512
+ other: ``
513
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
514
+ true: `, wybrano`,
515
+ other: ``
516
+ }, args.isSelected)}`,
517
+ "listboxLabel": `Sugestie`,
518
+ "selectedAnnouncement": (args) => `${args.optionText}, wybrano`
36
519
  };
37
- var $0a371f9c1df8120f$exports = {};
38
- $0a371f9c1df8120f$exports = {
39
- "Clear search": `Ryd søgning`
520
+ var $dee9868b6fa95ffe$exports = {};
521
+ $dee9868b6fa95ffe$exports = {
522
+ "buttonLabel": `Mostrar sugestões`,
523
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
524
+ one: () => `${formatter.number(args.optionCount)} opção`,
525
+ other: () => `${formatter.number(args.optionCount)} opções`
526
+ })} disponível.`,
527
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
528
+ true: () => `Grupo inserido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
529
+ one: () => `${formatter.number(args.groupCount)} opção`,
530
+ other: () => `${formatter.number(args.groupCount)} opções`
531
+ })}. `,
532
+ other: ``
533
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
534
+ true: `, selecionado`,
535
+ other: ``
536
+ }, args.isSelected)}`,
537
+ "listboxLabel": `Sugestões`,
538
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
40
539
  };
41
- var $67f4d0b0de9f8a52$exports = {};
42
- $67f4d0b0de9f8a52$exports = {
43
- "Clear search": `Suche zurücksetzen`
540
+ var $f8b2e63637cbb5a6$exports = {};
541
+ $f8b2e63637cbb5a6$exports = {
542
+ "buttonLabel": `Apresentar sugestões`,
543
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
544
+ one: () => `${formatter.number(args.optionCount)} opção`,
545
+ other: () => `${formatter.number(args.optionCount)} opções`
546
+ })} disponível.`,
547
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
548
+ true: () => `Grupo introduzido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
549
+ one: () => `${formatter.number(args.groupCount)} opção`,
550
+ other: () => `${formatter.number(args.groupCount)} opções`
551
+ })}. `,
552
+ other: ``
553
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
554
+ true: `, selecionado`,
555
+ other: ``
556
+ }, args.isSelected)}`,
557
+ "listboxLabel": `Sugestões`,
558
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
44
559
  };
45
- var $72a312d948f0214b$exports = {};
46
- $72a312d948f0214b$exports = {
47
- "Clear search": `Απαλοιφή αναζήτησης`
560
+ var $46a885db3b44ea95$exports = {};
561
+ $46a885db3b44ea95$exports = {
562
+ "buttonLabel": `Afișare sugestii`,
563
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
564
+ one: () => `${formatter.number(args.optionCount)} opțiune`,
565
+ other: () => `${formatter.number(args.optionCount)} opțiuni`
566
+ })} disponibile.`,
567
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
568
+ true: () => `Grup ${args.groupTitle} introdus, cu ${formatter.plural(args.groupCount, {
569
+ one: () => `${formatter.number(args.groupCount)} opțiune`,
570
+ other: () => `${formatter.number(args.groupCount)} opțiuni`
571
+ })}. `,
572
+ other: ``
573
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
574
+ true: `, selectat`,
575
+ other: ``
576
+ }, args.isSelected)}`,
577
+ "listboxLabel": `Sugestii`,
578
+ "selectedAnnouncement": (args) => `${args.optionText}, selectat`
48
579
  };
49
- var $5012d21d933388c1$exports = {};
50
- $5012d21d933388c1$exports = {
51
- "Clear search": `Clear search`
580
+ var $50d8a8f0afa9dee5$exports = {};
581
+ $50d8a8f0afa9dee5$exports = {
582
+ "buttonLabel": `Показать предложения`,
583
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
584
+ one: () => `${formatter.number(args.optionCount)} параметр`,
585
+ other: () => `${formatter.number(args.optionCount)} параметров`
586
+ })} доступно.`,
587
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
588
+ true: () => `Введенная группа ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
589
+ one: () => `${formatter.number(args.groupCount)} параметром`,
590
+ other: () => `${formatter.number(args.groupCount)} параметрами`
591
+ })}. `,
592
+ other: ``
593
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
594
+ true: `, выбранными`,
595
+ other: ``
596
+ }, args.isSelected)}`,
597
+ "listboxLabel": `Предложения`,
598
+ "selectedAnnouncement": (args) => `${args.optionText}, выбрано`
52
599
  };
53
- var $0159854399308e2e$exports = {};
54
- $0159854399308e2e$exports = {
55
- "Clear search": `Borrar búsqueda`
600
+ var $2867ee6173245507$exports = {};
601
+ $2867ee6173245507$exports = {
602
+ "buttonLabel": `Zobraziť návrhy`,
603
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
604
+ one: () => `${formatter.number(args.optionCount)} možnosť`,
605
+ other: () => `${formatter.number(args.optionCount)} možnosti/-í`
606
+ })} k dispozícii.`,
607
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
608
+ true: () => `Zadaná skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
609
+ one: () => `${formatter.number(args.groupCount)} možnosťou`,
610
+ other: () => `${formatter.number(args.groupCount)} možnosťami`
611
+ })}. `,
612
+ other: ``
613
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
614
+ true: `, vybraté`,
615
+ other: ``
616
+ }, args.isSelected)}`,
617
+ "listboxLabel": `Návrhy`,
618
+ "selectedAnnouncement": (args) => `${args.optionText}, vybraté`
56
619
  };
57
- var $390613981d970276$exports = {};
58
- $390613981d970276$exports = {
59
- "Clear search": `Tühjenda otsing`
620
+ var $0631b65beeb09b50$exports = {};
621
+ $0631b65beeb09b50$exports = {
622
+ "buttonLabel": `Prikaži predloge`,
623
+ "countAnnouncement": (args, formatter) => `Na voljo je ${formatter.plural(args.optionCount, {
624
+ one: () => `${formatter.number(args.optionCount)} opcija`,
625
+ other: () => `${formatter.number(args.optionCount)} opcije`
626
+ })}.`,
627
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
628
+ true: () => `Vnesena skupina ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
629
+ one: () => `${formatter.number(args.groupCount)} opcija`,
630
+ other: () => `${formatter.number(args.groupCount)} opcije`
631
+ })}. `,
632
+ other: ``
633
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
634
+ true: `, izbrano`,
635
+ other: ``
636
+ }, args.isSelected)}`,
637
+ "listboxLabel": `Predlogi`,
638
+ "selectedAnnouncement": (args) => `${args.optionText}, izbrano`
60
639
  };
61
- var $961ae0833f811705$exports = {};
62
- $961ae0833f811705$exports = {
63
- "Clear search": `Tyhjennä haku`
64
- };
65
- var $26d76742decfd829$exports = {};
66
- $26d76742decfd829$exports = {
67
- "Clear search": `Effacer la recherche`
68
- };
69
- var $92ef254c82a5c769$exports = {};
70
- $92ef254c82a5c769$exports = {
71
- "Clear search": `נקה חיפוש`
72
- };
73
- var $e0321b43bdefb8b3$exports = {};
74
- $e0321b43bdefb8b3$exports = {
75
- "Clear search": `Obriši pretragu`
76
- };
77
- var $0c1ee0b8d50940d9$exports = {};
78
- $0c1ee0b8d50940d9$exports = {
79
- "Clear search": `Keresés törlése`
80
- };
81
- var $b09198915a38946f$exports = {};
82
- $b09198915a38946f$exports = {
83
- "Clear search": `Cancella ricerca`
84
- };
85
- var $3a9a3d180c3145c0$exports = {};
86
- $3a9a3d180c3145c0$exports = {
87
- "Clear search": `検索をクリア`
88
- };
89
- var $b7a611726449f4a3$exports = {};
90
- $b7a611726449f4a3$exports = {
91
- "Clear search": `검색 지우기`
92
- };
93
- var $d9a3d49db610dd5c$exports = {};
94
- $d9a3d49db610dd5c$exports = {
95
- "Clear search": `Išvalyti iešką`
96
- };
97
- var $3ab64b73ea27c23a$exports = {};
98
- $3ab64b73ea27c23a$exports = {
99
- "Clear search": `Notīrīt meklēšanu`
100
- };
101
- var $bf5cce1b47d23baf$exports = {};
102
- $bf5cce1b47d23baf$exports = {
103
- "Clear search": `Tøm søk`
104
- };
105
- var $4e0c9a9a010e4598$exports = {};
106
- $4e0c9a9a010e4598$exports = {
107
- "Clear search": `Zoekactie wissen`
108
- };
109
- var $63cf4a75ec270508$exports = {};
110
- $63cf4a75ec270508$exports = {
111
- "Clear search": `Wyczyść zawartość wyszukiwania`
112
- };
113
- var $083b0cad27fdbd06$exports = {};
114
- $083b0cad27fdbd06$exports = {
115
- "Clear search": `Limpar pesquisa`
116
- };
117
- var $1b7f0864d830ba6d$exports = {};
118
- $1b7f0864d830ba6d$exports = {
119
- "Clear search": `Limpar pesquisa`
120
- };
121
- var $d6d2588377fc9718$exports = {};
122
- $d6d2588377fc9718$exports = {
123
- "Clear search": `Ştergeţi căutarea`
124
- };
125
- var $701c918a4653e946$exports = {};
126
- $701c918a4653e946$exports = {
127
- "Clear search": `Очистить поиск`
128
- };
129
- var $7cacc29a1e5f4fbe$exports = {};
130
- $7cacc29a1e5f4fbe$exports = {
131
- "Clear search": `Vymazať vyhľadávanie`
132
- };
133
- var $c63231bcc300d0df$exports = {};
134
- $c63231bcc300d0df$exports = {
135
- "Clear search": `Počisti iskanje`
136
- };
137
- var $b61510478bc0e6f6$exports = {};
138
- $b61510478bc0e6f6$exports = {
139
- "Clear search": `Obriši pretragu`
140
- };
141
- var $ce325e6dd3f9c37a$exports = {};
142
- $ce325e6dd3f9c37a$exports = {
143
- "Clear search": `Rensa sökning`
144
- };
145
- var $1f7e1cf2285af2b2$exports = {};
146
- $1f7e1cf2285af2b2$exports = {
147
- "Clear search": `Aramayı temizle`
148
- };
149
- var $2d999353ca652e34$exports = {};
150
- $2d999353ca652e34$exports = {
151
- "Clear search": `Очистити пошук`
152
- };
153
- var $117b536bfb1ae554$exports = {};
154
- $117b536bfb1ae554$exports = {
155
- "Clear search": `清除搜索`
156
- };
157
- var $525f6fa4ac26e278$exports = {};
158
- $525f6fa4ac26e278$exports = {
159
- "Clear search": `清除搜尋條件`
160
- };
161
- var $8112f8b883c0272d$exports = {};
162
- $8112f8b883c0272d$exports = {
163
- "ar-AE": $03c9a1a10de12f06$exports,
164
- "bg-BG": $4da0c2ffa4ba4159$exports,
165
- "cs-CZ": $8c59fd0c2c96821b$exports,
166
- "da-DK": $0a371f9c1df8120f$exports,
167
- "de-DE": $67f4d0b0de9f8a52$exports,
168
- "el-GR": $72a312d948f0214b$exports,
169
- "en-US": $5012d21d933388c1$exports,
170
- "es-ES": $0159854399308e2e$exports,
171
- "et-EE": $390613981d970276$exports,
172
- "fi-FI": $961ae0833f811705$exports,
173
- "fr-FR": $26d76742decfd829$exports,
174
- "he-IL": $92ef254c82a5c769$exports,
175
- "hr-HR": $e0321b43bdefb8b3$exports,
176
- "hu-HU": $0c1ee0b8d50940d9$exports,
177
- "it-IT": $b09198915a38946f$exports,
178
- "ja-JP": $3a9a3d180c3145c0$exports,
179
- "ko-KR": $b7a611726449f4a3$exports,
180
- "lt-LT": $d9a3d49db610dd5c$exports,
181
- "lv-LV": $3ab64b73ea27c23a$exports,
182
- "nb-NO": $bf5cce1b47d23baf$exports,
183
- "nl-NL": $4e0c9a9a010e4598$exports,
184
- "pl-PL": $63cf4a75ec270508$exports,
185
- "pt-BR": $083b0cad27fdbd06$exports,
186
- "pt-PT": $1b7f0864d830ba6d$exports,
187
- "ro-RO": $d6d2588377fc9718$exports,
188
- "ru-RU": $701c918a4653e946$exports,
189
- "sk-SK": $7cacc29a1e5f4fbe$exports,
190
- "sl-SI": $c63231bcc300d0df$exports,
191
- "sr-SP": $b61510478bc0e6f6$exports,
192
- "sv-SE": $ce325e6dd3f9c37a$exports,
193
- "tr-TR": $1f7e1cf2285af2b2$exports,
194
- "uk-UA": $2d999353ca652e34$exports,
195
- "zh-CN": $117b536bfb1ae554$exports,
196
- "zh-TW": $525f6fa4ac26e278$exports
640
+ var $65fc749265dcd686$exports = {};
641
+ $65fc749265dcd686$exports = {
642
+ "buttonLabel": `Prikaži predloge`,
643
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
644
+ one: () => `${formatter.number(args.optionCount)} opcija`,
645
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
646
+ })}.`,
647
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
648
+ true: () => `Unesena grupa ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
649
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
650
+ other: () => `${formatter.number(args.groupCount)} optione/a`
651
+ })}. `,
652
+ other: ``
653
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
654
+ true: `, izabranih`,
655
+ other: ``
656
+ }, args.isSelected)}`,
657
+ "listboxLabel": `Predlozi`,
658
+ "selectedAnnouncement": (args) => `${args.optionText}, izabrano`
659
+ };
660
+ var $69ba655c7853c08e$exports = {};
661
+ $69ba655c7853c08e$exports = {
662
+ "buttonLabel": `Visa förslag`,
663
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
664
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
665
+ other: () => `${formatter.number(args.optionCount)} alternativ`
666
+ })} tillgängliga.`,
667
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
668
+ true: () => `Ingick i gruppen ${args.groupTitle} med ${formatter.plural(args.groupCount, {
669
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
670
+ other: () => `${formatter.number(args.groupCount)} alternativ`
671
+ })}. `,
672
+ other: ``
673
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
674
+ true: `, valda`,
675
+ other: ``
676
+ }, args.isSelected)}`,
677
+ "listboxLabel": `Förslag`,
678
+ "selectedAnnouncement": (args) => `${args.optionText}, valda`
679
+ };
680
+ var $a79794784d61577c$exports = {};
681
+ $a79794784d61577c$exports = {
682
+ "buttonLabel": `Önerileri göster`,
683
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
684
+ one: () => `${formatter.number(args.optionCount)} seçenek`,
685
+ other: () => `${formatter.number(args.optionCount)} seçenekler`
686
+ })} kullanılabilir.`,
687
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
688
+ true: () => `Girilen grup ${args.groupTitle}, ile ${formatter.plural(args.groupCount, {
689
+ one: () => `${formatter.number(args.groupCount)} seçenek`,
690
+ other: () => `${formatter.number(args.groupCount)} seçenekler`
691
+ })}. `,
692
+ other: ``
693
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
694
+ true: `, seçildi`,
695
+ other: ``
696
+ }, args.isSelected)}`,
697
+ "listboxLabel": `Öneriler`,
698
+ "selectedAnnouncement": (args) => `${args.optionText}, seçildi`
699
+ };
700
+ var $c2845791417ebaf4$exports = {};
701
+ $c2845791417ebaf4$exports = {
702
+ "buttonLabel": `Показати пропозиції`,
703
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
704
+ one: () => `${formatter.number(args.optionCount)} параметр`,
705
+ other: () => `${formatter.number(args.optionCount)} параметри(-ів)`
706
+ })} доступно.`,
707
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
708
+ true: () => `Введена група ${args.groupTitle}, з ${formatter.plural(args.groupCount, {
709
+ one: () => `${formatter.number(args.groupCount)} параметр`,
710
+ other: () => `${formatter.number(args.groupCount)} параметри(-ів)`
711
+ })}. `,
712
+ other: ``
713
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
714
+ true: `, вибрано`,
715
+ other: ``
716
+ }, args.isSelected)}`,
717
+ "listboxLabel": `Пропозиції`,
718
+ "selectedAnnouncement": (args) => `${args.optionText}, вибрано`
719
+ };
720
+ var $29b642d0025cc7a4$exports = {};
721
+ $29b642d0025cc7a4$exports = {
722
+ "buttonLabel": `显示建议`,
723
+ "countAnnouncement": (args, formatter) => `有 ${formatter.plural(args.optionCount, {
724
+ one: () => `${formatter.number(args.optionCount)} 个选项`,
725
+ other: () => `${formatter.number(args.optionCount)} 个选项`
726
+ })}可用。`,
727
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
728
+ true: () => `进入了 ${args.groupTitle} 组,其中有 ${formatter.plural(args.groupCount, {
729
+ one: () => `${formatter.number(args.groupCount)} 个选项`,
730
+ other: () => `${formatter.number(args.groupCount)} 个选项`
731
+ })}. `,
732
+ other: ``
733
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
734
+ true: `, 已选择`,
735
+ other: ``
736
+ }, args.isSelected)}`,
737
+ "listboxLabel": `建议`,
738
+ "selectedAnnouncement": (args) => `${args.optionText}, 已选择`
739
+ };
740
+ var $cd36dd33f9d46936$exports = {};
741
+ $cd36dd33f9d46936$exports = {
742
+ "buttonLabel": `顯示建議`,
743
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
744
+ one: () => `${formatter.number(args.optionCount)} 選項`,
745
+ other: () => `${formatter.number(args.optionCount)} 選項`
746
+ })} 可用。`,
747
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
748
+ true: () => `輸入的群組 ${args.groupTitle}, 有 ${formatter.plural(args.groupCount, {
749
+ one: () => `${formatter.number(args.groupCount)} 選項`,
750
+ other: () => `${formatter.number(args.groupCount)} 選項`
751
+ })}. `,
752
+ other: ``
753
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
754
+ true: `, 已選取`,
755
+ other: ``
756
+ }, args.isSelected)}`,
757
+ "listboxLabel": `建議`,
758
+ "selectedAnnouncement": (args) => `${args.optionText}, 已選取`
759
+ };
760
+ var $de5926a92e8ebc5b$exports = {};
761
+ $de5926a92e8ebc5b$exports = {
762
+ "ar-AE": $02cb4c75c506befe$exports,
763
+ "bg-BG": $568b8163f1e56faf$exports,
764
+ "cs-CZ": $87581c0202d106b8$exports,
765
+ "da-DK": $a10a0369f5433ed1$exports,
766
+ "de-DE": $bfd288727d5cb166$exports,
767
+ "el-GR": $ca177778f9a74e3c$exports,
768
+ "en-US": $9b5aa79ef84beb6c$exports,
769
+ "es-ES": $57968e8209de2557$exports,
770
+ "et-EE": $60690790bf4c1c6a$exports,
771
+ "fi-FI": $1101246e8c7d9357$exports,
772
+ "fr-FR": $6404b5cb5b241730$exports,
773
+ "he-IL": $dfeafa702e92e31f$exports,
774
+ "hr-HR": $2d125e0b34676352$exports,
775
+ "hu-HU": $ea029611d7634059$exports,
776
+ "it-IT": $77f075bb86ad7091$exports,
777
+ "ja-JP": $6e87462e84907983$exports,
778
+ "ko-KR": $9246f2c6edc6b232$exports,
779
+ "lt-LT": $e587accc6c0a434c$exports,
780
+ "lv-LV": $03a1900e7400b5ab$exports,
781
+ "nb-NO": $1387676441be6cf6$exports,
782
+ "nl-NL": $17e82ebf0f8ab91f$exports,
783
+ "pl-PL": $2f5377d3471630e5$exports,
784
+ "pt-BR": $dee9868b6fa95ffe$exports,
785
+ "pt-PT": $f8b2e63637cbb5a6$exports,
786
+ "ro-RO": $46a885db3b44ea95$exports,
787
+ "ru-RU": $50d8a8f0afa9dee5$exports,
788
+ "sk-SK": $2867ee6173245507$exports,
789
+ "sl-SI": $0631b65beeb09b50$exports,
790
+ "sr-SP": $65fc749265dcd686$exports,
791
+ "sv-SE": $69ba655c7853c08e$exports,
792
+ "tr-TR": $a79794784d61577c$exports,
793
+ "uk-UA": $c2845791417ebaf4$exports,
794
+ "zh-CN": $29b642d0025cc7a4$exports,
795
+ "zh-TW": $cd36dd33f9d46936$exports
197
796
  };
198
797
  function $parcel$interopDefault(a) {
199
798
  return a && a.__esModule ? a.default : a;
200
799
  }
201
- function $4d52238874b24f86$export$9bb30bbe003b82e0(props, state, inputRef) {
202
- let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($8112f8b883c0272d$exports), "@react-aria/searchfield");
203
- let { isDisabled, isReadOnly, onSubmit = () => {
204
- }, onClear, type = "search" } = props;
800
+ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
801
+ let { buttonRef, popoverRef, inputRef, listBoxRef, keyboardDelegate, layoutDelegate, shouldFocusWrap, isReadOnly, isDisabled } = props;
802
+ let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($de5926a92e8ebc5b$exports), "@react-aria/combobox");
803
+ let { menuTriggerProps, menuProps } = $168583247155ddda$export$dc9c12ed27dd1b49({
804
+ type: "listbox",
805
+ isDisabled: isDisabled || isReadOnly
806
+ }, state, buttonRef);
807
+ $b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
808
+ id: menuProps.id
809
+ });
810
+ let { collection } = state;
811
+ let { disabledKeys } = state.selectionManager;
812
+ let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
813
+ collection,
814
+ disabledKeys,
815
+ ref: listBoxRef,
816
+ layoutDelegate
817
+ }), [
818
+ keyboardDelegate,
819
+ layoutDelegate,
820
+ collection,
821
+ disabledKeys,
822
+ listBoxRef
823
+ ]);
824
+ let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
825
+ selectionManager: state.selectionManager,
826
+ keyboardDelegate: delegate,
827
+ disallowTypeAhead: true,
828
+ disallowEmptySelection: true,
829
+ shouldFocusWrap,
830
+ ref: inputRef,
831
+ // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
832
+ isVirtualized: true
833
+ });
834
+ let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
205
835
  let onKeyDown = (e) => {
206
- const key = e.key;
207
- if (key === "Enter") e.preventDefault();
208
- if (isDisabled || isReadOnly) return;
209
- if (key === "Enter") onSubmit(state.value);
210
- if (key === "Escape") {
211
- if (state.value === "") e.continuePropagation();
212
- else {
213
- state.setValue("");
214
- if (onClear) onClear();
215
- }
836
+ if (e.nativeEvent.isComposing) return;
837
+ switch (e.key) {
838
+ case "Enter":
839
+ case "Tab":
840
+ if (state.isOpen && e.key === "Enter") e.preventDefault();
841
+ if (state.isOpen && state.selectionManager.focusedKey != null && state.selectionManager.isLink(state.selectionManager.focusedKey)) {
842
+ if (e.key === "Enter") {
843
+ let item = listBoxRef.current.querySelector(`[data-key="${CSS.escape(state.selectionManager.focusedKey.toString())}"]`);
844
+ if (item instanceof HTMLAnchorElement) {
845
+ let collectionItem = state.collection.getItem(state.selectionManager.focusedKey);
846
+ router.open(item, e, collectionItem.props.href, collectionItem.props.routerOptions);
847
+ }
848
+ }
849
+ state.close();
850
+ } else state.commit();
851
+ break;
852
+ case "Escape":
853
+ if (state.selectedKey !== null || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
854
+ state.revert();
855
+ break;
856
+ case "ArrowDown":
857
+ state.open("first", "manual");
858
+ break;
859
+ case "ArrowUp":
860
+ state.open("last", "manual");
861
+ break;
862
+ case "ArrowLeft":
863
+ case "ArrowRight":
864
+ state.selectionManager.setFocusedKey(null);
865
+ break;
216
866
  }
217
867
  };
218
- let onClearButtonClick = () => {
219
- state.setValue("");
220
- if (onClear) onClear();
868
+ let onBlur = (e) => {
869
+ var _popoverRef_current;
870
+ let blurFromButton = (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && buttonRef.current === e.relatedTarget;
871
+ let blurIntoPopover = (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(e.relatedTarget);
872
+ if (blurFromButton || blurIntoPopover) return;
873
+ if (props.onBlur) props.onBlur(e);
874
+ state.setFocused(false);
221
875
  };
222
- let onPressStart = () => {
223
- var _inputRef_current;
224
- (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
876
+ let onFocus = (e) => {
877
+ if (state.isFocused) return;
878
+ if (props.onFocus) props.onFocus(e);
879
+ state.setFocused(true);
225
880
  };
226
- let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $2d73ec29415bd339$export$712718f7aec83d5({
881
+ let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
882
+ let { labelProps, inputProps, descriptionProps, errorMessageProps } = $2d73ec29415bd339$export$712718f7aec83d5({
227
883
  ...props,
228
- value: state.value,
229
- onChange: state.setValue,
230
- onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(onKeyDown, props.onKeyDown) : props.onKeyDown,
231
- type
884
+ onChange: state.setInputValue,
885
+ onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown) : props.onKeyDown,
886
+ onBlur,
887
+ value: state.inputValue,
888
+ onFocus,
889
+ autoComplete: "off",
890
+ validate: void 0,
891
+ [$e5be200c675c3b3a$export$a763b9476acd3eb]: state
232
892
  }, inputRef);
893
+ let onPress = (e) => {
894
+ if (e.pointerType === "touch") {
895
+ inputRef.current.focus();
896
+ state.toggle(null, "manual");
897
+ }
898
+ };
899
+ let onPressStart = (e) => {
900
+ if (e.pointerType !== "touch") {
901
+ inputRef.current.focus();
902
+ state.toggle(e.pointerType === "keyboard" || e.pointerType === "virtual" ? "first" : null, "manual");
903
+ }
904
+ };
905
+ let triggerLabelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
906
+ id: menuTriggerProps.id,
907
+ "aria-label": stringFormatter.format("buttonLabel"),
908
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
909
+ });
910
+ let listBoxProps = $313b98861ee5dd6c$export$d6875122194c7b44({
911
+ id: menuProps.id,
912
+ "aria-label": stringFormatter.format("listboxLabel"),
913
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
914
+ });
915
+ let lastEventTime = useRef(0);
916
+ let onTouchEnd = (e) => {
917
+ if (isDisabled || isReadOnly) return;
918
+ if (e.timeStamp - lastEventTime.current < 500) {
919
+ e.preventDefault();
920
+ inputRef.current.focus();
921
+ return;
922
+ }
923
+ let rect = e.target.getBoundingClientRect();
924
+ let touch = e.changedTouches[0];
925
+ let centerX = Math.ceil(rect.left + 0.5 * rect.width);
926
+ let centerY = Math.ceil(rect.top + 0.5 * rect.height);
927
+ if (touch.clientX === centerX && touch.clientY === centerY) {
928
+ e.preventDefault();
929
+ inputRef.current.focus();
930
+ state.toggle(null, "manual");
931
+ lastEventTime.current = e.timeStamp;
932
+ }
933
+ };
934
+ let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : void 0;
935
+ var _focusedItem_parentKey;
936
+ let sectionKey = (_focusedItem_parentKey = focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) !== null && _focusedItem_parentKey !== void 0 ? _focusedItem_parentKey : null;
937
+ var _state_selectionManager_focusedKey;
938
+ let itemKey = (_state_selectionManager_focusedKey = state.selectionManager.focusedKey) !== null && _state_selectionManager_focusedKey !== void 0 ? _state_selectionManager_focusedKey : null;
939
+ let lastSection = useRef(sectionKey);
940
+ let lastItem = useRef(itemKey);
941
+ useEffect(() => {
942
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && focusedItem != null && itemKey !== lastItem.current) {
943
+ let isSelected = state.selectionManager.isSelected(itemKey);
944
+ let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
945
+ let sectionTitle = (section === null || section === void 0 ? void 0 : section["aria-label"]) || (typeof (section === null || section === void 0 ? void 0 : section.rendered) === "string" ? section.rendered : "") || "";
946
+ let announcement = stringFormatter.format("focusAnnouncement", {
947
+ isGroupChange: section && sectionKey !== lastSection.current,
948
+ groupTitle: sectionTitle,
949
+ groupCount: section ? [
950
+ ...$c5a24bc478652b5f$export$1005530eda016c13(section, state.collection)
951
+ ].length : 0,
952
+ optionText: focusedItem["aria-label"] || focusedItem.textValue || "",
953
+ isSelected
954
+ });
955
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
956
+ }
957
+ lastSection.current = sectionKey;
958
+ lastItem.current = itemKey;
959
+ });
960
+ let optionCount = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
961
+ let lastSize = useRef(optionCount);
962
+ let lastOpen = useRef(state.isOpen);
963
+ useEffect(() => {
964
+ let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || $c87311424ea30a05$export$e1865c3bedcd822b());
965
+ if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
966
+ let announcement = stringFormatter.format("countAnnouncement", {
967
+ optionCount
968
+ });
969
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
970
+ }
971
+ lastSize.current = optionCount;
972
+ lastOpen.current = state.isOpen;
973
+ });
974
+ let lastSelectedKey = useRef(state.selectedKey);
975
+ useEffect(() => {
976
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
977
+ let optionText = state.selectedItem["aria-label"] || state.selectedItem.textValue || "";
978
+ let announcement = stringFormatter.format("selectedAnnouncement", {
979
+ optionText
980
+ });
981
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
982
+ }
983
+ lastSelectedKey.current = state.selectedKey;
984
+ });
985
+ useEffect(() => {
986
+ if (state.isOpen) return $5e3802645cc19319$export$1c3ebcada18427bf([
987
+ inputRef.current,
988
+ popoverRef.current
989
+ ]);
990
+ }, [
991
+ state.isOpen,
992
+ inputRef,
993
+ popoverRef
994
+ ]);
233
995
  return {
234
996
  labelProps,
235
- inputProps: {
236
- ...inputProps,
237
- // already handled by useSearchFieldState
238
- defaultValue: void 0
239
- },
240
- clearButtonProps: {
241
- "aria-label": stringFormatter.format("Clear search"),
997
+ buttonProps: {
998
+ ...menuTriggerProps,
999
+ ...triggerLabelProps,
242
1000
  excludeFromTabOrder: true,
243
- // @ts-ignore
244
- preventFocusOnPress: true,
245
- isDisabled: isDisabled || isReadOnly,
246
- onPress: onClearButtonClick,
247
- onPressStart
1001
+ onPress,
1002
+ onPressStart,
1003
+ isDisabled: isDisabled || isReadOnly
248
1004
  },
1005
+ inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, {
1006
+ role: "combobox",
1007
+ "aria-expanded": menuTriggerProps["aria-expanded"],
1008
+ "aria-controls": state.isOpen ? menuProps.id : void 0,
1009
+ // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
1010
+ "aria-autocomplete": "list",
1011
+ "aria-activedescendant": focusedItem ? $b1f0cad8af73213b$export$9145995848b05025(state, focusedItem.key) : void 0,
1012
+ onTouchEnd,
1013
+ // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
1014
+ autoCorrect: "off",
1015
+ // This disable's the macOS Safari spell check auto corrections.
1016
+ spellCheck: "false"
1017
+ }),
1018
+ listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(menuProps, listBoxProps, {
1019
+ autoFocus: state.focusStrategy,
1020
+ shouldUseVirtualFocus: true,
1021
+ shouldSelectOnPressUp: true,
1022
+ shouldFocusOnHover: true,
1023
+ linkBehavior: "selection"
1024
+ }),
249
1025
  descriptionProps,
250
1026
  errorMessageProps,
251
- ...validation
1027
+ isInvalid,
1028
+ validationErrors,
1029
+ validationDetails
252
1030
  };
253
1031
  }
1032
+ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
1033
+ var _collection_getItem, _collection_getItem1;
1034
+ let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true } = props;
1035
+ let [showAllItems, setShowAllItems] = useState(false);
1036
+ let [isFocused, setFocusedState] = useState(false);
1037
+ let [focusStrategy, setFocusStrategy] = useState(null);
1038
+ let onSelectionChange = (key) => {
1039
+ if (props.onSelectionChange) props.onSelectionChange(key);
1040
+ if (key === selectedKey) {
1041
+ resetInputValue();
1042
+ closeMenu();
1043
+ }
1044
+ };
1045
+ var _props_items;
1046
+ let { collection, selectionManager, selectedKey, setSelectedKey, selectedItem, disabledKeys } = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
1047
+ ...props,
1048
+ onSelectionChange,
1049
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
1050
+ });
1051
+ var _props_defaultInputValue, _ref;
1052
+ let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.inputValue, (_ref = (_props_defaultInputValue = props.defaultInputValue) !== null && _props_defaultInputValue !== void 0 ? _props_defaultInputValue : (_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue) !== null && _ref !== void 0 ? _ref : "", props.onInputChange);
1053
+ let originalCollection = collection;
1054
+ let filteredCollection = useMemo(() => (
1055
+ // No default filter if items are controlled.
1056
+ props.items != null || !defaultFilter ? collection : $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, defaultFilter)
1057
+ ), [
1058
+ collection,
1059
+ inputValue,
1060
+ defaultFilter,
1061
+ props.items
1062
+ ]);
1063
+ let [lastCollection, setLastCollection] = useState(filteredCollection);
1064
+ let menuOpenTrigger = useRef("focus");
1065
+ let onOpenChange = (open2) => {
1066
+ if (props.onOpenChange) props.onOpenChange(open2, open2 ? menuOpenTrigger.current : void 0);
1067
+ selectionManager.setFocused(open2);
1068
+ if (!open2) selectionManager.setFocusedKey(null);
1069
+ };
1070
+ let triggerState = $fc909762b330b746$export$61c6a8c84e605fb6({
1071
+ ...props,
1072
+ onOpenChange,
1073
+ isOpen: void 0,
1074
+ defaultOpen: void 0
1075
+ });
1076
+ let open = (focusStrategy2 = null, trigger) => {
1077
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
1078
+ if (allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) {
1079
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
1080
+ setShowAllItems(true);
1081
+ menuOpenTrigger.current = trigger;
1082
+ setFocusStrategy(focusStrategy2);
1083
+ triggerState.open();
1084
+ }
1085
+ };
1086
+ let toggle = (focusStrategy2 = null, trigger) => {
1087
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
1088
+ if (!(allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) && !triggerState.isOpen) return;
1089
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
1090
+ setShowAllItems(true);
1091
+ if (!triggerState.isOpen) menuOpenTrigger.current = trigger;
1092
+ toggleMenu(focusStrategy2);
1093
+ };
1094
+ let updateLastCollection = useCallback(() => {
1095
+ setLastCollection(showAllItems ? originalCollection : filteredCollection);
1096
+ }, [
1097
+ showAllItems,
1098
+ originalCollection,
1099
+ filteredCollection
1100
+ ]);
1101
+ let toggleMenu = useCallback((focusStrategy2 = null) => {
1102
+ if (triggerState.isOpen) updateLastCollection();
1103
+ setFocusStrategy(focusStrategy2);
1104
+ triggerState.toggle();
1105
+ }, [
1106
+ triggerState,
1107
+ updateLastCollection
1108
+ ]);
1109
+ let closeMenu = useCallback(() => {
1110
+ if (triggerState.isOpen) {
1111
+ updateLastCollection();
1112
+ triggerState.close();
1113
+ }
1114
+ }, [
1115
+ triggerState,
1116
+ updateLastCollection
1117
+ ]);
1118
+ let [lastValue, setLastValue] = useState(inputValue);
1119
+ let resetInputValue = () => {
1120
+ var _collection_getItem2;
1121
+ var _collection_getItem_textValue2;
1122
+ let itemText = (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "";
1123
+ setLastValue(itemText);
1124
+ setInputValue(itemText);
1125
+ };
1126
+ var _props_selectedKey, _ref1;
1127
+ let lastSelectedKey = useRef((_ref1 = (_props_selectedKey = props.selectedKey) !== null && _props_selectedKey !== void 0 ? _props_selectedKey : props.defaultSelectedKey) !== null && _ref1 !== void 0 ? _ref1 : null);
1128
+ var _collection_getItem_textValue;
1129
+ let lastSelectedKeyText = useRef((_collection_getItem_textValue = (_collection_getItem1 = collection.getItem(selectedKey)) === null || _collection_getItem1 === void 0 ? void 0 : _collection_getItem1.textValue) !== null && _collection_getItem_textValue !== void 0 ? _collection_getItem_textValue : "");
1130
+ useEffect(() => {
1131
+ var _collection_getItem2;
1132
+ if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
1133
+ if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) closeMenu();
1134
+ if (selectedKey != null && selectedKey !== lastSelectedKey.current) closeMenu();
1135
+ if (inputValue !== lastValue) {
1136
+ selectionManager.setFocusedKey(null);
1137
+ setShowAllItems(false);
1138
+ if (inputValue === "" && (props.inputValue === void 0 || props.selectedKey === void 0)) setSelectedKey(null);
1139
+ }
1140
+ if (selectedKey !== lastSelectedKey.current && (props.inputValue === void 0 || props.selectedKey === void 0)) resetInputValue();
1141
+ else if (lastValue !== inputValue) setLastValue(inputValue);
1142
+ var _collection_getItem_textValue2;
1143
+ let selectedItemText = (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "";
1144
+ if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey === lastSelectedKey.current) {
1145
+ if (lastSelectedKeyText.current !== selectedItemText) {
1146
+ setLastValue(selectedItemText);
1147
+ setInputValue(selectedItemText);
1148
+ }
1149
+ }
1150
+ lastSelectedKey.current = selectedKey;
1151
+ lastSelectedKeyText.current = selectedItemText;
1152
+ });
1153
+ let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
1154
+ ...props,
1155
+ value: useMemo(() => ({
1156
+ inputValue,
1157
+ selectedKey
1158
+ }), [
1159
+ inputValue,
1160
+ selectedKey
1161
+ ])
1162
+ });
1163
+ let revert = () => {
1164
+ if (allowsCustomValue && selectedKey == null) commitCustomValue();
1165
+ else commitSelection();
1166
+ };
1167
+ let commitCustomValue = () => {
1168
+ lastSelectedKey.current = null;
1169
+ setSelectedKey(null);
1170
+ closeMenu();
1171
+ };
1172
+ let commitSelection = () => {
1173
+ if (props.selectedKey !== void 0 && props.inputValue !== void 0) {
1174
+ var _collection_getItem2;
1175
+ props.onSelectionChange(selectedKey);
1176
+ var _collection_getItem_textValue2;
1177
+ let itemText = (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "";
1178
+ setLastValue(itemText);
1179
+ closeMenu();
1180
+ } else {
1181
+ resetInputValue();
1182
+ closeMenu();
1183
+ }
1184
+ };
1185
+ const commitValue = () => {
1186
+ if (allowsCustomValue) {
1187
+ var _collection_getItem2;
1188
+ var _collection_getItem_textValue2;
1189
+ const itemText = (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "";
1190
+ inputValue === itemText ? commitSelection() : commitCustomValue();
1191
+ } else
1192
+ commitSelection();
1193
+ };
1194
+ let commit = () => {
1195
+ if (triggerState.isOpen && selectionManager.focusedKey != null) {
1196
+ if (selectedKey === selectionManager.focusedKey) commitSelection();
1197
+ else setSelectedKey(selectionManager.focusedKey);
1198
+ } else commitValue();
1199
+ };
1200
+ let valueOnFocus = useRef(inputValue);
1201
+ let setFocused = (isFocused2) => {
1202
+ if (isFocused2) {
1203
+ valueOnFocus.current = inputValue;
1204
+ if (menuTrigger === "focus" && !props.isReadOnly) open(null, "focus");
1205
+ } else {
1206
+ if (shouldCloseOnBlur) commitValue();
1207
+ if (inputValue !== valueOnFocus.current) validation.commitValidation();
1208
+ }
1209
+ setFocusedState(isFocused2);
1210
+ };
1211
+ let displayedCollection = useMemo(() => {
1212
+ if (triggerState.isOpen) {
1213
+ if (showAllItems) return originalCollection;
1214
+ else return filteredCollection;
1215
+ } else return lastCollection;
1216
+ }, [
1217
+ triggerState.isOpen,
1218
+ originalCollection,
1219
+ filteredCollection,
1220
+ showAllItems,
1221
+ lastCollection
1222
+ ]);
1223
+ return {
1224
+ ...validation,
1225
+ ...triggerState,
1226
+ focusStrategy,
1227
+ toggle,
1228
+ open,
1229
+ close: commitValue,
1230
+ selectionManager,
1231
+ selectedKey,
1232
+ setSelectedKey,
1233
+ disabledKeys,
1234
+ isFocused,
1235
+ setFocused,
1236
+ selectedItem,
1237
+ collection: displayedCollection,
1238
+ inputValue,
1239
+ setInputValue,
1240
+ commit,
1241
+ revert
1242
+ };
1243
+ }
1244
+ function $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, filter) {
1245
+ return new $a02d57049d202695$export$d085fb9e920b5ca7($a9e7382a7d111cb5$var$filterNodes(collection, collection, inputValue, filter));
1246
+ }
1247
+ function $a9e7382a7d111cb5$var$filterNodes(collection, nodes, inputValue, filter) {
1248
+ let filteredNode = [];
1249
+ for (let node of nodes) {
1250
+ if (node.type === "section" && node.hasChildNodes) {
1251
+ let filtered = $a9e7382a7d111cb5$var$filterNodes(collection, $c5a24bc478652b5f$export$1005530eda016c13(node, collection), inputValue, filter);
1252
+ if ([
1253
+ ...filtered
1254
+ ].some((node2) => node2.type === "item")) filteredNode.push({
1255
+ ...node,
1256
+ childNodes: filtered
1257
+ });
1258
+ } else if (node.type === "item" && filter(node.textValue, inputValue)) filteredNode.push({
1259
+ ...node
1260
+ });
1261
+ else if (node.type !== "item") filteredNode.push({
1262
+ ...node
1263
+ });
1264
+ }
1265
+ return filteredNode;
1266
+ }
254
1267
  function $f86e6c1ec7da6ebb$var$reducer(data, action) {
255
1268
  let selectedKeys;
256
1269
  switch (data.state) {
@@ -491,56 +1504,117 @@ function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
491
1504
  }
492
1505
  };
493
1506
  }
494
- function $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2(props) {
495
- let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715($0b2218c4e3fe7d7e$var$toString(props.value), $0b2218c4e3fe7d7e$var$toString(props.defaultValue) || "", props.onChange);
496
- return {
497
- value,
498
- setValue
499
- };
500
- }
501
- function $0b2218c4e3fe7d7e$var$toString(val) {
502
- if (val == null) return;
503
- return val.toString();
1507
+ const $d01f2c01039c0eec$export$d414ccceff7063c3 = /* @__PURE__ */ createContext(null);
1508
+ const $d01f2c01039c0eec$export$c02625b26074192c = /* @__PURE__ */ createContext(null);
1509
+ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
1510
+ [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d01f2c01039c0eec$export$d414ccceff7063c3);
1511
+ let { children, isDisabled = false, isInvalid = false, isRequired = false } = props;
1512
+ let content = useMemo(() => {
1513
+ var _props_items;
1514
+ return React__default.createElement($eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider, {
1515
+ value: {
1516
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
1517
+ }
1518
+ }, typeof children === "function" ? children({
1519
+ isOpen: false,
1520
+ isDisabled,
1521
+ isInvalid,
1522
+ isRequired,
1523
+ defaultChildren: null
1524
+ }) : children);
1525
+ }, [
1526
+ children,
1527
+ isDisabled,
1528
+ isInvalid,
1529
+ isRequired,
1530
+ props.items,
1531
+ props.defaultItems
1532
+ ]);
1533
+ return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
1534
+ content
1535
+ }, (collection) => /* @__PURE__ */ React__default.createElement($d01f2c01039c0eec$var$ComboBoxInner, {
1536
+ props,
1537
+ collection,
1538
+ comboBoxRef: ref
1539
+ }));
504
1540
  }
505
- const $440f4836bcb56932$export$d1c4e4c63cb03a11 = /* @__PURE__ */ createContext(null);
506
- function $440f4836bcb56932$var$SearchField(props, ref) {
507
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $440f4836bcb56932$export$d1c4e4c63cb03a11);
1541
+ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
1542
+ let { name, formValue = "key", allowsCustomValue } = props;
1543
+ if (allowsCustomValue) formValue = "text";
508
1544
  let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
509
1545
  var _props_validationBehavior, _ref;
510
1546
  let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
511
- let inputRef = useRef(null);
512
- let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
513
- let state = $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2({
1547
+ let { contains } = $bb77f239b46e8c72$export$3274cf84b703fff({
1548
+ sensitivity: "base"
1549
+ });
1550
+ let state = $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({
1551
+ defaultFilter: props.defaultFilter || contains,
514
1552
  ...props,
1553
+ // If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
1554
+ items: props.items,
1555
+ children: void 0,
1556
+ collection,
515
1557
  validationBehavior
516
1558
  });
517
- let { labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps, ...validation } = $4d52238874b24f86$export$9bb30bbe003b82e0({
1559
+ let buttonRef = useRef(null);
1560
+ let inputRef = useRef(null);
1561
+ let listBoxRef = useRef(null);
1562
+ let popoverRef = useRef(null);
1563
+ let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
1564
+ let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $c350ade66beef0af$export$8c18d1b4f7232bbf({
518
1565
  ...$64fa3d84918910a7$export$ef03459518577ad4(props),
519
1566
  label,
1567
+ inputRef,
1568
+ buttonRef,
1569
+ listBoxRef,
1570
+ popoverRef,
1571
+ name: formValue === "text" ? name : void 0,
520
1572
  validationBehavior
521
- }, state, inputRef);
1573
+ }, state);
1574
+ let [menuWidth, setMenuWidth] = useState(null);
1575
+ let onResize = useCallback(() => {
1576
+ if (inputRef.current) {
1577
+ var _buttonRef_current;
1578
+ let buttonRect = (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.getBoundingClientRect();
1579
+ let inputRect = inputRef.current.getBoundingClientRect();
1580
+ let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
1581
+ let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
1582
+ setMenuWidth(maxX - minX + "px");
1583
+ }
1584
+ }, [
1585
+ buttonRef,
1586
+ inputRef,
1587
+ setMenuWidth
1588
+ ]);
1589
+ $9daab02d461809db$export$683480f191c0e3ea({
1590
+ ref: inputRef,
1591
+ onResize
1592
+ });
1593
+ let renderPropsState = useMemo(() => ({
1594
+ isOpen: state.isOpen,
1595
+ isDisabled: props.isDisabled || false,
1596
+ isInvalid: validation.isInvalid || false,
1597
+ isRequired: props.isRequired || false
1598
+ }), [
1599
+ state.isOpen,
1600
+ props.isDisabled,
1601
+ validation.isInvalid,
1602
+ props.isRequired
1603
+ ]);
522
1604
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
523
1605
  ...props,
524
- values: {
525
- isEmpty: state.value === "",
526
- isDisabled: props.isDisabled || false,
527
- isInvalid: validation.isInvalid || false,
528
- state
529
- },
530
- defaultClassName: "react-aria-SearchField"
1606
+ values: renderPropsState,
1607
+ defaultClassName: "react-aria-ComboBox"
531
1608
  });
532
1609
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
533
1610
  delete DOMProps.id;
534
- return /* @__PURE__ */ React__default.createElement("div", {
535
- ...DOMProps,
536
- ...renderProps,
537
- ref,
538
- slot: props.slot || void 0,
539
- "data-empty": state.value === "" || void 0,
540
- "data-disabled": props.isDisabled || void 0,
541
- "data-invalid": validation.isInvalid || void 0
542
- }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
1611
+ var _state_selectedKey;
1612
+ return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
543
1613
  values: [
1614
+ [
1615
+ $d01f2c01039c0eec$export$c02625b26074192c,
1616
+ state
1617
+ ],
544
1618
  [
545
1619
  $01b77f81d0f07f68$export$75b6ee27786ba447,
546
1620
  {
@@ -548,6 +1622,14 @@ function $440f4836bcb56932$var$SearchField(props, ref) {
548
1622
  ref: labelRef
549
1623
  }
550
1624
  ],
1625
+ [
1626
+ $d2b4bc8c273e7be6$export$24d547caef80ccd1,
1627
+ {
1628
+ ...buttonProps,
1629
+ ref: buttonRef,
1630
+ isPressed: state.isOpen
1631
+ }
1632
+ ],
551
1633
  [
552
1634
  $3985021b0ad6602f$export$37fb8590cf2c088c,
553
1635
  {
@@ -556,8 +1638,33 @@ function $440f4836bcb56932$var$SearchField(props, ref) {
556
1638
  }
557
1639
  ],
558
1640
  [
559
- $d2b4bc8c273e7be6$export$24d547caef80ccd1,
560
- clearButtonProps
1641
+ $de32f1b87079253c$export$d2f961adcb0afbe,
1642
+ state
1643
+ ],
1644
+ [
1645
+ $07b14b47974efb58$export$9b9a0cd73afb7ca4,
1646
+ {
1647
+ ref: popoverRef,
1648
+ triggerRef: inputRef,
1649
+ scrollRef: listBoxRef,
1650
+ placement: "bottom start",
1651
+ isNonModal: true,
1652
+ trigger: "ComboBox",
1653
+ style: {
1654
+ "--trigger-width": menuWidth
1655
+ }
1656
+ }
1657
+ ],
1658
+ [
1659
+ $eed445e0843c11d0$export$7ff8f37d2d81a48d,
1660
+ {
1661
+ ...listBoxProps,
1662
+ ref: listBoxRef
1663
+ }
1664
+ ],
1665
+ [
1666
+ $eed445e0843c11d0$export$7c5906fe4f1f2af2,
1667
+ state
561
1668
  ],
562
1669
  [
563
1670
  $514c0188e459b4c0$export$9afb8bc826b033ea,
@@ -580,60 +1687,23 @@ function $440f4836bcb56932$var$SearchField(props, ref) {
580
1687
  validation
581
1688
  ]
582
1689
  ]
583
- }, renderProps.children));
584
- }
585
- const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ forwardRef($440f4836bcb56932$var$SearchField);
586
- function c(e, u, c2) {
587
- var i = this, a = useRef(null), o = useRef(0), f = useRef(null), l = useRef([]), v = useRef(), m = useRef(), d = useRef(e), g = useRef(true);
588
- d.current = e;
589
- var p = "undefined" != typeof window, w = !u && 0 !== u && p;
590
- if ("function" != typeof e) throw new TypeError("Expected a function");
591
- u = +u || 0;
592
- var s = !!(c2 = c2 || {}).leading, x = !("trailing" in c2) || !!c2.trailing, h = "maxWait" in c2, y = "debounceOnServer" in c2 && !!c2.debounceOnServer, F = h ? Math.max(+c2.maxWait || 0, u) : null;
593
- useEffect(function() {
594
- return g.current = true, function() {
595
- g.current = false;
596
- };
597
- }, []);
598
- var A = useMemo(function() {
599
- var r = function(r2) {
600
- var n2 = l.current, t2 = v.current;
601
- return l.current = v.current = null, o.current = r2, m.current = d.current.apply(t2, n2);
602
- }, n = function(r2, n2) {
603
- w && cancelAnimationFrame(f.current), f.current = w ? requestAnimationFrame(r2) : setTimeout(r2, n2);
604
- }, t = function(r2) {
605
- if (!g.current) return false;
606
- var n2 = r2 - a.current;
607
- return !a.current || n2 >= u || n2 < 0 || h && r2 - o.current >= F;
608
- }, e2 = function(n2) {
609
- return f.current = null, x && l.current ? r(n2) : (l.current = v.current = null, m.current);
610
- }, c3 = function r2() {
611
- var c4 = Date.now();
612
- if (t(c4)) return e2(c4);
613
- if (g.current) {
614
- var i2 = u - (c4 - a.current), f2 = h ? Math.min(i2, F - (c4 - o.current)) : i2;
615
- n(r2, f2);
616
- }
617
- }, A2 = function() {
618
- if (p || y) {
619
- var e3 = Date.now(), d2 = t(e3);
620
- if (l.current = [].slice.call(arguments), v.current = i, a.current = e3, d2) {
621
- if (!f.current && g.current) return o.current = a.current, n(c3, u), s ? r(a.current) : m.current;
622
- if (h) return n(c3, u), r(a.current);
623
- }
624
- return f.current || n(c3, u), m.current;
625
- }
626
- };
627
- return A2.cancel = function() {
628
- f.current && (w ? cancelAnimationFrame(f.current) : clearTimeout(f.current)), o.current = 0, l.current = a.current = v.current = f.current = null;
629
- }, A2.isPending = function() {
630
- return !!f.current;
631
- }, A2.flush = function() {
632
- return f.current ? e2(Date.now()) : m.current;
633
- }, A2;
634
- }, [s, h, u, F, x, w, p, y]);
635
- return A;
1690
+ }, /* @__PURE__ */ React__default.createElement("div", {
1691
+ ...DOMProps,
1692
+ ...renderProps,
1693
+ ref,
1694
+ slot: props.slot || void 0,
1695
+ "data-focused": state.isFocused || void 0,
1696
+ "data-open": state.isOpen || void 0,
1697
+ "data-disabled": props.isDisabled || void 0,
1698
+ "data-invalid": validation.isInvalid || void 0,
1699
+ "data-required": props.isRequired || void 0
1700
+ }), name && formValue === "key" && /* @__PURE__ */ React__default.createElement("input", {
1701
+ type: "hidden",
1702
+ name,
1703
+ value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
1704
+ }));
636
1705
  }
1706
+ const $d01f2c01039c0eec$export$72b9695b8216309a = /* @__PURE__ */ forwardRef($d01f2c01039c0eec$var$ComboBox);
637
1707
  /**
638
1708
  * Component that allows URL selection, with a suggestionList of suggestions and type-to-search.
639
1709
  *
@@ -681,58 +1751,41 @@ const LinkInput = (props) => {
681
1751
  suggestionTypeIconOverride,
682
1752
  fetchSuggestions,
683
1753
  className,
684
- inputDebounceDelay = 500,
685
1754
  hidden
686
1755
  } = props;
687
- const [inputValue, setInputValue] = useState(url ?? "");
688
- const [suggestionsVisible, setSuggestionsVisible] = useState(false);
689
1756
  const triggerRef = useRef(null);
690
- const inputRef = useRef(null);
691
1757
  const suggestionList = $f86e6c1ec7da6ebb$export$bc3384a35de93d66({
692
- getKey: ({ item }) => item.value,
693
- async load({ signal }) {
694
- const items = await fetchSuggestions(inputValue, signal);
1758
+ async load({ signal, filterText }) {
1759
+ const items = await fetchSuggestions(filterText, signal);
695
1760
  return {
696
1761
  items: items ?? []
697
1762
  };
698
1763
  }
699
1764
  });
700
- const shouldNotShowSuggestions = (url2) => {
1765
+ const shouldShowSuggestions = (() => {
701
1766
  var _a2;
702
- if (!url2) {
703
- return true;
1767
+ if (!url) {
1768
+ return false;
704
1769
  }
705
- return ((_a2 = url2 == null ? void 0 : url2.trim()) == null ? void 0 : _a2.length) < 3 || (url2 == null ? void 0 : url2.startsWith("#")) || (url2 == null ? void 0 : url2.startsWith(":")) || (url2 == null ? void 0 : url2.startsWith("mailto:")) || (url2 == null ? void 0 : url2.startsWith("tel:")) || (url2 == null ? void 0 : url2.startsWith("http://")) || (url2 == null ? void 0 : url2.startsWith("https://"));
706
- };
707
- const debounced = c(
708
- (value) => {
709
- onChange({ url: value, isAnchor: value == null ? void 0 : value.includes("#") });
710
- if (shouldNotShowSuggestions(value)) {
711
- setSuggestionsVisible(false);
712
- } else {
713
- suggestionList.setFilterText(value);
714
- setSuggestionsVisible((value == null ? void 0 : value.length) > 3);
715
- }
716
- },
717
- inputDebounceDelay,
718
- { maxWait: 2e3 }
719
- );
1770
+ return !(((_a2 = url == null ? void 0 : url.trim()) == null ? void 0 : _a2.length) < 4 || (url == null ? void 0 : url.startsWith("#")) || (url == null ? void 0 : url.startsWith(":")) || (url == null ? void 0 : url.startsWith("mailto")) || (url == null ? void 0 : url.startsWith("tel")) || (url == null ? void 0 : url.startsWith("http")) || (url == null ? void 0 : url.startsWith("www")));
1771
+ })();
720
1772
  if (hidden) {
721
1773
  return null;
722
1774
  }
723
- return /* @__PURE__ */ jsxs(Fragment, { children: [
724
- /* @__PURE__ */ jsx(
725
- $440f4836bcb56932$export$b94867ecbd698f21,
726
- {
727
- className: "es-uic-w-full es-uic-space-y-1",
728
- type: "url",
729
- value: inputValue,
730
- onChange: (value) => {
731
- setInputValue(value);
732
- debounced(value);
733
- },
734
- isDisabled: disabled,
735
- children: /* @__PURE__ */ jsx(
1775
+ return /* @__PURE__ */ jsxs(
1776
+ $d01f2c01039c0eec$export$72b9695b8216309a,
1777
+ {
1778
+ items: suggestionList.items,
1779
+ inputValue: suggestionList.filterText,
1780
+ onInputChange: (value) => {
1781
+ onChange({ url: value, isAnchor: value == null ? void 0 : value.includes("#") });
1782
+ suggestionList.setFilterText(value);
1783
+ },
1784
+ allowsCustomValue: true,
1785
+ allowsEmptyCollection: shouldShowSuggestions,
1786
+ isDisabled: disabled,
1787
+ children: [
1788
+ /* @__PURE__ */ jsx(
736
1789
  BaseControl,
737
1790
  {
738
1791
  as: $01b77f81d0f07f68$export$b04be29aa201d4f5,
@@ -752,171 +1805,148 @@ const LinkInput = (props) => {
752
1805
  $3985021b0ad6602f$export$f5b8910cec6cf069,
753
1806
  {
754
1807
  placeholder,
755
- ref: inputRef,
756
1808
  className: clsx(
757
1809
  "es-uic-min-h-10 es-uic-w-full es-uic-rounded-md es-uic-border es-uic-border-gray-300 es-uic-py-2 es-uic-pl-2 es-uic-pr-1 es-uic-text-sm es-uic-shadow-sm es-uic-transition selection:es-uic-bg-teal-500/20 selection:es-uic-text-teal-950",
758
1810
  "focus:es-uic-outline-none focus-visible:es-uic-outline-none focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500 focus-visible:es-uic-ring-opacity-50",
759
- (inputValue == null ? void 0 : inputValue.length) > 0 && "es-uic-pr-8",
1811
+ (url == null ? void 0 : url.length) > 0 && "es-uic-pr-10",
760
1812
  className
761
- ),
762
- onFocus: (e) => {
763
- onChange({ url: inputValue, isAnchor: inputValue == null ? void 0 : inputValue.includes("#") });
764
- if (props.onFocus) {
765
- props.onFocus(e);
766
- }
767
- }
1813
+ )
768
1814
  }
769
1815
  ),
770
1816
  /* @__PURE__ */ jsx(
771
1817
  AnimatedVisibility,
772
1818
  {
773
- visible: (inputValue == null ? void 0 : inputValue.length) > 0,
1819
+ visible: (url == null ? void 0 : url.length) > 0,
774
1820
  className: "es-uic-absolute es-uic-inset-y-1 es-uic-right-1",
775
- transition: "scaleFade",
776
- children: /* @__PURE__ */ jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { children: /* @__PURE__ */ jsx(Tooltip, { text: __("Clear", "eightshift-ui-components"), children: /* @__PURE__ */ jsx(
777
- "div",
1821
+ transition: "fade",
1822
+ children: /* @__PURE__ */ jsx(
1823
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
778
1824
  {
779
- className: clsx(
780
- "es-uic-flex es-uic-size-8 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-bg-white/85 es-uic-text-gray-600 es-uic-backdrop-blur es-uic-transition",
781
- "hover:es-uic-bg-red-50 hover:es-uic-text-red-500",
782
- "[&>svg]:es-uic-size-6"
783
- ),
784
- children: removeIcon
1825
+ slot: null,
1826
+ onPress: () => {
1827
+ suggestionList.setFilterText("");
1828
+ onChange({ url: void 0, isAnchor: false });
1829
+ },
1830
+ className: "focus:es-uic-outline-none",
1831
+ children: /* @__PURE__ */ jsx(Tooltip, { text: __("Clear", "eightshift-ui-components"), children: /* @__PURE__ */ jsx(
1832
+ "div",
1833
+ {
1834
+ className: clsx(
1835
+ "es-uic-flex es-uic-size-8 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-bg-white/85 es-uic-text-gray-600 es-uic-backdrop-blur es-uic-transition",
1836
+ "hover:es-uic-bg-red-50 hover:es-uic-text-red-500",
1837
+ "[&>svg]:es-uic-size-6"
1838
+ ),
1839
+ children: removeIcon
1840
+ }
1841
+ ) })
785
1842
  }
786
- ) }) })
1843
+ )
787
1844
  }
788
1845
  )
789
1846
  ]
790
1847
  }
791
1848
  )
792
1849
  }
793
- )
794
- }
795
- ),
796
- /* @__PURE__ */ jsxs(
797
- Popover,
798
- {
799
- "aria-label": __("URL suggestions", "eightshift-ui-components"),
800
- shouldFlip: false,
801
- triggerRef,
802
- isOpen: suggestionsVisible,
803
- onOpenChange: (value) => {
804
- setSuggestionsVisible(value);
805
- debounced.cancel();
806
- },
807
- placement: "bottom",
808
- className: "!es-uic-p-0",
809
- style: {
810
- width: `${(_a = triggerRef.current) == null ? void 0 : _a.offsetWidth}px`
811
- },
812
- children: [
813
- suggestionList.isLoading && /* @__PURE__ */ jsx(
814
- RichLabel,
815
- {
816
- icon: icons.progressbarIntermittent,
817
- label: __("Loading suggestions...", "eightshift-ui-components"),
818
- subtitle: __("Please wait", "eightshift-ui-components"),
819
- className: "es-uic-min-h-14 es-uic-p-2"
820
- }
821
- ),
822
- !suggestionList.isLoading && suggestionList.items.length === 0 && /* @__PURE__ */ jsx(
823
- RichLabel,
824
- {
825
- icon: icons.searchEmpty,
826
- label: __("No suggestions found", "eightshift-ui-components"),
827
- subtitle: __("Try a different search term.", "eightshift-ui-components"),
828
- className: "es-uic-min-h-14 es-uic-p-2"
829
- }
830
- ),
831
- !suggestionList.isLoading && suggestionList.items.length > 0 && /* @__PURE__ */ jsx(
832
- $13c3c67164f4d5be$export$4c260019440d418f,
833
- {
834
- orientation: "vertical",
835
- className: "es-uic-flex es-uic-min-h-10 es-uic-flex-col es-uic-space-y-1 es-uic-p-2",
836
- children: suggestionList.items.map((item, index) => {
837
- const {
838
- label: title,
839
- value: url2,
840
- metadata: { subtype: rawSubtype }
841
- } = item;
842
- const subtype = rawSubtype ?? "page";
843
- let typeIcon = icons.file;
844
- if (subtype.toLowerCase() === "url") {
845
- typeIcon = icons.externalLink;
846
- } else if (subtype.toLowerCase() === "attachment") {
847
- typeIcon = icons.file;
848
- } else if (subtype.toLowerCase() === "category") {
849
- typeIcon = icons.layoutAlt;
850
- } else if (subtype.toLowerCase() === "internal") {
851
- typeIcon = icons.anchor;
852
- } else if (subtype.toLowerCase() === "eightshift-forms") {
853
- typeIcon = icons.formAlt;
1850
+ ),
1851
+ /* @__PURE__ */ jsxs(
1852
+ $07b14b47974efb58$export$5b6b19405a83ff9d,
1853
+ {
1854
+ "aria-label": __("URL suggestions", "eightshift-ui-components"),
1855
+ className: ({ isEntering, isExiting }) => clsx(
1856
+ "es-uic-rounded-md es-uic-border es-uic-border-gray-200 es-uic-bg-white es-uic-shadow-lg es-uic-outline-none empty:es-uic-opacity-0",
1857
+ isEntering && "es-uic-outline es-uic-animate-in es-uic-fade-in-0 es-uic-slide-in-from-top-2 es-uic-fill-mode-forwards",
1858
+ isExiting && "es-uic-outline es-uic-animate-out es-uic-fade-out-0 es-uic-slide-out-to-top-2 es-uic-fill-mode-forwards"
1859
+ ),
1860
+ style: {
1861
+ width: `${(_a = triggerRef.current) == null ? void 0 : _a.offsetWidth}px`
1862
+ },
1863
+ children: [
1864
+ suggestionList.isLoading && /* @__PURE__ */ jsx(
1865
+ RichLabel,
1866
+ {
1867
+ icon: cloneElement(icons.emptyCircle, { className: "es-uic-animate-spin" }),
1868
+ label: __("Loading suggestions", "eightshift-ui-components"),
1869
+ className: "es-uic-min-h-12 es-uic-p-2"
854
1870
  }
855
- if (suggestionTypeIconOverride) {
856
- const overrideIcon = suggestionTypeIconOverride(subtype);
857
- if (overrideIcon) {
858
- typeIcon = overrideIcon;
859
- }
1871
+ ),
1872
+ !suggestionList.isLoading && suggestionList.items.length === 0 && /* @__PURE__ */ jsx(
1873
+ RichLabel,
1874
+ {
1875
+ icon: icons.searchEmpty,
1876
+ label: __("No results", "eightshift-ui-components"),
1877
+ subtitle: __("Try a different search term.", "eightshift-ui-components"),
1878
+ className: "es-uic-min-h-12 es-uic-p-2"
860
1879
  }
861
- return /* @__PURE__ */ jsx(
862
- Button,
863
- {
864
- textValue: label,
865
- size: "large",
866
- type: "ghost",
867
- className: clsx(
868
- "es-uic-w-full es-uic-text-start",
869
- "es-uic-grid es-uic-grid-cols-[auto,_minmax(0,_1fr)] es-uic-grid-rows-2 es-uic-items-center es-uic-justify-items-start es-uic-gap-x-2 es-uic-gap-y-0",
870
- "[&>svg]:es-uic-row-span-2 [&>svg]:es-uic-shrink-0",
871
- "[&>span:last-child]:es-uic-self-start [&>span]:es-uic-w-full [&>span]:es-uic-self-end [&>span]:es-uic-truncate"
872
- ),
873
- onPress: () => {
874
- setInputValue(url2);
875
- debounced(url2);
876
- setSuggestionsVisible(false);
877
- },
878
- icon: typeIcon,
879
- autoFocus: index === 0,
880
- children: /* @__PURE__ */ jsx(
881
- RichLabel,
882
- {
883
- label: title,
884
- subtitle: url2 == null ? void 0 : url2.replace(location.origin, "").replace(/\/$/, ""),
885
- contentsOnly: true
886
- }
887
- )
888
- },
889
- url2
890
- );
891
- })
892
- }
893
- ),
894
- /* @__PURE__ */ jsx(
895
- Spacer,
896
- {
897
- size: "px",
898
- border: true
899
- }
900
- ),
901
- /* @__PURE__ */ jsxs("div", { className: "es-uic-grid es-uic-select-none es-uic-grid-cols-[auto,_1fr] es-uic-items-center es-uic-gap-x-1.5 es-uic-gap-y-1 es-uic-p-2 es-uic-text-sm es-uic-text-gray-500", children: [
902
- /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-justify-self-center", children: [
903
- /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "↑" }),
904
- /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "" })
905
- ] }),
906
- __("Navigate", "eightshift-ui-components"),
907
- /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-justify-self-center", children: [
908
- /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-justify-self-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "↵" }),
909
- /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-justify-self-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "␣" })
910
- ] }),
911
- __("Select an item", "eightshift-ui-components"),
912
- /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-h-5 es-uic-min-w-5 es-uic-items-center es-uic-justify-center es-uic-justify-self-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "Esc" }),
913
- " ",
914
- __("Close suggestion panel", "eightshift-ui-components")
915
- ] })
916
- ]
917
- }
918
- )
919
- ] });
1880
+ ),
1881
+ !suggestionList.isLoading && suggestionList.items.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
1882
+ /* @__PURE__ */ jsx($eed445e0843c11d0$export$41f133550aa26f48, { className: "es-uic-space-y-1 es-uic-p-1", children: (item) => {
1883
+ const {
1884
+ label: title,
1885
+ value: url2,
1886
+ metadata: { subtype: rawSubtype }
1887
+ } = item;
1888
+ const subtype = rawSubtype ?? "page";
1889
+ let typeIcon = icons.file;
1890
+ if (subtype.toLowerCase() === "url") {
1891
+ typeIcon = icons.externalLink;
1892
+ } else if (subtype.toLowerCase() === "attachment") {
1893
+ typeIcon = icons.file;
1894
+ } else if (subtype.toLowerCase() === "category") {
1895
+ typeIcon = icons.layoutAlt;
1896
+ } else if (subtype.toLowerCase() === "internal") {
1897
+ typeIcon = icons.anchor;
1898
+ } else if (subtype.toLowerCase() === "eightshift-forms") {
1899
+ typeIcon = icons.formAlt;
1900
+ }
1901
+ if (suggestionTypeIconOverride) {
1902
+ const overrideIcon = suggestionTypeIconOverride(subtype);
1903
+ if (overrideIcon) {
1904
+ typeIcon = overrideIcon;
1905
+ }
1906
+ }
1907
+ return /* @__PURE__ */ jsx(
1908
+ $eed445e0843c11d0$export$a11e76429ed99b4,
1909
+ {
1910
+ id: item.value,
1911
+ className: clsx(
1912
+ "es-uic-rounded es-uic-p-1 es-uic-text-sm es-uic-transition",
1913
+ "hover:es-uic-border-gray-300 hover:es-uic-bg-gray-100",
1914
+ "focus-visible:es-uic-border-gray-300 focus-visible:es-uic-bg-gray-100",
1915
+ "selected:es-uic-bg-teal-600/10 selected:es-uic-text-teal-900 selected:focus-visible:es-uic-bg-teal-600/15"
1916
+ ),
1917
+ textValue: url2,
1918
+ children: /* @__PURE__ */ jsx(
1919
+ RichLabel,
1920
+ {
1921
+ icon: typeIcon,
1922
+ label: title,
1923
+ subtitle: url2 == null ? void 0 : url2.replace(location.origin, "").replace(/\/$/, ""),
1924
+ noColor: true
1925
+ }
1926
+ )
1927
+ }
1928
+ );
1929
+ } }),
1930
+ /* @__PURE__ */ jsx(Spacer, { border: true }),
1931
+ /* @__PURE__ */ jsxs("div", { className: "es-uic-grid es-uic-select-none es-uic-grid-cols-[auto,_1fr] es-uic-items-center es-uic-gap-x-1.5 es-uic-gap-y-1 es-uic-p-2 es-uic-text-sm es-uic-text-gray-500", children: [
1932
+ /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-justify-self-center", children: [
1933
+ /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "↓" }),
1934
+ /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "↑" })
1935
+ ] }),
1936
+ __("Navigate", "eightshift-ui-components"),
1937
+ /* @__PURE__ */ jsx("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-justify-self-center", children: /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-size-5 es-uic-items-center es-uic-justify-center es-uic-justify-self-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "↵" }) }),
1938
+ __("Select", "eightshift-ui-components"),
1939
+ /* @__PURE__ */ jsx("kbd", { className: "es-uic-flex es-uic-h-5 es-uic-min-w-5 es-uic-items-center es-uic-justify-center es-uic-justify-self-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-font-sans es-uic-text-xs es-uic-text-gray-400", children: "Esc" }),
1940
+ " ",
1941
+ __("Hide suggestions", "eightshift-ui-components")
1942
+ ] })
1943
+ ] })
1944
+ ]
1945
+ }
1946
+ )
1947
+ ]
1948
+ }
1949
+ );
920
1950
  };
921
1951
  export {
922
1952
  LinkInput