@broxus/react-uikit 0.3.0 → 0.4.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/dist/cjs/components/Accordion/Accordion.d.ts +2 -2
- package/dist/cjs/components/Accordion/Accordion.js +6 -6
- package/dist/cjs/components/Accordion/Item.d.ts +2 -2
- package/dist/cjs/components/Accordion/Item.js +1 -1
- package/dist/cjs/components/Accordion/index.d.ts +1 -1
- package/dist/cjs/components/Accordion/index.scss +12 -5
- package/dist/cjs/components/Alert/index.d.ts +1 -1
- package/dist/cjs/components/Alert/index.js +3 -3
- package/dist/cjs/components/Align/Align.d.ts +1 -1
- package/dist/cjs/components/Align/Align.js +5 -5
- package/dist/cjs/components/Align/Left.d.ts +1 -1
- package/dist/cjs/components/Align/Right.d.ts +1 -1
- package/dist/cjs/components/Article/Article.d.ts +1 -1
- package/dist/cjs/components/Article/Article.js +3 -3
- package/dist/cjs/components/Article/Meta.d.ts +1 -1
- package/dist/cjs/components/Article/Meta.js +3 -3
- package/dist/cjs/components/Article/Title.d.ts +1 -1
- package/dist/cjs/components/Article/Title.js +3 -3
- package/dist/cjs/components/Badge/index.d.ts +1 -1
- package/dist/cjs/components/Badge/index.js +3 -3
- package/dist/cjs/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/cjs/components/Breadcrumb/Breadcrumb.js +3 -3
- package/dist/cjs/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/cjs/components/Breadcrumb/Item.js +3 -3
- package/dist/cjs/components/Button/Button.d.ts +4 -2
- package/dist/cjs/components/Button/Button.js +7 -5
- package/dist/cjs/components/Button/Group.d.ts +1 -1
- package/dist/cjs/components/Button/Group.js +3 -3
- package/dist/cjs/components/Card/Badge.d.ts +1 -1
- package/dist/cjs/components/Card/Badge.js +4 -4
- package/dist/cjs/components/Card/Body.d.ts +5 -3
- package/dist/cjs/components/Card/Body.js +7 -5
- package/dist/cjs/components/Card/Card.d.ts +4 -4
- package/dist/cjs/components/Card/Card.js +4 -4
- package/dist/cjs/components/Card/Footer.d.ts +1 -1
- package/dist/cjs/components/Card/Footer.js +5 -5
- package/dist/cjs/components/Card/Header.d.ts +1 -1
- package/dist/cjs/components/Card/Header.js +5 -5
- package/dist/cjs/components/Card/Media.d.ts +5 -3
- package/dist/cjs/components/Card/Media.js +7 -5
- package/dist/cjs/components/Card/Title.d.ts +1 -1
- package/dist/cjs/components/Card/Title.js +5 -5
- package/dist/cjs/components/Close/index.d.ts +2 -1
- package/dist/cjs/components/Close/index.js +4 -3
- package/dist/cjs/components/ComponentProvider/index.js +2 -2
- package/dist/cjs/components/{ConfrigProvider → ConfigProvider}/index.js +10 -10
- package/dist/cjs/components/Container/index.d.ts +2 -1
- package/dist/cjs/components/Container/index.js +5 -4
- package/dist/cjs/components/Container/index.scss +1 -1
- package/dist/cjs/components/Control/Checkbox/Checkbox.js +3 -3
- package/dist/cjs/components/Control/Checkbox/Group.js +3 -3
- package/dist/cjs/components/Control/Checkbox/index.scss +4 -0
- package/dist/cjs/components/Control/Input/Input.js +4 -4
- package/dist/cjs/components/Control/Input/Number/index.js +3 -3
- package/dist/cjs/components/Control/Input/Password/index.js +3 -3
- package/dist/cjs/components/Control/Input/Password/index.scss +19 -16
- package/dist/cjs/components/Control/Input/types.d.ts +2 -2
- package/dist/cjs/components/Control/Input/useInput.d.ts +1 -1
- package/dist/cjs/components/Control/Input/useInput.js +8 -7
- package/dist/cjs/components/Control/Radio/Group.js +3 -3
- package/dist/cjs/components/Control/Radio/Radio.js +3 -3
- package/dist/cjs/components/Control/Select/index.d.ts +1 -1
- package/dist/cjs/components/Control/Select/index.js +3 -3
- package/dist/cjs/components/Control/TextArea/index.d.ts +1 -1
- package/dist/cjs/components/Control/TextArea/index.js +6 -6
- package/dist/cjs/components/Control/TextArea/index.scss +6 -6
- package/dist/cjs/components/Control/index.scss +5 -20
- package/dist/cjs/components/Control/types.d.ts +2 -4
- package/dist/cjs/components/Cover/index.d.ts +1 -1
- package/dist/cjs/components/Cover/index.js +5 -4
- package/dist/cjs/components/DescriptionList/Description.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.js +3 -3
- package/dist/cjs/components/DescriptionList/Term.d.ts +1 -1
- package/dist/cjs/components/Divider/index.d.ts +1 -1
- package/dist/cjs/components/Divider/index.js +3 -3
- package/dist/cjs/components/Dotnav/Dotnav.d.ts +1 -1
- package/dist/cjs/components/Dotnav/Dotnav.js +3 -3
- package/dist/cjs/components/Dotnav/Item.d.ts +1 -1
- package/dist/cjs/components/Dotnav/Item.js +3 -3
- package/dist/cjs/components/Drawer/index.d.ts +6 -8
- package/dist/cjs/components/Drawer/index.js +85 -36
- package/dist/cjs/components/Drawer/index.scss +389 -127
- package/dist/cjs/components/Drop/index.d.ts +11 -11
- package/dist/cjs/components/Drop/index.js +12 -12
- package/dist/cjs/components/Drop/index.scss +22 -0
- package/dist/cjs/components/Dropdown/index.js +2 -2
- package/dist/cjs/components/Flex/Flex.d.ts +22 -0
- package/dist/cjs/components/Flex/Flex.js +53 -0
- package/dist/cjs/components/Flex/Item.d.ts +13 -0
- package/dist/cjs/components/Flex/Item.js +47 -0
- package/dist/cjs/components/Flex/index.d.ts +7 -23
- package/dist/cjs/components/Flex/index.js +4 -46
- package/dist/cjs/components/Form/Controls.d.ts +1 -1
- package/dist/cjs/components/Form/Controls.js +3 -3
- package/dist/cjs/components/Form/ControlsText.d.ts +1 -1
- package/dist/cjs/components/Form/ControlsText.js +3 -3
- package/dist/cjs/components/Form/Fieldset.d.ts +1 -1
- package/dist/cjs/components/Form/Fieldset.js +3 -3
- package/dist/cjs/components/Form/Form.d.ts +1 -1
- package/dist/cjs/components/Form/Form.js +3 -3
- package/dist/cjs/components/Form/Label.d.ts +1 -1
- package/dist/cjs/components/Form/Label.js +3 -3
- package/dist/cjs/components/Form/Legend.d.ts +1 -1
- package/dist/cjs/components/Form/Legend.js +3 -3
- package/dist/cjs/components/Grid/index.d.ts +1 -1
- package/dist/cjs/components/Grid/index.js +3 -3
- package/dist/cjs/components/Heading/index.d.ts +1 -1
- package/dist/cjs/components/Heading/index.js +3 -3
- package/dist/cjs/components/Icon/Button.d.ts +1 -1
- package/dist/cjs/components/Icon/Icon.d.ts +1 -1
- package/dist/cjs/components/Icon/Icon.js +3 -3
- package/dist/cjs/components/Icon/Link.d.ts +1 -1
- package/dist/cjs/components/Iconnav/Iconnav.d.ts +1 -1
- package/dist/cjs/components/Iconnav/Iconnav.js +3 -3
- package/dist/cjs/components/Iconnav/Item.d.ts +1 -1
- package/dist/cjs/components/Iconnav/Item.js +3 -3
- package/dist/cjs/components/Label/index.d.ts +1 -1
- package/dist/cjs/components/Label/index.js +3 -3
- package/dist/cjs/components/Link/index.js +3 -3
- package/dist/cjs/components/List/Item.d.ts +1 -1
- package/dist/cjs/components/List/List.d.ts +1 -1
- package/dist/cjs/components/List/List.js +3 -3
- package/dist/cjs/components/List/index.d.ts +1 -1
- package/dist/cjs/components/List/index.js +1 -1
- package/dist/cjs/components/Modal/Modal.d.ts +2 -2
- package/dist/cjs/components/Modal/Modal.js +3 -3
- package/dist/cjs/components/Modal/index.scss +1 -1
- package/dist/cjs/components/Nav/Divider.d.ts +1 -1
- package/dist/cjs/components/Nav/Divider.js +1 -1
- package/dist/cjs/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
- package/dist/cjs/components/Nav/Group/InternalNavItemGroup.js +2 -2
- package/dist/cjs/components/Nav/Group/index.d.ts +1 -1
- package/dist/cjs/components/Nav/Group/index.js +1 -1
- package/dist/cjs/components/Nav/Header.d.ts +1 -1
- package/dist/cjs/components/Nav/Header.js +1 -1
- package/dist/cjs/components/Nav/Item/InternalNavItem.d.ts +1 -1
- package/dist/cjs/components/Nav/Item/InternalNavItem.js +3 -3
- package/dist/cjs/components/Nav/Item/LegacyNavItem.js +1 -1
- package/dist/cjs/components/Nav/Item/index.d.ts +1 -1
- package/dist/cjs/components/Nav/Item/index.js +1 -1
- package/dist/cjs/components/Nav/Nav.d.ts +1 -1
- package/dist/cjs/components/Nav/Nav.js +5 -5
- package/dist/cjs/components/Nav/Sub/InlineSubNavList.js +1 -1
- package/dist/cjs/components/Nav/Sub/PopupTrigger.d.ts +1 -1
- package/dist/cjs/components/Nav/Sub/PopupTrigger.js +3 -3
- package/dist/cjs/components/Nav/Sub/SubNavList.js +1 -1
- package/dist/cjs/components/Nav/Sub/index.d.ts +1 -1
- package/dist/cjs/components/Nav/Sub/index.js +1 -1
- package/dist/cjs/components/Nav/context/NavContext.d.ts +1 -1
- package/dist/cjs/components/Nav/context/NavContext.js +5 -5
- package/dist/cjs/components/Nav/hooks/useAccessibility.js +1 -1
- package/dist/cjs/components/Nav/hooks/useKeyRecords.js +1 -1
- package/dist/cjs/components/Nav/hooks/useUUID.js +1 -1
- package/dist/cjs/components/Nav/index.scss +1 -4
- package/dist/cjs/components/Nav/utils/nodeUtil.js +1 -1
- package/dist/cjs/components/Navbar/Center.d.ts +1 -1
- package/dist/cjs/components/Navbar/Center.js +3 -3
- package/dist/cjs/components/Navbar/Container.d.ts +1 -1
- package/dist/cjs/components/Navbar/Container.js +3 -3
- package/dist/cjs/components/Navbar/Item.d.ts +1 -1
- package/dist/cjs/components/Navbar/Item.js +3 -3
- package/dist/cjs/components/Navbar/Left.d.ts +1 -1
- package/dist/cjs/components/Navbar/Left.js +3 -3
- package/dist/cjs/components/Navbar/Nav.d.ts +1 -1
- package/dist/cjs/components/Navbar/Nav.js +3 -3
- package/dist/cjs/components/Navbar/Navbar.d.ts +1 -1
- package/dist/cjs/components/Navbar/Navbar.js +3 -3
- package/dist/cjs/components/Navbar/Right.d.ts +1 -1
- package/dist/cjs/components/Navbar/Right.js +3 -3
- package/dist/cjs/components/Navbar/Toggle.d.ts +1 -1
- package/dist/cjs/components/Navbar/Toggle.js +3 -3
- package/dist/cjs/components/Navbar/index.d.ts +1 -1
- package/dist/cjs/components/Navbar/index.js +1 -1
- package/dist/cjs/components/Progress/index.d.ts +1 -1
- package/dist/cjs/components/Progress/index.js +3 -3
- package/dist/cjs/components/Progress/index.scss +0 -4
- package/dist/cjs/components/Section/index.d.ts +2 -2
- package/dist/cjs/components/Section/index.js +5 -5
- package/dist/cjs/components/Spinner/index.d.ts +1 -1
- package/dist/cjs/components/Spinner/index.js +6 -6
- package/dist/cjs/components/Spinner/index.scss +5 -8
- package/dist/cjs/components/Switch/index.d.ts +27 -0
- package/dist/cjs/components/Switch/index.js +48 -0
- package/dist/cjs/components/Switch/index.scss +216 -0
- package/dist/cjs/components/Tabs/hooks/index.d.ts +2 -0
- package/dist/cjs/components/Tabs/hooks/index.js +18 -0
- package/dist/cjs/components/Tabs/hooks/useAnimateConfig.d.ts +3 -0
- package/dist/cjs/components/Tabs/hooks/useAnimateConfig.js +41 -0
- package/dist/cjs/components/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/dist/cjs/components/Tabs/hooks/useLegacyItems.js +55 -0
- package/dist/cjs/components/Tabs/index.d.ts +5 -4
- package/dist/cjs/components/Tabs/index.js +7 -5
- package/dist/cjs/components/Tabs/index.scss +53 -9
- package/dist/cjs/components/Text/index.d.ts +1 -1
- package/dist/cjs/components/Text/index.js +3 -3
- package/dist/cjs/components/Tile/index.d.ts +1 -1
- package/dist/cjs/components/Tile/index.js +3 -3
- package/dist/cjs/components/Tile/index.scss +5 -0
- package/dist/cjs/components/Width/Width.d.ts +1 -1
- package/dist/cjs/components/Width/Width.js +3 -3
- package/dist/cjs/components/Width/types.d.ts +1 -2
- package/dist/cjs/components/Width/utils.d.ts +3 -5
- package/dist/cjs/components/Width/utils.js +3 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/styles/_import.components.scss +40 -35
- package/dist/cjs/styles/_import.scss +2 -1
- package/dist/cjs/styles/animation.scss +49 -33
- package/dist/cjs/styles/column.scss +1 -1
- package/dist/cjs/styles/leader.scss +0 -17
- package/dist/cjs/styles/marker.scss +1 -30
- package/dist/cjs/styles/mixins.scss +687 -298
- package/dist/cjs/styles/motion.scss +116 -182
- package/dist/cjs/styles/overlay.scss +2 -8
- package/dist/cjs/styles/pagination.scss +4 -51
- package/dist/cjs/styles/placeholder.scss +0 -3
- package/dist/cjs/styles/print.scss +0 -5
- package/dist/cjs/styles/search.scss +1 -103
- package/dist/cjs/styles/sticky.scss +3 -3
- package/dist/cjs/styles/subnav.scss +34 -141
- package/dist/cjs/styles/switch.scss +1 -0
- package/dist/cjs/styles/switcher.scss +0 -2
- package/dist/cjs/styles/table.scss +82 -131
- package/dist/cjs/styles/thumbnav.scss +15 -42
- package/dist/cjs/styles/tooltip.scss +3 -10
- package/dist/cjs/styles/totop.scss +23 -11
- package/dist/cjs/styles/variables.scss +1342 -1327
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/utils/get-breakpoints-config-classes.d.ts +1 -1
- package/dist/cjs/utils/get-breakpoints-config-classes.js +2 -2
- package/dist/cjs/utils/modal.d.ts +3 -2
- package/dist/cjs/utils/modal.js +8 -4
- package/dist/cjs/utils/motion.d.ts +1 -0
- package/dist/cjs/utils/motion.js +42 -1
- package/dist/esm/components/Accordion/Accordion.d.ts +2 -2
- package/dist/esm/components/Accordion/Accordion.js +5 -5
- package/dist/esm/components/Accordion/Item.d.ts +2 -2
- package/dist/esm/components/Accordion/Item.js +1 -1
- package/dist/esm/components/Accordion/index.d.ts +1 -1
- package/dist/esm/components/Accordion/index.scss +12 -5
- package/dist/esm/components/Alert/index.d.ts +1 -1
- package/dist/esm/components/Alert/index.js +2 -2
- package/dist/esm/components/Align/Align.d.ts +1 -1
- package/dist/esm/components/Align/Align.js +4 -4
- package/dist/esm/components/Align/Left.d.ts +1 -1
- package/dist/esm/components/Align/Right.d.ts +1 -1
- package/dist/esm/components/Article/Article.d.ts +1 -1
- package/dist/esm/components/Article/Article.js +2 -2
- package/dist/esm/components/Article/Meta.d.ts +1 -1
- package/dist/esm/components/Article/Meta.js +2 -2
- package/dist/esm/components/Article/Title.d.ts +1 -1
- package/dist/esm/components/Article/Title.js +2 -2
- package/dist/esm/components/Badge/index.d.ts +1 -1
- package/dist/esm/components/Badge/index.js +2 -2
- package/dist/esm/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/esm/components/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/esm/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/esm/components/Breadcrumb/Item.js +2 -2
- package/dist/esm/components/Button/Button.d.ts +4 -2
- package/dist/esm/components/Button/Button.js +6 -4
- package/dist/esm/components/Button/Group.d.ts +1 -1
- package/dist/esm/components/Button/Group.js +2 -2
- package/dist/esm/components/Card/Badge.d.ts +1 -1
- package/dist/esm/components/Card/Badge.js +3 -3
- package/dist/esm/components/Card/Body.d.ts +5 -3
- package/dist/esm/components/Card/Body.js +6 -4
- package/dist/esm/components/Card/Card.d.ts +4 -4
- package/dist/esm/components/Card/Card.js +3 -3
- package/dist/esm/components/Card/Footer.d.ts +1 -1
- package/dist/esm/components/Card/Footer.js +4 -4
- package/dist/esm/components/Card/Header.d.ts +1 -1
- package/dist/esm/components/Card/Header.js +4 -4
- package/dist/esm/components/Card/Media.d.ts +5 -3
- package/dist/esm/components/Card/Media.js +6 -4
- package/dist/esm/components/Card/Title.d.ts +1 -1
- package/dist/esm/components/Card/Title.js +4 -4
- package/dist/esm/components/Close/index.d.ts +2 -1
- package/dist/esm/components/Close/index.js +3 -2
- package/dist/esm/components/ComponentProvider/index.js +1 -1
- package/dist/esm/components/{ConfrigProvider → ConfigProvider}/index.js +10 -10
- package/dist/esm/components/Container/index.d.ts +2 -1
- package/dist/esm/components/Container/index.js +4 -3
- package/dist/esm/components/Container/index.scss +1 -1
- package/dist/esm/components/Control/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Control/Checkbox/Group.js +2 -2
- package/dist/esm/components/Control/Checkbox/index.scss +4 -0
- package/dist/esm/components/Control/Input/Input.js +3 -3
- package/dist/esm/components/Control/Input/Number/index.js +2 -2
- package/dist/esm/components/Control/Input/Password/index.js +2 -2
- package/dist/esm/components/Control/Input/Password/index.scss +19 -16
- package/dist/esm/components/Control/Input/types.d.ts +2 -2
- package/dist/esm/components/Control/Input/useInput.d.ts +1 -1
- package/dist/esm/components/Control/Input/useInput.js +7 -6
- package/dist/esm/components/Control/Radio/Group.js +2 -2
- package/dist/esm/components/Control/Radio/Radio.js +2 -2
- package/dist/esm/components/Control/Select/index.d.ts +1 -1
- package/dist/esm/components/Control/Select/index.js +2 -2
- package/dist/esm/components/Control/TextArea/index.d.ts +1 -1
- package/dist/esm/components/Control/TextArea/index.js +5 -5
- package/dist/esm/components/Control/TextArea/index.scss +6 -6
- package/dist/esm/components/Control/index.scss +5 -20
- package/dist/esm/components/Control/types.d.ts +2 -4
- package/dist/esm/components/Cover/index.d.ts +1 -1
- package/dist/esm/components/Cover/index.js +5 -4
- package/dist/esm/components/DescriptionList/Description.d.ts +1 -1
- package/dist/esm/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/esm/components/DescriptionList/DescriptionList.js +2 -2
- package/dist/esm/components/DescriptionList/Term.d.ts +1 -1
- package/dist/esm/components/Divider/index.d.ts +1 -1
- package/dist/esm/components/Divider/index.js +2 -2
- package/dist/esm/components/Dotnav/Dotnav.d.ts +1 -1
- package/dist/esm/components/Dotnav/Dotnav.js +2 -2
- package/dist/esm/components/Dotnav/Item.d.ts +1 -1
- package/dist/esm/components/Dotnav/Item.js +2 -2
- package/dist/esm/components/Drawer/index.d.ts +6 -8
- package/dist/esm/components/Drawer/index.js +84 -35
- package/dist/esm/components/Drawer/index.scss +389 -127
- package/dist/esm/components/Drop/index.d.ts +11 -11
- package/dist/esm/components/Drop/index.js +12 -12
- package/dist/esm/components/Drop/index.scss +22 -0
- package/dist/esm/components/Dropdown/index.js +1 -1
- package/dist/esm/components/Flex/Flex.d.ts +22 -0
- package/dist/esm/components/Flex/Flex.js +24 -0
- package/dist/esm/components/Flex/Item.d.ts +13 -0
- package/dist/esm/components/Flex/Item.js +18 -0
- package/dist/esm/components/Flex/index.d.ts +7 -23
- package/dist/esm/components/Flex/index.js +4 -20
- package/dist/esm/components/Form/Controls.d.ts +1 -1
- package/dist/esm/components/Form/Controls.js +2 -2
- package/dist/esm/components/Form/ControlsText.d.ts +1 -1
- package/dist/esm/components/Form/ControlsText.js +2 -2
- package/dist/esm/components/Form/Fieldset.d.ts +1 -1
- package/dist/esm/components/Form/Fieldset.js +2 -2
- package/dist/esm/components/Form/Form.d.ts +1 -1
- package/dist/esm/components/Form/Form.js +2 -2
- package/dist/esm/components/Form/Label.d.ts +1 -1
- package/dist/esm/components/Form/Label.js +2 -2
- package/dist/esm/components/Form/Legend.d.ts +1 -1
- package/dist/esm/components/Form/Legend.js +2 -2
- package/dist/esm/components/Grid/index.d.ts +1 -1
- package/dist/esm/components/Grid/index.js +2 -2
- package/dist/esm/components/Heading/index.d.ts +1 -1
- package/dist/esm/components/Heading/index.js +2 -2
- package/dist/esm/components/Icon/Button.d.ts +1 -1
- package/dist/esm/components/Icon/Icon.d.ts +1 -1
- package/dist/esm/components/Icon/Icon.js +2 -2
- package/dist/esm/components/Icon/Link.d.ts +1 -1
- package/dist/esm/components/Iconnav/Iconnav.d.ts +1 -1
- package/dist/esm/components/Iconnav/Iconnav.js +2 -2
- package/dist/esm/components/Iconnav/Item.d.ts +1 -1
- package/dist/esm/components/Iconnav/Item.js +2 -2
- package/dist/esm/components/Label/index.d.ts +1 -1
- package/dist/esm/components/Label/index.js +2 -2
- package/dist/esm/components/Link/index.js +2 -2
- package/dist/esm/components/List/Item.d.ts +1 -1
- package/dist/esm/components/List/List.d.ts +1 -1
- package/dist/esm/components/List/List.js +2 -2
- package/dist/esm/components/List/index.d.ts +1 -1
- package/dist/esm/components/List/index.js +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +2 -2
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/esm/components/Modal/index.scss +1 -1
- package/dist/esm/components/Nav/Divider.d.ts +1 -1
- package/dist/esm/components/Nav/Divider.js +1 -1
- package/dist/esm/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
- package/dist/esm/components/Nav/Group/InternalNavItemGroup.js +2 -2
- package/dist/esm/components/Nav/Group/index.d.ts +1 -1
- package/dist/esm/components/Nav/Group/index.js +1 -1
- package/dist/esm/components/Nav/Header.d.ts +1 -1
- package/dist/esm/components/Nav/Header.js +1 -1
- package/dist/esm/components/Nav/Item/InternalNavItem.d.ts +1 -1
- package/dist/esm/components/Nav/Item/InternalNavItem.js +2 -2
- package/dist/esm/components/Nav/Item/LegacyNavItem.js +1 -1
- package/dist/esm/components/Nav/Item/index.d.ts +1 -1
- package/dist/esm/components/Nav/Item/index.js +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +1 -1
- package/dist/esm/components/Nav/Nav.js +5 -5
- package/dist/esm/components/Nav/Sub/InlineSubNavList.js +1 -1
- package/dist/esm/components/Nav/Sub/PopupTrigger.d.ts +1 -1
- package/dist/esm/components/Nav/Sub/PopupTrigger.js +2 -2
- package/dist/esm/components/Nav/Sub/SubNavList.js +1 -1
- package/dist/esm/components/Nav/Sub/index.d.ts +1 -1
- package/dist/esm/components/Nav/Sub/index.js +1 -1
- package/dist/esm/components/Nav/context/NavContext.d.ts +1 -1
- package/dist/esm/components/Nav/context/NavContext.js +4 -4
- package/dist/esm/components/Nav/hooks/useAccessibility.js +1 -1
- package/dist/esm/components/Nav/hooks/useKeyRecords.js +1 -1
- package/dist/esm/components/Nav/hooks/useUUID.js +1 -1
- package/dist/esm/components/Nav/index.scss +1 -4
- package/dist/esm/components/Nav/utils/nodeUtil.js +1 -1
- package/dist/esm/components/Navbar/Center.d.ts +1 -1
- package/dist/esm/components/Navbar/Center.js +2 -2
- package/dist/esm/components/Navbar/Container.d.ts +1 -1
- package/dist/esm/components/Navbar/Container.js +2 -2
- package/dist/esm/components/Navbar/Item.d.ts +1 -1
- package/dist/esm/components/Navbar/Item.js +2 -2
- package/dist/esm/components/Navbar/Left.d.ts +1 -1
- package/dist/esm/components/Navbar/Left.js +2 -2
- package/dist/esm/components/Navbar/Nav.d.ts +1 -1
- package/dist/esm/components/Navbar/Nav.js +2 -2
- package/dist/esm/components/Navbar/Navbar.d.ts +1 -1
- package/dist/esm/components/Navbar/Navbar.js +2 -2
- package/dist/esm/components/Navbar/Right.d.ts +1 -1
- package/dist/esm/components/Navbar/Right.js +2 -2
- package/dist/esm/components/Navbar/Toggle.d.ts +1 -1
- package/dist/esm/components/Navbar/Toggle.js +2 -2
- package/dist/esm/components/Navbar/index.d.ts +1 -1
- package/dist/esm/components/Navbar/index.js +1 -1
- package/dist/esm/components/Progress/index.d.ts +1 -1
- package/dist/esm/components/Progress/index.js +2 -2
- package/dist/esm/components/Progress/index.scss +0 -4
- package/dist/esm/components/Section/index.d.ts +2 -2
- package/dist/esm/components/Section/index.js +4 -4
- package/dist/esm/components/Spinner/index.d.ts +1 -1
- package/dist/esm/components/Spinner/index.js +5 -5
- package/dist/esm/components/Spinner/index.scss +5 -8
- package/dist/esm/components/Switch/index.d.ts +27 -0
- package/dist/esm/components/Switch/index.js +19 -0
- package/dist/esm/components/Switch/index.scss +216 -0
- package/dist/esm/components/Tabs/hooks/index.d.ts +2 -0
- package/dist/esm/components/Tabs/hooks/index.js +2 -0
- package/dist/esm/components/Tabs/hooks/useAnimateConfig.d.ts +3 -0
- package/dist/esm/components/Tabs/hooks/useAnimateConfig.js +37 -0
- package/dist/esm/components/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/dist/esm/components/Tabs/hooks/useLegacyItems.js +26 -0
- package/dist/esm/components/Tabs/index.d.ts +5 -4
- package/dist/esm/components/Tabs/index.js +6 -4
- package/dist/esm/components/Tabs/index.scss +53 -9
- package/dist/esm/components/Text/index.d.ts +1 -1
- package/dist/esm/components/Text/index.js +2 -2
- package/dist/esm/components/Tile/index.d.ts +1 -1
- package/dist/esm/components/Tile/index.js +2 -2
- package/dist/esm/components/Tile/index.scss +5 -0
- package/dist/esm/components/Width/Width.d.ts +1 -1
- package/dist/esm/components/Width/Width.js +2 -2
- package/dist/esm/components/Width/types.d.ts +1 -2
- package/dist/esm/components/Width/utils.d.ts +3 -5
- package/dist/esm/components/Width/utils.js +3 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/styles/_import.components.scss +40 -35
- package/dist/esm/styles/_import.scss +2 -1
- package/dist/esm/styles/animation.scss +49 -33
- package/dist/esm/styles/column.scss +1 -1
- package/dist/esm/styles/leader.scss +0 -17
- package/dist/esm/styles/marker.scss +1 -30
- package/dist/esm/styles/mixins.scss +687 -298
- package/dist/esm/styles/motion.scss +116 -182
- package/dist/esm/styles/overlay.scss +2 -8
- package/dist/esm/styles/pagination.scss +4 -51
- package/dist/esm/styles/placeholder.scss +0 -3
- package/dist/esm/styles/print.scss +0 -5
- package/dist/esm/styles/search.scss +1 -103
- package/dist/esm/styles/sticky.scss +3 -3
- package/dist/esm/styles/subnav.scss +34 -141
- package/dist/esm/styles/switch.scss +1 -0
- package/dist/esm/styles/switcher.scss +0 -2
- package/dist/esm/styles/table.scss +82 -131
- package/dist/esm/styles/thumbnav.scss +15 -42
- package/dist/esm/styles/tooltip.scss +3 -10
- package/dist/esm/styles/totop.scss +23 -11
- package/dist/esm/styles/variables.scss +1342 -1327
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/get-breakpoints-config-classes.d.ts +1 -1
- package/dist/esm/utils/get-breakpoints-config-classes.js +2 -2
- package/dist/esm/utils/modal.d.ts +3 -2
- package/dist/esm/utils/modal.js +5 -4
- package/dist/esm/utils/motion.d.ts +1 -0
- package/dist/esm/utils/motion.js +40 -0
- package/package.json +11 -10
- package/dist/cjs/styles/slidenav.scss +0 -168
- package/dist/esm/styles/slidenav.scss +0 -168
- /package/dist/cjs/components/{ConfrigProvider → ConfigProvider}/index.d.ts +0 -0
- /package/dist/cjs/styles/{tab.scss → tabs.scss} +0 -0
- /package/dist/esm/components/{ConfrigProvider → ConfigProvider}/index.d.ts +0 -0
- /package/dist/esm/styles/{tab.scss → tabs.scss} +0 -0
|
@@ -27,13 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Left = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
33
|
-
const
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
34
|
const defaultElement = 'div';
|
|
35
35
|
exports.Left = React.memo((props) => {
|
|
36
|
-
const config = (0,
|
|
36
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
37
37
|
const { className, prefixCls = config.prefixCls, ...restProps } = props;
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar-left'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, className), component: defaultElement, ...restProps });
|
|
@@ -27,12 +27,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Nav = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
32
|
-
const
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
33
33
|
const Nav_1 = require("../../components/Nav");
|
|
34
34
|
exports.Nav = React.memo((props) => {
|
|
35
|
-
const config = (0,
|
|
35
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
36
36
|
const { className, prefixCls = config.prefixCls, ...restProps } = props;
|
|
37
37
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
38
38
|
return (React.createElement(Nav_1.Nav, { className: (0, classnames_1.default)(`${rootCls}-nav`, className), popupPrefixCls: `${rootCls}-dropdown`, ...restProps, mode: "horizontal" }));
|
|
@@ -4,4 +4,4 @@ export interface NavbarProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
4
4
|
prefixCls?: string;
|
|
5
5
|
transparent?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const Navbar: React.MemoExoticComponent<(props: NavbarProps) => JSX.Element>;
|
|
7
|
+
export declare const Navbar: React.MemoExoticComponent<(props: NavbarProps) => React.JSX.Element>;
|
|
@@ -27,11 +27,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Navbar = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
32
|
-
const
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
33
33
|
exports.Navbar = React.memo((props) => {
|
|
34
|
-
const config = (0,
|
|
34
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
35
35
|
const { asContainer, className, prefixCls = config.prefixCls, transparent, ...restProps } = props;
|
|
36
36
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
37
37
|
return (React.createElement("nav", { className: (0, classnames_1.default)(rootCls, {
|
|
@@ -4,4 +4,4 @@ export interface NavbarRightOwnProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
4
4
|
prefixCls?: string;
|
|
5
5
|
}
|
|
6
6
|
export type NavbarRightProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<NavbarRightOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, NavbarRightOwnProps>;
|
|
7
|
-
export declare const Right: React.MemoExoticComponent<(<E extends React.ElementType<any> = "div">(props: NavbarRightProps<E>) => JSX.Element)>;
|
|
7
|
+
export declare const Right: React.MemoExoticComponent<(<E extends React.ElementType<any> = "div">(props: NavbarRightProps<E>) => React.JSX.Element)>;
|
|
@@ -27,13 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Right = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
33
|
-
const
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
34
|
const defaultElement = 'div';
|
|
35
35
|
exports.Right = React.memo((props) => {
|
|
36
|
-
const config = (0,
|
|
36
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
37
37
|
const { className, prefixCls = config.prefixCls, ...restProps } = props;
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(`${rootCls}-right`, className), component: defaultElement, ...restProps });
|
|
@@ -5,4 +5,4 @@ export type NavbarToggleOwnProps = {
|
|
|
5
5
|
prefixCls?: string;
|
|
6
6
|
};
|
|
7
7
|
export type NavbarToggleProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<NavbarToggleOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, NavbarToggleOwnProps>;
|
|
8
|
-
export declare const Toggle: React.MemoExoticComponent<(<E extends React.ElementType<any> = "div">(props: NavbarToggleProps<E>) => JSX.Element)>;
|
|
8
|
+
export declare const Toggle: React.MemoExoticComponent<(<E extends React.ElementType<any> = "div">(props: NavbarToggleProps<E>) => React.JSX.Element)>;
|
|
@@ -27,13 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Toggle = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
33
|
-
const
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
34
|
const defaultElement = 'div';
|
|
35
35
|
exports.Toggle = React.memo((props) => {
|
|
36
|
-
const config = (0,
|
|
36
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
37
37
|
const { className, icon, prefixCls = config.prefixCls, ...restProps } = props;
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar-toggle'), [config, prefixCls]);
|
|
39
39
|
return (React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { Center } from '../../components/Navbar/Center';
|
|
3
3
|
import { Container } from '../../components/Navbar/Container';
|
|
4
|
-
import { type NavbarProps } from '../../components/Navbar/Navbar';
|
|
5
4
|
import { Item } from '../../components/Navbar/Item';
|
|
6
5
|
import { Left } from '../../components/Navbar/Left';
|
|
7
6
|
import { Nav } from '../../components/Navbar/Nav';
|
|
7
|
+
import { type NavbarProps } from '../../components/Navbar/Navbar';
|
|
8
8
|
import { Right } from '../../components/Navbar/Right';
|
|
9
9
|
import { Toggle } from '../../components/Navbar/Toggle';
|
|
10
10
|
import './index.scss';
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Navbar = void 0;
|
|
4
4
|
const Center_1 = require("../../components/Navbar/Center");
|
|
5
5
|
const Container_1 = require("../../components/Navbar/Container");
|
|
6
|
-
const Navbar_1 = require("../../components/Navbar/Navbar");
|
|
7
6
|
const Item_1 = require("../../components/Navbar/Item");
|
|
8
7
|
const Left_1 = require("../../components/Navbar/Left");
|
|
9
8
|
const Nav_1 = require("../../components/Navbar/Nav");
|
|
9
|
+
const Navbar_1 = require("../../components/Navbar/Navbar");
|
|
10
10
|
const Right_1 = require("../../components/Navbar/Right");
|
|
11
11
|
const Toggle_1 = require("../../components/Navbar/Toggle");
|
|
12
12
|
require("./index.scss");
|
|
@@ -3,4 +3,4 @@ import './index.scss';
|
|
|
3
3
|
export interface ProgressProps extends React.ProgressHTMLAttributes<HTMLProgressElement> {
|
|
4
4
|
prefixCls?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const Progress: React.MemoExoticComponent<(props: ProgressProps) => JSX.Element>;
|
|
6
|
+
export declare const Progress: React.MemoExoticComponent<(props: ProgressProps) => React.JSX.Element>;
|
|
@@ -27,12 +27,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Progress = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
32
|
-
const
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
33
33
|
require("./index.scss");
|
|
34
34
|
exports.Progress = React.memo((props) => {
|
|
35
|
-
const config = (0,
|
|
35
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
36
36
|
const { className, prefixCls = config.prefixCls, ...restProps } = props;
|
|
37
37
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'progress'), [config, prefixCls]);
|
|
38
38
|
return React.createElement("progress", { className: (0, classnames_1.default)(rootCls, className), ...restProps });
|
|
@@ -113,10 +113,6 @@
|
|
|
113
113
|
@include hook-progress-misc;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// @mixin hook-progress() {}
|
|
117
|
-
// @mixin hook-progress-bar() {}
|
|
118
|
-
// @mixin hook-progress-misc() {}
|
|
119
|
-
|
|
120
116
|
|
|
121
117
|
// Vars
|
|
122
118
|
// ========================================================================
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { type PolymorphicProps } from '../../components/Component';
|
|
3
3
|
import './index.scss';
|
|
4
4
|
export type SectionOwnProps = {
|
|
5
|
-
color?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
|
|
6
5
|
preserveColor?: boolean;
|
|
7
6
|
size?: 'xsmall' | 'small' | 'large' | 'xlarge';
|
|
7
|
+
type?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
|
|
8
8
|
};
|
|
9
9
|
export type SectionProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<SectionOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, SectionOwnProps>;
|
|
10
|
-
export declare const Section: React.MemoExoticComponent<(<E extends React.ElementType<any> = "section">(props: SectionProps<E>) => JSX.Element)>;
|
|
10
|
+
export declare const Section: React.MemoExoticComponent<(<E extends React.ElementType<any> = "section">(props: SectionProps<E>) => React.JSX.Element)>;
|
|
@@ -27,19 +27,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Section = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
33
|
-
const
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
34
|
require("./index.scss");
|
|
35
35
|
const defaultElement = 'section';
|
|
36
36
|
exports.Section = React.memo((props) => {
|
|
37
|
-
const config = (0,
|
|
38
|
-
const { className,
|
|
37
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
38
|
+
const { className, prefixCls = config.prefixCls, preserveColor, size, type, ...restProps } = props;
|
|
39
39
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'section'), [config, prefixCls]);
|
|
40
40
|
return (React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, {
|
|
41
41
|
[`${rootCls}-${size}`]: size !== undefined,
|
|
42
|
-
[`${rootCls}-${
|
|
42
|
+
[`${rootCls}-${type}`]: type !== undefined,
|
|
43
43
|
[`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
|
|
44
44
|
}, className), component: defaultElement, ...restProps }));
|
|
45
45
|
});
|
|
@@ -4,4 +4,4 @@ export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
4
4
|
prefixCls?: string;
|
|
5
5
|
ratio?: number;
|
|
6
6
|
}
|
|
7
|
-
export declare const Spinner: React.MemoExoticComponent<(props: SpinnerProps) => JSX.Element>;
|
|
7
|
+
export declare const Spinner: React.MemoExoticComponent<(props: SpinnerProps) => React.JSX.Element>;
|
|
@@ -27,15 +27,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Spinner = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
32
|
-
const
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
33
33
|
const Icon_1 = require("../../components/Icon");
|
|
34
34
|
require("./index.scss");
|
|
35
35
|
exports.Spinner = React.memo((props) => {
|
|
36
|
-
const config = (0,
|
|
36
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
37
37
|
const { className, prefixCls = config.prefixCls, ratio, ...restProps } = props;
|
|
38
|
-
return (React.createElement("
|
|
39
|
-
React.createElement("svg", { ...Icon_1.defaultSvgProps, ...(0, Icon_1.getSize)(20, 20, ratio), viewBox: "0 0
|
|
40
|
-
React.createElement("circle", { fill: "none", stroke: "currentColor", cx:
|
|
38
|
+
return (React.createElement("div", { className: (0, classnames_1.default)([`${prefixCls || config.prefixCls}-spinner`, `${prefixCls || config.prefixCls}-icon`], className), role: "status", ...restProps },
|
|
39
|
+
React.createElement("svg", { ...Icon_1.defaultSvgProps, ...(0, Icon_1.getSize)(20, 20, ratio), viewBox: "0 0 30 30" },
|
|
40
|
+
React.createElement("circle", { fill: "none", stroke: "currentColor", cx: 15, cy: 15, r: 13, style: { strokeWidth: `${(2 / (ratio ?? 1)).toFixed(6)}px` } }))));
|
|
41
41
|
});
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
//
|
|
6
6
|
// ========================================================================
|
|
7
7
|
|
|
8
|
-
@use 'sass:math';
|
|
9
|
-
|
|
10
8
|
|
|
11
9
|
// Variables
|
|
12
10
|
// ========================================================================
|
|
@@ -45,23 +43,24 @@
|
|
|
45
43
|
|
|
46
44
|
.uk-spinner > * > * {
|
|
47
45
|
animation: uk-spinner-dash var(--spinner-duration) var(--ease-in-out) infinite;
|
|
48
|
-
stroke-dasharray:
|
|
46
|
+
stroke-dasharray: $spinner-circumference;
|
|
49
47
|
stroke-dashoffset: 0;
|
|
50
48
|
stroke-linecap: round;
|
|
51
49
|
stroke-width: var(--spinner-stroke-width);
|
|
52
50
|
transform-origin: center;
|
|
51
|
+
will-change: auto;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
@keyframes uk-spinner-dash {
|
|
56
|
-
0% { stroke-dashoffset:
|
|
55
|
+
0% { stroke-dashoffset: $spinner-circumference; }
|
|
57
56
|
|
|
58
57
|
50% {
|
|
59
|
-
stroke-dashoffset:
|
|
58
|
+
stroke-dashoffset: ($spinner-circumference * 0.25);
|
|
60
59
|
transform: rotate(135deg);
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
100% {
|
|
64
|
-
stroke-dashoffset:
|
|
63
|
+
stroke-dashoffset: $spinner-circumference;
|
|
65
64
|
transform: rotate(450deg);
|
|
66
65
|
}
|
|
67
66
|
}
|
|
@@ -81,7 +80,5 @@
|
|
|
81
80
|
:root {
|
|
82
81
|
--spinner-size: #{$spinner-size};
|
|
83
82
|
--spinner-stroke-width: #{$spinner-stroke-width};
|
|
84
|
-
--spinner-radius: #{floor(math.div(($spinner-size - $spinner-stroke-width), 2))}; // Minus stroke width to prevent overflow clipping
|
|
85
|
-
--spinner-circumference: #{round(2 * math.$pi * $spinner-radius)};
|
|
86
83
|
--spinner-duration: #{$spinner-duration};
|
|
87
84
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SwitchChangeEventHandler, type SwitchClickEventHandler } from 'rc-switch';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type Direction } from '../../types';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
export type SwitchSize = 'small';
|
|
6
|
+
export type SwitchProps = {
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
checkedChildren?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
defaultChecked?: boolean;
|
|
12
|
+
direction?: Direction;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
id?: string;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
loadingIcon?: React.ReactNode;
|
|
17
|
+
prefixCls?: string;
|
|
18
|
+
size?: SwitchSize;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
tabIndex?: number;
|
|
21
|
+
title?: string;
|
|
22
|
+
unCheckedChildren?: React.ReactNode;
|
|
23
|
+
onChange?: SwitchChangeEventHandler;
|
|
24
|
+
onClick?: SwitchClickEventHandler;
|
|
25
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
26
|
+
};
|
|
27
|
+
export declare const Switch: React.MemoExoticComponent<React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Switch = void 0;
|
|
30
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const rc_switch_1 = __importDefault(require("rc-switch"));
|
|
32
|
+
const React = __importStar(require("react"));
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
|
+
const Spinner_1 = require("../../components/Spinner");
|
|
35
|
+
require("./index.scss");
|
|
36
|
+
const ForwardedSwitch = React.forwardRef((props, ref) => {
|
|
37
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
38
|
+
const { className, direction = config.direction, loading, loadingIcon, prefixCls = config.prefixCls, ...restProps } = props;
|
|
39
|
+
const { size } = props;
|
|
40
|
+
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'switch'), [config, prefixCls]);
|
|
41
|
+
const mergedLoadingIcon = React.useMemo(() => (React.createElement("div", { className: `${rootCls}-handle` }, loading && (loadingIcon ?? React.createElement(Spinner_1.Spinner, { className: `${rootCls}-loading-icon` })))), [loading, loadingIcon, rootCls]);
|
|
42
|
+
return (React.createElement(rc_switch_1.default, { ref: ref, className: (0, classnames_1.default)({
|
|
43
|
+
[`${rootCls}-small`]: size === 'small',
|
|
44
|
+
[`${rootCls}-loading`]: loading,
|
|
45
|
+
[`${rootCls}-rtl`]: direction === 'rtl',
|
|
46
|
+
}, className), prefixCls: rootCls, loadingIcon: mergedLoadingIcon, ...restProps }));
|
|
47
|
+
});
|
|
48
|
+
exports.Switch = React.memo(ForwardedSwitch);
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
// Name: Switch
|
|
2
|
+
// Description: Switch Selector
|
|
3
|
+
//
|
|
4
|
+
// Component: `uk-switch`
|
|
5
|
+
//
|
|
6
|
+
// ========================================================================
|
|
7
|
+
|
|
8
|
+
// Variables
|
|
9
|
+
// ========================================================================
|
|
10
|
+
|
|
11
|
+
@import '../../styles/variables.scss';
|
|
12
|
+
|
|
13
|
+
/* ========================================================================
|
|
14
|
+
Component: Switch
|
|
15
|
+
========================================================================== */
|
|
16
|
+
|
|
17
|
+
.uk-switch {
|
|
18
|
+
appearance: none;
|
|
19
|
+
background: var(--switch-background);
|
|
20
|
+
border: var(--switch-border-width) var(--switch-border-style) var(--switch-border);
|
|
21
|
+
border-radius: var(--switch-border-radius);
|
|
22
|
+
box-sizing: content-box;
|
|
23
|
+
color: inherit;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
font: inherit;
|
|
27
|
+
height: var(--switch-height);
|
|
28
|
+
line-height: var(--switch-height);
|
|
29
|
+
margin: 0;
|
|
30
|
+
min-width: var(--switch-width);
|
|
31
|
+
padding: 0;
|
|
32
|
+
position: relative;
|
|
33
|
+
transition: all var(--transition-medium-fast-duration);
|
|
34
|
+
user-select: none;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
|
|
37
|
+
@if mixin-exists(hook-switch) {
|
|
38
|
+
@include hook-switch;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.uk-switch:not(.uk-switch-disabled):hover::after {
|
|
43
|
+
visibility: visible;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.uk-switch-handle {
|
|
47
|
+
height: calc(var(--switch-height) - var(--switch-handle-offset) * 2);
|
|
48
|
+
inset-inline-start: var(--switch-handle-offset);
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: var(--switch-handle-offset);
|
|
51
|
+
transition: all var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
52
|
+
width: calc(var(--switch-height) - var(--switch-handle-offset) * 2);
|
|
53
|
+
z-index: 10;
|
|
54
|
+
|
|
55
|
+
@if mixin-exists(hook-switch-handle) {
|
|
56
|
+
@include hook-switch-handle;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.uk-switch-handle::before {
|
|
61
|
+
background: var(--switch-handle-background);
|
|
62
|
+
border-radius: var(--switch-handle-border-radius);
|
|
63
|
+
bottom: 0;
|
|
64
|
+
content: '';
|
|
65
|
+
inset-inline-end: 0;
|
|
66
|
+
inset-inline-start: 0;
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
transition: all var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/* Inner
|
|
74
|
+
========================================================================== */
|
|
75
|
+
|
|
76
|
+
.uk-switch-inner {
|
|
77
|
+
border-radius: var(--switch-border-radius);
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
display: block;
|
|
80
|
+
height: 100%;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
padding-inline-end: calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666);
|
|
83
|
+
padding-inline-start: calc(var(--switch-height) + var(--switch-handle-offset));
|
|
84
|
+
transition: padding-inline-start var(--transition-medium-fast-duration) var(--ease-in-out), padding-inline-end var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.uk-switch-inner-checked,
|
|
88
|
+
.uk-switch-inner-unchecked {
|
|
89
|
+
display: block;
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
transition: margin-inline-start var(--transition-medium-fast-duration) var(--ease-in-out), margin-inline-end var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.uk-switch-inner-checked {
|
|
95
|
+
margin-inline-end: calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
96
|
+
margin-inline-start: calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.uk-switch-inner-unchecked {
|
|
100
|
+
margin-inline-end: 0;
|
|
101
|
+
margin-inline-start: 0;
|
|
102
|
+
margin-top: calc(var(--switch-height) * -1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/* States
|
|
107
|
+
========================================================================== */
|
|
108
|
+
|
|
109
|
+
// Active state
|
|
110
|
+
.uk-switch:not(.uk-switch-disabled):active .uk-switch-handle::before {
|
|
111
|
+
inset-inline-end: -30%;
|
|
112
|
+
inset-inline-start: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.uk-switch-checked:not(.uk-switch-disabled):active .uk-switch-handle::before {
|
|
116
|
+
inset-inline-end: 0;
|
|
117
|
+
inset-inline-start: -30%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.uk-switch:not(.uk-switch-disabled, .uk-switch-checked):active .uk-switch-inner-unchecked {
|
|
121
|
+
margin-inline-end: calc(var(--switch-handle-offset) * -2);
|
|
122
|
+
margin-inline-start: calc(var(--switch-handle-offset) * 2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.uk-switch-checked:not(.uk-switch-disabled):active .uk-switch-inner-checked {
|
|
126
|
+
margin-inline-end: calc(var(--switch-handle-offset) * 2);
|
|
127
|
+
margin-inline-start: calc(var(--switch-handle-offset) * -2);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Checked state
|
|
131
|
+
.uk-switch-checked {
|
|
132
|
+
background: var(--switch-checked-background);
|
|
133
|
+
|
|
134
|
+
@if mixin-exists(hook-switch-checked) {
|
|
135
|
+
@include hook-switch-checked;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.uk-switch-checked::after {
|
|
140
|
+
animation: uk-wave-effect 0.36s var(--ease-in-out);
|
|
141
|
+
animation-fill-mode: backwards;
|
|
142
|
+
border: var(--switch-border-width) solid var(--switch-checked-background);
|
|
143
|
+
border-radius: var(--switch-border-radius);
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
content: '';
|
|
146
|
+
height: 100%;
|
|
147
|
+
left: 0;
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0;
|
|
150
|
+
visibility: hidden;
|
|
151
|
+
width: 100%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.uk-switch-checked .uk-switch-handle {
|
|
155
|
+
inset-inline-start: calc(100% - var(--switch-height) + var(--switch-handle-offset));
|
|
156
|
+
|
|
157
|
+
@if mixin-exists(hook-switch-checked-handle) {
|
|
158
|
+
@include hook-switch-checked-handle;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.uk-switch-checked .uk-switch-handle::before {
|
|
163
|
+
background: var(--switch-handle-checked-background);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.uk-switch-checked .uk-switch-inner {
|
|
167
|
+
padding-inline-end: calc(var(--switch-height) + var(--switch-handle-offset));
|
|
168
|
+
padding-inline-start: calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.uk-switch-checked .uk-switch-inner-checked {
|
|
172
|
+
margin-inline-end: 0;
|
|
173
|
+
margin-inline-start: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.uk-switch-checked .uk-switch-inner-unchecked {
|
|
177
|
+
margin-inline-end: calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
178
|
+
margin-inline-start: calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Disabled
|
|
182
|
+
.uk-switch-disabled {
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
opacity: 0.65;
|
|
185
|
+
|
|
186
|
+
@if mixin-exists(hook-switch-disabled) {
|
|
187
|
+
@include hook-switch-disabled;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
/* Hooks
|
|
193
|
+
========================================================================== */
|
|
194
|
+
|
|
195
|
+
@if mixin-exists(hook-switch-misc) {
|
|
196
|
+
@include hook-switch-misc;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
/* Vars
|
|
201
|
+
========================================================================== */
|
|
202
|
+
|
|
203
|
+
:root {
|
|
204
|
+
--switch-background: #{$switch-background};
|
|
205
|
+
--switch-border: var(--global-border);
|
|
206
|
+
--switch-border-style: var(--global-border-style);
|
|
207
|
+
--switch-border-width: var(--global-border-width);
|
|
208
|
+
--switch-checked-background: var(--global-success-background);
|
|
209
|
+
--switch-border-radius: #{$switch-border-radius};
|
|
210
|
+
--switch-height: #{$switch-height};
|
|
211
|
+
--switch-width: #{$switch-width};
|
|
212
|
+
--switch-handle-background: var(--global-background);
|
|
213
|
+
--switch-handle-checked-background: var(--global-background);
|
|
214
|
+
--switch-handle-border-radius: #{$switch-handle-border-radius};
|
|
215
|
+
--switch-handle-offset: #{$switch-handle-offset};
|
|
216
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../../../components/Tabs/hooks/useAnimateConfig"), exports);
|
|
18
|
+
__exportStar(require("../../../components/Tabs/hooks/useLegacyItems"), exports);
|