@transferwise/components 0.0.0-experimental-010a0a4 → 0.0.0-experimental-666b489

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 (676) hide show
  1. package/build/accordion/Accordion.js.map +1 -1
  2. package/build/accordion/Accordion.mjs.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js.map +1 -1
  6. package/build/actionButton/ActionButton.mjs.map +1 -1
  7. package/build/actionOption/ActionOption.js.map +1 -1
  8. package/build/actionOption/ActionOption.mjs.map +1 -1
  9. package/build/alert/Alert.js.map +1 -1
  10. package/build/alert/Alert.mjs.map +1 -1
  11. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  12. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  13. package/build/avatar/Avatar.js.map +1 -1
  14. package/build/avatar/Avatar.mjs.map +1 -1
  15. package/build/avatar/avatarTypes.js.map +1 -1
  16. package/build/avatar/avatarTypes.mjs.map +1 -1
  17. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  18. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  19. package/build/avatarView/AvatarView.js.map +1 -1
  20. package/build/avatarView/AvatarView.mjs.map +1 -1
  21. package/build/avatarView/NotificationDot.js.map +1 -1
  22. package/build/avatarView/NotificationDot.mjs.map +1 -1
  23. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  24. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  25. package/build/badge/Badge.js.map +1 -1
  26. package/build/badge/Badge.mjs.map +1 -1
  27. package/build/badge/BadgeAssets.js.map +1 -1
  28. package/build/badge/BadgeAssets.mjs.map +1 -1
  29. package/build/body/Body.js.map +1 -1
  30. package/build/body/Body.mjs.map +1 -1
  31. package/build/button/Button.js.map +1 -1
  32. package/build/button/Button.mjs.map +1 -1
  33. package/build/button/Button.resolver.js.map +1 -1
  34. package/build/button/Button.resolver.mjs.map +1 -1
  35. package/build/button/LegacyButton.js.map +1 -1
  36. package/build/button/LegacyButton.mjs +1 -1
  37. package/build/button/LegacyButton.mjs.map +1 -1
  38. package/build/button/classMap.js.map +1 -1
  39. package/build/button/classMap.mjs.map +1 -1
  40. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  41. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  42. package/build/card/Card.js.map +1 -1
  43. package/build/card/Card.mjs.map +1 -1
  44. package/build/carousel/Carousel.js.map +1 -1
  45. package/build/carousel/Carousel.mjs.map +1 -1
  46. package/build/checkbox/Checkbox.js.map +1 -1
  47. package/build/checkbox/Checkbox.mjs.map +1 -1
  48. package/build/checkboxButton/CheckboxButton.js.map +1 -1
  49. package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
  50. package/build/checkboxOption/CheckboxOption.js.map +1 -1
  51. package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
  52. package/build/chevron/Chevron.js.map +1 -1
  53. package/build/chevron/Chevron.mjs.map +1 -1
  54. package/build/chips/Chip.js.map +1 -1
  55. package/build/chips/Chip.mjs.map +1 -1
  56. package/build/chips/Chips.js.map +1 -1
  57. package/build/chips/Chips.messages.js.map +1 -1
  58. package/build/chips/Chips.messages.mjs.map +1 -1
  59. package/build/chips/Chips.mjs.map +1 -1
  60. package/build/circularButton/CircularButton.js.map +1 -1
  61. package/build/circularButton/CircularButton.mjs.map +1 -1
  62. package/build/common/DOMOperations/DOMOperations.js.map +1 -1
  63. package/build/common/DOMOperations/DOMOperations.mjs.map +1 -1
  64. package/build/common/Option/Option.js.map +1 -1
  65. package/build/common/Option/Option.mjs.map +1 -1
  66. package/build/common/RadioButton/RadioButton.js.map +1 -1
  67. package/build/common/RadioButton/RadioButton.mjs.map +1 -1
  68. package/build/common/bottomSheet/BottomSheet.js.map +1 -1
  69. package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
  70. package/build/common/card/Card.js.map +1 -1
  71. package/build/common/card/Card.mjs.map +1 -1
  72. package/build/common/circle/Circle.js.map +1 -1
  73. package/build/common/circle/Circle.mjs.map +1 -1
  74. package/build/common/closeButton/CloseButton.js.map +1 -1
  75. package/build/common/closeButton/CloseButton.messages.js.map +1 -1
  76. package/build/common/closeButton/CloseButton.messages.mjs.map +1 -1
  77. package/build/common/closeButton/CloseButton.mjs.map +1 -1
  78. package/build/common/colors.js.map +1 -1
  79. package/build/common/colors.mjs.map +1 -1
  80. package/build/common/dateUtils/getDateView/getDateView.js.map +1 -1
  81. package/build/common/dateUtils/getDateView/getDateView.mjs.map +1 -1
  82. package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -1
  83. package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -1
  84. package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js.map +1 -1
  85. package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs.map +1 -1
  86. package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -1
  87. package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -1
  88. package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
  89. package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
  90. package/build/common/dateUtils/isWithinRange/isWithinRange.js.map +1 -1
  91. package/build/common/dateUtils/isWithinRange/isWithinRange.mjs.map +1 -1
  92. package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -1
  93. package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -1
  94. package/build/common/deviceDetection/deviceDetection.js.map +1 -1
  95. package/build/common/deviceDetection/deviceDetection.mjs.map +1 -1
  96. package/build/common/direction.js.map +1 -1
  97. package/build/common/direction.mjs.map +1 -1
  98. package/build/common/domHelpers/documentIosClick.js.map +1 -1
  99. package/build/common/domHelpers/documentIosClick.mjs.map +1 -1
  100. package/build/common/fileType.js.map +1 -1
  101. package/build/common/fileType.mjs.map +1 -1
  102. package/build/common/flowHeader/FlowHeader.js.map +1 -1
  103. package/build/common/flowHeader/FlowHeader.mjs.map +1 -1
  104. package/build/common/focusBoundary/FocusBoundary.js.map +1 -1
  105. package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -1
  106. package/build/common/historyNavigator/historyNavigator.js.map +1 -1
  107. package/build/common/historyNavigator/historyNavigator.mjs.map +1 -1
  108. package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -1
  109. package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -1
  110. package/build/common/hooks/useDirection/useDirection.js.map +1 -1
  111. package/build/common/hooks/useDirection/useDirection.mjs.map +1 -1
  112. package/build/common/hooks/useEffectEvent.js.map +1 -1
  113. package/build/common/hooks/useEffectEvent.mjs.map +1 -1
  114. package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
  115. package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
  116. package/build/common/hooks/useLayout/useLayout.js.map +1 -1
  117. package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
  118. package/build/common/hooks/useMedia.js.map +1 -1
  119. package/build/common/hooks/useMedia.mjs.map +1 -1
  120. package/build/common/hooks/useResizeObserver.js.map +1 -1
  121. package/build/common/hooks/useResizeObserver.mjs.map +1 -1
  122. package/build/common/hooks/useScreenSize.js.map +1 -1
  123. package/build/common/hooks/useScreenSize.mjs.map +1 -1
  124. package/build/common/hooks/useVirtualKeyboard.js.map +1 -1
  125. package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -1
  126. package/build/common/initials.js.map +1 -1
  127. package/build/common/initials.mjs.map +1 -1
  128. package/build/common/locale/index.js.map +1 -1
  129. package/build/common/locale/index.mjs.map +1 -1
  130. package/build/common/panel/Panel.js.map +1 -1
  131. package/build/common/panel/Panel.mjs.map +1 -1
  132. package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js.map +1 -1
  133. package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs.map +1 -1
  134. package/build/common/preventScroll/PreventScroll.js.map +1 -1
  135. package/build/common/preventScroll/PreventScroll.mjs.map +1 -1
  136. package/build/common/propsValues/breakpoint.js.map +1 -1
  137. package/build/common/propsValues/breakpoint.mjs.map +1 -1
  138. package/build/common/propsValues/control.js.map +1 -1
  139. package/build/common/propsValues/control.mjs.map +1 -1
  140. package/build/common/propsValues/dateMode.js.map +1 -1
  141. package/build/common/propsValues/dateMode.mjs.map +1 -1
  142. package/build/common/propsValues/layouts.js.map +1 -1
  143. package/build/common/propsValues/layouts.mjs.map +1 -1
  144. package/build/common/propsValues/markdownNodeType.js.map +1 -1
  145. package/build/common/propsValues/markdownNodeType.mjs.map +1 -1
  146. package/build/common/propsValues/monthFormat.js.map +1 -1
  147. package/build/common/propsValues/monthFormat.mjs.map +1 -1
  148. package/build/common/propsValues/position.js.map +1 -1
  149. package/build/common/propsValues/position.mjs.map +1 -1
  150. package/build/common/propsValues/profileType.js.map +1 -1
  151. package/build/common/propsValues/profileType.mjs.map +1 -1
  152. package/build/common/propsValues/scroll.js.map +1 -1
  153. package/build/common/propsValues/scroll.mjs.map +1 -1
  154. package/build/common/propsValues/sentiment.js.map +1 -1
  155. package/build/common/propsValues/sentiment.mjs.map +1 -1
  156. package/build/common/propsValues/size.js.map +1 -1
  157. package/build/common/propsValues/size.mjs.map +1 -1
  158. package/build/common/propsValues/status.js.map +1 -1
  159. package/build/common/propsValues/status.mjs.map +1 -1
  160. package/build/common/propsValues/type.js.map +1 -1
  161. package/build/common/propsValues/type.mjs.map +1 -1
  162. package/build/common/propsValues/typography.js.map +1 -1
  163. package/build/common/propsValues/typography.mjs.map +1 -1
  164. package/build/common/propsValues/variant.js.map +1 -1
  165. package/build/common/propsValues/variant.mjs.map +1 -1
  166. package/build/common/propsValues/width.js.map +1 -1
  167. package/build/common/propsValues/width.mjs.map +1 -1
  168. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  169. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  170. package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -1
  171. package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -1
  172. package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -1
  173. package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -1
  174. package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -1
  175. package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -1
  176. package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -1
  177. package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -1
  178. package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -1
  179. package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -1
  180. package/build/common/theme.js.map +1 -1
  181. package/build/common/theme.mjs.map +1 -1
  182. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  183. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  184. package/build/dateInput/DateInput.js.map +1 -1
  185. package/build/dateInput/DateInput.messages.js.map +1 -1
  186. package/build/dateInput/DateInput.messages.mjs.map +1 -1
  187. package/build/dateInput/DateInput.mjs.map +1 -1
  188. package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -1
  189. package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -1
  190. package/build/dateLookup/DateLookup.js +4 -4
  191. package/build/dateLookup/DateLookup.js.map +1 -1
  192. package/build/dateLookup/DateLookup.messages.js.map +1 -1
  193. package/build/dateLookup/DateLookup.messages.mjs.map +1 -1
  194. package/build/dateLookup/DateLookup.mjs +4 -4
  195. package/build/dateLookup/DateLookup.mjs.map +1 -1
  196. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  197. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  198. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  199. package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -1
  200. package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -1
  201. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  202. package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -1
  203. package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -1
  204. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +3 -3
  205. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
  206. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +3 -3
  207. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
  208. package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -1
  209. package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -1
  210. package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -1
  211. package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -1
  212. package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -1
  213. package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -1
  214. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
  215. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -1
  216. package/build/dateLookup/tableLink/TableLink.js.map +1 -1
  217. package/build/dateLookup/tableLink/TableLink.mjs.map +1 -1
  218. package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -1
  219. package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -1
  220. package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
  221. package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -1
  222. package/build/decision/Decision.js.map +1 -1
  223. package/build/decision/Decision.mjs.map +1 -1
  224. package/build/definitionList/DefinitionList.js.map +1 -1
  225. package/build/definitionList/DefinitionList.mjs.map +1 -1
  226. package/build/dimmer/Dimmer.js +67 -41
  227. package/build/dimmer/Dimmer.js.map +1 -1
  228. package/build/dimmer/Dimmer.mjs +69 -43
  229. package/build/dimmer/Dimmer.mjs.map +1 -1
  230. package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
  231. package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
  232. package/build/display/Display.js.map +1 -1
  233. package/build/display/Display.mjs.map +1 -1
  234. package/build/divider/Divider.js.map +1 -1
  235. package/build/divider/Divider.mjs.map +1 -1
  236. package/build/drawer/Drawer.js.map +1 -1
  237. package/build/drawer/Drawer.mjs.map +1 -1
  238. package/build/dropFade/DropFade.js.map +1 -1
  239. package/build/dropFade/DropFade.mjs.map +1 -1
  240. package/build/emphasis/Emphasis.js.map +1 -1
  241. package/build/emphasis/Emphasis.mjs.map +1 -1
  242. package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
  243. package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
  244. package/build/field/Field.js.map +1 -1
  245. package/build/field/Field.mjs.map +1 -1
  246. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  247. package/build/flowNavigation/FlowNavigation.messages.js.map +1 -1
  248. package/build/flowNavigation/FlowNavigation.messages.mjs.map +1 -1
  249. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  250. package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
  251. package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
  252. package/build/header/Header.js.map +1 -1
  253. package/build/header/Header.mjs.map +1 -1
  254. package/build/i18n/commonMessages/Button.messages.js.map +1 -1
  255. package/build/i18n/commonMessages/Button.messages.mjs.map +1 -1
  256. package/build/i18n/index.js.map +1 -1
  257. package/build/i18n/index.mjs.map +1 -1
  258. package/build/iconButton/IconButton.js.map +1 -1
  259. package/build/iconButton/IconButton.mjs.map +1 -1
  260. package/build/image/Image.js.map +1 -1
  261. package/build/image/Image.mjs.map +1 -1
  262. package/build/info/Info.js.map +1 -1
  263. package/build/info/Info.messages.js.map +1 -1
  264. package/build/info/Info.messages.mjs.map +1 -1
  265. package/build/info/Info.mjs.map +1 -1
  266. package/build/info/infoPresentations.js.map +1 -1
  267. package/build/info/infoPresentations.mjs.map +1 -1
  268. package/build/inlineAlert/InlineAlert.js.map +1 -1
  269. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  270. package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -1
  271. package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs.map +1 -1
  272. package/build/inputs/Input.js.map +1 -1
  273. package/build/inputs/Input.mjs.map +1 -1
  274. package/build/inputs/InputGroup.js +16 -20
  275. package/build/inputs/InputGroup.js.map +1 -1
  276. package/build/inputs/InputGroup.mjs +17 -21
  277. package/build/inputs/InputGroup.mjs.map +1 -1
  278. package/build/inputs/SearchInput.js.map +1 -1
  279. package/build/inputs/SearchInput.mjs.map +1 -1
  280. package/build/inputs/SelectInput.js +6 -1
  281. package/build/inputs/SelectInput.js.map +1 -1
  282. package/build/inputs/SelectInput.messages.js.map +1 -1
  283. package/build/inputs/SelectInput.messages.mjs.map +1 -1
  284. package/build/inputs/SelectInput.mjs +6 -1
  285. package/build/inputs/SelectInput.mjs.map +1 -1
  286. package/build/inputs/TextArea.js.map +1 -1
  287. package/build/inputs/TextArea.mjs.map +1 -1
  288. package/build/inputs/_BottomSheet.js +8 -1
  289. package/build/inputs/_BottomSheet.js.map +1 -1
  290. package/build/inputs/_BottomSheet.mjs +9 -2
  291. package/build/inputs/_BottomSheet.mjs.map +1 -1
  292. package/build/inputs/_ButtonInput.js.map +1 -1
  293. package/build/inputs/_ButtonInput.mjs.map +1 -1
  294. package/build/inputs/_Popover.js +8 -1
  295. package/build/inputs/_Popover.js.map +1 -1
  296. package/build/inputs/_Popover.mjs +10 -3
  297. package/build/inputs/_Popover.mjs.map +1 -1
  298. package/build/inputs/_common.js.map +1 -1
  299. package/build/inputs/_common.mjs.map +1 -1
  300. package/build/inputs/contexts.js.map +1 -1
  301. package/build/inputs/contexts.mjs.map +1 -1
  302. package/build/instructionsList/InstructionsList.js.map +1 -1
  303. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  304. package/build/label/Label.js.map +1 -1
  305. package/build/label/Label.messages.js.map +1 -1
  306. package/build/label/Label.messages.mjs.map +1 -1
  307. package/build/label/Label.mjs.map +1 -1
  308. package/build/legacylistItem/LegacyListItem.js.map +1 -1
  309. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  310. package/build/legacylistItem/List.js.map +1 -1
  311. package/build/legacylistItem/List.mjs.map +1 -1
  312. package/build/link/Link.js.map +1 -1
  313. package/build/link/Link.messages.js.map +1 -1
  314. package/build/link/Link.messages.mjs.map +1 -1
  315. package/build/link/Link.mjs.map +1 -1
  316. package/build/loader/Loader.js.map +1 -1
  317. package/build/loader/Loader.mjs.map +1 -1
  318. package/build/logo/Logo.js.map +1 -1
  319. package/build/logo/Logo.mjs +1 -1
  320. package/build/logo/Logo.mjs.map +1 -1
  321. package/build/logo/logo-assets.js.map +1 -1
  322. package/build/logo/logo-assets.mjs.map +1 -1
  323. package/build/markdown/Markdown.js +20 -4
  324. package/build/markdown/Markdown.js.map +1 -1
  325. package/build/markdown/Markdown.mjs +1 -1
  326. package/build/markdown/Markdown.mjs.map +1 -1
  327. package/build/mocks.js.map +1 -1
  328. package/build/mocks.mjs.map +1 -1
  329. package/build/modal/Modal.js.map +1 -1
  330. package/build/modal/Modal.mjs.map +1 -1
  331. package/build/money/Money.js.map +1 -1
  332. package/build/money/Money.mjs.map +1 -1
  333. package/build/moneyInput/MoneyInput.js +2 -2
  334. package/build/moneyInput/MoneyInput.js.map +1 -1
  335. package/build/moneyInput/MoneyInput.messages.js.map +1 -1
  336. package/build/moneyInput/MoneyInput.messages.mjs.map +1 -1
  337. package/build/moneyInput/MoneyInput.mjs +2 -2
  338. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  339. package/build/moneyInput/currencyFormatting.js.map +1 -1
  340. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  341. package/build/navigationOption/NavigationOption.js.map +1 -1
  342. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  343. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  344. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  345. package/build/nudge/Nudge.js.map +1 -1
  346. package/build/nudge/Nudge.mjs.map +1 -1
  347. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  348. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  349. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  350. package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
  351. package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
  352. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  353. package/build/phoneNumberInput/data/countries.js.map +1 -1
  354. package/build/phoneNumberInput/data/countries.mjs.map +1 -1
  355. package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js.map +1 -1
  356. package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs.map +1 -1
  357. package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js.map +1 -1
  358. package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs.map +1 -1
  359. package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -1
  360. package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -1
  361. package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -1
  362. package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -1
  363. package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -1
  364. package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -1
  365. package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -1
  366. package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -1
  367. package/build/phoneNumberInput/utils/setDefaultPrefix/index.js.map +1 -1
  368. package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs.map +1 -1
  369. package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -1
  370. package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -1
  371. package/build/popover/Popover.js.map +1 -1
  372. package/build/popover/Popover.mjs +1 -1
  373. package/build/popover/Popover.mjs.map +1 -1
  374. package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -1
  375. package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.mjs.map +1 -1
  376. package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -1
  377. package/build/primitives/PrimitiveButton/PrimitiveButton.mjs.map +1 -1
  378. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  379. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  380. package/build/progress/Progress.js.map +1 -1
  381. package/build/progress/Progress.mjs.map +1 -1
  382. package/build/progressBar/ProgressBar.js.map +1 -1
  383. package/build/progressBar/ProgressBar.mjs.map +1 -1
  384. package/build/promoCard/PromoCard.js.map +1 -1
  385. package/build/promoCard/PromoCard.mjs.map +1 -1
  386. package/build/promoCard/PromoCardContext.js.map +1 -1
  387. package/build/promoCard/PromoCardContext.mjs.map +1 -1
  388. package/build/promoCard/PromoCardGroup.js +1 -1
  389. package/build/promoCard/PromoCardGroup.js.map +1 -1
  390. package/build/promoCard/PromoCardGroup.mjs +1 -1
  391. package/build/promoCard/PromoCardGroup.mjs.map +1 -1
  392. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  393. package/build/promoCard/PromoCardIndicator.mjs +1 -1
  394. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  395. package/build/provider/Provider.js.map +1 -1
  396. package/build/provider/Provider.mjs.map +1 -1
  397. package/build/provider/direction/DirectionProvider.js.map +1 -1
  398. package/build/provider/direction/DirectionProvider.mjs.map +1 -1
  399. package/build/provider/language/LanguageProvider.js.map +1 -1
  400. package/build/provider/language/LanguageProvider.mjs.map +1 -1
  401. package/build/provider/overlay/OverlayIdProvider.js.map +1 -1
  402. package/build/provider/overlay/OverlayIdProvider.mjs +1 -1
  403. package/build/provider/overlay/OverlayIdProvider.mjs.map +1 -1
  404. package/build/radio/Radio.js.map +1 -1
  405. package/build/radio/Radio.mjs.map +1 -1
  406. package/build/radioGroup/RadioGroup.js.map +1 -1
  407. package/build/radioGroup/RadioGroup.mjs.map +1 -1
  408. package/build/radioOption/RadioOption.js.map +1 -1
  409. package/build/radioOption/RadioOption.mjs.map +1 -1
  410. package/build/section/Section.js.map +1 -1
  411. package/build/section/Section.mjs.map +1 -1
  412. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  413. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  414. package/build/select/Select.js +14 -22
  415. package/build/select/Select.js.map +1 -1
  416. package/build/select/Select.messages.js.map +1 -1
  417. package/build/select/Select.messages.mjs.map +1 -1
  418. package/build/select/Select.mjs +14 -22
  419. package/build/select/Select.mjs.map +1 -1
  420. package/build/select/option/Option.js.map +1 -1
  421. package/build/select/option/Option.mjs.map +1 -1
  422. package/build/select/searchBox/SearchBox.js.map +1 -1
  423. package/build/select/searchBox/SearchBox.mjs.map +1 -1
  424. package/build/selectOption/SelectOption.js.map +1 -1
  425. package/build/selectOption/SelectOption.messages.js.map +1 -1
  426. package/build/selectOption/SelectOption.messages.mjs.map +1 -1
  427. package/build/selectOption/SelectOption.mjs +1 -1
  428. package/build/selectOption/SelectOption.mjs.map +1 -1
  429. package/build/slidingPanel/SlidingPanel.js.map +1 -1
  430. package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
  431. package/build/snackbar/Snackbar.js +1 -1
  432. package/build/snackbar/Snackbar.js.map +1 -1
  433. package/build/snackbar/Snackbar.mjs +1 -1
  434. package/build/snackbar/Snackbar.mjs.map +1 -1
  435. package/build/snackbar/SnackbarContext.js.map +1 -1
  436. package/build/snackbar/SnackbarContext.mjs.map +1 -1
  437. package/build/snackbar/SnackbarProvider.js.map +1 -1
  438. package/build/snackbar/SnackbarProvider.mjs.map +1 -1
  439. package/build/snackbar/useSnackbar.js.map +1 -1
  440. package/build/snackbar/useSnackbar.mjs.map +1 -1
  441. package/build/statusIcon/StatusIcon.js.map +1 -1
  442. package/build/statusIcon/StatusIcon.messages.js.map +1 -1
  443. package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
  444. package/build/statusIcon/StatusIcon.mjs +1 -1
  445. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  446. package/build/stepper/Stepper.js.map +1 -1
  447. package/build/stepper/Stepper.mjs.map +1 -1
  448. package/build/stepper/deviceDetection.js.map +1 -1
  449. package/build/stepper/deviceDetection.mjs.map +1 -1
  450. package/build/sticky/Sticky.js.map +1 -1
  451. package/build/sticky/Sticky.mjs.map +1 -1
  452. package/build/summary/Summary.js.map +1 -1
  453. package/build/summary/Summary.messages.js.map +1 -1
  454. package/build/summary/Summary.messages.mjs.map +1 -1
  455. package/build/summary/Summary.mjs +1 -1
  456. package/build/summary/Summary.mjs.map +1 -1
  457. package/build/switch/Switch.js.map +1 -1
  458. package/build/switch/Switch.mjs.map +1 -1
  459. package/build/switchOption/SwitchOption.js.map +1 -1
  460. package/build/switchOption/SwitchOption.mjs.map +1 -1
  461. package/build/table/Table.js.map +1 -1
  462. package/build/table/Table.messages.js.map +1 -1
  463. package/build/table/Table.messages.mjs.map +1 -1
  464. package/build/table/Table.mjs.map +1 -1
  465. package/build/table/TableCell.js.map +1 -1
  466. package/build/table/TableCell.mjs.map +1 -1
  467. package/build/table/TableHeader.js.map +1 -1
  468. package/build/table/TableHeader.mjs.map +1 -1
  469. package/build/table/TableRow.js.map +1 -1
  470. package/build/table/TableRow.mjs.map +1 -1
  471. package/build/table/TableStatusText.js.map +1 -1
  472. package/build/table/TableStatusText.mjs.map +1 -1
  473. package/build/tabs/Tab.js.map +1 -1
  474. package/build/tabs/Tab.mjs.map +1 -1
  475. package/build/tabs/TabList.js.map +1 -1
  476. package/build/tabs/TabList.mjs.map +1 -1
  477. package/build/tabs/TabPanel.js.map +1 -1
  478. package/build/tabs/TabPanel.mjs.map +1 -1
  479. package/build/tabs/Tabs.js +3 -3
  480. package/build/tabs/Tabs.js.map +1 -1
  481. package/build/tabs/Tabs.mjs +4 -4
  482. package/build/tabs/Tabs.mjs.map +1 -1
  483. package/build/tabs/utils.js +1 -1
  484. package/build/tabs/utils.js.map +1 -1
  485. package/build/tabs/utils.mjs +1 -1
  486. package/build/tabs/utils.mjs.map +1 -1
  487. package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -1
  488. package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs.map +1 -1
  489. package/build/tile/Tile.js.map +1 -1
  490. package/build/tile/Tile.mjs.map +1 -1
  491. package/build/title/Title.js.map +1 -1
  492. package/build/title/Title.mjs.map +1 -1
  493. package/build/tooltip/Tooltip.js.map +1 -1
  494. package/build/tooltip/Tooltip.mjs.map +1 -1
  495. package/build/typeahead/Typeahead.js +57 -61
  496. package/build/typeahead/Typeahead.js.map +1 -1
  497. package/build/typeahead/Typeahead.messages.js.map +1 -1
  498. package/build/typeahead/Typeahead.messages.mjs.map +1 -1
  499. package/build/typeahead/Typeahead.mjs +57 -61
  500. package/build/typeahead/Typeahead.mjs.map +1 -1
  501. package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -2
  502. package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
  503. package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
  504. package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
  505. package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
  506. package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
  507. package/build/typeahead/util/highlight.js.map +1 -1
  508. package/build/typeahead/util/highlight.mjs.map +1 -1
  509. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  510. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  511. package/build/types/badge/Badge.d.ts.map +1 -1
  512. package/build/types/chevron/Chevron.d.ts.map +1 -1
  513. package/build/types/chips/Chip.d.ts.map +1 -1
  514. package/build/types/chips/Chips.d.ts.map +1 -1
  515. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  516. package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
  517. package/build/types/common/colors.d.ts.map +1 -1
  518. package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +1 -1
  519. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
  520. package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
  521. package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts.map +1 -1
  522. package/build/types/common/fakeEvents.d.ts.map +1 -1
  523. package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
  524. package/build/types/common/historyNavigator/historyNavigator.d.ts.map +1 -1
  525. package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts.map +1 -1
  526. package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
  527. package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts.map +1 -1
  528. package/build/types/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.d.ts.map +1 -1
  529. package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts.map +1 -1
  530. package/build/types/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.d.ts.map +1 -1
  531. package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts.map +1 -1
  532. package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts.map +1 -1
  533. package/build/types/common/theme.d.ts.map +1 -1
  534. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  535. package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts.map +1 -1
  536. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  537. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
  538. package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
  539. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
  540. package/build/types/decision/Decision.d.ts.map +1 -1
  541. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  542. package/build/types/dropFade/DropFade.d.ts.map +1 -1
  543. package/build/types/emphasis/Emphasis.d.ts.map +1 -1
  544. package/build/types/field/Field.d.ts.map +1 -1
  545. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  546. package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
  547. package/build/types/header/Header.d.ts.map +1 -1
  548. package/build/types/image/Image.d.ts.map +1 -1
  549. package/build/types/info/Info.d.ts.map +1 -1
  550. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  551. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  552. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  553. package/build/types/inputs/_Popover.d.ts.map +1 -1
  554. package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
  555. package/build/types/link/Link.d.ts.map +1 -1
  556. package/build/types/loader/Loader.d.ts.map +1 -1
  557. package/build/types/markdown/Markdown.d.ts.map +1 -1
  558. package/build/types/modal/Modal.d.ts.map +1 -1
  559. package/build/types/money/Money.d.ts.map +1 -1
  560. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
  561. package/build/types/nudge/Nudge.d.ts.map +1 -1
  562. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  563. package/build/types/phoneNumberInput/utils/cleanNumber/cleanNumber.d.ts.map +1 -1
  564. package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts.map +1 -1
  565. package/build/types/phoneNumberInput/utils/explodeNumberModel/index.d.ts.map +1 -1
  566. package/build/types/phoneNumberInput/utils/findCountryByCode/index.d.ts.map +1 -1
  567. package/build/types/phoneNumberInput/utils/findCountryByPrefix/index.d.ts.map +1 -1
  568. package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts.map +1 -1
  569. package/build/types/phoneNumberInput/utils/isStringNumeric/isStringNumeric.d.ts.map +1 -1
  570. package/build/types/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.d.ts.map +1 -1
  571. package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts.map +1 -1
  572. package/build/types/phoneNumberInput/utils/setDefaultPrefix/index.d.ts.map +1 -1
  573. package/build/types/progress/Progress.d.ts.map +1 -1
  574. package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
  575. package/build/types/provider/direction/DirectionProvider.d.ts.map +1 -1
  576. package/build/types/provider/language/LanguageProvider.d.ts.map +1 -1
  577. package/build/types/provider/overlay/OverlayIdProvider.d.ts.map +1 -1
  578. package/build/types/section/Section.d.ts.map +1 -1
  579. package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
  580. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  581. package/build/types/stepper/Stepper.d.ts.map +1 -1
  582. package/build/types/summary/Summary.d.ts.map +1 -1
  583. package/build/types/switch/Switch.d.ts.map +1 -1
  584. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  585. package/build/types/table/Table.d.ts.map +1 -1
  586. package/build/types/table/TableCell.d.ts.map +1 -1
  587. package/build/types/table/TableHeader.d.ts.map +1 -1
  588. package/build/types/table/TableRow.d.ts.map +1 -1
  589. package/build/types/table/TableStatusText.d.ts.map +1 -1
  590. package/build/types/tabs/Tabs.d.ts.map +1 -1
  591. package/build/types/tabs/utils.d.ts.map +1 -1
  592. package/build/types/test-utils/story-config.d.ts.map +1 -1
  593. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  594. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  595. package/build/types/upload/Upload.d.ts.map +1 -1
  596. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  597. package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
  598. package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
  599. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  600. package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
  601. package/build/upload/Upload.js +2 -2
  602. package/build/upload/Upload.js.map +1 -1
  603. package/build/upload/Upload.messages.js.map +1 -1
  604. package/build/upload/Upload.messages.mjs.map +1 -1
  605. package/build/upload/Upload.mjs +2 -2
  606. package/build/upload/Upload.mjs.map +1 -1
  607. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  608. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  609. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  610. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  611. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  612. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  613. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
  614. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  615. package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -1
  616. package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -1
  617. package/build/upload/utils/getFileType/getFileType.js.map +1 -1
  618. package/build/upload/utils/getFileType/getFileType.mjs.map +1 -1
  619. package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -1
  620. package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -1
  621. package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -1
  622. package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -1
  623. package/build/upload/utils/postData/postData.js.map +1 -1
  624. package/build/upload/utils/postData/postData.mjs.map +1 -1
  625. package/build/uploadInput/UploadInput.js.map +1 -1
  626. package/build/uploadInput/UploadInput.messages.js.map +1 -1
  627. package/build/uploadInput/UploadInput.messages.mjs.map +1 -1
  628. package/build/uploadInput/UploadInput.mjs +2 -2
  629. package/build/uploadInput/UploadInput.mjs.map +1 -1
  630. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  631. package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -1
  632. package/build/uploadInput/uploadButton/UploadButton.messages.mjs.map +1 -1
  633. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  634. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  635. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  636. package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
  637. package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -1
  638. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  639. package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -1
  640. package/build/uploadInput/uploadItem/UploadItem.messages.mjs.map +1 -1
  641. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  642. package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
  643. package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
  644. package/build/utilities/cssValueWithUnit.js.map +1 -1
  645. package/build/utilities/cssValueWithUnit.mjs.map +1 -1
  646. package/build/utilities/logActionRequired.js.map +1 -1
  647. package/build/utilities/logActionRequired.mjs.map +1 -1
  648. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  649. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  650. package/build/withId/withId.js.map +1 -1
  651. package/build/withId/withId.mjs.map +1 -1
  652. package/build/withNextPortal/withNextPortal.js +2 -5
  653. package/build/withNextPortal/withNextPortal.js.map +1 -1
  654. package/build/withNextPortal/withNextPortal.mjs +2 -5
  655. package/build/withNextPortal/withNextPortal.mjs.map +1 -1
  656. package/package.json +55 -55
  657. package/src/alert/Alert.spec.tsx +2 -4
  658. package/src/card/Card.story.tsx +4 -2
  659. package/src/checkbox/Checkbox.story.tsx +3 -2
  660. package/src/common/bottomSheet/BottomSheet.spec.tsx +3 -6
  661. package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -5
  662. package/src/dateInput/DateInput.story.tsx +2 -2
  663. package/src/dateInput/DateInput.tests.story.tsx +11 -10
  664. package/src/dimmer/Dimmer.tsx +72 -44
  665. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +1 -1
  666. package/src/inputs/SelectInput.tsx +11 -2
  667. package/src/inputs/_BottomSheet.tsx +9 -3
  668. package/src/inputs/_Popover.tsx +10 -4
  669. package/src/markdown/Markdown.tsx +2 -1
  670. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +3 -2
  671. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +3 -2
  672. package/src/radioGroup/RadioGroup.story.tsx +2 -2
  673. package/src/typeahead/Typeahead.story.tsx +3 -2
  674. package/src/upload/Upload.story.tsx +1 -1
  675. package/src/withNextPortal/withNextPortal.spec.tsx +1 -1
  676. package/src/withNextPortal/withNextPortal.tsx +1 -10
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../src/inputs/TextArea.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\n\nexport interface TextAreaProps\n extends Merge<\n React.ComponentPropsWithRef<'textarea'>,\n {\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const TextArea = forwardRef(function TextArea(\n { className, ...restProps }: TextAreaProps,\n reference: React.ForwardedRef<HTMLTextAreaElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n\n return (\n <textarea\n ref={reference}\n className={clsx(className, inputClassNameBase(), 'np-text-area')}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["TextArea","forwardRef","className","restProps","reference","inputAttributes","useInputAttributes","_jsx","ref","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAeaA,QAAQ,gBAAGC,gBAAU,CAAC,SAASD,QAAQA,CAClD;EAAEE,SAAS;EAAE,GAAGC,SAAAA;AAAS,CAAiB,EAC1CC,SAAyD,EAAA;AAEzD,EAAA,MAAMC,eAAe,GAAGC,2BAAkB,EAAE,CAAA;AAE5C,EAAA,oBACEC,cAAA,CAAA,UAAA,EAAA;AACEC,IAAAA,GAAG,EAAEJ,SAAU;IACfF,SAAS,EAAEO,SAAI,CAACP,SAAS,EAAEQ,0BAAkB,EAAE,EAAE,cAAc,CAAE;AAAA,IAAA,GAC7DL,eAAe;IAAA,GACfF,SAAAA;AAAS,GAAC,CACd,CAAA;AAEN,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../src/inputs/TextArea.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\n\nexport interface TextAreaProps\n extends Merge<\n React.ComponentPropsWithRef<'textarea'>,\n {\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const TextArea = forwardRef(function TextArea(\n { className, ...restProps }: TextAreaProps,\n reference: React.ForwardedRef<HTMLTextAreaElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n\n return (\n <textarea\n ref={reference}\n className={clsx(className, inputClassNameBase(), 'np-text-area')}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["TextArea","forwardRef","className","restProps","reference","inputAttributes","useInputAttributes","_jsx","ref","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAeaA,QAAQ,gBAAGC,gBAAU,CAAC,SAASD,QAAQA,CAClD;EAAEE,SAAS;EAAE,GAAGC;AAAS,CAAiB,EAC1CC,SAAyD,EAAA;AAEzD,EAAA,MAAMC,eAAe,GAAGC,2BAAkB,EAAE;AAE5C,EAAA,oBACEC,cAAA,CAAA,UAAA,EAAA;AACEC,IAAAA,GAAG,EAAEJ,SAAU;IACfF,SAAS,EAAEO,SAAI,CAACP,SAAS,EAAEQ,0BAAkB,EAAE,EAAE,cAAc,CAAE;AAAA,IAAA,GAC7DL,eAAe;IAAA,GACfF;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.mjs","sources":["../../src/inputs/TextArea.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\n\nexport interface TextAreaProps\n extends Merge<\n React.ComponentPropsWithRef<'textarea'>,\n {\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const TextArea = forwardRef(function TextArea(\n { className, ...restProps }: TextAreaProps,\n reference: React.ForwardedRef<HTMLTextAreaElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n\n return (\n <textarea\n ref={reference}\n className={clsx(className, inputClassNameBase(), 'np-text-area')}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["TextArea","forwardRef","className","restProps","reference","inputAttributes","useInputAttributes","_jsx","ref","clsx","inputClassNameBase"],"mappings":";;;;;;MAeaA,QAAQ,gBAAGC,UAAU,CAAC,SAASD,QAAQA,CAClD;EAAEE,SAAS;EAAE,GAAGC,SAAAA;AAAS,CAAiB,EAC1CC,SAAyD,EAAA;AAEzD,EAAA,MAAMC,eAAe,GAAGC,kBAAkB,EAAE,CAAA;AAE5C,EAAA,oBACEC,GAAA,CAAA,UAAA,EAAA;AACEC,IAAAA,GAAG,EAAEJ,SAAU;IACfF,SAAS,EAAEO,IAAI,CAACP,SAAS,EAAEQ,kBAAkB,EAAE,EAAE,cAAc,CAAE;AAAA,IAAA,GAC7DL,eAAe;IAAA,GACfF,SAAAA;AAAS,GAAC,CACd,CAAA;AAEN,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea.mjs","sources":["../../src/inputs/TextArea.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\n\nexport interface TextAreaProps\n extends Merge<\n React.ComponentPropsWithRef<'textarea'>,\n {\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const TextArea = forwardRef(function TextArea(\n { className, ...restProps }: TextAreaProps,\n reference: React.ForwardedRef<HTMLTextAreaElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n\n return (\n <textarea\n ref={reference}\n className={clsx(className, inputClassNameBase(), 'np-text-area')}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["TextArea","forwardRef","className","restProps","reference","inputAttributes","useInputAttributes","_jsx","ref","clsx","inputClassNameBase"],"mappings":";;;;;;MAeaA,QAAQ,gBAAGC,UAAU,CAAC,SAASD,QAAQA,CAClD;EAAEE,SAAS;EAAE,GAAGC;AAAS,CAAiB,EAC1CC,SAAyD,EAAA;AAEzD,EAAA,MAAMC,eAAe,GAAGC,kBAAkB,EAAE;AAE5C,EAAA,oBACEC,GAAA,CAAA,UAAA,EAAA;AACEC,IAAAA,GAAG,EAAEJ,SAAU;IACfF,SAAS,EAAEO,IAAI,CAACP,SAAS,EAAEQ,kBAAkB,EAAE,EAAE,cAAc,CAAE;AAAA,IAAA,GAC7DL,eAAe;IAAA,GACfF;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -41,12 +41,19 @@ function BottomSheet({
41
41
  getFloatingProps
42
42
  } = react.useInteractions([dismiss, role]);
43
43
  const [floatingKey, setFloatingKey] = React.useState(0);
44
+ const {
45
+ theme,
46
+ screenMode
47
+ } = componentsTheming.useTheme();
44
48
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
45
49
  children: [open ? /*#__PURE__*/jsxRuntime.jsx(PreventScroll.PreventScroll, {}) : null, renderTrigger?.({
46
50
  ref: refs.setReference,
47
51
  getInteractionProps: getReferenceProps
48
52
  }), /*#__PURE__*/jsxRuntime.jsx(react.FloatingPortal, {
49
- children: /*#__PURE__*/jsxRuntime.jsx(componentsTheming.ThemedLayer, {
53
+ children: /*#__PURE__*/jsxRuntime.jsx(componentsTheming.ThemeProvider, {
54
+ theme: "personal",
55
+ screenMode: theme === 'personal' ? screenMode : 'light',
56
+ isNotRootProvider: true,
50
57
  children: /*#__PURE__*/jsxRuntime.jsxs(react$1.Transition, {
51
58
  show: open,
52
59
  className: "np-bottom-sheet-v2-container",
@@ -1 +1 @@
1
- {"version":3,"file":"_BottomSheet.js","sources":["../../src/inputs/_BottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemedLayer } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../common/closeButton';\nimport { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\nimport { Size } from '../common/propsValues/size';\n\nexport interface BottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function BottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: BottomSheetProps) {\n useVirtualKeyboard();\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemedLayer>\n <Transition\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <Transition.Child\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <Transition.Child\n ref={refs.setFloating}\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </Transition.Child>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemedLayer>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["BottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemedLayer","Transition","show","className","beforeEnter","prev","afterLeave","Child","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":";;;;;;;;;;;;;;AAmCM,SAAUA,WAAWA,CAAC;EAC1BC,IAAI;EACJC,aAAa;EACbC,KAAK;EACLC,eAAe;AACfC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA,UAAAA;AACiB,CAAA,EAAA;AACjBC,EAAAA,qCAAkB,EAAE,CAAA;EAEpB,MAAM;IAAEC,IAAI;AAAEC,IAAAA,OAAAA;GAAS,GAAGC,iBAAW,CAAU;IAC7CX,IAAI;IACJY,YAAY,EAAGC,KAAK,IAAI;MACtB,IAAI,CAACA,KAAK,EAAE;AACVP,QAAAA,OAAO,IAAI,CAAA;AACb,OAAA;AACF,KAAA;AACD,GAAA,CAAC,CAAA;AAEF,EAAA,MAAMQ,OAAO,GAAGC,gBAAU,CAACL,OAAO,CAAC,CAAA;AACnC,EAAA,MAAMM,IAAI,GAAGC,aAAO,CAACP,OAAO,CAAC,CAAA;EAC7B,MAAM;IAAEQ,iBAAiB;AAAEC,IAAAA,gBAAAA;GAAkB,GAAGC,qBAAe,CAAC,CAACN,OAAO,EAAEE,IAAI,CAAC,CAAC,CAAA;EAEhF,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAGC,cAAQ,CAAC,CAAC,CAAC,CAAA;EAEjD,oBACEC,eAAA,CAAAC,mBAAA,EAAA;AAAApB,IAAAA,QAAA,EACGL,CAAAA,IAAI,gBAAG0B,cAAA,CAACC,2BAAa,EAAG,EA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,cAAA,CAAA,KAAA,EAAA;AAAKS,sBAAAA,SAAS,EAAC,2BAA2B;sBAAA9B,QAAA,eACxCqB,cAAA,CAACqB,uBAAW,EAAA;wBACVC,IAAI,EAAEC,SAAI,CAACC,KAAM;wBACjBC,OAAO,EAAEA,MAAK;AACZ7C,0BAAAA,OAAO,IAAI,CAAA;AACb,yBAAA;uBAEJ,CAAA;qBAAK,CACL,eAAAkB,eAAA,CAAA,KAAA,EAAA;AACEW,sBAAAA,SAAS,EAAEiB,SAAI,CACb,kCAAkC,EAClClD,KAAK,IAAI,6CAA6C,EACtDE,OAAO,KAAK,IAAI,IAAI,8CAA8C,CAClE;sBAAAC,QAAA,EAAA,CAEDH,KAAK,gBACJwB,cAAA,CAAA,IAAA,EAAA;AAAIS,wBAAAA,SAAS,EAAC,6CAA6C;AAAA9B,wBAAAA,QAAA,EAAEH,KAAAA;AAAK,uBAAK,CAAC,GACtE,IAAI,eACRwB,cAAA,CAAA,KAAA,EAAA;AAAKS,wBAAAA,SAAS,EAAC,8CAA8C;AAAA9B,wBAAAA,QAAA,EAC1DA,QAAAA;AAAQ,uBACN,CACP,CAAA;AAAA,qBAAK,CACP,CAAA;mBAAkB,CAAA;AACpB,iBAAA,EAhCOgB,WAgCG,CAAA;eACU,CAAA;aACZ,CAAA;AACd,WAAK,CACP,CAAA;SAAY,CAAA;OACD,CAAA;AACf,KAAgB,CAClB,CAAA;AAAA,GAAA,CAAG,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"_BottomSheet.js","sources":["../../src/inputs/_BottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../common/closeButton';\nimport { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\nimport { Size } from '../common/propsValues/size';\n\nexport interface BottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function BottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: BottomSheetProps) {\n useVirtualKeyboard();\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider\n theme=\"personal\"\n screenMode={theme === 'personal' ? screenMode : 'light'}\n isNotRootProvider\n >\n <Transition\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <Transition.Child\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <Transition.Child\n ref={refs.setFloating}\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </Transition.Child>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["BottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","isNotRootProvider","Transition","show","className","beforeEnter","prev","afterLeave","Child","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":";;;;;;;;;;;;;;AAmCM,SAAUA,WAAWA,CAAC;EAC1BC,IAAI;EACJC,aAAa;EACbC,KAAK;EACLC,eAAe;AACfC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA;AACiB,CAAA,EAAA;AACjBC,EAAAA,qCAAkB,EAAE;EAEpB,MAAM;IAAEC,IAAI;AAAEC,IAAAA;GAAS,GAAGC,iBAAW,CAAU;IAC7CX,IAAI;IACJY,YAAY,EAAGC,KAAK,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GACtE,IAAI,eACR2B,cAAA,CAAA,KAAA,EAAA;AAAKU,wBAAAA,SAAS,EAAC,8CAA8C;AAAAlC,wBAAAA,QAAA,EAC1DA;AAAQ,uBACN,CACP;AAAA,qBAAK,CACP;mBAAkB;AACpB,iBAAA,EAhCOgB,WAgCG;eACU;aACZ;AACd,WAAK,CACP;SAAY;OACC;AACjB,KAAgB,CAClB;AAAA,GAAA,CAAG;AAEP;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager } from '@floating-ui/react';
2
2
  import { Transition } from '@headlessui/react';
3
3
  import { FocusScope } from '@react-aria/focus';
4
- import { ThemedLayer } from '@wise/components-theming';
4
+ import { useTheme, ThemeProvider } from '@wise/components-theming';
5
5
  import { clsx } from 'clsx';
6
6
  import { useState, Fragment as Fragment$1 } from 'react';
7
7
  import { CloseButton } from '../common/closeButton/CloseButton.mjs';
@@ -39,12 +39,19 @@ function BottomSheet({
39
39
  getFloatingProps
40
40
  } = useInteractions([dismiss, role]);
41
41
  const [floatingKey, setFloatingKey] = useState(0);
42
+ const {
43
+ theme,
44
+ screenMode
45
+ } = useTheme();
42
46
  return /*#__PURE__*/jsxs(Fragment, {
43
47
  children: [open ? /*#__PURE__*/jsx(PreventScroll, {}) : null, renderTrigger?.({
44
48
  ref: refs.setReference,
45
49
  getInteractionProps: getReferenceProps
46
50
  }), /*#__PURE__*/jsx(FloatingPortal, {
47
- children: /*#__PURE__*/jsx(ThemedLayer, {
51
+ children: /*#__PURE__*/jsx(ThemeProvider, {
52
+ theme: "personal",
53
+ screenMode: theme === 'personal' ? screenMode : 'light',
54
+ isNotRootProvider: true,
48
55
  children: /*#__PURE__*/jsxs(Transition, {
49
56
  show: open,
50
57
  className: "np-bottom-sheet-v2-container",
@@ -1 +1 @@
1
- {"version":3,"file":"_BottomSheet.mjs","sources":["../../src/inputs/_BottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemedLayer } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../common/closeButton';\nimport { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\nimport { Size } from '../common/propsValues/size';\n\nexport interface BottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function BottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: BottomSheetProps) {\n useVirtualKeyboard();\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemedLayer>\n <Transition\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <Transition.Child\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <Transition.Child\n ref={refs.setFloating}\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </Transition.Child>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemedLayer>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["BottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemedLayer","Transition","show","className","beforeEnter","prev","afterLeave","Child","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":";;;;;;;;;;;;AAmCM,SAAUA,WAAWA,CAAC;EAC1BC,IAAI;EACJC,aAAa;EACbC,KAAK;EACLC,eAAe;AACfC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA,UAAAA;AACiB,CAAA,EAAA;AACjBC,EAAAA,kBAAk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AAK,CAAC,GACtE,IAAI,eACRwB,GAAA,CAAA,KAAA,EAAA;AAAKS,wBAAAA,SAAS,EAAC,8CAA8C;AAAA9B,wBAAAA,QAAA,EAC1DA,QAAAA;AAAQ,uBACN,CACP,CAAA;AAAA,qBAAK,CACP,CAAA;mBAAkB,CAAA;AACpB,iBAAA,EAhCOgB,WAgCG,CAAA;eACU,CAAA;aACZ,CAAA;AACd,WAAK,CACP,CAAA;SAAY,CAAA;OACD,CAAA;AACf,KAAgB,CAClB,CAAA;AAAA,GAAA,CAAG,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"_BottomSheet.mjs","sources":["../../src/inputs/_BottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../common/closeButton';\nimport { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\nimport { Size } from '../common/propsValues/size';\n\nexport interface BottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function BottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: BottomSheetProps) {\n useVirtualKeyboard();\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider\n theme=\"personal\"\n screenMode={theme === 'personal' ? screenMode : 'light'}\n isNotRootProvider\n >\n <Transition\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <Transition.Child\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <Transition.Child\n ref={refs.setFloating}\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </Transition.Child>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["BottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","isNotRootProvider","Transition","show","className","beforeEnter","prev","afterLeave","Child","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":";;;;;;;;;;;;AAmCM,SAAUA,WAAWA,CAAC;EAC1BC,IAAI;EACJC,aAAa;EACbC,KAAK;EACLC,eAAe;AACfC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA;AACiB,CAAA,EAAA;AACjBC,EAAAA,kBAAkB,EAAE;EAEpB,MAAM;IAAEC,IAAI;AAAEC,IAAAA;GAAS,GAAGC,WAAW,CAAU;IAC7CX,IAAI;IACJY,YAAY,EAAGC,KAAK,IAAI;MACtB,IAAI,CAACA,KAAK,EAAE;AACVP,QAAAA,OAAO,IAAI;AACb;AACF;AACD,GAAA,CAAC;AAEF,EAAA,MAAMQ,OAAO,GAAGC,UAAU,CAACL,OAAO,CAAC;AACnC,EAAA,MAAMM,IAAI,GAAGC,OAAO,CAACP,OAAO,CAAC;EAC7B,MAAM;IAAEQ,iBAAiB;AAAEC,IAAAA;GAAkB,GAAGC,eAAe,CAAC,CAACN,OAAO,EAAEE,IAAI,CAAC,CAAC;EAEhF,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAGC,QAAQ,CAAC,CAAC,CAAC;EAEjD,MAAM;IAAEC,KAAK;AAAEC,IAAAA;GAAY,GAAGC,QAAQ,EAAE;EAExC,oBACEC,IAAA,CAAAC,QAAA,EAAA;AAAAvB,IAAAA,QAAA,EACGL,CAAAA,IAAI,gBAAG6B,GAAA,CAACC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AAAA,SAAS,EAAC,oCAAoC;AAC9CC,oBAAAA,OAAO,EAAC,oCAAoC;oBAAA,GACxC1B,gBAAgB,EAAE;AAAAd,oBAAAA,QAAA,gBAEtBwB,GAAA,CAAA,KAAA,EAAA;AAAKU,sBAAAA,SAAS,EAAC,2BAA2B;sBAAAlC,QAAA,eACxCwB,GAAA,CAACsB,WAAW,EAAA;wBACVC,IAAI,EAAEC,IAAI,CAACC,KAAM;wBACjBC,OAAO,EAAEA,MAAK;AACZjD,0BAAAA,OAAO,IAAI;AACb;uBAEJ;qBAAK,CACL,eAAAqB,IAAA,CAAA,KAAA,EAAA;AACEY,sBAAAA,SAAS,EAAEiB,IAAI,CACb,kCAAkC,EAClCtD,KAAK,IAAI,6CAA6C,EACtDE,OAAO,KAAK,IAAI,IAAI,8CAA8C,CAClE;sBAAAC,QAAA,EAAA,CAEDH,KAAK,gBACJ2B,GAAA,CAAA,IAAA,EAAA;AAAIU,wBAAAA,SAAS,EAAC,6CAA6C;AAAAlC,wBAAAA,QAAA,EAAEH;AAAK,uBAAK,CAAC,GACtE,IAAI,eACR2B,GAAA,CAAA,KAAA,EAAA;AAAKU,wBAAAA,SAAS,EAAC,8CAA8C;AAAAlC,wBAAAA,QAAA,EAC1DA;AAAQ,uBACN,CACP;AAAA,qBAAK,CACP;mBAAkB;AACpB,iBAAA,EAhCOgB,WAgCG;eACU;aACZ;AACd,WAAK,CACP;SAAY;OACC;AACjB,KAAgB,CAClB;AAAA,GAAA,CAAG;AAEP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"_ButtonInput.js","sources":["../../src/inputs/_ButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from './InputGroup';\nimport { inputClassNameBase } from './_common';\n\nexport interface ButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const ButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: ButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(className, inputClassNameBase({ size }), 'np-button-input')}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["ButtonInput","forwardRef","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAUaA,WAAW,gBAAGC,gBAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC,SAAAA;AAA6B,CAAA,EACjEC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE,CAAA;AAExC,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,SAAI,CAACR,SAAS,EAAES,0BAAkB,CAAC;AAAEV,MAAAA,IAAAA;KAAM,CAAC,EAAE,iBAAiB,CAAE;AAC5EE,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH,KAAAA;KAAQ;IAAA,GAClCC,SAAAA;AAAS,GACb,CAAA,CAAA;AAEN,CAAC;;;;"}
1
+ {"version":3,"file":"_ButtonInput.js","sources":["../../src/inputs/_ButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from './InputGroup';\nimport { inputClassNameBase } from './_common';\n\nexport interface ButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const ButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: ButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(className, inputClassNameBase({ size }), 'np-button-input')}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["ButtonInput","forwardRef","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAUaA,WAAW,gBAAGC,gBAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAA6B,CAAA,EACjEC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE;AAExC,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,SAAI,CAACR,SAAS,EAAES,0BAAkB,CAAC;AAAEV,MAAAA;KAAM,CAAC,EAAE,iBAAiB,CAAE;AAC5EE,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GACb,CAAA;AAEN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"_ButtonInput.mjs","sources":["../../src/inputs/_ButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from './InputGroup';\nimport { inputClassNameBase } from './_common';\n\nexport interface ButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const ButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: ButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(className, inputClassNameBase({ size }), 'np-button-input')}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["ButtonInput","forwardRef","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;MAUaA,WAAW,gBAAGC,UAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC,SAAAA;AAA6B,CAAA,EACjEC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE,CAAA;AAExC,EAAA,oBACEC,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,IAAI,CAACR,SAAS,EAAES,kBAAkB,CAAC;AAAEV,MAAAA,IAAAA;KAAM,CAAC,EAAE,iBAAiB,CAAE;AAC5EE,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH,KAAAA;KAAQ;IAAA,GAClCC,SAAAA;AAAS,GACb,CAAA,CAAA;AAEN,CAAC;;;;"}
1
+ {"version":3,"file":"_ButtonInput.mjs","sources":["../../src/inputs/_ButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from './InputGroup';\nimport { inputClassNameBase } from './_common';\n\nexport interface ButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const ButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: ButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(className, inputClassNameBase({ size }), 'np-button-input')}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["ButtonInput","forwardRef","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;MAUaA,WAAW,gBAAGC,UAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAA6B,CAAA,EACjEC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE;AAExC,EAAA,oBACEC,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,IAAI,CAACR,SAAS,EAAES,kBAAkB,CAAC;AAAEV,MAAAA;KAAM,CAAC,EAAE,iBAAiB,CAAE;AAC5EE,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GACb,CAAA;AAEN,CAAC;;;;"}
@@ -56,12 +56,19 @@ function Popover({
56
56
  getFloatingProps
57
57
  } = react.useInteractions([role, dismiss]);
58
58
  const [floatingKey, setFloatingKey] = React.useState(0);
59
+ const {
60
+ theme,
61
+ screenMode
62
+ } = componentsTheming.useTheme();
59
63
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
60
64
  children: [open ? /*#__PURE__*/jsxRuntime.jsx(PreventScroll.PreventScroll, {}) : null, renderTrigger({
61
65
  ref: refs.setReference,
62
66
  getInteractionProps: getReferenceProps
63
67
  }), /*#__PURE__*/jsxRuntime.jsx(react.FloatingPortal, {
64
- children: /*#__PURE__*/jsxRuntime.jsx(componentsTheming.ThemedLayer, {
68
+ children: /*#__PURE__*/jsxRuntime.jsx(componentsTheming.ThemeProvider, {
69
+ theme: "personal",
70
+ screenMode: theme === 'personal' ? screenMode : 'light',
71
+ isNotRootProvider: true,
65
72
  children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition, {
66
73
  show: open,
67
74
  leave: "transition-opacity",
@@ -1 +1 @@
1
- {"version":3,"file":"_Popover.js","sources":["../../src/inputs/_Popover.tsx"],"sourcesContent":["import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n size as floatingSize,\n offset,\n type Placement,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemedLayer } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\n\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\n\nexport interface PopoverProps {\n placement?: Placement;\n open: boolean;\n renderTrigger: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n size?: 'md' | 'lg';\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nconst floatingPadding = 16;\n\nexport function Popover({\n placement,\n open,\n renderTrigger,\n title,\n size = 'md',\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: PopoverProps) {\n const { refs, floatingStyles, context } = useFloating<Element>({\n placement,\n middleware: [\n offset(8),\n flip({ padding: floatingPadding, crossAxis: false }),\n shift(),\n floatingSize({\n padding: floatingPadding,\n apply: ({ elements, rects, availableHeight }) => {\n elements.floating.style.setProperty('--max-height', `${availableHeight}px`);\n elements.floating.style.setProperty('--width', `${rects.reference.width}px`);\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([role, dismiss]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemedLayer>\n <Transition\n show={open}\n leave=\"transition-opacity\"\n leaveTo=\"opacity-0\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <FocusScope>\n <FloatingFocusManager context={context}>\n <div\n key={floatingKey} // Force inner state invalidation on open\n ref={refs.setFloating}\n className={clsx('np-popover-v2-container', {\n 'np-popover-v2-container--size-md': size === 'md',\n 'np-popover-v2-container--size-lg': size === 'lg',\n })}\n style={floatingStyles}\n {...getFloatingProps()}\n >\n <div\n className={clsx('np-popover-v2', title && 'np-popover-v2--has-title', {\n 'np-popover-v2--padding-md': padding === 'md',\n })}\n >\n {title ? (\n <h2 className=\"np-popover-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-popover-v2-content np-text-body-default\">{children}</div>\n </div>\n </div>\n </FloatingFocusManager>\n </FocusScope>\n </Transition>\n </ThemedLayer>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["floatingPadding","Popover","placement","open","renderTrigger","title","size","padding","children","onClose","onCloseEnd","refs","floatingStyles","context","useFloating","middleware","offset","flip","crossAxis","shift","floatingSize","apply","elements","rects","availableHeight","floating","style","setProperty","reference","width","whileElementsMounted","autoUpdate","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemedLayer","Transition","show","leave","leaveTo","beforeEnter","prev","afterLeave","FocusScope","FloatingFocusManager","setFloating","className","clsx"],"mappings":";;;;;;;;;;;AAuCA,MAAMA,eAAe,GAAG,EAAE,CAAA;AAEpB,SAAUC,OAAOA,CAAC;EACtBC,SAAS;EACTC,IAAI;EACJC,aAAa;EACbC,KAAK;AACLC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAA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D,KAAK,IAAI,0BAA0B,EAAE;oBACpE,2BAA2B,EAAEE,OAAO,KAAK,IAAA;AAC1C,mBAAA,CAAE;kBAAAC,QAAA,EAAA,CAEFH,KAAK,gBACJyC,cAAA,CAAA,IAAA,EAAA;AAAIiB,oBAAAA,SAAS,EAAC,wCAAwC;AAAAvD,oBAAAA,QAAA,EAAEH,KAAAA;AAAK,mBAAK,CAAC,GACjE,IAAI,eACRyC,cAAA,CAAA,KAAA,EAAA;AAAKiB,oBAAAA,SAAS,EAAC,4CAA4C;AAAAvD,oBAAAA,QAAA,EAAEA,QAAAA;AAAQ,mBAAM,CAC7E,CAAA;iBAAK,CAAA;AACP,eAAA,EAnBOiC,WAmBF,CAAA;aACe,CAAA;WACZ,CAAA;SACF,CAAA;OACD,CAAA;AACf,KAAgB,CAClB,CAAA;AAAA,GAAA,CAAG,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"_Popover.js","sources":["../../src/inputs/_Popover.tsx"],"sourcesContent":["import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n type Placement,\n shift,\n size as floatingSize,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\n\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\n\nexport interface PopoverProps {\n placement?: Placement;\n open: boolean;\n renderTrigger: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n size?: 'md' | 'lg';\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nconst floatingPadding = 16;\n\nexport function Popover({\n placement,\n open,\n renderTrigger,\n title,\n size = 'md',\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: PopoverProps) {\n const { refs, floatingStyles, context } = useFloating<Element>({\n placement,\n middleware: [\n offset(8),\n flip({ padding: floatingPadding, crossAxis: false }),\n shift(),\n floatingSize({\n padding: floatingPadding,\n apply: ({ elements, rects, availableHeight }) => {\n elements.floating.style.setProperty('--max-height', `${availableHeight}px`);\n elements.floating.style.setProperty('--width', `${rects.reference.width}px`);\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([role, dismiss]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider\n theme=\"personal\"\n screenMode={theme === 'personal' ? screenMode : 'light'}\n isNotRootProvider\n >\n <Transition\n show={open}\n leave=\"transition-opacity\"\n leaveTo=\"opacity-0\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <FocusScope>\n <FloatingFocusManager context={context}>\n <div\n key={floatingKey} // Force inner state invalidation on open\n ref={refs.setFloating}\n className={clsx('np-popover-v2-container', {\n 'np-popover-v2-container--size-md': size === 'md',\n 'np-popover-v2-container--size-lg': size === 'lg',\n })}\n style={floatingStyles}\n {...getFloatingProps()}\n >\n <div\n className={clsx('np-popover-v2', title && 'np-popover-v2--has-title', {\n 'np-popover-v2--padding-md': padding === 'md',\n })}\n >\n {title ? (\n <h2 className=\"np-popover-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-popover-v2-content np-text-body-default\">{children}</div>\n </div>\n </div>\n </FloatingFocusManager>\n </FocusScope>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["floatingPadding","Popover","placement","open","renderTrigger","title","size","padding","children","onClose","onCloseEnd","refs","floatingStyles","context","useFloating","middleware","offset","flip","crossAxis","shift","floatingSize","apply","elements","rects","availableHeight","floating","style","setProperty","reference","width","whileElementsMounted","autoUpdate","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","isNotRootProvider","Transition","show","leave","leaveTo","beforeEnter","prev","afterLeave","FocusScope","FloatingFocusManager","setFloating","className","clsx"],"mappings":";;;;;;;;;;;AAuCA,MAAMA,eAAe,GAAG,EAAE;AAEpB,SAAUC,OAAOA,CAAC;EACtBC,SAAS;EACTC,IAAI;EACJC,aAAa;EACbC,KAAK;AACLC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA;AACa,CAAA,EAAA;EACb,MAAM;IAAEC,IAAI;IAAEC,cAAc;AAAEC,IAAAA;GAAS,GAAGC,iBAAW,CAAU;IAC7DZ,SAAS;IACTa,UAAU,EAAE,CACVC,YAAM,CAAC,CAAC,CAAC,EACTC,UAAI,CAAC;AAAEV,MAAAA,OAAO,EAAEP,eAAe;AAAEkB,MAAAA,SAAS,EAAE;AAAK,KAAE,CAAC,EACpDC,WAAK,EAAE,EACPC,UAAY,CAAC;AACXb,MAAAA,OAAO,EAAEP,eAAe;AACxBqB,MAAAA,KAAK,EAAEA,CAAC;QAAEC,QAAQ;QAAEC,KAAK;AAAEC,QAAAA;AAAiB,OAAA,KAAI;AAC9CF,QAAAA,QAAQ,CAACG,QAAQ,CAACC,KAAK,CAACC,WAAW,CAAC,cAAc,EAAE,CAAA,EAAGH,eAAe,CAAA,EAAA,CAAI,CAAC;AAC3EF,QAAAA,QAAQ,CAACG,QAAQ,CAACC,KAAK,CAACC,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pdate, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager } from '@floating-ui/react';
1
+ import { useFloating, autoUpdate, offset, flip, shift, size, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager } from '@floating-ui/react';
2
2
  import { Transition } from '@headlessui/react';
3
3
  import { FocusScope } from '@react-aria/focus';
4
- import { ThemedLayer } from '@wise/components-theming';
4
+ import { useTheme, ThemeProvider } from '@wise/components-theming';
5
5
  import { clsx } from 'clsx';
6
6
  import { useState } from 'react';
7
7
  import { PreventScroll } from '../common/preventScroll/PreventScroll.mjs';
@@ -54,12 +54,19 @@ function Popover({
54
54
  getFloatingProps
55
55
  } = useInteractions([role, dismiss]);
56
56
  const [floatingKey, setFloatingKey] = useState(0);
57
+ const {
58
+ theme,
59
+ screenMode
60
+ } = useTheme();
57
61
  return /*#__PURE__*/jsxs(Fragment, {
58
62
  children: [open ? /*#__PURE__*/jsx(PreventScroll, {}) : null, renderTrigger({
59
63
  ref: refs.setReference,
60
64
  getInteractionProps: getReferenceProps
61
65
  }), /*#__PURE__*/jsx(FloatingPortal, {
62
- children: /*#__PURE__*/jsx(ThemedLayer, {
66
+ children: /*#__PURE__*/jsx(ThemeProvider, {
67
+ theme: "personal",
68
+ screenMode: theme === 'personal' ? screenMode : 'light',
69
+ isNotRootProvider: true,
63
70
  children: /*#__PURE__*/jsx(Transition, {
64
71
  show: open,
65
72
  leave: "transition-opacity",
@@ -1 +1 @@
1
- {"version":3,"file":"_Popover.mjs","sources":["../../src/inputs/_Popover.tsx"],"sourcesContent":["import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n size as floatingSize,\n offset,\n type Placement,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemedLayer } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\n\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\n\nexport interface PopoverProps {\n placement?: Placement;\n open: boolean;\n renderTrigger: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n size?: 'md' | 'lg';\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nconst floatingPadding = 16;\n\nexport function Popover({\n placement,\n open,\n renderTrigger,\n title,\n size = 'md',\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: PopoverProps) {\n const { refs, floatingStyles, context } = useFloating<Element>({\n placement,\n middleware: [\n offset(8),\n flip({ padding: floatingPadding, crossAxis: false }),\n shift(),\n floatingSize({\n padding: floatingPadding,\n apply: ({ elements, rects, availableHeight }) => {\n elements.floating.style.setProperty('--max-height', `${availableHeight}px`);\n elements.floating.style.setProperty('--width', `${rects.reference.width}px`);\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([role, dismiss]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemedLayer>\n <Transition\n show={open}\n leave=\"transition-opacity\"\n leaveTo=\"opacity-0\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <FocusScope>\n <FloatingFocusManager context={context}>\n <div\n key={floatingKey} // Force inner state invalidation on open\n ref={refs.setFloating}\n className={clsx('np-popover-v2-container', {\n 'np-popover-v2-container--size-md': size === 'md',\n 'np-popover-v2-container--size-lg': size === 'lg',\n })}\n style={floatingStyles}\n {...getFloatingProps()}\n >\n <div\n className={clsx('np-popover-v2', title && 'np-popover-v2--has-title', {\n 'np-popover-v2--padding-md': padding === 'md',\n })}\n >\n {title ? (\n <h2 className=\"np-popover-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-popover-v2-content np-text-body-default\">{children}</div>\n </div>\n </div>\n </FloatingFocusManager>\n </FocusScope>\n </Transition>\n </ThemedLayer>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["floatingPadding","Popover","placement","open","renderTrigger","title","size","padding","children","onClose","onCloseEnd","refs","floatingStyles","context","useFloating","middleware","offset","flip","crossAxis","shift","floatingSize","apply","elements","rects","availableHeight","floating","style","setProperty","reference","width","whileElementsMounted","autoUpdate","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemedLayer","Transition","show","leave","leaveTo","beforeEnter","prev","afterLeave","FocusScope","FloatingFocusManager","setFloating","className","clsx"],"mappings":";;;;;;;;;AAuCA,MAAMA,eAAe,GAAG,EAAE,CAAA;AAEpB,SAAUC,OAAOA,CAAC;EACtBC,SAAS;EACTC,IAAI;EACJC,aAAa;EACbC,KAAK;AACLC,QAAAA,MAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,OAAO;AACPC,EAAAA,UAAAA;AACa,CAAA,EAAA;EACb,MAAM;IAAEC,IAAI;IAAEC,cAAc;AAAEC,IAAAA,OAAAA;GAAS,GAAGC,WAAW,CAAU;IAC7DZ,SAAS;IACTa,UAAU,EAAE,CACVC,MAAM,CAAC,CAAC,CAAC,EACTC,IAAI,CAAC;AAAEV,MAAAA,OAAO,EAAEP,eAAe;AAAEkB,MAAAA,SAAS,EAAE,KAAA;AAAK,KAAE,CAAC,EACpDC,KAAK,EAAE,EACPC,IAAY,CAAC;AACXb,MAAAA,OAAO,EAAEP,eAAe;AACxBqB,MAAAA,K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AAM,CAC7E,CAAA;iBAAK,CAAA;AACP,eAAA,EAnBOiC,WAmBF,CAAA;aACe,CAAA;WACZ,CAAA;SACF,CAAA;OACD,CAAA;AACf,KAAgB,CAClB,CAAA;AAAA,GAAA,CAAG,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"_Popover.mjs","sources":["../../src/inputs/_Popover.tsx"],"sourcesContent":["import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n type Placement,\n shift,\n size as floatingSize,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\n\nimport { PreventScroll } from '../common/preventScroll/PreventScroll';\n\nexport interface PopoverProps {\n placement?: Placement;\n open: boolean;\n renderTrigger: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n size?: 'md' | 'lg';\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nconst floatingPadding = 16;\n\nexport function Popover({\n placement,\n open,\n renderTrigger,\n title,\n size = 'md',\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: PopoverProps) {\n const { refs, floatingStyles, context } = useFloating<Element>({\n placement,\n middleware: [\n offset(8),\n flip({ padding: floatingPadding, crossAxis: false }),\n shift(),\n floatingSize({\n padding: floatingPadding,\n apply: ({ elements, rects, availableHeight }) => {\n elements.floating.style.setProperty('--max-height', `${availableHeight}px`);\n elements.floating.style.setProperty('--width', `${rects.reference.width}px`);\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([role, dismiss]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider\n theme=\"personal\"\n screenMode={theme === 'personal' ? screenMode : 'light'}\n isNotRootProvider\n >\n <Transition\n show={open}\n leave=\"transition-opacity\"\n leaveTo=\"opacity-0\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <FocusScope>\n <FloatingFocusManager context={context}>\n <div\n key={floatingKey} // Force inner state invalidation on open\n ref={refs.setFloating}\n className={clsx('np-popover-v2-container', {\n 'np-popover-v2-container--size-md': size === 'md',\n 'np-popover-v2-container--size-lg': size === 'lg',\n })}\n style={floatingStyles}\n {...getFloatingProps()}\n >\n <div\n className={clsx('np-popover-v2', title && 'np-popover-v2--has-title', {\n 'np-popover-v2--padding-md': padding === 'md',\n })}\n >\n {title ? (\n <h2 className=\"np-popover-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-popover-v2-content np-text-body-default\">{children}</div>\n </div>\n </div>\n </FloatingFocusManager>\n </FocusScope>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["floatingPadding","Popover","placement","open","renderTrigger","title","size","padding","children","onClose","onCloseEnd","refs","floatingStyles","context","useFloating","middleware","offset","flip","crossAxis","shift","floatingSize","apply","elements","rects","availableHeight","floating","style","setProperty","reference","width","whileElementsMounted","autoUpdate","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","isNotRootProvider","Transition","show","leave","leaveTo","beforeEnter","prev","afterLeave","FocusSc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BC,gBAAAA,SAAS,EAAEC,IAAI,CAAC,yBAAyB,EAAE;kBACzC,kCAAkC,EAAE9D,MAAI,KAAK,IAAI;kBACjD,kCAAkC,EAAEA,MAAI,KAAK;AAC9C,iBAAA,CAAE;AACHoB,gBAAAA,KAAK,EAAEd,cAAe;gBAAA,GAClB2B,gBAAgB,EAAE;AAAA/B,gBAAAA,QAAA,eAEtBuC,IAAA,CAAA,KAAA,EAAA;kBACEoB,SAAS,EAAEC,IAAI,CAAC,eAAe,EAAE/D,KAAK,IAAI,0BAA0B,EAAE;oBACpE,2BAA2B,EAAEE,OAAO,KAAK;AAC1C,mBAAA,CAAE;kBAAAC,QAAA,EAAA,CAEFH,KAAK,gBACJ4C,GAAA,CAAA,IAAA,EAAA;AAAIkB,oBAAAA,SAAS,EAAC,wCAAwC;AAAA3D,oBAAAA,QAAA,EAAEH;AAAK,mBAAK,CAAC,GACjE,IAAI,eACR4C,GAAA,CAAA,KAAA,EAAA;AAAKkB,oBAAAA,SAAS,EAAC,4CAA4C;AAAA3D,oBAAAA,QAAA,EAAEA;AAAQ,mBAAM,CAC7E;iBAAK;AACP,eAAA,EAnBOiC,WAmBF;aACe;WACZ;SACF;OACC;AACjB,KAAgB,CAClB;AAAA,GAAA,CAAG;AAEP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"_common.js","sources":["../../src/inputs/_common.ts"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\n\nexport type InputPropsBase = {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n};\n\nexport function inputClassNameBase({ size = 'auto' }: InputPropsBase = {}) {\n return clsx(\n 'form-control', // TODO: Deprecate\n 'np-form-control',\n {\n 'np-form-control--size-auto': size === 'auto',\n 'np-form-control--size-sm': size === 'sm',\n 'np-form-control--size-md': size === 'md',\n 'np-form-control--size-lg': size === 'lg',\n },\n );\n}\n"],"names":["inputClassNameBase","size","clsx"],"mappings":";;;;AAQM,SAAUA,kBAAkBA,CAAC;AAAEC,EAAAA,IAAI,GAAG,MAAA;IAA2B,EAAE,EAAA;EACvE,OAAOC,SAAI,CACT,cAAc;AAAE;AAChB,EAAA,iBAAiB,EACjB;IACE,4BAA4B,EAAED,IAAI,KAAK,MAAM;IAC7C,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAA;AACtC,GAAA,CACF,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"_common.js","sources":["../../src/inputs/_common.ts"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\n\nexport type InputPropsBase = {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n};\n\nexport function inputClassNameBase({ size = 'auto' }: InputPropsBase = {}) {\n return clsx(\n 'form-control', // TODO: Deprecate\n 'np-form-control',\n {\n 'np-form-control--size-auto': size === 'auto',\n 'np-form-control--size-sm': size === 'sm',\n 'np-form-control--size-md': size === 'md',\n 'np-form-control--size-lg': size === 'lg',\n },\n );\n}\n"],"names":["inputClassNameBase","size","clsx"],"mappings":";;;;AAQM,SAAUA,kBAAkBA,CAAC;AAAEC,EAAAA,IAAI,GAAG;IAA2B,EAAE,EAAA;EACvE,OAAOC,SAAI,CACT,cAAc;AAAE;AAChB,EAAA,iBAAiB,EACjB;IACE,4BAA4B,EAAED,IAAI,KAAK,MAAM;IAC7C,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK;AACtC,GAAA,CACF;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"_common.mjs","sources":["../../src/inputs/_common.ts"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\n\nexport type InputPropsBase = {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n};\n\nexport function inputClassNameBase({ size = 'auto' }: InputPropsBase = {}) {\n return clsx(\n 'form-control', // TODO: Deprecate\n 'np-form-control',\n {\n 'np-form-control--size-auto': size === 'auto',\n 'np-form-control--size-sm': size === 'sm',\n 'np-form-control--size-md': size === 'md',\n 'np-form-control--size-lg': size === 'lg',\n },\n );\n}\n"],"names":["inputClassNameBase","size","clsx"],"mappings":";;AAQM,SAAUA,kBAAkBA,CAAC;AAAEC,EAAAA,IAAI,GAAG,MAAA;IAA2B,EAAE,EAAA;EACvE,OAAOC,IAAI,CACT,cAAc;AAAE;AAChB,EAAA,iBAAiB,EACjB;IACE,4BAA4B,EAAED,IAAI,KAAK,MAAM;IAC7C,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAA;AACtC,GAAA,CACF,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"_common.mjs","sources":["../../src/inputs/_common.ts"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\n\nexport type InputPropsBase = {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n};\n\nexport function inputClassNameBase({ size = 'auto' }: InputPropsBase = {}) {\n return clsx(\n 'form-control', // TODO: Deprecate\n 'np-form-control',\n {\n 'np-form-control--size-auto': size === 'auto',\n 'np-form-control--size-sm': size === 'sm',\n 'np-form-control--size-md': size === 'md',\n 'np-form-control--size-lg': size === 'lg',\n },\n );\n}\n"],"names":["inputClassNameBase","size","clsx"],"mappings":";;AAQM,SAAUA,kBAAkBA,CAAC;AAAEC,EAAAA,IAAI,GAAG;IAA2B,EAAE,EAAA;EACvE,OAAOC,IAAI,CACT,cAAc;AAAE;AAChB,EAAA,iBAAiB,EACjB;IACE,4BAA4B,EAAED,IAAI,KAAK,MAAM;IAC7C,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK,IAAI;IACzC,0BAA0B,EAAEA,IAAI,KAAK;AACtC,GAAA,CACF;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"contexts.js","sources":["../../src/inputs/contexts.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst FieldLabelIdContext = createContext<string | undefined>(undefined);\nexport const FieldLabelIdContextProvider = FieldLabelIdContext.Provider;\n\nconst InputIdContext = createContext<string | undefined>(undefined);\nexport const InputIdContextProvider = InputIdContext.Provider;\n\nconst InputDescribedByContext = createContext<string | undefined>(undefined);\nexport const InputDescribedByProvider = InputDescribedByContext.Provider;\n\nconst InputInvalidContext = createContext<boolean | undefined>(undefined);\nexport const InputInvalidProvider = InputInvalidContext.Provider;\n\ninterface UseInputAttributesArgs {\n /** Set this to `true` if the underlying element is not directly [labelable as per the HTML specification](https://html.spec.whatwg.org/multipage/forms.html#category-label). */\n nonLabelable?: boolean;\n}\n\nexport function useInputAttributes({ nonLabelable }: UseInputAttributesArgs = {}) {\n const labelId = useContext(FieldLabelIdContext);\n return {\n id: useContext(InputIdContext),\n 'aria-labelledby': nonLabelable ? labelId : undefined,\n 'aria-describedby': useContext(InputDescribedByContext),\n 'aria-invalid': useContext(InputInvalidContext),\n } satisfies React.HTMLAttributes<HTMLElement>;\n}\n\nexport interface WithInputAttributesProps {\n inputAttributes: ReturnType<typeof useInputAttributes>;\n}\n\nexport function withInputAttributes<T extends Partial<WithInputAttributesProps>>(\n Component: React.ComponentType<T>,\n args?: UseInputAttributesArgs,\n) {\n function ComponentWithInputAttributes(props: Omit<T, keyof WithInputAttributesProps>) {\n return <Component inputAttributes={useInputAttributes(args)} {...(props as T)} />;\n }\n\n ComponentWithInputAttributes.displayName = `withInputAttributes(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithInputAttributes;\n}\n"],"names":["FieldLabelIdContext","createContext","undefined","FieldLabelIdContextProvider","Provider","InputIdContext","InputIdContextProvider","InputDescribedByContext","InputDescribedByProvider","InputInvalidContext","InputInvalidProvider","useInputAttributes","nonLabelable","labelId","useContext","id","withInputAttributes","Component","args","ComponentWithInputAttributes","props","_jsx","inputAttributes","displayName","name"],"mappings":";;;;;AAEA,MAAMA,mBAAmB,gBAAGC,mBAAa,CAAqBC,SAAS,CAAC,CAAA;AAC3DC,MAAAA,2BAA2B,GAAGH,mBAAmB,CAACI,SAAQ;AAEvE,MAAMC,cAAc,gBAAGJ,mBAAa,CAAqBC,SAAS,CAAC,CAAA;AACtDI,MAAAA,sBAAsB,GAAGD,cAAc,CAACD,SAAQ;AAE7D,MAAMG,uBAAuB,gBAAGN,mBAAa,CAAqBC,SAAS,CAAC,CAAA;AAC/DM,MAAAA,wBAAwB,GAAGD,uBAAuB,CAACH,SAAQ;AAExE,MAAMK,mBAAmB,gBAAGR,mBAAa,CAAsBC,SAAS,CAAC,CAAA;AAC5DQ,MAAAA,oBAAoB,GAAGD,mBAAmB,CAACL,SAAQ;SAOhDO,kBAAkBA,CAAC;AAAEC,EAAAA,YAAAA;IAAyC,EAAE,EAAA;AAC9E,EAAA,MAAMC,OAAO,GAAGC,gBAAU,CAACd,mBAAmB,CAAC,CAAA;EAC/C,OAAO;AACLe,IAAAA,EAAE,EAAED,gBAAU,CAACT,cAAc,CAAC;AAC9B,IAAA,iBAAiB,EAAEO,YAAY,GAAGC,OAAO,GAAGX,SAAS;AACrD,IAAA,kBAAkB,EAAEY,gBAAU,CAACP,uBAAuB,CAAC;IACvD,cAAc,EAAEO,gBAAU,CAACL,mBAAmB,CAAA;GACH,CAAA;AAC/C,CAAA;AAMgB,SAAAO,mBAAmBA,CACjCC,SAAiC,EACjCC,IAA6B,EAAA;EAE7B,SAASC,4BAA4BA,CAACC,KAA8C,EAAA;IAClF,oBAAOC,cAAA,CAACJ,SAAS,EAAA;AAACK,MAAAA,eAAe,EAAEX,kBAAkB,CAACO,IAAI,CAAE;MAAA,GAAME,KAAAA;AAAW,MAAI,CAAA;AACnF,GAAA;AAEAD,EAAAA,4BAA4B,CAACI,WAAW,GAAG,CAAA,oBAAA,EAAuBN,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO,IAAI,IAAI,WAAW,CAAG,CAAA,CAAA,CAAA;AAE3H,EAAA,OAAOL,4BAA4B,CAAA;AACrC;;;;;;;;;"}
1
+ {"version":3,"file":"contexts.js","sources":["../../src/inputs/contexts.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst FieldLabelIdContext = createContext<string | undefined>(undefined);\nexport const FieldLabelIdContextProvider = FieldLabelIdContext.Provider;\n\nconst InputIdContext = createContext<string | undefined>(undefined);\nexport const InputIdContextProvider = InputIdContext.Provider;\n\nconst InputDescribedByContext = createContext<string | undefined>(undefined);\nexport const InputDescribedByProvider = InputDescribedByContext.Provider;\n\nconst InputInvalidContext = createContext<boolean | undefined>(undefined);\nexport const InputInvalidProvider = InputInvalidContext.Provider;\n\ninterface UseInputAttributesArgs {\n /** Set this to `true` if the underlying element is not directly [labelable as per the HTML specification](https://html.spec.whatwg.org/multipage/forms.html#category-label). */\n nonLabelable?: boolean;\n}\n\nexport function useInputAttributes({ nonLabelable }: UseInputAttributesArgs = {}) {\n const labelId = useContext(FieldLabelIdContext);\n return {\n id: useContext(InputIdContext),\n 'aria-labelledby': nonLabelable ? labelId : undefined,\n 'aria-describedby': useContext(InputDescribedByContext),\n 'aria-invalid': useContext(InputInvalidContext),\n } satisfies React.HTMLAttributes<HTMLElement>;\n}\n\nexport interface WithInputAttributesProps {\n inputAttributes: ReturnType<typeof useInputAttributes>;\n}\n\nexport function withInputAttributes<T extends Partial<WithInputAttributesProps>>(\n Component: React.ComponentType<T>,\n args?: UseInputAttributesArgs,\n) {\n function ComponentWithInputAttributes(props: Omit<T, keyof WithInputAttributesProps>) {\n return <Component inputAttributes={useInputAttributes(args)} {...(props as T)} />;\n }\n\n ComponentWithInputAttributes.displayName = `withInputAttributes(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithInputAttributes;\n}\n"],"names":["FieldLabelIdContext","createContext","undefined","FieldLabelIdContextProvider","Provider","InputIdContext","InputIdContextProvider","InputDescribedByContext","InputDescribedByProvider","InputInvalidContext","InputInvalidProvider","useInputAttributes","nonLabelable","labelId","useContext","id","withInputAttributes","Component","args","ComponentWithInputAttributes","props","_jsx","inputAttributes","displayName","name"],"mappings":";;;;;AAEA,MAAMA,mBAAmB,gBAAGC,mBAAa,CAAqBC,SAAS,CAAC;AAC3DC,MAAAA,2BAA2B,GAAGH,mBAAmB,CAACI;AAE/D,MAAMC,cAAc,gBAAGJ,mBAAa,CAAqBC,SAAS,CAAC;AACtDI,MAAAA,sBAAsB,GAAGD,cAAc,CAACD;AAErD,MAAMG,uBAAuB,gBAAGN,mBAAa,CAAqBC,SAAS,CAAC;AAC/DM,MAAAA,wBAAwB,GAAGD,uBAAuB,CAACH;AAEhE,MAAMK,mBAAmB,gBAAGR,mBAAa,CAAsBC,SAAS,CAAC;AAC5DQ,MAAAA,oBAAoB,GAAGD,mBAAmB,CAACL;SAOxCO,kBAAkBA,CAAC;AAAEC,EAAAA;IAAyC,EAAE,EAAA;AAC9E,EAAA,MAAMC,OAAO,GAAGC,gBAAU,CAACd,mBAAmB,CAAC;EAC/C,OAAO;AACLe,IAAAA,EAAE,EAAED,gBAAU,CAACT,cAAc,CAAC;AAC9B,IAAA,iBAAiB,EAAEO,YAAY,GAAGC,OAAO,GAAGX,SAAS;AACrD,IAAA,kBAAkB,EAAEY,gBAAU,CAACP,uBAAuB,CAAC;IACvD,cAAc,EAAEO,gBAAU,CAACL,mBAAmB;GACH;AAC/C;AAMgB,SAAAO,mBAAmBA,CACjCC,SAAiC,EACjCC,IAA6B,EAAA;EAE7B,SAASC,4BAA4BA,CAACC,KAA8C,EAAA;IAClF,oBAAOC,cAAA,CAACJ,SAAS,EAAA;AAACK,MAAAA,eAAe,EAAEX,kBAAkB,CAACO,IAAI,CAAE;MAAA,GAAME;AAAW,MAAI;AACnF;AAEAD,EAAAA,4BAA4B,CAACI,WAAW,GAAG,CAAA,oBAAA,EAAuBN,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO,IAAI,IAAI,WAAW,CAAG,CAAA,CAAA;AAE3H,EAAA,OAAOL,4BAA4B;AACrC;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"contexts.mjs","sources":["../../src/inputs/contexts.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst FieldLabelIdContext = createContext<string | undefined>(undefined);\nexport const FieldLabelIdContextProvider = FieldLabelIdContext.Provider;\n\nconst InputIdContext = createContext<string | undefined>(undefined);\nexport const InputIdContextProvider = InputIdContext.Provider;\n\nconst InputDescribedByContext = createContext<string | undefined>(undefined);\nexport const InputDescribedByProvider = InputDescribedByContext.Provider;\n\nconst InputInvalidContext = createContext<boolean | undefined>(undefined);\nexport const InputInvalidProvider = InputInvalidContext.Provider;\n\ninterface UseInputAttributesArgs {\n /** Set this to `true` if the underlying element is not directly [labelable as per the HTML specification](https://html.spec.whatwg.org/multipage/forms.html#category-label). */\n nonLabelable?: boolean;\n}\n\nexport function useInputAttributes({ nonLabelable }: UseInputAttributesArgs = {}) {\n const labelId = useContext(FieldLabelIdContext);\n return {\n id: useContext(InputIdContext),\n 'aria-labelledby': nonLabelable ? labelId : undefined,\n 'aria-describedby': useContext(InputDescribedByContext),\n 'aria-invalid': useContext(InputInvalidContext),\n } satisfies React.HTMLAttributes<HTMLElement>;\n}\n\nexport interface WithInputAttributesProps {\n inputAttributes: ReturnType<typeof useInputAttributes>;\n}\n\nexport function withInputAttributes<T extends Partial<WithInputAttributesProps>>(\n Component: React.ComponentType<T>,\n args?: UseInputAttributesArgs,\n) {\n function ComponentWithInputAttributes(props: Omit<T, keyof WithInputAttributesProps>) {\n return <Component inputAttributes={useInputAttributes(args)} {...(props as T)} />;\n }\n\n ComponentWithInputAttributes.displayName = `withInputAttributes(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithInputAttributes;\n}\n"],"names":["FieldLabelIdContext","createContext","undefined","FieldLabelIdContextProvider","Provider","InputIdContext","InputIdContextProvider","InputDescribedByContext","InputDescribedByProvider","InputInvalidContext","InputInvalidProvider","useInputAttributes","nonLabelable","labelId","useContext","id","withInputAttributes","Component","args","ComponentWithInputAttributes","props","_jsx","inputAttributes","displayName","name"],"mappings":";;;AAEA,MAAMA,mBAAmB,gBAAGC,aAAa,CAAqBC,SAAS,CAAC,CAAA;AAC3DC,MAAAA,2BAA2B,GAAGH,mBAAmB,CAACI,SAAQ;AAEvE,MAAMC,cAAc,gBAAGJ,aAAa,CAAqBC,SAAS,CAAC,CAAA;AACtDI,MAAAA,sBAAsB,GAAGD,cAAc,CAACD,SAAQ;AAE7D,MAAMG,uBAAuB,gBAAGN,aAAa,CAAqBC,SAAS,CAAC,CAAA;AAC/DM,MAAAA,wBAAwB,GAAGD,uBAAuB,CAACH,SAAQ;AAExE,MAAMK,mBAAmB,gBAAGR,aAAa,CAAsBC,SAAS,CAAC,CAAA;AAC5DQ,MAAAA,oBAAoB,GAAGD,mBAAmB,CAACL,SAAQ;SAOhDO,kBAAkBA,CAAC;AAAEC,EAAAA,YAAAA;IAAyC,EAAE,EAAA;AAC9E,EAAA,MAAMC,OAAO,GAAGC,UAAU,CAACd,mBAAmB,CAAC,CAAA;EAC/C,OAAO;AACLe,IAAAA,EAAE,EAAED,UAAU,CAACT,cAAc,CAAC;AAC9B,IAAA,iBAAiB,EAAEO,YAAY,GAAGC,OAAO,GAAGX,SAAS;AACrD,IAAA,kBAAkB,EAAEY,UAAU,CAACP,uBAAuB,CAAC;IACvD,cAAc,EAAEO,UAAU,CAACL,mBAAmB,CAAA;GACH,CAAA;AAC/C,CAAA;AAMgB,SAAAO,mBAAmBA,CACjCC,SAAiC,EACjCC,IAA6B,EAAA;EAE7B,SAASC,4BAA4BA,CAACC,KAA8C,EAAA;IAClF,oBAAOC,GAAA,CAACJ,SAAS,EAAA;AAACK,MAAAA,eAAe,EAAEX,kBAAkB,CAACO,IAAI,CAAE;MAAA,GAAME,KAAAA;AAAW,MAAI,CAAA;AACnF,GAAA;AAEAD,EAAAA,4BAA4B,CAACI,WAAW,GAAG,CAAA,oBAAA,EAAuBN,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO,IAAI,IAAI,WAAW,CAAG,CAAA,CAAA,CAAA;AAE3H,EAAA,OAAOL,4BAA4B,CAAA;AACrC;;;;"}
1
+ {"version":3,"file":"contexts.mjs","sources":["../../src/inputs/contexts.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst FieldLabelIdContext = createContext<string | undefined>(undefined);\nexport const FieldLabelIdContextProvider = FieldLabelIdContext.Provider;\n\nconst InputIdContext = createContext<string | undefined>(undefined);\nexport const InputIdContextProvider = InputIdContext.Provider;\n\nconst InputDescribedByContext = createContext<string | undefined>(undefined);\nexport const InputDescribedByProvider = InputDescribedByContext.Provider;\n\nconst InputInvalidContext = createContext<boolean | undefined>(undefined);\nexport const InputInvalidProvider = InputInvalidContext.Provider;\n\ninterface UseInputAttributesArgs {\n /** Set this to `true` if the underlying element is not directly [labelable as per the HTML specification](https://html.spec.whatwg.org/multipage/forms.html#category-label). */\n nonLabelable?: boolean;\n}\n\nexport function useInputAttributes({ nonLabelable }: UseInputAttributesArgs = {}) {\n const labelId = useContext(FieldLabelIdContext);\n return {\n id: useContext(InputIdContext),\n 'aria-labelledby': nonLabelable ? labelId : undefined,\n 'aria-describedby': useContext(InputDescribedByContext),\n 'aria-invalid': useContext(InputInvalidContext),\n } satisfies React.HTMLAttributes<HTMLElement>;\n}\n\nexport interface WithInputAttributesProps {\n inputAttributes: ReturnType<typeof useInputAttributes>;\n}\n\nexport function withInputAttributes<T extends Partial<WithInputAttributesProps>>(\n Component: React.ComponentType<T>,\n args?: UseInputAttributesArgs,\n) {\n function ComponentWithInputAttributes(props: Omit<T, keyof WithInputAttributesProps>) {\n return <Component inputAttributes={useInputAttributes(args)} {...(props as T)} />;\n }\n\n ComponentWithInputAttributes.displayName = `withInputAttributes(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithInputAttributes;\n}\n"],"names":["FieldLabelIdContext","createContext","undefined","FieldLabelIdContextProvider","Provider","InputIdContext","InputIdContextProvider","InputDescribedByContext","InputDescribedByProvider","InputInvalidContext","InputInvalidProvider","useInputAttributes","nonLabelable","labelId","useContext","id","withInputAttributes","Component","args","ComponentWithInputAttributes","props","_jsx","inputAttributes","displayName","name"],"mappings":";;;AAEA,MAAMA,mBAAmB,gBAAGC,aAAa,CAAqBC,SAAS,CAAC;AAC3DC,MAAAA,2BAA2B,GAAGH,mBAAmB,CAACI;AAE/D,MAAMC,cAAc,gBAAGJ,aAAa,CAAqBC,SAAS,CAAC;AACtDI,MAAAA,sBAAsB,GAAGD,cAAc,CAACD;AAErD,MAAMG,uBAAuB,gBAAGN,aAAa,CAAqBC,SAAS,CAAC;AAC/DM,MAAAA,wBAAwB,GAAGD,uBAAuB,CAACH;AAEhE,MAAMK,mBAAmB,gBAAGR,aAAa,CAAsBC,SAAS,CAAC;AAC5DQ,MAAAA,oBAAoB,GAAGD,mBAAmB,CAACL;SAOxCO,kBAAkBA,CAAC;AAAEC,EAAAA;IAAyC,EAAE,EAAA;AAC9E,EAAA,MAAMC,OAAO,GAAGC,UAAU,CAACd,mBAAmB,CAAC;EAC/C,OAAO;AACLe,IAAAA,EAAE,EAAED,UAAU,CAACT,cAAc,CAAC;AAC9B,IAAA,iBAAiB,EAAEO,YAAY,GAAGC,OAAO,GAAGX,SAAS;AACrD,IAAA,kBAAkB,EAAEY,UAAU,CAACP,uBAAuB,CAAC;IACvD,cAAc,EAAEO,UAAU,CAACL,mBAAmB;GACH;AAC/C;AAMgB,SAAAO,mBAAmBA,CACjCC,SAAiC,EACjCC,IAA6B,EAAA;EAE7B,SAASC,4BAA4BA,CAACC,KAA8C,EAAA;IAClF,oBAAOC,GAAA,CAACJ,SAAS,EAAA;AAACK,MAAAA,eAAe,EAAEX,kBAAkB,CAACO,IAAI,CAAE;MAAA,GAAME;AAAW,MAAI;AACnF;AAEAD,EAAAA,4BAA4B,CAACI,WAAW,GAAG,CAAA,oBAAA,EAAuBN,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO,IAAI,IAAI,WAAW,CAAG,CAAA,CAAA;AAE3H,EAAA,OAAOL,4BAA4B;AACrC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InstructionsList.js","sources":["../../src/instructionsList/InstructionsList.tsx"],"sourcesContent":["import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport Body from '../body/Body';\nimport { Typography, CommonProps } from '../common';\n\ntype InstructionNode = {\n content: ReactNode;\n ['aria-label']: string;\n};\n\nexport type InstructionsListProps = CommonProps &\n (\n | {\n dos?: readonly ReactNode[];\n donts?: readonly ReactNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n | {\n dos?: readonly InstructionNode[];\n donts?: readonly InstructionNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n );\n\nconst InstructionsList = ({ className, dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {\n const dosInstructions =\n dos?.map((doThis, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={doThis} type=\"do\" />\n )) ?? null;\n\n const dontsInstructions =\n donts?.map((dont, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={dont} type=\"dont\" />\n )) ?? null;\n\n const orderedInstructions =\n sort === 'dosFirst' ? (\n <>\n {dosInstructions}\n {dontsInstructions}\n </>\n ) : (\n <>\n {dontsInstructions}\n {dosInstructions}\n </>\n );\n\n return <ul className={clsx('tw-instructions', className)}>{orderedInstructions}</ul>;\n};\n\nfunction Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {\n const isInstructionNode =\n typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;\n return (\n <li className=\"instruction\">\n {type === 'do' ? (\n <DoIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n ) : (\n <DontIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n )}\n <Body className=\"text-primary\" type={Typography.BODY_LARGE}>\n {isInstructionNode ? item.content : item}\n </Body>\n </li>\n );\n}\n\nexport default InstructionsList;\n"],"names":["InstructionsList","className","dos","donts","sort","dosInstructions","map","doThis","index","_jsx","Instruction","item","type","dontsInstructions","dont","orderedInstructions","_jsxs","_Fragment","children","clsx","isInstructionNode","DoIcon","size","title","undefined","DontIcon","Body","Typography","BODY_LARGE","content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BMA,MAAAA,gBAAgB,GAAGA,CAAC;EAAEC,SAAS;EAAEC,GAAG;EAAEC,KAAK;AAAEC,EAAAA,IAAI,GAAG,UAAA;AAAU,CAAyB,KAAI;EAC/F,MAAMC,eAAe,GACnBH,GAAG,EAAEI,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK;AAAA;AACrB;AACAC,EAAAA,cAAA,CAACC,WAAW,EAAA;AAAaC,IAAAA,IAAI,EAAEJ,MAAO;AAACK,IAAAA,IAAI,EAAC,IAAA;AAAI,GAAA,EAA9BJ,MACnB,CAAC,IAAI,IAAI,CAAA;EAEZ,MAAMK,iBAAiB,GACrBV,KAAK,EAAEG,GAAG,CAAC,CAACQ,IAAI,EAAEN,KAAK;AAAA;AACrB;AACAC,EAAAA,cAAA,CAACC,WAAW,EAAA;AAAaC,IAAAA,IAAI,EAAEG,IAAK;AAACF,IAAAA,IAAI,EAAC,MAAA;AAAM,GAAA,EAA9BJ,MACnB,CAAC,IAAI,IAAI,CAAA;EAEZ,MAAMO,mBAAmB,GACvBX,IAAI,KAAK,UAAU,gBACjBY,eAAA,CAAAC,mBAAA,EAAA;IAAAC,QAAA,EAAA,CACGb,eAAe,EACfQ,iBAAiB,CAAA;AAAA,GACpB,CAAG,gBAEHG,eAAA,CAAAC,mBAAA,EAA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,CAAA;AAET;;;;"}
1
+ {"version":3,"file":"InstructionsList.js","sources":["../../src/instructionsList/InstructionsList.tsx"],"sourcesContent":["import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport Body from '../body/Body';\nimport { Typography, CommonProps } from '../common';\n\ntype InstructionNode = {\n content: ReactNode;\n ['aria-label']: string;\n};\n\nexport type InstructionsListProps = CommonProps &\n (\n | {\n dos?: readonly ReactNode[];\n donts?: readonly ReactNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n | {\n dos?: readonly InstructionNode[];\n donts?: readonly InstructionNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n );\n\nconst InstructionsList = ({ className, dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {\n const dosInstructions =\n dos?.map((doThis, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={doThis} type=\"do\" />\n )) ?? null;\n\n const dontsInstructions =\n donts?.map((dont, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={dont} type=\"dont\" />\n )) ?? null;\n\n const orderedInstructions =\n sort === 'dosFirst' ? (\n <>\n {dosInstructions}\n {dontsInstructions}\n </>\n ) : (\n <>\n {dontsInstructions}\n {dosInstructions}\n </>\n );\n\n return <ul className={clsx('tw-instructions', className)}>{orderedInstructions}</ul>;\n};\n\nfunction Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {\n const isInstructionNode =\n typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;\n return (\n <li className=\"instruction\">\n {type === 'do' ? (\n <DoIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n ) : (\n <DontIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n )}\n <Body className=\"text-primary\" type={Typography.BODY_LARGE}>\n {isInstructionNode ? item.content : item}\n </Body>\n </li>\n );\n}\n\nexport default InstructionsList;\n"],"names":["InstructionsList","className","dos","donts","sort","dosInstructions","map","doThis","index","_jsx","Instruction","item","type","dontsInstructions","dont","orderedInstructions","_jsxs","_Fragment","children","clsx","isInstructionNode","DoIcon","size","title","undefined","DontIcon","Body","Typography","BODY_LARGE","content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BMA,MAAAA,gBAAgB,GAAGA,CAAC;EAAEC,SAAS;EAAEC,GAAG;EAAEC,KAAK;AAAEC,EAAAA,IAAI,GAAG;AAAU,CAAyB,KAAI;EAC/F,MAAMC,eAAe,GACnBH,GAAG,EAAEI,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK;AAAA;AACrB;AACAC,EAAAA,cAAA,CAACC,WAAW,EAAA;AAAaC,IAAAA,IAAI,EAAEJ,MAAO;AAACK,IAAAA,IAAI,EAAC;AAAI,GAAA,EAA9BJ,MACnB,CAAC,IAAI,IAAI;EAEZ,MAAMK,iBAAiB,GACrBV,KAAK,EAAEG,GAAG,CAAC,CAACQ,IAAI,EAAEN,KAAK;AAAA;AACrB;AACAC,EAAAA,cAAA,CAACC,WAAW,EAAA;AAAaC,IAAAA,IAAI,EAAEG,IAAK;AAACF,IAAAA,IAAI,EAAC;AAAM,GAAA,EAA9BJ,MACnB,CAAC,IAAI,IAAI;EAEZ,MAAMO,mBAAmB,GACvBX,IAAI,KAAK,UAAU,gBACjBY,eAAA,CAAAC,mBAAA,EAAA;IAAAC,QAAA,EAAA,CACGb,eAAe,EACfQ,iBAAiB;AAAA,GACpB,CAAG,gBAEHG,eAAA,CAAAC,mBAAA,EAAA;IAAAC,QAAA,EAAA,CACGL,iBAAiB,EACjBR,eAAe;AAAA,GAClB,CACD;AAEH,EAAA,oBAAOI,cAAA,CAAA,IAAA,EAAA;AAAIR,IAAAA,SAAS,EAAEkB,SAAI,CAAC,iBAAiB,EAAElB,SAAS,CAAE;AAAAiB,IAAAA,QAAA,EAAEH;AAAmB,GAAK,CAAC;AACtF;AAEA,SAASL,WAAWA,CAAC;EAAEC,IAAI;AAAEC,EAAAA;AAAkE,CAAA,EAAA;AAC7F,EAAA,MAAMQ,iBAAiB,GACrB,OAAOT,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,IAAI,IAAI,SAAS,IAAIA,IAAI,IAAI,YAAY,IAAIA,IAAI;AACxF,EAAA,oBACEK,eAAA,CAAA,IAAA,EAAA;AAAIf,IAAAA,SAAS,EAAC,aAAa;AAAAiB,IAAAA,QAAA,GACxBN,IAAI,KAAK,IAAI,gBACZH,cAAA,CAACY,qBAAM,EAAA;AACLC,MAAAA,IAAI,EAAE,EAAG;AACTrB,MAAAA,SAAS,EAAEW,IAAK;AAChBW,MAAAA,KAAK,EAAEH,iBAAiB,GAAGT,IAAI,CAAC,YAAY,CAAC,GAAGa;AAAU,KAC1D,CAAA,gBAEFf,cAAA,CAACgB,qBAAQ,EAAA;AACPH,MAAAA,IAAI,EAAE,EAAG;AACTrB,MAAAA,SAAS,EAAEW,IAAK;AAChBW,MAAAA,KAAK,EAAEH,iBAAiB,GAAGT,IAAI,CAAC,YAAY,CAAC,GAAGa;AAAU,KAAA,CAE7D,eACDf,cAAA,CAACiB,YAAI,EAAA;AAACzB,MAAAA,SAAS,EAAC,cAAc;MAACW,IAAI,EAAEe,qBAAU,CAACC,UAAW;AAAAV,MAAAA,QAAA,EACxDE,iBAAiB,GAAGT,IAAI,CAACkB,OAAO,GAAGlB;AAAI,KACpC,CACR;AAAA,GAAI,CAAC;AAET;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InstructionsList.mjs","sources":["../../src/instructionsList/InstructionsList.tsx"],"sourcesContent":["import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport Body from '../body/Body';\nimport { Typography, CommonProps } from '../common';\n\ntype InstructionNode = {\n content: ReactNode;\n ['aria-label']: string;\n};\n\nexport type InstructionsListProps = CommonProps &\n (\n | {\n dos?: readonly ReactNode[];\n donts?: readonly ReactNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n | {\n dos?: readonly InstructionNode[];\n donts?: readonly InstructionNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n );\n\nconst InstructionsList = ({ className, dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {\n const dosInstructions =\n dos?.map((doThis, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={doThis} type=\"do\" />\n )) ?? null;\n\n const dontsInstructions =\n donts?.map((dont, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={dont} type=\"dont\" />\n )) ?? null;\n\n const orderedInstructions =\n sort === 'dosFirst' ? (\n <>\n {dosInstructions}\n {dontsInstructions}\n </>\n ) : (\n <>\n {dontsInstructions}\n {dosInstructions}\n </>\n );\n\n return <ul className={clsx('tw-instructions', className)}>{orderedInstructions}</ul>;\n};\n\nfunction Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {\n const isInstructionNode =\n typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;\n return (\n <li className=\"instruction\">\n {type === 'do' ? (\n <DoIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n ) : (\n <DontIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n )}\n <Body className=\"text-primary\" type={Typography.BODY_LARGE}>\n {isInstructionNode ? item.content : item}\n </Body>\n </li>\n );\n}\n\nexport default InstructionsList;\n"],"names":["InstructionsList","className","dos","donts","sort","dosInstructions","map","doThis","index","_jsx","Instruction","item","type","dontsInstructions","dont","orderedInstructions","_jsxs","_Fragment","children","clsx","isInstructionNode","DoIcon","size","title","undefined","DontIcon","Body","Typography","BODY_LARGE","content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BMA,MAAAA,gBAAgB,GAAGA,CAAC;EAAEC,SAAS;EAAEC,GA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A;AACxF,EAAA,oBACEK,IAAA,CAAA,IAAA,EAAA;AAAIf,IAAAA,SAAS,EAAC,aAAa;AAAAiB,IAAAA,QAAA,GACxBN,IAAI,KAAK,IAAI,gBACZH,GAAA,CAACY,eAAM,EAAA;AACLC,MAAAA,IAAI,EAAE,EAAG;AACTrB,MAAAA,SAAS,EAAEW,IAAK;AAChBW,MAAAA,KAAK,EAAEH,iBAAiB,GAAGT,IAAI,CAAC,YAAY,CAAC,GAAGa,SAAAA;AAAU,KAC1D,CAAA,gBAEFf,GAAA,CAACgB,eAAQ,EAAA;AACPH,MAAAA,IAAI,EAAE,EAAG;AACTrB,MAAAA,SAAS,EAAEW,IAAK;AAChBW,MAAAA,KAAK,EAAEH,iBAAiB,GAAGT,IAAI,CAAC,YAAY,CAAC,GAAGa,SAAAA;AAAU,KAAA,CAE7D,eACDf,GAAA,CAACiB,IAAI,EAAA;AAACzB,MAAAA,SAAS,EAAC,cAAc;MAACW,IAAI,EAAEe,UAAU,CAACC,UAAW;AAAAV,MAAAA,QAAA,EACxDE,iBAAiB,GAAGT,IAAI,CAACkB,OAAO,GAAGlB,IAAAA;AAAI,KACpC,CACR,CAAA;AAAA,GAAI,CAAC,CAAA;AAET;;;;"}
1
+ {"version":3,"file":"InstructionsList.mjs","sources":["../../src/instructionsList/InstructionsList.tsx"],"sourcesContent":["import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport Body from '../body/Body';\nimport { Typography, CommonProps } from '../common';\n\ntype InstructionNode = {\n content: ReactNode;\n ['aria-label']: string;\n};\n\nexport type InstructionsListProps = CommonProps &\n (\n | {\n dos?: readonly ReactNode[];\n donts?: readonly ReactNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n | {\n dos?: readonly InstructionNode[];\n donts?: readonly InstructionNode[];\n sort?: 'dosFirst' | 'dontsFirst';\n }\n );\n\nconst InstructionsList = ({ className, dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {\n const dosInstructions =\n dos?.map((doThis, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={doThis} type=\"do\" />\n )) ?? null;\n\n const dontsInstructions =\n donts?.map((dont, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <Instruction key={index} item={dont} type=\"dont\" />\n )) ?? null;\n\n const orderedInstructions =\n sort === 'dosFirst' ? (\n <>\n {dosInstructions}\n {dontsInstructions}\n </>\n ) : (\n <>\n {dontsInstructions}\n {dosInstructions}\n </>\n );\n\n return <ul className={clsx('tw-instructions', className)}>{orderedInstructions}</ul>;\n};\n\nfunction Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {\n const isInstructionNode =\n typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;\n return (\n <li className=\"instruction\">\n {type === 'do' ? (\n <DoIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n ) : (\n <DontIcon\n size={24}\n className={type}\n title={isInstructionNode ? item['aria-label'] : undefined}\n />\n )}\n <Body className=\"text-primary\" type={Typography.BODY_LARGE}>\n {isInstructionNode ? item.content : item}\n </Body>\n </li>\n );\n}\n\nexport default InstructionsList;\n"],"names":["InstructionsList","className","dos","donts","sort","dosInstructions","map","doThis","index","_jsx","Instruction","item","type","dontsInstructions","dont","orderedInstructions","_jsxs","_Fragment","children","clsx","isInstructionNode","DoIcon","size","title","undefined","DontIcon","Body","Typography","BODY_LARGE","content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BMA,MAAAA,gBAAgB,GAAGA,CAAC;EAAEC,SAAS;EAAEC,GAAG;EAAEC,KAAK;AAAEC,EAAAA,IAAI,GAAG;AAAU,CAAyB,KAAI;EAC/F,MAAMC,eAAe,GACnBH,GAAG,EAAEI,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK;AAAA;AACrB;AACAC,EAAAA,GAAA,CAACC,WAAW,EAAA;AAAaC,I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AY,CAAC,GAAGa;AAAU,KAC1D,CAAA,gBAEFf,GAAA,CAACgB,eAAQ,EAAA;AACPH,MAAAA,IAAI,EAAE,EAAG;AACTrB,MAAAA,SAAS,EAAEW,IAAK;AAChBW,MAAAA,KAAK,EAAEH,iBAAiB,GAAGT,IAAI,CAAC,YAAY,CAAC,GAAGa;AAAU,KAAA,CAE7D,eACDf,GAAA,CAACiB,IAAI,EAAA;AAACzB,MAAAA,SAAS,EAAC,cAAc;MAACW,IAAI,EAAEe,UAAU,CAACC,UAAW;AAAAV,MAAAA,QAAA,EACxDE,iBAAiB,GAAGT,IAAI,CAACkB,OAAO,GAAGlB;AAAI,KACpC,CACR;AAAA,GAAI,CAAC;AAET;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sources":["../../src/label/Label.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport messages from './Label.messages';\nimport { useIntl } from 'react-intl';\nimport Body from '../body';\nimport { CommonProps } from '../common';\nimport { PropsWithChildren } from 'react';\n\nexport type LabelProps = {\n id?: string;\n htmlFor?: string;\n className?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Avoid using `<Label>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field label={..} description={..} required={..}>..</Field>\n * ```\n */\nconst Label = ({ className, children, htmlFor, id }: LabelProps) => {\n return (\n <label\n id={id}\n htmlFor={htmlFor}\n className={clsx(\n 'np-label d-flex flex-column np-text-body-default-bold text-primary m-b-0',\n className,\n )}\n >\n {children}\n </label>\n );\n};\n\nexport type LabelOptionalProps = PropsWithChildren<CommonProps>;\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Optional = function Optional({ children, className }: LabelOptionalProps) {\n const { formatMessage } = useIntl();\n return (\n <div>\n {children}\n <Body as=\"span\" className={clsx('text-secondary', 'm-l-1', className)}>\n {formatMessage(messages.optionalLabel)}\n </Body>\n </div>\n );\n};\n\nexport type LabelDescriptionProps = PropsWithChildren<CommonProps> & { id?: string };\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Description = function Description({ id, children, className }: LabelDescriptionProps) {\n return children ? (\n <Body id={id} className={clsx('text-secondary', className)}>\n {children}\n </Body>\n ) : null;\n};\n\nexport { Label };\n"],"names":["Label","className","children","htmlFor","id","_jsx","clsx","Optional","formatMessage","useIntl","_jsxs","Body","as","messages","optionalLabel","Description"],"mappings":";;;;;;;;AAuBMA,MAAAA,KAAK,GAAGA,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,OAAO;AAAEC,EAAAA,EAAAA;AAAE,CAAc,KAAI;AACjE,EAAA,oBACEC,cAAA,CAAA,OAAA,EAAA;AACED,IAAAA,EAAE,EAAEA,EAAG;AACPD,IAAAA,OAAO,EAAEA,OAAQ;AACjBF,IAAAA,SAAS,EAAEK,SAAI,CACb,0EAA0E,EAC1EL,SAAS,CACT;AAAAC,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GACJ,CAAC,CAAA;AAEZ,EAAC;AAID;AACAF,KAAK,CAACO,QAAQ,GAAG,SAASA,QAAQA,CAAC;EAAEL,QAAQ;AAAED,EAAAA,SAAAA;AAA+B,CAAA,EAAA;EAC5E,MAAM;AAAEO,IAAAA,aAAAA;GAAe,GAAGC,iBAAO,EAAE,CAAA;AACnC,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AAAAR,IAAAA,QAAA,EACGA,CAAAA,QAAQ,eACTG,cAAA,CAACM,YAAI,EAAA;AAACC,MAAAA,EAAE,EAAC,MAAM;MAACX,SAAS,EAAEK,SAAI,CAAC,gBAAgB,EAAE,OAAO,EAAEL,SAAS,CAAE;AAAAC,MAAAA,QAAA,EACnEM,aAAa,CAACK,sBAAQ,CAACC,aAAa,CAAA;AAAC,KAClC,CACR,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV,CAAC,CAAA;AAID;AACAd,KAAK,CAACe,WAAW,GAAG,SAASA,WAAWA,CAAC;EAAEX,EAAE;EAAEF,QAAQ;AAAED,EAAAA,SAAAA;AAAkC,CAAA,EAAA;AACzF,EAAA,OAAOC,QAAQ,gBACbG,cAAA,CAACM,YAAI,EAAA;AAACP,IAAAA,EAAE,EAAEA,EAAG;AAACH,IAAAA,SAAS,EAAEK,SAAI,CAAC,gBAAgB,EAAEL,SAAS,CAAE;AAAAC,IAAAA,QAAA,EACxDA,QAAAA;GACG,CAAC,GACL,IAAI,CAAA;AACV,CAAC;;;;"}
1
+ {"version":3,"file":"Label.js","sources":["../../src/label/Label.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport messages from './Label.messages';\nimport { useIntl } from 'react-intl';\nimport Body from '../body';\nimport { CommonProps } from '../common';\nimport { PropsWithChildren } from 'react';\n\nexport type LabelProps = {\n id?: string;\n htmlFor?: string;\n className?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Avoid using `<Label>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field label={..} description={..} required={..}>..</Field>\n * ```\n */\nconst Label = ({ className, children, htmlFor, id }: LabelProps) => {\n return (\n <label\n id={id}\n htmlFor={htmlFor}\n className={clsx(\n 'np-label d-flex flex-column np-text-body-default-bold text-primary m-b-0',\n className,\n )}\n >\n {children}\n </label>\n );\n};\n\nexport type LabelOptionalProps = PropsWithChildren<CommonProps>;\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Optional = function Optional({ children, className }: LabelOptionalProps) {\n const { formatMessage } = useIntl();\n return (\n <div>\n {children}\n <Body as=\"span\" className={clsx('text-secondary', 'm-l-1', className)}>\n {formatMessage(messages.optionalLabel)}\n </Body>\n </div>\n );\n};\n\nexport type LabelDescriptionProps = PropsWithChildren<CommonProps> & { id?: string };\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Description = function Description({ id, children, className }: LabelDescriptionProps) {\n return children ? (\n <Body id={id} className={clsx('text-secondary', className)}>\n {children}\n </Body>\n ) : null;\n};\n\nexport { Label };\n"],"names":["Label","className","children","htmlFor","id","_jsx","cl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1 @@
1
- {"version":3,"file":"Label.messages.js","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n});\n"],"names":["defineMessages","optionalLabel","id"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA,wBAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"Label.messages.js","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n});\n"],"names":["defineMessages","optionalLabel","id"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA;AAEH;AACF,CAAA,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Label.messages.mjs","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n});\n"],"names":["defineMessages","optionalLabel","id"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA,wBAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"Label.messages.mjs","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n});\n"],"names":["defineMessages","optionalLabel","id"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA;AAEH;AACF,CAAA,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Label.mjs","sources":["../../src/label/Label.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport messages from './Label.messages';\nimport { useIntl } from 'react-intl';\nimport Body from '../body';\nimport { CommonProps } from '../common';\nimport { PropsWithChildren } from 'react';\n\nexport type LabelProps = {\n id?: string;\n htmlFor?: string;\n className?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Avoid using `<Label>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field label={..} description={..} required={..}>..</Field>\n * ```\n */\nconst Label = ({ className, children, htmlFor, id }: LabelProps) => {\n return (\n <label\n id={id}\n htmlFor={htmlFor}\n className={clsx(\n 'np-label d-flex flex-column np-text-body-default-bold text-primary m-b-0',\n className,\n )}\n >\n {children}\n </label>\n );\n};\n\nexport type LabelOptionalProps = PropsWithChildren<CommonProps>;\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Optional = function Optional({ children, className }: LabelOptionalProps) {\n const { formatMessage } = useIntl();\n return (\n <div>\n {children}\n <Body as=\"span\" className={clsx('text-secondary', 'm-l-1', className)}>\n {formatMessage(messages.optionalLabel)}\n </Body>\n </div>\n );\n};\n\nexport type LabelDescriptionProps = PropsWithChildren<CommonProps> & { id?: string };\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Description = function Description({ id, children, className }: LabelDescriptionProps) {\n return children ? (\n <Body id={id} className={clsx('text-secondary', className)}>\n {children}\n </Body>\n ) : null;\n};\n\nexport { Label };\n"],"names":["Label","className","children","htmlFor","id","_jsx","clsx","Optional","formatMessage","useIntl","_jsxs","Body","as","messages","optionalLabel","Description"],"mappings":";;;;;;AAuBMA,MAAAA,KAAK,GAAGA,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,OAAO;AAAEC,EAAAA,EAAAA;AAAE,CAAc,KAAI;AACjE,EAAA,oBACEC,GAAA,CAAA,OAAA,EAAA;AACED,IAAAA,EAAE,EAAEA,EAAG;AACPD,IAAAA,OAAO,EAAEA,OAAQ;AACjBF,IAAAA,SAAS,EAAEK,IAAI,CACb,0EAA0E,EAC1EL,SAAS,CACT;AAAAC,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GACJ,CAAC,CAAA;AAEZ,EAAC;AAID;AACAF,KAAK,CAACO,QAAQ,GAAG,SAASA,QAAQA,CAAC;EAAEL,QAAQ;AAAED,EAAAA,SAAAA;AAA+B,CAAA,EAAA;EAC5E,MAAM;AAAEO,IAAAA,aAAAA;GAAe,GAAGC,OAAO,EAAE,CAAA;AACnC,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AAAAR,IAAAA,QAAA,EACGA,CAAAA,QAAQ,eACTG,GAAA,CAACM,IAAI,EAAA;AAACC,MAAAA,EAAE,EAAC,MAAM;MAACX,SAAS,EAAEK,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAEL,SAAS,CAAE;AAAAC,MAAAA,QAAA,EACnEM,aAAa,CAACK,QAAQ,CAACC,aAAa,CAAA;AAAC,KAClC,CACR,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV,CAAC,CAAA;AAID;AACAd,KAAK,CAACe,WAAW,GAAG,SAASA,WAAWA,CAAC;EAAEX,EAAE;EAAEF,QAAQ;AAAED,EAAAA,SAAAA;AAAkC,CAAA,EAAA;AACzF,EAAA,OAAOC,QAAQ,gBACbG,GAAA,CAACM,IAAI,EAAA;AAACP,IAAAA,EAAE,EAAEA,EAAG;AAACH,IAAAA,SAAS,EAAEK,IAAI,CAAC,gBAAgB,EAAEL,SAAS,CAAE;AAAAC,IAAAA,QAAA,EACxDA,QAAAA;GACG,CAAC,GACL,IAAI,CAAA;AACV,CAAC;;;;"}
1
+ {"version":3,"file":"Label.mjs","sources":["../../src/label/Label.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport messages from './Label.messages';\nimport { useIntl } from 'react-intl';\nimport Body from '../body';\nimport { CommonProps } from '../common';\nimport { PropsWithChildren } from 'react';\n\nexport type LabelProps = {\n id?: string;\n htmlFor?: string;\n className?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Avoid using `<Label>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field label={..} description={..} required={..}>..</Field>\n * ```\n */\nconst Label = ({ className, children, htmlFor, id }: LabelProps) => {\n return (\n <label\n id={id}\n htmlFor={htmlFor}\n className={clsx(\n 'np-label d-flex flex-column np-text-body-default-bold text-primary m-b-0',\n className,\n )}\n >\n {children}\n </label>\n );\n};\n\nexport type LabelOptionalProps = PropsWithChildren<CommonProps>;\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Optional = function Optional({ children, className }: LabelOptionalProps) {\n const { formatMessage } = useIntl();\n return (\n <div>\n {children}\n <Body as=\"span\" className={clsx('text-secondary', 'm-l-1', className)}>\n {formatMessage(messages.optionalLabel)}\n </Body>\n </div>\n );\n};\n\nexport type LabelDescriptionProps = PropsWithChildren<CommonProps> & { id?: string };\n\n// eslint-disable-next-line functional/immutable-data\nLabel.Description = function Description({ id, children, className }: LabelDescriptionProps) {\n return children ? (\n <Body id={id} className={clsx('text-secondary', className)}>\n {children}\n </Body>\n ) : null;\n};\n\nexport { Label };\n"],"names":["Label","className","children","htmlFor","id","_jsx","clsx","Optional","formatMessage","useIntl","_jsxs","Body","as","messages","optionalLabel","Description"],"mappings":";;;;;;AAuBMA,MAAAA,KAAK,GAAGA,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,OAAO;AAAEC,EAAAA;AAAE,CAAc,KAAI;AACjE,EAAA,oBACEC,GAAA,CAAA,OAAA,EAAA;AACED,IAAAA,EAAE,EAAEA,EAAG;AACPD,IAAAA,OAAO,EAAEA,OAAQ;AACjBF,IAAAA,SAAS,EAAEK,IAAI,CACb,0EAA0E,EAC1EL,SAAS,CACT;AAAAC,IAAAA,QAAA,EAEDA;AAAQ,GACJ,CAAC;AAEZ;AAIA;AACAF,KAAK,CAACO,QAAQ,GAAG,SAASA,QAAQA,CAAC;EAAEL,QAAQ;AAAED,EAAAA;AAA+B,CAAA,EAAA;EAC5E,MAAM;AAAEO,IAAAA;GAAe,GAAGC,OAAO,EAAE;AACnC,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AAAAR,IAAAA,QAAA,EACGA,CAAAA,QAAQ,eACTG,GAAA,CAACM,IAAI,EAAA;AAACC,MAAAA,EAAE,EAAC,MAAM;MAACX,SAAS,EAAEK,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAEL,SAAS,CAAE;AAAAC,MAAAA,QAAA,EACnEM,aAAa,CAACK,QAAQ,CAACC,aAAa;AAAC,KAClC,CACR;AAAA,GAAK,CAAC;AAEV,CAAC;AAID;AACAd,KAAK,CAACe,WAAW,GAAG,SAASA,WAAWA,CAAC;EAAEX,EAAE;EAAEF,QAAQ;AAAED,EAAAA;AAAkC,CAAA,EAAA;AACzF,EAAA,OAAOC,QAAQ,gBACbG,GAAA,CAACM,IAAI,EAAA;AAACP,IAAAA,EAAE,EAAEA,EAAG;AAACH,IAAAA,SAAS,EAAEK,IAAI,CAAC,gBAAgB,EAAEL,SAAS,CAAE;AAAAC,IAAAA,QAAA,EACxDA;GACG,CAAC,GACL,IAAI;AACV,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LegacyListItem.js","sources":["../../src/legacylistItem/LegacyListItem.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, FC, ReactNode } from 'react';\n\nimport Body from '../body/Body';\n\nexport type LegacyListItemProps = {\n title: ReactNode;\n value: ReactNode;\n media?: ReactNode;\n action?: ReactNode;\n className?: string;\n isContainerAligned?: boolean;\n as?: ElementType;\n};\n\nconst LegacyListItem: FC<LegacyListItemProps> = ({\n media,\n action,\n className,\n title,\n value,\n isContainerAligned,\n as = 'li',\n ...rest\n}) => {\n const Element = as;\n\n return (\n <Element\n className={clsx('np-list-item d-flex align-items-center p-y-2', className, {\n 'p-x-2': !isContainerAligned,\n })}\n {...rest}\n >\n {media}\n\n <div className={clsx('d-flex flex-column', { 'p-l-2': !!media, 'p-r-2': !!action })}>\n <Body type=\"body-default\" className=\"text-secondary m-b-0\">\n {title}\n </Body>\n {value && (\n <Body type=\"body-large\" className=\"text-primary text-overflow-wrap m-b-0\">\n {value}\n </Body>\n )}\n </div>\n\n {action ? <div className=\"np-list-item__action m-l-auto\">{action}</div> : null}\n </Element>\n );\n};\n\nexport default LegacyListItem;\n"],"names":["LegacyListItem","media","action","className","title","value","isContainerAligned","as","rest","Element","_jsxs","clsx","children","_jsx","Body","type"],"mappings":";;;;;;;;AAeMA,MAAAA,cAAc,GAA4BA,CAAC;EAC/CC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,KAAK;EACLC,kBAAkB;AAClBC,EAAAA,EAAE,GAAG,IAAI;EACT,GAAGC,IAAAA;AACJ,CAAA,KAAI;EACH,MAAMC,OAAO,GAAGF,EAAE,CAAA;EAElB,oBACEG,eAAA,CAACD,OAAO,EAAA;AACNN,IAAAA,SAAS,EAAEQ,SAAI,CAAC,8CAA8C,EAAER,SAAS,EAAE;AACzE,MAAA,OAAO,EAAE,CAACG,kBAAAA;AACX,KAAA,CAAE;AAAA,IAAA,GACCE,IAAI;IAAAI,QAAA,EAAA,CAEPX,KAAK,eAENS,eAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAEQ,SAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,EAAE,CAAC,CAACV,KAAK;QAAE,OAAO,EAAE,CAAC,CAACC,MAAAA;AAAM,OAAE,CAAE;MAAAU,QAAA,EAAA,cAClFC,cAAA,CAACC,YAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,cAAc;AAACZ,QAAAA,SAAS,EAAC,sBAAsB;AAAAS,QAAAA,QAAA,EACvDR,KAAAA;AAAK,OACF,CACN,EAACC,KAAK,iBACJQ,cAAA,CAACC,YAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,YAAY;AAACZ,QAAAA,SAAS,EAAC,uCAAuC;AAAAS,QAAAA,QAAA,EACtEP,KAAAA;AAAK,OACF,CACP,CAAA;AAAA,KACE,CAEL,EAACH,MAAM,gBAAGW,cAAA,CAAA,KAAA,EAAA;AAAKV,MAAAA,SAAS,EAAC,+BAA+B;AAAAS,MAAAA,QAAA,EAAEV,MAAAA;KAAY,CAAC,GAAG,IAAI,CAAA;AAAA,GACvE,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"LegacyListItem.js","sources":["../../src/legacylistItem/LegacyListItem.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, FC, ReactNode } from 'react';\n\nimport Body from '../body/Body';\n\nexport type LegacyListItemProps = {\n title: ReactNode;\n value: ReactNode;\n media?: ReactNode;\n action?: ReactNode;\n className?: string;\n isContainerAligned?: boolean;\n as?: ElementType;\n};\n\nconst LegacyListItem: FC<LegacyListItemProps> = ({\n media,\n action,\n className,\n title,\n value,\n isContainerAligned,\n as = 'li',\n ...rest\n}) => {\n const Element = as;\n\n return (\n <Element\n className={clsx('np-list-item d-flex align-items-center p-y-2', className, {\n 'p-x-2': !isContainerAligned,\n })}\n {...rest}\n >\n {media}\n\n <div className={clsx('d-flex flex-column', { 'p-l-2': !!media, 'p-r-2': !!action })}>\n <Body type=\"body-default\" className=\"text-secondary m-b-0\">\n {title}\n </Body>\n {value && (\n <Body type=\"body-large\" className=\"text-primary text-overflow-wrap m-b-0\">\n {value}\n </Body>\n )}\n </div>\n\n {action ? <div className=\"np-list-item__action m-l-auto\">{action}</div> : null}\n </Element>\n );\n};\n\nexport default LegacyListItem;\n"],"names":["LegacyListItem","media","action","className","title","value","isContainerAligned","as","rest","Element","_jsxs","clsx","children","_jsx","Body","type"],"mappings":";;;;;;;;AAeMA,MAAAA,cAAc,GAA4BA,CAAC;EAC/CC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,KAAK;EACLC,kBAAkB;AAClBC,EAAAA,EAAE,GAAG,IAAI;EACT,GAAGC;AACJ,CAAA,KAAI;EACH,MAAMC,OAAO,GAAGF,EAAE;EAElB,oBACEG,eAAA,CAACD,OAAO,EAAA;AACNN,IAAAA,SAAS,EAAEQ,SAAI,CAAC,8CAA8C,EAAER,SAAS,EAAE;AACzE,MAAA,OAAO,EAAE,CAACG;AACX,KAAA,CAAE;AAAA,IAAA,GACCE,IAAI;IAAAI,QAAA,EAAA,CAEPX,KAAK,eAENS,eAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAEQ,SAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,EAAE,CAAC,CAACV,KAAK;QAAE,OAAO,EAAE,CAAC,CAACC;AAAM,OAAE,CAAE;MAAAU,QAAA,EAAA,cAClFC,cAAA,CAACC,YAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,cAAc;AAACZ,QAAAA,SAAS,EAAC,sBAAsB;AAAAS,QAAAA,QAAA,EACvDR;AAAK,OACF,CACN,EAACC,KAAK,iBACJQ,cAAA,CAACC,YAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,YAAY;AAACZ,QAAAA,SAAS,EAAC,uCAAuC;AAAAS,QAAAA,QAAA,EACtEP;AAAK,OACF,CACP;AAAA,KACE,CAEL,EAACH,MAAM,gBAAGW,cAAA,CAAA,KAAA,EAAA;AAAKV,MAAAA,SAAS,EAAC,+BAA+B;AAAAS,MAAAA,QAAA,EAAEV;KAAY,CAAC,GAAG,IAAI;AAAA,GACvE,CAAC;AAEd;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LegacyListItem.mjs","sources":["../../src/legacylistItem/LegacyListItem.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, FC, ReactNode } from 'react';\n\nimport Body from '../body/Body';\n\nexport type LegacyListItemProps = {\n title: ReactNode;\n value: ReactNode;\n media?: ReactNode;\n action?: ReactNode;\n className?: string;\n isContainerAligned?: boolean;\n as?: ElementType;\n};\n\nconst LegacyListItem: FC<LegacyListItemProps> = ({\n media,\n action,\n className,\n title,\n value,\n isContainerAligned,\n as = 'li',\n ...rest\n}) => {\n const Element = as;\n\n return (\n <Element\n className={clsx('np-list-item d-flex align-items-center p-y-2', className, {\n 'p-x-2': !isContainerAligned,\n })}\n {...rest}\n >\n {media}\n\n <div className={clsx('d-flex flex-column', { 'p-l-2': !!media, 'p-r-2': !!action })}>\n <Body type=\"body-default\" className=\"text-secondary m-b-0\">\n {title}\n </Body>\n {value && (\n <Body type=\"body-large\" className=\"text-primary text-overflow-wrap m-b-0\">\n {value}\n </Body>\n )}\n </div>\n\n {action ? <div className=\"np-list-item__action m-l-auto\">{action}</div> : null}\n </Element>\n );\n};\n\nexport default LegacyListItem;\n"],"names":["LegacyListItem","media","action","className","title","value","isContainerAligned","as","rest","Element","_jsxs","clsx","children","_jsx","Body","type"],"mappings":";;;;AAeMA,MAAAA,cAAc,GAA4BA,CAAC;EAC/CC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,KAAK;EACLC,kBAAkB;AAClBC,EAAAA,EAAE,GAAG,IAAI;EACT,GAAGC,IAAAA;AACJ,CAAA,KAAI;EACH,MAAMC,OAAO,GAAGF,EAAE,CAAA;EAElB,oBACEG,IAAA,CAACD,OAAO,EAAA;AACNN,IAAAA,SAAS,EAAEQ,IAAI,CAAC,8CAA8C,EAAER,SAAS,EAAE;AACzE,MAAA,OAAO,EAAE,CAACG,kBAAAA;AACX,KAAA,CAAE;AAAA,IAAA,GACCE,IAAI;IAAAI,QAAA,EAAA,CAEPX,KAAK,eAENS,IAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAEQ,IAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,EAAE,CAAC,CAACV,KAAK;QAAE,OAAO,EAAE,CAAC,CAACC,MAAAA;AAAM,OAAE,CAAE;MAAAU,QAAA,EAAA,cAClFC,GAAA,CAACC,IAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,cAAc;AAACZ,QAAAA,SAAS,EAAC,sBAAsB;AAAAS,QAAAA,QAAA,EACvDR,KAAAA;AAAK,OACF,CACN,EAACC,KAAK,iBACJQ,GAAA,CAACC,IAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,YAAY;AAACZ,QAAAA,SAAS,EAAC,uCAAuC;AAAAS,QAAAA,QAAA,EACtEP,KAAAA;AAAK,OACF,CACP,CAAA;AAAA,KACE,CAEL,EAACH,MAAM,gBAAGW,GAAA,CAAA,KAAA,EAAA;AAAKV,MAAAA,SAAS,EAAC,+BAA+B;AAAAS,MAAAA,QAAA,EAAEV,MAAAA;KAAY,CAAC,GAAG,IAAI,CAAA;AAAA,GACvE,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"LegacyListItem.mjs","sources":["../../src/legacylistItem/LegacyListItem.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, FC, ReactNode } from 'react';\n\nimport Body from '../body/Body';\n\nexport type LegacyListItemProps = {\n title: ReactNode;\n value: ReactNode;\n media?: ReactNode;\n action?: ReactNode;\n className?: string;\n isContainerAligned?: boolean;\n as?: ElementType;\n};\n\nconst LegacyListItem: FC<LegacyListItemProps> = ({\n media,\n action,\n className,\n title,\n value,\n isContainerAligned,\n as = 'li',\n ...rest\n}) => {\n const Element = as;\n\n return (\n <Element\n className={clsx('np-list-item d-flex align-items-center p-y-2', className, {\n 'p-x-2': !isContainerAligned,\n })}\n {...rest}\n >\n {media}\n\n <div className={clsx('d-flex flex-column', { 'p-l-2': !!media, 'p-r-2': !!action })}>\n <Body type=\"body-default\" className=\"text-secondary m-b-0\">\n {title}\n </Body>\n {value && (\n <Body type=\"body-large\" className=\"text-primary text-overflow-wrap m-b-0\">\n {value}\n </Body>\n )}\n </div>\n\n {action ? <div className=\"np-list-item__action m-l-auto\">{action}</div> : null}\n </Element>\n );\n};\n\nexport default LegacyListItem;\n"],"names":["LegacyListItem","media","action","className","title","value","isContainerAligned","as","rest","Element","_jsxs","clsx","children","_jsx","Body","type"],"mappings":";;;;AAeMA,MAAAA,cAAc,GAA4BA,CAAC;EAC/CC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,KAAK;EACLC,kBAAkB;AAClBC,EAAAA,EAAE,GAAG,IAAI;EACT,GAAGC;AACJ,CAAA,KAAI;EACH,MAAMC,OAAO,GAAGF,EAAE;EAElB,oBACEG,IAAA,CAACD,OAAO,EAAA;AACNN,IAAAA,SAAS,EAAEQ,IAAI,CAAC,8CAA8C,EAAER,SAAS,EAAE;AACzE,MAAA,OAAO,EAAE,CAACG;AACX,KAAA,CAAE;AAAA,IAAA,GACCE,IAAI;IAAAI,QAAA,EAAA,CAEPX,KAAK,eAENS,IAAA,CAAA,KAAA,EAAA;AAAKP,MAAAA,SAAS,EAAEQ,IAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,EAAE,CAAC,CAACV,KAAK;QAAE,OAAO,EAAE,CAAC,CAACC;AAAM,OAAE,CAAE;MAAAU,QAAA,EAAA,cAClFC,GAAA,CAACC,IAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,cAAc;AAACZ,QAAAA,SAAS,EAAC,sBAAsB;AAAAS,QAAAA,QAAA,EACvDR;AAAK,OACF,CACN,EAACC,KAAK,iBACJQ,GAAA,CAACC,IAAI,EAAA;AAACC,QAAAA,IAAI,EAAC,YAAY;AAACZ,QAAAA,SAAS,EAAC,uCAAuC;AAAAS,QAAAA,QAAA,EACtEP;AAAK,OACF,CACP;AAAA,KACE,CAEL,EAACH,MAAM,gBAAGW,GAAA,CAAA,KAAA,EAAA;AAAKV,MAAAA,SAAS,EAAC,+BAA+B;AAAAS,MAAAA,QAAA,EAAEV;KAAY,CAAC,GAAG,IAAI;AAAA,GACvE,CAAC;AAEd;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../src/legacylistItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ className, children }: ListProps) {\n return <ul className={clsx(className, 'list-unstyled')}>{children}</ul>;\n}\n"],"names":["List","className","children","_jsx","clsx"],"mappings":";;;;;SAOgBA,IAAIA,CAAC;EAAEC,SAAS;AAAEC,EAAAA,QAAAA;AAAqB,CAAA,EAAA;AACrD,EAAA,oBAAOC,cAAA,CAAA,IAAA,EAAA;AAAIF,IAAAA,SAAS,EAAEG,SAAI,CAACH,SAAS,EAAE,eAAe,CAAE;AAAAC,IAAAA,QAAA,EAAEA,QAAAA;AAAQ,GAAK,CAAC,CAAA;AACzE;;;;"}
1
+ {"version":3,"file":"List.js","sources":["../../src/legacylistItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ className, children }: ListProps) {\n return <ul className={clsx(className, 'list-unstyled')}>{children}</ul>;\n}\n"],"names":["List","className","children","_jsx","clsx"],"mappings":";;;;;SAOgBA,IAAIA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAqB,CAAA,EAAA;AACrD,EAAA,oBAAOC,cAAA,CAAA,IAAA,EAAA;AAAIF,IAAAA,SAAS,EAAEG,SAAI,CAACH,SAAS,EAAE,eAAe,CAAE;AAAAC,IAAAA,QAAA,EAAEA;AAAQ,GAAK,CAAC;AACzE;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"List.mjs","sources":["../../src/legacylistItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ className, children }: ListProps) {\n return <ul className={clsx(className, 'list-unstyled')}>{children}</ul>;\n}\n"],"names":["List","className","children","_jsx","clsx"],"mappings":";;;SAOgBA,IAAIA,CAAC;EAAEC,SAAS;AAAEC,EAAAA,QAAAA;AAAqB,CAAA,EAAA;AACrD,EAAA,oBAAOC,GAAA,CAAA,IAAA,EAAA;AAAIF,IAAAA,SAAS,EAAEG,IAAI,CAACH,SAAS,EAAE,eAAe,CAAE;AAAAC,IAAAA,QAAA,EAAEA,QAAAA;AAAQ,GAAK,CAAC,CAAA;AACzE;;;;"}
1
+ {"version":3,"file":"List.mjs","sources":["../../src/legacylistItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ className, children }: ListProps) {\n return <ul className={clsx(className, 'list-unstyled')}>{children}</ul>;\n}\n"],"names":["List","className","children","_jsx","clsx"],"mappings":";;;SAOgBA,IAAIA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAqB,CAAA,EAAA;AACrD,EAAA,oBAAOC,GAAA,CAAA,IAAA,EAAA;AAAIF,IAAAA,SAAS,EAAEG,IAAI,CAACH,SAAS,EAAE,eAAe,CAAE;AAAAC,IAAAA,QAAA,EAAEA;AAAQ,GAAK,CAAC;AACzE;;;;"}