@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
package/dist/index-CfDY25LP.js
DELETED
|
@@ -1,873 +0,0 @@
|
|
|
1
|
-
import { f as Kr, e as Qr, E as Zr, v as Jr, A as Gr, x as fr, n as G, s as zr, j as Rr, r as Or, B as _r, t as Xr, K as Yr, h as pr, b as Ge, M as vr } from "./index-oK7z6jnz.js";
|
|
2
|
-
import { h as lr, k as gn, f as x, u as Ir, r as mr, w as et, _ as B, c as tn, a as Wr, j as nt, e as rt } from "./warning-C63HNL9U.js";
|
|
3
|
-
import * as a from "react";
|
|
4
|
-
import Hr from "react";
|
|
5
|
-
import { R as Br } from "./index-bKlRxQp4.js";
|
|
6
|
-
import { g as hr } from "./AntdIcon-BoLh1dP8.js";
|
|
7
|
-
import { i as tt } from "./isVisible-A-IfeFoT.js";
|
|
8
|
-
var At = /* @__PURE__ */ function() {
|
|
9
|
-
function e(r, n) {
|
|
10
|
-
Qr(this, e), lr(this, "name", void 0), lr(this, "style", void 0), lr(this, "_keyframe", !0), this.name = r, this.style = n;
|
|
11
|
-
}
|
|
12
|
-
return Kr(e, [{
|
|
13
|
-
key: "getName",
|
|
14
|
-
value: function() {
|
|
15
|
-
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
16
|
-
return n ? "".concat(n, "-").concat(this.name) : this.name;
|
|
17
|
-
}
|
|
18
|
-
}]), e;
|
|
19
|
-
}();
|
|
20
|
-
const Ar = /* @__PURE__ */ Hr.createContext(void 0);
|
|
21
|
-
process.env.NODE_ENV !== "production" && (Ar.displayName = "zIndexContext");
|
|
22
|
-
const Ee = 100, at = 10, it = Ee * at, ot = it + Ee, Fr = {
|
|
23
|
-
Modal: Ee,
|
|
24
|
-
Drawer: Ee,
|
|
25
|
-
Popover: Ee,
|
|
26
|
-
Popconfirm: Ee,
|
|
27
|
-
Tooltip: Ee,
|
|
28
|
-
Tour: Ee,
|
|
29
|
-
FloatButton: Ee
|
|
30
|
-
}, ut = {
|
|
31
|
-
SelectLike: 50,
|
|
32
|
-
Dropdown: 50,
|
|
33
|
-
DatePicker: 50,
|
|
34
|
-
Menu: 50,
|
|
35
|
-
ImagePreview: 1
|
|
36
|
-
};
|
|
37
|
-
function st(e) {
|
|
38
|
-
return e in Fr;
|
|
39
|
-
}
|
|
40
|
-
const Ft = (e, r) => {
|
|
41
|
-
const [, n] = Zr(), t = Hr.useContext(Ar), i = st(e);
|
|
42
|
-
let o;
|
|
43
|
-
if (r !== void 0)
|
|
44
|
-
o = [r, r];
|
|
45
|
-
else {
|
|
46
|
-
let s = t ?? 0;
|
|
47
|
-
i ? s += // Use preset token zIndex by default but not stack when has parent container
|
|
48
|
-
(t ? 0 : n.zIndexPopupBase) + // Container offset
|
|
49
|
-
Fr[e] : s += ut[e], o = [t === void 0 ? r : s, s];
|
|
50
|
-
}
|
|
51
|
-
if (process.env.NODE_ENV !== "production") {
|
|
52
|
-
const s = Jr(e), c = n.zIndexPopupBase + ot, v = o[0] || 0;
|
|
53
|
-
process.env.NODE_ENV !== "production" && s(r !== void 0 || v <= c, "usage", "`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.");
|
|
54
|
-
}
|
|
55
|
-
return o;
|
|
56
|
-
}, dr = () => ({
|
|
57
|
-
height: 0,
|
|
58
|
-
opacity: 0
|
|
59
|
-
}), Cr = (e) => {
|
|
60
|
-
const {
|
|
61
|
-
scrollHeight: r
|
|
62
|
-
} = e;
|
|
63
|
-
return {
|
|
64
|
-
height: r,
|
|
65
|
-
opacity: 1
|
|
66
|
-
};
|
|
67
|
-
}, lt = (e) => ({
|
|
68
|
-
height: e ? e.offsetHeight : 0
|
|
69
|
-
}), cr = (e, r) => (r == null ? void 0 : r.deadline) === !0 || r.propertyName === "height", Vt = function() {
|
|
70
|
-
return {
|
|
71
|
-
motionName: `${arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Gr}-motion-collapse`,
|
|
72
|
-
onAppearStart: dr,
|
|
73
|
-
onEnterStart: dr,
|
|
74
|
-
onAppearActive: Cr,
|
|
75
|
-
onEnterActive: Cr,
|
|
76
|
-
onLeaveStart: lt,
|
|
77
|
-
onLeaveActive: dr,
|
|
78
|
-
onAppearEnd: cr,
|
|
79
|
-
onEnterEnd: cr,
|
|
80
|
-
onLeaveEnd: cr,
|
|
81
|
-
motionDeadline: 500
|
|
82
|
-
};
|
|
83
|
-
}, jt = (e, r, n) => n !== void 0 ? n : `${e}-${r}`, dt = (e) => ({
|
|
84
|
-
animationDuration: e,
|
|
85
|
-
animationFillMode: "both"
|
|
86
|
-
}), ct = (e) => ({
|
|
87
|
-
animationDuration: e,
|
|
88
|
-
animationFillMode: "both"
|
|
89
|
-
}), qt = function(e, r, n, t) {
|
|
90
|
-
const o = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
|
|
91
|
-
return {
|
|
92
|
-
[`
|
|
93
|
-
${o}${e}-enter,
|
|
94
|
-
${o}${e}-appear
|
|
95
|
-
`]: Object.assign(Object.assign({}, dt(t)), {
|
|
96
|
-
animationPlayState: "paused"
|
|
97
|
-
}),
|
|
98
|
-
[`${o}${e}-leave`]: Object.assign(Object.assign({}, ct(t)), {
|
|
99
|
-
animationPlayState: "paused"
|
|
100
|
-
}),
|
|
101
|
-
[`
|
|
102
|
-
${o}${e}-enter${e}-enter-active,
|
|
103
|
-
${o}${e}-appear${e}-appear-active
|
|
104
|
-
`]: {
|
|
105
|
-
animationName: r,
|
|
106
|
-
animationPlayState: "running"
|
|
107
|
-
},
|
|
108
|
-
[`${o}${e}-leave${e}-leave-active`]: {
|
|
109
|
-
animationName: n,
|
|
110
|
-
animationPlayState: "running",
|
|
111
|
-
pointerEvents: "none"
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
var Vr = /* @__PURE__ */ a.createContext(null), br = [];
|
|
116
|
-
function ft(e, r) {
|
|
117
|
-
var n = a.useState(function() {
|
|
118
|
-
if (!gn())
|
|
119
|
-
return null;
|
|
120
|
-
var m = document.createElement("div");
|
|
121
|
-
return process.env.NODE_ENV !== "production" && r && m.setAttribute("data-debug", r), m;
|
|
122
|
-
}), t = x(n, 1), i = t[0], o = a.useRef(!1), s = a.useContext(Vr), c = a.useState(br), v = x(c, 2), h = v[0], k = v[1], g = s || (o.current ? void 0 : function(m) {
|
|
123
|
-
k(function(D) {
|
|
124
|
-
var C = [m].concat(fr(D));
|
|
125
|
-
return C;
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
function y() {
|
|
129
|
-
i.parentElement || document.body.appendChild(i), o.current = !0;
|
|
130
|
-
}
|
|
131
|
-
function d() {
|
|
132
|
-
var m;
|
|
133
|
-
(m = i.parentElement) === null || m === void 0 || m.removeChild(i), o.current = !1;
|
|
134
|
-
}
|
|
135
|
-
return G(function() {
|
|
136
|
-
return e ? s ? s(y) : y() : d(), d;
|
|
137
|
-
}, [e]), G(function() {
|
|
138
|
-
h.length && (h.forEach(function(m) {
|
|
139
|
-
return m();
|
|
140
|
-
}), k(br));
|
|
141
|
-
}, [h]), [i, g];
|
|
142
|
-
}
|
|
143
|
-
function vt(e) {
|
|
144
|
-
var r = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), n = document.createElement("div");
|
|
145
|
-
n.id = r;
|
|
146
|
-
var t = n.style;
|
|
147
|
-
t.position = "absolute", t.left = "0", t.top = "0", t.width = "100px", t.height = "100px", t.overflow = "scroll";
|
|
148
|
-
var i, o;
|
|
149
|
-
if (e) {
|
|
150
|
-
var s = getComputedStyle(e);
|
|
151
|
-
t.scrollbarColor = s.scrollbarColor, t.scrollbarWidth = s.scrollbarWidth;
|
|
152
|
-
var c = getComputedStyle(e, "::-webkit-scrollbar"), v = parseInt(c.width, 10), h = parseInt(c.height, 10);
|
|
153
|
-
try {
|
|
154
|
-
var k = v ? "width: ".concat(c.width, ";") : "", g = h ? "height: ".concat(c.height, ";") : "";
|
|
155
|
-
Ir(`
|
|
156
|
-
#`.concat(r, `::-webkit-scrollbar {
|
|
157
|
-
`).concat(k, `
|
|
158
|
-
`).concat(g, `
|
|
159
|
-
}`), r);
|
|
160
|
-
} catch (m) {
|
|
161
|
-
console.error(m), i = v, o = h;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
document.body.appendChild(n);
|
|
165
|
-
var y = e && i && !isNaN(i) ? i : n.offsetWidth - n.clientWidth, d = e && o && !isNaN(o) ? o : n.offsetHeight - n.clientHeight;
|
|
166
|
-
return document.body.removeChild(n), mr(r), {
|
|
167
|
-
width: y,
|
|
168
|
-
height: d
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function mt(e) {
|
|
172
|
-
return typeof document > "u" || !e || !(e instanceof Element) ? {
|
|
173
|
-
width: 0,
|
|
174
|
-
height: 0
|
|
175
|
-
} : vt(e);
|
|
176
|
-
}
|
|
177
|
-
function ht() {
|
|
178
|
-
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
179
|
-
}
|
|
180
|
-
var gt = "rc-util-locker-".concat(Date.now()), Mr = 0;
|
|
181
|
-
function yt(e) {
|
|
182
|
-
var r = !!e, n = a.useState(function() {
|
|
183
|
-
return Mr += 1, "".concat(gt, "_").concat(Mr);
|
|
184
|
-
}), t = x(n, 1), i = t[0];
|
|
185
|
-
G(function() {
|
|
186
|
-
if (r) {
|
|
187
|
-
var o = mt(document.body).width, s = ht();
|
|
188
|
-
Ir(`
|
|
189
|
-
html body {
|
|
190
|
-
overflow-y: hidden;
|
|
191
|
-
`.concat(s ? "width: calc(100% - ".concat(o, "px);") : "", `
|
|
192
|
-
}`), i);
|
|
193
|
-
} else
|
|
194
|
-
mr(i);
|
|
195
|
-
return function() {
|
|
196
|
-
mr(i);
|
|
197
|
-
};
|
|
198
|
-
}, [r, i]);
|
|
199
|
-
}
|
|
200
|
-
var wt = !1;
|
|
201
|
-
function Ct(e) {
|
|
202
|
-
return wt;
|
|
203
|
-
}
|
|
204
|
-
var Pr = function(r) {
|
|
205
|
-
return r === !1 ? !1 : !gn() || !r ? null : typeof r == "string" ? document.querySelector(r) : typeof r == "function" ? r() : r;
|
|
206
|
-
}, yr = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
207
|
-
var n = e.open, t = e.autoLock, i = e.getContainer, o = e.debug, s = e.autoDestroy, c = s === void 0 ? !0 : s, v = e.children, h = a.useState(n), k = x(h, 2), g = k[0], y = k[1], d = g || n;
|
|
208
|
-
process.env.NODE_ENV !== "production" && et(gn() || !n, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."), a.useEffect(function() {
|
|
209
|
-
(c || n) && y(n);
|
|
210
|
-
}, [n, c]);
|
|
211
|
-
var m = a.useState(function() {
|
|
212
|
-
return Pr(i);
|
|
213
|
-
}), D = x(m, 2), C = D[0], R = D[1];
|
|
214
|
-
a.useEffect(function() {
|
|
215
|
-
var U = Pr(i);
|
|
216
|
-
R(U ?? null);
|
|
217
|
-
});
|
|
218
|
-
var $ = ft(d && !C, o), b = x($, 2), z = b[0], T = b[1], f = C ?? z;
|
|
219
|
-
yt(t && n && gn() && (f === z || f === document.body));
|
|
220
|
-
var re = null;
|
|
221
|
-
if (v && zr(v) && r) {
|
|
222
|
-
var ce = v;
|
|
223
|
-
re = ce.ref;
|
|
224
|
-
}
|
|
225
|
-
var te = Rr(re, r);
|
|
226
|
-
if (!d || !gn() || C === void 0)
|
|
227
|
-
return null;
|
|
228
|
-
var fe = f === !1 || Ct(), ae = v;
|
|
229
|
-
return r && (ae = /* @__PURE__ */ a.cloneElement(v, {
|
|
230
|
-
ref: te
|
|
231
|
-
})), /* @__PURE__ */ a.createElement(Vr.Provider, {
|
|
232
|
-
value: T
|
|
233
|
-
}, fe ? ae : /* @__PURE__ */ Or.createPortal(ae, f));
|
|
234
|
-
});
|
|
235
|
-
process.env.NODE_ENV !== "production" && (yr.displayName = "Portal");
|
|
236
|
-
function bt() {
|
|
237
|
-
var e = B({}, a);
|
|
238
|
-
return e.useId;
|
|
239
|
-
}
|
|
240
|
-
var Sr = 0, Nr = bt();
|
|
241
|
-
const Mt = Nr ? (
|
|
242
|
-
// Use React `useId`
|
|
243
|
-
function(r) {
|
|
244
|
-
var n = Nr();
|
|
245
|
-
return r || (process.env.NODE_ENV === "test" ? "test-id" : n);
|
|
246
|
-
}
|
|
247
|
-
) : (
|
|
248
|
-
// Use compatible of `useId`
|
|
249
|
-
function(r) {
|
|
250
|
-
var n = a.useState("ssr-id"), t = x(n, 2), i = t[0], o = t[1];
|
|
251
|
-
return a.useEffect(function() {
|
|
252
|
-
var s = Sr;
|
|
253
|
-
Sr += 1, o("rc_unique_".concat(s));
|
|
254
|
-
}, []), r || (process.env.NODE_ENV === "test" ? "test-id" : i);
|
|
255
|
-
}
|
|
256
|
-
), Pt = function() {
|
|
257
|
-
if (typeof navigator > "u" || typeof window > "u")
|
|
258
|
-
return !1;
|
|
259
|
-
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
260
|
-
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
|
|
261
|
-
};
|
|
262
|
-
function St(e) {
|
|
263
|
-
var r = e.prefixCls, n = e.align, t = e.arrow, i = e.arrowPos, o = t || {}, s = o.className, c = o.content, v = i.x, h = v === void 0 ? 0 : v, k = i.y, g = k === void 0 ? 0 : k, y = a.useRef();
|
|
264
|
-
if (!n || !n.points)
|
|
265
|
-
return null;
|
|
266
|
-
var d = {
|
|
267
|
-
position: "absolute"
|
|
268
|
-
};
|
|
269
|
-
if (n.autoArrow !== !1) {
|
|
270
|
-
var m = n.points[0], D = n.points[1], C = m[0], R = m[1], $ = D[0], b = D[1];
|
|
271
|
-
C === $ || !["t", "b"].includes(C) ? d.top = g : C === "t" ? d.top = 0 : d.bottom = 0, R === b || !["l", "r"].includes(R) ? d.left = h : R === "l" ? d.left = 0 : d.right = 0;
|
|
272
|
-
}
|
|
273
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
274
|
-
ref: y,
|
|
275
|
-
className: tn("".concat(r, "-arrow"), s),
|
|
276
|
-
style: d
|
|
277
|
-
}, c);
|
|
278
|
-
}
|
|
279
|
-
function Nt(e) {
|
|
280
|
-
var r = e.prefixCls, n = e.open, t = e.zIndex, i = e.mask, o = e.motion;
|
|
281
|
-
return i ? /* @__PURE__ */ a.createElement(_r, Wr({}, o, {
|
|
282
|
-
motionAppear: !0,
|
|
283
|
-
visible: n,
|
|
284
|
-
removeOnLeave: !0
|
|
285
|
-
}), function(s) {
|
|
286
|
-
var c = s.className;
|
|
287
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
288
|
-
style: {
|
|
289
|
-
zIndex: t
|
|
290
|
-
},
|
|
291
|
-
className: tn("".concat(r, "-mask"), c)
|
|
292
|
-
});
|
|
293
|
-
}) : null;
|
|
294
|
-
}
|
|
295
|
-
var jr = /* @__PURE__ */ a.memo(function(e) {
|
|
296
|
-
var r = e.children;
|
|
297
|
-
return r;
|
|
298
|
-
}, function(e, r) {
|
|
299
|
-
return r.cache;
|
|
300
|
-
});
|
|
301
|
-
process.env.NODE_ENV !== "production" && (jr.displayName = "PopupContent");
|
|
302
|
-
var qr = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
303
|
-
var n = e.popup, t = e.className, i = e.prefixCls, o = e.style, s = e.target, c = e.onVisibleChanged, v = e.open, h = e.keepDom, k = e.fresh, g = e.onClick, y = e.mask, d = e.arrow, m = e.arrowPos, D = e.align, C = e.motion, R = e.maskMotion, $ = e.forceRender, b = e.getPopupContainer, z = e.autoDestroy, T = e.portal, f = e.zIndex, re = e.onMouseEnter, ce = e.onMouseLeave, te = e.onPointerEnter, fe = e.onPointerDownCapture, ae = e.ready, U = e.offsetX, Me = e.offsetY, ve = e.offsetR, Pe = e.offsetB, K = e.onAlign, Se = e.onPrepare, W = e.stretch, A = e.targetWidth, w = e.targetHeight, He = typeof n == "function" ? n() : n, ie = v || h, H = (b == null ? void 0 : b.length) > 0, M = a.useState(!b || !H), Q = x(M, 2), Be = Q[0], an = Q[1];
|
|
304
|
-
if (G(function() {
|
|
305
|
-
!Be && H && s && an(!0);
|
|
306
|
-
}, [Be, H, s]), !Be)
|
|
307
|
-
return null;
|
|
308
|
-
var me = "auto", Z = {
|
|
309
|
-
left: "-1000vw",
|
|
310
|
-
top: "-1000vh",
|
|
311
|
-
right: me,
|
|
312
|
-
bottom: me
|
|
313
|
-
};
|
|
314
|
-
if (ae || !v) {
|
|
315
|
-
var xe, Ae = D.points, O = D.dynamicInset || ((xe = D._experimental) === null || xe === void 0 ? void 0 : xe.dynamicInset), he = O && Ae[0][1] === "r", oe = O && Ae[0][0] === "b";
|
|
316
|
-
he ? (Z.right = ve, Z.left = me) : (Z.left = U, Z.right = me), oe ? (Z.bottom = Pe, Z.top = me) : (Z.top = Me, Z.bottom = me);
|
|
317
|
-
}
|
|
318
|
-
var q = {};
|
|
319
|
-
return W && (W.includes("height") && w ? q.height = w : W.includes("minHeight") && w && (q.minHeight = w), W.includes("width") && A ? q.width = A : W.includes("minWidth") && A && (q.minWidth = A)), v || (q.pointerEvents = "none"), /* @__PURE__ */ a.createElement(T, {
|
|
320
|
-
open: $ || ie,
|
|
321
|
-
getContainer: b && function() {
|
|
322
|
-
return b(s);
|
|
323
|
-
},
|
|
324
|
-
autoDestroy: z
|
|
325
|
-
}, /* @__PURE__ */ a.createElement(Nt, {
|
|
326
|
-
prefixCls: i,
|
|
327
|
-
open: v,
|
|
328
|
-
zIndex: f,
|
|
329
|
-
mask: y,
|
|
330
|
-
motion: R
|
|
331
|
-
}), /* @__PURE__ */ a.createElement(Br, {
|
|
332
|
-
onResize: K,
|
|
333
|
-
disabled: !v
|
|
334
|
-
}, function(on) {
|
|
335
|
-
return /* @__PURE__ */ a.createElement(_r, Wr({
|
|
336
|
-
motionAppear: !0,
|
|
337
|
-
motionEnter: !0,
|
|
338
|
-
motionLeave: !0,
|
|
339
|
-
removeOnLeave: !1,
|
|
340
|
-
forceRender: $,
|
|
341
|
-
leavedClassName: "".concat(i, "-hidden")
|
|
342
|
-
}, C, {
|
|
343
|
-
onAppearPrepare: Se,
|
|
344
|
-
onEnterPrepare: Se,
|
|
345
|
-
visible: v,
|
|
346
|
-
onVisibleChanged: function(X) {
|
|
347
|
-
var ge;
|
|
348
|
-
C == null || (ge = C.onVisibleChanged) === null || ge === void 0 || ge.call(C, X), c(X);
|
|
349
|
-
}
|
|
350
|
-
}), function(Te, X) {
|
|
351
|
-
var ge = Te.className, Fe = Te.style, F = tn(i, ge, t);
|
|
352
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
353
|
-
ref: Xr(on, r, X),
|
|
354
|
-
className: F,
|
|
355
|
-
style: B(B(B(B({
|
|
356
|
-
"--arrow-x": "".concat(m.x || 0, "px"),
|
|
357
|
-
"--arrow-y": "".concat(m.y || 0, "px")
|
|
358
|
-
}, Z), q), Fe), {}, {
|
|
359
|
-
boxSizing: "border-box",
|
|
360
|
-
zIndex: f
|
|
361
|
-
}, o),
|
|
362
|
-
onMouseEnter: re,
|
|
363
|
-
onMouseLeave: ce,
|
|
364
|
-
onPointerEnter: te,
|
|
365
|
-
onClick: g,
|
|
366
|
-
onPointerDownCapture: fe
|
|
367
|
-
}, d && /* @__PURE__ */ a.createElement(St, {
|
|
368
|
-
prefixCls: i,
|
|
369
|
-
arrow: d,
|
|
370
|
-
arrowPos: m,
|
|
371
|
-
align: D
|
|
372
|
-
}), /* @__PURE__ */ a.createElement(jr, {
|
|
373
|
-
cache: !v && !k
|
|
374
|
-
}, He));
|
|
375
|
-
});
|
|
376
|
-
}));
|
|
377
|
-
});
|
|
378
|
-
process.env.NODE_ENV !== "production" && (qr.displayName = "Popup");
|
|
379
|
-
var Ur = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
380
|
-
var n = e.children, t = e.getTriggerDOMNode, i = zr(n), o = a.useCallback(function(c) {
|
|
381
|
-
Yr(r, t ? t(c) : c);
|
|
382
|
-
}, [t]), s = Rr(o, pr(n));
|
|
383
|
-
return i ? /* @__PURE__ */ a.cloneElement(n, {
|
|
384
|
-
ref: s
|
|
385
|
-
}) : n;
|
|
386
|
-
});
|
|
387
|
-
process.env.NODE_ENV !== "production" && (Ur.displayName = "TriggerWrapper");
|
|
388
|
-
var kr = /* @__PURE__ */ a.createContext(null);
|
|
389
|
-
function Dr(e) {
|
|
390
|
-
return e ? Array.isArray(e) ? e : [e] : [];
|
|
391
|
-
}
|
|
392
|
-
function kt(e, r, n, t) {
|
|
393
|
-
return a.useMemo(function() {
|
|
394
|
-
var i = Dr(n ?? r), o = Dr(t ?? r), s = new Set(i), c = new Set(o);
|
|
395
|
-
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), c.has("hover") && (c.delete("hover"), c.add("click"))), [s, c];
|
|
396
|
-
}, [e, r, n, t]);
|
|
397
|
-
}
|
|
398
|
-
function Dt() {
|
|
399
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = arguments.length > 2 ? arguments[2] : void 0;
|
|
400
|
-
return n ? e[0] === r[0] : e[0] === r[0] && e[1] === r[1];
|
|
401
|
-
}
|
|
402
|
-
function Et(e, r, n, t) {
|
|
403
|
-
for (var i = n.points, o = Object.keys(e), s = 0; s < o.length; s += 1) {
|
|
404
|
-
var c, v = o[s];
|
|
405
|
-
if (Dt((c = e[v]) === null || c === void 0 ? void 0 : c.points, i, t))
|
|
406
|
-
return "".concat(r, "-placement-").concat(v);
|
|
407
|
-
}
|
|
408
|
-
return "";
|
|
409
|
-
}
|
|
410
|
-
function Er(e, r, n, t) {
|
|
411
|
-
return r || (n ? {
|
|
412
|
-
motionName: "".concat(e, "-").concat(n)
|
|
413
|
-
} : t ? {
|
|
414
|
-
motionName: t
|
|
415
|
-
} : null);
|
|
416
|
-
}
|
|
417
|
-
function wn(e) {
|
|
418
|
-
return e.ownerDocument.defaultView;
|
|
419
|
-
}
|
|
420
|
-
function gr(e) {
|
|
421
|
-
for (var r = [], n = e == null ? void 0 : e.parentElement, t = ["hidden", "scroll", "clip", "auto"]; n; ) {
|
|
422
|
-
var i = wn(n).getComputedStyle(n), o = i.overflowX, s = i.overflowY, c = i.overflow;
|
|
423
|
-
[o, s, c].some(function(v) {
|
|
424
|
-
return t.includes(v);
|
|
425
|
-
}) && r.push(n), n = n.parentElement;
|
|
426
|
-
}
|
|
427
|
-
return r;
|
|
428
|
-
}
|
|
429
|
-
function yn(e) {
|
|
430
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
431
|
-
return Number.isNaN(e) ? r : e;
|
|
432
|
-
}
|
|
433
|
-
function hn(e) {
|
|
434
|
-
return yn(parseFloat(e), 0);
|
|
435
|
-
}
|
|
436
|
-
function xr(e, r) {
|
|
437
|
-
var n = B({}, e);
|
|
438
|
-
return (r || []).forEach(function(t) {
|
|
439
|
-
if (!(t instanceof HTMLBodyElement || t instanceof HTMLHtmlElement)) {
|
|
440
|
-
var i = wn(t).getComputedStyle(t), o = i.overflow, s = i.overflowClipMargin, c = i.borderTopWidth, v = i.borderBottomWidth, h = i.borderLeftWidth, k = i.borderRightWidth, g = t.getBoundingClientRect(), y = t.offsetHeight, d = t.clientHeight, m = t.offsetWidth, D = t.clientWidth, C = hn(c), R = hn(v), $ = hn(h), b = hn(k), z = yn(Math.round(g.width / m * 1e3) / 1e3), T = yn(Math.round(g.height / y * 1e3) / 1e3), f = (m - D - $ - b) * z, re = (y - d - C - R) * T, ce = C * T, te = R * T, fe = $ * z, ae = b * z, U = 0, Me = 0;
|
|
441
|
-
if (o === "clip") {
|
|
442
|
-
var ve = hn(s);
|
|
443
|
-
U = ve * z, Me = ve * T;
|
|
444
|
-
}
|
|
445
|
-
var Pe = g.x + fe - U, K = g.y + ce - Me, Se = Pe + g.width + 2 * U - fe - ae - f, W = K + g.height + 2 * Me - ce - te - re;
|
|
446
|
-
n.left = Math.max(n.left, Pe), n.top = Math.max(n.top, K), n.right = Math.min(n.right, Se), n.bottom = Math.min(n.bottom, W);
|
|
447
|
-
}
|
|
448
|
-
}), n;
|
|
449
|
-
}
|
|
450
|
-
function Tr(e) {
|
|
451
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(r), t = n.match(/^(.*)\%$/);
|
|
452
|
-
return t ? e * (parseFloat(t[1]) / 100) : parseFloat(n);
|
|
453
|
-
}
|
|
454
|
-
function Lr(e, r) {
|
|
455
|
-
var n = r || [], t = x(n, 2), i = t[0], o = t[1];
|
|
456
|
-
return [Tr(e.width, i), Tr(e.height, o)];
|
|
457
|
-
}
|
|
458
|
-
function $r() {
|
|
459
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
460
|
-
return [e[0], e[1]];
|
|
461
|
-
}
|
|
462
|
-
function rn(e, r) {
|
|
463
|
-
var n = r[0], t = r[1], i, o;
|
|
464
|
-
return n === "t" ? o = e.y : n === "b" ? o = e.y + e.height : o = e.y + e.height / 2, t === "l" ? i = e.x : t === "r" ? i = e.x + e.width : i = e.x + e.width / 2, {
|
|
465
|
-
x: i,
|
|
466
|
-
y: o
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
function We(e, r) {
|
|
470
|
-
var n = {
|
|
471
|
-
t: "b",
|
|
472
|
-
b: "t",
|
|
473
|
-
l: "r",
|
|
474
|
-
r: "l"
|
|
475
|
-
};
|
|
476
|
-
return e.map(function(t, i) {
|
|
477
|
-
return i === r ? n[t] || "c" : t;
|
|
478
|
-
}).join("");
|
|
479
|
-
}
|
|
480
|
-
function xt(e, r, n, t, i, o, s) {
|
|
481
|
-
var c = a.useState({
|
|
482
|
-
ready: !1,
|
|
483
|
-
offsetX: 0,
|
|
484
|
-
offsetY: 0,
|
|
485
|
-
offsetR: 0,
|
|
486
|
-
offsetB: 0,
|
|
487
|
-
arrowX: 0,
|
|
488
|
-
arrowY: 0,
|
|
489
|
-
scaleX: 1,
|
|
490
|
-
scaleY: 1,
|
|
491
|
-
align: i[t] || {}
|
|
492
|
-
}), v = x(c, 2), h = v[0], k = v[1], g = a.useRef(0), y = a.useMemo(function() {
|
|
493
|
-
return r ? gr(r) : [];
|
|
494
|
-
}, [r]), d = a.useRef({}), m = function() {
|
|
495
|
-
d.current = {};
|
|
496
|
-
};
|
|
497
|
-
e || m();
|
|
498
|
-
var D = Ge(function() {
|
|
499
|
-
if (r && n && e) {
|
|
500
|
-
let ne = function(nn, _e) {
|
|
501
|
-
var Ie = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Cn, mn = M.x + nn, Wn = M.y + _e, ir = mn + he, or = Wn + O, ur = Math.max(mn, Ie.left), u = Math.max(Wn, Ie.top), l = Math.min(ir, Ie.right), E = Math.min(or, Ie.bottom);
|
|
502
|
-
return Math.max(0, (l - ur) * (E - u));
|
|
503
|
-
}, In = function() {
|
|
504
|
-
Ue = M.y + N, Ke = Ue + O, ke = M.x + P, Xe = ke + he;
|
|
505
|
-
};
|
|
506
|
-
var $, b, z, T, f = r, re = f.ownerDocument, ce = wn(f), te = ce.getComputedStyle(f), fe = te.width, ae = te.height, U = te.position, Me = f.style.left, ve = f.style.top, Pe = f.style.right, K = f.style.bottom, Se = f.style.overflow, W = B(B({}, i[t]), o), A = re.createElement("div");
|
|
507
|
-
($ = f.parentElement) === null || $ === void 0 || $.appendChild(A), A.style.left = "".concat(f.offsetLeft, "px"), A.style.top = "".concat(f.offsetTop, "px"), A.style.position = U, A.style.height = "".concat(f.offsetHeight, "px"), A.style.width = "".concat(f.offsetWidth, "px"), f.style.left = "0", f.style.top = "0", f.style.right = "auto", f.style.bottom = "auto", f.style.overflow = "hidden";
|
|
508
|
-
var w;
|
|
509
|
-
if (Array.isArray(n))
|
|
510
|
-
w = {
|
|
511
|
-
x: n[0],
|
|
512
|
-
y: n[1],
|
|
513
|
-
width: 0,
|
|
514
|
-
height: 0
|
|
515
|
-
};
|
|
516
|
-
else {
|
|
517
|
-
var He, ie, H = n.getBoundingClientRect();
|
|
518
|
-
H.x = (He = H.x) !== null && He !== void 0 ? He : H.left, H.y = (ie = H.y) !== null && ie !== void 0 ? ie : H.top, w = {
|
|
519
|
-
x: H.x,
|
|
520
|
-
y: H.y,
|
|
521
|
-
width: H.width,
|
|
522
|
-
height: H.height
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
var M = f.getBoundingClientRect();
|
|
526
|
-
M.x = (b = M.x) !== null && b !== void 0 ? b : M.left, M.y = (z = M.y) !== null && z !== void 0 ? z : M.top;
|
|
527
|
-
var Q = re.documentElement, Be = Q.clientWidth, an = Q.clientHeight, me = Q.scrollWidth, Z = Q.scrollHeight, xe = Q.scrollTop, Ae = Q.scrollLeft, O = M.height, he = M.width, oe = w.height, q = w.width, on = {
|
|
528
|
-
left: 0,
|
|
529
|
-
top: 0,
|
|
530
|
-
right: Be,
|
|
531
|
-
bottom: an
|
|
532
|
-
}, Te = {
|
|
533
|
-
left: -Ae,
|
|
534
|
-
top: -xe,
|
|
535
|
-
right: me - Ae,
|
|
536
|
-
bottom: Z - xe
|
|
537
|
-
}, X = W.htmlRegion, ge = "visible", Fe = "visibleFirst";
|
|
538
|
-
X !== "scroll" && X !== Fe && (X = ge);
|
|
539
|
-
var F = X === Fe, An = xr(Te, y), S = xr(on, y), Cn = X === ge ? S : An, Ve = F ? S : Cn;
|
|
540
|
-
f.style.left = "auto", f.style.top = "auto", f.style.right = "0", f.style.bottom = "0";
|
|
541
|
-
var V = f.getBoundingClientRect();
|
|
542
|
-
f.style.left = Me, f.style.top = ve, f.style.right = Pe, f.style.bottom = K, f.style.overflow = Se, (T = f.parentElement) === null || T === void 0 || T.removeChild(A);
|
|
543
|
-
var Le = yn(Math.round(he / parseFloat(fe) * 1e3) / 1e3), Ne = yn(Math.round(O / parseFloat(ae) * 1e3) / 1e3);
|
|
544
|
-
if (Le === 0 || Ne === 0 || vr(n) && !tt(n))
|
|
545
|
-
return;
|
|
546
|
-
var Fn = W.offset, Vn = W.targetOffset, bn = Lr(M, Fn), ue = x(bn, 2), se = ue[0], Y = ue[1], jn = Lr(w, Vn), je = x(jn, 2), p = je[0], $e = je[1];
|
|
547
|
-
w.x -= p, w.y -= $e;
|
|
548
|
-
var qn = W.points || [], Mn = x(qn, 2), Un = Mn[0], Kn = Mn[1], ye = $r(Kn), J = $r(Un), un = rn(w, ye), j = rn(M, J), ze = B({}, W), P = un.x - j.x + se, N = un.y - j.y + Y, le = ne(P, N), qe = ne(P, N, S), sn = rn(w, ["t", "l"]), ee = rn(M, ["t", "l"]), Pn = rn(w, ["b", "r"]), ln = rn(M, ["b", "r"]), Re = W.overflow || {}, Sn = Re.adjustX, Qn = Re.adjustY, dn = Re.shiftX, Oe = Re.shiftY, cn = function(_e) {
|
|
549
|
-
return typeof _e == "boolean" ? _e : _e >= 0;
|
|
550
|
-
}, Ue, Ke, ke, Xe;
|
|
551
|
-
In();
|
|
552
|
-
var Qe = cn(Qn), Nn = J[0] === ye[0];
|
|
553
|
-
if (Qe && J[0] === "t" && (Ke > Ve.bottom || d.current.bt)) {
|
|
554
|
-
var I = N;
|
|
555
|
-
Nn ? I -= O - oe : I = sn.y - ln.y - Y;
|
|
556
|
-
var kn = ne(P, I), Zn = ne(P, I, S);
|
|
557
|
-
// Of course use larger one
|
|
558
|
-
kn > le || kn === le && (!F || // Choose recommend one
|
|
559
|
-
Zn >= qe) ? (d.current.bt = !0, N = I, Y = -Y, ze.points = [We(J, 0), We(ye, 0)]) : d.current.bt = !1;
|
|
560
|
-
}
|
|
561
|
-
if (Qe && J[0] === "b" && (Ue < Ve.top || d.current.tb)) {
|
|
562
|
-
var Ze = N;
|
|
563
|
-
Nn ? Ze += O - oe : Ze = Pn.y - ee.y - Y;
|
|
564
|
-
var Dn = ne(P, Ze), Jn = ne(P, Ze, S);
|
|
565
|
-
// Of course use larger one
|
|
566
|
-
Dn > le || Dn === le && (!F || // Choose recommend one
|
|
567
|
-
Jn >= qe) ? (d.current.tb = !0, N = Ze, Y = -Y, ze.points = [We(J, 0), We(ye, 0)]) : d.current.tb = !1;
|
|
568
|
-
}
|
|
569
|
-
var En = cn(Sn), xn = J[1] === ye[1];
|
|
570
|
-
if (En && J[1] === "l" && (Xe > Ve.right || d.current.rl)) {
|
|
571
|
-
var Je = P;
|
|
572
|
-
xn ? Je -= he - q : Je = sn.x - ln.x - se;
|
|
573
|
-
var Tn = ne(Je, N), Ye = ne(Je, N, S);
|
|
574
|
-
// Of course use larger one
|
|
575
|
-
Tn > le || Tn === le && (!F || // Choose recommend one
|
|
576
|
-
Ye >= qe) ? (d.current.rl = !0, P = Je, se = -se, ze.points = [We(J, 1), We(ye, 1)]) : d.current.rl = !1;
|
|
577
|
-
}
|
|
578
|
-
if (En && J[1] === "r" && (ke < Ve.left || d.current.lr)) {
|
|
579
|
-
var De = P;
|
|
580
|
-
xn ? De += he - q : De = Pn.x - ee.x - se;
|
|
581
|
-
var Ln = ne(De, N), $n = ne(De, N, S);
|
|
582
|
-
// Of course use larger one
|
|
583
|
-
Ln > le || Ln === le && (!F || // Choose recommend one
|
|
584
|
-
$n >= qe) ? (d.current.lr = !0, P = De, se = -se, ze.points = [We(J, 1), We(ye, 1)]) : d.current.lr = !1;
|
|
585
|
-
}
|
|
586
|
-
In();
|
|
587
|
-
var we = dn === !0 ? 0 : dn;
|
|
588
|
-
typeof we == "number" && (ke < S.left && (P -= ke - S.left - se, w.x + q < S.left + we && (P += w.x - S.left + q - we)), Xe > S.right && (P -= Xe - S.right - se, w.x > S.right - we && (P += w.x - S.right + we)));
|
|
589
|
-
var de = Oe === !0 ? 0 : Oe;
|
|
590
|
-
typeof de == "number" && (Ue < S.top && (N -= Ue - S.top - Y, w.y + oe < S.top + de && (N += w.y - S.top + oe - de)), Ke > S.bottom && (N -= Ke - S.bottom - Y, w.y > S.bottom - de && (N += w.y - S.bottom + de)));
|
|
591
|
-
var pe = M.x + P, en = pe + he, Ce = M.y + N, Gn = Ce + O, zn = w.x, On = zn + q, fn = w.y, Xn = fn + oe, Yn = Math.max(pe, zn), pn = Math.min(en, On), Rn = (Yn + pn) / 2, er = Rn - pe, nr = Math.max(Ce, fn), _n = Math.min(Gn, Xn), rr = (nr + _n) / 2, tr = rr - Ce;
|
|
592
|
-
s == null || s(r, ze);
|
|
593
|
-
var vn = V.right - M.x - (P + M.width), be = V.bottom - M.y - (N + M.height);
|
|
594
|
-
Le === 1 && (P = Math.round(P), vn = Math.round(vn)), Ne === 1 && (N = Math.round(N), be = Math.round(be));
|
|
595
|
-
var ar = {
|
|
596
|
-
ready: !0,
|
|
597
|
-
offsetX: P / Le,
|
|
598
|
-
offsetY: N / Ne,
|
|
599
|
-
offsetR: vn / Le,
|
|
600
|
-
offsetB: be / Ne,
|
|
601
|
-
arrowX: er / Le,
|
|
602
|
-
arrowY: tr / Ne,
|
|
603
|
-
scaleX: Le,
|
|
604
|
-
scaleY: Ne,
|
|
605
|
-
align: ze
|
|
606
|
-
};
|
|
607
|
-
k(ar);
|
|
608
|
-
}
|
|
609
|
-
}), C = function() {
|
|
610
|
-
g.current += 1;
|
|
611
|
-
var b = g.current;
|
|
612
|
-
Promise.resolve().then(function() {
|
|
613
|
-
g.current === b && D();
|
|
614
|
-
});
|
|
615
|
-
}, R = function() {
|
|
616
|
-
k(function(b) {
|
|
617
|
-
return B(B({}, b), {}, {
|
|
618
|
-
ready: !1
|
|
619
|
-
});
|
|
620
|
-
});
|
|
621
|
-
};
|
|
622
|
-
return G(R, [t]), G(function() {
|
|
623
|
-
e || R();
|
|
624
|
-
}, [e]), [h.ready, h.offsetX, h.offsetY, h.offsetR, h.offsetB, h.arrowX, h.arrowY, h.scaleX, h.scaleY, h.align, C];
|
|
625
|
-
}
|
|
626
|
-
function Tt(e, r, n, t, i) {
|
|
627
|
-
G(function() {
|
|
628
|
-
if (e && r && n) {
|
|
629
|
-
let g = function() {
|
|
630
|
-
t(), i();
|
|
631
|
-
};
|
|
632
|
-
var o = r, s = n, c = gr(o), v = gr(s), h = wn(s), k = new Set([h].concat(fr(c), fr(v)));
|
|
633
|
-
return k.forEach(function(y) {
|
|
634
|
-
y.addEventListener("scroll", g, {
|
|
635
|
-
passive: !0
|
|
636
|
-
});
|
|
637
|
-
}), h.addEventListener("resize", g, {
|
|
638
|
-
passive: !0
|
|
639
|
-
}), t(), function() {
|
|
640
|
-
k.forEach(function(y) {
|
|
641
|
-
y.removeEventListener("scroll", g), h.removeEventListener("resize", g);
|
|
642
|
-
});
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
}, [e, r, n]);
|
|
646
|
-
}
|
|
647
|
-
function Lt(e, r, n, t, i, o, s, c) {
|
|
648
|
-
var v = a.useRef(e);
|
|
649
|
-
v.current = e;
|
|
650
|
-
var h = a.useRef(!1);
|
|
651
|
-
a.useEffect(function() {
|
|
652
|
-
if (r && t && (!i || o)) {
|
|
653
|
-
var g = function() {
|
|
654
|
-
h.current = !1;
|
|
655
|
-
}, y = function(z) {
|
|
656
|
-
var T;
|
|
657
|
-
v.current && !s(((T = z.composedPath) === null || T === void 0 || (T = T.call(z)) === null || T === void 0 ? void 0 : T[0]) || z.target) && !h.current && c(!1);
|
|
658
|
-
}, d = wn(t);
|
|
659
|
-
d.addEventListener("pointerdown", g, !0), d.addEventListener("mousedown", y, !0), d.addEventListener("contextmenu", y, !0);
|
|
660
|
-
var m = hr(n);
|
|
661
|
-
if (m && (m.addEventListener("mousedown", y, !0), m.addEventListener("contextmenu", y, !0)), process.env.NODE_ENV !== "production") {
|
|
662
|
-
var D, C, R = n == null || (D = n.getRootNode) === null || D === void 0 ? void 0 : D.call(n), $ = (C = t.getRootNode) === null || C === void 0 ? void 0 : C.call(t);
|
|
663
|
-
nt(R === $, "trigger element and popup element should in same shadow root.");
|
|
664
|
-
}
|
|
665
|
-
return function() {
|
|
666
|
-
d.removeEventListener("pointerdown", g, !0), d.removeEventListener("mousedown", y, !0), d.removeEventListener("contextmenu", y, !0), m && (m.removeEventListener("mousedown", y, !0), m.removeEventListener("contextmenu", y, !0));
|
|
667
|
-
};
|
|
668
|
-
}
|
|
669
|
-
}, [r, n, t, i, o]);
|
|
670
|
-
function k() {
|
|
671
|
-
h.current = !0;
|
|
672
|
-
}
|
|
673
|
-
return k;
|
|
674
|
-
}
|
|
675
|
-
var $t = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
|
|
676
|
-
function zt() {
|
|
677
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yr, r = /* @__PURE__ */ a.forwardRef(function(n, t) {
|
|
678
|
-
var i = n.prefixCls, o = i === void 0 ? "rc-trigger-popup" : i, s = n.children, c = n.action, v = c === void 0 ? "hover" : c, h = n.showAction, k = n.hideAction, g = n.popupVisible, y = n.defaultPopupVisible, d = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, D = n.mouseEnterDelay, C = n.mouseLeaveDelay, R = C === void 0 ? 0.1 : C, $ = n.focusDelay, b = n.blurDelay, z = n.mask, T = n.maskClosable, f = T === void 0 ? !0 : T, re = n.getPopupContainer, ce = n.forceRender, te = n.autoDestroy, fe = n.destroyPopupOnHide, ae = n.popup, U = n.popupClassName, Me = n.popupStyle, ve = n.popupPlacement, Pe = n.builtinPlacements, K = Pe === void 0 ? {} : Pe, Se = n.popupAlign, W = n.zIndex, A = n.stretch, w = n.getPopupClassNameFromAlign, He = n.fresh, ie = n.alignPoint, H = n.onPopupClick, M = n.onPopupAlign, Q = n.arrow, Be = n.popupMotion, an = n.maskMotion, me = n.popupTransitionName, Z = n.popupAnimation, xe = n.maskTransitionName, Ae = n.maskAnimation, O = n.className, he = n.getTriggerDOMNode, oe = rt(n, $t), q = te || fe || !1, on = a.useState(!1), Te = x(on, 2), X = Te[0], ge = Te[1];
|
|
679
|
-
G(function() {
|
|
680
|
-
ge(Pt());
|
|
681
|
-
}, []);
|
|
682
|
-
var Fe = a.useRef({}), F = a.useContext(kr), An = a.useMemo(function() {
|
|
683
|
-
return {
|
|
684
|
-
registerSubPopup: function(l, E) {
|
|
685
|
-
Fe.current[l] = E, F == null || F.registerSubPopup(l, E);
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
}, [F]), S = Mt(), Cn = a.useState(null), Ve = x(Cn, 2), V = Ve[0], Le = Ve[1], Ne = a.useRef(null), Fn = Ge(function(u) {
|
|
689
|
-
Ne.current = u, vr(u) && V !== u && Le(u), F == null || F.registerSubPopup(S, u);
|
|
690
|
-
}), Vn = a.useState(null), bn = x(Vn, 2), ue = bn[0], se = bn[1], Y = a.useRef(null), jn = Ge(function(u) {
|
|
691
|
-
vr(u) && ue !== u && (se(u), Y.current = u);
|
|
692
|
-
}), je = a.Children.only(s), p = (je == null ? void 0 : je.props) || {}, $e = {}, qn = Ge(function(u) {
|
|
693
|
-
var l, E, _ = ue;
|
|
694
|
-
return (_ == null ? void 0 : _.contains(u)) || ((l = hr(_)) === null || l === void 0 ? void 0 : l.host) === u || u === _ || (V == null ? void 0 : V.contains(u)) || ((E = hr(V)) === null || E === void 0 ? void 0 : E.host) === u || u === V || Object.values(Fe.current).some(function(L) {
|
|
695
|
-
return (L == null ? void 0 : L.contains(u)) || u === L;
|
|
696
|
-
});
|
|
697
|
-
}), Mn = Er(o, Be, Z, me), Un = Er(o, an, Ae, xe), Kn = a.useState(y || !1), ye = x(Kn, 2), J = ye[0], un = ye[1], j = g ?? J, ze = Ge(function(u) {
|
|
698
|
-
g === void 0 && un(u);
|
|
699
|
-
});
|
|
700
|
-
G(function() {
|
|
701
|
-
un(g || !1);
|
|
702
|
-
}, [g]);
|
|
703
|
-
var P = a.useRef(j);
|
|
704
|
-
P.current = j;
|
|
705
|
-
var N = a.useRef([]);
|
|
706
|
-
N.current = [];
|
|
707
|
-
var le = Ge(function(u) {
|
|
708
|
-
var l;
|
|
709
|
-
ze(u), ((l = N.current[N.current.length - 1]) !== null && l !== void 0 ? l : j) !== u && (N.current.push(u), d == null || d(u));
|
|
710
|
-
}), qe = a.useRef(), sn = function() {
|
|
711
|
-
clearTimeout(qe.current);
|
|
712
|
-
}, ee = function(l) {
|
|
713
|
-
var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
714
|
-
sn(), E === 0 ? le(l) : qe.current = setTimeout(function() {
|
|
715
|
-
le(l);
|
|
716
|
-
}, E * 1e3);
|
|
717
|
-
};
|
|
718
|
-
a.useEffect(function() {
|
|
719
|
-
return sn;
|
|
720
|
-
}, []);
|
|
721
|
-
var Pn = a.useState(!1), ln = x(Pn, 2), Re = ln[0], Sn = ln[1];
|
|
722
|
-
G(function(u) {
|
|
723
|
-
(!u || j) && Sn(!0);
|
|
724
|
-
}, [j]);
|
|
725
|
-
var Qn = a.useState(null), dn = x(Qn, 2), Oe = dn[0], cn = dn[1], Ue = a.useState(null), Ke = x(Ue, 2), ke = Ke[0], Xe = Ke[1], Qe = function(l) {
|
|
726
|
-
Xe([l.clientX, l.clientY]);
|
|
727
|
-
}, Nn = xt(j, V, ie && ke !== null ? ke : ue, ve, K, Se, M), I = x(Nn, 11), kn = I[0], Zn = I[1], Ze = I[2], Dn = I[3], Jn = I[4], En = I[5], xn = I[6], Je = I[7], Tn = I[8], Ye = I[9], De = I[10], Ln = kt(X, v, h, k), $n = x(Ln, 2), we = $n[0], de = $n[1], pe = we.has("click"), en = de.has("click") || de.has("contextMenu"), Ce = Ge(function() {
|
|
728
|
-
Re || De();
|
|
729
|
-
}), Gn = function() {
|
|
730
|
-
P.current && ie && en && ee(!1);
|
|
731
|
-
};
|
|
732
|
-
Tt(j, ue, V, Ce, Gn), G(function() {
|
|
733
|
-
Ce();
|
|
734
|
-
}, [ke, ve]), G(function() {
|
|
735
|
-
j && !(K != null && K[ve]) && Ce();
|
|
736
|
-
}, [JSON.stringify(Se)]);
|
|
737
|
-
var zn = a.useMemo(function() {
|
|
738
|
-
var u = Et(K, o, Ye, ie);
|
|
739
|
-
return tn(u, w == null ? void 0 : w(Ye));
|
|
740
|
-
}, [Ye, w, K, o, ie]);
|
|
741
|
-
a.useImperativeHandle(t, function() {
|
|
742
|
-
return {
|
|
743
|
-
nativeElement: Y.current,
|
|
744
|
-
popupElement: Ne.current,
|
|
745
|
-
forceAlign: Ce
|
|
746
|
-
};
|
|
747
|
-
});
|
|
748
|
-
var On = a.useState(0), fn = x(On, 2), Xn = fn[0], Yn = fn[1], pn = a.useState(0), Rn = x(pn, 2), er = Rn[0], nr = Rn[1], _n = function() {
|
|
749
|
-
if (A && ue) {
|
|
750
|
-
var l = ue.getBoundingClientRect();
|
|
751
|
-
Yn(l.width), nr(l.height);
|
|
752
|
-
}
|
|
753
|
-
}, rr = function() {
|
|
754
|
-
_n(), Ce();
|
|
755
|
-
}, tr = function(l) {
|
|
756
|
-
Sn(!1), De(), m == null || m(l);
|
|
757
|
-
}, vn = function() {
|
|
758
|
-
return new Promise(function(l) {
|
|
759
|
-
_n(), cn(function() {
|
|
760
|
-
return l;
|
|
761
|
-
});
|
|
762
|
-
});
|
|
763
|
-
};
|
|
764
|
-
G(function() {
|
|
765
|
-
Oe && (De(), Oe(), cn(null));
|
|
766
|
-
}, [Oe]);
|
|
767
|
-
function be(u, l, E, _) {
|
|
768
|
-
$e[u] = function(L) {
|
|
769
|
-
var Hn;
|
|
770
|
-
_ == null || _(L), ee(l, E);
|
|
771
|
-
for (var sr = arguments.length, wr = new Array(sr > 1 ? sr - 1 : 0), Bn = 1; Bn < sr; Bn++)
|
|
772
|
-
wr[Bn - 1] = arguments[Bn];
|
|
773
|
-
(Hn = p[u]) === null || Hn === void 0 || Hn.call.apply(Hn, [p, L].concat(wr));
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
(pe || en) && ($e.onClick = function(u) {
|
|
777
|
-
var l;
|
|
778
|
-
P.current && en ? ee(!1) : !P.current && pe && (Qe(u), ee(!0));
|
|
779
|
-
for (var E = arguments.length, _ = new Array(E > 1 ? E - 1 : 0), L = 1; L < E; L++)
|
|
780
|
-
_[L - 1] = arguments[L];
|
|
781
|
-
(l = p.onClick) === null || l === void 0 || l.call.apply(l, [p, u].concat(_));
|
|
782
|
-
});
|
|
783
|
-
var ar = Lt(j, en, ue, V, z, f, qn, ee), ne = we.has("hover"), In = de.has("hover"), nn, _e;
|
|
784
|
-
ne && (be("onMouseEnter", !0, D, function(u) {
|
|
785
|
-
Qe(u);
|
|
786
|
-
}), be("onPointerEnter", !0, D, function(u) {
|
|
787
|
-
Qe(u);
|
|
788
|
-
}), nn = function(l) {
|
|
789
|
-
(j || Re) && V !== null && V !== void 0 && V.contains(l.target) && ee(!0, D);
|
|
790
|
-
}, ie && ($e.onMouseMove = function(u) {
|
|
791
|
-
var l;
|
|
792
|
-
(l = p.onMouseMove) === null || l === void 0 || l.call(p, u);
|
|
793
|
-
})), In && (be("onMouseLeave", !1, R), be("onPointerLeave", !1, R), _e = function() {
|
|
794
|
-
ee(!1, R);
|
|
795
|
-
}), we.has("focus") && be("onFocus", !0, $), de.has("focus") && be("onBlur", !1, b), we.has("contextMenu") && ($e.onContextMenu = function(u) {
|
|
796
|
-
var l;
|
|
797
|
-
P.current && de.has("contextMenu") ? ee(!1) : (Qe(u), ee(!0)), u.preventDefault();
|
|
798
|
-
for (var E = arguments.length, _ = new Array(E > 1 ? E - 1 : 0), L = 1; L < E; L++)
|
|
799
|
-
_[L - 1] = arguments[L];
|
|
800
|
-
(l = p.onContextMenu) === null || l === void 0 || l.call.apply(l, [p, u].concat(_));
|
|
801
|
-
}), O && ($e.className = tn(p.className, O));
|
|
802
|
-
var Ie = B(B({}, p), $e), mn = {}, Wn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
803
|
-
Wn.forEach(function(u) {
|
|
804
|
-
oe[u] && (mn[u] = function() {
|
|
805
|
-
for (var l, E = arguments.length, _ = new Array(E), L = 0; L < E; L++)
|
|
806
|
-
_[L] = arguments[L];
|
|
807
|
-
(l = Ie[u]) === null || l === void 0 || l.call.apply(l, [Ie].concat(_)), oe[u].apply(oe, _);
|
|
808
|
-
});
|
|
809
|
-
});
|
|
810
|
-
var ir = /* @__PURE__ */ a.cloneElement(je, B(B({}, Ie), mn)), or = {
|
|
811
|
-
x: En,
|
|
812
|
-
y: xn
|
|
813
|
-
}, ur = Q ? B({}, Q !== !0 ? Q : {}) : null;
|
|
814
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(Br, {
|
|
815
|
-
disabled: !j,
|
|
816
|
-
ref: jn,
|
|
817
|
-
onResize: rr
|
|
818
|
-
}, /* @__PURE__ */ a.createElement(Ur, {
|
|
819
|
-
getTriggerDOMNode: he
|
|
820
|
-
}, ir)), /* @__PURE__ */ a.createElement(kr.Provider, {
|
|
821
|
-
value: An
|
|
822
|
-
}, /* @__PURE__ */ a.createElement(qr, {
|
|
823
|
-
portal: e,
|
|
824
|
-
ref: Fn,
|
|
825
|
-
prefixCls: o,
|
|
826
|
-
popup: ae,
|
|
827
|
-
className: tn(U, zn),
|
|
828
|
-
style: Me,
|
|
829
|
-
target: ue,
|
|
830
|
-
onMouseEnter: nn,
|
|
831
|
-
onMouseLeave: _e,
|
|
832
|
-
onPointerEnter: nn,
|
|
833
|
-
zIndex: W,
|
|
834
|
-
open: j,
|
|
835
|
-
keepDom: Re,
|
|
836
|
-
fresh: He,
|
|
837
|
-
onClick: H,
|
|
838
|
-
onPointerDownCapture: ar,
|
|
839
|
-
mask: z,
|
|
840
|
-
motion: Mn,
|
|
841
|
-
maskMotion: Un,
|
|
842
|
-
onVisibleChanged: tr,
|
|
843
|
-
onPrepare: vn,
|
|
844
|
-
forceRender: ce,
|
|
845
|
-
autoDestroy: q,
|
|
846
|
-
getPopupContainer: re,
|
|
847
|
-
align: Ye,
|
|
848
|
-
arrow: ur,
|
|
849
|
-
arrowPos: or,
|
|
850
|
-
ready: kn,
|
|
851
|
-
offsetX: Zn,
|
|
852
|
-
offsetY: Ze,
|
|
853
|
-
offsetR: Dn,
|
|
854
|
-
offsetB: Jn,
|
|
855
|
-
onAlign: Ce,
|
|
856
|
-
stretch: A,
|
|
857
|
-
targetWidth: Xn / Je,
|
|
858
|
-
targetHeight: er / Tn
|
|
859
|
-
})));
|
|
860
|
-
});
|
|
861
|
-
return process.env.NODE_ENV !== "production" && (r.displayName = "Trigger"), r;
|
|
862
|
-
}
|
|
863
|
-
const Ut = zt(yr);
|
|
864
|
-
export {
|
|
865
|
-
At as K,
|
|
866
|
-
Ut as T,
|
|
867
|
-
Vt as a,
|
|
868
|
-
Pt as b,
|
|
869
|
-
jt as g,
|
|
870
|
-
qt as i,
|
|
871
|
-
Ft as u,
|
|
872
|
-
Ar as z
|
|
873
|
-
};
|