@gobolt/genesis 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -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/ClockCircleOutlined-BaXQuLIn.js +13 -0
- 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-Du9689ax.js} +41 -44
- package/dist/{ContextIsolator-D5x2Ih51.js → ContextIsolator-BmfhJgG0.js} +2 -2
- package/dist/{PurePanel-BqPLRtc2.js → DownOutlined-Dcq69ZKM.js} +42 -40
- package/dist/{index-C8haFnXI.js → EllipsisOutlined-DGMph0Bj.js} +138 -135
- package/dist/ExclamationCircleFilled-BHELVsTg.js +13 -0
- package/dist/Keyframes-C9_aCDvn.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-DWf4XIal.js} +62 -61
- package/dist/{SearchOutlined-BP3Z2K6j.js → SearchOutlined-DNj-7b_h.js} +2 -2
- package/dist/Skeleton-BVN4pcVe.js +560 -0
- package/dist/TextArea-Bkf9hh7l.js +708 -0
- package/dist/Typography-CoZ5qD-t.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-BwqpCxVM.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/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.js +5 -0
- package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +4 -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 +35 -1
- package/dist/components/index.js +58 -24
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +4 -2
- package/dist/{context-BMW3aJEf.js → context-DIFtNa4d.js} +230 -233
- package/dist/dropdown-Dp_PTQ2u.js +2045 -0
- package/dist/generateCategoricalChart-7ceYaiZ2.js +15597 -0
- package/dist/genesis/GenesisThemeBreakdown.js +101 -43
- package/dist/genesis/labs/Lab.stories.d.ts +6 -0
- package/dist/genesis/styles.js +7 -2923
- package/dist/iconBase-LROS5hdG.js +112 -0
- package/dist/index-BPVue1Yd.js +445 -0
- package/dist/{index-bKlRxQp4.js → index-BQM5OniU.js} +12 -12
- package/dist/index-BRUI9igj.js +11 -0
- package/dist/index-B_1Ge8na.js +1846 -0
- package/dist/{index-oK7z6jnz.js → index-BbTV2Cw5.js} +8641 -8798
- package/dist/index-BeGv28kJ.js +5173 -0
- package/dist/{index-1CBpubM3.js → index-BpZSuIUV.js} +45 -42
- package/dist/index-BvOLXELm.js +102 -0
- package/dist/index-CLSrpQRW.js +416 -0
- package/dist/index-CbVOl2U6.js +288 -0
- package/dist/index-D0U6r5O7.js +780 -0
- package/dist/index-DEu2PVzQ.js +538 -0
- package/dist/index-DLdU7Tpd.js +183 -0
- package/dist/index-DNQ-jnBx.js +3321 -0
- package/dist/index-DOsPeIWJ.js +1000 -0
- package/dist/{index-C0SmxWLS.js → index-DRGX1Wem.js} +136 -143
- package/dist/index-DWjq9XYj.js +899 -0
- package/dist/index.js +65 -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/motion-CUN72xsH.js +33 -0
- 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-dCkpy7Cb.js +73 -0
- package/dist/roundedArrow-DI_Q-xdU.js +65 -0
- package/dist/setup-CUbCc8fQ.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 +29 -13
- 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 +398 -331
- 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 +1652 -0
- package/dist/styles/theme/theme-tree/ThemeTree.stories.d.ts +6 -0
- package/dist/styles-CWdUpZom.js +289 -0
- package/dist/{styles-CT_fyXBd.js → styles-D1vKDy9V.js} +587 -643
- package/dist/styles-qerRs7Rn.js +9196 -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-U3Az44CO.js +11 -0
- package/dist/useBreakpoint-TkMv121M.js +22 -0
- package/dist/useCSSVarCls-Dau77fzS.js +11 -0
- package/dist/useIcons-Ck4JP1m9.js +321 -0
- package/dist/useId-D2tzlufo.js +26 -0
- package/dist/useLocale-CTfNpakL.js +16 -0
- package/dist/useMergedState-D6toxSxh.js +23 -0
- package/dist/useSize-DSq4r6zy.js +9 -0
- package/dist/{useVariants-DvhXfgJY.js → useVariants-DrLzUVLU.js} +3 -3
- package/dist/useZIndex-DhyHuZTN.js +44 -0
- package/dist/utils/icon-util.d.ts +2 -0
- package/dist/utils/icon-util.js +89 -0
- package/package.json +27 -15
- package/dist/AntdIcon-BoLh1dP8.js +0 -202
- package/dist/ExclamationCircleFilled-C0Kj5KQV.js +0 -21
- package/dist/TextArea-DKwCct3i.js +0 -1690
- package/dist/Typography-aGoDUl4R.js +0 -710
- package/dist/index-BZAhCB_K.js +0 -97
- package/dist/index-CfDY25LP.js +0 -873
- package/dist/index-DPW8XdWj.js +0 -952
- 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,780 @@
|
|
|
1
|
+
import { c as hn, a as $, u as Nr, r as sr, w as Vr, e as rn, d as Lr, _ as A, j as Fr, g as jr } from "./presets-Djh_L_6R.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { o as dr, h as Z, z as $r, B as Er, G as qr, s as zr, t as _r, J as Ar, A as Ir, a as Ke, K as cr } from "./index-BbTV2Cw5.js";
|
|
4
|
+
import { R as Tr } from "./index-BQM5OniU.js";
|
|
5
|
+
import { g as fr } from "./shadow-BoMGMNn3.js";
|
|
6
|
+
import { u as Ur } from "./useId-D2tzlufo.js";
|
|
7
|
+
import { i as Qr } from "./isVisible-D3-B85BJ.js";
|
|
8
|
+
const Jr = (e) => ({
|
|
9
|
+
animationDuration: e,
|
|
10
|
+
animationFillMode: "both"
|
|
11
|
+
}), Gr = (e) => ({
|
|
12
|
+
animationDuration: e,
|
|
13
|
+
animationFillMode: "both"
|
|
14
|
+
}), wa = function(e, r, n, a) {
|
|
15
|
+
const u = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
|
|
16
|
+
return {
|
|
17
|
+
[`
|
|
18
|
+
${u}${e}-enter,
|
|
19
|
+
${u}${e}-appear
|
|
20
|
+
`]: Object.assign(Object.assign({}, Jr(a)), {
|
|
21
|
+
animationPlayState: "paused"
|
|
22
|
+
}),
|
|
23
|
+
[`${u}${e}-leave`]: Object.assign(Object.assign({}, Gr(a)), {
|
|
24
|
+
animationPlayState: "paused"
|
|
25
|
+
}),
|
|
26
|
+
[`
|
|
27
|
+
${u}${e}-enter${e}-enter-active,
|
|
28
|
+
${u}${e}-appear${e}-appear-active
|
|
29
|
+
`]: {
|
|
30
|
+
animationName: r,
|
|
31
|
+
animationPlayState: "running"
|
|
32
|
+
},
|
|
33
|
+
[`${u}${e}-leave${e}-leave-active`]: {
|
|
34
|
+
animationName: n,
|
|
35
|
+
animationPlayState: "running",
|
|
36
|
+
pointerEvents: "none"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
var xr = /* @__PURE__ */ t.createContext(null), gr = [];
|
|
41
|
+
function Kr(e, r) {
|
|
42
|
+
var n = t.useState(function() {
|
|
43
|
+
if (!hn())
|
|
44
|
+
return null;
|
|
45
|
+
var m = document.createElement("div");
|
|
46
|
+
return process.env.NODE_ENV !== "production" && r && m.setAttribute("data-debug", r), m;
|
|
47
|
+
}), a = $(n, 1), i = a[0], u = t.useRef(!1), s = t.useContext(xr), f = t.useState(gr), v = $(f, 2), h = v[0], D = v[1], g = s || (u.current ? void 0 : function(m) {
|
|
48
|
+
D(function(N) {
|
|
49
|
+
var b = [m].concat(dr(N));
|
|
50
|
+
return b;
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
function y() {
|
|
54
|
+
i.parentElement || document.body.appendChild(i), u.current = !0;
|
|
55
|
+
}
|
|
56
|
+
function d() {
|
|
57
|
+
var m;
|
|
58
|
+
(m = i.parentElement) === null || m === void 0 || m.removeChild(i), u.current = !1;
|
|
59
|
+
}
|
|
60
|
+
return Z(function() {
|
|
61
|
+
return e ? s ? s(y) : y() : d(), d;
|
|
62
|
+
}, [e]), Z(function() {
|
|
63
|
+
h.length && (h.forEach(function(m) {
|
|
64
|
+
return m();
|
|
65
|
+
}), D(gr));
|
|
66
|
+
}, [h]), [i, g];
|
|
67
|
+
}
|
|
68
|
+
var lr;
|
|
69
|
+
function Wr(e) {
|
|
70
|
+
var r = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), n = document.createElement("div");
|
|
71
|
+
n.id = r;
|
|
72
|
+
var a = n.style;
|
|
73
|
+
a.position = "absolute", a.left = "0", a.top = "0", a.width = "100px", a.height = "100px", a.overflow = "scroll";
|
|
74
|
+
var i, u;
|
|
75
|
+
if (e) {
|
|
76
|
+
var s = getComputedStyle(e);
|
|
77
|
+
a.scrollbarColor = s.scrollbarColor, a.scrollbarWidth = s.scrollbarWidth;
|
|
78
|
+
var f = getComputedStyle(e, "::-webkit-scrollbar"), v = parseInt(f.width, 10), h = parseInt(f.height, 10);
|
|
79
|
+
try {
|
|
80
|
+
var D = v ? "width: ".concat(f.width, ";") : "", g = h ? "height: ".concat(f.height, ";") : "";
|
|
81
|
+
Nr(`
|
|
82
|
+
#`.concat(r, `::-webkit-scrollbar {
|
|
83
|
+
`).concat(D, `
|
|
84
|
+
`).concat(g, `
|
|
85
|
+
}`), r);
|
|
86
|
+
} catch (m) {
|
|
87
|
+
console.error(m), i = v, u = h;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
document.body.appendChild(n);
|
|
91
|
+
var y = e && i && !isNaN(i) ? i : n.offsetWidth - n.clientWidth, d = e && u && !isNaN(u) ? u : n.offsetHeight - n.clientHeight;
|
|
92
|
+
return document.body.removeChild(n), sr(r), {
|
|
93
|
+
width: y,
|
|
94
|
+
height: d
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function ba(e) {
|
|
98
|
+
return typeof document > "u" ? 0 : (lr === void 0 && (lr = Wr()), lr.width);
|
|
99
|
+
}
|
|
100
|
+
function Zr(e) {
|
|
101
|
+
return typeof document > "u" || !e || !(e instanceof Element) ? {
|
|
102
|
+
width: 0,
|
|
103
|
+
height: 0
|
|
104
|
+
} : Wr(e);
|
|
105
|
+
}
|
|
106
|
+
function Or() {
|
|
107
|
+
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
108
|
+
}
|
|
109
|
+
var Yr = "rc-util-locker-".concat(Date.now()), yr = 0;
|
|
110
|
+
function Xr(e) {
|
|
111
|
+
var r = !!e, n = t.useState(function() {
|
|
112
|
+
return yr += 1, "".concat(Yr, "_").concat(yr);
|
|
113
|
+
}), a = $(n, 1), i = a[0];
|
|
114
|
+
Z(function() {
|
|
115
|
+
if (r) {
|
|
116
|
+
var u = Zr(document.body).width, s = Or();
|
|
117
|
+
Nr(`
|
|
118
|
+
html body {
|
|
119
|
+
overflow-y: hidden;
|
|
120
|
+
`.concat(s ? "width: calc(100% - ".concat(u, "px);") : "", `
|
|
121
|
+
}`), i);
|
|
122
|
+
} else
|
|
123
|
+
sr(i);
|
|
124
|
+
return function() {
|
|
125
|
+
sr(i);
|
|
126
|
+
};
|
|
127
|
+
}, [r, i]);
|
|
128
|
+
}
|
|
129
|
+
var pr = !1;
|
|
130
|
+
function ea(e) {
|
|
131
|
+
return pr;
|
|
132
|
+
}
|
|
133
|
+
var wr = function(r) {
|
|
134
|
+
return r === !1 ? !1 : !hn() || !r ? null : typeof r == "string" ? document.querySelector(r) : typeof r == "function" ? r() : r;
|
|
135
|
+
}, mr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
136
|
+
var n = e.open, a = e.autoLock, i = e.getContainer, u = e.debug, s = e.autoDestroy, f = s === void 0 ? !0 : s, v = e.children, h = t.useState(n), D = $(h, 2), g = D[0], y = D[1], d = g || n;
|
|
137
|
+
process.env.NODE_ENV !== "production" && Vr(hn() || !n, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."), t.useEffect(function() {
|
|
138
|
+
(f || n) && y(n);
|
|
139
|
+
}, [n, f]);
|
|
140
|
+
var m = t.useState(function() {
|
|
141
|
+
return wr(i);
|
|
142
|
+
}), N = $(m, 2), b = N[0], W = N[1];
|
|
143
|
+
t.useEffect(function() {
|
|
144
|
+
var U = wr(i);
|
|
145
|
+
W(U ?? null);
|
|
146
|
+
});
|
|
147
|
+
var T = Kr(d && !b, u), C = $(T, 2), x = C[0], E = C[1], c = b ?? x;
|
|
148
|
+
Xr(a && n && hn() && (c === x || c === document.body));
|
|
149
|
+
var re = null;
|
|
150
|
+
if (v && $r(v) && r) {
|
|
151
|
+
var ce = v;
|
|
152
|
+
re = ce.ref;
|
|
153
|
+
}
|
|
154
|
+
var ae = Er(re, r);
|
|
155
|
+
if (!d || !hn() || b === void 0)
|
|
156
|
+
return null;
|
|
157
|
+
var fe = c === !1 || ea(), te = v;
|
|
158
|
+
return r && (te = /* @__PURE__ */ t.cloneElement(v, {
|
|
159
|
+
ref: ae
|
|
160
|
+
})), /* @__PURE__ */ t.createElement(xr.Provider, {
|
|
161
|
+
value: E
|
|
162
|
+
}, fe ? te : /* @__PURE__ */ qr.createPortal(te, c));
|
|
163
|
+
});
|
|
164
|
+
process.env.NODE_ENV !== "production" && (mr.displayName = "Portal");
|
|
165
|
+
const na = function() {
|
|
166
|
+
if (typeof navigator > "u" || typeof window > "u")
|
|
167
|
+
return !1;
|
|
168
|
+
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
169
|
+
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));
|
|
170
|
+
};
|
|
171
|
+
function ra(e) {
|
|
172
|
+
var r = e.prefixCls, n = e.align, a = e.arrow, i = e.arrowPos, u = a || {}, s = u.className, f = u.content, v = i.x, h = v === void 0 ? 0 : v, D = i.y, g = D === void 0 ? 0 : D, y = t.useRef();
|
|
173
|
+
if (!n || !n.points)
|
|
174
|
+
return null;
|
|
175
|
+
var d = {
|
|
176
|
+
position: "absolute"
|
|
177
|
+
};
|
|
178
|
+
if (n.autoArrow !== !1) {
|
|
179
|
+
var m = n.points[0], N = n.points[1], b = m[0], W = m[1], T = N[0], C = N[1];
|
|
180
|
+
b === T || !["t", "b"].includes(b) ? d.top = g : b === "t" ? d.top = 0 : d.bottom = 0, W === C || !["l", "r"].includes(W) ? d.left = h : W === "l" ? d.left = 0 : d.right = 0;
|
|
181
|
+
}
|
|
182
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
183
|
+
ref: y,
|
|
184
|
+
className: rn("".concat(r, "-arrow"), s),
|
|
185
|
+
style: d
|
|
186
|
+
}, f);
|
|
187
|
+
}
|
|
188
|
+
function aa(e) {
|
|
189
|
+
var r = e.prefixCls, n = e.open, a = e.zIndex, i = e.mask, u = e.motion;
|
|
190
|
+
return i ? /* @__PURE__ */ t.createElement(zr, Lr({}, u, {
|
|
191
|
+
motionAppear: !0,
|
|
192
|
+
visible: n,
|
|
193
|
+
removeOnLeave: !0
|
|
194
|
+
}), function(s) {
|
|
195
|
+
var f = s.className;
|
|
196
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
197
|
+
style: {
|
|
198
|
+
zIndex: a
|
|
199
|
+
},
|
|
200
|
+
className: rn("".concat(r, "-mask"), f)
|
|
201
|
+
});
|
|
202
|
+
}) : null;
|
|
203
|
+
}
|
|
204
|
+
var Rr = /* @__PURE__ */ t.memo(function(e) {
|
|
205
|
+
var r = e.children;
|
|
206
|
+
return r;
|
|
207
|
+
}, function(e, r) {
|
|
208
|
+
return r.cache;
|
|
209
|
+
});
|
|
210
|
+
process.env.NODE_ENV !== "production" && (Rr.displayName = "PopupContent");
|
|
211
|
+
var Hr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
212
|
+
var n = e.popup, a = e.className, i = e.prefixCls, u = e.style, s = e.target, f = e.onVisibleChanged, v = e.open, h = e.keepDom, D = e.fresh, g = e.onClick, y = e.mask, d = e.arrow, m = e.arrowPos, N = e.align, b = e.motion, W = e.maskMotion, T = e.forceRender, C = e.getPopupContainer, x = e.autoDestroy, E = e.portal, c = e.zIndex, re = e.onMouseEnter, ce = e.onMouseLeave, ae = e.onPointerEnter, fe = e.onPointerDownCapture, te = e.ready, U = e.offsetX, Me = e.offsetY, ve = e.offsetR, Pe = e.offsetB, Q = e.onAlign, Se = e.onPrepare, B = e.stretch, F = e.targetWidth, w = e.targetHeight, Be = typeof n == "function" ? n() : n, ie = v || h, V = (C == null ? void 0 : C.length) > 0, M = t.useState(!C || !V), J = $(M, 2), Ve = J[0], an = J[1];
|
|
213
|
+
if (Z(function() {
|
|
214
|
+
!Ve && V && s && an(!0);
|
|
215
|
+
}, [Ve, V, s]), !Ve)
|
|
216
|
+
return null;
|
|
217
|
+
var me = "auto", G = {
|
|
218
|
+
left: "-1000vw",
|
|
219
|
+
top: "-1000vh",
|
|
220
|
+
right: me,
|
|
221
|
+
bottom: me
|
|
222
|
+
};
|
|
223
|
+
if (te || !v) {
|
|
224
|
+
var Le, Fe = N.points, O = N.dynamicInset || ((Le = N._experimental) === null || Le === void 0 ? void 0 : Le.dynamicInset), he = O && Fe[0][1] === "r", oe = O && Fe[0][0] === "b";
|
|
225
|
+
he ? (G.right = ve, G.left = me) : (G.left = U, G.right = me), oe ? (G.bottom = Pe, G.top = me) : (G.top = Me, G.bottom = me);
|
|
226
|
+
}
|
|
227
|
+
var I = {};
|
|
228
|
+
return B && (B.includes("height") && w ? I.height = w : B.includes("minHeight") && w && (I.minHeight = w), B.includes("width") && F ? I.width = F : B.includes("minWidth") && F && (I.minWidth = F)), v || (I.pointerEvents = "none"), /* @__PURE__ */ t.createElement(E, {
|
|
229
|
+
open: T || ie,
|
|
230
|
+
getContainer: C && function() {
|
|
231
|
+
return C(s);
|
|
232
|
+
},
|
|
233
|
+
autoDestroy: x
|
|
234
|
+
}, /* @__PURE__ */ t.createElement(aa, {
|
|
235
|
+
prefixCls: i,
|
|
236
|
+
open: v,
|
|
237
|
+
zIndex: c,
|
|
238
|
+
mask: y,
|
|
239
|
+
motion: W
|
|
240
|
+
}), /* @__PURE__ */ t.createElement(Tr, {
|
|
241
|
+
onResize: Q,
|
|
242
|
+
disabled: !v
|
|
243
|
+
}, function(tn) {
|
|
244
|
+
return /* @__PURE__ */ t.createElement(zr, Lr({
|
|
245
|
+
motionAppear: !0,
|
|
246
|
+
motionEnter: !0,
|
|
247
|
+
motionLeave: !0,
|
|
248
|
+
removeOnLeave: !1,
|
|
249
|
+
forceRender: T,
|
|
250
|
+
leavedClassName: "".concat(i, "-hidden")
|
|
251
|
+
}, b, {
|
|
252
|
+
onAppearPrepare: Se,
|
|
253
|
+
onEnterPrepare: Se,
|
|
254
|
+
visible: v,
|
|
255
|
+
onVisibleChanged: function(Y) {
|
|
256
|
+
var ge;
|
|
257
|
+
b == null || (ge = b.onVisibleChanged) === null || ge === void 0 || ge.call(b, Y), f(Y);
|
|
258
|
+
}
|
|
259
|
+
}), function($e, Y) {
|
|
260
|
+
var ge = $e.className, je = $e.style, j = rn(i, ge, a);
|
|
261
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
262
|
+
ref: _r(tn, r, Y),
|
|
263
|
+
className: j,
|
|
264
|
+
style: A(A(A(A({
|
|
265
|
+
"--arrow-x": "".concat(m.x || 0, "px"),
|
|
266
|
+
"--arrow-y": "".concat(m.y || 0, "px")
|
|
267
|
+
}, G), I), je), {}, {
|
|
268
|
+
boxSizing: "border-box",
|
|
269
|
+
zIndex: c
|
|
270
|
+
}, u),
|
|
271
|
+
onMouseEnter: re,
|
|
272
|
+
onMouseLeave: ce,
|
|
273
|
+
onPointerEnter: ae,
|
|
274
|
+
onClick: g,
|
|
275
|
+
onPointerDownCapture: fe
|
|
276
|
+
}, d && /* @__PURE__ */ t.createElement(ra, {
|
|
277
|
+
prefixCls: i,
|
|
278
|
+
arrow: d,
|
|
279
|
+
arrowPos: m,
|
|
280
|
+
align: N
|
|
281
|
+
}), /* @__PURE__ */ t.createElement(Rr, {
|
|
282
|
+
cache: !v && !D
|
|
283
|
+
}, Be));
|
|
284
|
+
});
|
|
285
|
+
}));
|
|
286
|
+
});
|
|
287
|
+
process.env.NODE_ENV !== "production" && (Hr.displayName = "Popup");
|
|
288
|
+
var Br = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
289
|
+
var n = e.children, a = e.getTriggerDOMNode, i = $r(n), u = t.useCallback(function(f) {
|
|
290
|
+
Ar(r, a ? a(f) : f);
|
|
291
|
+
}, [a]), s = Er(u, Ir(n));
|
|
292
|
+
return i ? /* @__PURE__ */ t.cloneElement(n, {
|
|
293
|
+
ref: s
|
|
294
|
+
}) : n;
|
|
295
|
+
});
|
|
296
|
+
process.env.NODE_ENV !== "production" && (Br.displayName = "TriggerWrapper");
|
|
297
|
+
var br = /* @__PURE__ */ t.createContext(null);
|
|
298
|
+
function Cr(e) {
|
|
299
|
+
return e ? Array.isArray(e) ? e : [e] : [];
|
|
300
|
+
}
|
|
301
|
+
function ta(e, r, n, a) {
|
|
302
|
+
return t.useMemo(function() {
|
|
303
|
+
var i = Cr(n ?? r), u = Cr(a ?? r), s = new Set(i), f = new Set(u);
|
|
304
|
+
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), f.has("hover") && (f.delete("hover"), f.add("click"))), [s, f];
|
|
305
|
+
}, [e, r, n, a]);
|
|
306
|
+
}
|
|
307
|
+
function ia() {
|
|
308
|
+
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;
|
|
309
|
+
return n ? e[0] === r[0] : e[0] === r[0] && e[1] === r[1];
|
|
310
|
+
}
|
|
311
|
+
function oa(e, r, n, a) {
|
|
312
|
+
for (var i = n.points, u = Object.keys(e), s = 0; s < u.length; s += 1) {
|
|
313
|
+
var f, v = u[s];
|
|
314
|
+
if (ia((f = e[v]) === null || f === void 0 ? void 0 : f.points, i, a))
|
|
315
|
+
return "".concat(r, "-placement-").concat(v);
|
|
316
|
+
}
|
|
317
|
+
return "";
|
|
318
|
+
}
|
|
319
|
+
function Mr(e, r, n, a) {
|
|
320
|
+
return r || (n ? {
|
|
321
|
+
motionName: "".concat(e, "-").concat(n)
|
|
322
|
+
} : a ? {
|
|
323
|
+
motionName: a
|
|
324
|
+
} : null);
|
|
325
|
+
}
|
|
326
|
+
function yn(e) {
|
|
327
|
+
return e.ownerDocument.defaultView;
|
|
328
|
+
}
|
|
329
|
+
function vr(e) {
|
|
330
|
+
for (var r = [], n = e == null ? void 0 : e.parentElement, a = ["hidden", "scroll", "clip", "auto"]; n; ) {
|
|
331
|
+
var i = yn(n).getComputedStyle(n), u = i.overflowX, s = i.overflowY, f = i.overflow;
|
|
332
|
+
[u, s, f].some(function(v) {
|
|
333
|
+
return a.includes(v);
|
|
334
|
+
}) && r.push(n), n = n.parentElement;
|
|
335
|
+
}
|
|
336
|
+
return r;
|
|
337
|
+
}
|
|
338
|
+
function gn(e) {
|
|
339
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
340
|
+
return Number.isNaN(e) ? r : e;
|
|
341
|
+
}
|
|
342
|
+
function mn(e) {
|
|
343
|
+
return gn(parseFloat(e), 0);
|
|
344
|
+
}
|
|
345
|
+
function Pr(e, r) {
|
|
346
|
+
var n = A({}, e);
|
|
347
|
+
return (r || []).forEach(function(a) {
|
|
348
|
+
if (!(a instanceof HTMLBodyElement || a instanceof HTMLHtmlElement)) {
|
|
349
|
+
var i = yn(a).getComputedStyle(a), u = i.overflow, s = i.overflowClipMargin, f = i.borderTopWidth, v = i.borderBottomWidth, h = i.borderLeftWidth, D = i.borderRightWidth, g = a.getBoundingClientRect(), y = a.offsetHeight, d = a.clientHeight, m = a.offsetWidth, N = a.clientWidth, b = mn(f), W = mn(v), T = mn(h), C = mn(D), x = gn(Math.round(g.width / m * 1e3) / 1e3), E = gn(Math.round(g.height / y * 1e3) / 1e3), c = (m - N - T - C) * x, re = (y - d - b - W) * E, ce = b * E, ae = W * E, fe = T * x, te = C * x, U = 0, Me = 0;
|
|
350
|
+
if (u === "clip") {
|
|
351
|
+
var ve = mn(s);
|
|
352
|
+
U = ve * x, Me = ve * E;
|
|
353
|
+
}
|
|
354
|
+
var Pe = g.x + fe - U, Q = g.y + ce - Me, Se = Pe + g.width + 2 * U - fe - te - c, B = Q + g.height + 2 * Me - ce - ae - re;
|
|
355
|
+
n.left = Math.max(n.left, Pe), n.top = Math.max(n.top, Q), n.right = Math.min(n.right, Se), n.bottom = Math.min(n.bottom, B);
|
|
356
|
+
}
|
|
357
|
+
}), n;
|
|
358
|
+
}
|
|
359
|
+
function Sr(e) {
|
|
360
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(r), a = n.match(/^(.*)\%$/);
|
|
361
|
+
return a ? e * (parseFloat(a[1]) / 100) : parseFloat(n);
|
|
362
|
+
}
|
|
363
|
+
function kr(e, r) {
|
|
364
|
+
var n = r || [], a = $(n, 2), i = a[0], u = a[1];
|
|
365
|
+
return [Sr(e.width, i), Sr(e.height, u)];
|
|
366
|
+
}
|
|
367
|
+
function Dr() {
|
|
368
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
369
|
+
return [e[0], e[1]];
|
|
370
|
+
}
|
|
371
|
+
function nn(e, r) {
|
|
372
|
+
var n = r[0], a = r[1], i, u;
|
|
373
|
+
return n === "t" ? u = e.y : n === "b" ? u = e.y + e.height : u = e.y + e.height / 2, a === "l" ? i = e.x : a === "r" ? i = e.x + e.width : i = e.x + e.width / 2, {
|
|
374
|
+
x: i,
|
|
375
|
+
y: u
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function He(e, r) {
|
|
379
|
+
var n = {
|
|
380
|
+
t: "b",
|
|
381
|
+
b: "t",
|
|
382
|
+
l: "r",
|
|
383
|
+
r: "l"
|
|
384
|
+
};
|
|
385
|
+
return e.map(function(a, i) {
|
|
386
|
+
return i === r ? n[a] || "c" : a;
|
|
387
|
+
}).join("");
|
|
388
|
+
}
|
|
389
|
+
function ua(e, r, n, a, i, u, s) {
|
|
390
|
+
var f = t.useState({
|
|
391
|
+
ready: !1,
|
|
392
|
+
offsetX: 0,
|
|
393
|
+
offsetY: 0,
|
|
394
|
+
offsetR: 0,
|
|
395
|
+
offsetB: 0,
|
|
396
|
+
arrowX: 0,
|
|
397
|
+
arrowY: 0,
|
|
398
|
+
scaleX: 1,
|
|
399
|
+
scaleY: 1,
|
|
400
|
+
align: i[a] || {}
|
|
401
|
+
}), v = $(f, 2), h = v[0], D = v[1], g = t.useRef(0), y = t.useMemo(function() {
|
|
402
|
+
return r ? vr(r) : [];
|
|
403
|
+
}, [r]), d = t.useRef({}), m = function() {
|
|
404
|
+
d.current = {};
|
|
405
|
+
};
|
|
406
|
+
e || m();
|
|
407
|
+
var N = Ke(function() {
|
|
408
|
+
if (r && n && e) {
|
|
409
|
+
let ne = function(en, We) {
|
|
410
|
+
var Re = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wn, vn = M.x + en, Hn = M.y + We, tr = vn + he, ir = Hn + O, or = Math.max(vn, Re.left), o = Math.max(Hn, Re.top), l = Math.min(tr, Re.right), L = Math.min(ir, Re.bottom);
|
|
411
|
+
return Math.max(0, (l - or) * (L - o));
|
|
412
|
+
}, Rn = function() {
|
|
413
|
+
Ie = M.y + k, Ue = Ie + O, De = M.x + P, Oe = De + he;
|
|
414
|
+
};
|
|
415
|
+
var T, C, x, E, c = r, re = c.ownerDocument, ce = yn(c), ae = ce.getComputedStyle(c), fe = ae.width, te = ae.height, U = ae.position, Me = c.style.left, ve = c.style.top, Pe = c.style.right, Q = c.style.bottom, Se = c.style.overflow, B = A(A({}, i[a]), u), F = re.createElement("div");
|
|
416
|
+
(T = c.parentElement) === null || T === void 0 || T.appendChild(F), F.style.left = "".concat(c.offsetLeft, "px"), F.style.top = "".concat(c.offsetTop, "px"), F.style.position = U, F.style.height = "".concat(c.offsetHeight, "px"), F.style.width = "".concat(c.offsetWidth, "px"), c.style.left = "0", c.style.top = "0", c.style.right = "auto", c.style.bottom = "auto", c.style.overflow = "hidden";
|
|
417
|
+
var w;
|
|
418
|
+
if (Array.isArray(n))
|
|
419
|
+
w = {
|
|
420
|
+
x: n[0],
|
|
421
|
+
y: n[1],
|
|
422
|
+
width: 0,
|
|
423
|
+
height: 0
|
|
424
|
+
};
|
|
425
|
+
else {
|
|
426
|
+
var Be, ie, V = n.getBoundingClientRect();
|
|
427
|
+
V.x = (Be = V.x) !== null && Be !== void 0 ? Be : V.left, V.y = (ie = V.y) !== null && ie !== void 0 ? ie : V.top, w = {
|
|
428
|
+
x: V.x,
|
|
429
|
+
y: V.y,
|
|
430
|
+
width: V.width,
|
|
431
|
+
height: V.height
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
var M = c.getBoundingClientRect();
|
|
435
|
+
M.x = (C = M.x) !== null && C !== void 0 ? C : M.left, M.y = (x = M.y) !== null && x !== void 0 ? x : M.top;
|
|
436
|
+
var J = re.documentElement, Ve = J.clientWidth, an = J.clientHeight, me = J.scrollWidth, G = J.scrollHeight, Le = J.scrollTop, Fe = J.scrollLeft, O = M.height, he = M.width, oe = w.height, I = w.width, tn = {
|
|
437
|
+
left: 0,
|
|
438
|
+
top: 0,
|
|
439
|
+
right: Ve,
|
|
440
|
+
bottom: an
|
|
441
|
+
}, $e = {
|
|
442
|
+
left: -Fe,
|
|
443
|
+
top: -Le,
|
|
444
|
+
right: me - Fe,
|
|
445
|
+
bottom: G - Le
|
|
446
|
+
}, Y = B.htmlRegion, ge = "visible", je = "visibleFirst";
|
|
447
|
+
Y !== "scroll" && Y !== je && (Y = ge);
|
|
448
|
+
var j = Y === je, Fn = Pr($e, y), S = Pr(tn, y), wn = Y === ge ? S : Fn, qe = j ? S : wn;
|
|
449
|
+
c.style.left = "auto", c.style.top = "auto", c.style.right = "0", c.style.bottom = "0";
|
|
450
|
+
var q = c.getBoundingClientRect();
|
|
451
|
+
c.style.left = Me, c.style.top = ve, c.style.right = Pe, c.style.bottom = Q, c.style.overflow = Se, (E = c.parentElement) === null || E === void 0 || E.removeChild(F);
|
|
452
|
+
var Ee = gn(Math.round(he / parseFloat(fe) * 1e3) / 1e3), ke = gn(Math.round(O / parseFloat(te) * 1e3) / 1e3);
|
|
453
|
+
if (Ee === 0 || ke === 0 || cr(n) && !Qr(n))
|
|
454
|
+
return;
|
|
455
|
+
var jn = B.offset, qn = B.targetOffset, bn = kr(M, jn), ue = $(bn, 2), le = ue[0], X = ue[1], _n = kr(w, qn), _e = $(_n, 2), p = _e[0], ze = _e[1];
|
|
456
|
+
w.x -= p, w.y -= ze;
|
|
457
|
+
var An = B.points || [], Cn = $(An, 2), In = Cn[0], Un = Cn[1], ye = Dr(Un), K = Dr(In), on = nn(w, ye), _ = nn(M, K), Te = A({}, B), P = on.x - _.x + le, k = on.y - _.y + X, se = ne(P, k), Ae = ne(P, k, S), un = nn(w, ["t", "l"]), ee = nn(M, ["t", "l"]), Mn = nn(w, ["b", "r"]), ln = nn(M, ["b", "r"]), xe = B.overflow || {}, Pn = xe.adjustX, Qn = xe.adjustY, sn = xe.shiftX, Ze = xe.shiftY, dn = function(We) {
|
|
458
|
+
return typeof We == "boolean" ? We : We >= 0;
|
|
459
|
+
}, Ie, Ue, De, Oe;
|
|
460
|
+
Rn();
|
|
461
|
+
var Qe = dn(Qn), Sn = K[0] === ye[0];
|
|
462
|
+
if (Qe && K[0] === "t" && (Ue > qe.bottom || d.current.bt)) {
|
|
463
|
+
var H = k;
|
|
464
|
+
Sn ? H -= O - oe : H = un.y - ln.y - X;
|
|
465
|
+
var kn = ne(P, H), Jn = ne(P, H, S);
|
|
466
|
+
// Of course use larger one
|
|
467
|
+
kn > se || kn === se && (!j || // Choose recommend one
|
|
468
|
+
Jn >= Ae) ? (d.current.bt = !0, k = H, X = -X, Te.points = [He(K, 0), He(ye, 0)]) : d.current.bt = !1;
|
|
469
|
+
}
|
|
470
|
+
if (Qe && K[0] === "b" && (Ie < qe.top || d.current.tb)) {
|
|
471
|
+
var Je = k;
|
|
472
|
+
Sn ? Je += O - oe : Je = Mn.y - ee.y - X;
|
|
473
|
+
var Dn = ne(P, Je), Gn = ne(P, Je, S);
|
|
474
|
+
// Of course use larger one
|
|
475
|
+
Dn > se || Dn === se && (!j || // Choose recommend one
|
|
476
|
+
Gn >= Ae) ? (d.current.tb = !0, k = Je, X = -X, Te.points = [He(K, 0), He(ye, 0)]) : d.current.tb = !1;
|
|
477
|
+
}
|
|
478
|
+
var Nn = dn(Pn), Ln = K[1] === ye[1];
|
|
479
|
+
if (Nn && K[1] === "l" && (Oe > qe.right || d.current.rl)) {
|
|
480
|
+
var Ge = P;
|
|
481
|
+
Ln ? Ge -= he - I : Ge = un.x - ln.x - le;
|
|
482
|
+
var $n = ne(Ge, k), Ye = ne(Ge, k, S);
|
|
483
|
+
// Of course use larger one
|
|
484
|
+
$n > se || $n === se && (!j || // Choose recommend one
|
|
485
|
+
Ye >= Ae) ? (d.current.rl = !0, P = Ge, le = -le, Te.points = [He(K, 1), He(ye, 1)]) : d.current.rl = !1;
|
|
486
|
+
}
|
|
487
|
+
if (Nn && K[1] === "r" && (De < qe.left || d.current.lr)) {
|
|
488
|
+
var Ne = P;
|
|
489
|
+
Ln ? Ne += he - I : Ne = Mn.x - ee.x - le;
|
|
490
|
+
var En = ne(Ne, k), zn = ne(Ne, k, S);
|
|
491
|
+
// Of course use larger one
|
|
492
|
+
En > se || En === se && (!j || // Choose recommend one
|
|
493
|
+
zn >= Ae) ? (d.current.lr = !0, P = Ne, le = -le, Te.points = [He(K, 1), He(ye, 1)]) : d.current.lr = !1;
|
|
494
|
+
}
|
|
495
|
+
Rn();
|
|
496
|
+
var we = sn === !0 ? 0 : sn;
|
|
497
|
+
typeof we == "number" && (De < S.left && (P -= De - S.left - le, w.x + I < S.left + we && (P += w.x - S.left + I - we)), Oe > S.right && (P -= Oe - S.right - le, w.x > S.right - we && (P += w.x - S.right + we)));
|
|
498
|
+
var de = Ze === !0 ? 0 : Ze;
|
|
499
|
+
typeof de == "number" && (Ie < S.top && (k -= Ie - S.top - X, w.y + oe < S.top + de && (k += w.y - S.top + oe - de)), Ue > S.bottom && (k -= Ue - S.bottom - X, w.y > S.bottom - de && (k += w.y - S.bottom + de)));
|
|
500
|
+
var Xe = M.x + P, pe = Xe + he, be = M.y + k, Kn = be + O, Tn = w.x, Zn = Tn + I, cn = w.y, On = cn + oe, Yn = Math.max(Xe, Tn), Xn = Math.min(pe, Zn), xn = (Yn + Xn) / 2, pn = xn - Xe, er = Math.max(be, cn), Wn = Math.min(Kn, On), nr = (er + Wn) / 2, rr = nr - be;
|
|
501
|
+
s == null || s(r, Te);
|
|
502
|
+
var fn = q.right - M.x - (P + M.width), Ce = q.bottom - M.y - (k + M.height);
|
|
503
|
+
Ee === 1 && (P = Math.round(P), fn = Math.round(fn)), ke === 1 && (k = Math.round(k), Ce = Math.round(Ce));
|
|
504
|
+
var ar = {
|
|
505
|
+
ready: !0,
|
|
506
|
+
offsetX: P / Ee,
|
|
507
|
+
offsetY: k / ke,
|
|
508
|
+
offsetR: fn / Ee,
|
|
509
|
+
offsetB: Ce / ke,
|
|
510
|
+
arrowX: pn / Ee,
|
|
511
|
+
arrowY: rr / ke,
|
|
512
|
+
scaleX: Ee,
|
|
513
|
+
scaleY: ke,
|
|
514
|
+
align: Te
|
|
515
|
+
};
|
|
516
|
+
D(ar);
|
|
517
|
+
}
|
|
518
|
+
}), b = function() {
|
|
519
|
+
g.current += 1;
|
|
520
|
+
var C = g.current;
|
|
521
|
+
Promise.resolve().then(function() {
|
|
522
|
+
g.current === C && N();
|
|
523
|
+
});
|
|
524
|
+
}, W = function() {
|
|
525
|
+
D(function(C) {
|
|
526
|
+
return A(A({}, C), {}, {
|
|
527
|
+
ready: !1
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
};
|
|
531
|
+
return Z(W, [a]), Z(function() {
|
|
532
|
+
e || W();
|
|
533
|
+
}, [e]), [h.ready, h.offsetX, h.offsetY, h.offsetR, h.offsetB, h.arrowX, h.arrowY, h.scaleX, h.scaleY, h.align, b];
|
|
534
|
+
}
|
|
535
|
+
function la(e, r, n, a, i) {
|
|
536
|
+
Z(function() {
|
|
537
|
+
if (e && r && n) {
|
|
538
|
+
let g = function() {
|
|
539
|
+
a(), i();
|
|
540
|
+
};
|
|
541
|
+
var u = r, s = n, f = vr(u), v = vr(s), h = yn(s), D = new Set([h].concat(dr(f), dr(v)));
|
|
542
|
+
return D.forEach(function(y) {
|
|
543
|
+
y.addEventListener("scroll", g, {
|
|
544
|
+
passive: !0
|
|
545
|
+
});
|
|
546
|
+
}), h.addEventListener("resize", g, {
|
|
547
|
+
passive: !0
|
|
548
|
+
}), a(), function() {
|
|
549
|
+
D.forEach(function(y) {
|
|
550
|
+
y.removeEventListener("scroll", g), h.removeEventListener("resize", g);
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
}, [e, r, n]);
|
|
555
|
+
}
|
|
556
|
+
function sa(e, r, n, a, i, u, s, f) {
|
|
557
|
+
var v = t.useRef(e);
|
|
558
|
+
v.current = e;
|
|
559
|
+
var h = t.useRef(!1);
|
|
560
|
+
t.useEffect(function() {
|
|
561
|
+
if (r && a && (!i || u)) {
|
|
562
|
+
var g = function() {
|
|
563
|
+
h.current = !1;
|
|
564
|
+
}, y = function(x) {
|
|
565
|
+
var E;
|
|
566
|
+
v.current && !s(((E = x.composedPath) === null || E === void 0 || (E = E.call(x)) === null || E === void 0 ? void 0 : E[0]) || x.target) && !h.current && f(!1);
|
|
567
|
+
}, d = yn(a);
|
|
568
|
+
d.addEventListener("pointerdown", g, !0), d.addEventListener("mousedown", y, !0), d.addEventListener("contextmenu", y, !0);
|
|
569
|
+
var m = fr(n);
|
|
570
|
+
if (m && (m.addEventListener("mousedown", y, !0), m.addEventListener("contextmenu", y, !0)), process.env.NODE_ENV !== "production") {
|
|
571
|
+
var N, b, W = n == null || (N = n.getRootNode) === null || N === void 0 ? void 0 : N.call(n), T = (b = a.getRootNode) === null || b === void 0 ? void 0 : b.call(a);
|
|
572
|
+
Fr(W === T, "trigger element and popup element should in same shadow root.");
|
|
573
|
+
}
|
|
574
|
+
return function() {
|
|
575
|
+
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));
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
}, [r, n, a, i, u]);
|
|
579
|
+
function D() {
|
|
580
|
+
h.current = !0;
|
|
581
|
+
}
|
|
582
|
+
return D;
|
|
583
|
+
}
|
|
584
|
+
var da = ["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"];
|
|
585
|
+
function ca() {
|
|
586
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mr, r = /* @__PURE__ */ t.forwardRef(function(n, a) {
|
|
587
|
+
var i = n.prefixCls, u = i === void 0 ? "rc-trigger-popup" : i, s = n.children, f = n.action, v = f === void 0 ? "hover" : f, h = n.showAction, D = n.hideAction, g = n.popupVisible, y = n.defaultPopupVisible, d = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, N = n.mouseEnterDelay, b = n.mouseLeaveDelay, W = b === void 0 ? 0.1 : b, T = n.focusDelay, C = n.blurDelay, x = n.mask, E = n.maskClosable, c = E === void 0 ? !0 : E, re = n.getPopupContainer, ce = n.forceRender, ae = n.autoDestroy, fe = n.destroyPopupOnHide, te = n.popup, U = n.popupClassName, Me = n.popupStyle, ve = n.popupPlacement, Pe = n.builtinPlacements, Q = Pe === void 0 ? {} : Pe, Se = n.popupAlign, B = n.zIndex, F = n.stretch, w = n.getPopupClassNameFromAlign, Be = n.fresh, ie = n.alignPoint, V = n.onPopupClick, M = n.onPopupAlign, J = n.arrow, Ve = n.popupMotion, an = n.maskMotion, me = n.popupTransitionName, G = n.popupAnimation, Le = n.maskTransitionName, Fe = n.maskAnimation, O = n.className, he = n.getTriggerDOMNode, oe = jr(n, da), I = ae || fe || !1, tn = t.useState(!1), $e = $(tn, 2), Y = $e[0], ge = $e[1];
|
|
588
|
+
Z(function() {
|
|
589
|
+
ge(na());
|
|
590
|
+
}, []);
|
|
591
|
+
var je = t.useRef({}), j = t.useContext(br), Fn = t.useMemo(function() {
|
|
592
|
+
return {
|
|
593
|
+
registerSubPopup: function(l, L) {
|
|
594
|
+
je.current[l] = L, j == null || j.registerSubPopup(l, L);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
}, [j]), S = Ur(), wn = t.useState(null), qe = $(wn, 2), q = qe[0], Ee = qe[1], ke = t.useRef(null), jn = Ke(function(o) {
|
|
598
|
+
ke.current = o, cr(o) && q !== o && Ee(o), j == null || j.registerSubPopup(S, o);
|
|
599
|
+
}), qn = t.useState(null), bn = $(qn, 2), ue = bn[0], le = bn[1], X = t.useRef(null), _n = Ke(function(o) {
|
|
600
|
+
cr(o) && ue !== o && (le(o), X.current = o);
|
|
601
|
+
}), _e = t.Children.only(s), p = (_e == null ? void 0 : _e.props) || {}, ze = {}, An = Ke(function(o) {
|
|
602
|
+
var l, L, R = ue;
|
|
603
|
+
return (R == null ? void 0 : R.contains(o)) || ((l = fr(R)) === null || l === void 0 ? void 0 : l.host) === o || o === R || (q == null ? void 0 : q.contains(o)) || ((L = fr(q)) === null || L === void 0 ? void 0 : L.host) === o || o === q || Object.values(je.current).some(function(z) {
|
|
604
|
+
return (z == null ? void 0 : z.contains(o)) || o === z;
|
|
605
|
+
});
|
|
606
|
+
}), Cn = Mr(u, Ve, G, me), In = Mr(u, an, Fe, Le), Un = t.useState(y || !1), ye = $(Un, 2), K = ye[0], on = ye[1], _ = g ?? K, Te = Ke(function(o) {
|
|
607
|
+
g === void 0 && on(o);
|
|
608
|
+
});
|
|
609
|
+
Z(function() {
|
|
610
|
+
on(g || !1);
|
|
611
|
+
}, [g]);
|
|
612
|
+
var P = t.useRef(_);
|
|
613
|
+
P.current = _;
|
|
614
|
+
var k = t.useRef([]);
|
|
615
|
+
k.current = [];
|
|
616
|
+
var se = Ke(function(o) {
|
|
617
|
+
var l;
|
|
618
|
+
Te(o), ((l = k.current[k.current.length - 1]) !== null && l !== void 0 ? l : _) !== o && (k.current.push(o), d == null || d(o));
|
|
619
|
+
}), Ae = t.useRef(), un = function() {
|
|
620
|
+
clearTimeout(Ae.current);
|
|
621
|
+
}, ee = function(l) {
|
|
622
|
+
var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
623
|
+
un(), L === 0 ? se(l) : Ae.current = setTimeout(function() {
|
|
624
|
+
se(l);
|
|
625
|
+
}, L * 1e3);
|
|
626
|
+
};
|
|
627
|
+
t.useEffect(function() {
|
|
628
|
+
return un;
|
|
629
|
+
}, []);
|
|
630
|
+
var Mn = t.useState(!1), ln = $(Mn, 2), xe = ln[0], Pn = ln[1];
|
|
631
|
+
Z(function(o) {
|
|
632
|
+
(!o || _) && Pn(!0);
|
|
633
|
+
}, [_]);
|
|
634
|
+
var Qn = t.useState(null), sn = $(Qn, 2), Ze = sn[0], dn = sn[1], Ie = t.useState(null), Ue = $(Ie, 2), De = Ue[0], Oe = Ue[1], Qe = function(l) {
|
|
635
|
+
Oe([l.clientX, l.clientY]);
|
|
636
|
+
}, Sn = ua(_, q, ie && De !== null ? De : ue, ve, Q, Se, M), H = $(Sn, 11), kn = H[0], Jn = H[1], Je = H[2], Dn = H[3], Gn = H[4], Nn = H[5], Ln = H[6], Ge = H[7], $n = H[8], Ye = H[9], Ne = H[10], En = ta(Y, v, h, D), zn = $(En, 2), we = zn[0], de = zn[1], Xe = we.has("click"), pe = de.has("click") || de.has("contextMenu"), be = Ke(function() {
|
|
637
|
+
xe || Ne();
|
|
638
|
+
}), Kn = function() {
|
|
639
|
+
P.current && ie && pe && ee(!1);
|
|
640
|
+
};
|
|
641
|
+
la(_, ue, q, be, Kn), Z(function() {
|
|
642
|
+
be();
|
|
643
|
+
}, [De, ve]), Z(function() {
|
|
644
|
+
_ && !(Q != null && Q[ve]) && be();
|
|
645
|
+
}, [JSON.stringify(Se)]);
|
|
646
|
+
var Tn = t.useMemo(function() {
|
|
647
|
+
var o = oa(Q, u, Ye, ie);
|
|
648
|
+
return rn(o, w == null ? void 0 : w(Ye));
|
|
649
|
+
}, [Ye, w, Q, u, ie]);
|
|
650
|
+
t.useImperativeHandle(a, function() {
|
|
651
|
+
return {
|
|
652
|
+
nativeElement: X.current,
|
|
653
|
+
popupElement: ke.current,
|
|
654
|
+
forceAlign: be
|
|
655
|
+
};
|
|
656
|
+
});
|
|
657
|
+
var Zn = t.useState(0), cn = $(Zn, 2), On = cn[0], Yn = cn[1], Xn = t.useState(0), xn = $(Xn, 2), pn = xn[0], er = xn[1], Wn = function() {
|
|
658
|
+
if (F && ue) {
|
|
659
|
+
var l = ue.getBoundingClientRect();
|
|
660
|
+
Yn(l.width), er(l.height);
|
|
661
|
+
}
|
|
662
|
+
}, nr = function() {
|
|
663
|
+
Wn(), be();
|
|
664
|
+
}, rr = function(l) {
|
|
665
|
+
Pn(!1), Ne(), m == null || m(l);
|
|
666
|
+
}, fn = function() {
|
|
667
|
+
return new Promise(function(l) {
|
|
668
|
+
Wn(), dn(function() {
|
|
669
|
+
return l;
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
};
|
|
673
|
+
Z(function() {
|
|
674
|
+
Ze && (Ne(), Ze(), dn(null));
|
|
675
|
+
}, [Ze]);
|
|
676
|
+
function Ce(o, l, L, R) {
|
|
677
|
+
ze[o] = function(z) {
|
|
678
|
+
var Bn;
|
|
679
|
+
R == null || R(z), ee(l, L);
|
|
680
|
+
for (var ur = arguments.length, hr = new Array(ur > 1 ? ur - 1 : 0), Vn = 1; Vn < ur; Vn++)
|
|
681
|
+
hr[Vn - 1] = arguments[Vn];
|
|
682
|
+
(Bn = p[o]) === null || Bn === void 0 || Bn.call.apply(Bn, [p, z].concat(hr));
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
(Xe || pe) && (ze.onClick = function(o) {
|
|
686
|
+
var l;
|
|
687
|
+
P.current && pe ? ee(!1) : !P.current && Xe && (Qe(o), ee(!0));
|
|
688
|
+
for (var L = arguments.length, R = new Array(L > 1 ? L - 1 : 0), z = 1; z < L; z++)
|
|
689
|
+
R[z - 1] = arguments[z];
|
|
690
|
+
(l = p.onClick) === null || l === void 0 || l.call.apply(l, [p, o].concat(R));
|
|
691
|
+
});
|
|
692
|
+
var ar = sa(_, pe, ue, q, x, c, An, ee), ne = we.has("hover"), Rn = de.has("hover"), en, We;
|
|
693
|
+
ne && (Ce("onMouseEnter", !0, N, function(o) {
|
|
694
|
+
Qe(o);
|
|
695
|
+
}), Ce("onPointerEnter", !0, N, function(o) {
|
|
696
|
+
Qe(o);
|
|
697
|
+
}), en = function(l) {
|
|
698
|
+
(_ || xe) && q !== null && q !== void 0 && q.contains(l.target) && ee(!0, N);
|
|
699
|
+
}, ie && (ze.onMouseMove = function(o) {
|
|
700
|
+
var l;
|
|
701
|
+
(l = p.onMouseMove) === null || l === void 0 || l.call(p, o);
|
|
702
|
+
})), Rn && (Ce("onMouseLeave", !1, W), Ce("onPointerLeave", !1, W), We = function() {
|
|
703
|
+
ee(!1, W);
|
|
704
|
+
}), we.has("focus") && Ce("onFocus", !0, T), de.has("focus") && Ce("onBlur", !1, C), we.has("contextMenu") && (ze.onContextMenu = function(o) {
|
|
705
|
+
var l;
|
|
706
|
+
P.current && de.has("contextMenu") ? ee(!1) : (Qe(o), ee(!0)), o.preventDefault();
|
|
707
|
+
for (var L = arguments.length, R = new Array(L > 1 ? L - 1 : 0), z = 1; z < L; z++)
|
|
708
|
+
R[z - 1] = arguments[z];
|
|
709
|
+
(l = p.onContextMenu) === null || l === void 0 || l.call.apply(l, [p, o].concat(R));
|
|
710
|
+
}), O && (ze.className = rn(p.className, O));
|
|
711
|
+
var Re = A(A({}, p), ze), vn = {}, Hn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
712
|
+
Hn.forEach(function(o) {
|
|
713
|
+
oe[o] && (vn[o] = function() {
|
|
714
|
+
for (var l, L = arguments.length, R = new Array(L), z = 0; z < L; z++)
|
|
715
|
+
R[z] = arguments[z];
|
|
716
|
+
(l = Re[o]) === null || l === void 0 || l.call.apply(l, [Re].concat(R)), oe[o].apply(oe, R);
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
var tr = /* @__PURE__ */ t.cloneElement(_e, A(A({}, Re), vn)), ir = {
|
|
720
|
+
x: Nn,
|
|
721
|
+
y: Ln
|
|
722
|
+
}, or = J ? A({}, J !== !0 ? J : {}) : null;
|
|
723
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Tr, {
|
|
724
|
+
disabled: !_,
|
|
725
|
+
ref: _n,
|
|
726
|
+
onResize: nr
|
|
727
|
+
}, /* @__PURE__ */ t.createElement(Br, {
|
|
728
|
+
getTriggerDOMNode: he
|
|
729
|
+
}, tr)), /* @__PURE__ */ t.createElement(br.Provider, {
|
|
730
|
+
value: Fn
|
|
731
|
+
}, /* @__PURE__ */ t.createElement(Hr, {
|
|
732
|
+
portal: e,
|
|
733
|
+
ref: jn,
|
|
734
|
+
prefixCls: u,
|
|
735
|
+
popup: te,
|
|
736
|
+
className: rn(U, Tn),
|
|
737
|
+
style: Me,
|
|
738
|
+
target: ue,
|
|
739
|
+
onMouseEnter: en,
|
|
740
|
+
onMouseLeave: We,
|
|
741
|
+
onPointerEnter: en,
|
|
742
|
+
zIndex: B,
|
|
743
|
+
open: _,
|
|
744
|
+
keepDom: xe,
|
|
745
|
+
fresh: Be,
|
|
746
|
+
onClick: V,
|
|
747
|
+
onPointerDownCapture: ar,
|
|
748
|
+
mask: x,
|
|
749
|
+
motion: Cn,
|
|
750
|
+
maskMotion: In,
|
|
751
|
+
onVisibleChanged: rr,
|
|
752
|
+
onPrepare: fn,
|
|
753
|
+
forceRender: ce,
|
|
754
|
+
autoDestroy: I,
|
|
755
|
+
getPopupContainer: re,
|
|
756
|
+
align: Ye,
|
|
757
|
+
arrow: or,
|
|
758
|
+
arrowPos: ir,
|
|
759
|
+
ready: kn,
|
|
760
|
+
offsetX: Jn,
|
|
761
|
+
offsetY: Je,
|
|
762
|
+
offsetR: Dn,
|
|
763
|
+
offsetB: Gn,
|
|
764
|
+
onAlign: be,
|
|
765
|
+
stretch: F,
|
|
766
|
+
targetWidth: On / Ge,
|
|
767
|
+
targetHeight: pn / $n
|
|
768
|
+
})));
|
|
769
|
+
});
|
|
770
|
+
return process.env.NODE_ENV !== "production" && (r.displayName = "Trigger"), r;
|
|
771
|
+
}
|
|
772
|
+
const Ca = ca(mr);
|
|
773
|
+
export {
|
|
774
|
+
mr as P,
|
|
775
|
+
Ca as T,
|
|
776
|
+
na as a,
|
|
777
|
+
Zr as b,
|
|
778
|
+
ba as g,
|
|
779
|
+
wa as i
|
|
780
|
+
};
|