@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,165 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
import { withDesign } from 'storybook-addon-designs'
|
|
4
|
-
|
|
5
|
-
import { Box, BoxProps } from './Box'
|
|
6
|
-
import { BoxHeaderProps } from './Components/Header/BoxHeader'
|
|
7
|
-
import { BoxContentProps } from './Components/Content/BoxContent'
|
|
8
|
-
|
|
9
|
-
import { Status, StatusProps } from '../../Indicators/Status'
|
|
10
|
-
import { Tabs, TabsProps } from '../../Components/Tabs'
|
|
11
|
-
|
|
12
|
-
const BoxHeaderArgs: BoxHeaderProps = {
|
|
13
|
-
title: 'Box Title',
|
|
14
|
-
subtitle: 'Box SubTitle',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const BoxContentArgs: BoxContentProps = {
|
|
18
|
-
children: 'Box Content'
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const TabsArgs: TabsProps = {
|
|
22
|
-
activeItem: 'item1',
|
|
23
|
-
onChange: (id) => console.log('ID:', id),
|
|
24
|
-
items: [
|
|
25
|
-
{
|
|
26
|
-
id: 'item1',
|
|
27
|
-
title: 'Item1',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'item2',
|
|
31
|
-
title: 'Item2',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'item3',
|
|
35
|
-
title: 'Item3',
|
|
36
|
-
},
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const ActionArgs: StatusProps = {
|
|
41
|
-
type: 'success',
|
|
42
|
-
description: 'Some status',
|
|
43
|
-
inverted: true,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
title: 'Layout/Box',
|
|
48
|
-
component: Box,
|
|
49
|
-
decorators: [withDesign],
|
|
50
|
-
parameters: {
|
|
51
|
-
layout: 'padded',
|
|
52
|
-
design: {
|
|
53
|
-
type: 'figma',
|
|
54
|
-
url: 'https://www.figma.com/file/Z2WDD4SH8zwaJC2K5wbtMO/Sistema-Integrado?node-id=95%3A9525',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
argTypes: {
|
|
58
|
-
children: {
|
|
59
|
-
control: false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
args: {
|
|
63
|
-
BoxContent: BoxContentArgs,
|
|
64
|
-
},
|
|
65
|
-
} as Meta
|
|
66
|
-
|
|
67
|
-
interface BoxFullProps extends BoxProps {
|
|
68
|
-
BoxHeader: BoxHeaderProps
|
|
69
|
-
BoxContent: BoxContentProps
|
|
70
|
-
Tabs: TabsProps
|
|
71
|
-
Action: StatusProps
|
|
72
|
-
showTitle: boolean
|
|
73
|
-
showTabs: boolean
|
|
74
|
-
showActions: boolean
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const Template: Story<BoxFullProps> = ({
|
|
78
|
-
showTitle,
|
|
79
|
-
showTabs,
|
|
80
|
-
showActions,
|
|
81
|
-
BoxHeader,
|
|
82
|
-
BoxContent,
|
|
83
|
-
Action: ActionArgs,
|
|
84
|
-
Tabs: TabsArgs,
|
|
85
|
-
...args
|
|
86
|
-
}) => {
|
|
87
|
-
const titleProps = showTitle ? BoxHeader : {}
|
|
88
|
-
return (
|
|
89
|
-
<Box {...args}>
|
|
90
|
-
<>
|
|
91
|
-
{(showTitle || showTabs || showActions) && (
|
|
92
|
-
<Box.Header {...titleProps} Tabs={showTabs && <Tabs {...TabsArgs} /> || undefined}>
|
|
93
|
-
{showActions && <Status {...ActionArgs} />}
|
|
94
|
-
</Box.Header>
|
|
95
|
-
)}
|
|
96
|
-
<Box.Content {...BoxContent} />
|
|
97
|
-
</>
|
|
98
|
-
</Box>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export const Default = Template.bind({})
|
|
103
|
-
Default.args = {
|
|
104
|
-
BoxHeader: BoxHeaderArgs,
|
|
105
|
-
Action: ActionArgs,
|
|
106
|
-
Tabs: TabsArgs,
|
|
107
|
-
showTitle: true,
|
|
108
|
-
showTabs: true,
|
|
109
|
-
showActions: true,
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const TemplateWithAction: Story<BoxFullProps> = ({ BoxHeader, BoxContent, Action: ActionArgs, ...args }) => (
|
|
113
|
-
<Box {...args}>
|
|
114
|
-
<Box.Header {...BoxHeader}>
|
|
115
|
-
<Status {...ActionArgs} />
|
|
116
|
-
</Box.Header>
|
|
117
|
-
<Box.Content {...BoxContent} />
|
|
118
|
-
</Box>
|
|
119
|
-
)
|
|
120
|
-
export const WithAction = TemplateWithAction.bind({})
|
|
121
|
-
WithAction.args = {
|
|
122
|
-
BoxHeader: BoxHeaderArgs,
|
|
123
|
-
Action: ActionArgs,
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const TemplateWithToggle: Story<BoxFullProps> = ({
|
|
127
|
-
BoxHeader,
|
|
128
|
-
BoxContent,
|
|
129
|
-
...args
|
|
130
|
-
}) => (
|
|
131
|
-
<Box {...args}>
|
|
132
|
-
<Box.Header {...BoxHeader} />
|
|
133
|
-
<Box.Content {...BoxContent} />
|
|
134
|
-
</Box>
|
|
135
|
-
)
|
|
136
|
-
export const WithToggle = TemplateWithToggle.bind({})
|
|
137
|
-
WithToggle.args = {
|
|
138
|
-
isToggle: true,
|
|
139
|
-
BoxHeader: {
|
|
140
|
-
...BoxHeaderArgs,
|
|
141
|
-
},
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const TemplateWithTabs: Story<BoxFullProps> = ({ BoxHeader, BoxContent, Tabs: TabsArgs, ...args }) => (
|
|
145
|
-
<Box {...args}>
|
|
146
|
-
<Box.Header {...BoxHeader} Tabs={<Tabs {...TabsArgs} />} />
|
|
147
|
-
<Box.Content {...BoxContent} />
|
|
148
|
-
</Box>
|
|
149
|
-
)
|
|
150
|
-
export const WithTabs = TemplateWithTabs.bind({})
|
|
151
|
-
WithTabs.args = {
|
|
152
|
-
BoxHeader: BoxHeaderArgs,
|
|
153
|
-
Tabs: TabsArgs,
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const TemplateOnlyTabs: Story<BoxFullProps> = ({ BoxContent, Tabs: TabsArgs, ...args }) => (
|
|
157
|
-
<Box {...args}>
|
|
158
|
-
<Box.Header Tabs={<Tabs {...TabsArgs} />} />
|
|
159
|
-
<Box.Content {...BoxContent} />
|
|
160
|
-
</Box>
|
|
161
|
-
)
|
|
162
|
-
export const OnlyTabs = TemplateOnlyTabs.bind({})
|
|
163
|
-
OnlyTabs.args = {
|
|
164
|
-
Tabs: TabsArgs,
|
|
165
|
-
}
|
package/src/Layout/Box/Box.tsx
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { BoxHeader, BoxHeaderProps } from './Components/Header/BoxHeader'
|
|
4
|
-
import { BoxContent, BoxContentProps } from './Components/Content/BoxContent'
|
|
5
|
-
import { BoxSeparator } from './Components/Separator/BoxSeparator'
|
|
6
|
-
import { SharedContext, SharedContextProps, Observer } from './Components/utils'
|
|
7
|
-
|
|
8
|
-
export class Box extends React.PureComponent<BoxProps, BoxState> {
|
|
9
|
-
static Header = (props: BoxHeaderProps) => {
|
|
10
|
-
return <BoxHeader {...props} />
|
|
11
|
-
}
|
|
12
|
-
static Content = (props: BoxContentProps) => {
|
|
13
|
-
return <BoxContent {...props} />
|
|
14
|
-
}
|
|
15
|
-
static Separator = () => {
|
|
16
|
-
return <BoxSeparator />
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
state: BoxState = {
|
|
20
|
-
isOpen: this.props.isOpen ?? true,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
render() {
|
|
24
|
-
const {
|
|
25
|
-
children,
|
|
26
|
-
className = '',
|
|
27
|
-
variant = 'default',
|
|
28
|
-
isToggle = false,
|
|
29
|
-
id,
|
|
30
|
-
} = this.props
|
|
31
|
-
const toggleContent = (value?: boolean) =>
|
|
32
|
-
this.setState({ isOpen: value ?? !this.state.isOpen })
|
|
33
|
-
const { isOpen } = this.state
|
|
34
|
-
const sharedProps = {
|
|
35
|
-
variant,
|
|
36
|
-
isOpen,
|
|
37
|
-
toggleContent,
|
|
38
|
-
isToggle,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<SharedContext.Provider value={sharedProps}>
|
|
43
|
-
<Observer value={this.props.isOpen ?? true} didUpdate={toggleContent} />
|
|
44
|
-
<div
|
|
45
|
-
className={`box w-full flex flex-col bg-base-1 border border-card-stroke rounded ${className}`}
|
|
46
|
-
data-opened={isOpen}
|
|
47
|
-
id={id}
|
|
48
|
-
>
|
|
49
|
-
{children}
|
|
50
|
-
</div>
|
|
51
|
-
</SharedContext.Provider>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface BoxProps extends Partial<SharedContextProps> {
|
|
57
|
-
/**
|
|
58
|
-
* Custom class name
|
|
59
|
-
* */
|
|
60
|
-
className?: string
|
|
61
|
-
/**
|
|
62
|
-
* Box ID
|
|
63
|
-
* */
|
|
64
|
-
id?: string
|
|
65
|
-
/**
|
|
66
|
-
* Box Header and Content
|
|
67
|
-
*/
|
|
68
|
-
children?:
|
|
69
|
-
| React.ReactElement<BoxContentProps>
|
|
70
|
-
| Array<React.ReactElement<BoxContentProps>>
|
|
71
|
-
| React.ReactElement<BoxHeaderProps>
|
|
72
|
-
| Array<React.ReactElement<BoxHeaderProps>>
|
|
73
|
-
/**
|
|
74
|
-
* Box show content
|
|
75
|
-
* */
|
|
76
|
-
isOpen?: boolean
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface BoxState {
|
|
80
|
-
isOpen: boolean
|
|
81
|
-
}
|
|
@@ -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 "./BoxContent.stories"
|
|
5
|
-
|
|
6
|
-
const { Content } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('BoxContent tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Content />)
|
|
13
|
-
cy.get('.box')
|
|
14
|
-
.should('have.length', 1)
|
|
15
|
-
.within(() => {
|
|
16
|
-
cy.get('.box-content').contains('Box Content')
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
})
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Box } from '../../Box'
|
|
5
|
-
import { BoxContentProps } from './BoxContent'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Layout/Box/Content',
|
|
9
|
-
component: Box.Content,
|
|
10
|
-
args: {
|
|
11
|
-
children: 'Box Content'
|
|
12
|
-
}
|
|
13
|
-
} as Meta
|
|
14
|
-
|
|
15
|
-
const Template: Story<BoxContentProps> = ({ children, ...args }) => (
|
|
16
|
-
<Box>
|
|
17
|
-
<Box.Content {...args}>
|
|
18
|
-
{children}
|
|
19
|
-
</Box.Content>
|
|
20
|
-
</Box>
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
export const Content = Template.bind({})
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
|
|
3
|
-
import { SharedContext, defaultPaddingVariantsContent } from '../utils'
|
|
4
|
-
|
|
5
|
-
export const BoxContent = React.memo(({ children }: BoxContentProps) => {
|
|
6
|
-
const sharedProps = useContext(SharedContext)
|
|
7
|
-
const { variant, isOpen } = sharedProps
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
className={`box-content ${defaultPaddingVariantsContent[variant]} ${
|
|
12
|
-
!isOpen ? 'hidden' : ''
|
|
13
|
-
}`}
|
|
14
|
-
>
|
|
15
|
-
{children}
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
export interface BoxContentProps {
|
|
21
|
-
/**
|
|
22
|
-
* React children
|
|
23
|
-
* Also support render prop
|
|
24
|
-
*/
|
|
25
|
-
children?: React.ReactNode | ((props: BoxContentProps) => React.ReactNode)
|
|
26
|
-
}
|
|
@@ -1,22 +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 "./BoxHeader.stories"
|
|
5
|
-
|
|
6
|
-
const { Header } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('BoxHeader tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Header />)
|
|
13
|
-
cy.get('.box .box-header')
|
|
14
|
-
.should('have.length', 1)
|
|
15
|
-
.within(() => {
|
|
16
|
-
cy.get('.box-header-title').should('exist')
|
|
17
|
-
cy.get('h3').contains('Box Title')
|
|
18
|
-
cy.get('h4').contains('Box SubTitle')
|
|
19
|
-
})
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
})
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Box, BoxProps } from '../../Box'
|
|
5
|
-
import { BoxHeaderProps } from './BoxHeader'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Layout/Box/Header',
|
|
9
|
-
component: Box.Header,
|
|
10
|
-
argTypes: {
|
|
11
|
-
Tabs: {
|
|
12
|
-
control: false
|
|
13
|
-
},
|
|
14
|
-
children: {
|
|
15
|
-
control: false
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
args: {
|
|
19
|
-
title: 'Box Title',
|
|
20
|
-
subtitle: 'Box SubTitle',
|
|
21
|
-
},
|
|
22
|
-
} as Meta
|
|
23
|
-
|
|
24
|
-
interface BoxHeaderPropsWithVariant extends BoxHeaderProps, Pick<BoxProps, 'variant'> {}
|
|
25
|
-
|
|
26
|
-
const Template: Story<BoxHeaderPropsWithVariant> = (args) => (
|
|
27
|
-
<Box>
|
|
28
|
-
<Box.Header {...args} />
|
|
29
|
-
</Box>
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
export const Header = Template.bind({})
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
|
|
3
|
-
import { TabsProps } from '../../../../Components/Tabs'
|
|
4
|
-
import { SharedContext, defaultPaddingVariantsHeader } from '../utils'
|
|
5
|
-
import { Icon } from '../../../../Icons'
|
|
6
|
-
|
|
7
|
-
export const BoxHeader = React.memo(
|
|
8
|
-
({ children, title, subtitle, Tabs }: BoxHeaderProps) => {
|
|
9
|
-
const sharedProps = useContext(SharedContext)
|
|
10
|
-
const { variant, isOpen, toggleContent, isToggle } = sharedProps
|
|
11
|
-
|
|
12
|
-
const hasTitle = !!(title || subtitle || children)
|
|
13
|
-
const hasTabs = !!Tabs
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<>
|
|
17
|
-
<div
|
|
18
|
-
className={`box-header ${isToggle ? 'cursor-pointer group' : ''} ${
|
|
19
|
-
defaultPaddingVariantsHeader[variant]
|
|
20
|
-
} ${hasTabs && isOpen ? '!pb-0' : ''} ${!hasTitle ? '!pt-0' : ''} ${
|
|
21
|
-
isOpen && !hasTabs ? 'border-b border-card-stroke' : ''
|
|
22
|
-
}`}
|
|
23
|
-
onClick={() => (isToggle ? toggleContent() : undefined)}
|
|
24
|
-
>
|
|
25
|
-
{hasTitle && (
|
|
26
|
-
<div
|
|
27
|
-
className={`box-header-title flex justify-between items-center ${
|
|
28
|
-
!subtitle ? 'py-1' : ''
|
|
29
|
-
}`}
|
|
30
|
-
>
|
|
31
|
-
<div className="flex-1 min-w-0 mr-2">
|
|
32
|
-
{title && (
|
|
33
|
-
<h3
|
|
34
|
-
className={`tracking-3 text-base font-semibold break-words`}
|
|
35
|
-
>
|
|
36
|
-
{title}
|
|
37
|
-
</h3>
|
|
38
|
-
)}
|
|
39
|
-
{subtitle && (
|
|
40
|
-
<h4 className="tracking-4 text-sm text-on-base-2 leading-6 break-words">
|
|
41
|
-
{subtitle}
|
|
42
|
-
</h4>
|
|
43
|
-
)}
|
|
44
|
-
</div>
|
|
45
|
-
<div className="flex items-center">
|
|
46
|
-
{children}
|
|
47
|
-
{isToggle && (
|
|
48
|
-
<button type="button" className="box-toggle ml-2">
|
|
49
|
-
<Icon
|
|
50
|
-
icon="angleLeft"
|
|
51
|
-
className={`text-on-base-2 hover:text-on-base group-hover:text-on-base transition-all origin-center ${
|
|
52
|
-
isOpen ? 'rotate-90' : '-rotate-90'
|
|
53
|
-
}`}
|
|
54
|
-
/>
|
|
55
|
-
</button>
|
|
56
|
-
)}
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
)}
|
|
60
|
-
</div>
|
|
61
|
-
{hasTabs && (
|
|
62
|
-
<div
|
|
63
|
-
className={`${
|
|
64
|
-
defaultPaddingVariantsHeader[variant]
|
|
65
|
-
} !py-0 border-b border-card-stroke ${!isOpen ? 'hidden' : ''}`}
|
|
66
|
-
>
|
|
67
|
-
<div className={`-mb-px ${hasTitle ? 'mt-3' : ''}`}>{Tabs}</div>
|
|
68
|
-
</div>
|
|
69
|
-
)}
|
|
70
|
-
</>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
export interface BoxHeaderProps {
|
|
76
|
-
/**
|
|
77
|
-
* Title of the Box
|
|
78
|
-
*/
|
|
79
|
-
title?: string | React.ReactNode
|
|
80
|
-
/**
|
|
81
|
-
* Subtitle of the Box
|
|
82
|
-
*/
|
|
83
|
-
subtitle?: string | React.ReactNode
|
|
84
|
-
/**
|
|
85
|
-
* React children, use to render actions in Header
|
|
86
|
-
* Also support render prop
|
|
87
|
-
*/
|
|
88
|
-
children?: React.ReactNode | ((props: BoxHeaderProps) => React.ReactNode)
|
|
89
|
-
/**
|
|
90
|
-
* Use only with "<Tabs />" component
|
|
91
|
-
*/
|
|
92
|
-
Tabs?: React.ReactElement<TabsProps>
|
|
93
|
-
}
|
|
@@ -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 "./BoxSeparator.stories"
|
|
5
|
-
|
|
6
|
-
const { Separator } = composeStories(stories)
|
|
7
|
-
|
|
8
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
9
|
-
describe(specTitle('BoxSeparator tests'), () => {
|
|
10
|
-
|
|
11
|
-
it('Default', () => {
|
|
12
|
-
mount(<Separator />)
|
|
13
|
-
cy.get('.box')
|
|
14
|
-
.should('have.length', 1)
|
|
15
|
-
.within(() => {
|
|
16
|
-
cy.get('.box-content hr.box-content-separator').should('exist')
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
})
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Box, BoxProps } from '../../Box'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout/Box/Separator',
|
|
8
|
-
component: Box.Separator,
|
|
9
|
-
argTypes: {
|
|
10
|
-
variant: {
|
|
11
|
-
options: ['default', 'small'],
|
|
12
|
-
control: { type: 'radio' }
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
variant: 'default',
|
|
17
|
-
}
|
|
18
|
-
} as Meta
|
|
19
|
-
|
|
20
|
-
const Template: Story<Pick<BoxProps, 'variant'>> = (args) => (
|
|
21
|
-
<Box {...args}>
|
|
22
|
-
<Box.Content>
|
|
23
|
-
Some content 1
|
|
24
|
-
<Box.Separator />
|
|
25
|
-
Some content 2
|
|
26
|
-
</Box.Content>
|
|
27
|
-
</Box>
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
export const Separator = Template.bind({})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
|
|
3
|
-
import { SharedContext } from '../utils'
|
|
4
|
-
|
|
5
|
-
const listOfMarginVariants = {
|
|
6
|
-
default: `my-6 -mx-6 lg:my-10 lg:-mx-10`,
|
|
7
|
-
small: `my-6 -mx-6`,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const BoxSeparator = () => {
|
|
11
|
-
const sharedProps = useContext(SharedContext)
|
|
12
|
-
const { variant } = sharedProps
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<hr
|
|
16
|
-
className={`box-content-separator border-card-stroke ${listOfMarginVariants[variant]}`}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export interface SharedContextProps {
|
|
4
|
-
/** Variant type
|
|
5
|
-
* @default 'default'
|
|
6
|
-
* */
|
|
7
|
-
variant: 'default' | 'small'
|
|
8
|
-
/** Define is box content has visible by default
|
|
9
|
-
* @default true
|
|
10
|
-
* */
|
|
11
|
-
isOpen: boolean
|
|
12
|
-
/** Show toggle icon
|
|
13
|
-
* @default false
|
|
14
|
-
* */
|
|
15
|
-
isToggle: boolean
|
|
16
|
-
/**
|
|
17
|
-
* Expand/collapse box content
|
|
18
|
-
* */
|
|
19
|
-
toggleContent(value?: boolean): void
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const SharedContext = React.createContext<SharedContextProps>({
|
|
23
|
-
variant: 'default',
|
|
24
|
-
isOpen: true,
|
|
25
|
-
isToggle: false,
|
|
26
|
-
toggleContent: (value?: boolean) => value,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
export const defaultPaddingVariantsHeader = {
|
|
30
|
-
default: `px-6 py-4 lg:px-10 lg:py-5`,
|
|
31
|
-
small: `px-6 py-4`,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const defaultPaddingVariantsContent = {
|
|
35
|
-
default: `p-6 lg:p-10`,
|
|
36
|
-
small: `p-6`,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const Observer = ({
|
|
40
|
-
value,
|
|
41
|
-
didUpdate,
|
|
42
|
-
}: {
|
|
43
|
-
value: any
|
|
44
|
-
didUpdate: Function
|
|
45
|
-
}) => {
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
didUpdate(value)
|
|
48
|
-
}, [value])
|
|
49
|
-
return null
|
|
50
|
-
}
|
package/src/Layout/Box/index.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Box'
|
|
@@ -1,22 +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 './Container.stories'
|
|
5
|
-
|
|
6
|
-
import { CONTAINER_MAX_SIZE } from '../constants'
|
|
7
|
-
|
|
8
|
-
const { Default, Expanded } = composeStories(stories)
|
|
9
|
-
|
|
10
|
-
const specTitle = require('cypress-sonarqube-reporter/specTitle');
|
|
11
|
-
describe(specTitle('Container tests'), () => {
|
|
12
|
-
it('Default', () => {
|
|
13
|
-
mount(<Default />)
|
|
14
|
-
cy.get('.page-container').should('have.class', CONTAINER_MAX_SIZE.default)
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
it('Expanded', () => {
|
|
18
|
-
mount(<Expanded />)
|
|
19
|
-
cy.get('.page-container').should('have.class', CONTAINER_MAX_SIZE.expanded)
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Story, Meta } from '@storybook/react'
|
|
3
|
-
|
|
4
|
-
import { Container, ContainerProps } from '.'
|
|
5
|
-
import { ActionBar, Box } from '..'
|
|
6
|
-
import { Breadcrumb, Button } from '../..'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Layout/Container',
|
|
10
|
-
component: Container,
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: 'fullscreen',
|
|
13
|
-
},
|
|
14
|
-
} as Meta
|
|
15
|
-
|
|
16
|
-
const Template: Story<ContainerProps> = (args) => (
|
|
17
|
-
<div className="bg-base-2 w-full min-h-screen p-px">
|
|
18
|
-
<Container {...args}>
|
|
19
|
-
<Container.Header>
|
|
20
|
-
<Breadcrumb
|
|
21
|
-
currentTitle="Page"
|
|
22
|
-
previousTitle="Previous page"
|
|
23
|
-
/>
|
|
24
|
-
</Container.Header>
|
|
25
|
-
<Box>
|
|
26
|
-
<Box.Header title="Container test" />
|
|
27
|
-
<Box.Content>
|
|
28
|
-
<p className="h-64">Container test</p>
|
|
29
|
-
</Box.Content>
|
|
30
|
-
</Box>
|
|
31
|
-
</Container>
|
|
32
|
-
|
|
33
|
-
<ActionBar>
|
|
34
|
-
<Button variant="tertiary" icon="timesCircle" onClick={() => {}}>
|
|
35
|
-
Cancelar
|
|
36
|
-
</Button>
|
|
37
|
-
<Button variant="primary" icon="checkCircle" onClick={() => {}}>
|
|
38
|
-
<span className="hidden lg:block">Salvar alterações</span>
|
|
39
|
-
<span className="block lg:hidden">Salvar</span>
|
|
40
|
-
</Button>
|
|
41
|
-
</ActionBar>
|
|
42
|
-
</div>
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
export const Default = Template.bind({})
|
|
46
|
-
Default.args = {}
|
|
47
|
-
|
|
48
|
-
export const Expanded = Template.bind({})
|
|
49
|
-
Expanded.args = {
|
|
50
|
-
expanded: true,
|
|
51
|
-
}
|