@gobolt/genesis 0.0.10 → 0.0.11
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/README.md +2 -2
- package/dist/AntdIcon-nCNB0J1E.js +192 -0
- package/dist/CheckCircleFilled-BKgizvyl.js +13 -0
- package/dist/{CheckOutlined-CeTKr6II.js → CheckOutlined-cEBrx_Ag.js} +2 -2
- package/dist/{CloseCircleFilled-DXCxlIQL.js → CloseCircleFilled-B9e7yFwo.js} +2 -2
- package/dist/{CloseOutlined-ClXDNn82.js → CloseOutlined-ogxnm7Oy.js} +2 -2
- package/dist/{Compact-CGY560JF.js → Compact-DBh6nSYB.js} +42 -45
- package/dist/{ContextIsolator-D5x2Ih51.js → ContextIsolator-CwuJooYf.js} +2 -2
- package/dist/{PurePanel-BqPLRtc2.js → DownOutlined-5-15jS0h.js} +42 -40
- package/dist/{index-C8haFnXI.js → EllipsisOutlined-CJ2pgE2d.js} +153 -150
- package/dist/ExclamationCircleFilled-BHELVsTg.js +13 -0
- package/dist/Keyframes-sPZXYuXt.js +17 -0
- package/dist/{LoadingOutlined-8EnJdZ7I.js → LoadingOutlined-C1qu6ymP.js} +6 -6
- package/dist/MinusCircleOutlined-Shz0RRQV.js +37 -0
- package/dist/{Overflow-PBZD-PFm.js → Overflow-DdNKJLQh.js} +67 -66
- package/dist/{SearchOutlined-BP3Z2K6j.js → SearchOutlined-DNj-7b_h.js} +2 -2
- package/dist/Skeleton-B3vg9CbL.js +560 -0
- package/dist/{TextArea-DKwCct3i.js → TextArea-CKWbFr0u.js} +26 -18
- package/dist/Typography-DqI7RslA.js +705 -0
- package/dist/_baseIsEqual-L0-w1QRI.js +598 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/asyncToGenerator-CKP9bEZn.js +312 -0
- package/dist/{button-CDQgO1OK.js → button-B2Rgggx2.js} +127 -116
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/Avatar/Avatar.d.ts +12 -0
- package/dist/components/Avatar/Avatar.js +61 -0
- package/dist/components/Avatar/__stories__/Avatar.stories.d.ts +8 -0
- package/dist/components/Avatar/__tests__/Avatar.test.d.ts +1 -0
- package/dist/components/Avatar/__tests__/Avatar.test.js +17 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +4 -0
- package/dist/components/Avatar/styles.d.ts +18 -0
- package/dist/components/Avatar/styles.js +326 -0
- package/dist/components/Badge/Badge.d.ts +5 -3
- package/dist/components/Badge/Badge.js +67 -100
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +5 -4
- package/dist/components/Badge/__tests__/Badge.test.js +9 -10
- package/dist/components/Badge/styles.d.ts +12 -3
- package/dist/components/Badge/styles.js +30 -27
- package/dist/components/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
- package/dist/components/Breadcrumb/styles.js +239 -2260
- package/dist/components/Button/Button.d.ts +4 -3
- package/dist/components/Button/Button.js +10 -6
- package/dist/components/Button/__stories__/Button.stories.d.ts +3 -0
- package/dist/components/Button/__tests__/Button.test.js +1 -1
- package/dist/components/Button/styles.d.ts +2 -2
- package/dist/components/Button/styles.js +20 -17
- package/dist/components/Card/Card.d.ts +9 -0
- package/dist/components/Card/Card.js +16 -0
- package/dist/components/Card/__stories__/Card.stories.d.ts +7 -0
- package/dist/components/Card/__tests__/Card.test.d.ts +1 -0
- package/dist/components/Card/__tests__/Card.test.js +16 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +4 -0
- package/dist/components/Card/styles.d.ts +16 -0
- package/dist/components/Card/styles.js +12 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/Checkbox/Checkbox.js +28 -16
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
- package/dist/components/Checkbox/styles.js +22 -457
- package/dist/components/Dashboard/Dashboard.d.ts +5 -0
- package/dist/components/Dashboard/Dashboard.js +5 -0
- package/dist/components/Dashboard/__mocks__/dashboard-data.d.ts +14 -0
- package/dist/components/Dashboard/__mocks__/dashboard-data.js +186 -0
- package/dist/components/Dashboard/__stories__/Dashboard.stories.d.ts +7 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.d.ts +2 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +948 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.d.ts +2 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +85 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutStory.d.ts +13 -0
- package/dist/components/Dashboard/__stories__/DashboardLayoutStory.js +22 -0
- package/dist/components/Dashboard/__stories__/charts/LineChart.d.ts +12 -0
- package/dist/components/Dashboard/__stories__/charts/LineChart.js +536 -0
- package/dist/components/Dashboard/__tests__/Dashboard.test.d.ts +1 -0
- package/dist/components/Dashboard/__tests__/Dashboard.test.js +16 -0
- package/dist/components/Dashboard/index.d.ts +2 -0
- package/dist/components/Dashboard/index.js +4 -0
- package/dist/components/Dashboard/styles.d.ts +14 -0
- package/dist/components/Dashboard/styles.js +11 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +19 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.js +72 -0
- package/dist/components/ErrorBoundary/__stories__/ErrorBoundary.stories.d.ts +8 -0
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.d.ts +1 -0
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +25 -0
- package/dist/components/ErrorBoundary/index.d.ts +2 -0
- package/dist/components/ErrorBoundary/index.js +4 -0
- package/dist/components/ErrorBoundary/styles.d.ts +14 -0
- package/dist/components/ErrorBoundary/styles.js +11 -0
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -2
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +33 -18
- package/dist/components/ErrorBoundaryFallback/__stories__/ErrorBoundaryFallback.stories.d.ts +1 -1
- package/dist/components/ErrorBoundaryFallback/styles.js +17 -15
- package/dist/components/Form/Form.js +3 -3
- package/dist/components/Form/__stories__/FormStory.js +127 -50
- package/dist/components/Form/__tests__/form.test.js +2 -2
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Glyph/Glyph.d.ts +4 -0
- package/dist/components/Glyph/Glyph.js +9 -0
- package/dist/components/Glyph/__stories__/Glyph.stories.d.ts +7 -0
- package/dist/components/Glyph/index.d.ts +2 -0
- package/dist/components/Glyph/index.js +4 -0
- package/dist/components/Glyph/styles.d.ts +14 -0
- package/dist/components/Glyph/styles.js +11 -0
- package/dist/components/Input/Input.d.ts +1 -2
- package/dist/components/Input/Input.js +14 -10
- package/dist/components/Input/__tests__/Input.test.js +1 -1
- package/dist/components/Input/styles.js +58 -466
- package/dist/components/Layout/Content/Content.d.ts +11 -0
- package/dist/components/Layout/Content/Content.js +32 -0
- package/dist/components/Layout/Content/ResponsiveContent.d.ts +7 -0
- package/dist/components/Layout/Content/ResponsiveContent.js +81 -0
- package/dist/components/Layout/Content/index.d.ts +2 -0
- package/dist/components/Layout/Content/index.js +4 -0
- package/dist/components/Layout/Content/styles.d.ts +11 -0
- package/dist/components/Layout/Content/styles.js +16 -0
- package/dist/components/Layout/Layout.d.ts +8 -0
- package/dist/components/Layout/Layout.js +6 -0
- package/dist/components/Layout/MainLayout/MainLayout.d.ts +10 -0
- package/dist/components/Layout/MainLayout/MainLayout.js +28 -0
- package/dist/components/Layout/MainLayout/__stories__/MainLayout.stories.d.ts +9 -0
- package/dist/components/Layout/MainLayout/index.d.ts +2 -0
- package/dist/components/Layout/MainLayout/index.js +4 -0
- package/dist/components/Layout/MainLayout/styles.d.ts +4 -0
- package/dist/components/Layout/MainLayout/styles.js +69 -0
- package/dist/components/Layout/__stories__/Layout.stories.d.ts +7 -0
- package/dist/components/Layout/__tests__/Layout.test.d.ts +1 -0
- package/dist/components/Layout/__tests__/Layout.test.js +14 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Layout/index.js +4 -0
- package/dist/components/Message/Message.d.ts +6 -4
- package/dist/components/Message/Message.js +70 -43
- package/dist/components/Message/__tests__/Message.test.js +1 -1
- package/dist/components/Message/styles.d.ts +1 -0
- package/dist/components/Message/styles.js +15 -11
- package/dist/components/Notification/Notification.js +145 -120
- package/dist/components/Notification/NotificationBadge/NotificationBadge.d.ts +6 -0
- package/dist/components/Notification/NotificationBadge/NotificationBadge.js +49 -0
- package/dist/components/Notification/NotificationBadge/__stories__/NotificationBadge.stories.d.ts +13 -0
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.d.ts +1 -0
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +18 -0
- package/dist/components/Notification/NotificationBadge/index.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/index.js +4 -0
- package/dist/components/Notification/NotificationBadge/styles.d.ts +3 -0
- package/dist/components/Notification/NotificationBadge/styles.js +34 -0
- package/dist/components/Notification/__tests__/Notification.test.js +1 -1
- package/dist/components/Notification/styles.d.ts +1 -1
- package/dist/components/Notification/styles.js +1 -1
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/Popover.js +21 -0
- package/dist/components/Popover/__stories__/Popover.stories.d.ts +7 -0
- package/dist/components/Popover/__tests__/Popover.test.d.ts +1 -0
- package/dist/components/Popover/__tests__/Popover.test.js +40 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.js +4 -0
- package/dist/components/Popover/styles.d.ts +15 -0
- package/dist/components/Popover/styles.js +6 -0
- package/dist/components/Progress/Progress.d.ts +18 -0
- package/dist/components/Progress/Progress.js +91 -0
- package/dist/components/Progress/Progress.util.d.ts +4 -0
- package/dist/components/Progress/Progress.util.js +62 -0
- package/dist/components/Progress/ProgressText.d.ts +11 -0
- package/dist/components/Progress/ProgressText.js +67 -0
- package/dist/components/Progress/__stories__/Progress.stories.d.ts +12 -0
- package/dist/components/Progress/__tests__/Progress.test.d.ts +1 -0
- package/dist/components/Progress/__tests__/Progress.test.js +21 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.js +4 -0
- package/dist/components/Progress/styles.d.ts +17 -0
- package/dist/components/Progress/styles.js +793 -0
- package/dist/components/Radio/Radio.js +22 -6
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Row/Row.d.ts +14 -0
- package/dist/components/Row/Row.js +38 -0
- package/dist/components/Row/RowActions/RowActions.d.ts +9 -0
- package/dist/components/Row/RowActions/RowActions.js +59 -0
- package/dist/components/Row/RowActions/styles.d.ts +2 -0
- package/dist/components/Row/RowActions/styles.js +32 -0
- package/dist/components/Row/RowLabelValue/RowLabelValue.d.ts +11 -0
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +62 -0
- package/dist/components/Row/RowLabelValue/RowSkeleton.d.ts +3 -0
- package/dist/components/Row/RowLabelValue/RowSkeleton.js +24 -0
- package/dist/components/Row/RowLabelValue/styles.d.ts +15 -0
- package/dist/components/Row/RowLabelValue/styles.js +25 -0
- package/dist/components/Row/__stories__/Row.stories.d.ts +13 -0
- package/dist/components/Row/__tests__/Row.test.d.ts +1 -0
- package/dist/components/Row/__tests__/Row.test.js +16 -0
- package/dist/components/Row/index.d.ts +2 -0
- package/dist/components/Row/index.js +4 -0
- package/dist/components/Row/styles.d.ts +15 -0
- package/dist/components/Row/styles.js +15 -0
- package/dist/components/SegmentedControls/SegmentedControls.d.ts +12 -0
- package/dist/components/SegmentedControls/SegmentedControls.js +26 -0
- package/dist/components/SegmentedControls/__stories__/SegmentedControls.stories.d.ts +9 -0
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.d.ts +1 -0
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +24 -0
- package/dist/components/SegmentedControls/index.d.ts +2 -0
- package/dist/components/SegmentedControls/index.js +4 -0
- package/dist/components/SegmentedControls/styles.d.ts +12 -0
- package/dist/components/SegmentedControls/styles.js +511 -0
- package/dist/components/Select/Select.d.ts +2 -4
- package/dist/components/Select/Select.js +12 -11
- package/dist/components/Select/__tests__/Select.test.js +1 -1
- package/dist/components/Select/styles.js +39 -3654
- package/dist/components/Shapes/Shapes.d.ts +6 -0
- package/dist/components/Shapes/Shapes.js +8 -0
- package/dist/components/Shapes/__stories__/Shapes.stories.d.ts +9 -0
- package/dist/components/Shapes/__tests__/Shapes.test.d.ts +1 -0
- package/dist/components/Shapes/__tests__/Shapes.test.js +16 -0
- package/dist/components/Shapes/index.d.ts +2 -0
- package/dist/components/Shapes/index.js +4 -0
- package/dist/components/Shapes/variants/Circle.d.ts +5 -0
- package/dist/components/Shapes/variants/Circle.js +23 -0
- package/dist/components/Shapes/variants/Rectangle.d.ts +5 -0
- package/dist/components/Shapes/variants/Rectangle.js +23 -0
- package/dist/components/Shapes/variants/Triangle.d.ts +5 -0
- package/dist/components/Shapes/variants/Triangle.js +23 -0
- package/dist/components/Switch/Switch.d.ts +9 -0
- package/dist/components/Switch/Switch.js +22 -0
- package/dist/components/Switch/__stories__/Switch.stories.d.ts +8 -0
- package/dist/components/Switch/__tests__/Switch.test.d.ts +1 -0
- package/dist/components/Switch/__tests__/Switch.test.js +25 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +4 -0
- package/dist/components/Switch/styles.d.ts +9 -0
- package/dist/components/Switch/styles.js +456 -0
- package/dist/components/Table/Table.d.ts +15 -0
- package/dist/components/Table/Table.js +23 -0
- package/dist/components/Table/__mocks__/table-mocks.d.ts +20 -0
- package/dist/components/Table/__mocks__/table-mocks.js +321 -0
- package/dist/components/Table/__stories__/Table.stories.d.ts +7 -0
- package/dist/components/Table/__tests__/Table.test.d.ts +1 -0
- package/dist/components/Table/__tests__/Table.test.js +34 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +4 -0
- package/dist/components/Table/styles.d.ts +8 -0
- package/dist/components/Table/styles.js +6 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/components/Tabs/Tabs.js +23 -0
- package/dist/components/Tabs/__stories__/Tabs.stories.d.ts +8 -0
- package/dist/components/Tabs/__tests__/Tabs.test.d.ts +1 -0
- package/dist/components/Tabs/__tests__/Tabs.test.js +37 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +4 -0
- package/dist/components/Tabs/styles.d.ts +12 -0
- package/dist/components/Tabs/styles.js +102 -0
- package/dist/components/Tile/Tile.d.ts +10 -0
- package/dist/components/Tile/Tile.js +21 -0
- package/dist/components/Tile/__stories__/Tile.stories.d.ts +7 -0
- package/dist/components/Tile/__tests__/Tile.test.d.ts +1 -0
- package/dist/components/Tile/__tests__/Tile.test.js +21 -0
- package/dist/components/Tile/index.d.ts +2 -0
- package/dist/components/Tile/index.js +4 -0
- package/dist/components/Tile/styles.d.ts +11 -0
- package/dist/components/Tile/styles.js +12 -0
- package/dist/components/Toast/Toast.js +23 -6
- package/dist/components/Toast/__tests__/Toast.test.js +2 -2
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/styles.d.ts +0 -1
- package/dist/components/Toast/styles.js +14 -23
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.js +50 -0
- package/dist/components/Tooltip/__stories__/Tooltip.stories.d.ts +7 -0
- package/dist/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/components/Tooltip/__tests__/Tooltip.test.js +25 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +4 -0
- package/dist/components/Tooltip/styles.d.ts +20 -0
- package/dist/components/Tooltip/styles.js +11 -0
- package/dist/components/Typography/Typography.d.ts +5 -1
- package/dist/components/Typography/Typography.js +2 -2
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +2 -2
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/Typography/styles.d.ts +1 -0
- package/dist/components/Typography/styles.js +53 -17
- package/dist/components/index.d.ts +31 -1
- package/dist/components/index.js +54 -24
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +4 -2
- package/dist/{context-BMW3aJEf.js → context-Cx7GtZpz.js} +281 -284
- package/dist/dropdown-zGGFIyJ_.js +2044 -0
- package/dist/generateCategoricalChart-7ceYaiZ2.js +15597 -0
- package/dist/genesis/GenesisThemeBreakdown.js +38 -22
- package/dist/genesis/styles.js +7 -2923
- package/dist/iconBase-LROS5hdG.js +112 -0
- package/dist/index-BRUI9igj.js +11 -0
- package/dist/index-BTGF--50.js +1845 -0
- package/dist/index-BW_7pvTr.js +538 -0
- package/dist/{index-oK7z6jnz.js → index-ByspLxrB.js} +8640 -8798
- package/dist/{index-bKlRxQp4.js → index-CRotrkWm.js} +7 -7
- package/dist/{index-C0SmxWLS.js → index-CSPlXIlA.js} +136 -143
- package/dist/index-CdiHBmVe.js +445 -0
- package/dist/index-CodMmNWv.js +102 -0
- package/dist/{index-DPW8XdWj.js → index-CqqwGTME.js} +34 -30
- package/dist/index-D0P16DlX.js +286 -0
- package/dist/index-DLdU7Tpd.js +183 -0
- package/dist/index-DWUXwgXK.js +809 -0
- package/dist/index-DmZOkMjs.js +3628 -0
- package/dist/{index-1CBpubM3.js → index-Dyl-ddV6.js} +47 -44
- package/dist/index-hoPiccJv.js +415 -0
- package/dist/index.js +61 -31
- package/dist/interface/address.d.ts +10 -0
- package/dist/interface/address.js +1 -0
- package/dist/interface/appointment.d.ts +57 -0
- package/dist/interface/appointment.js +5 -0
- package/dist/interface/appointmentV2.d.ts +65 -0
- package/dist/interface/appointmentV2.js +1 -0
- package/dist/interface/appointmentsState.d.ts +21 -0
- package/dist/interface/appointmentsState.js +1 -0
- package/dist/interface/common.d.ts +2 -0
- package/dist/interface/common.js +1 -0
- package/dist/interface/completionData.d.ts +18 -0
- package/dist/interface/completionData.js +1 -0
- package/dist/interface/deliveryPartner.d.ts +25 -0
- package/dist/interface/deliveryPartner.js +1 -0
- package/dist/interface/organization.d.ts +9 -0
- package/dist/interface/organization.js +1 -0
- package/dist/interface/pagination.d.ts +8 -0
- package/dist/interface/pagination.js +1 -0
- package/dist/interface/roles.d.ts +9 -0
- package/dist/interface/roles.js +1 -0
- package/dist/interface/route.d.ts +73 -0
- package/dist/interface/route.js +1 -0
- package/dist/interface/routeAnalysis.d.ts +108 -0
- package/dist/interface/routeAnalysis.js +1 -0
- package/dist/interface/routeAutomationJob.d.ts +95 -0
- package/dist/interface/routeAutomationJob.js +10 -0
- package/dist/interface/routeAutomationLog.d.ts +10 -0
- package/dist/interface/routeAutomationLog.js +1 -0
- package/dist/interface/routeEvent.d.ts +55 -0
- package/dist/interface/routeEvent.js +5 -0
- package/dist/interface/serviceArea.d.ts +18 -0
- package/dist/interface/serviceArea.js +1 -0
- package/dist/interface/util.d.ts +3 -0
- package/dist/interface/util.js +1 -0
- package/dist/interface/vehicle.d.ts +120 -0
- package/dist/interface/vehicle.js +1 -0
- package/dist/interface/workOrder.d.ts +22 -0
- package/dist/interface/workOrder.js +1 -0
- package/dist/isVisible-D3-B85BJ.js +22 -0
- package/dist/{magic-string.es-D2FWSwU3.js → magic-string.es-BKBb7z-1.js} +1 -1
- package/dist/omit-B_u6A-HL.js +9 -0
- package/dist/{pickAttrs-B0YTfcV1.js → pickAttrs-CleuMJFR.js} +1 -1
- package/dist/{warning-C63HNL9U.js → presets-Djh_L_6R.js} +333 -356
- package/dist/providers/BreakpointThemeProvider.d.ts +9 -0
- package/dist/providers/BreakpointThemeProvider.js +21 -0
- package/dist/providers/GenesisProvider.js +3 -3
- package/dist/providers/ToastProvider.js +22 -6
- package/dist/providers/index.js +1 -1
- package/dist/providers/useGenesis.js +2 -2
- package/dist/responsiveObserver-O1kw80RG.js +73 -0
- package/dist/setup-CKu7-AfI.js +24706 -0
- package/dist/setup.types-dBtAXXGp.js +8824 -0
- package/dist/shadow-BoMGMNn3.js +13 -0
- package/dist/styleChecker-Cotu61d0.js +21 -0
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +28 -12
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +1 -3
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +37 -16
- package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +0 -1
- package/dist/styles/theme/genesis-theme.js +468 -263
- package/dist/styles/theme/genesis-theme.types.d.ts +53 -12
- package/dist/styles/theme/theme-tree/ThemeTree.d.ts +1 -0
- package/dist/styles/theme/theme-tree/ThemeTree.js +1651 -0
- package/dist/styles/theme/theme-tree/ThemeTree.stories.d.ts +6 -0
- package/dist/{styles-CT_fyXBd.js → styles-BDbHpHsc.js} +587 -643
- package/dist/styles-BSD221S5.js +289 -0
- package/dist/styles-D9iYILpv.js +9195 -0
- package/dist/test/setup.d.ts +2 -3
- package/dist/test/setup.js +87 -4
- package/dist/test/setup.types.d.ts +7 -0
- package/dist/test/setup.types.js +1 -0
- package/dist/toArray-DGvPoJP_.js +11 -0
- package/dist/useBreakpoint-CAMzKscx.js +22 -0
- package/dist/useCSSVarCls-C-MlZC6a.js +11 -0
- package/dist/useId-D2tzlufo.js +26 -0
- package/dist/useLocale-DWRfeMSS.js +16 -0
- package/dist/useMergedState-BoELfaU9.js +23 -0
- package/dist/useSize-CPo2bUE3.js +9 -0
- package/dist/{useVariants-DvhXfgJY.js → useVariants-Cin23jEC.js} +3 -3
- package/dist/useZIndex-D81lkWy4.js +44 -0
- package/dist/utils/icon-util.d.ts +2 -0
- package/dist/utils/icon-util.js +95 -0
- package/package.json +26 -15
- package/dist/AntdIcon-BoLh1dP8.js +0 -202
- package/dist/ExclamationCircleFilled-C0Kj5KQV.js +0 -21
- package/dist/Typography-aGoDUl4R.js +0 -710
- package/dist/index-BZAhCB_K.js +0 -97
- package/dist/index-CfDY25LP.js +0 -873
- package/dist/isVisible-A-IfeFoT.js +0 -367
- package/dist/providers/ThemeProvider.d.ts +0 -9
- package/dist/providers/ThemeProvider.js +0 -21
- package/dist/setup-BvfREoHl.js +0 -33891
- package/dist/useLocale-DT-z_vQ6.js +0 -16
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/ASN.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/ASN.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Appointment.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Appointment.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Inventory.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Inventory.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Parcel.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Parcel.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Product.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Product.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Route.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Route.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Shipment.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/Shipment.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/ShoppingCart.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/ShoppingCart.js +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/System.d.ts +0 -0
- /package/dist/components/{Badge → Notification/NotificationBadge}/icons/System.js +0 -0
|
@@ -0,0 +1,1845 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import ra, { createContext as ia, useState as j, useRef as U, useEffect as ce, useMemo as Tt } from "react";
|
|
3
|
+
import { R as oa } from "./CloseOutlined-ogxnm7Oy.js";
|
|
4
|
+
import { E as la, M as ca, D as da, R as sa } from "./EllipsisOutlined-CJ2pgE2d.js";
|
|
5
|
+
import { d as fe, a as I, _ as ne, f as qe, b as Y, e as J, g as De, w as ua } from "./presets-Djh_L_6R.js";
|
|
6
|
+
import { I as fa } from "./AntdIcon-nCNB0J1E.js";
|
|
7
|
+
import { u as mt } from "./useMergedState-BoELfaU9.js";
|
|
8
|
+
import { a as va, g as ba } from "./index-DWUXwgXK.js";
|
|
9
|
+
import { B as pt, b as ma, a as pa, h as gt, z as ga, o as ha, e as Pt, g as $a, m as ya, j as $, q as Rt, r as It, t as Sa, k as Ue, C as _a } from "./index-ByspLxrB.js";
|
|
10
|
+
import { R as Xe } from "./index-CRotrkWm.js";
|
|
11
|
+
import { K as pe } from "./KeyCode-DM2sFh3-.js";
|
|
12
|
+
import { u as xa } from "./useCSSVarCls-C-MlZC6a.js";
|
|
13
|
+
import { u as Ca } from "./useSize-CPo2bUE3.js";
|
|
14
|
+
import { t as wa } from "./toArray-DGvPoJP_.js";
|
|
15
|
+
import "./index-DLdU7Tpd.js";
|
|
16
|
+
import { i as ht } from "./Overflow-DdNKJLQh.js";
|
|
17
|
+
var Ea = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" }, Ta = function(t, a) {
|
|
18
|
+
return /* @__PURE__ */ c.createElement(fa, fe({}, t, {
|
|
19
|
+
ref: a,
|
|
20
|
+
icon: Ea
|
|
21
|
+
}));
|
|
22
|
+
}, Nt = /* @__PURE__ */ c.forwardRef(Ta);
|
|
23
|
+
process.env.NODE_ENV !== "production" && (Nt.displayName = "PlusOutlined");
|
|
24
|
+
const Oe = /* @__PURE__ */ ia(null);
|
|
25
|
+
var Pa = function(t) {
|
|
26
|
+
var a = t.activeTabOffset, n = t.horizontal, r = t.rtl, o = t.indicator, l = o === void 0 ? {} : o, i = l.size, s = l.align, d = s === void 0 ? "center" : s, m = j(), b = I(m, 2), _ = b[0], R = b[1], O = U(), C = ra.useCallback(function(h) {
|
|
27
|
+
return typeof i == "function" ? i(h) : typeof i == "number" ? i : h;
|
|
28
|
+
}, [i]);
|
|
29
|
+
function z() {
|
|
30
|
+
pt.cancel(O.current);
|
|
31
|
+
}
|
|
32
|
+
return ce(function() {
|
|
33
|
+
var h = {};
|
|
34
|
+
if (a)
|
|
35
|
+
if (n) {
|
|
36
|
+
h.width = C(a.width);
|
|
37
|
+
var p = r ? "right" : "left";
|
|
38
|
+
d === "start" && (h[p] = a[p]), d === "center" && (h[p] = a[p] + a.width / 2, h.transform = r ? "translateX(50%)" : "translateX(-50%)"), d === "end" && (h[p] = a[p] + a.width, h.transform = "translateX(-100%)");
|
|
39
|
+
} else
|
|
40
|
+
h.height = C(a.height), d === "start" && (h.top = a.top), d === "center" && (h.top = a.top + a.height / 2, h.transform = "translateY(-50%)"), d === "end" && (h.top = a.top + a.height, h.transform = "translateY(-100%)");
|
|
41
|
+
return z(), O.current = pt(function() {
|
|
42
|
+
R(h);
|
|
43
|
+
}), z;
|
|
44
|
+
}, [a, n, r, d, C]), {
|
|
45
|
+
style: _
|
|
46
|
+
};
|
|
47
|
+
}, $t = {
|
|
48
|
+
width: 0,
|
|
49
|
+
height: 0,
|
|
50
|
+
left: 0,
|
|
51
|
+
top: 0
|
|
52
|
+
};
|
|
53
|
+
function Ra(e, t, a) {
|
|
54
|
+
return Tt(function() {
|
|
55
|
+
for (var n, r = /* @__PURE__ */ new Map(), o = t.get((n = e[0]) === null || n === void 0 ? void 0 : n.key) || $t, l = o.left + o.width, i = 0; i < e.length; i += 1) {
|
|
56
|
+
var s = e[i].key, d = t.get(s);
|
|
57
|
+
if (!d) {
|
|
58
|
+
var m;
|
|
59
|
+
d = t.get((m = e[i - 1]) === null || m === void 0 ? void 0 : m.key) || $t;
|
|
60
|
+
}
|
|
61
|
+
var b = r.get(s) || ne({}, d);
|
|
62
|
+
b.right = l - b.left - b.width, r.set(s, b);
|
|
63
|
+
}
|
|
64
|
+
return r;
|
|
65
|
+
}, [e.map(function(n) {
|
|
66
|
+
return n.key;
|
|
67
|
+
}).join("_"), t, a]);
|
|
68
|
+
}
|
|
69
|
+
function yt(e, t) {
|
|
70
|
+
var a = c.useRef(e), n = c.useState({}), r = I(n, 2), o = r[1];
|
|
71
|
+
function l(i) {
|
|
72
|
+
var s = typeof i == "function" ? i(a.current) : i;
|
|
73
|
+
s !== a.current && t(s, a.current), a.current = s, o({});
|
|
74
|
+
}
|
|
75
|
+
return [a.current, l];
|
|
76
|
+
}
|
|
77
|
+
var Ia = 0.1, St = 0.01, ze = 20, _t = Math.pow(0.995, ze);
|
|
78
|
+
function Na(e, t) {
|
|
79
|
+
var a = j(), n = I(a, 2), r = n[0], o = n[1], l = j(0), i = I(l, 2), s = i[0], d = i[1], m = j(0), b = I(m, 2), _ = b[0], R = b[1], O = j(), C = I(O, 2), z = C[0], h = C[1], p = U();
|
|
80
|
+
function P(x) {
|
|
81
|
+
var E = x.touches[0], v = E.screenX, y = E.screenY;
|
|
82
|
+
o({
|
|
83
|
+
x: v,
|
|
84
|
+
y
|
|
85
|
+
}), window.clearInterval(p.current);
|
|
86
|
+
}
|
|
87
|
+
function B(x) {
|
|
88
|
+
if (r) {
|
|
89
|
+
var E = x.touches[0], v = E.screenX, y = E.screenY;
|
|
90
|
+
o({
|
|
91
|
+
x: v,
|
|
92
|
+
y
|
|
93
|
+
});
|
|
94
|
+
var g = v - r.x, S = y - r.y;
|
|
95
|
+
t(g, S);
|
|
96
|
+
var K = Date.now();
|
|
97
|
+
d(K), R(K - s), h({
|
|
98
|
+
x: g,
|
|
99
|
+
y: S
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function A() {
|
|
104
|
+
if (r && (o(null), h(null), z)) {
|
|
105
|
+
var x = z.x / _, E = z.y / _, v = Math.abs(x), y = Math.abs(E);
|
|
106
|
+
if (Math.max(v, y) < Ia) return;
|
|
107
|
+
var g = x, S = E;
|
|
108
|
+
p.current = window.setInterval(function() {
|
|
109
|
+
if (Math.abs(g) < St && Math.abs(S) < St) {
|
|
110
|
+
window.clearInterval(p.current);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
g *= _t, S *= _t, t(g * ze, S * ze);
|
|
114
|
+
}, ze);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
var W = U();
|
|
118
|
+
function H(x) {
|
|
119
|
+
var E = x.deltaX, v = x.deltaY, y = 0, g = Math.abs(E), S = Math.abs(v);
|
|
120
|
+
g === S ? y = W.current === "x" ? E : v : g > S ? (y = E, W.current = "x") : (y = v, W.current = "y"), t(-y, -y) && x.preventDefault();
|
|
121
|
+
}
|
|
122
|
+
var L = U(null);
|
|
123
|
+
L.current = {
|
|
124
|
+
onTouchStart: P,
|
|
125
|
+
onTouchMove: B,
|
|
126
|
+
onTouchEnd: A,
|
|
127
|
+
onWheel: H
|
|
128
|
+
}, c.useEffect(function() {
|
|
129
|
+
function x(g) {
|
|
130
|
+
L.current.onTouchStart(g);
|
|
131
|
+
}
|
|
132
|
+
function E(g) {
|
|
133
|
+
L.current.onTouchMove(g);
|
|
134
|
+
}
|
|
135
|
+
function v(g) {
|
|
136
|
+
L.current.onTouchEnd(g);
|
|
137
|
+
}
|
|
138
|
+
function y(g) {
|
|
139
|
+
L.current.onWheel(g);
|
|
140
|
+
}
|
|
141
|
+
return document.addEventListener("touchmove", E, {
|
|
142
|
+
passive: !1
|
|
143
|
+
}), document.addEventListener("touchend", v, {
|
|
144
|
+
passive: !0
|
|
145
|
+
}), e.current.addEventListener("touchstart", x, {
|
|
146
|
+
passive: !0
|
|
147
|
+
}), e.current.addEventListener("wheel", y, {
|
|
148
|
+
passive: !1
|
|
149
|
+
}), function() {
|
|
150
|
+
document.removeEventListener("touchmove", E), document.removeEventListener("touchend", v);
|
|
151
|
+
};
|
|
152
|
+
}, []);
|
|
153
|
+
}
|
|
154
|
+
function Mt(e) {
|
|
155
|
+
var t = j(0), a = I(t, 2), n = a[0], r = a[1], o = U(0), l = U();
|
|
156
|
+
return l.current = e, ma(function() {
|
|
157
|
+
var i;
|
|
158
|
+
(i = l.current) === null || i === void 0 || i.call(l);
|
|
159
|
+
}, [n]), function() {
|
|
160
|
+
o.current === n && (o.current += 1, r(o.current));
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function Ma(e) {
|
|
164
|
+
var t = U([]), a = j({}), n = I(a, 2), r = n[1], o = U(typeof e == "function" ? e() : e), l = Mt(function() {
|
|
165
|
+
var s = o.current;
|
|
166
|
+
t.current.forEach(function(d) {
|
|
167
|
+
s = d(s);
|
|
168
|
+
}), t.current = [], o.current = s, r({});
|
|
169
|
+
});
|
|
170
|
+
function i(s) {
|
|
171
|
+
t.current.push(s), l();
|
|
172
|
+
}
|
|
173
|
+
return [o.current, i];
|
|
174
|
+
}
|
|
175
|
+
var xt = {
|
|
176
|
+
width: 0,
|
|
177
|
+
height: 0,
|
|
178
|
+
left: 0,
|
|
179
|
+
top: 0,
|
|
180
|
+
right: 0
|
|
181
|
+
};
|
|
182
|
+
function La(e, t, a, n, r, o, l) {
|
|
183
|
+
var i = l.tabs, s = l.tabPosition, d = l.rtl, m, b, _;
|
|
184
|
+
return ["top", "bottom"].includes(s) ? (m = "width", b = d ? "right" : "left", _ = Math.abs(a)) : (m = "height", b = "top", _ = -a), Tt(function() {
|
|
185
|
+
if (!i.length)
|
|
186
|
+
return [0, 0];
|
|
187
|
+
for (var R = i.length, O = R, C = 0; C < R; C += 1) {
|
|
188
|
+
var z = e.get(i[C].key) || xt;
|
|
189
|
+
if (Math.floor(z[b] + z[m]) > Math.floor(_ + t)) {
|
|
190
|
+
O = C - 1;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
for (var h = 0, p = R - 1; p >= 0; p -= 1) {
|
|
195
|
+
var P = e.get(i[p].key) || xt;
|
|
196
|
+
if (P[b] < _) {
|
|
197
|
+
h = p + 1;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return h >= O ? [0, 0] : [h, O];
|
|
202
|
+
}, [e, t, n, r, o, _, s, i.map(function(R) {
|
|
203
|
+
return R.key;
|
|
204
|
+
}).join("_"), d]);
|
|
205
|
+
}
|
|
206
|
+
function Ct(e) {
|
|
207
|
+
var t;
|
|
208
|
+
return e instanceof Map ? (t = {}, e.forEach(function(a, n) {
|
|
209
|
+
t[n] = a;
|
|
210
|
+
})) : t = e, JSON.stringify(t);
|
|
211
|
+
}
|
|
212
|
+
var za = "TABS_DQ";
|
|
213
|
+
function Lt(e) {
|
|
214
|
+
return String(e).replace(/"/g, za);
|
|
215
|
+
}
|
|
216
|
+
function Ye(e, t, a, n) {
|
|
217
|
+
return (
|
|
218
|
+
// Only editable tabs can be removed
|
|
219
|
+
!(!a || // Tabs cannot be removed when disabled
|
|
220
|
+
n || // closable is false
|
|
221
|
+
e === !1 || // If closable is undefined, the remove button should be hidden when closeIcon is null or false
|
|
222
|
+
e === void 0 && (t === !1 || t === null))
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
var zt = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
226
|
+
var a = e.prefixCls, n = e.editable, r = e.locale, o = e.style;
|
|
227
|
+
return !n || n.showAdd === !1 ? null : /* @__PURE__ */ c.createElement("button", {
|
|
228
|
+
ref: t,
|
|
229
|
+
type: "button",
|
|
230
|
+
className: "".concat(a, "-nav-add"),
|
|
231
|
+
style: o,
|
|
232
|
+
"aria-label": (r == null ? void 0 : r.addAriaLabel) || "Add tab",
|
|
233
|
+
onClick: function(i) {
|
|
234
|
+
n.onEdit("add", {
|
|
235
|
+
event: i
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}, n.addIcon || "+");
|
|
239
|
+
}), Fe = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
240
|
+
var a = e.position, n = e.prefixCls, r = e.extra;
|
|
241
|
+
if (!r)
|
|
242
|
+
return null;
|
|
243
|
+
var o, l = {};
|
|
244
|
+
return qe(r) === "object" && !/* @__PURE__ */ c.isValidElement(r) ? l = r : l.right = r, a === "right" && (o = l.right), a === "left" && (o = l.left), o ? /* @__PURE__ */ c.createElement("div", {
|
|
245
|
+
className: "".concat(n, "-extra-content"),
|
|
246
|
+
ref: t
|
|
247
|
+
}, o) : null;
|
|
248
|
+
});
|
|
249
|
+
process.env.NODE_ENV !== "production" && (Fe.displayName = "ExtraContent");
|
|
250
|
+
var Da = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
251
|
+
var a = e.prefixCls, n = e.id, r = e.tabs, o = e.locale, l = e.mobile, i = e.more, s = i === void 0 ? {} : i, d = e.style, m = e.className, b = e.editable, _ = e.tabBarGutter, R = e.rtl, O = e.removeAriaLabel, C = e.onTabClick, z = e.getPopupContainer, h = e.popupClassName, p = j(!1), P = I(p, 2), B = P[0], A = P[1], W = j(null), H = I(W, 2), L = H[0], x = H[1], E = s.icon, v = E === void 0 ? "More" : E, y = "".concat(n, "-more-popup"), g = "".concat(a, "-dropdown"), S = L !== null ? "".concat(y, "-").concat(L) : null, K = o == null ? void 0 : o.dropdownAriaLabel;
|
|
252
|
+
function X(w, k) {
|
|
253
|
+
w.preventDefault(), w.stopPropagation(), b.onEdit("remove", {
|
|
254
|
+
key: k,
|
|
255
|
+
event: w
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
var f = /* @__PURE__ */ c.createElement(la, {
|
|
259
|
+
onClick: function(k) {
|
|
260
|
+
var V = k.key, q = k.domEvent;
|
|
261
|
+
C(V, q), A(!1);
|
|
262
|
+
},
|
|
263
|
+
prefixCls: "".concat(g, "-menu"),
|
|
264
|
+
id: y,
|
|
265
|
+
tabIndex: -1,
|
|
266
|
+
role: "listbox",
|
|
267
|
+
"aria-activedescendant": S,
|
|
268
|
+
selectedKeys: [L],
|
|
269
|
+
"aria-label": K !== void 0 ? K : "expanded dropdown"
|
|
270
|
+
}, r.map(function(w) {
|
|
271
|
+
var k = w.closable, V = w.disabled, q = w.closeIcon, Z = w.key, re = w.label, ee = Ye(k, q, b, V);
|
|
272
|
+
return /* @__PURE__ */ c.createElement(ca, {
|
|
273
|
+
key: Z,
|
|
274
|
+
id: "".concat(y, "-").concat(Z),
|
|
275
|
+
role: "option",
|
|
276
|
+
"aria-controls": n && "".concat(n, "-panel-").concat(Z),
|
|
277
|
+
disabled: V
|
|
278
|
+
}, /* @__PURE__ */ c.createElement("span", null, re), ee && /* @__PURE__ */ c.createElement("button", {
|
|
279
|
+
type: "button",
|
|
280
|
+
"aria-label": O || "remove",
|
|
281
|
+
tabIndex: 0,
|
|
282
|
+
className: "".concat(g, "-menu-item-remove"),
|
|
283
|
+
onClick: function(be) {
|
|
284
|
+
be.stopPropagation(), X(be, Z);
|
|
285
|
+
}
|
|
286
|
+
}, q || b.removeIcon || "×"));
|
|
287
|
+
}));
|
|
288
|
+
function F(w) {
|
|
289
|
+
for (var k = r.filter(function(ee) {
|
|
290
|
+
return !ee.disabled;
|
|
291
|
+
}), V = k.findIndex(function(ee) {
|
|
292
|
+
return ee.key === L;
|
|
293
|
+
}) || 0, q = k.length, Z = 0; Z < q; Z += 1) {
|
|
294
|
+
V = (V + w + q) % q;
|
|
295
|
+
var re = k[V];
|
|
296
|
+
if (!re.disabled) {
|
|
297
|
+
x(re.key);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function de(w) {
|
|
303
|
+
var k = w.which;
|
|
304
|
+
if (!B) {
|
|
305
|
+
[pe.DOWN, pe.SPACE, pe.ENTER].includes(k) && (A(!0), w.preventDefault());
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
switch (k) {
|
|
309
|
+
case pe.UP:
|
|
310
|
+
F(-1), w.preventDefault();
|
|
311
|
+
break;
|
|
312
|
+
case pe.DOWN:
|
|
313
|
+
F(1), w.preventDefault();
|
|
314
|
+
break;
|
|
315
|
+
case pe.ESC:
|
|
316
|
+
A(!1);
|
|
317
|
+
break;
|
|
318
|
+
case pe.SPACE:
|
|
319
|
+
case pe.ENTER:
|
|
320
|
+
L !== null && C(L, w);
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
ce(function() {
|
|
325
|
+
var w = document.getElementById(S);
|
|
326
|
+
w && w.scrollIntoView && w.scrollIntoView(!1);
|
|
327
|
+
}, [L]), ce(function() {
|
|
328
|
+
B || x(null);
|
|
329
|
+
}, [B]);
|
|
330
|
+
var G = Y({}, R ? "marginRight" : "marginLeft", _);
|
|
331
|
+
r.length || (G.visibility = "hidden", G.order = 1);
|
|
332
|
+
var Q = J(Y({}, "".concat(g, "-rtl"), R)), ve = l ? null : /* @__PURE__ */ c.createElement(da, fe({
|
|
333
|
+
prefixCls: g,
|
|
334
|
+
overlay: f,
|
|
335
|
+
visible: r.length ? B : !1,
|
|
336
|
+
onVisibleChange: A,
|
|
337
|
+
overlayClassName: J(Q, h),
|
|
338
|
+
mouseEnterDelay: 0.1,
|
|
339
|
+
mouseLeaveDelay: 0.1,
|
|
340
|
+
getPopupContainer: z
|
|
341
|
+
}, s), /* @__PURE__ */ c.createElement("button", {
|
|
342
|
+
type: "button",
|
|
343
|
+
className: "".concat(a, "-nav-more"),
|
|
344
|
+
style: G,
|
|
345
|
+
tabIndex: -1,
|
|
346
|
+
"aria-hidden": "true",
|
|
347
|
+
"aria-haspopup": "listbox",
|
|
348
|
+
"aria-controls": y,
|
|
349
|
+
id: "".concat(n, "-more"),
|
|
350
|
+
"aria-expanded": B,
|
|
351
|
+
onKeyDown: de
|
|
352
|
+
}, v));
|
|
353
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
354
|
+
className: J("".concat(a, "-nav-operations"), m),
|
|
355
|
+
style: d,
|
|
356
|
+
ref: t
|
|
357
|
+
}, ve, /* @__PURE__ */ c.createElement(zt, {
|
|
358
|
+
prefixCls: a,
|
|
359
|
+
locale: o,
|
|
360
|
+
editable: b
|
|
361
|
+
}));
|
|
362
|
+
});
|
|
363
|
+
const Oa = /* @__PURE__ */ c.memo(Da, function(e, t) {
|
|
364
|
+
return (
|
|
365
|
+
// https://github.com/ant-design/ant-design/issues/32544
|
|
366
|
+
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
|
|
367
|
+
t.tabMoving
|
|
368
|
+
);
|
|
369
|
+
});
|
|
370
|
+
var Ba = function(t) {
|
|
371
|
+
var a = t.prefixCls, n = t.id, r = t.active, o = t.focus, l = t.tab, i = l.key, s = l.label, d = l.disabled, m = l.closeIcon, b = l.icon, _ = t.closable, R = t.renderWrapper, O = t.removeAriaLabel, C = t.editable, z = t.onClick, h = t.onFocus, p = t.onBlur, P = t.onKeyDown, B = t.onMouseDown, A = t.onMouseUp, W = t.style, H = t.tabCount, L = t.currentPosition, x = "".concat(a, "-tab"), E = Ye(_, m, C, d);
|
|
372
|
+
function v(X) {
|
|
373
|
+
d || z(X);
|
|
374
|
+
}
|
|
375
|
+
function y(X) {
|
|
376
|
+
X.preventDefault(), X.stopPropagation(), C.onEdit("remove", {
|
|
377
|
+
key: i,
|
|
378
|
+
event: X
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
var g = c.useMemo(function() {
|
|
382
|
+
return b && typeof s == "string" ? /* @__PURE__ */ c.createElement("span", null, s) : s;
|
|
383
|
+
}, [s, b]), S = c.useRef(null);
|
|
384
|
+
c.useEffect(function() {
|
|
385
|
+
o && S.current && S.current.focus();
|
|
386
|
+
}, [o]);
|
|
387
|
+
var K = /* @__PURE__ */ c.createElement("div", {
|
|
388
|
+
key: i,
|
|
389
|
+
"data-node-key": Lt(i),
|
|
390
|
+
className: J(x, Y(Y(Y(Y({}, "".concat(x, "-with-remove"), E), "".concat(x, "-active"), r), "".concat(x, "-disabled"), d), "".concat(x, "-focus"), o)),
|
|
391
|
+
style: W,
|
|
392
|
+
onClick: v
|
|
393
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
394
|
+
ref: S,
|
|
395
|
+
role: "tab",
|
|
396
|
+
"aria-selected": r,
|
|
397
|
+
id: n && "".concat(n, "-tab-").concat(i),
|
|
398
|
+
className: "".concat(x, "-btn"),
|
|
399
|
+
"aria-controls": n && "".concat(n, "-panel-").concat(i),
|
|
400
|
+
"aria-disabled": d,
|
|
401
|
+
tabIndex: d ? null : r ? 0 : -1,
|
|
402
|
+
onClick: function(f) {
|
|
403
|
+
f.stopPropagation(), v(f);
|
|
404
|
+
},
|
|
405
|
+
onKeyDown: P,
|
|
406
|
+
onMouseDown: B,
|
|
407
|
+
onMouseUp: A,
|
|
408
|
+
onFocus: h,
|
|
409
|
+
onBlur: p
|
|
410
|
+
}, o && /* @__PURE__ */ c.createElement("div", {
|
|
411
|
+
"aria-live": "polite",
|
|
412
|
+
style: {
|
|
413
|
+
width: 0,
|
|
414
|
+
height: 0,
|
|
415
|
+
position: "absolute",
|
|
416
|
+
overflow: "hidden",
|
|
417
|
+
opacity: 0
|
|
418
|
+
}
|
|
419
|
+
}, "Tab ".concat(L, " of ").concat(H)), b && /* @__PURE__ */ c.createElement("span", {
|
|
420
|
+
className: "".concat(x, "-icon")
|
|
421
|
+
}, b), s && g), E && /* @__PURE__ */ c.createElement("button", {
|
|
422
|
+
type: "button",
|
|
423
|
+
"aria-label": O || "remove",
|
|
424
|
+
tabIndex: r ? 0 : -1,
|
|
425
|
+
className: "".concat(x, "-remove"),
|
|
426
|
+
onClick: function(f) {
|
|
427
|
+
f.stopPropagation(), y(f);
|
|
428
|
+
}
|
|
429
|
+
}, m || C.removeIcon || "×"));
|
|
430
|
+
return R ? R(K) : K;
|
|
431
|
+
}, ka = function(t, a) {
|
|
432
|
+
var n = t.offsetWidth, r = t.offsetHeight, o = t.offsetTop, l = t.offsetLeft, i = t.getBoundingClientRect(), s = i.width, d = i.height, m = i.left, b = i.top;
|
|
433
|
+
return Math.abs(s - n) < 1 ? [s, d, m - a.left, b - a.top] : [n, r, l, o];
|
|
434
|
+
}, Ce = function(t) {
|
|
435
|
+
var a = t.current || {}, n = a.offsetWidth, r = n === void 0 ? 0 : n, o = a.offsetHeight, l = o === void 0 ? 0 : o;
|
|
436
|
+
if (t.current) {
|
|
437
|
+
var i = t.current.getBoundingClientRect(), s = i.width, d = i.height;
|
|
438
|
+
if (Math.abs(s - r) < 1)
|
|
439
|
+
return [s, d];
|
|
440
|
+
}
|
|
441
|
+
return [r, l];
|
|
442
|
+
}, Le = function(t, a) {
|
|
443
|
+
return t[a ? 0 : 1];
|
|
444
|
+
}, wt = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
445
|
+
var a = e.className, n = e.style, r = e.id, o = e.animated, l = e.activeKey, i = e.rtl, s = e.extra, d = e.editable, m = e.locale, b = e.tabPosition, _ = e.tabBarGutter, R = e.children, O = e.onTabClick, C = e.onTabScroll, z = e.indicator, h = c.useContext(Oe), p = h.prefixCls, P = h.tabs, B = U(null), A = U(null), W = U(null), H = U(null), L = U(null), x = U(null), E = U(null), v = b === "top" || b === "bottom", y = yt(0, function(T, u) {
|
|
446
|
+
v && C && C({
|
|
447
|
+
direction: T > u ? "left" : "right"
|
|
448
|
+
});
|
|
449
|
+
}), g = I(y, 2), S = g[0], K = g[1], X = yt(0, function(T, u) {
|
|
450
|
+
!v && C && C({
|
|
451
|
+
direction: T > u ? "top" : "bottom"
|
|
452
|
+
});
|
|
453
|
+
}), f = I(X, 2), F = f[0], de = f[1], G = j([0, 0]), Q = I(G, 2), ve = Q[0], w = Q[1], k = j([0, 0]), V = I(k, 2), q = V[0], Z = V[1], re = j([0, 0]), ee = I(re, 2), he = ee[0], be = ee[1], oe = j([0, 0]), $e = I(oe, 2), N = $e[0], se = $e[1], we = Ma(/* @__PURE__ */ new Map()), Ze = I(we, 2), At = Ze[0], Wt = Ze[1], Re = Ra(P, At, q[0]), Be = Le(ve, v), Ee = Le(q, v), ke = Le(he, v), Je = Le(N, v), et = Math.floor(Be) < Math.floor(Ee + ke), le = et ? Be - Je : Be - ke, Ht = "".concat(p, "-nav-operations-hidden"), me = 0, ge = 0;
|
|
454
|
+
v && i ? (me = 0, ge = Math.max(0, Ee - le)) : (me = Math.min(0, le - Ee), ge = 0);
|
|
455
|
+
function Ae(T) {
|
|
456
|
+
return T < me ? me : T > ge ? ge : T;
|
|
457
|
+
}
|
|
458
|
+
var We = U(null), jt = j(), tt = I(jt, 2), Ie = tt[0], at = tt[1];
|
|
459
|
+
function He() {
|
|
460
|
+
at(Date.now());
|
|
461
|
+
}
|
|
462
|
+
function je() {
|
|
463
|
+
We.current && clearTimeout(We.current);
|
|
464
|
+
}
|
|
465
|
+
Na(H, function(T, u) {
|
|
466
|
+
function M(D, ie) {
|
|
467
|
+
D(function(te) {
|
|
468
|
+
var _e = Ae(te + ie);
|
|
469
|
+
return _e;
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
return et ? (v ? M(K, T) : M(de, u), je(), He(), !0) : !1;
|
|
473
|
+
}), ce(function() {
|
|
474
|
+
return je(), Ie && (We.current = setTimeout(function() {
|
|
475
|
+
at(0);
|
|
476
|
+
}, 100)), je;
|
|
477
|
+
}, [Ie]);
|
|
478
|
+
var Gt = La(
|
|
479
|
+
Re,
|
|
480
|
+
// Container
|
|
481
|
+
le,
|
|
482
|
+
// Transform
|
|
483
|
+
v ? S : F,
|
|
484
|
+
// Tabs
|
|
485
|
+
Ee,
|
|
486
|
+
// Add
|
|
487
|
+
ke,
|
|
488
|
+
// Operation
|
|
489
|
+
Je,
|
|
490
|
+
ne(ne({}, e), {}, {
|
|
491
|
+
tabs: P
|
|
492
|
+
})
|
|
493
|
+
), nt = I(Gt, 2), Vt = nt[0], Kt = nt[1], rt = pa(function() {
|
|
494
|
+
var T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : l, u = Re.get(T) || {
|
|
495
|
+
width: 0,
|
|
496
|
+
height: 0,
|
|
497
|
+
left: 0,
|
|
498
|
+
right: 0,
|
|
499
|
+
top: 0
|
|
500
|
+
};
|
|
501
|
+
if (v) {
|
|
502
|
+
var M = S;
|
|
503
|
+
i ? u.right < S ? M = u.right : u.right + u.width > S + le && (M = u.right + u.width - le) : u.left < -S ? M = -u.left : u.left + u.width > -S + le && (M = -(u.left + u.width - le)), de(0), K(Ae(M));
|
|
504
|
+
} else {
|
|
505
|
+
var D = F;
|
|
506
|
+
u.top < -F ? D = -u.top : u.top + u.height > -F + le && (D = -(u.top + u.height - le)), K(0), de(Ae(D));
|
|
507
|
+
}
|
|
508
|
+
}), Xt = j(), it = I(Xt, 2), ye = it[0], Te = it[1], Ut = j(!1), ot = I(Ut, 2), Ft = ot[0], lt = ot[1], ue = P.filter(function(T) {
|
|
509
|
+
return !T.disabled;
|
|
510
|
+
}).map(function(T) {
|
|
511
|
+
return T.key;
|
|
512
|
+
}), Se = function(u) {
|
|
513
|
+
var M = ue.indexOf(ye || l), D = ue.length, ie = (M + u + D) % D, te = ue[ie];
|
|
514
|
+
Te(te);
|
|
515
|
+
}, qt = function(u) {
|
|
516
|
+
var M = u.code, D = i && v, ie = ue[0], te = ue[ue.length - 1];
|
|
517
|
+
switch (M) {
|
|
518
|
+
case "ArrowLeft": {
|
|
519
|
+
v && Se(D ? 1 : -1);
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
case "ArrowRight": {
|
|
523
|
+
v && Se(D ? -1 : 1);
|
|
524
|
+
break;
|
|
525
|
+
}
|
|
526
|
+
case "ArrowUp": {
|
|
527
|
+
u.preventDefault(), v || Se(-1);
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
case "ArrowDown": {
|
|
531
|
+
u.preventDefault(), v || Se(1);
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
case "Home": {
|
|
535
|
+
u.preventDefault(), Te(ie);
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
case "End": {
|
|
539
|
+
u.preventDefault(), Te(te);
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
case "Enter":
|
|
543
|
+
case "Space": {
|
|
544
|
+
u.preventDefault(), O(ye, u);
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
case "Backspace":
|
|
548
|
+
case "Delete": {
|
|
549
|
+
var _e = ue.indexOf(ye), ae = P.find(function(xe) {
|
|
550
|
+
return xe.key === ye;
|
|
551
|
+
}), Ke = Ye(ae == null ? void 0 : ae.closable, ae == null ? void 0 : ae.closeIcon, d, ae == null ? void 0 : ae.disabled);
|
|
552
|
+
Ke && (u.preventDefault(), u.stopPropagation(), d.onEdit("remove", {
|
|
553
|
+
key: ye,
|
|
554
|
+
event: u
|
|
555
|
+
}), _e === ue.length - 1 ? Se(-1) : Se(1));
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}, Ne = {};
|
|
560
|
+
v ? Ne[i ? "marginRight" : "marginLeft"] = _ : Ne.marginTop = _;
|
|
561
|
+
var ct = P.map(function(T, u) {
|
|
562
|
+
var M = T.key;
|
|
563
|
+
return /* @__PURE__ */ c.createElement(Ba, {
|
|
564
|
+
id: r,
|
|
565
|
+
prefixCls: p,
|
|
566
|
+
key: M,
|
|
567
|
+
tab: T,
|
|
568
|
+
style: u === 0 ? void 0 : Ne,
|
|
569
|
+
closable: T.closable,
|
|
570
|
+
editable: d,
|
|
571
|
+
active: M === l,
|
|
572
|
+
focus: M === ye,
|
|
573
|
+
renderWrapper: R,
|
|
574
|
+
removeAriaLabel: m == null ? void 0 : m.removeAriaLabel,
|
|
575
|
+
tabCount: ue.length,
|
|
576
|
+
currentPosition: u + 1,
|
|
577
|
+
onClick: function(ie) {
|
|
578
|
+
O(M, ie);
|
|
579
|
+
},
|
|
580
|
+
onKeyDown: qt,
|
|
581
|
+
onFocus: function() {
|
|
582
|
+
Ft || Te(M), rt(M), He(), H.current && (i || (H.current.scrollLeft = 0), H.current.scrollTop = 0);
|
|
583
|
+
},
|
|
584
|
+
onBlur: function() {
|
|
585
|
+
Te(void 0);
|
|
586
|
+
},
|
|
587
|
+
onMouseDown: function() {
|
|
588
|
+
lt(!0);
|
|
589
|
+
},
|
|
590
|
+
onMouseUp: function() {
|
|
591
|
+
lt(!1);
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
}), dt = function() {
|
|
595
|
+
return Wt(function() {
|
|
596
|
+
var u, M = /* @__PURE__ */ new Map(), D = (u = L.current) === null || u === void 0 ? void 0 : u.getBoundingClientRect();
|
|
597
|
+
return P.forEach(function(ie) {
|
|
598
|
+
var te, _e = ie.key, ae = (te = L.current) === null || te === void 0 ? void 0 : te.querySelector('[data-node-key="'.concat(Lt(_e), '"]'));
|
|
599
|
+
if (ae) {
|
|
600
|
+
var Ke = ka(ae, D), xe = I(Ke, 4), ea = xe[0], ta = xe[1], aa = xe[2], na = xe[3];
|
|
601
|
+
M.set(_e, {
|
|
602
|
+
width: ea,
|
|
603
|
+
height: ta,
|
|
604
|
+
left: aa,
|
|
605
|
+
top: na
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
}), M;
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
ce(function() {
|
|
612
|
+
dt();
|
|
613
|
+
}, [P.map(function(T) {
|
|
614
|
+
return T.key;
|
|
615
|
+
}).join("_")]);
|
|
616
|
+
var Me = Mt(function() {
|
|
617
|
+
var T = Ce(B), u = Ce(A), M = Ce(W);
|
|
618
|
+
w([T[0] - u[0] - M[0], T[1] - u[1] - M[1]]);
|
|
619
|
+
var D = Ce(E);
|
|
620
|
+
be(D);
|
|
621
|
+
var ie = Ce(x);
|
|
622
|
+
se(ie);
|
|
623
|
+
var te = Ce(L);
|
|
624
|
+
Z([te[0] - D[0], te[1] - D[1]]), dt();
|
|
625
|
+
}), Yt = P.slice(0, Vt), Qt = P.slice(Kt + 1), st = [].concat(gt(Yt), gt(Qt)), ut = Re.get(l), Zt = Pa({
|
|
626
|
+
activeTabOffset: ut,
|
|
627
|
+
horizontal: v,
|
|
628
|
+
indicator: z,
|
|
629
|
+
rtl: i
|
|
630
|
+
}), Jt = Zt.style;
|
|
631
|
+
ce(function() {
|
|
632
|
+
rt();
|
|
633
|
+
}, [l, me, ge, Ct(ut), Ct(Re), v]), ce(function() {
|
|
634
|
+
Me();
|
|
635
|
+
}, [i]);
|
|
636
|
+
var ft = !!st.length, Pe = "".concat(p, "-nav-wrap"), Ge, Ve, vt, bt;
|
|
637
|
+
return v ? i ? (Ve = S > 0, Ge = S !== ge) : (Ge = S < 0, Ve = S !== me) : (vt = F < 0, bt = F !== me), /* @__PURE__ */ c.createElement(Xe, {
|
|
638
|
+
onResize: Me
|
|
639
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
640
|
+
ref: ga(t, B),
|
|
641
|
+
role: "tablist",
|
|
642
|
+
"aria-orientation": v ? "horizontal" : "vertical",
|
|
643
|
+
className: J("".concat(p, "-nav"), a),
|
|
644
|
+
style: n,
|
|
645
|
+
onKeyDown: function() {
|
|
646
|
+
He();
|
|
647
|
+
}
|
|
648
|
+
}, /* @__PURE__ */ c.createElement(Fe, {
|
|
649
|
+
ref: A,
|
|
650
|
+
position: "left",
|
|
651
|
+
extra: s,
|
|
652
|
+
prefixCls: p
|
|
653
|
+
}), /* @__PURE__ */ c.createElement(Xe, {
|
|
654
|
+
onResize: Me
|
|
655
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
656
|
+
className: J(Pe, Y(Y(Y(Y({}, "".concat(Pe, "-ping-left"), Ge), "".concat(Pe, "-ping-right"), Ve), "".concat(Pe, "-ping-top"), vt), "".concat(Pe, "-ping-bottom"), bt)),
|
|
657
|
+
ref: H
|
|
658
|
+
}, /* @__PURE__ */ c.createElement(Xe, {
|
|
659
|
+
onResize: Me
|
|
660
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
661
|
+
ref: L,
|
|
662
|
+
className: "".concat(p, "-nav-list"),
|
|
663
|
+
style: {
|
|
664
|
+
transform: "translate(".concat(S, "px, ").concat(F, "px)"),
|
|
665
|
+
transition: Ie ? "none" : void 0
|
|
666
|
+
}
|
|
667
|
+
}, ct, /* @__PURE__ */ c.createElement(zt, {
|
|
668
|
+
ref: E,
|
|
669
|
+
prefixCls: p,
|
|
670
|
+
locale: m,
|
|
671
|
+
editable: d,
|
|
672
|
+
style: ne(ne({}, ct.length === 0 ? void 0 : Ne), {}, {
|
|
673
|
+
visibility: ft ? "hidden" : null
|
|
674
|
+
})
|
|
675
|
+
}), /* @__PURE__ */ c.createElement("div", {
|
|
676
|
+
className: J("".concat(p, "-ink-bar"), Y({}, "".concat(p, "-ink-bar-animated"), o.inkBar)),
|
|
677
|
+
style: Jt
|
|
678
|
+
}))))), /* @__PURE__ */ c.createElement(Oa, fe({}, e, {
|
|
679
|
+
removeAriaLabel: m == null ? void 0 : m.removeAriaLabel,
|
|
680
|
+
ref: x,
|
|
681
|
+
prefixCls: p,
|
|
682
|
+
tabs: st,
|
|
683
|
+
className: !ft && Ht,
|
|
684
|
+
tabMoving: !!Ie
|
|
685
|
+
})), /* @__PURE__ */ c.createElement(Fe, {
|
|
686
|
+
ref: W,
|
|
687
|
+
position: "right",
|
|
688
|
+
extra: s,
|
|
689
|
+
prefixCls: p
|
|
690
|
+
})));
|
|
691
|
+
}), Qe = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
692
|
+
var a = e.prefixCls, n = e.className, r = e.style, o = e.id, l = e.active, i = e.tabKey, s = e.children;
|
|
693
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
694
|
+
id: o && "".concat(o, "-panel-").concat(i),
|
|
695
|
+
role: "tabpanel",
|
|
696
|
+
tabIndex: l ? 0 : -1,
|
|
697
|
+
"aria-labelledby": o && "".concat(o, "-tab-").concat(i),
|
|
698
|
+
"aria-hidden": !l,
|
|
699
|
+
style: r,
|
|
700
|
+
className: J(a, l && "".concat(a, "-active"), n),
|
|
701
|
+
ref: t
|
|
702
|
+
}, s);
|
|
703
|
+
});
|
|
704
|
+
process.env.NODE_ENV !== "production" && (Qe.displayName = "TabPane");
|
|
705
|
+
var Aa = ["renderTabBar"], Wa = ["label", "key"], Dt = function(t) {
|
|
706
|
+
var a = t.renderTabBar, n = De(t, Aa), r = c.useContext(Oe), o = r.tabs;
|
|
707
|
+
if (a) {
|
|
708
|
+
var l = ne(ne({}, n), {}, {
|
|
709
|
+
// Legacy support. We do not use this actually
|
|
710
|
+
panes: o.map(function(i) {
|
|
711
|
+
var s = i.label, d = i.key, m = De(i, Wa);
|
|
712
|
+
return /* @__PURE__ */ c.createElement(Qe, fe({
|
|
713
|
+
tab: s,
|
|
714
|
+
key: d,
|
|
715
|
+
tabKey: d
|
|
716
|
+
}, m));
|
|
717
|
+
})
|
|
718
|
+
});
|
|
719
|
+
return a(l, wt);
|
|
720
|
+
}
|
|
721
|
+
return /* @__PURE__ */ c.createElement(wt, n);
|
|
722
|
+
};
|
|
723
|
+
process.env.NODE_ENV !== "production" && (Dt.displayName = "TabNavListWrapper");
|
|
724
|
+
var Ha = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"], ja = function(t) {
|
|
725
|
+
var a = t.id, n = t.activeKey, r = t.animated, o = t.tabPosition, l = t.destroyInactiveTabPane, i = c.useContext(Oe), s = i.prefixCls, d = i.tabs, m = r.tabPane, b = "".concat(s, "-tabpane");
|
|
726
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
727
|
+
className: J("".concat(s, "-content-holder"))
|
|
728
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
729
|
+
className: J("".concat(s, "-content"), "".concat(s, "-content-").concat(o), Y({}, "".concat(s, "-content-animated"), m))
|
|
730
|
+
}, d.map(function(_) {
|
|
731
|
+
var R = _.key, O = _.forceRender, C = _.style, z = _.className, h = _.destroyInactiveTabPane, p = De(_, Ha), P = R === n;
|
|
732
|
+
return /* @__PURE__ */ c.createElement(ha, fe({
|
|
733
|
+
key: R,
|
|
734
|
+
visible: P,
|
|
735
|
+
forceRender: O,
|
|
736
|
+
removeOnLeave: !!(l || h),
|
|
737
|
+
leavedClassName: "".concat(b, "-hidden")
|
|
738
|
+
}, r.tabPaneMotion), function(B, A) {
|
|
739
|
+
var W = B.style, H = B.className;
|
|
740
|
+
return /* @__PURE__ */ c.createElement(Qe, fe({}, p, {
|
|
741
|
+
prefixCls: b,
|
|
742
|
+
id: a,
|
|
743
|
+
tabKey: R,
|
|
744
|
+
animated: m,
|
|
745
|
+
active: P,
|
|
746
|
+
style: ne(ne({}, C), W),
|
|
747
|
+
className: J(z, H),
|
|
748
|
+
ref: A
|
|
749
|
+
}));
|
|
750
|
+
});
|
|
751
|
+
})));
|
|
752
|
+
};
|
|
753
|
+
function Ga() {
|
|
754
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
755
|
+
inkBar: !0,
|
|
756
|
+
tabPane: !1
|
|
757
|
+
}, t;
|
|
758
|
+
return e === !1 ? t = {
|
|
759
|
+
inkBar: !1,
|
|
760
|
+
tabPane: !1
|
|
761
|
+
} : e === !0 ? t = {
|
|
762
|
+
inkBar: !0,
|
|
763
|
+
tabPane: !1
|
|
764
|
+
} : t = ne({
|
|
765
|
+
inkBar: !0
|
|
766
|
+
}, qe(e) === "object" ? e : {}), t.tabPaneMotion && t.tabPane === void 0 && (t.tabPane = !0), !t.tabPaneMotion && t.tabPane && (process.env.NODE_ENV !== "production" && ua(!1, "`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."), t.tabPane = !1), t;
|
|
767
|
+
}
|
|
768
|
+
var Va = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"], Et = 0, Ot = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
769
|
+
var a = e.id, n = e.prefixCls, r = n === void 0 ? "rc-tabs" : n, o = e.className, l = e.items, i = e.direction, s = e.activeKey, d = e.defaultActiveKey, m = e.editable, b = e.animated, _ = e.tabPosition, R = _ === void 0 ? "top" : _, O = e.tabBarGutter, C = e.tabBarStyle, z = e.tabBarExtraContent, h = e.locale, p = e.more, P = e.destroyInactiveTabPane, B = e.renderTabBar, A = e.onChange, W = e.onTabClick, H = e.onTabScroll, L = e.getPopupContainer, x = e.popupClassName, E = e.indicator, v = De(e, Va), y = c.useMemo(function() {
|
|
770
|
+
return (l || []).filter(function(N) {
|
|
771
|
+
return N && qe(N) === "object" && "key" in N;
|
|
772
|
+
});
|
|
773
|
+
}, [l]), g = i === "rtl", S = Ga(b), K = j(!1), X = I(K, 2), f = X[0], F = X[1];
|
|
774
|
+
ce(function() {
|
|
775
|
+
F(va());
|
|
776
|
+
}, []);
|
|
777
|
+
var de = mt(function() {
|
|
778
|
+
var N;
|
|
779
|
+
return (N = y[0]) === null || N === void 0 ? void 0 : N.key;
|
|
780
|
+
}, {
|
|
781
|
+
value: s,
|
|
782
|
+
defaultValue: d
|
|
783
|
+
}), G = I(de, 2), Q = G[0], ve = G[1], w = j(function() {
|
|
784
|
+
return y.findIndex(function(N) {
|
|
785
|
+
return N.key === Q;
|
|
786
|
+
});
|
|
787
|
+
}), k = I(w, 2), V = k[0], q = k[1];
|
|
788
|
+
ce(function() {
|
|
789
|
+
var N = y.findIndex(function(we) {
|
|
790
|
+
return we.key === Q;
|
|
791
|
+
});
|
|
792
|
+
if (N === -1) {
|
|
793
|
+
var se;
|
|
794
|
+
N = Math.max(0, Math.min(V, y.length - 1)), ve((se = y[N]) === null || se === void 0 ? void 0 : se.key);
|
|
795
|
+
}
|
|
796
|
+
q(N);
|
|
797
|
+
}, [y.map(function(N) {
|
|
798
|
+
return N.key;
|
|
799
|
+
}).join("_"), Q, V]);
|
|
800
|
+
var Z = mt(null, {
|
|
801
|
+
value: a
|
|
802
|
+
}), re = I(Z, 2), ee = re[0], he = re[1];
|
|
803
|
+
ce(function() {
|
|
804
|
+
a || (he("rc-tabs-".concat(process.env.NODE_ENV === "test" ? "test" : Et)), Et += 1);
|
|
805
|
+
}, []);
|
|
806
|
+
function be(N, se) {
|
|
807
|
+
W == null || W(N, se);
|
|
808
|
+
var we = N !== Q;
|
|
809
|
+
ve(N), we && (A == null || A(N));
|
|
810
|
+
}
|
|
811
|
+
var oe = {
|
|
812
|
+
id: ee,
|
|
813
|
+
activeKey: Q,
|
|
814
|
+
animated: S,
|
|
815
|
+
tabPosition: R,
|
|
816
|
+
rtl: g,
|
|
817
|
+
mobile: f
|
|
818
|
+
}, $e = ne(ne({}, oe), {}, {
|
|
819
|
+
editable: m,
|
|
820
|
+
locale: h,
|
|
821
|
+
more: p,
|
|
822
|
+
tabBarGutter: O,
|
|
823
|
+
onTabClick: be,
|
|
824
|
+
onTabScroll: H,
|
|
825
|
+
extra: z,
|
|
826
|
+
style: C,
|
|
827
|
+
panes: null,
|
|
828
|
+
getPopupContainer: L,
|
|
829
|
+
popupClassName: x,
|
|
830
|
+
indicator: E
|
|
831
|
+
});
|
|
832
|
+
return /* @__PURE__ */ c.createElement(Oe.Provider, {
|
|
833
|
+
value: {
|
|
834
|
+
tabs: y,
|
|
835
|
+
prefixCls: r
|
|
836
|
+
}
|
|
837
|
+
}, /* @__PURE__ */ c.createElement("div", fe({
|
|
838
|
+
ref: t,
|
|
839
|
+
id: a,
|
|
840
|
+
className: J(r, "".concat(r, "-").concat(R), Y(Y(Y({}, "".concat(r, "-mobile"), f), "".concat(r, "-editable"), m), "".concat(r, "-rtl"), g), o)
|
|
841
|
+
}, v), /* @__PURE__ */ c.createElement(Dt, fe({}, $e, {
|
|
842
|
+
renderTabBar: B
|
|
843
|
+
})), /* @__PURE__ */ c.createElement(ja, fe({
|
|
844
|
+
destroyInactiveTabPane: P
|
|
845
|
+
}, oe, {
|
|
846
|
+
animated: S
|
|
847
|
+
}))));
|
|
848
|
+
});
|
|
849
|
+
process.env.NODE_ENV !== "production" && (Ot.displayName = "Tabs");
|
|
850
|
+
const Ka = {
|
|
851
|
+
motionAppear: !1,
|
|
852
|
+
motionEnter: !0,
|
|
853
|
+
motionLeave: !0
|
|
854
|
+
};
|
|
855
|
+
function Xa(e) {
|
|
856
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
857
|
+
inkBar: !0,
|
|
858
|
+
tabPane: !1
|
|
859
|
+
}, a;
|
|
860
|
+
return t === !1 ? a = {
|
|
861
|
+
inkBar: !1,
|
|
862
|
+
tabPane: !1
|
|
863
|
+
} : t === !0 ? a = {
|
|
864
|
+
inkBar: !0,
|
|
865
|
+
tabPane: !0
|
|
866
|
+
} : a = Object.assign({
|
|
867
|
+
inkBar: !0
|
|
868
|
+
}, typeof t == "object" ? t : {}), a.tabPane && (a.tabPaneMotion = Object.assign(Object.assign({}, Ka), {
|
|
869
|
+
motionName: ba(e, "switch")
|
|
870
|
+
})), a;
|
|
871
|
+
}
|
|
872
|
+
var Ua = function(e, t) {
|
|
873
|
+
var a = {};
|
|
874
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
875
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
876
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
877
|
+
return a;
|
|
878
|
+
};
|
|
879
|
+
function Fa(e) {
|
|
880
|
+
return e.filter((t) => t);
|
|
881
|
+
}
|
|
882
|
+
function qa(e, t) {
|
|
883
|
+
if (process.env.NODE_ENV !== "production" && Pt("Tabs").deprecated(!t, "Tabs.TabPane", "items"), e)
|
|
884
|
+
return e;
|
|
885
|
+
const a = wa(t).map((n) => {
|
|
886
|
+
if (/* @__PURE__ */ c.isValidElement(n)) {
|
|
887
|
+
const {
|
|
888
|
+
key: r,
|
|
889
|
+
props: o
|
|
890
|
+
} = n, l = o || {}, {
|
|
891
|
+
tab: i
|
|
892
|
+
} = l, s = Ua(l, ["tab"]);
|
|
893
|
+
return Object.assign(Object.assign({
|
|
894
|
+
key: String(r)
|
|
895
|
+
}, s), {
|
|
896
|
+
label: i
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
return null;
|
|
900
|
+
});
|
|
901
|
+
return Fa(a);
|
|
902
|
+
}
|
|
903
|
+
const Ya = (e) => {
|
|
904
|
+
const {
|
|
905
|
+
componentCls: t,
|
|
906
|
+
motionDurationSlow: a
|
|
907
|
+
} = e;
|
|
908
|
+
return [
|
|
909
|
+
{
|
|
910
|
+
[t]: {
|
|
911
|
+
[`${t}-switch`]: {
|
|
912
|
+
"&-appear, &-enter": {
|
|
913
|
+
transition: "none",
|
|
914
|
+
"&-start": {
|
|
915
|
+
opacity: 0
|
|
916
|
+
},
|
|
917
|
+
"&-active": {
|
|
918
|
+
opacity: 1,
|
|
919
|
+
transition: `opacity ${a}`
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
"&-leave": {
|
|
923
|
+
position: "absolute",
|
|
924
|
+
transition: "none",
|
|
925
|
+
inset: 0,
|
|
926
|
+
"&-start": {
|
|
927
|
+
opacity: 1
|
|
928
|
+
},
|
|
929
|
+
"&-active": {
|
|
930
|
+
opacity: 0,
|
|
931
|
+
transition: `opacity ${a}`
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
// Follow code may reuse in other components
|
|
938
|
+
[ht(e, "slide-up"), ht(e, "slide-down")]
|
|
939
|
+
];
|
|
940
|
+
}, Qa = (e) => {
|
|
941
|
+
const {
|
|
942
|
+
componentCls: t,
|
|
943
|
+
tabsCardPadding: a,
|
|
944
|
+
cardBg: n,
|
|
945
|
+
cardGutter: r,
|
|
946
|
+
colorBorderSecondary: o,
|
|
947
|
+
itemSelectedColor: l
|
|
948
|
+
} = e;
|
|
949
|
+
return {
|
|
950
|
+
[`${t}-card`]: {
|
|
951
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
952
|
+
[`${t}-tab`]: {
|
|
953
|
+
margin: 0,
|
|
954
|
+
padding: a,
|
|
955
|
+
background: n,
|
|
956
|
+
border: `${$(e.lineWidth)} ${e.lineType} ${o}`,
|
|
957
|
+
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
|
|
958
|
+
},
|
|
959
|
+
[`${t}-tab-active`]: {
|
|
960
|
+
color: l,
|
|
961
|
+
background: e.colorBgContainer
|
|
962
|
+
},
|
|
963
|
+
[`${t}-tab-focus`]: Object.assign({}, Rt(e, -3)),
|
|
964
|
+
[`${t}-ink-bar`]: {
|
|
965
|
+
visibility: "hidden"
|
|
966
|
+
},
|
|
967
|
+
[`& ${t}-tab${t}-tab-focus ${t}-tab-btn`]: {
|
|
968
|
+
outline: "none"
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
// ========================== Top & Bottom ==========================
|
|
972
|
+
[`&${t}-top, &${t}-bottom`]: {
|
|
973
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
974
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
975
|
+
marginLeft: {
|
|
976
|
+
_skip_check_: !0,
|
|
977
|
+
value: $(r)
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
[`&${t}-top`]: {
|
|
983
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
984
|
+
[`${t}-tab`]: {
|
|
985
|
+
borderRadius: `${$(e.borderRadiusLG)} ${$(e.borderRadiusLG)} 0 0`
|
|
986
|
+
},
|
|
987
|
+
[`${t}-tab-active`]: {
|
|
988
|
+
borderBottomColor: e.colorBgContainer
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
[`&${t}-bottom`]: {
|
|
993
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
994
|
+
[`${t}-tab`]: {
|
|
995
|
+
borderRadius: `0 0 ${$(e.borderRadiusLG)} ${$(e.borderRadiusLG)}`
|
|
996
|
+
},
|
|
997
|
+
[`${t}-tab-active`]: {
|
|
998
|
+
borderTopColor: e.colorBgContainer
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
// ========================== Left & Right ==========================
|
|
1003
|
+
[`&${t}-left, &${t}-right`]: {
|
|
1004
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1005
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
1006
|
+
marginTop: $(r)
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
[`&${t}-left`]: {
|
|
1011
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1012
|
+
[`${t}-tab`]: {
|
|
1013
|
+
borderRadius: {
|
|
1014
|
+
_skip_check_: !0,
|
|
1015
|
+
value: `${$(e.borderRadiusLG)} 0 0 ${$(e.borderRadiusLG)}`
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
[`${t}-tab-active`]: {
|
|
1019
|
+
borderRightColor: {
|
|
1020
|
+
_skip_check_: !0,
|
|
1021
|
+
value: e.colorBgContainer
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
[`&${t}-right`]: {
|
|
1027
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1028
|
+
[`${t}-tab`]: {
|
|
1029
|
+
borderRadius: {
|
|
1030
|
+
_skip_check_: !0,
|
|
1031
|
+
value: `0 ${$(e.borderRadiusLG)} ${$(e.borderRadiusLG)} 0`
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
[`${t}-tab-active`]: {
|
|
1035
|
+
borderLeftColor: {
|
|
1036
|
+
_skip_check_: !0,
|
|
1037
|
+
value: e.colorBgContainer
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
}, Za = (e) => {
|
|
1045
|
+
const {
|
|
1046
|
+
componentCls: t,
|
|
1047
|
+
itemHoverColor: a,
|
|
1048
|
+
dropdownEdgeChildVerticalPadding: n
|
|
1049
|
+
} = e;
|
|
1050
|
+
return {
|
|
1051
|
+
[`${t}-dropdown`]: Object.assign(Object.assign({}, It(e)), {
|
|
1052
|
+
position: "absolute",
|
|
1053
|
+
top: -9999,
|
|
1054
|
+
left: {
|
|
1055
|
+
_skip_check_: !0,
|
|
1056
|
+
value: -9999
|
|
1057
|
+
},
|
|
1058
|
+
zIndex: e.zIndexPopup,
|
|
1059
|
+
display: "block",
|
|
1060
|
+
"&-hidden": {
|
|
1061
|
+
display: "none"
|
|
1062
|
+
},
|
|
1063
|
+
[`${t}-dropdown-menu`]: {
|
|
1064
|
+
maxHeight: e.tabsDropdownHeight,
|
|
1065
|
+
margin: 0,
|
|
1066
|
+
padding: `${$(n)} 0`,
|
|
1067
|
+
overflowX: "hidden",
|
|
1068
|
+
overflowY: "auto",
|
|
1069
|
+
textAlign: {
|
|
1070
|
+
_skip_check_: !0,
|
|
1071
|
+
value: "left"
|
|
1072
|
+
},
|
|
1073
|
+
listStyleType: "none",
|
|
1074
|
+
backgroundColor: e.colorBgContainer,
|
|
1075
|
+
backgroundClip: "padding-box",
|
|
1076
|
+
borderRadius: e.borderRadiusLG,
|
|
1077
|
+
outline: "none",
|
|
1078
|
+
boxShadow: e.boxShadowSecondary,
|
|
1079
|
+
"&-item": Object.assign(Object.assign({}, Sa), {
|
|
1080
|
+
display: "flex",
|
|
1081
|
+
alignItems: "center",
|
|
1082
|
+
minWidth: e.tabsDropdownWidth,
|
|
1083
|
+
margin: 0,
|
|
1084
|
+
padding: `${$(e.paddingXXS)} ${$(e.paddingSM)}`,
|
|
1085
|
+
color: e.colorText,
|
|
1086
|
+
fontWeight: "normal",
|
|
1087
|
+
fontSize: e.fontSize,
|
|
1088
|
+
lineHeight: e.lineHeight,
|
|
1089
|
+
cursor: "pointer",
|
|
1090
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
1091
|
+
"> span": {
|
|
1092
|
+
flex: 1,
|
|
1093
|
+
whiteSpace: "nowrap"
|
|
1094
|
+
},
|
|
1095
|
+
"&-remove": {
|
|
1096
|
+
flex: "none",
|
|
1097
|
+
marginLeft: {
|
|
1098
|
+
_skip_check_: !0,
|
|
1099
|
+
value: e.marginSM
|
|
1100
|
+
},
|
|
1101
|
+
color: e.colorTextDescription,
|
|
1102
|
+
fontSize: e.fontSizeSM,
|
|
1103
|
+
background: "transparent",
|
|
1104
|
+
border: 0,
|
|
1105
|
+
cursor: "pointer",
|
|
1106
|
+
"&:hover": {
|
|
1107
|
+
color: a
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
"&:hover": {
|
|
1111
|
+
background: e.controlItemBgHover
|
|
1112
|
+
},
|
|
1113
|
+
"&-disabled": {
|
|
1114
|
+
"&, &:hover": {
|
|
1115
|
+
color: e.colorTextDisabled,
|
|
1116
|
+
background: "transparent",
|
|
1117
|
+
cursor: "not-allowed"
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
})
|
|
1121
|
+
}
|
|
1122
|
+
})
|
|
1123
|
+
};
|
|
1124
|
+
}, Ja = (e) => {
|
|
1125
|
+
const {
|
|
1126
|
+
componentCls: t,
|
|
1127
|
+
margin: a,
|
|
1128
|
+
colorBorderSecondary: n,
|
|
1129
|
+
horizontalMargin: r,
|
|
1130
|
+
verticalItemPadding: o,
|
|
1131
|
+
verticalItemMargin: l,
|
|
1132
|
+
calc: i
|
|
1133
|
+
} = e;
|
|
1134
|
+
return {
|
|
1135
|
+
// ========================== Top & Bottom ==========================
|
|
1136
|
+
[`${t}-top, ${t}-bottom`]: {
|
|
1137
|
+
flexDirection: "column",
|
|
1138
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1139
|
+
margin: r,
|
|
1140
|
+
"&::before": {
|
|
1141
|
+
position: "absolute",
|
|
1142
|
+
right: {
|
|
1143
|
+
_skip_check_: !0,
|
|
1144
|
+
value: 0
|
|
1145
|
+
},
|
|
1146
|
+
left: {
|
|
1147
|
+
_skip_check_: !0,
|
|
1148
|
+
value: 0
|
|
1149
|
+
},
|
|
1150
|
+
borderBottom: `${$(e.lineWidth)} ${e.lineType} ${n}`,
|
|
1151
|
+
content: "''"
|
|
1152
|
+
},
|
|
1153
|
+
[`${t}-ink-bar`]: {
|
|
1154
|
+
height: e.lineWidthBold,
|
|
1155
|
+
"&-animated": {
|
|
1156
|
+
transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
|
|
1157
|
+
right ${e.motionDurationSlow}`
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
[`${t}-nav-wrap`]: {
|
|
1161
|
+
"&::before, &::after": {
|
|
1162
|
+
top: 0,
|
|
1163
|
+
bottom: 0,
|
|
1164
|
+
width: e.controlHeight
|
|
1165
|
+
},
|
|
1166
|
+
"&::before": {
|
|
1167
|
+
left: {
|
|
1168
|
+
_skip_check_: !0,
|
|
1169
|
+
value: 0
|
|
1170
|
+
},
|
|
1171
|
+
boxShadow: e.boxShadowTabsOverflowLeft
|
|
1172
|
+
},
|
|
1173
|
+
"&::after": {
|
|
1174
|
+
right: {
|
|
1175
|
+
_skip_check_: !0,
|
|
1176
|
+
value: 0
|
|
1177
|
+
},
|
|
1178
|
+
boxShadow: e.boxShadowTabsOverflowRight
|
|
1179
|
+
},
|
|
1180
|
+
[`&${t}-nav-wrap-ping-left::before`]: {
|
|
1181
|
+
opacity: 1
|
|
1182
|
+
},
|
|
1183
|
+
[`&${t}-nav-wrap-ping-right::after`]: {
|
|
1184
|
+
opacity: 1
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
[`${t}-top`]: {
|
|
1190
|
+
[`> ${t}-nav,
|
|
1191
|
+
> div > ${t}-nav`]: {
|
|
1192
|
+
"&::before": {
|
|
1193
|
+
bottom: 0
|
|
1194
|
+
},
|
|
1195
|
+
[`${t}-ink-bar`]: {
|
|
1196
|
+
bottom: 0
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
[`${t}-bottom`]: {
|
|
1201
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1202
|
+
order: 1,
|
|
1203
|
+
marginTop: a,
|
|
1204
|
+
marginBottom: 0,
|
|
1205
|
+
"&::before": {
|
|
1206
|
+
top: 0
|
|
1207
|
+
},
|
|
1208
|
+
[`${t}-ink-bar`]: {
|
|
1209
|
+
top: 0
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1212
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1213
|
+
order: 0
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
// ========================== Left & Right ==========================
|
|
1217
|
+
[`${t}-left, ${t}-right`]: {
|
|
1218
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1219
|
+
flexDirection: "column",
|
|
1220
|
+
minWidth: i(e.controlHeight).mul(1.25).equal(),
|
|
1221
|
+
// >>>>>>>>>>> Tab
|
|
1222
|
+
[`${t}-tab`]: {
|
|
1223
|
+
padding: o,
|
|
1224
|
+
textAlign: "center"
|
|
1225
|
+
},
|
|
1226
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
1227
|
+
margin: l
|
|
1228
|
+
},
|
|
1229
|
+
// >>>>>>>>>>> Nav
|
|
1230
|
+
[`${t}-nav-wrap`]: {
|
|
1231
|
+
flexDirection: "column",
|
|
1232
|
+
"&::before, &::after": {
|
|
1233
|
+
right: {
|
|
1234
|
+
_skip_check_: !0,
|
|
1235
|
+
value: 0
|
|
1236
|
+
},
|
|
1237
|
+
left: {
|
|
1238
|
+
_skip_check_: !0,
|
|
1239
|
+
value: 0
|
|
1240
|
+
},
|
|
1241
|
+
height: e.controlHeight
|
|
1242
|
+
},
|
|
1243
|
+
"&::before": {
|
|
1244
|
+
top: 0,
|
|
1245
|
+
boxShadow: e.boxShadowTabsOverflowTop
|
|
1246
|
+
},
|
|
1247
|
+
"&::after": {
|
|
1248
|
+
bottom: 0,
|
|
1249
|
+
boxShadow: e.boxShadowTabsOverflowBottom
|
|
1250
|
+
},
|
|
1251
|
+
[`&${t}-nav-wrap-ping-top::before`]: {
|
|
1252
|
+
opacity: 1
|
|
1253
|
+
},
|
|
1254
|
+
[`&${t}-nav-wrap-ping-bottom::after`]: {
|
|
1255
|
+
opacity: 1
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
// >>>>>>>>>>> Ink Bar
|
|
1259
|
+
[`${t}-ink-bar`]: {
|
|
1260
|
+
width: e.lineWidthBold,
|
|
1261
|
+
"&-animated": {
|
|
1262
|
+
transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
[`${t}-nav-list, ${t}-nav-operations`]: {
|
|
1266
|
+
flex: "1 0 auto",
|
|
1267
|
+
// fix safari scroll problem
|
|
1268
|
+
flexDirection: "column"
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
[`${t}-left`]: {
|
|
1273
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1274
|
+
[`${t}-ink-bar`]: {
|
|
1275
|
+
right: {
|
|
1276
|
+
_skip_check_: !0,
|
|
1277
|
+
value: 0
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1282
|
+
marginLeft: {
|
|
1283
|
+
_skip_check_: !0,
|
|
1284
|
+
value: $(i(e.lineWidth).mul(-1).equal())
|
|
1285
|
+
},
|
|
1286
|
+
borderLeft: {
|
|
1287
|
+
_skip_check_: !0,
|
|
1288
|
+
value: `${$(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
1289
|
+
},
|
|
1290
|
+
[`> ${t}-content > ${t}-tabpane`]: {
|
|
1291
|
+
paddingLeft: {
|
|
1292
|
+
_skip_check_: !0,
|
|
1293
|
+
value: e.paddingLG
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
[`${t}-right`]: {
|
|
1299
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1300
|
+
order: 1,
|
|
1301
|
+
[`${t}-ink-bar`]: {
|
|
1302
|
+
left: {
|
|
1303
|
+
_skip_check_: !0,
|
|
1304
|
+
value: 0
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1309
|
+
order: 0,
|
|
1310
|
+
marginRight: {
|
|
1311
|
+
_skip_check_: !0,
|
|
1312
|
+
value: i(e.lineWidth).mul(-1).equal()
|
|
1313
|
+
},
|
|
1314
|
+
borderRight: {
|
|
1315
|
+
_skip_check_: !0,
|
|
1316
|
+
value: `${$(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
1317
|
+
},
|
|
1318
|
+
[`> ${t}-content > ${t}-tabpane`]: {
|
|
1319
|
+
paddingRight: {
|
|
1320
|
+
_skip_check_: !0,
|
|
1321
|
+
value: e.paddingLG
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
}, en = (e) => {
|
|
1328
|
+
const {
|
|
1329
|
+
componentCls: t,
|
|
1330
|
+
cardPaddingSM: a,
|
|
1331
|
+
cardPaddingLG: n,
|
|
1332
|
+
horizontalItemPaddingSM: r,
|
|
1333
|
+
horizontalItemPaddingLG: o
|
|
1334
|
+
} = e;
|
|
1335
|
+
return {
|
|
1336
|
+
[t]: {
|
|
1337
|
+
"&-small": {
|
|
1338
|
+
[`> ${t}-nav`]: {
|
|
1339
|
+
[`${t}-tab`]: {
|
|
1340
|
+
padding: r,
|
|
1341
|
+
fontSize: e.titleFontSizeSM
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"&-large": {
|
|
1346
|
+
[`> ${t}-nav`]: {
|
|
1347
|
+
[`${t}-tab`]: {
|
|
1348
|
+
padding: o,
|
|
1349
|
+
fontSize: e.titleFontSizeLG
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
[`${t}-card`]: {
|
|
1355
|
+
[`&${t}-small`]: {
|
|
1356
|
+
[`> ${t}-nav`]: {
|
|
1357
|
+
[`${t}-tab`]: {
|
|
1358
|
+
padding: a
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
[`&${t}-bottom`]: {
|
|
1362
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
1363
|
+
borderRadius: `0 0 ${$(e.borderRadius)} ${$(e.borderRadius)}`
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
[`&${t}-top`]: {
|
|
1367
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
1368
|
+
borderRadius: `${$(e.borderRadius)} ${$(e.borderRadius)} 0 0`
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
[`&${t}-right`]: {
|
|
1372
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
1373
|
+
borderRadius: {
|
|
1374
|
+
_skip_check_: !0,
|
|
1375
|
+
value: `0 ${$(e.borderRadius)} ${$(e.borderRadius)} 0`
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
[`&${t}-left`]: {
|
|
1380
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
1381
|
+
borderRadius: {
|
|
1382
|
+
_skip_check_: !0,
|
|
1383
|
+
value: `${$(e.borderRadius)} 0 0 ${$(e.borderRadius)}`
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
[`&${t}-large`]: {
|
|
1389
|
+
[`> ${t}-nav`]: {
|
|
1390
|
+
[`${t}-tab`]: {
|
|
1391
|
+
padding: n
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
}, tn = (e) => {
|
|
1398
|
+
const {
|
|
1399
|
+
componentCls: t,
|
|
1400
|
+
itemActiveColor: a,
|
|
1401
|
+
itemHoverColor: n,
|
|
1402
|
+
iconCls: r,
|
|
1403
|
+
tabsHorizontalItemMargin: o,
|
|
1404
|
+
horizontalItemPadding: l,
|
|
1405
|
+
itemSelectedColor: i,
|
|
1406
|
+
itemColor: s
|
|
1407
|
+
} = e, d = `${t}-tab`;
|
|
1408
|
+
return {
|
|
1409
|
+
[d]: {
|
|
1410
|
+
position: "relative",
|
|
1411
|
+
WebkitTouchCallout: "none",
|
|
1412
|
+
WebkitTapHighlightColor: "transparent",
|
|
1413
|
+
display: "inline-flex",
|
|
1414
|
+
alignItems: "center",
|
|
1415
|
+
padding: l,
|
|
1416
|
+
fontSize: e.titleFontSize,
|
|
1417
|
+
background: "transparent",
|
|
1418
|
+
border: 0,
|
|
1419
|
+
outline: "none",
|
|
1420
|
+
cursor: "pointer",
|
|
1421
|
+
color: s,
|
|
1422
|
+
"&-btn, &-remove": {
|
|
1423
|
+
"&:focus:not(:focus-visible), &:active": {
|
|
1424
|
+
color: a
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"&-btn": {
|
|
1428
|
+
outline: "none",
|
|
1429
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
1430
|
+
[`${d}-icon:not(:last-child)`]: {
|
|
1431
|
+
marginInlineEnd: e.marginSM
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1434
|
+
"&-remove": Object.assign({
|
|
1435
|
+
flex: "none",
|
|
1436
|
+
marginRight: {
|
|
1437
|
+
_skip_check_: !0,
|
|
1438
|
+
value: e.calc(e.marginXXS).mul(-1).equal()
|
|
1439
|
+
},
|
|
1440
|
+
marginLeft: {
|
|
1441
|
+
_skip_check_: !0,
|
|
1442
|
+
value: e.marginXS
|
|
1443
|
+
},
|
|
1444
|
+
color: e.colorTextDescription,
|
|
1445
|
+
fontSize: e.fontSizeSM,
|
|
1446
|
+
background: "transparent",
|
|
1447
|
+
border: "none",
|
|
1448
|
+
outline: "none",
|
|
1449
|
+
cursor: "pointer",
|
|
1450
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
1451
|
+
"&:hover": {
|
|
1452
|
+
color: e.colorTextHeading
|
|
1453
|
+
}
|
|
1454
|
+
}, Ue(e)),
|
|
1455
|
+
"&:hover": {
|
|
1456
|
+
color: n
|
|
1457
|
+
},
|
|
1458
|
+
[`&${d}-active ${d}-btn`]: {
|
|
1459
|
+
color: i,
|
|
1460
|
+
textShadow: e.tabsActiveTextShadow
|
|
1461
|
+
},
|
|
1462
|
+
[`&${d}-focus ${d}-btn`]: Object.assign({}, Rt(e)),
|
|
1463
|
+
[`&${d}-disabled`]: {
|
|
1464
|
+
color: e.colorTextDisabled,
|
|
1465
|
+
cursor: "not-allowed"
|
|
1466
|
+
},
|
|
1467
|
+
[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]: {
|
|
1468
|
+
"&:focus, &:active": {
|
|
1469
|
+
color: e.colorTextDisabled
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
[`& ${d}-remove ${r}`]: {
|
|
1473
|
+
margin: 0
|
|
1474
|
+
},
|
|
1475
|
+
[`${r}:not(:last-child)`]: {
|
|
1476
|
+
marginRight: {
|
|
1477
|
+
_skip_check_: !0,
|
|
1478
|
+
value: e.marginSM
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
[`${d} + ${d}`]: {
|
|
1483
|
+
margin: {
|
|
1484
|
+
_skip_check_: !0,
|
|
1485
|
+
value: o
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
}, an = (e) => {
|
|
1490
|
+
const {
|
|
1491
|
+
componentCls: t,
|
|
1492
|
+
tabsHorizontalItemMarginRTL: a,
|
|
1493
|
+
iconCls: n,
|
|
1494
|
+
cardGutter: r,
|
|
1495
|
+
calc: o
|
|
1496
|
+
} = e;
|
|
1497
|
+
return {
|
|
1498
|
+
[`${t}-rtl`]: {
|
|
1499
|
+
direction: "rtl",
|
|
1500
|
+
[`${t}-nav`]: {
|
|
1501
|
+
[`${t}-tab`]: {
|
|
1502
|
+
margin: {
|
|
1503
|
+
_skip_check_: !0,
|
|
1504
|
+
value: a
|
|
1505
|
+
},
|
|
1506
|
+
[`${t}-tab:last-of-type`]: {
|
|
1507
|
+
marginLeft: {
|
|
1508
|
+
_skip_check_: !0,
|
|
1509
|
+
value: 0
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
[n]: {
|
|
1513
|
+
marginRight: {
|
|
1514
|
+
_skip_check_: !0,
|
|
1515
|
+
value: 0
|
|
1516
|
+
},
|
|
1517
|
+
marginLeft: {
|
|
1518
|
+
_skip_check_: !0,
|
|
1519
|
+
value: $(e.marginSM)
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
[`${t}-tab-remove`]: {
|
|
1523
|
+
marginRight: {
|
|
1524
|
+
_skip_check_: !0,
|
|
1525
|
+
value: $(e.marginXS)
|
|
1526
|
+
},
|
|
1527
|
+
marginLeft: {
|
|
1528
|
+
_skip_check_: !0,
|
|
1529
|
+
value: $(o(e.marginXXS).mul(-1).equal())
|
|
1530
|
+
},
|
|
1531
|
+
[n]: {
|
|
1532
|
+
margin: 0
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
[`&${t}-left`]: {
|
|
1538
|
+
[`> ${t}-nav`]: {
|
|
1539
|
+
order: 1
|
|
1540
|
+
},
|
|
1541
|
+
[`> ${t}-content-holder`]: {
|
|
1542
|
+
order: 0
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
[`&${t}-right`]: {
|
|
1546
|
+
[`> ${t}-nav`]: {
|
|
1547
|
+
order: 0
|
|
1548
|
+
},
|
|
1549
|
+
[`> ${t}-content-holder`]: {
|
|
1550
|
+
order: 1
|
|
1551
|
+
}
|
|
1552
|
+
},
|
|
1553
|
+
// ====================== Card ======================
|
|
1554
|
+
[`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
|
|
1555
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1556
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
1557
|
+
marginRight: {
|
|
1558
|
+
_skip_check_: !0,
|
|
1559
|
+
value: r
|
|
1560
|
+
},
|
|
1561
|
+
marginLeft: {
|
|
1562
|
+
_skip_check_: !0,
|
|
1563
|
+
value: 0
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
[`${t}-dropdown-rtl`]: {
|
|
1570
|
+
direction: "rtl"
|
|
1571
|
+
},
|
|
1572
|
+
[`${t}-menu-item`]: {
|
|
1573
|
+
[`${t}-dropdown-rtl`]: {
|
|
1574
|
+
textAlign: {
|
|
1575
|
+
_skip_check_: !0,
|
|
1576
|
+
value: "right"
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
};
|
|
1581
|
+
}, nn = (e) => {
|
|
1582
|
+
const {
|
|
1583
|
+
componentCls: t,
|
|
1584
|
+
tabsCardPadding: a,
|
|
1585
|
+
cardHeight: n,
|
|
1586
|
+
cardGutter: r,
|
|
1587
|
+
itemHoverColor: o,
|
|
1588
|
+
itemActiveColor: l,
|
|
1589
|
+
colorBorderSecondary: i
|
|
1590
|
+
} = e;
|
|
1591
|
+
return {
|
|
1592
|
+
[t]: Object.assign(Object.assign(Object.assign(Object.assign({}, It(e)), {
|
|
1593
|
+
display: "flex",
|
|
1594
|
+
// ========================== Navigation ==========================
|
|
1595
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1596
|
+
position: "relative",
|
|
1597
|
+
display: "flex",
|
|
1598
|
+
flex: "none",
|
|
1599
|
+
alignItems: "center",
|
|
1600
|
+
[`${t}-nav-wrap`]: {
|
|
1601
|
+
position: "relative",
|
|
1602
|
+
display: "flex",
|
|
1603
|
+
flex: "auto",
|
|
1604
|
+
alignSelf: "stretch",
|
|
1605
|
+
overflow: "hidden",
|
|
1606
|
+
whiteSpace: "nowrap",
|
|
1607
|
+
transform: "translate(0)",
|
|
1608
|
+
// Fix chrome render bug
|
|
1609
|
+
// >>>>> Ping shadow
|
|
1610
|
+
"&::before, &::after": {
|
|
1611
|
+
position: "absolute",
|
|
1612
|
+
zIndex: 1,
|
|
1613
|
+
opacity: 0,
|
|
1614
|
+
transition: `opacity ${e.motionDurationSlow}`,
|
|
1615
|
+
content: "''",
|
|
1616
|
+
pointerEvents: "none"
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
[`${t}-nav-list`]: {
|
|
1620
|
+
position: "relative",
|
|
1621
|
+
display: "flex",
|
|
1622
|
+
transition: `opacity ${e.motionDurationSlow}`
|
|
1623
|
+
},
|
|
1624
|
+
// >>>>>>>> Operations
|
|
1625
|
+
[`${t}-nav-operations`]: {
|
|
1626
|
+
display: "flex",
|
|
1627
|
+
alignSelf: "stretch"
|
|
1628
|
+
},
|
|
1629
|
+
[`${t}-nav-operations-hidden`]: {
|
|
1630
|
+
position: "absolute",
|
|
1631
|
+
visibility: "hidden",
|
|
1632
|
+
pointerEvents: "none"
|
|
1633
|
+
},
|
|
1634
|
+
[`${t}-nav-more`]: {
|
|
1635
|
+
position: "relative",
|
|
1636
|
+
padding: a,
|
|
1637
|
+
background: "transparent",
|
|
1638
|
+
border: 0,
|
|
1639
|
+
color: e.colorText,
|
|
1640
|
+
"&::after": {
|
|
1641
|
+
position: "absolute",
|
|
1642
|
+
right: {
|
|
1643
|
+
_skip_check_: !0,
|
|
1644
|
+
value: 0
|
|
1645
|
+
},
|
|
1646
|
+
bottom: 0,
|
|
1647
|
+
left: {
|
|
1648
|
+
_skip_check_: !0,
|
|
1649
|
+
value: 0
|
|
1650
|
+
},
|
|
1651
|
+
height: e.calc(e.controlHeightLG).div(8).equal(),
|
|
1652
|
+
transform: "translateY(100%)",
|
|
1653
|
+
content: "''"
|
|
1654
|
+
}
|
|
1655
|
+
},
|
|
1656
|
+
[`${t}-nav-add`]: Object.assign({
|
|
1657
|
+
minWidth: n,
|
|
1658
|
+
marginLeft: {
|
|
1659
|
+
_skip_check_: !0,
|
|
1660
|
+
value: r
|
|
1661
|
+
},
|
|
1662
|
+
padding: $(e.paddingXS),
|
|
1663
|
+
background: "transparent",
|
|
1664
|
+
border: `${$(e.lineWidth)} ${e.lineType} ${i}`,
|
|
1665
|
+
borderRadius: `${$(e.borderRadiusLG)} ${$(e.borderRadiusLG)} 0 0`,
|
|
1666
|
+
outline: "none",
|
|
1667
|
+
cursor: "pointer",
|
|
1668
|
+
color: e.colorText,
|
|
1669
|
+
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
1670
|
+
"&:hover": {
|
|
1671
|
+
color: o
|
|
1672
|
+
},
|
|
1673
|
+
"&:active, &:focus:not(:focus-visible)": {
|
|
1674
|
+
color: l
|
|
1675
|
+
}
|
|
1676
|
+
}, Ue(e, -3))
|
|
1677
|
+
},
|
|
1678
|
+
[`${t}-extra-content`]: {
|
|
1679
|
+
flex: "none"
|
|
1680
|
+
},
|
|
1681
|
+
// ============================ InkBar ============================
|
|
1682
|
+
[`${t}-ink-bar`]: {
|
|
1683
|
+
position: "absolute",
|
|
1684
|
+
background: e.inkBarColor,
|
|
1685
|
+
pointerEvents: "none"
|
|
1686
|
+
}
|
|
1687
|
+
}), tn(e)), {
|
|
1688
|
+
// =========================== TabPanes ===========================
|
|
1689
|
+
[`${t}-content`]: {
|
|
1690
|
+
position: "relative",
|
|
1691
|
+
width: "100%"
|
|
1692
|
+
},
|
|
1693
|
+
[`${t}-content-holder`]: {
|
|
1694
|
+
flex: "auto",
|
|
1695
|
+
minWidth: 0,
|
|
1696
|
+
minHeight: 0
|
|
1697
|
+
},
|
|
1698
|
+
[`${t}-tabpane`]: Object.assign(Object.assign({}, Ue(e)), {
|
|
1699
|
+
"&-hidden": {
|
|
1700
|
+
display: "none"
|
|
1701
|
+
}
|
|
1702
|
+
})
|
|
1703
|
+
}),
|
|
1704
|
+
[`${t}-centered`]: {
|
|
1705
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1706
|
+
[`${t}-nav-wrap`]: {
|
|
1707
|
+
[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]: {
|
|
1708
|
+
margin: "auto"
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
};
|
|
1714
|
+
}, rn = (e) => {
|
|
1715
|
+
const t = e.controlHeightLG;
|
|
1716
|
+
return {
|
|
1717
|
+
zIndexPopup: e.zIndexPopupBase + 50,
|
|
1718
|
+
cardBg: e.colorFillAlter,
|
|
1719
|
+
cardHeight: t,
|
|
1720
|
+
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
|
|
1721
|
+
cardPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
1722
|
+
cardPaddingSM: `${e.paddingXXS * 1.5}px ${e.padding}px`,
|
|
1723
|
+
cardPaddingLG: `${e.paddingXS}px ${e.padding}px ${e.paddingXXS * 1.5}px`,
|
|
1724
|
+
titleFontSize: e.fontSize,
|
|
1725
|
+
titleFontSizeLG: e.fontSizeLG,
|
|
1726
|
+
titleFontSizeSM: e.fontSize,
|
|
1727
|
+
inkBarColor: e.colorPrimary,
|
|
1728
|
+
horizontalMargin: `0 0 ${e.margin}px 0`,
|
|
1729
|
+
horizontalItemGutter: 32,
|
|
1730
|
+
// Fixed Value
|
|
1731
|
+
// Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
|
|
1732
|
+
horizontalItemMargin: "",
|
|
1733
|
+
horizontalItemMarginRTL: "",
|
|
1734
|
+
horizontalItemPadding: `${e.paddingSM}px 0`,
|
|
1735
|
+
horizontalItemPaddingSM: `${e.paddingXS}px 0`,
|
|
1736
|
+
horizontalItemPaddingLG: `${e.padding}px 0`,
|
|
1737
|
+
verticalItemPadding: `${e.paddingXS}px ${e.paddingLG}px`,
|
|
1738
|
+
verticalItemMargin: `${e.margin}px 0 0 0`,
|
|
1739
|
+
itemColor: e.colorText,
|
|
1740
|
+
itemSelectedColor: e.colorPrimary,
|
|
1741
|
+
itemHoverColor: e.colorPrimaryHover,
|
|
1742
|
+
itemActiveColor: e.colorPrimaryActive,
|
|
1743
|
+
cardGutter: e.marginXXS / 2
|
|
1744
|
+
};
|
|
1745
|
+
}, on = $a("Tabs", (e) => {
|
|
1746
|
+
const t = ya(e, {
|
|
1747
|
+
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
|
|
1748
|
+
tabsCardPadding: e.cardPadding,
|
|
1749
|
+
dropdownEdgeChildVerticalPadding: e.paddingXXS,
|
|
1750
|
+
tabsActiveTextShadow: "0 0 0.25px currentcolor",
|
|
1751
|
+
tabsDropdownHeight: 200,
|
|
1752
|
+
tabsDropdownWidth: 120,
|
|
1753
|
+
tabsHorizontalItemMargin: `0 0 0 ${$(e.horizontalItemGutter)}`,
|
|
1754
|
+
tabsHorizontalItemMarginRTL: `0 0 0 ${$(e.horizontalItemGutter)}`
|
|
1755
|
+
});
|
|
1756
|
+
return [en(t), an(t), Ja(t), Za(t), Qa(t), nn(t), Ya(t)];
|
|
1757
|
+
}, rn), Bt = () => null;
|
|
1758
|
+
process.env.NODE_ENV !== "production" && (Bt.displayName = "DeprecatedTabPane");
|
|
1759
|
+
var ln = function(e, t) {
|
|
1760
|
+
var a = {};
|
|
1761
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
1762
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
1763
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
1764
|
+
return a;
|
|
1765
|
+
};
|
|
1766
|
+
const kt = (e) => {
|
|
1767
|
+
var t, a, n, r, o, l, i, s, d, m, b;
|
|
1768
|
+
const {
|
|
1769
|
+
type: _,
|
|
1770
|
+
className: R,
|
|
1771
|
+
rootClassName: O,
|
|
1772
|
+
size: C,
|
|
1773
|
+
onEdit: z,
|
|
1774
|
+
hideAdd: h,
|
|
1775
|
+
centered: p,
|
|
1776
|
+
addIcon: P,
|
|
1777
|
+
removeIcon: B,
|
|
1778
|
+
moreIcon: A,
|
|
1779
|
+
more: W,
|
|
1780
|
+
popupClassName: H,
|
|
1781
|
+
children: L,
|
|
1782
|
+
items: x,
|
|
1783
|
+
animated: E,
|
|
1784
|
+
style: v,
|
|
1785
|
+
indicatorSize: y,
|
|
1786
|
+
indicator: g
|
|
1787
|
+
} = e, S = ln(e, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator"]), {
|
|
1788
|
+
prefixCls: K
|
|
1789
|
+
} = S, {
|
|
1790
|
+
direction: X,
|
|
1791
|
+
tabs: f,
|
|
1792
|
+
getPrefixCls: F,
|
|
1793
|
+
getPopupContainer: de
|
|
1794
|
+
} = c.useContext(_a), G = F("tabs", K), Q = xa(G), [ve, w, k] = on(G, Q);
|
|
1795
|
+
let V;
|
|
1796
|
+
_ === "editable-card" && (V = {
|
|
1797
|
+
onEdit: (oe, $e) => {
|
|
1798
|
+
let {
|
|
1799
|
+
key: N,
|
|
1800
|
+
event: se
|
|
1801
|
+
} = $e;
|
|
1802
|
+
z == null || z(oe === "add" ? se : N, oe);
|
|
1803
|
+
},
|
|
1804
|
+
removeIcon: (t = B ?? (f == null ? void 0 : f.removeIcon)) !== null && t !== void 0 ? t : /* @__PURE__ */ c.createElement(oa, null),
|
|
1805
|
+
addIcon: (P ?? (f == null ? void 0 : f.addIcon)) || /* @__PURE__ */ c.createElement(Nt, null),
|
|
1806
|
+
showAdd: h !== !0
|
|
1807
|
+
});
|
|
1808
|
+
const q = F();
|
|
1809
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1810
|
+
const oe = Pt("Tabs");
|
|
1811
|
+
process.env.NODE_ENV !== "production" && oe(!("onPrevClick" in e) && !("onNextClick" in e), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."), process.env.NODE_ENV !== "production" && oe(!(y || f != null && f.indicatorSize), "deprecated", "`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.");
|
|
1812
|
+
}
|
|
1813
|
+
const Z = Ca(C), re = qa(x, L), ee = Xa(G, E), he = Object.assign(Object.assign({}, f == null ? void 0 : f.style), v), be = {
|
|
1814
|
+
align: (a = g == null ? void 0 : g.align) !== null && a !== void 0 ? a : (n = f == null ? void 0 : f.indicator) === null || n === void 0 ? void 0 : n.align,
|
|
1815
|
+
size: (i = (o = (r = g == null ? void 0 : g.size) !== null && r !== void 0 ? r : y) !== null && o !== void 0 ? o : (l = f == null ? void 0 : f.indicator) === null || l === void 0 ? void 0 : l.size) !== null && i !== void 0 ? i : f == null ? void 0 : f.indicatorSize
|
|
1816
|
+
};
|
|
1817
|
+
return ve(/* @__PURE__ */ c.createElement(Ot, Object.assign({
|
|
1818
|
+
direction: X,
|
|
1819
|
+
getPopupContainer: de
|
|
1820
|
+
}, S, {
|
|
1821
|
+
items: re,
|
|
1822
|
+
className: J({
|
|
1823
|
+
[`${G}-${Z}`]: Z,
|
|
1824
|
+
[`${G}-card`]: ["card", "editable-card"].includes(_),
|
|
1825
|
+
[`${G}-editable-card`]: _ === "editable-card",
|
|
1826
|
+
[`${G}-centered`]: p
|
|
1827
|
+
}, f == null ? void 0 : f.className, R, O, w, k, Q),
|
|
1828
|
+
popupClassName: J(H, w, k, Q),
|
|
1829
|
+
style: he,
|
|
1830
|
+
editable: V,
|
|
1831
|
+
more: Object.assign({
|
|
1832
|
+
icon: (b = (m = (d = (s = f == null ? void 0 : f.more) === null || s === void 0 ? void 0 : s.icon) !== null && d !== void 0 ? d : f == null ? void 0 : f.moreIcon) !== null && m !== void 0 ? m : A) !== null && b !== void 0 ? b : /* @__PURE__ */ c.createElement(sa, null),
|
|
1833
|
+
transitionName: `${q}-slide-up`
|
|
1834
|
+
}, W),
|
|
1835
|
+
prefixCls: G,
|
|
1836
|
+
animated: ee,
|
|
1837
|
+
indicator: be
|
|
1838
|
+
})));
|
|
1839
|
+
};
|
|
1840
|
+
kt.TabPane = Bt;
|
|
1841
|
+
process.env.NODE_ENV !== "production" && (kt.displayName = "Tabs");
|
|
1842
|
+
export {
|
|
1843
|
+
Nt as R,
|
|
1844
|
+
kt as T
|
|
1845
|
+
};
|