@transferwise/components 0.0.0-experimental-a9ab536 → 0.0.0-experimental-74c86e4

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 (233) hide show
  1. package/build/dateInput/DateInput.js +5 -12
  2. package/build/dateInput/DateInput.js.map +1 -1
  3. package/build/dateInput/DateInput.mjs +4 -11
  4. package/build/dateInput/DateInput.mjs.map +1 -1
  5. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +8 -16
  6. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  7. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +6 -14
  8. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  9. package/build/index.js +7 -14
  10. package/build/index.js.map +1 -1
  11. package/build/index.mjs +3 -10
  12. package/build/index.mjs.map +1 -1
  13. package/build/inputs/SelectInput.js +890 -0
  14. package/build/inputs/SelectInput.js.map +1 -0
  15. package/build/inputs/SelectInput.messages.js.map +1 -0
  16. package/build/inputs/SelectInput.messages.mjs.map +1 -0
  17. package/build/inputs/SelectInput.mjs +881 -0
  18. package/build/inputs/SelectInput.mjs.map +1 -0
  19. package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.js → _BottomSheet.js} +7 -7
  20. package/build/inputs/_BottomSheet.js.map +1 -0
  21. package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.mjs → _BottomSheet.mjs} +7 -7
  22. package/build/inputs/_BottomSheet.mjs.map +1 -0
  23. package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.js → _ButtonInput.js} +5 -5
  24. package/build/inputs/_ButtonInput.js.map +1 -0
  25. package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.mjs → _ButtonInput.mjs} +5 -5
  26. package/build/inputs/_ButtonInput.mjs.map +1 -0
  27. package/build/inputs/{SelectInput/Popover/SelectInputPopover.js → _Popover.js} +4 -4
  28. package/build/inputs/_Popover.js.map +1 -0
  29. package/build/inputs/{SelectInput/Popover/SelectInputPopover.mjs → _Popover.mjs} +4 -4
  30. package/build/inputs/_Popover.mjs.map +1 -0
  31. package/build/main.css +90 -90
  32. package/build/moneyInput/MoneyInput.js +2 -9
  33. package/build/moneyInput/MoneyInput.js.map +1 -1
  34. package/build/moneyInput/MoneyInput.mjs +1 -8
  35. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  36. package/build/phoneNumberInput/PhoneNumberInput.js +3 -10
  37. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  38. package/build/phoneNumberInput/PhoneNumberInput.mjs +2 -9
  39. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  40. package/build/styles/main.css +90 -90
  41. package/build/types/inputs/{SelectInput/SelectInput.types.d.ts → SelectInput.d.ts} +38 -12
  42. package/build/types/inputs/SelectInput.d.ts.map +1 -0
  43. package/build/types/inputs/SelectInput.messages.d.ts.map +1 -0
  44. package/build/types/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.d.ts → _BottomSheet.d.ts} +3 -3
  45. package/build/types/inputs/_BottomSheet.d.ts.map +1 -0
  46. package/build/types/inputs/_ButtonInput.d.ts +5 -0
  47. package/build/types/inputs/_ButtonInput.d.ts.map +1 -0
  48. package/build/types/inputs/{SelectInput/Popover/SelectInputPopover.d.ts → _Popover.d.ts} +3 -3
  49. package/build/types/inputs/_Popover.d.ts.map +1 -0
  50. package/package.json +1 -1
  51. package/src/inputs/{SelectInput/_stories/SelectInput.docs.mdx → SelectInput.docs.mdx} +1 -0
  52. package/src/inputs/SelectInput.less +219 -0
  53. package/src/inputs/{SelectInput/_stories/SelectInput.story.tsx → SelectInput.story.tsx} +8 -11
  54. package/src/inputs/{SelectInput/_stories/SelectInput.test.story.tsx → SelectInput.test.story.tsx} +10 -5
  55. package/src/inputs/{SelectInput/SelectInput.test.tsx → SelectInput.test.tsx} +11 -9
  56. package/src/inputs/SelectInput.tsx +1269 -0
  57. package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.tsx → _BottomSheet.tsx} +7 -7
  58. package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.tsx → _ButtonInput.tsx} +5 -5
  59. package/src/inputs/{SelectInput/Popover/SelectInputPopover.tsx → _Popover.tsx} +4 -4
  60. package/src/main.css +90 -90
  61. package/src/main.less +1 -1
  62. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +0 -1
  63. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +0 -1
  64. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +0 -1
  65. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +0 -1
  66. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +0 -27
  67. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +0 -1
  68. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +0 -25
  69. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +0 -1
  70. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +0 -59
  71. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +0 -1
  72. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +0 -56
  73. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +0 -1
  74. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +0 -50
  75. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +0 -1
  76. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +0 -48
  77. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +0 -1
  78. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +0 -47
  79. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +0 -1
  80. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +0 -45
  81. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +0 -1
  82. package/build/inputs/SelectInput/Option/SelectInputOption.js +0 -42
  83. package/build/inputs/SelectInput/Option/SelectInputOption.js.map +0 -1
  84. package/build/inputs/SelectInput/Option/SelectInputOption.mjs +0 -40
  85. package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +0 -1
  86. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +0 -40
  87. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +0 -1
  88. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +0 -38
  89. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +0 -1
  90. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +0 -48
  91. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +0 -1
  92. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +0 -46
  93. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +0 -1
  94. package/build/inputs/SelectInput/Options/SelectInputOptions.js +0 -300
  95. package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +0 -1
  96. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +0 -298
  97. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +0 -1
  98. package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +0 -1
  99. package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +0 -1
  100. package/build/inputs/SelectInput/SelectInput.contexts.js +0 -29
  101. package/build/inputs/SelectInput/SelectInput.contexts.js.map +0 -1
  102. package/build/inputs/SelectInput/SelectInput.contexts.mjs +0 -24
  103. package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +0 -1
  104. package/build/inputs/SelectInput/SelectInput.js +0 -222
  105. package/build/inputs/SelectInput/SelectInput.js.map +0 -1
  106. package/build/inputs/SelectInput/SelectInput.messages.js.map +0 -1
  107. package/build/inputs/SelectInput/SelectInput.messages.mjs.map +0 -1
  108. package/build/inputs/SelectInput/SelectInput.mjs +0 -216
  109. package/build/inputs/SelectInput/SelectInput.mjs.map +0 -1
  110. package/build/inputs/SelectInput/SelectInput.utils.js +0 -164
  111. package/build/inputs/SelectInput/SelectInput.utils.js.map +0 -1
  112. package/build/inputs/SelectInput/SelectInput.utils.mjs +0 -154
  113. package/build/inputs/SelectInput/SelectInput.utils.mjs.map +0 -1
  114. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +0 -43
  115. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +0 -1
  116. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +0 -37
  117. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +0 -1
  118. package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
  119. package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
  120. package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
  121. package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
  122. package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +0 -33
  123. package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
  124. package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
  125. package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
  126. package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +0 -1
  127. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +0 -3
  128. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +0 -1
  129. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +0 -5
  130. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +0 -1
  131. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +0 -3
  132. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +0 -1
  133. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +0 -7
  134. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +0 -1
  135. package/build/types/inputs/SelectInput/ClearButton/index.d.ts +0 -3
  136. package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +0 -1
  137. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +0 -16
  138. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +0 -1
  139. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +0 -2
  140. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +0 -1
  141. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +0 -12
  142. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +0 -1
  143. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +0 -3
  144. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +0 -1
  145. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +0 -14
  146. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +0 -1
  147. package/build/types/inputs/SelectInput/ItemView/index.d.ts +0 -4
  148. package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +0 -1
  149. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +0 -14
  150. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +0 -1
  151. package/build/types/inputs/SelectInput/Option/index.d.ts +0 -3
  152. package/build/types/inputs/SelectInput/Option/index.d.ts.map +0 -1
  153. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +0 -16
  154. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +0 -1
  155. package/build/types/inputs/SelectInput/OptionContent/index.d.ts +0 -3
  156. package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +0 -1
  157. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +0 -12
  158. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +0 -1
  159. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +0 -3
  160. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +0 -1
  161. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +0 -21
  162. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +0 -1
  163. package/build/types/inputs/SelectInput/Options/index.d.ts +0 -4
  164. package/build/types/inputs/SelectInput/Options/index.d.ts.map +0 -1
  165. package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +0 -1
  166. package/build/types/inputs/SelectInput/Popover/index.d.ts +0 -3
  167. package/build/types/inputs/SelectInput/Popover/index.d.ts.map +0 -1
  168. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +0 -33
  169. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +0 -1
  170. package/build/types/inputs/SelectInput/SelectInput.d.ts +0 -10
  171. package/build/types/inputs/SelectInput/SelectInput.d.ts.map +0 -1
  172. package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +0 -1
  173. package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +0 -1
  174. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +0 -61
  175. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +0 -1
  176. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +0 -18
  177. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +0 -1
  178. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +0 -3
  179. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +0 -1
  180. package/build/types/inputs/SelectInput/components.d.ts +0 -10
  181. package/build/types/inputs/SelectInput/components.d.ts.map +0 -1
  182. package/build/types/inputs/SelectInput/index.d.ts +0 -12
  183. package/build/types/inputs/SelectInput/index.d.ts.map +0 -1
  184. package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
  185. package/src/inputs/SelectInput/BottomSheet/index.ts +0 -2
  186. package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
  187. package/src/inputs/SelectInput/ButtonInput/index.ts +0 -2
  188. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
  189. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +0 -40
  190. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +0 -29
  191. package/src/inputs/SelectInput/ClearButton/index.ts +0 -2
  192. package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +0 -74
  193. package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +0 -5
  194. package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +0 -64
  195. package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +0 -2
  196. package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
  197. package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +0 -17
  198. package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +0 -51
  199. package/src/inputs/SelectInput/ItemView/index.ts +0 -3
  200. package/src/inputs/SelectInput/Option/SelectInputOption.css +0 -33
  201. package/src/inputs/SelectInput/Option/SelectInputOption.less +0 -32
  202. package/src/inputs/SelectInput/Option/SelectInputOption.tsx +0 -60
  203. package/src/inputs/SelectInput/Option/index.ts +0 -2
  204. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
  205. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +0 -38
  206. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +0 -75
  207. package/src/inputs/SelectInput/OptionContent/index.ts +0 -2
  208. package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +0 -62
  209. package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +0 -2
  210. package/src/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
  211. package/src/inputs/SelectInput/Options/SelectInputOptions.less +0 -77
  212. package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +0 -418
  213. package/src/inputs/SelectInput/Options/index.ts +0 -3
  214. package/src/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
  215. package/src/inputs/SelectInput/Popover/index.ts +0 -2
  216. package/src/inputs/SelectInput/SelectInput.contexts.tsx +0 -40
  217. package/src/inputs/SelectInput/SelectInput.less +0 -22
  218. package/src/inputs/SelectInput/SelectInput.tsx +0 -258
  219. package/src/inputs/SelectInput/SelectInput.types.ts +0 -113
  220. package/src/inputs/SelectInput/SelectInput.utils.ts +0 -206
  221. package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +0 -44
  222. package/src/inputs/SelectInput/TriggerButton/index.ts +0 -5
  223. package/src/inputs/SelectInput/components.ts +0 -10
  224. package/src/inputs/SelectInput/index.ts +0 -14
  225. package/build/inputs/{SelectInput/SelectInput.messages.js → SelectInput.messages.js} +0 -0
  226. package/build/inputs/{SelectInput/SelectInput.messages.mjs → SelectInput.messages.mjs} +0 -0
  227. package/{src/inputs/SelectInput → build/styles/inputs}/SelectInput.css +90 -90
  228. package/build/types/inputs/{SelectInput/SelectInput.messages.d.ts → SelectInput.messages.d.ts} +0 -0
  229. package/{build/styles/inputs/SelectInput → src/inputs}/SelectInput.css +90 -90
  230. /package/src/inputs/{SelectInput/SelectInput.messages.ts → SelectInput.messages.ts} +0 -0
  231. /package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.less → _BottomSheet.less} +0 -0
  232. /package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.less → _ButtonInput.less} +0 -0
  233. /package/src/inputs/{SelectInput/Popover/SelectInputPopover.less → _Popover.less} +0 -0
