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,10 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
TagTemplate: function() {
|
|
13
|
+
return TagTemplate;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = require("react");
|
|
21
|
+
const _Tag = /*#__PURE__*/ _interop_require_default(require("./Tag"));
|
|
22
|
+
require("../../../../../scss/main.scss");
|
|
23
|
+
function _interop_require_default(obj) {
|
|
24
|
+
return obj && obj.__esModule ? obj : {
|
|
25
|
+
default: obj
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const _default = {
|
|
6
29
|
title: 'UI/Tag',
|
|
7
|
-
component:
|
|
30
|
+
component: _Tag.default,
|
|
8
31
|
args: {
|
|
9
32
|
value: 'check',
|
|
10
33
|
label: 'Label test',
|
|
@@ -20,7 +43,7 @@ export default {
|
|
|
20
43
|
}
|
|
21
44
|
};
|
|
22
45
|
function Template(args) {
|
|
23
|
-
const [tags, setTags] = useState([
|
|
46
|
+
const [tags, setTags] = (0, _react.useState)([
|
|
24
47
|
{
|
|
25
48
|
id: '1',
|
|
26
49
|
label: 'Label test 1',
|
|
@@ -51,29 +74,29 @@ function Template(args) {
|
|
|
51
74
|
const newArray = tags.filter((item)=>item.value !== value);
|
|
52
75
|
setTags(newArray);
|
|
53
76
|
};
|
|
54
|
-
return /*#__PURE__*/
|
|
77
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
55
78
|
style: {
|
|
56
79
|
display: 'flex',
|
|
57
80
|
flexDirection: 'column',
|
|
58
81
|
rowGap: '2rem'
|
|
59
82
|
},
|
|
60
83
|
children: [
|
|
61
|
-
/*#__PURE__*/
|
|
84
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
62
85
|
children: [
|
|
63
|
-
/*#__PURE__*/
|
|
86
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
64
87
|
children: "single"
|
|
65
88
|
}),
|
|
66
|
-
/*#__PURE__*/
|
|
89
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
67
90
|
...args
|
|
68
91
|
})
|
|
69
92
|
]
|
|
70
93
|
}),
|
|
71
|
-
/*#__PURE__*/
|
|
94
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
72
95
|
children: [
|
|
73
|
-
/*#__PURE__*/
|
|
96
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
74
97
|
children: "multiple"
|
|
75
98
|
}),
|
|
76
|
-
tags.map((item)=>/*#__PURE__*/
|
|
99
|
+
tags.map((item)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
77
100
|
...item,
|
|
78
101
|
removeItem: (value)=>removeTagHandler(value)
|
|
79
102
|
}, item.id))
|
|
@@ -82,4 +105,4 @@ function Template(args) {
|
|
|
82
105
|
]
|
|
83
106
|
});
|
|
84
107
|
}
|
|
85
|
-
|
|
108
|
+
const TagTemplate = Template.bind({});
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 _Tag = /*#__PURE__*/ _interop_require_default(require("./Tag"));
|
|
8
|
+
function _interop_require_default(obj) {
|
|
9
|
+
return obj && obj.__esModule ? obj : {
|
|
10
|
+
default: obj
|
|
11
|
+
};
|
|
12
|
+
}
|
|
4
13
|
describe('tag', ()=>{
|
|
5
14
|
const defaultProps = {
|
|
6
15
|
value: 'test',
|
|
@@ -9,58 +18,58 @@ describe('tag', ()=>{
|
|
|
9
18
|
onClick: jest.fn()
|
|
10
19
|
};
|
|
11
20
|
it('renders with default props', ()=>{
|
|
12
|
-
render(/*#__PURE__*/
|
|
21
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
13
22
|
...defaultProps
|
|
14
23
|
}));
|
|
15
|
-
expect(screen.getByTestId('tag')).toBeInTheDocument();
|
|
16
|
-
expect(screen.getByText('Test Label')).toBeInTheDocument();
|
|
24
|
+
expect(_react.screen.getByTestId('tag')).toBeInTheDocument();
|
|
25
|
+
expect(_react.screen.getByText('Test Label')).toBeInTheDocument();
|
|
17
26
|
});
|
|
18
27
|
it('renders with warning', ()=>{
|
|
19
|
-
render(/*#__PURE__*/
|
|
28
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
20
29
|
...defaultProps,
|
|
21
30
|
warning: "Warning message"
|
|
22
31
|
}));
|
|
23
|
-
fireEvent.mouseEnter(screen.getByTestId('tag'));
|
|
24
|
-
expect(screen.getByText('Warning message')).toBeInTheDocument();
|
|
32
|
+
_react.fireEvent.mouseEnter(_react.screen.getByTestId('tag'));
|
|
33
|
+
expect(_react.screen.getByText('Warning message')).toBeInTheDocument();
|
|
25
34
|
});
|
|
26
35
|
it('calls onClick when tag is clicked', ()=>{
|
|
27
|
-
render(/*#__PURE__*/
|
|
36
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
28
37
|
...defaultProps
|
|
29
38
|
}));
|
|
30
|
-
fireEvent.click(screen.getByTestId('tag'));
|
|
39
|
+
_react.fireEvent.click(_react.screen.getByTestId('tag'));
|
|
31
40
|
expect(defaultProps.onClick).toHaveBeenCalledWith('1');
|
|
32
41
|
});
|
|
33
42
|
it('renders remove button and calls removeItem when clicked', ()=>{
|
|
34
43
|
const removeItem = jest.fn();
|
|
35
|
-
render(/*#__PURE__*/
|
|
44
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
36
45
|
...defaultProps,
|
|
37
46
|
removeItem: removeItem,
|
|
38
47
|
isNoDismiss: false
|
|
39
48
|
}));
|
|
40
|
-
fireEvent.click(screen.getByRole('button'));
|
|
49
|
+
_react.fireEvent.click(_react.screen.getByRole('button'));
|
|
41
50
|
expect(removeItem).toHaveBeenCalledWith('test');
|
|
42
51
|
});
|
|
43
52
|
it('opens and closes popup on click', ()=>{
|
|
44
53
|
const appDiv = document.createElement('div');
|
|
45
54
|
appDiv.setAttribute('id', 'app');
|
|
46
55
|
document.body.appendChild(appDiv);
|
|
47
|
-
render(/*#__PURE__*/
|
|
56
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
48
57
|
...defaultProps,
|
|
49
58
|
isPopup: true,
|
|
50
|
-
popupInfoContent: /*#__PURE__*/
|
|
59
|
+
popupInfoContent: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
51
60
|
children: "Popup Content"
|
|
52
61
|
})
|
|
53
62
|
}));
|
|
54
|
-
fireEvent.click(screen.getByTestId('tag'));
|
|
55
|
-
expect(screen.getByText('Popup Content')).toBeInTheDocument();
|
|
56
|
-
fireEvent.click(document);
|
|
57
|
-
expect(screen.queryByText('Popup Content')).not.toBeInTheDocument();
|
|
63
|
+
_react.fireEvent.click(_react.screen.getByTestId('tag'));
|
|
64
|
+
expect(_react.screen.getByText('Popup Content')).toBeInTheDocument();
|
|
65
|
+
_react.fireEvent.click(document);
|
|
66
|
+
expect(_react.screen.queryByText('Popup Content')).not.toBeInTheDocument();
|
|
58
67
|
});
|
|
59
68
|
it('applies custom className', ()=>{
|
|
60
|
-
render(/*#__PURE__*/
|
|
69
|
+
(0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
61
70
|
...defaultProps,
|
|
62
71
|
className: "custom-class"
|
|
63
72
|
}));
|
|
64
|
-
expect(screen.getByTestId('tag')).toHaveClass('custom-class');
|
|
73
|
+
expect(_react.screen.getByTestId('tag')).toHaveClass('custom-class');
|
|
65
74
|
});
|
|
66
75
|
});
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _Tag = /*#__PURE__*/ _interop_require_default(require("./Tag"));
|
|
12
|
+
function _interop_require_default(obj) {
|
|
13
|
+
return obj && obj.__esModule ? obj : {
|
|
14
|
+
default: obj
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const _default = _Tag.default;
|
|
@@ -1,17 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
14
|
+
const _reactfeather = require("react-feather");
|
|
15
|
+
const _utils = require("../../../Functions/utils");
|
|
16
|
+
const _Tag = /*#__PURE__*/ _interop_require_default(require("../Tag/Tag"));
|
|
17
|
+
require("./TagList.scss");
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
24
|
+
if (typeof WeakMap !== "function") return null;
|
|
25
|
+
var cacheBabelInterop = new WeakMap();
|
|
26
|
+
var cacheNodeInterop = new WeakMap();
|
|
27
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
28
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
+
})(nodeInterop);
|
|
30
|
+
}
|
|
31
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
+
return obj;
|
|
34
|
+
}
|
|
35
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
+
return {
|
|
37
|
+
default: obj
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
+
if (cache && cache.has(obj)) {
|
|
42
|
+
return cache.get(obj);
|
|
43
|
+
}
|
|
44
|
+
var newObj = {
|
|
45
|
+
__proto__: null
|
|
46
|
+
};
|
|
47
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
48
|
+
for(var key in obj){
|
|
49
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
50
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
51
|
+
if (desc && (desc.get || desc.set)) {
|
|
52
|
+
Object.defineProperty(newObj, key, desc);
|
|
53
|
+
} else {
|
|
54
|
+
newObj[key] = obj[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
newObj.default = obj;
|
|
59
|
+
if (cache) {
|
|
60
|
+
cache.set(obj, newObj);
|
|
61
|
+
}
|
|
62
|
+
return newObj;
|
|
63
|
+
}
|
|
8
64
|
const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [], withToggle = true, disableShowMore = false, shownItemsCount = "auto", testId = "test-taglist", refProp, renderOrder, onEditClick, onToggleRenderAll })=>{
|
|
9
65
|
var _wrapperRef_current_getBoundingClientRect, _wrapperRef_current;
|
|
10
|
-
const wrapperRef = useRef(null);
|
|
11
|
-
const [tagList, setTagList] = useState([]);
|
|
12
|
-
const [staticTagsCount, setStaticTagsCount] = useState(-1);
|
|
13
|
-
const [renderItemsCount, setRenderItemsCount] = useState(-1);
|
|
14
|
-
const [renderAll, setRenderAll] = useState(!withToggle);
|
|
66
|
+
const wrapperRef = (0, _react.useRef)(null);
|
|
67
|
+
const [tagList, setTagList] = (0, _react.useState)([]);
|
|
68
|
+
const [staticTagsCount, setStaticTagsCount] = (0, _react.useState)(-1);
|
|
69
|
+
const [renderItemsCount, setRenderItemsCount] = (0, _react.useState)(-1);
|
|
70
|
+
const [renderAll, setRenderAll] = (0, _react.useState)(!withToggle);
|
|
15
71
|
var _wrapperRef_current_getBoundingClientRect_width;
|
|
16
72
|
const wrapperWidth = (_wrapperRef_current_getBoundingClientRect_width = wrapperRef === null || wrapperRef === void 0 ? void 0 : (_wrapperRef_current = wrapperRef.current) === null || _wrapperRef_current === void 0 ? void 0 : (_wrapperRef_current_getBoundingClientRect = _wrapperRef_current.getBoundingClientRect()) === null || _wrapperRef_current_getBoundingClientRect === void 0 ? void 0 : _wrapperRef_current_getBoundingClientRect.width) !== null && _wrapperRef_current_getBoundingClientRect_width !== void 0 ? _wrapperRef_current_getBoundingClientRect_width : -1;
|
|
17
73
|
const setRenderAllInterceptor = (v)=>{
|
|
@@ -73,10 +129,10 @@ const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [
|
|
|
73
129
|
if (!item) return null;
|
|
74
130
|
const isHidden = renderItemsCount !== -1 && staticTagsCount !== -1 ? i >= renderItemsCount : false;
|
|
75
131
|
var _item_id, _item_id1;
|
|
76
|
-
return /*#__PURE__*/
|
|
132
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
77
133
|
className: `tag-list_wrapper_item ${isHidden ? "tag-list_wrapper_item--hidden" : ""}`,
|
|
78
|
-
ref: checkedRef(item === null || item === void 0 ? void 0 : item.itemRef),
|
|
79
|
-
children: /*#__PURE__*/
|
|
134
|
+
ref: (0, _utils.checkedRef)(item === null || item === void 0 ? void 0 : item.itemRef),
|
|
135
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
80
136
|
testId: `test-taglist-item-${(_item_id = item === null || item === void 0 ? void 0 : item.id) !== null && _item_id !== void 0 ? _item_id : item === null || item === void 0 ? void 0 : item.value}`,
|
|
81
137
|
...item,
|
|
82
138
|
onClick: onTagClick,
|
|
@@ -89,7 +145,7 @@ const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [
|
|
|
89
145
|
if ((tagList === null || tagList === void 0 ? void 0 : tagList.length) < shownItemsCount || !(tagList === null || tagList === void 0 ? void 0 : tagList.length) || disableShowMore) return null;
|
|
90
146
|
const restItems = tagList.length - renderItemsCount;
|
|
91
147
|
if (restItems === 0 || !withToggle || staticTagsCount === -1) return null;
|
|
92
|
-
return /*#__PURE__*/
|
|
148
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
93
149
|
label: `+${restItems}`,
|
|
94
150
|
className: "tag-list_wrapper_render-more",
|
|
95
151
|
onClick: disableShowMore ? ()=>{} : (e)=>cancelDefault(e, ()=>setRenderAllInterceptor(true))
|
|
@@ -97,26 +153,26 @@ const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [
|
|
|
97
153
|
};
|
|
98
154
|
const renderHideTags = ()=>{
|
|
99
155
|
if (renderItemsCount !== (tagList === null || tagList === void 0 ? void 0 : tagList.length) || !withToggle || staticTagsCount === -1 || staticTagsCount === (tagList === null || tagList === void 0 ? void 0 : tagList.length)) return null;
|
|
100
|
-
return /*#__PURE__*/
|
|
156
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tag.default, {
|
|
101
157
|
label: "...",
|
|
102
158
|
className: "tag-list_wrapper_hide-more",
|
|
103
159
|
onClick: (e)=>cancelDefault(e, ()=>setRenderAllInterceptor(false))
|
|
104
160
|
});
|
|
105
161
|
};
|
|
106
162
|
// Set TagList Items
|
|
107
|
-
useEffect(()=>{
|
|
163
|
+
(0, _react.useEffect)(()=>{
|
|
108
164
|
setStaticTagsCount(-1);
|
|
109
165
|
setRenderItemsCount(-1);
|
|
110
166
|
setRenderAllInterceptor(false);
|
|
111
167
|
setTagList(items.map((item)=>({
|
|
112
168
|
...item,
|
|
113
|
-
itemRef: /*#__PURE__*/ createRef()
|
|
169
|
+
itemRef: /*#__PURE__*/ (0, _react.createRef)()
|
|
114
170
|
})));
|
|
115
171
|
}, [
|
|
116
172
|
items
|
|
117
173
|
]);
|
|
118
174
|
// Count Row Tags
|
|
119
|
-
useLayoutEffect(()=>{
|
|
175
|
+
(0, _react.useLayoutEffect)(()=>{
|
|
120
176
|
if (withToggle && wrapperWidth !== -1 && staticTagsCount === -1) {
|
|
121
177
|
let computedWidth = wrapperWidth;
|
|
122
178
|
if (computedWidth === 0) {
|
|
@@ -133,25 +189,25 @@ const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [
|
|
|
133
189
|
wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current
|
|
134
190
|
]);
|
|
135
191
|
//
|
|
136
|
-
useLayoutEffect(()=>{
|
|
192
|
+
(0, _react.useLayoutEffect)(()=>{
|
|
137
193
|
setRenderItemsCount(staticTagsCount);
|
|
138
194
|
}, [
|
|
139
195
|
staticTagsCount
|
|
140
196
|
]);
|
|
141
197
|
// Toggle Show/Hide More Tags
|
|
142
|
-
useEffect(()=>{
|
|
198
|
+
(0, _react.useEffect)(()=>{
|
|
143
199
|
setRenderItemsCount(renderAll ? tagList === null || tagList === void 0 ? void 0 : tagList.length : staticTagsCount);
|
|
144
200
|
}, [
|
|
145
201
|
renderAll
|
|
146
202
|
]);
|
|
147
|
-
useEffect(()=>{
|
|
203
|
+
(0, _react.useEffect)(()=>{
|
|
148
204
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
205
|
if ((wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) && refProp) refProp.current = wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current;
|
|
150
206
|
}, [
|
|
151
207
|
wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current
|
|
152
208
|
]);
|
|
153
|
-
return /*#__PURE__*/
|
|
154
|
-
className:
|
|
209
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
210
|
+
className: (0, _classnames.default)("tag-list_wrapper", `${renderItemsCount !== (tagList === null || tagList === void 0 ? void 0 : tagList.length) || !withToggle || staticTagsCount === -1 || staticTagsCount === (tagList === null || tagList === void 0 ? void 0 : tagList.length) ? "tag-list_wrapper--only-static-items" : "tag-list_wrapper--all-items"}`, className, {
|
|
155
211
|
"tag-list_wrapper--disabled": disabled
|
|
156
212
|
}),
|
|
157
213
|
style: {
|
|
@@ -163,13 +219,13 @@ const TagList = ({ disabled, className, onTagClick, removeItem = null, items = [
|
|
|
163
219
|
renderTags(),
|
|
164
220
|
renderMoreTags(),
|
|
165
221
|
renderHideTags(),
|
|
166
|
-
typeof onEditClick === "function" && /*#__PURE__*/
|
|
222
|
+
typeof onEditClick === "function" && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
167
223
|
className: "tag-list__edit-trigger",
|
|
168
|
-
children: /*#__PURE__*/
|
|
224
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.Edit3, {
|
|
169
225
|
onClick: onEditClick
|
|
170
226
|
})
|
|
171
227
|
})
|
|
172
228
|
]
|
|
173
229
|
});
|
|
174
230
|
};
|
|
175
|
-
|
|
231
|
+
const _default = TagList;
|
|
@@ -1,28 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
TagListTemplate: function() {
|
|
13
|
+
return TagListTemplate;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
+
require("../../../../../scss/main.scss");
|
|
22
|
+
const _TagList = /*#__PURE__*/ _interop_require_default(require("./TagList"));
|
|
23
|
+
require("./TagListStories.scss");
|
|
24
|
+
function _interop_require_default(obj) {
|
|
25
|
+
return obj && obj.__esModule ? obj : {
|
|
26
|
+
default: obj
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
+
if (typeof WeakMap !== "function") return null;
|
|
31
|
+
var cacheBabelInterop = new WeakMap();
|
|
32
|
+
var cacheNodeInterop = new WeakMap();
|
|
33
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
34
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35
|
+
})(nodeInterop);
|
|
36
|
+
}
|
|
37
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
38
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
42
|
+
return {
|
|
43
|
+
default: obj
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
47
|
+
if (cache && cache.has(obj)) {
|
|
48
|
+
return cache.get(obj);
|
|
49
|
+
}
|
|
50
|
+
var newObj = {
|
|
51
|
+
__proto__: null
|
|
52
|
+
};
|
|
53
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
54
|
+
for(var key in obj){
|
|
55
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
57
|
+
if (desc && (desc.get || desc.set)) {
|
|
58
|
+
Object.defineProperty(newObj, key, desc);
|
|
59
|
+
} else {
|
|
60
|
+
newObj[key] = obj[key];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
newObj.default = obj;
|
|
65
|
+
if (cache) {
|
|
66
|
+
cache.set(obj, newObj);
|
|
67
|
+
}
|
|
68
|
+
return newObj;
|
|
69
|
+
}
|
|
6
70
|
global.lng = "en";
|
|
7
|
-
|
|
71
|
+
const _default = {
|
|
8
72
|
title: "UI/TagList",
|
|
9
|
-
component:
|
|
73
|
+
component: _TagList.default
|
|
10
74
|
};
|
|
11
75
|
const renderPopupContent = ()=>{
|
|
12
|
-
return /*#__PURE__*/
|
|
76
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
13
77
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
78
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
15
79
|
children: '"ADDED"'
|
|
16
80
|
}),
|
|
17
|
-
/*#__PURE__*/
|
|
81
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
18
82
|
children: [
|
|
19
|
-
/*#__PURE__*/
|
|
83
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
20
84
|
children: '"FL Name" '
|
|
21
85
|
}),
|
|
22
|
-
/*#__PURE__*/
|
|
86
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
23
87
|
children: '"Admin" '
|
|
24
88
|
}),
|
|
25
|
-
/*#__PURE__*/
|
|
89
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
26
90
|
children: '"date"'
|
|
27
91
|
})
|
|
28
92
|
]
|
|
@@ -32,17 +96,17 @@ const renderPopupContent = ()=>{
|
|
|
32
96
|
};
|
|
33
97
|
const Template = (args)=>{
|
|
34
98
|
const { options } = args;
|
|
35
|
-
const [tags, setTags] = useState(options);
|
|
99
|
+
const [tags, setTags] = (0, _react.useState)(options);
|
|
36
100
|
const removeTagHandler = (value)=>{
|
|
37
101
|
const newArray = tags.filter((item)=>item.value !== value);
|
|
38
102
|
setTags(newArray);
|
|
39
103
|
};
|
|
40
|
-
return /*#__PURE__*/
|
|
104
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TagList.default, {
|
|
41
105
|
...args,
|
|
42
106
|
items: tags
|
|
43
107
|
});
|
|
44
108
|
};
|
|
45
|
-
|
|
109
|
+
const TagListTemplate = Template.bind({});
|
|
46
110
|
TagListTemplate.args = {
|
|
47
111
|
options: [
|
|
48
112
|
{
|
|
@@ -1,33 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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_default(require("react"));
|
|
14
|
+
const _utils = require("../../../Functions/utils");
|
|
15
|
+
const _Label = /*#__PURE__*/ _interop_require_default(require("../../FormElements/Label/Label"));
|
|
16
|
+
const _Button = /*#__PURE__*/ _interop_require_default(require("../Button/Button"));
|
|
17
|
+
require("./UserBox.scss");
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
8
23
|
const UserBox = ({ name = 'Username', role, id, onClick, isModal, className, colors, testId = 'userbox' })=>{
|
|
9
24
|
const getNameFirstLetter = name.charAt(0).toUpperCase();
|
|
10
25
|
const renderUser = ()=>{
|
|
11
26
|
if (isModal) {
|
|
12
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
13
28
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
29
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
15
30
|
style: {
|
|
16
|
-
backgroundColor: getColorById(id, colors)
|
|
31
|
+
backgroundColor: (0, _utils.getColorById)(id, colors)
|
|
17
32
|
},
|
|
18
33
|
className: "td-user-box__avatar",
|
|
19
34
|
children: getNameFirstLetter
|
|
20
35
|
}),
|
|
21
|
-
/*#__PURE__*/
|
|
36
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
22
37
|
className: "td-user-box__user-data",
|
|
23
38
|
children: [
|
|
24
|
-
/*#__PURE__*/
|
|
39
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
25
40
|
className: "p0 no-shadow",
|
|
26
41
|
onClick: onClick,
|
|
27
42
|
label: name,
|
|
28
43
|
variant: "link"
|
|
29
44
|
}),
|
|
30
|
-
role && /*#__PURE__*/
|
|
45
|
+
role && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
31
46
|
children: role
|
|
32
47
|
})
|
|
33
48
|
]
|
|
@@ -35,22 +50,22 @@ const UserBox = ({ name = 'Username', role, id, onClick, isModal, className, col
|
|
|
35
50
|
]
|
|
36
51
|
});
|
|
37
52
|
} else {
|
|
38
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
39
54
|
children: [
|
|
40
|
-
/*#__PURE__*/
|
|
55
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
41
56
|
style: {
|
|
42
|
-
backgroundColor: getColorById(id)
|
|
57
|
+
backgroundColor: (0, _utils.getColorById)(id)
|
|
43
58
|
},
|
|
44
59
|
className: "td-user-box__avatar",
|
|
45
60
|
children: getNameFirstLetter
|
|
46
61
|
}),
|
|
47
|
-
/*#__PURE__*/
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
48
63
|
className: "td-user-box__user-data",
|
|
49
64
|
children: [
|
|
50
|
-
/*#__PURE__*/
|
|
65
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.default, {
|
|
51
66
|
label: name
|
|
52
67
|
}),
|
|
53
|
-
role && /*#__PURE__*/
|
|
68
|
+
role && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
54
69
|
"aria-label": `User role: ${role}`,
|
|
55
70
|
children: role
|
|
56
71
|
})
|
|
@@ -60,12 +75,12 @@ const UserBox = ({ name = 'Username', role, id, onClick, isModal, className, col
|
|
|
60
75
|
});
|
|
61
76
|
}
|
|
62
77
|
};
|
|
63
|
-
return /*#__PURE__*/
|
|
78
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
64
79
|
"data-testid": testId,
|
|
65
|
-
className:
|
|
80
|
+
className: (0, _classnames.default)('td-user-box', className),
|
|
66
81
|
role: "region",
|
|
67
82
|
"aria-label": `User box for ${name}`,
|
|
68
83
|
children: renderUser()
|
|
69
84
|
});
|
|
70
85
|
};
|
|
71
|
-
|
|
86
|
+
const _default = UserBox;
|