linear-react-components-ui 1.0.10-beta.1 → 1.0.10-beta.11
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/demo/06c001f4d19c06397d470bb43ff3fe49.png +0 -0
- package/demo/270084ef02ed3bddc3f735fd91ee3cae.png +0 -0
- package/demo/882f8e819d18f5f2dc08d23ebd28a7d5.png +0 -0
- package/demo/bundle.js +2 -0
- package/demo/bundle.js.LICENSE.txt +65 -0
- package/demo/cbc3b4bd6342c551db7afafe26dc458c.jpg +0 -0
- package/demo/edc9476523b940deab91951066981a31.png +0 -0
- package/demo/fb44e7c36db6d95bb85a745d4f060fb2.png +0 -0
- package/demo/fonts/Roboto-Black.woff +0 -0
- package/demo/fonts/Roboto-Black.woff2 +0 -0
- package/demo/fonts/Roboto-Bold.woff +0 -0
- package/demo/fonts/Roboto-Bold.woff2 +0 -0
- package/demo/fonts/Roboto-Light.woff +0 -0
- package/demo/fonts/Roboto-Light.woff2 +0 -0
- package/demo/fonts/Roboto-Medium.woff +0 -0
- package/demo/fonts/Roboto-Medium.woff2 +0 -0
- package/demo/fonts/Roboto-Regular.woff +0 -0
- package/demo/fonts/Roboto-Regular.woff2 +0 -0
- package/demo/fonts/Roboto-Thin.woff +0 -0
- package/demo/fonts/Roboto-Thin.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff2 +0 -0
- package/demo/index.html +1 -0
- package/lib/@types/Align.d.ts +3 -2
- package/lib/@types/ButtonTypes.d.ts +1 -1
- package/lib/@types/ColorStyles.d.ts +1 -1
- package/lib/@types/DataCombo.d.ts +1 -1
- package/lib/@types/Icon.d.ts +1 -1
- package/lib/@types/LabelStyles.d.ts +1 -1
- package/lib/@types/Period.d.ts +1 -1
- package/lib/@types/PermissionAttr.d.ts +2 -2
- package/lib/@types/PointerEvents.d.ts +1 -1
- package/lib/@types/Position.d.ts +1 -1
- package/lib/@types/PositionAlert.d.ts +1 -1
- package/lib/@types/Size.d.ts +1 -1
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.d.ts +2 -0
- package/lib/alerts/AlertContainer.js +21 -5
- package/lib/alerts/AlertProvider.d.ts +2 -0
- package/lib/alerts/AlertProvider.js +45 -15
- package/lib/alerts/BaseAlert.d.ts +2 -0
- package/lib/alerts/BaseAlert.js +20 -4
- package/lib/alerts/Message.d.ts +2 -0
- package/lib/alerts/Message.js +32 -21
- package/lib/alerts/helpers.d.ts +2 -0
- package/lib/alerts/helpers.js +2 -0
- package/lib/alerts/index.d.ts +3 -4
- package/lib/alerts/index.js +4 -0
- package/lib/alerts/types.d.ts +7 -5
- package/lib/alerts/withAlert.d.ts +2 -0
- package/lib/alerts/withAlert.js +12 -1
- package/lib/assets/styles/dialog.scss +0 -2
- package/lib/assets/styles/drawers.scss +9 -0
- package/lib/assets/styles/table.scss +30 -0
- package/lib/assets/styles/tooltip.scss +42 -2
- package/lib/avatar/index.js +35 -20
- package/lib/badge/index.js +14 -9
- package/lib/buttons/ActivateButton.d.ts +2 -0
- package/lib/buttons/ActivateButton.js +6 -0
- package/lib/buttons/AddButton.d.ts +2 -0
- package/lib/buttons/AddButton.js +7 -0
- package/lib/buttons/Button.d.ts +2 -0
- package/lib/buttons/Button.js +15 -2
- package/lib/buttons/ButtonGroups.js +4 -0
- package/lib/buttons/CancelButton.d.ts +2 -0
- package/lib/buttons/CancelButton.js +11 -1
- package/lib/buttons/DangerButton.d.ts +2 -0
- package/lib/buttons/DangerButton.js +11 -1
- package/lib/buttons/DefaultButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.js +97 -49
- package/lib/buttons/DestroyButton.d.ts +2 -0
- package/lib/buttons/DestroyButton.js +12 -1
- package/lib/buttons/EditButton.d.ts +2 -0
- package/lib/buttons/EditButton.js +6 -0
- package/lib/buttons/InactivateButton.d.ts +2 -0
- package/lib/buttons/InactivateButton.js +6 -0
- package/lib/buttons/InfoButton.d.ts +2 -0
- package/lib/buttons/InfoButton.js +11 -1
- package/lib/buttons/PrimaryButton.d.ts +2 -0
- package/lib/buttons/PrimaryButton.js +11 -1
- package/lib/buttons/RestoreButton.d.ts +2 -0
- package/lib/buttons/RestoreButton.js +6 -0
- package/lib/buttons/SaveButton.d.ts +2 -0
- package/lib/buttons/SaveButton.js +11 -1
- package/lib/buttons/SuccessButton.d.ts +2 -0
- package/lib/buttons/SuccessButton.js +11 -1
- package/lib/buttons/WarningButton.d.ts +2 -0
- package/lib/buttons/WarningButton.js +11 -1
- package/lib/buttons/button_container/index.js +11 -5
- package/lib/buttons/index.d.ts +3 -4
- package/lib/buttons/index.js +18 -0
- package/lib/buttons/split_button/index.d.ts +2 -0
- package/lib/buttons/split_button/index.js +17 -11
- package/lib/buttons/types.d.ts +6 -2
- package/lib/calendar/DangerCalendar.js +11 -1
- package/lib/calendar/InfoCalendar.js +11 -1
- package/lib/calendar/PrimaryCalendar.js +11 -1
- package/lib/calendar/SuccessCalendar.js +11 -1
- package/lib/calendar/WarningCalendar.js +11 -1
- package/lib/calendar/base/Day.js +13 -2
- package/lib/calendar/base/Month.js +18 -1
- package/lib/calendar/base/Week.js +18 -2
- package/lib/calendar/base/helpers.js +24 -8
- package/lib/calendar/base/index.js +37 -13
- package/lib/calendar/index.d.ts +1 -4
- package/lib/calendar/index.js +8 -0
- package/lib/checkbox/Label.js +7 -1
- package/lib/checkbox/index.js +54 -28
- package/lib/checkbox/types.d.ts +2 -2
- package/lib/dialog/Alert.d.ts +3 -0
- package/lib/dialog/Alert.js +8 -0
- package/lib/dialog/Custom.d.ts +3 -0
- package/lib/dialog/Custom.js +17 -5
- package/lib/dialog/Error.d.ts +3 -0
- package/lib/dialog/Error.js +8 -0
- package/lib/dialog/Information.d.ts +3 -0
- package/lib/dialog/Information.js +8 -0
- package/lib/dialog/Question.d.ts +3 -0
- package/lib/dialog/Question.js +15 -4
- package/lib/dialog/Warning.d.ts +3 -0
- package/lib/dialog/Warning.js +8 -0
- package/lib/dialog/base/Content.d.ts +3 -0
- package/lib/dialog/base/Content.js +6 -1
- package/lib/dialog/base/Footer.d.ts +3 -0
- package/lib/dialog/base/Footer.js +4 -0
- package/lib/dialog/base/Header.d.ts +3 -0
- package/lib/dialog/base/Header.js +13 -5
- package/lib/dialog/base/index.d.ts +3 -0
- package/lib/dialog/base/index.js +33 -9
- package/lib/dialog/base/style.js +2 -0
- package/lib/dialog/form/index.d.ts +3 -0
- package/lib/dialog/form/index.js +29 -9
- package/lib/dialog/index.d.ts +4 -4
- package/lib/dialog/index.js +9 -0
- package/lib/dialog/types.d.ts +6 -3
- package/lib/drawer/Content.d.ts +2 -0
- package/lib/drawer/Content.js +13 -2
- package/lib/drawer/Drawer.d.ts +3 -1
- package/lib/drawer/Drawer.js +83 -24
- package/lib/drawer/Header.d.ts +2 -0
- package/lib/drawer/Header.js +27 -10
- package/lib/drawer/helpers.d.ts +2 -0
- package/lib/drawer/helpers.js +4 -0
- package/lib/drawer/index.d.ts +2 -0
- package/lib/drawer/index.js +8 -0
- package/lib/drawer/types.d.ts +4 -1
- package/lib/dropdown/Popup.js +39 -19
- package/lib/dropdown/helper.js +4 -0
- package/lib/dropdown/withDropdown.js +47 -18
- package/lib/fieldset/index.js +46 -21
- package/lib/form/Field.d.ts +6 -0
- package/lib/form/Field.js +60 -25
- package/lib/form/FieldArray.d.ts +6 -0
- package/lib/form/FieldArray.js +32 -15
- package/lib/form/FieldNumber.d.ts +6 -0
- package/lib/form/FieldNumber.js +20 -6
- package/lib/form/FieldPeriod.d.ts +6 -0
- package/lib/form/FieldPeriod.js +21 -9
- package/lib/form/helpers.d.ts +6 -0
- package/lib/form/helpers.js +30 -5
- package/lib/form/index.d.ts +8 -1
- package/lib/form/index.js +101 -37
- package/lib/form/types.d.ts +16 -6
- package/lib/form/withFieldHOC.d.ts +6 -0
- package/lib/form/withFieldHOC.js +34 -15
- package/lib/form/withFormSecurity.d.ts +6 -0
- package/lib/form/withFormSecurity.js +30 -6
- package/lib/gridlayout/GridCol.js +11 -5
- package/lib/gridlayout/GridRow.js +9 -3
- package/lib/gridlayout/index.d.ts +1 -4
- package/lib/gridlayout/index.js +4 -0
- package/lib/hint/index.js +11 -6
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/index.js +26 -16
- package/lib/icons/types.d.ts +4 -2
- package/lib/index.d.ts +4 -1
- package/lib/index.js +10 -0
- package/lib/inputs/base/InputTextBase.d.ts +1 -0
- package/lib/inputs/base/InputTextBase.js +85 -51
- package/lib/inputs/base/helpers.d.ts +2 -1
- package/lib/inputs/base/helpers.js +19 -6
- package/lib/inputs/base/types.d.ts +2 -1
- package/lib/inputs/color/index.js +38 -11
- package/lib/inputs/date/Dialog.d.ts +1 -0
- package/lib/inputs/date/Dialog.js +7 -2
- package/lib/inputs/date/Dropdown.d.ts +1 -0
- package/lib/inputs/date/Dropdown.js +8 -1
- package/lib/inputs/date/helpers.d.ts +1 -0
- package/lib/inputs/date/helpers.js +11 -2
- package/lib/inputs/date/index.d.ts +1 -0
- package/lib/inputs/date/index.js +101 -48
- package/lib/inputs/date/types.d.ts +1 -0
- package/lib/inputs/file/DefaultFile.d.ts +1 -0
- package/lib/inputs/file/DefaultFile.js +42 -13
- package/lib/inputs/file/DragDropFile.d.ts +1 -0
- package/lib/inputs/file/DragDropFile.js +90 -37
- package/lib/inputs/file/File.d.ts +1 -0
- package/lib/inputs/file/File.js +25 -4
- package/lib/inputs/file/FileButtonSettings.d.ts +1 -0
- package/lib/inputs/file/FileButtonSettings.js +11 -5
- package/lib/inputs/file/helpers.d.ts +1 -0
- package/lib/inputs/file/helpers.js +5 -0
- package/lib/inputs/file/index.d.ts +2 -4
- package/lib/inputs/file/index.js +6 -0
- package/lib/inputs/file/types.d.ts +2 -1
- package/lib/inputs/inputHOC.d.ts +3 -0
- package/lib/inputs/inputHOC.js +34 -10
- package/lib/inputs/mask/BaseMask.d.ts +1 -0
- package/lib/inputs/mask/BaseMask.js +17 -1
- package/lib/inputs/mask/Cnpj.d.ts +1 -0
- package/lib/inputs/mask/Cnpj.js +37 -12
- package/lib/inputs/mask/Cpf.d.ts +1 -0
- package/lib/inputs/mask/Cpf.js +33 -10
- package/lib/inputs/mask/Phone.d.ts +1 -0
- package/lib/inputs/mask/Phone.js +6 -0
- package/lib/inputs/mask/ZipCode.d.ts +1 -0
- package/lib/inputs/mask/ZipCode.js +6 -0
- package/lib/inputs/mask/helpers.d.ts +3 -0
- package/lib/inputs/mask/helpers.js +20 -8
- package/lib/inputs/mask/imaskHOC.d.ts +3 -0
- package/lib/inputs/mask/imaskHOC.js +83 -52
- package/lib/inputs/mask/index.d.ts +2 -4
- package/lib/inputs/mask/index.js +7 -0
- package/lib/inputs/mask/types.d.ts +2 -1
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -1
- package/lib/inputs/multiSelect/ActionButtons.js +16 -4
- package/lib/inputs/multiSelect/Dropdown.d.ts +1 -0
- package/lib/inputs/multiSelect/Dropdown.js +46 -23
- package/lib/inputs/multiSelect/helper.d.ts +8 -6
- package/lib/inputs/multiSelect/helper.js +11 -3
- package/lib/inputs/multiSelect/index.d.ts +1 -0
- package/lib/inputs/multiSelect/index.js +108 -41
- package/lib/inputs/multiSelect/types.d.ts +12 -3
- package/lib/inputs/number/BaseNumber.d.ts +3 -0
- package/lib/inputs/number/BaseNumber.js +16 -3
- package/lib/inputs/number/Currency.d.ts +3 -0
- package/lib/inputs/number/Currency.js +7 -1
- package/lib/inputs/number/Decimal.d.ts +3 -0
- package/lib/inputs/number/Decimal.js +5 -0
- package/lib/inputs/number/format_number.js +7 -0
- package/lib/inputs/number/index.d.ts +3 -0
- package/lib/inputs/number/index.js +13 -3
- package/lib/inputs/number/types.d.ts +3 -1
- package/lib/inputs/period/Dialog.d.ts +1 -0
- package/lib/inputs/period/Dialog.js +7 -2
- package/lib/inputs/period/Dropdown.d.ts +1 -0
- package/lib/inputs/period/Dropdown.js +7 -0
- package/lib/inputs/period/PeriodList.d.ts +1 -0
- package/lib/inputs/period/PeriodList.js +7 -1
- package/lib/inputs/period/helper.d.ts +1 -0
- package/lib/inputs/period/helper.js +12 -2
- package/lib/inputs/period/index.d.ts +1 -0
- package/lib/inputs/period/index.js +120 -49
- package/lib/inputs/period/types.d.ts +4 -3
- package/lib/inputs/search/index.d.ts +3 -0
- package/lib/inputs/search/index.js +63 -18
- package/lib/inputs/select/ActionButtons.d.ts +3 -0
- package/lib/inputs/select/ActionButtons.js +12 -4
- package/lib/inputs/select/Dropdown.d.ts +3 -0
- package/lib/inputs/select/Dropdown.js +49 -29
- package/lib/inputs/select/helper.d.ts +7 -9
- package/lib/inputs/select/helper.js +41 -11
- package/lib/inputs/select/index.d.ts +1 -0
- package/lib/inputs/select/index.js +24 -8
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -0
- package/lib/inputs/select/multiple/Selecteds.js +8 -4
- package/lib/inputs/select/multiple/index.d.ts +1 -0
- package/lib/inputs/select/multiple/index.js +109 -47
- package/lib/inputs/select/simple/index.d.ts +1 -0
- package/lib/inputs/select/simple/index.js +157 -69
- package/lib/inputs/select/types.d.ts +28 -12
- package/lib/inputs/text/index.d.ts +1 -0
- package/lib/inputs/text/index.js +5 -1
- package/lib/inputs/text/types.d.ts +2 -2
- package/lib/inputs/textarea/index.d.ts +1 -0
- package/lib/inputs/textarea/index.js +10 -4
- package/lib/inputs/textarea/types.d.ts +1 -0
- package/lib/inputs/types.d.ts +7 -3
- package/lib/internals/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +82 -30
- package/lib/labelMessages/index.d.ts +2 -0
- package/lib/labelMessages/index.js +46 -27
- package/lib/labelMessages/types.d.ts +3 -1
- package/lib/labels/DangerLabel.d.ts +2 -0
- package/lib/labels/DangerLabel.js +11 -1
- package/lib/labels/DefaultLabel.d.ts +2 -0
- package/lib/labels/DefaultLabel.js +41 -19
- package/lib/labels/InfoLabel.d.ts +2 -0
- package/lib/labels/InfoLabel.js +11 -1
- package/lib/labels/PrimaryLabel.d.ts +2 -0
- package/lib/labels/PrimaryLabel.js +11 -1
- package/lib/labels/SuccessLabel.d.ts +2 -0
- package/lib/labels/SuccessLabel.js +11 -1
- package/lib/labels/WarningLabel.d.ts +2 -0
- package/lib/labels/WarningLabel.js +11 -1
- package/lib/labels/index.d.ts +3 -4
- package/lib/labels/index.js +10 -0
- package/lib/labels/label_container/index.js +7 -3
- package/lib/labels/types.d.ts +3 -1
- package/lib/list/Header.d.ts +2 -0
- package/lib/list/Header.js +7 -3
- package/lib/list/Item.d.ts +2 -0
- package/lib/list/Item.js +68 -33
- package/lib/list/Separator.js +4 -0
- package/lib/list/helpers.d.ts +2 -0
- package/lib/list/helpers.js +4 -0
- package/lib/list/index.d.ts +2 -0
- package/lib/list/index.js +60 -25
- package/lib/list/types.d.ts +5 -3
- package/lib/menus/float/MenuItem.d.ts +2 -0
- package/lib/menus/float/MenuItem.js +26 -9
- package/lib/menus/float/SubMenuContainer.js +17 -5
- package/lib/menus/float/helpers.d.ts +2 -0
- package/lib/menus/float/helpers.js +4 -0
- package/lib/menus/float/index.d.ts +2 -0
- package/lib/menus/float/index.js +21 -8
- package/lib/menus/float/types.d.ts +3 -1
- package/lib/menus/index.d.ts +3 -4
- package/lib/menus/index.js +3 -0
- package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
- package/lib/menus/sidenav/ExpandMenu.js +7 -2
- package/lib/menus/sidenav/MenuLink.d.ts +2 -0
- package/lib/menus/sidenav/MenuLink.js +12 -3
- package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuGroup.js +12 -3
- package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuItem.js +56 -27
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavSubMenuItem.js +27 -8
- package/lib/menus/sidenav/helpers.d.ts +2 -0
- package/lib/menus/sidenav/helpers.js +9 -0
- package/lib/menus/sidenav/index.d.ts +2 -0
- package/lib/menus/sidenav/index.js +75 -26
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +7 -2
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/index.js +45 -15
- package/lib/menus/sidenav/types.d.ts +5 -3
- package/lib/noPermission/index.js +6 -0
- package/lib/panel/Content.d.ts +3 -1
- package/lib/panel/Content.js +22 -7
- package/lib/panel/DangerPanel.d.ts +3 -1
- package/lib/panel/DangerPanel.js +7 -0
- package/lib/panel/Default.d.ts +3 -1
- package/lib/panel/Default.js +44 -20
- package/lib/panel/Header.d.ts +3 -1
- package/lib/panel/Header.js +29 -15
- package/lib/panel/InfoPanel.d.ts +3 -1
- package/lib/panel/InfoPanel.js +7 -0
- package/lib/panel/PrimaryPanel.d.ts +3 -1
- package/lib/panel/PrimaryPanel.js +7 -0
- package/lib/panel/SuccessPanel.d.ts +3 -1
- package/lib/panel/SuccessPanel.js +7 -0
- package/lib/panel/ToolBar.d.ts +3 -1
- package/lib/panel/ToolBar.js +5 -0
- package/lib/panel/WarningPanel.d.ts +3 -1
- package/lib/panel/WarningPanel.js +7 -0
- package/lib/panel/helpers.d.ts +3 -1
- package/lib/panel/helpers.js +10 -2
- package/lib/panel/index.d.ts +4 -5
- package/lib/panel/index.js +11 -0
- package/lib/panel/types.d.ts +3 -1
- package/lib/permissionValidations.js +15 -3
- package/lib/popover/PopoverText.d.ts +2 -0
- package/lib/popover/PopoverText.js +4 -0
- package/lib/popover/PopoverTitle.d.ts +2 -0
- package/lib/popover/PopoverTitle.js +4 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +22 -12
- package/lib/popover/types.d.ts +3 -1
- package/lib/progress/Bar.js +33 -20
- package/lib/progress/index.js +14 -5
- package/lib/radio/index.js +46 -23
- package/lib/skeleton/SkeletonContainer.js +9 -3
- package/lib/skeleton/index.js +22 -10
- package/lib/spinner/SpinnerLoading.js +7 -3
- package/lib/spinner/index.js +40 -18
- package/lib/split/Split.js +83 -32
- package/lib/split/SplitSide.js +18 -6
- package/lib/split/helpers.d.ts +1 -1
- package/lib/split/helpers.js +4 -0
- package/lib/split/index.d.ts +1 -4
- package/lib/split/index.js +5 -0
- package/lib/table/Body.js +29 -15
- package/lib/table/Header.js +26 -5
- package/lib/table/HeaderColumn.js +21 -10
- package/lib/table/Row.js +47 -20
- package/lib/table/RowColumn.js +29 -12
- package/lib/table/helpers.js +7 -0
- package/lib/table/index.js +62 -32
- package/lib/table/types.d.ts +6 -1
- package/lib/tabs/DropdownItems.d.ts +2 -0
- package/lib/tabs/DropdownItems.js +21 -12
- package/lib/tabs/Menu.d.ts +2 -0
- package/lib/tabs/Menu.js +15 -5
- package/lib/tabs/MenuItems.d.ts +2 -0
- package/lib/tabs/MenuItems.js +33 -23
- package/lib/tabs/Panel.d.ts +2 -0
- package/lib/tabs/Panel.js +39 -14
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/index.js +113 -46
- package/lib/tabs/tabHelpers.d.ts +2 -0
- package/lib/tabs/tabHelpers.js +16 -3
- package/lib/tabs/types.d.ts +3 -1
- package/lib/toolbar/ButtonBar.d.ts +2 -0
- package/lib/toolbar/ButtonBar.js +29 -13
- package/lib/toolbar/LabelBar.d.ts +2 -0
- package/lib/toolbar/LabelBar.js +28 -11
- package/lib/toolbar/Separator.js +4 -0
- package/lib/toolbar/ToolBarGroup.d.ts +2 -0
- package/lib/toolbar/ToolBarGroup.js +6 -2
- package/lib/toolbar/helpers.d.ts +2 -0
- package/lib/toolbar/helpers.js +2 -0
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/index.js +23 -7
- package/lib/toolbar/types.d.ts +4 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +30 -11
- package/lib/tooltip/types.d.ts +2 -1
- package/lib/treetable/Body.js +27 -9
- package/lib/treetable/Header.js +11 -1
- package/lib/treetable/Row.js +113 -58
- package/lib/treetable/helpers.js +10 -0
- package/lib/treetable/index.js +11 -0
- package/lib/treeview/Header.js +6 -2
- package/lib/treeview/Node.js +111 -47
- package/lib/treeview/constants.js +4 -0
- package/lib/treeview/index.js +134 -54
- package/lib/treeview/types.d.ts +2 -2
- package/lib/treeview_old/Header.js +6 -1
- package/lib/treeview_old/Node.js +32 -5
- package/lib/treeview_old/index.js +9 -1
- package/lib/{types-90c43ae1.d.ts → types-c1d83632.d.ts} +3 -2
- package/lib/uitour/index.js +73 -33
- package/lib/uitour/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license
|
|
11
|
+
* Lodash <https://lodash.com/>
|
|
12
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
13
|
+
* Released under MIT license <https://lodash.com/license>
|
|
14
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
15
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
20
|
+
*
|
|
21
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
22
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
23
|
+
* @namespace
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** @license React v0.19.1
|
|
28
|
+
* scheduler.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** @license React v16.13.1
|
|
37
|
+
* react-is.production.min.js
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the MIT license found in the
|
|
42
|
+
* LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/** @license React v16.14.0
|
|
46
|
+
* react-dom.production.min.js
|
|
47
|
+
*
|
|
48
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license found in the
|
|
51
|
+
* LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/** @license React v16.14.0
|
|
55
|
+
* react.production.min.js
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
//! moment.js
|
|
64
|
+
|
|
65
|
+
//! moment.js locale configuration
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/demo/index.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta name="description" content="CHANGE THIS"><title>React component starter</title><script defer="defer" src="bundle.js"></script></head><body><div id="app"></div></body></html>
|
package/lib/@types/Align.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
type Align = 'left' | 'right' | 'center' | 'top' | 'bottom' | 'none';
|
|
1
|
+
declare type Align = 'left' | 'right' | 'center' | 'top' | 'bottom' | 'none';
|
|
2
|
+
declare type TextAlign = Extract<Align, 'left' | 'right' | 'center'>;
|
|
2
3
|
|
|
3
|
-
export { Align };
|
|
4
|
+
export { Align, TextAlign };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type ButtonTypes = 'default' | 'primary' | 'danger' | 'info' | 'success' | 'warning' | 'add' | 'cancel' | 'destroy' | 'edit' | 'save' | 'activate' | 'inactivate' | 'restore';
|
|
1
|
+
declare type ButtonTypes = 'default' | 'primary' | 'danger' | 'info' | 'success' | 'warning' | 'add' | 'cancel' | 'destroy' | 'edit' | 'save' | 'activate' | 'inactivate' | 'restore';
|
|
2
2
|
|
|
3
3
|
export { ButtonTypes };
|
package/lib/@types/Icon.d.ts
CHANGED
package/lib/@types/Period.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
type PermissionAttr = {
|
|
1
|
+
declare type PermissionAttr = {
|
|
2
2
|
module?: string;
|
|
3
3
|
feature?: string;
|
|
4
4
|
operation?: string;
|
|
5
5
|
onDenied?: string;
|
|
6
6
|
};
|
|
7
|
-
type OnDenied = {
|
|
7
|
+
declare type OnDenied = {
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
unvisible?: boolean;
|
|
10
10
|
readOnly?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type PointerEvents = 'none' | 'all' | 'fill' | 'painted' | 'stroke' | 'visible' | 'visibleFill' | 'visiblePainted' | 'visibleStroke' | 'inherit' | 'initial' | 'unset';
|
|
1
|
+
declare type PointerEvents = 'none' | 'all' | 'fill' | 'painted' | 'stroke' | 'visible' | 'visibleFill' | 'visiblePainted' | 'visibleStroke' | 'inherit' | 'initial' | 'unset';
|
|
2
2
|
|
|
3
3
|
export { PointerEvents };
|
package/lib/@types/Position.d.ts
CHANGED
package/lib/@types/Size.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps, DefaultMessageConfigType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare class AlertContainer {
|
|
6
8
|
pushAlert: (params: IMessageProps) => void;
|
|
@@ -4,17 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
+
|
|
9
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
+
|
|
11
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
13
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
|
|
14
16
|
var AlertContainer = /*#__PURE__*/function () {
|
|
15
17
|
function AlertContainer(pushAlert) {
|
|
16
18
|
var _this = this;
|
|
19
|
+
|
|
17
20
|
_classCallCheck(this, AlertContainer);
|
|
21
|
+
|
|
18
22
|
Object.defineProperty(this, "pushAlert", {
|
|
19
23
|
configurable: true,
|
|
20
24
|
enumerable: true,
|
|
@@ -32,6 +36,7 @@ var AlertContainer = /*#__PURE__*/function () {
|
|
|
32
36
|
iconName: 'information',
|
|
33
37
|
color: '#fff'
|
|
34
38
|
});
|
|
39
|
+
|
|
35
40
|
_this.pushAlert(messageConfig);
|
|
36
41
|
}
|
|
37
42
|
});
|
|
@@ -46,6 +51,7 @@ var AlertContainer = /*#__PURE__*/function () {
|
|
|
46
51
|
iconName: 'power',
|
|
47
52
|
color: '#fff'
|
|
48
53
|
});
|
|
54
|
+
|
|
49
55
|
_this.pushAlert(messageConfig);
|
|
50
56
|
}
|
|
51
57
|
});
|
|
@@ -60,6 +66,7 @@ var AlertContainer = /*#__PURE__*/function () {
|
|
|
60
66
|
iconName: 'warning',
|
|
61
67
|
color: '#fff'
|
|
62
68
|
});
|
|
69
|
+
|
|
63
70
|
_this.pushAlert(messageConfig);
|
|
64
71
|
}
|
|
65
72
|
});
|
|
@@ -74,6 +81,7 @@ var AlertContainer = /*#__PURE__*/function () {
|
|
|
74
81
|
iconName: 'checkmark',
|
|
75
82
|
color: '#fff'
|
|
76
83
|
});
|
|
84
|
+
|
|
77
85
|
_this.pushAlert(messageConfig);
|
|
78
86
|
}
|
|
79
87
|
});
|
|
@@ -85,33 +93,41 @@ var AlertContainer = /*#__PURE__*/function () {
|
|
|
85
93
|
var messageConfig = _extends({}, options, {
|
|
86
94
|
message: message
|
|
87
95
|
});
|
|
96
|
+
|
|
88
97
|
_this.pushAlert(messageConfig);
|
|
89
98
|
}
|
|
90
99
|
});
|
|
91
100
|
this.pushAlert = pushAlert;
|
|
92
101
|
}
|
|
102
|
+
|
|
93
103
|
_createClass(AlertContainer, [{
|
|
94
104
|
key: "default",
|
|
95
105
|
value: function _default(messageConfig) {
|
|
96
106
|
var message = messageConfig.message,
|
|
97
|
-
|
|
107
|
+
options = messageConfig.options;
|
|
108
|
+
|
|
98
109
|
switch (options.type) {
|
|
99
110
|
case 'info':
|
|
100
111
|
this.info(message, options);
|
|
101
112
|
break;
|
|
113
|
+
|
|
102
114
|
case 'warning':
|
|
103
115
|
this.warning(message, options);
|
|
104
116
|
break;
|
|
117
|
+
|
|
105
118
|
case 'danger':
|
|
106
119
|
this.danger(message, options);
|
|
107
120
|
break;
|
|
121
|
+
|
|
108
122
|
default:
|
|
109
123
|
this.success(message, options);
|
|
110
124
|
break;
|
|
111
125
|
}
|
|
112
126
|
}
|
|
113
127
|
}]);
|
|
128
|
+
|
|
114
129
|
return AlertContainer;
|
|
115
130
|
}();
|
|
131
|
+
|
|
116
132
|
var _default2 = AlertContainer;
|
|
117
133
|
exports.default = _default2;
|
|
@@ -1,49 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
13
|
+
|
|
10
14
|
var _BaseAlert = _interopRequireDefault(require("./BaseAlert"));
|
|
15
|
+
|
|
11
16
|
var _AlertContainer = _interopRequireDefault(require("./AlertContainer"));
|
|
17
|
+
|
|
12
18
|
var _Message = _interopRequireDefault(require("./Message"));
|
|
19
|
+
|
|
13
20
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
21
|
+
|
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
15
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
16
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
17
28
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
18
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
19
32
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
20
34
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
-
|
|
22
|
-
function
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
23
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
24
42
|
var AlertProvider = function AlertProvider(props) {
|
|
25
43
|
var _useState = (0, _react.useState)({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
leftTop: [],
|
|
45
|
+
leftBottom: [],
|
|
46
|
+
rightBottom: [],
|
|
47
|
+
rightTop: [],
|
|
48
|
+
centerTop: [],
|
|
49
|
+
centerBottom: []
|
|
50
|
+
}),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
messages = _useState2[0],
|
|
53
|
+
setMessages = _useState2[1];
|
|
54
|
+
|
|
36
55
|
var _useState3 = (0, _react.useState)(false),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
56
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
+
toggleRefreshComponent = _useState4[0],
|
|
58
|
+
setToggleRefreshComponent = _useState4[1];
|
|
59
|
+
|
|
40
60
|
var children = props.children;
|
|
61
|
+
|
|
41
62
|
var removeAlert = function removeAlert(messageId, position) {
|
|
42
63
|
messages[position] = messages[position].filter(function (message) {
|
|
43
64
|
return message.id !== messageId;
|
|
44
65
|
});
|
|
45
66
|
setMessages(_extends({}, messages));
|
|
46
67
|
};
|
|
68
|
+
|
|
47
69
|
var pushAlert = function pushAlert(params) {
|
|
48
70
|
var properties = params;
|
|
49
71
|
if (properties.position === undefined) properties.position = 'rightBottom';
|
|
@@ -52,6 +74,7 @@ var AlertProvider = function AlertProvider(props) {
|
|
|
52
74
|
setMessages(messages);
|
|
53
75
|
setToggleRefreshComponent(!toggleRefreshComponent);
|
|
54
76
|
};
|
|
77
|
+
|
|
55
78
|
var buildAlertMessage = function buildAlertMessage(values) {
|
|
56
79
|
return values.map(function (value) {
|
|
57
80
|
return /*#__PURE__*/_react.default.createElement(_Message.default, _extends({}, value, {
|
|
@@ -60,27 +83,34 @@ var AlertProvider = function AlertProvider(props) {
|
|
|
60
83
|
}));
|
|
61
84
|
});
|
|
62
85
|
};
|
|
86
|
+
|
|
63
87
|
var contextValues = {
|
|
64
88
|
alert: new _AlertContainer.default(pushAlert)
|
|
65
89
|
};
|
|
90
|
+
|
|
66
91
|
var renderBaseContainer = function renderBaseContainer() {
|
|
67
92
|
var elements = [];
|
|
93
|
+
|
|
68
94
|
_lodash.default.forEach(messages, function (values, key) {
|
|
69
95
|
if (values.length > 0) {
|
|
70
96
|
var messageAlert = /*#__PURE__*/_react.default.createElement("div", {
|
|
71
97
|
className: key.toLowerCase(),
|
|
72
98
|
key: key
|
|
73
99
|
}, buildAlertMessage(values));
|
|
100
|
+
|
|
74
101
|
elements.push(messageAlert);
|
|
75
102
|
} else {
|
|
76
103
|
elements.push(null);
|
|
77
104
|
}
|
|
78
105
|
});
|
|
106
|
+
|
|
79
107
|
return /*#__PURE__*/_react.default.createElement(_helpers.default.Provider, {
|
|
80
108
|
value: _extends({}, contextValues)
|
|
81
109
|
}, /*#__PURE__*/_react.default.createElement(_BaseAlert.default, null, elements), children);
|
|
82
110
|
};
|
|
111
|
+
|
|
83
112
|
return _react.Children.only(renderBaseContainer());
|
|
84
113
|
};
|
|
114
|
+
|
|
85
115
|
var _default = AlertProvider;
|
|
86
116
|
exports.default = _default;
|
package/lib/alerts/BaseAlert.js
CHANGED
|
@@ -4,23 +4,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = require("react");
|
|
9
|
+
|
|
8
10
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
|
+
|
|
9
12
|
require("../assets/styles/alerts.scss");
|
|
13
|
+
|
|
10
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
11
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
|
|
12
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
|
|
13
20
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
|
|
15
|
-
function
|
|
21
|
+
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
+
|
|
24
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
25
|
+
|
|
16
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
17
28
|
var body = document.getElementsByTagName('body')[0];
|
|
18
29
|
var alert = document.getElementById('alert');
|
|
30
|
+
|
|
19
31
|
var BaseAlert = function BaseAlert(_ref) {
|
|
20
32
|
var children = _ref.children;
|
|
33
|
+
|
|
21
34
|
var _useState = (0, _react.useState)(document.createElement('div')),
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
36
|
+
messageContainerEl = _useState2[0];
|
|
37
|
+
|
|
24
38
|
messageContainerEl.className = 'messagecontainer';
|
|
25
39
|
(0, _react.useEffect)(function () {
|
|
26
40
|
if (alert === null) {
|
|
@@ -31,11 +45,13 @@ var BaseAlert = function BaseAlert(_ref) {
|
|
|
31
45
|
} else {
|
|
32
46
|
alert.appendChild(messageContainerEl);
|
|
33
47
|
}
|
|
48
|
+
|
|
34
49
|
return function () {
|
|
35
50
|
alert === null || alert === void 0 ? void 0 : alert.removeChild(messageContainerEl);
|
|
36
51
|
};
|
|
37
52
|
}, []);
|
|
38
53
|
return /*#__PURE__*/_reactDom.default.createPortal(children, messageContainerEl);
|
|
39
54
|
};
|
|
55
|
+
|
|
40
56
|
var _default = BaseAlert;
|
|
41
57
|
exports.default = _default;
|
package/lib/alerts/Message.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare const Message: ({ handleClose, message, id, color, icon, iconName, timeout, customClass, closeButton, className, position, }: IMessageProps) => JSX.Element;
|
|
6
8
|
|