@@ -1,48 +0,0 @@
1
- import { clsx } from 'clsx';
2
- import { useId } from 'react';
3
- import Header from '../../../../header/Header.mjs';
4
- import Section from '../../../../section/Section.mjs';
5
- import { SelectInputItemView } from '../SelectInputItemView.mjs';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
-
8
- function SelectInputGroupItemView({
9
- item,
10
- renderValue,
11
- needle
12
- }) {
13
- const headerId = useId();
14
- const header = /*#__PURE__*/jsx(Header, {
15
- as: "header",
16
- role: "none",
17
- id: headerId,
18
- title: item.label
19
- // @ts-expect-error when we migrate ActionButton to new Button this should be sorted
20
- ,
21
- action: item.action && {
22
- text: item.action.label,
23
- onClick: item.action.onClick
24
- },
25
- className: "np-select-input-group-item-header p-x-1"
26
- });
27
- return (
28
- /*#__PURE__*/
29
- // An empty container may be rendered when no options match `needle`
30
- // However, pre-filtering would result in worse performance overall
31
- jsxs(Section, {
32
- as: "section",
33
- role: "group",
34
- "aria-labelledby": headerId,
35
- className: clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle'),
36
- children: [needle == null ? header : null, item.options.map((option, index) => /*#__PURE__*/jsx(SelectInputItemView
37
- // eslint-disable-next-line react/no-array-index-key
38
- , {
39
- item: option,
40
- renderValue: renderValue,
41
- needle: needle
42
- }, index))]
43
- })
44
- );
45
- }
46
-
47
- export { SelectInputGroupItemView };
48
- //# sourceMappingURL=SelectInputGroupItemView.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputGroupItemView.mjs","sources":["../../../../../src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId } from 'react';\nimport Header from '../../../../header';\nimport Section from '../../../../section';\nimport { SelectInputGroupItem } from '../../SelectInput.types';\nimport { SelectInputItemView, SelectInputItemViewProps } from '..';\n\n/**\n * Props for the SelectInputGroupItemView component.\n */\nexport interface SelectInputGroupItemViewProps<T = string> extends SelectInputItemViewProps<\n T,\n SelectInputGroupItem<T | undefined>\n> {}\n\n/**\n * Component that renders a group of SelectInput options with a header.\n */\nexport function SelectInputGroupItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputGroupItemViewProps<T>) {\n const headerId = useId();\n\n const header = (\n <Header\n as=\"header\"\n role=\"none\"\n id={headerId}\n title={item.label}\n // @ts-expect-error when we migrate ActionButton to new Button this should be sorted\n action={\n item.action && {\n text: item.action.label,\n onClick: item.action.onClick,\n }\n }\n className=\"np-select-input-group-item-header p-x-1\"\n />\n );\n\n return (\n // An empty container may be rendered when no options match `needle`\n // However, pre-filtering would result in worse performance overall\n <Section\n as=\"section\"\n role=\"group\"\n aria-labelledby={headerId}\n className={clsx('m-y-0', needle === null && 'np-select-input-group-item--without-needle')}\n >\n {needle == null ? header : null}\n {item.options.map((option, index) => (\n <SelectInputItemView\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n item={option}\n renderValue={renderValue}\n needle={needle}\n />\n ))}\n </Section>\n );\n}\n"],"names":["SelectInputGroupItemView","item","renderValue","needle","headerId","useId","header","_jsx","Header","as","role","id","title","label","action","text","onClick","className","_jsxs","Section","clsx","children","options","map","option","index","SelectInputItemView"],"mappings":";;;;;;;AAkBM,SAAUA,wBAAwBA,CAAa;EACnDC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CAC2B,EAAA;AACjC,EAAA,MAAMC,QAAQ,GAAGC,KAAK,EAAE;AAExB,EAAA,MAAMC,MAAM,gBACVC,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,EAAE,EAAC,QAAQ;AACXC,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,EAAE,EAAEP,QAAS;IACbQ,KAAK,EAAEX,IAAI,CAACY;AACZ;AAAA;AACAC,IAAAA,MAAM,EACJb,IAAI,CAACa,MAAM,IAAI;AACbC,MAAAA,IAAI,EAAEd,IAAI,CAACa,MAAM,CAACD,KAAK;AACvBG,MAAAA,OAAO,EAAEf,IAAI,CAACa,MAAM,CAACE;KAExB;AACDC,IAAAA,SAAS,EAAC;AAAyC,GAAA,CAEtD;AAED,EAAA;AAAA;AACE;AACA;AACAC,IAAAA,IAAA,CAACC,OAAO,EAAA;AACNV,MAAAA,EAAE,EAAC,SAAS;AACZC,MAAAA,IAAI,EAAC,OAAO;AACZ,MAAA,iBAAA,EAAiBN,QAAS;MAC1Ba,SAAS,EAAEG,IAAI,CAAC,OAAO,EAAEjB,MAAM,KAAK,IAAI,IAAI,4CAA4C,CAAE;MAAAkB,QAAA,EAAA,CAEzFlB,MAAM,IAAI,IAAI,GAAGG,MAAM,GAAG,IAAI,EAC9BL,IAAI,CAACqB,OAAO,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,kBAC9BlB,GAAA,CAACmB;AACC;AAAA,QAAA;AAEAzB,QAAAA,IAAI,EAAEuB,MAAO;AACbtB,QAAAA,WAAW,EAAEA,WAAY;AACzBC,QAAAA,MAAM,EAAEA;OAAO,EAHVsB,KAGU,CAElB,CAAC;KACK;AAAC;AAEd;;;;"}
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- var SelectInput_utils = require('../SelectInput.utils.js');
4
- var SelectInputOption = require('../Option/SelectInputOption.js');
5
- var SelectInputGroupItemView = require('./GroupItemView/SelectInputGroupItemView.js');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- function SelectInputItemView({
9
- item,
10
- renderValue,
11
- needle
12
- }) {
13
- switch (item.type) {
14
- case 'option':
15
- {
16
- if (item.value != null && (needle == null || SelectInput_utils.selectInputOptionItemIncludesNeedle(item, needle))) {
17
- return /*#__PURE__*/jsxRuntime.jsx(SelectInputOption.SelectInputOption, {
18
- value: item.value,
19
- disabled: item.disabled,
20
- children: renderValue(item.value, false)
21
- });
22
- }
23
- break;
24
- }
25
- case 'group':
26
- {
27
- return /*#__PURE__*/jsxRuntime.jsx(SelectInputGroupItemView.SelectInputGroupItemView, {
28
- item: item,
29
- renderValue: renderValue,
30
- needle: needle
31
- });
32
- }
33
- case 'separator':
34
- {
35
- if (needle == null) {
36
- return /*#__PURE__*/jsxRuntime.jsx("hr", {
37
- className: "np-select-input-separator-item"
38
- });
39
- }
40
- break;
41
- }
42
- }
43
- return null;
44
- }
45
-
46
- exports.SelectInputItemView = SelectInputItemView;
47
- //# sourceMappingURL=SelectInputItemView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputItemView.js","sources":["../../../../src/inputs/SelectInput/ItemView/SelectInputItemView.tsx"],"sourcesContent":["import { selectInputOptionItemIncludesNeedle } from '../SelectInput.utils';\nimport { SelectInputItem, SelectInputProps } from '../SelectInput.types';\nimport { SelectInputOption } from '../Option';\nimport { SelectInputGroupItemView } from './GroupItemView';\n\n/**\n * Props for the SelectInputItemView component.\n */\nexport interface SelectInputItemViewProps<\n T = string,\n I extends SelectInputItem<T | undefined> = SelectInputItem<T | undefined>,\n> extends Required<Pick<SelectInputProps<T>, 'renderValue'>> {\n item: I;\n needle: string | null | undefined;\n}\n\n/**\n * Component that renders different types of SelectInput items:\n * options, groups, or separators.\n */\nexport function SelectInputItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputItemViewProps<T>) {\n switch (item.type) {\n case 'option': {\n if (\n item.value != null &&\n (needle == null || selectInputOptionItemIncludesNeedle(item, needle))\n ) {\n return (\n <SelectInputOption value={item.value} disabled={item.disabled}>\n {renderValue(item.value, false)}\n </SelectInputOption>\n );\n }\n break;\n }\n case 'group': {\n return <SelectInputGroupItemView item={item} renderValue={renderValue} needle={needle} />;\n }\n case 'separator': {\n if (needle == null) {\n return <hr className=\"np-select-input-separator-item\" />;\n }\n break;\n }\n }\n return null;\n}\n"],"names":["SelectInputItemView","item","renderValue","needle","type","value","selectInputOptionItemIncludesNeedle","_jsx","SelectInputOption","disabled","children","SelectInputGroupItemView","className"],"mappings":";;;;;;;AAoBM,SAAUA,mBAAmBA,CAAa;EAC9CC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CACsB,EAAA;EAC5B,QAAQF,IAAI,CAACG,IAAI;AACf,IAAA,KAAK,QAAQ;AAAE,MAAA;AACb,QAAA,IACEH,IAAI,CAACI,KAAK,IAAI,IAAI,KACjBF,MAAM,IAAI,IAAI,IAAIG,qDAAmC,CAACL,IAAI,EAAEE,MAAM,CAAC,CAAC,EACrE;UACA,oBACEI,cAAA,CAACC,mCAAiB,EAAA;YAACH,KAAK,EAAEJ,IAAI,CAACI,KAAM;YAACI,QAAQ,EAAER,IAAI,CAACQ,QAAS;AAAAC,YAAAA,QAAA,EAC3DR,WAAW,CAACD,IAAI,CAACI,KAAK,EAAE,KAAK;AAAC,WACd,CAAC;AAExB,QAAA;AACA,QAAA;AACF,MAAA;AACA,IAAA,KAAK,OAAO;AAAE,MAAA;QACZ,oBAAOE,cAAA,CAACI,iDAAwB,EAAA;AAACV,UAAAA,IAAI,EAAEA,IAAK;AAACC,UAAAA,WAAW,EAAEA,WAAY;AAACC,UAAAA,MAAM,EAAEA;AAAO,SAAA,CAAG;AAC3F,MAAA;AACA,IAAA,KAAK,WAAW;AAAE,MAAA;QAChB,IAAIA,MAAM,IAAI,IAAI,EAAE;AAClB,UAAA,oBAAOI,cAAA,CAAA,IAAA,EAAA;AAAIK,YAAAA,SAAS,EAAC;AAAgC,YAAG;AAC1D,QAAA;AACA,QAAA;AACF,MAAA;AACF;AACA,EAAA,OAAO,IAAI;AACb;;;;"}
@@ -1,45 +0,0 @@
1
- import { selectInputOptionItemIncludesNeedle } from '../SelectInput.utils.mjs';
2
- import { SelectInputOption } from '../Option/SelectInputOption.mjs';
3
- import { SelectInputGroupItemView } from './GroupItemView/SelectInputGroupItemView.mjs';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- function SelectInputItemView({
7
- item,
8
- renderValue,
9
- needle
10
- }) {
11
- switch (item.type) {
12
- case 'option':
13
- {
14
- if (item.value != null && (needle == null || selectInputOptionItemIncludesNeedle(item, needle))) {
15
- return /*#__PURE__*/jsx(SelectInputOption, {
16
- value: item.value,
17
- disabled: item.disabled,
18
- children: renderValue(item.value, false)
19
- });
20
- }
21
- break;
22
- }
23
- case 'group':
24
- {
25
- return /*#__PURE__*/jsx(SelectInputGroupItemView, {
26
- item: item,
27
- renderValue: renderValue,
28
- needle: needle
29
- });
30
- }
31
- case 'separator':
32
- {
33
- if (needle == null) {
34
- return /*#__PURE__*/jsx("hr", {
35
- className: "np-select-input-separator-item"
36
- });
37
- }
38
- break;
39
- }
40
- }
41
- return null;
42
- }
43
-
44
- export { SelectInputItemView };
45
- //# sourceMappingURL=SelectInputItemView.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputItemView.mjs","sources":["../../../../src/inputs/SelectInput/ItemView/SelectInputItemView.tsx"],"sourcesContent":["import { selectInputOptionItemIncludesNeedle } from '../SelectInput.utils';\nimport { SelectInputItem, SelectInputProps } from '../SelectInput.types';\nimport { SelectInputOption } from '../Option';\nimport { SelectInputGroupItemView } from './GroupItemView';\n\n/**\n * Props for the SelectInputItemView component.\n */\nexport interface SelectInputItemViewProps<\n T = string,\n I extends SelectInputItem<T | undefined> = SelectInputItem<T | undefined>,\n> extends Required<Pick<SelectInputProps<T>, 'renderValue'>> {\n item: I;\n needle: string | null | undefined;\n}\n\n/**\n * Component that renders different types of SelectInput items:\n * options, groups, or separators.\n */\nexport function SelectInputItemView<T = string>({\n item,\n renderValue,\n needle,\n}: SelectInputItemViewProps<T>) {\n switch (item.type) {\n case 'option': {\n if (\n item.value != null &&\n (needle == null || selectInputOptionItemIncludesNeedle(item, needle))\n ) {\n return (\n <SelectInputOption value={item.value} disabled={item.disabled}>\n {renderValue(item.value, false)}\n </SelectInputOption>\n );\n }\n break;\n }\n case 'group': {\n return <SelectInputGroupItemView item={item} renderValue={renderValue} needle={needle} />;\n }\n case 'separator': {\n if (needle == null) {\n return <hr className=\"np-select-input-separator-item\" />;\n }\n break;\n }\n }\n return null;\n}\n"],"names":["SelectInputItemView","item","renderValue","needle","type","value","selectInputOptionItemIncludesNeedle","_jsx","SelectInputOption","disabled","children","SelectInputGroupItemView","className"],"mappings":";;;;;AAoBM,SAAUA,mBAAmBA,CAAa;EAC9CC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAM,CACsB,EAAA;EAC5B,QAAQF,IAAI,CAACG,IAAI;AACf,IAAA,KAAK,QAAQ;AAAE,MAAA;AACb,QAAA,IACEH,IAAI,CAACI,KAAK,IAAI,IAAI,KACjBF,MAAM,IAAI,IAAI,IAAIG,mCAAmC,CAACL,IAAI,EAAEE,MAAM,CAAC,CAAC,EACrE;UACA,oBACEI,GAAA,CAACC,iBAAiB,EAAA;YAACH,KAAK,EAAEJ,IAAI,CAACI,KAAM;YAACI,QAAQ,EAAER,IAAI,CAACQ,QAAS;AAAAC,YAAAA,QAAA,EAC3DR,WAAW,CAACD,IAAI,CAACI,KAAK,EAAE,KAAK;AAAC,WACd,CAAC;AAExB,QAAA;AACA,QAAA;AACF,MAAA;AACA,IAAA,KAAK,OAAO;AAAE,MAAA;QACZ,oBAAOE,GAAA,CAACI,wBAAwB,EAAA;AAACV,UAAAA,IAAI,EAAEA,IAAK;AAACC,UAAAA,WAAW,EAAEA,WAAY;AAACC,UAAAA,MAAM,EAAEA;AAAO,SAAA,CAAG;AAC3F,MAAA;AACA,IAAA,KAAK,WAAW;AAAE,MAAA;QAChB,IAAIA,MAAM,IAAI,IAAI,EAAE;AAClB,UAAA,oBAAOI,GAAA,CAAA,IAAA,EAAA;AAAIK,YAAAA,SAAS,EAAC;AAAgC,YAAG;AAC1D,QAAA;AACA,QAAA;AACF,MAAA;AACF;AACA,EAAA,OAAO,IAAI;AACb;;;;"}
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- var icons = require('@transferwise/icons');
4
- var clsx = require('clsx');
5
- var React = require('react');
6
- var react = require('@headlessui/react');
7
- var SelectInput_contexts = require('../SelectInput.contexts.js');
8
- var jsxRuntime = require('react/jsx-runtime');
9
-
10
- function SelectInputOption({
11
- value,
12
- disabled,
13
- children
14
- }) {
15
- const itemsCount = React.useContext(SelectInput_contexts.SelectInputItemsCountContext);
16
- const itemPosition = React.useContext(SelectInput_contexts.SelectInputItemPositionContext);
17
- return /*#__PURE__*/jsxRuntime.jsx(react.ListboxOption, {
18
- as: "div",
19
- value: value,
20
- "aria-setsize": itemsCount,
21
- "aria-posinset": itemPosition,
22
- disabled: disabled,
23
- className: ({
24
- active,
25
- disabled: uiDisabled
26
- }) => clsx.clsx('np-select-input-option-container np-text-body-large', active && 'np-select-input-option-container--active', uiDisabled && 'np-select-input-option-container--disabled'),
27
- children: ({
28
- selected
29
- }) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
30
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
31
- className: "np-select-input-option",
32
- children: children
33
- }), /*#__PURE__*/jsxRuntime.jsx(icons.Check, {
34
- size: 16,
35
- className: clsx.clsx('np-select-input-option-check', !selected && 'np-select-input-option-check--not-selected')
36
- })]
37
- })
38
- });
39
- }
40
-
41
- exports.SelectInputOption = SelectInputOption;
42
- //# sourceMappingURL=SelectInputOption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOption.js","sources":["../../../../src/inputs/SelectInput/Option/SelectInputOption.tsx"],"sourcesContent":["import { Check } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useContext } from 'react';\nimport { ListboxOption } from '@headlessui/react';\nimport {\n SelectInputItemsCountContext,\n SelectInputItemPositionContext,\n} from '../SelectInput.contexts';\n\n/**\n * Props for the SelectInputOption component.\n */\nexport interface SelectInputOptionProps<T = string> {\n value: T;\n disabled?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * A selectable option in a SelectInput dropdown.\n * Includes accessibility support and styling for selected, active, and disabled states.\n */\nexport function SelectInputOption<T = string>({\n value,\n disabled,\n children,\n}: SelectInputOptionProps<T>) {\n const itemsCount = useContext(SelectInputItemsCountContext);\n const itemPosition = useContext(SelectInputItemPositionContext);\n\n return (\n <ListboxOption\n as=\"div\"\n value={value}\n aria-setsize={itemsCount}\n aria-posinset={itemPosition}\n disabled={disabled}\n className={({ active, disabled: uiDisabled }) =>\n clsx(\n 'np-select-input-option-container np-text-body-large',\n active && 'np-select-input-option-container--active',\n uiDisabled && 'np-select-input-option-container--disabled',\n )\n }\n >\n {({ selected }) => (\n <>\n <div className=\"np-select-input-option\">{children}</div>\n <Check\n size={16}\n className={clsx(\n 'np-select-input-option-check',\n !selected && 'np-select-input-option-check--not-selected',\n )}\n />\n </>\n )}\n </ListboxOption>\n );\n}\n"],"names":["SelectInputOption","value","disabled","children","itemsCount","useContext","SelectInputItemsCountContext","itemPosition","SelectInputItemPositionContext","_jsx","ListboxOption","as","className","active","uiDisabled","clsx","selected","_jsxs","_Fragment","Check","size"],"mappings":";;;;;;;;;AAsBM,SAAUA,iBAAiBA,CAAa;EAC5CC,KAAK;EACLC,QAAQ;AACRC,EAAAA;AAAQ,CACkB,EAAA;AAC1B,EAAA,MAAMC,UAAU,GAAGC,gBAAU,CAACC,iDAA4B,CAAC;AAC3D,EAAA,MAAMC,YAAY,GAAGF,gBAAU,CAACG,mDAA8B,CAAC;EAE/D,oBACEC,cAAA,CAACC,mBAAa,EAAA;AACZC,IAAAA,EAAE,EAAC,KAAK;AACRV,IAAAA,KAAK,EAAEA,KAAM;AACb,IAAA,cAAA,EAAcG,UAAW;AACzB,IAAA,eAAA,EAAeG,YAAa;AAC5BL,IAAAA,QAAQ,EAAEA,QAAS;AACnBU,IAAAA,SAAS,EAAEA,CAAC;MAAEC,MAAM;AAAEX,MAAAA,QAAQ,EAAEY;AAAU,KAAE,KAC1CC,SAAI,CACF,qDAAqD,EACrDF,MAAM,IAAI,0CAA0C,EACpDC,UAAU,IAAI,4CAA4C,CAE7D;AAAAX,IAAAA,QAAA,EAEAA,CAAC;AAAEa,MAAAA;KAAU,kBACZC,eAAA,CAAAC,mBAAA,EAAA;AAAAf,MAAAA,QAAA,gBACEM,cAAA,CAAA,KAAA,EAAA;AAAKG,QAAAA,SAAS,EAAC,wBAAwB;AAAAT,QAAAA,QAAA,EAAEA;AAAQ,OAAM,CACvD,eAAAM,cAAA,CAACU,WAAK,EAAA;AACJC,QAAAA,IAAI,EAAE,EAAG;QACTR,SAAS,EAAEG,SAAI,CACb,8BAA8B,EAC9B,CAACC,QAAQ,IAAI,4CAA4C;AACzD,OAAA,CAEN;KAAA;AACD,GACY,CAAC;AAEpB;;;;"}
@@ -1,40 +0,0 @@
1
- import { Check } from '@transferwise/icons';
2
- import { clsx } from 'clsx';
3
- import { useContext } from 'react';
4
- import { ListboxOption } from '@headlessui/react';
5
- import { SelectInputItemsCountContext, SelectInputItemPositionContext } from '../SelectInput.contexts.mjs';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
-
8
- function SelectInputOption({
9
- value,
10
- disabled,
11
- children
12
- }) {
13
- const itemsCount = useContext(SelectInputItemsCountContext);
14
- const itemPosition = useContext(SelectInputItemPositionContext);
15
- return /*#__PURE__*/jsx(ListboxOption, {
16
- as: "div",
17
- value: value,
18
- "aria-setsize": itemsCount,
19
- "aria-posinset": itemPosition,
20
- disabled: disabled,
21
- className: ({
22
- active,
23
- disabled: uiDisabled
24
- }) => clsx('np-select-input-option-container np-text-body-large', active && 'np-select-input-option-container--active', uiDisabled && 'np-select-input-option-container--disabled'),
25
- children: ({
26
- selected
27
- }) => /*#__PURE__*/jsxs(Fragment, {
28
- children: [/*#__PURE__*/jsx("div", {
29
- className: "np-select-input-option",
30
- children: children
31
- }), /*#__PURE__*/jsx(Check, {
32
- size: 16,
33
- className: clsx('np-select-input-option-check', !selected && 'np-select-input-option-check--not-selected')
34
- })]
35
- })
36
- });
37
- }
38
-
39
- export { SelectInputOption };
40
- //# sourceMappingURL=SelectInputOption.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOption.mjs","sources":["../../../../src/inputs/SelectInput/Option/SelectInputOption.tsx"],"sourcesContent":["import { Check } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useContext } from 'react';\nimport { ListboxOption } from '@headlessui/react';\nimport {\n SelectInputItemsCountContext,\n SelectInputItemPositionContext,\n} from '../SelectInput.contexts';\n\n/**\n * Props for the SelectInputOption component.\n */\nexport interface SelectInputOptionProps<T = string> {\n value: T;\n disabled?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * A selectable option in a SelectInput dropdown.\n * Includes accessibility support and styling for selected, active, and disabled states.\n */\nexport function SelectInputOption<T = string>({\n value,\n disabled,\n children,\n}: SelectInputOptionProps<T>) {\n const itemsCount = useContext(SelectInputItemsCountContext);\n const itemPosition = useContext(SelectInputItemPositionContext);\n\n return (\n <ListboxOption\n as=\"div\"\n value={value}\n aria-setsize={itemsCount}\n aria-posinset={itemPosition}\n disabled={disabled}\n className={({ active, disabled: uiDisabled }) =>\n clsx(\n 'np-select-input-option-container np-text-body-large',\n active && 'np-select-input-option-container--active',\n uiDisabled && 'np-select-input-option-container--disabled',\n )\n }\n >\n {({ selected }) => (\n <>\n <div className=\"np-select-input-option\">{children}</div>\n <Check\n size={16}\n className={clsx(\n 'np-select-input-option-check',\n !selected && 'np-select-input-option-check--not-selected',\n )}\n />\n </>\n )}\n </ListboxOption>\n );\n}\n"],"names":["SelectInputOption","value","disabled","children","itemsCount","useContext","SelectInputItemsCountContext","itemPosition","SelectInputItemPositionContext","_jsx","ListboxOption","as","className","active","uiDisabled","clsx","selected","_jsxs","_Fragment","Check","size"],"mappings":";;;;;;;AAsBM,SAAUA,iBAAiBA,CAAa;EAC5CC,KAAK;EACLC,QAAQ;AACRC,EAAAA;AAAQ,CACkB,EAAA;AAC1B,EAAA,MAAMC,UAAU,GAAGC,UAAU,CAACC,4BAA4B,CAAC;AAC3D,EAAA,MAAMC,YAAY,GAAGF,UAAU,CAACG,8BAA8B,CAAC;EAE/D,oBACEC,GAAA,CAACC,aAAa,EAAA;AACZC,IAAAA,EAAE,EAAC,KAAK;AACRV,IAAAA,KAAK,EAAEA,KAAM;AACb,IAAA,cAAA,EAAcG,UAAW;AACzB,IAAA,eAAA,EAAeG,YAAa;AAC5BL,IAAAA,QAAQ,EAAEA,QAAS;AACnBU,IAAAA,SAAS,EAAEA,CAAC;MAAEC,MAAM;AAAEX,MAAAA,QAAQ,EAAEY;AAAU,KAAE,KAC1CC,IAAI,CACF,qDAAqD,EACrDF,MAAM,IAAI,0CAA0C,EACpDC,UAAU,IAAI,4CAA4C,CAE7D;AAAAX,IAAAA,QAAA,EAEAA,CAAC;AAAEa,MAAAA;KAAU,kBACZC,IAAA,CAAAC,QAAA,EAAA;AAAAf,MAAAA,QAAA,gBACEM,GAAA,CAAA,KAAA,EAAA;AAAKG,QAAAA,SAAS,EAAC,wBAAwB;AAAAT,QAAAA,QAAA,EAAEA;AAAQ,OAAM,CACvD,eAAAM,GAAA,CAACU,KAAK,EAAA;AACJC,QAAAA,IAAI,EAAE,EAAG;QACTR,SAAS,EAAEG,IAAI,CACb,8BAA8B,EAC9B,CAACC,QAAQ,IAAI,4CAA4C;AACzD,OAAA,CAEN;KAAA;AACD,GACY,CAAC;AAEpB;;;;"}
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- var clsx = require('clsx');
4
- var React = require('react');
5
- var SelectInput_contexts = require('../SelectInput.contexts.js');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- function SelectInputOptionContent({
9
- title,
10
- note,
11
- description,
12
- icon
13
- }) {
14
- const withinTrigger = React.useContext(SelectInput_contexts.SelectInputOptionContentWithinTriggerContext);
15
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
16
- className: clsx.clsx('np-select-input-option-content-container', (note || description) && 'np-text-body-large'),
17
- children: [icon ? /*#__PURE__*/jsxRuntime.jsx("div", {
18
- className: clsx.clsx('np-select-input-option-content-icon', !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger'),
19
- children: icon
20
- }) : null, /*#__PURE__*/jsxRuntime.jsxs("div", {
21
- className: "np-select-input-option-content-text",
22
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
23
- className: clsx.clsx('np-select-input-option-content-text-line-1', withinTrigger && 'np-select-input-option-content-text-within-trigger'),
24
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
25
- className: "d-inline",
26
- children: title
27
- }), note ? /*#__PURE__*/jsxRuntime.jsx("span", {
28
- className: "np-select-input-option-content-text-secondary np-text-body-default",
29
- children: note
30
- }) : null]
31
- }), description ? /*#__PURE__*/jsxRuntime.jsx("div", {
32
- className: clsx.clsx('np-select-input-option-content-text-secondary np-text-body-default', withinTrigger && 'np-select-input-option-content-text-within-trigger np-select-input-option-description-in-trigger'),
33
- children: description
34
- }) : null]
35
- })]
36
- });
37
- }
38
-
39
- exports.SelectInputOptionContent = SelectInputOptionContent;
40
- //# sourceMappingURL=SelectInputOptionContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOptionContent.js","sources":["../../../../src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useContext } from 'react';\nimport { SelectInputOptionContentWithinTriggerContext } from '../SelectInput.contexts';\n\n/**\n * Props for the SelectInputOptionContent component.\n */\nexport interface SelectInputOptionContentProps {\n title: React.ReactNode;\n note?: string;\n description?: string;\n icon?: React.ReactNode;\n}\n\n/**\n * Component for rendering structured content within a SelectInput option.\n * Supports title, optional note, description, and icon with different styling\n * based on whether it's rendered within the trigger button or the dropdown.\n */\nexport function SelectInputOptionContent({\n title,\n note,\n description,\n icon,\n}: SelectInputOptionContentProps) {\n const withinTrigger = useContext(SelectInputOptionContentWithinTriggerContext);\n\n return (\n <div\n className={clsx(\n 'np-select-input-option-content-container',\n (note || description) && 'np-text-body-large',\n )}\n >\n {icon ? (\n <div\n className={clsx(\n 'np-select-input-option-content-icon',\n !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger',\n )}\n >\n {icon}\n </div>\n ) : null}\n\n <div className=\"np-select-input-option-content-text\">\n <div\n className={clsx(\n 'np-select-input-option-content-text-line-1',\n withinTrigger && 'np-select-input-option-content-text-within-trigger',\n )}\n >\n <div className=\"d-inline\">{title}</div>\n {note ? (\n <span className=\"np-select-input-option-content-text-secondary np-text-body-default\">\n {note}\n </span>\n ) : null}\n </div>\n\n {description ? (\n <div\n className={clsx(\n 'np-select-input-option-content-text-secondary np-text-body-default',\n withinTrigger &&\n 'np-select-input-option-content-text-within-trigger np-select-input-option-description-in-trigger',\n )}\n >\n {description}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"names":["SelectInputOptionContent","title","note","description","icon","withinTrigger","useContext","SelectInputOptionContentWithinTriggerContext","_jsxs","className","clsx","children","_jsx"],"mappings":";;;;;;;AAmBM,SAAUA,wBAAwBA,CAAC;EACvCC,KAAK;EACLC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAI,CAC0B,EAAA;AAC9B,EAAA,MAAMC,aAAa,GAAGC,gBAAU,CAACC,iEAA4C,CAAC;AAE9E,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;IACEC,SAAS,EAAEC,SAAI,CACb,0CAA0C,EAC1C,CAACR,IAAI,IAAIC,WAAW,KAAK,oBAAoB,CAC7C;IAAAQ,QAAA,EAAA,CAEDP,IAAI,gBACHQ,cAAA,CAAA,KAAA,EAAA;MACEH,SAAS,EAAEC,SAAI,CACb,qCAAqC,EACrC,CAACL,aAAa,IAAI,yDAAyD,CAC3E;AAAAM,MAAAA,QAAA,EAEDP;AAAI,KACF,CAAC,GACJ,IAAI,eAERI,eAAA,CAAA,KAAA,EAAA;AAAKC,MAAAA,SAAS,EAAC,qCAAqC;AAAAE,MAAAA,QAAA,gBAClDH,eAAA,CAAA,KAAA,EAAA;QACEC,SAAS,EAAEC,SAAI,CACb,4CAA4C,EAC5CL,aAAa,IAAI,oDAAoD,CACrE;AAAAM,QAAAA,QAAA,gBAEFC,cAAA,CAAA,KAAA,EAAA;AAAKH,UAAAA,SAAS,EAAC,UAAU;AAAAE,UAAAA,QAAA,EAAEV;AAAK,SAAM,CACtC,EAACC,IAAI,gBACHU,cAAA,CAAA,MAAA,EAAA;AAAMH,UAAAA,SAAS,EAAC,oEAAoE;AAAAE,UAAAA,QAAA,EACjFT;SACG,CAAC,GACL,IAAI;AAAA,OACL,CAEL,EAACC,WAAW,gBACVS,cAAA,CAAA,KAAA,EAAA;QACEH,SAAS,EAAEC,SAAI,CACb,oEAAoE,EACpEL,aAAa,IACX,kGAAkG,CACpG;AAAAM,QAAAA,QAAA,EAEDR;OACE,CAAC,GACJ,IAAI;AAAA,KACL,CACP;AAAA,GAAK,CAAC;AAEV;;;;"}
@@ -1,38 +0,0 @@
1
- import { clsx } from 'clsx';
2
- import { useContext } from 'react';
3
- import { SelectInputOptionContentWithinTriggerContext } from '../SelectInput.contexts.mjs';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
5
-
6
- function SelectInputOptionContent({
7
- title,
8
- note,
9
- description,
10
- icon
11
- }) {
12
- const withinTrigger = useContext(SelectInputOptionContentWithinTriggerContext);
13
- return /*#__PURE__*/jsxs("div", {
14
- className: clsx('np-select-input-option-content-container', (note || description) && 'np-text-body-large'),
15
- children: [icon ? /*#__PURE__*/jsx("div", {
16
- className: clsx('np-select-input-option-content-icon', !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger'),
17
- children: icon
18
- }) : null, /*#__PURE__*/jsxs("div", {
19
- className: "np-select-input-option-content-text",
20
- children: [/*#__PURE__*/jsxs("div", {
21
- className: clsx('np-select-input-option-content-text-line-1', withinTrigger && 'np-select-input-option-content-text-within-trigger'),
22
- children: [/*#__PURE__*/jsx("div", {
23
- className: "d-inline",
24
- children: title
25
- }), note ? /*#__PURE__*/jsx("span", {
26
- className: "np-select-input-option-content-text-secondary np-text-body-default",
27
- children: note
28
- }) : null]
29
- }), description ? /*#__PURE__*/jsx("div", {
30
- className: clsx('np-select-input-option-content-text-secondary np-text-body-default', withinTrigger && 'np-select-input-option-content-text-within-trigger np-select-input-option-description-in-trigger'),
31
- children: description
32
- }) : null]
33
- })]
34
- });
35
- }
36
-
37
- export { SelectInputOptionContent };
38
- //# sourceMappingURL=SelectInputOptionContent.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOptionContent.mjs","sources":["../../../../src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useContext } from 'react';\nimport { SelectInputOptionContentWithinTriggerContext } from '../SelectInput.contexts';\n\n/**\n * Props for the SelectInputOptionContent component.\n */\nexport interface SelectInputOptionContentProps {\n title: React.ReactNode;\n note?: string;\n description?: string;\n icon?: React.ReactNode;\n}\n\n/**\n * Component for rendering structured content within a SelectInput option.\n * Supports title, optional note, description, and icon with different styling\n * based on whether it's rendered within the trigger button or the dropdown.\n */\nexport function SelectInputOptionContent({\n title,\n note,\n description,\n icon,\n}: SelectInputOptionContentProps) {\n const withinTrigger = useContext(SelectInputOptionContentWithinTriggerContext);\n\n return (\n <div\n className={clsx(\n 'np-select-input-option-content-container',\n (note || description) && 'np-text-body-large',\n )}\n >\n {icon ? (\n <div\n className={clsx(\n 'np-select-input-option-content-icon',\n !withinTrigger && 'np-select-input-option-content-icon--not-within-trigger',\n )}\n >\n {icon}\n </div>\n ) : null}\n\n <div className=\"np-select-input-option-content-text\">\n <div\n className={clsx(\n 'np-select-input-option-content-text-line-1',\n withinTrigger && 'np-select-input-option-content-text-within-trigger',\n )}\n >\n <div className=\"d-inline\">{title}</div>\n {note ? (\n <span className=\"np-select-input-option-content-text-secondary np-text-body-default\">\n {note}\n </span>\n ) : null}\n </div>\n\n {description ? (\n <div\n className={clsx(\n 'np-select-input-option-content-text-secondary np-text-body-default',\n withinTrigger &&\n 'np-select-input-option-content-text-within-trigger np-select-input-option-description-in-trigger',\n )}\n >\n {description}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"names":["SelectInputOptionContent","title","note","description","icon","withinTrigger","useContext","SelectInputOptionContentWithinTriggerContext","_jsxs","className","clsx","children","_jsx"],"mappings":";;;;;AAmBM,SAAUA,wBAAwBA,CAAC;EACvCC,KAAK;EACLC,IAAI;EACJC,WAAW;AACXC,EAAAA;AAAI,CAC0B,EAAA;AAC9B,EAAA,MAAMC,aAAa,GAAGC,UAAU,CAACC,4CAA4C,CAAC;AAE9E,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;IACEC,SAAS,EAAEC,IAAI,CACb,0CAA0C,EAC1C,CAACR,IAAI,IAAIC,WAAW,KAAK,oBAAoB,CAC7C;IAAAQ,QAAA,EAAA,CAEDP,IAAI,gBACHQ,GAAA,CAAA,KAAA,EAAA;MACEH,SAAS,EAAEC,IAAI,CACb,qCAAqC,EACrC,CAACL,aAAa,IAAI,yDAAyD,CAC3E;AAAAM,MAAAA,QAAA,EAEDP;AAAI,KACF,CAAC,GACJ,IAAI,eAERI,IAAA,CAAA,KAAA,EAAA;AAAKC,MAAAA,SAAS,EAAC,qCAAqC;AAAAE,MAAAA,QAAA,gBAClDH,IAAA,CAAA,KAAA,EAAA;QACEC,SAAS,EAAEC,IAAI,CACb,4CAA4C,EAC5CL,aAAa,IAAI,oDAAoD,CACrE;AAAAM,QAAAA,QAAA,gBAEFC,GAAA,CAAA,KAAA,EAAA;AAAKH,UAAAA,SAAS,EAAC,UAAU;AAAAE,UAAAA,QAAA,EAAEV;AAAK,SAAM,CACtC,EAACC,IAAI,gBACHU,GAAA,CAAA,MAAA,EAAA;AAAMH,UAAAA,SAAS,EAAC,oEAAoE;AAAAE,UAAAA,QAAA,EACjFT;SACG,CAAC,GACL,IAAI;AAAA,OACL,CAEL,EAACC,WAAW,gBACVS,GAAA,CAAA,KAAA,EAAA;QACEH,SAAS,EAAEC,IAAI,CACb,oEAAoE,EACpEL,aAAa,IACX,kGAAkG,CACpG;AAAAM,QAAAA,QAAA,EAEDR;OACE,CAAC,GACJ,IAAI;AAAA,KACL,CACP;AAAA,GAAK,CAAC;AAEV;;;;"}
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var useEffectEvent = require('../../../../common/hooks/useEffectEvent.js');
5
- var jsxRuntime = require('react/jsx-runtime');
6
-
7
- const SelectInputOptionsContainer = /*#__PURE__*/React.forwardRef(function SelectInputOptionsContainer({
8
- 'aria-orientation': ariaOrientation,
9
- 'aria-activedescendant': ariaActiveDescendant,
10
- role,
11
- tabIndex,
12
- onAriaActiveDescendantChange,
13
- onKeyDown,
14
- ...restProps
15
- }, ref) {
16
- const handleAriaActiveDescendantChange = useEffectEvent.useEffectEvent(onAriaActiveDescendantChange);
17
- React.useEffect(() => {
18
- handleAriaActiveDescendantChange(ariaActiveDescendant);
19
- }, [ariaActiveDescendant, handleAriaActiveDescendantChange]);
20
- return /*#__PURE__*/jsxRuntime.jsx("div", {
21
- ref: ref,
22
- role: "none",
23
- onKeyDown: event => {
24
- // Prevent confirmation close without an active item
25
- if (event.key === 'Enter' && ariaActiveDescendant == null) {
26
- return;
27
- }
28
- // Required to make ListBox focusable
29
- if (event.key === 'Tab') {
30
- return;
31
- }
32
- // Prevent absorbing Escape early
33
- if (event.key === 'Escape') {
34
- onKeyDown?.({
35
- ...event,
36
- preventDefault: () => {},
37
- stopPropagation: () => {}
38
- });
39
- return;
40
- }
41
- onKeyDown?.(event);
42
- },
43
- ...restProps
44
- });
45
- });
46
-
47
- exports.SelectInputOptionsContainer = SelectInputOptionsContainer;
48
- //# sourceMappingURL=SelectInputOptionsContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOptionsContainer.js","sources":["../../../../../src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx"],"sourcesContent":["import { forwardRef, useEffect } from 'react';\nimport { useEffectEvent } from '../../../../common/hooks/useEffectEvent';\n\n/**\n * Props for the SelectInputOptionsContainer component.\n */\nexport interface SelectInputOptionsContainerProps extends React.ComponentPropsWithRef<'div'> {\n onAriaActiveDescendantChange: (value: React.AriaAttributes['aria-activedescendant']) => void;\n}\n\n/**\n * Container component for SelectInput options.\n * Handles keyboard navigation and accessibility features.\n */\nexport const SelectInputOptionsContainer = forwardRef(function SelectInputOptionsContainer(\n {\n 'aria-orientation': ariaOrientation,\n 'aria-activedescendant': ariaActiveDescendant,\n role,\n tabIndex,\n onAriaActiveDescendantChange,\n onKeyDown,\n ...restProps\n }: SelectInputOptionsContainerProps,\n ref: React.ForwardedRef<HTMLDivElement | null>,\n) {\n const handleAriaActiveDescendantChange = useEffectEvent(onAriaActiveDescendantChange);\n useEffect(() => {\n handleAriaActiveDescendantChange(ariaActiveDescendant);\n }, [ariaActiveDescendant, handleAriaActiveDescendantChange]);\n\n return (\n <div\n ref={ref}\n role=\"none\"\n onKeyDown={(event) => {\n // Prevent confirmation close without an active item\n if (event.key === 'Enter' && ariaActiveDescendant == null) {\n return;\n }\n\n // Required to make ListBox focusable\n if (event.key === 'Tab') {\n return;\n }\n\n // Prevent absorbing Escape early\n if (event.key === 'Escape') {\n onKeyDown?.({\n ...event,\n preventDefault: () => {},\n stopPropagation: () => {},\n });\n return;\n }\n\n onKeyDown?.(event);\n }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputOptionsContainer","forwardRef","ariaOrientation","ariaActiveDescendant","role","tabIndex","onAriaActiveDescendantChange","onKeyDown","restProps","ref","handleAriaActiveDescendantChange","useEffectEvent","useEffect","_jsx","event","key","preventDefault","stopPropagation"],"mappings":";;;;;;MAcaA,2BAA2B,gBAAGC,gBAAU,CAAC,SAASD,2BAA2BA,CACxF;AACE,EAAA,kBAAkB,EAAEE,eAAe;AACnC,EAAA,uBAAuB,EAAEC,oBAAoB;EAC7CC,IAAI;EACJC,QAAQ;EACRC,4BAA4B;EAC5BC,SAAS;EACT,GAAGC;AAAS,CACqB,EACnCC,GAA8C,EAAA;AAE9C,EAAA,MAAMC,gCAAgC,GAAGC,6BAAc,CAACL,4BAA4B,CAAC;AACrFM,EAAAA,eAAS,CAAC,MAAK;IACbF,gCAAgC,CAACP,oBAAoB,CAAC;AACxD,EAAA,CAAC,EAAE,CAACA,oBAAoB,EAAEO,gCAAgC,CAAC,CAAC;AAE5D,EAAA,oBACEG,cAAA,CAAA,KAAA,EAAA;AACEJ,IAAAA,GAAG,EAAEA,GAAI;AACTL,IAAAA,IAAI,EAAC,MAAM;IACXG,SAAS,EAAGO,KAAK,IAAI;AACnB;MACA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,IAAIZ,oBAAoB,IAAI,IAAI,EAAE;AACzD,QAAA;AACF,MAAA;AAEA;AACA,MAAA,IAAIW,KAAK,CAACC,GAAG,KAAK,KAAK,EAAE;AACvB,QAAA;AACF,MAAA;AAEA;AACA,MAAA,IAAID,KAAK,CAACC,GAAG,KAAK,QAAQ,EAAE;AAC1BR,QAAAA,SAAS,GAAG;AACV,UAAA,GAAGO,KAAK;AACRE,UAAAA,cAAc,EAAEA,MAAK,CAAE,CAAC;UACxBC,eAAe,EAAEA,MAAK,CAAE;AACzB,SAAA,CAAC;AACF,QAAA;AACF,MAAA;MAEAV,SAAS,GAAGO,KAAK,CAAC;IACpB,CAAE;IAAA,GACEN;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -1,46 +0,0 @@
1
- import { forwardRef, useEffect } from 'react';
2
- import { useEffectEvent } from '../../../../common/hooks/useEffectEvent.mjs';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- const SelectInputOptionsContainer = /*#__PURE__*/forwardRef(function SelectInputOptionsContainer({
6
- 'aria-orientation': ariaOrientation,
7
- 'aria-activedescendant': ariaActiveDescendant,
8
- role,
9
- tabIndex,
10
- onAriaActiveDescendantChange,
11
- onKeyDown,
12
- ...restProps
13
- }, ref) {
14
- const handleAriaActiveDescendantChange = useEffectEvent(onAriaActiveDescendantChange);
15
- useEffect(() => {
16
- handleAriaActiveDescendantChange(ariaActiveDescendant);
17
- }, [ariaActiveDescendant, handleAriaActiveDescendantChange]);
18
- return /*#__PURE__*/jsx("div", {
19
- ref: ref,
20
- role: "none",
21
- onKeyDown: event => {
22
- // Prevent confirmation close without an active item
23
- if (event.key === 'Enter' && ariaActiveDescendant == null) {
24
- return;
25
- }
26
- // Required to make ListBox focusable
27
- if (event.key === 'Tab') {
28
- return;
29
- }
30
- // Prevent absorbing Escape early
31
- if (event.key === 'Escape') {
32
- onKeyDown?.({
33
- ...event,
34
- preventDefault: () => {},
35
- stopPropagation: () => {}
36
- });
37
- return;
38
- }
39
- onKeyDown?.(event);
40
- },
41
- ...restProps
42
- });
43
- });
44
-
45
- export { SelectInputOptionsContainer };
46
- //# sourceMappingURL=SelectInputOptionsContainer.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputOptionsContainer.mjs","sources":["../../../../../src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx"],"sourcesContent":["import { forwardRef, useEffect } from 'react';\nimport { useEffectEvent } from '../../../../common/hooks/useEffectEvent';\n\n/**\n * Props for the SelectInputOptionsContainer component.\n */\nexport interface SelectInputOptionsContainerProps extends React.ComponentPropsWithRef<'div'> {\n onAriaActiveDescendantChange: (value: React.AriaAttributes['aria-activedescendant']) => void;\n}\n\n/**\n * Container component for SelectInput options.\n * Handles keyboard navigation and accessibility features.\n */\nexport const SelectInputOptionsContainer = forwardRef(function SelectInputOptionsContainer(\n {\n 'aria-orientation': ariaOrientation,\n 'aria-activedescendant': ariaActiveDescendant,\n role,\n tabIndex,\n onAriaActiveDescendantChange,\n onKeyDown,\n ...restProps\n }: SelectInputOptionsContainerProps,\n ref: React.ForwardedRef<HTMLDivElement | null>,\n) {\n const handleAriaActiveDescendantChange = useEffectEvent(onAriaActiveDescendantChange);\n useEffect(() => {\n handleAriaActiveDescendantChange(ariaActiveDescendant);\n }, [ariaActiveDescendant, handleAriaActiveDescendantChange]);\n\n return (\n <div\n ref={ref}\n role=\"none\"\n onKeyDown={(event) => {\n // Prevent confirmation close without an active item\n if (event.key === 'Enter' && ariaActiveDescendant == null) {\n return;\n }\n\n // Required to make ListBox focusable\n if (event.key === 'Tab') {\n return;\n }\n\n // Prevent absorbing Escape early\n if (event.key === 'Escape') {\n onKeyDown?.({\n ...event,\n preventDefault: () => {},\n stopPropagation: () => {},\n });\n return;\n }\n\n onKeyDown?.(event);\n }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputOptionsContainer","forwardRef","ariaOrientation","ariaActiveDescendant","role","tabIndex","onAriaActiveDescendantChange","onKeyDown","restProps","ref","handleAriaActiveDescendantChange","useEffectEvent","useEffect","_jsx","event","key","preventDefault","stopPropagation"],"mappings":";;;;MAcaA,2BAA2B,gBAAGC,UAAU,CAAC,SAASD,2BAA2BA,CACxF;AACE,EAAA,kBAAkB,EAAEE,eAAe;AACnC,EAAA,uBAAuB,EAAEC,oBAAoB;EAC7CC,IAAI;EACJC,QAAQ;EACRC,4BAA4B;EAC5BC,SAAS;EACT,GAAGC;AAAS,CACqB,EACnCC,GAA8C,EAAA;AAE9C,EAAA,MAAMC,gCAAgC,GAAGC,cAAc,CAACL,4BAA4B,CAAC;AACrFM,EAAAA,SAAS,CAAC,MAAK;IACbF,gCAAgC,CAACP,oBAAoB,CAAC;AACxD,EAAA,CAAC,EAAE,CAACA,oBAAoB,EAAEO,gCAAgC,CAAC,CAAC;AAE5D,EAAA,oBACEG,GAAA,CAAA,KAAA,EAAA;AACEJ,IAAAA,GAAG,EAAEA,GAAI;AACTL,IAAAA,IAAI,EAAC,MAAM;IACXG,SAAS,EAAGO,KAAK,IAAI;AACnB;MACA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,IAAIZ,oBAAoB,IAAI,IAAI,EAAE;AACzD,QAAA;AACF,MAAA;AAEA;AACA,MAAA,IAAIW,KAAK,CAACC,GAAG,KAAK,KAAK,EAAE;AACvB,QAAA;AACF,MAAA;AAEA;AACA,MAAA,IAAID,KAAK,CAACC,GAAG,KAAK,QAAQ,EAAE;AAC1BR,QAAAA,SAAS,GAAG;AACV,UAAA,GAAGO,KAAK;AACRE,UAAAA,cAAc,EAAEA,MAAK,CAAE,CAAC;UACxBC,eAAe,EAAEA,MAAK,CAAE;AACzB,SAAA,CAAC;AACF,QAAA;AACF,MAAA;MAEAV,SAAS,GAAGO,KAAK,CAAC;IACpB,CAAE;IAAA,GACEN;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}