@progressiveui/react 2.0.3 → 2.0.4

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 (1530) hide show
  1. package/dist/components/Accordion/__tests__/utils.d.ts +12 -0
  2. package/dist/components/Accordion/components/Accordion.d.ts +7 -0
  3. package/dist/components/Accordion/components/AccordionItem.d.ts +46 -0
  4. package/dist/components/Accordion/components/AccordionProvider.d.ts +7 -0
  5. package/dist/components/Accordion/components/ControlledAccordion.d.ts +8 -0
  6. package/dist/components/Accordion/components/withAccordionItem.d.ts +11 -0
  7. package/dist/components/Accordion/hooks/useAccordion.d.ts +8 -0
  8. package/dist/components/Accordion/hooks/useAccordionItem.d.ts +7 -0
  9. package/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +12 -0
  10. package/dist/components/Accordion/hooks/useAccordionState.d.ts +14 -0
  11. package/dist/components/Accordion/index.d.ts +17 -0
  12. package/dist/components/Accordion/utils/bem.d.ts +7 -0
  13. package/dist/components/Accordion/utils/constants.d.ts +58 -0
  14. package/dist/components/AnchorNavigation/AnchorNavigation-test.d.ts +1 -0
  15. package/dist/components/AuthLayout/AuthLayout-test.d.ts +1 -0
  16. package/dist/components/AuthLayout/AuthLayout.d.ts +20 -0
  17. package/dist/components/Avatar/Avatar.d.ts +33 -0
  18. package/dist/components/Avatar/index.d.ts +1 -0
  19. package/dist/components/BannerNavigation/BannerNavigation-test.d.ts +1 -0
  20. package/dist/components/BannerNavigation/kinds.d.ts +2 -0
  21. package/dist/components/Breadcrumb/Breadcrumb-test.d.ts +1 -0
  22. package/dist/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +2 -0
  23. package/dist/components/Breadcrumb/Breadcrumb.d.ts +11 -0
  24. package/dist/components/Breadcrumb/index.d.ts +1 -0
  25. package/dist/components/BreadcrumbItem/BreadcrumbItem.d.ts +21 -0
  26. package/dist/components/Button/Button.d.ts +59 -0
  27. package/dist/components/Button/index.d.ts +1 -0
  28. package/dist/components/Card/Card-old.d.ts +25 -0
  29. package/dist/components/Card/Card-test.d.ts +1 -0
  30. package/dist/components/Card/Card.d.ts +61 -0
  31. package/dist/components/Card/CardExternal.d.ts +37 -0
  32. package/dist/components/Checkbox/Checkbox-old.d.ts +3 -0
  33. package/dist/components/Checkbox/Checkbox-test.d.ts +1 -0
  34. package/dist/components/Checkbox/Checkbox.Skeleton.d.ts +11 -0
  35. package/dist/components/Checkbox/Checkbox.legacy.d.ts +5 -0
  36. package/dist/components/CheckboxGroup/RadioButtonGroup.d.ts +2 -0
  37. package/dist/components/CheckboxGroup/RadioButtonGroupWithoutControls.d.ts +2 -0
  38. package/dist/components/CheckboxGroup/index.d.ts +1 -0
  39. package/dist/components/ContentSwitcher/ContentSwitcher-test.d.ts +1 -0
  40. package/dist/components/ContentSwitcher/ContentSwitcher.d.ts +11 -0
  41. package/dist/components/ContextMenu/ContextMenu.d.ts +31 -0
  42. package/dist/components/Credits/Credits-test.d.ts +1 -0
  43. package/dist/components/DatePicker/DatePicker.d.ts +8 -0
  44. package/dist/components/DatePicker/DateRangePicker.d.ts +8 -0
  45. package/dist/components/DatePicker/index.d.ts +4 -0
  46. package/dist/components/Empty/Empty-test.d.ts +1 -0
  47. package/dist/components/Footer/Footer.d.ts +39 -0
  48. package/dist/components/Footer/FooterExternal.d.ts +22 -0
  49. package/dist/components/Footer/index.d.ts +2 -0
  50. package/dist/components/Form/Form-test.d.ts +1 -0
  51. package/dist/components/Form/Form.d.ts +15 -0
  52. package/dist/components/FormGroup/FormGroup-old.d.ts +43 -0
  53. package/dist/components/FormGroup/FormGroup-test.d.ts +1 -0
  54. package/dist/components/FormHint/FormHint-old.d.ts +17 -0
  55. package/dist/components/FormHint/FormHint-test.d.ts +1 -0
  56. package/dist/components/FormHint/FormHint.d.ts +15 -0
  57. package/dist/components/FormItem/FormItem-test.d.ts +1 -0
  58. package/dist/components/FormItem/FormItem.d.ts +17 -0
  59. package/dist/components/FormItem/RfFormItem.d.ts +11 -0
  60. package/dist/components/FormLabel/FormLabel-test.d.ts +1 -0
  61. package/dist/components/FormLabel/FormLabel.d.ts +15 -0
  62. package/dist/components/FormLabel/RfFormLabel.d.ts +17 -0
  63. package/dist/components/Hero/Hero-old.d.ts +37 -0
  64. package/dist/components/Hero/Hero-test.d.ts +1 -0
  65. package/dist/components/Hero/Hero.d.ts +53 -0
  66. package/dist/components/Hero/HeroExternal-old.d.ts +18 -0
  67. package/dist/components/Hero/HeroExternal.d.ts +21 -0
  68. package/dist/components/InfoBar/InfoBar-test.d.ts +1 -0
  69. package/dist/components/InfoBar/InfoBar.d.ts +23 -0
  70. package/dist/components/InlineLoading/InlineLoading-FCold.d.ts +18 -0
  71. package/dist/components/InlineLoading/InlineLoading-Old.d.ts +2 -0
  72. package/dist/components/InlineLoading/InlineLoading-test.d.ts +1 -0
  73. package/dist/components/InlineLoading/index.d.ts +1 -0
  74. package/dist/components/InlineLoading/inline-loading.config.d.ts +11 -0
  75. package/dist/components/InlineLoading/inline-loading.d.ts +47 -0
  76. package/dist/components/Input/Input-test.d.ts +1 -0
  77. package/dist/components/Input/Input.d.ts +151 -0
  78. package/dist/components/Input/index.d.ts +3 -0
  79. package/dist/components/Input/useInput.d.ts +126 -0
  80. package/dist/components/InputGroup/InputGroup-old.d.ts +2 -0
  81. package/dist/components/InputGroup/InputGroup-test.d.ts +1 -0
  82. package/dist/components/InputGroup/InputGroup.d.ts +48 -0
  83. package/dist/components/InputGroup/RadioButtonGroupWithoutControls.d.ts +1 -0
  84. package/dist/components/Item/Item-test.d.ts +1 -0
  85. package/dist/components/Item/Item.d.ts +59 -0
  86. package/dist/components/Link/Link-test.d.ts +1 -0
  87. package/dist/components/Link/Link-test.e2e.d.ts +1 -0
  88. package/dist/components/List/List-test.d.ts +1 -0
  89. package/dist/components/List/List.d.ts +32 -0
  90. package/dist/components/Loading/Loading-oldClass.d.ts +2 -0
  91. package/dist/components/Loading/Loading-oldFC.d.ts +20 -0
  92. package/dist/components/Loading/Loading-test.d.ts +1 -0
  93. package/dist/components/Loading/loading-vanilla.d.ts +52 -0
  94. package/dist/components/Loading/loading.config.d.ts +28 -0
  95. package/dist/components/MainNavigation/MainNavigation-test.d.ts +1 -0
  96. package/dist/components/MainNavigation/MainNavigation.d.ts +51 -0
  97. package/dist/components/MainNavigation/MainNavigationContext.d.ts +25 -0
  98. package/dist/components/MainNavigation/MainNavigationRtl-story.legacy.d.ts +1 -0
  99. package/dist/components/MainNavigation/MobileButton.d.ts +17 -0
  100. package/dist/components/MainNavigation/index.d.ts +3 -0
  101. package/dist/components/MainNavigation/useMainNavigation.d.ts +7 -0
  102. package/dist/components/MainNavigationItem/MainNavigationItem.d.ts +29 -0
  103. package/dist/components/Modal/Modal-test.d.ts +1 -0
  104. package/dist/components/Modal/Modal.d.ts +122 -0
  105. package/dist/components/Modal/ModalFooter-old.d.ts +13 -0
  106. package/dist/components/Modal/ModalFooter.d.ts +8 -0
  107. package/dist/components/Modal/ModalHeader.d.ts +8 -0
  108. package/dist/components/Modal/ModalWithControls-story.legacy.d.ts +1 -0
  109. package/dist/components/ModalWrapper/ModalWrapper-old.d.ts +51 -0
  110. package/dist/components/ModalWrapper/ModalWrapper-test.d.ts +1 -0
  111. package/dist/components/ModalWrapper/ModalWrapper.d.ts +53 -0
  112. package/dist/components/Module/Module-old.d.ts +25 -0
  113. package/dist/components/Module/Module-test.d.ts +1 -0
  114. package/dist/components/Notification/Notification-test.d.ts +1 -0
  115. package/dist/components/Notification/NotificationButton.d.ts +36 -0
  116. package/dist/components/Notification/ToastNotification.d.ts +10 -0
  117. package/dist/components/Notification/a11yIconWarningSolid.d.ts +2 -0
  118. package/dist/components/NumberInput/NumberInput-test.d.ts +1 -0
  119. package/dist/components/NumberInput/NumberInput.Skeleton.d.ts +10 -0
  120. package/dist/components/NumberInput/NumberInput.d.ts +64 -0
  121. package/dist/components/Pagination/Pagination-fc.d.ts +56 -0
  122. package/dist/components/Pagination/Pagination-old.d.ts +132 -0
  123. package/dist/components/Pagination/Pagination-test.d.ts +1 -0
  124. package/dist/components/Pagination/Pagination.Skeleton.d.ts +2 -0
  125. package/dist/components/Pagination/index.d.ts +1 -0
  126. package/dist/components/RadioButton/RadioButton-fc.d.ts +1 -0
  127. package/dist/components/RadioButton/RadioButton-old.d.ts +3 -0
  128. package/dist/components/RadioButton/RadioButton-test.d.ts +1 -0
  129. package/dist/components/RadioButton/RadioButton.Skeleton.d.ts +2 -0
  130. package/dist/components/RadioButton/RadioButton.d.ts +27 -0
  131. package/dist/components/RadioButton/index.d.ts +2 -0
  132. package/dist/components/RadioButtonGroup/RadioButtonGroup-test.d.ts +1 -0
  133. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +76 -0
  134. package/dist/components/RadioButtonGroup/RadioButtonGroupWithoutControls.d.ts +24 -0
  135. package/{src/components/RadioButtonGroup/index.js → dist/components/RadioButtonGroup/index.d.ts} +0 -0
  136. package/dist/components/ReadMore/ReadMore-test.d.ts +1 -0
  137. package/dist/components/ReadMore/ReadMore.d.ts +45 -0
  138. package/{src/components/ReadMore/index.js → dist/components/ReadMore/index.d.ts} +0 -0
  139. package/dist/components/Search/Search-test.d.ts +1 -0
  140. package/dist/components/Search/Search.d.ts +50 -0
  141. package/dist/components/SecondaryNavigation/SecondaryNavigation-old.d.ts +35 -0
  142. package/dist/components/SecondaryNavigation/SecondaryNavigation-test.d.ts +1 -0
  143. package/dist/components/SecondaryNavigation/index.d.ts +2 -0
  144. package/dist/components/Select/Select-test.d.ts +1 -0
  145. package/dist/components/Select/Select.Skeleton.d.ts +11 -0
  146. package/dist/components/Select/Select.d.ts +24 -0
  147. package/dist/components/SelectItem/SelectItem-old.d.ts +29 -0
  148. package/dist/components/SelectItem/SelectItem-test.d.ts +1 -0
  149. package/dist/components/SelectItem/SelectItem.d.ts +28 -0
  150. package/dist/components/SelectItemGroup/SelectItemGroup-test.d.ts +1 -0
  151. package/dist/components/SelectItemGroup/SelectItemGroup.d.ts +21 -0
  152. package/dist/components/Sidebar/Sidebar-test.d.ts +1 -0
  153. package/dist/components/Sidebar/Sidebar.d.ts +46 -0
  154. package/dist/components/SkeletonText/SkeletonText-old.d.ts +29 -0
  155. package/dist/components/SkeletonText/SkeletonText-test.d.ts +1 -0
  156. package/dist/components/SkeletonText/SkeletonText.d.ts +22 -0
  157. package/dist/components/Slider/Slider-old.d.ts +53 -0
  158. package/dist/components/Slider/Slider-test.d.ts +1 -0
  159. package/dist/components/Slider/Slider.Skeleton.d.ts +11 -0
  160. package/dist/components/Slider/Slider.d.ts +71 -0
  161. package/dist/components/Slider/Slider.legacy.d.ts +2 -0
  162. package/dist/components/Slider/index.d.ts +1 -0
  163. package/dist/components/StepNavigation/StepNavigation-test.d.ts +1 -0
  164. package/dist/components/StepNavigation/StepNavigation.d.ts +42 -0
  165. package/dist/components/StepNavigationItem/StepNavigationItem-test.d.ts +1 -0
  166. package/dist/components/StepNavigationItem/StepNavigationItem.d.ts +55 -0
  167. package/dist/components/Story/Story-text.d.ts +1 -0
  168. package/dist/components/SubNavigation/SubNavigation-test.d.ts +1 -0
  169. package/dist/components/SubNavigation/index.d.ts +9 -0
  170. package/dist/components/Tab/Tab-oldClass.d.ts +2 -0
  171. package/dist/components/Tab/Tab-oldFunc.d.ts +39 -0
  172. package/dist/components/Tab/Tab-test.d.ts +1 -0
  173. package/dist/components/TabContent/TabContent-old.d.ts +13 -0
  174. package/dist/components/TabContent/TabContent-test.d.ts +1 -0
  175. package/dist/components/TabContent/TabContent.d.ts +13 -0
  176. package/dist/components/Table/Table-test.d.ts +1 -0
  177. package/dist/components/Table/TableResponsive-story-legacy.d.ts +1 -0
  178. package/dist/components/Table/TableSimple-story-legacy.d.ts +1 -0
  179. package/dist/components/Table/TableSorting.d.ts +11 -0
  180. package/dist/components/Table/makeData.d.ts +8 -0
  181. package/dist/components/TablePagination/TablePagination.d.ts +33 -0
  182. package/dist/components/Tabs/Tabs-test.d.ts +1 -0
  183. package/dist/components/Tabs/Tabs.Skeleton.d.ts +2 -0
  184. package/dist/components/Tabs/TabsContext.d.ts +8 -0
  185. package/dist/components/Tabs/index.d.ts +1 -0
  186. package/dist/components/Tag/Tag-test.d.ts +1 -0
  187. package/dist/components/Tag/Tag.Skeleton.d.ts +2 -0
  188. package/dist/components/Tag/index.d.ts +2 -0
  189. package/dist/components/Tag/tag.config.d.ts +19 -0
  190. package/dist/components/Text/Text-test.d.ts +1 -0
  191. package/dist/components/Text/Text.d.ts +32 -0
  192. package/dist/components/TextArea/TextArea-old.d.ts +4 -0
  193. package/dist/components/TextArea/TextArea-test.d.ts +1 -0
  194. package/dist/components/TextArea/TextArea.Skeleton.d.ts +11 -0
  195. package/dist/components/TextArea/TextArea.d.ts +8 -0
  196. package/dist/components/TextArea/index.d.ts +1 -0
  197. package/dist/components/TextInput/TextInput-old.d.ts +4 -0
  198. package/dist/components/TextInput/TextInput-test.d.ts +1 -0
  199. package/dist/components/TextInput/TextInput.Skeleton.d.ts +11 -0
  200. package/dist/components/TextInput/TextInput.d.ts +7 -0
  201. package/dist/components/TextInput/TextInput.legacy.d.ts +4 -0
  202. package/dist/components/TextInput/index.d.ts +1 -0
  203. package/dist/components/Toggle/Toggle-old.d.ts +39 -0
  204. package/dist/components/Toggle/Toggle-test.d.ts +1 -0
  205. package/dist/components/Toggle/Toggle.Skeleton.d.ts +5 -0
  206. package/dist/components/Toggle/Toggle.d.ts +36 -0
  207. package/dist/components/Toggle/index.d.ts +1 -0
  208. package/dist/components/Tooltip/Empty.d.ts +1 -0
  209. package/dist/components/Tooltip/Tooltip.d.ts +103 -0
  210. package/dist/components/Unit/Unit-old.d.ts +24 -0
  211. package/dist/components/Unit/Unit-test.d.ts +1 -0
  212. package/{src/components/Unit/index.js → dist/components/Unit/index.d.ts} +0 -0
  213. package/dist/components/User/User-test.d.ts +1 -0
  214. package/dist/components/Value/Value-test.d.ts +1 -0
  215. package/dist/components/Value/Value.d.ts +10 -0
  216. package/dist/components/WFPCoreSettings/WFPCoreProvider.d.ts +21 -0
  217. package/dist/components/WFPCoreSettings/defaults.d.ts +2 -0
  218. package/dist/components/WFPCoreSettings/index.d.ts +4 -0
  219. package/dist/components/WFPCoreSettings/useTheme.d.ts +2 -0
  220. package/dist/components/Wrapper/Wrapper-test.d.ts +1 -0
  221. package/dist/components/Wrapper/Wrapper.d.ts +22 -0
  222. package/dist/globals/js/boot.d.ts +6 -0
  223. package/dist/globals/js/components.d.ts +2 -0
  224. package/dist/globals/js/misc/event-matches.d.ts +7 -0
  225. package/dist/globals/js/misc/get-launching-details.d.ts +4 -0
  226. package/dist/globals/js/misc/mixin.d.ts +12 -0
  227. package/dist/globals/js/misc/on.d.ts +3 -0
  228. package/dist/globals/js/misc/resize.d.ts +6 -0
  229. package/dist/globals/js/misc/svg-toggle-class.d.ts +2 -0
  230. package/dist/globals/js/mixins/create-component.d.ts +31 -0
  231. package/dist/globals/js/mixins/evented-show-hide-state.d.ts +23 -0
  232. package/dist/globals/js/mixins/handles.d.ts +25 -0
  233. package/dist/globals/js/mixins/init-component-by-event.d.ts +23 -0
  234. package/dist/globals/js/mixins/init-component-by-launcher.d.ts +26 -0
  235. package/dist/globals/js/mixins/init-component-by-search.d.ts +17 -0
  236. package/dist/globals/js/mixins/track-blur.d.ts +14 -0
  237. package/dist/globals/js/watch.d.ts +7 -0
  238. package/dist/hooks/useHeightTransition.d.ts +4 -0
  239. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +12 -0
  240. package/dist/hooks/useSettings.d.ts +2 -0
  241. package/dist/hooks/useWizard.d.ts +23 -0
  242. package/dist/iframeResizer.contentWindow.min.js +9 -0
  243. package/dist/index.cjs.js +38 -14
  244. package/dist/index.cjs.js.map +1 -0
  245. package/dist/index.d.ts +74 -0
  246. package/dist/index.es.js +8976 -0
  247. package/dist/index.es.js.map +1 -0
  248. package/dist/index.umd.js +104 -0
  249. package/dist/index.umd.js.map +1 -0
  250. package/dist/indexStories.d.ts +44 -0
  251. package/dist/internal/FloatingMenu.d.ts +135 -0
  252. package/dist/internal/OptimizedResize.d.ts +6 -0
  253. package/dist/internal/RfFormJest.d.ts +7 -0
  254. package/dist/internal/RfFormWrapper.d.ts +7 -0
  255. package/dist/internal/configureStore.d.ts +2 -0
  256. package/dist/internal/loadDefaultData.d.ts +6 -0
  257. package/dist/internal/withTests.d.ts +2 -0
  258. package/dist/prop-types/types.d.ts +5 -0
  259. package/dist/tools/mergeRefs.d.ts +12 -0
  260. package/dist/tools/setupGetInstanceId.d.ts +5 -0
  261. package/dist/tools/withState.d.ts +11 -0
  262. package/dist/tools/wrapComponent.d.ts +14 -0
  263. package/package.json +5 -10
  264. package/es/dist/components/Accordion/__tests__/utils.d.ts +0 -12
  265. package/es/dist/components/Accordion/components/Accordion.d.ts +0 -7
  266. package/es/dist/components/Accordion/components/AccordionItem.d.ts +0 -46
  267. package/es/dist/components/Accordion/components/AccordionProvider.d.ts +0 -7
  268. package/es/dist/components/Accordion/components/ControlledAccordion.d.ts +0 -8
  269. package/es/dist/components/Accordion/components/withAccordionItem.d.ts +0 -11
  270. package/es/dist/components/Accordion/hooks/useAccordion.d.ts +0 -5
  271. package/es/dist/components/Accordion/hooks/useAccordionItem.d.ts +0 -7
  272. package/es/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +0 -13
  273. package/es/dist/components/Accordion/hooks/useAccordionState.d.ts +0 -14
  274. package/es/dist/components/Accordion/hooks/useHeightTransition.d.ts +0 -4
  275. package/es/dist/components/Accordion/index.d.ts +0 -17
  276. package/es/dist/components/Accordion/utils/bem.d.ts +0 -7
  277. package/es/dist/components/Accordion/utils/constants.d.ts +0 -58
  278. package/es/dist/components/AuthLayout/AuthLayout.d.ts +0 -20
  279. package/es/dist/components/Avatar/Avatar.d.ts +0 -33
  280. package/es/dist/components/Avatar/index.d.ts +0 -1
  281. package/es/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -11
  282. package/es/dist/components/Breadcrumb/index.d.ts +0 -1
  283. package/es/dist/components/BreadcrumbItem/BreadcrumbItem.d.ts +0 -21
  284. package/es/dist/components/Button/Button.d.ts +0 -55
  285. package/es/dist/components/Button/index.d.ts +0 -1
  286. package/es/dist/components/Card/Card.d.ts +0 -61
  287. package/es/dist/components/Card/CardExternal.d.ts +0 -37
  288. package/es/dist/components/ContentSwitcher/ContentSwitcher.d.ts +0 -12
  289. package/es/dist/components/ContextMenu/ContextMenu.d.ts +0 -31
  290. package/es/dist/components/DatePicker/DatePicker.d.ts +0 -8
  291. package/es/dist/components/DatePicker/DateRangePicker.d.ts +0 -8
  292. package/es/dist/components/DatePicker/index.d.ts +0 -4
  293. package/es/dist/components/DatePickerNew/DateRangePickerInput.d.ts +0 -11
  294. package/es/dist/components/Footer/Footer.d.ts +0 -39
  295. package/es/dist/components/Footer/FooterExternal.d.ts +0 -22
  296. package/es/dist/components/Footer/index.d.ts +0 -2
  297. package/es/dist/components/Form/Form.d.ts +0 -15
  298. package/es/dist/components/FormHint/FormHint.d.ts +0 -15
  299. package/es/dist/components/FormItem/FormItem.d.ts +0 -17
  300. package/es/dist/components/FormLabel/FormLabel.d.ts +0 -15
  301. package/es/dist/components/Hero/Hero.d.ts +0 -53
  302. package/es/dist/components/Hero/HeroExternal.d.ts +0 -22
  303. package/es/dist/components/InfoBar/InfoBar.d.ts +0 -23
  304. package/es/dist/components/InlineLoading/index.d.ts +0 -1
  305. package/es/dist/components/Input/Input.d.ts +0 -152
  306. package/es/dist/components/Input/index.d.ts +0 -3
  307. package/es/dist/components/Input/useInput.d.ts +0 -126
  308. package/es/dist/components/InputGroup/InputGroup.d.ts +0 -48
  309. package/es/dist/components/Item/Item.d.ts +0 -59
  310. package/es/dist/components/List/List.d.ts +0 -32
  311. package/es/dist/components/MainNavigation/MainNavigation.d.ts +0 -51
  312. package/es/dist/components/MainNavigation/MainNavigationContext.d.ts +0 -25
  313. package/es/dist/components/MainNavigation/MainNavigationExternal.d.ts +0 -72
  314. package/es/dist/components/MainNavigation/MobileButton.d.ts +0 -17
  315. package/es/dist/components/MainNavigation/index.d.ts +0 -3
  316. package/es/dist/components/MainNavigation/useMainNavigation.d.ts +0 -7
  317. package/es/dist/components/MainNavigationItem/MainNavigationItem.d.ts +0 -29
  318. package/es/dist/components/Modal/Modal.d.ts +0 -122
  319. package/es/dist/components/Modal/ModalFooter.d.ts +0 -8
  320. package/es/dist/components/ModalWrapper/ModalWrapper.d.ts +0 -53
  321. package/es/dist/components/Notification/NotificationButton.d.ts +0 -36
  322. package/es/dist/components/Notification/ToastNotification.d.ts +0 -10
  323. package/es/dist/components/NumberInput/NumberInput.Skeleton.d.ts +0 -10
  324. package/es/dist/components/NumberInput/NumberInput.d.ts +0 -64
  325. package/es/dist/components/Pagination/index.d.ts +0 -1
  326. package/es/dist/components/RadioButton/RadioButton.d.ts +0 -27
  327. package/es/dist/components/RadioButton/index.d.ts +0 -2
  328. package/es/dist/components/ReadMore/ReadMore.d.ts +0 -45
  329. package/es/dist/components/ReadMore/index.d.ts +0 -1
  330. package/es/dist/components/Search/Search.d.ts +0 -50
  331. package/es/dist/components/SecondaryNavigation/index.d.ts +0 -2
  332. package/es/dist/components/Select/Select.d.ts +0 -24
  333. package/es/dist/components/SelectItem/SelectItem.d.ts +0 -28
  334. package/es/dist/components/SelectItemGroup/SelectItemGroup.d.ts +0 -21
  335. package/es/dist/components/Sidebar/Sidebar.d.ts +0 -46
  336. package/es/dist/components/SkeletonText/SkeletonText.d.ts +0 -22
  337. package/es/dist/components/Slider/Slider.d.ts +0 -71
  338. package/es/dist/components/Slider/index.d.ts +0 -1
  339. package/es/dist/components/StepNavigation/StepNavigation.d.ts +0 -42
  340. package/es/dist/components/StepNavigationItem/StepNavigationItem.d.ts +0 -55
  341. package/es/dist/components/SubNavigation/index.d.ts +0 -9
  342. package/es/dist/components/TabContent/TabContent.d.ts +0 -13
  343. package/es/dist/components/Table/TableSorting.d.ts +0 -11
  344. package/es/dist/components/TablePagination/TablePagination.d.ts +0 -33
  345. package/es/dist/components/Tabs/TabsContext.d.ts +0 -8
  346. package/es/dist/components/Tabs/index.d.ts +0 -1
  347. package/es/dist/components/Tag/index.d.ts +0 -2
  348. package/es/dist/components/Text/Text.d.ts +0 -30
  349. package/es/dist/components/TextArea/TextArea.d.ts +0 -8
  350. package/es/dist/components/TextArea/index.d.ts +0 -1
  351. package/es/dist/components/TextInput/TextInput.d.ts +0 -7
  352. package/es/dist/components/TextInput/index.d.ts +0 -1
  353. package/es/dist/components/Toggle/Toggle.d.ts +0 -38
  354. package/es/dist/components/Toggle/index.d.ts +0 -1
  355. package/es/dist/components/Tooltip/Tooltip.d.ts +0 -103
  356. package/es/dist/components/Unit/index.d.ts +0 -1
  357. package/es/dist/components/Value/Value.d.ts +0 -11
  358. package/es/dist/components/WFPCoreSettings/WFPCoreProvider.d.ts +0 -21
  359. package/es/dist/components/WFPCoreSettings/defaults.d.ts +0 -2
  360. package/es/dist/components/WFPCoreSettings/index.d.ts +0 -4
  361. package/es/dist/components/WFPCoreSettings/useTheme.d.ts +0 -2
  362. package/es/dist/components/Wrapper/Wrapper.d.ts +0 -22
  363. package/es/dist/hooks/index.d.ts +0 -1
  364. package/es/dist/hooks/useHeightTransition.d.ts +0 -4
  365. package/es/dist/hooks/useId.d.ts +0 -3
  366. package/es/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -12
  367. package/es/dist/hooks/useMergeRef.d.ts +0 -4
  368. package/es/dist/hooks/useSettings.d.ts +0 -2
  369. package/es/dist/index.d.ts +0 -75
  370. package/es/dist/prop-types/types.d.ts +0 -5
  371. package/es/index.js +0 -4387
  372. package/lib/dist/components/Accordion/__tests__/utils.d.ts +0 -12
  373. package/lib/dist/components/Accordion/components/Accordion.d.ts +0 -7
  374. package/lib/dist/components/Accordion/components/AccordionItem.d.ts +0 -46
  375. package/lib/dist/components/Accordion/components/AccordionProvider.d.ts +0 -7
  376. package/lib/dist/components/Accordion/components/ControlledAccordion.d.ts +0 -8
  377. package/lib/dist/components/Accordion/components/withAccordionItem.d.ts +0 -11
  378. package/lib/dist/components/Accordion/hooks/useAccordion.d.ts +0 -5
  379. package/lib/dist/components/Accordion/hooks/useAccordionContext.d.ts +0 -5
  380. package/lib/dist/components/Accordion/hooks/useAccordionItem.d.ts +0 -7
  381. package/lib/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +0 -13
  382. package/lib/dist/components/Accordion/hooks/useAccordionProvider.d.ts +0 -3
  383. package/lib/dist/components/Accordion/hooks/useAccordionState.d.ts +0 -14
  384. package/lib/dist/components/Accordion/hooks/useHeightTransition.d.ts +0 -4
  385. package/lib/dist/components/Accordion/hooks/useId.d.ts +0 -3
  386. package/lib/dist/components/Accordion/hooks/useMergeRef.d.ts +0 -4
  387. package/lib/dist/components/Accordion/index.d.ts +0 -17
  388. package/lib/dist/components/Accordion/utils/bem.d.ts +0 -7
  389. package/lib/dist/components/Accordion/utils/constants.d.ts +0 -58
  390. package/lib/dist/components/Accordion/utils/mergeProps.d.ts +0 -2
  391. package/lib/dist/components/Accordion/utils/useIsomorphicLayoutEffect.d.ts +0 -3
  392. package/lib/dist/components/AnchorNavigation/AnchorNavigation.d.ts +0 -6
  393. package/lib/dist/components/AnchorNavigation/index.d.ts +0 -1
  394. package/lib/dist/components/AuthLayout/AuthLayout.d.ts +0 -20
  395. package/lib/dist/components/AuthLayout/index.d.ts +0 -1
  396. package/lib/dist/components/Avatar/Avatar.d.ts +0 -33
  397. package/lib/dist/components/Avatar/index.d.ts +0 -1
  398. package/lib/dist/components/BannerNavigation/BannerNavigation.d.ts +0 -20
  399. package/lib/dist/components/BannerNavigation/BannerNavigationWithContent.d.ts +0 -13
  400. package/lib/dist/components/BannerNavigation/index.d.ts +0 -2
  401. package/lib/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -11
  402. package/lib/dist/components/Breadcrumb/index.d.ts +0 -1
  403. package/lib/dist/components/BreadcrumbHome/BreadcrumbHome.d.ts +0 -13
  404. package/lib/dist/components/BreadcrumbHome/index.d.ts +0 -1
  405. package/lib/dist/components/BreadcrumbItem/BreadcrumbItem.d.ts +0 -21
  406. package/lib/dist/components/BreadcrumbItem/index.d.ts +0 -1
  407. package/lib/dist/components/Button/Button.Skeleton.d.ts +0 -7
  408. package/lib/dist/components/Button/Button.d.ts +0 -55
  409. package/lib/dist/components/Button/index.d.ts +0 -1
  410. package/lib/dist/components/Card/Card.d.ts +0 -61
  411. package/lib/dist/components/Card/CardExternal.d.ts +0 -37
  412. package/lib/dist/components/Card/index.d.ts +0 -2
  413. package/lib/dist/components/Checkbox/Checkbox.d.ts +0 -37
  414. package/lib/dist/components/Checkbox/index.d.ts +0 -1
  415. package/lib/dist/components/ContentSwitcher/ContentSwitcher.d.ts +0 -12
  416. package/lib/dist/components/ContentSwitcher/index.d.ts +0 -1
  417. package/lib/dist/components/ContextMenu/ContextMenu.d.ts +0 -31
  418. package/lib/dist/components/ContextMenu/index.d.ts +0 -1
  419. package/lib/dist/components/Credits/Credits.d.ts +0 -10
  420. package/lib/dist/components/Credits/index.d.ts +0 -1
  421. package/lib/dist/components/DatePicker/DatePicker.d.ts +0 -8
  422. package/lib/dist/components/DatePicker/DatePickerInput.d.ts +0 -38
  423. package/lib/dist/components/DatePicker/DateRangePicker.d.ts +0 -8
  424. package/lib/dist/components/DatePicker/DateRangePickerInput.d.ts +0 -34
  425. package/lib/dist/components/DatePicker/index.d.ts +0 -4
  426. package/lib/dist/components/DatePickerNew/DateRangePickerInput.d.ts +0 -11
  427. package/lib/dist/components/Empty/Empty.d.ts +0 -40
  428. package/lib/dist/components/Empty/index.d.ts +0 -1
  429. package/lib/dist/components/Footer/Footer.d.ts +0 -39
  430. package/lib/dist/components/Footer/FooterExternal.d.ts +0 -22
  431. package/lib/dist/components/Footer/index.d.ts +0 -2
  432. package/lib/dist/components/Form/Form.d.ts +0 -15
  433. package/lib/dist/components/Form/index.d.ts +0 -1
  434. package/lib/dist/components/FormGroup/FormGroup.d.ts +0 -14
  435. package/lib/dist/components/FormGroup/index.d.ts +0 -1
  436. package/lib/dist/components/FormHint/FormHint.d.ts +0 -15
  437. package/lib/dist/components/FormHint/index.d.ts +0 -1
  438. package/lib/dist/components/FormItem/FormItem.d.ts +0 -17
  439. package/lib/dist/components/FormItem/index.d.ts +0 -1
  440. package/lib/dist/components/FormLabel/FormLabel.d.ts +0 -15
  441. package/lib/dist/components/FormLabel/index.d.ts +0 -1
  442. package/lib/dist/components/Hero/Hero.d.ts +0 -53
  443. package/lib/dist/components/Hero/HeroExternal.d.ts +0 -22
  444. package/lib/dist/components/Hero/index.d.ts +0 -2
  445. package/lib/dist/components/InfoBar/InfoBar.d.ts +0 -23
  446. package/lib/dist/components/InfoBar/index.d.ts +0 -1
  447. package/lib/dist/components/InlineLoading/InlineLoading.d.ts +0 -26
  448. package/lib/dist/components/InlineLoading/index.d.ts +0 -1
  449. package/lib/dist/components/Input/Input.d.ts +0 -152
  450. package/lib/dist/components/Input/index.d.ts +0 -3
  451. package/lib/dist/components/Input/useInput.d.ts +0 -126
  452. package/lib/dist/components/InputGroup/InputGroup.d.ts +0 -48
  453. package/lib/dist/components/InputGroup/index.d.ts +0 -1
  454. package/lib/dist/components/Item/Item.d.ts +0 -59
  455. package/lib/dist/components/Item/index.d.ts +0 -1
  456. package/lib/dist/components/Link/Link.d.ts +0 -37
  457. package/lib/dist/components/Link/index.d.ts +0 -1
  458. package/lib/dist/components/List/List.d.ts +0 -32
  459. package/lib/dist/components/List/ListItem.d.ts +0 -25
  460. package/lib/dist/components/List/index.d.ts +0 -2
  461. package/lib/dist/components/Loading/Loading.d.ts +0 -16
  462. package/lib/dist/components/Loading/index.d.ts +0 -7
  463. package/lib/dist/components/MainNavigation/MainNavigation.d.ts +0 -51
  464. package/lib/dist/components/MainNavigation/MainNavigationContext.d.ts +0 -25
  465. package/lib/dist/components/MainNavigation/MainNavigationExternal.d.ts +0 -72
  466. package/lib/dist/components/MainNavigation/MobileButton.d.ts +0 -17
  467. package/lib/dist/components/MainNavigation/index.d.ts +0 -3
  468. package/lib/dist/components/MainNavigation/useMainNavigation.d.ts +0 -7
  469. package/lib/dist/components/MainNavigationItem/MainNavigationItem.d.ts +0 -29
  470. package/lib/dist/components/MainNavigationItem/index.d.ts +0 -1
  471. package/lib/dist/components/MdxComponents/MdxComponentsNew.d.ts +0 -2
  472. package/lib/dist/components/MdxComponents/index.d.ts +0 -1
  473. package/lib/dist/components/Modal/Modal.d.ts +0 -122
  474. package/lib/dist/components/Modal/ModalFooter.d.ts +0 -8
  475. package/lib/dist/components/Modal/index.d.ts +0 -2
  476. package/lib/dist/components/ModalWrapper/ModalWrapper.d.ts +0 -53
  477. package/lib/dist/components/ModalWrapper/index.d.ts +0 -1
  478. package/lib/dist/components/Module/Module.d.ts +0 -38
  479. package/lib/dist/components/Module/ModuleBody.d.ts +0 -21
  480. package/lib/dist/components/Module/ModuleFooter.d.ts +0 -10
  481. package/lib/dist/components/Module/ModuleHeader.d.ts +0 -16
  482. package/lib/dist/components/Module/index.d.ts +0 -4
  483. package/lib/dist/components/Notification/Callout.d.ts +0 -59
  484. package/lib/dist/components/Notification/NotificationActionButton.d.ts +0 -18
  485. package/lib/dist/components/Notification/NotificationButton.d.ts +0 -36
  486. package/lib/dist/components/Notification/NotificationIcon.d.ts +0 -8
  487. package/lib/dist/components/Notification/NotificationTextDetails.d.ts +0 -10
  488. package/lib/dist/components/Notification/ToastNotification.d.ts +0 -10
  489. package/lib/dist/components/Notification/index.d.ts +0 -5
  490. package/lib/dist/components/NumberInput/NumberInput.Skeleton.d.ts +0 -10
  491. package/lib/dist/components/NumberInput/NumberInput.d.ts +0 -64
  492. package/lib/dist/components/NumberInput/index.d.ts +0 -2
  493. package/lib/dist/components/Pagination/Pagination.d.ts +0 -92
  494. package/lib/dist/components/Pagination/index.d.ts +0 -1
  495. package/lib/dist/components/RadioButton/RadioButton.d.ts +0 -27
  496. package/lib/dist/components/RadioButton/index.d.ts +0 -2
  497. package/lib/dist/components/ReadMore/ReadMore.d.ts +0 -45
  498. package/lib/dist/components/ReadMore/index.d.ts +0 -1
  499. package/lib/dist/components/Search/Search.d.ts +0 -50
  500. package/lib/dist/components/Search/index.d.ts +0 -1
  501. package/lib/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +0 -19
  502. package/lib/dist/components/SecondaryNavigation/SecondaryNavigationTitle.d.ts +0 -8
  503. package/lib/dist/components/SecondaryNavigation/index.d.ts +0 -2
  504. package/lib/dist/components/Select/Select.d.ts +0 -24
  505. package/lib/dist/components/Select/index.d.ts +0 -1
  506. package/lib/dist/components/SelectItem/SelectItem.d.ts +0 -28
  507. package/lib/dist/components/SelectItem/index.d.ts +0 -1
  508. package/lib/dist/components/SelectItemGroup/SelectItemGroup.d.ts +0 -21
  509. package/lib/dist/components/SelectItemGroup/index.d.ts +0 -1
  510. package/lib/dist/components/Sidebar/Sidebar.d.ts +0 -46
  511. package/lib/dist/components/Sidebar/index.d.ts +0 -1
  512. package/lib/dist/components/SkeletonText/SkeletonText.d.ts +0 -22
  513. package/lib/dist/components/SkeletonText/index.d.ts +0 -1
  514. package/lib/dist/components/Slider/Slider.d.ts +0 -71
  515. package/lib/dist/components/Slider/index.d.ts +0 -1
  516. package/lib/dist/components/StepNavigation/StepNavigation.Skeleton.d.ts +0 -2
  517. package/lib/dist/components/StepNavigation/StepNavigation.d.ts +0 -42
  518. package/lib/dist/components/StepNavigation/index.d.ts +0 -2
  519. package/lib/dist/components/StepNavigationItem/StepNavigationItem.d.ts +0 -55
  520. package/lib/dist/components/StepNavigationItem/index.d.ts +0 -1
  521. package/lib/dist/components/Story/Story.d.ts +0 -7
  522. package/lib/dist/components/Story/index.d.ts +0 -1
  523. package/lib/dist/components/SubNavigation/SubNavigation.d.ts +0 -5
  524. package/lib/dist/components/SubNavigation/SubNavigationContent.d.ts +0 -9
  525. package/lib/dist/components/SubNavigation/SubNavigationFilter.d.ts +0 -9
  526. package/lib/dist/components/SubNavigation/SubNavigationGroup.d.ts +0 -17
  527. package/lib/dist/components/SubNavigation/SubNavigationHeader.d.ts +0 -9
  528. package/lib/dist/components/SubNavigation/SubNavigationItem.d.ts +0 -9
  529. package/lib/dist/components/SubNavigation/SubNavigationLink.d.ts +0 -9
  530. package/lib/dist/components/SubNavigation/SubNavigationList.d.ts +0 -9
  531. package/lib/dist/components/SubNavigation/SubNavigationTitle.d.ts +0 -9
  532. package/lib/dist/components/SubNavigation/index.d.ts +0 -9
  533. package/lib/dist/components/Tab/Tab.d.ts +0 -83
  534. package/lib/dist/components/Tab/index.d.ts +0 -2
  535. package/lib/dist/components/Tab/useTab.d.ts +0 -12
  536. package/lib/dist/components/TabContent/TabContent.d.ts +0 -13
  537. package/lib/dist/components/TabContent/index.d.ts +0 -1
  538. package/lib/dist/components/Table/Table.d.ts +0 -8
  539. package/lib/dist/components/Table/TableSorting.d.ts +0 -11
  540. package/lib/dist/components/Table/index.d.ts +0 -2
  541. package/lib/dist/components/TablePagination/TablePagination.d.ts +0 -33
  542. package/lib/dist/components/TablePagination/index.d.ts +0 -1
  543. package/lib/dist/components/Tabs/Tabs.d.ts +0 -67
  544. package/lib/dist/components/Tabs/TabsContext.d.ts +0 -8
  545. package/lib/dist/components/Tabs/index.d.ts +0 -1
  546. package/lib/dist/components/Tag/Tag.d.ts +0 -14
  547. package/lib/dist/components/Tag/index.d.ts +0 -2
  548. package/lib/dist/components/Text/Text.d.ts +0 -30
  549. package/lib/dist/components/Text/index.d.ts +0 -1
  550. package/lib/dist/components/TextArea/TextArea.d.ts +0 -8
  551. package/lib/dist/components/TextArea/index.d.ts +0 -1
  552. package/lib/dist/components/TextInput/TextInput.d.ts +0 -7
  553. package/lib/dist/components/TextInput/index.d.ts +0 -1
  554. package/lib/dist/components/Toggle/Toggle.d.ts +0 -38
  555. package/lib/dist/components/Toggle/index.d.ts +0 -1
  556. package/lib/dist/components/Tooltip/Tooltip.d.ts +0 -103
  557. package/lib/dist/components/Tooltip/index.d.ts +0 -2
  558. package/lib/dist/components/UNCoreSettings/UNCoreProvider.d.ts +0 -21
  559. package/lib/dist/components/UNCoreSettings/defaults.d.ts +0 -2
  560. package/lib/dist/components/UNCoreSettings/index.d.ts +0 -4
  561. package/lib/dist/components/UNCoreSettings/useTheme.d.ts +0 -2
  562. package/lib/dist/components/UNCoreSettings/withUNCoreSettings.d.ts +0 -2
  563. package/lib/dist/components/Unit/InvalidUnit.d.ts +0 -2
  564. package/lib/dist/components/Unit/SimpleCalc.d.ts +0 -17
  565. package/lib/dist/components/Unit/StringUnit.d.ts +0 -2
  566. package/lib/dist/components/Unit/SvgUnit.d.ts +0 -2
  567. package/lib/dist/components/Unit/Unit.d.ts +0 -54
  568. package/lib/dist/components/Unit/UnitList.d.ts +0 -96
  569. package/lib/dist/components/Unit/YearMonthCalc.d.ts +0 -7
  570. package/lib/dist/components/Unit/currencyCalc.d.ts +0 -21
  571. package/lib/dist/components/Unit/index.d.ts +0 -1
  572. package/lib/dist/components/Unit/percentageCalc.d.ts +0 -18
  573. package/lib/dist/components/Unit/scaleLookup.d.ts +0 -24
  574. package/lib/dist/components/User/User.d.ts +0 -55
  575. package/lib/dist/components/User/index.d.ts +0 -1
  576. package/lib/dist/components/Value/Value.d.ts +0 -11
  577. package/lib/dist/components/Value/index.d.ts +0 -1
  578. package/lib/dist/components/WFPCoreSettings/WFPCoreProvider.d.ts +0 -21
  579. package/lib/dist/components/WFPCoreSettings/defaults.d.ts +0 -2
  580. package/lib/dist/components/WFPCoreSettings/index.d.ts +0 -4
  581. package/lib/dist/components/WFPCoreSettings/useTheme.d.ts +0 -2
  582. package/lib/dist/components/WFPCoreSettings/withWFPCoreSettings.d.ts +0 -2
  583. package/lib/dist/components/Wrapper/Wrapper.d.ts +0 -22
  584. package/lib/dist/components/Wrapper/index.d.ts +0 -2
  585. package/lib/dist/globals/data/colors.d.ts +0 -609
  586. package/lib/dist/globals/js/settings.d.ts +0 -34
  587. package/lib/dist/hooks/index.d.ts +0 -1
  588. package/lib/dist/hooks/togglable.d.ts +0 -5
  589. package/lib/dist/hooks/useHeightTransition.d.ts +0 -4
  590. package/lib/dist/hooks/useId.d.ts +0 -3
  591. package/lib/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -12
  592. package/lib/dist/hooks/useMediaQuery.d.ts +0 -19
  593. package/lib/dist/hooks/useMergeRef.d.ts +0 -4
  594. package/lib/dist/hooks/useSettings.d.ts +0 -2
  595. package/lib/dist/index.d.ts +0 -75
  596. package/lib/dist/indexStories.d.ts +0 -1
  597. package/lib/dist/internal/FeatureFlags.d.ts +0 -19
  598. package/lib/dist/prop-types/types.d.ts +0 -5
  599. package/lib/dist/tools/uniqueId.d.ts +0 -2
  600. package/lib/index.js +0 -4575
  601. package/src/assets/internal/background-contrast.png +0 -0
  602. package/src/assets/internal/brand-color.png +0 -0
  603. package/src/assets/internal/branding.svg +0 -31
  604. package/src/assets/internal/colors.png +0 -0
  605. package/src/assets/internal/hero-image.jpg +0 -0
  606. package/src/assets/internal/mobile-android-general.png +0 -0
  607. package/src/assets/internal/secondary-color.png +0 -0
  608. package/src/assets/internal/toolkit.svg +0 -17
  609. package/src/assets/internal/usability.svg +0 -12
  610. package/src/assets/internal/wfp-favicon-png32.png +0 -0
  611. package/src/assets/internal/wfp-favicon-png512.png +0 -0
  612. package/src/assets/internal/wfp-favicon-preview-png32.png +0 -0
  613. package/src/assets/internal/wfp-favicon-preview-png512.png +0 -0
  614. package/src/assets/internal/yemen-hero-min.jpg +0 -0
  615. package/src/components/Accordion/Accordion.stories.tsx +0 -41
  616. package/src/components/Accordion/__tests__/components/Accordion.test.tsx.new +0 -122
  617. package/src/components/Accordion/__tests__/components/AccordionItem.test.tsx.new +0 -353
  618. package/src/components/Accordion/__tests__/components/AccordionMock.test.tsx.new +0 -18
  619. package/src/components/Accordion/__tests__/components/ControlledAccordion.test.tsx.new +0 -38
  620. package/src/components/Accordion/__tests__/hooks/useAccordionProvider.test.ts +0 -56
  621. package/src/components/Accordion/__tests__/hooks/useAccordionState.test.tsx.new +0 -54
  622. package/src/components/Accordion/__tests__/hooks/useId.test.ts +0 -19
  623. package/src/components/Accordion/__tests__/ssr.test.ts +0 -32
  624. package/src/components/Accordion/__tests__/utils.tsx +0 -48
  625. package/src/components/Accordion/components/Accordion.tsx +0 -44
  626. package/src/components/Accordion/components/AccordionItem.tsx +0 -181
  627. package/src/components/Accordion/components/AccordionProvider.tsx +0 -9
  628. package/src/components/Accordion/components/ControlledAccordion.tsx +0 -35
  629. package/src/components/Accordion/components/withAccordionItem.tsx +0 -37
  630. package/src/components/Accordion/hooks/useAccordion.ts +0 -60
  631. package/src/components/Accordion/hooks/useAccordionContext.ts +0 -32
  632. package/src/components/Accordion/hooks/useAccordionItem.ts +0 -31
  633. package/src/components/Accordion/hooks/useAccordionItemEffect.ts +0 -36
  634. package/src/components/Accordion/hooks/useAccordionProvider.ts +0 -35
  635. package/src/components/Accordion/hooks/useAccordionState.ts +0 -14
  636. package/src/components/Accordion/index.ts +0 -23
  637. package/src/components/Accordion/utils/bem.ts +0 -33
  638. package/src/components/Accordion/utils/constants.ts +0 -82
  639. package/src/components/Accordion/utils/mergeProps.ts +0 -24
  640. package/src/components/Accordion/utils/useIsomorphicLayoutEffect.ts +0 -15
  641. package/src/components/AnchorNavigation/AnchorNavigation-test.js +0 -48
  642. package/src/components/AnchorNavigation/AnchorNavigation.stories.tsx +0 -56
  643. package/src/components/AnchorNavigation/AnchorNavigation.tsx +0 -29
  644. package/src/components/AnchorNavigation/index.ts +0 -1
  645. package/src/components/AuthLayout/AuthLayout-test.js +0 -46
  646. package/src/components/AuthLayout/AuthLayout.stories.tsx +0 -146
  647. package/src/components/AuthLayout/AuthLayout.tsx +0 -64
  648. package/src/components/AuthLayout/README.mdx +0 -0
  649. package/src/components/AuthLayout/index.ts +0 -1
  650. package/src/components/Avatar/Avatar.stories.tsx +0 -19
  651. package/src/components/Avatar/Avatar.tsx +0 -99
  652. package/src/components/Avatar/index.ts +0 -1
  653. package/src/components/BannerNavigation/BannerNavigation-test.js +0 -48
  654. package/src/components/BannerNavigation/BannerNavigation.hbs +0 -45
  655. package/src/components/BannerNavigation/BannerNavigation.stories.tsx +0 -62
  656. package/src/components/BannerNavigation/BannerNavigation.tsx +0 -55
  657. package/src/components/BannerNavigation/BannerNavigation.twig +0 -16
  658. package/src/components/BannerNavigation/BannerNavigationWithContent.tsx +0 -93
  659. package/src/components/BannerNavigation/README.mdx +0 -62
  660. package/src/components/BannerNavigation/index.ts +0 -2
  661. package/src/components/BannerNavigation/kinds.js +0 -3
  662. package/src/components/Breadcrumb/Breadcrumb-test.js +0 -50
  663. package/src/components/Breadcrumb/Breadcrumb.Skeleton.jsx +0 -22
  664. package/src/components/Breadcrumb/Breadcrumb.hbs +0 -16
  665. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -39
  666. package/src/components/Breadcrumb/Breadcrumb.tsx +0 -27
  667. package/src/components/Breadcrumb/README.mdx +0 -23
  668. package/src/components/Breadcrumb/index.ts +0 -2
  669. package/src/components/BreadcrumbHome/BreadcrumbHome.tsx +0 -37
  670. package/src/components/BreadcrumbHome/index.ts +0 -1
  671. package/src/components/BreadcrumbItem/BreadcrumbItem.tsx +0 -54
  672. package/src/components/BreadcrumbItem/index.ts +0 -1
  673. package/src/components/Button/Button.Skeleton.tsx +0 -30
  674. package/src/components/Button/Button.d.ts +0 -7
  675. package/src/components/Button/Button.stories.tsx +0 -323
  676. package/src/components/Button/Button.test.tsx +0 -135
  677. package/src/components/Button/Button.tsx +0 -204
  678. package/src/components/Button/Button.twig +0 -1
  679. package/src/components/Button/README.mdx +0 -34
  680. package/src/components/Button/__snapshots__/Button.test.tsx.snap +0 -12
  681. package/src/components/Button/index.ts +0 -2
  682. package/src/components/Card/Card-old.js +0 -187
  683. package/src/components/Card/Card-test.js +0 -27
  684. package/src/components/Card/Card.stories.tsx +0 -105
  685. package/src/components/Card/Card.tsx +0 -159
  686. package/src/components/Card/Card.twig +0 -21
  687. package/src/components/Card/CardExternal.tsx +0 -174
  688. package/src/components/Card/README.mdx +0 -1
  689. package/src/components/Card/index.ts +0 -2
  690. package/src/components/Checkbox/Checkbox-old.js +0 -132
  691. package/src/components/Checkbox/Checkbox-test.js +0 -205
  692. package/src/components/Checkbox/Checkbox.Skeleton.js +0 -37
  693. package/src/components/Checkbox/Checkbox.hbs +0 -15
  694. package/src/components/Checkbox/Checkbox.legacy.js +0 -126
  695. package/src/components/Checkbox/Checkbox.stories.tsx +0 -179
  696. package/src/components/Checkbox/Checkbox.tsx +0 -123
  697. package/src/components/Checkbox/README.mdx +0 -59
  698. package/src/components/Checkbox/index.ts +0 -1
  699. package/src/components/CheckboxGroup/README.md +0 -29
  700. package/src/components/CheckboxGroup/RadioButtonGroup.js +0 -158
  701. package/src/components/CheckboxGroup/RadioButtonGroupWithoutControls.js +0 -46
  702. package/src/components/CheckboxGroup/index.js +0 -1
  703. package/src/components/ContentSwitcher/ContentSwitcher-test.js +0 -117
  704. package/src/components/ContentSwitcher/ContentSwitcher.hbs +0 -5
  705. package/src/components/ContentSwitcher/ContentSwitcher.stories.tsx +0 -94
  706. package/src/components/ContentSwitcher/ContentSwitcher.tsx +0 -57
  707. package/src/components/ContentSwitcher/README.mdx +0 -31
  708. package/src/components/ContentSwitcher/index.ts +0 -1
  709. package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -135
  710. package/src/components/ContextMenu/ContextMenu.tsx +0 -89
  711. package/src/components/ContextMenu/README.mdx +0 -13
  712. package/src/components/ContextMenu/index.ts +0 -1
  713. package/src/components/Credits/Credits-test.js +0 -25
  714. package/src/components/Credits/Credits.hbs +0 -4
  715. package/src/components/Credits/Credits.stories.tsx +0 -30
  716. package/src/components/Credits/Credits.tsx +0 -31
  717. package/src/components/Credits/README.mdx +0 -1
  718. package/src/components/Credits/index.ts +0 -1
  719. package/src/components/DatePicker/DatePicker.stories.tsx +0 -51
  720. package/src/components/DatePicker/DatePicker.tsx +0 -53
  721. package/src/components/DatePicker/DatePickerInput.tsx +0 -82
  722. package/src/components/DatePicker/DatePickerNew.stories.js.new +0 -195
  723. package/src/components/DatePicker/DateRangePicker.tsx +0 -63
  724. package/src/components/DatePicker/DateRangePickerInput.tsx +0 -106
  725. package/src/components/DatePicker/README.mdx +0 -50
  726. package/src/components/DatePicker/index.ts +0 -4
  727. package/src/components/Empty/Empty-test.js +0 -69
  728. package/src/components/Empty/Empty.stories.tsx +0 -53
  729. package/src/components/Empty/Empty.tsx +0 -95
  730. package/src/components/Empty/README.mdx +0 -28
  731. package/src/components/Empty/index.ts +0 -1
  732. package/src/components/Footer/Footer-external.hbs +0 -22
  733. package/src/components/Footer/Footer-internal.hbs +0 -30
  734. package/src/components/Footer/Footer.stories.tsx +0 -331
  735. package/src/components/Footer/Footer.test.tsx +0 -64
  736. package/src/components/Footer/Footer.tsx +0 -116
  737. package/src/components/Footer/FooterExternal.tsx +0 -167
  738. package/src/components/Footer/README.mdx +0 -20
  739. package/src/components/Footer/index.ts +0 -2
  740. package/src/components/Form/Form-test.js +0 -56
  741. package/src/components/Form/Form.stories.tsx +0 -485
  742. package/src/components/Form/Form.tsx +0 -40
  743. package/src/components/Form/README.mdx +0 -46
  744. package/src/components/Form/index.ts +0 -1
  745. package/src/components/FormGroup/FormGroup-old.js +0 -100
  746. package/src/components/FormGroup/FormGroup-test.js +0 -49
  747. package/src/components/FormGroup/FormGroup.stories.tsx.new +0 -306
  748. package/src/components/FormGroup/FormGroup.tsx +0 -63
  749. package/src/components/FormGroup/README.mdx +0 -7
  750. package/src/components/FormGroup/index.ts +0 -1
  751. package/src/components/FormHint/FormHint-old.js +0 -44
  752. package/src/components/FormHint/FormHint-test.js +0 -13
  753. package/src/components/FormHint/FormHint.stories.tsx +0 -72
  754. package/src/components/FormHint/FormHint.tsx +0 -37
  755. package/src/components/FormHint/README.mdx +0 -13
  756. package/src/components/FormHint/index.ts +0 -1
  757. package/src/components/FormItem/FormItem-test.js +0 -10
  758. package/src/components/FormItem/FormItem.tsx +0 -45
  759. package/src/components/FormItem/RfFormItem.js +0 -44
  760. package/src/components/FormItem/__snapshots__/FormItem-test.js.snap +0 -7
  761. package/src/components/FormItem/index.ts +0 -1
  762. package/src/components/FormLabel/FormLabel-test.js +0 -10
  763. package/src/components/FormLabel/FormLabel.hbs +0 -1
  764. package/src/components/FormLabel/FormLabel.stories.tsx +0 -15
  765. package/src/components/FormLabel/FormLabel.tsx +0 -35
  766. package/src/components/FormLabel/README.mdx +0 -1
  767. package/src/components/FormLabel/RfFormLabel.js +0 -38
  768. package/src/components/FormLabel/__snapshots__/FormLabel-test.js.snap +0 -7
  769. package/src/components/FormLabel/index.ts +0 -1
  770. package/src/components/Hero/Hero-old.js +0 -154
  771. package/src/components/Hero/Hero-test.js +0 -81
  772. package/src/components/Hero/Hero.hbs +0 -4
  773. package/src/components/Hero/Hero.stories.tsx +0 -354
  774. package/src/components/Hero/Hero.tsx +0 -142
  775. package/src/components/Hero/Hero.twig +0 -10
  776. package/src/components/Hero/HeroExternal-old.js +0 -54
  777. package/src/components/Hero/HeroExternal.tsx +0 -64
  778. package/src/components/Hero/README.mdx +0 -5
  779. package/src/components/Hero/index.ts +0 -2
  780. package/src/components/InfoBar/InfoBar-test.js +0 -17
  781. package/src/components/InfoBar/InfoBar.stories.tsx +0 -42
  782. package/src/components/InfoBar/InfoBar.test.tsx +0 -46
  783. package/src/components/InfoBar/InfoBar.tsx +0 -46
  784. package/src/components/InfoBar/README.mdx +0 -5
  785. package/src/components/InfoBar/__snapshots__/InfoBar.test.tsx.snap +0 -15
  786. package/src/components/InfoBar/index.ts +0 -1
  787. package/src/components/InlineLoading/InlineLoading-FCold.js +0 -90
  788. package/src/components/InlineLoading/InlineLoading-Old.js +0 -102
  789. package/src/components/InlineLoading/InlineLoading-test.js +0 -90
  790. package/src/components/InlineLoading/InlineLoading.stories.tsx +0 -39
  791. package/src/components/InlineLoading/InlineLoading.tsx +0 -79
  792. package/src/components/InlineLoading/README.mdx +0 -89
  793. package/src/components/InlineLoading/index.ts +0 -1
  794. package/src/components/InlineLoading/inline-loading.config.js +0 -25
  795. package/src/components/InlineLoading/inline-loading.hbs +0 -28
  796. package/src/components/InlineLoading/inline-loading.js +0 -135
  797. package/src/components/Input/Input-test.js +0 -120
  798. package/src/components/Input/Input.stories.tsx +0 -48
  799. package/src/components/Input/Input.tsx +0 -346
  800. package/src/components/Input/README.mdx +0 -46
  801. package/src/components/Input/index.tsx +0 -13
  802. package/src/components/Input/useInput.tsx +0 -192
  803. package/src/components/InputGroup/InputGroup-old.js +0 -166
  804. package/src/components/InputGroup/InputGroup-test.js +0 -114
  805. package/src/components/InputGroup/InputGroup.stories.tsx +0 -265
  806. package/src/components/InputGroup/InputGroup.tsx +0 -132
  807. package/src/components/InputGroup/README.mdx +0 -19
  808. package/src/components/InputGroup/RadioButtonGroupWithoutControls.js +0 -36
  809. package/src/components/InputGroup/index.tsx +0 -1
  810. package/src/components/Item/Item-test.js +0 -33
  811. package/src/components/Item/Item.stories.tsx +0 -158
  812. package/src/components/Item/Item.tsx +0 -134
  813. package/src/components/Item/README.mdx +0 -28
  814. package/src/components/Item/index.ts +0 -1
  815. package/src/components/Link/Link-test.e2e.js +0 -35
  816. package/src/components/Link/Link-test.js +0 -115
  817. package/src/components/Link/Link.mdx +0 -41
  818. package/src/components/Link/Link.stories.tsx +0 -95
  819. package/src/components/Link/Link.test.tsx +0 -100
  820. package/src/components/Link/Link.tsx +0 -91
  821. package/src/components/Link/README.mdx +0 -35
  822. package/src/components/Link/__snapshots__/Link.test.tsx.snap +0 -12
  823. package/src/components/Link/index.ts +0 -1
  824. package/src/components/Link/link-avt.md +0 -32
  825. package/src/components/List/List-test.js +0 -27
  826. package/src/components/List/List.hbs +0 -11
  827. package/src/components/List/List.stories.tsx +0 -195
  828. package/src/components/List/List.tsx +0 -91
  829. package/src/components/List/ListItem.tsx +0 -54
  830. package/src/components/List/README.mdx +0 -19
  831. package/src/components/List/index.ts +0 -2
  832. package/src/components/Loading/Loading-oldClass.js +0 -93
  833. package/src/components/Loading/Loading-oldFC.js +0 -80
  834. package/src/components/Loading/Loading-test.js +0 -68
  835. package/src/components/Loading/Loading.stories.tsx +0 -94
  836. package/src/components/Loading/Loading.tsx +0 -74
  837. package/src/components/Loading/README.mdx +0 -23
  838. package/src/components/Loading/index.ts +0 -8
  839. package/src/components/Loading/loading-vanilla.js +0 -137
  840. package/src/components/Loading/loading.config.js +0 -42
  841. package/src/components/Loading/loading.hbs +0 -18
  842. package/src/components/MainNavigation/MainNavigation-test.js +0 -26
  843. package/src/components/MainNavigation/MainNavigation.hbs +0 -180
  844. package/src/components/MainNavigation/MainNavigation.stories.tsx +0 -678
  845. package/src/components/MainNavigation/MainNavigation.tsx +0 -152
  846. package/src/components/MainNavigation/MainNavigationContext.ts +0 -34
  847. package/src/components/MainNavigation/MainNavigationRtl-story.legacy.js +0 -95
  848. package/src/components/MainNavigation/MobileButton.tsx +0 -29
  849. package/src/components/MainNavigation/README.mdx.legacy +0 -173
  850. package/src/components/MainNavigation/index.ts +0 -3
  851. package/src/components/MainNavigation/main-navigation.js +0 -74
  852. package/src/components/MainNavigation/useMainNavigation.tsx +0 -17
  853. package/src/components/MainNavigationItem/MainNavigationItem.tsx +0 -110
  854. package/src/components/MainNavigationItem/index.ts +0 -1
  855. package/src/components/MdxComponents/MdxComponents.stories.tsx +0 -32
  856. package/src/components/MdxComponents/MdxComponentsNew.tsx +0 -181
  857. package/src/components/MdxComponents/README.mdx +0 -22
  858. package/src/components/MdxComponents/index.ts +0 -1
  859. package/src/components/MdxComponents/markdown.mdx +0 -109
  860. package/src/components/Modal/Modal-test.js +0 -206
  861. package/src/components/Modal/Modal.hbs +0 -26
  862. package/src/components/Modal/Modal.stories.tsx +0 -36
  863. package/src/components/Modal/Modal.tsx +0 -378
  864. package/src/components/Modal/ModalFooter-old.js +0 -41
  865. package/src/components/Modal/ModalFooter.tsx +0 -60
  866. package/src/components/Modal/ModalHeader.js +0 -25
  867. package/src/components/Modal/ModalWithControls-story.legacy.js +0 -44
  868. package/src/components/Modal/README.mdx.legacy +0 -102
  869. package/src/components/Modal/index.ts +0 -2
  870. package/src/components/ModalWrapper/ModalWrapper-old.js +0 -141
  871. package/src/components/ModalWrapper/ModalWrapper-test.js +0 -108
  872. package/src/components/ModalWrapper/ModalWrapper.stories.tsx +0 -109
  873. package/src/components/ModalWrapper/ModalWrapper.tsx +0 -149
  874. package/src/components/ModalWrapper/README.mdx +0 -16
  875. package/src/components/ModalWrapper/index.ts +0 -1
  876. package/src/components/Module/Module-old.js +0 -74
  877. package/src/components/Module/Module-test.js +0 -54
  878. package/src/components/Module/Module.hbs +0 -3
  879. package/src/components/Module/Module.stories.tsx +0 -108
  880. package/src/components/Module/Module.tsx +0 -75
  881. package/src/components/Module/ModuleBody.tsx +0 -42
  882. package/src/components/Module/ModuleFooter.tsx +0 -26
  883. package/src/components/Module/ModuleHeader.tsx +0 -34
  884. package/src/components/Module/README.mdx +0 -28
  885. package/src/components/Module/index.ts +0 -6
  886. package/src/components/Notification/Callout.tsx +0 -141
  887. package/src/components/Notification/InlineNotification.tsx.legacy +0 -142
  888. package/src/components/Notification/Notification-test.js +0 -258
  889. package/src/components/Notification/Notification.stories.tsx +0 -286
  890. package/src/components/Notification/NotificationActionButton.tsx +0 -48
  891. package/src/components/Notification/NotificationButton.tsx +0 -86
  892. package/src/components/Notification/NotificationIcon.tsx +0 -41
  893. package/src/components/Notification/NotificationTextDetails.tsx +0 -51
  894. package/src/components/Notification/README.mdx +0 -26
  895. package/src/components/Notification/ToastNotification.tsx +0 -110
  896. package/src/components/Notification/a11yIconWarningSolid.js +0 -36
  897. package/src/components/Notification/index.ts +0 -7
  898. package/src/components/NumberInput/NumberInput-test.js +0 -285
  899. package/src/components/NumberInput/NumberInput.Skeleton.tsx +0 -29
  900. package/src/components/NumberInput/NumberInput.js.legacy +0 -255
  901. package/src/components/NumberInput/NumberInput.legacy.js +0 -330
  902. package/src/components/NumberInput/NumberInput.stories.tsx +0 -79
  903. package/src/components/NumberInput/NumberInput.tsx +0 -215
  904. package/src/components/NumberInput/README.mdx +0 -16
  905. package/src/components/NumberInput/index.ts +0 -2
  906. package/src/components/Pagination/Pagination-fc.js +0 -217
  907. package/src/components/Pagination/Pagination-old.js +0 -346
  908. package/src/components/Pagination/Pagination-test.js +0 -400
  909. package/src/components/Pagination/Pagination.Skeleton.jsx +0 -22
  910. package/src/components/Pagination/Pagination.stories.tsx +0 -20
  911. package/src/components/Pagination/Pagination.tsx +0 -263
  912. package/src/components/Pagination/README.mdx +0 -27
  913. package/src/components/Pagination/index.js +0 -2
  914. package/src/components/RadioButton/README.mdx +0 -34
  915. package/src/components/RadioButton/RadioButton-fc.js +0 -103
  916. package/src/components/RadioButton/RadioButton-old.js +0 -109
  917. package/src/components/RadioButton/RadioButton-test.js +0 -131
  918. package/src/components/RadioButton/RadioButton.Skeleton.jsx +0 -20
  919. package/src/components/RadioButton/RadioButton.hbs +0 -7
  920. package/src/components/RadioButton/RadioButton.stories.tsx +0 -183
  921. package/src/components/RadioButton/RadioButton.tsx +0 -85
  922. package/src/components/RadioButton/index.ts +0 -3
  923. package/src/components/RadioButtonGroup/README.md +0 -31
  924. package/src/components/RadioButtonGroup/RadioButtonGroup-test.js +0 -65
  925. package/src/components/RadioButtonGroup/RadioButtonGroup.js +0 -172
  926. package/src/components/RadioButtonGroup/RadioButtonGroupWithoutControls.js +0 -44
  927. package/src/components/ReactSelect/README.mdx +0 -33
  928. package/src/components/ReactSelect/ReactSelect.stories.tsx +0 -56
  929. package/src/components/ReadMore/README.mdx +0 -30
  930. package/src/components/ReadMore/ReadMore-test.js +0 -17
  931. package/src/components/ReadMore/ReadMore.stories.tsx +0 -37
  932. package/src/components/ReadMore/ReadMore.tsx +0 -185
  933. package/src/components/Search/README.mdx +0 -22
  934. package/src/components/Search/Search-test.js +0 -178
  935. package/src/components/Search/Search.stories.tsx +0 -112
  936. package/src/components/Search/Search.tsx +0 -177
  937. package/src/components/Search/index.ts +0 -2
  938. package/src/components/SecondaryNavigation/README.mdx +0 -1
  939. package/src/components/SecondaryNavigation/SecondaryNavigation-old.js +0 -80
  940. package/src/components/SecondaryNavigation/SecondaryNavigation-test.js +0 -27
  941. package/src/components/SecondaryNavigation/SecondaryNavigation.hbs +0 -35
  942. package/src/components/SecondaryNavigation/SecondaryNavigation.stories.tsx +0 -133
  943. package/src/components/SecondaryNavigation/SecondaryNavigation.tsx +0 -56
  944. package/src/components/SecondaryNavigation/SecondaryNavigationTitle.tsx +0 -24
  945. package/src/components/SecondaryNavigation/index.js +0 -2
  946. package/src/components/Select/README.mdx +0 -17
  947. package/src/components/Select/Select-test.js +0 -165
  948. package/src/components/Select/Select.Skeleton.js +0 -25
  949. package/src/components/Select/Select.stories.tsx +0 -54
  950. package/src/components/Select/Select.tsx +0 -98
  951. package/src/components/Select/index.ts +0 -1
  952. package/src/components/SelectItem/SelectItem-old.js +0 -40
  953. package/src/components/SelectItem/SelectItem-test.js +0 -45
  954. package/src/components/SelectItem/SelectItem.tsx +0 -57
  955. package/src/components/SelectItem/index.ts +0 -1
  956. package/src/components/SelectItemGroup/SelectItemGroup-test.js +0 -34
  957. package/src/components/SelectItemGroup/SelectItemGroup.tsx +0 -40
  958. package/src/components/SelectItemGroup/index.ts +0 -1
  959. package/src/components/Sidebar/PHONEBOOK.json +0 -1101
  960. package/src/components/Sidebar/README.mdx +0 -0
  961. package/src/components/Sidebar/Sidebar-test.js +0 -55
  962. package/src/components/Sidebar/Sidebar.stories.tsx.new +0 -430
  963. package/src/components/Sidebar/Sidebar.tsx +0 -164
  964. package/src/components/Sidebar/index.ts +0 -8
  965. package/src/components/SkeletonText/README.mdx +0 -29
  966. package/src/components/SkeletonText/SkeletonText-old.js +0 -95
  967. package/src/components/SkeletonText/SkeletonText-test.js +0 -23
  968. package/src/components/SkeletonText/SkeletonText.stories.tsx +0 -19
  969. package/src/components/SkeletonText/SkeletonText.tsx +0 -90
  970. package/src/components/SkeletonText/index.ts +0 -1
  971. package/src/components/Slider/README.mdx +0 -21
  972. package/src/components/Slider/Slider-old.js +0 -315
  973. package/src/components/Slider/Slider-test.js +0 -145
  974. package/src/components/Slider/Slider.Skeleton.jsx +0 -29
  975. package/src/components/Slider/Slider.legacy.js +0 -476
  976. package/src/components/Slider/Slider.stories.tsx +0 -116
  977. package/src/components/Slider/Slider.tsx +0 -242
  978. package/src/components/Slider/index.ts +0 -2
  979. package/src/components/StepNavigation/README.mdx +0 -16
  980. package/src/components/StepNavigation/StepNavigation-test.js +0 -20
  981. package/src/components/StepNavigation/StepNavigation.Skeleton.tsx +0 -33
  982. package/src/components/StepNavigation/StepNavigation.hbs +0 -14
  983. package/src/components/StepNavigation/StepNavigation.stories.tsx +0 -131
  984. package/src/components/StepNavigation/StepNavigation.tsx +0 -159
  985. package/src/components/StepNavigation/index.ts +0 -2
  986. package/src/components/StepNavigationItem/StepNavigationItem-test.js +0 -24
  987. package/src/components/StepNavigationItem/StepNavigationItem.tsx +0 -155
  988. package/src/components/StepNavigationItem/index.ts +0 -1
  989. package/src/components/Story/README.mdx +0 -27
  990. package/src/components/Story/Story-text.js +0 -22
  991. package/src/components/Story/Story.hbs +0 -12
  992. package/src/components/Story/Story.stories.tsx +0 -109
  993. package/src/components/Story/Story.tsx +0 -25
  994. package/src/components/Story/index.ts +0 -1
  995. package/src/components/SubNavigation/README.mdx +0 -111
  996. package/src/components/SubNavigation/SubNavigation-test.js +0 -161
  997. package/src/components/SubNavigation/SubNavigation.stories.tsx +0 -249
  998. package/src/components/SubNavigation/SubNavigation.tsx +0 -6
  999. package/src/components/SubNavigation/SubNavigationContent.tsx +0 -26
  1000. package/src/components/SubNavigation/SubNavigationFilter.tsx +0 -26
  1001. package/src/components/SubNavigation/SubNavigationGroup.tsx +0 -48
  1002. package/src/components/SubNavigation/SubNavigationHeader.tsx +0 -26
  1003. package/src/components/SubNavigation/SubNavigationItem.tsx +0 -25
  1004. package/src/components/SubNavigation/SubNavigationLink.tsx +0 -25
  1005. package/src/components/SubNavigation/SubNavigationList.tsx +0 -25
  1006. package/src/components/SubNavigation/SubNavigationTitle.tsx +0 -26
  1007. package/src/components/SubNavigation/index.ts +0 -9
  1008. package/src/components/Tab/Tab-oldClass.js +0 -209
  1009. package/src/components/Tab/Tab-oldFunc.js +0 -206
  1010. package/src/components/Tab/Tab-test.js +0 -93
  1011. package/src/components/Tab/Tab.tsx +0 -149
  1012. package/src/components/Tab/index.ts +0 -3
  1013. package/src/components/Tab/useTab.tsx +0 -89
  1014. package/src/components/TabContent/TabContent-old.js +0 -30
  1015. package/src/components/TabContent/TabContent-test.js +0 -28
  1016. package/src/components/TabContent/TabContent.tsx +0 -26
  1017. package/src/components/TabContent/index.ts +0 -1
  1018. package/src/components/Table/README.mdx +0 -0
  1019. package/src/components/Table/Table-test.js +0 -22
  1020. package/src/components/Table/Table.stories.tsx +0 -524
  1021. package/src/components/Table/Table.tsx +0 -34
  1022. package/src/components/Table/TableResponsive-story-legacy.js +0 -216
  1023. package/src/components/Table/TableSimple-story-legacy.js +0 -39
  1024. package/src/components/Table/TableSorting.tsx +0 -31
  1025. package/src/components/Table/index.ts +0 -2
  1026. package/src/components/Table/makeData.js +0 -75
  1027. package/src/components/TablePagination/TablePagination.tsx +0 -98
  1028. package/src/components/TablePagination/index.ts +0 -1
  1029. package/src/components/Tabs/README.mdx +0 -113
  1030. package/src/components/Tabs/Tabs-old.js.legacy +0 -281
  1031. package/src/components/Tabs/Tabs-test.js +0 -284
  1032. package/src/components/Tabs/Tabs.Skeleton.jsx +0 -33
  1033. package/src/components/Tabs/Tabs.hbs +0 -14
  1034. package/src/components/Tabs/Tabs.stories.tsx +0 -73
  1035. package/src/components/Tabs/Tabs.tsx +0 -270
  1036. package/src/components/Tabs/TabsContext.ts +0 -15
  1037. package/src/components/Tabs/index.ts +0 -2
  1038. package/src/components/Tag/README.mdx +0 -19
  1039. package/src/components/Tag/Tag-test.js +0 -42
  1040. package/src/components/Tag/Tag.Skeleton.jsx +0 -9
  1041. package/src/components/Tag/Tag.stories.tsx +0 -20
  1042. package/src/components/Tag/Tag.tsx +0 -46
  1043. package/src/components/Tag/index.ts +0 -3
  1044. package/src/components/Tag/tag.config.js +0 -69
  1045. package/src/components/Tag/tag.hbs +0 -10
  1046. package/src/components/Text/README.mdx +0 -57
  1047. package/src/components/Text/Text-test.js +0 -19
  1048. package/src/components/Text/Text.js.legacy +0 -102
  1049. package/src/components/Text/Text.stories.tsx +0 -390
  1050. package/src/components/Text/Text.tsx +0 -84
  1051. package/src/components/Text/index.ts +0 -2
  1052. package/src/components/TextArea/README.mdx +0 -3
  1053. package/src/components/TextArea/TextArea-old.js +0 -207
  1054. package/src/components/TextArea/TextArea-test.js +0 -167
  1055. package/src/components/TextArea/TextArea.Skeleton.jsx +0 -21
  1056. package/src/components/TextArea/TextArea.stories.tsx +0 -43
  1057. package/src/components/TextArea/TextArea.tsx +0 -40
  1058. package/src/components/TextArea/index.ts +0 -2
  1059. package/src/components/TextInput/README.mdx +0 -3
  1060. package/src/components/TextInput/TextInput-old.js +0 -162
  1061. package/src/components/TextInput/TextInput-test.js +0 -156
  1062. package/src/components/TextInput/TextInput.Skeleton.jsx +0 -21
  1063. package/src/components/TextInput/TextInput.hbs +0 -4
  1064. package/src/components/TextInput/TextInput.legacy.js +0 -162
  1065. package/src/components/TextInput/TextInput.stories.tsx +0 -80
  1066. package/src/components/TextInput/TextInput.tsx +0 -52
  1067. package/src/components/TextInput/index.ts +0 -2
  1068. package/src/components/Toggle/README.mdx +0 -4
  1069. package/src/components/Toggle/Toggle-old.js +0 -113
  1070. package/src/components/Toggle/Toggle-test.js +0 -114
  1071. package/src/components/Toggle/Toggle.Skeleton.jsx +0 -18
  1072. package/src/components/Toggle/Toggle.stories.tsx +0 -21
  1073. package/src/components/Toggle/Toggle.tsx +0 -113
  1074. package/src/components/Toggle/index.ts +0 -2
  1075. package/src/components/Tooltip/Empty.js +0 -5
  1076. package/src/components/Tooltip/README.mdx +0 -1
  1077. package/src/components/Tooltip/Tooltip.stories.tsx +0 -99
  1078. package/src/components/Tooltip/Tooltip.tsx +0 -235
  1079. package/src/components/Tooltip/_mixins.scss +0 -107
  1080. package/src/components/Tooltip/_tooltip.legacy.scss +0 -58
  1081. package/src/components/Tooltip/_tooltip.scss +0 -112
  1082. package/src/components/Tooltip/_vars.scss +0 -6
  1083. package/src/components/Tooltip/animations/fade.scss +0 -10
  1084. package/src/components/Tooltip/backdrop.scss +0 -66
  1085. package/src/components/Tooltip/index.tsx +0 -2
  1086. package/src/components/Tooltip/legacy/_mixins.scss +0 -191
  1087. package/src/components/Tooltip/legacy/_tooltip.scss +0 -70
  1088. package/src/components/Tooltip/legacy/_vars.scss +0 -5
  1089. package/src/components/Tooltip/legacy/themes/light.scss +0 -30
  1090. package/src/components/Tooltip/svg-arrow.scss +0 -37
  1091. package/src/components/Tooltip/themes/light-border.scss +0 -158
  1092. package/src/components/Tooltip/themes/light.scss +0 -28
  1093. package/src/components/Unit/InvalidUnit.tsx +0 -11
  1094. package/src/components/Unit/README.mdx +0 -1
  1095. package/src/components/Unit/SimpleCalc.tsx +0 -49
  1096. package/src/components/Unit/StringUnit.tsx +0 -13
  1097. package/src/components/Unit/SvgUnit.tsx +0 -22
  1098. package/src/components/Unit/Unit-old.js +0 -138
  1099. package/src/components/Unit/Unit-test.js +0 -18
  1100. package/src/components/Unit/Unit.hbs +0 -1
  1101. package/src/components/Unit/Unit.stories.tsx +0 -161
  1102. package/src/components/Unit/Unit.tsx +0 -158
  1103. package/src/components/Unit/UnitList.tsx +0 -84
  1104. package/src/components/Unit/YearMonthCalc.tsx +0 -59
  1105. package/src/components/Unit/currencyCalc.tsx +0 -124
  1106. package/src/components/Unit/percentageCalc.tsx +0 -73
  1107. package/src/components/Unit/scaleLookup.tsx +0 -19
  1108. package/src/components/User/README.mdx +0 -1
  1109. package/src/components/User/User-test.js +0 -50
  1110. package/src/components/User/User.hbs +0 -8
  1111. package/src/components/User/User.stories.tsx +0 -100
  1112. package/src/components/User/User.tsx +0 -111
  1113. package/src/components/User/index.ts +0 -1
  1114. package/src/components/Value/README.mdx +0 -1
  1115. package/src/components/Value/Value-test.js +0 -28
  1116. package/src/components/Value/Value.stories.tsx +0 -28
  1117. package/src/components/Value/Value.tsx +0 -34
  1118. package/src/components/Value/index.ts +0 -1
  1119. package/src/components/WFPCoreSettings/WFPCoreProvider.tsx +0 -125
  1120. package/src/components/WFPCoreSettings/defaults.ts +0 -3
  1121. package/src/components/WFPCoreSettings/index.ts +0 -4
  1122. package/src/components/WFPCoreSettings/useTheme.tsx +0 -7
  1123. package/src/components/WFPCoreSettings/withWFPCoreSettings.tsx +0 -12
  1124. package/src/components/Wrapper/README.mdx +0 -11
  1125. package/src/components/Wrapper/Wrapper-test.js +0 -51
  1126. package/src/components/Wrapper/Wrapper.stories.tsx +0 -26
  1127. package/src/components/Wrapper/Wrapper.test.tsx +0 -94
  1128. package/src/components/Wrapper/Wrapper.tsx +0 -86
  1129. package/src/components/Wrapper/__snapshots__/Wrapper.test.tsx.snap +0 -11
  1130. package/src/components/Wrapper/index.ts +0 -2
  1131. package/src/globals/data/colors.js +0 -716
  1132. package/src/globals/data/colors.json +0 -273
  1133. package/src/globals/js/boot.js +0 -39
  1134. package/src/globals/js/components.js +0 -36
  1135. package/src/globals/js/misc/event-matches.js +0 -29
  1136. package/src/globals/js/misc/get-launching-details.js +0 -24
  1137. package/src/globals/js/misc/mixin.js +0 -30
  1138. package/src/globals/js/misc/on.js +0 -9
  1139. package/src/globals/js/misc/resize.js +0 -53
  1140. package/src/globals/js/misc/svg-toggle-class.js +0 -23
  1141. package/src/globals/js/mixins/README.md +0 -207
  1142. package/src/globals/js/mixins/create-component.js +0 -69
  1143. package/src/globals/js/mixins/evented-show-hide-state.js +0 -40
  1144. package/src/globals/js/mixins/evented-state.js +0 -124
  1145. package/src/globals/js/mixins/handles.js +0 -45
  1146. package/src/globals/js/mixins/init-component-by-event.js +0 -84
  1147. package/src/globals/js/mixins/init-component-by-launcher.js +0 -89
  1148. package/src/globals/js/mixins/init-component-by-search.js +0 -41
  1149. package/src/globals/js/mixins/track-blur.js +0 -45
  1150. package/src/globals/js/settings.tsx +0 -49
  1151. package/src/globals/js/watch.js +0 -95
  1152. package/src/globals/scss/styles.scss +0 -146
  1153. package/src/hooks/togglable.js +0 -12
  1154. package/src/hooks/useHeightTransition.ts +0 -33
  1155. package/src/hooks/useId.ts +0 -14
  1156. package/src/hooks/useIsomorphicLayoutEffect.tsx +0 -14
  1157. package/src/hooks/useMediaQuery.tsx +0 -79
  1158. package/src/hooks/useMergeRef.ts +0 -24
  1159. package/src/hooks/useSettings.tsx +0 -20
  1160. package/src/hooks/useWizard.js +0 -77
  1161. package/src/index.ts +0 -184
  1162. package/src/indexStories.ts +0 -44
  1163. package/src/internal/FeatureFlags.js +0 -21
  1164. package/src/internal/FloatingMenu.js +0 -352
  1165. package/src/internal/OptimizedResize.js +0 -54
  1166. package/src/internal/RfFormJest.js +0 -45
  1167. package/src/internal/RfFormWrapper.js +0 -86
  1168. package/src/internal/configureStore.js +0 -13
  1169. package/src/internal/loadDefaultData.js +0 -20
  1170. package/src/internal/useDetectPrint.js.legacy +0 -20
  1171. package/src/internal/withTests.js +0 -7
  1172. package/src/prop-types/types.ts +0 -32
  1173. package/src/tools/__tests__/uniqueId.test.ts +0 -16
  1174. package/src/tools/mergeRefs.js +0 -23
  1175. package/src/tools/setupGetInstanceId.js +0 -10
  1176. package/src/tools/uniqueId.ts +0 -8
  1177. package/src/tools/withState.js +0 -21
  1178. package/src/tools/wrapComponent.js +0 -23
  1179. package/src/utils/index.d.ts +0 -138
  1180. package/umd/dist/components/Accordion/__tests__/utils.d.ts +0 -12
  1181. package/umd/dist/components/Accordion/components/Accordion.d.ts +0 -7
  1182. package/umd/dist/components/Accordion/components/AccordionItem.d.ts +0 -46
  1183. package/umd/dist/components/Accordion/components/AccordionProvider.d.ts +0 -7
  1184. package/umd/dist/components/Accordion/components/ControlledAccordion.d.ts +0 -8
  1185. package/umd/dist/components/Accordion/components/withAccordionItem.d.ts +0 -11
  1186. package/umd/dist/components/Accordion/hooks/useAccordion.d.ts +0 -5
  1187. package/umd/dist/components/Accordion/hooks/useAccordionContext.d.ts +0 -5
  1188. package/umd/dist/components/Accordion/hooks/useAccordionItem.d.ts +0 -7
  1189. package/umd/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +0 -13
  1190. package/umd/dist/components/Accordion/hooks/useAccordionProvider.d.ts +0 -3
  1191. package/umd/dist/components/Accordion/hooks/useAccordionState.d.ts +0 -14
  1192. package/umd/dist/components/Accordion/hooks/useHeightTransition.d.ts +0 -4
  1193. package/umd/dist/components/Accordion/hooks/useId.d.ts +0 -3
  1194. package/umd/dist/components/Accordion/hooks/useMergeRef.d.ts +0 -4
  1195. package/umd/dist/components/Accordion/index.d.ts +0 -17
  1196. package/umd/dist/components/Accordion/utils/bem.d.ts +0 -7
  1197. package/umd/dist/components/Accordion/utils/constants.d.ts +0 -58
  1198. package/umd/dist/components/Accordion/utils/mergeProps.d.ts +0 -2
  1199. package/umd/dist/components/Accordion/utils/useIsomorphicLayoutEffect.d.ts +0 -3
  1200. package/umd/dist/components/AnchorNavigation/AnchorNavigation.d.ts +0 -6
  1201. package/umd/dist/components/AnchorNavigation/index.d.ts +0 -1
  1202. package/umd/dist/components/AuthLayout/AuthLayout.d.ts +0 -20
  1203. package/umd/dist/components/AuthLayout/index.d.ts +0 -1
  1204. package/umd/dist/components/Avatar/Avatar.d.ts +0 -33
  1205. package/umd/dist/components/Avatar/index.d.ts +0 -1
  1206. package/umd/dist/components/BannerNavigation/BannerNavigation.d.ts +0 -20
  1207. package/umd/dist/components/BannerNavigation/BannerNavigationWithContent.d.ts +0 -13
  1208. package/umd/dist/components/BannerNavigation/index.d.ts +0 -2
  1209. package/umd/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -11
  1210. package/umd/dist/components/Breadcrumb/index.d.ts +0 -1
  1211. package/umd/dist/components/BreadcrumbHome/BreadcrumbHome.d.ts +0 -13
  1212. package/umd/dist/components/BreadcrumbHome/index.d.ts +0 -1
  1213. package/umd/dist/components/BreadcrumbItem/BreadcrumbItem.d.ts +0 -21
  1214. package/umd/dist/components/BreadcrumbItem/index.d.ts +0 -1
  1215. package/umd/dist/components/Button/Button.Skeleton.d.ts +0 -7
  1216. package/umd/dist/components/Button/Button.d.ts +0 -55
  1217. package/umd/dist/components/Button/index.d.ts +0 -1
  1218. package/umd/dist/components/Card/Card.d.ts +0 -61
  1219. package/umd/dist/components/Card/CardExternal.d.ts +0 -37
  1220. package/umd/dist/components/Card/index.d.ts +0 -2
  1221. package/umd/dist/components/Checkbox/Checkbox.d.ts +0 -37
  1222. package/umd/dist/components/Checkbox/index.d.ts +0 -1
  1223. package/umd/dist/components/ContentSwitcher/ContentSwitcher.d.ts +0 -12
  1224. package/umd/dist/components/ContentSwitcher/index.d.ts +0 -1
  1225. package/umd/dist/components/ContextMenu/ContextMenu.d.ts +0 -31
  1226. package/umd/dist/components/ContextMenu/index.d.ts +0 -1
  1227. package/umd/dist/components/Credits/Credits.d.ts +0 -10
  1228. package/umd/dist/components/Credits/index.d.ts +0 -1
  1229. package/umd/dist/components/DatePicker/DatePicker.d.ts +0 -8
  1230. package/umd/dist/components/DatePicker/DatePickerInput.d.ts +0 -38
  1231. package/umd/dist/components/DatePicker/DateRangePicker.d.ts +0 -8
  1232. package/umd/dist/components/DatePicker/DateRangePickerInput.d.ts +0 -34
  1233. package/umd/dist/components/DatePicker/index.d.ts +0 -4
  1234. package/umd/dist/components/DatePickerNew/DateRangePickerInput.d.ts +0 -11
  1235. package/umd/dist/components/Empty/Empty.d.ts +0 -40
  1236. package/umd/dist/components/Empty/index.d.ts +0 -1
  1237. package/umd/dist/components/Footer/Footer.d.ts +0 -39
  1238. package/umd/dist/components/Footer/FooterExternal.d.ts +0 -22
  1239. package/umd/dist/components/Footer/index.d.ts +0 -2
  1240. package/umd/dist/components/Form/Form.d.ts +0 -15
  1241. package/umd/dist/components/Form/index.d.ts +0 -1
  1242. package/umd/dist/components/FormGroup/FormGroup.d.ts +0 -14
  1243. package/umd/dist/components/FormGroup/index.d.ts +0 -1
  1244. package/umd/dist/components/FormHint/FormHint.d.ts +0 -15
  1245. package/umd/dist/components/FormHint/index.d.ts +0 -1
  1246. package/umd/dist/components/FormItem/FormItem.d.ts +0 -17
  1247. package/umd/dist/components/FormItem/index.d.ts +0 -1
  1248. package/umd/dist/components/FormLabel/FormLabel.d.ts +0 -15
  1249. package/umd/dist/components/FormLabel/index.d.ts +0 -1
  1250. package/umd/dist/components/Hero/Hero.d.ts +0 -53
  1251. package/umd/dist/components/Hero/HeroExternal.d.ts +0 -22
  1252. package/umd/dist/components/Hero/index.d.ts +0 -2
  1253. package/umd/dist/components/InfoBar/InfoBar.d.ts +0 -23
  1254. package/umd/dist/components/InfoBar/index.d.ts +0 -1
  1255. package/umd/dist/components/InlineLoading/InlineLoading.d.ts +0 -26
  1256. package/umd/dist/components/InlineLoading/index.d.ts +0 -1
  1257. package/umd/dist/components/Input/Input.d.ts +0 -152
  1258. package/umd/dist/components/Input/index.d.ts +0 -3
  1259. package/umd/dist/components/Input/useInput.d.ts +0 -126
  1260. package/umd/dist/components/InputGroup/InputGroup.d.ts +0 -48
  1261. package/umd/dist/components/InputGroup/index.d.ts +0 -1
  1262. package/umd/dist/components/Item/Item.d.ts +0 -59
  1263. package/umd/dist/components/Item/index.d.ts +0 -1
  1264. package/umd/dist/components/Link/Link.d.ts +0 -37
  1265. package/umd/dist/components/Link/index.d.ts +0 -1
  1266. package/umd/dist/components/List/List.d.ts +0 -32
  1267. package/umd/dist/components/List/ListItem.d.ts +0 -25
  1268. package/umd/dist/components/List/index.d.ts +0 -2
  1269. package/umd/dist/components/Loading/Loading.d.ts +0 -16
  1270. package/umd/dist/components/Loading/index.d.ts +0 -7
  1271. package/umd/dist/components/MainNavigation/MainNavigation.d.ts +0 -51
  1272. package/umd/dist/components/MainNavigation/MainNavigationContext.d.ts +0 -25
  1273. package/umd/dist/components/MainNavigation/MainNavigationExternal.d.ts +0 -72
  1274. package/umd/dist/components/MainNavigation/MobileButton.d.ts +0 -17
  1275. package/umd/dist/components/MainNavigation/index.d.ts +0 -3
  1276. package/umd/dist/components/MainNavigation/useMainNavigation.d.ts +0 -7
  1277. package/umd/dist/components/MainNavigationItem/MainNavigationItem.d.ts +0 -29
  1278. package/umd/dist/components/MainNavigationItem/index.d.ts +0 -1
  1279. package/umd/dist/components/MdxComponents/MdxComponentsNew.d.ts +0 -2
  1280. package/umd/dist/components/MdxComponents/index.d.ts +0 -1
  1281. package/umd/dist/components/Modal/Modal.d.ts +0 -122
  1282. package/umd/dist/components/Modal/ModalFooter.d.ts +0 -8
  1283. package/umd/dist/components/Modal/index.d.ts +0 -2
  1284. package/umd/dist/components/ModalWrapper/ModalWrapper.d.ts +0 -53
  1285. package/umd/dist/components/ModalWrapper/index.d.ts +0 -1
  1286. package/umd/dist/components/Module/Module.d.ts +0 -38
  1287. package/umd/dist/components/Module/ModuleBody.d.ts +0 -21
  1288. package/umd/dist/components/Module/ModuleFooter.d.ts +0 -10
  1289. package/umd/dist/components/Module/ModuleHeader.d.ts +0 -16
  1290. package/umd/dist/components/Module/index.d.ts +0 -4
  1291. package/umd/dist/components/Notification/Callout.d.ts +0 -59
  1292. package/umd/dist/components/Notification/NotificationActionButton.d.ts +0 -18
  1293. package/umd/dist/components/Notification/NotificationButton.d.ts +0 -36
  1294. package/umd/dist/components/Notification/NotificationIcon.d.ts +0 -8
  1295. package/umd/dist/components/Notification/NotificationTextDetails.d.ts +0 -10
  1296. package/umd/dist/components/Notification/ToastNotification.d.ts +0 -10
  1297. package/umd/dist/components/Notification/index.d.ts +0 -5
  1298. package/umd/dist/components/NumberInput/NumberInput.Skeleton.d.ts +0 -10
  1299. package/umd/dist/components/NumberInput/NumberInput.d.ts +0 -64
  1300. package/umd/dist/components/NumberInput/index.d.ts +0 -2
  1301. package/umd/dist/components/Pagination/Pagination.d.ts +0 -92
  1302. package/umd/dist/components/Pagination/index.d.ts +0 -1
  1303. package/umd/dist/components/RadioButton/RadioButton.d.ts +0 -27
  1304. package/umd/dist/components/RadioButton/index.d.ts +0 -2
  1305. package/umd/dist/components/ReadMore/ReadMore.d.ts +0 -45
  1306. package/umd/dist/components/ReadMore/index.d.ts +0 -1
  1307. package/umd/dist/components/Search/Search.d.ts +0 -50
  1308. package/umd/dist/components/Search/index.d.ts +0 -1
  1309. package/umd/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +0 -19
  1310. package/umd/dist/components/SecondaryNavigation/SecondaryNavigationTitle.d.ts +0 -8
  1311. package/umd/dist/components/SecondaryNavigation/index.d.ts +0 -2
  1312. package/umd/dist/components/Select/Select.d.ts +0 -24
  1313. package/umd/dist/components/Select/index.d.ts +0 -1
  1314. package/umd/dist/components/SelectItem/SelectItem.d.ts +0 -28
  1315. package/umd/dist/components/SelectItem/index.d.ts +0 -1
  1316. package/umd/dist/components/SelectItemGroup/SelectItemGroup.d.ts +0 -21
  1317. package/umd/dist/components/SelectItemGroup/index.d.ts +0 -1
  1318. package/umd/dist/components/Sidebar/Sidebar.d.ts +0 -46
  1319. package/umd/dist/components/Sidebar/index.d.ts +0 -1
  1320. package/umd/dist/components/SkeletonText/SkeletonText.d.ts +0 -22
  1321. package/umd/dist/components/SkeletonText/index.d.ts +0 -1
  1322. package/umd/dist/components/Slider/Slider.d.ts +0 -71
  1323. package/umd/dist/components/Slider/index.d.ts +0 -1
  1324. package/umd/dist/components/StepNavigation/StepNavigation.Skeleton.d.ts +0 -2
  1325. package/umd/dist/components/StepNavigation/StepNavigation.d.ts +0 -42
  1326. package/umd/dist/components/StepNavigation/index.d.ts +0 -2
  1327. package/umd/dist/components/StepNavigationItem/StepNavigationItem.d.ts +0 -55
  1328. package/umd/dist/components/StepNavigationItem/index.d.ts +0 -1
  1329. package/umd/dist/components/Story/Story.d.ts +0 -7
  1330. package/umd/dist/components/Story/index.d.ts +0 -1
  1331. package/umd/dist/components/SubNavigation/SubNavigation.d.ts +0 -5
  1332. package/umd/dist/components/SubNavigation/SubNavigationContent.d.ts +0 -9
  1333. package/umd/dist/components/SubNavigation/SubNavigationFilter.d.ts +0 -9
  1334. package/umd/dist/components/SubNavigation/SubNavigationGroup.d.ts +0 -17
  1335. package/umd/dist/components/SubNavigation/SubNavigationHeader.d.ts +0 -9
  1336. package/umd/dist/components/SubNavigation/SubNavigationItem.d.ts +0 -9
  1337. package/umd/dist/components/SubNavigation/SubNavigationLink.d.ts +0 -9
  1338. package/umd/dist/components/SubNavigation/SubNavigationList.d.ts +0 -9
  1339. package/umd/dist/components/SubNavigation/SubNavigationTitle.d.ts +0 -9
  1340. package/umd/dist/components/SubNavigation/index.d.ts +0 -9
  1341. package/umd/dist/components/Tab/Tab.d.ts +0 -83
  1342. package/umd/dist/components/Tab/index.d.ts +0 -2
  1343. package/umd/dist/components/Tab/useTab.d.ts +0 -12
  1344. package/umd/dist/components/TabContent/TabContent.d.ts +0 -13
  1345. package/umd/dist/components/TabContent/index.d.ts +0 -1
  1346. package/umd/dist/components/Table/Table.d.ts +0 -8
  1347. package/umd/dist/components/Table/TableSorting.d.ts +0 -11
  1348. package/umd/dist/components/Table/index.d.ts +0 -2
  1349. package/umd/dist/components/TablePagination/TablePagination.d.ts +0 -33
  1350. package/umd/dist/components/TablePagination/index.d.ts +0 -1
  1351. package/umd/dist/components/Tabs/Tabs.d.ts +0 -67
  1352. package/umd/dist/components/Tabs/TabsContext.d.ts +0 -8
  1353. package/umd/dist/components/Tabs/index.d.ts +0 -1
  1354. package/umd/dist/components/Tag/Tag.d.ts +0 -14
  1355. package/umd/dist/components/Tag/index.d.ts +0 -2
  1356. package/umd/dist/components/Text/Text.d.ts +0 -30
  1357. package/umd/dist/components/Text/index.d.ts +0 -1
  1358. package/umd/dist/components/TextArea/TextArea.d.ts +0 -8
  1359. package/umd/dist/components/TextArea/index.d.ts +0 -1
  1360. package/umd/dist/components/TextInput/TextInput.d.ts +0 -7
  1361. package/umd/dist/components/TextInput/index.d.ts +0 -1
  1362. package/umd/dist/components/Toggle/Toggle.d.ts +0 -38
  1363. package/umd/dist/components/Toggle/index.d.ts +0 -1
  1364. package/umd/dist/components/Tooltip/Tooltip.d.ts +0 -103
  1365. package/umd/dist/components/Tooltip/index.d.ts +0 -2
  1366. package/umd/dist/components/UNCoreSettings/UNCoreProvider.d.ts +0 -21
  1367. package/umd/dist/components/UNCoreSettings/defaults.d.ts +0 -2
  1368. package/umd/dist/components/UNCoreSettings/index.d.ts +0 -4
  1369. package/umd/dist/components/UNCoreSettings/useTheme.d.ts +0 -2
  1370. package/umd/dist/components/UNCoreSettings/withUNCoreSettings.d.ts +0 -2
  1371. package/umd/dist/components/Unit/InvalidUnit.d.ts +0 -2
  1372. package/umd/dist/components/Unit/SimpleCalc.d.ts +0 -17
  1373. package/umd/dist/components/Unit/StringUnit.d.ts +0 -2
  1374. package/umd/dist/components/Unit/SvgUnit.d.ts +0 -2
  1375. package/umd/dist/components/Unit/Unit.d.ts +0 -54
  1376. package/umd/dist/components/Unit/UnitList.d.ts +0 -96
  1377. package/umd/dist/components/Unit/YearMonthCalc.d.ts +0 -7
  1378. package/umd/dist/components/Unit/currencyCalc.d.ts +0 -21
  1379. package/umd/dist/components/Unit/index.d.ts +0 -1
  1380. package/umd/dist/components/Unit/percentageCalc.d.ts +0 -18
  1381. package/umd/dist/components/Unit/scaleLookup.d.ts +0 -24
  1382. package/umd/dist/components/User/User.d.ts +0 -55
  1383. package/umd/dist/components/User/index.d.ts +0 -1
  1384. package/umd/dist/components/Value/Value.d.ts +0 -11
  1385. package/umd/dist/components/Value/index.d.ts +0 -1
  1386. package/umd/dist/components/WFPCoreSettings/WFPCoreProvider.d.ts +0 -21
  1387. package/umd/dist/components/WFPCoreSettings/defaults.d.ts +0 -2
  1388. package/umd/dist/components/WFPCoreSettings/index.d.ts +0 -4
  1389. package/umd/dist/components/WFPCoreSettings/useTheme.d.ts +0 -2
  1390. package/umd/dist/components/WFPCoreSettings/withWFPCoreSettings.d.ts +0 -2
  1391. package/umd/dist/components/Wrapper/Wrapper.d.ts +0 -22
  1392. package/umd/dist/components/Wrapper/index.d.ts +0 -2
  1393. package/umd/dist/globals/data/colors.d.ts +0 -609
  1394. package/umd/dist/globals/js/settings.d.ts +0 -34
  1395. package/umd/dist/hooks/index.d.ts +0 -1
  1396. package/umd/dist/hooks/togglable.d.ts +0 -5
  1397. package/umd/dist/hooks/useHeightTransition.d.ts +0 -4
  1398. package/umd/dist/hooks/useId.d.ts +0 -3
  1399. package/umd/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -12
  1400. package/umd/dist/hooks/useMediaQuery.d.ts +0 -19
  1401. package/umd/dist/hooks/useMergeRef.d.ts +0 -4
  1402. package/umd/dist/hooks/useSettings.d.ts +0 -2
  1403. package/umd/dist/index.d.ts +0 -75
  1404. package/umd/dist/indexStories.d.ts +0 -1
  1405. package/umd/dist/internal/FeatureFlags.d.ts +0 -19
  1406. package/umd/dist/prop-types/types.d.ts +0 -5
  1407. package/umd/dist/tools/uniqueId.d.ts +0 -2
  1408. package/umd/index.js +0 -4387
  1409. package/umd/index.js.map +0 -1
  1410. package/umd/index.min.js +0 -1
  1411. package/umd/index.min.js.map +0 -1
  1412. /package/{es/dist → dist}/components/Accordion/hooks/useAccordionContext.d.ts +0 -0
  1413. /package/{es/dist → dist}/components/Accordion/hooks/useAccordionProvider.d.ts +0 -0
  1414. /package/{es/dist → dist}/components/Accordion/utils/mergeProps.d.ts +0 -0
  1415. /package/{es/dist → dist}/components/Accordion/utils/useIsomorphicLayoutEffect.d.ts +0 -0
  1416. /package/{es/dist → dist}/components/AnchorNavigation/AnchorNavigation.d.ts +0 -0
  1417. /package/{es/dist → dist}/components/AnchorNavigation/index.d.ts +0 -0
  1418. /package/{es/dist → dist}/components/AuthLayout/index.d.ts +0 -0
  1419. /package/{es/dist → dist}/components/BannerNavigation/BannerNavigation.d.ts +0 -0
  1420. /package/{es/dist → dist}/components/BannerNavigation/BannerNavigationWithContent.d.ts +0 -0
  1421. /package/{es/dist → dist}/components/BannerNavigation/index.d.ts +0 -0
  1422. /package/{es/dist → dist}/components/BreadcrumbHome/BreadcrumbHome.d.ts +0 -0
  1423. /package/{es/dist → dist}/components/BreadcrumbHome/index.d.ts +0 -0
  1424. /package/{es/dist → dist}/components/BreadcrumbItem/index.d.ts +0 -0
  1425. /package/{es/dist → dist}/components/Button/Button.Skeleton.d.ts +0 -0
  1426. /package/{es/dist → dist}/components/Card/index.d.ts +0 -0
  1427. /package/{es/dist → dist}/components/Checkbox/Checkbox.d.ts +0 -0
  1428. /package/{es/dist → dist}/components/Checkbox/index.d.ts +0 -0
  1429. /package/{es/dist → dist}/components/ContentSwitcher/index.d.ts +0 -0
  1430. /package/{es/dist → dist}/components/ContextMenu/index.d.ts +0 -0
  1431. /package/{es/dist → dist}/components/Credits/Credits.d.ts +0 -0
  1432. /package/{es/dist → dist}/components/Credits/index.d.ts +0 -0
  1433. /package/{es/dist → dist}/components/DatePicker/DatePickerInput.d.ts +0 -0
  1434. /package/{es/dist → dist}/components/DatePicker/DateRangePickerInput.d.ts +0 -0
  1435. /package/{es/dist → dist}/components/Empty/Empty.d.ts +0 -0
  1436. /package/{es/dist → dist}/components/Empty/index.d.ts +0 -0
  1437. /package/{es/dist → dist}/components/Form/index.d.ts +0 -0
  1438. /package/{es/dist → dist}/components/FormGroup/FormGroup.d.ts +0 -0
  1439. /package/{es/dist → dist}/components/FormGroup/index.d.ts +0 -0
  1440. /package/{es/dist → dist}/components/FormHint/index.d.ts +0 -0
  1441. /package/{es/dist → dist}/components/FormItem/index.d.ts +0 -0
  1442. /package/{es/dist → dist}/components/FormLabel/index.d.ts +0 -0
  1443. /package/{es/dist → dist}/components/Hero/index.d.ts +0 -0
  1444. /package/{es/dist → dist}/components/InfoBar/index.d.ts +0 -0
  1445. /package/{es/dist → dist}/components/InlineLoading/InlineLoading.d.ts +0 -0
  1446. /package/{es/dist → dist}/components/InputGroup/index.d.ts +0 -0
  1447. /package/{es/dist → dist}/components/Item/index.d.ts +0 -0
  1448. /package/{es/dist → dist}/components/Link/Link.d.ts +0 -0
  1449. /package/{es/dist → dist}/components/Link/index.d.ts +0 -0
  1450. /package/{es/dist → dist}/components/List/ListItem.d.ts +0 -0
  1451. /package/{es/dist → dist}/components/List/index.d.ts +0 -0
  1452. /package/{es/dist → dist}/components/Loading/Loading.d.ts +0 -0
  1453. /package/{es/dist → dist}/components/Loading/index.d.ts +0 -0
  1454. /package/{src/components/Accordion/README.mdx → dist/components/MainNavigation/main-navigation.d.ts} +0 -0
  1455. /package/{es/dist → dist}/components/MainNavigationItem/index.d.ts +0 -0
  1456. /package/{es/dist → dist}/components/MdxComponents/MdxComponentsNew.d.ts +0 -0
  1457. /package/{es/dist → dist}/components/MdxComponents/index.d.ts +0 -0
  1458. /package/{es/dist → dist}/components/Modal/index.d.ts +0 -0
  1459. /package/{es/dist → dist}/components/ModalWrapper/index.d.ts +0 -0
  1460. /package/{es/dist → dist}/components/Module/Module.d.ts +0 -0
  1461. /package/{es/dist → dist}/components/Module/ModuleBody.d.ts +0 -0
  1462. /package/{es/dist → dist}/components/Module/ModuleFooter.d.ts +0 -0
  1463. /package/{es/dist → dist}/components/Module/ModuleHeader.d.ts +0 -0
  1464. /package/{es/dist → dist}/components/Module/index.d.ts +0 -0
  1465. /package/{es/dist → dist}/components/Notification/Callout.d.ts +0 -0
  1466. /package/{es/dist → dist}/components/Notification/NotificationActionButton.d.ts +0 -0
  1467. /package/{es/dist → dist}/components/Notification/NotificationIcon.d.ts +0 -0
  1468. /package/{es/dist → dist}/components/Notification/NotificationTextDetails.d.ts +0 -0
  1469. /package/{es/dist → dist}/components/Notification/index.d.ts +0 -0
  1470. /package/{src/components/AnchorNavigation/README.mdx → dist/components/NumberInput/NumberInput.legacy.d.ts} +0 -0
  1471. /package/{es/dist → dist}/components/NumberInput/index.d.ts +0 -0
  1472. /package/{es/dist → dist}/components/Pagination/Pagination.d.ts +0 -0
  1473. /package/{es/dist → dist}/components/Search/index.d.ts +0 -0
  1474. /package/{es/dist → dist}/components/SecondaryNavigation/SecondaryNavigation.d.ts +0 -0
  1475. /package/{es/dist → dist}/components/SecondaryNavigation/SecondaryNavigationTitle.d.ts +0 -0
  1476. /package/{es/dist → dist}/components/Select/index.d.ts +0 -0
  1477. /package/{es/dist → dist}/components/SelectItem/index.d.ts +0 -0
  1478. /package/{es/dist → dist}/components/SelectItemGroup/index.d.ts +0 -0
  1479. /package/{es/dist → dist}/components/Sidebar/index.d.ts +0 -0
  1480. /package/{es/dist → dist}/components/SkeletonText/index.d.ts +0 -0
  1481. /package/{es/dist → dist}/components/StepNavigation/StepNavigation.Skeleton.d.ts +0 -0
  1482. /package/{es/dist → dist}/components/StepNavigation/index.d.ts +0 -0
  1483. /package/{es/dist → dist}/components/StepNavigationItem/index.d.ts +0 -0
  1484. /package/{es/dist → dist}/components/Story/Story.d.ts +0 -0
  1485. /package/{es/dist → dist}/components/Story/index.d.ts +0 -0
  1486. /package/{es/dist → dist}/components/SubNavigation/SubNavigation.d.ts +0 -0
  1487. /package/{es/dist → dist}/components/SubNavigation/SubNavigationContent.d.ts +0 -0
  1488. /package/{es/dist → dist}/components/SubNavigation/SubNavigationFilter.d.ts +0 -0
  1489. /package/{es/dist → dist}/components/SubNavigation/SubNavigationGroup.d.ts +0 -0
  1490. /package/{es/dist → dist}/components/SubNavigation/SubNavigationHeader.d.ts +0 -0
  1491. /package/{es/dist → dist}/components/SubNavigation/SubNavigationItem.d.ts +0 -0
  1492. /package/{es/dist → dist}/components/SubNavigation/SubNavigationLink.d.ts +0 -0
  1493. /package/{es/dist → dist}/components/SubNavigation/SubNavigationList.d.ts +0 -0
  1494. /package/{es/dist → dist}/components/SubNavigation/SubNavigationTitle.d.ts +0 -0
  1495. /package/{es/dist → dist}/components/Tab/Tab.d.ts +0 -0
  1496. /package/{es/dist → dist}/components/Tab/index.d.ts +0 -0
  1497. /package/{es/dist → dist}/components/Tab/useTab.d.ts +0 -0
  1498. /package/{es/dist → dist}/components/TabContent/index.d.ts +0 -0
  1499. /package/{es/dist → dist}/components/Table/Table.d.ts +0 -0
  1500. /package/{es/dist → dist}/components/Table/index.d.ts +0 -0
  1501. /package/{es/dist → dist}/components/TablePagination/index.d.ts +0 -0
  1502. /package/{es/dist → dist}/components/Tabs/Tabs.d.ts +0 -0
  1503. /package/{es/dist → dist}/components/Tag/Tag.d.ts +0 -0
  1504. /package/{es/dist → dist}/components/Text/index.d.ts +0 -0
  1505. /package/{es/dist → dist}/components/Tooltip/index.d.ts +0 -0
  1506. /package/{es/dist → dist}/components/Unit/InvalidUnit.d.ts +0 -0
  1507. /package/{es/dist → dist}/components/Unit/SimpleCalc.d.ts +0 -0
  1508. /package/{es/dist → dist}/components/Unit/StringUnit.d.ts +0 -0
  1509. /package/{es/dist → dist}/components/Unit/SvgUnit.d.ts +0 -0
  1510. /package/{es/dist → dist}/components/Unit/Unit.d.ts +0 -0
  1511. /package/{es/dist → dist}/components/Unit/UnitList.d.ts +0 -0
  1512. /package/{es/dist → dist}/components/Unit/YearMonthCalc.d.ts +0 -0
  1513. /package/{es/dist → dist}/components/Unit/currencyCalc.d.ts +0 -0
  1514. /package/{es/dist → dist}/components/Unit/percentageCalc.d.ts +0 -0
  1515. /package/{es/dist → dist}/components/Unit/scaleLookup.d.ts +0 -0
  1516. /package/{es/dist → dist}/components/User/User.d.ts +0 -0
  1517. /package/{es/dist → dist}/components/User/index.d.ts +0 -0
  1518. /package/{es/dist → dist}/components/Value/index.d.ts +0 -0
  1519. /package/{es/dist → dist}/components/WFPCoreSettings/withWFPCoreSettings.d.ts +0 -0
  1520. /package/{es/dist → dist}/components/Wrapper/index.d.ts +0 -0
  1521. /package/{es/dist → dist}/globals/data/colors.d.ts +0 -0
  1522. /package/{src/globals/js/index.js → dist/globals/js/index.d.ts} +0 -0
  1523. /package/{es/dist → dist}/globals/js/settings.d.ts +0 -0
  1524. /package/{src/hooks/index.js → dist/hooks/index.d.ts} +0 -0
  1525. /package/{es/dist → dist}/hooks/togglable.d.ts +0 -0
  1526. /package/{es/dist/components/Accordion → dist}/hooks/useId.d.ts +0 -0
  1527. /package/{es/dist → dist}/hooks/useMediaQuery.d.ts +0 -0
  1528. /package/{es/dist/components/Accordion → dist}/hooks/useMergeRef.d.ts +0 -0
  1529. /package/{es/dist → dist}/internal/FeatureFlags.d.ts +0 -0
  1530. /package/{es/dist → dist}/tools/uniqueId.d.ts +0 -0
package/umd/index.js DELETED
@@ -1,4387 +0,0 @@
1
- /*
2
- * WFP Design System React.js
3
- */
4
- 'use client';
5
- import * as React from 'react';
6
- import React__default, { createContext, useState, useEffect, useContext, useId, useLayoutEffect, useRef, useMemo, useCallback } from 'react';
7
- import { useTransitionMap } from 'react-transition-state';
8
- import { ChevronDown, WarningSolid, Search as Search$1, Close, User as User$1, Home, CalendarAltRegular, ArrowRight, Twitter, Facebook, Instagram, LinkedIn, YouTube, TikTok, InfoSolid, Cross, Check, Error as Error$1, CheckmarkCircle, InfoCircle, CaretDown, CaretUp, ChevronLeft, ChevronRight, ChevronUp, Ellipsis, WarningOutline, Locked, OverflowMenu, Checkmark, Menu } from '@progressiveui/icons-react';
9
- import classNames from 'classnames';
10
- import PropTypes, { oneOf } from 'prop-types';
11
- import ReactDOM from 'react-dom';
12
- import { usePopperTooltip } from 'react-popper-tooltip';
13
-
14
- function _typeof(o) {
15
- "@babel/helpers - typeof";
16
-
17
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
18
- return typeof o;
19
- } : function (o) {
20
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
21
- }, _typeof(o);
22
- }
23
-
24
- function __rest(s, e) {
25
- var t = {};
26
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
27
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
28
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- }
32
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
33
- var e = new Error(message);
34
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
35
- };
36
-
37
- var jsxRuntime = {exports: {}};
38
-
39
- var reactJsxRuntime_development = {};
40
-
41
- var hasRequiredReactJsxRuntime_development;
42
- function requireReactJsxRuntime_development() {
43
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
44
- hasRequiredReactJsxRuntime_development = 1;
45
- (function () {
46
- function getComponentNameFromType(type) {
47
- if (null == type) return null;
48
- if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
49
- if ("string" === typeof type) return type;
50
- switch (type) {
51
- case REACT_FRAGMENT_TYPE:
52
- return "Fragment";
53
- case REACT_PROFILER_TYPE:
54
- return "Profiler";
55
- case REACT_STRICT_MODE_TYPE:
56
- return "StrictMode";
57
- case REACT_SUSPENSE_TYPE:
58
- return "Suspense";
59
- case REACT_SUSPENSE_LIST_TYPE:
60
- return "SuspenseList";
61
- case REACT_ACTIVITY_TYPE:
62
- return "Activity";
63
- }
64
- if ("object" === _typeof(type)) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
65
- case REACT_PORTAL_TYPE:
66
- return "Portal";
67
- case REACT_CONTEXT_TYPE:
68
- return (type.displayName || "Context") + ".Provider";
69
- case REACT_CONSUMER_TYPE:
70
- return (type._context.displayName || "Context") + ".Consumer";
71
- case REACT_FORWARD_REF_TYPE:
72
- var innerType = type.render;
73
- type = type.displayName;
74
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
75
- return type;
76
- case REACT_MEMO_TYPE:
77
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
78
- case REACT_LAZY_TYPE:
79
- innerType = type._payload;
80
- type = type._init;
81
- try {
82
- return getComponentNameFromType(type(innerType));
83
- } catch (x) {}
84
- }
85
- return null;
86
- }
87
- function testStringCoercion(value) {
88
- return "" + value;
89
- }
90
- function checkKeyStringCoercion(value) {
91
- try {
92
- testStringCoercion(value);
93
- var JSCompiler_inline_result = !1;
94
- } catch (e) {
95
- JSCompiler_inline_result = !0;
96
- }
97
- if (JSCompiler_inline_result) {
98
- JSCompiler_inline_result = console;
99
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
100
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
101
- JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
102
- return testStringCoercion(value);
103
- }
104
- }
105
- function getTaskName(type) {
106
- if (type === REACT_FRAGMENT_TYPE) return "<>";
107
- if ("object" === _typeof(type) && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
108
- try {
109
- var name = getComponentNameFromType(type);
110
- return name ? "<" + name + ">" : "<...>";
111
- } catch (x) {
112
- return "<...>";
113
- }
114
- }
115
- function getOwner() {
116
- var dispatcher = ReactSharedInternals.A;
117
- return null === dispatcher ? null : dispatcher.getOwner();
118
- }
119
- function UnknownOwner() {
120
- return Error("react-stack-top-frame");
121
- }
122
- function hasValidKey(config) {
123
- if (hasOwnProperty.call(config, "key")) {
124
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
125
- if (getter && getter.isReactWarning) return !1;
126
- }
127
- return void 0 !== config.key;
128
- }
129
- function defineKeyPropWarningGetter(props, displayName) {
130
- function warnAboutAccessingKey() {
131
- specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
132
- }
133
- warnAboutAccessingKey.isReactWarning = !0;
134
- Object.defineProperty(props, "key", {
135
- get: warnAboutAccessingKey,
136
- configurable: !0
137
- });
138
- }
139
- function elementRefGetterWithDeprecationWarning() {
140
- var componentName = getComponentNameFromType(this.type);
141
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
142
- componentName = this.props.ref;
143
- return void 0 !== componentName ? componentName : null;
144
- }
145
- function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
146
- self = props.ref;
147
- type = {
148
- $$typeof: REACT_ELEMENT_TYPE,
149
- type: type,
150
- key: key,
151
- props: props,
152
- _owner: owner
153
- };
154
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
155
- enumerable: !1,
156
- get: elementRefGetterWithDeprecationWarning
157
- }) : Object.defineProperty(type, "ref", {
158
- enumerable: !1,
159
- value: null
160
- });
161
- type._store = {};
162
- Object.defineProperty(type._store, "validated", {
163
- configurable: !1,
164
- enumerable: !1,
165
- writable: !0,
166
- value: 0
167
- });
168
- Object.defineProperty(type, "_debugInfo", {
169
- configurable: !1,
170
- enumerable: !1,
171
- writable: !0,
172
- value: null
173
- });
174
- Object.defineProperty(type, "_debugStack", {
175
- configurable: !1,
176
- enumerable: !1,
177
- writable: !0,
178
- value: debugStack
179
- });
180
- Object.defineProperty(type, "_debugTask", {
181
- configurable: !1,
182
- enumerable: !1,
183
- writable: !0,
184
- value: debugTask
185
- });
186
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
187
- return type;
188
- }
189
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
190
- var children = config.children;
191
- if (void 0 !== children) if (isStaticChildren) {
192
- if (isArrayImpl(children)) {
193
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
194
- Object.freeze && Object.freeze(children);
195
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
196
- } else validateChildKeys(children);
197
- if (hasOwnProperty.call(config, "key")) {
198
- children = getComponentNameFromType(type);
199
- var keys = Object.keys(config).filter(function (k) {
200
- return "key" !== k;
201
- });
202
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
203
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
204
- }
205
- children = null;
206
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
207
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
208
- if ("key" in config) {
209
- maybeKey = {};
210
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
211
- } else maybeKey = config;
212
- children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
213
- return ReactElement(type, children, self, source, getOwner(), maybeKey, debugStack, debugTask);
214
- }
215
- function validateChildKeys(node) {
216
- "object" === _typeof(node) && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
217
- }
218
- var React = React__default,
219
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
220
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
221
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
222
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
223
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
224
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
225
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
226
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
227
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
228
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
229
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
230
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
231
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
232
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
233
- ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
234
- hasOwnProperty = Object.prototype.hasOwnProperty,
235
- isArrayImpl = Array.isArray,
236
- createTask = console.createTask ? console.createTask : function () {
237
- return null;
238
- };
239
- React = {
240
- "react-stack-bottom-frame": function reactStackBottomFrame(callStackForError) {
241
- return callStackForError();
242
- }
243
- };
244
- var specialPropKeyWarningShown;
245
- var didWarnAboutElementRef = {};
246
- var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(React, UnknownOwner)();
247
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
248
- var didWarnAboutKeySpread = {};
249
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
250
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
251
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
252
- return jsxDEVImpl(type, config, maybeKey, !1, source, self, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
253
- };
254
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
255
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
256
- return jsxDEVImpl(type, config, maybeKey, !0, source, self, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
257
- };
258
- })();
259
- return reactJsxRuntime_development;
260
- }
261
-
262
- {
263
- jsxRuntime.exports = requireReactJsxRuntime_development();
264
- }
265
- var jsxRuntimeExports = jsxRuntime.exports;
266
-
267
- const getTransition = (transition, name) => transition === true || !!(transition && transition[name]);
268
- const useAccordionProvider = (_a = {}) => {
269
- var { transition, transitionTimeout } = _a, rest = __rest(_a, ["transition", "transitionTimeout"]);
270
- const transitionMap = useTransitionMap(Object.assign({ timeout: transitionTimeout, enter: getTransition(transition, 'enter'), exit: getTransition(transition, 'exit'), preEnter: getTransition(transition, 'preEnter'), preExit: getTransition(transition, 'preExit') }, rest));
271
- return Object.assign({ mountOnEnter: !!rest.mountOnEnter, initialEntered: !!rest.initialEntered }, transitionMap);
272
- };
273
-
274
- const ACCORDION_BLOCK = "szh-accordion";
275
- const ACCORDION_PREFIX = "szh-adn";
276
- const ACCORDION_ATTR = `data-${ACCORDION_PREFIX}`;
277
- const ACCORDION_BTN_ATTR = `data-${ACCORDION_PREFIX}-btn`;
278
- const AccordionContext = createContext({});
279
-
280
- const bem = (block, element, modifiers) => (className, props) => {
281
- const blockElement = element ? `${block}__${element}` : block;
282
- let classString = blockElement;
283
- modifiers &&
284
- Object.keys(modifiers).forEach((name) => {
285
- const value = modifiers[name];
286
- if (value)
287
- classString += ` ${blockElement}--${value === true ? name : `${name}-${value}`}`;
288
- });
289
- let expandedClassName = typeof className === 'function' ? className(props) : className;
290
- if (typeof expandedClassName === 'string') {
291
- expandedClassName = expandedClassName.trim();
292
- if (expandedClassName)
293
- classString += ` ${expandedClassName}`;
294
- }
295
- return classString;
296
- };
297
-
298
- /* eslint-disable */
299
- // @ts-nocheck
300
- const mergeProps = (target, source) => {
301
- if (!source)
302
- return target;
303
- const result = Object.assign({}, target);
304
- Object.keys(source).forEach((key) => {
305
- const targetProp = target[key];
306
- const sourceProp = source[key];
307
- if (typeof sourceProp === 'function' && targetProp) {
308
- result[key] = (...e) => {
309
- targetProp(...e);
310
- sourceProp(...e);
311
- };
312
- }
313
- else {
314
- result[key] = sourceProp;
315
- }
316
- });
317
- return result;
318
- };
319
-
320
- const AccordionProvider = (props) => jsxRuntimeExports.jsx(AccordionContext.Provider, Object.assign({}, props));
321
-
322
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
323
- const getAccordion = (node) => {
324
- do {
325
- node = node.parentElement;
326
- } while (node && !node.hasAttribute(ACCORDION_ATTR));
327
- return node;
328
- };
329
- const getNextIndex = (moveUp, current, length) => moveUp ? (current > 0 ? current - 1 : length - 1) : (current + 1) % length;
330
- const moveFocus = (moveUp, e) => {
331
- const { activeElement } = document;
332
- if (!activeElement ||
333
- !activeElement.hasAttribute(ACCORDION_BTN_ATTR) ||
334
- getAccordion(activeElement) !== e.currentTarget)
335
- return;
336
- const nodes = e.currentTarget.querySelectorAll(`[${ACCORDION_BTN_ATTR}]`);
337
- const { length } = nodes;
338
- for (let i = 0; i < length; i++) {
339
- if (nodes[i] === activeElement) {
340
- let next = getNextIndex(moveUp, i, length);
341
- while (getAccordion(nodes[i]) !== getAccordion(nodes[next]))
342
- next = getNextIndex(moveUp, next, length);
343
- if (i !== next) {
344
- e.preventDefault();
345
- nodes[next].focus();
346
- }
347
- break;
348
- }
349
- }
350
- };
351
- const useAccordion = () => {
352
- const accordionProps = {
353
- [ACCORDION_ATTR]: '',
354
- onKeyDown: (e) => e.key === 'ArrowUp'
355
- ? moveFocus(true, e)
356
- : e.key === 'ArrowDown' && moveFocus(false, e),
357
- };
358
- return {
359
- accordionProps,
360
- };
361
- };
362
-
363
- const ControlledAccordion = React.forwardRef((_a, ref) => {
364
- var { providerValue, className } = _a, rest = __rest(_a, ["providerValue", "className"]);
365
- const { accordionProps } = useAccordion();
366
- return (jsxRuntimeExports.jsx(AccordionProvider, Object.assign({ value: providerValue }, { children: jsxRuntimeExports.jsx("div", Object.assign({}, mergeProps(accordionProps, rest), { ref: ref, className: bem(ACCORDION_BLOCK)(className) })) })));
367
- });
368
- ControlledAccordion.displayName = "ControlledAccordion";
369
-
370
- const Accordion = React.forwardRef((_a, ref) => {
371
- var { allowMultiple, initialEntered, mountOnEnter, unmountOnExit, transition, transitionTimeout, onStateChange } = _a, rest = __rest(_a, ["allowMultiple", "initialEntered", "mountOnEnter", "unmountOnExit", "transition", "transitionTimeout", "onStateChange"]);
372
- const providerValue = useAccordionProvider({
373
- allowMultiple,
374
- initialEntered,
375
- mountOnEnter,
376
- unmountOnExit,
377
- transition,
378
- transitionTimeout,
379
- onStateChange,
380
- });
381
- return (jsxRuntimeExports.jsx(ControlledAccordion, Object.assign({}, rest, { ref: ref, providerValue: providerValue })));
382
- });
383
- Accordion.displayName = "Accordion";
384
-
385
- const settings = {
386
- prefix: "wfp",
387
- initialized: false,
388
- selectorTabbable: `
389
- a[href], area[href], input:not([disabled]):not([tabindex='-1']),
390
- button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),
391
- textarea:not([disabled]):not([tabindex='-1']),
392
- iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]
393
- `,
394
- selectorFocusable: `
395
- a[href], area[href], input:not([disabled]),
396
- button:not([disabled]),select:not([disabled]),
397
- textarea:not([disabled]),
398
- iframe, object, embed, *[tabindex], *[contenteditable=true]
399
- `,
400
- theme: `light`,
401
- actualTheme: `light`,
402
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
403
- setTheme: (theme) => {
404
- console.warn("setTheme not initialized");
405
- },
406
- };
407
- //module.exports = settings;
408
-
409
- const WFPCoreContext = createContext(settings);
410
- // Detecting the default theme
411
- const isBrowserDefaultDark = () => typeof window !== "undefined"
412
- ? window.matchMedia("(prefers-color-scheme: dark)").matches
413
- : false;
414
- const WFPCoreProvider = (_a) => {
415
- var { children, wrapperElement /* = document?.body*/, prefix = "wfp", initialTheme = "light" } = _a, props = __rest(_a, ["children", "wrapperElement", "prefix", "initialTheme"]);
416
- const setElementTheme = (theme) => {
417
- const prefixClass = `${prefix}--theme--`;
418
- if (theme === "auto") {
419
- isBrowserDefaultDark() ? "dark" : "light";
420
- }
421
- const newTheme = theme === "auto" && isBrowserDefaultDark()
422
- ? "dark"
423
- : theme === "auto"
424
- ? "light"
425
- : theme;
426
- if (wrapperElement) {
427
- const classes = wrapperElement.className
428
- .split(" ")
429
- .filter((c) => !c.startsWith(prefixClass));
430
- wrapperElement.className = classes.join(" ").trim();
431
- wrapperElement.classList.add(`${prefix}--theme--${newTheme}`);
432
- }
433
- return newTheme;
434
- };
435
- const getActualTheme = () => {
436
- const defaultTheme = getDefaultTheme();
437
- if (defaultTheme === "auto")
438
- return isBrowserDefaultDark() ? "dark" : "light";
439
- return defaultTheme;
440
- };
441
- const getDefaultTheme = () => {
442
- const localStorageTheme = typeof window !== "undefined"
443
- ? window.localStorage.getItem("theme")
444
- : false;
445
- const defaultTheme = localStorageTheme || initialTheme;
446
- setElementTheme(defaultTheme);
447
- return defaultTheme;
448
- };
449
- const [themeState, setThemeState] = useState(getDefaultTheme());
450
- const [actualThemeState, setActualThemeState] = useState(getActualTheme());
451
- useEffect(() => {
452
- const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)");
453
- darkThemeMq.addListener(mqListener);
454
- return () => darkThemeMq.removeListener(mqListener);
455
- }, []);
456
- const mqListener = () => {
457
- if (themeState === "auto") {
458
- const newTheme = setElementTheme("auto");
459
- setActualThemeState(newTheme);
460
- }
461
- };
462
- const setTheme = (theme) => {
463
- const newTheme = setElementTheme(theme);
464
- setActualThemeState(newTheme);
465
- if (typeof window !== "undefined")
466
- window.localStorage.setItem("theme", theme);
467
- setThemeState(theme);
468
- };
469
- const ctx = Object.assign(Object.assign(Object.assign({}, settings), props), { prefix, theme: themeState, actualTheme: actualThemeState, initialized: true, setTheme });
470
- return (jsxRuntimeExports.jsx(WFPCoreContext.Provider, Object.assign({ value: ctx }, { children: children })));
471
- };
472
-
473
- function useSettings() {
474
- const settings$1 = useContext(WFPCoreContext);
475
- /* if (settings?.initialized === false) {
476
- console.warn("useSettings: WFPCoreContext not initialized");
477
- } */
478
- if (settings$1 === undefined) {
479
- return settings;
480
- }
481
- return settings$1;
482
- }
483
-
484
- let current = 0;
485
- const useIdShim = () => {
486
- const [id, setId] = useState();
487
- useEffect(() => setId(++current), []);
488
- return (id && `${ACCORDION_PREFIX}-${id}`);
489
- };
490
- const _useId = useId || useIdShim;
491
-
492
- const useAccordionItem = ({ state, toggle, disabled }) => {
493
- const buttonId = _useId();
494
- const panelId = buttonId && buttonId + "-";
495
- const buttonProps = {
496
- id: buttonId,
497
- "aria-controls": panelId,
498
- "aria-expanded": state.isEnter,
499
- onClick: toggle,
500
- };
501
- disabled
502
- ? (buttonProps.disabled = true)
503
- : (buttonProps[ACCORDION_BTN_ATTR] = "");
504
- const panelProps = {
505
- id: panelId,
506
- "aria-labelledby": buttonId,
507
- role: "region",
508
- };
509
- return {
510
- buttonProps,
511
- panelProps,
512
- };
513
- };
514
-
515
- // Get around a warning when using useLayoutEffect on the server.
516
- // https://github.com/reduxjs/react-redux/blob/b48d087d76f666e1c6c5a9713bbec112a1631841/src/utils/useIsomorphicLayoutEffect.js#L12
517
- // https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
518
- // https://github.com/facebook/react/issues/14927#issuecomment-549457471
519
- const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' &&
520
- typeof window.document !== 'undefined' &&
521
- typeof window.document.createElement !== 'undefined'
522
- ? useLayoutEffect
523
- : useEffect;
524
-
525
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
526
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
527
- const useHeightTransition = ({ status, isResolved, }) => {
528
- const [height, setHeight] = useState();
529
- const elementRef = useRef(null);
530
- useIsomorphicLayoutEffect$1(() => {
531
- (status === "preEnter" || status === "preExit") &&
532
- setHeight(elementRef.current.getBoundingClientRect().height);
533
- }, [status]);
534
- const style = {
535
- height: status === "preEnter" || status === "exiting"
536
- ? 0
537
- : status === "entering" || status === "preExit"
538
- ? height
539
- : undefined,
540
- overflow: isResolved ? undefined : "hidden",
541
- };
542
- return [style, elementRef];
543
- };
544
-
545
- function setRef(ref, instance) {
546
- typeof ref === 'function' ? ref(instance) : (ref.current = instance);
547
- }
548
- function useMergeRef(refA, refB) {
549
- return useMemo(() => {
550
- if (!refA)
551
- return refB;
552
- if (!refB)
553
- return refA;
554
- return (instance) => {
555
- setRef(refA, instance);
556
- setRef(refB, instance);
557
- };
558
- }, [refA, refB]);
559
- }
560
-
561
- const getItemState = (providerValue, key, itemInitialEntered) => {
562
- const { stateMap, mountOnEnter, initialEntered } = providerValue;
563
- const _initialEntered = itemInitialEntered !== null && itemInitialEntered !== void 0 ? itemInitialEntered : initialEntered;
564
- return (stateMap.get(key) || {
565
- status: _initialEntered ? 'entered' : mountOnEnter ? 'unmounted' : 'exited',
566
- isMounted: !mountOnEnter,
567
- isEnter: _initialEntered,
568
- isResolved: true
569
- });
570
- };
571
- const useAccordionContext = () => {
572
- const context = useContext(AccordionContext);
573
- if (!context.stateMap) {
574
- throw new Error('[React-Accordion] Cannot find a <AccordionProvider/> above this AccordionItem.');
575
- }
576
- return context;
577
- };
578
-
579
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
580
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
581
- const useAccordionItemEffect = ({ itemKey, initialEntered, disabled, } = {}) => {
582
- const itemRef = useRef(null);
583
- const context = useAccordionContext();
584
- const key = itemKey !== null && itemKey !== void 0 ? itemKey : itemRef.current;
585
- const state = getItemState(context, key, initialEntered);
586
- const { setItem, deleteItem, toggle } = context;
587
- useEffect(() => {
588
- if (disabled)
589
- return;
590
- const key = itemKey !== null && itemKey !== void 0 ? itemKey : itemRef.current;
591
- setItem(key, { initialEntered });
592
- return () => void deleteItem(key);
593
- }, [setItem, deleteItem, itemKey, initialEntered, disabled]);
594
- return {
595
- itemRef,
596
- state,
597
- toggle: useCallback((toEnter) => toggle(key, toEnter), [toggle, key]),
598
- };
599
- };
600
-
601
- const withAccordionItem = (WrappedItem //TODO: MemoExoticComponent<(props: ItemStateProps<E, T>) => JSX.Element>
602
- ) => {
603
- const WithAccordionItem = React.forwardRef((_a, ref) => {
604
- var { itemKey, initialEntered } = _a, rest = __rest(_a, ["itemKey", "initialEntered"]);
605
- return (jsxRuntimeExports.jsx(WrappedItem, Object.assign({ forwardedRef: ref }, rest, useAccordionItemEffect({
606
- itemKey,
607
- initialEntered,
608
- disabled: rest.disabled,
609
- }))));
610
- });
611
- WithAccordionItem.displayName = "withAccordionItem";
612
- return WithAccordionItem;
613
- };
614
- withAccordionItem.displayName = "withAccordionItem";
615
-
616
- const getRenderNode = (nodeOrFunc, props) => typeof nodeOrFunc === "function" ? nodeOrFunc(props) : nodeOrFunc;
617
- const WrappedItem = React.memo((_a) => {
618
- var { forwardedRef, itemRef, state, toggle, className, disabled, header, headingTag: Heading = "h3", headingProps, buttonProps, contentProps, panelProps, children } = _a, rest = __rest(_a, ["forwardedRef", "itemRef", "state", "toggle", "className", "disabled", "header", "headingTag", "headingProps", "buttonProps", "contentProps", "panelProps", "children"]);
619
- const itemState = { state, toggle, disabled };
620
- const { buttonProps: _buttonProps, panelProps: _panelProps } = useAccordionItem(itemState);
621
- const [transitionStyle, _panelRef] = useHeightTransition(state);
622
- const panelRef = useMergeRef(panelProps && panelProps.ref, _panelRef);
623
- const { status, isMounted, isEnter } = state;
624
- const { prefix } = useSettings();
625
- const buttonClasses = classNames(`${prefix}--accordion--button`, {
626
- [`${prefix}--accordion--button__expanded`]: isEnter,
627
- // [`${className}`]: className,
628
- });
629
- return (jsxRuntimeExports.jsxs("div", Object.assign({}, rest, { ref: useMergeRef(forwardedRef, itemRef), className: bem(ACCORDION_BLOCK, "item", { status, expanded: isEnter })(className, state) }, { children: [jsxRuntimeExports.jsx(Heading, Object.assign({}, headingProps, { style: Object.assign({ margin: 0 }, (headingProps && headingProps.style)), className: bem(ACCORDION_BLOCK, "item-heading")(headingProps && headingProps.className, state) }, { children: jsxRuntimeExports.jsxs("button", Object.assign({}, mergeProps(_buttonProps, buttonProps), { type: "button", className: bem(ACCORDION_BLOCK, "item-btn")(buttonProps && buttonProps.className, state) }, { children: [jsxRuntimeExports.jsx(ChevronDown, { description: "open", className: buttonClasses }), getRenderNode(header, itemState)] })) })), isMounted && (jsxRuntimeExports.jsx("div", Object.assign({}, contentProps, { style: Object.assign(Object.assign({ display: status === "exited" ? "none" : undefined }, transitionStyle), (contentProps && contentProps.style)), className: bem(ACCORDION_BLOCK, "item-content")(contentProps && contentProps.className, state) }, { children: jsxRuntimeExports.jsx("div", Object.assign({}, mergeProps(_panelProps, panelProps), { ref: panelRef, className: bem(ACCORDION_BLOCK, "item-panel")(panelProps && panelProps.className, state) }, { children: getRenderNode(children, itemState) })) })))] })));
630
- });
631
- WrappedItem.displayName = "AccordionItem";
632
- const AccordionItem = withAccordionItem(WrappedItem);
633
- AccordionItem.displayName = "AccordionItem";
634
-
635
- const AuthLayout = (_a) => {
636
- var { image, backgroundContent, children, className } = _a, other = __rest(_a, ["image", "backgroundContent", "children", "className"]);
637
- const { prefix } = useSettings();
638
- const style = image
639
- ? {
640
- backgroundImage: `url(${image})`,
641
- }
642
- : {};
643
- const wrapperClasses = classNames(`${prefix}--auth-background-wrapper`, {
644
- [`${prefix}--auth-background-image`]: image,
645
- [`${className}`]: className,
646
- });
647
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--auth-wrapper` }, other, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses, style: style }, { children: backgroundContent })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--auth-content-wrapper` }, { children: children }))] })));
648
- };
649
- const BackgroundContent = (_a) => {
650
- var { children } = _a, other = __rest(_a, ["children"]);
651
- const { prefix } = useSettings();
652
- return (jsxRuntimeExports.jsx("div", Object.assign({}, other, { className: `${prefix}--auth-background-content` }, { children: children })));
653
- };
654
-
655
- const pageWidths = ["sm", "md", "lg", "full"];
656
- const Wrapper = (props) => {
657
- const { prefix } = useSettings();
658
- const { background, backgroundClassName, backgroundStyle, children, className, pageWidth, mobilePageWidth, spacing } = props, other = __rest(props, ["background", "backgroundClassName", "backgroundStyle", "children", "className", "pageWidth", "mobilePageWidth", "spacing"]);
659
- const wrapperClasses = classNames({
660
- [`${prefix}--wrapper`]: true,
661
- [`${prefix}--wrapper--width-lg`]: pageWidth === "narrow",
662
- [`${prefix}--wrapper--width-md`]: pageWidth === "narrower",
663
- [`${prefix}--wrapper--width-sm`]: pageWidth === "narrowest",
664
- [`${prefix}--wrapper--width-xs`]: pageWidth === "narrowest",
665
- [`${prefix}--wrapper--width-${pageWidth}`]: pageWidth,
666
- [`${prefix}--wrapper--width-mobile-full`]: mobilePageWidth === "full",
667
- [`${prefix}--wrapper--spacing-md`]: spacing === "md",
668
- [`${prefix}--wrapper--spacing-xl`]: spacing === "xl",
669
- [`${className}`]: className,
670
- });
671
- if (background || backgroundStyle || backgroundClassName) {
672
- const backgroundClasses = classNames(backgroundClassName, {
673
- [`${prefix}--wrapper--background-${background}`]: background,
674
- });
675
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: backgroundClasses, style: backgroundStyle }, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: children })) })));
676
- }
677
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: children })));
678
- };
679
-
680
- const BannerNavigationItem = ({ className, children, }) => {
681
- const { prefix } = useSettings();
682
- const wrapperClasses = classNames(`${prefix}--banner-navigation__item`, className);
683
- return jsxRuntimeExports.jsx("li", Object.assign({ className: wrapperClasses }, { children: children }));
684
- };
685
- const BannerNavigation = (_a) => {
686
- var { children, className } = _a, props = __rest(_a, ["children", "className"]);
687
- const { prefix } = useSettings();
688
- const wrapperClasses = classNames(`${prefix}--banner-navigation`, className);
689
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, { children: jsxRuntimeExports.jsx(Wrapper, Object.assign({}, props, { children: jsxRuntimeExports.jsx("ul", Object.assign({ className: `${prefix}--banner-navigation__list` }, { children: children })) })) })));
690
- };
691
-
692
- const FormItem = (_a) => {
693
- var { className, children, invalid, inline } = _a, other = __rest(_a, ["className", "children", "invalid", "inline"]);
694
- const { prefix } = useSettings();
695
- const classes = classNames(`${prefix}--form-item`, {
696
- [`${prefix}--form-item--inline`]: inline,
697
- [`${prefix}--form-item--invalid`]: invalid,
698
- }, className);
699
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
700
- };
701
-
702
- function AddonBefore({ addonBefore, prefix, }) {
703
- if (addonBefore) {
704
- return jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--input-addon-before` }, { children: addonBefore }));
705
- }
706
- return null;
707
- }
708
- function AddonAfter({ addonAfter, prefix, }) {
709
- if (addonAfter) {
710
- return jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--input-addon-after` }, { children: addonAfter }));
711
- }
712
- return null;
713
- }
714
- /**
715
- * Shows the error message underneath the element */
716
- function InlineErrorMessage({ errorId, errorClasses, invalid, invalidText, }) {
717
- if (invalid) {
718
- const errorIcon = jsxRuntimeExports.jsx(WarningSolid, { fill: "#c5192d" });
719
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: errorClasses, id: errorId }, { children: [errorIcon, " ", jsxRuntimeExports.jsx("span", { children: typeof invalid === "object" && invalid.message
720
- ? invalid.message
721
- : typeof invalid === "string"
722
- ? invalid
723
- : invalidText
724
- ? invalidText
725
- : "required" })] })));
726
- }
727
- return null;
728
- }
729
- /**
730
- * Shows a helper text under the label */
731
- function Label({ labelClasses, calculatedId, labelText, required, hideLabel, }) {
732
- if (hideLabel)
733
- return null;
734
- return (jsxRuntimeExports.jsxs("label", Object.assign({ htmlFor: calculatedId, className: labelClasses }, { children: [labelText && labelText, required && "*"] })));
735
- }
736
- /**
737
- * Shows a helper text under the label */
738
- function Helper({ helperTextClasses, helperText, }) {
739
- if (helperText)
740
- return jsxRuntimeExports.jsx("div", Object.assign({ className: helperTextClasses }, { children: helperText }));
741
- return null;
742
- }
743
- /**
744
- * Input is a wrapper for custom inputs providing the label, helperText and errors. */
745
- const Input = (_a) => {
746
- var { additional, addonBefore, addonAfter, labelText, children, components: componentsOverride = {},
747
- //className,
748
- // iconDescription,
749
- id, className, inputWrapperClassName,
750
- //placeholder,
751
- //type,
752
- //onChange,
753
- //onClick,
754
- hideLabel, name, invalid, invalidText, helperText, required } = _a, other = __rest(_a, ["additional", "addonBefore", "addonAfter", "labelText", "children", "components", "id", "className", "inputWrapperClassName", "hideLabel", "name", "invalid", "invalidText", "helperText", "required"]);
755
- const { prefix } = useSettings();
756
- const calculatedId = id ? id : name;
757
- /* const inputProps = {
758
- id: calculatedId,
759
- onChange: (evt) => {
760
- if (!other.disabled && !other.readOnly) {
761
- onChange && onChange(evt);
762
- }
763
- },
764
- onClick: (evt) => {
765
- if (!other.disabled && !other.readOnly) {
766
- onClick && onClick(evt);
767
- }
768
- },
769
- placeholder,
770
- type,
771
- };*/
772
- const errorId = calculatedId + "-error-msg";
773
- const labelClasses = classNames(`${prefix}--label`, {
774
- // [`${prefix}--input--light`]: light,
775
- [`${prefix}--visually-hidden`]: hideLabel || !labelText,
776
- [`${prefix}--label--disabled`]: other.disabled,
777
- });
778
- const inputWrapperClasses = classNames(`${prefix}--input-wrapper`, { [`${prefix}--form-item--invalid`]: invalid }, inputWrapperClassName);
779
- const helperTextClasses = classNames(`${prefix}--form__helper-text`, {
780
- [`${prefix}--form__helper-text--disabled`]: other.disabled,
781
- });
782
- const errorClasses = `${prefix}--form-requirement`;
783
- const components = Object.assign({ AddonAfter,
784
- AddonBefore,
785
- Label,
786
- Helper,
787
- InlineErrorMessage }, componentsOverride);
788
- const AddonAfterComponent = components.AddonAfter;
789
- const AddonBeforeComponent = components.AddonBefore;
790
- const LabelComponent = components.Label;
791
- const HelperComponent = components.Helper;
792
- const InlineErrorMessageComponent = components.InlineErrorMessage;
793
- const componentProps = {
794
- labelText,
795
- labelClasses,
796
- calculatedId,
797
- required,
798
- helperTextClasses,
799
- helperText,
800
- errorClasses,
801
- errorId,
802
- invalid,
803
- invalidText,
804
- addonAfter,
805
- addonBefore,
806
- hideLabel,
807
- prefix,
808
- };
809
- return (jsxRuntimeExports.jsxs(FormItem, Object.assign({ className: className, inline: other.inline }, { children: [jsxRuntimeExports.jsx(LabelComponent, Object.assign({}, componentProps)), jsxRuntimeExports.jsx(HelperComponent, Object.assign({}, componentProps)), additional, jsxRuntimeExports.jsxs("div", Object.assign({ className: inputWrapperClasses }, { children: [jsxRuntimeExports.jsx(AddonBeforeComponent, Object.assign({}, componentProps)), children, jsxRuntimeExports.jsx(AddonAfterComponent, Object.assign({}, componentProps))] })), jsxRuntimeExports.jsx(InlineErrorMessageComponent, Object.assign({}, componentProps))] })));
810
- };
811
- Input.displayName = "Input";
812
-
813
- /**
814
- * Input is a wrapper for custom inputs providing the label, helperText and errors. */
815
- const useInput = (_a) => {
816
- var { addonAfter, className, inputClassName = "wfp--input", id, placeholder, type = "text", onChange = () => { }, onClick = () => { }, hideLabel, name, invalid, invalidText, labelText, helperText, light, value = undefined } = _a,
817
- //required,
818
- other = __rest(_a, ["addonAfter", "className", "inputClassName", "id", "placeholder", "type", "onChange", "onClick", "hideLabel", "name", "invalid", "invalidText", "labelText", "helperText", "light", "value"]);
819
- const { prefix } = useSettings();
820
- const calculatedId = id ? id : name;
821
- const inputClasses = classNames(`${prefix}--input`, inputClassName, {
822
- [`${prefix}--input--light`]: light,
823
- [`${prefix}--input--invalid`]: invalid, // legacy className
824
- });
825
- const inputProps = Object.assign(Object.assign({ id: calculatedId, name, className: inputClasses }, other), { onChange: (evt) => {
826
- if (!other.disabled && !other.readOnly) {
827
- onChange(evt);
828
- }
829
- }, onClick: (evt) => {
830
- if (!other.disabled && !other.readOnly) {
831
- onClick(evt);
832
- }
833
- }, placeholder,
834
- value,
835
- type });
836
- const wrapperProps = {
837
- calculatedId,
838
- id,
839
- name,
840
- className,
841
- addonAfter,
842
- labelText,
843
- helperText,
844
- hideLabel,
845
- invalid,
846
- invalidText,
847
- };
848
- const errorId = calculatedId + "-error-msg";
849
- /*const labelClasses = classNames(`${prefix}--label`, {
850
- [`${prefix}--visually-hidden`]: hideLabel || !labelText,
851
- [`${prefix}--label--disabled`]: other.disabled,
852
- });*/
853
- /* const label = (
854
- <label htmlFor={calculatedId} className={labelClasses}>
855
- {labelText && labelText}
856
- {required && '*'}
857
- </label>
858
- );*/
859
- if (invalid) {
860
- inputProps["data-invalid"] = true;
861
- inputProps["aria-invalid"] = true;
862
- inputProps["aria-describedby"] = errorId;
863
- }
864
- return { inputProps, wrapperProps };
865
- };
866
-
867
- /** Search enables users to specify a word or a phrase to find relevant pieces of content without the use of navigation. */
868
- const Search = React.forwardRef((props, ref) => {
869
- const { prefix } = useSettings();
870
- const { className, closeButtonLabelText, disabled,
871
- // id,
872
- hideLabel, hideControls, labelText, kind = "large",
873
- // eslint-disable-next-line @typescript-eslint/no-empty-function
874
- onChange = () => { },
875
- // eslint-disable-next-line @typescript-eslint/no-empty-function
876
- onSearchIconClick = () => { }, helperText, light, rounded, } = props;
877
- const initialValue = props.value;
878
- const [value, setValue] = React.useState(initialValue);
879
- React.useEffect(() => {
880
- setValue(props.value);
881
- }, [props.value]);
882
- const newInputRef = React.useRef(null);
883
- const _inputRef = ref ? ref : newInputRef;
884
- const handleChange = (evt) => {
885
- if (!disabled) {
886
- evt.persist();
887
- evt.imaginaryTarget = _inputRef;
888
- setValue(evt.target.value);
889
- onChange(evt, evt.target.value); //TODO: why are we passing evt as second arg
890
- }
891
- };
892
- const clearSearch = (evt) => {
893
- setValue("");
894
- // setTimeout(() => {
895
- // console.log("value", value);
896
- // }, 1000);
897
- onChange(evt, "");
898
- };
899
- const searchInputWrapperClasses = classNames(`${prefix}--number`, className, {
900
- [`${prefix}--number--light`]: light,
901
- [`${prefix}--number--helpertext`]: helperText,
902
- [`${prefix}--number--nolabel`]: hideLabel,
903
- [`${prefix}--number--nocontrols`]: hideControls,
904
- "wfp--search": true,
905
- "wfp--search--lg": kind === "large",
906
- "wfp--search--sm": kind === "small",
907
- "wfp--search--main": kind === "main",
908
- "wfp--search--banner": kind === "banner",
909
- "wfp--search--light": kind === "light",
910
- });
911
- /*const newProps = {
912
- disabled,
913
- id,
914
- onChange: handleChange,
915
- value: value,
916
- };*/
917
- const clearClasses = classNames({
918
- "wfp--search-close": true,
919
- "wfp--search-close--hidden": !value,
920
- });
921
- const searchInputClassName = classNames(`${prefix}--search-input`, className, {
922
- [`${prefix}--search-input--rounded`]: rounded,
923
- });
924
- const useInputProps = props;
925
- const { wrapperProps, inputProps } = useInput(Object.assign(Object.assign({}, useInputProps), { onChange: handleChange, className: `${prefix}--search-input__wrapper`, inputClassName: searchInputClassName }));
926
- return (jsxRuntimeExports.jsxs(Input, Object.assign({}, wrapperProps, { inputWrapperClassName: searchInputWrapperClasses }, { children: [jsxRuntimeExports.jsx(Search$1, { description: labelText, className: `${prefix}--search-magnifier-icon`, onClick: onSearchIconClick }), jsxRuntimeExports.jsx("input", Object.assign({}, inputProps, { ref: _inputRef, value: value })), jsxRuntimeExports.jsx("button", Object.assign({ className: clearClasses, onClick: clearSearch, type: "button", "aria-label": closeButtonLabelText }, { children: jsxRuntimeExports.jsx(Close, { description: closeButtonLabelText }) }))] })));
927
- });
928
- Search.displayName = "Search";
929
-
930
- const Link = React.forwardRef(function Link(props, ref) {
931
- const { children, className, href, disabled, inline, visited, icon, size, linkSolid } = props, other = __rest(props, ["children", "className", "href", "disabled", "inline", "visited", "icon", "size", "linkSolid"]);
932
- const { prefix } = useSettings();
933
- const classes = classNames(`${prefix}--link`, className, {
934
- [`${prefix}--link--disabled`]: disabled,
935
- [`${prefix}--link--inline`]: inline,
936
- [`${prefix}--link--visited`]: visited,
937
- [`${prefix}--link--${size}`]: size,
938
- [`${prefix}--link--icon`]: icon,
939
- [`${prefix}--link--solid`]: linkSolid,
940
- });
941
- const rel = other.target === "_blank" ? "noopener" : undefined;
942
- const IconAsComponent = icon;
943
- return (jsxRuntimeExports.jsxs("a", Object.assign({ href: disabled ? undefined : href, className: classes, rel: rel, ref: ref, "aria-disabled": disabled }, other, { children: [children, icon && React.isValidElement(icon) ? (jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--link__icon` }, { children: icon }))) : icon ? (jsxRuntimeExports.jsx(IconAsComponent, {})) : null] })));
944
- });
945
- Link.displayName = "Link";
946
-
947
- const BannerNavigationWithContent = (_a) => {
948
- var { searchOnChange, search } = _a, other = __rest(_a, ["searchOnChange", "search"]);
949
- return (jsxRuntimeExports.jsxs(BannerNavigation, Object.assign({}, other, { children: [jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "http://communities.wfp.org", target: "_blank" }, { children: "Communities" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "http://manuals.wfp.org", target: "_blank" }, { children: "Manuals" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://newgo.docs.wfp.org", target: "_blank" }, { children: "GoDocs" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://welearn.wfp.org", target: "_blank" }, { children: "WeLearn" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://dashboard.wfp.org", target: "_blank" }, { children: "Dashboard" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "http://opweb.wfp.org", target: "_blank" }, { children: "OPweb" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://selfservice.go.wfp.org", target: "_blank" }, { children: "Self-Service" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://erpapps.wfp.org/fiori", target: "_blank" }, { children: "WeTravel" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://unbooking.org/", target: "_blank" }, { children: "UN Booking Hub" })) }), jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: "https://wfp.org", target: "_blank" }, { children: "WFP.org" })) }), search && (jsxRuntimeExports.jsx(BannerNavigationItem, { children: jsxRuntimeExports.jsx("form", Object.assign({ action: "http://gtd.wfp.org", method: "GET", acceptCharset: "UTF-8", target: "_blank" }, { children: jsxRuntimeExports.jsx(Search, { kind: "banner", id: "search-2", labelText: "Find People", name: "q", placeholder: "Find People", onChange: searchOnChange }) })) }))] })));
950
- };
951
-
952
- /**
953
- * Avatar is used to display a user image or icon.
954
- */
955
- function Avatar(_a) {
956
- var { alt, className, image, missingImage = "avatar", name, userIconProps } = _a, other = __rest(_a, ["alt", "className", "image", "missingImage", "name", "userIconProps"]);
957
- const { prefix } = useSettings();
958
- if (!image && missingImage === "avatar") {
959
- const classes = classNames(`${prefix}--avatar`, `${prefix}--avatar--empty`, `${prefix}--avatar--missing`, className);
960
- return (jsxRuntimeExports.jsx(User$1, Object.assign({ fill: "#ffffff", description: alt, className: classes }, userIconProps, other)));
961
- }
962
- else if (image === undefined && missingImage === "letter") {
963
- const classes = classNames(`${prefix}--avatar`, `${prefix}--avatar--empty`, `${prefix}--avatar--letter`, className);
964
- return (jsxRuntimeExports.jsx("svg", Object.assign({ id: "avatar-layer", className: classes, x: "0px", y: "0px", viewBox: "0 0 25 25", height: "25px", width: "25px" }, { children: jsxRuntimeExports.jsx("text", Object.assign({ x: "50%", y: "57%", dominantBaseline: "middle", textAnchor: "middle" }, { children: name && name.toUpperCase()[0] })) })));
965
- }
966
- else {
967
- const classes = classNames(`${prefix}--avatar`, className);
968
- return (jsxRuntimeExports.jsx("div", Object.assign({}, other, { className: classes }, { children: jsxRuntimeExports.jsx("img", { alt: alt, src: image }) })));
969
- }
970
- }
971
- Avatar.displayName = "Avatar";
972
-
973
- const Breadcrumb = (_a) => {
974
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
975
- const { prefix } = useSettings();
976
- const classes = classNames(className, {
977
- [`${prefix}--breadcrumb`]: true,
978
- [`${prefix}--breadcrumb--no-trailing-slash`]: true,
979
- });
980
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
981
- };
982
-
983
- const newChild = (children, disableLink, href) => {
984
- const { prefix } = useSettings();
985
- if (disableLink === true) {
986
- return jsxRuntimeExports.jsx("span", { children: children });
987
- }
988
- else if (typeof children === "string" && !(href === undefined)) {
989
- return jsxRuntimeExports.jsx(Link, Object.assign({ href: href }, { children: children }));
990
- }
991
- else {
992
- return React__default.cloneElement(React__default.Children.only(children), {
993
- className: `${prefix}--link`,
994
- });
995
- }
996
- };
997
- const BreadcrumbItem = (_a) => {
998
- var { children, className, disableLink, href } = _a, other = __rest(_a, ["children", "className", "disableLink", "href"]);
999
- const { prefix } = useSettings();
1000
- const classes = classNames(`${prefix}--breadcrumb-item`, className);
1001
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: newChild(children, disableLink, href) })));
1002
- };
1003
-
1004
- const BreadcrumbHome = (_a) => {
1005
- var { className, hometext } = _a, other = __rest(_a, ["className", "hometext"]);
1006
- const { prefix } = useSettings();
1007
- const classes = classNames(`${prefix}--breadcrumb-home`, className);
1008
- return (jsxRuntimeExports.jsx(Home
1009
- //icon={iconHome}
1010
- , Object.assign({
1011
- //icon={iconHome}
1012
- fill: "#0b77c2", width: "14", height: "14", description: hometext, className: classes }, other)));
1013
- };
1014
-
1015
- const Button = React.forwardRef((props, ref) => {
1016
- const { children, className, disabled, small, large, btnSolid, kind = "primary", iconReverse, tabIndex, useFlexbox, type = "button", icon, iconDescription, onClick, id } = props, other = __rest(props, ["children", "className", "disabled", "small", "large", "btnSolid", "kind", "iconReverse", "tabIndex", "useFlexbox", "type", "icon", "iconDescription", "onClick", "id"]);
1017
- const { prefix } = useSettings();
1018
- const [count, setCount] = useState(false);
1019
- useEffect(() => {
1020
- const timer = setTimeout(() => endAnimation(), 500);
1021
- return () => {
1022
- clearTimeout(timer);
1023
- };
1024
- }, [count]);
1025
- const buttonClasses = classNames(className, {
1026
- [`${prefix}--btn`]: true,
1027
- [`${prefix}--btn--sm`]: small,
1028
- [`${prefix}--btn--lg`]: large,
1029
- [`${prefix}--btn--icon-reverse`]: iconReverse,
1030
- [`${prefix}--btn--flexbox`]: useFlexbox,
1031
- [`${prefix}--btn--icon-only`]: icon && children === undefined,
1032
- [`${prefix}--btn--${kind}`]: kind,
1033
- [`${prefix}--btn--${kind}-solid`]: btnSolid,
1034
- [`${prefix}--btn--animating`]: count,
1035
- });
1036
- const commonProps = {
1037
- tabIndex,
1038
- className: buttonClasses,
1039
- };
1040
- let buttonImage = null;
1041
- if (icon && React.isValidElement(icon)) {
1042
- buttonImage = jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--btn__icon` }, { children: icon }));
1043
- }
1044
- else if (icon) {
1045
- const Icon = icon;
1046
- buttonImage = (jsxRuntimeExports.jsx(Icon, { description: iconDescription, className: `${prefix}--btn__icon` }));
1047
- }
1048
- const endAnimation = () => {
1049
- setCount(false);
1050
- };
1051
- const onClickAnimation = (e) => {
1052
- if (onClick) {
1053
- onClick(e);
1054
- }
1055
- setCount(true);
1056
- };
1057
- if (other.href) {
1058
- const anchorProps = Object.assign(Object.assign({}, other), { href: other.href });
1059
- return (jsxRuntimeExports.jsxs("a", Object.assign({}, anchorProps, commonProps, { role: "button", onClick: onClickAnimation, ref: ref, id: id }, { children: [iconReverse && buttonImage, children, !iconReverse && buttonImage] })));
1060
- }
1061
- const buttonProps = Object.assign(Object.assign({}, other), { disabled: disabled });
1062
- return (jsxRuntimeExports.jsxs("button", Object.assign({}, buttonProps, commonProps, { disabled: disabled, type: type, onClick: onClickAnimation, ref: ref, id: id }, { children: [iconReverse && buttonImage, children, !iconReverse && buttonImage] })));
1063
- });
1064
- Button.displayName = "Button";
1065
-
1066
- // TODO: remove legacy
1067
- ({
1068
- buttonKind: oneOf([
1069
- "primary",
1070
- "secondary",
1071
- "accent",
1072
- "danger",
1073
- "ghost",
1074
- "inverse--primary",
1075
- "inverse",
1076
- "danger--primary",
1077
- "tertiary",
1078
- "navigation",
1079
- ]),
1080
- });
1081
- const buttonKinds = [
1082
- "primary",
1083
- "secondary",
1084
- "tertiary",
1085
- "accent",
1086
- "danger--primary",
1087
- "danger",
1088
- "ghost",
1089
- "inverse--primary",
1090
- "inverse",
1091
- "navigation",
1092
- ];
1093
- const notificationtypes = ["info", "success", "warning", "error"];
1094
-
1095
- const Icon = ({ icon }) => {
1096
- const { prefix } = useSettings();
1097
- if (!icon)
1098
- return null;
1099
- return jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--empty__icon` }, { children: icon }));
1100
- };
1101
- const Text$1 = ({ title, children }) => {
1102
- const { prefix } = useSettings();
1103
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--empty__text` }, { children: [title && jsxRuntimeExports.jsx("h2", { children: title }), jsxRuntimeExports.jsx("div", { children: children })] })));
1104
- };
1105
- /** The Empty component can be used whenever a section should indicate that there is no content available. This can be the case for a empty list table or search results. */
1106
- const Empty = (_a) => {
1107
- var { button, children, className, components, icon, title, kind = "large" } = _a, other = __rest(_a, ["button", "children", "className", "components", "icon", "title", "kind"]);
1108
- const { prefix } = useSettings();
1109
- const classes = classNames({
1110
- [`${prefix}--empty`]: true,
1111
- [`${prefix}--empty--${kind}`]: kind,
1112
- }, className);
1113
- const defaultComponents = { Icon, Text: Text$1 };
1114
- const allComponents = Object.assign(Object.assign({}, defaultComponents), components);
1115
- const IconComponent = allComponents.Icon;
1116
- const TextComponent = allComponents.Text;
1117
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [jsxRuntimeExports.jsx(IconComponent, { icon: icon }), jsxRuntimeExports.jsx(TextComponent, { title: title, children: children }), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--empty__button` }, { children: button }))] })));
1118
- };
1119
- Empty.displayName = "Empty";
1120
-
1121
- const Hero = (_a) => {
1122
- var { children, className, image, isExternal, isLink, metadata, more, subTitle, title, kind, url } = _a, other = __rest(_a, ["children", "className", "image", "isExternal", "isLink", "metadata", "more", "subTitle", "title", "kind", "url"]);
1123
- const { prefix } = useSettings();
1124
- const style = kind !== 'related'
1125
- ? {
1126
- backgroundImage: `url(${image})`,
1127
- }
1128
- : {};
1129
- const wrapperClasses = classNames(`${prefix}--photo-card`, {
1130
- [`${prefix}--photo-card--${kind}`]: kind,
1131
- [`${prefix}--photo-card--no-background`]: !image,
1132
- [`${prefix}--photo-card--link`]: isLink,
1133
- [`${className}`]: className,
1134
- });
1135
- const content = (jsxRuntimeExports.jsxs(React.Fragment, { children: [jsxRuntimeExports.jsx("div", { className: `${prefix}--photo-card__background`, style: style }), image && kind === 'related' && jsxRuntimeExports.jsx("img", { src: image }), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--photo-card__info` }, { children: [jsxRuntimeExports.jsxs("div", { children: [(kind === 'landscape' || kind === 'hero') && (jsxRuntimeExports.jsx("div", { className: `${prefix}--photo-card__info__background`, style: style })), metadata && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--photo-card__info__metadata` }, { children: metadata }))), title && (kind === 'hero' || kind === 'splash-compact') && (jsxRuntimeExports.jsx("h2", Object.assign({ className: `${prefix}--photo-card__info__title` }, { children: title }))), title && kind !== 'hero' && kind !== 'splash-compact' && (jsxRuntimeExports.jsx("h3", Object.assign({ className: `${prefix}--photo-card__info__title` }, { children: title }))), subTitle && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--photo-card__info__subtitle` }, { children: subTitle })))] }), kind === 'hero' ||
1136
- kind === 'splash-image' ||
1137
- (kind === 'splash-compact' && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--photo-card__info__more` }, { children: more }))))] })), children] }));
1138
- return isLink ? (jsxRuntimeExports.jsx("a", Object.assign({ href: url, target: isExternal ? '_blank' : '', className: wrapperClasses }, other, { children: content }))) : (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: content })));
1139
- };
1140
- Hero.displayName = 'Hero';
1141
-
1142
- const HeroExternal = ({ title, subTitle, image, children, className,
1143
- // ...other
1144
- }) => {
1145
- const { prefix } = useSettings();
1146
- const wrapperClasses = classNames(`${prefix}--hero-ext`, {
1147
- [`${className}`]: className,
1148
- });
1149
- return (
1150
- // TODO: Provide a prop to set the backgrond image (linear-gradient should be not editable)
1151
- // TODO: Provide a prop [string] to set the backgrond position (optional).
1152
- jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses,
1153
- // TODO: do we need a token for the linear gradient?
1154
- style: {
1155
- backgroundImage: `linear-gradient(rgba(26, 66, 98, 0.8), rgba(26, 66, 98, 0.8)), url(${image})`,
1156
- backgroundPosition: 'center right',
1157
- } }, { children: jsxRuntimeExports.jsxs(Wrapper, Object.assign({ pageWidth: "md" }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--hero-ext__content` }, { children: [title && jsxRuntimeExports.jsx("h1", Object.assign({ className: `${prefix}--hero-ext__heading` }, { children: title })), subTitle && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--hero-ext__body-copy` }, { children: subTitle })))] })), children] })) })));
1158
- };
1159
-
1160
- const Card = (_a) => {
1161
- var { children, className, image, isExternal, isLink, metadata, subTitle, title, alt, kind, url, cardWidth, cardHeight } = _a, other = __rest(_a, ["children", "className", "image", "isExternal", "isLink", "metadata", "subTitle", "title", "alt", "kind", "url", "cardWidth", "cardHeight"]);
1162
- const { prefix } = useSettings();
1163
- const style = kind == 'overlay'
1164
- ? {
1165
- backgroundImage: `url(${image})`,
1166
- }
1167
- : {};
1168
- const pagewidth = cardWidth ? cardWidth : '300px';
1169
- const pageheight = cardHeight ? cardHeight : '260px';
1170
- const wrapperClasses = classNames([`${prefix}--card-box`], {
1171
- [`${prefix}--photo-cardnew--${kind}`]: kind,
1172
- // 'wfp--photo-cardnew--no-background': !image,
1173
- [`${prefix}--photo-cardnew--link`]: isLink,
1174
- [`${className}`]: className,
1175
- });
1176
- const content = (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [kind === 'overlay' ? (jsxRuntimeExports.jsx("div", { className: `${prefix}--photo-cardnew__background`, style: style })) : null, image && kind === 'simple-card' ? (jsxRuntimeExports.jsx("img", { src: image, alt: alt, className: `${prefix}--header-photo` })) : null, jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--photo-cardnew__info` }, { children: jsxRuntimeExports.jsxs("div", { children: [kind === 'overlay' && (jsxRuntimeExports.jsx("div", { className: `${prefix}--photo-cardnew__info__background`, style: style })), metadata && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--photo-cardnew__info__metadata` }, { children: metadata }))), title && (jsxRuntimeExports.jsx("h3", Object.assign({ className: `${prefix}--photo-cardnew__info__title` }, { children: title }))), subTitle && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--photo-cardnew__info__subtitle` }, { children: subTitle })))] }) })), children] }));
1177
- return isLink ? (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses, style: { width: pagewidth, minHeight: pageheight } }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: url, target: isExternal ? '_blank' : '', style: { width: pagewidth, minHeight: pageheight } }, other, { children: content })) }))) : (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { style: { width: pagewidth, minHeight: pageheight } }, { children: content })));
1178
- };
1179
- Card.displayName = 'Card';
1180
-
1181
- //import { TagType } from '../../typesLegacy/utils';
1182
- const TYPES = {
1183
- info: "Info",
1184
- error: "error",
1185
- success: "Success",
1186
- warning: "Warning",
1187
- custom: "Custom",
1188
- };
1189
- /** Tag is used to label, categorize, or organize items using keywords that describe them. */
1190
- const Tag = (_a) => {
1191
- var { children, className, type = "info" } = _a, other = __rest(_a, ["children", "className", "type"]);
1192
- const { prefix } = useSettings();
1193
- const tagClass = `${prefix}--tag--${type}`;
1194
- const tagClasses = classNames(`${prefix}--tag`, tagClass, className);
1195
- return (jsxRuntimeExports.jsx("span", Object.assign({ className: tagClasses }, other, { children: children || TYPES[type] })));
1196
- };
1197
- Tag.displayName = "Tag";
1198
-
1199
- const CardExternal = (_a) => {
1200
- var { label, labelStatus, interactive, image, heading, subHeading, caption, tag, children, className } = _a, other = __rest(_a, ["label", "labelStatus", "interactive", "image", "heading", "subHeading", "caption", "tag", "children", "className"]);
1201
- const { prefix } = useSettings();
1202
- const ref = useRef(null);
1203
- const supportiveTextFontSize = 14;
1204
- const supportiveTextLineHeight = 1.5;
1205
- // Set a maximum of 3 lines of supportive text by default
1206
- const [supportiveTextHeight, setsupportiveTextHeight] = useState(supportiveTextFontSize * supportiveTextLineHeight * 3);
1207
- // statusStyle apply different style(color, backgroundColor) based on its active state
1208
- const statusStyle = labelStatus ? `success` : `neutral`;
1209
- const wrapperClasses = classNames(`${prefix}--card-ext`, {
1210
- [`${prefix}--card-ext--interactive`]: interactive,
1211
- [`${className}`]: className,
1212
- });
1213
- /**
1214
- * Get the height of the supportive text element.
1215
- * This is useful to calculate a dynamic maximum amount of line text with final
1216
- * ellipsis for the "supportive text" element, depending of the available
1217
- * height.
1218
- *
1219
- * Cards' title has no limits in terms of line text, whereas we can decide to
1220
- * truncate the supportive text at 3 number of lines. The multiline truncation
1221
- * can be obtained by using the "line clamp" CSS property that truncates text
1222
- * at a specific number of lines.
1223
- * The problem is, if we place three cards on a Flexbox/Grid parent, these
1224
- * cards will have the same height, depending on the highest of the three.
1225
- * This means that if one card has a multiline title, the other two will grow
1226
- * in height, showing a significant white space. To fill the latter cards'
1227
- * white space we need to increase the number of their "supportive text" lines.
1228
- * To do this we need to divide the "supportive text" element's height by its
1229
- * font-size and line-height in order to get exact amount of line text that are
1230
- * needed to fill the extra white space.
1231
- *
1232
- */
1233
- useEffect(() => {
1234
- if (!ref.current)
1235
- return;
1236
- setsupportiveTextHeight(ref.current.offsetHeight);
1237
- }, [ref]);
1238
- return (
1239
- /* Also expose a custom classname prop */
1240
- /**
1241
- * A prop will establish if the card is either informative (default) or
1242
- * interactive.
1243
- * If interactive, a modifier will be added and an animation will be shown
1244
- * on hover event ("${prefix}--card-ext--interactive").
1245
- */
1246
- jsxRuntimeExports.jsxs("div", Object.assign({ className: wrapperClasses }, { children: [label && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--card-ext__label ${prefix}--card-ext__label--${statusStyle}` }, { children: label }))), jsxRuntimeExports.jsx("figure", Object.assign({ className: `${prefix}--card-ext__media` }, { children: jsxRuntimeExports.jsx("img", { className: `${prefix}--card-ext__image`, src: image, alt: "Card picture" }) })), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--card-ext__info-wrapper ${prefix}--card-ext__info-wrapper--with-divider` }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--card-ext__primary-title` }, { children: [subHeading && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--card-ext__subheading` }, { children: subHeading }))), heading && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--card-ext__heading` }, { children: heading })))] })), jsxRuntimeExports.jsx("div", Object.assign({ className: other.truncated
1247
- ? `${prefix}--card-ext__supportive-text ${prefix}--card-ext__supportive-text--truncated`
1248
- : `${prefix}--card-ext__supportive-text`, ref: ref }, { children: jsxRuntimeExports.jsx("p", Object.assign({ style: {
1249
- WebkitLineClamp: Math.floor(supportiveTextHeight /
1250
- supportiveTextLineHeight /
1251
- supportiveTextFontSize),
1252
- } }, { children: caption })) })), tag && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--card-ext__tags` }, { children: jsxRuntimeExports.jsx(Tag, Object.assign({ className: `${prefix}--card-ext__tag`, type: "custom" }, { children: tag })) })))] })), children] })));
1253
- };
1254
- CardExternal.propTypes = {
1255
- /**
1256
- label description for card if any
1257
- */
1258
- label: PropTypes.string,
1259
- /**
1260
- labelStatus is either true or false, it applies for card if any
1261
- */
1262
- labelStatus: PropTypes.bool,
1263
- image: PropTypes.string,
1264
- heading: PropTypes.string,
1265
- subHeading: PropTypes.string,
1266
- caption: PropTypes.string,
1267
- tag: PropTypes.string,
1268
- children: PropTypes.node,
1269
- interactive: PropTypes.bool,
1270
- className: PropTypes.string,
1271
- };
1272
-
1273
- const DatePickerInput = React.forwardRef(({ startDate, endDate, setStartDate, datePicker, datePickerProps = {} }, ref) => {
1274
- const { prefix } = useSettings();
1275
- const DatePicker = datePicker;
1276
- if (!DatePicker) {
1277
- return jsxRuntimeExports.jsx("div", { children: "Add a datepicker component" });
1278
- }
1279
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--date-picker` }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--date-picker__input` }, { children: [jsxRuntimeExports.jsx(DatePicker, Object.assign({ selected: startDate, className: `${prefix}--input ${prefix}--date__input__start-date`, onChange: setStartDate, selectsStart: true, startDate: startDate, endDate: endDate, wrapperClassName: `${prefix}--date-picker__wrapper` }, datePickerProps, { ref: ref })), jsxRuntimeExports.jsx(CalendarAltRegular, { className: `${prefix}--date-picker__icon` })] })) })));
1280
- });
1281
- DatePickerInput.displayName = "DatePickerInput";
1282
-
1283
- const DatePicker = React.forwardRef((props, ref) => {
1284
- const { datePickerProps, hideLabel, helperText, /* pattern, */ required } = props;
1285
- const { prefix } = useSettings();
1286
- const inputClassName = classNames(`${prefix}--input`, `${prefix}--date-picker`, {
1287
- [`${prefix}--date-picker--helpertext`]: helperText,
1288
- [`${prefix}--date-picker--nolabel`]: hideLabel,
1289
- [`${prefix}--date-picker--required`]: required,
1290
- });
1291
- const useInputProps = props;
1292
- const { inputProps, wrapperProps } = useInput(Object.assign(Object.assign({}, useInputProps), { inputClassName }));
1293
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, wrapperProps, { children: jsxRuntimeExports.jsx(DatePickerInput
1294
- // pattern={pattern}
1295
- , Object.assign({}, inputProps, { ref: ref, datePickerProps: datePickerProps })) })));
1296
- });
1297
- DatePicker.displayName = "DatePicker";
1298
-
1299
- const DateRangePickerInput = React.forwardRef(({ startDate, endDate, setStartDate, setEndDate, datePicker, fromProps = {}, toProps = {}, }, ref) => {
1300
- const { prefix } = useSettings();
1301
- const DatePicker = datePicker;
1302
- if (!DatePicker) {
1303
- return jsxRuntimeExports.jsx("div", { children: "Add a datepicker component" });
1304
- }
1305
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--date-ranger-picker` }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--date-ranger-picker__input` }, { children: [jsxRuntimeExports.jsx(DatePicker, Object.assign({ selected: startDate, className: `${prefix}--input ${prefix}--date-ranger__input__start-date`, onChange: setStartDate, selectsStart: true, startDate: startDate, endDate: endDate, wrapperClassName: `${prefix}--date-picker__wrapper` }, fromProps, { ref: ref })), jsxRuntimeExports.jsx(CalendarAltRegular, { className: `${prefix}--date-ranger-picker__icon` })] })), jsxRuntimeExports.jsx(ArrowRight, { className: `${prefix}--date-ranger-picker__arrow` }), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--date-ranger-picker__input` }, { children: [jsxRuntimeExports.jsx(DatePicker, Object.assign({ selected: endDate, className: `${prefix}--input ${prefix}--date-ranger__input__start-date`, onChange: setEndDate, selectsEnd: true, startDate: startDate, endDate: endDate, minDate: startDate, wrapperClassName: `${prefix}--date-picker__wrapper` }, toProps)), jsxRuntimeExports.jsx(CalendarAltRegular, { className: `${prefix}--date-ranger-picker__icon` })] }))] })));
1306
- });
1307
- DateRangePickerInput.displayName = "DateRangePickerInput";
1308
-
1309
- const DateRangePicker = React.forwardRef((props, ref) => {
1310
- const { fromProps, toProps, hideLabel, helperText,
1311
- /* pattern, */ required, } = props;
1312
- const { prefix } = useSettings();
1313
- const inputClassName = classNames(`${prefix}--input`, `${prefix}--date-range-picker`, {
1314
- [`${prefix}--date-range-picker--helpertext`]: helperText,
1315
- [`${prefix}--date-range-picker--nolabel`]: hideLabel,
1316
- [`${prefix}--date-range-picker--required`]: required,
1317
- });
1318
- const useInputProps = props;
1319
- const { inputProps, wrapperProps } = useInput(Object.assign(Object.assign({}, useInputProps), { inputClassName }));
1320
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, wrapperProps, { children: jsxRuntimeExports.jsx(DateRangePickerInput
1321
- // pattern={pattern}
1322
- , Object.assign({}, inputProps, { ref: ref, fromProps: fromProps, toProps: toProps })) })));
1323
- });
1324
- DateRangePicker.displayName = "DateRangePicker";
1325
-
1326
- const Checkbox = React.forwardRef((_a, ref) => {
1327
- var { className, id, labelText,
1328
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1329
- onChange = () => { },
1330
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1331
- indeterminate, invalid, invalidText, hideLabel, wrapperClassName, title = "" } = _a, other = __rest(_a, ["className", "id", "labelText", "onChange", "indeterminate", "invalid", "invalidText", "hideLabel", "wrapperClassName", "title"]);
1332
- const { prefix } = useSettings();
1333
- const labelClasses = classNames(`${prefix}--checkbox-label`, className);
1334
- const innerLabelClasses = classNames(`${prefix}--checkbox-label-text`, {
1335
- [`${prefix}--visually-hidden`]: hideLabel,
1336
- });
1337
- const wrapperClasses = classNames(`${prefix}--form-item`, `${prefix}--checkbox-wrapper`, {
1338
- [`${prefix}--checkbox-wrapper--invalid`]: invalid,
1339
- }, wrapperClassName);
1340
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: wrapperClasses }, { children: [jsxRuntimeExports.jsx("input", Object.assign({}, other, { "aria-invalid": invalid, "data-invalid": invalid, type: "checkbox", onChange: (evt) => {
1341
- onChange(evt, evt.target.checked, id);
1342
- }, className: `${prefix}--checkbox`, id: id || other.name, ref: (el) => {
1343
- if (el) {
1344
- if (indeterminate) {
1345
- el.indeterminate = indeterminate;
1346
- }
1347
- }
1348
- if (typeof ref === "function") {
1349
- ref(el);
1350
- }
1351
- else if (Object(ref) === ref && ref) {
1352
- ref.current = el;
1353
- }
1354
- } })), jsxRuntimeExports.jsx("label", Object.assign({ htmlFor: id || other.name, className: labelClasses, title: title || undefined }, { children: jsxRuntimeExports.jsx("span", Object.assign({ className: innerLabelClasses }, { children: labelText })) })), jsxRuntimeExports.jsx(InlineErrorMessage, { errorClasses: `${prefix}--form-requirement`, invalid: invalid, invalidText: invalidText })] })));
1355
- });
1356
- Checkbox.displayName = "Checkbox";
1357
-
1358
- /** Credits are mostly used when a photo need a source attribution. */
1359
- const Credits = (_a) => {
1360
- var { children, className, info } = _a, other = __rest(_a, ["children", "className", "info"]);
1361
- const { prefix } = useSettings();
1362
- const classes = classNames(`${prefix}--credits`, className);
1363
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--credits__info` }, { children: info })), children] })));
1364
- };
1365
- Credits.displayName = "Credits";
1366
-
1367
- const ContentSwitcher = (_a) => {
1368
- var { children, className, selectedIndex, small, onChange } = _a, other = __rest(_a, ["children", "className", "selectedIndex", "small", "onChange"]);
1369
- const { prefix } = useSettings();
1370
- const [selectedIdx, setSelectedIndex] = useState(selectedIndex);
1371
- const getChildren = (children) => {
1372
- return React__default.Children.map(children, (child, index) => React__default.cloneElement(child, {
1373
- index,
1374
- onClick: handleChildChange,
1375
- onKeyDown: handleChildChange,
1376
- selected: index === selectedIdx,
1377
- }));
1378
- };
1379
- const handleChildChange = (data) => {
1380
- const { index } = data;
1381
- if (selectedIdx !== index) {
1382
- setSelectedIndex(index);
1383
- onChange(data);
1384
- }
1385
- };
1386
- const classes = classNames(`${prefix}--content-switcher`, className, {
1387
- [`${prefix}--content-switcher--sm`]: small,
1388
- });
1389
- return (jsxRuntimeExports.jsx("div", Object.assign({}, other, { className: classes }, { children: getChildren(children) })));
1390
- };
1391
-
1392
- const tooltipStyle = {
1393
- duration: 100,
1394
- animation: "fade",
1395
- theme: "light",
1396
- arrow: true,
1397
- };
1398
- const tooltipStyleDark = {
1399
- duration: 100,
1400
- animation: "fade",
1401
- theme: "dark",
1402
- arrow: true,
1403
- };
1404
- /** Tooltips display additional information upon click, hover, or focus. The information should be contextual, useful, and nonessential. */
1405
- const Tooltip = ({ className, dark, noPadding, children, content, trigger = "hover",
1406
- // modifiers = [],
1407
- placement = "top", createRefWrapper, closeOnOutsideClick, closeOnTriggerHidden, defaultVisible, delayHide, delayShow, followCursor, interactive, mutationObserverOptions, offset, onVisibleChange, usePortal,
1408
- // ...others
1409
- }) => {
1410
- const { prefix } = useSettings();
1411
- const [visibility, setVisibility] = React.useState(false);
1412
- const classes = classNames(className, {
1413
- [`${prefix}--tooltip`]: true,
1414
- [`${prefix}--tooltip--disable-padding`]: noPadding,
1415
- [`${prefix}--tooltip--visible`]: visibility,
1416
- [`${prefix}--tooltip--${trigger}`]: trigger,
1417
- [`${prefix}--tooltip--dark`]: dark,
1418
- });
1419
- const { getArrowProps, getTooltipProps, setTooltipRef, setTriggerRef, visible, } = usePopperTooltip({
1420
- closeOnOutsideClick,
1421
- closeOnTriggerHidden,
1422
- defaultVisible,
1423
- delayHide,
1424
- delayShow,
1425
- followCursor,
1426
- interactive,
1427
- mutationObserverOptions,
1428
- offset,
1429
- onVisibleChange,
1430
- placement,
1431
- trigger,
1432
- });
1433
- const elementClassNames = classNames(
1434
- /*children?.props?.className, */ {
1435
- [`${prefix}--tooltip--trigger`]: true,
1436
- });
1437
- const wrapperClassNames = classNames(className, {
1438
- [`${prefix}--tooltip--trigger`]: true,
1439
- });
1440
- const triggerElement = !createRefWrapper && typeof children !== "string" ? (React.cloneElement(children, {
1441
- ref: setTriggerRef,
1442
- className: elementClassNames,
1443
- })) : (jsxRuntimeExports.jsx("span", Object.assign({ ref: setTriggerRef, className: wrapperClassNames }, { children: children })));
1444
- const visibilityChange = (e) => {
1445
- setVisibility(e);
1446
- if (onVisibleChange)
1447
- onVisibleChange(e);
1448
- };
1449
- const tooltip = (jsxRuntimeExports.jsxs("div", Object.assign({ ref: setTooltipRef }, getTooltipProps({ className: classes }), { children: [typeof content === "function"
1450
- ? content({ setVisibility, visibilityChange })
1451
- : content, jsxRuntimeExports.jsx("div", Object.assign({}, getArrowProps({ className: `${prefix}--tooltip__arrow` })))] })));
1452
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [triggerElement, visible && usePortal && jsxRuntimeExports.jsx(TooltipPortal, { children: tooltip }), visible && !usePortal && tooltip] }));
1453
- };
1454
- function TooltipPortal({ children }) {
1455
- return ReactDOM.createPortal(children, document.body);
1456
- }
1457
-
1458
- const ContextMenu = ({ children, className, content,
1459
- /* href,
1460
- inline,
1461
- trigger = 'click',
1462
- ...other*/
1463
- }) => {
1464
- const { prefix } = useSettings();
1465
- const classes = classNames({
1466
- [`${prefix}--context-menu`]: true,
1467
- }, className);
1468
- return (jsxRuntimeExports.jsx(Tooltip, Object.assign({ className: classes, content: content, noPadding: true, trigger: "click" }, { children: children })));
1469
- };
1470
- const ContextMenuGroup = (_a) => {
1471
- var { className } = _a, other = __rest(_a, ["className"]);
1472
- const { prefix } = useSettings();
1473
- const classes = classNames({
1474
- [`${prefix}--context-menu__group`]: true,
1475
- }, className);
1476
- return jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other));
1477
- };
1478
- const ContextMenuItem = (_a) => {
1479
- var { className } = _a, other = __rest(_a, ["className"]);
1480
- const { prefix } = useSettings();
1481
- const classes = classNames({
1482
- [`${prefix}--context-menu__item`]: true,
1483
- }, className);
1484
- return jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other));
1485
- };
1486
-
1487
- const Footer = ({ className, children, labelOne, linkTextOne, linkHrefOne, labelTwo, linkTextTwo, linkHrefTwo, logo, metaContent, metaLinks, secondary, pageWidth = "lg", }) => {
1488
- const { prefix } = useSettings();
1489
- const classes = classNames(`${prefix}--footer`, className);
1490
- return (jsxRuntimeExports.jsxs("footer", Object.assign({ className: classes }, { children: [jsxRuntimeExports.jsx(Wrapper, Object.assign({ pageWidth: pageWidth }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer__content` }, { children: [children ? (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer__info` }, { children: children }))) : (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer__info` }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer__info__item` }, { children: [jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--footer__label` }, { children: labelOne })), jsxRuntimeExports.jsx("ul", Object.assign({ className: `${prefix}--footer__list` }, { children: jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: linkHrefOne }, { children: linkTextOne })) }) }))] })), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer__info__item` }, { children: [jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--footer__label` }, { children: labelTwo })), jsxRuntimeExports.jsx("ul", Object.assign({ className: `${prefix}--footer__list` }, { children: jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx(Link, Object.assign({ href: linkHrefTwo }, { children: linkTextTwo })) }) }))] }))] }))), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer__cta` }, { children: [logo, secondary && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer__secondary` }, { children: secondary })))] }))] })) })), jsxRuntimeExports.jsxs(Wrapper, Object.assign({ className: `${prefix}--footer__meta`, pageWidth: pageWidth }, { children: [metaLinks && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer__meta__links` }, { children: metaLinks }))), metaContent && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer__meta__content` }, { children: metaContent })))] }))] })));
1491
- };
1492
- Footer.displayName = "Footer";
1493
-
1494
- const FooterExternal = ({ className, productName, children, metaContent, pageWidth = "lg", metaLinks, }) => {
1495
- const { prefix } = useSettings();
1496
- const externalClasses = classNames(`${prefix}--footer-ext`, className);
1497
- return (jsxRuntimeExports.jsx("footer", Object.assign({ className: externalClasses }, { children: jsxRuntimeExports.jsxs(Wrapper, Object.assign({ pageWidth: pageWidth }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer-ext__content` }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer-ext__info` }, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer-ext__branding` }, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer-ext__product-name` }, { children: productName })) })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer-ext__address` }, { children: metaContent })), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer-ext__social-wrapper` }, { children: [jsxRuntimeExports.jsx("p", { children: "Follow WFP on:" }), jsxRuntimeExports.jsxs("ul", Object.assign({ className: `${prefix}--footer-ext__social-icons-list` }, { children: [jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://twitter.com/WFP", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(Twitter, {}) })) })), jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://www.facebook.com/WorldFoodProgramme", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(Facebook, {}) })) })), jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://www.instagram.com/Worldfoodprogramme/", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(Instagram, {}) })) })), jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://www.linkedin.com/company/world-food-programme", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(LinkedIn, {}) })) })), jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://www.youtube.com/user/WORLDFOODPROGRAM", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(YouTube, {}) })) })), jsxRuntimeExports.jsx("li", Object.assign({ className: `${prefix}--footer-ext__social-icon` }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: "https://www.tiktok.com/@worldfoodprogramme", target: "_blank", rel: "noopener" }, { children: jsxRuntimeExports.jsx(TikTok, {}) })) }))] }))] }))] })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--footer-ext__nav-wrapper` }, { children: children }))] })), jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--footer-ext__legal` }, { children: [jsxRuntimeExports.jsxs("span", { children: [new Date().getFullYear(), " \u00A9 World Food Programme"] }), jsxRuntimeExports.jsx("nav", Object.assign({ className: `${prefix}--footer-ext__nav-legal` }, { children: jsxRuntimeExports.jsx("ul", Object.assign({ className: `${prefix}--footer-ext__legal-links` }, { children: metaLinks })) }))] }))] })) })));
1498
- };
1499
- const LinksColumn = ({ title, children }) => {
1500
- const { prefix } = useSettings();
1501
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--links-column` }, { children: [title && jsxRuntimeExports.jsxs("p", Object.assign({ className: `${prefix}--links-column__title` }, { children: [" ", title, " "] })), jsxRuntimeExports.jsx("nav", { children: jsxRuntimeExports.jsx("ul", Object.assign({ className: `${prefix}--links-column__nav-list` }, { children: children })) })] })));
1502
- };
1503
- const FooterMetaLink = ({ className, href, children, }) => {
1504
- const { prefix } = useSettings();
1505
- const wrapperClasses = classNames(`${prefix}--footer-ext__legal-link`, className);
1506
- return (jsxRuntimeExports.jsx("li", Object.assign({ className: wrapperClasses }, { children: jsxRuntimeExports.jsx("a", Object.assign({ href: href }, { children: children })) })));
1507
- };
1508
-
1509
- /** A form is a group of related input controls that allows users to provide data or configure options. */
1510
- const Form = (_a) => {
1511
- var { className, children, longForm = true } = _a, other = __rest(_a, ["className", "children", "longForm"]);
1512
- const { prefix } = useSettings();
1513
- const classes = classNames(`${prefix}--form`, { [`${prefix}--form-long`]: longForm === true }, className);
1514
- return (jsxRuntimeExports.jsx("form", Object.assign({ className: classes }, other, { children: children })));
1515
- };
1516
- Form.displayName = 'Form';
1517
-
1518
- /** A FormGroup element is used to group several controls as well as labels within a web form. It uses `<fieldset>` */
1519
- const FormGroup = ({ align, breakpoint, legendText, inline,
1520
- // invalid,
1521
- children, className, inputSpacing, message, messageText,
1522
- // ...other
1523
- }) => {
1524
- const { prefix } = useSettings();
1525
- const classNamesLegend = classNames(`${prefix}--form-group__title`, className);
1526
- const classNamesFieldset = classNames(`${prefix}--fieldset`, {
1527
- [`${prefix}--fieldset__inline`]: inline,
1528
- [`${prefix}--fieldset__align-${align}`]: align,
1529
- [`${prefix}--fieldset__breakpoint-${breakpoint}`]: breakpoint,
1530
- [`${prefix}--fieldset__input-spacing-${inputSpacing}`]: inputSpacing,
1531
- }, className);
1532
- return (jsxRuntimeExports.jsxs("div", Object.assign({
1533
- //{...(invalid && { 'data-invalid': '' })}
1534
- className: classNamesFieldset }, { children: [jsxRuntimeExports.jsx("legend", Object.assign({ className: classNamesLegend }, { children: legendText })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--fieldset__content` }, { children: children })), message ? (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--form__requirements` }, { children: messageText }))) : null] })));
1535
- };
1536
-
1537
- const FormHint = ({ className, children, description, }) => {
1538
- const { prefix } = useSettings();
1539
- const formHintClasses = classNames(`${prefix}--form-hint`, className);
1540
- return (jsxRuntimeExports.jsx(Tooltip, Object.assign({ content: children }, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: formHintClasses }, { children: jsxRuntimeExports.jsx(InfoSolid, { width: "15", height: "15", description: description }) })) })));
1541
- };
1542
-
1543
- const FormLabel = (_a) => {
1544
- var { className, children, id } = _a, other = __rest(_a, ["className", "children", "id"]);
1545
- const { prefix } = useSettings();
1546
- const classes = classNames(`${prefix}--label`, className);
1547
- return (jsxRuntimeExports.jsx("label", Object.assign({ htmlFor: id, className: classes }, other, { children: children })));
1548
- };
1549
-
1550
- const InfoBar = ({ children, className, id, pageWidth, }) => {
1551
- const { prefix } = useSettings();
1552
- const wrapperClasses = classNames(`${prefix}--info-bar`, className);
1553
- return (jsxRuntimeExports.jsx("div", Object.assign({ id: id, className: wrapperClasses }, { children: jsxRuntimeExports.jsx(Wrapper, Object.assign({ pageWidth: pageWidth }, { children: children })) })));
1554
- };
1555
- InfoBar.displayName = 'InfoBar';
1556
-
1557
- /** Loading spinners are used when retrieving data or performing slow computations, and help to notify users that loading is underway. */
1558
- const Loading = (props) => {
1559
- const { active = true, className, withOverlay = true, small = false } = props, other = __rest(props, ["active", "className", "withOverlay", "small"]);
1560
- const { prefix } = useSettings();
1561
- const loadingClasses = classNames(`${prefix}--loading`, className, {
1562
- [`${prefix}--loading--small`]: small,
1563
- [`${prefix}--loading--stop`]: !active,
1564
- });
1565
- const overlayClasses = classNames(`${prefix}--loading-overlay`, {
1566
- [`${prefix}--loading-overlay--stop`]: !active,
1567
- });
1568
- const loading = (jsxRuntimeExports.jsx("div", Object.assign({}, other, { "aria-live": active ? 'assertive' : 'off', className: loadingClasses }, { children: jsxRuntimeExports.jsxs("svg", Object.assign({ className: `${prefix}--loading__svg`, viewBox: "-75 -75 150 150" }, { children: [jsxRuntimeExports.jsx("title", { children: "Loading" }), null, jsxRuntimeExports.jsx("circle", { className: undefined, cx: "0", cy: "0", r: "37.5" })] })) })));
1569
- return withOverlay ? (jsxRuntimeExports.jsx("div", Object.assign({ className: overlayClasses }, { children: loading }))) : (loading);
1570
- };
1571
- Loading.displayName = 'Loading';
1572
-
1573
- const InlineLoading = (props) => {
1574
- const { className, success, description, onSuccess, successDelay } = props, other = __rest(props, ["className", "success", "description", "onSuccess", "successDelay"]);
1575
- const { prefix } = useSettings();
1576
- const loadingClasses = classNames(`${prefix}--inline-loading`, className);
1577
- const getLoading = () => {
1578
- if (success) {
1579
- setTimeout(() => {
1580
- if (onSuccess) {
1581
- onSuccess();
1582
- }
1583
- }, successDelay);
1584
- return (jsxRuntimeExports.jsx("svg", Object.assign({ className: `${prefix}--inline-loading__checkmark-container ${prefix}--inline-loading__svg`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 10 10" }, { children: jsxRuntimeExports.jsx("polyline", { className: `${prefix}--inline-loading__checkmark`, points: "0.74 3.4 3.67 6.34 9.24 0.74" }) })));
1585
- }
1586
- return jsxRuntimeExports.jsx(Loading, { small: true, withOverlay: false });
1587
- };
1588
- const loadingText = (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--inline-loading__text` }, { children: description })));
1589
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: loadingClasses }, other, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--inline-loading__animation` }, { children: getLoading() })), description && loadingText] })));
1590
- };
1591
- InlineLoading.displayName = "InlineLoading";
1592
-
1593
- const List = React.forwardRef((_a, ref) => {
1594
- var { children, className, colon, kind, small } = _a, other = __rest(_a, ["children", "className", "colon", "kind", "small"]);
1595
- const { prefix } = useSettings();
1596
- const classes = classNames(`${prefix}--list`, className, {
1597
- [`${prefix}--list--${kind}`]: kind,
1598
- [`${prefix}--list--small`]: small,
1599
- [`${prefix}--list--colon`]: colon,
1600
- });
1601
- /* if (kind == 'ordered') {
1602
- const olProps = {
1603
- ...other,
1604
- href: other.href,
1605
- } as React.AnchorHTMLAttributes<HTMLOListElement>;
1606
-
1607
- return (
1608
- <ol
1609
- className={classes}
1610
- {...olProps}
1611
- ref={ref as React.Ref<HTMLOListElement>}>
1612
- {children}
1613
- </ol>
1614
- );
1615
- }*/
1616
- const ulProps = Object.assign({}, other);
1617
- return (jsxRuntimeExports.jsx("ul", Object.assign({ className: classes }, ulProps, { ref: ref }, { children: children })));
1618
- });
1619
- List.displayName = "List";
1620
-
1621
- const ListItem = (_a) => {
1622
- var { children, className, title, kind, icon } = _a, other = __rest(_a, ["children", "className", "title", "kind", "icon"]);
1623
- const classes = classNames("wfp--list__element", className, {
1624
- "wfp--list-item--checkmark": kind === "checkmark",
1625
- "wfp--list-item--cross": kind === "cross",
1626
- });
1627
- return (jsxRuntimeExports.jsxs("li", Object.assign({ className: classes }, other, { children: [kind === "cross" && jsxRuntimeExports.jsx(Cross, { className: "wfp--list-item__icon" }), kind === "checkmark" && jsxRuntimeExports.jsx(Check, { className: "wfp--list-item__icon" }), icon && jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--list__element__icon" }, { children: icon })), title && jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--list__element__title" }, { children: title })), jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--list__element__content" }, { children: children }))] })));
1628
- };
1629
-
1630
- /* eslint-disable @typescript-eslint/no-empty-function */
1631
- const MainNavigationContext = React__default.createContext({
1632
- onChangeSub: (e) => e,
1633
- activeMenuItem: null,
1634
- openMobileMenu: false,
1635
- toggleMenu: () => { },
1636
- setOpenMobileMenu: () => { },
1637
- });
1638
-
1639
- const MobileButton = ({ toggleMenu, prefix }) => {
1640
- return (jsxRuntimeExports.jsx(Button, Object.assign({ className: `${prefix}--main-navigation__button`, onClick: toggleMenu }, { children: "Menu" })));
1641
- };
1642
-
1643
- const MainNavigation = ({ children, components: componentsOverride = {}, className, id, logo, line = false, logoRibbon = "default", mobilePageWidth, pageWidth, }) => {
1644
- const { prefix } = useSettings();
1645
- const [openMobileMenu, setOpenMobileMenu] = useState(false);
1646
- const [activeMenuItem, setActiveMenuItem] = useState(null);
1647
- const onChangeSub = (action, i, e) => {
1648
- if (e)
1649
- e.preventDefault();
1650
- if (action === "close") {
1651
- setActiveMenuItem(null);
1652
- }
1653
- else if (action === "toggle") {
1654
- const newI = activeMenuItem === null || activeMenuItem !== i ? i : null;
1655
- if (newI !== undefined)
1656
- setActiveMenuItem(newI);
1657
- }
1658
- };
1659
- const toggleMenu = () => {
1660
- setOpenMobileMenu(!openMobileMenu);
1661
- };
1662
- // const triggerSubNavigation = () => {
1663
- // setActiveMenuItem(undefined);
1664
- // };
1665
- // const handleClickOutside = () => {
1666
- // setActiveMenuItem(undefined);
1667
- // };
1668
- const wrapperClasses = classNames(`${prefix}--main-navigation`, { [`${prefix}--main-navigation--line`]: line }, className);
1669
- const listClasses = classNames(`${prefix}--main-navigation__list`, {
1670
- [`${prefix}--main-navigation__list--open`]: openMobileMenu,
1671
- });
1672
- const components = Object.assign({ Wrapper: Wrapper, MobileButton: MobileButton }, componentsOverride);
1673
- const Wrapper$1 = components.Wrapper;
1674
- const MobileButton$1 = components.MobileButton;
1675
- return (jsxRuntimeExports.jsx("nav", Object.assign({ id: id, className: wrapperClasses }, { children: jsxRuntimeExports.jsx(MainNavigationContext.Provider, Object.assign({ value: {
1676
- activeMenuItem,
1677
- openMobileMenu,
1678
- toggleMenu,
1679
- onChangeSub,
1680
- setOpenMobileMenu,
1681
- } }, { children: jsxRuntimeExports.jsxs(Wrapper$1, Object.assign({ pageWidth: pageWidth, mobilePageWidth: mobilePageWidth, className: `${prefix}--main-navigation__wrapper` }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--main-navigation__logo-wrapper` }, { children: [jsxRuntimeExports.jsx(MobileButton$1, Object.assign({ toggleMenu: toggleMenu, prefix: prefix, openMobileMenu: openMobileMenu }, { children: "Menu" })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--main-navigation__logo` }, { children: logo }))] })), jsxRuntimeExports.jsx("ul", Object.assign({ className: listClasses }, { children: children }))] })) })) })));
1682
- };
1683
- MainNavigation.displayName = "MainNavigation";
1684
-
1685
- /** The useMainNavigation() is a hook to access the current state of the MainNavigation and manipulate it. */
1686
- function useMainNavigation() {
1687
- const settings = useContext(MainNavigationContext);
1688
- return settings;
1689
- }
1690
- useMainNavigation.displayName = "useMainNavigation";
1691
-
1692
- const MainNavigationItem = ({ className, children, kind, subNavigation, subNavWideAsContent, }) => {
1693
- const { prefix } = useSettings();
1694
- const { onChangeSub, activeMenuItem /*menuItem */ } = useMainNavigation();
1695
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1696
- const [menuItemId] = useState(Math.random().toString(36));
1697
- const wrapperRef = useRef(null);
1698
- useEffect(() => {
1699
- if (menuItemId === activeMenuItem) {
1700
- document.addEventListener("mousedown", handleClickOutside);
1701
- }
1702
- else {
1703
- document.removeEventListener("mousedown", handleClickOutside);
1704
- }
1705
- return () => {
1706
- document.removeEventListener("mousedown", handleClickOutside);
1707
- };
1708
- }, [activeMenuItem]);
1709
- const handleClickOutside = (e) => {
1710
- if ((wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) && !wrapperRef.current.contains(e.target)) {
1711
- onChangeSub("close");
1712
- }
1713
- };
1714
- const wrapperClasses = classNames(className, {
1715
- [`${prefix}--main-navigation__item`]: true,
1716
- [`${prefix}--main-navigation__item--open`]: menuItemId === activeMenuItem,
1717
- [`${prefix}--content-width`]: subNavigation && subNavWideAsContent,
1718
- });
1719
- const triggerClasses = classNames({
1720
- [`${prefix}--main-navigation__trigger`]: true,
1721
- [`${prefix}--main-navigation__trigger--has-sub`]: subNavigation,
1722
- [`${prefix}--main-navigation__trigger--open`]: menuItemId === activeMenuItem,
1723
- });
1724
- const Icon = menuItemId === activeMenuItem ? Close : ChevronDown;
1725
- const subClasses = classNames({
1726
- [`${prefix}--main-navigation__sub`]: true,
1727
- [`${prefix}--main-navigation__sub--${kind}`]: kind,
1728
- [`${prefix}--main-navigation__sub--open`]: menuItemId === activeMenuItem,
1729
- });
1730
- return (jsxRuntimeExports.jsxs("li", Object.assign({ className: wrapperClasses, ref: wrapperRef }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: triggerClasses, onClick: () => onChangeSub("toggle", menuItemId) }, { children: [children, subNavigation && (jsxRuntimeExports.jsx(Icon, { className: `${prefix}--main-navigation__trigger__icon`, description: menuItemId === activeMenuItem ? "close icon" : "expand icon" }))] })), subNavigation && jsxRuntimeExports.jsx("div", Object.assign({ className: subClasses }, { children: subNavigation }))] })));
1731
- };
1732
-
1733
- /** The SubNavigation is a toogleable part of the MainNavigation */
1734
- const SubNavigation = (_a) => {
1735
- var { children } = _a, other = __rest(_a, ["children"]);
1736
- return jsxRuntimeExports.jsx("div", Object.assign({}, other, { children: children }));
1737
- };
1738
-
1739
- const SubNavigationItem = (_a) => {
1740
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1741
- const { prefix } = useSettings();
1742
- const classes = classNames(`${prefix}--sub-navigation__item`, className);
1743
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1744
- };
1745
-
1746
- const SubNavigationHeader = (_a) => {
1747
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1748
- const { prefix } = useSettings();
1749
- const classes = classNames(`${prefix}--sub-navigation__header`, className);
1750
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1751
- };
1752
-
1753
- const SubNavigationTitle = (_a) => {
1754
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1755
- const { prefix } = useSettings();
1756
- const classes = classNames(`${prefix}--sub-navigation__title`, className);
1757
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1758
- };
1759
-
1760
- const SubNavigationLink = (_a) => {
1761
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1762
- const { prefix } = useSettings();
1763
- const classes = classNames(`${prefix}--sub-navigation__link`, className);
1764
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1765
- };
1766
-
1767
- const SubNavigationFilter = (_a) => {
1768
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1769
- const { prefix } = useSettings();
1770
- const classes = classNames(`${prefix}--sub-navigation__filter`, className);
1771
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1772
- };
1773
-
1774
- const SubNavigationContent = (_a) => {
1775
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1776
- const { prefix } = useSettings();
1777
- const classes = classNames(`${prefix}--sub-navigation__content`, className);
1778
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1779
- };
1780
-
1781
- const SubNavigationList = (_a) => {
1782
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1783
- const { prefix } = useSettings();
1784
- const classes = classNames(`${prefix}--sub-navigation__list`, className);
1785
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
1786
- };
1787
-
1788
- const SubNavigationGroup = (_a) => {
1789
- var { children, columns, className, title } = _a, other = __rest(_a, ["children", "columns", "className", "title"]);
1790
- const { prefix } = useSettings();
1791
- const classes = classNames(`${prefix}--sub-navigation__group`, {
1792
- className,
1793
- }, {
1794
- [`${prefix}--sub-navigation__group--columns`]: columns,
1795
- [`${prefix}--sub-navigation__group--columns--${columns}`]: columns,
1796
- });
1797
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [title && (jsxRuntimeExports.jsx("h3", Object.assign({ className: `${prefix}--sub-navigation__group__title` }, { children: title }))), jsxRuntimeExports.jsx("div", { children: children })] })));
1798
- };
1799
-
1800
- const Story = (_a) => {
1801
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
1802
- const { prefix } = useSettings();
1803
- const wrapperclassNames = classNames({
1804
- [`${prefix}--story`]: true,
1805
- [`${className}`]: className,
1806
- });
1807
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperclassNames }, other, { children: children })));
1808
- };
1809
-
1810
- const NotificationButton = (_a) => {
1811
- var { ariaLabel = "close notification", className, iconDescription = "close icon", type = "button", renderIcon: IconTag = Close, // IconTag, // Close
1812
- name, notificationType = "toast" } = _a, other = __rest(_a, ["ariaLabel", "className", "iconDescription", "type", "renderIcon", "name", "notificationType"]);
1813
- const { prefix } = useSettings();
1814
- const buttonClassName = classNames(className, {
1815
- [`${prefix}--${notificationType}-notification__close-button`]: notificationType,
1816
- });
1817
- const iconClassName = classNames({
1818
- [`${prefix}--${notificationType}-notification__close-icon`]: notificationType,
1819
- });
1820
- // const Icon = renderIcon;
1821
- return (
1822
- // eslint-disable-next-line react/button-has-type
1823
- jsxRuntimeExports.jsx("button", Object.assign({}, other, { type: type, "aria-label": iconDescription, title: iconDescription, className: buttonClassName }, { children: IconTag && (jsxRuntimeExports.jsx(IconTag, { "aria-label": ariaLabel, className: iconClassName, name: name })) })));
1824
- };
1825
-
1826
- /** Notifications are messages that communicate information to the user. The two main types of notifications are toast notifications and inline notifications. */
1827
- const NotificationActionButton = (_a) => {
1828
- var { children, className: customClassName, onClick } = _a, other = __rest(_a, ["children", "className", "onClick"]);
1829
- const { prefix } = useSettings();
1830
- const className = classNames(customClassName, `${prefix}--inline-notification__action-button`);
1831
- return (jsxRuntimeExports.jsx(Button, Object.assign({ className: className, kind: "ghost", onClick: onClick, small //TODO size="small"
1832
- : true }, other, { children: children })));
1833
- };
1834
-
1835
- const NotificationTextDetails = (_a) => {
1836
- var { title, subtitle, caption, notificationType = "toast", children } = _a, other = __rest(_a, ["title", "subtitle", "caption", "notificationType", "children"]);
1837
- const { prefix } = useSettings();
1838
- if (notificationType === "toast") {
1839
- return (jsxRuntimeExports.jsxs("div", Object.assign({}, other, { className: `${prefix}--toast-notification__details` }, { children: [title && (jsxRuntimeExports.jsx("h3", Object.assign({ className: `${prefix}--toast-notification__title` }, { children: title }))), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--toast-notification__subtitle` }, { children: subtitle })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--toast-notification__caption` }, { children: caption })), children] })));
1840
- }
1841
- return (jsxRuntimeExports.jsxs("div", Object.assign({}, other, { className: `${prefix}--inline-notification__text-wrapper` }, { children: [title && (jsxRuntimeExports.jsx("p", Object.assign({ className: `${prefix}--inline-notification__title` }, { children: title }))), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--inline-notification__subtitle` }, { children: children || subtitle }))] })));
1842
- };
1843
-
1844
- const iconTypes = {
1845
- error: Error$1,
1846
- success: CheckmarkCircle,
1847
- warning: WarningSolid,
1848
- info: InfoCircle,
1849
- };
1850
- const NotificationIcon = ({ iconDescription, kind = "info", notificationType = "toast", }) => {
1851
- const { prefix } = useSettings();
1852
- const IconForKind = kind ? iconTypes[kind] : undefined;
1853
- if (!IconForKind) {
1854
- return null;
1855
- }
1856
- return (jsxRuntimeExports.jsx(IconForKind, Object.assign({ className: `${prefix}--${notificationType}-notification__icon` }, { children: jsxRuntimeExports.jsx("title", { children: iconDescription }) })));
1857
- };
1858
-
1859
- const ToastNotification = (_a) => {
1860
- var { role = "alert", notificationType = "toast",
1861
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1862
- onClose = () => { },
1863
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1864
- onCloseButtonClick = () => { }, iconDescription = "closes notification", statusIconDescription, className,
1865
- //caption = 'provide a caption',
1866
- subtitle, title = "provide a title", kind = "error", lowContrast = true, hideCloseButton = false, children, timeout = 0 } = _a, other = __rest(_a, ["role", "notificationType", "onClose", "onCloseButtonClick", "iconDescription", "statusIconDescription", "className", "subtitle", "title", "kind", "lowContrast", "hideCloseButton", "children", "timeout"]);
1867
- const { prefix } = useSettings();
1868
- const [isOpen, setIsOpen] = React.useState(true);
1869
- const containerClassName = classNames(className, {
1870
- [`${prefix}--toast-notification`]: true,
1871
- [`${prefix}--toast-notification--low-contrast`]: lowContrast,
1872
- [`${prefix}--toast-notification--${kind}`]: kind,
1873
- });
1874
- const handleClose = (evt) => {
1875
- if (!onClose || onClose(evt) !== false) {
1876
- setIsOpen(false);
1877
- }
1878
- };
1879
- function handleCloseButtonClick(event) {
1880
- onCloseButtonClick(event);
1881
- handleClose(event);
1882
- }
1883
- const savedOnClose = React.useRef(onClose);
1884
- React.useEffect(() => {
1885
- savedOnClose.current = onClose;
1886
- });
1887
- React.useEffect(() => {
1888
- if (!timeout) {
1889
- return;
1890
- }
1891
- const timeoutId = window.setTimeout((event) => {
1892
- setIsOpen(false);
1893
- if (savedOnClose.current) {
1894
- savedOnClose.current(event);
1895
- }
1896
- }, timeout);
1897
- return () => {
1898
- window.clearTimeout(timeoutId);
1899
- };
1900
- }, [timeout]);
1901
- if (!isOpen) {
1902
- return null;
1903
- }
1904
- return (jsxRuntimeExports.jsxs("div", Object.assign({}, other, { role: role,
1905
- /* kind={kind} */ className: containerClassName }, { children: [jsxRuntimeExports.jsx(NotificationIcon, { kind: kind, iconDescription: statusIconDescription || `${kind} icon`, notificationType: notificationType }), jsxRuntimeExports.jsx(NotificationTextDetails, Object.assign({ title: title, subtitle: subtitle,
1906
- //caption={caption}
1907
- notificationType: notificationType }, { children: children })), !hideCloseButton && (jsxRuntimeExports.jsx(NotificationButton, { iconDescription: iconDescription, notificationType: notificationType, onClick: handleCloseButtonClick }))] })));
1908
- };
1909
-
1910
- const Callout = React.forwardRef((props, ref) => {
1911
- const { actions, role = "alert", notificationType = "inline", icon,
1912
- // iconDescription = 'closes notification',
1913
- statusIconDescription, className, subtitle, title, kind = "info", lowContrast = true, hideCloseButton = false, children } = props, other = __rest(props, ["actions", "role", "notificationType", "icon", "statusIconDescription", "className", "subtitle", "title", "kind", "lowContrast", "hideCloseButton", "children"]);
1914
- const { prefix } = useSettings();
1915
- const containerClassName = classNames(className, {
1916
- [`${prefix}--inline-notification`]: true,
1917
- [`${prefix}--block-notification`]: true,
1918
- [`${prefix}--inline-notification--low-contrast`]: lowContrast,
1919
- [`${prefix}--inline-notification--${kind}`]: kind,
1920
- [`${prefix}--inline-notification--hide-close-button`]: hideCloseButton,
1921
- });
1922
- return (jsxRuntimeExports.jsx("div", Object.assign({}, other, { ref: ref, role: role, className: containerClassName }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--inline-notification__details` }, { children: [icon === undefined && (jsxRuntimeExports.jsx(NotificationIcon, { notificationType: notificationType, kind: kind, iconDescription: statusIconDescription || `${kind} icon` })), icon && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--${notificationType}-notification__icon` }, { children: icon }))), jsxRuntimeExports.jsx(NotificationTextDetails, Object.assign({ title: title, subtitle: subtitle, notificationType: notificationType }, { children: children })), actions && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--inline-notification__actions-wrapper` }, { children: actions })))] })) })));
1923
- });
1924
- Callout.displayName = "Callout";
1925
-
1926
- /** Tables are used to make large volumes of data easy to understand and to access. */
1927
- const Table = (_a) => {
1928
- var { className, children, responsive, withBorder } = _a, other = __rest(_a, ["className", "children", "responsive", "withBorder"]);
1929
- const { prefix } = useSettings();
1930
- const classes = classNames(`${prefix}--table`, {
1931
- [`${prefix}--table--responsive`]: responsive,
1932
- [`${prefix}--table--with-border`]: withBorder,
1933
- }, className);
1934
- return (jsxRuntimeExports.jsx("table", Object.assign({}, other, { className: classes }, { children: children })));
1935
- };
1936
-
1937
- const TableSorting = ({ className, isSorted, isSortedDesc, sortType, }) => {
1938
- const classes = classNames(className, "wfp--table--sorting", {
1939
- "wfp--table--is-sorted": isSorted,
1940
- "wfp--table--is-sortable": sortType,
1941
- });
1942
- return (jsxRuntimeExports.jsx("span", Object.assign({ className: classes }, { children: isSorted ? isSortedDesc ? jsxRuntimeExports.jsx(CaretDown, {}) : jsxRuntimeExports.jsx(CaretUp, {}) : "" })));
1943
- };
1944
-
1945
- var TableSorting$1 = /*#__PURE__*/Object.freeze({
1946
- __proto__: null,
1947
- 'default': TableSorting
1948
- });
1949
-
1950
- const textLookup = {
1951
- h1: "h1",
1952
- h2: "h2",
1953
- h3: "h3",
1954
- h4: "h4",
1955
- h5: "h5",
1956
- h6: "h6",
1957
- title: "h1",
1958
- subtitle: "h3",
1959
- p: "p",
1960
- caption: "div",
1961
- code: "code",
1962
- i: "i",
1963
- bold: "b",
1964
- strong: "strong",
1965
- a: "a",
1966
- "inline-highlight": "code",
1967
- };
1968
- /**
1969
- *Text is a component for displaying paragraphs. You can use Text to standardize text across your web app. For longer sections or full articles use the <Story /> component instead.
1970
- */
1971
- const Text = ({ children, className, kind, spacingTop, spacingBottom, }) => {
1972
- const { prefix } = useSettings();
1973
- const TagName = kind && textLookup[kind] ? textLookup[kind] : "div";
1974
- const classes = classNames({
1975
- [`${prefix}--text`]: true,
1976
- // [`${prefix}--story__${kind}`]: kind,
1977
- [`${prefix}--text__${kind}`]: kind,
1978
- [`${prefix}--text__spacing-top-${spacingTop}`]: spacingTop,
1979
- [`${prefix}--text__spacing-bottom-${spacingBottom}`]: spacingBottom,
1980
- }, className);
1981
- return React.createElement(TagName, { className: classes }, children);
1982
- };
1983
- Text.displayName = "Text";
1984
-
1985
- /** Links are used as navigational elements. They may appear on their own, within a sentence or paragraph, or directly following the content. */
1986
- const wrapper = (props) => jsxRuntimeExports.jsx(Story, Object.assign({}, props));
1987
- const li = (props) => {
1988
- const kind = typeof props.children === 'string' ? props.children.substring(0, 1) : '';
1989
- if (kind === '✓' || kind === '✗')
1990
- return (jsxRuntimeExports.jsx(ListItem, Object.assign({ kind: kind === '✓' ? 'checkmark' : 'cross' }, props, { children: props.children.substring(1, props.children.length) })));
1991
- return jsxRuntimeExports.jsx("li", Object.assign({}, props, { children: props.children }));
1992
- };
1993
- const ul = (_a) => {
1994
- var { children } = _a, other = __rest(_a, ["children"]);
1995
- return (jsxRuntimeExports.jsx(List, Object.assign({}, other, { kind: "bullets" }, { children: children })));
1996
- };
1997
- const ol = (_a) => {
1998
- var { children } = _a, other = __rest(_a, ["children"]);
1999
- return (jsxRuntimeExports.jsx(List, Object.assign({}, other, { kind: "ordered" }, { children: children })));
2000
- };
2001
- const h1 = (props) => {
2002
- return (jsxRuntimeExports.jsx(Text, Object.assign({ kind: "h1" }, props, { children: props.children })));
2003
- };
2004
- const h2 = (props) => {
2005
- return (jsxRuntimeExports.jsx(Text, Object.assign({ kind: "h2" }, props, { children: props.children })));
2006
- };
2007
- const h3 = (props) => {
2008
- return (jsxRuntimeExports.jsx(Text, Object.assign({ kind: "h3" }, props, { children: props.children })));
2009
- };
2010
- const h4 = (props) => {
2011
- return (jsxRuntimeExports.jsx(Text, Object.assign({ kind: "h4" }, props, { children: props.children })));
2012
- };
2013
- const h5 = (props) => {
2014
- return (jsxRuntimeExports.jsx(Text, Object.assign({ kind: "h5" }, props, { children: props.children })));
2015
- };
2016
- const p = (props) => {
2017
- return jsxRuntimeExports.jsx("p", Object.assign({}, props, { children: props.children }));
2018
- };
2019
- const table = (props) => {
2020
- return jsxRuntimeExports.jsx(Table, Object.assign({}, props, { children: props.children }));
2021
- };
2022
- const a = (props) => {
2023
- return (jsxRuntimeExports.jsx(Link, Object.assign({ inline: true }, props, { children: props.children })));
2024
- };
2025
- const code = (props) => {
2026
- const settings = useSettings();
2027
- return (jsxRuntimeExports.jsx("code", Object.assign({ className: `${settings.prefix}--story__code` }, props, { children: props.children })));
2028
- };
2029
- const pre = (props) => {
2030
- const settings = useSettings();
2031
- return (jsxRuntimeExports.jsx("pre", Object.assign({ className: `${settings.prefix}--story__pre` }, props, { children: props.children })));
2032
- };
2033
- /*const inlineCode = (props) => {
2034
- const settings = useSettings();
2035
- return (
2036
- <code className={`${settings.prefix}--story__inlinecode`} {...props}>
2037
- {props.children}
2038
- </code>
2039
- );
2040
- };*/
2041
- const blockquote = (_a) => {
2042
- var { children } = _a, other = __rest(_a, ["children"]);
2043
- if (Array.isArray(children) && children.length >= 2 && children[0].props)
2044
- return (jsxRuntimeExports.jsx(Callout, Object.assign({ kind: "info" }, other, { subtitle: children.map((e, i) => {
2045
- if (i > 0)
2046
- return e;
2047
- }), title: children[0].props.children })));
2048
- return jsxRuntimeExports.jsx(Callout, Object.assign({ kind: "info" }, other, { subtitle: children }));
2049
- };
2050
- /*const code = ({ children, className, ...other }) => {
2051
- const language = className && className.split('-');
2052
- return (
2053
- <PureSource
2054
- format={false}
2055
- dark
2056
- language={(language && language[1]) || 'plaintext'}
2057
- code={children as string}
2058
- {...other}
2059
- />
2060
- );
2061
- };
2062
- */
2063
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2064
- const mdxComponents = {
2065
- wrapper,
2066
- h1,
2067
- h2,
2068
- h3,
2069
- h4,
2070
- h5,
2071
- p,
2072
- li,
2073
- a,
2074
- ul,
2075
- ol,
2076
- code,
2077
- pre,
2078
- // inlineCode,
2079
- table,
2080
- blockquote,
2081
- Button,
2082
- Accordion,
2083
- AccordionItem,
2084
- };
2085
-
2086
- const ModalFooter = ({ passiveModal, secondaryButtonText, onSecondaryButtonClick, primaryButtonText, onRequestSubmit, primaryButtonDisabled, secondaryButtonDisabled, danger, primaryButtonRef, secondaryButtonRef, }) => {
2087
- const { prefix } = useSettings();
2088
- if (passiveModal)
2089
- return null;
2090
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--modal-footer` }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--modal__buttons-container` }, { children: [secondaryButtonText && (jsxRuntimeExports.jsx(Button, Object.assign({ kind: "secondary", disabled: secondaryButtonDisabled, id: "secondaryButton", onClick: (e) => {
2091
- if (onSecondaryButtonClick)
2092
- onSecondaryButtonClick(e, "button");
2093
- }, ref: secondaryButtonRef }, { children: secondaryButtonText }))), jsxRuntimeExports.jsx(Button, Object.assign({ kind: danger ? "danger" : "primary", disabled: primaryButtonDisabled, onClick: onRequestSubmit, id: "primaryButton", ref: primaryButtonRef }, { children: primaryButtonText }))] })) })));
2094
- };
2095
-
2096
- const matchesFuncName = typeof Element !== "undefined" &&
2097
- ["matches", "webkitMatchesSelector", "msMatchesSelector"].filter((name) => typeof Element.prototype[name] === "function")[0];
2098
- /** Modals focus the user’s attention exclusively on one task or piece of information via a window that sits on top of the page content. */
2099
- function Modal(props) {
2100
- const { modalHeading, modalLabel, className, components: componentsOverride = {}, modalSecondaryAction, modalAriaLabel, passiveModal, children, elementToAppend, backgroundImage, open, lazyLoad, onRequestClose = () => { },
2101
- // onRequestSubmit,
2102
- onSecondarySubmit, iconDescription, inPortal = true, hideClose, handleBlur = () => { }, wide, type, selectorPrimaryFocus, primaryButtonRef, secondaryButtonRef } = props,
2103
- // shouldSubmitOnEnter,
2104
- other = __rest(props, ["modalHeading", "modalLabel", "className", "components", "modalSecondaryAction", "modalAriaLabel", "passiveModal", "children", "elementToAppend", "backgroundImage", "open", "lazyLoad", "onRequestClose", "onSecondarySubmit", "iconDescription", "inPortal", "hideClose", "handleBlur", "wide", "type", "selectorPrimaryFocus", "primaryButtonRef", "secondaryButtonRef"]);
2105
- const { prefix } = useSettings();
2106
- const button = useRef(null);
2107
- const outerModal = useRef(null);
2108
- const innerModal = useRef(null);
2109
- const el = elementToAppend
2110
- ? elementToAppend
2111
- : typeof document !== "undefined"
2112
- ? document.body
2113
- : undefined;
2114
- const [beingOpen, setBeingOpen] = React__default.useState(false);
2115
- // const handleKeyDown = (evt) => {
2116
- // if (evt.which === 27) onRequestClose(evt, 'key');
2117
- // if (evt.which === 13 && shouldSubmitOnEnter) onRequestSubmit(evt, 'key');
2118
- // };
2119
- const elementOrParentIsFloatingMenu = (target) => {
2120
- const { selectorsFloatingMenus = [
2121
- `.${prefix}--overflow-menu-options`,
2122
- `.${prefix}--tooltip`,
2123
- ".flatpickr-calendar",
2124
- ], } = props;
2125
- if (target && typeof target.closest === "function") {
2126
- return selectorsFloatingMenus.some((selector) => target.closest(selector));
2127
- }
2128
- else {
2129
- // Alternative if closest does not exist.
2130
- while (target) {
2131
- if (matchesFuncName && typeof target[matchesFuncName] === "function") {
2132
- if (
2133
- // eslint-disable-next-line no-loop-func
2134
- selectorsFloatingMenus.some((selector) => target[matchesFuncName](selector))) {
2135
- return true;
2136
- }
2137
- }
2138
- target = target.parentNode;
2139
- }
2140
- return false;
2141
- }
2142
- };
2143
- // const handleClick = (evt) => {
2144
- // console.log(
2145
- // 'evt.target',
2146
- // evt,
2147
- // innerModal.current.contains(evt.target),
2148
- // innerModal.current
2149
- // );
2150
- // if (
2151
- // innerModal.current &&
2152
- // !innerModal.current.contains(evt.target) &&
2153
- // !elementOrParentIsFloatingMenu(evt.target)
2154
- // ) {
2155
- // onRequestClose(evt, 'background');
2156
- // }
2157
- // };
2158
- const handleCloseButton = (evt) => {
2159
- onRequestClose(evt, "button");
2160
- };
2161
- const focusModal = () => {
2162
- if (outerModal.current)
2163
- outerModal.current.focus();
2164
- };
2165
- const handleBlurEvent = (evt) => {
2166
- if (handleBlur) {
2167
- handleBlur({
2168
- evt,
2169
- innerModal,
2170
- open,
2171
- elementOrParentIsFloatingMenu,
2172
- focusModal,
2173
- });
2174
- }
2175
- else if (innerModal.current &&
2176
- open &&
2177
- evt.relatedTarget &&
2178
- !innerModal.current.contains(evt.relatedTarget) &&
2179
- !elementOrParentIsFloatingMenu(evt.relatedTarget)) {
2180
- focusModal();
2181
- }
2182
- };
2183
- const focusButton = (focusContainerElement) => {
2184
- if (selectorPrimaryFocus === false)
2185
- return;
2186
- const primaryFocusElement = focusContainerElement.querySelector(selectorPrimaryFocus);
2187
- if (primaryFocusElement) {
2188
- primaryFocusElement.focus();
2189
- return;
2190
- }
2191
- if (button === null || button === void 0 ? void 0 : button.current) {
2192
- button.current.focus();
2193
- }
2194
- };
2195
- const handleTransitionEnd = (evt) => {
2196
- if (outerModal.current &&
2197
- outerModal.current.offsetWidth &&
2198
- outerModal.current.offsetHeight &&
2199
- beingOpen) {
2200
- focusButton(evt.currentTarget);
2201
- setBeingOpen(false);
2202
- }
2203
- };
2204
- if (open === false && lazyLoad)
2205
- return null;
2206
- const components = Object.assign({ ModalFooter: ModalFooter }, componentsOverride);
2207
- const ModalFooter$1 = components.ModalFooter;
2208
- const onSecondaryButtonClick = onSecondarySubmit
2209
- ? onSecondarySubmit
2210
- : onRequestClose;
2211
- const modalClasses = classNames({
2212
- [`${prefix}--modal`]: true,
2213
- [`${prefix}--modal--wide`]: wide,
2214
- [`${prefix}--modal--tall`]: !passiveModal,
2215
- [`${prefix}--modal--background-image`]: backgroundImage,
2216
- "is-visible": open,
2217
- [`${prefix}--modal--warning`]: type === "warning" || props.warning,
2218
- [`${prefix}--modal--danger`]: type === "danger" || props.danger,
2219
- }, className);
2220
- const modalButton = !hideClose ? (jsxRuntimeExports.jsx("button", Object.assign({ className: `${prefix}--modal-close`, type: "button", id: "closeButton", onClick: handleCloseButton, ref: button }, { children: jsxRuntimeExports.jsx(Close, { className: `${prefix}--modal-close__icon`, description: iconDescription }) }))) : null;
2221
- const modalBody = (jsxRuntimeExports.jsxs("div", Object.assign({ ref: innerModal, role: "dialog", className: `${prefix}--modal-container`, "aria-label": modalAriaLabel }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--modal-header` }, { children: [passiveModal && modalButton, jsxRuntimeExports.jsxs("div", { children: [modalLabel && (jsxRuntimeExports.jsx("h4", Object.assign({ className: `${prefix}--modal-header__label` }, { children: modalLabel }))), jsxRuntimeExports.jsx("h2", Object.assign({ className: `${prefix}--modal-header__heading` }, { children: modalHeading }))] }), modalSecondaryAction && jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: modalSecondaryAction }), !passiveModal && modalButton] })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--modal-content` }, { children: children })), jsxRuntimeExports.jsx(ModalFooter$1, Object.assign({}, props, { prefix: prefix, onSecondaryButtonClick: onSecondaryButtonClick, primaryButtonRef: primaryButtonRef, secondaryButtonRef: secondaryButtonRef }))] })));
2222
- const modal = (jsxRuntimeExports.jsx("div", Object.assign({}, other, {
2223
- // onKeyDown={handleKeyDown}
2224
- //onClick={handleClick}
2225
- onBlur: handleBlurEvent, className: modalClasses, style: backgroundImage
2226
- ? { backgroundImage: `url(${backgroundImage})` }
2227
- : undefined, role: "presentation", tabIndex: -1, onTransitionEnd: open ? handleTransitionEnd : undefined, ref: outerModal }, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--modal-inner` }, { children: modalBody })) })));
2228
- if (inPortal && el)
2229
- return ReactDOM.createPortal(modal, el);
2230
- else
2231
- return modal;
2232
- }
2233
- Modal.displayName = "Modal";
2234
-
2235
- const ModalWrapper = (_a) => {
2236
- var { children, customButton, id, onKeyDown, buttonTriggerText, buttonTriggerClassName, triggerButtonKind, disabled,
2237
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2238
- handleSubmit = () => { }, shouldCloseAfterSubmit = true } = _a, other = __rest(_a, ["children", "customButton", "id", "onKeyDown", "buttonTriggerText", "buttonTriggerClassName", "triggerButtonKind", "disabled", "handleSubmit", "shouldCloseAfterSubmit"]);
2239
- const { prefix } = useSettings();
2240
- const triggerButton = React.createRef();
2241
- const [isOpen, setIsOpen] = React.useState(false);
2242
- const handleOpen = () => {
2243
- setIsOpen(true);
2244
- };
2245
- const handleClose = () => {
2246
- setIsOpen(false);
2247
- if (!isOpen) {
2248
- triggerButton.current && triggerButton.current.focus();
2249
- if (handleClose) {
2250
- handleClose();
2251
- }
2252
- }
2253
- };
2254
- const handleOnRequestSubmit = () => {
2255
- if (handleSubmit) {
2256
- handleSubmit(handleClose);
2257
- if (shouldCloseAfterSubmit) {
2258
- handleClose();
2259
- }
2260
- }
2261
- };
2262
- const props = Object.assign(Object.assign({}, other), { open: isOpen, onRequestClose: handleClose, onRequestSubmit: handleOnRequestSubmit });
2263
- const customButtonEl = customButton
2264
- ? React.cloneElement(customButton, {
2265
- disabled: disabled,
2266
- onClick: handleOpen,
2267
- inputref: triggerButton,
2268
- })
2269
- : undefined;
2270
- return (jsxRuntimeExports.jsxs("div", Object.assign({ role: "presentation", className: `${prefix}--modal__wrapper`, onKeyDown: (evt) => {
2271
- if (evt.which === 27) {
2272
- handleClose();
2273
- onKeyDown && onKeyDown(evt);
2274
- }
2275
- } }, { children: [customButton ? (jsxRuntimeExports.jsx(React.Fragment, { children: customButtonEl })) : (jsxRuntimeExports.jsx(Button, Object.assign({ id: id, className: buttonTriggerClassName, disabled: disabled, kind: triggerButtonKind, onClick: handleOpen, ref: triggerButton }, { children: buttonTriggerText }))), jsxRuntimeExports.jsx(Modal, Object.assign({}, props, { children: children }))] })));
2276
- };
2277
- ModalWrapper.displayName = "ModalWrapper";
2278
-
2279
- const Module = (_a) => {
2280
- var { dark, light, children, className, margin, fullHeight, noMargin, withHover } = _a, other = __rest(_a, ["dark", "light", "children", "className", "margin", "fullHeight", "noMargin", "withHover"]);
2281
- const { prefix } = useSettings();
2282
- const wrapperClasses = classNames({
2283
- [`${prefix}--module--dark`]: dark,
2284
- [`${prefix}--module--no-margin`]: noMargin || margin === undefined,
2285
- [`${prefix}--module--full-height`]: fullHeight,
2286
- [`${prefix}--module--margin-xs`]: margin === "xs",
2287
- [`${prefix}--module--margin-md`]: margin === "md",
2288
- [`${prefix}--module--margin-lg`]: margin === "lg",
2289
- [`${prefix}--module--light`]: light,
2290
- [`${prefix}--module--with-hover`]: withHover,
2291
- }, className, [`${prefix}--module`]);
2292
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--module__inner` }, { children: children })) })));
2293
- };
2294
-
2295
- const ModuleBody = (_a) => {
2296
- var { children, className, centered, noPadding } = _a, other = __rest(_a, ["children", "className", "centered", "noPadding"]);
2297
- const wrapperClasses = classNames("wfp--module__content", className, {
2298
- "wfp--module__content--centered": centered,
2299
- "wfp--module__content--no-padding": noPadding,
2300
- });
2301
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: children })));
2302
- };
2303
-
2304
- const ModuleHeader = (_a) => {
2305
- var { filter, children, className } = _a, other = __rest(_a, ["filter", "children", "className"]);
2306
- const wrapperClasses = classNames("wfp--module__header", className);
2307
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: wrapperClasses }, other, { children: [jsxRuntimeExports.jsx("h1", Object.assign({ className: "wfp--module__title" }, { children: children })), filter && jsxRuntimeExports.jsx("div", Object.assign({ className: "wfp--module__filter" }, { children: filter }))] })));
2308
- };
2309
-
2310
- const ModuleFooter = (_a) => {
2311
- var { children, className } = _a, other = __rest(_a, ["children", "className"]);
2312
- const wrapperClasses = classNames("wfp--module__footer", className);
2313
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, other, { children: children })));
2314
- };
2315
-
2316
- const countDecimals = (value) => {
2317
- const valueFloat = parseFloat(value);
2318
- if (Math.floor(valueFloat) === valueFloat)
2319
- return 0;
2320
- return value.split(".")[1].length || 0;
2321
- };
2322
- const capMin = (min, value) => isNaN(min) || (!min && min !== 0) || isNaN(value) || (!value && value !== 0)
2323
- ? value
2324
- : Math.max(min, value);
2325
- const capMax = (max, value) => isNaN(max) || (!max && max !== 0) || isNaN(value) || (!value && value !== 0)
2326
- ? value
2327
- : Math.min(max, value);
2328
- /** The number input component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value */
2329
- const NumberInput = React.forwardRef((props, ref) => {
2330
- const { className, disabled, id, hideLabel, hideControls, max, min, step = 1, onChange = () => { }, onClick = () => { }, helperText, light,
2331
- //allowEmpty,
2332
- pattern = "[0-9]*",
2333
- // ...other
2334
- } = props;
2335
- const { prefix } = useSettings();
2336
- const initialValue = capMax(max, capMin(min, props.value));
2337
- const [value, setValue] = useState(initialValue);
2338
- useEffect(() => {
2339
- setValue(props.value);
2340
- }, [props.value]);
2341
- const newInputRef = useRef(null);
2342
- const _inputRef = ref ? ref : newInputRef;
2343
- const handleChange = (evt) => {
2344
- if (!disabled) {
2345
- evt.persist();
2346
- evt.imaginaryTarget = _inputRef;
2347
- setValue(evt.target.value);
2348
- onChange(evt, parseFloat(evt.target.value));
2349
- }
2350
- };
2351
- const handleArrowClick = (evt, direction) => {
2352
- let valueState = typeof value === "string" ? Number(value) : value;
2353
- valueState = isNaN(valueState) ? 0 : valueState;
2354
- const conditional = direction === "down"
2355
- ? (min !== undefined && valueState > min) || min === undefined
2356
- : (max !== undefined && valueState < max) || max === undefined;
2357
- const stepString = step.toString();
2358
- valueState =
2359
- direction === "down"
2360
- ? valueState - step
2361
- : valueState + parseFloat(stepString);
2362
- valueState = capMax(max, capMin(min, valueState));
2363
- valueState = parseFloat(valueState.toFixed(countDecimals(stepString)));
2364
- if (!disabled && conditional) {
2365
- evt.persist();
2366
- evt.imaginaryTarget = _inputRef;
2367
- evt.target.value = parseFloat(valueState);
2368
- onClick(evt, direction);
2369
- setValue(valueState);
2370
- onChange(evt, valueState, direction);
2371
- }
2372
- };
2373
- const numberInputClasses = classNames(`${prefix}--number`, className, {
2374
- [`${prefix}--number--light`]: light,
2375
- [`${prefix}--number--helpertext`]: helperText,
2376
- [`${prefix}--number--nolabel`]: hideLabel,
2377
- [`${prefix}--number--nocontrols`]: hideControls,
2378
- });
2379
- const newProps = {
2380
- disabled,
2381
- id,
2382
- max,
2383
- min,
2384
- step,
2385
- onChange: handleChange,
2386
- value: value,
2387
- };
2388
- const useInputProps = props;
2389
- const { inputProps, wrapperProps } = useInput(Object.assign(Object.assign({}, useInputProps), { type: "number" }));
2390
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, wrapperProps, { inputWrapperClassName: numberInputClasses }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--number__controls` }, { children: [jsxRuntimeExports.jsx("button", Object.assign({ className: `${prefix}--number__control-btn up-icon`, type: "button", disabled: disabled, onClick: (evt) => handleArrowClick(evt, "up") }, { children: "+" })), jsxRuntimeExports.jsx("button", Object.assign({ className: `${prefix}--number__control-btn down-icon`, type: "button", disabled: disabled, onClick: (evt) => handleArrowClick(evt, "down") }, { children: "\u2212" })), jsxRuntimeExports.jsx("input", Object.assign({ pattern: pattern }, inputProps, newProps, { ref: ref }))] })) })));
2391
- });
2392
- NumberInput.displayName = "NumberInput";
2393
-
2394
- /** The select component allows users to choose one option from a list. It is used in forms for users to submit data. */
2395
- const Select = React.forwardRef((props, ref) => {
2396
- const { className, inline, disabled, children, iconDescription, light, hideLabel, } = props;
2397
- const { prefix } = useSettings();
2398
- const selectClasses = classNames({
2399
- [`${prefix}--select-input`]: true,
2400
- [`${prefix}--select--inline`]: inline,
2401
- [`${prefix}--select--light`]: light,
2402
- // [`${prefix}--select--invalid`]: invalid,
2403
- [`${prefix}--select--disabled`]: disabled,
2404
- }, className);
2405
- /*const ariaProps = {};
2406
- if (invalid) {
2407
- //TODO: check if correct
2408
- ariaProps['aria-describedby'] = usedId;
2409
- }*/
2410
- const useInputProps = props;
2411
- const { inputProps, wrapperProps } = useInput(Object.assign(Object.assign({}, useInputProps), { inputClassName: selectClasses }));
2412
- return (jsxRuntimeExports.jsxs(Input, Object.assign({}, wrapperProps, { inputWrapperClassName: `${prefix}--select`, hideLabel: hideLabel }, { children: [jsxRuntimeExports.jsx("select", Object.assign({}, inputProps, {
2413
- /*disabled={disabled || undefined}
2414
- data-invalid={invalid || undefined}
2415
- aria-invalid={invalid || undefined} */
2416
- ref: ref }, { children: children })), jsxRuntimeExports.jsx(ChevronDown, { className: `${prefix}--select__arrow`, description: iconDescription })] })));
2417
- });
2418
- Select.displayName = "Select";
2419
-
2420
- function SelectItem(_a) {
2421
- var { className, value, disabled, hidden, text } = _a, other = __rest(_a, ["className", "value", "disabled", "hidden", "text"]);
2422
- const { prefix } = useSettings();
2423
- const selectItemClasses = classNames({
2424
- [`${prefix}--select-option`]: true,
2425
- [`${className}`]: className,
2426
- });
2427
- return (jsxRuntimeExports.jsx("option", Object.assign({}, other, { className: selectItemClasses, value: value, disabled: disabled, hidden: hidden }, { children: text })));
2428
- }
2429
- SelectItem.displayName = "SelectItem";
2430
-
2431
- let instanceId = 0;
2432
- const Pagination = (props) => {
2433
- const { backwardText = "Backward", className, forwardText = "Forward", id, itemsPerPageText = "Items per page:", itemsPerPageFollowsText, itemRangeText = (min, max, total) => `${min}-${max} of ${total} items`, pageRangeText = (current, total) => `${current} of ${total} pages`, pageSize, //eslint-disable-line
2434
- pageSizesDisabled, pageSizes, itemText = (min, max) => `${min}-${max} items`, pageText = (page) => `page ${page}`, pageNumberText = "Page Number", //eslint-disable-line
2435
- pagesUnknown = false, isLastPage = false, pageInputDisabled = false, totalItems, onChange, page: pageNumber = 1 } = props, other = __rest(props, ["backwardText", "className", "forwardText", "id", "itemsPerPageText", "itemsPerPageFollowsText", "itemRangeText", "pageRangeText", "pageSize", "pageSizesDisabled", "pageSizes", "itemText", "pageText", "pageNumberText", "pagesUnknown", "isLastPage", "pageInputDisabled", "totalItems", "onChange", "page"]);
2436
- const [page, setPage] = useState(pageNumber);
2437
- const [pageSizeState, setPageSize] = useState(props.pageSize ? props.pageSize : pageSizes[0]);
2438
- const uniqueId = useState(() => ++instanceId)[0];
2439
- const handleSizeChange = (evt) => {
2440
- const pageSize = Number(evt.target.value);
2441
- setPage(1);
2442
- setPageSize(pageSize);
2443
- onChange === null || onChange === void 0 ? void 0 : onChange({ page: 1, pageSize });
2444
- };
2445
- // const handlePageChange = (evt: ChangeEvent<HTMLSelectElement>) => {
2446
- // setPage(Number(evt.target.value));
2447
- // };
2448
- const handlePageInputChange = (evt) => {
2449
- const page = Number(evt.target.value);
2450
- if (page > 0 &&
2451
- page <= Math.max(Math.ceil(totalItems / pageSizeState), 1)) {
2452
- setPage(page);
2453
- onChange === null || onChange === void 0 ? void 0 : onChange({ page, pageSize: pageSizeState });
2454
- }
2455
- };
2456
- const incrementPage = () => {
2457
- const newPage = page + 1;
2458
- setPage(newPage);
2459
- onChange === null || onChange === void 0 ? void 0 : onChange({ page: newPage, pageSize: pageSizeState });
2460
- };
2461
- const decrementPage = () => {
2462
- const newPage = page - 1;
2463
- setPage(newPage);
2464
- onChange === null || onChange === void 0 ? void 0 : onChange({ page: newPage, pageSize: pageSizeState });
2465
- };
2466
- const renderSelectItems = (total) => {
2467
- let counter = 1;
2468
- const itemArr = [];
2469
- while (counter <= total) {
2470
- itemArr.push(jsxRuntimeExports.jsx(SelectItem, { value: counter, text: String(counter) }, counter));
2471
- counter++;
2472
- }
2473
- return itemArr;
2474
- };
2475
- const classNames$1 = classNames("wfp--pagination", className);
2476
- const backButtonClasses = classNames("wfp--pagination__button", "wfp--pagination__button--backward", {
2477
- "wfp--pagination__button--no-index": pageInputDisabled,
2478
- });
2479
- const inputId = id || uniqueId;
2480
- const totalPages = Math.max(Math.ceil(totalItems / pageSizeState), 1);
2481
- const selectItems = renderSelectItems(totalPages);
2482
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classNames$1 }, other, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: "wfp--pagination__left" }, { children: [!pageSizesDisabled && (jsxRuntimeExports.jsxs(React__default.Fragment, { children: [jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--pagination__text" }, { children: itemsPerPageFollowsText || itemsPerPageText })), jsxRuntimeExports.jsx(Select, Object.assign({ id: `wfp-pagination-select-${inputId}`, labelText: itemsPerPageText, hideLabel: true, inline: true, onChange: handleSizeChange, value: pageSizeState }, { children: pageSizes.map((size) => (jsxRuntimeExports.jsx(SelectItem, { value: size, text: String(size) }, size))) })), jsxRuntimeExports.jsxs("span", Object.assign({ className: "wfp--pagination__text" }, { children: [" ", "\u00A0\u00A0|\u00A0\u00A0"] }))] })), jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--pagination__text" }, { children: pagesUnknown
2483
- ? itemText(pageSizeState * (page - 1) + 1, page * pageSizeState)
2484
- : itemRangeText(Math.min(pageSizeState * (page - 1) + 1, totalItems), Math.min(page * pageSizeState, totalItems), totalItems) }))] })), jsxRuntimeExports.jsxs("div", Object.assign({ className: "wfp--pagination__right wfp--pagination--inline" }, { children: [jsxRuntimeExports.jsx("span", Object.assign({ className: "wfp--pagination__text" }, { children: pagesUnknown ? pageText(page) : pageRangeText(page, totalPages) })), jsxRuntimeExports.jsx("button", Object.assign({ className: backButtonClasses, onClick: decrementPage, disabled: props.disabled || page === 1 }, { children: jsxRuntimeExports.jsx(ChevronLeft, { className: "wfp--pagination__button-icon", description: backwardText }) })), pageInputDisabled ? null : (jsxRuntimeExports.jsx(Select, Object.assign({ id: `wfp-pagination-select-${+inputId + 2}`, labelText: itemsPerPageText, hideLabel: true, inline: true, onChange: handlePageInputChange, value: page }, { children: selectItems }))), jsxRuntimeExports.jsx("button", Object.assign({ className: "wfp--pagination__button wfp--pagination__button--forward", onClick: incrementPage, disabled: props.disabled || page === totalPages || isLastPage }, { children: jsxRuntimeExports.jsx(ChevronRight, { className: "wfp--pagination__button-icon", description: forwardText }) }))] }))] })));
2485
- };
2486
- Pagination.displayName = "Pagination";
2487
-
2488
- let lastId = 0;
2489
- function uniqueId(prefix = 'id') {
2490
- lastId++;
2491
- return `${prefix}${lastId}`;
2492
- }
2493
-
2494
- const RadioButton = React.forwardRef((props, ref) => {
2495
- const { labelText, id, className, value, name, onChange } = props, other = __rest(props, ["labelText", "id", "className", "value", "name", "onChange"]);
2496
- const [uid] = useState(id || uniqueId());
2497
- const { prefix } = useSettings();
2498
- const wrapperClasses = classNames("radioButtonWrapper", className);
2499
- const handleOnChange = (evt) => {
2500
- onChange === null || onChange === void 0 ? void 0 : onChange(evt, value, name);
2501
- };
2502
- const handleChange = onChange
2503
- ? {
2504
- onChange: handleOnChange,
2505
- }
2506
- : {};
2507
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: wrapperClasses }, { children: [jsxRuntimeExports.jsx("input", Object.assign({}, other, { ref: ref, type: "radio", className: `${prefix}--radio-button` }, handleChange, { id: uid, value: value, name: name, checked: props.checked, defaultChecked: props.defaultChecked, disabled: props.disabled })), jsxRuntimeExports.jsxs("label", Object.assign({ htmlFor: uid, className: `${prefix}--radio-button__label` }, { children: [jsxRuntimeExports.jsx("span", { className: `${prefix}--radio-button__appearance` }), labelText] }))] })));
2508
- });
2509
- RadioButton.displayName = "RadioButton";
2510
-
2511
- /*InputGroup.defaultProps = {
2512
- onChange: () => {},
2513
- controlled: false,
2514
- };*/
2515
- const InputGroup = (props) => {
2516
- const { prefix } = useSettings();
2517
- const { children,
2518
- //disabled,
2519
- labelText, helperText,
2520
- //controlled,
2521
- vertical, hideLabel, className = `${prefix}--input-group`, wrapperClassName, valueSelected, defaultSelected, } = props;
2522
- const [prevValueSelected, setPrevValueSelected] = useState(valueSelected || defaultSelected);
2523
- //const [selected, setSelected] = useState();
2524
- useEffect(() => {
2525
- if (valueSelected !== prevValueSelected) {
2526
- setPrevValueSelected(valueSelected);
2527
- //TODO: setSelected(valueSelected || defaultSelected);
2528
- }
2529
- }, [valueSelected, defaultSelected]);
2530
- const labelClasses = classNames(`${prefix}--label`, {
2531
- [`${prefix}--visually-hidden`]: hideLabel,
2532
- });
2533
- const wrapperClasses = classNames(`${prefix}--form-item`, {
2534
- [`${prefix}--input-group__vertical`]: vertical,
2535
- wrapperClassName,
2536
- });
2537
- const label = labelText ? (jsxRuntimeExports.jsx("span", Object.assign({ className: labelClasses }, { children: labelText }))) : null;
2538
- const helper = helperText ? (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--form__helper-text` }, { children: helperText }))) : null;
2539
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: wrapperClasses }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: className }, { children: [label, helper, jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--input-group-inside` }, { children: /*controlled ? getRadioButtons() : */ children }))] })) })));
2540
- };
2541
- InputGroup.displayName = 'InputGroup';
2542
-
2543
- const MoreLink = ({ handleToggleClick, link, text, showMore, contentId }) => {
2544
- const { prefix } = useSettings();
2545
- const ariaProps = {
2546
- "aria-expanded": showMore,
2547
- "aria-controls": contentId,
2548
- };
2549
- if (link) {
2550
- const clonedLink = React__default.cloneElement(link, Object.assign({ onClick: handleToggleClick }, ariaProps));
2551
- return clonedLink;
2552
- }
2553
- else {
2554
- const Icon = ChevronUp;
2555
- const classes = classNames({
2556
- [`${prefix}--read-more__trigger`]: true,
2557
- [`${prefix}--read-more__trigger--expanded`]: showMore,
2558
- });
2559
- return (jsxRuntimeExports.jsxs(Link, Object.assign({ className: classes, size: "sm", onClick: handleToggleClick }, ariaProps, { children: [text, jsxRuntimeExports.jsx(Icon, { width: "10", height: "10", description: showMore ? "icon up" : "icon down" })] })));
2560
- }
2561
- };
2562
- /** ReadMore component is a simple way to keep longer content from cluttering up your page, giving you more control over how much content is displayed to visitor */
2563
- function ReadMore({ collapseLink, collapseText = "Show less", children, collapsed, className, disableAutoscroll, expandLink, expandText = "Show more", fade, maxHeight, }) {
2564
- const { prefix } = useSettings();
2565
- const [showMore, setShowMore] = useState(false);
2566
- const [innerHeight, setInnerHeight] = useState(0);
2567
- const readMoreRef = useRef(null);
2568
- const readMoreFakeRef = useRef(null);
2569
- const internalId = _useId();
2570
- // Generate a unique ID for the content container
2571
- const contentId = `${internalId}-read-more-content`;
2572
- const handleToggleClick = (e) => {
2573
- var _a;
2574
- e.preventDefault();
2575
- const innerHeight = (_a = readMoreRef === null || readMoreRef === void 0 ? void 0 : readMoreRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
2576
- if (!showMore && !disableAutoscroll)
2577
- setTimeout(() => {
2578
- if (readMoreFakeRef === null || readMoreFakeRef === void 0 ? void 0 : readMoreFakeRef.current)
2579
- readMoreFakeRef.current.scrollIntoView({
2580
- behavior: "smooth",
2581
- block: "end",
2582
- });
2583
- }, 50);
2584
- setShowMore(!showMore);
2585
- if (innerHeight) {
2586
- setInnerHeight(innerHeight);
2587
- }
2588
- };
2589
- const classes = classNames(className, {
2590
- [`${prefix}--read-more`]: true,
2591
- [`${prefix}--read-more--expanded`]: showMore,
2592
- [`${prefix}--read-more--fade`]: fade,
2593
- [`${prefix}--read-more--max-height`]: maxHeight,
2594
- });
2595
- const contentStyle = !maxHeight
2596
- ? {
2597
- undefined,
2598
- }
2599
- : maxHeight && !showMore
2600
- ? {
2601
- maxHeight: maxHeight,
2602
- }
2603
- : {
2604
- maxHeight: innerHeight + 20,
2605
- };
2606
- const collapseStyle = showMore
2607
- ? {
2608
- display: "none",
2609
- }
2610
- : {
2611
- display: "block",
2612
- };
2613
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, { children: [jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--read-more__content`, style: contentStyle, id: contentId }, { children: [jsxRuntimeExports.jsx("div", { className: `${prefix}--read-more__fake-height`, ref: readMoreFakeRef, style: { height: `${innerHeight + 30}px` } }), jsxRuntimeExports.jsxs("div", Object.assign({ ref: readMoreRef }, { children: [(showMore || !collapsed) && children, collapsed && jsxRuntimeExports.jsx("div", Object.assign({ style: collapseStyle }, { children: collapsed }))] }))] })), jsxRuntimeExports.jsx(MoreLink, { handleToggleClick: handleToggleClick, showMore: showMore, link: showMore ? collapseLink : expandLink, text: showMore ? collapseText : expandText, contentId: contentId })] })));
2614
- }
2615
- ReadMore.displayName = "ReadMore";
2616
-
2617
- function SecondaryNavigation(_a) {
2618
- var { additional, children, className, id, pageWidth } = _a, other = __rest(_a, ["additional", "children", "className", "id", "pageWidth"]);
2619
- const { prefix } = useSettings();
2620
- const wrapperClasses = classNames(`${prefix}--secondary-navigation`, className);
2621
- return (jsxRuntimeExports.jsx("div", Object.assign({ id: id, className: wrapperClasses }, other, { children: jsxRuntimeExports.jsxs(Wrapper, Object.assign({ pageWidth: pageWidth, className: `${prefix}--secondary-navigation__wrapper` }, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--secondary-navigation__list` }, { children: children })), additional && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--secondary-navigation__additional` }, { children: additional })))] })) })));
2622
- }
2623
- SecondaryNavigation.displayName = "SecondaryNavigation";
2624
-
2625
- function SecondaryNavigationTitle({ className, children, }) {
2626
- const { prefix } = useSettings();
2627
- const wrapperClasses = classNames(`${prefix}--secondary-navigation__title`, className);
2628
- return jsxRuntimeExports.jsx("h1", Object.assign({ className: wrapperClasses }, { children: children }));
2629
- }
2630
- SecondaryNavigationTitle.displayName = "SecondaryNavigationTitle";
2631
-
2632
- function StepNavigation({ inline, small, vertical, className, role, children, }) {
2633
- const { prefix } = useSettings();
2634
- const [dropdownHidden] = useState(true);
2635
- // const [elRefs, setElRefs] = useState({});
2636
- /*const getTabAt = (index) => {
2637
- return elRefs[`tab${index}`] || React.Children.toArray(children)[index];
2638
- };
2639
- */
2640
- const getTabs = () => {
2641
- return React__default.Children.map(children, (tab) => tab);
2642
- };
2643
- const tabsWithProps = getTabs(); /* TODO: Use hook ?.map(
2644
- (tab: React.ReactElement<any>, index: number) => {
2645
- const newTab = React.cloneElement(tab as React.ReactElement<any>, {
2646
- index,
2647
- selectedPage: selectedPage,
2648
- handleTabClick: handleTabClick(onSelectionChange),
2649
- handleTabAnchorFocus: handleTabAnchorFocus(onSelectionChange),
2650
- ref: elRefs[index],
2651
- });
2652
-
2653
- return newTab;
2654
- }
2655
- );*/
2656
- const classes = {
2657
- tabs: classNames(className, {
2658
- [`${prefix}--step-navigation`]: true,
2659
- [`${prefix}--step-navigation--vertical`]: vertical,
2660
- [`${prefix}--step-navigation--small`]: small,
2661
- [`${prefix}--step-navigation--regular`]: !small,
2662
- }),
2663
- tablist: classNames(`${prefix}--step-navigation__nav`, {
2664
- [`${prefix}--step-navigation__nav--hidden`]: dropdownHidden,
2665
- [`${prefix}--step-navigation__nav--inline`]: inline,
2666
- }),
2667
- };
2668
- return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx("nav", Object.assign({ className: classes.tabs, role: role }, { children: jsxRuntimeExports.jsx("ul", Object.assign({ role: "tablist", className: classes.tablist }, { children: tabsWithProps })) })) }));
2669
- }
2670
-
2671
- const StepNavigationItem = ({ className, handleTabClick = () => { }, index, label, status, helperText, selectedPage = 0, onClick = () => { }, page = 0, renderAnchor, }) => {
2672
- var _a;
2673
- const { prefix } = useSettings();
2674
- const classes = classNames(`${prefix}--step-navigation__nav-item`, { [`${prefix}--step-navigation__nav-item--before`]: page < selectedPage }, {
2675
- [`${prefix}--step-navigation__nav-item--selected`]: page === selectedPage,
2676
- }, { [`${prefix}--step-navigation__nav-item--${status}`]: status }, className);
2677
- const anchorProps = {
2678
- className: `${prefix}--step-navigation__nav-link`,
2679
- /*ref: (e) => {
2680
- this.tabAnchor = e;
2681
- },*/
2682
- };
2683
- const icon = {
2684
- "not-started": { icon: Ellipsis },
2685
- warning: { icon: WarningOutline },
2686
- locked: { icon: Locked },
2687
- skip: { icon: OverflowMenu },
2688
- disabled: { icon: Error$1 },
2689
- complete: { icon: Checkmark },
2690
- summary: { icon: Menu },
2691
- };
2692
- const Icon = status ? (_a = icon[status]) === null || _a === void 0 ? void 0 : _a.icon : null;
2693
- return (jsxRuntimeExports.jsx("li", Object.assign({ tabIndex: -1, className: classes, onClick: (evt) => {
2694
- if (status !== "locked") {
2695
- handleTabClick(evt, index, label);
2696
- onClick(evt);
2697
- }
2698
- }, role: "presentation" }, { children: jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: renderAnchor ? (renderAnchor(anchorProps)) : (jsxRuntimeExports.jsxs(React.Fragment, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--step-navigation__nav-item__indicator` }, { children: status && page !== selectedPage ? (jsxRuntimeExports.jsx(Icon, { width: "14", height: "14", description: "Step Item" })) : (jsxRuntimeExports.jsx("span", { children: page + 1 })) })), jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--step-navigation__nav-item__text` }, { children: label })), helperText && (jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--step-navigation__nav-item__helper-text` }, { children: helperText })))] })] })) }) })));
2699
- };
2700
-
2701
- function SelectItemGroup(_a) {
2702
- var { children, className, disabled, label } = _a, other = __rest(_a, ["children", "className", "disabled", "label"]);
2703
- const { prefix } = useSettings();
2704
- const classes = classNames(`${prefix}--select-optgroup`, className);
2705
- return (jsxRuntimeExports.jsx("optgroup", Object.assign({ className: classes, label: label, disabled: disabled }, other, { children: children })));
2706
- }
2707
-
2708
- const Sidebar = (_a) => {
2709
- var { active, children, className,
2710
- // sidebarMobileHeader,
2711
- sidebar } = _a, other = __rest(_a, ["active", "children", "className", "sidebar"]);
2712
- const { prefix } = useSettings();
2713
- const classes = classNames(`${prefix}--sidebar-content__container`, className, {
2714
- [`${prefix}--sidebar-content__container--active`]: active,
2715
- });
2716
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--sidebar-item-content` }, { children: sidebar })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--content-section` }, { children: children }))] })));
2717
- };
2718
- const SidebarHeader = (_a) => {
2719
- var { className, children, noPadding } = _a, other = __rest(_a, ["className", "children", "noPadding"]);
2720
- const { prefix } = useSettings();
2721
- const classes = classNames(`${prefix}--sidebar-content__header`, className, {
2722
- [`${prefix}--sidebar-content__header--no-padding`]: noPadding,
2723
- });
2724
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classes }, other, { children: children })));
2725
- };
2726
- const SidebarContentHeader = (_a) => {
2727
- var { className, children } = _a, other = __rest(_a, ["className", "children"]);
2728
- const { prefix } = useSettings();
2729
- const mobileClasses = classNames(`${prefix}--sidebar-content-mobile-header`, className, {});
2730
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: mobileClasses }, other, { children: children })));
2731
- };
2732
- const SidebarContentBody = (_a) => {
2733
- var { className, children } = _a, other = __rest(_a, ["className", "children"]);
2734
- const { prefix } = useSettings();
2735
- const classes = classNames(`${prefix}--sidebar-content__children`, className, {});
2736
- return (jsxRuntimeExports.jsx("div", Object.assign({ id: "scroll-container", className: classes }, other, { children: children })));
2737
- };
2738
- const SidebarScroll = (_a) => {
2739
- var { children } = _a, other = __rest(_a, ["children"]);
2740
- const { prefix } = useSettings();
2741
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--sidebar-content__scroll` }, other, { children: children })));
2742
- };
2743
- const SidebarBackButton = (_a) => {
2744
- var { children } = _a, other = __rest(_a, ["children"]);
2745
- const { prefix } = useSettings();
2746
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--sidebar-content__back-button` }, other, { children: [jsxRuntimeExports.jsx(ChevronLeft, {}), children] })));
2747
- };
2748
-
2749
- const TextInput = React.forwardRef((props, ref) => {
2750
- const {
2751
- //className,
2752
- //formItemClassName,
2753
- hideLabel, helperText, pattern, required, } = props;
2754
- const { prefix } = useSettings();
2755
- const inputClassName = classNames(`${prefix}--input`, `${prefix}--text-input`,
2756
- //className,
2757
- {
2758
- [`${prefix}--text--helpertext`]: helperText,
2759
- [`${prefix}--text--nolabel`]: hideLabel,
2760
- [`${prefix}--text--required`]: required,
2761
- });
2762
- const useInputProps = props;
2763
- const { inputProps, wrapperProps } = useInput(Object.assign(Object.assign({}, useInputProps), { inputClassName }));
2764
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, wrapperProps, { children: jsxRuntimeExports.jsx("input", Object.assign({ pattern: pattern }, inputProps, { ref: ref })) })));
2765
- });
2766
- TextInput.displayName = "TextInput";
2767
-
2768
- const defaultFormatLabel = (value, label) => {
2769
- return typeof label === "function"
2770
- ? label(value)
2771
- : `${value}${label ? label : ""}`;
2772
- };
2773
- function calculatePercentage(value, min, max) {
2774
- // Ensure the values are in the correct range
2775
- if (max <= min) {
2776
- return;
2777
- }
2778
- if (value < min)
2779
- value = min;
2780
- if (value > max)
2781
- value = max;
2782
- // Calculate the percentage
2783
- return ((value - min) / (max - min)) * 100;
2784
- }
2785
- const Slider = React.forwardRef((props, ref) => {
2786
- const { ariaLabelInput, className, disabled, formatLabel = defaultFormatLabel, fullWidth, id, inputType, hideLabel, hideControls, hideTextInput, min, minLabel, max, maxLabel, step = 1,
2787
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2788
- onChange = () => { },
2789
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2790
- //onClick = () => {},
2791
- helperText } = props, other = __rest(props, ["ariaLabelInput", "className", "disabled", "formatLabel", "fullWidth", "id", "inputType", "hideLabel", "hideControls", "hideTextInput", "min", "minLabel", "max", "maxLabel", "step", "onChange", "helperText"]);
2792
- const { prefix } = useSettings();
2793
- const initialValue = props.value;
2794
- const [value, setValue] = React.useState(initialValue);
2795
- React.useEffect(() => {
2796
- setValue(props.value);
2797
- }, [props.value]);
2798
- const newInputRef = React.useRef(null);
2799
- const _inputRef = ref ? ref : newInputRef;
2800
- const handleChange = (evt) => {
2801
- if (!disabled) {
2802
- evt.persist();
2803
- evt.imaginaryTarget = _inputRef;
2804
- if (evt.target.value > max) {
2805
- setValue(max);
2806
- onChange(/*max, */ evt);
2807
- } /* else if (evt.target.value < min) {
2808
- setValue(evt.target.value);
2809
- onChange(parseFloat(min), evt);
2810
- }*/
2811
- else {
2812
- setValue(evt.target.value);
2813
- onChange(/*parseFloat(evt.target.value), */ evt);
2814
- }
2815
- }
2816
- };
2817
- const numberInputClasses = classNames(`${prefix}--slider--wrapper`, className, {
2818
- [`${prefix}--slider--helpertext`]: helperText,
2819
- [`${prefix}--slider--nolabel`]: hideLabel,
2820
- [`${prefix}--slider--nocontrols`]: hideControls,
2821
- });
2822
- const sliderContainerClasses = classNames(`${prefix}--slider-container`, {
2823
- [`${prefix}--slider-container--full-width`]: fullWidth,
2824
- });
2825
- const newProps = {
2826
- disabled,
2827
- id,
2828
- max,
2829
- min,
2830
- step,
2831
- onChange: handleChange,
2832
- value: value,
2833
- };
2834
- const inputClasses = classNames(`${prefix}--input`, `${prefix}--slider-text-input`);
2835
- const sliderClasses = classNames(`${prefix}--slider`, { [`${prefix}--slider--disabled`]: disabled }, className);
2836
- const sliderRangeWrapperClasses = classNames(`${prefix}--slider__range-wrapper`, { [`${prefix}--slider__range-wrapper--disabled`]: disabled }, className);
2837
- const valueMinimal = value && value < min ? min : value;
2838
- const useInputProps = props;
2839
- const input = useInput(useInputProps);
2840
- console.log("valueMinimal", valueMinimal);
2841
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, input.wrapperProps, { formItemClassName: numberInputClasses }, { children: jsxRuntimeExports.jsxs("div", Object.assign({ className: sliderContainerClasses }, { children: [jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--slider__range-label` }, { children: formatLabel(min, minLabel) })), jsxRuntimeExports.jsxs("div", Object.assign({ className: sliderRangeWrapperClasses }, { children: [jsxRuntimeExports.jsx("div", { className: `${prefix}--slider__range-before`, style: {
2842
- width: `${calculatePercentage(valueMinimal, min, max)}%`,
2843
- } }), jsxRuntimeExports.jsx("input", Object.assign({ className: sliderClasses, type: "range" }, other, newProps, { ref: _inputRef }))] })), jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--slider__range-label` }, { children: formatLabel(max, maxLabel) })), !hideTextInput && (jsxRuntimeExports.jsx(TextInput, { disabled: disabled, type: inputType, id: "input-for-slider", className: inputClasses, value: value, onChange: handleChange, "aria-label": ariaLabelInput }))] })) })));
2844
- });
2845
- Slider.displayName = "Slider";
2846
-
2847
- /** The item component to show entries inside a list, like a sidebar or an overview page. */
2848
- const Item = React.forwardRef((_a, ref) => {
2849
- var { active, additional, children, className, subContent, image, hint, noImage, unread, showAdditionalIcon, title, kind = "large", wrapper = "none" } = _a, other = __rest(_a, ["active", "additional", "children", "className", "subContent", "image", "hint", "noImage", "unread", "showAdditionalIcon", "title", "kind", "wrapper"]);
2850
- const { prefix } = useSettings();
2851
- const classes = classNames({
2852
- [`${prefix}--item`]: true,
2853
- [`${prefix}--item--${kind}`]: kind,
2854
- [`${prefix}--item--${wrapper}`]: wrapper,
2855
- [`${prefix}--item--active`]: active,
2856
- [`${prefix}--item--unread`]: unread,
2857
- }, className);
2858
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { ref: ref }, { children: [image ? (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--item__image` }, { children: image }))) : noImage ? (jsxRuntimeExports.jsx("div", { className: `${prefix}--item__image ${prefix}--item__image-empty` })) : null, title && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--item__title-wrapper` }, { children: jsxRuntimeExports.jsx("h2", Object.assign({ className: `${prefix}--item__title` }, { children: title })) }))), additional && (jsxRuntimeExports.jsxs("div", Object.assign({ className: `${prefix}--item__additional` }, { children: [additional, showAdditionalIcon && (jsxRuntimeExports.jsx(ChevronRight, { className: `${prefix}--item__additional-icon` }))] }))), children && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--item__text` }, { children: children }))), subContent && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--item__sub-content` }, { children: subContent }))), hint && jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--item__hint` }, { children: hint })), unread && jsxRuntimeExports.jsx("div", { className: `${prefix}--item__unread` })] })));
2859
- });
2860
- Item.displayName = "Item";
2861
-
2862
- const ReactTablePagination = ({
2863
- // Computed
2864
- data, page, pageSizeOptions, paginationClassName, totalItems, style, onPageChange, onPageSizeChange,
2865
- // Props
2866
- isLastPage, pages,
2867
- // showPageSizeOptions,
2868
- pageInputDisabled, pageSize, pagesUnknown, backwardText, forwardText, itemsPerPageText, itemsPerPageFollowsText, itemRangeText, pageRangeText, pageSizesDisabled, itemText, pageNumberText, }) => {
2869
- const { prefix } = useSettings();
2870
- const getSafePage = (newPage) => {
2871
- if (isNaN(newPage)) {
2872
- newPage = page;
2873
- }
2874
- return newPage;
2875
- };
2876
- const changePage = (page) => {
2877
- const nextPage = getSafePage(page.page - 1);
2878
- // Update Page
2879
- if (page !== nextPage) {
2880
- onPageChange(nextPage);
2881
- }
2882
- // Update PageSize
2883
- if (pageSize !== page.pageSize) {
2884
- onPageSizeChange(page.pageSize);
2885
- }
2886
- };
2887
- const propList = {
2888
- isLastPage,
2889
- pages,
2890
- //showPageSizeOptions,
2891
- pageInputDisabled,
2892
- pageSize,
2893
- pagesUnknown,
2894
- backwardText,
2895
- forwardText,
2896
- itemsPerPageText,
2897
- itemsPerPageFollowsText,
2898
- itemRangeText,
2899
- pageRangeText,
2900
- pageSizesDisabled,
2901
- itemText,
2902
- pageNumberText,
2903
- };
2904
- return (jsxRuntimeExports.jsx("div", Object.assign({ className: classNames(paginationClassName, '-pagination'), style: style }, { children: jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}-pagination` }, { children: jsxRuntimeExports.jsx(Pagination, Object.assign({ onChange: changePage, pageSizes: pageSizeOptions, page: page, totalItems: totalItems ? totalItems : data ? data.length : undefined }, propList)) })) })));
2905
- };
2906
- ReactTablePagination.displayName = 'ReactTablePagination';
2907
-
2908
- function useTab(props) {
2909
- const { prefix } = useSettings();
2910
- const { className, disabled, handleTabClick = () => { }, // eslint-disable-line
2911
- handleTabAnchorFocus = () => { }, // eslint-disable-line
2912
- handleTabKeyDown = () => { }, // eslint-disable-line
2913
- href, index = 0, label, selected, tabIndex, onClick = () => { }, // eslint-disable-line
2914
- onKeyDown = () => { } } = props, // eslint-disable-line
2915
- //renderAnchor,
2916
- //renderListElement,
2917
- other = __rest(props, ["className", "disabled", "handleTabClick", "handleTabAnchorFocus", "handleTabKeyDown", "href", "index", "label", "selected", "tabIndex", "onClick", "onKeyDown"]);
2918
- const setTabFocus = (evt) => {
2919
- const leftKey = 37;
2920
- const rightKey = 39;
2921
- if (evt.which === leftKey && handleTabAnchorFocus) {
2922
- handleTabAnchorFocus(index - 1);
2923
- }
2924
- else if (evt.which === rightKey && handleTabAnchorFocus) {
2925
- handleTabAnchorFocus(index + 1);
2926
- }
2927
- else {
2928
- return;
2929
- }
2930
- };
2931
- const classes = classNames(`${prefix}--tabs__nav-item`, { [`${prefix}--tabs__nav-item--disabled`]: disabled }, { [`${prefix}--tabs__nav-item--selected`]: selected }, className);
2932
- const selectedClasses = classNames(`${prefix}--tabs__nav-item`, `${prefix}--tabs__nav-item--selected`, className);
2933
- const anchorProps = {
2934
- className: 'wfp--tabs__nav-link',
2935
- href: disabled ? undefined : href,
2936
- label,
2937
- role: 'tab',
2938
- tabIndex,
2939
- 'aria-selected': selected,
2940
- // ref: (e) => {
2941
- // tabAnchor = e;
2942
- // },
2943
- };
2944
- // {...other}
2945
- const liProps = Object.assign({ tabIndex: -1, className: classes, onClick: (evt) => {
2946
- if (!disabled) {
2947
- handleTabClick(index, label, evt);
2948
- onClick(evt);
2949
- }
2950
- }, onKeyDown: (evt) => {
2951
- if (!disabled) {
2952
- setTabFocus(evt);
2953
- handleTabKeyDown(index, label, evt);
2954
- onKeyDown(evt);
2955
- }
2956
- }, role: 'presentation', selected: selected }, other);
2957
- return {
2958
- liProps,
2959
- anchorProps,
2960
- selectedClasses,
2961
- };
2962
- }
2963
-
2964
- /** Tab to be used inside the Tabs component */
2965
- const Tab = (props) => {
2966
- // const { prefix } = useSettings();
2967
- const {
2968
- // className,
2969
- disabled,
2970
- // handleTabClick = () => {},
2971
- // handleTabAnchorFocus = () => {}, // eslint-disable-line
2972
- // handleTabKeyDown = () => {},
2973
- // href,
2974
- // index = 0,
2975
- label,
2976
- // selected,
2977
- // tabIndex,
2978
- /// onClick = () => {},
2979
- // onKeyDown = () => {},
2980
- renderAnchor, renderListElement,
2981
- // ...other
2982
- } = props;
2983
- const { anchorProps, liProps, selectedClasses } = useTab(props);
2984
- return (jsxRuntimeExports.jsx(React.Fragment, { children: renderListElement ? (typeof renderListElement === "function" ? (renderListElement(Object.assign(Object.assign(Object.assign({}, props), liProps), { anchor: anchorProps, selectedClasses: selectedClasses }))) : (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: renderListElement }))) : (jsxRuntimeExports.jsx("li", Object.assign({}, liProps, { children: renderAnchor ? (renderAnchor(anchorProps)) : disabled ? (jsxRuntimeExports.jsx("span", Object.assign({}, anchorProps, { children: label }))) : (jsxRuntimeExports.jsx("a", Object.assign({}, anchorProps, { children: label }))) }))) }));
2985
- };
2986
-
2987
- const TabContent = (props) => {
2988
- const { selected = false, children } = props, other = __rest(props, ["selected", "children"]);
2989
- return (jsxRuntimeExports.jsx("div", Object.assign({}, other, { "data-selected": selected, hidden: !selected }, { children: children })));
2990
- };
2991
- TabContent.displayName = 'TabContent';
2992
-
2993
- /* eslint-disable @typescript-eslint/no-empty-function */
2994
- const TabsContext = React__default.createContext({
2995
- handleTabClick: () => { },
2996
- handleTabKeyDown: () => { },
2997
- handleTabAnchorFocus: () => { },
2998
- });
2999
-
3000
- /** Tabs allow users to navigate easily between views within the same context */
3001
- const Tabs = (props) => {
3002
- const {
3003
- // ariaLabel = 'listbox',
3004
- disableAnimation, inline, className,
3005
- //customTabContent,
3006
- // triggerHref = '#',
3007
- role = "navigation",
3008
- //onSelectionChange,
3009
- selected = null } = props,
3010
- // children,
3011
- other = __rest(props, ["disableAnimation", "inline", "className", "role", "selected"]);
3012
- const { prefix } = useSettings();
3013
- const [currentSelected, setCurrentSelected] = React.useState(selected);
3014
- //const [sizes, setSizes] = useState<boolean>();
3015
- const rootRef = React.useRef(null);
3016
- React.useEffect(() => {
3017
- if (selected !== currentSelected) {
3018
- setCurrentSelected(selected);
3019
- }
3020
- }, [selected]);
3021
- /*useEffect(() => {
3022
- getSizes();
3023
- // eslint-disable-next-line no-undef
3024
- if (window) {
3025
- // eslint-disable-next-line no-undef
3026
- window.addEventListener('resize', getSizes);
3027
- return () => {
3028
- // eslint-disable-next-line no-undef
3029
- window.removeEventListener('resize', getSizes);
3030
- };
3031
- }
3032
- }, []);*/
3033
- const classes = {
3034
- tabs: classNames(`${prefix}--tabs`, { [`${prefix}--tabs--no-animation`]: disableAnimation }, className),
3035
- tablist: classNames(`${prefix}--tabs__nav`, {
3036
- [`${prefix}--tabs__nav--inline`]: inline,
3037
- }),
3038
- };
3039
- /*function getTabs() {
3040
- return React.Children.map(props.children, (tab) => tab);
3041
- }*/
3042
- /*const getTabAt = (index) => {
3043
- return this[`tab${index}`] || React.Children.toArray(props.children)[index];
3044
- };*/
3045
- /*const getSizes = () => {
3046
- if (rootRef.current === null || rootRef.current.length > 1) {
3047
- return null;
3048
- }
3049
- const rootBounds = rootRef.current.getBoundingClientRect();
3050
- const sizes = {};
3051
- Object.values(rootRef.current.children).forEach((el, key) => {
3052
- const bounds = el.children[0].getBoundingClientRect();
3053
-
3054
- const left = bounds.left - rootBounds.left;
3055
- const right = rootBounds.right - bounds.right;
3056
-
3057
- sizes[key] = { left, right };
3058
- });
3059
- setSizes(sizes);
3060
- };
3061
- */
3062
- // const setTabAt = (index, tabRef) => {
3063
- // this[`tab${index}`] = tabRef;
3064
- // };
3065
- // following functions (handle*) are Props on Tab.js, see Tab.js for parameters
3066
- const handleTabClick = ( /*onSelectionChange*/) => {
3067
- return (index, label, evt) => {
3068
- if (evt) {
3069
- evt.preventDefault();
3070
- }
3071
- // selectTabAt(index, onSelectionChange);
3072
- };
3073
- };
3074
- const handleTabKeyDown = ( /*onSelectionChange*/) => {
3075
- return (index, label, evt) => {
3076
- };
3077
- };
3078
- const handleTabAnchorFocus = ( /*onSelectionChange*/) => {
3079
- /* return (index) => {
3080
- const tabCount = React.Children.count(props.children) - 1;
3081
- let tabIndex = index;
3082
-
3083
- if (index < 0) {
3084
- tabIndex = tabCount;
3085
- } else if (index > tabCount) {
3086
- tabIndex = 0;
3087
- }
3088
-
3089
- const tab = getTabAt(tabIndex);
3090
-
3091
- if (tab) {
3092
- selectTabAt(tabIndex, onSelectionChange);
3093
- if (tab.tabAnchor) {
3094
- tab.tabAnchor.focus();
3095
- }
3096
- }
3097
- };*/
3098
- };
3099
- /*const selectTabAt = (index, onSelectionChange) => {
3100
- /* if (currentSelected !== index) {
3101
- setCurrentSelected(index);
3102
- if (typeof onSelectionChange === 'function') {
3103
- onSelectionChange(index);
3104
- }
3105
- }
3106
- };*/
3107
- // const { selected, sizes } = this.state;
3108
- /*const tabsWithProps = getTabs().map((Tab, index) => {
3109
- const newTab = React.cloneElement(Tab, {
3110
- index,
3111
- selected: index === currentSelected,
3112
- handleTabClick: handleTabClick(onSelectionChange),
3113
- handleTabAnchorFocus: handleTabAnchorFocus(onSelectionChange),
3114
- // ref: (e) => {
3115
- // setTabAt(index, e);
3116
- // },
3117
- handleTabKeyDown: handleTabKeyDown(onSelectionChange),
3118
- });
3119
-
3120
- return newTab;
3121
- });
3122
-
3123
- const tabContentWithProps = !customTabContent
3124
- ? React.Children.map(tabsWithProps, (tab) => {
3125
- const { children, selected } = tab.props;
3126
- if (!children) {
3127
- return null;
3128
- }
3129
- return (
3130
- <TabContent
3131
- className={`${prefix}--tab-content`}
3132
- aria-hidden={!selected}
3133
- hidden={!selected}
3134
- selected={selected}>
3135
- {children}
3136
- </TabContent>
3137
- );
3138
- })
3139
- : null;
3140
- */
3141
- //const sizeBar = sizes ? sizes[currentSelected] : undefined;
3142
- return (jsxRuntimeExports.jsx(TabsContext.Provider, Object.assign({ value: { handleTabClick, handleTabKeyDown, handleTabAnchorFocus } }, { children: jsxRuntimeExports.jsxs("nav", Object.assign({}, other, { className: classes.tabs, role: role }, { children: [jsxRuntimeExports.jsx("div", { className: `${prefix}--tabs__nav__bar` }), jsxRuntimeExports.jsx("ul", Object.assign({ ref: rootRef, role: "tablist", className: classes.tablist }, { children: props.children }))] })) })));
3143
- };
3144
- Tabs.displayName = "Tabs";
3145
-
3146
- const TextArea = React.forwardRef((props, ref) => {
3147
- const { className, fullWidth } = props;
3148
- const { prefix } = useSettings();
3149
- const textareaClasses = classNames(`${prefix}--text-area`, className, {
3150
- [`${prefix}--textarea-fullwidth`]: fullWidth,
3151
- });
3152
- const useInputProps = props;
3153
- const input = useInput(Object.assign(Object.assign({}, useInputProps), { inputClassName: textareaClasses }));
3154
- return (jsxRuntimeExports.jsx(Input, Object.assign({}, input.wrapperProps, { children: jsxRuntimeExports.jsx("textarea", Object.assign({}, input.inputProps, { ref: ref })) })));
3155
- });
3156
- TextArea.displayName = 'TextArea';
3157
-
3158
- const Toggle = React.forwardRef((props, ref) => {
3159
- const { className, defaultToggled = false,
3160
- // toggled,
3161
- // onChange,
3162
- // onToggle = () => {},
3163
- id, labelA = "Off", labelB = "On" } = props, other = __rest(props, ["className", "defaultToggled", "id", "labelA", "labelB"]);
3164
- const { prefix } = useSettings();
3165
- // let input;
3166
- const wrapperClasses = classNames({
3167
- [`${prefix}--form-item`]: true,
3168
- }, className);
3169
- // const checkedProps = {};
3170
- // if (typeof toggled !== 'undefined') {
3171
- // checkedProps.checked = toggled;
3172
- // } else {
3173
- // checkedProps.defaultChecked = defaultToggled;
3174
- // }
3175
- const htmlFor = id ? id : other.name;
3176
- const useInputProps = props;
3177
- const input = useInput(useInputProps);
3178
- const otherInputProps = other;
3179
- return (jsxRuntimeExports.jsxs(Input, Object.assign({ className: wrapperClasses }, props, { children: [jsxRuntimeExports.jsx("input", Object.assign({}, otherInputProps, input.inputProps, {
3180
- //checked={toggled}
3181
- defaultChecked: defaultToggled, type: "checkbox", id: htmlFor, className: `${prefix}--toggle`,
3182
- /*onChange={(evt) => {
3183
- onChange && onChange(evt);
3184
- onToggle && onToggle(input.checked, htmlFor, evt);
3185
- }}*/
3186
- ref: ref })), jsxRuntimeExports.jsxs("label", Object.assign({ className: `${prefix}--toggle__label`, htmlFor: htmlFor }, { children: [jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--toggle__text--left` }, { children: labelA })), jsxRuntimeExports.jsx("span", { className: `${prefix}--toggle__appearance` }), jsxRuntimeExports.jsx("span", Object.assign({ className: `${prefix}--toggle__text--right` }, { children: labelB }))] }))] })));
3187
- });
3188
- Toggle.displayName = "Toggle";
3189
-
3190
- /** The User is used inside the MainNavigation and form, and can display an avatar and username. */
3191
- const User = (props) => {
3192
- const { className, children, components = {}, description, ellipsis, extendedDescription, showName, small, name, missingImage } = props, other = __rest(props, ["className", "children", "components", "description", "ellipsis", "extendedDescription", "showName", "small", "name", "missingImage"]);
3193
- const { prefix } = useSettings();
3194
- const defaultComponents = { Avatar };
3195
- const allComponents = Object.assign(Object.assign({}, defaultComponents), components);
3196
- const classes = classNames(`${prefix}--user`, className, {
3197
- [`${prefix}--user--has-description`]: description,
3198
- [`${prefix}--user--has-extended-description`]: extendedDescription,
3199
- });
3200
- const titleClasses = classNames({
3201
- [`${prefix}--user__title`]: true,
3202
- [`${prefix}--user__title--ellipsis`]: ellipsis,
3203
- [`${prefix}--user__title--small`]: small,
3204
- });
3205
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [jsxRuntimeExports.jsx(allComponents.Avatar, Object.assign({}, props, { missingImage: missingImage })), showName && (jsxRuntimeExports.jsxs("span", Object.assign({ className: titleClasses }, { children: [jsxRuntimeExports.jsx("span", { children: name }), description && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--user__description` }, { children: description })))] }))), children, extendedDescription && (jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--user__extended-description` }, { children: extendedDescription })))] })));
3206
- };
3207
-
3208
- const scaleLookup = {
3209
- thousand: {
3210
- pow: 1000,
3211
- defaultmaximumFractionDigits: 2,
3212
- default: { after: 'T' },
3213
- },
3214
- million: {
3215
- pow: 1000000,
3216
- defaultmaximumFractionDigits: 1,
3217
- default: { after: 'M' },
3218
- },
3219
- billion: {
3220
- pow: 1000000000,
3221
- defaultmaximumFractionDigits: 2,
3222
- default: { after: 'B' },
3223
- },
3224
- };
3225
-
3226
- // For invalid Values
3227
- const Invalid = props => {
3228
- return jsxRuntimeExports.jsx("span", Object.assign({ className: props.className + ' invalid' }, { children: "\u2013" }));
3229
- };
3230
- // For invalid Values
3231
- const InvalidSvg = props => {
3232
- return jsxRuntimeExports.jsx("tspan", Object.assign({ className: props.className + ' invalid' }, { children: "\u2013" }));
3233
- };
3234
-
3235
- const StringUnit = value => {
3236
- if (value) {
3237
- const before = value.before ? value.before + ' ' : '';
3238
- const afterOutput = value.output && value.output.default
3239
- ? value.output.default.after + ''
3240
- : '';
3241
- const after = value.after ? ' ' + value.after : '';
3242
- return before + value.value + afterOutput + after;
3243
- }
3244
- else
3245
- return '';
3246
- };
3247
-
3248
- const SvgUnit = (value, props) => {
3249
- const { style } = props, other = __rest(props, ["style"]);
3250
- if (value)
3251
- return (jsxRuntimeExports.jsxs("text", Object.assign({ className: props.className }, other, { children: [jsxRuntimeExports.jsxs("tspan", Object.assign({ style: style }, { children: [value.before, " "] })), jsxRuntimeExports.jsx("tspan", Object.assign({ style: style }, { children: value.value })), jsxRuntimeExports.jsxs("tspan", Object.assign({ style: style }, { children: [' ', value.output ? value.output.default.after + '' : '', value.after] }))] })));
3252
- else
3253
- return jsxRuntimeExports.jsx(InvalidSvg, { className: props.className });
3254
- };
3255
-
3256
- const currencyCalc = (props, after, before, afterSingular, isAbsolute) => {
3257
- const { children, input, output,
3258
- /* maximumSignificantDigits, */
3259
- minimumFractionDigits, maximumFractionDigits, localeStringLanguage = "en-EN", calcOnly, string, svg, hideZero, } = props;
3260
- // Remove commas
3261
- var value = typeof children === "string" ? children.replace(/,/g, "") : children;
3262
- // Parse as float
3263
- value = parseFloat(value);
3264
- // Input
3265
- value =
3266
- value !== 0 && input && scaleLookup[input]
3267
- ? scaleLookup[input].pow * value
3268
- : value;
3269
- // output
3270
- const outputCalc = output && scaleLookup[output] ? scaleLookup[output] : undefined;
3271
- value = value !== 0 && output ? value / outputCalc.pow : value;
3272
- const minimumFractionDigitsCalculated = isAbsolute === true && output === undefined
3273
- ? minimumFractionDigits === 0
3274
- : /*: maximumFractionDigits === 0
3275
- ? 0*/
3276
- typeof minimumFractionDigits === "number"
3277
- ? minimumFractionDigits
3278
- : outputCalc && outputCalc.defaultmaximumFractionDigits
3279
- ? outputCalc.defaultmaximumFractionDigits
3280
- : 2;
3281
- const maximumFractionDigitsCalculated = isAbsolute === true && output === undefined
3282
- ? maximumFractionDigits === 0
3283
- : value <= 0.005
3284
- ? 4
3285
- : value <= 0.05
3286
- ? 3
3287
- : value <= 0.5
3288
- ? 2
3289
- : maximumFractionDigits === 0
3290
- ? 0
3291
- : typeof maximumFractionDigits === "number"
3292
- ? maximumFractionDigits
3293
- : outputCalc && outputCalc.defaultmaximumFractionDigits
3294
- ? outputCalc.defaultmaximumFractionDigits
3295
- : 2;
3296
- const toLocalStringConfig = {
3297
- //maximumSignificantDigits: maximumSignificantDigits,
3298
- minimumFractionDigits: minimumFractionDigitsCalculated,
3299
- maximumFractionDigits: maximumFractionDigitsCalculated > minimumFractionDigitsCalculated
3300
- ? maximumFractionDigitsCalculated
3301
- : minimumFractionDigitsCalculated,
3302
- };
3303
- // Convert to Locale String
3304
- value = value.toLocaleString(localeStringLanguage, toLocalStringConfig);
3305
- const calcObject = {
3306
- value: value,
3307
- before: before,
3308
- after: after,
3309
- output: outputCalc,
3310
- };
3311
- let className = props.className;
3312
- if (value === "1" && afterSingular) {
3313
- className = className + " wfp--unit--singular";
3314
- }
3315
- if ((!value || value === "NaN" || parseFloat(value) === 0) && hideZero)
3316
- return false;
3317
- else if (calcOnly)
3318
- return calcObject;
3319
- else if (svg)
3320
- return SvgUnit(calcObject, props);
3321
- else if (string)
3322
- return StringUnit(calcObject /*, props*/);
3323
- else if (value !== false)
3324
- return jsxRuntimeExports.jsx("span", Object.assign({ className: className }, { children: value }));
3325
- else
3326
- return jsxRuntimeExports.jsx(Invalid, { className: props.className });
3327
- };
3328
-
3329
- const percentageCalc = (props, after, before) => {
3330
- const { calcOnly, children, from, string, svg, hideZero, maximumSignificantDigits, maximumFractionDigits, } = props;
3331
- // Remove commas
3332
- var value = typeof children === "string" ? children.replace(/,/g, "") : children;
3333
- // Parse as float
3334
- value = parseFloat(value);
3335
- if (parseFloat(from) === 0) {
3336
- value = false;
3337
- }
3338
- else if (from) {
3339
- value = (value / parseFloat(from)) * 100;
3340
- }
3341
- // Convert to Locale String
3342
- value = value.toLocaleString("en-EN", {
3343
- minimumFractionDigits: maximumSignificantDigits
3344
- ? maximumSignificantDigits
3345
- : 0,
3346
- maximumSignificantDigits: maximumSignificantDigits,
3347
- maximumFractionDigits: value <= 0.5 ? 5 : maximumFractionDigits ? maximumFractionDigits : 1,
3348
- });
3349
- const calcObject = {
3350
- value: value,
3351
- before: before,
3352
- after: after,
3353
- output: undefined,
3354
- };
3355
- if ((!value || value === "NaN" || parseFloat(value) === 0) && hideZero)
3356
- return false;
3357
- else if (calcOnly)
3358
- return calcObject;
3359
- else if (svg)
3360
- return SvgUnit(calcObject, props);
3361
- else if (string)
3362
- return StringUnit(calcObject /*, props*/);
3363
- else if (value !== false)
3364
- return jsxRuntimeExports.jsx("span", Object.assign({ className: props.className }, { children: value }));
3365
- else
3366
- return jsxRuntimeExports.jsx(Invalid, { className: props.className });
3367
- };
3368
-
3369
- const SimpleCalc = (props, after, before) => {
3370
- const { calcOnly, className, children, string, svg, hideUnit } = props;
3371
- // Remove commas
3372
- const value = children;
3373
- const afterCalc = after ? after : "";
3374
- const unit = hideUnit ? "" : before + children + afterCalc;
3375
- const calcObject = {
3376
- value: value,
3377
- before: before,
3378
- after: after,
3379
- output: value + unit,
3380
- };
3381
- if (calcOnly)
3382
- return calcObject;
3383
- else if (svg)
3384
- return SvgUnit({ value: value + unit, before: before, after: after }, props);
3385
- else if (string)
3386
- return StringUnit(calcObject /*, props */);
3387
- else if (value !== false)
3388
- return jsxRuntimeExports.jsx("span", Object.assign({ className: className }, { children: value }));
3389
- };
3390
-
3391
- const YearMonthGen = (props) => {
3392
- const { children } = props;
3393
- const value = children;
3394
- let newDate;
3395
- /* Generate Date from Date */
3396
- if (typeof value === "number" && value.toString().length >= 7) {
3397
- newDate = new Date(value, props);
3398
- }
3399
- else if (value.getMonth) {
3400
- /* Use Date Object */
3401
- newDate = value;
3402
- }
3403
- else {
3404
- /* Generate Date from String YYYYMM */
3405
- const year = value.toString().substring(0, 4);
3406
- const month = parseInt(value.toString().substring(4, 7), 10) - 1;
3407
- newDate = new Date(year, month, 1);
3408
- }
3409
- const monthName = newDate.toLocaleString("en-us", { month: "short" });
3410
- const monthNameFull = newDate.toLocaleString("en-us", { month: "long" });
3411
- return {
3412
- monthName: monthName,
3413
- monthNameFull: monthNameFull,
3414
- year: newDate.getFullYear(),
3415
- date: newDate,
3416
- };
3417
- };
3418
- /*const MonthYearCalcDate = ( value, showZero, showUnit ) => {
3419
- const year = value.toString().substring(0, 4);
3420
- const month = parseInt(value.toString().substring(4, 7), 10) - 1;
3421
- const newDate = new Date(year, month, 1);
3422
- return newDate
3423
- }*/
3424
- // Format YYYYMM / from 201709 => Sep 2017
3425
- const YearMonthCalc = (props) => {
3426
- const { className, string, svg, calcOnly } = props;
3427
- const YearMonthgenerated = YearMonthGen(props);
3428
- const calcObject = {
3429
- value: YearMonthgenerated.monthName + " " + YearMonthgenerated.year,
3430
- before: "",
3431
- after: "",
3432
- output: undefined,
3433
- };
3434
- if (calcOnly)
3435
- return calcObject;
3436
- else if (svg)
3437
- return SvgUnit(calcObject, props);
3438
- else if (string)
3439
- return StringUnit(calcObject /*, props*/);
3440
- else if (calcObject === null || calcObject === void 0 ? void 0 : calcObject.value)
3441
- return jsxRuntimeExports.jsx("span", Object.assign({ className: className }, { children: calcObject.value }));
3442
- };
3443
-
3444
- // Generate USD
3445
- const Usd = (props) => {
3446
- return currencyCalc(props, "", "US$");
3447
- };
3448
- // Generate People
3449
- const People = (props) => {
3450
- return currencyCalc(props, "People", undefined, true, true);
3451
- };
3452
- // Generate Partners
3453
- const Partners = (props) => {
3454
- return currencyCalc(props, "Partners", undefined, true, true);
3455
- };
3456
- // Generate MT
3457
- const Mt = (props) => {
3458
- return currencyCalc(props, "MT", undefined, true);
3459
- };
3460
- // Generate MetricTons
3461
- const MetricTons = (props) => {
3462
- return currencyCalc(props, "MetricTons", undefined, true);
3463
- };
3464
- // Generate Months
3465
- const Months = (props) => {
3466
- return currencyCalc(props, "Months", undefined, true, "Month");
3467
- };
3468
- // Generate Num
3469
- const Num = (props) => {
3470
- return currencyCalc(props, "");
3471
- };
3472
- // Generate Beneficiaries
3473
- const Beneficiaries = (props) => {
3474
- return currencyCalc(props, "Beneficaries", undefined, true, true);
3475
- };
3476
- // Generate Households
3477
- const Households = (props) => {
3478
- return currencyCalc(props, "Households", undefined, true, true);
3479
- };
3480
- // Generate Trips
3481
- const Trips = (props) => {
3482
- return currencyCalc(props, "Trips", undefined, true, true);
3483
- };
3484
- // Generate kg
3485
- const Kg = (props) => {
3486
- return SimpleCalc(props, "kg");
3487
- };
3488
- // Generate Households
3489
- const Level = (props) => {
3490
- return SimpleCalc(props, "");
3491
- };
3492
- // Generate Countries
3493
- const Countries = (props) => {
3494
- return SimpleCalc(props, "Countries");
3495
- };
3496
- // Generate None
3497
- const None = (props) => {
3498
- return SimpleCalc(props, "");
3499
- };
3500
- // Generate Percentage
3501
- const Percentage = (props) => {
3502
- return percentageCalc(props, "%");
3503
- };
3504
- // Generate YearMonth
3505
- const YearMonth = (props) => {
3506
- return YearMonthCalc(props);
3507
- };
3508
-
3509
- const components = {
3510
- Usd,
3511
- Partners,
3512
- Beneficiaries,
3513
- Households,
3514
- Months,
3515
- Mt,
3516
- Kg,
3517
- MetricTons,
3518
- Num,
3519
- Level,
3520
- None,
3521
- Trips,
3522
- Countries,
3523
- People,
3524
- Percentage,
3525
- YearMonth,
3526
- };
3527
- /** The Unit component method returns a component with a language and unit sensitive representation of this number based on [Numbers and Unit from the Editorial Guidelines](https://cdn.wfp.org/guides/editorial/content/numbers-and-units/) the [Numbers and Units Reference on developer.mozilla.org](http://cdn.wfp.org/guides/editorial/content/numbers-and-units). */
3528
- const Unit = (props) => {
3529
- const { prefix } = useSettings();
3530
- const { className, output, string, textAnchor, localeStringLanguage = 'en-EN', type = 'none', setup, } = props;
3531
- const typeEl = props.type.charAt(0).toUpperCase() + props.type.slice(1);
3532
- const Unit = components[typeEl];
3533
- //const unitHideClass = setup && setup.hideUnit ? 'wfp--unit--hide' : '';
3534
- const textAnchorCalc = textAnchor ? textAnchor : 'start';
3535
- const unitClassName = type ? `${prefix}--unit--${type.toLowerCase()}` : '';
3536
- const outputClassName = output && scaleLookup[output] ? `${prefix}--unit--${output}` : '';
3537
- const setupClassName = setup ? `${prefix}--unit--${setup}` : '';
3538
- const classNameCalc = `${prefix}--unit ${className} ${unitClassName} ${outputClassName} ${setupClassName}`;
3539
- if (string) {
3540
- return Unit(props);
3541
- }
3542
- if (Unit === undefined) {
3543
- // console.warn(`The unit "${type}" is undefined`);
3544
- return null;
3545
- }
3546
- return (jsxRuntimeExports.jsx(Unit, Object.assign({}, props, { className: classNameCalc, textAnchor: textAnchorCalc, localeStringLanguage: localeStringLanguage })));
3547
- };
3548
-
3549
- const Value = (_a) => {
3550
- var { value, secondaryValue, className, title } = _a, other = __rest(_a, ["value", "secondaryValue", "className", "title"]);
3551
- const { prefix } = useSettings();
3552
- const classes = classNames(`${prefix}--value`, className);
3553
- return (jsxRuntimeExports.jsxs("div", Object.assign({ className: classes }, other, { children: [jsxRuntimeExports.jsx("h4", Object.assign({ className: `${prefix}--value__title` }, { children: title })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--value__primary-value` }, { children: value })), jsxRuntimeExports.jsx("div", Object.assign({ className: `${prefix}--value__secondary-value` }, { children: secondaryValue }))] })));
3554
- };
3555
-
3556
- // Passes settings down to children, primarily useful for class components
3557
- // that can't consume the useSettings hook. Props passed to the underlying
3558
- // component can be used to override settings values
3559
- const withWFPCoreSettings = (WrappedComponent) => (props) => {
3560
- const settings = useSettings();
3561
- const allProps = Object.assign(Object.assign({}, settings), props);
3562
- return jsxRuntimeExports.jsx(WrappedComponent, Object.assign({}, allProps));
3563
- };
3564
-
3565
- function useTheme() {
3566
- const settings = useContext(WFPCoreContext);
3567
- return settings;
3568
- }
3569
-
3570
- const SkeletonText = (_a) => {
3571
- var { paragraph = false, lineCount = 3, width = '100%', heading = false, className } = _a, other = __rest(_a, ["paragraph", "lineCount", "width", "heading", "className"]);
3572
- const { prefix } = useSettings();
3573
- const skeletonTextClasses = classNames({
3574
- [`${prefix}--skeleton__text`]: true,
3575
- [`${prefix}--skeleton__heading`]: heading,
3576
- }, className);
3577
- const widthNum = typeof width === 'string' ? parseInt(width, 10) : width;
3578
- const widthPx = typeof width === 'string' && width.includes('px');
3579
- const widthPercent = typeof width === 'string' && width.includes('%');
3580
- function getRandomInt(min, max) {
3581
- return Math.floor(Math.random() * (max - min + 1)) + min;
3582
- }
3583
- if (widthPercent && paragraph) {
3584
- const lines = [];
3585
- for (let i = 0; i < lineCount; i++) {
3586
- const randomWidth = getRandomInt(0, 75) + 'px';
3587
- lines.push(jsxRuntimeExports.jsx("p", Object.assign({ className: skeletonTextClasses, style: { width: `calc(${width} - ${randomWidth})` } }, other), i));
3588
- }
3589
- return jsxRuntimeExports.jsx("div", { children: lines });
3590
- }
3591
- if (widthPx && paragraph) {
3592
- const lines = [];
3593
- for (let j = 0; j < lineCount; j++) {
3594
- const randomWidth = getRandomInt(widthNum - 75, widthNum) + 'px';
3595
- lines.push(jsxRuntimeExports.jsx("p", Object.assign({ className: skeletonTextClasses, style: { width: randomWidth } }, other), j));
3596
- }
3597
- return jsxRuntimeExports.jsx("div", { children: lines });
3598
- }
3599
- return (jsxRuntimeExports.jsx("p", Object.assign({ className: skeletonTextClasses, style: { width: width } }, other)));
3600
- };
3601
- SkeletonText.displayName = 'SkeletonText';
3602
-
3603
- var colors = {
3604
- main: {
3605
- name: "main",
3606
- hex: "#007DBC",
3607
- // previously 0A6EB4
3608
- scss: "$color__main",
3609
- type: "communications"
3610
- },
3611
- "sequential-default-07": {
3612
- name: "sequential-default-07",
3613
- hex: "#9DEAFF",
3614
- scss: "$color__sequential-default-07",
3615
- type: "sequential-default",
3616
- shortDescription: "sequential default 07"
3617
- },
3618
- "sequential-default-06": {
3619
- name: "sequential-default-06",
3620
- hex: "#73C3FE",
3621
- scss: "$color__sequential-default-06",
3622
- type: "sequential-default",
3623
- shortDescription: "sequential default 06"
3624
- },
3625
- "sequential-default-05": {
3626
- name: "sequential-default-05",
3627
- hex: "#4AA1E2",
3628
- scss: "$color__sequential-default-05",
3629
- type: "sequential-default",
3630
- shortDescription: "sequential default 05"
3631
- },
3632
- "sequential-default-04": {
3633
- name: "sequential-default-04",
3634
- hex: "#0780C0",
3635
- scss: "$color__sequential-default-04",
3636
- type: "sequential-default",
3637
- shortDescription: "sequential default 04"
3638
- },
3639
- "sequential-default-03": {
3640
- name: "sequential-default-03",
3641
- hex: "#005F9B",
3642
- scss: "$color__sequential-default-03",
3643
- type: "sequential-default",
3644
- shortDescription: "sequential default 03"
3645
- },
3646
- "sequential-default-02": {
3647
- name: "sequential-default-02",
3648
- hex: "#003F76",
3649
- scss: "$color__sequential-default-02",
3650
- type: "sequential-default",
3651
- shortDescription: "sequential default 02"
3652
- },
3653
- "sequential-default-01": {
3654
- name: "sequential-default-01",
3655
- hex: "#002153",
3656
- scss: "$color__sequential-default-01",
3657
- type: "sequential-default",
3658
- shortDescription: "sequential default 01"
3659
- },
3660
- "sequential-secondary-07": {
3661
- name: "sequential-secondary-07",
3662
- hex: "#bdf9c4",
3663
- scss: "$color__sequential-secondary-07",
3664
- type: "sequential-secondary",
3665
- shortDescription: "sequential secondary 07"
3666
- },
3667
- "sequential-secondary-06": {
3668
- name: "sequential-secondary-06",
3669
- hex: "#89eaa8",
3670
- scss: "$color__sequential-secondary-06",
3671
- type: "sequential-secondary",
3672
- shortDescription: "sequential secondary 06"
3673
- },
3674
- "sequential-secondary-05": {
3675
- name: "sequential-secondary-05",
3676
- hex: "#5fd79a",
3677
- scss: "$color__sequential-secondary-05",
3678
- type: "sequential-secondary",
3679
- shortDescription: "sequential secondary 05"
3680
- },
3681
- "sequential-secondary-04": {
3682
- name: "sequential-secondary-04",
3683
- hex: "#41c196",
3684
- scss: "$color__sequential-secondary-04",
3685
- type: "sequential-secondary",
3686
- shortDescription: "sequential secondary 04"
3687
- },
3688
- "sequential-secondary-03": {
3689
- name: "sequential-secondary-03",
3690
- hex: "#33aa96",
3691
- scss: "$color__sequential-secondary-03",
3692
- type: "sequential-secondary",
3693
- shortDescription: "sequential secondary 03"
3694
- },
3695
- "sequential-secondary-02": {
3696
- name: "sequential-secondary-02",
3697
- hex: "#319298",
3698
- scss: "$color__sequential-secondary-02",
3699
- type: "sequential-secondary",
3700
- shortDescription: "sequential secondary 02"
3701
- },
3702
- "sequential-secondary-01": {
3703
- name: "sequential-secondary-01",
3704
- hex: "#367a96",
3705
- scss: "$color__sequential-secondary-01",
3706
- type: "sequential-secondary",
3707
- shortDescription: "sequential secondary 01"
3708
- },
3709
- "categorical-corporate-01": {
3710
- name: "categorical-01",
3711
- hex: "#007DBC",
3712
- scss: "$color__categorical-corporate-01",
3713
- type: "categorical",
3714
- shortDescription: "categorical-01"
3715
- },
3716
- "categorical-corporate-02": {
3717
- name: "categorical-02",
3718
- hex: "#36B5C5",
3719
- scss: "$color__categorical-corporate-02",
3720
- type: "categorical",
3721
- shortDescription: "categorical-02"
3722
- },
3723
- "categorical-corporate-03": {
3724
- name: "categorical-03",
3725
- hex: "#00B485",
3726
- scss: "$color__categorical-corporate-03",
3727
- type: "categorical",
3728
- shortDescription: "categorical-03"
3729
- },
3730
- "categorical-corporate-04": {
3731
- name: "categorical-04",
3732
- hex: "#008868",
3733
- scss: "$color__categorical-corporate-04",
3734
- type: "categorical",
3735
- shortDescription: "categorical-04"
3736
- },
3737
- "categorical-corporate-05": {
3738
- name: "categorical-05",
3739
- hex: "#1A4262",
3740
- scss: "$color__categorical-corporate-05",
3741
- type: "categorical",
3742
- shortDescription: "categorical-05"
3743
- },
3744
- "categorical-corporate-06": {
3745
- name: "categorical-06",
3746
- hex: "#982B56",
3747
- scss: "$color__categorical-corporate-06",
3748
- type: "categorical",
3749
- shortDescription: "categorical-06"
3750
- },
3751
- "categorical-corporate-07": {
3752
- name: "categorical-07",
3753
- hex: "#EF404C",
3754
- scss: "$color__categorical-corporate-07",
3755
- type: "categorical",
3756
- shortDescription: "categorical-07"
3757
- },
3758
- "categorical-corporate-08": {
3759
- name: "categorical-08",
3760
- hex: "#F47847",
3761
- scss: "$color__categorical-corporate-08",
3762
- type: "categorical",
3763
- shortDescription: "categorical-08"
3764
- },
3765
- "categorical-corporate-09": {
3766
- name: "categorical-09",
3767
- hex: "#B79F8D",
3768
- scss: "$color__categorical-corporate-09",
3769
- type: "categorical",
3770
- shortDescription: "categorical-09"
3771
- },
3772
- "categorical-corporate-10": {
3773
- name: "categorical-10",
3774
- hex: "#ECDFBB",
3775
- scss: "$color__categorical-corporate-10",
3776
- type: "categorical",
3777
- shortDescription: "categorical-10"
3778
- },
3779
- female: {
3780
- name: "female",
3781
- hex: "#3f7e44",
3782
- scss: "$color__female",
3783
- type: "symbolic",
3784
- shortDescription: "Indicate female"
3785
- },
3786
- male: {
3787
- name: "male",
3788
- hex: "#26bde2",
3789
- scss: "$color__male",
3790
- type: "symbolic",
3791
- shortDescription: "Indicate male"
3792
- },
3793
- national: {
3794
- name: "national",
3795
- hex: "#3C5979",
3796
- scss: "$color__national",
3797
- type: "symbolic",
3798
- shortDescription: "Indicate national staff"
3799
- },
3800
- international: {
3801
- name: "international",
3802
- hex: "#fcc30b",
3803
- scss: "$color__international",
3804
- type: "symbolic",
3805
- shortDescription: "Indicate international staff"
3806
- },
3807
- "brand-01": {
3808
- name: "brand-01",
3809
- hex: "#007DBC",
3810
- //previously 0A6EB4
3811
- scss: "var(--brand-01)",
3812
- css: "color__brand-01",
3813
- type: "brand",
3814
- shortDescription: "WFP brand color"
3815
- },
3816
- "interactive-01": {
3817
- name: "interactive-01",
3818
- hex: "#0b77c2",
3819
- scss: "var(--interactive-01)",
3820
- css: "color__interactive-01",
3821
- type: "brand",
3822
- shortDescription: "Primary interactive color, Primary buttons"
3823
- },
3824
- "interactive-02": {
3825
- name: "interactive-02",
3826
- hex: "#085387",
3827
- scss: "$action-default-fill-primary-default-02",
3828
- css: "color__interactive-02",
3829
- type: "brand",
3830
- shortDescription: "BannerNavigation"
3831
- },
3832
- "accent-01": {
3833
- name: "accent-01",
3834
- hex: "#f7b825",
3835
- scss: "$accent-01",
3836
- css: "color__accent-01",
3837
- type: "brand-accent",
3838
- //replaced type brand to brand-accent to prevent it from showing it
3839
- shortDescription: "Accent colour (recommended)"
3840
- },
3841
- "brand-01-20": {
3842
- name: "brand-01-20",
3843
- hex: "#c2dbec",
3844
- scss: "$brand-01-20",
3845
- css: "color__brand-01-20",
3846
- type: "brand-extended"
3847
- },
3848
- "brand-01-30": {
3849
- name: "brand-01-30",
3850
- hex: "#85b7da",
3851
- scss: "$brand-01-30",
3852
- css: "color__brand-01-30",
3853
- type: "brand-extended"
3854
- },
3855
- "brand-01-40": {
3856
- name: "brand-01-40",
3857
- hex: "#4792c7",
3858
- scss: "$brand-01-40",
3859
- css: "color__brand-01-40",
3860
- type: "brand-extended"
3861
- },
3862
- "brand-01-60": {
3863
- name: "brand-01-60",
3864
- hex: "#085387",
3865
- scss: "$brand-01-60",
3866
- css: "color__brand-01-60",
3867
- type: "brand-extended"
3868
- },
3869
- "brand-01-70": {
3870
- name: "brand-01-70",
3871
- hex: "#05375a",
3872
- scss: "$brand-01-70",
3873
- css: "color__brand-01-70",
3874
- type: "brand-extended"
3875
- },
3876
- "brand-01-80": {
3877
- name: "brand-01-80",
3878
- hex: "#031c2d",
3879
- scss: "$brand-01-80",
3880
- css: "color__brand-01-80",
3881
- type: "brand-extended"
3882
- },
3883
- "ui-01": {
3884
- name: "ui-01",
3885
- hex: "#ffffff",
3886
- scss: "$ui-01",
3887
- css: "color__ui-01",
3888
- type: "ui",
3889
- shortDescription: "Primary container background; Secondary page background",
3890
- description: "This colour is used as the page background if there are no Modules on top of it."
3891
- },
3892
- "ui-02": {
3893
- name: "ui-02",
3894
- hex: "#eff2f5",
3895
- scss: "var(--ui-02)",
3896
- css: "color__ui-02",
3897
- type: "ui",
3898
- shortDescription: "Primary page background; Secondary container background",
3899
- description: "Use this colour as page background if there are modules on top of it to increase the contrast between the modules."
3900
- },
3901
- "ui-03": {
3902
- name: "ui-03",
3903
- hex: "#f0f3f6",
3904
- scss: "$ui-03",
3905
- css: "color__ui-03",
3906
- type: "ui",
3907
- shortDescription: "Subtle border, Tertiary background color"
3908
- },
3909
- "ui-04": {
3910
- name: "ui-04",
3911
- hex: "#dfe3e6",
3912
- scss: "$ui-04",
3913
- css: "color__ui-04",
3914
- type: "ui",
3915
- shortDescription: "3:1 AA element contrast; Medium contrast border"
3916
- },
3917
- "ui-05": {
3918
- name: "ui-05",
3919
- hex: "#8c9ba5",
3920
- scss: "$ui-03",
3921
- css: "color__ui-05",
3922
- type: "ui",
3923
- shortDescription: "4.5:1 AA element contrast; High contrast border; Emphasis elements"
3924
- },
3925
- "ui-06": {
3926
- name: "ui-06",
3927
- hex: "#0b1923",
3928
- scss: "$ui-06",
3929
- css: "color__ui-06",
3930
- type: "ui",
3931
- shortDescription: ""
3932
- },
3933
- "text-01": {
3934
- name: "text-01",
3935
- hex: "#031c2d",
3936
- scss: "$text-01",
3937
- css: "color__text-01",
3938
- type: "ui",
3939
- shortDescription: "Primary text colour; Input labels;"
3940
- },
3941
- "text-02": {
3942
- name: "text-02",
3943
- hex: "#5a6872",
3944
- scss: "$text-02",
3945
- css: "color__text-02",
3946
- type: "ui",
3947
- shortDescription: "Secondary text; Help text"
3948
- },
3949
- "text-03": {
3950
- name: "text-03",
3951
- hex: "#dfe6eb",
3952
- scss: "$text-03",
3953
- css: "color__text-03",
3954
- type: "ui",
3955
- shortDescription: "Placeholder text"
3956
- },
3957
- "text-04": {
3958
- name: "text-04",
3959
- hex: "#ffffff",
3960
- scss: "$text-04",
3961
- css: "color__text-04",
3962
- type: "ui",
3963
- shortDescription: ""
3964
- },
3965
- "inverse-01": {
3966
- name: "inverse-01",
3967
- hex: "#ffffff",
3968
- scss: "$inverse-01",
3969
- css: "color__inverse-01",
3970
- type: "ui",
3971
- shortDescription: "Inverse text color; Inverse icon color"
3972
- },
3973
- // 'inverse-02': {
3974
- // name: 'inverse-02',
3975
- // hex: '#f0f3f6',
3976
- // scss: '$inverse-02',
3977
- // css: 'color__inverse-02',
3978
- // type: 'ui',
3979
- // shortDescription: 'High contrast backgrounds; High contrast elements',
3980
- // },
3981
- "field-01": {
3982
- name: "field-01",
3983
- hex: "#ffffff",
3984
- scss: "$field-02",
3985
- css: "color__field-01",
3986
- type: "ui",
3987
- shortDescription: "Default input fields; Fields on $ui-backgrounds"
3988
- },
3989
- /*'field-02': {
3990
- name: 'field-02',
3991
- hex: '#fbfcfc',
3992
- scss: '$field-02',
3993
- css: 'color__field-02',
3994
- type: 'ui',
3995
- },*/
3996
- "field-border-01": {
3997
- name: "field-border-01",
3998
- hex: "#d4d7d9",
3999
- scss: "$field-border-01",
4000
- css: "color__field-border-01",
4001
- type: "ui",
4002
- shortDescription: ""
4003
- },
4004
- "disabled-01": {
4005
- name: "disabled-01",
4006
- hex: "#f9fbfc",
4007
- scss: "$disabled-01",
4008
- css: "color__disabled-01",
4009
- type: "ui",
4010
- shortDescription: ""
4011
- },
4012
- "disabled-02": {
4013
- name: "disabled-02",
4014
- hex: "#dfe6eb",
4015
- scss: "$disabled-02",
4016
- css: "color__disabled-02",
4017
- type: "ui",
4018
- shortDescription: ""
4019
- },
4020
- "sdg-01": {
4021
- name: "sdg-01",
4022
- hex: "#E5243B",
4023
- scss: "$sdg-01",
4024
- css: "color__sdg-01",
4025
- type: "sdg",
4026
- shortDescription: "No poverty, red"
4027
- },
4028
- "sdg-02": {
4029
- name: "sdg-02",
4030
- hex: "#DDA63A",
4031
- scss: "$sdg-02",
4032
- css: "color__sdg-02",
4033
- type: "sdg",
4034
- shortDescription: "Zero hunger, mustard"
4035
- },
4036
- "sdg-03": {
4037
- name: "sdg-03",
4038
- hex: "#4C9F38",
4039
- scss: "$sdg-03",
4040
- css: "color__sdg-03",
4041
- type: "sdg",
4042
- shortDescription: "Good health and well-being, kelly green"
4043
- },
4044
- "sdg-04": {
4045
- name: "sdg-04",
4046
- hex: "#C5192D",
4047
- scss: "$sdg-04",
4048
- css: "color__sdg-04",
4049
- type: "sdg",
4050
- shortDescription: "Quality education, dark red"
4051
- },
4052
- "sdg-05": {
4053
- name: "sdg-05",
4054
- hex: "#FF3A21",
4055
- scss: "$sdg-05",
4056
- css: "color__sdg-05",
4057
- type: "sdg",
4058
- shortDescription: "Gender equality, red orange"
4059
- },
4060
- "sdg-06": {
4061
- name: "sdg-06",
4062
- hex: "#26BDE2",
4063
- scss: "$sdg-06",
4064
- css: "color__sdg-06",
4065
- type: "sdg",
4066
- shortDescription: "Clean water and sanitation, bright blue"
4067
- },
4068
- "sdg-07": {
4069
- name: "sdg-07",
4070
- hex: "#FCC30B",
4071
- scss: "$sdg-07",
4072
- css: "color__sdg-07",
4073
- type: "sdg",
4074
- shortDescription: "Affordable and clean energy, yellow"
4075
- },
4076
- "sdg-08": {
4077
- name: "sdg-08",
4078
- hex: "#A21942",
4079
- scss: "$sdg-08",
4080
- css: "color__sdg-08",
4081
- type: "sdg",
4082
- shortDescription: "Decent work and economic growth, burgundy red"
4083
- },
4084
- "sdg-09": {
4085
- name: "sdg-09",
4086
- hex: "#FD6925",
4087
- scss: "$sdg-09",
4088
- css: "color__sdg-09",
4089
- type: "sdg",
4090
- shortDescription: "Industry, innovation and infrastructure, orange"
4091
- },
4092
- "sdg-10": {
4093
- name: "sdg-10",
4094
- hex: "#DD1367",
4095
- scss: "$sdg-10",
4096
- css: "color__sdg-10",
4097
- type: "sdg",
4098
- shortDescription: "Reduced inequalities, magentas"
4099
- },
4100
- "sdg-11": {
4101
- name: "sdg-11",
4102
- hex: "#FD9D24",
4103
- scss: "$sdg-11",
4104
- css: "color__sdg-11",
4105
- type: "sdg",
4106
- shortDescription: "Sustainable cities and communities, golden yellow"
4107
- },
4108
- "sdg-12": {
4109
- name: "sdg-12",
4110
- hex: "#BF8B2E",
4111
- scss: "$sdg-12",
4112
- css: "color__sdg-12",
4113
- type: "sdg",
4114
- shortDescription: "Responsible consumption and production, dark mustard"
4115
- },
4116
- "sdg-13": {
4117
- name: "sdg-13",
4118
- hex: "#3F7E44",
4119
- scss: "$sdg-10",
4120
- css: "color__sdg-13",
4121
- type: "sdg",
4122
- shortDescription: "Climate action, dark green"
4123
- },
4124
- "sdg-14": {
4125
- name: "sdg-14",
4126
- hex: "#0A97D9",
4127
- scss: "$sdg-14",
4128
- css: "color__sdg-14",
4129
- type: "sdg",
4130
- shortDescription: "Life below water, blue"
4131
- },
4132
- "sdg-15": {
4133
- name: "sdg-15",
4134
- hex: "#56C02B",
4135
- scss: "$sdg-15",
4136
- css: "color__sdg-15",
4137
- type: "sdg",
4138
- shortDescription: "Life on land, lime green"
4139
- },
4140
- "sdg-16": {
4141
- name: "sdg-16",
4142
- hex: "#00689D",
4143
- scss: "$sdg-16",
4144
- css: "color__sdg-16",
4145
- type: "sdg",
4146
- shortDescription: "Peace, justice and stron institutions, royal blue"
4147
- },
4148
- "sdg-17": {
4149
- name: "sdg-17",
4150
- hex: "#19486A",
4151
- scss: "$sdg-17",
4152
- css: "color__sdg-17",
4153
- type: "sdg",
4154
- shortDescription: "Partnership for the goals, navy blue"
4155
- },
4156
- "support-01": {
4157
- name: "support-01",
4158
- hex: "#c5192d",
4159
- scss: "$support-01",
4160
- css: "color__support-01",
4161
- type: "support",
4162
- shortDescription: "Error (same as color__red)",
4163
- description: "Use the error color to indicate an error or to focus the attention on something which is crucial to see. Paired with a cross icon, red delivers the message that something went wrong."
4164
- },
4165
- "support-light-01": {
4166
- name: "support-light-01",
4167
- hex: "#f1c6cb",
4168
- scss: "$support-light-01",
4169
- css: "color__support-light-01",
4170
- type: "support",
4171
- shortDescription: "Lighter version of color-red",
4172
- description: ""
4173
- },
4174
- "support-02": {
4175
- name: "support-02",
4176
- hex: "#689e18",
4177
- scss: "$support-02",
4178
- css: "color__support-02",
4179
- type: "support",
4180
- shortDescription: "Success",
4181
- description: "Use green to indicate success state. Paired with a checkmark icon the user knows that the operation was successfully completed."
4182
- },
4183
- "support-light-02": {
4184
- name: "support-light-02",
4185
- hex: "#ccdbcd",
4186
- scss: "$support-light-02",
4187
- css: "color__support-light-02",
4188
- type: "support",
4189
- shortDescription: "Lighter version of green",
4190
- description: ""
4191
- },
4192
- "support-03": {
4193
- name: "support-03",
4194
- hex: "#f7b825",
4195
- scss: "$support-03",
4196
- css: "color__support-03",
4197
- type: "support",
4198
- shortDescription: "Warning (same as color__yellow)",
4199
- description: "Use yellow to indicate a transient warning which is less important than an error message. Yellow typically consists of items which require the user’s immediate attention, or indicate a waiting period. Although this overlaps with the use of red, yellow is more transient in nature."
4200
- },
4201
- "support-light-03": {
4202
- name: "support-light-03",
4203
- hex: "#fdedc9",
4204
- scss: "$support-light-03",
4205
- css: "color__support-light-03",
4206
- type: "support",
4207
- shortDescription: "Lighter version of yellow",
4208
- description: ""
4209
- },
4210
- "support-04": {
4211
- name: "support-04",
4212
- hex: "#85b7da",
4213
- scss: "$support-04",
4214
- css: "color__support-04",
4215
- type: "support",
4216
- shortDescription: "Info",
4217
- description: ""
4218
- },
4219
- "support-light-04": {
4220
- name: "support-light-04",
4221
- hex: "#c2dbec",
4222
- scss: "$support-light-04",
4223
- css: "color__support-light-04",
4224
- type: "support",
4225
- shortDescription: "",
4226
- description: ""
4227
- }
4228
- };
4229
-
4230
- // main: {
4231
- // name: 'main',
4232
- // hex: '#0A6EB4',
4233
- // scss: '$color__main',
4234
- // type: 'communications',
4235
- // },
4236
- // navy: {
4237
- // name: 'navy',
4238
- // hex: '#19486a',
4239
- // scss: '$color__navy',
4240
- // // shortDescription: 'Same as SDG 17',
4241
- // shortDescription: '',
4242
- // type: 'communications',
4243
- // },
4244
- // aqua: {
4245
- // name: 'aqua',
4246
- // hex: '#26bde2',
4247
- // // shortDescription: 'Same as SDG 6',
4248
- // shortDescription: '',
4249
- // scss: '$color__aqua',
4250
- // type: 'communications',
4251
- // },
4252
- // 'dark-green': {
4253
- // name: 'dark-green',
4254
- // hex: '#3f7e44',
4255
- // // shortDescription: 'Same as SDG 13',
4256
- // shortDescription: '',
4257
- // scss: '$color__dark-green',
4258
- // type: 'communications',
4259
- // },
4260
- // lime: {
4261
- // name: 'lime',
4262
- // hex: '#97d700',
4263
- // scss: '$color__lime',
4264
- // type: 'communications',
4265
- // },
4266
- // yellow: {
4267
- // name: 'yellow',
4268
- // hex: '#fcc30b',
4269
- // // shortDescription: 'Same as SDG 7',
4270
- // shortDescription: '',
4271
- // scss: '$color__yellow',
4272
- // type: 'communications',
4273
- // },
4274
- // ochre: {
4275
- // name: 'ochre',
4276
- // hex: '#dda63a',
4277
- // // shortDescription: 'Same as SDG 2',
4278
- // shortDescription: '',
4279
- // scss: '$color__ochre',
4280
- // type: 'communications',
4281
- // },
4282
- // orange: {
4283
- // name: 'orange',
4284
- // hex: '#fd6925',
4285
- // // shortDescription: 'Same as SDG 9',
4286
- // shortDescription: '',
4287
- // scss: '$color__orange',
4288
- // type: 'communications',
4289
- // },
4290
- // red: {
4291
- // name: 'red',
4292
- // hex: '#c5192d',
4293
- // // shortDescription: 'Same as SDG 1',
4294
- // shortDescription: '',
4295
- // scss: '$color__red',
4296
- // type: 'communications',
4297
- // },
4298
- // 'dark-red': {
4299
- // name: 'dark-red',
4300
- // hex: '#a21942',
4301
- // // shortDescription: 'Same as SDG 8',
4302
- // shortDescription: '',
4303
- // scss: '$color__dark-red',
4304
- // type: 'communications',
4305
- // },
4306
- // magenta: {
4307
- // name: 'magenta',
4308
- // hex: '#dd1367',
4309
- // // shortDescription: 'Same as SDG 10',
4310
- // shortDescription: '',
4311
- // scss: '$color__magenta',
4312
- // type: 'communications',
4313
- // },
4314
-
4315
- /**
4316
- * Custom hook for using either `useLayoutEffect` or `useEffect` based on the environment (client-side or server-side).
4317
- * @param {Function} effect - The effect function to be executed.
4318
- * @param {Array<any>} [dependencies] - An array of dependencies for the effect (optional).
4319
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-isomorphic-layout-effect)
4320
- * @example
4321
- * useIsomorphicLayoutEffect(() => {
4322
- * // Code to be executed during the layout phase on the client side
4323
- * }, [dependency1, dependency2]);
4324
- */
4325
- const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
4326
-
4327
- const IS_SERVER = typeof window === "undefined";
4328
- /**
4329
- * Custom hook for tracking the state of a media query.
4330
- * @param {string} query - The media query to track.
4331
- * @param {boolean | ?UseMediaQueryOptions} [options] - The default value to return if the hook is being run on the server (default is `false`).
4332
- * @param {?boolean} [options.defaultValue] - The default value to return if the hook is being run on the server (default is `false`).
4333
- * @param {?boolean} [options.initializeWithValue] - If `true` (default), the hook will initialize reading the media query. In SSR, you should set it to `false`, returning `options.defaultValue` or `false` initially.
4334
- * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
4335
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-media-query)
4336
- * @see [MDN Match Media](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia)
4337
- * @example
4338
- * const isSmallScreen = useMediaQuery('(max-width: 600px)');
4339
- * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
4340
- */
4341
- function useMediaQuery(query, options) {
4342
- var _a, _b;
4343
- // TODO: Refactor this code after the deprecated signature has been removed.
4344
- const defaultValue = typeof options === "boolean" ? options : (_a = options === null || options === void 0 ? void 0 : options.defaultValue) !== null && _a !== void 0 ? _a : false;
4345
- const initializeWithValue = typeof options === "boolean"
4346
- ? undefined
4347
- : (_b = options === null || options === void 0 ? void 0 : options.initializeWithValue) !== null && _b !== void 0 ? _b : undefined;
4348
- const getMatches = (query) => {
4349
- if (IS_SERVER) {
4350
- return defaultValue;
4351
- }
4352
- return window.matchMedia(query).matches;
4353
- };
4354
- const [matches, setMatches] = useState(() => {
4355
- if (initializeWithValue) {
4356
- return getMatches(query);
4357
- }
4358
- return defaultValue;
4359
- });
4360
- /** Handles the change event of the media query. */
4361
- function handleChange() {
4362
- setMatches(getMatches(query));
4363
- }
4364
- useIsomorphicLayoutEffect(() => {
4365
- const matchMedia = window.matchMedia(query);
4366
- // Triggered at the first client-side load and if query changes
4367
- handleChange();
4368
- // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
4369
- if (matchMedia.addListener) {
4370
- matchMedia.addListener(handleChange);
4371
- }
4372
- else {
4373
- matchMedia.addEventListener("change", handleChange);
4374
- }
4375
- return () => {
4376
- if (matchMedia.removeListener) {
4377
- matchMedia.removeListener(handleChange);
4378
- }
4379
- else {
4380
- matchMedia.removeEventListener("change", handleChange);
4381
- }
4382
- };
4383
- }, [query]);
4384
- return matches;
4385
- }
4386
-
4387
- export { Accordion, AccordionItem, AddonAfter, AddonBefore, AuthLayout, Avatar, BackgroundContent, BannerNavigation, BannerNavigationItem, BannerNavigationWithContent, Callout as BlockNotification, Breadcrumb, BreadcrumbHome, BreadcrumbItem, Button, Callout, Card, CardExternal, Checkbox, ContentSwitcher, ContextMenu, ContextMenuGroup, ContextMenuItem, Credits, DatePicker, DatePickerInput, DateRangePicker, DateRangePickerInput, Empty, Footer, FooterExternal, FooterMetaLink, Form, FormGroup, FormHint, FormItem, FormLabel, Helper, Hero, HeroExternal, InfoBar, InlineErrorMessage, InlineLoading, Input, InputGroup, Item, Label, Link, LinksColumn, List, ListItem, Loading, MainNavigation, MainNavigationContext, MainNavigationItem, Modal, ModalFooter, ModalWrapper, Module, ModuleBody, ModuleFooter, ModuleHeader, NotificationActionButton, NotificationButton, NotificationTextDetails, NumberInput, Pagination, RadioButton, ReadMore, Search, SecondaryNavigation, SecondaryNavigationTitle, Select, SelectItem, SelectItemGroup, Sidebar, SidebarBackButton, SidebarContentBody, SidebarContentHeader, SidebarHeader, SidebarScroll, SkeletonText, Slider, StepNavigation, StepNavigationItem, Story, SubNavigation, SubNavigationContent, SubNavigationFilter, SubNavigationGroup, SubNavigationHeader, SubNavigationItem, SubNavigationLink, SubNavigationList, SubNavigationTitle, Tab, TabContent, Table, ReactTablePagination as TablePagination, TableSorting$1 as TableSorting, Tabs, Tag, Text, TextArea, TextInput, ToastNotification, Toggle, Tooltip, Unit, User, Value, WFPCoreContext, WFPCoreProvider, Wrapper, buttonKinds, colors, settings as defaultWFPContext, mdxComponents, notificationtypes, pageWidths, tooltipStyle, tooltipStyleDark, uniqueId, useInput, useIsomorphicLayoutEffect, useMainNavigation, useMediaQuery, useTab, useTheme, withWFPCoreSettings };