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