@gobolt/genesis 0.0.9 → 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 +33 -14
- 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,511 @@
|
|
|
1
|
+
import { d as be } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { a as A, _ as X, e as K, g as ve, d as Q, b as z, f as ae } from "../../presets-Djh_L_6R.js";
|
|
4
|
+
import { u as Se } from "../../useMergedState-BoELfaU9.js";
|
|
5
|
+
import { o as pe } from "../../omit-B_u6A-HL.js";
|
|
6
|
+
import { f as $e, o as ye, p as ie, g as Ce, m as we, t as xe, r as Ne, k as Oe, j as E, q as Re, C as Me } from "../../index-ByspLxrB.js";
|
|
7
|
+
import { u as Ie } from "../../useSize-CPo2bUE3.js";
|
|
8
|
+
import "../../index-DLdU7Tpd.js";
|
|
9
|
+
import { u as je } from "../../useId-D2tzlufo.js";
|
|
10
|
+
var k = function(t, a) {
|
|
11
|
+
if (!t) return null;
|
|
12
|
+
var n = {
|
|
13
|
+
left: t.offsetLeft,
|
|
14
|
+
right: t.parentElement.clientWidth - t.clientWidth - t.offsetLeft,
|
|
15
|
+
width: t.clientWidth,
|
|
16
|
+
top: t.offsetTop,
|
|
17
|
+
bottom: t.parentElement.clientHeight - t.clientHeight - t.offsetTop,
|
|
18
|
+
height: t.clientHeight
|
|
19
|
+
};
|
|
20
|
+
return a ? {
|
|
21
|
+
left: 0,
|
|
22
|
+
right: 0,
|
|
23
|
+
width: 0,
|
|
24
|
+
top: n.top,
|
|
25
|
+
bottom: n.bottom,
|
|
26
|
+
height: n.height
|
|
27
|
+
} : {
|
|
28
|
+
left: n.left,
|
|
29
|
+
right: n.right,
|
|
30
|
+
width: n.width,
|
|
31
|
+
top: 0,
|
|
32
|
+
bottom: 0,
|
|
33
|
+
height: 0
|
|
34
|
+
};
|
|
35
|
+
}, w = function(t) {
|
|
36
|
+
return t !== void 0 ? "".concat(t, "px") : void 0;
|
|
37
|
+
};
|
|
38
|
+
function Ee(e) {
|
|
39
|
+
var t = e.prefixCls, a = e.containerRef, n = e.value, r = e.getValueIndex, s = e.motionName, p = e.onMotionStart, b = e.onMotionEnd, v = e.direction, x = e.vertical, u = x === void 0 ? !1 : x, H = i.useRef(null), P = i.useState(n), R = A(P, 2), f = R[0], g = R[1], m = function(j) {
|
|
40
|
+
var O, V = r(j), C = (O = a.current) === null || O === void 0 ? void 0 : O.querySelectorAll(".".concat(t, "-item"))[V];
|
|
41
|
+
return (C == null ? void 0 : C.offsetParent) && C;
|
|
42
|
+
}, D = i.useState(null), M = A(D, 2), o = M[0], N = M[1], _ = i.useState(null), S = A(_, 2), l = S[0], $ = S[1];
|
|
43
|
+
$e(function() {
|
|
44
|
+
if (f !== n) {
|
|
45
|
+
var d = m(f), j = m(n), O = k(d, u), V = k(j, u);
|
|
46
|
+
g(n), N(O), $(V), d && j ? p() : b();
|
|
47
|
+
}
|
|
48
|
+
}, [n]);
|
|
49
|
+
var y = i.useMemo(function() {
|
|
50
|
+
if (u) {
|
|
51
|
+
var d;
|
|
52
|
+
return w((d = o == null ? void 0 : o.top) !== null && d !== void 0 ? d : 0);
|
|
53
|
+
}
|
|
54
|
+
return w(v === "rtl" ? -(o == null ? void 0 : o.right) : o == null ? void 0 : o.left);
|
|
55
|
+
}, [u, v, o]), I = i.useMemo(function() {
|
|
56
|
+
if (u) {
|
|
57
|
+
var d;
|
|
58
|
+
return w((d = l == null ? void 0 : l.top) !== null && d !== void 0 ? d : 0);
|
|
59
|
+
}
|
|
60
|
+
return w(v === "rtl" ? -(l == null ? void 0 : l.right) : l == null ? void 0 : l.left);
|
|
61
|
+
}, [u, v, l]), T = function() {
|
|
62
|
+
return u ? {
|
|
63
|
+
transform: "translateY(var(--thumb-start-top))",
|
|
64
|
+
height: "var(--thumb-start-height)"
|
|
65
|
+
} : {
|
|
66
|
+
transform: "translateX(var(--thumb-start-left))",
|
|
67
|
+
width: "var(--thumb-start-width)"
|
|
68
|
+
};
|
|
69
|
+
}, F = function() {
|
|
70
|
+
return u ? {
|
|
71
|
+
transform: "translateY(var(--thumb-active-top))",
|
|
72
|
+
height: "var(--thumb-active-height)"
|
|
73
|
+
} : {
|
|
74
|
+
transform: "translateX(var(--thumb-active-left))",
|
|
75
|
+
width: "var(--thumb-active-width)"
|
|
76
|
+
};
|
|
77
|
+
}, q = function() {
|
|
78
|
+
N(null), $(null), b();
|
|
79
|
+
};
|
|
80
|
+
return !o || !l ? null : /* @__PURE__ */ i.createElement(ye, {
|
|
81
|
+
visible: !0,
|
|
82
|
+
motionName: s,
|
|
83
|
+
motionAppear: !0,
|
|
84
|
+
onAppearStart: T,
|
|
85
|
+
onAppearActive: F,
|
|
86
|
+
onVisibleChanged: q
|
|
87
|
+
}, function(d, j) {
|
|
88
|
+
var O = d.className, V = d.style, C = X(X({}, V), {}, {
|
|
89
|
+
"--thumb-start-left": y,
|
|
90
|
+
"--thumb-start-width": w(o == null ? void 0 : o.width),
|
|
91
|
+
"--thumb-active-left": I,
|
|
92
|
+
"--thumb-active-width": w(l == null ? void 0 : l.width),
|
|
93
|
+
"--thumb-start-top": y,
|
|
94
|
+
"--thumb-start-height": w(o == null ? void 0 : o.height),
|
|
95
|
+
"--thumb-active-top": I,
|
|
96
|
+
"--thumb-active-height": w(l == null ? void 0 : l.height)
|
|
97
|
+
}), L = {
|
|
98
|
+
ref: ie(H, j),
|
|
99
|
+
style: C,
|
|
100
|
+
className: K("".concat(t, "-thumb"), O)
|
|
101
|
+
};
|
|
102
|
+
return process.env.NODE_ENV === "test" && (L["data-test-style"] = JSON.stringify(C)), /* @__PURE__ */ i.createElement("div", L);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
var He = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
|
|
106
|
+
function Pe(e) {
|
|
107
|
+
if (typeof e.title < "u")
|
|
108
|
+
return e.title;
|
|
109
|
+
if (ae(e.label) !== "object") {
|
|
110
|
+
var t;
|
|
111
|
+
return (t = e.label) === null || t === void 0 ? void 0 : t.toString();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function De(e) {
|
|
115
|
+
return e.map(function(t) {
|
|
116
|
+
if (ae(t) === "object" && t !== null) {
|
|
117
|
+
var a = Pe(t);
|
|
118
|
+
return X(X({}, t), {}, {
|
|
119
|
+
title: a
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
label: t == null ? void 0 : t.toString(),
|
|
124
|
+
title: t == null ? void 0 : t.toString(),
|
|
125
|
+
value: t
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
var Ve = function(t) {
|
|
130
|
+
var a = t.prefixCls, n = t.className, r = t.disabled, s = t.checked, p = t.label, b = t.title, v = t.value, x = t.name, u = t.onChange, H = t.onFocus, P = t.onBlur, R = t.onKeyDown, f = t.onKeyUp, g = t.onMouseDown, m = function(M) {
|
|
131
|
+
r || u(M, v);
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ i.createElement("label", {
|
|
134
|
+
className: K(n, z({}, "".concat(a, "-item-disabled"), r)),
|
|
135
|
+
onMouseDown: g
|
|
136
|
+
}, /* @__PURE__ */ i.createElement("input", {
|
|
137
|
+
name: x,
|
|
138
|
+
className: "".concat(a, "-item-input"),
|
|
139
|
+
type: "radio",
|
|
140
|
+
disabled: r,
|
|
141
|
+
checked: s,
|
|
142
|
+
onChange: m,
|
|
143
|
+
onFocus: H,
|
|
144
|
+
onBlur: P,
|
|
145
|
+
onKeyDown: R,
|
|
146
|
+
onKeyUp: f
|
|
147
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
148
|
+
className: "".concat(a, "-item-label"),
|
|
149
|
+
title: b,
|
|
150
|
+
"aria-selected": s
|
|
151
|
+
}, p));
|
|
152
|
+
}, re = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
153
|
+
var a, n, r = e.prefixCls, s = r === void 0 ? "rc-segmented" : r, p = e.direction, b = e.vertical, v = e.options, x = v === void 0 ? [] : v, u = e.disabled, H = e.defaultValue, P = e.value, R = e.name, f = e.onChange, g = e.className, m = g === void 0 ? "" : g, D = e.motionName, M = D === void 0 ? "thumb-motion" : D, o = ve(e, He), N = i.useRef(null), _ = i.useMemo(function() {
|
|
154
|
+
return ie(N, t);
|
|
155
|
+
}, [N, t]), S = i.useMemo(function() {
|
|
156
|
+
return De(x);
|
|
157
|
+
}, [x]), l = Se((a = S[0]) === null || a === void 0 ? void 0 : a.value, {
|
|
158
|
+
value: P,
|
|
159
|
+
defaultValue: H
|
|
160
|
+
}), $ = A(l, 2), y = $[0], I = $[1], T = i.useState(!1), F = A(T, 2), q = F[0], d = F[1], j = function(h, B) {
|
|
161
|
+
I(B), f == null || f(B);
|
|
162
|
+
}, O = pe(o, ["children"]), V = i.useState(!1), C = A(V, 2), L = C[0], U = C[1], le = i.useState(!1), G = A(le, 2), se = G[0], Y = G[1], de = function() {
|
|
163
|
+
Y(!0);
|
|
164
|
+
}, ue = function() {
|
|
165
|
+
Y(!1);
|
|
166
|
+
}, ce = function() {
|
|
167
|
+
U(!1);
|
|
168
|
+
}, me = function(h) {
|
|
169
|
+
h.key === "Tab" && U(!0);
|
|
170
|
+
}, J = function(h) {
|
|
171
|
+
var B = S.findIndex(function(he) {
|
|
172
|
+
return he.value === y;
|
|
173
|
+
}), Z = S.length, ge = (B + h + Z) % Z, W = S[ge];
|
|
174
|
+
W && (I(W.value), f == null || f(W.value));
|
|
175
|
+
}, fe = function(h) {
|
|
176
|
+
switch (h.key) {
|
|
177
|
+
case "ArrowLeft":
|
|
178
|
+
case "ArrowUp":
|
|
179
|
+
J(-1);
|
|
180
|
+
break;
|
|
181
|
+
case "ArrowRight":
|
|
182
|
+
case "ArrowDown":
|
|
183
|
+
J(1);
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
return /* @__PURE__ */ i.createElement("div", Q({
|
|
188
|
+
role: "radiogroup",
|
|
189
|
+
"aria-label": "segmented control",
|
|
190
|
+
tabIndex: u ? void 0 : 0
|
|
191
|
+
}, O, {
|
|
192
|
+
className: K(s, (n = {}, z(n, "".concat(s, "-rtl"), p === "rtl"), z(n, "".concat(s, "-disabled"), u), z(n, "".concat(s, "-vertical"), b), n), m),
|
|
193
|
+
ref: _
|
|
194
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
195
|
+
className: "".concat(s, "-group")
|
|
196
|
+
}, /* @__PURE__ */ i.createElement(Ee, {
|
|
197
|
+
vertical: b,
|
|
198
|
+
prefixCls: s,
|
|
199
|
+
value: y,
|
|
200
|
+
containerRef: N,
|
|
201
|
+
motionName: "".concat(s, "-").concat(M),
|
|
202
|
+
direction: p,
|
|
203
|
+
getValueIndex: function(h) {
|
|
204
|
+
return S.findIndex(function(B) {
|
|
205
|
+
return B.value === h;
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
onMotionStart: function() {
|
|
209
|
+
d(!0);
|
|
210
|
+
},
|
|
211
|
+
onMotionEnd: function() {
|
|
212
|
+
d(!1);
|
|
213
|
+
}
|
|
214
|
+
}), S.map(function(c) {
|
|
215
|
+
var h;
|
|
216
|
+
return /* @__PURE__ */ i.createElement(Ve, Q({}, c, {
|
|
217
|
+
name: R,
|
|
218
|
+
key: c.value,
|
|
219
|
+
prefixCls: s,
|
|
220
|
+
className: K(c.className, "".concat(s, "-item"), (h = {}, z(h, "".concat(s, "-item-selected"), c.value === y && !q), z(h, "".concat(s, "-item-focused"), se && L && c.value === y), h)),
|
|
221
|
+
checked: c.value === y,
|
|
222
|
+
onChange: j,
|
|
223
|
+
onFocus: de,
|
|
224
|
+
onBlur: ue,
|
|
225
|
+
onKeyDown: fe,
|
|
226
|
+
onKeyUp: me,
|
|
227
|
+
onMouseDown: ce,
|
|
228
|
+
disabled: !!u || !!c.disabled
|
|
229
|
+
}));
|
|
230
|
+
})));
|
|
231
|
+
});
|
|
232
|
+
process.env.NODE_ENV !== "production" && (re.displayName = "Segmented");
|
|
233
|
+
var Ae = re;
|
|
234
|
+
function ee(e, t) {
|
|
235
|
+
return {
|
|
236
|
+
[`${e}, ${e}:hover, ${e}:focus`]: {
|
|
237
|
+
color: t.colorTextDisabled,
|
|
238
|
+
cursor: "not-allowed"
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function te(e) {
|
|
243
|
+
return {
|
|
244
|
+
backgroundColor: e.itemSelectedBg,
|
|
245
|
+
boxShadow: e.boxShadowTertiary
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
const Be = Object.assign({
|
|
249
|
+
overflow: "hidden"
|
|
250
|
+
}, xe), ze = (e) => {
|
|
251
|
+
const {
|
|
252
|
+
componentCls: t
|
|
253
|
+
} = e, a = e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(), n = e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(), r = e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();
|
|
254
|
+
return {
|
|
255
|
+
[t]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Ne(e)), {
|
|
256
|
+
display: "inline-block",
|
|
257
|
+
padding: e.trackPadding,
|
|
258
|
+
color: e.itemColor,
|
|
259
|
+
background: e.trackBg,
|
|
260
|
+
borderRadius: e.borderRadius,
|
|
261
|
+
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`
|
|
262
|
+
}), Oe(e)), {
|
|
263
|
+
[`${t}-group`]: {
|
|
264
|
+
position: "relative",
|
|
265
|
+
display: "flex",
|
|
266
|
+
alignItems: "stretch",
|
|
267
|
+
justifyItems: "flex-start",
|
|
268
|
+
flexDirection: "row",
|
|
269
|
+
width: "100%"
|
|
270
|
+
},
|
|
271
|
+
// RTL styles
|
|
272
|
+
[`&${t}-rtl`]: {
|
|
273
|
+
direction: "rtl"
|
|
274
|
+
},
|
|
275
|
+
[`&${t}-vertical`]: {
|
|
276
|
+
[`${t}-group`]: {
|
|
277
|
+
flexDirection: "column"
|
|
278
|
+
},
|
|
279
|
+
[`${t}-thumb`]: {
|
|
280
|
+
width: "100%",
|
|
281
|
+
height: 0,
|
|
282
|
+
padding: `0 ${E(e.paddingXXS)}`
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
// block styles
|
|
286
|
+
[`&${t}-block`]: {
|
|
287
|
+
display: "flex"
|
|
288
|
+
},
|
|
289
|
+
[`&${t}-block ${t}-item`]: {
|
|
290
|
+
flex: 1,
|
|
291
|
+
minWidth: 0
|
|
292
|
+
},
|
|
293
|
+
// item styles
|
|
294
|
+
[`${t}-item`]: {
|
|
295
|
+
position: "relative",
|
|
296
|
+
textAlign: "center",
|
|
297
|
+
cursor: "pointer",
|
|
298
|
+
transition: `color ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
299
|
+
borderRadius: e.borderRadiusSM,
|
|
300
|
+
// Fix Safari render bug
|
|
301
|
+
// https://github.com/ant-design/ant-design/issues/45250
|
|
302
|
+
transform: "translateZ(0)",
|
|
303
|
+
"&-selected": Object.assign(Object.assign({}, te(e)), {
|
|
304
|
+
color: e.itemSelectedColor
|
|
305
|
+
}),
|
|
306
|
+
"&-focused": Object.assign({}, Re(e)),
|
|
307
|
+
"&::after": {
|
|
308
|
+
content: '""',
|
|
309
|
+
position: "absolute",
|
|
310
|
+
zIndex: -1,
|
|
311
|
+
width: "100%",
|
|
312
|
+
height: "100%",
|
|
313
|
+
top: 0,
|
|
314
|
+
insetInlineStart: 0,
|
|
315
|
+
borderRadius: "inherit",
|
|
316
|
+
transition: `background-color ${e.motionDurationMid}`,
|
|
317
|
+
// This is mandatory to make it not clickable or hoverable
|
|
318
|
+
// Ref: https://github.com/ant-design/ant-design/issues/40888
|
|
319
|
+
pointerEvents: "none"
|
|
320
|
+
},
|
|
321
|
+
[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]: {
|
|
322
|
+
color: e.itemHoverColor,
|
|
323
|
+
"&::after": {
|
|
324
|
+
backgroundColor: e.itemHoverBg
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]: {
|
|
328
|
+
color: e.itemHoverColor,
|
|
329
|
+
"&::after": {
|
|
330
|
+
backgroundColor: e.itemActiveBg
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"&-label": Object.assign({
|
|
334
|
+
minHeight: a,
|
|
335
|
+
lineHeight: E(a),
|
|
336
|
+
padding: `0 ${E(e.segmentedPaddingHorizontal)}`
|
|
337
|
+
}, Be),
|
|
338
|
+
// syntactic sugar to add `icon` for Segmented Item
|
|
339
|
+
"&-icon + *": {
|
|
340
|
+
marginInlineStart: e.calc(e.marginSM).div(2).equal()
|
|
341
|
+
},
|
|
342
|
+
"&-input": {
|
|
343
|
+
position: "absolute",
|
|
344
|
+
insetBlockStart: 0,
|
|
345
|
+
insetInlineStart: 0,
|
|
346
|
+
width: 0,
|
|
347
|
+
height: 0,
|
|
348
|
+
opacity: 0,
|
|
349
|
+
pointerEvents: "none"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
// thumb styles
|
|
353
|
+
[`${t}-thumb`]: Object.assign(Object.assign({}, te(e)), {
|
|
354
|
+
position: "absolute",
|
|
355
|
+
insetBlockStart: 0,
|
|
356
|
+
insetInlineStart: 0,
|
|
357
|
+
width: 0,
|
|
358
|
+
height: "100%",
|
|
359
|
+
padding: `${E(e.paddingXXS)} 0`,
|
|
360
|
+
borderRadius: e.borderRadiusSM,
|
|
361
|
+
transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
362
|
+
[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]: {
|
|
363
|
+
backgroundColor: "transparent"
|
|
364
|
+
}
|
|
365
|
+
}),
|
|
366
|
+
// size styles
|
|
367
|
+
[`&${t}-lg`]: {
|
|
368
|
+
borderRadius: e.borderRadiusLG,
|
|
369
|
+
[`${t}-item-label`]: {
|
|
370
|
+
minHeight: n,
|
|
371
|
+
lineHeight: E(n),
|
|
372
|
+
padding: `0 ${E(e.segmentedPaddingHorizontal)}`,
|
|
373
|
+
fontSize: e.fontSizeLG
|
|
374
|
+
},
|
|
375
|
+
[`${t}-item, ${t}-thumb`]: {
|
|
376
|
+
borderRadius: e.borderRadius
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
[`&${t}-sm`]: {
|
|
380
|
+
borderRadius: e.borderRadiusSM,
|
|
381
|
+
[`${t}-item-label`]: {
|
|
382
|
+
minHeight: r,
|
|
383
|
+
lineHeight: E(r),
|
|
384
|
+
padding: `0 ${E(e.segmentedPaddingHorizontalSM)}`
|
|
385
|
+
},
|
|
386
|
+
[`${t}-item, ${t}-thumb`]: {
|
|
387
|
+
borderRadius: e.borderRadiusXS
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}), ee(`&-disabled ${t}-item`, e)), ee(`${t}-item-disabled`, e)), {
|
|
391
|
+
// transition effect when `appear-active`
|
|
392
|
+
[`${t}-thumb-motion-appear-active`]: {
|
|
393
|
+
transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
394
|
+
willChange: "transform, width"
|
|
395
|
+
}
|
|
396
|
+
})
|
|
397
|
+
};
|
|
398
|
+
}, _e = (e) => {
|
|
399
|
+
const {
|
|
400
|
+
colorTextLabel: t,
|
|
401
|
+
colorText: a,
|
|
402
|
+
colorFillSecondary: n,
|
|
403
|
+
colorBgElevated: r,
|
|
404
|
+
colorFill: s,
|
|
405
|
+
lineWidthBold: p,
|
|
406
|
+
colorBgLayout: b
|
|
407
|
+
} = e;
|
|
408
|
+
return {
|
|
409
|
+
trackPadding: p,
|
|
410
|
+
trackBg: b,
|
|
411
|
+
itemColor: t,
|
|
412
|
+
itemHoverColor: a,
|
|
413
|
+
itemHoverBg: n,
|
|
414
|
+
itemSelectedBg: r,
|
|
415
|
+
itemActiveBg: s,
|
|
416
|
+
itemSelectedColor: a
|
|
417
|
+
};
|
|
418
|
+
}, Te = Ce("Segmented", (e) => {
|
|
419
|
+
const {
|
|
420
|
+
lineWidth: t,
|
|
421
|
+
calc: a
|
|
422
|
+
} = e, n = we(e, {
|
|
423
|
+
segmentedPaddingHorizontal: a(e.controlPaddingHorizontal).sub(t).equal(),
|
|
424
|
+
segmentedPaddingHorizontalSM: a(e.controlPaddingHorizontalSM).sub(t).equal()
|
|
425
|
+
});
|
|
426
|
+
return [ze(n)];
|
|
427
|
+
}, _e);
|
|
428
|
+
var ne = function(e, t) {
|
|
429
|
+
var a = {};
|
|
430
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
431
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
432
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
433
|
+
return a;
|
|
434
|
+
};
|
|
435
|
+
function Ke(e) {
|
|
436
|
+
return typeof e == "object" && !!(e != null && e.icon);
|
|
437
|
+
}
|
|
438
|
+
const Fe = /* @__PURE__ */ i.forwardRef((e, t) => {
|
|
439
|
+
const a = je(), {
|
|
440
|
+
prefixCls: n,
|
|
441
|
+
className: r,
|
|
442
|
+
rootClassName: s,
|
|
443
|
+
block: p,
|
|
444
|
+
options: b = [],
|
|
445
|
+
size: v = "middle",
|
|
446
|
+
style: x,
|
|
447
|
+
vertical: u,
|
|
448
|
+
name: H = a
|
|
449
|
+
} = e, P = ne(e, ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "name"]), {
|
|
450
|
+
getPrefixCls: R,
|
|
451
|
+
direction: f,
|
|
452
|
+
segmented: g
|
|
453
|
+
} = i.useContext(Me), m = R("segmented", n), [D, M, o] = Te(m), N = Ie(v), _ = i.useMemo(() => b.map(($) => {
|
|
454
|
+
if (Ke($)) {
|
|
455
|
+
const {
|
|
456
|
+
icon: y,
|
|
457
|
+
label: I
|
|
458
|
+
} = $, T = ne($, ["icon", "label"]);
|
|
459
|
+
return Object.assign(Object.assign({}, T), {
|
|
460
|
+
label: /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("span", {
|
|
461
|
+
className: `${m}-item-icon`
|
|
462
|
+
}, y), I && /* @__PURE__ */ i.createElement("span", null, I))
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
return $;
|
|
466
|
+
}), [b, m]), S = K(r, s, g == null ? void 0 : g.className, {
|
|
467
|
+
[`${m}-block`]: p,
|
|
468
|
+
[`${m}-sm`]: N === "small",
|
|
469
|
+
[`${m}-lg`]: N === "large",
|
|
470
|
+
[`${m}-vertical`]: u
|
|
471
|
+
}, M, o), l = Object.assign(Object.assign({}, g == null ? void 0 : g.style), x);
|
|
472
|
+
return D(/* @__PURE__ */ i.createElement(Ae, Object.assign({}, P, {
|
|
473
|
+
name: H,
|
|
474
|
+
className: S,
|
|
475
|
+
style: l,
|
|
476
|
+
options: _,
|
|
477
|
+
ref: t,
|
|
478
|
+
prefixCls: m,
|
|
479
|
+
direction: f,
|
|
480
|
+
vertical: u
|
|
481
|
+
})));
|
|
482
|
+
}), oe = Fe;
|
|
483
|
+
process.env.NODE_ENV !== "production" && (oe.displayName = "Segmented");
|
|
484
|
+
const Le = ({ colors: e, borderRadius: t, sizing: a }, n = "primary", r = "active") => `
|
|
485
|
+
&.ant-segmented {
|
|
486
|
+
border-radius: ${t.BorderRadiusMd};
|
|
487
|
+
color: ${e.onsurface.copy};
|
|
488
|
+
|
|
489
|
+
.ant-segmented-item {
|
|
490
|
+
color: ${e[n].text};
|
|
491
|
+
transition: all 0.3s;
|
|
492
|
+
|
|
493
|
+
&-selected {
|
|
494
|
+
background: ${e[n][r]};
|
|
495
|
+
color: ${e[n].textContrast};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
&:hover {
|
|
499
|
+
color: ${e[n].hover};
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
`, Qe = be(
|
|
504
|
+
oe
|
|
505
|
+
)`
|
|
506
|
+
${({ theme: e, type: t = "primary", state: a = "active" }) => Le(e, t, a)}
|
|
507
|
+
`;
|
|
508
|
+
export {
|
|
509
|
+
Qe as SegmentedControls,
|
|
510
|
+
Le as getGenesisClass
|
|
511
|
+
};
|
|
@@ -2,15 +2,13 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { TYPE, STATE } from '../../constants';
|
|
3
3
|
import { SelectProps as AntSelectProps } from 'antd';
|
|
4
4
|
|
|
5
|
-
export interface SelectProps extends AntSelectProps {
|
|
5
|
+
export interface SelectProps extends Omit<AntSelectProps, "options"> {
|
|
6
6
|
type?: keyof typeof TYPE;
|
|
7
7
|
state?: keyof typeof STATE;
|
|
8
|
-
}
|
|
9
|
-
interface GenesisSelectProps extends SelectProps, AntSelectProps {
|
|
10
8
|
options?: {
|
|
11
9
|
value: string;
|
|
12
10
|
label: React.ReactNode;
|
|
13
11
|
}[];
|
|
14
12
|
}
|
|
15
|
-
declare const Select: ({ type, state, ...rest }:
|
|
13
|
+
declare const Select: ({ type, state, ...rest }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export default Select;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import c, { useEffect as m } from "react";
|
|
3
|
+
import "../../providers/BreakpointThemeProvider.js";
|
|
4
|
+
import { u } from "../../Typography-DqI7RslA.js";
|
|
5
|
+
import { TYPE as l } from "../../constants/index.js";
|
|
6
|
+
import p from "./DropdownChevron.js";
|
|
6
7
|
import { SelectWrapper as i, Select as a, SelectDropdown as f, StyledMenuItem as h } from "./styles.js";
|
|
7
|
-
const
|
|
8
|
-
type: t =
|
|
8
|
+
const I = ({
|
|
9
|
+
type: t = l.primary,
|
|
9
10
|
state: r,
|
|
10
11
|
...d
|
|
11
12
|
}) => {
|
|
12
|
-
|
|
13
|
-
const [
|
|
13
|
+
u();
|
|
14
|
+
const [s, n] = c.useState(!1);
|
|
14
15
|
return m(() => {
|
|
15
16
|
const e = document.createElement("style");
|
|
16
17
|
return e.textContent = `
|
|
@@ -20,11 +21,11 @@ const E = ({
|
|
|
20
21
|
`, document.head.appendChild(e), () => {
|
|
21
22
|
document.head.removeChild(e);
|
|
22
23
|
};
|
|
23
|
-
}, []), /* @__PURE__ */ o(i, { $isFocused:
|
|
24
|
+
}, []), /* @__PURE__ */ o(i, { $isFocused: s, type: t, children: /* @__PURE__ */ o(
|
|
24
25
|
a,
|
|
25
26
|
{
|
|
26
27
|
...d,
|
|
27
|
-
suffixIcon: /* @__PURE__ */ o(
|
|
28
|
+
suffixIcon: /* @__PURE__ */ o(p, {}),
|
|
28
29
|
dropdownRender: (e) => /* @__PURE__ */ o(f, { type: t, state: r, children: /* @__PURE__ */ o(h, { type: t, state: r, children: e }) }),
|
|
29
30
|
onFocus: () => n(!0),
|
|
30
31
|
onBlur: () => n(!1)
|
|
@@ -32,5 +33,5 @@ const E = ({
|
|
|
32
33
|
) });
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
I as default
|
|
36
37
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ci = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
2
2
|
import { jsx as Zn } from "react/jsx-runtime";
|
|
3
|
-
import { b as Ha, e as Ko, h as fi, l as pi, p as mi, d as bi, c as vi, i as ea, a as ta, s as ra, g as Ie, v as hi, w as yi } from "../../../setup-
|
|
3
|
+
import { b as Ha, e as Ko, h as fi, l as pi, p as mi, d as bi, c as vi, i as ea, a as ta, s as ra, g as Ie, v as hi, w as yi } from "../../../setup-CKu7-AfI.js";
|
|
4
4
|
import na from "../Select.js";
|
|
5
5
|
import { TYPE as gi, STATE as Ei } from "../../../constants/index.js";
|
|
6
6
|
var FE = ci((sC, ye) => {
|