linear-react-components-ui 0.4.77-beta.8 → 1.0.0-rc.1
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/.eslintrc.json +99 -0
- package/.gitlab-ci.yml +19 -0
- package/.husky/pre-push +4 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +5 -2
- package/babel.config.json +11 -0
- package/config/getHttpsConfig.js +56 -0
- package/config/paths.js +140 -0
- package/config/webpackDevServer.config.js +128 -0
- package/jest.config.js +3 -3
- package/lib/@types/Align.d.ts +3 -0
- package/lib/@types/Align.js +5 -0
- package/lib/@types/ButtonTypes.d.ts +3 -0
- package/lib/@types/ButtonTypes.js +5 -0
- package/lib/@types/ColorStyles.d.ts +3 -0
- package/lib/@types/ColorStyles.js +5 -0
- package/lib/@types/DataCombo.d.ts +3 -0
- package/lib/@types/DataCombo.js +5 -0
- package/lib/@types/Icon.d.ts +5 -0
- package/lib/@types/Icon.js +5 -0
- package/lib/@types/LabelStyles.d.ts +3 -0
- package/lib/@types/Period.d.ts +6 -0
- package/lib/@types/Period.js +5 -0
- package/lib/@types/PermissionAttr.d.ts +14 -0
- package/lib/@types/PointerEvents.d.ts +3 -0
- package/lib/@types/Position.d.ts +3 -0
- package/lib/@types/PositionAlert.d.ts +3 -0
- package/lib/@types/PositionAlert.js +5 -0
- package/lib/@types/Size.d.ts +3 -0
- package/lib/@types/SizePixels.d.ts +3 -0
- package/lib/@types/StorageMock.d.ts +5 -0
- package/lib/@types/StorageMock.js +5 -0
- package/lib/alerts/AlertContainer.d.ts +16 -0
- package/lib/alerts/AlertContainer.js +16 -21
- package/lib/alerts/AlertProvider.d.ts +7 -0
- package/lib/alerts/AlertProvider.js +13 -18
- package/lib/alerts/BaseAlert.d.ts +7 -0
- package/lib/alerts/BaseAlert.js +8 -11
- package/lib/alerts/Message.d.ts +7 -0
- package/lib/alerts/Message.js +41 -50
- package/lib/alerts/helpers.d.ts +7 -0
- package/lib/alerts/helpers.js +4 -7
- package/lib/alerts/index.d.ts +6 -0
- package/lib/alerts/index.js +5 -5
- package/lib/alerts/types.d.ts +48 -0
- package/lib/alerts/types.js +5 -0
- package/lib/alerts/withAlert.d.ts +7 -0
- package/lib/alerts/withAlert.js +8 -8
- package/lib/assets/styles/commons.scss +0 -10
- package/lib/assets/styles/dropdown.scss +0 -1
- package/lib/assets/styles/list.scss +0 -8
- package/lib/assets/styles/sidenav.scss +42 -93
- package/lib/assets/styles/table.scss +7 -2
- package/lib/avatar/index.d.ts +12 -0
- package/lib/avatar/index.js +21 -66
- package/lib/avatar/types.d.ts +31 -0
- package/lib/avatar/types.js +5 -0
- package/lib/badge/index.d.ts +6 -0
- package/lib/badge/index.js +11 -27
- package/lib/badge/types.d.ts +13 -0
- package/lib/badge/types.js +5 -0
- package/lib/buttons/ActivateButton.d.ts +9 -0
- package/lib/buttons/ActivateButton.js +6 -6
- package/lib/buttons/AddButton.d.ts +9 -0
- package/lib/buttons/AddButton.js +6 -6
- package/lib/buttons/Button.d.ts +12 -0
- package/lib/buttons/Button.js +22 -14
- package/lib/buttons/ButtonGroups.d.ts +8 -0
- package/lib/buttons/ButtonGroups.js +4 -9
- package/lib/buttons/CancelButton.d.ts +9 -0
- package/lib/buttons/CancelButton.js +19 -6
- package/lib/buttons/DangerButton.d.ts +9 -0
- package/lib/buttons/DangerButton.js +16 -21
- package/lib/buttons/DefaultButton.d.ts +12 -0
- package/lib/buttons/DefaultButton.js +73 -135
- package/lib/buttons/DestroyButton.d.ts +9 -0
- package/lib/buttons/DestroyButton.js +16 -7
- package/lib/buttons/EditButton.d.ts +9 -0
- package/lib/buttons/EditButton.js +6 -6
- package/lib/buttons/InactivateButton.d.ts +9 -0
- package/lib/buttons/InactivateButton.js +6 -6
- package/lib/buttons/InfoButton.d.ts +9 -0
- package/lib/buttons/InfoButton.js +16 -21
- package/lib/buttons/PrimaryButton.d.ts +9 -0
- package/lib/buttons/PrimaryButton.js +16 -21
- package/lib/buttons/RestoreButton.d.ts +9 -0
- package/lib/buttons/RestoreButton.js +6 -6
- package/lib/buttons/SaveButton.d.ts +9 -0
- package/lib/buttons/SaveButton.js +18 -5
- package/lib/buttons/SuccessButton.d.ts +9 -0
- package/lib/buttons/SuccessButton.js +15 -20
- package/lib/buttons/WarningButton.d.ts +9 -0
- package/lib/buttons/WarningButton.js +15 -20
- package/lib/buttons/button_container/index.d.ts +12 -0
- package/lib/buttons/button_container/index.js +10 -23
- package/lib/buttons/index.d.ts +21 -0
- package/lib/buttons/index.js +18 -18
- package/lib/buttons/split_button/index.d.ts +9 -0
- package/lib/buttons/split_button/index.js +18 -35
- package/lib/buttons/types.d.ts +44 -0
- package/lib/calendar/DangerCalendar.d.ts +7 -0
- package/lib/calendar/DangerCalendar.js +15 -6
- package/lib/calendar/InfoCalendar.d.ts +7 -0
- package/lib/calendar/InfoCalendar.js +15 -6
- package/lib/calendar/PrimaryCalendar.d.ts +7 -0
- package/lib/calendar/PrimaryCalendar.js +15 -6
- package/lib/calendar/SuccessCalendar.d.ts +7 -0
- package/lib/calendar/SuccessCalendar.js +15 -6
- package/lib/calendar/WarningCalendar.d.ts +7 -0
- package/lib/calendar/WarningCalendar.js +15 -6
- package/lib/calendar/base/Day.d.ts +7 -0
- package/lib/calendar/base/Day.js +8 -14
- package/lib/calendar/base/Month.d.ts +7 -0
- package/lib/calendar/base/Month.js +5 -10
- package/lib/calendar/base/Week.d.ts +7 -0
- package/lib/calendar/base/Week.js +5 -11
- package/lib/calendar/base/helpers.d.ts +62 -0
- package/lib/calendar/base/helpers.js +9 -9
- package/lib/calendar/base/index.d.ts +7 -0
- package/lib/calendar/base/index.js +44 -47
- package/lib/calendar/index.d.ts +10 -0
- package/lib/calendar/index.js +9 -9
- package/lib/calendar/types.d.ts +25 -0
- package/lib/calendar/types.js +5 -0
- package/lib/checkbox/Label.d.ts +11 -0
- package/lib/checkbox/Label.js +7 -17
- package/lib/checkbox/index.d.ts +13 -0
- package/lib/checkbox/index.js +52 -89
- package/lib/checkbox/types.d.ts +42 -0
- package/lib/dialog/Alert.d.ts +6 -0
- package/lib/dialog/Alert.js +9 -14
- package/lib/dialog/Custom.d.ts +6 -0
- package/lib/dialog/Custom.js +26 -34
- package/lib/dialog/Error.d.ts +6 -0
- package/lib/dialog/Error.js +7 -12
- package/lib/dialog/Information.d.ts +6 -0
- package/lib/dialog/Information.js +7 -12
- package/lib/dialog/Question.d.ts +6 -0
- package/lib/dialog/Question.js +14 -25
- package/lib/dialog/Warning.d.ts +6 -0
- package/lib/dialog/Warning.js +7 -12
- package/lib/dialog/base/Content.d.ts +6 -0
- package/lib/dialog/base/Content.js +4 -13
- package/lib/dialog/base/Footer.d.ts +6 -0
- package/lib/dialog/base/Footer.js +6 -12
- package/lib/dialog/base/Header.d.ts +6 -0
- package/lib/dialog/base/Header.js +17 -31
- package/lib/dialog/base/index.d.ts +6 -0
- package/lib/dialog/base/index.js +13 -35
- package/lib/dialog/base/style.js +2 -2
- package/lib/dialog/form/index.d.ts +6 -0
- package/lib/dialog/form/index.js +34 -44
- package/lib/dialog/index.d.ts +10 -0
- package/lib/dialog/index.js +10 -10
- package/lib/dialog/types.d.ts +68 -0
- package/lib/dialog/types.js +5 -0
- package/lib/drawer/Content.d.ts +7 -0
- package/lib/drawer/Content.js +7 -16
- package/lib/drawer/Drawer.d.ts +7 -0
- package/lib/drawer/Drawer.js +36 -57
- package/lib/drawer/Header.d.ts +7 -0
- package/lib/drawer/Header.js +28 -47
- package/lib/drawer/helpers.d.ts +7 -0
- package/lib/drawer/helpers.js +4 -4
- package/lib/drawer/index.d.ts +9 -0
- package/lib/drawer/index.js +6 -6
- package/lib/drawer/types.d.ts +34 -0
- package/lib/drawer/types.js +5 -0
- package/lib/dropdown/Popup.d.ts +6 -0
- package/lib/dropdown/Popup.js +36 -20
- package/lib/dropdown/helper.d.ts +4 -0
- package/lib/dropdown/helper.js +2 -2
- package/lib/dropdown/types.d.ts +43 -0
- package/lib/dropdown/withDropdown.d.ts +10 -0
- package/lib/dropdown/withDropdown.js +22 -47
- package/lib/fieldset/index.d.ts +8 -0
- package/lib/fieldset/index.js +19 -50
- package/lib/fieldset/types.d.ts +28 -0
- package/lib/fieldset/types.js +5 -0
- package/lib/form/Field.d.ts +6 -0
- package/lib/form/Field.js +22 -49
- package/lib/form/FieldArray.d.ts +6 -0
- package/lib/form/FieldArray.js +27 -57
- package/lib/form/FieldNumber.d.ts +6 -0
- package/lib/form/FieldNumber.js +10 -32
- package/lib/form/FieldPeriod.d.ts +6 -0
- package/lib/form/FieldPeriod.js +29 -51
- package/lib/form/helpers.d.ts +11 -0
- package/lib/form/helpers.js +11 -17
- package/lib/form/index.d.ts +9 -0
- package/lib/form/index.js +68 -103
- package/lib/form/types.d.ts +167 -0
- package/lib/form/types.js +5 -0
- package/lib/form/withFieldHOC.d.ts +6 -0
- package/lib/form/withFieldHOC.js +45 -125
- package/lib/form/withFormSecurity.d.ts +7 -0
- package/lib/form/withFormSecurity.js +20 -41
- package/lib/gridlayout/GridCol.d.ts +6 -0
- package/lib/gridlayout/GridCol.js +7 -22
- package/lib/gridlayout/GridRow.d.ts +6 -0
- package/lib/gridlayout/GridRow.js +8 -28
- package/lib/gridlayout/index.d.ts +5 -0
- package/lib/gridlayout/index.js +5 -5
- package/lib/gridlayout/types.d.ts +20 -0
- package/lib/gridlayout/types.js +5 -0
- package/lib/icons/helper.d.ts +560 -0
- package/lib/icons/helper.js +560 -563
- package/lib/icons/index.d.ts +8 -0
- package/lib/icons/index.js +28 -45
- package/lib/icons/types.d.ts +28 -0
- package/lib/index.d.ts +50 -0
- package/lib/index.js +140 -14
- package/lib/inputs/base/InputTextBase.d.ts +8 -0
- package/lib/inputs/base/InputTextBase.js +54 -163
- package/lib/inputs/base/helpers.d.ts +14 -0
- package/lib/inputs/base/helpers.js +9 -9
- package/lib/inputs/base/types.d.ts +68 -0
- package/lib/inputs/base/types.js +5 -0
- package/lib/inputs/color/index.d.ts +7 -0
- package/lib/inputs/color/index.js +40 -38
- package/lib/inputs/color/types.d.ts +14 -0
- package/lib/inputs/color/types.js +5 -0
- package/lib/inputs/date/Dialog.d.ts +10 -0
- package/lib/inputs/date/Dialog.js +4 -11
- package/lib/inputs/date/Dropdown.d.ts +10 -0
- package/lib/inputs/date/Dropdown.js +21 -73
- package/lib/inputs/date/helpers.d.ts +14 -0
- package/lib/inputs/date/helpers.js +4 -4
- package/lib/inputs/date/index.d.ts +10 -0
- package/lib/inputs/date/index.js +259 -415
- package/lib/inputs/date/types.d.ts +53 -0
- package/lib/inputs/date/types.js +5 -0
- package/lib/inputs/inputHOC.d.ts +11 -0
- package/lib/inputs/inputHOC.js +48 -100
- package/lib/inputs/mask/BaseMask.d.ts +12 -0
- package/lib/inputs/mask/BaseMask.js +6 -20
- package/lib/inputs/mask/Cnpj.d.ts +12 -0
- package/lib/inputs/mask/Cnpj.js +17 -24
- package/lib/inputs/mask/Cpf.d.ts +12 -0
- package/lib/inputs/mask/Cpf.js +18 -26
- package/lib/inputs/mask/Phone.d.ts +9 -0
- package/lib/inputs/mask/Phone.js +5 -13
- package/lib/inputs/mask/ZipCode.d.ts +9 -0
- package/lib/inputs/mask/ZipCode.js +5 -5
- package/lib/inputs/mask/helpers.d.ts +14 -0
- package/lib/inputs/mask/helpers.js +21 -36
- package/lib/inputs/mask/imaskHOC.d.ts +14 -0
- package/lib/inputs/mask/imaskHOC.js +188 -257
- package/lib/inputs/mask/index.d.ts +11 -0
- package/lib/inputs/mask/index.js +8 -8
- package/lib/inputs/mask/types.d.ts +66 -0
- package/lib/inputs/mask/types.js +5 -0
- package/lib/inputs/multiSelect/ActionButtons.d.ts +10 -0
- package/lib/inputs/multiSelect/ActionButtons.js +9 -21
- package/lib/inputs/multiSelect/Dropdown.d.ts +10 -0
- package/lib/inputs/multiSelect/Dropdown.js +60 -87
- package/lib/inputs/multiSelect/helper.d.ts +9 -0
- package/lib/inputs/multiSelect/helper.js +2 -2
- package/lib/inputs/multiSelect/index.d.ts +10 -0
- package/lib/inputs/multiSelect/index.js +67 -90
- package/lib/inputs/multiSelect/types.d.ts +49 -0
- package/lib/inputs/multiSelect/types.js +5 -0
- package/lib/inputs/number/BaseNumber.d.ts +9 -0
- package/lib/inputs/number/BaseNumber.js +15 -27
- package/lib/inputs/number/Currency.d.ts +9 -0
- package/lib/inputs/number/Currency.js +8 -18
- package/lib/inputs/number/Decimal.d.ts +9 -0
- package/lib/inputs/number/Decimal.js +4 -4
- package/lib/inputs/number/format_number.d.ts +4 -0
- package/lib/inputs/number/index.d.ts +11 -0
- package/lib/inputs/number/index.js +14 -20
- package/lib/inputs/number/types.d.ts +27 -0
- package/lib/inputs/number/types.js +5 -0
- package/lib/inputs/period/Dialog.d.ts +11 -0
- package/lib/inputs/period/Dialog.js +4 -11
- package/lib/inputs/period/Dropdown.d.ts +11 -0
- package/lib/inputs/period/Dropdown.js +19 -73
- package/lib/inputs/period/PeriodList.d.ts +11 -0
- package/lib/inputs/period/PeriodList.js +12 -25
- package/lib/inputs/period/helper.d.ts +19 -0
- package/lib/inputs/period/helper.js +33 -74
- package/lib/inputs/period/index.d.ts +11 -0
- package/lib/inputs/period/index.js +136 -186
- package/lib/inputs/period/types.d.ts +58 -0
- package/lib/inputs/period/types.js +5 -0
- package/lib/inputs/search/index.d.ts +11 -0
- package/lib/inputs/search/index.js +133 -265
- package/lib/inputs/select/ActionButtons.d.ts +11 -0
- package/lib/inputs/select/ActionButtons.js +19 -25
- package/lib/inputs/select/Dropdown.d.ts +11 -0
- package/lib/inputs/select/Dropdown.js +42 -75
- package/lib/inputs/select/helper.d.ts +25 -0
- package/lib/inputs/select/helper.js +18 -14
- package/lib/inputs/select/index.d.ts +10 -0
- package/lib/inputs/select/index.js +15 -16
- package/lib/inputs/select/multiple/Selecteds.d.ts +10 -0
- package/lib/inputs/select/multiple/Selecteds.js +9 -17
- package/lib/inputs/select/multiple/index.d.ts +10 -0
- package/lib/inputs/select/multiple/index.js +293 -418
- package/lib/inputs/select/simple/index.d.ts +10 -0
- package/lib/inputs/select/simple/index.js +310 -463
- package/lib/inputs/select/types.d.ts +97 -0
- package/lib/inputs/select/types.js +5 -0
- package/lib/inputs/text/index.d.ts +9 -0
- package/lib/inputs/text/index.js +5 -4
- package/lib/inputs/text/types.d.ts +22 -0
- package/lib/inputs/text/types.js +5 -0
- package/lib/inputs/textarea/index.d.ts +5 -0
- package/lib/inputs/textarea/index.js +9 -19
- package/lib/inputs/textarea/types.d.ts +8 -0
- package/lib/inputs/textarea/types.js +5 -0
- package/lib/inputs/types.d.ts +146 -0
- package/lib/inputs/types.js +5 -0
- package/lib/internals/colorStyles.d.ts +9 -0
- package/lib/internals/colorStyles.js +2 -2
- package/lib/internals/constants.d.ts +11 -0
- package/lib/internals/types.d.ts +21 -0
- package/lib/internals/withTooltip.d.ts +11 -0
- package/lib/internals/withTooltip.js +32 -40
- package/lib/labelMessages/index.d.ts +7 -0
- package/lib/labelMessages/index.js +34 -52
- package/lib/labelMessages/types.d.ts +18 -0
- package/lib/labels/DangerLabel.d.ts +9 -0
- package/lib/labels/DangerLabel.js +16 -7
- package/lib/labels/DefaultLabel.d.ts +12 -0
- package/lib/labels/DefaultLabel.js +31 -63
- package/lib/labels/InfoLabel.d.ts +9 -0
- package/lib/labels/InfoLabel.js +16 -7
- package/lib/labels/PrimaryLabel.d.ts +9 -0
- package/lib/labels/PrimaryLabel.js +16 -7
- package/lib/labels/SuccessLabel.d.ts +9 -0
- package/lib/labels/SuccessLabel.js +16 -7
- package/lib/labels/WarningLabel.d.ts +9 -0
- package/lib/labels/WarningLabel.js +16 -7
- package/lib/labels/index.d.ts +13 -0
- package/lib/labels/index.js +10 -10
- package/lib/labels/label_container/index.d.ts +12 -0
- package/lib/labels/label_container/index.js +7 -17
- package/lib/labels/types.d.ts +24 -0
- package/lib/labels/types.js +5 -0
- package/lib/list/Header.d.ts +7 -0
- package/lib/list/Header.js +5 -18
- package/lib/list/Item.d.ts +7 -0
- package/lib/list/Item.js +39 -77
- package/lib/list/Separator.d.ts +3 -0
- package/lib/list/Separator.js +4 -4
- package/lib/list/helpers.d.ts +12 -0
- package/lib/list/helpers.js +2 -2
- package/lib/list/index.d.ts +10 -0
- package/lib/list/index.js +47 -66
- package/lib/list/types.d.ts +64 -0
- package/lib/list/types.js +5 -0
- package/lib/menus/float/MenuItem.d.ts +7 -0
- package/lib/menus/float/MenuItem.js +17 -37
- package/lib/menus/float/helpers.d.ts +7 -0
- package/lib/menus/float/helpers.js +4 -4
- package/lib/menus/float/index.d.ts +8 -0
- package/lib/menus/float/index.js +17 -37
- package/lib/menus/float/types.d.ts +27 -0
- package/lib/menus/float/types.js +5 -0
- package/lib/menus/index.d.ts +6 -0
- package/lib/menus/index.js +4 -4
- package/lib/menus/sidenav/ExpandMenu.d.ts +10 -0
- package/lib/menus/sidenav/ExpandMenu.js +6 -18
- package/lib/menus/sidenav/MenuLink.d.ts +13 -0
- package/lib/menus/sidenav/MenuLink.js +5 -19
- package/lib/menus/sidenav/NavMenuGroup.d.ts +10 -0
- package/lib/menus/sidenav/NavMenuGroup.js +6 -17
- package/lib/menus/sidenav/NavMenuItem.d.ts +13 -0
- package/lib/menus/sidenav/NavMenuItem.js +30 -56
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +10 -0
- package/lib/menus/sidenav/NavSubMenuItem.js +10 -21
- package/lib/menus/sidenav/helpers.d.ts +12 -0
- package/lib/menus/sidenav/helpers.js +5 -5
- package/lib/menus/sidenav/index.d.ts +14 -0
- package/lib/menus/sidenav/index.js +39 -69
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +10 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +9 -18
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +10 -0
- package/lib/menus/sidenav/popup_menu_search/index.js +25 -24
- package/lib/menus/sidenav/types.d.ts +82 -0
- package/lib/menus/sidenav/types.js +5 -0
- package/lib/noPermission/index.d.ts +3 -0
- package/lib/noPermission/index.js +7 -7
- package/lib/panel/Content.d.ts +8 -0
- package/lib/panel/Content.js +14 -26
- package/lib/panel/DangerPanel.d.ts +8 -0
- package/lib/panel/DangerPanel.js +6 -6
- package/lib/panel/Default.d.ts +8 -0
- package/lib/panel/Default.js +25 -52
- package/lib/panel/Header.d.ts +8 -0
- package/lib/panel/Header.js +18 -40
- package/lib/panel/InfoPanel.d.ts +8 -0
- package/lib/panel/InfoPanel.js +6 -6
- package/lib/panel/PrimaryPanel.d.ts +8 -0
- package/lib/panel/PrimaryPanel.js +6 -6
- package/lib/panel/SuccessPanel.d.ts +8 -0
- package/lib/panel/SuccessPanel.js +6 -6
- package/lib/panel/ToolBar.d.ts +8 -0
- package/lib/panel/ToolBar.js +4 -9
- package/lib/panel/WarningPanel.d.ts +8 -0
- package/lib/panel/WarningPanel.js +6 -6
- package/lib/panel/helpers.d.ts +4 -0
- package/lib/panel/helpers.js +9 -5
- package/lib/panel/index.d.ts +13 -0
- package/lib/panel/index.js +11 -11
- package/lib/panel/types.d.ts +4 -0
- package/lib/panel/types.js +5 -0
- package/lib/permissionValidations.d.ts +14 -0
- package/lib/permissionValidations.js +14 -12
- package/lib/popover/PopoverText.d.ts +8 -0
- package/lib/popover/PopoverText.js +4 -9
- package/lib/popover/PopoverTitle.d.ts +8 -0
- package/lib/popover/PopoverTitle.js +4 -9
- package/lib/popover/index.d.ts +13 -0
- package/lib/popover/index.js +35 -49
- package/lib/popover/types.d.ts +21 -0
- package/lib/popover/types.js +5 -0
- package/lib/progress/Bar.d.ts +6 -0
- package/lib/progress/Bar.js +42 -52
- package/lib/progress/index.d.ts +7 -0
- package/lib/progress/index.js +14 -24
- package/lib/progress/types.d.ts +37 -0
- package/lib/progress/types.js +5 -0
- package/lib/radio/index.d.ts +12 -0
- package/lib/radio/index.js +28 -52
- package/lib/radio/types.d.ts +18 -0
- package/lib/skeleton/SkeletonContainer.d.ts +7 -0
- package/lib/skeleton/SkeletonContainer.js +4 -17
- package/lib/skeleton/index.d.ts +8 -0
- package/lib/skeleton/index.js +13 -32
- package/lib/skeleton/types.d.ts +21 -0
- package/lib/skeleton/types.js +5 -0
- package/lib/spinner/SpinnerLoading.d.ts +7 -0
- package/lib/spinner/SpinnerLoading.js +45 -53
- package/lib/spinner/index.d.ts +7 -0
- package/lib/spinner/index.js +28 -33
- package/lib/spinner/types.d.ts +20 -0
- package/lib/spinner/types.js +5 -0
- package/lib/split/Split.d.ts +6 -0
- package/lib/split/Split.js +52 -69
- package/lib/split/SplitSide.d.ts +6 -0
- package/lib/split/SplitSide.js +7 -27
- package/lib/split/helpers.d.ts +10 -0
- package/lib/split/helpers.js +4 -4
- package/lib/split/index.d.ts +5 -0
- package/lib/split/index.js +5 -5
- package/lib/split/types.d.ts +34 -0
- package/lib/split/types.js +5 -0
- package/lib/table/Body.d.ts +6 -0
- package/lib/table/Body.js +21 -28
- package/lib/table/Header.d.ts +6 -0
- package/lib/table/Header.js +18 -25
- package/lib/table/HeaderColumn.d.ts +6 -0
- package/lib/table/HeaderColumn.js +13 -27
- package/lib/table/Row.d.ts +6 -0
- package/lib/table/Row.js +13 -34
- package/lib/table/RowColumn.d.ts +6 -0
- package/lib/table/RowColumn.js +18 -36
- package/lib/table/helpers.d.ts +8 -0
- package/lib/table/helpers.js +5 -5
- package/lib/table/index.d.ts +11 -0
- package/lib/table/index.js +19 -57
- package/lib/table/types.d.ts +77 -0
- package/lib/table/types.js +5 -0
- package/lib/tabs/DropdownItems.d.ts +9 -0
- package/lib/tabs/DropdownItems.js +20 -30
- package/lib/tabs/Menu.d.ts +9 -0
- package/lib/tabs/Menu.js +21 -25
- package/lib/tabs/MenuItems.d.ts +9 -0
- package/lib/tabs/MenuItems.js +33 -47
- package/lib/tabs/Panel.d.ts +9 -0
- package/lib/tabs/Panel.js +24 -57
- package/lib/tabs/index.d.ts +10 -0
- package/lib/tabs/index.js +89 -83
- package/lib/tabs/tabHelpers.d.ts +21 -0
- package/lib/tabs/tabHelpers.js +10 -9
- package/lib/tabs/types.d.ts +63 -0
- package/lib/tabs/types.js +5 -0
- package/lib/toolbar/ButtonBar.d.ts +10 -0
- package/lib/toolbar/ButtonBar.js +51 -32
- package/lib/toolbar/LabelBar.d.ts +10 -0
- package/lib/toolbar/LabelBar.js +42 -29
- package/lib/toolbar/Separator.d.ts +3 -0
- package/lib/toolbar/Separator.js +4 -4
- package/lib/toolbar/ToolBarGroup.d.ts +10 -0
- package/lib/toolbar/ToolBarGroup.js +10 -16
- package/lib/toolbar/helpers.d.ts +10 -0
- package/lib/toolbar/helpers.js +3 -3
- package/lib/toolbar/index.d.ts +14 -0
- package/lib/toolbar/index.js +26 -34
- package/lib/toolbar/types.d.ts +43 -0
- package/lib/toolbar/types.js +5 -0
- package/lib/tooltip/index.d.ts +6 -0
- package/lib/tooltip/index.js +34 -43
- package/lib/tooltip/types.d.ts +16 -0
- package/lib/tooltip/types.js +5 -0
- package/lib/treeview/Header.d.ts +7 -0
- package/lib/treeview/Header.js +5 -17
- package/lib/treeview/Node.d.ts +7 -0
- package/lib/treeview/Node.js +265 -391
- package/lib/treeview/constants.d.ts +7 -0
- package/lib/treeview/constants.js +2 -3
- package/lib/treeview/index.d.ts +9 -0
- package/lib/treeview/index.js +369 -554
- package/lib/treeview/types.d.ts +104 -0
- package/lib/treeview/types.js +5 -0
- package/lib/treeview_old/Header.js +7 -7
- package/lib/treeview_old/Node.js +18 -18
- package/lib/treeview_old/index.js +9 -9
- package/lib/types-3c6f1c20.d.ts +46 -0
- package/lib/uitour/helpers.d.ts +8 -0
- package/lib/uitour/index.d.ts +6 -0
- package/lib/uitour/index.js +28 -45
- package/lib/uitour/types.d.ts +30 -0
- package/lib/uitour/types.js +5 -0
- package/package.json +57 -18
- package/scripts/start.js +135 -0
- package/tsconfig.json +32 -0
- package/tsup.config.ts +10 -0
- package/.eslintrc.js +0 -26
- package/.husky/pre-commit +0 -4
- package/lib/alerts/alert.spec.js +0 -133
- package/lib/avatar/avatar.spec.js +0 -190
- package/lib/badge/badge.spec.js +0 -127
- package/lib/buttons/SpinnerLoading.js +0 -230
- package/lib/buttons/buttons.spec.js +0 -504
- package/lib/calendar/calendar.spec.js +0 -171
- package/lib/checkbox/checkbox.spec.js +0 -215
- package/lib/dialog/dialog.spec.js +0 -488
- package/lib/drawer/Drawer.spec.js +0 -258
- package/lib/dropdown/dropdown.spec.js +0 -168
- package/lib/fieldset/fieldset.spec.js +0 -329
- package/lib/form/form.spec.js +0 -293
- package/lib/gridlayout/gridLayout.spec.js +0 -169
- package/lib/icons/icons.spec.js +0 -86
- package/lib/inputs/base/base.spec.js +0 -690
- package/lib/inputs/base/index.js +0 -1
- package/lib/inputs/color/color_input.spec.js +0 -174
- package/lib/inputs/date/date.spec.js +0 -354
- package/lib/inputs/mask/input_mask.spec.js +0 -607
- package/lib/inputs/number/numberfield.spec.js +0 -215
- package/lib/inputs/search/search_input.spec.js +0 -209
- package/lib/inputs/select/select.spec.js +0 -391
- package/lib/inputs/text/textfield.spec.js +0 -215
- package/lib/inputs/textarea/textarea.spec.js +0 -59
- package/lib/labelMessages/labelMessages.spec.js +0 -176
- package/lib/labels/label.spec.js +0 -162
- package/lib/list/list.spec.js +0 -768
- package/lib/menus/float/float-menu.spec.js +0 -221
- package/lib/menus/sidenav/sidenav.spec.js +0 -379
- package/lib/panel/panel.spec.js +0 -216
- package/lib/popover/popover.spec.js +0 -146
- package/lib/progress/progress.spec.js +0 -86
- package/lib/radio/radio.spec.js +0 -189
- package/lib/spinner/spinner.spec.js +0 -152
- package/lib/split/split.spec.js +0 -151
- package/lib/table/table.spec.js +0 -352
- package/lib/tabs/tabs.spec.js +0 -349
- package/lib/toolbar/toolbar.spec.js +0 -394
- package/lib/tooltip/tooltip.spec.js +0 -203
- package/lib/treeview/treeview.spec.js +0 -279
- package/lib/uitour/uitour.spec.js +0 -176
package/lib/checkbox/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
12
|
var _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
15
13
|
|
|
16
14
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
@@ -19,13 +17,13 @@ require("../assets/styles/checkbox.scss");
|
|
|
19
17
|
|
|
20
18
|
var _permissionValidations = require("../permissionValidations");
|
|
21
19
|
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
21
|
|
|
24
22
|
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
23
|
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
24
|
+
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
25
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
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
27
|
|
|
30
28
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
29
|
|
|
@@ -44,23 +42,28 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
44
42
|
* o componente Field dentro do componente Form, pois o mesmo leva em consideração o tipo do
|
|
45
43
|
* componente para gerar propriedades customizadas.
|
|
46
44
|
*/
|
|
47
|
-
var CheckBox = function CheckBox(
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
id =
|
|
57
|
-
gridLayout =
|
|
58
|
-
checked =
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
var CheckBox = function CheckBox(_ref) {
|
|
46
|
+
var name = _ref.name,
|
|
47
|
+
required = _ref.required,
|
|
48
|
+
value = _ref.value,
|
|
49
|
+
label = _ref.label,
|
|
50
|
+
onChange = _ref.onChange,
|
|
51
|
+
autofocus = _ref.autofocus,
|
|
52
|
+
hint = _ref.hint,
|
|
53
|
+
_ref$id = _ref.id,
|
|
54
|
+
id = _ref$id === void 0 ? '' : _ref$id,
|
|
55
|
+
gridLayout = _ref.gridLayout,
|
|
56
|
+
_ref$checked = _ref.checked,
|
|
57
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
58
|
+
disabled = _ref.disabled,
|
|
59
|
+
permissionAttr = _ref.permissionAttr,
|
|
60
|
+
tooltip = _ref.tooltip,
|
|
61
|
+
_ref$tooltipPosition = _ref.tooltipPosition,
|
|
62
|
+
tooltipPosition = _ref$tooltipPosition === void 0 ? 'top' : _ref$tooltipPosition,
|
|
63
|
+
_ref$tooltipWidth = _ref.tooltipWidth,
|
|
64
|
+
tooltipWidth = _ref$tooltipWidth === void 0 ? 'auto' : _ref$tooltipWidth,
|
|
65
|
+
skeletonize = _ref.skeletonize,
|
|
66
|
+
targetRef = _ref.targetRef;
|
|
64
67
|
|
|
65
68
|
var _useState = (0, _react.useState)(checked),
|
|
66
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -69,11 +72,11 @@ var CheckBox = function CheckBox(props) {
|
|
|
69
72
|
|
|
70
73
|
var options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
71
74
|
|
|
72
|
-
var _useState3 = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(
|
|
75
|
+
var _useState3 = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr)),
|
|
73
76
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
74
77
|
onDenied = _useState4[0];
|
|
75
78
|
|
|
76
|
-
var inputRef = (0, _react.useRef)(
|
|
79
|
+
var inputRef = (0, _react.useRef)(null);
|
|
77
80
|
(0, _react.useEffect)(function () {
|
|
78
81
|
setIsChecked(checked);
|
|
79
82
|
}, [checked]);
|
|
@@ -84,44 +87,42 @@ var CheckBox = function CheckBox(props) {
|
|
|
84
87
|
|
|
85
88
|
var getProps = function getProps() {
|
|
86
89
|
if (!onChange || shouldDisable()) return null;
|
|
87
|
-
var target = {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
name: name,
|
|
94
|
-
value: !isChecked
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
90
|
+
var target = {
|
|
91
|
+
checked: !isChecked,
|
|
92
|
+
id: id,
|
|
93
|
+
name: name,
|
|
94
|
+
value: !isChecked
|
|
95
|
+
};
|
|
98
96
|
return {
|
|
99
97
|
onClick: function onClick() {
|
|
100
98
|
onChange({
|
|
101
99
|
target: target
|
|
102
100
|
});
|
|
103
101
|
},
|
|
104
|
-
onKeyDown:
|
|
102
|
+
onKeyDown: undefined,
|
|
105
103
|
role: 'checkbox',
|
|
106
|
-
tabIndex:
|
|
104
|
+
tabIndex: -1
|
|
107
105
|
};
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
var renderInput = function renderInput() {
|
|
111
|
-
return /*#__PURE__*/_react
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, getProps(), {
|
|
112
110
|
className: "checkbox-component ".concat(skeletonize ? '-skeletonized' : '')
|
|
113
|
-
}), /*#__PURE__*/_react
|
|
111
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
114
112
|
"data-testid": "checkbox-container",
|
|
115
113
|
className: "inputcontent",
|
|
116
114
|
onClick: !shouldDisable() && !skeletonize ? function () {
|
|
117
115
|
return setIsChecked(!isChecked);
|
|
118
|
-
} :
|
|
119
|
-
tabIndex:
|
|
116
|
+
} : undefined,
|
|
117
|
+
tabIndex: -1,
|
|
120
118
|
role: "checkbox",
|
|
121
119
|
"aria-checked": "false",
|
|
122
|
-
onKeyPress:
|
|
123
|
-
}, /*#__PURE__*/_react
|
|
124
|
-
ref:
|
|
120
|
+
onKeyPress: undefined
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
122
|
+
ref: function ref(r) {
|
|
123
|
+
if (targetRef) targetRef(r);
|
|
124
|
+
inputRef.current = r;
|
|
125
|
+
},
|
|
125
126
|
className: "input",
|
|
126
127
|
type: "checkbox",
|
|
127
128
|
autoFocus: autofocus,
|
|
@@ -132,60 +133,22 @@ var CheckBox = function CheckBox(props) {
|
|
|
132
133
|
value: value,
|
|
133
134
|
id: id,
|
|
134
135
|
onChange: function onChange() {}
|
|
135
|
-
}), /*#__PURE__*/_react
|
|
136
|
+
}), /*#__PURE__*/_react.default.createElement("span", null), label && /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
136
137
|
label: label,
|
|
137
138
|
tooltip: tooltip,
|
|
138
139
|
tooltipWidth: tooltipWidth,
|
|
139
140
|
tooltipPosition: tooltipPosition
|
|
140
|
-
})), hint && /*#__PURE__*/_react
|
|
141
|
+
})), hint && /*#__PURE__*/_react.default.createElement("div", {
|
|
141
142
|
className: "hint"
|
|
142
|
-
}, /*#__PURE__*/_react
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, hint)));
|
|
143
144
|
};
|
|
144
145
|
|
|
145
146
|
if (onDenied.unvisible) return null;
|
|
146
|
-
return gridLayout ? /*#__PURE__*/_react
|
|
147
|
+
return gridLayout ? /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
147
148
|
customClass: "-withinput",
|
|
148
149
|
cols: gridLayout
|
|
149
150
|
}, renderInput()) : renderInput();
|
|
150
151
|
};
|
|
151
152
|
|
|
152
|
-
CheckBox.propTypes = {
|
|
153
|
-
id: _propTypes["default"].string,
|
|
154
|
-
label: _propTypes["default"].string,
|
|
155
|
-
disabled: _propTypes["default"].bool,
|
|
156
|
-
defaultChecked: _propTypes["default"].bool,
|
|
157
|
-
checked: _propTypes["default"].bool,
|
|
158
|
-
required: _propTypes["default"].bool,
|
|
159
|
-
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].bool]),
|
|
160
|
-
name: _propTypes["default"].string,
|
|
161
|
-
onChange: _propTypes["default"].func,
|
|
162
|
-
autofocus: _propTypes["default"].bool,
|
|
163
|
-
hint: _propTypes["default"].string,
|
|
164
|
-
gridLayout: _propTypes["default"].string,
|
|
165
|
-
permissionAttr: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].arrayOf(_propTypes["default"].object)]),
|
|
166
|
-
tooltip: _propTypes["default"].string,
|
|
167
|
-
tooltipPosition: _propTypes["default"].string,
|
|
168
|
-
tooltipWidth: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
169
|
-
skeletonize: _propTypes["default"].bool
|
|
170
|
-
};
|
|
171
|
-
CheckBox.defaultProps = {
|
|
172
|
-
label: '',
|
|
173
|
-
disabled: false,
|
|
174
|
-
defaultChecked: false,
|
|
175
|
-
required: false,
|
|
176
|
-
value: '',
|
|
177
|
-
name: '',
|
|
178
|
-
checked: false,
|
|
179
|
-
onChange: undefined,
|
|
180
|
-
autofocus: false,
|
|
181
|
-
hint: undefined,
|
|
182
|
-
id: undefined,
|
|
183
|
-
gridLayout: undefined,
|
|
184
|
-
permissionAttr: undefined,
|
|
185
|
-
tooltip: '',
|
|
186
|
-
tooltipPosition: 'top',
|
|
187
|
-
tooltipWidth: 'auto',
|
|
188
|
-
skeletonize: false
|
|
189
|
-
};
|
|
190
153
|
var _default = CheckBox;
|
|
191
|
-
exports
|
|
154
|
+
exports.default = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { PermissionAttr } from '../@types/PermissionAttr.js';
|
|
3
|
+
import { Position } from '../@types/Position.js';
|
|
4
|
+
|
|
5
|
+
declare type ChangeEvent = {
|
|
6
|
+
checked: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
value: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare type Target = {
|
|
12
|
+
target: ChangeEvent;
|
|
13
|
+
};
|
|
14
|
+
interface ICheckBoxProps {
|
|
15
|
+
id?: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
defaultChecked?: boolean;
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
value?: string | number;
|
|
22
|
+
name?: string;
|
|
23
|
+
onChange?: (event: Target) => void;
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
autoFocus?: boolean;
|
|
26
|
+
e?: {
|
|
27
|
+
target: Element;
|
|
28
|
+
} | undefined;
|
|
29
|
+
children?: ReactElement;
|
|
30
|
+
autofocus?: boolean;
|
|
31
|
+
hint?: string;
|
|
32
|
+
gridLayout?: string;
|
|
33
|
+
permissionAttr?: PermissionAttr | PermissionAttr[];
|
|
34
|
+
tooltip?: string;
|
|
35
|
+
tooltipPosition?: Exclude<Position, 'center'>;
|
|
36
|
+
tooltipWidth?: string | number;
|
|
37
|
+
skeletonize?: boolean;
|
|
38
|
+
targetRef?: (ref: HTMLInputElement | null) => void;
|
|
39
|
+
targetSpanRef?: (ref: HTMLSpanElement | null) => void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { ChangeEvent, ICheckBoxProps };
|
package/lib/dialog/Alert.js
CHANGED
|
@@ -3,31 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _buttons = require("../../lib/buttons");
|
|
10
|
+
var _buttons = require("../buttons");
|
|
13
11
|
|
|
14
12
|
var _Custom = _interopRequireDefault(require("./Custom"));
|
|
15
13
|
|
|
16
|
-
var _icons = _interopRequireDefault(require("
|
|
14
|
+
var _icons = _interopRequireDefault(require("../icons"));
|
|
17
15
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
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); }
|
|
21
19
|
|
|
22
20
|
var Alert = function Alert(props) {
|
|
23
|
-
var buttons = [/*#__PURE__*/_react
|
|
21
|
+
var buttons = [/*#__PURE__*/_react.default.createElement(_buttons.PrimaryButton, {
|
|
24
22
|
key: "confirm-buttom",
|
|
25
23
|
onClick: props.onConfirmClick,
|
|
26
24
|
label: "Confirmar"
|
|
27
25
|
})];
|
|
28
|
-
return /*#__PURE__*/_react
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Custom.default, _extends({}, props, {
|
|
29
27
|
buttons: buttons,
|
|
30
|
-
icon: /*#__PURE__*/_react
|
|
28
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
31
29
|
name: "exclamation",
|
|
32
30
|
color: "#f39c12",
|
|
33
31
|
size: 64
|
|
@@ -35,8 +33,5 @@ var Alert = function Alert(props) {
|
|
|
35
33
|
}));
|
|
36
34
|
};
|
|
37
35
|
|
|
38
|
-
Alert.propTypes = {
|
|
39
|
-
onConfirmClick: _propTypes["default"].func.isRequired
|
|
40
|
-
};
|
|
41
36
|
var _default = Alert;
|
|
42
|
-
exports
|
|
37
|
+
exports.default = _default;
|
package/lib/dialog/Custom.js
CHANGED
|
@@ -3,31 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
12
|
var _base = _interopRequireDefault(require("./base"));
|
|
15
13
|
|
|
16
14
|
var _Footer = _interopRequireDefault(require("./base/Footer"));
|
|
17
15
|
|
|
18
|
-
var _icons = _interopRequireDefault(require("
|
|
16
|
+
var _icons = _interopRequireDefault(require("../icons"));
|
|
19
17
|
|
|
20
|
-
var _buttons = require("
|
|
18
|
+
var _buttons = require("../buttons");
|
|
21
19
|
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
21
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
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); }
|
|
25
23
|
|
|
26
24
|
var getIcon = function getIcon(iconName, icon) {
|
|
27
|
-
if (icon
|
|
25
|
+
if (icon) {
|
|
28
26
|
return icon;
|
|
29
|
-
} else if (iconName
|
|
30
|
-
return /*#__PURE__*/_react
|
|
27
|
+
} else if (iconName) {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
31
29
|
name: iconName,
|
|
32
30
|
color: "#000",
|
|
33
31
|
size: 64
|
|
@@ -38,39 +36,33 @@ var getIcon = function getIcon(iconName, icon) {
|
|
|
38
36
|
};
|
|
39
37
|
|
|
40
38
|
var Custom = function Custom(props) {
|
|
41
|
-
|
|
39
|
+
var _props$width = props.width,
|
|
40
|
+
width = _props$width === void 0 ? '35%' : _props$width,
|
|
41
|
+
_props$height = props.height,
|
|
42
|
+
height = _props$height === void 0 ? 'auto' : _props$height,
|
|
43
|
+
_props$iconName = props.iconName,
|
|
44
|
+
iconName = _props$iconName === void 0 ? '' : _props$iconName;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_base.default, _extends({
|
|
46
|
+
width: width,
|
|
47
|
+
height: height
|
|
48
|
+
}, props, {
|
|
42
49
|
wrapperClassName: "dialog-alert-wrapper"
|
|
43
|
-
}), /*#__PURE__*/_react
|
|
50
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
51
|
className: "icon"
|
|
45
|
-
}, getIcon(
|
|
52
|
+
}, getIcon(iconName, props.icon)), /*#__PURE__*/_react.default.createElement("div", {
|
|
46
53
|
className: "container"
|
|
47
|
-
}, props.title && /*#__PURE__*/_react
|
|
54
|
+
}, props.title && /*#__PURE__*/_react.default.createElement("div", {
|
|
48
55
|
className: "title"
|
|
49
|
-
}, props.title), /*#__PURE__*/_react
|
|
56
|
+
}, props.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
57
|
className: "text"
|
|
51
|
-
}, props.text)), /*#__PURE__*/_react
|
|
58
|
+
}, props.text)), /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
|
|
52
59
|
position: "right"
|
|
53
60
|
}, props.buttons.map(function (button) {
|
|
54
|
-
return /*#__PURE__*/_react
|
|
55
|
-
key: "button-".concat(_uuid
|
|
61
|
+
return /*#__PURE__*/_react.default.cloneElement(button, {
|
|
62
|
+
key: "button-".concat(_uuid.default.v1())
|
|
56
63
|
});
|
|
57
64
|
}))));
|
|
58
65
|
};
|
|
59
66
|
|
|
60
|
-
Custom.propTypes = {
|
|
61
|
-
height: _propTypes["default"].string,
|
|
62
|
-
width: _propTypes["default"].string,
|
|
63
|
-
icon: _propTypes["default"].instanceOf(Object),
|
|
64
|
-
iconName: _propTypes["default"].string,
|
|
65
|
-
title: _propTypes["default"].string.isRequired,
|
|
66
|
-
text: _propTypes["default"].string.isRequired,
|
|
67
|
-
buttons: _propTypes["default"].arrayOf(_propTypes["default"].element).isRequired
|
|
68
|
-
};
|
|
69
|
-
Custom.defaultProps = {
|
|
70
|
-
height: 'auto',
|
|
71
|
-
width: '35%',
|
|
72
|
-
icon: null,
|
|
73
|
-
iconName: ''
|
|
74
|
-
};
|
|
75
67
|
var _default = Custom;
|
|
76
|
-
exports
|
|
68
|
+
exports.default = _default;
|
package/lib/dialog/Error.js
CHANGED
|
@@ -3,31 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _buttons = require("../../lib/buttons");
|
|
13
11
|
|
|
14
12
|
var _Custom = _interopRequireDefault(require("./Custom"));
|
|
15
13
|
|
|
16
14
|
var _icons = _interopRequireDefault(require("../../lib/icons"));
|
|
17
15
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
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); }
|
|
21
19
|
|
|
22
20
|
var Error = function Error(props) {
|
|
23
|
-
var buttons = [/*#__PURE__*/_react
|
|
21
|
+
var buttons = [/*#__PURE__*/_react.default.createElement(_buttons.PrimaryButton, {
|
|
24
22
|
key: "confirm-buttom",
|
|
25
23
|
onClick: props.onConfirmClick,
|
|
26
24
|
label: "Confirmar"
|
|
27
25
|
})];
|
|
28
|
-
return /*#__PURE__*/_react
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Custom.default, _extends({}, props, {
|
|
29
27
|
buttons: buttons,
|
|
30
|
-
icon: /*#__PURE__*/_react
|
|
28
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
31
29
|
name: "block",
|
|
32
30
|
color: "#e74c3c",
|
|
33
31
|
size: 64
|
|
@@ -35,8 +33,5 @@ var Error = function Error(props) {
|
|
|
35
33
|
}));
|
|
36
34
|
};
|
|
37
35
|
|
|
38
|
-
Error.propTypes = {
|
|
39
|
-
onConfirmClick: _propTypes["default"].func.isRequired
|
|
40
|
-
};
|
|
41
36
|
var _default = Error;
|
|
42
|
-
exports
|
|
37
|
+
exports.default = _default;
|
|
@@ -3,31 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _buttons = require("../../lib/buttons");
|
|
13
11
|
|
|
14
12
|
var _Custom = _interopRequireDefault(require("./Custom"));
|
|
15
13
|
|
|
16
14
|
var _icons = _interopRequireDefault(require("../../lib/icons"));
|
|
17
15
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
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); }
|
|
21
19
|
|
|
22
20
|
var Information = function Information(props) {
|
|
23
|
-
var buttons = [/*#__PURE__*/_react
|
|
21
|
+
var buttons = [/*#__PURE__*/_react.default.createElement(_buttons.PrimaryButton, {
|
|
24
22
|
key: "confirm-buttom",
|
|
25
23
|
onClick: props.onConfirmClick,
|
|
26
24
|
label: "Confirmar"
|
|
27
25
|
})];
|
|
28
|
-
return /*#__PURE__*/_react
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Custom.default, _extends({}, props, {
|
|
29
27
|
buttons: buttons,
|
|
30
|
-
icon: /*#__PURE__*/_react
|
|
28
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
31
29
|
name: "information",
|
|
32
30
|
color: "#24cabc",
|
|
33
31
|
size: 64
|
|
@@ -35,8 +33,5 @@ var Information = function Information(props) {
|
|
|
35
33
|
}));
|
|
36
34
|
};
|
|
37
35
|
|
|
38
|
-
Information.propTypes = {
|
|
39
|
-
onConfirmClick: _propTypes["default"].func.isRequired
|
|
40
|
-
};
|
|
41
36
|
var _default = Information;
|
|
42
|
-
exports
|
|
37
|
+
exports.default = _default;
|
package/lib/dialog/Question.js
CHANGED
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _buttons = _interopRequireWildcard(require("../../lib/buttons"));
|
|
12
|
+
var _buttons = _interopRequireWildcard(require("../buttons"));
|
|
15
13
|
|
|
16
14
|
var _Custom = _interopRequireDefault(require("./Custom"));
|
|
17
15
|
|
|
18
|
-
var _icons = _interopRequireDefault(require("
|
|
16
|
+
var _icons = _interopRequireDefault(require("../icons"));
|
|
19
17
|
|
|
20
18
|
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); }
|
|
21
19
|
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
20
|
+
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; }
|
|
23
21
|
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
23
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
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); }
|
|
27
25
|
|
|
28
26
|
var Question = function Question(props) {
|
|
29
|
-
var visible = props.visible,
|
|
27
|
+
var _props$visible = props.visible,
|
|
28
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
30
29
|
isWaiting = props.isWaiting,
|
|
31
30
|
onConfirmClick = props.onConfirmClick,
|
|
32
31
|
onUnconfirmClick = props.onUnconfirmClick;
|
|
33
|
-
var buttons = [/*#__PURE__*/_react
|
|
32
|
+
var buttons = [/*#__PURE__*/_react.default.createElement(_buttons.DangerButton, {
|
|
34
33
|
key: "yes-buttom",
|
|
35
34
|
disabled: isWaiting,
|
|
36
35
|
onClick: onConfirmClick,
|
|
37
36
|
isLoading: isWaiting,
|
|
38
37
|
label: "Sim"
|
|
39
|
-
}), /*#__PURE__*/_react
|
|
38
|
+
}), /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
40
39
|
key: "no-buttom",
|
|
41
40
|
disabled: isWaiting,
|
|
42
41
|
onClick: onUnconfirmClick,
|
|
43
42
|
label: "N\xE3o"
|
|
44
43
|
})];
|
|
45
44
|
if (!visible) return null;
|
|
46
|
-
return /*#__PURE__*/_react
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_Custom.default, _extends({}, props, {
|
|
47
46
|
buttons: buttons,
|
|
48
|
-
icon: /*#__PURE__*/_react
|
|
47
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
49
48
|
name: "question",
|
|
50
49
|
color: "#3498db",
|
|
51
50
|
size: 64
|
|
@@ -53,15 +52,5 @@ var Question = function Question(props) {
|
|
|
53
52
|
}));
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
Question.propTypes = {
|
|
57
|
-
onUnconfirmClick: _propTypes["default"].func.isRequired,
|
|
58
|
-
onConfirmClick: _propTypes["default"].func.isRequired,
|
|
59
|
-
visible: _propTypes["default"].bool,
|
|
60
|
-
isWaiting: _propTypes["default"].bool
|
|
61
|
-
};
|
|
62
|
-
Question.defaultProps = {
|
|
63
|
-
visible: true,
|
|
64
|
-
isWaiting: false
|
|
65
|
-
};
|
|
66
55
|
var _default = Question;
|
|
67
|
-
exports
|
|
56
|
+
exports.default = _default;
|