@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,79 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Breadcrumb, BreadcrumbProps } from '.'
|
|
5
|
-
import { Button } from '../../Components/Button'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Navigation/Breadcrumb',
|
|
9
|
-
component: Breadcrumb,
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'padded',
|
|
12
|
-
}
|
|
13
|
-
} as Meta
|
|
14
|
-
|
|
15
|
-
const Template: Story<BreadcrumbProps> = args => <Breadcrumb {...args} />
|
|
16
|
-
|
|
17
|
-
export const Default = Template.bind({})
|
|
18
|
-
Default.args = {
|
|
19
|
-
currentTitle: 'Página atual',
|
|
20
|
-
previousTitle: 'Página anterior'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const NoPrevious = Template.bind({})
|
|
24
|
-
NoPrevious.args = {
|
|
25
|
-
currentTitle: 'Página atual',
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const WithPrevious = Template.bind({})
|
|
29
|
-
WithPrevious.args = {
|
|
30
|
-
currentTitle: 'Página atual',
|
|
31
|
-
previousTitle: 'Página anterior',
|
|
32
|
-
previousHref: 'https://www.google.com'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const Link = (props: any) => { return <a href="https://www.google.com" target="_blank" className={`underline ` + props.className}>{props.children}</a> }
|
|
36
|
-
export const WithPreviousCustom = Template.bind({})
|
|
37
|
-
WithPreviousCustom.args = {
|
|
38
|
-
currentTitle: 'Página atual',
|
|
39
|
-
previousTitle: 'Página anterior',
|
|
40
|
-
Link: Link
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const WithoutPreviousTitle = Template.bind({})
|
|
44
|
-
WithoutPreviousTitle.args = {
|
|
45
|
-
currentTitle: 'Página atual',
|
|
46
|
-
previousHref: 'https://www.google.com'
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const WithMobileCenter = Template.bind({})
|
|
50
|
-
WithMobileCenter.args = {
|
|
51
|
-
currentTitle: 'Página atual',
|
|
52
|
-
previousTitle: 'Página anterior',
|
|
53
|
-
previousHref: 'https://www.google.com',
|
|
54
|
-
mobileAlign: 'center'
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const WithHelp = Template.bind({})
|
|
58
|
-
WithHelp.args = {
|
|
59
|
-
currentTitle: 'Página atual',
|
|
60
|
-
previousHref: 'https://www.google.com',
|
|
61
|
-
mobileAlign: 'center',
|
|
62
|
-
help: {
|
|
63
|
-
title: 'Saiba mais',
|
|
64
|
-
href: 'https://www.google.com'
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export const WithActions = Template.bind({})
|
|
69
|
-
WithActions.args = {
|
|
70
|
-
currentTitle: 'Página atual',
|
|
71
|
-
previousHref: 'https://www.google.com',
|
|
72
|
-
mobileAlign: 'center',
|
|
73
|
-
actions: (
|
|
74
|
-
<>
|
|
75
|
-
<Button variant="outline" className="hidden lg:block">Cancelar</Button>
|
|
76
|
-
<Button variant="outline" icon="app" iconPosition="left">Salvar</Button>
|
|
77
|
-
</>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Icon } from '../../Icons/Icon'
|
|
3
|
-
import { HelpLink } from '../../Components/HelpLink'
|
|
4
|
-
|
|
5
|
-
const actionsDisplayClass = {
|
|
6
|
-
both: 'flex',
|
|
7
|
-
desktop: 'hidden lg:flex',
|
|
8
|
-
mobile: 'flex lg:hidden',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Breadcrumb: React.FC<BreadcrumbProps> = React.memo(
|
|
12
|
-
({
|
|
13
|
-
Link,
|
|
14
|
-
currentTitle,
|
|
15
|
-
previousTitle,
|
|
16
|
-
previousHref,
|
|
17
|
-
mobileAlign = 'left',
|
|
18
|
-
help,
|
|
19
|
-
actions,
|
|
20
|
-
actionsDisplay = 'both',
|
|
21
|
-
className = '',
|
|
22
|
-
}) => {
|
|
23
|
-
const renderPrevTitle = (
|
|
24
|
-
<span className="hidden lg:inline truncate">{previousTitle}</span>
|
|
25
|
-
)
|
|
26
|
-
const renderPrevIcon = (
|
|
27
|
-
<Icon
|
|
28
|
-
icon="arrowLeft"
|
|
29
|
-
size={4}
|
|
30
|
-
className="inline-flex mr-3 -mt-1"
|
|
31
|
-
block
|
|
32
|
-
/>
|
|
33
|
-
)
|
|
34
|
-
const renderPrevLink = () => {
|
|
35
|
-
if (!previousHref && !Link) {
|
|
36
|
-
// Previous page don't have link
|
|
37
|
-
return <span className="duration-200">{renderPrevTitle}</span>
|
|
38
|
-
}
|
|
39
|
-
if (Link) {
|
|
40
|
-
// Previous page using custom link element
|
|
41
|
-
return (
|
|
42
|
-
<Link className="hover:text-on-base duration-200">
|
|
43
|
-
{renderPrevIcon}
|
|
44
|
-
{renderPrevTitle}
|
|
45
|
-
</Link>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
// Default previous link
|
|
49
|
-
return (
|
|
50
|
-
<a className="hover:text-on-base duration-200" href={previousHref}>
|
|
51
|
-
{renderPrevIcon}
|
|
52
|
-
{renderPrevTitle}
|
|
53
|
-
</a>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<div
|
|
59
|
-
aria-label="breadcrumbs"
|
|
60
|
-
className={`header-navigation flex items-center justify-between mb-4 lg:mb-7 ${className}`}
|
|
61
|
-
>
|
|
62
|
-
<div
|
|
63
|
-
className={`header-navigation-breadcrumb max-w-full truncate w-full`}
|
|
64
|
-
>
|
|
65
|
-
<div className="w-full inline-flex self-center items-center font-semibold tracking-5 text-f5 sm:text-f4 lg:text-f3">
|
|
66
|
-
{(previousTitle || previousHref || Link) && (
|
|
67
|
-
<span className="header-navigation-previous inline-flex items-center text-on-base-2 text-xl -mr-px truncate">
|
|
68
|
-
{renderPrevLink()}
|
|
69
|
-
{previousTitle && (
|
|
70
|
-
<span className="hidden lg:inline px-2 -ml-px"> / </span>
|
|
71
|
-
)}
|
|
72
|
-
</span>
|
|
73
|
-
)}
|
|
74
|
-
<span
|
|
75
|
-
className={`header-navigation-current text-on-base truncate leading-relaxed ${
|
|
76
|
-
mobileAlign === 'center'
|
|
77
|
-
? 'w-full lg:w-auto text-center lg:text-left'
|
|
78
|
-
: ''
|
|
79
|
-
}`}
|
|
80
|
-
>
|
|
81
|
-
{currentTitle}
|
|
82
|
-
</span>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div className="header-navigation-content flex shrink-0 max-w-1/2 items-center flex-grow justify-end gap-5 ml-2 whitespace-nowrap">
|
|
86
|
-
<div className="header-navigation-help help flex items-center">
|
|
87
|
-
{help && (
|
|
88
|
-
<HelpLink
|
|
89
|
-
text={help.title}
|
|
90
|
-
mobileText={help.mobileText}
|
|
91
|
-
as="hyperLink"
|
|
92
|
-
href={help.href}
|
|
93
|
-
/>
|
|
94
|
-
)}
|
|
95
|
-
</div>
|
|
96
|
-
{actions && (
|
|
97
|
-
<div
|
|
98
|
-
className={`header-navigation-actions items-center gap-5 ${
|
|
99
|
-
actionsDisplayClass[actionsDisplay] || ''
|
|
100
|
-
}`}
|
|
101
|
-
>
|
|
102
|
-
{actions}
|
|
103
|
-
</div>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
export interface BreadcrumbProps {
|
|
112
|
-
/**
|
|
113
|
-
* Custom class name
|
|
114
|
-
* */
|
|
115
|
-
className?: string
|
|
116
|
-
/**
|
|
117
|
-
* Current page title
|
|
118
|
-
* */
|
|
119
|
-
currentTitle: string | React.ReactNode
|
|
120
|
-
/**
|
|
121
|
-
* Previous page title
|
|
122
|
-
* */
|
|
123
|
-
previousTitle?: string | React.ReactNode
|
|
124
|
-
/**
|
|
125
|
-
* Previous page href
|
|
126
|
-
* */
|
|
127
|
-
previousHref?: string
|
|
128
|
-
/**
|
|
129
|
-
* Custom link component (replace <a>)
|
|
130
|
-
* Example: `const Link = (props: any) => { return <a href="https://www.google.com" target="_blank" className={`underline ` + props.className}>{props.children}</a> }`
|
|
131
|
-
* */
|
|
132
|
-
Link?: React.ElementType
|
|
133
|
-
/** Aligment of `currentTitle` at mobile
|
|
134
|
-
* @default 'left'
|
|
135
|
-
* */
|
|
136
|
-
mobileAlign?: 'left' | 'center'
|
|
137
|
-
/**
|
|
138
|
-
* Help link (external page)
|
|
139
|
-
* */
|
|
140
|
-
help?: {
|
|
141
|
-
title?: string
|
|
142
|
-
href: string
|
|
143
|
-
mobileText?: boolean
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Custom actions and buttons
|
|
147
|
-
* */
|
|
148
|
-
actions?: React.ReactNode
|
|
149
|
-
/** Should show actions only at one resolution or always
|
|
150
|
-
* @default 'both'
|
|
151
|
-
* */
|
|
152
|
-
actionsDisplay?: 'desktop' | 'mobile' | 'both'
|
|
153
|
-
}
|
|
@@ -1,45 +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 "./Pagination.stories"
|
|
5
|
-
|
|
6
|
-
const { Default, WithoutItems, WithLengthOptions } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('Pagination tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('.pagination .pagination-info').within(() => {
|
|
14
|
-
cy.get('.pagination-info-current').contains('2')
|
|
15
|
-
cy.get('.pagination-info-total').contains('123')
|
|
16
|
-
})
|
|
17
|
-
cy.get('.pagination .pagination-nav').within(() => {
|
|
18
|
-
cy.get('.pagination-nav-current').contains('2')
|
|
19
|
-
cy.get('.pagination-nav-total').contains('10')
|
|
20
|
-
|
|
21
|
-
let alerted = ''
|
|
22
|
-
cy.on('window:alert', msg => alerted = msg)
|
|
23
|
-
cy.get('.pagination-nav-total').click().then(() => (expect(alerted).to.match(/10/), alerted = ''))
|
|
24
|
-
cy.get('.pagination-nav-previous').click().then(() => (expect(alerted).to.match(/1/), alerted = ''))
|
|
25
|
-
cy.get('.pagination-nav-next').click().then(() => (expect(alerted).to.match(/3/), alerted = ''))
|
|
26
|
-
cy.get('.pagination-nav-current').type('{backspace}{del}6{enter}').then(() => (expect(alerted).to.match(/6/), alerted = ''))
|
|
27
|
-
cy.get('.pagination-nav-current').type('15{enter}').then(() => (expect(alerted).to.match(/10/), alerted = ''))
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('WithoutItems', () => {
|
|
32
|
-
mount(<WithoutItems />)
|
|
33
|
-
cy.get('.pagination .pagination-info').should('not.be.exist')
|
|
34
|
-
cy.get('.pagination .pagination-nav').should('be.exist')
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
it('WithLengthOptions', () => {
|
|
38
|
-
mount(<WithLengthOptions />)
|
|
39
|
-
cy.get('.pagination .pagination-info').within(() => {
|
|
40
|
-
cy.get('select').should('be.exist')
|
|
41
|
-
cy.get('select option').should('have.length', 3)
|
|
42
|
-
})
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
})
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Pagination, PaginationProps } from '.'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Navigation/Pagination',
|
|
8
|
-
component: Pagination,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'padded',
|
|
11
|
-
},
|
|
12
|
-
args: {
|
|
13
|
-
onPageChange: (page: any) => { alert(`To page: ${page}`) },
|
|
14
|
-
totalPages: 10,
|
|
15
|
-
}
|
|
16
|
-
} as Meta
|
|
17
|
-
|
|
18
|
-
const Template: Story<PaginationProps> = args => <Pagination {...args} />
|
|
19
|
-
|
|
20
|
-
export const Default = Template.bind({})
|
|
21
|
-
Default.args = {
|
|
22
|
-
currentItemsLength: 2,
|
|
23
|
-
totalItemsLength: 123,
|
|
24
|
-
currentPage: 2,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const WithoutItems = Template.bind({})
|
|
28
|
-
|
|
29
|
-
export const WithLengthOptions = Template.bind({})
|
|
30
|
-
WithLengthOptions.args = {
|
|
31
|
-
currentItemsLength: 5,
|
|
32
|
-
totalItemsLength: 123,
|
|
33
|
-
onItemsLengthChange: (e: any) => { alert(`Selected length: ${e}`) },
|
|
34
|
-
itemsLengthOptions: [
|
|
35
|
-
{ label: `Mostrando 20`, value: 20 },
|
|
36
|
-
{ label: 'Mostrando 50', value: 50 },
|
|
37
|
-
{ label: 'Mostrando 100', value: 100 },
|
|
38
|
-
]
|
|
39
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { Select } from '../../Forms/Select'
|
|
4
|
-
|
|
5
|
-
const PaginationInfoComponent = ({
|
|
6
|
-
currentItemsLength,
|
|
7
|
-
totalItemsLength = 0,
|
|
8
|
-
itemsLengthOptions,
|
|
9
|
-
onItemsLengthChange,
|
|
10
|
-
}: PaginationInfoProps) => {
|
|
11
|
-
const handleChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
12
|
-
const selectedOption = event.currentTarget.value
|
|
13
|
-
onItemsLengthChange && onItemsLengthChange(selectedOption)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (!currentItemsLength && currentItemsLength !== 0) return null
|
|
17
|
-
|
|
18
|
-
const maxItemsLength = Math.max(currentItemsLength, totalItemsLength)
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div className="pagination-info hidden sm:flex">
|
|
22
|
-
<div className="flex items-center mr-5 text-inverted-2 tracking-4 text-f6">
|
|
23
|
-
{itemsLengthOptions ? (
|
|
24
|
-
<Select
|
|
25
|
-
id="selectItemsPerPage"
|
|
26
|
-
options={itemsLengthOptions}
|
|
27
|
-
withoutStyle
|
|
28
|
-
aria-label="Itens por página"
|
|
29
|
-
onChange={handleChange}
|
|
30
|
-
/>
|
|
31
|
-
) : (
|
|
32
|
-
<span>
|
|
33
|
-
Mostrando{' '}
|
|
34
|
-
<span className="pagination-info-current">
|
|
35
|
-
{currentItemsLength}
|
|
36
|
-
</span>
|
|
37
|
-
</span>
|
|
38
|
-
)}
|
|
39
|
-
de
|
|
40
|
-
<span className="pagination-info-total">{maxItemsLength}</span>
|
|
41
|
-
no total
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const PaginationInfo = PaginationInfoComponent
|
|
48
|
-
|
|
49
|
-
export interface PaginationInfoProps {
|
|
50
|
-
/**
|
|
51
|
-
* Current length of items at page
|
|
52
|
-
* */
|
|
53
|
-
currentItemsLength?: number
|
|
54
|
-
/**
|
|
55
|
-
* Total length of items available
|
|
56
|
-
* */
|
|
57
|
-
totalItemsLength?: number
|
|
58
|
-
/**
|
|
59
|
-
* Options of length available
|
|
60
|
-
* @deprecated Refactor required (Change to array of numbers and selectedLength)
|
|
61
|
-
* */
|
|
62
|
-
itemsLengthOptions?: {
|
|
63
|
-
label: string | number
|
|
64
|
-
value?: string | number | boolean
|
|
65
|
-
}[]
|
|
66
|
-
/**
|
|
67
|
-
* Function to run when items length is changed
|
|
68
|
-
* */
|
|
69
|
-
onItemsLengthChange?: (arg0: string | number) => any
|
|
70
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { Icon } from '../../Icons/Icon'
|
|
4
|
-
|
|
5
|
-
const PaginationNavComponent = ({
|
|
6
|
-
currentPage = 1,
|
|
7
|
-
totalPages = 1,
|
|
8
|
-
onPageChange,
|
|
9
|
-
}: PaginationNavProps) => {
|
|
10
|
-
const inputEl = useRef<HTMLSpanElement>(null)
|
|
11
|
-
const maxTotalPages = Math.max(currentPage, totalPages)
|
|
12
|
-
const hasNext = currentPage < totalPages
|
|
13
|
-
const hasPrev = currentPage > 1
|
|
14
|
-
|
|
15
|
-
const handleChange = (page: number) => {
|
|
16
|
-
page = page < 1 ? 1 : page > maxTotalPages ? maxTotalPages : page
|
|
17
|
-
onPageChange && onPageChange(page)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const onPreventDefault = (e: any) => {
|
|
21
|
-
e.preventDefault()
|
|
22
|
-
return false
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const handleKeyDown = (e: any) => {
|
|
26
|
-
if (e.which >= 35 && e.which <= 39) {
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
if (e.which === 46 || e.which === 8) {
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
if (e.which === 13) {
|
|
33
|
-
const currentValue = inputEl?.current?.innerText
|
|
34
|
-
if (currentValue) {
|
|
35
|
-
const page = parseInt(currentValue)
|
|
36
|
-
handleChange(page)
|
|
37
|
-
}
|
|
38
|
-
e.preventDefault()
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
if (isNaN(parseInt(String.fromCharCode(e.which)))) {
|
|
42
|
-
e.preventDefault()
|
|
43
|
-
}
|
|
44
|
-
return
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div className="pagination-nav flex items-center justify-between w-full sm:w-auto">
|
|
49
|
-
<div className="text-inverted-2 text-f6 tracking-4">
|
|
50
|
-
<span
|
|
51
|
-
id="btnPaginationActualPage"
|
|
52
|
-
className="pagination-nav-current inline-block w-9 bg-base-1 border border-card-stroke/50 rounded font-semibold leading-8 text-center text-primary"
|
|
53
|
-
ref={inputEl}
|
|
54
|
-
contentEditable={true}
|
|
55
|
-
suppressContentEditableWarning={true}
|
|
56
|
-
onKeyDown={handleKeyDown}
|
|
57
|
-
onCopy={onPreventDefault}
|
|
58
|
-
onCut={onPreventDefault}
|
|
59
|
-
onPaste={onPreventDefault}
|
|
60
|
-
>
|
|
61
|
-
{currentPage}
|
|
62
|
-
</span>{' '}
|
|
63
|
-
/{' '}
|
|
64
|
-
<button
|
|
65
|
-
type="button"
|
|
66
|
-
id="btnPaginationLastPage"
|
|
67
|
-
className="pagination-nav-total focus:outline-none"
|
|
68
|
-
onClick={() => {
|
|
69
|
-
if (currentPage !== maxTotalPages) handleChange(maxTotalPages)
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
{maxTotalPages}
|
|
73
|
-
</button>
|
|
74
|
-
</div>
|
|
75
|
-
<div className="text-inverted-2 ml-5 flex items-center">
|
|
76
|
-
<button
|
|
77
|
-
type="button"
|
|
78
|
-
id="btnPaginationPrev"
|
|
79
|
-
className={`pagination-nav-previous mr-3 duration-200 outline-none ${
|
|
80
|
-
hasPrev ? 'hover:text-inverted-1' : ''
|
|
81
|
-
}`}
|
|
82
|
-
aria-label="Ir para página anterior"
|
|
83
|
-
onClick={() => {
|
|
84
|
-
if (hasPrev) handleChange(currentPage - 1)
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
<Icon icon="arrowLeft" block size={4} />
|
|
88
|
-
</button>
|
|
89
|
-
<button
|
|
90
|
-
type="button"
|
|
91
|
-
id="btnPaginationNext"
|
|
92
|
-
className={`pagination-nav-next duration-200 outline-none ${
|
|
93
|
-
hasNext ? 'hover:text-inverted-1' : ''
|
|
94
|
-
}`}
|
|
95
|
-
aria-label="Ir para próxima página"
|
|
96
|
-
onClick={() => {
|
|
97
|
-
if (hasNext) handleChange(currentPage + 1)
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<Icon icon="arrowRight" block size={4} />
|
|
101
|
-
</button>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export const PaginationNav = PaginationNavComponent
|
|
108
|
-
|
|
109
|
-
export interface PaginationNavProps {
|
|
110
|
-
/** Define selected page.
|
|
111
|
-
* @default 1
|
|
112
|
-
* */
|
|
113
|
-
currentPage?: number
|
|
114
|
-
/** Define total count of pages.
|
|
115
|
-
* @default 1
|
|
116
|
-
* */
|
|
117
|
-
totalPages?: number
|
|
118
|
-
/**
|
|
119
|
-
* Function to run when page is changed.
|
|
120
|
-
* */
|
|
121
|
-
onPageChange?: (arg0: number) => any
|
|
122
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { PaginationInfo, PaginationInfoProps } from './PaginationInfo'
|
|
4
|
-
import { PaginationNav, PaginationNavProps } from './PaginationNav'
|
|
5
|
-
|
|
6
|
-
const PaginationComponent = ({
|
|
7
|
-
className = '',
|
|
8
|
-
currentPage = 1,
|
|
9
|
-
totalPages = 1,
|
|
10
|
-
onPageChange,
|
|
11
|
-
currentItemsLength,
|
|
12
|
-
totalItemsLength,
|
|
13
|
-
itemsLengthOptions,
|
|
14
|
-
onItemsLengthChange,
|
|
15
|
-
}: PaginationProps) => {
|
|
16
|
-
return (
|
|
17
|
-
<div
|
|
18
|
-
className={`pagination flex flex-wrap justify-end items-center leading-4 sm:justify-between ${className}`}
|
|
19
|
-
>
|
|
20
|
-
<PaginationInfo
|
|
21
|
-
currentItemsLength={currentItemsLength}
|
|
22
|
-
totalItemsLength={totalItemsLength}
|
|
23
|
-
itemsLengthOptions={itemsLengthOptions}
|
|
24
|
-
onItemsLengthChange={onItemsLengthChange}
|
|
25
|
-
/>
|
|
26
|
-
<PaginationNav
|
|
27
|
-
currentPage={currentPage}
|
|
28
|
-
totalPages={totalPages}
|
|
29
|
-
onPageChange={onPageChange}
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const Pagination = React.memo(PaginationComponent)
|
|
36
|
-
|
|
37
|
-
export interface PaginationProps
|
|
38
|
-
extends PaginationInfoProps,
|
|
39
|
-
PaginationNavProps {
|
|
40
|
-
/**
|
|
41
|
-
* Custom class name
|
|
42
|
-
* */
|
|
43
|
-
className?: string
|
|
44
|
-
}
|
|
@@ -1,68 +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 "./Stepper.stories"
|
|
5
|
-
|
|
6
|
-
const { Default, NoText, WithText, HandleClick, CustomStepClassName } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('Stepper tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Default />)
|
|
13
|
-
cy.get('#stepsContainer').within(() => {
|
|
14
|
-
cy.get('#stepCircle1').should('have.class', 'bg-primary').contains('1')
|
|
15
|
-
cy.get('#stepCircle2').should('have.class', 'bg-inverted-1').contains('2')
|
|
16
|
-
cy.get('#stepCircle3').should('have.class', 'bg-base-4').contains('3')
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
it('NoText', () => {
|
|
21
|
-
mount(<NoText />)
|
|
22
|
-
cy.get('#stepsContainer').within(() => {
|
|
23
|
-
cy.get('#stepCircle1').should('have.class', 'bg-primary').contains('1')
|
|
24
|
-
cy.get('#rightLinkStep1').should('have.class', 'absolute').and('have.class', '-right-5').and('have.class', 'bg-primary')
|
|
25
|
-
cy.get('#stepCircle2').should('have.class', 'bg-inverted-1').contains('2')
|
|
26
|
-
cy.get('#leftLinkStep2').should('have.class', 'absolute').and('have.class', '-left-5').and('have.class', 'bg-primary')
|
|
27
|
-
cy.get('#rightLinkStep2').should('have.class', 'absolute').and('have.class', '-right-5').and('have.class', 'bg-base-4')
|
|
28
|
-
cy.get('#stepCircle3').should('have.class', 'bg-base-4').contains('3')
|
|
29
|
-
cy.get('#leftLinkStep3').should('have.class', 'absolute').and('have.class', '-left-5').and('have.class', 'bg-base-4')
|
|
30
|
-
})
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
it('WithText', () => {
|
|
34
|
-
mount(<WithText />)
|
|
35
|
-
cy.get('#stepsContainer').within(() => {
|
|
36
|
-
cy.get('#stepCircle1').should('have.class', 'bg-primary').contains('1')
|
|
37
|
-
cy.get('#step1 span').should('have.class', 'text-center').contains('Step 1')
|
|
38
|
-
cy.get('#rightLinkStep1').should('not.exist')
|
|
39
|
-
cy.get('#step2 span').should('have.class', 'text-center').contains('Step 2')
|
|
40
|
-
cy.get('#leftLinkStep2').should('not.exist')
|
|
41
|
-
cy.get('#rightLinkStep2').should('not.exist')
|
|
42
|
-
cy.get('#step3 span').should('have.class', 'text-center').contains('Step 3')
|
|
43
|
-
cy.get('#leftLinkStep3').should('not.exist')
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
it('HandleClick', () => {
|
|
48
|
-
mount(<HandleClick />)
|
|
49
|
-
cy.get('#stepsContainer').within(() => {
|
|
50
|
-
cy.get('#stepCircle1').should('have.class', 'bg-primary').contains('1')
|
|
51
|
-
cy.get('#stepCircle1').should(() => {alert(`Clicked on step 1!`)})
|
|
52
|
-
cy.get('#stepCircle2').should('have.class', 'bg-inverted-1').contains('2')
|
|
53
|
-
cy.get('#stepCircle2').should(() => {alert(`Clicked on step 2!`)})
|
|
54
|
-
cy.get('#stepCircle3').should('have.class', 'bg-base-4').contains('3')
|
|
55
|
-
cy.get('#stepCircle3').should(() => {alert(`Clicked on step 3!`)})
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('CustomStepClassName', () => {
|
|
60
|
-
mount(<CustomStepClassName />)
|
|
61
|
-
cy.get('#stepsContainer').within(() => {
|
|
62
|
-
cy.get('#stepCircle1').should('have.class', '!bg-primary-light').and('have.class', '!border-primary').and('have.class', '!text-primary').contains('1')
|
|
63
|
-
cy.get('#stepCircle2').should('have.class', '!bg-warning-light').and('have.class', '!border-warning').and('have.class', '!text-warning').contains('2')
|
|
64
|
-
cy.get('#stepCircle3').should('have.class', '!bg-danger-light').and('have.class', '!border-danger').and('have.class', '!text-danger').contains('3')
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
})
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Stepper, StepperProps } from '.'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Navigation/Stepper',
|
|
8
|
-
component: Stepper,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'padded',
|
|
11
|
-
}
|
|
12
|
-
} as Meta
|
|
13
|
-
|
|
14
|
-
const Template: Story<StepperProps> = args => <Stepper {...args} />
|
|
15
|
-
|
|
16
|
-
export const Default = Template.bind({})
|
|
17
|
-
Default.args = {
|
|
18
|
-
steps: [
|
|
19
|
-
{step: 1, text: 'Step 1'},
|
|
20
|
-
{step: 2, text: 'Step 2'},
|
|
21
|
-
{step: 3, text: 'Step 3'}
|
|
22
|
-
],
|
|
23
|
-
currentStep: 2
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const NoText = Template.bind({})
|
|
27
|
-
NoText.args = {
|
|
28
|
-
steps: [
|
|
29
|
-
{step: 1, text: 'Step 1'},
|
|
30
|
-
{step: 2, text: 'Step 2'},
|
|
31
|
-
{step: 3, text: 'Step 3'}
|
|
32
|
-
],
|
|
33
|
-
currentStep: 2,
|
|
34
|
-
showText: false
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const WithText = Template.bind({})
|
|
38
|
-
WithText.args = {
|
|
39
|
-
steps: [
|
|
40
|
-
{step: 1, text: 'Step 1'},
|
|
41
|
-
{step: 2, text: 'Step 2'},
|
|
42
|
-
{step: 3, text: 'Step 3'}
|
|
43
|
-
],
|
|
44
|
-
currentStep: 2,
|
|
45
|
-
showText: true
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const HandleClick = Template.bind({})
|
|
49
|
-
HandleClick.args = {
|
|
50
|
-
steps: [
|
|
51
|
-
{step: 1, text: 'Step 1', handleClick: () => alert(`Clicked on step 1!`)},
|
|
52
|
-
{step: 2, text: 'Step 2', handleClick: () => alert(`Clicked on step 2!`)},
|
|
53
|
-
{step: 3, text: 'Step 3', handleClick: () => alert(`Clicked on step 3!`)}
|
|
54
|
-
],
|
|
55
|
-
currentStep: 2,
|
|
56
|
-
showText: false,
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export const CustomStepClassName = Template.bind({})
|
|
60
|
-
CustomStepClassName.args = {
|
|
61
|
-
steps: [
|
|
62
|
-
{step: 1, text: 'Step 1', customClassName: '!text-primary !bg-primary-light !border-primary'},
|
|
63
|
-
{step: 2, text: 'Step 2', customClassName: '!text-warning !bg-warning-light !border-warning'},
|
|
64
|
-
{step: 3, text: 'Step 3', customClassName: '!text-danger !bg-danger-light !border-danger'}
|
|
65
|
-
],
|
|
66
|
-
currentStep: 2,
|
|
67
|
-
showText: false
|
|
68
|
-
}
|