@loja-integrada/admin-components 0.19.3 → 1.0.0-beta.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/dist/chunk-7RSXJRXE.js +7 -0
- package/dist/chunk-AYBQ5B4L.js +1 -0
- package/dist/chunk-LTWCICTK.js +1 -0
- package/dist/chunk-QCTWLTAA.js +1 -0
- package/dist/chunk-YV57ZIX5.js +7 -0
- package/dist/chunk-YXT4UVSS.js +6 -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.d.ts +7 -6
- package/dist/index.js +6 -8
- package/package.json +60 -140
- package/README.md +0 -82
- 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,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
import { withDesign } from 'storybook-addon-designs'
|
|
4
|
-
import { Icon } from '../../Icons'
|
|
5
|
-
|
|
6
|
-
import { Tag, TagProps } from './Tag'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Indicators/Tag',
|
|
10
|
-
component: Tag,
|
|
11
|
-
decorators: [withDesign],
|
|
12
|
-
parameters: {
|
|
13
|
-
design: {
|
|
14
|
-
type: 'figma',
|
|
15
|
-
url: 'https://www.figma.com/file/Z2WDD4SH8zwaJC2K5wbtMO/Sistema-Integrado?node-id=1496%3A13727',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
args: {
|
|
19
|
-
content: 'De 10/02/2022 a 22/02/2022',
|
|
20
|
-
type: 'primary',
|
|
21
|
-
},
|
|
22
|
-
} as Meta
|
|
23
|
-
|
|
24
|
-
const Template: Story<TagProps> = args => <Tag {...args} />
|
|
25
|
-
|
|
26
|
-
export const Default = Template.bind({})
|
|
27
|
-
|
|
28
|
-
export const WithAction = Template.bind({})
|
|
29
|
-
WithAction.args = {
|
|
30
|
-
action: (
|
|
31
|
-
<Icon icon="timesCircle" size={4} block />
|
|
32
|
-
),
|
|
33
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
const TagTypes = {
|
|
4
|
-
neutral: 'bg-base-1 border-inverted-2',
|
|
5
|
-
primary: 'bg-primary-light border-primary',
|
|
6
|
-
danger: 'bg-danger-light border-danger',
|
|
7
|
-
success: 'bg-success-light border-success',
|
|
8
|
-
warning: 'bg-warning-light border-warning',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const TagComponent = ({
|
|
12
|
-
type = 'neutral',
|
|
13
|
-
content,
|
|
14
|
-
fullWidth = false,
|
|
15
|
-
className = '',
|
|
16
|
-
action,
|
|
17
|
-
}: TagProps) => {
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className={`tag ${
|
|
21
|
-
fullWidth ? 'flex' : 'inline-flex'
|
|
22
|
-
} items-center justify-between border rounded px-4 py-2 tracking-4 leading-6 text-f6 text-primary-bold ${
|
|
23
|
-
TagTypes[type]
|
|
24
|
-
} ${className}`}
|
|
25
|
-
>
|
|
26
|
-
<div className="min-w-0 break-words -my-px">{content}</div>
|
|
27
|
-
{action && <div className="-my-px ml-3">{action}</div>}
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const Tag = React.memo(TagComponent)
|
|
33
|
-
|
|
34
|
-
export interface TagProps {
|
|
35
|
-
/** Tag color
|
|
36
|
-
* @default neutral
|
|
37
|
-
* */
|
|
38
|
-
type?: keyof typeof TagTypes
|
|
39
|
-
/**
|
|
40
|
-
* Tag content
|
|
41
|
-
* */
|
|
42
|
-
content: string | React.ReactNode
|
|
43
|
-
/**
|
|
44
|
-
* Enlarge width of the Tag
|
|
45
|
-
* */
|
|
46
|
-
fullWidth?: boolean
|
|
47
|
-
/** Adittional classes for Tag
|
|
48
|
-
* @default ''
|
|
49
|
-
* */
|
|
50
|
-
className?: string
|
|
51
|
-
/**
|
|
52
|
-
* Action for the tag, like an button or icon
|
|
53
|
-
* */
|
|
54
|
-
action: React.ReactNode
|
|
55
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tag'
|
|
@@ -1,18 +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 "./Toast.stories"
|
|
5
|
-
|
|
6
|
-
const { Default } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('Toast tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('.Toastify')
|
|
14
|
-
cy.get('button').click()
|
|
15
|
-
cy.get('.Toastify').contains('Aprovado')
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
})
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Toast } from './Toast'
|
|
5
|
-
|
|
6
|
-
import { Button } from '../../Components/Button'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Indicators/Toast',
|
|
10
|
-
component: Toast.Container,
|
|
11
|
-
args: {
|
|
12
|
-
title: 'Aprovado',
|
|
13
|
-
type: 'success'
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
type: {
|
|
17
|
-
options: ['info', 'success', 'warning', 'error', 'default'],
|
|
18
|
-
control: { type: 'radio' }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} as Meta
|
|
22
|
-
|
|
23
|
-
const Template: Story<any> = ({ title, ...args }) => (
|
|
24
|
-
<>
|
|
25
|
-
<Toast.Container />
|
|
26
|
-
<Button onClick={() => Toast.notify(title, { ...args })}>
|
|
27
|
-
Show toast
|
|
28
|
-
</Button>
|
|
29
|
-
</>
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
export const Default = Template.bind({})
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
ToastContainer,
|
|
4
|
-
toast as showToast,
|
|
5
|
-
ToastContent,
|
|
6
|
-
ToastOptions,
|
|
7
|
-
} from 'react-toastify'
|
|
8
|
-
import { injectStyle } from 'react-toastify/dist/inject-style'
|
|
9
|
-
import { Icon } from '../../Icons'
|
|
10
|
-
|
|
11
|
-
const contextClass = {
|
|
12
|
-
success: 'bg-primary-light border-primary-dark',
|
|
13
|
-
error: 'bg-danger-light border-danger-dark',
|
|
14
|
-
info: 'bg-secondary-light border-secondary',
|
|
15
|
-
warning: 'bg-warning-light border-warning-dark',
|
|
16
|
-
default: '',
|
|
17
|
-
dark: '',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const progressClassName = {
|
|
21
|
-
success: '!bg-primary-dark',
|
|
22
|
-
error: '!bg-danger-dark',
|
|
23
|
-
info: '!bg-secondary-dark',
|
|
24
|
-
warning: '!bg-warning-dark',
|
|
25
|
-
default: '',
|
|
26
|
-
dark: '',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const Container = () => {
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
injectStyle()
|
|
32
|
-
}, [])
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<ToastContainer
|
|
36
|
-
toastClassName={(props) =>
|
|
37
|
-
`mb-3 border flex items-top justify-between p-3 pb-4 pr-4 relative rounded shadow-md ${
|
|
38
|
-
contextClass[props?.type || 'info']
|
|
39
|
-
}`
|
|
40
|
-
}
|
|
41
|
-
bodyClassName={() => `max-w-[95%] text-sm text-on-base break-words`}
|
|
42
|
-
progressClassName={(props) =>
|
|
43
|
-
`${props?.defaultClassName} !h-1 ${
|
|
44
|
-
progressClassName[props?.type || 'info']
|
|
45
|
-
}`
|
|
46
|
-
}
|
|
47
|
-
closeButton={({ closeToast }) => (
|
|
48
|
-
<div
|
|
49
|
-
className="-mt-3 -mr-2 cursor-pointer text-on-base hover:text-on-base-2"
|
|
50
|
-
onClick={closeToast}
|
|
51
|
-
>
|
|
52
|
-
<Icon icon="close" size={3} />
|
|
53
|
-
</div>
|
|
54
|
-
)}
|
|
55
|
-
position="top-right"
|
|
56
|
-
/>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const notify = (content: ToastContent, options?: ToastOptions) => {
|
|
61
|
-
const type = options?.type || 'info'
|
|
62
|
-
const autoClose = !(typeof options?.autoClose === 'boolean')
|
|
63
|
-
? options?.autoClose
|
|
64
|
-
: options?.autoClose && 5000
|
|
65
|
-
|
|
66
|
-
showToast(content, {
|
|
67
|
-
...options,
|
|
68
|
-
type: type,
|
|
69
|
-
autoClose: autoClose,
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export const Toast = {
|
|
74
|
-
Container,
|
|
75
|
-
notify,
|
|
76
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Toast'
|
|
@@ -1,18 +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 "./Tooltip.stories"
|
|
5
|
-
|
|
6
|
-
const { Default } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('Tooltip tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('[data-tippy-root]').should('not.exist');
|
|
14
|
-
cy.get('a').trigger('mouseenter')
|
|
15
|
-
cy.get('[data-tippy-root]').contains('I am a tooltip!')
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
})
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Tooltip, TooltipProps } from './Tooltip'
|
|
5
|
-
|
|
6
|
-
import { Icon } from '../../Icons'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Indicators/Tooltip',
|
|
10
|
-
component: Tooltip,
|
|
11
|
-
args: {
|
|
12
|
-
appendTo: 'parent',
|
|
13
|
-
content: 'I am a tooltip!',
|
|
14
|
-
hideOnClick: false,
|
|
15
|
-
trigger: 'mouseenter',
|
|
16
|
-
touch: 'hold',
|
|
17
|
-
duration: 150,
|
|
18
|
-
placement: 'top',
|
|
19
|
-
interactive: false,
|
|
20
|
-
},
|
|
21
|
-
} as Meta
|
|
22
|
-
|
|
23
|
-
const Template: Story<TooltipProps> = args => (
|
|
24
|
-
<div className="absolute bg-base-2 inset-0 flex items-center justify-center">
|
|
25
|
-
<Tooltip {...args}>
|
|
26
|
-
<a href="#">
|
|
27
|
-
<Icon icon="eye" />
|
|
28
|
-
</a>
|
|
29
|
-
</Tooltip>
|
|
30
|
-
</div>
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
export const Default = Template.bind({})
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Tippy, { TippyProps } from '@tippyjs/react'
|
|
3
|
-
import './style.scss'
|
|
4
|
-
|
|
5
|
-
const TooltipComponent = (props: TooltipProps) => {
|
|
6
|
-
const [mounted, setMounted] = React.useState(false)
|
|
7
|
-
|
|
8
|
-
const lazyPlugin = {
|
|
9
|
-
fn: () => ({
|
|
10
|
-
onMount: () => setMounted(true),
|
|
11
|
-
onHidden: () => setMounted(false),
|
|
12
|
-
}),
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const computedProps = { ...props }
|
|
16
|
-
|
|
17
|
-
computedProps.plugins = [lazyPlugin, ...(props.plugins || [])]
|
|
18
|
-
|
|
19
|
-
if (props.render) {
|
|
20
|
-
const render = props.render
|
|
21
|
-
computedProps.render = (...args) => (mounted ? render(...args) : '')
|
|
22
|
-
} else {
|
|
23
|
-
computedProps.content = mounted ? props.content : ''
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (typeof window === 'undefined') {
|
|
27
|
-
return <>{props.children}</>
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Tippy
|
|
32
|
-
{...computedProps}
|
|
33
|
-
appendTo={props?.appendTo || 'parent'}
|
|
34
|
-
hideOnClick={props?.hideOnClick || false}
|
|
35
|
-
trigger={props?.trigger || 'mouseenter'}
|
|
36
|
-
touch={props?.touch || ['hold', 400]}
|
|
37
|
-
duration={props?.duration || 150}
|
|
38
|
-
placement={window?.innerWidth < 1024 ? 'top' : props?.placement || 'top'}
|
|
39
|
-
interactive={props?.interactive || false}
|
|
40
|
-
/>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const Tooltip = React.memo(TooltipComponent)
|
|
45
|
-
|
|
46
|
-
export interface TooltipProps extends TippyProps {
|
|
47
|
-
/** Tooltip append
|
|
48
|
-
* @default 'parent'
|
|
49
|
-
* */
|
|
50
|
-
appendTo?: TippyProps['appendTo']
|
|
51
|
-
/** Tooltip hide on click
|
|
52
|
-
* @default false
|
|
53
|
-
* */
|
|
54
|
-
hideOnClick?: TippyProps['hideOnClick']
|
|
55
|
-
/** Tooltip trigger
|
|
56
|
-
* @default 'mouseenter'
|
|
57
|
-
* */
|
|
58
|
-
trigger?: TippyProps['trigger']
|
|
59
|
-
/** Tooltip action on touch
|
|
60
|
-
* @default ['hold', 400]
|
|
61
|
-
* */
|
|
62
|
-
touch?: TippyProps['touch']
|
|
63
|
-
/** Tooltip duration
|
|
64
|
-
* @default 150
|
|
65
|
-
* */
|
|
66
|
-
duration?: TippyProps['duration']
|
|
67
|
-
/** Tooltip position
|
|
68
|
-
* @default 'top'
|
|
69
|
-
* */
|
|
70
|
-
placement?: TippyProps['placement']
|
|
71
|
-
/** Tooltip can be hovered over and clicked inside
|
|
72
|
-
* @default false
|
|
73
|
-
* */
|
|
74
|
-
interactive?: TippyProps['interactive']
|
|
75
|
-
/** Tooltip theme
|
|
76
|
-
* @deprecated Not implemented
|
|
77
|
-
* @default dark
|
|
78
|
-
* */
|
|
79
|
-
theme?: 'light' | 'dark'
|
|
80
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tooltip'
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
.tippy-box {
|
|
2
|
-
@apply relative bg-inverted-1 text-base-1 rounded text-f7 tracking-4 leading-4 outline-0 transition-all;
|
|
3
|
-
|
|
4
|
-
&[data-animation='fade'][data-state='hidden'] {
|
|
5
|
-
@apply opacity-0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
[data-tippy-root] {
|
|
9
|
-
max-width: calc(100vw - 10px);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&[data-placement^='top']>.tippy-arrow {
|
|
13
|
-
@apply bottom-0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&[data-placement^='top']>.tippy-arrow:before {
|
|
17
|
-
@apply -bottom-2 left-0;
|
|
18
|
-
border-width: 8px 8px 0;
|
|
19
|
-
border-top-color: initial;
|
|
20
|
-
transform-origin: center top;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&[data-placement^='bottom']>.tippy-arrow {
|
|
24
|
-
@apply top-0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&[data-placement^='bottom']>.tippy-arrow:before {
|
|
28
|
-
@apply -top-2 left-0;
|
|
29
|
-
border-width: 0 8px 8px;
|
|
30
|
-
border-bottom-color: initial;
|
|
31
|
-
transform-origin: center bottom;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&[data-placement^='left']>.tippy-arrow {
|
|
35
|
-
@apply right-0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&[data-placement^='left']>.tippy-arrow:before {
|
|
39
|
-
@apply -right-2;
|
|
40
|
-
border-width: 8px 0 8px 8px;
|
|
41
|
-
border-left-color: initial;
|
|
42
|
-
transform-origin: center left;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[data-placement^='right']>.tippy-arrow {
|
|
46
|
-
@apply left-0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&[data-placement^='right']>.tippy-arrow:before {
|
|
50
|
-
@apply -left-2;
|
|
51
|
-
border-width: 8px 8px 8px 0;
|
|
52
|
-
border-right-color: initial;
|
|
53
|
-
transform-origin: center right;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&[data-inertia][data-state='visible'] {
|
|
57
|
-
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.tippy-arrow {
|
|
61
|
-
@apply text-inverted-1 w-4 h-4;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.tippy-arrow:before {
|
|
65
|
-
@apply absolute border-transparent border-solid;
|
|
66
|
-
content: '';
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.tippy-content {
|
|
70
|
-
@apply relative py-3 px-2 z-1;
|
|
71
|
-
}
|
|
72
|
-
}
|
package/src/Indicators/index.ts
DELETED
|
@@ -1,20 +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 './ActionBar.stories'
|
|
5
|
-
|
|
6
|
-
const { Default, OnlyMobile } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('ActionBar tests'), () => {
|
|
10
|
-
it('Default', () => {
|
|
11
|
-
mount(<Default />)
|
|
12
|
-
cy.get('.fixed').should('not.have.class', 'lg:hidden')
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
it('OnlyMobile', () => {
|
|
16
|
-
mount(<OnlyMobile />)
|
|
17
|
-
cy.get('.fixed').should('have.class', 'lg:hidden')
|
|
18
|
-
})
|
|
19
|
-
})
|
|
20
|
-
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { ActionBar, ActionBarProps } from '.'
|
|
5
|
-
import { Button } from '../../Components/Button'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: ActionBar,
|
|
9
|
-
title: 'Layout/ActionBar',
|
|
10
|
-
} as Meta
|
|
11
|
-
|
|
12
|
-
const Template: Story<ActionBarProps> = (args) => <ActionBar {...args} />
|
|
13
|
-
|
|
14
|
-
export const Default = Template.bind({})
|
|
15
|
-
Default.args = {
|
|
16
|
-
children: [
|
|
17
|
-
<Button variant="tertiary" icon="timesCircle" onClick={() => {}}>
|
|
18
|
-
Cancelar
|
|
19
|
-
</Button>,
|
|
20
|
-
<Button variant="primary" icon="checkCircle" onClick={() => {}}>
|
|
21
|
-
<span className="hidden lg:block">Criar novo registro</span>
|
|
22
|
-
<span className="block lg:hidden">Criar</span>
|
|
23
|
-
</Button>,
|
|
24
|
-
],
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const OnlyMobile = Template.bind({})
|
|
28
|
-
OnlyMobile.args = {
|
|
29
|
-
onlyMobile: true,
|
|
30
|
-
children: [
|
|
31
|
-
<Button icon="trash" onClick={() => {}}>
|
|
32
|
-
Remover
|
|
33
|
-
</Button>,
|
|
34
|
-
<Button icon="checkCircle" onClick={() => {}}>
|
|
35
|
-
Ativar
|
|
36
|
-
</Button>,
|
|
37
|
-
<></>,
|
|
38
|
-
<Button icon="ban" onClick={() => {}}>
|
|
39
|
-
Inativar
|
|
40
|
-
</Button>,
|
|
41
|
-
],
|
|
42
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import { Button } from '../../Components/Button'
|
|
3
|
-
import { Icon } from '../../Icons'
|
|
4
|
-
|
|
5
|
-
import { CONTAINER_MAX_SIZE } from '../constants'
|
|
6
|
-
|
|
7
|
-
const ActionBarComponent = ({ onlyMobile, children }: ActionBarProps) => {
|
|
8
|
-
const [containerExpanded, setContainerExpanded] = React.useState(true)
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const botbar = window.parent.document.querySelector<HTMLElement>('.botbar')
|
|
11
|
-
const container =
|
|
12
|
-
window.document.querySelector<HTMLElement>('.page-container')
|
|
13
|
-
|
|
14
|
-
if (botbar) botbar.style.display = 'none'
|
|
15
|
-
if (container) {
|
|
16
|
-
container.classList.remove('lg:mb-10', 'lg:pb-0')
|
|
17
|
-
setContainerExpanded(!!container.dataset.expanded)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return () => {
|
|
21
|
-
if (botbar) botbar.style.display = ''
|
|
22
|
-
if (container) container.classList.add('lg:mb-10', 'lg:pb-0')
|
|
23
|
-
}
|
|
24
|
-
}, [])
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div
|
|
28
|
-
className={
|
|
29
|
-
'action-bar fixed inset-x-0 bottom-0 h-12 lg:h-auto pb-0-safe bg-inverted-1 lg:bg-base-1 z-50 shadow' +
|
|
30
|
-
(onlyMobile ? ' lg:hidden' : '')
|
|
31
|
-
}
|
|
32
|
-
>
|
|
33
|
-
<div
|
|
34
|
-
className={`${
|
|
35
|
-
containerExpanded
|
|
36
|
-
? CONTAINER_MAX_SIZE.expanded
|
|
37
|
-
: CONTAINER_MAX_SIZE.default
|
|
38
|
-
} flex items-center justify-center lg:justify-end w-full h-full mx-auto px-8 lg:px-0`}
|
|
39
|
-
>
|
|
40
|
-
{!onlyMobile && (
|
|
41
|
-
<div className="hidden lg:grid grid-flow-col gap-x-5 my-2.5 mr-8">
|
|
42
|
-
{React.Children.map(children, ({ props }) => {
|
|
43
|
-
const { ...childrenProps } = props
|
|
44
|
-
|
|
45
|
-
delete childrenProps?.icon
|
|
46
|
-
|
|
47
|
-
return <Button {...childrenProps} />
|
|
48
|
-
})}
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
<div className="lg:hidden">
|
|
52
|
-
{React.Children.map(children, ({ props }) => {
|
|
53
|
-
if (!props.children) return
|
|
54
|
-
return (
|
|
55
|
-
<button
|
|
56
|
-
className={
|
|
57
|
-
'px-4 py-1 text-base-1' +
|
|
58
|
-
(props?.loading ? ' pointer-events-none' : '')
|
|
59
|
-
}
|
|
60
|
-
onClick={props?.onClick}
|
|
61
|
-
type={props?.type || 'button'}
|
|
62
|
-
>
|
|
63
|
-
{props?.loading ? (
|
|
64
|
-
<Icon icon="loading" className="p-px" />
|
|
65
|
-
) : (
|
|
66
|
-
props?.icon && <Icon icon={props?.icon} className="p-px" />
|
|
67
|
-
)}
|
|
68
|
-
<span className="block text-f8">{props.children}</span>
|
|
69
|
-
</button>
|
|
70
|
-
)
|
|
71
|
-
})}
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export const ActionBar = React.memo(ActionBarComponent)
|
|
79
|
-
|
|
80
|
-
export interface ActionBarProps {
|
|
81
|
-
/** Show component only on Mobile
|
|
82
|
-
* @default false
|
|
83
|
-
*/
|
|
84
|
-
onlyMobile?: boolean
|
|
85
|
-
/**
|
|
86
|
-
* React children
|
|
87
|
-
*/
|
|
88
|
-
children: React.ReactElement | React.ReactElement[]
|
|
89
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ActionBar'
|
|
@@ -1,73 +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 "./Box.stories"
|
|
5
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
6
|
-
|
|
7
|
-
const { Default, WithAction, WithTabs, WithToggle, OnlyTabs } = composeStories(stories)
|
|
8
|
-
|
|
9
|
-
describe(specTitle('Box tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('.box')
|
|
14
|
-
.should('have.length', 1)
|
|
15
|
-
.within(() => {
|
|
16
|
-
cy.get('.box-header .box-header-title').should('exist')
|
|
17
|
-
cy.get('.box-header h3').contains('Box Title')
|
|
18
|
-
cy.get('.box-header h4').contains('Box SubTitle')
|
|
19
|
-
cy.get('.box-header .indicator-status').contains('Some status')
|
|
20
|
-
cy.get('.tabs button').should('have.length', 3)
|
|
21
|
-
cy.get('.box-content').contains('Box Content')
|
|
22
|
-
cy.get('.box-content').should('have.class', 'lg:p-10')
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
it('Small', () => {
|
|
27
|
-
mount(<Default variant="small" />)
|
|
28
|
-
cy.get('.box .box-content').should('not.have.class', 'lg:p-10')
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('WithAction', () => {
|
|
32
|
-
mount(<WithAction />)
|
|
33
|
-
cy.get('.box .box-header .indicator-status')
|
|
34
|
-
.should('have.length', 1)
|
|
35
|
-
.contains('Some status')
|
|
36
|
-
.get('.rounded-full').should('have.class', 'bg-success')
|
|
37
|
-
cy.get('.box .tabs').should('not.exist')
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
it('WithToggle', () => {
|
|
41
|
-
mount(<WithToggle />)
|
|
42
|
-
cy.get('.box .box-header .box-toggle')
|
|
43
|
-
.should('have.length', 1)
|
|
44
|
-
.parents('.box-header').trigger('click')
|
|
45
|
-
cy.get('.box')
|
|
46
|
-
.should('have.attr', 'data-opened', 'false')
|
|
47
|
-
.get('.box-header')
|
|
48
|
-
.trigger('click')
|
|
49
|
-
cy.get('.box')
|
|
50
|
-
.should('have.attr', 'data-opened', 'true')
|
|
51
|
-
cy.get('.box .tabs').should('not.exist')
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
it('WithTabs', () => {
|
|
55
|
-
mount(<WithTabs />)
|
|
56
|
-
cy.get('.box .tabs')
|
|
57
|
-
.should('have.length', 1)
|
|
58
|
-
.get('button')
|
|
59
|
-
.should('have.length', 3)
|
|
60
|
-
cy.get('.box .box-header .indicator-status').should('not.exist')
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
it('OnlyTabs', () => {
|
|
64
|
-
mount(<OnlyTabs />)
|
|
65
|
-
cy.get('.box .tabs')
|
|
66
|
-
.should('have.length', 1)
|
|
67
|
-
.get('button')
|
|
68
|
-
.should('have.length', 3)
|
|
69
|
-
cy.get('.box .box-header .box-header-title').should('not.exist')
|
|
70
|
-
cy.get('.box .box-header .indicator-status').should('not.exist')
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
})
|