@loja-integrada/admin-components 0.19.4 → 1.0.0
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/LICENSE +1 -1
- package/README.md +7 -72
- package/dist/chunk-3IB6AR7I.js +8 -0
- package/dist/chunk-AYBQ5B4L.js +1 -0
- package/dist/chunk-C3ECJWEX.js +7 -0
- package/dist/chunk-LTWCICTK.js +1 -0
- package/dist/chunk-QCTWLTAA.js +1 -0
- package/dist/chunk-W64HPITJ.js +8 -0
- package/dist/components/Button/Button.d.ts +52 -0
- package/dist/components/Button/Button.js +3 -0
- package/dist/components/Button/index.d.ts +6 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/Icon/Icon.d.ts +127 -0
- package/dist/components/Icon/Icon.js +1 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/{Icons → components}/IconCircular/IconCircular.d.ts +22 -19
- package/dist/components/IconCircular/IconCircular.js +3 -0
- package/dist/components/IconCircular/index.d.ts +4 -0
- package/dist/components/IconCircular/index.js +4 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +243 -6
- package/dist/index.js +17 -6
- package/package.json +95 -139
- package/dist/Components/Button/Button.d.ts +0 -42
- package/dist/Components/Button/Button.spec.d.ts +0 -1
- package/dist/Components/Button/Button.stories.d.ts +0 -11
- package/dist/Components/Button/index.d.ts +0 -1
- package/dist/Components/HelpLink/HelpLink.spec.d.ts +0 -1
- package/dist/Components/HelpLink/HelpLink.stories.d.ts +0 -6
- package/dist/Components/HelpLink/index.d.ts +0 -28
- package/dist/Components/LoadingPlaceholder/LoadingPlaceholder.d.ts +0 -5
- package/dist/Components/LoadingPlaceholder/LoadingPlaceholder.stories.d.ts +0 -4
- package/dist/Components/LoadingPlaceholder/index.d.ts +0 -1
- package/dist/Components/Modal/Modal.d.ts +0 -48
- package/dist/Components/Modal/Modal.spec.d.ts +0 -1
- package/dist/Components/Modal/Modal.stories.d.ts +0 -7
- package/dist/Components/Modal/index.d.ts +0 -1
- package/dist/Components/SidebarFixed/SidebarFixed.d.ts +0 -30
- package/dist/Components/SidebarFixed/SidebarFixed.spec.d.ts +0 -1
- package/dist/Components/SidebarFixed/SidebarFixed.stories.d.ts +0 -4
- package/dist/Components/SidebarFixed/index.d.ts +0 -1
- package/dist/Components/Table/Table.d.ts +0 -81
- package/dist/Components/Table/Table.stories.d.ts +0 -8
- package/dist/Components/Table/index.d.ts +0 -1
- package/dist/Components/TableList/TableList.d.ts +0 -38
- package/dist/Components/TableList/TableList.spec.d.ts +0 -1
- package/dist/Components/TableList/TableList.stories.d.ts +0 -7
- package/dist/Components/TableList/TableListItem.d.ts +0 -3
- package/dist/Components/TableList/TableListItem.interface.d.ts +0 -68
- package/dist/Components/TableList/TableListItem.spec.d.ts +0 -1
- package/dist/Components/TableList/TableListItem.stories.d.ts +0 -4
- package/dist/Components/TableList/TableListItemLoading.d.ts +0 -3
- package/dist/Components/TableList/TableListItemLoading.spec.d.ts +0 -1
- package/dist/Components/TableList/TableListItemLoading.stories.d.ts +0 -4
- package/dist/Components/TableList/TableListItemWrapper.d.ts +0 -12
- package/dist/Components/TableList/TableListItemWrapper.spec.d.ts +0 -1
- package/dist/Components/TableList/TableListItemWrapper.stories.d.ts +0 -4
- package/dist/Components/TableList/index.d.ts +0 -4
- package/dist/Components/Tabs/Tabs.d.ts +0 -21
- package/dist/Components/Tabs/Tabs.spec.d.ts +0 -1
- package/dist/Components/Tabs/Tabs.stories.d.ts +0 -5
- package/dist/Components/Tabs/TabsItem.d.ts +0 -14
- package/dist/Components/Tabs/TabsItem.interface.d.ts +0 -19
- package/dist/Components/Tabs/index.d.ts +0 -1
- package/dist/Components/Timeline/Timeline.d.ts +0 -25
- package/dist/Components/Timeline/Timeline.spec.d.ts +0 -1
- package/dist/Components/Timeline/Timeline.stories.d.ts +0 -7
- package/dist/Components/Timeline/TimelineItem.d.ts +0 -6
- package/dist/Components/Timeline/TimelineItem.interface.d.ts +0 -32
- package/dist/Components/Timeline/index.d.ts +0 -1
- package/dist/Components/index.d.ts +0 -8
- package/dist/Forms/Checkbox/Checkbox.d.ts +0 -27
- package/dist/Forms/Checkbox/Checkbox.spec.d.ts +0 -1
- package/dist/Forms/Checkbox/Checkbox.stories.d.ts +0 -10
- package/dist/Forms/Checkbox/index.d.ts +0 -1
- package/dist/Forms/Dropdown/Dropdown.d.ts +0 -168
- package/dist/Forms/Dropdown/Dropdown.spec.d.ts +0 -1
- package/dist/Forms/Dropdown/Dropdown.stories.d.ts +0 -19
- package/dist/Forms/Dropdown/index.d.ts +0 -1
- package/dist/Forms/FloatingLabelInput/FloatingLabelInput.d.ts +0 -11
- package/dist/Forms/FloatingLabelInput/FloatingLabelInput.spec.d.ts +0 -1
- package/dist/Forms/FloatingLabelInput/FloatingLabelInput.stories.d.ts +0 -10
- package/dist/Forms/FloatingLabelInput/index.d.ts +0 -1
- package/dist/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.d.ts +0 -49
- package/dist/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.spec.d.ts +0 -1
- package/dist/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.stories.d.ts +0 -10
- package/dist/Forms/FloatingLabelInputCurrency/index.d.ts +0 -1
- package/dist/Forms/FloatingLabelInputMask/FloatingLabelInputMask.d.ts +0 -18
- package/dist/Forms/FloatingLabelInputMask/FloatingLabelInputMask.spec.d.ts +0 -1
- package/dist/Forms/FloatingLabelInputMask/FloatingLabelInputMask.stories.d.ts +0 -19
- package/dist/Forms/FloatingLabelInputMask/index.d.ts +0 -1
- package/dist/Forms/Input/Input.d.ts +0 -36
- package/dist/Forms/Input/Input.spec.d.ts +0 -1
- package/dist/Forms/Input/Input.stories.d.ts +0 -21
- package/dist/Forms/Input/index.d.ts +0 -1
- package/dist/Forms/InputCurrency/InputCurrency.d.ts +0 -47
- package/dist/Forms/InputCurrency/InputCurrency.spec.d.ts +0 -1
- package/dist/Forms/InputCurrency/InputCurrency.stories.d.ts +0 -8
- package/dist/Forms/InputCurrency/index.d.ts +0 -1
- package/dist/Forms/InputCurrency/utils.d.ts +0 -22
- package/dist/Forms/InputHelpText/InputHelpText.d.ts +0 -16
- package/dist/Forms/InputHelpText/InputHelpText.spec.d.ts +0 -1
- package/dist/Forms/InputHelpText/InputHelpText.stories.d.ts +0 -4
- package/dist/Forms/InputHelpText/index.d.ts +0 -1
- package/dist/Forms/InputLabel/InputLabel.d.ts +0 -28
- package/dist/Forms/InputLabel/InputLabel.spec.d.ts +0 -1
- package/dist/Forms/InputLabel/InputLabel.stories.d.ts +0 -5
- package/dist/Forms/InputLabel/index.d.ts +0 -1
- package/dist/Forms/InputMask/InputMask.d.ts +0 -18
- package/dist/Forms/InputMask/InputMask.spec.d.ts +0 -1
- package/dist/Forms/InputMask/InputMask.stories.d.ts +0 -17
- package/dist/Forms/InputMask/index.d.ts +0 -1
- package/dist/Forms/InputMask/maskDate.d.ts +0 -7
- package/dist/Forms/InputMask/utils.d.ts +0 -65
- package/dist/Forms/RadioButton/RadioButton.d.ts +0 -24
- package/dist/Forms/RadioButton/RadioButton.spec.d.ts +0 -1
- package/dist/Forms/RadioButton/RadioButton.stories.d.ts +0 -6
- package/dist/Forms/RadioButton/index.d.ts +0 -1
- package/dist/Forms/Select/Select.d.ts +0 -31
- package/dist/Forms/Select/Select.spec.d.ts +0 -1
- package/dist/Forms/Select/Select.stories.d.ts +0 -8
- package/dist/Forms/Select/index.d.ts +0 -1
- package/dist/Forms/Toggle/Toggle.d.ts +0 -5
- package/dist/Forms/Toggle/Toggle.spec.d.ts +0 -1
- package/dist/Forms/Toggle/Toggle.stories.d.ts +0 -8
- package/dist/Forms/Toggle/index.d.ts +0 -1
- package/dist/Forms/ToggleButton/ToggleButton.d.ts +0 -24
- package/dist/Forms/ToggleButton/ToggleButton.spec.d.ts +0 -1
- package/dist/Forms/ToggleButton/ToggleButton.stories.d.ts +0 -7
- package/dist/Forms/ToggleButton/index.d.ts +0 -1
- package/dist/Forms/commonStyles.d.ts +0 -16
- package/dist/Forms/index.d.ts +0 -14
- package/dist/Icons/Icon/Icon.d.ts +0 -34
- package/dist/Icons/Icon/Icon.spec.d.ts +0 -1
- package/dist/Icons/Icon/Icon.stories.d.ts +0 -9
- package/dist/Icons/Icon/index.d.ts +0 -1
- package/dist/Icons/IconCircular/IconCircular.spec.d.ts +0 -1
- package/dist/Icons/IconCircular/IconCircular.stories.d.ts +0 -6
- package/dist/Icons/IconCircular/index.d.ts +0 -1
- package/dist/Icons/IconList.d.ts +0 -3
- package/dist/Icons/icons-path/Adjust.d.ts +0 -2
- package/dist/Icons/icons-path/AngleDiagonal.d.ts +0 -2
- package/dist/Icons/icons-path/AngleDown.d.ts +0 -2
- package/dist/Icons/icons-path/AngleHeight.d.ts +0 -2
- package/dist/Icons/icons-path/AngleLeft.d.ts +0 -2
- package/dist/Icons/icons-path/AngleRight.d.ts +0 -2
- package/dist/Icons/icons-path/AngleWidth.d.ts +0 -2
- package/dist/Icons/icons-path/App.d.ts +0 -2
- package/dist/Icons/icons-path/Arrow.d.ts +0 -2
- package/dist/Icons/icons-path/ArrowLeft.d.ts +0 -2
- package/dist/Icons/icons-path/ArrowRight.d.ts +0 -2
- package/dist/Icons/icons-path/Back.d.ts +0 -2
- package/dist/Icons/icons-path/Ban.d.ts +0 -2
- package/dist/Icons/icons-path/BarcodeRead.d.ts +0 -2
- package/dist/Icons/icons-path/Bell.d.ts +0 -2
- package/dist/Icons/icons-path/Blog.d.ts +0 -2
- package/dist/Icons/icons-path/Bullhorn.d.ts +0 -2
- package/dist/Icons/icons-path/Calculator.d.ts +0 -2
- package/dist/Icons/icons-path/CalendarAlt.d.ts +0 -2
- package/dist/Icons/icons-path/Camera.d.ts +0 -2
- package/dist/Icons/icons-path/Check.d.ts +0 -2
- package/dist/Icons/icons-path/CheckCircle.d.ts +0 -2
- package/dist/Icons/icons-path/Clock.d.ts +0 -2
- package/dist/Icons/icons-path/Clockwise.d.ts +0 -2
- package/dist/Icons/icons-path/Close.d.ts +0 -2
- package/dist/Icons/icons-path/Cog.d.ts +0 -2
- package/dist/Icons/icons-path/Copy.d.ts +0 -2
- package/dist/Icons/icons-path/CreditCard.d.ts +0 -2
- package/dist/Icons/icons-path/DashedCircle.d.ts +0 -2
- package/dist/Icons/icons-path/DefaultCursor.d.ts +0 -2
- package/dist/Icons/icons-path/Desktop.d.ts +0 -2
- package/dist/Icons/icons-path/Discount.d.ts +0 -2
- package/dist/Icons/icons-path/DotsThree.d.ts +0 -2
- package/dist/Icons/icons-path/Download.d.ts +0 -2
- package/dist/Icons/icons-path/Edit.d.ts +0 -2
- package/dist/Icons/icons-path/Envelope.d.ts +0 -2
- package/dist/Icons/icons-path/Exchange.d.ts +0 -2
- package/dist/Icons/icons-path/ExchangeY.d.ts +0 -2
- package/dist/Icons/icons-path/Exclamation.d.ts +0 -2
- package/dist/Icons/icons-path/ExclamationCircle.d.ts +0 -2
- package/dist/Icons/icons-path/ExclamationTriangle.d.ts +0 -2
- package/dist/Icons/icons-path/ExternalLink.d.ts +0 -2
- package/dist/Icons/icons-path/Eye.d.ts +0 -2
- package/dist/Icons/icons-path/EyeSlash.d.ts +0 -2
- package/dist/Icons/icons-path/Filter.d.ts +0 -2
- package/dist/Icons/icons-path/HalfBack.d.ts +0 -2
- package/dist/Icons/icons-path/Hashtag.d.ts +0 -2
- package/dist/Icons/icons-path/Home.d.ts +0 -2
- package/dist/Icons/icons-path/IconSolidEnviali.d.ts +0 -2
- package/dist/Icons/icons-path/IconSolidLI.d.ts +0 -2
- package/dist/Icons/icons-path/IdentificationBadge.d.ts +0 -2
- package/dist/Icons/icons-path/Image.d.ts +0 -2
- package/dist/Icons/icons-path/InfoCircle.d.ts +0 -2
- package/dist/Icons/icons-path/Lightbulb.d.ts +0 -2
- package/dist/Icons/icons-path/Link.d.ts +0 -2
- package/dist/Icons/icons-path/ListItems.d.ts +0 -2
- package/dist/Icons/icons-path/Loading.d.ts +0 -2
- package/dist/Icons/icons-path/Minus.d.ts +0 -2
- package/dist/Icons/icons-path/MinusCircle.d.ts +0 -2
- package/dist/Icons/icons-path/MinusCircleSolid.d.ts +0 -2
- package/dist/Icons/icons-path/Mobile.d.ts +0 -2
- package/dist/Icons/icons-path/MoneyBill.d.ts +0 -2
- package/dist/Icons/icons-path/Move.d.ts +0 -2
- package/dist/Icons/icons-path/Nav.d.ts +0 -2
- package/dist/Icons/icons-path/Order.d.ts +0 -2
- package/dist/Icons/icons-path/Pagali.d.ts +0 -2
- package/dist/Icons/icons-path/PaperList.d.ts +0 -2
- package/dist/Icons/icons-path/PieChart.d.ts +0 -2
- package/dist/Icons/icons-path/Pix.d.ts +0 -2
- package/dist/Icons/icons-path/Plus.d.ts +0 -2
- package/dist/Icons/icons-path/PlusCircle.d.ts +0 -2
- package/dist/Icons/icons-path/Print.d.ts +0 -2
- package/dist/Icons/icons-path/Product.d.ts +0 -2
- package/dist/Icons/icons-path/QuestionCircle.d.ts +0 -2
- package/dist/Icons/icons-path/Reload.d.ts +0 -2
- package/dist/Icons/icons-path/Rocket.d.ts +0 -2
- package/dist/Icons/icons-path/Search.d.ts +0 -2
- package/dist/Icons/icons-path/ShoppingCart.d.ts +0 -2
- package/dist/Icons/icons-path/SortDown.d.ts +0 -2
- package/dist/Icons/icons-path/Store.d.ts +0 -2
- package/dist/Icons/icons-path/Sync.d.ts +0 -2
- package/dist/Icons/icons-path/ThinAngleRight.d.ts +0 -2
- package/dist/Icons/icons-path/TimesCircle.d.ts +0 -2
- package/dist/Icons/icons-path/Trash.d.ts +0 -2
- package/dist/Icons/icons-path/Trophy.d.ts +0 -2
- package/dist/Icons/icons-path/Truck.d.ts +0 -2
- package/dist/Icons/icons-path/Tv.d.ts +0 -2
- package/dist/Icons/icons-path/Upload.d.ts +0 -2
- package/dist/Icons/icons-path/UsdCircle.d.ts +0 -2
- package/dist/Icons/icons-path/User.d.ts +0 -2
- package/dist/Icons/icons-path/WhatsApp.d.ts +0 -2
- package/dist/Icons/icons-path/index.d.ts +0 -96
- package/dist/Icons/index.d.ts +0 -2
- package/dist/Indicators/Alert/Alert.d.ts +0 -48
- package/dist/Indicators/Alert/Alert.spec.d.ts +0 -1
- package/dist/Indicators/Alert/Alert.stories.d.ts +0 -5
- package/dist/Indicators/Alert/index.d.ts +0 -1
- package/dist/Indicators/Badge/Badge.d.ts +0 -45
- package/dist/Indicators/Badge/Badge.spec.d.ts +0 -1
- package/dist/Indicators/Badge/Badge.stories.d.ts +0 -6
- package/dist/Indicators/Badge/index.d.ts +0 -1
- package/dist/Indicators/InformationBox/InformationBox.d.ts +0 -26
- package/dist/Indicators/InformationBox/InformationBox.spec.d.ts +0 -1
- package/dist/Indicators/InformationBox/InformationBoxt.stories.d.ts +0 -4
- package/dist/Indicators/InformationBox/index.d.ts +0 -1
- package/dist/Indicators/Status/Status.d.ts +0 -25
- package/dist/Indicators/Status/Status.spec.d.ts +0 -1
- package/dist/Indicators/Status/Status.stories.d.ts +0 -4
- package/dist/Indicators/Status/index.d.ts +0 -1
- package/dist/Indicators/Tag/Tag.d.ts +0 -32
- package/dist/Indicators/Tag/Tag.spec.d.ts +0 -1
- package/dist/Indicators/Tag/Tag.stories.d.ts +0 -5
- package/dist/Indicators/Tag/index.d.ts +0 -1
- package/dist/Indicators/Toast/Toast.d.ts +0 -6
- package/dist/Indicators/Toast/Toast.spec.d.ts +0 -1
- package/dist/Indicators/Toast/Toast.stories.d.ts +0 -3
- package/dist/Indicators/Toast/index.d.ts +0 -1
- package/dist/Indicators/Tooltip/Tooltip.d.ts +0 -39
- package/dist/Indicators/Tooltip/Tooltip.spec.d.ts +0 -1
- package/dist/Indicators/Tooltip/Tooltip.stories.d.ts +0 -4
- package/dist/Indicators/Tooltip/index.d.ts +0 -1
- package/dist/Indicators/index.d.ts +0 -7
- package/dist/Layout/ActionBar/ActionBar.d.ts +0 -12
- package/dist/Layout/ActionBar/ActionBar.spec.d.ts +0 -1
- package/dist/Layout/ActionBar/ActionBar.stories.d.ts +0 -5
- package/dist/Layout/ActionBar/index.d.ts +0 -1
- package/dist/Layout/Box/Box.d.ts +0 -33
- package/dist/Layout/Box/Box.spec.d.ts +0 -1
- package/dist/Layout/Box/Box.stories.d.ts +0 -21
- package/dist/Layout/Box/Components/Content/BoxContent.d.ts +0 -9
- package/dist/Layout/Box/Components/Content/BoxContent.spec.d.ts +0 -1
- package/dist/Layout/Box/Components/Content/BoxContent.stories.d.ts +0 -4
- package/dist/Layout/Box/Components/Header/BoxHeader.d.ts +0 -22
- package/dist/Layout/Box/Components/Header/BoxHeader.spec.d.ts +0 -1
- package/dist/Layout/Box/Components/Header/BoxHeader.stories.d.ts +0 -7
- package/dist/Layout/Box/Components/Separator/BoxSeparator.d.ts +0 -2
- package/dist/Layout/Box/Components/Separator/BoxSeparator.spec.d.ts +0 -1
- package/dist/Layout/Box/Components/Separator/BoxSeparator.stories.d.ts +0 -4
- package/dist/Layout/Box/Components/utils.d.ts +0 -32
- package/dist/Layout/Box/index.d.ts +0 -1
- package/dist/Layout/Container/Container.d.ts +0 -16
- package/dist/Layout/Container/Container.spec.d.ts +0 -1
- package/dist/Layout/Container/Container.stories.d.ts +0 -5
- package/dist/Layout/Container/index.d.ts +0 -1
- package/dist/Layout/ListActions/ListActions.d.ts +0 -42
- package/dist/Layout/ListActions/ListActions.spec.d.ts +0 -1
- package/dist/Layout/ListActions/ListActions.stories.d.ts +0 -4
- package/dist/Layout/ListActions/index.d.ts +0 -1
- package/dist/Layout/Sidebar/Item.d.ts +0 -34
- package/dist/Layout/Sidebar/ItemSub.d.ts +0 -16
- package/dist/Layout/Sidebar/Sidebar.d.ts +0 -17
- package/dist/Layout/Sidebar/Sidebar.stories.d.ts +0 -4
- package/dist/Layout/Sidebar/index.d.ts +0 -3
- package/dist/Layout/Topbar/Topbar.d.ts +0 -21
- package/dist/Layout/Topbar/Topbar.stories.d.ts +0 -4
- package/dist/Layout/Topbar/index.d.ts +0 -1
- package/dist/Layout/constants.d.ts +0 -4
- package/dist/Layout/index.d.ts +0 -6
- package/dist/Navigation/Breadcrumb/Breadcrumb.spec.d.ts +0 -1
- package/dist/Navigation/Breadcrumb/Breadcrumb.stories.d.ts +0 -11
- package/dist/Navigation/Breadcrumb/index.d.ts +0 -45
- package/dist/Navigation/Pagination/Pagination.spec.d.ts +0 -1
- package/dist/Navigation/Pagination/Pagination.stories.d.ts +0 -6
- package/dist/Navigation/Pagination/PaginationInfo.d.ts +0 -24
- package/dist/Navigation/Pagination/PaginationNav.d.ts +0 -16
- package/dist/Navigation/Pagination/index.d.ts +0 -10
- package/dist/Navigation/Stepper/Stepper.spec.d.ts +0 -1
- package/dist/Navigation/Stepper/Stepper.stories.d.ts +0 -8
- package/dist/Navigation/Stepper/index.d.ts +0 -29
- package/dist/Navigation/index.d.ts +0 -2
- package/dist/admin-components.cjs.development.js +0 -49776
- package/dist/admin-components.cjs.development.js.map +0 -1
- package/dist/admin-components.cjs.production.min.js +0 -2
- package/dist/admin-components.cjs.production.min.js.map +0 -1
- package/dist/admin-components.esm.js +0 -49714
- package/dist/admin-components.esm.js.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/testConstants.d.ts +0 -3
- package/src/Components/Button/Button.spec.tsx +0 -75
- package/src/Components/Button/Button.stories.tsx +0 -63
- package/src/Components/Button/Button.tsx +0 -194
- package/src/Components/Button/index.tsx +0 -1
- package/src/Components/HelpLink/HelpLink.spec.tsx +0 -33
- package/src/Components/HelpLink/HelpLink.stories.tsx +0 -39
- package/src/Components/HelpLink/index.tsx +0 -80
- package/src/Components/LoadingPlaceholder/LoadingPlaceholder.stories.tsx +0 -14
- package/src/Components/LoadingPlaceholder/LoadingPlaceholder.tsx +0 -17
- package/src/Components/LoadingPlaceholder/index.tsx +0 -1
- package/src/Components/Modal/Modal.spec.tsx +0 -15
- package/src/Components/Modal/Modal.stories.tsx +0 -129
- package/src/Components/Modal/Modal.tsx +0 -141
- package/src/Components/Modal/index.tsx +0 -1
- package/src/Components/SidebarFixed/SidebarFixed.spec.tsx +0 -36
- package/src/Components/SidebarFixed/SidebarFixed.stories.tsx +0 -39
- package/src/Components/SidebarFixed/SidebarFixed.tsx +0 -119
- package/src/Components/SidebarFixed/index.tsx +0 -1
- package/src/Components/Table/Table.stories.tsx +0 -188
- package/src/Components/Table/Table.tsx +0 -346
- package/src/Components/Table/index.tsx +0 -1
- package/src/Components/TableList/TableList.spec.tsx +0 -86
- package/src/Components/TableList/TableList.stories.tsx +0 -168
- package/src/Components/TableList/TableList.tsx +0 -169
- package/src/Components/TableList/TableListItem.interface.ts +0 -69
- package/src/Components/TableList/TableListItem.spec.tsx +0 -75
- package/src/Components/TableList/TableListItem.stories.tsx +0 -44
- package/src/Components/TableList/TableListItem.tsx +0 -79
- package/src/Components/TableList/TableListItemLoading.spec.tsx +0 -19
- package/src/Components/TableList/TableListItemLoading.stories.tsx +0 -22
- package/src/Components/TableList/TableListItemLoading.tsx +0 -40
- package/src/Components/TableList/TableListItemWrapper.spec.tsx +0 -33
- package/src/Components/TableList/TableListItemWrapper.stories.tsx +0 -38
- package/src/Components/TableList/TableListItemWrapper.tsx +0 -40
- package/src/Components/TableList/index.tsx +0 -4
- package/src/Components/Tabs/Tabs.spec.tsx +0 -38
- package/src/Components/Tabs/Tabs.stories.tsx +0 -62
- package/src/Components/Tabs/Tabs.tsx +0 -66
- package/src/Components/Tabs/TabsItem.interface.ts +0 -19
- package/src/Components/Tabs/TabsItem.tsx +0 -50
- package/src/Components/Tabs/index.tsx +0 -1
- package/src/Components/Timeline/Timeline.spec.tsx +0 -66
- package/src/Components/Timeline/Timeline.stories.tsx +0 -58
- package/src/Components/Timeline/Timeline.tsx +0 -75
- package/src/Components/Timeline/TimelineItem.interface.ts +0 -32
- package/src/Components/Timeline/TimelineItem.tsx +0 -65
- package/src/Components/Timeline/index.tsx +0 -1
- package/src/Components/index.ts +0 -8
- package/src/Forms/Checkbox/Checkbox.spec.tsx +0 -26
- package/src/Forms/Checkbox/Checkbox.stories.tsx +0 -65
- package/src/Forms/Checkbox/Checkbox.tsx +0 -166
- package/src/Forms/Checkbox/index.tsx +0 -1
- package/src/Forms/Dropdown/Dropdown.spec.tsx +0 -38
- package/src/Forms/Dropdown/Dropdown.stories.tsx +0 -152
- package/src/Forms/Dropdown/Dropdown.tsx +0 -433
- package/src/Forms/Dropdown/index.ts +0 -1
- package/src/Forms/FloatingLabelInput/FloatingLabelInput.spec.tsx +0 -26
- package/src/Forms/FloatingLabelInput/FloatingLabelInput.stories.tsx +0 -73
- package/src/Forms/FloatingLabelInput/FloatingLabelInput.tsx +0 -93
- package/src/Forms/FloatingLabelInput/index.ts +0 -1
- package/src/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.spec.tsx +0 -16
- package/src/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.stories.tsx +0 -72
- package/src/Forms/FloatingLabelInputCurrency/FloatingLabelInputCurrency.tsx +0 -251
- package/src/Forms/FloatingLabelInputCurrency/index.ts +0 -1
- package/src/Forms/FloatingLabelInputMask/FloatingLabelInputMask.spec.tsx +0 -66
- package/src/Forms/FloatingLabelInputMask/FloatingLabelInputMask.stories.tsx +0 -148
- package/src/Forms/FloatingLabelInputMask/FloatingLabelInputMask.tsx +0 -56
- package/src/Forms/FloatingLabelInputMask/index.ts +0 -1
- package/src/Forms/Input/Input.spec.tsx +0 -80
- package/src/Forms/Input/Input.stories.tsx +0 -170
- package/src/Forms/Input/Input.tsx +0 -158
- package/src/Forms/Input/index.ts +0 -1
- package/src/Forms/InputCurrency/InputCurrency.spec.tsx +0 -32
- package/src/Forms/InputCurrency/InputCurrency.stories.tsx +0 -45
- package/src/Forms/InputCurrency/InputCurrency.tsx +0 -224
- package/src/Forms/InputCurrency/index.ts +0 -1
- package/src/Forms/InputCurrency/utils.ts +0 -36
- package/src/Forms/InputHelpText/InputHelpText.spec.tsx +0 -22
- package/src/Forms/InputHelpText/InputHelpText.stories.tsx +0 -16
- package/src/Forms/InputHelpText/InputHelpText.tsx +0 -31
- package/src/Forms/InputHelpText/index.ts +0 -1
- package/src/Forms/InputLabel/InputLabel.spec.tsx +0 -30
- package/src/Forms/InputLabel/InputLabel.stories.tsx +0 -24
- package/src/Forms/InputLabel/InputLabel.tsx +0 -52
- package/src/Forms/InputLabel/index.ts +0 -1
- package/src/Forms/InputMask/InputMask.spec.tsx +0 -97
- package/src/Forms/InputMask/InputMask.stories.tsx +0 -126
- package/src/Forms/InputMask/InputMask.tsx +0 -51
- package/src/Forms/InputMask/index.ts +0 -1
- package/src/Forms/InputMask/maskDate.ts +0 -81
- package/src/Forms/InputMask/utils.ts +0 -154
- package/src/Forms/RadioButton/RadioButton.spec.tsx +0 -27
- package/src/Forms/RadioButton/RadioButton.stories.tsx +0 -40
- package/src/Forms/RadioButton/RadioButton.tsx +0 -80
- package/src/Forms/RadioButton/index.tsx +0 -1
- package/src/Forms/Select/Select.spec.tsx +0 -41
- package/src/Forms/Select/Select.stories.tsx +0 -58
- package/src/Forms/Select/Select.tsx +0 -148
- package/src/Forms/Select/index.ts +0 -1
- package/src/Forms/Toggle/Toggle.spec.tsx +0 -29
- package/src/Forms/Toggle/Toggle.stories.tsx +0 -43
- package/src/Forms/Toggle/Toggle.tsx +0 -85
- package/src/Forms/Toggle/index.tsx +0 -1
- package/src/Forms/ToggleButton/ToggleButton.spec.tsx +0 -29
- package/src/Forms/ToggleButton/ToggleButton.stories.tsx +0 -51
- package/src/Forms/ToggleButton/ToggleButton.tsx +0 -95
- package/src/Forms/ToggleButton/index.tsx +0 -1
- package/src/Forms/commonStyles.ts +0 -29
- package/src/Forms/index.ts +0 -14
- package/src/Icons/Icon/Icon.spec.tsx +0 -27
- package/src/Icons/Icon/Icon.stories.tsx +0 -12
- package/src/Icons/Icon/Icon.tsx +0 -56
- package/src/Icons/Icon/index.ts +0 -1
- package/src/Icons/IconCircular/IconCircular.spec.tsx +0 -24
- package/src/Icons/IconCircular/IconCircular.stories.tsx +0 -24
- package/src/Icons/IconCircular/IconCircular.tsx +0 -67
- package/src/Icons/IconCircular/index.ts +0 -1
- package/src/Icons/IconList.tsx +0 -27
- package/src/Icons/icons-path/Adjust.tsx +0 -16
- package/src/Icons/icons-path/AngleDiagonal.tsx +0 -20
- package/src/Icons/icons-path/AngleDown.tsx +0 -9
- package/src/Icons/icons-path/AngleHeight.tsx +0 -17
- package/src/Icons/icons-path/AngleLeft.tsx +0 -9
- package/src/Icons/icons-path/AngleRight.tsx +0 -9
- package/src/Icons/icons-path/AngleWidth.tsx +0 -17
- package/src/Icons/icons-path/App.tsx +0 -9
- package/src/Icons/icons-path/Arrow.tsx +0 -11
- package/src/Icons/icons-path/ArrowLeft.tsx +0 -9
- package/src/Icons/icons-path/ArrowRight.tsx +0 -9
- package/src/Icons/icons-path/Back.tsx +0 -5
- package/src/Icons/icons-path/Ban.tsx +0 -9
- package/src/Icons/icons-path/BarcodeRead.tsx +0 -9
- package/src/Icons/icons-path/Bell.tsx +0 -9
- package/src/Icons/icons-path/Blog.tsx +0 -9
- package/src/Icons/icons-path/Bullhorn.tsx +0 -9
- package/src/Icons/icons-path/Calculator.tsx +0 -9
- package/src/Icons/icons-path/CalendarAlt.tsx +0 -9
- package/src/Icons/icons-path/Camera.tsx +0 -9
- package/src/Icons/icons-path/Check.tsx +0 -9
- package/src/Icons/icons-path/CheckCircle.tsx +0 -9
- package/src/Icons/icons-path/Clock.tsx +0 -9
- package/src/Icons/icons-path/Clockwise.tsx +0 -22
- package/src/Icons/icons-path/Close.tsx +0 -9
- package/src/Icons/icons-path/Cog.tsx +0 -9
- package/src/Icons/icons-path/Copy.tsx +0 -9
- package/src/Icons/icons-path/CreditCard.tsx +0 -9
- package/src/Icons/icons-path/DashedCircle.tsx +0 -32
- package/src/Icons/icons-path/DefaultCursor.tsx +0 -14
- package/src/Icons/icons-path/Desktop.tsx +0 -9
- package/src/Icons/icons-path/Discount.tsx +0 -9
- package/src/Icons/icons-path/DotsThree.tsx +0 -9
- package/src/Icons/icons-path/Download.tsx +0 -9
- package/src/Icons/icons-path/Edit.tsx +0 -9
- package/src/Icons/icons-path/Envelope.tsx +0 -9
- package/src/Icons/icons-path/Exchange.tsx +0 -9
- package/src/Icons/icons-path/ExchangeY.tsx +0 -9
- package/src/Icons/icons-path/Exclamation.tsx +0 -17
- package/src/Icons/icons-path/ExclamationCircle.tsx +0 -9
- package/src/Icons/icons-path/ExclamationTriangle.tsx +0 -9
- package/src/Icons/icons-path/ExternalLink.tsx +0 -9
- package/src/Icons/icons-path/Eye.tsx +0 -9
- package/src/Icons/icons-path/EyeSlash.tsx +0 -9
- package/src/Icons/icons-path/Filter.tsx +0 -9
- package/src/Icons/icons-path/HalfBack.tsx +0 -12
- package/src/Icons/icons-path/Hashtag.tsx +0 -13
- package/src/Icons/icons-path/Home.tsx +0 -9
- package/src/Icons/icons-path/IconSolidEnviali.tsx +0 -9
- package/src/Icons/icons-path/IconSolidLI.tsx +0 -12
- package/src/Icons/icons-path/IdentificationBadge.tsx +0 -22
- package/src/Icons/icons-path/Image.tsx +0 -9
- package/src/Icons/icons-path/InfoCircle.tsx +0 -9
- package/src/Icons/icons-path/Lightbulb.tsx +0 -9
- package/src/Icons/icons-path/Link.tsx +0 -9
- package/src/Icons/icons-path/ListItems.tsx +0 -14
- package/src/Icons/icons-path/Loading.tsx +0 -19
- package/src/Icons/icons-path/Minus.tsx +0 -5
- package/src/Icons/icons-path/MinusCircle.tsx +0 -26
- package/src/Icons/icons-path/MinusCircleSolid.tsx +0 -30
- package/src/Icons/icons-path/Mobile.tsx +0 -9
- package/src/Icons/icons-path/MoneyBill.tsx +0 -9
- package/src/Icons/icons-path/Move.tsx +0 -9
- package/src/Icons/icons-path/Nav.tsx +0 -11
- package/src/Icons/icons-path/Order.tsx +0 -9
- package/src/Icons/icons-path/Pagali.tsx +0 -16
- package/src/Icons/icons-path/PaperList.tsx +0 -9
- package/src/Icons/icons-path/PieChart.tsx +0 -9
- package/src/Icons/icons-path/Pix.tsx +0 -8
- package/src/Icons/icons-path/Plus.tsx +0 -9
- package/src/Icons/icons-path/PlusCircle.tsx +0 -9
- package/src/Icons/icons-path/Print.tsx +0 -9
- package/src/Icons/icons-path/Product.tsx +0 -9
- package/src/Icons/icons-path/QuestionCircle.tsx +0 -9
- package/src/Icons/icons-path/Reload.tsx +0 -9
- package/src/Icons/icons-path/Rocket.tsx +0 -22
- package/src/Icons/icons-path/Search.tsx +0 -11
- package/src/Icons/icons-path/ShoppingCart.tsx +0 -11
- package/src/Icons/icons-path/SortDown.tsx +0 -9
- package/src/Icons/icons-path/Store.tsx +0 -9
- package/src/Icons/icons-path/Sync.tsx +0 -9
- package/src/Icons/icons-path/ThinAngleRight.tsx +0 -12
- package/src/Icons/icons-path/TimesCircle.tsx +0 -9
- package/src/Icons/icons-path/Trash.tsx +0 -9
- package/src/Icons/icons-path/Trophy.tsx +0 -22
- package/src/Icons/icons-path/Truck.tsx +0 -9
- package/src/Icons/icons-path/Tv.tsx +0 -9
- package/src/Icons/icons-path/Upload.tsx +0 -11
- package/src/Icons/icons-path/UsdCircle.tsx +0 -9
- package/src/Icons/icons-path/User.tsx +0 -9
- package/src/Icons/icons-path/WhatsApp.tsx +0 -9
- package/src/Icons/icons-path/index.ts +0 -186
- package/src/Icons/index.ts +0 -2
- package/src/Indicators/Alert/Alert.spec.tsx +0 -53
- package/src/Indicators/Alert/Alert.stories.tsx +0 -39
- package/src/Indicators/Alert/Alert.tsx +0 -141
- package/src/Indicators/Alert/index.tsx +0 -1
- package/src/Indicators/Badge/Badge.spec.tsx +0 -74
- package/src/Indicators/Badge/Badge.stories.tsx +0 -40
- package/src/Indicators/Badge/Badge.tsx +0 -75
- package/src/Indicators/Badge/index.tsx +0 -1
- package/src/Indicators/InformationBox/InformationBox.spec.tsx +0 -36
- package/src/Indicators/InformationBox/InformationBox.tsx +0 -98
- package/src/Indicators/InformationBox/InformationBoxt.stories.tsx +0 -29
- package/src/Indicators/InformationBox/index.tsx +0 -1
- package/src/Indicators/Status/Status.spec.tsx +0 -47
- package/src/Indicators/Status/Status.stories.tsx +0 -16
- package/src/Indicators/Status/Status.tsx +0 -65
- package/src/Indicators/Status/index.tsx +0 -1
- package/src/Indicators/Tag/Tag.spec.tsx +0 -39
- package/src/Indicators/Tag/Tag.stories.tsx +0 -33
- package/src/Indicators/Tag/Tag.tsx +0 -55
- package/src/Indicators/Tag/index.tsx +0 -1
- package/src/Indicators/Toast/Toast.spec.tsx +0 -18
- package/src/Indicators/Toast/Toast.stories.tsx +0 -32
- package/src/Indicators/Toast/Toast.tsx +0 -76
- package/src/Indicators/Toast/index.tsx +0 -1
- package/src/Indicators/Tooltip/Tooltip.spec.tsx +0 -18
- package/src/Indicators/Tooltip/Tooltip.stories.tsx +0 -33
- package/src/Indicators/Tooltip/Tooltip.tsx +0 -80
- package/src/Indicators/Tooltip/index.tsx +0 -1
- package/src/Indicators/Tooltip/style.scss +0 -72
- package/src/Indicators/index.ts +0 -7
- package/src/Layout/ActionBar/ActionBar.spec.tsx +0 -20
- package/src/Layout/ActionBar/ActionBar.stories.tsx +0 -42
- package/src/Layout/ActionBar/ActionBar.tsx +0 -89
- package/src/Layout/ActionBar/index.tsx +0 -1
- package/src/Layout/Box/Box.spec.tsx +0 -73
- package/src/Layout/Box/Box.stories.tsx +0 -165
- package/src/Layout/Box/Box.tsx +0 -81
- package/src/Layout/Box/Components/Content/BoxContent.spec.tsx +0 -20
- package/src/Layout/Box/Components/Content/BoxContent.stories.tsx +0 -23
- package/src/Layout/Box/Components/Content/BoxContent.tsx +0 -26
- package/src/Layout/Box/Components/Header/BoxHeader.spec.tsx +0 -22
- package/src/Layout/Box/Components/Header/BoxHeader.stories.tsx +0 -32
- package/src/Layout/Box/Components/Header/BoxHeader.tsx +0 -93
- package/src/Layout/Box/Components/Separator/BoxSeparator.spec.tsx +0 -20
- package/src/Layout/Box/Components/Separator/BoxSeparator.stories.tsx +0 -30
- package/src/Layout/Box/Components/Separator/BoxSeparator.tsx +0 -19
- package/src/Layout/Box/Components/utils.ts +0 -50
- package/src/Layout/Box/index.tsx +0 -1
- package/src/Layout/Container/Container.spec.tsx +0 -22
- package/src/Layout/Container/Container.stories.tsx +0 -51
- package/src/Layout/Container/Container.tsx +0 -42
- package/src/Layout/Container/index.tsx +0 -1
- package/src/Layout/ListActions/ListActions.spec.tsx +0 -23
- package/src/Layout/ListActions/ListActions.stories.tsx +0 -71
- package/src/Layout/ListActions/ListActions.tsx +0 -149
- package/src/Layout/ListActions/index.tsx +0 -1
- package/src/Layout/Sidebar/Item.tsx +0 -106
- package/src/Layout/Sidebar/ItemSub.tsx +0 -42
- package/src/Layout/Sidebar/Sidebar.stories.tsx +0 -25
- package/src/Layout/Sidebar/Sidebar.tsx +0 -51
- package/src/Layout/Sidebar/index.tsx +0 -3
- package/src/Layout/Topbar/Topbar.stories.tsx +0 -18
- package/src/Layout/Topbar/Topbar.tsx +0 -43
- package/src/Layout/Topbar/index.tsx +0 -1
- package/src/Layout/constants.ts +0 -4
- package/src/Layout/index.ts +0 -6
- package/src/Navigation/Breadcrumb/Breadcrumb.spec.tsx +0 -75
- package/src/Navigation/Breadcrumb/Breadcrumb.stories.tsx +0 -79
- package/src/Navigation/Breadcrumb/index.tsx +0 -153
- package/src/Navigation/Pagination/Pagination.spec.tsx +0 -45
- package/src/Navigation/Pagination/Pagination.stories.tsx +0 -39
- package/src/Navigation/Pagination/PaginationInfo.tsx +0 -70
- package/src/Navigation/Pagination/PaginationNav.tsx +0 -122
- package/src/Navigation/Pagination/index.tsx +0 -44
- package/src/Navigation/Stepper/Stepper.spec.tsx +0 -68
- package/src/Navigation/Stepper/Stepper.stories.tsx +0 -68
- package/src/Navigation/Stepper/index.tsx +0 -97
- package/src/Navigation/index.ts +0 -2
- package/src/index.ts +0 -6
- package/src/tailwind.scss +0 -9
- package/src/utils/index.ts +0 -19
- package/src/utils/testConstants.ts +0 -3
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import ReactModal from 'react-modal'
|
|
3
|
-
|
|
4
|
-
import { Icon } from '../../Icons'
|
|
5
|
-
|
|
6
|
-
const sizeClasses = {
|
|
7
|
-
small: 'sm:max-w-[600px]',
|
|
8
|
-
default: 'sm:max-w-4xl',
|
|
9
|
-
large: 'sm:max-w-6xl',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ModalComponent = ({
|
|
13
|
-
className = '',
|
|
14
|
-
isOpen = false,
|
|
15
|
-
preventClose = false,
|
|
16
|
-
size = 'default',
|
|
17
|
-
headerTitle,
|
|
18
|
-
headerClose = 'Fechar',
|
|
19
|
-
footerActions,
|
|
20
|
-
onClose,
|
|
21
|
-
closeTimeout = 200,
|
|
22
|
-
parentSelector,
|
|
23
|
-
children,
|
|
24
|
-
}: ModalProps) => {
|
|
25
|
-
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
26
|
-
const [modalPreventClose, setModalPreventClose] = useState(false)
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
setModalIsOpen(isOpen)
|
|
30
|
-
setModalPreventClose(preventClose)
|
|
31
|
-
}, [isOpen, preventClose])
|
|
32
|
-
|
|
33
|
-
const handleRequestCloseFunc = () => {
|
|
34
|
-
setModalIsOpen(false)
|
|
35
|
-
}
|
|
36
|
-
const handleAfterCloseFunc = () => {
|
|
37
|
-
onClose && onClose()
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<ReactModal
|
|
42
|
-
isOpen={modalIsOpen}
|
|
43
|
-
onAfterClose={handleAfterCloseFunc}
|
|
44
|
-
onRequestClose={handleRequestCloseFunc}
|
|
45
|
-
closeTimeoutMS={closeTimeout}
|
|
46
|
-
ariaHideApp={false}
|
|
47
|
-
shouldCloseOnOverlayClick={!modalPreventClose}
|
|
48
|
-
shouldCloseOnEsc={!modalPreventClose}
|
|
49
|
-
overlayClassName={`justify-center items-end sm:items-center flex overflow-hidden w-screen h-full fixed inset-0 z-50 outline-none bg-black bg-opacity-60 pt-16 sm:p-3 focus:outline-none transition ${
|
|
50
|
-
modalIsOpen ? 'opacity-100' : 'opacity-0'
|
|
51
|
-
}`}
|
|
52
|
-
className={`relative max-h-full p-8 sm:p-10 rounded-t-xl sm:rounded-xl shadow-lg flex flex-col w-full bg-base-1 outline-none focus:outline-none border border-card-stroke break-words ${sizeClasses[size]} ${className}`}
|
|
53
|
-
bodyOpenClassName={'ReactModal__Body--open overflow-hidden'}
|
|
54
|
-
testId={'modal-component'}
|
|
55
|
-
parentSelector={() => (parentSelector ? parentSelector : document.body)}
|
|
56
|
-
contentElement={(props, children) => (
|
|
57
|
-
<div {...props}>
|
|
58
|
-
<div className="ReactModal__header w-full flex justify-between items-start">
|
|
59
|
-
<span
|
|
60
|
-
className={`min-w-0 text-inverted-2 text-xs font-semibold uppercase break-words ${
|
|
61
|
-
headerTitle ? 'pb-3' : ''
|
|
62
|
-
}`}
|
|
63
|
-
>
|
|
64
|
-
{headerTitle}
|
|
65
|
-
</span>
|
|
66
|
-
<button
|
|
67
|
-
type="button"
|
|
68
|
-
id="btnCloseModal"
|
|
69
|
-
className={`${
|
|
70
|
-
preventClose ? 'hidden' : 'flex'
|
|
71
|
-
} items-center p-2 pb-1 -mr-2 -mt-3 text-sm font-semibold text-inverted-2 hover:text-inverted-1`}
|
|
72
|
-
onClick={handleRequestCloseFunc}
|
|
73
|
-
>
|
|
74
|
-
{headerClose !== false && (
|
|
75
|
-
<span className="pr-2">{headerClose}</span>
|
|
76
|
-
)}
|
|
77
|
-
<Icon icon="close" size={4} />
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
<div className="ReactModal__innerContent flex-auto overflow-x-auto min-w-0 break-words overscroll-none -mx-8 sm:-mx-10 px-8 sm:px-10">
|
|
81
|
-
{children}
|
|
82
|
-
</div>
|
|
83
|
-
{footerActions && (
|
|
84
|
-
<div className="ReactModal__footer pt-5">{footerActions}</div>
|
|
85
|
-
)}
|
|
86
|
-
</div>
|
|
87
|
-
)}
|
|
88
|
-
>
|
|
89
|
-
{children}
|
|
90
|
-
</ReactModal>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const Modal = React.memo(ModalComponent)
|
|
95
|
-
|
|
96
|
-
export interface ModalProps {
|
|
97
|
-
/**
|
|
98
|
-
* Custom class name
|
|
99
|
-
* */
|
|
100
|
-
className?: string
|
|
101
|
-
/** Modal is open
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
isOpen?: boolean
|
|
105
|
-
/** Prevent modal close
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
preventClose?: boolean
|
|
109
|
-
/** Modal width
|
|
110
|
-
* @default 'default'
|
|
111
|
-
* */
|
|
112
|
-
size?: 'default' | 'large' | 'small'
|
|
113
|
-
/**
|
|
114
|
-
* Modal title
|
|
115
|
-
* */
|
|
116
|
-
headerTitle?: string | React.ReactNode
|
|
117
|
-
/** Close text at header
|
|
118
|
-
* @default 'Fechar'
|
|
119
|
-
* */
|
|
120
|
-
headerClose?: string | false
|
|
121
|
-
/**
|
|
122
|
-
* Call when modal is closed
|
|
123
|
-
* */
|
|
124
|
-
onClose?: Function
|
|
125
|
-
/**
|
|
126
|
-
* Number indicating the milliseconds to wait before closing the modal
|
|
127
|
-
* */
|
|
128
|
-
closeTimeout?: number
|
|
129
|
-
/**
|
|
130
|
-
* React children
|
|
131
|
-
*/
|
|
132
|
-
children?: React.ReactNode
|
|
133
|
-
/**
|
|
134
|
-
* React children
|
|
135
|
-
*/
|
|
136
|
-
footerActions?: React.ReactNode
|
|
137
|
-
/** The parent element that the modal will be attached to
|
|
138
|
-
* @default 'document.body'
|
|
139
|
-
*/
|
|
140
|
-
parentSelector?: HTMLElement | null
|
|
141
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Modal'
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { composeStories } from "@storybook/testing-react"
|
|
3
|
-
import { mount } from "@cypress/react"
|
|
4
|
-
import * as stories from "./SidebarFixed.stories"
|
|
5
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
6
|
-
|
|
7
|
-
const { Default } = composeStories(stories)
|
|
8
|
-
|
|
9
|
-
describe(specTitle('SidebarFixed tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('.sidebar-fixed')
|
|
14
|
-
.should('exist')
|
|
15
|
-
.should('have.class', 'opacity-100')
|
|
16
|
-
.find('.sidebar-fixed-help')
|
|
17
|
-
.should('have.attr', 'href').and('include', 'https://ajuda.lojaintegrada.com.br/')
|
|
18
|
-
|
|
19
|
-
cy.get('.sidebar-fixed .sidebar-fixed-content')
|
|
20
|
-
.find('input')
|
|
21
|
-
.should('exist')
|
|
22
|
-
|
|
23
|
-
cy.get('.sidebar-fixed .sidebar-fixed-footer')
|
|
24
|
-
.find('button')
|
|
25
|
-
.should('exist')
|
|
26
|
-
|
|
27
|
-
let alerted = ''
|
|
28
|
-
cy.on('window:alert', msg => alerted = msg)
|
|
29
|
-
cy.get('.sidebar-fixed .sidebar-fixed-close')
|
|
30
|
-
.click()
|
|
31
|
-
.then(() => expect(alerted).to.match(/Closed/))
|
|
32
|
-
cy.get('.sidebar-fixed')
|
|
33
|
-
.should('have.class', 'opacity-0')
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
})
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
|
|
3
|
-
import { Story, Meta } from '@storybook/react/types-6-0'
|
|
4
|
-
import { Input } from '../../Forms/Input'
|
|
5
|
-
import { Select } from '../../Forms/Select'
|
|
6
|
-
import { Button } from '../Button'
|
|
7
|
-
|
|
8
|
-
import { SidebarFixed, SidebarFixedProps } from '.'
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: 'Components/SidebarFixed',
|
|
12
|
-
component: SidebarFixed,
|
|
13
|
-
args: {
|
|
14
|
-
children: (
|
|
15
|
-
<div className="flex flex-col gap-5">
|
|
16
|
-
<Input label="Filtro 1" />
|
|
17
|
-
<Input label="Filtro 2" />
|
|
18
|
-
<Select label="Filtro 3" options={[]} />
|
|
19
|
-
<Input label="Filtro 4" />
|
|
20
|
-
</div>
|
|
21
|
-
),
|
|
22
|
-
isOpen: true,
|
|
23
|
-
helpLink: 'https://ajuda.lojaintegrada.com.br/',
|
|
24
|
-
footerActions: (
|
|
25
|
-
<Button fullWidth>Aplicar filtros</Button>
|
|
26
|
-
),
|
|
27
|
-
onClose: () => alert('Closed')
|
|
28
|
-
}
|
|
29
|
-
} as Meta
|
|
30
|
-
|
|
31
|
-
const Template: Story<SidebarFixedProps> = args => (
|
|
32
|
-
<div>
|
|
33
|
-
<SidebarFixed {...args} />
|
|
34
|
-
Nothing here to see
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
export const Default = Template.bind({})
|
|
39
|
-
Default.args = {}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { Icon } from '../../Icons'
|
|
3
|
-
|
|
4
|
-
const backgroundShadowEffect = [
|
|
5
|
-
'[background:linear-gradient(theme(colors.base-1/100)_33%,rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,0),theme(colors.base-1/100)_66%)_0_100%,radial-gradient(farthest-side_at_50%_0,rgba(156,156,156,0.5),rgba(0,0,0,0)),radial-gradient(farthest-side_at_50%_100%,_rgba(156,156,156,0.5),rgba(0,0,0,0))_0_100%]',
|
|
6
|
-
'[background-size:100%_15px,100%_15px,100%_5px,100%_5px]',
|
|
7
|
-
'[background-attachment:local,local,scroll,scroll]',
|
|
8
|
-
'[background-repeat:no-repeat]',
|
|
9
|
-
'[background-color:theme(colors.base-1/100)]',
|
|
10
|
-
'[&_.form-group_.bg-base-1]:bg-transparent',
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
export const SidebarFixedComponent: React.FC<SidebarFixedProps> = ({
|
|
14
|
-
children,
|
|
15
|
-
footerActions,
|
|
16
|
-
isOpen = false,
|
|
17
|
-
onClose,
|
|
18
|
-
title,
|
|
19
|
-
helpLink,
|
|
20
|
-
}) => {
|
|
21
|
-
const [sidebarIsOpen, setSidebarIsOpen] = useState(false)
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
setSidebarIsOpen(isOpen)
|
|
25
|
-
}, [isOpen])
|
|
26
|
-
|
|
27
|
-
const handleRequestCloseFunc = () => {
|
|
28
|
-
setSidebarIsOpen(false)
|
|
29
|
-
onClose?.()
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
className={`sidebar-fixed fixed z-40 lg:z-20 right-0 bottom-0 w-full h-full transition-all overflow-x-hidden ${
|
|
35
|
-
sidebarIsOpen
|
|
36
|
-
? 'pointer-events-auto opacity-100'
|
|
37
|
-
: 'opacity-0 pointer-events-none'
|
|
38
|
-
}`}
|
|
39
|
-
>
|
|
40
|
-
<div
|
|
41
|
-
className="sidebar-fixed-backdrop fixed inset-0 h-full w-full bg-black-alpha -z-1"
|
|
42
|
-
onClick={handleRequestCloseFunc}
|
|
43
|
-
/>
|
|
44
|
-
<div
|
|
45
|
-
className={`sidebar-fixed-inner mt-10 sm:mt-0 top-0 bottom-0 right-0 absolute flex flex-col justify-between bg-base-1 transform transition-transform shadow h-auto w-full sm:max-w-[410px] sm:ml-16 rounded-t-lg sm:rounded-none ${
|
|
46
|
-
sidebarIsOpen ? 'translate-x-0' : 'translate-x-10'
|
|
47
|
-
}`}
|
|
48
|
-
>
|
|
49
|
-
<div className="sidebar-fixed-header flex justify-between items-center p-3 lg:px-5 text-inverted-2">
|
|
50
|
-
{title && (
|
|
51
|
-
<div className="sidebar-fixed-title px-2 py-2 sm:py-5 text-f5 sm:text-f4 font-semibold text-inverted-1">
|
|
52
|
-
{title}
|
|
53
|
-
</div>
|
|
54
|
-
)}
|
|
55
|
-
<div className={`flex justify-between${title ? '' : ' flex-1'}`}>
|
|
56
|
-
<button
|
|
57
|
-
className="sidebar-fixed-close p-2 hover:text-primary transition-colors"
|
|
58
|
-
onClick={handleRequestCloseFunc}
|
|
59
|
-
>
|
|
60
|
-
<Icon icon="close" block size={4} />
|
|
61
|
-
</button>
|
|
62
|
-
{helpLink && (
|
|
63
|
-
<a
|
|
64
|
-
className="sidebar-fixed-help p-2 hover:text-primary transition-colors"
|
|
65
|
-
href={helpLink}
|
|
66
|
-
target="_blank"
|
|
67
|
-
rel="noreferrer"
|
|
68
|
-
>
|
|
69
|
-
<Icon icon="questionCircle" block size={4} />
|
|
70
|
-
</a>
|
|
71
|
-
)}
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
<div
|
|
75
|
-
className={`sidebar-fixed-content flex-1 flex-grow w-full overflow-auto overscroll-none px-5 lg:px-7 break-words ${backgroundShadowEffect.join(
|
|
76
|
-
' '
|
|
77
|
-
)}`}
|
|
78
|
-
>
|
|
79
|
-
{children}
|
|
80
|
-
</div>
|
|
81
|
-
{footerActions && (
|
|
82
|
-
<div className="sidebar-fixed-footer flex justify-between items-center p-5 lg:p-7 lg:pt-6">
|
|
83
|
-
{footerActions}
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export const SidebarFixed = React.memo(SidebarFixedComponent)
|
|
92
|
-
|
|
93
|
-
export interface SidebarFixedProps {
|
|
94
|
-
/**
|
|
95
|
-
* React children
|
|
96
|
-
* Also support render prop
|
|
97
|
-
*/
|
|
98
|
-
children?: React.ReactNode | ((props: SidebarFixedProps) => React.ReactNode)
|
|
99
|
-
/**
|
|
100
|
-
* Bottom actions
|
|
101
|
-
*/
|
|
102
|
-
footerActions?: React.ReactNode
|
|
103
|
-
/** Sidebar is open
|
|
104
|
-
* @default false
|
|
105
|
-
*/
|
|
106
|
-
isOpen?: boolean
|
|
107
|
-
/**
|
|
108
|
-
* Call when sidebar is closed
|
|
109
|
-
* */
|
|
110
|
-
onClose?: Function
|
|
111
|
-
/**
|
|
112
|
-
* Title displayed in header
|
|
113
|
-
*/
|
|
114
|
-
title?: string
|
|
115
|
-
/**
|
|
116
|
-
* Help external link
|
|
117
|
-
*/
|
|
118
|
-
helpLink?: string
|
|
119
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SidebarFixed'
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Table, TableProps } from './Table'
|
|
5
|
-
import { Icon } from '../../Icons'
|
|
6
|
-
import { Button } from '../Button'
|
|
7
|
-
|
|
8
|
-
const Link = (props: any) => {
|
|
9
|
-
return (
|
|
10
|
-
<a href="#a" {...props}>
|
|
11
|
-
{props.children}
|
|
12
|
-
</a>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const columns = [
|
|
17
|
-
{
|
|
18
|
-
id: 'Name',
|
|
19
|
-
label: 'Name',
|
|
20
|
-
cellWrapper: Link,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'Address',
|
|
24
|
-
label: 'Address',
|
|
25
|
-
cellWrapper: Link,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'Price',
|
|
29
|
-
label: <small>KA</small>,
|
|
30
|
-
textAlign: 'center',
|
|
31
|
-
size: 'w-1/6',
|
|
32
|
-
cellWrapper: Link,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'Count',
|
|
36
|
-
label: 'Count',
|
|
37
|
-
size: 'w-1/6',
|
|
38
|
-
cellWrapper: Link,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 'Active',
|
|
42
|
-
label: 'Active',
|
|
43
|
-
size: 'w-1/6',
|
|
44
|
-
textAlign: 'center',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 'Actions',
|
|
48
|
-
label: 'Actions',
|
|
49
|
-
size: 'w-16',
|
|
50
|
-
textAlign: 'center',
|
|
51
|
-
},
|
|
52
|
-
]
|
|
53
|
-
|
|
54
|
-
const rows = [
|
|
55
|
-
{
|
|
56
|
-
id: 1,
|
|
57
|
-
Name: 'Example Test',
|
|
58
|
-
Address: 'Street of Test',
|
|
59
|
-
Count: 245,
|
|
60
|
-
Price: (
|
|
61
|
-
<div>
|
|
62
|
-
<span className="navy-60 strike">$ 2399.00</span>
|
|
63
|
-
<br />
|
|
64
|
-
<span className="navy-60">$ 2299.00</span>
|
|
65
|
-
</div>
|
|
66
|
-
),
|
|
67
|
-
Active: <Icon icon="trash" />,
|
|
68
|
-
Actions: <div className="blue" />,
|
|
69
|
-
cellWrapperProps: { page: 'admin/settings/view', params: { file_name: 1 } },
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: 2,
|
|
73
|
-
Name: 'Last Test',
|
|
74
|
-
Address:
|
|
75
|
-
'LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong Text',
|
|
76
|
-
Price: (
|
|
77
|
-
<span className="yellow">
|
|
78
|
-
24 <div className="ml1 v-top" />
|
|
79
|
-
</span>
|
|
80
|
-
),
|
|
81
|
-
Active: <Icon icon="cog" />,
|
|
82
|
-
Actions: <div className="blue" />,
|
|
83
|
-
bgColor: 'danger-light',
|
|
84
|
-
cellWrapperProps: { page: 'admin/settings/view', params: { file_name: 2 } },
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: 3,
|
|
88
|
-
Name: 'Example Test',
|
|
89
|
-
Address: 'Street of Test',
|
|
90
|
-
Count: 245,
|
|
91
|
-
Price: (
|
|
92
|
-
<div>
|
|
93
|
-
<span className="navy-60 strike">$ 2399.00</span>
|
|
94
|
-
</div>
|
|
95
|
-
),
|
|
96
|
-
Active: <Icon icon="copy" />,
|
|
97
|
-
Actions: <div className="blue" />,
|
|
98
|
-
cellWrapperProps: { page: 'admin/settings/view', params: { file_name: 3 } },
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: 4,
|
|
102
|
-
Name: 'Last Test',
|
|
103
|
-
Address: 'Just a big street',
|
|
104
|
-
Price: (
|
|
105
|
-
<span className="yellow">
|
|
106
|
-
24 <div className="ml1 v-top" />
|
|
107
|
-
</span>
|
|
108
|
-
),
|
|
109
|
-
Active: <Icon icon="edit" />,
|
|
110
|
-
Actions: <div className="blue" />,
|
|
111
|
-
bgColor: 'success-light',
|
|
112
|
-
cellWrapperProps: { page: 'admin/settings/view', params: { file_name: 4 } },
|
|
113
|
-
},
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
export default {
|
|
117
|
-
title: 'Components/Table',
|
|
118
|
-
component: Table,
|
|
119
|
-
args: {
|
|
120
|
-
id: 'tableTest',
|
|
121
|
-
columns: columns,
|
|
122
|
-
rows: rows,
|
|
123
|
-
selectable: false,
|
|
124
|
-
onChange: (selectedData: number[]) => {
|
|
125
|
-
console.log('Selected rows data: ', selectedData)
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
argTypes: {
|
|
129
|
-
emptyText: {
|
|
130
|
-
control: { type: 'text' },
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
parameters: {
|
|
134
|
-
layout: 'padded',
|
|
135
|
-
},
|
|
136
|
-
} as Meta
|
|
137
|
-
|
|
138
|
-
const Template: Story<TableProps> = (args) => <Table {...args} />
|
|
139
|
-
|
|
140
|
-
export const Default = Template.bind({})
|
|
141
|
-
|
|
142
|
-
export const Loading = Template.bind({})
|
|
143
|
-
Loading.args = {
|
|
144
|
-
isLoading: true,
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export const Empty = Template.bind({})
|
|
148
|
-
Empty.args = {
|
|
149
|
-
rows: undefined,
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export const Selectable = Template.bind({})
|
|
153
|
-
Selectable.args = {
|
|
154
|
-
selectable: true,
|
|
155
|
-
onChange: (selectedRows) => {
|
|
156
|
-
console.log(selectedRows)
|
|
157
|
-
},
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const CustomStateTemplate: Story<TableProps> = (args) => {
|
|
161
|
-
const [selectedData, setSelectedData] = React.useState<number[]>(
|
|
162
|
-
args.selectedData || []
|
|
163
|
-
)
|
|
164
|
-
React.useEffect(() => {
|
|
165
|
-
setSelectedData(args.selectedData || [])
|
|
166
|
-
}, [])
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
<div>
|
|
170
|
-
<Button onClick={() => setSelectedData([])}>Reset</Button>
|
|
171
|
-
<div>Selected rows: {JSON.stringify(selectedData)}</div>
|
|
172
|
-
<Table
|
|
173
|
-
{...args}
|
|
174
|
-
selectedData={selectedData}
|
|
175
|
-
onChange={(selectedRows) => {
|
|
176
|
-
const mapped = selectedRows.map((element) => element.index)
|
|
177
|
-
setSelectedData(mapped)
|
|
178
|
-
}}
|
|
179
|
-
></Table>
|
|
180
|
-
</div>
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
export const SelectedData = CustomStateTemplate.bind({})
|
|
184
|
-
SelectedData.args = {
|
|
185
|
-
selectable: true,
|
|
186
|
-
disabledRows: [0],
|
|
187
|
-
selectedData: [1],
|
|
188
|
-
}
|