intelicoreact 1.6.2 → 1.6.3
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/dist/ArrayElement.d.ts +13 -0
- package/dist/AsyncReturnType.d.ts +17 -0
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.interface.js +4 -1
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +69 -14
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.stories.js +30 -7
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.test.js +43 -34
- package/dist/Atomic/FormElements/ActionAlert/index.js +17 -2
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.interface.js +4 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +26 -11
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.stories.js +35 -12
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.test.js +29 -20
- package/dist/Atomic/FormElements/AdvancedStatus/index.js +17 -2
- package/dist/Atomic/FormElements/Calendar/Calendar.js +109 -53
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +4 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.stories.js +74 -10
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.interface.js +4 -1
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +27 -12
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +39 -16
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.test.js +46 -37
- package/dist/Atomic/FormElements/CheckboxInput/index.js +17 -2
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.interface.js +4 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +24 -9
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.stories.js +33 -10
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.test.js +34 -25
- package/dist/Atomic/FormElements/CheckboxesLine/index.js +17 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +160 -104
- package/dist/Atomic/FormElements/Datepicker/Datepicker.stories.js +31 -8
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +89 -33
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +154 -98
- package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +82 -18
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +25 -10
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +138 -82
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.stories.js +79 -15
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +69 -13
- package/dist/Atomic/FormElements/FileLoader/FileLoader.stories.js +86 -22
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +69 -13
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +71 -15
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +91 -35
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.stories.js +82 -18
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +40 -25
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.stories.js +79 -15
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +78 -22
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.stories.js +33 -10
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +73 -17
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.stories.js +73 -9
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +75 -19
- package/dist/Atomic/FormElements/Input/Input.js +100 -45
- package/dist/Atomic/FormElements/Input/Input.stories.js +73 -9
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +85 -29
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +78 -14
- package/dist/Atomic/FormElements/InputColor/InputColor.js +30 -15
- package/dist/Atomic/FormElements/InputColor/InputColor.stories.js +73 -9
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.interface.js +4 -1
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +73 -17
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.stories.js +52 -14
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.test.js +45 -36
- package/dist/Atomic/FormElements/InputCurrency/index.js +16 -1
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +128 -72
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +75 -11
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +30 -15
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +182 -126
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +98 -42
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +24 -9
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +144 -53
- package/dist/Atomic/FormElements/InputLink/InputLink.js +76 -20
- package/dist/Atomic/FormElements/InputLink/InputLink.stories.js +73 -9
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +20 -2
- package/dist/Atomic/FormElements/InputMask/InputMask.js +158 -103
- package/dist/Atomic/FormElements/InputMask/InputMask.stories.js +81 -17
- package/dist/Atomic/FormElements/InputMask/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask/functions.js +59 -14
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +129 -73
- package/dist/Atomic/FormElements/InputMask2/InputMask2.stories.js +77 -13
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask2/functions.js +59 -14
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +133 -77
- package/dist/Atomic/FormElements/InputMask3/InputMask3.stories.js +79 -15
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask3/functions.js +59 -14
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +79 -23
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.stories.js +72 -8
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +81 -25
- package/dist/Atomic/FormElements/InputsRow/InputsRow.stories.js +31 -8
- package/dist/Atomic/FormElements/Label/Label.interface.js +4 -1
- package/dist/Atomic/FormElements/Label/Label.js +31 -16
- package/dist/Atomic/FormElements/Label/Label.stories.js +30 -7
- package/dist/Atomic/FormElements/Label/Label.test.js +46 -37
- package/dist/Atomic/FormElements/Label/index.js +17 -2
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +124 -68
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +74 -10
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +67 -11
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +73 -9
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +105 -49
- package/dist/Atomic/FormElements/NumericInput/NumericInput.stories.js +75 -11
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +67 -11
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.stories.js +31 -8
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +33 -18
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.stories.js +73 -9
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +27 -12
- package/dist/Atomic/FormElements/RadioInput/RadioInput.stories.js +31 -8
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +25 -10
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.stories.js +73 -9
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +92 -36
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +85 -21
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +81 -25
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +74 -10
- package/dist/Atomic/FormElements/RangeList/RangeList.js +89 -34
- package/dist/Atomic/FormElements/RangeList/RangeList.stories.js +81 -14
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +37 -14
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +120 -64
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.js +102 -38
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +137 -81
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.stories.js +82 -18
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +26 -11
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.stories.js +85 -21
- package/dist/Atomic/FormElements/Switcher/Switcher.js +31 -16
- package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +74 -10
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +26 -11
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +24 -9
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +68 -13
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.stories.js +74 -10
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +64 -8
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +26 -11
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.stories.js +76 -12
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +81 -25
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.stories.js +78 -14
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +30 -15
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.stories.js +76 -12
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +70 -14
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.stories.js +73 -9
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +208 -152
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +80 -16
- package/dist/Atomic/FormElements/Text/Text.js +25 -10
- package/dist/Atomic/FormElements/Text/Text.stories.js +30 -7
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +27 -12
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +74 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.test.js +26 -17
- package/dist/Atomic/FormElements/Textarea/Textarea.js +69 -13
- package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +75 -11
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +77 -22
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +76 -12
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +27 -12
- package/dist/Atomic/FormElements/TimeRange/TimeRange.interface.js +4 -1
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +79 -23
- package/dist/Atomic/FormElements/TimeRange/TimeRange.stories.js +30 -7
- package/dist/Atomic/FormElements/TimeRange/TimeRange.test.js +59 -50
- package/dist/Atomic/FormElements/TimeRange/index.js +17 -2
- package/dist/Atomic/FormElements/UserContacts/UserContact.test.js +77 -68
- package/dist/Atomic/FormElements/UserContacts/UserContacts.interface.js +4 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +79 -23
- package/dist/Atomic/FormElements/UserContacts/UserContacts.stories.js +31 -8
- package/dist/Atomic/FormElements/UserContacts/index.js +17 -2
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +71 -15
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.stories.js +78 -14
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +39 -24
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +45 -30
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.stories.js +81 -17
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +11 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +45 -30
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.stories.js +82 -18
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +11 -1
- package/dist/Atomic/Layout/Header/Header.js +83 -27
- package/dist/Atomic/Layout/Header/Header.stories.js +31 -8
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +107 -51
- package/dist/Atomic/Layout/MainMenu/MainMenu.stories.js +31 -8
- package/dist/Atomic/Layout/Spinner/Spinner.interface.js +4 -1
- package/dist/Atomic/Layout/Spinner/Spinner.js +28 -13
- package/dist/Atomic/Layout/Spinner/Spinner.stories.js +30 -7
- package/dist/Atomic/Layout/Spinner/Spinner.test.js +22 -13
- package/dist/Atomic/Layout/Spinner/index.js +17 -2
- package/dist/Atomic/UI/Accordion/Accordion.interface.js +4 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +77 -21
- package/dist/Atomic/UI/Accordion/Accordion.stories.js +36 -10
- package/dist/Atomic/UI/Accordion/Accordion.test.js +18 -9
- package/dist/Atomic/UI/Accordion/AccordionItem.js +84 -28
- package/dist/Atomic/UI/Accordion/AccordionItem.test.js +18 -9
- package/dist/Atomic/UI/Accordion/index.js +17 -2
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +99 -43
- package/dist/Atomic/UI/AccordionTable/AccordionTable.stories.js +80 -16
- package/dist/Atomic/UI/AccordionText/AccordionText.js +73 -18
- package/dist/Atomic/UI/AccordionText/AccordionText.stories.js +59 -36
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -38
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +70 -14
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +31 -8
- package/dist/Atomic/UI/Alert/Alert.js +78 -22
- package/dist/Atomic/UI/Alert/Alert.stories.js +38 -12
- package/dist/Atomic/UI/Arrow/Arrow.js +78 -22
- package/dist/Atomic/UI/Arrow/Arrow.stories.js +31 -8
- package/dist/Atomic/UI/Box/Box.js +22 -8
- package/dist/Atomic/UI/Box/Box.stories.js +41 -18
- package/dist/Atomic/UI/Button/Button.js +24 -9
- package/dist/Atomic/UI/Button/Button.stories.js +32 -9
- package/dist/Atomic/UI/Button/Button.test.js +51 -42
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +30 -15
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.stories.js +35 -13
- package/dist/Atomic/UI/Chart/Chart.js +105 -49
- package/dist/Atomic/UI/Chart/Chart.stories.js +31 -8
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +44 -8
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +30 -15
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -9
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +41 -16
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +24 -3
- package/dist/Atomic/UI/Chart/partial/utils.js +45 -13
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +76 -20
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.stories.js +32 -9
- package/dist/Atomic/UI/DateTime/DateTime.js +70 -14
- package/dist/Atomic/UI/DateTime/DateTime.stories.js +32 -9
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +65 -14
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +62 -6
- package/dist/Atomic/UI/DoubleString/DoubleString.js +85 -29
- package/dist/Atomic/UI/DoubleString/DoubleString.stories.js +39 -13
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.interface.js +4 -1
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +58 -7
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.stories.js +72 -8
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.test.js +24 -15
- package/dist/Atomic/UI/DynamicIcon/index.js +17 -2
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +101 -46
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.stories.js +72 -8
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +41 -12
- package/dist/Atomic/UI/Hint/Hint.interface.js +4 -1
- package/dist/Atomic/UI/Hint/Hint.js +93 -37
- package/dist/Atomic/UI/Hint/Hint.stories.js +38 -15
- package/dist/Atomic/UI/Hint/Hint.test.js +13 -4
- package/dist/Atomic/UI/Hint/index.js +17 -2
- package/dist/Atomic/UI/Hint/partials/_utils.js +36 -11
- package/dist/Atomic/UI/Modal/Modal.interface.js +4 -1
- package/dist/Atomic/UI/Modal/Modal.js +61 -35
- package/dist/Atomic/UI/Modal/Modal.stories.js +85 -38
- package/dist/Atomic/UI/Modal/ModalHOC.js +68 -12
- package/dist/Atomic/UI/Modal/ModalHOC.stories.js +59 -27
- package/dist/Atomic/UI/Modal/ModalHOC.test.js +47 -38
- package/dist/Atomic/UI/Modal/index.js +26 -4
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +63 -7
- package/dist/Atomic/UI/Modal/partials/ModalFooter.test.js +40 -31
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +71 -15
- package/dist/Atomic/UI/Modal/partials/ModalTitle.test.js +39 -30
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +34 -19
- package/dist/Atomic/UI/Modal/partials/useMobileModal.test.js +28 -19
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +34 -25
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.interface.js +4 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +73 -17
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.stories.js +184 -101
- package/dist/Atomic/UI/MonoAccordion/index.js +17 -2
- package/dist/Atomic/UI/NavLine/NavLine.interface.js +4 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +102 -46
- package/dist/Atomic/UI/NavLine/NavLine.stories.js +116 -32
- package/dist/Atomic/UI/NavLine/NavLine.test.js +53 -44
- package/dist/Atomic/UI/NavLine/index.js +17 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.interface.js +4 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.js +34 -19
- package/dist/Atomic/UI/PageTitle/PageTitle.stories.js +33 -10
- package/dist/Atomic/UI/PageTitle/PageTitle.test.js +51 -42
- package/dist/Atomic/UI/PageTitle/index.js +17 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +35 -66
- package/dist/Atomic/UI/PieChart/PieChart.scss +11 -87
- package/dist/Atomic/UI/PieChart/PieChart.stories.js +81 -56
- package/dist/Atomic/UI/Price/Price.interface.js +4 -1
- package/dist/Atomic/UI/Price/Price.js +24 -9
- package/dist/Atomic/UI/Price/Price.stories.js +30 -7
- package/dist/Atomic/UI/Price/Price.test.js +21 -12
- package/dist/Atomic/UI/Price/index.js +17 -2
- package/dist/Atomic/UI/PriceRange/PriceRange.interface.js +4 -1
- package/dist/Atomic/UI/PriceRange/PriceRange.js +26 -11
- package/dist/Atomic/UI/PriceRange/PriceRange.stories.js +30 -7
- package/dist/Atomic/UI/PriceRange/PriceRange.test.js +18 -9
- package/dist/Atomic/UI/PriceRange/index.js +17 -2
- package/dist/Atomic/UI/ProgressLine/ProgressLine.interface.js +4 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +32 -17
- package/dist/Atomic/UI/ProgressLine/ProgressLine.stories.js +30 -7
- package/dist/Atomic/UI/ProgressLine/ProgressLine.test.js +18 -9
- package/dist/Atomic/UI/ProgressLine/index.js +17 -2
- package/dist/Atomic/UI/Status/Status.interface.js +4 -1
- package/dist/Atomic/UI/Status/Status.js +31 -16
- package/dist/Atomic/UI/Status/Status.stories.js +34 -8
- package/dist/Atomic/UI/Status/Status.test.js +32 -23
- package/dist/Atomic/UI/Status/index.js +17 -2
- package/dist/Atomic/UI/Table/Partials/TdCell.js +79 -23
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +32 -17
- package/dist/Atomic/UI/Table/Partials/TdRow.js +81 -25
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +75 -19
- package/dist/Atomic/UI/Table/Table.js +32 -17
- package/dist/Atomic/UI/Table/Table.stories.js +73 -9
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +74 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +28 -13
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +16 -6
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +32 -17
- package/dist/Atomic/UI/Tag/Tag.interface.js +4 -1
- package/dist/Atomic/UI/Tag/Tag.js +80 -24
- package/dist/Atomic/UI/Tag/Tag.stories.js +38 -15
- package/dist/Atomic/UI/Tag/Tag.test.js +30 -21
- package/dist/Atomic/UI/Tag/index.js +17 -2
- package/dist/Atomic/UI/TagList/TagList.js +84 -28
- package/dist/Atomic/UI/TagList/TagList.stories.js +80 -16
- package/dist/Atomic/UI/UserBox/UserBox.interface.js +4 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +37 -22
- package/dist/Atomic/UI/UserBox/UserBox.stories.js +30 -7
- package/dist/Atomic/UI/UserBox/UserBox.test.js +74 -24
- package/dist/Atomic/UI/UserBox/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/WizardStepper.stories.js +34 -11
- package/dist/Atomic/UI/WizardStepper/constructor.js +34 -11
- package/dist/Atomic/UI/WizardStepper/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +31 -16
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +12 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +39 -25
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +34 -19
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +39 -24
- package/dist/Atomic/UI/WizardStepper/ui/index.js +17 -2
- package/dist/Classes/AbortableFetch.js +12 -2
- package/dist/Classes/AnimatedHandler.js +11 -1
- package/dist/Classes/RESTAPI/index.js +24 -9
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +12 -2
- package/dist/Classes/RESTAPI/partials/ApiBase.js +18 -3
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +25 -10
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +22 -7
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +20 -5
- package/dist/Classes/RESTAPI/partials/Utils.js +14 -4
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +18 -3
- package/dist/Classes/RESTAPI/partials/_utils.js +43 -10
- package/dist/Constants/index.constants.js +40 -7
- package/dist/DeepPartial.d.ts +40 -0
- package/dist/DeepReadonly.d.ts +38 -0
- package/dist/DeepRequired.d.ts +50 -0
- package/dist/Flatten.d.ts +34 -0
- package/dist/FunctionType.d.ts +37 -0
- package/dist/Functions/Portal.js +62 -6
- package/dist/Functions/customEventListener.js +1 -0
- package/dist/Functions/dateTime.js +31 -21
- package/dist/Functions/fieldValueFormatters.js +79 -61
- package/dist/Functions/guards/assertions.js +19 -4
- package/dist/Functions/guards/safeValue.js +21 -6
- package/dist/Functions/guards/typeGuards.js +12 -2
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +55 -4
- package/dist/Functions/locale/createTranslator.js +13 -3
- package/dist/Functions/operations.js +11 -1
- package/dist/Functions/presets/inputMaskPresets.js +12 -2
- package/dist/Functions/presets/inputPresets.js +14 -4
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +24 -32
- package/dist/Functions/schemas.js +77 -15
- package/dist/Functions/useBodyScrollLock.js +13 -3
- package/dist/Functions/useClickOutside.js +13 -3
- package/dist/Functions/useDebounce.js +55 -4
- package/dist/Functions/useFieldFocus.js +17 -7
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +18 -3
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +11 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +18 -3
- package/dist/Functions/useFormTools/functions/General.js +11 -1
- package/dist/Functions/useFormTools/functions/RenderFields.js +16 -6
- package/dist/Functions/useFormTools/functions/usePrevious.js +14 -4
- package/dist/Functions/useFormTools/index.js +50 -35
- package/dist/Functions/useInputHighlightError.js +68 -9
- package/dist/Functions/useIsMobile/index.js +17 -2
- package/dist/Functions/useIsMobile/useIsMobile.js +14 -4
- package/dist/Functions/useIsMobile/useIsMobile.test.js +18 -9
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +21 -6
- package/dist/Functions/useKeyPress/useHandleKeyPress.test.js +20 -11
- package/dist/Functions/useKeyPress/useKeyPress.js +16 -6
- package/dist/Functions/useKeyPress/useKeyPress.test.js +25 -16
- package/dist/Functions/useLocalStorage.js +13 -3
- package/dist/Functions/useLocationParams.js +14 -4
- package/dist/Functions/useMediaQuery.js +13 -3
- package/dist/Functions/useMetaInfo.js +27 -9
- package/dist/Functions/useMouseUpOutside.js +13 -3
- package/dist/Functions/useOnlineStatus.js +14 -4
- package/dist/Functions/usePasswordChecker.js +69 -13
- package/dist/Functions/usePrevious.js +14 -4
- package/dist/Functions/useResize.js +15 -5
- package/dist/Functions/useScrollTo.js +15 -5
- package/dist/Functions/useToggle.js +16 -6
- package/dist/Functions/utils.js +173 -67
- package/dist/If.d.ts +34 -0
- package/dist/KeysType.d.ts +10 -0
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +57 -6
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +57 -6
- package/dist/Molecular/CustomIcons/components/AppStore.js +59 -8
- package/dist/Molecular/CustomIcons/components/Arrow.js +62 -11
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +55 -4
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +56 -5
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +56 -5
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +55 -4
- package/dist/Molecular/CustomIcons/components/Bell.js +55 -4
- package/dist/Molecular/CustomIcons/components/Button.js +55 -4
- package/dist/Molecular/CustomIcons/components/Campaigns.js +55 -4
- package/dist/Molecular/CustomIcons/components/Check.js +55 -4
- package/dist/Molecular/CustomIcons/components/Check2.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +58 -7
- package/dist/Molecular/CustomIcons/components/Close.js +56 -5
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +60 -9
- package/dist/Molecular/CustomIcons/components/Delete.js +55 -4
- package/dist/Molecular/CustomIcons/components/Edit.js +55 -4
- package/dist/Molecular/CustomIcons/components/Email.js +59 -8
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +60 -9
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +59 -8
- package/dist/Molecular/CustomIcons/components/Flows.js +55 -4
- package/dist/Molecular/CustomIcons/components/Gift.js +56 -5
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +59 -8
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +59 -8
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +56 -5
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +56 -5
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +56 -5
- package/dist/Molecular/CustomIcons/components/Home.js +56 -5
- package/dist/Molecular/CustomIcons/components/Home2.js +56 -5
- package/dist/Molecular/CustomIcons/components/Key.js +55 -4
- package/dist/Molecular/CustomIcons/components/Landers.js +56 -5
- package/dist/Molecular/CustomIcons/components/Lock.js +55 -4
- package/dist/Molecular/CustomIcons/components/Mail.js +57 -6
- package/dist/Molecular/CustomIcons/components/Mastercard.js +67 -16
- package/dist/Molecular/CustomIcons/components/Minus.js +58 -7
- package/dist/Molecular/CustomIcons/components/Offers.js +55 -4
- package/dist/Molecular/CustomIcons/components/Pause.js +58 -7
- package/dist/Molecular/CustomIcons/components/PayPal.js +61 -10
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +59 -8
- package/dist/Molecular/CustomIcons/components/Phone.js +58 -7
- package/dist/Molecular/CustomIcons/components/Play.js +58 -7
- package/dist/Molecular/CustomIcons/components/Plus.js +58 -7
- package/dist/Molecular/CustomIcons/components/Profile.js +56 -5
- package/dist/Molecular/CustomIcons/components/QRCode.js +59 -8
- package/dist/Molecular/CustomIcons/components/Rectangle.js +55 -4
- package/dist/Molecular/CustomIcons/components/Revert.js +56 -5
- package/dist/Molecular/CustomIcons/components/Star.js +55 -4
- package/dist/Molecular/CustomIcons/components/Star2.js +55 -4
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +57 -6
- package/dist/Molecular/CustomIcons/components/Trash.js +55 -4
- package/dist/Molecular/CustomIcons/components/TrashRed.js +55 -4
- package/dist/Molecular/CustomIcons/components/Triggers.js +55 -4
- package/dist/Molecular/CustomIcons/components/User.js +56 -5
- package/dist/Molecular/CustomIcons/components/Visa.js +61 -10
- package/dist/Molecular/CustomIcons/components/X.js +55 -4
- package/dist/Molecular/CustomIcons/index.js +78 -61
- package/dist/Molecular/FormElement/FormElement.js +28 -13
- package/dist/Molecular/FormElement/FormElement.stories.js +33 -10
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +74 -19
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.stories.js +81 -17
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +13 -3
- package/dist/Molecular/InputAddress/InputAddress.js +139 -83
- package/dist/Molecular/InputAddress/InputAddress.stories.js +78 -14
- package/dist/Molecular/InputPassword/InputPassword.js +73 -17
- package/dist/Molecular/InputPassword/InputPassword.stories.js +72 -8
- package/dist/NonNullableType.d.ts +13 -0
- package/dist/ObjectType.d.ts +9 -0
- package/dist/OnlyObjectKeys.d.ts +65 -0
- package/dist/PrettyPrint.d.ts +29 -0
- package/dist/RequiredFields.d.ts +21 -0
- package/dist/TupleType.d.ts +10 -0
- package/dist/ValuesType.d.ts +10 -0
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.d.ts +7 -3
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.stories.d.ts +15 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/base.interface.js +4 -1
- package/dist/types/base.types.js +4 -1
- package/package.json +16 -3
- package/dist/Atomic/UI/PieChart/PieChar.interface.js +0 -1
- package/dist/Atomic/UI/PieChart/PieChart.test.js +0 -133
- package/dist/Atomic/UI/PieChart/index.js +0 -5
- package/dist/lib/src/Atomic/UI/PieChart/PieChar.interface.d.ts +0 -36
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.test.d.ts +0 -1
- package/dist/lib/src/Atomic/UI/PieChart/index.d.ts +0 -13
|
@@ -1,15 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _useHandleKeyPress = /*#__PURE__*/ _interop_require_default(require("../../../Functions/useKeyPress/useHandleKeyPress"));
|
|
15
|
+
require("./Modal.scss");
|
|
16
|
+
function _interop_require_default(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : {
|
|
18
|
+
default: obj
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
22
|
+
if (typeof WeakMap !== "function") return null;
|
|
23
|
+
var cacheBabelInterop = new WeakMap();
|
|
24
|
+
var cacheNodeInterop = new WeakMap();
|
|
25
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
26
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
27
|
+
})(nodeInterop);
|
|
28
|
+
}
|
|
29
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
30
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
33
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
34
|
+
return {
|
|
35
|
+
default: obj
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
39
|
+
if (cache && cache.has(obj)) {
|
|
40
|
+
return cache.get(obj);
|
|
41
|
+
}
|
|
42
|
+
var newObj = {
|
|
43
|
+
__proto__: null
|
|
44
|
+
};
|
|
45
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
46
|
+
for(var key in obj){
|
|
47
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
48
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
49
|
+
if (desc && (desc.get || desc.set)) {
|
|
50
|
+
Object.defineProperty(newObj, key, desc);
|
|
51
|
+
} else {
|
|
52
|
+
newObj[key] = obj[key];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
newObj.default = obj;
|
|
57
|
+
if (cache) {
|
|
58
|
+
cache.set(obj, newObj);
|
|
59
|
+
}
|
|
60
|
+
return newObj;
|
|
61
|
+
}
|
|
6
62
|
const Modal = ({ zIndex = 100, isOpen, closeModal, children, className, size, testId = 'modal', closeOnEsc = true })=>{
|
|
7
|
-
const modalRef = useRef(null);
|
|
8
|
-
|
|
63
|
+
const modalRef = (0, _react.useRef)(null);
|
|
64
|
+
(0, _useHandleKeyPress.default)({
|
|
9
65
|
escCallback: closeOnEsc && typeof closeModal === 'function' ? ()=>closeModal === null || closeModal === void 0 ? void 0 : closeModal() : undefined
|
|
10
66
|
});
|
|
11
67
|
if (!isOpen) return null;
|
|
12
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
13
69
|
style: {
|
|
14
70
|
zIndex
|
|
15
71
|
},
|
|
@@ -17,18 +73,18 @@ const Modal = ({ zIndex = 100, isOpen, closeModal, children, className, size, te
|
|
|
17
73
|
className: "modal-box j5",
|
|
18
74
|
role: "presentation",
|
|
19
75
|
children: [
|
|
20
|
-
/*#__PURE__*/
|
|
76
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
21
77
|
className: "modal-overlay",
|
|
22
78
|
onClick: closeModal,
|
|
23
79
|
role: "presentation",
|
|
24
80
|
"aria-hidden": "true"
|
|
25
81
|
}),
|
|
26
|
-
/*#__PURE__*/
|
|
82
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
27
83
|
ref: modalRef,
|
|
28
84
|
style: {
|
|
29
85
|
width: size
|
|
30
86
|
},
|
|
31
|
-
className:
|
|
87
|
+
className: (0, _classnames.default)(className, 'modal'),
|
|
32
88
|
role: "dialog",
|
|
33
89
|
"aria-modal": "true",
|
|
34
90
|
"aria-labelledby": testId,
|
|
@@ -38,4 +94,4 @@ const Modal = ({ zIndex = 100, isOpen, closeModal, children, className, size, te
|
|
|
38
94
|
]
|
|
39
95
|
});
|
|
40
96
|
};
|
|
41
|
-
|
|
97
|
+
const _default = Modal;
|
|
@@ -1,15 +1,50 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
Default: function() {
|
|
14
|
+
return Default;
|
|
15
|
+
},
|
|
16
|
+
EmptyContent: function() {
|
|
17
|
+
return EmptyContent;
|
|
18
|
+
},
|
|
19
|
+
LargeModal: function() {
|
|
20
|
+
return LargeModal;
|
|
21
|
+
},
|
|
22
|
+
NoEscapeKey: function() {
|
|
23
|
+
return NoEscapeKey;
|
|
24
|
+
},
|
|
25
|
+
SmallModal: function() {
|
|
26
|
+
return SmallModal;
|
|
27
|
+
},
|
|
28
|
+
default: function() {
|
|
29
|
+
return _default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
33
|
+
const _react = require("react");
|
|
34
|
+
const _Dropdown = /*#__PURE__*/ _interop_require_default(require("../../FormElements/Dropdown/Dropdown"));
|
|
35
|
+
const _Alert = /*#__PURE__*/ _interop_require_default(require("../Alert/Alert"));
|
|
36
|
+
const _Button = /*#__PURE__*/ _interop_require_default(require("../Button/Button"));
|
|
37
|
+
const _Hint = /*#__PURE__*/ _interop_require_default(require("../Hint/Hint"));
|
|
38
|
+
const _ModalHOC = /*#__PURE__*/ _interop_require_default(require("./ModalHOC"));
|
|
39
|
+
require("../../../../../scss/main.scss");
|
|
40
|
+
function _interop_require_default(obj) {
|
|
41
|
+
return obj && obj.__esModule ? obj : {
|
|
42
|
+
default: obj
|
|
43
|
+
};
|
|
44
|
+
}
|
|
10
45
|
const meta = {
|
|
11
46
|
title: 'UI/Modal/ModalHOC',
|
|
12
|
-
component:
|
|
47
|
+
component: _ModalHOC.default,
|
|
13
48
|
parameters: {
|
|
14
49
|
layout: 'centered',
|
|
15
50
|
docs: {
|
|
@@ -73,33 +108,33 @@ const meta = {
|
|
|
73
108
|
}
|
|
74
109
|
}
|
|
75
110
|
};
|
|
76
|
-
|
|
111
|
+
const _default = meta;
|
|
77
112
|
const Template = ({ isShowEmptyContent = false, ...args })=>{
|
|
78
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
113
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
79
114
|
const closeModal = ()=>setIsOpen(false);
|
|
80
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
81
116
|
children: [
|
|
82
|
-
/*#__PURE__*/
|
|
117
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
83
118
|
onClick: ()=>setIsOpen(true),
|
|
84
119
|
label: "Show modal",
|
|
85
120
|
variant: "primary"
|
|
86
121
|
}),
|
|
87
|
-
/*#__PURE__*/
|
|
122
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
88
123
|
...args,
|
|
89
124
|
isOpen: isOpen,
|
|
90
125
|
closeModal: closeModal,
|
|
91
|
-
children: !isShowEmptyContent && /*#__PURE__*/
|
|
126
|
+
children: !isShowEmptyContent && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
92
127
|
className: "modal__body",
|
|
93
128
|
children: [
|
|
94
|
-
/*#__PURE__*/
|
|
129
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("h2", {
|
|
95
130
|
children: "Modal Content"
|
|
96
131
|
}),
|
|
97
|
-
/*#__PURE__*/
|
|
132
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Alert.default, {
|
|
98
133
|
message: "Info alert",
|
|
99
134
|
variant: "info",
|
|
100
135
|
className: "mb5"
|
|
101
136
|
}),
|
|
102
|
-
/*#__PURE__*/
|
|
137
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Dropdown.default, {
|
|
103
138
|
entity: "example",
|
|
104
139
|
value: "option1",
|
|
105
140
|
placeholder: "Select an option",
|
|
@@ -119,7 +154,7 @@ const Template = ({ isShowEmptyContent = false, ...args })=>{
|
|
|
119
154
|
],
|
|
120
155
|
className: "mb5"
|
|
121
156
|
}),
|
|
122
|
-
/*#__PURE__*/
|
|
157
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Hint.default, {
|
|
123
158
|
hint: "This is a helpful hint",
|
|
124
159
|
side: "right",
|
|
125
160
|
className: "mb5"
|
|
@@ -130,29 +165,26 @@ const Template = ({ isShowEmptyContent = false, ...args })=>{
|
|
|
130
165
|
]
|
|
131
166
|
});
|
|
132
167
|
};
|
|
133
|
-
|
|
134
|
-
export const Default = Template.bind({});
|
|
168
|
+
const Default = Template.bind({});
|
|
135
169
|
Default.args = {
|
|
136
170
|
submitHandler: ()=>console.log('Submit clicked')
|
|
137
171
|
};
|
|
138
|
-
|
|
139
|
-
export const SmallModal = Template.bind({});
|
|
172
|
+
const SmallModal = Template.bind({});
|
|
140
173
|
SmallModal.args = {
|
|
141
174
|
...Default.args,
|
|
142
175
|
size: 290
|
|
143
176
|
};
|
|
144
|
-
|
|
177
|
+
const LargeModal = Template.bind({});
|
|
145
178
|
LargeModal.args = {
|
|
146
179
|
...Default.args,
|
|
147
180
|
size: 950
|
|
148
181
|
};
|
|
149
|
-
|
|
182
|
+
const EmptyContent = Template.bind({});
|
|
150
183
|
EmptyContent.args = {
|
|
151
184
|
...Default.args,
|
|
152
185
|
isShowEmptyContent: true
|
|
153
186
|
};
|
|
154
|
-
|
|
155
|
-
export const NoEscapeKey = Template.bind({});
|
|
187
|
+
const NoEscapeKey = Template.bind({});
|
|
156
188
|
NoEscapeKey.args = {
|
|
157
189
|
...Default.args,
|
|
158
190
|
closeOnEsc: false
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
6
|
+
const _react = require("@testing-library/react");
|
|
7
|
+
const _userevent = /*#__PURE__*/ _interop_require_default(require("@testing-library/user-event"));
|
|
8
|
+
const _ModalHOC = /*#__PURE__*/ _interop_require_default(require("./ModalHOC"));
|
|
9
|
+
function _interop_require_default(obj) {
|
|
10
|
+
return obj && obj.__esModule ? obj : {
|
|
11
|
+
default: obj
|
|
12
|
+
};
|
|
13
|
+
}
|
|
5
14
|
const defaultProps = {
|
|
6
15
|
isOpen: true,
|
|
7
16
|
closeModal: jest.fn(),
|
|
8
|
-
children: /*#__PURE__*/
|
|
17
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
9
18
|
children: "Modal Content"
|
|
10
19
|
})
|
|
11
20
|
};
|
|
@@ -15,61 +24,61 @@ describe('modal', ()=>{
|
|
|
15
24
|
});
|
|
16
25
|
describe('rendering', ()=>{
|
|
17
26
|
it('should not render when isOpen is false', ()=>{
|
|
18
|
-
render(/*#__PURE__*/
|
|
27
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
19
28
|
...defaultProps,
|
|
20
29
|
isOpen: false
|
|
21
30
|
}));
|
|
22
|
-
expect(screen.queryByTestId('modal')).not.toBeInTheDocument();
|
|
31
|
+
expect(_react.screen.queryByTestId('modal')).not.toBeInTheDocument();
|
|
23
32
|
});
|
|
24
33
|
it('should render with default testId', ()=>{
|
|
25
|
-
render(/*#__PURE__*/
|
|
34
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
26
35
|
...defaultProps
|
|
27
36
|
}));
|
|
28
|
-
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
|
37
|
+
expect(_react.screen.getByTestId('modal')).toBeInTheDocument();
|
|
29
38
|
});
|
|
30
39
|
it('should render with custom testId', ()=>{
|
|
31
40
|
const customTestId = 'custom-modal';
|
|
32
|
-
render(/*#__PURE__*/
|
|
41
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
33
42
|
...defaultProps,
|
|
34
43
|
testId: customTestId
|
|
35
44
|
}));
|
|
36
|
-
expect(screen.getByTestId(customTestId)).toBeInTheDocument();
|
|
45
|
+
expect(_react.screen.getByTestId(customTestId)).toBeInTheDocument();
|
|
37
46
|
});
|
|
38
47
|
it('should render children correctly', ()=>{
|
|
39
48
|
const childText = 'Test Content';
|
|
40
|
-
render(/*#__PURE__*/
|
|
49
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
41
50
|
...defaultProps,
|
|
42
51
|
children: childText
|
|
43
52
|
}));
|
|
44
|
-
expect(screen.getByText(childText)).toBeInTheDocument();
|
|
53
|
+
expect(_react.screen.getByText(childText)).toBeInTheDocument();
|
|
45
54
|
});
|
|
46
55
|
it('should apply custom className to modal', ()=>{
|
|
47
56
|
const customClass = 'custom-modal';
|
|
48
|
-
render(/*#__PURE__*/
|
|
57
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
49
58
|
...defaultProps,
|
|
50
59
|
className: customClass
|
|
51
60
|
}));
|
|
52
|
-
const modalElement = screen.getByRole('dialog');
|
|
61
|
+
const modalElement = _react.screen.getByRole('dialog');
|
|
53
62
|
expect(modalElement).toHaveClass(customClass, 'modal');
|
|
54
63
|
});
|
|
55
64
|
it('should apply custom size', ()=>{
|
|
56
65
|
const size = '500px';
|
|
57
|
-
render(/*#__PURE__*/
|
|
66
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
58
67
|
...defaultProps,
|
|
59
68
|
size: size
|
|
60
69
|
}));
|
|
61
|
-
const modalElement = screen.getByRole('dialog');
|
|
70
|
+
const modalElement = _react.screen.getByRole('dialog');
|
|
62
71
|
expect(modalElement).toHaveStyle({
|
|
63
72
|
width: size
|
|
64
73
|
});
|
|
65
74
|
});
|
|
66
75
|
it('should apply custom zIndex', ()=>{
|
|
67
76
|
const zIndex = 200;
|
|
68
|
-
render(/*#__PURE__*/
|
|
77
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
69
78
|
...defaultProps,
|
|
70
79
|
zIndex: zIndex
|
|
71
80
|
}));
|
|
72
|
-
const modalBox = screen.getByTestId('modal');
|
|
81
|
+
const modalBox = _react.screen.getByTestId('modal');
|
|
73
82
|
expect(modalBox).toHaveStyle({
|
|
74
83
|
zIndex
|
|
75
84
|
});
|
|
@@ -77,19 +86,19 @@ describe('modal', ()=>{
|
|
|
77
86
|
});
|
|
78
87
|
describe('accessibility', ()=>{
|
|
79
88
|
it('should have correct ARIA attributes', ()=>{
|
|
80
|
-
render(/*#__PURE__*/
|
|
89
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
81
90
|
...defaultProps
|
|
82
91
|
}));
|
|
83
|
-
const dialog = screen.getByRole('dialog');
|
|
92
|
+
const dialog = _react.screen.getByRole('dialog');
|
|
84
93
|
expect(dialog).toHaveAttribute('aria-modal', 'true');
|
|
85
94
|
expect(dialog).toHaveAttribute('aria-labelledby', 'modal');
|
|
86
95
|
expect(dialog).toHaveAttribute('tabIndex', '-1');
|
|
87
96
|
});
|
|
88
97
|
it('should have correct structure with presentation roles', ()=>{
|
|
89
|
-
render(/*#__PURE__*/
|
|
98
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
90
99
|
...defaultProps
|
|
91
100
|
}));
|
|
92
|
-
const modalBox = screen.getByTestId('modal');
|
|
101
|
+
const modalBox = _react.screen.getByTestId('modal');
|
|
93
102
|
expect(modalBox).toHaveAttribute('role', 'presentation');
|
|
94
103
|
expect(modalBox).toHaveClass('modal-box');
|
|
95
104
|
const overlay = modalBox.querySelector('.modal-overlay');
|
|
@@ -100,22 +109,22 @@ describe('modal', ()=>{
|
|
|
100
109
|
describe('interactions', ()=>{
|
|
101
110
|
it('should call closeModal when overlay is clicked', async ()=>{
|
|
102
111
|
const closeModal = jest.fn();
|
|
103
|
-
render(/*#__PURE__*/
|
|
112
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
104
113
|
...defaultProps,
|
|
105
114
|
closeModal: closeModal
|
|
106
115
|
}));
|
|
107
|
-
const overlay = screen.getByTestId('modal').querySelector('.modal-overlay');
|
|
108
|
-
await
|
|
116
|
+
const overlay = _react.screen.getByTestId('modal').querySelector('.modal-overlay');
|
|
117
|
+
await _userevent.default.click(overlay);
|
|
109
118
|
expect(closeModal).toHaveBeenCalledTimes(1);
|
|
110
119
|
});
|
|
111
120
|
it('should call closeModal on Escape key when closeOnEsc is true', ()=>{
|
|
112
121
|
const closeModal = jest.fn();
|
|
113
|
-
render(/*#__PURE__*/
|
|
122
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
114
123
|
...defaultProps,
|
|
115
124
|
closeModal: closeModal,
|
|
116
125
|
closeOnEsc: true
|
|
117
126
|
}));
|
|
118
|
-
fireEvent.keyDown(document, {
|
|
127
|
+
_react.fireEvent.keyDown(document, {
|
|
119
128
|
key: 'Escape',
|
|
120
129
|
code: 'Escape'
|
|
121
130
|
});
|
|
@@ -123,12 +132,12 @@ describe('modal', ()=>{
|
|
|
123
132
|
});
|
|
124
133
|
it('should not call closeModal on Escape key when closeOnEsc is false', ()=>{
|
|
125
134
|
const closeModal = jest.fn();
|
|
126
|
-
render(/*#__PURE__*/
|
|
135
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
127
136
|
...defaultProps,
|
|
128
137
|
closeModal: closeModal,
|
|
129
138
|
closeOnEsc: false
|
|
130
139
|
}));
|
|
131
|
-
fireEvent.keyDown(document, {
|
|
140
|
+
_react.fireEvent.keyDown(document, {
|
|
132
141
|
key: 'Escape',
|
|
133
142
|
code: 'Escape'
|
|
134
143
|
});
|
|
@@ -139,37 +148,37 @@ describe('modal', ()=>{
|
|
|
139
148
|
it('should handle undefined closeModal', ()=>{
|
|
140
149
|
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(()=>{});
|
|
141
150
|
// @ts-ignore
|
|
142
|
-
render(/*#__PURE__*/
|
|
151
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
143
152
|
...defaultProps,
|
|
144
153
|
closeModal: undefined
|
|
145
154
|
}));
|
|
146
|
-
fireEvent.keyDown(document, {
|
|
155
|
+
_react.fireEvent.keyDown(document, {
|
|
147
156
|
key: 'Escape'
|
|
148
157
|
});
|
|
149
158
|
expect(consoleSpy).not.toHaveBeenCalled();
|
|
150
159
|
consoleSpy.mockRestore();
|
|
151
160
|
});
|
|
152
161
|
it('should handle null children', ()=>{
|
|
153
|
-
render(/*#__PURE__*/
|
|
162
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
154
163
|
...defaultProps,
|
|
155
164
|
children: null
|
|
156
165
|
}));
|
|
157
|
-
const dialog = screen.getByRole('dialog');
|
|
166
|
+
const dialog = _react.screen.getByRole('dialog');
|
|
158
167
|
expect(dialog).toBeEmptyDOMElement();
|
|
159
168
|
});
|
|
160
169
|
it('should handle empty children', ()=>{
|
|
161
|
-
render(/*#__PURE__*/
|
|
170
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
162
171
|
...defaultProps,
|
|
163
172
|
children: undefined
|
|
164
173
|
}));
|
|
165
|
-
const dialog = screen.getByRole('dialog');
|
|
174
|
+
const dialog = _react.screen.getByRole('dialog');
|
|
166
175
|
expect(dialog).toBeEmptyDOMElement();
|
|
167
176
|
});
|
|
168
177
|
it('should use default zIndex when not provided', ()=>{
|
|
169
|
-
render(/*#__PURE__*/
|
|
178
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_ModalHOC.default, {
|
|
170
179
|
...defaultProps
|
|
171
180
|
}));
|
|
172
|
-
const modalBox = screen.getByTestId('modal');
|
|
181
|
+
const modalBox = _react.screen.getByTestId('modal');
|
|
173
182
|
expect(modalBox).toHaveStyle({
|
|
174
183
|
zIndex: 100
|
|
175
184
|
});
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ModalHOC: function() {
|
|
13
|
+
return _ModalHOC.default;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _Modal = /*#__PURE__*/ _interop_require_default(require("./Modal"));
|
|
20
|
+
const _ModalHOC = /*#__PURE__*/ _interop_require_default(require("./ModalHOC"));
|
|
21
|
+
function _interop_require_default(obj) {
|
|
22
|
+
return obj && obj.__esModule ? obj : {
|
|
23
|
+
default: obj
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const _default = _Modal.default;
|
|
@@ -1,15 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
+
if (typeof WeakMap !== "function") return null;
|
|
21
|
+
var cacheBabelInterop = new WeakMap();
|
|
22
|
+
var cacheNodeInterop = new WeakMap();
|
|
23
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
24
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
25
|
+
})(nodeInterop);
|
|
26
|
+
}
|
|
27
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
28
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
29
|
+
return obj;
|
|
30
|
+
}
|
|
31
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
32
|
+
return {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
37
|
+
if (cache && cache.has(obj)) {
|
|
38
|
+
return cache.get(obj);
|
|
39
|
+
}
|
|
40
|
+
var newObj = {
|
|
41
|
+
__proto__: null
|
|
42
|
+
};
|
|
43
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
+
for(var key in obj){
|
|
45
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
+
if (desc && (desc.get || desc.set)) {
|
|
48
|
+
Object.defineProperty(newObj, key, desc);
|
|
49
|
+
} else {
|
|
50
|
+
newObj[key] = obj[key];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
newObj.default = obj;
|
|
55
|
+
if (cache) {
|
|
56
|
+
cache.set(obj, newObj);
|
|
57
|
+
}
|
|
58
|
+
return newObj;
|
|
59
|
+
}
|
|
60
|
+
const ModalFooter = /*#__PURE__*/ (0, _react.memo)(({ className = '', children, wrapperRef, testId = 'modal-footer' })=>{
|
|
61
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("footer", {
|
|
6
62
|
"data-testid": testId,
|
|
7
63
|
ref: wrapperRef,
|
|
8
|
-
className:
|
|
64
|
+
className: (0, _classnames.default)('modal__footer', className),
|
|
9
65
|
role: "contentinfo",
|
|
10
66
|
"aria-label": "Modal footer",
|
|
11
67
|
children: children
|
|
12
68
|
});
|
|
13
69
|
});
|
|
14
70
|
ModalFooter.displayName = 'ModalFooter';
|
|
15
|
-
|
|
71
|
+
const _default = ModalFooter;
|