@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
|
@@ -1,3621 +1,6 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { c as Be, d as pn, f as te, j as hr, _ as ee, h as ae, a as on, e as Cn, w as Ue, k as br, n as wt, F as Vn } from "../../warning-C63HNL9U.js";
|
|
5
|
-
import { t as Sr, a5 as wr, x as qe, j as yr, n as Mn, w as un, f as Cr, e as Ir, k as Er, b as yt, r as Ct, Z as xr, E as ot, g as Ft, m as Dn, C as at, v as it, o as lt, Y as Zn, q as He, H as At, D as $r } from "../../index-oK7z6jnz.js";
|
|
6
|
-
import { u as Jn, o as jt, t as kn } from "../../isVisible-A-IfeFoT.js";
|
|
7
|
-
import { T as Rr, b as Or, u as Mr, g as Dr } from "../../index-CfDY25LP.js";
|
|
8
|
-
import { K as W } from "../../KeyCode-DM2sFh3-.js";
|
|
9
|
-
import { p as Fn } from "../../pickAttrs-B0YTfcV1.js";
|
|
10
|
-
import { F as Nr, s as Pr, a as _r, b as Tr, c as Lr, i as It } from "../../Overflow-PBZD-PFm.js";
|
|
11
|
-
import { R as Wt } from "../../index-bKlRxQp4.js";
|
|
12
|
-
import { i as Et, R as Hr, g as zr } from "../../PurePanel-BqPLRtc2.js";
|
|
13
|
-
import { u as Br, a as Vr, g as Fr } from "../../useVariants-DvhXfgJY.js";
|
|
14
|
-
import { u as ut } from "../../useLocale-DT-z_vQ6.js";
|
|
15
|
-
import { u as Ar, F as jr } from "../../context-BMW3aJEf.js";
|
|
16
|
-
import { b as Wr, a as Kr } from "../../Compact-CGY560JF.js";
|
|
17
|
-
import { g as Xr } from "../../compact-item-DH13cl8A.js";
|
|
18
|
-
import { R as Ur } from "../../CheckOutlined-CeTKr6II.js";
|
|
19
|
-
import { R as Gr } from "../../CloseCircleFilled-DXCxlIQL.js";
|
|
20
|
-
import { R as Yr } from "../../CloseOutlined-ClXDNn82.js";
|
|
21
|
-
import { R as qr } from "../../LoadingOutlined-8EnJdZ7I.js";
|
|
22
|
-
import { R as Qr } from "../../SearchOutlined-BP3Z2K6j.js";
|
|
23
|
-
var Wn = function(n) {
|
|
24
|
-
var t = n.className, r = n.customizeIcon, a = n.customizeIconProps, i = n.children, l = n.onMouseDown, u = n.onClick, d = typeof r == "function" ? r(a) : r;
|
|
25
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
26
|
-
className: t,
|
|
27
|
-
onMouseDown: function(v) {
|
|
28
|
-
v.preventDefault(), l == null || l(v);
|
|
29
|
-
},
|
|
30
|
-
style: {
|
|
31
|
-
userSelect: "none",
|
|
32
|
-
WebkitUserSelect: "none"
|
|
33
|
-
},
|
|
34
|
-
unselectable: "on",
|
|
35
|
-
onClick: u,
|
|
36
|
-
"aria-hidden": !0
|
|
37
|
-
}, d !== void 0 ? d : /* @__PURE__ */ o.createElement("span", {
|
|
38
|
-
className: Be(t.split(/\s+/).map(function(f) {
|
|
39
|
-
return "".concat(f, "-icon");
|
|
40
|
-
}))
|
|
41
|
-
}, i));
|
|
42
|
-
}, Zr = function(n, t, r, a, i) {
|
|
43
|
-
var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = On.useMemo(function() {
|
|
44
|
-
if (pn(a) === "object")
|
|
45
|
-
return a.clearIcon;
|
|
46
|
-
if (i)
|
|
47
|
-
return i;
|
|
48
|
-
}, [a, i]), v = On.useMemo(function() {
|
|
49
|
-
return !!(!l && a && (r.length || u) && !(d === "combobox" && u === ""));
|
|
50
|
-
}, [a, l, r.length, u, d]);
|
|
51
|
-
return {
|
|
52
|
-
allowClear: v,
|
|
53
|
-
clearIcon: /* @__PURE__ */ On.createElement(Wn, {
|
|
54
|
-
className: "".concat(n, "-clear"),
|
|
55
|
-
onMouseDown: t,
|
|
56
|
-
customizeIcon: f
|
|
57
|
-
}, "×")
|
|
58
|
-
};
|
|
59
|
-
}, Kt = /* @__PURE__ */ o.createContext(null);
|
|
60
|
-
function Jr() {
|
|
61
|
-
return o.useContext(Kt);
|
|
62
|
-
}
|
|
63
|
-
function kr() {
|
|
64
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1], i = o.useRef(null), l = function() {
|
|
65
|
-
window.clearTimeout(i.current);
|
|
66
|
-
};
|
|
67
|
-
o.useEffect(function() {
|
|
68
|
-
return l;
|
|
69
|
-
}, []);
|
|
70
|
-
var u = function(f, v) {
|
|
71
|
-
l(), i.current = window.setTimeout(function() {
|
|
72
|
-
a(f), v && v();
|
|
73
|
-
}, e);
|
|
74
|
-
};
|
|
75
|
-
return [r, u, l];
|
|
76
|
-
}
|
|
77
|
-
function Xt() {
|
|
78
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = o.useRef(null), t = o.useRef(null);
|
|
79
|
-
o.useEffect(function() {
|
|
80
|
-
return function() {
|
|
81
|
-
window.clearTimeout(t.current);
|
|
82
|
-
};
|
|
83
|
-
}, []);
|
|
84
|
-
function r(a) {
|
|
85
|
-
(a || n.current === null) && (n.current = a), window.clearTimeout(t.current), t.current = window.setTimeout(function() {
|
|
86
|
-
n.current = null;
|
|
87
|
-
}, e);
|
|
88
|
-
}
|
|
89
|
-
return [function() {
|
|
90
|
-
return n.current;
|
|
91
|
-
}, r];
|
|
92
|
-
}
|
|
93
|
-
function eo(e, n, t, r) {
|
|
94
|
-
var a = o.useRef(null);
|
|
95
|
-
a.current = {
|
|
96
|
-
open: n,
|
|
97
|
-
triggerOpen: t,
|
|
98
|
-
customizedTrigger: r
|
|
99
|
-
}, o.useEffect(function() {
|
|
100
|
-
function i(l) {
|
|
101
|
-
var u;
|
|
102
|
-
if (!((u = a.current) !== null && u !== void 0 && u.customizedTrigger)) {
|
|
103
|
-
var d = l.target;
|
|
104
|
-
d.shadowRoot && l.composed && (d = l.composedPath()[0] || d), a.current.open && e().filter(function(f) {
|
|
105
|
-
return f;
|
|
106
|
-
}).every(function(f) {
|
|
107
|
-
return !f.contains(d) && f !== d;
|
|
108
|
-
}) && a.current.triggerOpen(!1);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return window.addEventListener("mousedown", i), function() {
|
|
112
|
-
return window.removeEventListener("mousedown", i);
|
|
113
|
-
};
|
|
114
|
-
}, []);
|
|
115
|
-
}
|
|
116
|
-
function no(e) {
|
|
117
|
-
return (
|
|
118
|
-
// Undefined for Edge bug:
|
|
119
|
-
// https://github.com/ant-design/ant-design/issues/51292
|
|
120
|
-
e && // Other keys
|
|
121
|
-
![
|
|
122
|
-
// System function button
|
|
123
|
-
W.ESC,
|
|
124
|
-
W.SHIFT,
|
|
125
|
-
W.BACKSPACE,
|
|
126
|
-
W.TAB,
|
|
127
|
-
W.WIN_KEY,
|
|
128
|
-
W.ALT,
|
|
129
|
-
W.META,
|
|
130
|
-
W.WIN_KEY_RIGHT,
|
|
131
|
-
W.CTRL,
|
|
132
|
-
W.SEMICOLON,
|
|
133
|
-
W.EQUALS,
|
|
134
|
-
W.CAPS_LOCK,
|
|
135
|
-
W.CONTEXT_MENU,
|
|
136
|
-
// F1-F12
|
|
137
|
-
W.F1,
|
|
138
|
-
W.F2,
|
|
139
|
-
W.F3,
|
|
140
|
-
W.F4,
|
|
141
|
-
W.F5,
|
|
142
|
-
W.F6,
|
|
143
|
-
W.F7,
|
|
144
|
-
W.F8,
|
|
145
|
-
W.F9,
|
|
146
|
-
W.F10,
|
|
147
|
-
W.F11,
|
|
148
|
-
W.F12
|
|
149
|
-
].includes(e)
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
var to = function(n, t) {
|
|
153
|
-
var r, a = n.prefixCls, i = n.id, l = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable, b = n.activeDescendantId, c = n.value, g = n.maxLength, m = n.onKeyDown, S = n.onMouseDown, w = n.onChange, h = n.onPaste, I = n.onCompositionStart, y = n.onCompositionEnd, T = n.onBlur, p = n.open, E = n.attrs, z = l || /* @__PURE__ */ o.createElement("input", null), V = z, q = V.ref, _ = V.props, A = _.onKeyDown, U = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, ne = _.onBlur, Z = _.style;
|
|
154
|
-
return hr(!("maxLength" in z.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), z = /* @__PURE__ */ o.cloneElement(z, ee(ee(ee({
|
|
155
|
-
type: "search"
|
|
156
|
-
}, _), {}, {
|
|
157
|
-
// Override over origin props
|
|
158
|
-
id: i,
|
|
159
|
-
ref: Sr(t, q),
|
|
160
|
-
disabled: u,
|
|
161
|
-
tabIndex: d,
|
|
162
|
-
autoComplete: v || "off",
|
|
163
|
-
autoFocus: f,
|
|
164
|
-
className: Be("".concat(a, "-selection-search-input"), (r = z) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
|
|
165
|
-
role: "combobox",
|
|
166
|
-
"aria-expanded": p || !1,
|
|
167
|
-
"aria-haspopup": "listbox",
|
|
168
|
-
"aria-owns": "".concat(i, "_list"),
|
|
169
|
-
"aria-autocomplete": "list",
|
|
170
|
-
"aria-controls": "".concat(i, "_list"),
|
|
171
|
-
"aria-activedescendant": p ? b : void 0
|
|
172
|
-
}, E), {}, {
|
|
173
|
-
value: s ? c : "",
|
|
174
|
-
maxLength: g,
|
|
175
|
-
readOnly: !s,
|
|
176
|
-
unselectable: s ? null : "on",
|
|
177
|
-
style: ee(ee({}, Z), {}, {
|
|
178
|
-
opacity: s ? null : 0
|
|
179
|
-
}),
|
|
180
|
-
onKeyDown: function(x) {
|
|
181
|
-
m(x), A && A(x);
|
|
182
|
-
},
|
|
183
|
-
onMouseDown: function(x) {
|
|
184
|
-
S(x), Q && Q(x);
|
|
185
|
-
},
|
|
186
|
-
onChange: function(x) {
|
|
187
|
-
w(x), U && U(x);
|
|
188
|
-
},
|
|
189
|
-
onCompositionStart: function(x) {
|
|
190
|
-
I(x), G && G(x);
|
|
191
|
-
},
|
|
192
|
-
onCompositionEnd: function(x) {
|
|
193
|
-
y(x), j && j(x);
|
|
194
|
-
},
|
|
195
|
-
onPaste: h,
|
|
196
|
-
onBlur: function(x) {
|
|
197
|
-
T(x), ne && ne(x);
|
|
198
|
-
}
|
|
199
|
-
})), z;
|
|
200
|
-
}, ct = /* @__PURE__ */ o.forwardRef(to);
|
|
201
|
-
process.env.NODE_ENV !== "production" && (ct.displayName = "Input");
|
|
202
|
-
function st(e) {
|
|
203
|
-
return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
|
|
204
|
-
}
|
|
205
|
-
var ro = typeof window < "u" && window.document && window.document.documentElement, oo = process.env.NODE_ENV !== "test" && ro;
|
|
206
|
-
function ao(e) {
|
|
207
|
-
return e != null;
|
|
208
|
-
}
|
|
209
|
-
function io(e) {
|
|
210
|
-
return !e && e !== 0;
|
|
211
|
-
}
|
|
212
|
-
function xt(e) {
|
|
213
|
-
return ["string", "number"].includes(pn(e));
|
|
214
|
-
}
|
|
215
|
-
function Ut(e) {
|
|
216
|
-
var n = void 0;
|
|
217
|
-
return e && (xt(e.title) ? n = e.title.toString() : xt(e.label) && (n = e.label.toString())), n;
|
|
218
|
-
}
|
|
219
|
-
function lo(e, n) {
|
|
220
|
-
oo ? o.useLayoutEffect(e, n) : o.useEffect(e, n);
|
|
221
|
-
}
|
|
222
|
-
function uo(e) {
|
|
223
|
-
var n;
|
|
224
|
-
return (n = e.key) !== null && n !== void 0 ? n : e.value;
|
|
225
|
-
}
|
|
226
|
-
var $t = function(n) {
|
|
227
|
-
n.preventDefault(), n.stopPropagation();
|
|
228
|
-
}, co = function(n) {
|
|
229
|
-
var t = n.id, r = n.prefixCls, a = n.values, i = n.open, l = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode, b = n.showSearch, c = n.autoFocus, g = n.autoComplete, m = n.activeDescendantId, S = n.tabIndex, w = n.removeIcon, h = n.maxTagCount, I = n.maxTagTextLength, y = n.maxTagPlaceholder, T = y === void 0 ? function(K) {
|
|
230
|
-
return "+ ".concat(K.length, " ...");
|
|
231
|
-
} : y, p = n.tagRender, E = n.onToggleOpen, z = n.onRemove, V = n.onInputChange, q = n.onInputPaste, _ = n.onInputKeyDown, A = n.onInputMouseDown, U = n.onInputCompositionStart, Q = n.onInputCompositionEnd, G = n.onInputBlur, j = o.useRef(null), ne = Ln(0), Z = te(ne, 2), Y = Z[0], x = Z[1], M = Ln(!1), fe = te(M, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), ye = i || s === "multiple" && u === !1 || s === "tags" ? l : "", ge = s === "tags" || s === "multiple" && u === !1 || b && (i || ie);
|
|
232
|
-
lo(function() {
|
|
233
|
-
x(j.current.scrollWidth);
|
|
234
|
-
}, [ye]);
|
|
235
|
-
var Re = function($, F, le, me, re) {
|
|
236
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
237
|
-
title: Ut($),
|
|
238
|
-
className: Be("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
|
|
239
|
-
}, /* @__PURE__ */ o.createElement("span", {
|
|
240
|
-
className: "".concat(se, "-item-content")
|
|
241
|
-
}, F), me && /* @__PURE__ */ o.createElement(Wn, {
|
|
242
|
-
className: "".concat(se, "-item-remove"),
|
|
243
|
-
onMouseDown: $t,
|
|
244
|
-
onClick: re,
|
|
245
|
-
customizeIcon: w
|
|
246
|
-
}, "×"));
|
|
247
|
-
}, ce = function($, F, le, me, re, we) {
|
|
248
|
-
var ze = function(Ne) {
|
|
249
|
-
$t(Ne), E(!i);
|
|
250
|
-
};
|
|
251
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
252
|
-
onMouseDown: ze
|
|
253
|
-
}, p({
|
|
254
|
-
label: F,
|
|
255
|
-
value: $,
|
|
256
|
-
disabled: le,
|
|
257
|
-
closable: me,
|
|
258
|
-
onClose: re,
|
|
259
|
-
isMaxTag: !!we
|
|
260
|
-
}));
|
|
261
|
-
}, pe = function($) {
|
|
262
|
-
var F = $.disabled, le = $.label, me = $.value, re = !v && !F, we = le;
|
|
263
|
-
if (typeof I == "number" && (typeof le == "string" || typeof le == "number")) {
|
|
264
|
-
var ze = String(we);
|
|
265
|
-
ze.length > I && (we = "".concat(ze.slice(0, I), "..."));
|
|
266
|
-
}
|
|
267
|
-
var xe = function(de) {
|
|
268
|
-
de && de.stopPropagation(), z($);
|
|
269
|
-
};
|
|
270
|
-
return typeof p == "function" ? ce(me, we, F, re, xe) : Re($, we, F, re, xe);
|
|
271
|
-
}, R = function($) {
|
|
272
|
-
if (!a.length)
|
|
273
|
-
return null;
|
|
274
|
-
var F = typeof T == "function" ? T($) : T;
|
|
275
|
-
return typeof p == "function" ? ce(void 0, F, !1, !1, void 0, !0) : Re({
|
|
276
|
-
title: F
|
|
277
|
-
}, F, !1);
|
|
278
|
-
}, C = /* @__PURE__ */ o.createElement("div", {
|
|
279
|
-
className: "".concat(se, "-search"),
|
|
280
|
-
style: {
|
|
281
|
-
width: Y
|
|
282
|
-
},
|
|
283
|
-
onFocus: function() {
|
|
284
|
-
J(!0);
|
|
285
|
-
},
|
|
286
|
-
onBlur: function() {
|
|
287
|
-
J(!1);
|
|
288
|
-
}
|
|
289
|
-
}, /* @__PURE__ */ o.createElement(ct, {
|
|
290
|
-
ref: d,
|
|
291
|
-
open: i,
|
|
292
|
-
prefixCls: r,
|
|
293
|
-
id: t,
|
|
294
|
-
inputElement: null,
|
|
295
|
-
disabled: v,
|
|
296
|
-
autoFocus: c,
|
|
297
|
-
autoComplete: g,
|
|
298
|
-
editable: ge,
|
|
299
|
-
activeDescendantId: m,
|
|
300
|
-
value: ye,
|
|
301
|
-
onKeyDown: _,
|
|
302
|
-
onMouseDown: A,
|
|
303
|
-
onChange: V,
|
|
304
|
-
onPaste: q,
|
|
305
|
-
onCompositionStart: U,
|
|
306
|
-
onCompositionEnd: Q,
|
|
307
|
-
onBlur: G,
|
|
308
|
-
tabIndex: S,
|
|
309
|
-
attrs: Fn(n, !0)
|
|
310
|
-
}), /* @__PURE__ */ o.createElement("span", {
|
|
311
|
-
ref: j,
|
|
312
|
-
className: "".concat(se, "-search-mirror"),
|
|
313
|
-
"aria-hidden": !0
|
|
314
|
-
}, ye, " ")), D = /* @__PURE__ */ o.createElement(Nr, {
|
|
315
|
-
prefixCls: "".concat(se, "-overflow"),
|
|
316
|
-
data: a,
|
|
317
|
-
renderItem: pe,
|
|
318
|
-
renderRest: R,
|
|
319
|
-
suffix: C,
|
|
320
|
-
itemKey: uo,
|
|
321
|
-
maxCount: h
|
|
322
|
-
});
|
|
323
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
324
|
-
className: "".concat(se, "-wrap")
|
|
325
|
-
}, D, !a.length && !ye && /* @__PURE__ */ o.createElement("span", {
|
|
326
|
-
className: "".concat(se, "-placeholder")
|
|
327
|
-
}, f));
|
|
328
|
-
}, so = function(n) {
|
|
329
|
-
var t = n.inputElement, r = n.prefixCls, a = n.id, i = n.inputRef, l = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open, b = n.values, c = n.placeholder, g = n.tabIndex, m = n.showSearch, S = n.searchValue, w = n.activeValue, h = n.maxLength, I = n.onInputKeyDown, y = n.onInputMouseDown, T = n.onInputChange, p = n.onInputPaste, E = n.onInputCompositionStart, z = n.onInputCompositionEnd, V = n.onInputBlur, q = n.title, _ = o.useState(!1), A = te(_, 2), U = A[0], Q = A[1], G = v === "combobox", j = G || m, ne = b[0], Z = S || "";
|
|
330
|
-
G && w && !U && (Z = w), o.useEffect(function() {
|
|
331
|
-
G && Q(!1);
|
|
332
|
-
}, [G, w]);
|
|
333
|
-
var Y = v !== "combobox" && !s && !m ? !1 : !!Z, x = q === void 0 ? Ut(ne) : q, M = o.useMemo(function() {
|
|
334
|
-
return ne ? null : /* @__PURE__ */ o.createElement("span", {
|
|
335
|
-
className: "".concat(r, "-selection-placeholder"),
|
|
336
|
-
style: Y ? {
|
|
337
|
-
visibility: "hidden"
|
|
338
|
-
} : void 0
|
|
339
|
-
}, c);
|
|
340
|
-
}, [ne, Y, c, r]);
|
|
341
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
342
|
-
className: "".concat(r, "-selection-wrap")
|
|
343
|
-
}, /* @__PURE__ */ o.createElement("span", {
|
|
344
|
-
className: "".concat(r, "-selection-search")
|
|
345
|
-
}, /* @__PURE__ */ o.createElement(ct, {
|
|
346
|
-
ref: i,
|
|
347
|
-
prefixCls: r,
|
|
348
|
-
id: a,
|
|
349
|
-
open: s,
|
|
350
|
-
inputElement: t,
|
|
351
|
-
disabled: l,
|
|
352
|
-
autoFocus: u,
|
|
353
|
-
autoComplete: d,
|
|
354
|
-
editable: j,
|
|
355
|
-
activeDescendantId: f,
|
|
356
|
-
value: Z,
|
|
357
|
-
onKeyDown: I,
|
|
358
|
-
onMouseDown: y,
|
|
359
|
-
onChange: function(ie) {
|
|
360
|
-
Q(!0), T(ie);
|
|
361
|
-
},
|
|
362
|
-
onPaste: p,
|
|
363
|
-
onCompositionStart: E,
|
|
364
|
-
onCompositionEnd: z,
|
|
365
|
-
onBlur: V,
|
|
366
|
-
tabIndex: g,
|
|
367
|
-
attrs: Fn(n, !0),
|
|
368
|
-
maxLength: G ? h : void 0
|
|
369
|
-
})), !G && ne ? /* @__PURE__ */ o.createElement("span", {
|
|
370
|
-
className: "".concat(r, "-selection-item"),
|
|
371
|
-
title: x,
|
|
372
|
-
style: Y ? {
|
|
373
|
-
visibility: "hidden"
|
|
374
|
-
} : void 0
|
|
375
|
-
}, ne.label) : null, M);
|
|
376
|
-
}, fo = function(n, t) {
|
|
377
|
-
var r = he(null), a = he(!1), i = n.prefixCls, l = n.open, u = n.mode, d = n.showSearch, f = n.tokenWithEnter, v = n.disabled, s = n.prefix, b = n.autoClearSearchValue, c = n.onSearch, g = n.onSearchSubmit, m = n.onToggleOpen, S = n.onInputKeyDown, w = n.onInputBlur, h = n.domRef;
|
|
378
|
-
o.useImperativeHandle(t, function() {
|
|
379
|
-
return {
|
|
380
|
-
focus: function(x) {
|
|
381
|
-
r.current.focus(x);
|
|
382
|
-
},
|
|
383
|
-
blur: function() {
|
|
384
|
-
r.current.blur();
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
});
|
|
388
|
-
var I = Xt(0), y = te(I, 2), T = y[0], p = y[1], E = function(x) {
|
|
389
|
-
var M = x.which, fe = r.current instanceof HTMLTextAreaElement;
|
|
390
|
-
!fe && l && (M === W.UP || M === W.DOWN) && x.preventDefault(), S && S(x), M === W.ENTER && u === "tags" && !a.current && !l && (g == null || g(x.target.value)), !(fe && !l && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(M)) && no(M) && m(!0);
|
|
391
|
-
}, z = function() {
|
|
392
|
-
p(!0);
|
|
393
|
-
}, V = he(null), q = function(x) {
|
|
394
|
-
c(x, !0, a.current) !== !1 && m(!0);
|
|
395
|
-
}, _ = function() {
|
|
396
|
-
a.current = !0;
|
|
397
|
-
}, A = function(x) {
|
|
398
|
-
a.current = !1, u !== "combobox" && q(x.target.value);
|
|
399
|
-
}, U = function(x) {
|
|
400
|
-
var M = x.target.value;
|
|
401
|
-
if (f && V.current && /[\r\n]/.test(V.current)) {
|
|
402
|
-
var fe = V.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
|
|
403
|
-
M = M.replace(fe, V.current);
|
|
404
|
-
}
|
|
405
|
-
V.current = null, q(M);
|
|
406
|
-
}, Q = function(x) {
|
|
407
|
-
var M = x.clipboardData, fe = M == null ? void 0 : M.getData("text");
|
|
408
|
-
V.current = fe || "";
|
|
409
|
-
}, G = function(x) {
|
|
410
|
-
var M = x.target;
|
|
411
|
-
if (M !== r.current) {
|
|
412
|
-
var fe = document.body.style.msTouchAction !== void 0;
|
|
413
|
-
fe ? setTimeout(function() {
|
|
414
|
-
r.current.focus();
|
|
415
|
-
}) : r.current.focus();
|
|
416
|
-
}
|
|
417
|
-
}, j = function(x) {
|
|
418
|
-
var M = T();
|
|
419
|
-
x.target !== r.current && !M && !(u === "combobox" && v) && x.preventDefault(), (u !== "combobox" && (!d || !M) || !l) && (l && b !== !1 && c("", !0, !1), m());
|
|
420
|
-
}, ne = {
|
|
421
|
-
inputRef: r,
|
|
422
|
-
onInputKeyDown: E,
|
|
423
|
-
onInputMouseDown: z,
|
|
424
|
-
onInputChange: U,
|
|
425
|
-
onInputPaste: Q,
|
|
426
|
-
onInputCompositionStart: _,
|
|
427
|
-
onInputCompositionEnd: A,
|
|
428
|
-
onInputBlur: w
|
|
429
|
-
}, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(co, on({}, n, ne)) : /* @__PURE__ */ o.createElement(so, on({}, n, ne));
|
|
430
|
-
return /* @__PURE__ */ o.createElement("div", {
|
|
431
|
-
ref: h,
|
|
432
|
-
className: "".concat(i, "-selector"),
|
|
433
|
-
onClick: G,
|
|
434
|
-
onMouseDown: j
|
|
435
|
-
}, s && /* @__PURE__ */ o.createElement("div", {
|
|
436
|
-
className: "".concat(i, "-prefix")
|
|
437
|
-
}, s), Z);
|
|
438
|
-
}, Gt = /* @__PURE__ */ o.forwardRef(fo);
|
|
439
|
-
process.env.NODE_ENV !== "production" && (Gt.displayName = "Selector");
|
|
440
|
-
var mo = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], vo = function(n) {
|
|
441
|
-
var t = n === !0 ? 0 : 1;
|
|
442
|
-
return {
|
|
443
|
-
bottomLeft: {
|
|
444
|
-
points: ["tl", "bl"],
|
|
445
|
-
offset: [0, 4],
|
|
446
|
-
overflow: {
|
|
447
|
-
adjustX: t,
|
|
448
|
-
adjustY: 1
|
|
449
|
-
},
|
|
450
|
-
htmlRegion: "scroll"
|
|
451
|
-
},
|
|
452
|
-
bottomRight: {
|
|
453
|
-
points: ["tr", "br"],
|
|
454
|
-
offset: [0, 4],
|
|
455
|
-
overflow: {
|
|
456
|
-
adjustX: t,
|
|
457
|
-
adjustY: 1
|
|
458
|
-
},
|
|
459
|
-
htmlRegion: "scroll"
|
|
460
|
-
},
|
|
461
|
-
topLeft: {
|
|
462
|
-
points: ["bl", "tl"],
|
|
463
|
-
offset: [0, -4],
|
|
464
|
-
overflow: {
|
|
465
|
-
adjustX: t,
|
|
466
|
-
adjustY: 1
|
|
467
|
-
},
|
|
468
|
-
htmlRegion: "scroll"
|
|
469
|
-
},
|
|
470
|
-
topRight: {
|
|
471
|
-
points: ["br", "tr"],
|
|
472
|
-
offset: [0, -4],
|
|
473
|
-
overflow: {
|
|
474
|
-
adjustX: t,
|
|
475
|
-
adjustY: 1
|
|
476
|
-
},
|
|
477
|
-
htmlRegion: "scroll"
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
}, go = function(n, t) {
|
|
481
|
-
var r = n.prefixCls;
|
|
482
|
-
n.disabled;
|
|
483
|
-
var a = n.visible, i = n.children, l = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction, b = s === void 0 ? "ltr" : s, c = n.placement, g = n.builtinPlacements, m = n.dropdownMatchSelectWidth, S = n.dropdownRender, w = n.dropdownAlign, h = n.getPopupContainer, I = n.empty, y = n.getTriggerDOMNode, T = n.onPopupVisibleChange, p = n.onPopupMouseEnter, E = Cn(n, mo), z = "".concat(r, "-dropdown"), V = l;
|
|
484
|
-
S && (V = S(l));
|
|
485
|
-
var q = o.useMemo(function() {
|
|
486
|
-
return g || vo(m);
|
|
487
|
-
}, [g, m]), _ = u ? "".concat(z, "-").concat(u) : d, A = typeof m == "number", U = o.useMemo(function() {
|
|
488
|
-
return A ? null : m === !1 ? "minWidth" : "width";
|
|
489
|
-
}, [m, A]), Q = f;
|
|
490
|
-
A && (Q = ee(ee({}, Q), {}, {
|
|
491
|
-
width: m
|
|
492
|
-
}));
|
|
493
|
-
var G = o.useRef(null);
|
|
494
|
-
return o.useImperativeHandle(t, function() {
|
|
495
|
-
return {
|
|
496
|
-
getPopupElement: function() {
|
|
497
|
-
var ne;
|
|
498
|
-
return (ne = G.current) === null || ne === void 0 ? void 0 : ne.popupElement;
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
}), /* @__PURE__ */ o.createElement(Rr, on({}, E, {
|
|
502
|
-
showAction: T ? ["click"] : [],
|
|
503
|
-
hideAction: T ? ["click"] : [],
|
|
504
|
-
popupPlacement: c || (b === "rtl" ? "bottomRight" : "bottomLeft"),
|
|
505
|
-
builtinPlacements: q,
|
|
506
|
-
prefixCls: z,
|
|
507
|
-
popupTransitionName: _,
|
|
508
|
-
popup: /* @__PURE__ */ o.createElement("div", {
|
|
509
|
-
onMouseEnter: p
|
|
510
|
-
}, V),
|
|
511
|
-
ref: G,
|
|
512
|
-
stretch: U,
|
|
513
|
-
popupAlign: w,
|
|
514
|
-
popupVisible: a,
|
|
515
|
-
getPopupContainer: h,
|
|
516
|
-
popupClassName: Be(v, ae({}, "".concat(z, "-empty"), I)),
|
|
517
|
-
popupStyle: Q,
|
|
518
|
-
getTriggerDOMNode: y,
|
|
519
|
-
onPopupVisibleChange: T
|
|
520
|
-
}), i);
|
|
521
|
-
}, Yt = /* @__PURE__ */ o.forwardRef(go);
|
|
522
|
-
process.env.NODE_ENV !== "production" && (Yt.displayName = "SelectTrigger");
|
|
523
|
-
function Rt(e, n) {
|
|
524
|
-
var t = e.key, r;
|
|
525
|
-
return "value" in e && (r = e.value), t ?? (r !== void 0 ? r : "rc-index-key-".concat(n));
|
|
526
|
-
}
|
|
527
|
-
function et(e) {
|
|
528
|
-
return typeof e < "u" && !Number.isNaN(e);
|
|
529
|
-
}
|
|
530
|
-
function qt(e, n) {
|
|
531
|
-
var t = e || {}, r = t.label, a = t.value, i = t.options, l = t.groupLabel, u = r || (n ? "children" : "label");
|
|
532
|
-
return {
|
|
533
|
-
label: u,
|
|
534
|
-
value: a || "value",
|
|
535
|
-
options: i || "options",
|
|
536
|
-
groupLabel: l || u
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
function po(e) {
|
|
540
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], i = qt(t, !1), l = i.label, u = i.value, d = i.options, f = i.groupLabel;
|
|
541
|
-
function v(s, b) {
|
|
542
|
-
Array.isArray(s) && s.forEach(function(c) {
|
|
543
|
-
if (b || !(d in c)) {
|
|
544
|
-
var g = c[u];
|
|
545
|
-
a.push({
|
|
546
|
-
key: Rt(c, a.length),
|
|
547
|
-
groupOption: b,
|
|
548
|
-
data: c,
|
|
549
|
-
label: c[l],
|
|
550
|
-
value: g
|
|
551
|
-
});
|
|
552
|
-
} else {
|
|
553
|
-
var m = c[f];
|
|
554
|
-
m === void 0 && r && (m = c.label), a.push({
|
|
555
|
-
key: Rt(c, a.length),
|
|
556
|
-
group: !0,
|
|
557
|
-
data: c,
|
|
558
|
-
label: m
|
|
559
|
-
}), v(c[d], !0);
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
return v(e, !1), a;
|
|
564
|
-
}
|
|
565
|
-
function nt(e) {
|
|
566
|
-
var n = ee({}, e);
|
|
567
|
-
return "props" in n || Object.defineProperty(n, "props", {
|
|
568
|
-
get: function() {
|
|
569
|
-
return Ue(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), n;
|
|
570
|
-
}
|
|
571
|
-
}), n;
|
|
572
|
-
}
|
|
573
|
-
var ho = function(n, t, r) {
|
|
574
|
-
if (!t || !t.length)
|
|
575
|
-
return null;
|
|
576
|
-
var a = !1, i = function u(d, f) {
|
|
577
|
-
var v = wr(f), s = v[0], b = v.slice(1);
|
|
578
|
-
if (!s)
|
|
579
|
-
return [d];
|
|
580
|
-
var c = d.split(s);
|
|
581
|
-
return a = a || c.length > 1, c.reduce(function(g, m) {
|
|
582
|
-
return [].concat(qe(g), qe(u(m, b)));
|
|
583
|
-
}, []).filter(Boolean);
|
|
584
|
-
}, l = i(n, t);
|
|
585
|
-
return a ? typeof r < "u" ? l.slice(0, r) : l : null;
|
|
586
|
-
}, dt = /* @__PURE__ */ o.createContext(null);
|
|
587
|
-
function bo(e) {
|
|
588
|
-
var n = e.visible, t = e.values;
|
|
589
|
-
if (!n)
|
|
590
|
-
return null;
|
|
591
|
-
var r = 50;
|
|
592
|
-
return /* @__PURE__ */ o.createElement("span", {
|
|
593
|
-
"aria-live": "polite",
|
|
594
|
-
style: {
|
|
595
|
-
width: 0,
|
|
596
|
-
height: 0,
|
|
597
|
-
position: "absolute",
|
|
598
|
-
overflow: "hidden",
|
|
599
|
-
opacity: 0
|
|
600
|
-
}
|
|
601
|
-
}, "".concat(t.slice(0, r).map(function(a) {
|
|
602
|
-
var i = a.label, l = a.value;
|
|
603
|
-
return ["number", "string"].includes(pn(i)) ? i : l;
|
|
604
|
-
}).join(", ")), t.length > r ? ", ..." : null);
|
|
605
|
-
}
|
|
606
|
-
var So = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], wo = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], An = function(n) {
|
|
607
|
-
return n === "tags" || n === "multiple";
|
|
608
|
-
}, Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
609
|
-
var t, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange, b = e.emptyOptions, c = e.notFoundContent, g = c === void 0 ? "Not Found" : c, m = e.onClear, S = e.mode, w = e.disabled, h = e.loading, I = e.getInputElement, y = e.getRawInputElement, T = e.open, p = e.defaultOpen, E = e.onDropdownVisibleChange, z = e.activeValue, V = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, A = e.autoClearSearchValue, U = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, ne = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, x = e.OptionList, M = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, ye = e.dropdownRender, ge = e.dropdownAlign, Re = e.placement, ce = e.builtinPlacements, pe = e.getPopupContainer, R = e.showAction, C = R === void 0 ? [] : R, D = e.onFocus, K = e.onBlur, $ = e.onKeyUp, F = e.onKeyDown, le = e.onMouseDown, me = Cn(e, So), re = An(S), we = (l !== void 0 ? l : re) || S === "combobox", ze = ee({}, me);
|
|
610
|
-
wo.forEach(function(ue) {
|
|
611
|
-
delete ze[ue];
|
|
612
|
-
}), f == null || f.forEach(function(ue) {
|
|
613
|
-
delete ze[ue];
|
|
614
|
-
});
|
|
615
|
-
var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1];
|
|
616
|
-
o.useEffect(function() {
|
|
617
|
-
Ge(Or());
|
|
618
|
-
}, []);
|
|
619
|
-
var Ye = o.useRef(null), Se = o.useRef(null), Oe = o.useRef(null), Ce = o.useRef(null), $e = o.useRef(null), Pe = o.useRef(!1), en = kr(), je = te(en, 3), Fe = je[0], Ie = je[1], hn = je[2];
|
|
620
|
-
o.useImperativeHandle(n, function() {
|
|
621
|
-
var ue, X;
|
|
622
|
-
return {
|
|
623
|
-
focus: (ue = Ce.current) === null || ue === void 0 ? void 0 : ue.focus,
|
|
624
|
-
blur: (X = Ce.current) === null || X === void 0 ? void 0 : X.blur,
|
|
625
|
-
scrollTo: function(Xe) {
|
|
626
|
-
var Le;
|
|
627
|
-
return (Le = $e.current) === null || Le === void 0 ? void 0 : Le.scrollTo(Xe);
|
|
628
|
-
},
|
|
629
|
-
nativeElement: Ye.current || Se.current
|
|
630
|
-
};
|
|
631
|
-
});
|
|
632
|
-
var Ae = o.useMemo(function() {
|
|
633
|
-
var ue;
|
|
634
|
-
if (S !== "combobox")
|
|
635
|
-
return _;
|
|
636
|
-
var X = (ue = v[0]) === null || ue === void 0 ? void 0 : ue.value;
|
|
637
|
-
return typeof X == "string" || typeof X == "number" ? String(X) : "";
|
|
638
|
-
}, [_, S, v]), _e = S === "combobox" && typeof I == "function" && I() || null, De = typeof y == "function" && y(), Nn = yr(Se, De == null || (t = De.props) === null || t === void 0 ? void 0 : t.ref), En = o.useState(!1), dn = te(En, 2), bn = dn[0], xn = dn[1];
|
|
639
|
-
Mn(function() {
|
|
640
|
-
xn(!0);
|
|
641
|
-
}, []);
|
|
642
|
-
var cn = Jn(!1, {
|
|
643
|
-
defaultValue: p,
|
|
644
|
-
value: T
|
|
645
|
-
}), Qe = te(cn, 2), fn = Qe[0], mn = Qe[1], Me = bn ? fn : !1, vn = !g && b;
|
|
646
|
-
(w || vn && Me && S === "combobox") && (Me = !1);
|
|
647
|
-
var an = vn ? !1 : Me, N = o.useCallback(function(ue) {
|
|
648
|
-
var X = ue !== void 0 ? ue : !Me;
|
|
649
|
-
w || (mn(X), Me !== X && (E == null || E(X)));
|
|
650
|
-
}, [w, Me, mn, E]), B = o.useMemo(function() {
|
|
651
|
-
return (G || []).some(function(ue) {
|
|
652
|
-
return [`
|
|
653
|
-
`, `\r
|
|
654
|
-
`].includes(ue);
|
|
655
|
-
});
|
|
656
|
-
}, [G]), L = o.useContext(dt) || {}, H = L.maxCount, oe = L.rawValues, be = function(X, Ke, Xe) {
|
|
657
|
-
if (!(re && et(H) && (oe == null ? void 0 : oe.size) >= H)) {
|
|
658
|
-
var Le = !0, Ve = X;
|
|
659
|
-
V == null || V(null);
|
|
660
|
-
var sn = ho(X, G, et(H) ? H - oe.size : void 0), ln = Xe ? null : sn;
|
|
661
|
-
return S !== "combobox" && ln && (Ve = "", Q == null || Q(ln), N(!1), Le = !1), U && Ae !== Ve && U(Ve, {
|
|
662
|
-
source: Ke ? "typing" : "effect"
|
|
663
|
-
}), Le;
|
|
664
|
-
}
|
|
665
|
-
}, Ze = function(X) {
|
|
666
|
-
!X || !X.trim() || U(X, {
|
|
667
|
-
source: "submit"
|
|
668
|
-
});
|
|
669
|
-
};
|
|
670
|
-
o.useEffect(function() {
|
|
671
|
-
!Me && !re && S !== "combobox" && be("", !1, !1);
|
|
672
|
-
}, [Me]), o.useEffect(function() {
|
|
673
|
-
fn && w && mn(!1), w && !Pe.current && Ie(!1);
|
|
674
|
-
}, [w]);
|
|
675
|
-
var We = Xt(), nn = te(We, 2), Ee = nn[0], tn = nn[1], Je = o.useRef(!1), Pn = function(X) {
|
|
676
|
-
var Ke = Ee(), Xe = X.key, Le = Xe === "Enter";
|
|
677
|
-
if (Le && (S !== "combobox" && X.preventDefault(), Me || N(!0)), tn(!!Ae), Xe === "Backspace" && !Ke && re && !Ae && v.length) {
|
|
678
|
-
for (var Ve = qe(v), sn = null, ln = Ve.length - 1; ln >= 0; ln -= 1) {
|
|
679
|
-
var wn = Ve[ln];
|
|
680
|
-
if (!wn.disabled) {
|
|
681
|
-
Ve.splice(ln, 1), sn = wn;
|
|
682
|
-
break;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
sn && s(Ve, {
|
|
686
|
-
type: "remove",
|
|
687
|
-
values: [sn]
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
for (var Rn = arguments.length, yn = new Array(Rn > 1 ? Rn - 1 : 0), zn = 1; zn < Rn; zn++)
|
|
691
|
-
yn[zn - 1] = arguments[zn];
|
|
692
|
-
if (Me && (!Le || !Je.current)) {
|
|
693
|
-
var Bn;
|
|
694
|
-
Le && (Je.current = !0), (Bn = $e.current) === null || Bn === void 0 || Bn.onKeyDown.apply(Bn, [X].concat(yn));
|
|
695
|
-
}
|
|
696
|
-
F == null || F.apply(void 0, [X].concat(yn));
|
|
697
|
-
}, Hn = function(X) {
|
|
698
|
-
for (var Ke = arguments.length, Xe = new Array(Ke > 1 ? Ke - 1 : 0), Le = 1; Le < Ke; Le++)
|
|
699
|
-
Xe[Le - 1] = arguments[Le];
|
|
700
|
-
if (Me) {
|
|
701
|
-
var Ve;
|
|
702
|
-
(Ve = $e.current) === null || Ve === void 0 || Ve.onKeyUp.apply(Ve, [X].concat(Xe));
|
|
703
|
-
}
|
|
704
|
-
X.key === "Enter" && (Je.current = !1), $ == null || $.apply(void 0, [X].concat(Xe));
|
|
705
|
-
}, rn = function(X) {
|
|
706
|
-
var Ke = v.filter(function(Xe) {
|
|
707
|
-
return Xe !== X;
|
|
708
|
-
});
|
|
709
|
-
s(Ke, {
|
|
710
|
-
type: "remove",
|
|
711
|
-
values: [X]
|
|
712
|
-
});
|
|
713
|
-
}, ke = function() {
|
|
714
|
-
Je.current = !1;
|
|
715
|
-
}, P = o.useRef(!1), O = function() {
|
|
716
|
-
Ie(!0), w || (D && !P.current && D.apply(void 0, arguments), C.includes("focus") && N(!0)), P.current = !0;
|
|
717
|
-
}, k = function() {
|
|
718
|
-
Pe.current = !0, Ie(!1, function() {
|
|
719
|
-
P.current = !1, Pe.current = !1, N(!1);
|
|
720
|
-
}), !w && (Ae && (S === "tags" ? U(Ae, {
|
|
721
|
-
source: "submit"
|
|
722
|
-
}) : S === "multiple" && U("", {
|
|
723
|
-
source: "blur"
|
|
724
|
-
})), K && K.apply(void 0, arguments));
|
|
725
|
-
}, ve = [];
|
|
726
|
-
o.useEffect(function() {
|
|
727
|
-
return function() {
|
|
728
|
-
ve.forEach(function(ue) {
|
|
729
|
-
return clearTimeout(ue);
|
|
730
|
-
}), ve.splice(0, ve.length);
|
|
731
|
-
};
|
|
732
|
-
}, []);
|
|
733
|
-
var Te = function(X) {
|
|
734
|
-
var Ke, Xe = X.target, Le = (Ke = Oe.current) === null || Ke === void 0 ? void 0 : Ke.getPopupElement();
|
|
735
|
-
if (Le && Le.contains(Xe)) {
|
|
736
|
-
var Ve = setTimeout(function() {
|
|
737
|
-
var Rn = ve.indexOf(Ve);
|
|
738
|
-
if (Rn !== -1 && ve.splice(Rn, 1), hn(), !de && !Le.contains(document.activeElement)) {
|
|
739
|
-
var yn;
|
|
740
|
-
(yn = Ce.current) === null || yn === void 0 || yn.focus();
|
|
741
|
-
}
|
|
742
|
-
});
|
|
743
|
-
ve.push(Ve);
|
|
744
|
-
}
|
|
745
|
-
for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0), wn = 1; wn < sn; wn++)
|
|
746
|
-
ln[wn - 1] = arguments[wn];
|
|
747
|
-
le == null || le.apply(void 0, [X].concat(ln));
|
|
748
|
-
}, $n = o.useState({}), Sn = te($n, 2), Kn = Sn[1];
|
|
749
|
-
function Xn() {
|
|
750
|
-
Kn({});
|
|
751
|
-
}
|
|
752
|
-
var _n;
|
|
753
|
-
De && (_n = function(X) {
|
|
754
|
-
N(X);
|
|
755
|
-
}), eo(function() {
|
|
756
|
-
var ue;
|
|
757
|
-
return [Ye.current, (ue = Oe.current) === null || ue === void 0 ? void 0 : ue.getPopupElement()];
|
|
758
|
-
}, an, N, !!De);
|
|
759
|
-
var Tn = o.useMemo(function() {
|
|
760
|
-
return ee(ee({}, e), {}, {
|
|
761
|
-
notFoundContent: g,
|
|
762
|
-
open: Me,
|
|
763
|
-
triggerOpen: an,
|
|
764
|
-
id: r,
|
|
765
|
-
showSearch: we,
|
|
766
|
-
multiple: re,
|
|
767
|
-
toggleOpen: N
|
|
768
|
-
});
|
|
769
|
-
}, [e, g, an, Me, r, we, re, N]), pt = !!Z || h, ht;
|
|
770
|
-
pt && (ht = /* @__PURE__ */ o.createElement(Wn, {
|
|
771
|
-
className: Be("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), h)),
|
|
772
|
-
customizeIcon: Z,
|
|
773
|
-
customizeIconProps: {
|
|
774
|
-
loading: h,
|
|
775
|
-
searchValue: Ae,
|
|
776
|
-
open: Me,
|
|
777
|
-
focused: Fe,
|
|
778
|
-
showSearch: we
|
|
779
|
-
}
|
|
780
|
-
}));
|
|
781
|
-
var sr = function() {
|
|
782
|
-
var X;
|
|
783
|
-
m == null || m(), (X = Ce.current) === null || X === void 0 || X.focus(), s([], {
|
|
784
|
-
type: "clear",
|
|
785
|
-
values: v
|
|
786
|
-
}), be("", !1, !1);
|
|
787
|
-
}, bt = Zr(a, sr, v, j, Y, w, Ae, S), dr = bt.allowClear, fr = bt.clearIcon, mr = /* @__PURE__ */ o.createElement(x, {
|
|
788
|
-
ref: $e
|
|
789
|
-
}), vr = Be(a, i, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), Fe), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), pt), "".concat(a, "-disabled"), w), "".concat(a, "-loading"), h), "".concat(a, "-open"), Me), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), we)), St = /* @__PURE__ */ o.createElement(Yt, {
|
|
790
|
-
ref: Oe,
|
|
791
|
-
disabled: w,
|
|
792
|
-
prefixCls: a,
|
|
793
|
-
visible: an,
|
|
794
|
-
popupElement: mr,
|
|
795
|
-
animation: M,
|
|
796
|
-
transitionName: fe,
|
|
797
|
-
dropdownStyle: ie,
|
|
798
|
-
dropdownClassName: J,
|
|
799
|
-
direction: d,
|
|
800
|
-
dropdownMatchSelectWidth: se,
|
|
801
|
-
dropdownRender: ye,
|
|
802
|
-
dropdownAlign: ge,
|
|
803
|
-
placement: Re,
|
|
804
|
-
builtinPlacements: ce,
|
|
805
|
-
getPopupContainer: pe,
|
|
806
|
-
empty: b,
|
|
807
|
-
getTriggerDOMNode: function(X) {
|
|
808
|
-
return (
|
|
809
|
-
// TODO: This is workaround and should be removed in `rc-select`
|
|
810
|
-
// And use new standard `nativeElement` for ref.
|
|
811
|
-
// But we should update `rc-resize-observer` first.
|
|
812
|
-
Se.current || X
|
|
813
|
-
);
|
|
814
|
-
},
|
|
815
|
-
onPopupVisibleChange: _n,
|
|
816
|
-
onPopupMouseEnter: Xn
|
|
817
|
-
}, De ? /* @__PURE__ */ o.cloneElement(De, {
|
|
818
|
-
ref: Nn
|
|
819
|
-
}) : /* @__PURE__ */ o.createElement(Gt, on({}, e, {
|
|
820
|
-
domRef: Se,
|
|
821
|
-
prefixCls: a,
|
|
822
|
-
inputElement: _e,
|
|
823
|
-
ref: Ce,
|
|
824
|
-
id: r,
|
|
825
|
-
prefix: ne,
|
|
826
|
-
showSearch: we,
|
|
827
|
-
autoClearSearchValue: A,
|
|
828
|
-
mode: S,
|
|
829
|
-
activeDescendantId: q,
|
|
830
|
-
tagRender: u,
|
|
831
|
-
values: v,
|
|
832
|
-
open: Me,
|
|
833
|
-
onToggleOpen: N,
|
|
834
|
-
activeValue: z,
|
|
835
|
-
searchValue: Ae,
|
|
836
|
-
onSearch: be,
|
|
837
|
-
onSearchSubmit: Ze,
|
|
838
|
-
onRemove: rn,
|
|
839
|
-
tokenWithEnter: B,
|
|
840
|
-
onInputBlur: ke
|
|
841
|
-
}))), Un;
|
|
842
|
-
return De ? Un = St : Un = /* @__PURE__ */ o.createElement("div", on({
|
|
843
|
-
className: vr
|
|
844
|
-
}, ze, {
|
|
845
|
-
ref: Ye,
|
|
846
|
-
onMouseDown: Te,
|
|
847
|
-
onKeyDown: Pn,
|
|
848
|
-
onKeyUp: Hn,
|
|
849
|
-
onFocus: O,
|
|
850
|
-
onBlur: k
|
|
851
|
-
}), /* @__PURE__ */ o.createElement(bo, {
|
|
852
|
-
visible: Fe && !Me,
|
|
853
|
-
values: v
|
|
854
|
-
}), St, ht, dr && fr), /* @__PURE__ */ o.createElement(Kt.Provider, {
|
|
855
|
-
value: Tn
|
|
856
|
-
}, Un);
|
|
857
|
-
});
|
|
858
|
-
process.env.NODE_ENV !== "production" && (Qt.displayName = "BaseSelect");
|
|
859
|
-
var ft = function() {
|
|
860
|
-
return null;
|
|
861
|
-
};
|
|
862
|
-
ft.isSelectOptGroup = !0;
|
|
863
|
-
var mt = function() {
|
|
864
|
-
return null;
|
|
865
|
-
};
|
|
866
|
-
mt.isSelectOption = !0;
|
|
867
|
-
var Zt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
868
|
-
var t = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {}, b = {
|
|
869
|
-
display: "flex",
|
|
870
|
-
flexDirection: "column"
|
|
871
|
-
};
|
|
872
|
-
return r !== void 0 && (s = {
|
|
873
|
-
height: t,
|
|
874
|
-
position: "relative",
|
|
875
|
-
overflow: "hidden"
|
|
876
|
-
}, b = ee(ee({}, b), {}, ae(ae(ae(ae(ae({
|
|
877
|
-
transform: "translateY(".concat(r, "px)")
|
|
878
|
-
}, f ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
|
|
879
|
-
style: s
|
|
880
|
-
}, /* @__PURE__ */ o.createElement(Wt, {
|
|
881
|
-
onResize: function(g) {
|
|
882
|
-
var m = g.offsetHeight;
|
|
883
|
-
m && u && u();
|
|
884
|
-
}
|
|
885
|
-
}, /* @__PURE__ */ o.createElement("div", on({
|
|
886
|
-
style: b,
|
|
887
|
-
className: Be(ae({}, "".concat(l, "-holder-inner"), l)),
|
|
888
|
-
ref: n
|
|
889
|
-
}, d), i, v)));
|
|
890
|
-
});
|
|
891
|
-
Zt.displayName = "Filler";
|
|
892
|
-
function yo(e) {
|
|
893
|
-
var n = e.children, t = e.setRef, r = o.useCallback(function(a) {
|
|
894
|
-
t(a);
|
|
895
|
-
}, []);
|
|
896
|
-
return /* @__PURE__ */ o.cloneElement(n, {
|
|
897
|
-
ref: r
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
function Co(e, n, t, r, a, i, l, u) {
|
|
901
|
-
var d = u.getKey;
|
|
902
|
-
return e.slice(n, t + 1).map(function(f, v) {
|
|
903
|
-
var s = n + v, b = l(f, s, {
|
|
904
|
-
style: {
|
|
905
|
-
width: r
|
|
906
|
-
},
|
|
907
|
-
offsetX: a
|
|
908
|
-
}), c = d(f);
|
|
909
|
-
return /* @__PURE__ */ o.createElement(yo, {
|
|
910
|
-
key: c,
|
|
911
|
-
setRef: function(m) {
|
|
912
|
-
return i(f, m);
|
|
913
|
-
}
|
|
914
|
-
}, b);
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
function Io(e, n, t) {
|
|
918
|
-
var r = e.length, a = n.length, i, l;
|
|
919
|
-
if (r === 0 && a === 0)
|
|
920
|
-
return null;
|
|
921
|
-
r < a ? (i = e, l = n) : (i = n, l = e);
|
|
922
|
-
var u = {
|
|
923
|
-
__EMPTY_ITEM__: !0
|
|
924
|
-
};
|
|
925
|
-
function d(g) {
|
|
926
|
-
return g !== void 0 ? t(g) : u;
|
|
927
|
-
}
|
|
928
|
-
for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s < l.length; s += 1) {
|
|
929
|
-
var b = d(i[s]), c = d(l[s]);
|
|
930
|
-
if (b !== c) {
|
|
931
|
-
f = s, v = v || b !== d(l[s + 1]);
|
|
932
|
-
break;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
return f === null ? null : {
|
|
936
|
-
index: f,
|
|
937
|
-
multiple: v
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
function Eo(e, n, t) {
|
|
941
|
-
var r = o.useState(e), a = te(r, 2), i = a[0], l = a[1], u = o.useState(null), d = te(u, 2), f = d[0], v = d[1];
|
|
942
|
-
return o.useEffect(function() {
|
|
943
|
-
var s = Io(i || [], e, n);
|
|
944
|
-
(s == null ? void 0 : s.index) !== void 0 && v(e[s.index]), l(e);
|
|
945
|
-
}, [e]), [f];
|
|
946
|
-
}
|
|
947
|
-
var Ot = (typeof navigator > "u" ? "undefined" : pn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
948
|
-
const Jt = function(e, n, t, r) {
|
|
949
|
-
var a = he(!1), i = he(null);
|
|
950
|
-
function l() {
|
|
951
|
-
clearTimeout(i.current), a.current = !0, i.current = setTimeout(function() {
|
|
952
|
-
a.current = !1;
|
|
953
|
-
}, 50);
|
|
954
|
-
}
|
|
955
|
-
var u = he({
|
|
956
|
-
top: e,
|
|
957
|
-
bottom: n,
|
|
958
|
-
left: t,
|
|
959
|
-
right: r
|
|
960
|
-
});
|
|
961
|
-
return u.current.top = e, u.current.bottom = n, u.current.left = t, u.current.right = r, function(d, f) {
|
|
962
|
-
var v = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = d ? (
|
|
963
|
-
// Pass origin wheel when on the left
|
|
964
|
-
f < 0 && u.current.left || // Pass origin wheel when on the right
|
|
965
|
-
f > 0 && u.current.right
|
|
966
|
-
) : f < 0 && u.current.top || // Pass origin wheel when on the bottom
|
|
967
|
-
f > 0 && u.current.bottom;
|
|
968
|
-
return v && s ? (clearTimeout(i.current), a.current = !1) : (!s || a.current) && l(), !a.current && s;
|
|
969
|
-
};
|
|
970
|
-
};
|
|
971
|
-
function xo(e, n, t, r, a, i, l) {
|
|
972
|
-
var u = he(0), d = he(null), f = he(null), v = he(!1), s = Jt(n, t, r, a);
|
|
973
|
-
function b(h, I) {
|
|
974
|
-
if (un.cancel(d.current), !s(!1, I)) {
|
|
975
|
-
var y = h;
|
|
976
|
-
if (!y._virtualHandled)
|
|
977
|
-
y._virtualHandled = !0;
|
|
978
|
-
else
|
|
979
|
-
return;
|
|
980
|
-
u.current += I, f.current = I, Ot || y.preventDefault(), d.current = un(function() {
|
|
981
|
-
var T = v.current ? 10 : 1;
|
|
982
|
-
l(u.current * T, !1), u.current = 0;
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
function c(h, I) {
|
|
987
|
-
l(I, !0), Ot || h.preventDefault();
|
|
988
|
-
}
|
|
989
|
-
var g = he(null), m = he(null);
|
|
990
|
-
function S(h) {
|
|
991
|
-
if (e) {
|
|
992
|
-
un.cancel(m.current), m.current = un(function() {
|
|
993
|
-
g.current = null;
|
|
994
|
-
}, 2);
|
|
995
|
-
var I = h.deltaX, y = h.deltaY, T = h.shiftKey, p = I, E = y;
|
|
996
|
-
(g.current === "sx" || !g.current && T && y && !I) && (p = y, E = 0, g.current = "sx");
|
|
997
|
-
var z = Math.abs(p), V = Math.abs(E);
|
|
998
|
-
g.current === null && (g.current = i && z > V ? "x" : "y"), g.current === "y" ? b(h, E) : c(h, p);
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
function w(h) {
|
|
1002
|
-
e && (v.current = h.detail === f.current);
|
|
1003
|
-
}
|
|
1004
|
-
return [S, w];
|
|
1005
|
-
}
|
|
1006
|
-
function $o(e, n, t, r) {
|
|
1007
|
-
var a = o.useMemo(function() {
|
|
1008
|
-
return [/* @__PURE__ */ new Map(), []];
|
|
1009
|
-
}, [e, t.id, r]), i = te(a, 2), l = i[0], u = i[1], d = function(v) {
|
|
1010
|
-
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v, b = l.get(v), c = l.get(s);
|
|
1011
|
-
if (b === void 0 || c === void 0)
|
|
1012
|
-
for (var g = e.length, m = u.length; m < g; m += 1) {
|
|
1013
|
-
var S, w = e[m], h = n(w);
|
|
1014
|
-
l.set(h, m);
|
|
1015
|
-
var I = (S = t.get(h)) !== null && S !== void 0 ? S : r;
|
|
1016
|
-
if (u[m] = (u[m - 1] || 0) + I, h === v && (b = m), h === s && (c = m), b !== void 0 && c !== void 0)
|
|
1017
|
-
break;
|
|
1018
|
-
}
|
|
1019
|
-
return {
|
|
1020
|
-
top: u[b - 1] || 0,
|
|
1021
|
-
bottom: u[c]
|
|
1022
|
-
};
|
|
1023
|
-
};
|
|
1024
|
-
return d;
|
|
1025
|
-
}
|
|
1026
|
-
var Ro = /* @__PURE__ */ function() {
|
|
1027
|
-
function e() {
|
|
1028
|
-
Ir(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
|
|
1029
|
-
}
|
|
1030
|
-
return Cr(e, [{
|
|
1031
|
-
key: "set",
|
|
1032
|
-
value: function(t, r) {
|
|
1033
|
-
this.maps[t] = r, this.id += 1, this.diffKeys.add(t);
|
|
1034
|
-
}
|
|
1035
|
-
}, {
|
|
1036
|
-
key: "get",
|
|
1037
|
-
value: function(t) {
|
|
1038
|
-
return this.maps[t];
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* CacheMap will record the key changed.
|
|
1042
|
-
* To help to know what's update in the next render.
|
|
1043
|
-
*/
|
|
1044
|
-
}, {
|
|
1045
|
-
key: "resetRecord",
|
|
1046
|
-
value: function() {
|
|
1047
|
-
this.diffKeys.clear();
|
|
1048
|
-
}
|
|
1049
|
-
}, {
|
|
1050
|
-
key: "getRecord",
|
|
1051
|
-
value: function() {
|
|
1052
|
-
return this.diffKeys;
|
|
1053
|
-
}
|
|
1054
|
-
}]), e;
|
|
1055
|
-
}();
|
|
1056
|
-
function Mt(e) {
|
|
1057
|
-
var n = parseFloat(e);
|
|
1058
|
-
return isNaN(n) ? 0 : n;
|
|
1059
|
-
}
|
|
1060
|
-
function Oo(e, n, t) {
|
|
1061
|
-
var r = o.useState(0), a = te(r, 2), i = a[0], l = a[1], u = he(/* @__PURE__ */ new Map()), d = he(new Ro()), f = he(0);
|
|
1062
|
-
function v() {
|
|
1063
|
-
f.current += 1;
|
|
1064
|
-
}
|
|
1065
|
-
function s() {
|
|
1066
|
-
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1067
|
-
v();
|
|
1068
|
-
var g = function() {
|
|
1069
|
-
var w = !1;
|
|
1070
|
-
u.current.forEach(function(h, I) {
|
|
1071
|
-
if (h && h.offsetParent) {
|
|
1072
|
-
var y = Er(h), T = y.offsetHeight, p = getComputedStyle(y), E = p.marginTop, z = p.marginBottom, V = Mt(E), q = Mt(z), _ = T + V + q;
|
|
1073
|
-
d.current.get(I) !== _ && (d.current.set(I, _), w = !0);
|
|
1074
|
-
}
|
|
1075
|
-
}), w && l(function(h) {
|
|
1076
|
-
return h + 1;
|
|
1077
|
-
});
|
|
1078
|
-
};
|
|
1079
|
-
if (c)
|
|
1080
|
-
g();
|
|
1081
|
-
else {
|
|
1082
|
-
f.current += 1;
|
|
1083
|
-
var m = f.current;
|
|
1084
|
-
Promise.resolve().then(function() {
|
|
1085
|
-
m === f.current && g();
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
function b(c, g) {
|
|
1090
|
-
var m = e(c);
|
|
1091
|
-
u.current.get(m), g ? (u.current.set(m, g), s()) : u.current.delete(m);
|
|
1092
|
-
}
|
|
1093
|
-
return Qn(function() {
|
|
1094
|
-
return v;
|
|
1095
|
-
}, []), [b, s, d.current, i];
|
|
1096
|
-
}
|
|
1097
|
-
var Dt = 14 / 15;
|
|
1098
|
-
function Mo(e, n, t) {
|
|
1099
|
-
var r = he(!1), a = he(0), i = he(0), l = he(null), u = he(null), d, f = function(c) {
|
|
1100
|
-
if (r.current) {
|
|
1101
|
-
var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, w = i.current - m, h = Math.abs(S) > Math.abs(w);
|
|
1102
|
-
h ? a.current = g : i.current = m;
|
|
1103
|
-
var I = t(h, h ? S : w, !1, c);
|
|
1104
|
-
I && c.preventDefault(), clearInterval(u.current), I && (u.current = setInterval(function() {
|
|
1105
|
-
h ? S *= Dt : w *= Dt;
|
|
1106
|
-
var y = Math.floor(h ? S : w);
|
|
1107
|
-
(!t(h, y, !0) || Math.abs(y) <= 0.1) && clearInterval(u.current);
|
|
1108
|
-
}, 16));
|
|
1109
|
-
}
|
|
1110
|
-
}, v = function() {
|
|
1111
|
-
r.current = !1, d();
|
|
1112
|
-
}, s = function(c) {
|
|
1113
|
-
d(), c.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(c.touches[0].pageX), i.current = Math.ceil(c.touches[0].pageY), l.current = c.target, l.current.addEventListener("touchmove", f, {
|
|
1114
|
-
passive: !1
|
|
1115
|
-
}), l.current.addEventListener("touchend", v, {
|
|
1116
|
-
passive: !0
|
|
1117
|
-
}));
|
|
1118
|
-
};
|
|
1119
|
-
d = function() {
|
|
1120
|
-
l.current && (l.current.removeEventListener("touchmove", f), l.current.removeEventListener("touchend", v));
|
|
1121
|
-
}, Mn(function() {
|
|
1122
|
-
return e && n.current.addEventListener("touchstart", s, {
|
|
1123
|
-
passive: !0
|
|
1124
|
-
}), function() {
|
|
1125
|
-
var b;
|
|
1126
|
-
(b = n.current) === null || b === void 0 || b.removeEventListener("touchstart", s), d(), clearInterval(u.current);
|
|
1127
|
-
};
|
|
1128
|
-
}, [e]);
|
|
1129
|
-
}
|
|
1130
|
-
function Nt(e) {
|
|
1131
|
-
return Math.floor(Math.pow(e, 0.5));
|
|
1132
|
-
}
|
|
1133
|
-
function tt(e, n) {
|
|
1134
|
-
var t = "touches" in e ? e.touches[0] : e;
|
|
1135
|
-
return t[n ? "pageX" : "pageY"] - window[n ? "scrollX" : "scrollY"];
|
|
1136
|
-
}
|
|
1137
|
-
function Do(e, n, t) {
|
|
1138
|
-
o.useEffect(function() {
|
|
1139
|
-
var r = n.current;
|
|
1140
|
-
if (e && r) {
|
|
1141
|
-
var a = !1, i, l, u = function() {
|
|
1142
|
-
un.cancel(i);
|
|
1143
|
-
}, d = function b() {
|
|
1144
|
-
u(), i = un(function() {
|
|
1145
|
-
t(l), b();
|
|
1146
|
-
});
|
|
1147
|
-
}, f = function(c) {
|
|
1148
|
-
var g = c;
|
|
1149
|
-
g._virtualHandled || (g._virtualHandled = !0, a = !0);
|
|
1150
|
-
}, v = function() {
|
|
1151
|
-
a = !1, u();
|
|
1152
|
-
}, s = function(c) {
|
|
1153
|
-
if (a) {
|
|
1154
|
-
var g = tt(c, !1), m = r.getBoundingClientRect(), S = m.top, w = m.bottom;
|
|
1155
|
-
if (g <= S) {
|
|
1156
|
-
var h = S - g;
|
|
1157
|
-
l = -Nt(h), d();
|
|
1158
|
-
} else if (g >= w) {
|
|
1159
|
-
var I = g - w;
|
|
1160
|
-
l = Nt(I), d();
|
|
1161
|
-
} else
|
|
1162
|
-
u();
|
|
1163
|
-
}
|
|
1164
|
-
};
|
|
1165
|
-
return r.addEventListener("mousedown", f), r.ownerDocument.addEventListener("mouseup", v), r.ownerDocument.addEventListener("mousemove", s), function() {
|
|
1166
|
-
r.removeEventListener("mousedown", f), r.ownerDocument.removeEventListener("mouseup", v), r.ownerDocument.removeEventListener("mousemove", s), u();
|
|
1167
|
-
};
|
|
1168
|
-
}
|
|
1169
|
-
}, [e]);
|
|
1170
|
-
}
|
|
1171
|
-
var Pt = 10;
|
|
1172
|
-
function No(e, n, t, r, a, i, l, u) {
|
|
1173
|
-
var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0], b = v[1];
|
|
1174
|
-
return Mn(function() {
|
|
1175
|
-
if (s && s.times < Pt) {
|
|
1176
|
-
if (!e.current) {
|
|
1177
|
-
b(function(Y) {
|
|
1178
|
-
return ee({}, Y);
|
|
1179
|
-
});
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
i();
|
|
1183
|
-
var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, w = e.current.clientHeight, h = !1, I = c, y = null;
|
|
1184
|
-
if (w) {
|
|
1185
|
-
for (var T = c || g, p = 0, E = 0, z = 0, V = Math.min(n.length - 1, m), q = 0; q <= V; q += 1) {
|
|
1186
|
-
var _ = a(n[q]);
|
|
1187
|
-
E = p;
|
|
1188
|
-
var A = t.get(_);
|
|
1189
|
-
z = E + (A === void 0 ? r : A), p = z;
|
|
1190
|
-
}
|
|
1191
|
-
for (var U = T === "top" ? S : w - S, Q = V; Q >= 0; Q -= 1) {
|
|
1192
|
-
var G = a(n[Q]), j = t.get(G);
|
|
1193
|
-
if (j === void 0) {
|
|
1194
|
-
h = !0;
|
|
1195
|
-
break;
|
|
1196
|
-
}
|
|
1197
|
-
if (U -= j, U <= 0)
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
switch (T) {
|
|
1201
|
-
case "top":
|
|
1202
|
-
y = E - S;
|
|
1203
|
-
break;
|
|
1204
|
-
case "bottom":
|
|
1205
|
-
y = z - w + S;
|
|
1206
|
-
break;
|
|
1207
|
-
default: {
|
|
1208
|
-
var ne = e.current.scrollTop, Z = ne + w;
|
|
1209
|
-
E < ne ? I = "top" : z > Z && (I = "bottom");
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
y !== null && l(y), y !== s.lastTop && (h = !0);
|
|
1213
|
-
}
|
|
1214
|
-
h && b(ee(ee({}, s), {}, {
|
|
1215
|
-
times: s.times + 1,
|
|
1216
|
-
targetAlign: I,
|
|
1217
|
-
lastTop: y
|
|
1218
|
-
}));
|
|
1219
|
-
} else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === Pt && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
|
|
1220
|
-
}, [s, e.current]), function(c) {
|
|
1221
|
-
if (c == null) {
|
|
1222
|
-
u();
|
|
1223
|
-
return;
|
|
1224
|
-
}
|
|
1225
|
-
if (un.cancel(d.current), typeof c == "number")
|
|
1226
|
-
l(c);
|
|
1227
|
-
else if (c && pn(c) === "object") {
|
|
1228
|
-
var g, m = c.align;
|
|
1229
|
-
"index" in c ? g = c.index : g = n.findIndex(function(h) {
|
|
1230
|
-
return a(h) === c.key;
|
|
1231
|
-
});
|
|
1232
|
-
var S = c.offset, w = S === void 0 ? 0 : S;
|
|
1233
|
-
b({
|
|
1234
|
-
times: 0,
|
|
1235
|
-
index: g,
|
|
1236
|
-
offset: w,
|
|
1237
|
-
originAlign: m
|
|
1238
|
-
});
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
}
|
|
1242
|
-
var rt = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1243
|
-
var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize, b = e.style, c = e.thumbStyle, g = e.showScrollBar, m = o.useState(!1), S = te(m, 2), w = S[0], h = S[1], I = o.useState(null), y = te(I, 2), T = y[0], p = y[1], E = o.useState(null), z = te(E, 2), V = z[0], q = z[1], _ = !r, A = o.useRef(), U = o.useRef(), Q = o.useState(g), G = te(Q, 2), j = G[0], ne = G[1], Z = o.useRef(), Y = function() {
|
|
1244
|
-
g === !0 || g === !1 || (clearTimeout(Z.current), ne(!0), Z.current = setTimeout(function() {
|
|
1245
|
-
ne(!1);
|
|
1246
|
-
}, 3e3));
|
|
1247
|
-
}, x = i - s || 0, M = s - v || 0, fe = o.useMemo(function() {
|
|
1248
|
-
if (a === 0 || x === 0)
|
|
1249
|
-
return 0;
|
|
1250
|
-
var R = a / x;
|
|
1251
|
-
return R * M;
|
|
1252
|
-
}, [a, x, M]), ie = function(C) {
|
|
1253
|
-
C.stopPropagation(), C.preventDefault();
|
|
1254
|
-
}, J = o.useRef({
|
|
1255
|
-
top: fe,
|
|
1256
|
-
dragging: w,
|
|
1257
|
-
pageY: T,
|
|
1258
|
-
startTop: V
|
|
1259
|
-
});
|
|
1260
|
-
J.current = {
|
|
1261
|
-
top: fe,
|
|
1262
|
-
dragging: w,
|
|
1263
|
-
pageY: T,
|
|
1264
|
-
startTop: V
|
|
1265
|
-
};
|
|
1266
|
-
var se = function(C) {
|
|
1267
|
-
h(!0), p(tt(C, f)), q(J.current.top), l(), C.stopPropagation(), C.preventDefault();
|
|
1268
|
-
};
|
|
1269
|
-
o.useEffect(function() {
|
|
1270
|
-
var R = function($) {
|
|
1271
|
-
$.preventDefault();
|
|
1272
|
-
}, C = A.current, D = U.current;
|
|
1273
|
-
return C.addEventListener("touchstart", R, {
|
|
1274
|
-
passive: !1
|
|
1275
|
-
}), D.addEventListener("touchstart", se, {
|
|
1276
|
-
passive: !1
|
|
1277
|
-
}), function() {
|
|
1278
|
-
C.removeEventListener("touchstart", R), D.removeEventListener("touchstart", se);
|
|
1279
|
-
};
|
|
1280
|
-
}, []);
|
|
1281
|
-
var ye = o.useRef();
|
|
1282
|
-
ye.current = x;
|
|
1283
|
-
var ge = o.useRef();
|
|
1284
|
-
ge.current = M, o.useEffect(function() {
|
|
1285
|
-
if (w) {
|
|
1286
|
-
var R, C = function($) {
|
|
1287
|
-
var F = J.current, le = F.dragging, me = F.pageY, re = F.startTop;
|
|
1288
|
-
un.cancel(R);
|
|
1289
|
-
var we = A.current.getBoundingClientRect(), ze = s / (f ? we.width : we.height);
|
|
1290
|
-
if (le) {
|
|
1291
|
-
var xe = (tt($, f) - me) * ze, Ne = re;
|
|
1292
|
-
!_ && f ? Ne -= xe : Ne += xe;
|
|
1293
|
-
var de = ye.current, Ge = ge.current, Ye = Ge ? Ne / Ge : 0, Se = Math.ceil(Ye * de);
|
|
1294
|
-
Se = Math.max(Se, 0), Se = Math.min(Se, de), R = un(function() {
|
|
1295
|
-
d(Se, f);
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
|
-
}, D = function() {
|
|
1299
|
-
h(!1), u();
|
|
1300
|
-
};
|
|
1301
|
-
return window.addEventListener("mousemove", C, {
|
|
1302
|
-
passive: !0
|
|
1303
|
-
}), window.addEventListener("touchmove", C, {
|
|
1304
|
-
passive: !0
|
|
1305
|
-
}), window.addEventListener("mouseup", D, {
|
|
1306
|
-
passive: !0
|
|
1307
|
-
}), window.addEventListener("touchend", D, {
|
|
1308
|
-
passive: !0
|
|
1309
|
-
}), function() {
|
|
1310
|
-
window.removeEventListener("mousemove", C), window.removeEventListener("touchmove", C), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), un.cancel(R);
|
|
1311
|
-
};
|
|
1312
|
-
}
|
|
1313
|
-
}, [w]), o.useEffect(function() {
|
|
1314
|
-
return Y(), function() {
|
|
1315
|
-
clearTimeout(Z.current);
|
|
1316
|
-
};
|
|
1317
|
-
}, [a]), o.useImperativeHandle(n, function() {
|
|
1318
|
-
return {
|
|
1319
|
-
delayHidden: Y
|
|
1320
|
-
};
|
|
1321
|
-
});
|
|
1322
|
-
var Re = "".concat(t, "-scrollbar"), ce = {
|
|
1323
|
-
position: "absolute",
|
|
1324
|
-
visibility: j ? null : "hidden"
|
|
1325
|
-
}, pe = {
|
|
1326
|
-
position: "absolute",
|
|
1327
|
-
background: "rgba(0, 0, 0, 0.5)",
|
|
1328
|
-
borderRadius: 99,
|
|
1329
|
-
cursor: "pointer",
|
|
1330
|
-
userSelect: "none"
|
|
1331
|
-
};
|
|
1332
|
-
return f ? (ce.height = 8, ce.left = 0, ce.right = 0, ce.bottom = 0, pe.height = "100%", pe.width = v, _ ? pe.left = fe : pe.right = fe) : (ce.width = 8, ce.top = 0, ce.bottom = 0, _ ? ce.right = 0 : ce.left = 0, pe.width = "100%", pe.height = v, pe.top = fe), /* @__PURE__ */ o.createElement("div", {
|
|
1333
|
-
ref: A,
|
|
1334
|
-
className: Be(Re, ae(ae(ae({}, "".concat(Re, "-horizontal"), f), "".concat(Re, "-vertical"), !f), "".concat(Re, "-visible"), j)),
|
|
1335
|
-
style: ee(ee({}, ce), b),
|
|
1336
|
-
onMouseDown: ie,
|
|
1337
|
-
onMouseMove: Y
|
|
1338
|
-
}, /* @__PURE__ */ o.createElement("div", {
|
|
1339
|
-
ref: U,
|
|
1340
|
-
className: Be("".concat(Re, "-thumb"), ae({}, "".concat(Re, "-thumb-moving"), w)),
|
|
1341
|
-
style: ee(ee({}, pe), c),
|
|
1342
|
-
onMouseDown: se
|
|
1343
|
-
}));
|
|
1344
|
-
});
|
|
1345
|
-
process.env.NODE_ENV !== "production" && (rt.displayName = "ScrollBar");
|
|
1346
|
-
var Po = 20;
|
|
1347
|
-
function _t() {
|
|
1348
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = e / n * e;
|
|
1349
|
-
return isNaN(t) && (t = 0), t = Math.max(t, Po), Math.floor(t);
|
|
1350
|
-
}
|
|
1351
|
-
var _o = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], To = [], Lo = {
|
|
1352
|
-
overflowY: "auto",
|
|
1353
|
-
overflowAnchor: "none"
|
|
1354
|
-
};
|
|
1355
|
-
function Ho(e, n) {
|
|
1356
|
-
var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, i = e.height, l = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children, b = e.itemKey, c = e.virtual, g = e.direction, m = e.scrollWidth, S = e.component, w = S === void 0 ? "div" : S, h = e.onScroll, I = e.onVirtualScroll, y = e.onVisibleChange, T = e.innerProps, p = e.extraRender, E = e.styles, z = e.showScrollBar, V = z === void 0 ? "optional" : z, q = Cn(e, _o), _ = o.useCallback(function(P) {
|
|
1357
|
-
return typeof b == "function" ? b(P) : P == null ? void 0 : P[b];
|
|
1358
|
-
}, [b]), A = Oo(_), U = te(A, 4), Q = U[0], G = U[1], j = U[2], ne = U[3], Z = !!(c !== !1 && i && l), Y = o.useMemo(function() {
|
|
1359
|
-
return Object.values(j.maps).reduce(function(P, O) {
|
|
1360
|
-
return P + O;
|
|
1361
|
-
}, 0);
|
|
1362
|
-
}, [j.id, j.maps]), x = Z && v && (Math.max(l * v.length, Y) > i || !!m), M = g === "rtl", fe = Be(r, ae({}, "".concat(r, "-rtl"), M), a), ie = v || To, J = he(), se = he(), ye = he(), ge = Ln(0), Re = te(ge, 2), ce = Re[0], pe = Re[1], R = Ln(0), C = te(R, 2), D = C[0], K = C[1], $ = Ln(!1), F = te($, 2), le = F[0], me = F[1], re = function() {
|
|
1363
|
-
me(!0);
|
|
1364
|
-
}, we = function() {
|
|
1365
|
-
me(!1);
|
|
1366
|
-
}, ze = {
|
|
1367
|
-
getKey: _
|
|
1368
|
-
};
|
|
1369
|
-
function xe(P) {
|
|
1370
|
-
pe(function(O) {
|
|
1371
|
-
var k;
|
|
1372
|
-
typeof P == "function" ? k = P(O) : k = P;
|
|
1373
|
-
var ve = xn(k);
|
|
1374
|
-
return J.current.scrollTop = ve, ve;
|
|
1375
|
-
});
|
|
1376
|
-
}
|
|
1377
|
-
var Ne = he({
|
|
1378
|
-
start: 0,
|
|
1379
|
-
end: ie.length
|
|
1380
|
-
}), de = he(), Ge = Eo(ie, _), Ye = te(Ge, 1), Se = Ye[0];
|
|
1381
|
-
de.current = Se;
|
|
1382
|
-
var Oe = o.useMemo(function() {
|
|
1383
|
-
if (!Z)
|
|
1384
|
-
return {
|
|
1385
|
-
scrollHeight: void 0,
|
|
1386
|
-
start: 0,
|
|
1387
|
-
end: ie.length - 1,
|
|
1388
|
-
offset: void 0
|
|
1389
|
-
};
|
|
1390
|
-
if (!x) {
|
|
1391
|
-
var P;
|
|
1392
|
-
return {
|
|
1393
|
-
scrollHeight: ((P = se.current) === null || P === void 0 ? void 0 : P.offsetHeight) || 0,
|
|
1394
|
-
start: 0,
|
|
1395
|
-
end: ie.length - 1,
|
|
1396
|
-
offset: void 0
|
|
1397
|
-
};
|
|
1398
|
-
}
|
|
1399
|
-
for (var O = 0, k, ve, Te, $n = ie.length, Sn = 0; Sn < $n; Sn += 1) {
|
|
1400
|
-
var Kn = ie[Sn], Xn = _(Kn), _n = j.get(Xn), Tn = O + (_n === void 0 ? l : _n);
|
|
1401
|
-
Tn >= ce && k === void 0 && (k = Sn, ve = O), Tn > ce + i && Te === void 0 && (Te = Sn), O = Tn;
|
|
1402
|
-
}
|
|
1403
|
-
return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(i / l)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
|
|
1404
|
-
scrollHeight: O,
|
|
1405
|
-
start: k,
|
|
1406
|
-
end: Te,
|
|
1407
|
-
offset: ve
|
|
1408
|
-
};
|
|
1409
|
-
}, [x, Z, ce, ie, ne, i]), Ce = Oe.scrollHeight, $e = Oe.start, Pe = Oe.end, en = Oe.offset;
|
|
1410
|
-
Ne.current.start = $e, Ne.current.end = Pe, o.useLayoutEffect(function() {
|
|
1411
|
-
var P = j.getRecord();
|
|
1412
|
-
if (P.size === 1) {
|
|
1413
|
-
var O = Array.from(P)[0], k = _(ie[$e]);
|
|
1414
|
-
if (k === O) {
|
|
1415
|
-
var ve = j.get(O), Te = ve - l;
|
|
1416
|
-
xe(function($n) {
|
|
1417
|
-
return $n + Te;
|
|
1418
|
-
});
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
j.resetRecord();
|
|
1422
|
-
}, [Ce]);
|
|
1423
|
-
var je = o.useState({
|
|
1424
|
-
width: 0,
|
|
1425
|
-
height: i
|
|
1426
|
-
}), Fe = te(je, 2), Ie = Fe[0], hn = Fe[1], Ae = function(O) {
|
|
1427
|
-
hn({
|
|
1428
|
-
width: O.offsetWidth,
|
|
1429
|
-
height: O.offsetHeight
|
|
1430
|
-
});
|
|
1431
|
-
}, _e = he(), De = he(), Nn = o.useMemo(function() {
|
|
1432
|
-
return _t(Ie.width, m);
|
|
1433
|
-
}, [Ie.width, m]), En = o.useMemo(function() {
|
|
1434
|
-
return _t(Ie.height, Ce);
|
|
1435
|
-
}, [Ie.height, Ce]), dn = Ce - i, bn = he(dn);
|
|
1436
|
-
bn.current = dn;
|
|
1437
|
-
function xn(P) {
|
|
1438
|
-
var O = P;
|
|
1439
|
-
return Number.isNaN(bn.current) || (O = Math.min(O, bn.current)), O = Math.max(O, 0), O;
|
|
1440
|
-
}
|
|
1441
|
-
var cn = ce <= 0, Qe = ce >= dn, fn = D <= 0, mn = D >= m, Me = Jt(cn, Qe, fn, mn), vn = function() {
|
|
1442
|
-
return {
|
|
1443
|
-
x: M ? -D : D,
|
|
1444
|
-
y: ce
|
|
1445
|
-
};
|
|
1446
|
-
}, an = he(vn()), N = yt(function(P) {
|
|
1447
|
-
if (I) {
|
|
1448
|
-
var O = ee(ee({}, vn()), P);
|
|
1449
|
-
(an.current.x !== O.x || an.current.y !== O.y) && (I(O), an.current = O);
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
function B(P, O) {
|
|
1453
|
-
var k = P;
|
|
1454
|
-
O ? (Ct.flushSync(function() {
|
|
1455
|
-
K(k);
|
|
1456
|
-
}), N()) : xe(k);
|
|
1457
|
-
}
|
|
1458
|
-
function L(P) {
|
|
1459
|
-
var O = P.currentTarget.scrollTop;
|
|
1460
|
-
O !== ce && xe(O), h == null || h(P), N();
|
|
1461
|
-
}
|
|
1462
|
-
var H = function(O) {
|
|
1463
|
-
var k = O, ve = m ? m - Ie.width : 0;
|
|
1464
|
-
return k = Math.max(k, 0), k = Math.min(k, ve), k;
|
|
1465
|
-
}, oe = yt(function(P, O) {
|
|
1466
|
-
O ? (Ct.flushSync(function() {
|
|
1467
|
-
K(function(k) {
|
|
1468
|
-
var ve = k + (M ? -P : P);
|
|
1469
|
-
return H(ve);
|
|
1470
|
-
});
|
|
1471
|
-
}), N()) : xe(function(k) {
|
|
1472
|
-
var ve = k + P;
|
|
1473
|
-
return ve;
|
|
1474
|
-
});
|
|
1475
|
-
}), be = xo(Z, cn, Qe, fn, mn, !!m, oe), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
|
|
1476
|
-
Mo(Z, J, function(P, O, k, ve) {
|
|
1477
|
-
var Te = ve;
|
|
1478
|
-
return Me(P, O, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), We({
|
|
1479
|
-
preventDefault: function() {
|
|
1480
|
-
},
|
|
1481
|
-
deltaX: P ? O : 0,
|
|
1482
|
-
deltaY: P ? 0 : O
|
|
1483
|
-
}), !0) : !1;
|
|
1484
|
-
}), Do(x, J, function(P) {
|
|
1485
|
-
xe(function(O) {
|
|
1486
|
-
return O + P;
|
|
1487
|
-
});
|
|
1488
|
-
}), Mn(function() {
|
|
1489
|
-
function P(k) {
|
|
1490
|
-
var ve = cn && k.detail < 0, Te = Qe && k.detail > 0;
|
|
1491
|
-
Z && !ve && !Te && k.preventDefault();
|
|
1492
|
-
}
|
|
1493
|
-
var O = J.current;
|
|
1494
|
-
return O.addEventListener("wheel", We, {
|
|
1495
|
-
passive: !1
|
|
1496
|
-
}), O.addEventListener("DOMMouseScroll", nn, {
|
|
1497
|
-
passive: !0
|
|
1498
|
-
}), O.addEventListener("MozMousePixelScroll", P, {
|
|
1499
|
-
passive: !1
|
|
1500
|
-
}), function() {
|
|
1501
|
-
O.removeEventListener("wheel", We), O.removeEventListener("DOMMouseScroll", nn), O.removeEventListener("MozMousePixelScroll", P);
|
|
1502
|
-
};
|
|
1503
|
-
}, [Z, cn, Qe]), Mn(function() {
|
|
1504
|
-
if (m) {
|
|
1505
|
-
var P = H(D);
|
|
1506
|
-
K(P), N({
|
|
1507
|
-
x: P
|
|
1508
|
-
});
|
|
1509
|
-
}
|
|
1510
|
-
}, [Ie.width, m]);
|
|
1511
|
-
var Ee = function() {
|
|
1512
|
-
var O, k;
|
|
1513
|
-
(O = _e.current) === null || O === void 0 || O.delayHidden(), (k = De.current) === null || k === void 0 || k.delayHidden();
|
|
1514
|
-
}, tn = No(J, ie, j, l, _, function() {
|
|
1515
|
-
return G(!0);
|
|
1516
|
-
}, xe, Ee);
|
|
1517
|
-
o.useImperativeHandle(n, function() {
|
|
1518
|
-
return {
|
|
1519
|
-
nativeElement: ye.current,
|
|
1520
|
-
getScrollInfo: vn,
|
|
1521
|
-
scrollTo: function(O) {
|
|
1522
|
-
function k(ve) {
|
|
1523
|
-
return ve && pn(ve) === "object" && ("left" in ve || "top" in ve);
|
|
1524
|
-
}
|
|
1525
|
-
k(O) ? (O.left !== void 0 && K(H(O.left)), tn(O.top)) : tn(O);
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1528
|
-
}), Mn(function() {
|
|
1529
|
-
if (y) {
|
|
1530
|
-
var P = ie.slice($e, Pe + 1);
|
|
1531
|
-
y(P, ie);
|
|
1532
|
-
}
|
|
1533
|
-
}, [$e, Pe, ie]);
|
|
1534
|
-
var Je = $o(ie, _, j, l), Pn = p == null ? void 0 : p({
|
|
1535
|
-
start: $e,
|
|
1536
|
-
end: Pe,
|
|
1537
|
-
virtual: x,
|
|
1538
|
-
offsetX: D,
|
|
1539
|
-
offsetY: en,
|
|
1540
|
-
rtl: M,
|
|
1541
|
-
getSize: Je
|
|
1542
|
-
}), Hn = Co(ie, $e, Pe, m, D, Q, s, ze), rn = null;
|
|
1543
|
-
i && (rn = ee(ae({}, d ? "height" : "maxHeight", i), Lo), Z && (rn.overflowY = "hidden", m && (rn.overflowX = "hidden"), le && (rn.pointerEvents = "none")));
|
|
1544
|
-
var ke = {};
|
|
1545
|
-
return M && (ke.dir = "rtl"), /* @__PURE__ */ o.createElement("div", on({
|
|
1546
|
-
ref: ye,
|
|
1547
|
-
style: ee(ee({}, f), {}, {
|
|
1548
|
-
position: "relative"
|
|
1549
|
-
}),
|
|
1550
|
-
className: fe
|
|
1551
|
-
}, ke, q), /* @__PURE__ */ o.createElement(Wt, {
|
|
1552
|
-
onResize: Ae
|
|
1553
|
-
}, /* @__PURE__ */ o.createElement(w, {
|
|
1554
|
-
className: "".concat(r, "-holder"),
|
|
1555
|
-
style: rn,
|
|
1556
|
-
ref: J,
|
|
1557
|
-
onScroll: L,
|
|
1558
|
-
onMouseEnter: Ee
|
|
1559
|
-
}, /* @__PURE__ */ o.createElement(Zt, {
|
|
1560
|
-
prefixCls: r,
|
|
1561
|
-
height: Ce,
|
|
1562
|
-
offsetX: D,
|
|
1563
|
-
offsetY: en,
|
|
1564
|
-
scrollWidth: m,
|
|
1565
|
-
onInnerResize: G,
|
|
1566
|
-
ref: se,
|
|
1567
|
-
innerProps: T,
|
|
1568
|
-
rtl: M,
|
|
1569
|
-
extra: Pn
|
|
1570
|
-
}, Hn))), x && Ce > i && /* @__PURE__ */ o.createElement(rt, {
|
|
1571
|
-
ref: _e,
|
|
1572
|
-
prefixCls: r,
|
|
1573
|
-
scrollOffset: ce,
|
|
1574
|
-
scrollRange: Ce,
|
|
1575
|
-
rtl: M,
|
|
1576
|
-
onScroll: B,
|
|
1577
|
-
onStartMove: re,
|
|
1578
|
-
onStopMove: we,
|
|
1579
|
-
spinSize: En,
|
|
1580
|
-
containerSize: Ie.height,
|
|
1581
|
-
style: E == null ? void 0 : E.verticalScrollBar,
|
|
1582
|
-
thumbStyle: E == null ? void 0 : E.verticalScrollBarThumb,
|
|
1583
|
-
showScrollBar: V
|
|
1584
|
-
}), x && m > Ie.width && /* @__PURE__ */ o.createElement(rt, {
|
|
1585
|
-
ref: De,
|
|
1586
|
-
prefixCls: r,
|
|
1587
|
-
scrollOffset: D,
|
|
1588
|
-
scrollRange: m,
|
|
1589
|
-
rtl: M,
|
|
1590
|
-
onScroll: B,
|
|
1591
|
-
onStartMove: re,
|
|
1592
|
-
onStopMove: we,
|
|
1593
|
-
spinSize: Nn,
|
|
1594
|
-
containerSize: Ie.width,
|
|
1595
|
-
horizontal: !0,
|
|
1596
|
-
style: E == null ? void 0 : E.horizontalScrollBar,
|
|
1597
|
-
thumbStyle: E == null ? void 0 : E.horizontalScrollBarThumb,
|
|
1598
|
-
showScrollBar: V
|
|
1599
|
-
}));
|
|
1600
|
-
}
|
|
1601
|
-
var kt = /* @__PURE__ */ o.forwardRef(Ho);
|
|
1602
|
-
kt.displayName = "List";
|
|
1603
|
-
function zo() {
|
|
1604
|
-
return /(mac\sos|macintosh)/i.test(navigator.appVersion);
|
|
1605
|
-
}
|
|
1606
|
-
var Bo = ["disabled", "title", "children", "style", "className"];
|
|
1607
|
-
function Tt(e) {
|
|
1608
|
-
return typeof e == "string" || typeof e == "number";
|
|
1609
|
-
}
|
|
1610
|
-
var Vo = function(n, t) {
|
|
1611
|
-
var r = Jr(), a = r.prefixCls, i = r.id, l = r.open, u = r.multiple, d = r.mode, f = r.searchValue, v = r.toggleOpen, s = r.notFoundContent, b = r.onPopupScroll, c = o.useContext(dt), g = c.maxCount, m = c.flattenOptions, S = c.onActiveValue, w = c.defaultActiveFirstOption, h = c.onSelect, I = c.menuItemSelectedIcon, y = c.rawValues, T = c.fieldNames, p = c.virtual, E = c.direction, z = c.listHeight, V = c.listItemHeight, q = c.optionRender, _ = "".concat(a, "-item"), A = xr(function() {
|
|
1612
|
-
return m;
|
|
1613
|
-
}, [l, m], function(R, C) {
|
|
1614
|
-
return C[0] && R[1] !== C[1];
|
|
1615
|
-
}), U = o.useRef(null), Q = o.useMemo(function() {
|
|
1616
|
-
return u && et(g) && (y == null ? void 0 : y.size) >= g;
|
|
1617
|
-
}, [u, g, y == null ? void 0 : y.size]), G = function(C) {
|
|
1618
|
-
C.preventDefault();
|
|
1619
|
-
}, j = function(C) {
|
|
1620
|
-
var D;
|
|
1621
|
-
(D = U.current) === null || D === void 0 || D.scrollTo(typeof C == "number" ? {
|
|
1622
|
-
index: C
|
|
1623
|
-
} : C);
|
|
1624
|
-
}, ne = o.useCallback(function(R) {
|
|
1625
|
-
return d === "combobox" ? !1 : y.has(R);
|
|
1626
|
-
}, [d, qe(y).toString(), y.size]), Z = function(C) {
|
|
1627
|
-
for (var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = A.length, $ = 0; $ < K; $ += 1) {
|
|
1628
|
-
var F = (C + $ * D + K) % K, le = A[F] || {}, me = le.group, re = le.data;
|
|
1629
|
-
if (!me && !(re != null && re.disabled) && (ne(re.value) || !Q))
|
|
1630
|
-
return F;
|
|
1631
|
-
}
|
|
1632
|
-
return -1;
|
|
1633
|
-
}, Y = o.useState(function() {
|
|
1634
|
-
return Z(0);
|
|
1635
|
-
}), x = te(Y, 2), M = x[0], fe = x[1], ie = function(C) {
|
|
1636
|
-
var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1637
|
-
fe(C);
|
|
1638
|
-
var K = {
|
|
1639
|
-
source: D ? "keyboard" : "mouse"
|
|
1640
|
-
}, $ = A[C];
|
|
1641
|
-
if (!$) {
|
|
1642
|
-
S(null, -1, K);
|
|
1643
|
-
return;
|
|
1644
|
-
}
|
|
1645
|
-
S($.value, C, K);
|
|
1646
|
-
};
|
|
1647
|
-
Qn(function() {
|
|
1648
|
-
ie(w !== !1 ? Z(0) : -1);
|
|
1649
|
-
}, [A.length, f]);
|
|
1650
|
-
var J = o.useCallback(function(R) {
|
|
1651
|
-
return d === "combobox" ? String(R).toLowerCase() === f.toLowerCase() : y.has(R);
|
|
1652
|
-
}, [d, f, qe(y).toString(), y.size]);
|
|
1653
|
-
Qn(function() {
|
|
1654
|
-
var R = setTimeout(function() {
|
|
1655
|
-
if (!u && l && y.size === 1) {
|
|
1656
|
-
var D = Array.from(y)[0], K = A.findIndex(function($) {
|
|
1657
|
-
var F = $.data;
|
|
1658
|
-
return F.value === D;
|
|
1659
|
-
});
|
|
1660
|
-
K !== -1 && (ie(K), j(K));
|
|
1661
|
-
}
|
|
1662
|
-
});
|
|
1663
|
-
if (l) {
|
|
1664
|
-
var C;
|
|
1665
|
-
(C = U.current) === null || C === void 0 || C.scrollTo(void 0);
|
|
1666
|
-
}
|
|
1667
|
-
return function() {
|
|
1668
|
-
return clearTimeout(R);
|
|
1669
|
-
};
|
|
1670
|
-
}, [l, f]);
|
|
1671
|
-
var se = function(C) {
|
|
1672
|
-
C !== void 0 && h(C, {
|
|
1673
|
-
selected: !y.has(C)
|
|
1674
|
-
}), u || v(!1);
|
|
1675
|
-
};
|
|
1676
|
-
if (o.useImperativeHandle(t, function() {
|
|
1677
|
-
return {
|
|
1678
|
-
onKeyDown: function(C) {
|
|
1679
|
-
var D = C.which, K = C.ctrlKey;
|
|
1680
|
-
switch (D) {
|
|
1681
|
-
case W.N:
|
|
1682
|
-
case W.P:
|
|
1683
|
-
case W.UP:
|
|
1684
|
-
case W.DOWN: {
|
|
1685
|
-
var $ = 0;
|
|
1686
|
-
if (D === W.UP ? $ = -1 : D === W.DOWN ? $ = 1 : zo() && K && (D === W.N ? $ = 1 : D === W.P && ($ = -1)), $ !== 0) {
|
|
1687
|
-
var F = Z(M + $, $);
|
|
1688
|
-
j(F), ie(F, !0);
|
|
1689
|
-
}
|
|
1690
|
-
break;
|
|
1691
|
-
}
|
|
1692
|
-
case W.TAB:
|
|
1693
|
-
case W.ENTER: {
|
|
1694
|
-
var le, me = A[M];
|
|
1695
|
-
me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0), l && C.preventDefault();
|
|
1696
|
-
break;
|
|
1697
|
-
}
|
|
1698
|
-
case W.ESC:
|
|
1699
|
-
v(!1), l && C.stopPropagation();
|
|
1700
|
-
}
|
|
1701
|
-
},
|
|
1702
|
-
onKeyUp: function() {
|
|
1703
|
-
},
|
|
1704
|
-
scrollTo: function(C) {
|
|
1705
|
-
j(C);
|
|
1706
|
-
}
|
|
1707
|
-
};
|
|
1708
|
-
}), A.length === 0)
|
|
1709
|
-
return /* @__PURE__ */ o.createElement("div", {
|
|
1710
|
-
role: "listbox",
|
|
1711
|
-
id: "".concat(i, "_list"),
|
|
1712
|
-
className: "".concat(_, "-empty"),
|
|
1713
|
-
onMouseDown: G
|
|
1714
|
-
}, s);
|
|
1715
|
-
var ye = Object.keys(T).map(function(R) {
|
|
1716
|
-
return T[R];
|
|
1717
|
-
}), ge = function(C) {
|
|
1718
|
-
return C.label;
|
|
1719
|
-
};
|
|
1720
|
-
function Re(R, C) {
|
|
1721
|
-
var D = R.group;
|
|
1722
|
-
return {
|
|
1723
|
-
role: D ? "presentation" : "option",
|
|
1724
|
-
id: "".concat(i, "_list_").concat(C)
|
|
1725
|
-
};
|
|
1726
|
-
}
|
|
1727
|
-
var ce = function(C) {
|
|
1728
|
-
var D = A[C];
|
|
1729
|
-
if (!D)
|
|
1730
|
-
return null;
|
|
1731
|
-
var K = D.data || {}, $ = K.value, F = D.group, le = Fn(K, !0), me = ge(D);
|
|
1732
|
-
return D ? /* @__PURE__ */ o.createElement("div", on({
|
|
1733
|
-
"aria-label": typeof me == "string" && !F ? me : null
|
|
1734
|
-
}, le, {
|
|
1735
|
-
key: C
|
|
1736
|
-
}, Re(D, C), {
|
|
1737
|
-
"aria-selected": J($)
|
|
1738
|
-
}), $) : null;
|
|
1739
|
-
}, pe = {
|
|
1740
|
-
role: "listbox",
|
|
1741
|
-
id: "".concat(i, "_list")
|
|
1742
|
-
};
|
|
1743
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div", on({}, pe, {
|
|
1744
|
-
style: {
|
|
1745
|
-
height: 0,
|
|
1746
|
-
width: 0,
|
|
1747
|
-
overflow: "hidden"
|
|
1748
|
-
}
|
|
1749
|
-
}), ce(M - 1), ce(M), ce(M + 1)), /* @__PURE__ */ o.createElement(kt, {
|
|
1750
|
-
itemKey: "key",
|
|
1751
|
-
ref: U,
|
|
1752
|
-
data: A,
|
|
1753
|
-
height: z,
|
|
1754
|
-
itemHeight: V,
|
|
1755
|
-
fullHeight: !1,
|
|
1756
|
-
onMouseDown: G,
|
|
1757
|
-
onScroll: b,
|
|
1758
|
-
virtual: p,
|
|
1759
|
-
direction: E,
|
|
1760
|
-
innerProps: p ? null : pe
|
|
1761
|
-
}, function(R, C) {
|
|
1762
|
-
var D = R.group, K = R.groupOption, $ = R.data, F = R.label, le = R.value, me = $.key;
|
|
1763
|
-
if (D) {
|
|
1764
|
-
var re, we = (re = $.title) !== null && re !== void 0 ? re : Tt(F) ? F.toString() : void 0;
|
|
1765
|
-
return /* @__PURE__ */ o.createElement("div", {
|
|
1766
|
-
className: Be(_, "".concat(_, "-group"), $.className),
|
|
1767
|
-
title: we
|
|
1768
|
-
}, F !== void 0 ? F : me);
|
|
1769
|
-
}
|
|
1770
|
-
var ze = $.disabled, xe = $.title;
|
|
1771
|
-
$.children;
|
|
1772
|
-
var Ne = $.style, de = $.className, Ge = Cn($, Bo), Ye = jt(Ge, ye), Se = ne(le), Oe = ze || !Se && Q, Ce = "".concat(_, "-option"), $e = Be(_, Ce, de, ae(ae(ae(ae({}, "".concat(Ce, "-grouped"), K), "".concat(Ce, "-active"), M === C && !Oe), "".concat(Ce, "-disabled"), Oe), "".concat(Ce, "-selected"), Se)), Pe = ge(R), en = !I || typeof I == "function" || Se, je = typeof Pe == "number" ? Pe : Pe || le, Fe = Tt(je) ? je.toString() : void 0;
|
|
1773
|
-
return xe !== void 0 && (Fe = xe), /* @__PURE__ */ o.createElement("div", on({}, Fn(Ye), p ? {} : Re(R, C), {
|
|
1774
|
-
"aria-selected": J(le),
|
|
1775
|
-
className: $e,
|
|
1776
|
-
title: Fe,
|
|
1777
|
-
onMouseMove: function() {
|
|
1778
|
-
M === C || Oe || ie(C);
|
|
1779
|
-
},
|
|
1780
|
-
onClick: function() {
|
|
1781
|
-
Oe || se(le);
|
|
1782
|
-
},
|
|
1783
|
-
style: Ne
|
|
1784
|
-
}), /* @__PURE__ */ o.createElement("div", {
|
|
1785
|
-
className: "".concat(Ce, "-content")
|
|
1786
|
-
}, typeof q == "function" ? q(R, {
|
|
1787
|
-
index: C
|
|
1788
|
-
}) : je), /* @__PURE__ */ o.isValidElement(I) || Se, en && /* @__PURE__ */ o.createElement(Wn, {
|
|
1789
|
-
className: "".concat(_, "-option-state"),
|
|
1790
|
-
customizeIcon: I,
|
|
1791
|
-
customizeIconProps: {
|
|
1792
|
-
value: le,
|
|
1793
|
-
disabled: Oe,
|
|
1794
|
-
isSelected: Se
|
|
1795
|
-
}
|
|
1796
|
-
}, Se ? "✓" : null));
|
|
1797
|
-
}));
|
|
1798
|
-
}, er = /* @__PURE__ */ o.forwardRef(Vo);
|
|
1799
|
-
process.env.NODE_ENV !== "production" && (er.displayName = "OptionList");
|
|
1800
|
-
const Fo = function(e, n) {
|
|
1801
|
-
var t = o.useRef({
|
|
1802
|
-
values: /* @__PURE__ */ new Map(),
|
|
1803
|
-
options: /* @__PURE__ */ new Map()
|
|
1804
|
-
}), r = o.useMemo(function() {
|
|
1805
|
-
var i = t.current, l = i.values, u = i.options, d = e.map(function(s) {
|
|
1806
|
-
if (s.label === void 0) {
|
|
1807
|
-
var b;
|
|
1808
|
-
return ee(ee({}, s), {}, {
|
|
1809
|
-
label: (b = l.get(s.value)) === null || b === void 0 ? void 0 : b.label
|
|
1810
|
-
});
|
|
1811
|
-
}
|
|
1812
|
-
return s;
|
|
1813
|
-
}), f = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
1814
|
-
return d.forEach(function(s) {
|
|
1815
|
-
f.set(s.value, s), v.set(s.value, n.get(s.value) || u.get(s.value));
|
|
1816
|
-
}), t.current.values = f, t.current.options = v, d;
|
|
1817
|
-
}, [e, n]), a = o.useCallback(function(i) {
|
|
1818
|
-
return n.get(i) || t.current.options.get(i);
|
|
1819
|
-
}, [n]);
|
|
1820
|
-
return [r, a];
|
|
1821
|
-
};
|
|
1822
|
-
function Gn(e, n) {
|
|
1823
|
-
return st(e).join("").toUpperCase().includes(n);
|
|
1824
|
-
}
|
|
1825
|
-
const Ao = function(e, n, t, r, a) {
|
|
1826
|
-
return o.useMemo(function() {
|
|
1827
|
-
if (!t || r === !1)
|
|
1828
|
-
return e;
|
|
1829
|
-
var i = n.options, l = n.label, u = n.value, d = [], f = typeof r == "function", v = t.toUpperCase(), s = f ? r : function(c, g) {
|
|
1830
|
-
return a ? Gn(g[a], v) : g[i] ? Gn(g[l !== "children" ? l : "label"], v) : Gn(g[u], v);
|
|
1831
|
-
}, b = f ? function(c) {
|
|
1832
|
-
return nt(c);
|
|
1833
|
-
} : function(c) {
|
|
1834
|
-
return c;
|
|
1835
|
-
};
|
|
1836
|
-
return e.forEach(function(c) {
|
|
1837
|
-
if (c[i]) {
|
|
1838
|
-
var g = s(t, b(c));
|
|
1839
|
-
if (g)
|
|
1840
|
-
d.push(c);
|
|
1841
|
-
else {
|
|
1842
|
-
var m = c[i].filter(function(S) {
|
|
1843
|
-
return s(t, b(S));
|
|
1844
|
-
});
|
|
1845
|
-
m.length && d.push(ee(ee({}, c), {}, ae({}, i, m)));
|
|
1846
|
-
}
|
|
1847
|
-
return;
|
|
1848
|
-
}
|
|
1849
|
-
s(t, b(c)) && d.push(c);
|
|
1850
|
-
}), d;
|
|
1851
|
-
}, [e, r, a, t, n]);
|
|
1852
|
-
};
|
|
1853
|
-
var Lt = 0, jo = process.env.NODE_ENV !== "test" && br();
|
|
1854
|
-
function Wo() {
|
|
1855
|
-
var e;
|
|
1856
|
-
return jo ? (e = Lt, Lt += 1) : e = "TEST_OR_SSR", e;
|
|
1857
|
-
}
|
|
1858
|
-
function Ko(e) {
|
|
1859
|
-
var n = o.useState(), t = te(n, 2), r = t[0], a = t[1];
|
|
1860
|
-
return o.useEffect(function() {
|
|
1861
|
-
a("rc_select_".concat(Wo()));
|
|
1862
|
-
}, []), e || r;
|
|
1863
|
-
}
|
|
1864
|
-
var Xo = ["children", "value"], Uo = ["children"];
|
|
1865
|
-
function Go(e) {
|
|
1866
|
-
var n = e, t = n.key, r = n.props, a = r.children, i = r.value, l = Cn(r, Xo);
|
|
1867
|
-
return ee({
|
|
1868
|
-
key: t,
|
|
1869
|
-
value: i !== void 0 ? i : t,
|
|
1870
|
-
children: a
|
|
1871
|
-
}, l);
|
|
1872
|
-
}
|
|
1873
|
-
function vt(e) {
|
|
1874
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1875
|
-
return kn(e).map(function(t, r) {
|
|
1876
|
-
if (!/* @__PURE__ */ o.isValidElement(t) || !t.type)
|
|
1877
|
-
return null;
|
|
1878
|
-
var a = t, i = a.type.isSelectOptGroup, l = a.key, u = a.props, d = u.children, f = Cn(u, Uo);
|
|
1879
|
-
return n || !i ? Go(t) : ee(ee({
|
|
1880
|
-
key: "__RC_SELECT_GRP__".concat(l === null ? r : l, "__"),
|
|
1881
|
-
label: l
|
|
1882
|
-
}, f), {}, {
|
|
1883
|
-
options: vt(d)
|
|
1884
|
-
});
|
|
1885
|
-
}).filter(function(t) {
|
|
1886
|
-
return t;
|
|
1887
|
-
});
|
|
1888
|
-
}
|
|
1889
|
-
var Yo = function(n, t, r, a, i) {
|
|
1890
|
-
return o.useMemo(function() {
|
|
1891
|
-
var l = n, u = !n;
|
|
1892
|
-
u && (l = vt(t));
|
|
1893
|
-
var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), v = function(c, g, m) {
|
|
1894
|
-
m && typeof m == "string" && c.set(g[m], g);
|
|
1895
|
-
}, s = function b(c) {
|
|
1896
|
-
for (var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, m = 0; m < c.length; m += 1) {
|
|
1897
|
-
var S = c[m];
|
|
1898
|
-
!S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, i)) : b(S[r.options], !0);
|
|
1899
|
-
}
|
|
1900
|
-
};
|
|
1901
|
-
return s(l), {
|
|
1902
|
-
options: l,
|
|
1903
|
-
valueOptions: d,
|
|
1904
|
-
labelOptions: f
|
|
1905
|
-
};
|
|
1906
|
-
}, [n, t, r, a, i]);
|
|
1907
|
-
};
|
|
1908
|
-
function Ht(e) {
|
|
1909
|
-
var n = o.useRef();
|
|
1910
|
-
n.current = e;
|
|
1911
|
-
var t = o.useCallback(function() {
|
|
1912
|
-
return n.current.apply(n, arguments);
|
|
1913
|
-
}, []);
|
|
1914
|
-
return t;
|
|
1915
|
-
}
|
|
1916
|
-
function qo(e) {
|
|
1917
|
-
var n = e.mode, t = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus, b = e.labelInValue, c = e.value, g = e.inputValue, m = e.optionLabelProp, S = An(n), w = d !== void 0 ? d : S || n === "combobox", h = t || vt(r);
|
|
1918
|
-
if (Ue(n !== "tags" || h.every(function(p) {
|
|
1919
|
-
return !p.disabled;
|
|
1920
|
-
}), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), n === "tags" || n === "combobox") {
|
|
1921
|
-
var I = h.some(function(p) {
|
|
1922
|
-
return p.options ? p.options.some(function(E) {
|
|
1923
|
-
return typeof ("value" in E ? E.value : E.key) == "number";
|
|
1924
|
-
}) : typeof ("value" in p ? p.value : p.key) == "number";
|
|
1925
|
-
});
|
|
1926
|
-
Ue(!I, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
|
|
1927
|
-
}
|
|
1928
|
-
if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."), wt(n !== "combobox" || !u || !i || !l, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !w && n !== "combobox" && n !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), wt(!v || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), c != null) {
|
|
1929
|
-
var y = st(c);
|
|
1930
|
-
Ue(!b || y.every(function(p) {
|
|
1931
|
-
return pn(p) === "object" && ("key" in p || "value" in p);
|
|
1932
|
-
}), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Ue(!S || Array.isArray(c), "`value` should be array when `mode` is `multiple` or `tags`");
|
|
1933
|
-
}
|
|
1934
|
-
if (r) {
|
|
1935
|
-
var T = null;
|
|
1936
|
-
kn(r).some(function(p) {
|
|
1937
|
-
if (!/* @__PURE__ */ o.isValidElement(p) || !p.type)
|
|
1938
|
-
return !1;
|
|
1939
|
-
var E = p, z = E.type;
|
|
1940
|
-
if (z.isSelectOption)
|
|
1941
|
-
return !1;
|
|
1942
|
-
if (z.isSelectOptGroup) {
|
|
1943
|
-
var V = kn(p.props.children).every(function(q) {
|
|
1944
|
-
return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (T = q.type, !1);
|
|
1945
|
-
});
|
|
1946
|
-
return !V;
|
|
1947
|
-
}
|
|
1948
|
-
return T = z, !0;
|
|
1949
|
-
}), T && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(T.displayName || T.name || T, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
function Qo(e, n) {
|
|
1953
|
-
if (e) {
|
|
1954
|
-
var t = function r(a) {
|
|
1955
|
-
for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = 0; l < a.length; l++) {
|
|
1956
|
-
var u = a[l];
|
|
1957
|
-
if (u[n == null ? void 0 : n.value] === null)
|
|
1958
|
-
return Ue(!1, "`value` in Select options should not be `null`."), !0;
|
|
1959
|
-
if (!i && Array.isArray(u[n == null ? void 0 : n.options]) && r(u[n == null ? void 0 : n.options], !0))
|
|
1960
|
-
break;
|
|
1961
|
-
}
|
|
1962
|
-
};
|
|
1963
|
-
t(e);
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
var Zo = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Jo = ["inputValue"];
|
|
1967
|
-
function ko(e) {
|
|
1968
|
-
return !e || pn(e) !== "object";
|
|
1969
|
-
}
|
|
1970
|
-
var nr = /* @__PURE__ */ o.forwardRef(function(e, n) {
|
|
1971
|
-
var t = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue, b = s === void 0 ? !0 : s, c = e.onSelect, g = e.onDeselect, m = e.dropdownMatchSelectWidth, S = m === void 0 ? !0 : m, w = e.filterOption, h = e.filterSort, I = e.optionFilterProp, y = e.optionLabelProp, T = e.options, p = e.optionRender, E = e.children, z = e.defaultActiveFirstOption, V = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, A = e.listHeight, U = A === void 0 ? 200 : A, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, ne = e.value, Z = e.defaultValue, Y = e.labelInValue, x = e.onChange, M = e.maxCount, fe = Cn(e, Zo), ie = Ko(t), J = An(r), se = !!(!T && E), ye = o.useMemo(function() {
|
|
1972
|
-
return w === void 0 && r === "combobox" ? !1 : w;
|
|
1973
|
-
}, [w, r]), ge = o.useMemo(
|
|
1974
|
-
function() {
|
|
1975
|
-
return qt(u, se);
|
|
1976
|
-
},
|
|
1977
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
1978
|
-
[
|
|
1979
|
-
// We stringify fieldNames to avoid unnecessary re-renders.
|
|
1980
|
-
JSON.stringify(u),
|
|
1981
|
-
se
|
|
1982
|
-
]
|
|
1983
|
-
/* eslint-enable react-hooks/exhaustive-deps */
|
|
1984
|
-
), Re = Jn("", {
|
|
1985
|
-
value: f !== void 0 ? f : d,
|
|
1986
|
-
postState: function(B) {
|
|
1987
|
-
return B || "";
|
|
1988
|
-
}
|
|
1989
|
-
}), ce = te(Re, 2), pe = ce[0], R = ce[1], C = Yo(T, E, ge, I, y), D = C.valueOptions, K = C.labelOptions, $ = C.options, F = o.useCallback(function(N) {
|
|
1990
|
-
var B = st(N);
|
|
1991
|
-
return B.map(function(L) {
|
|
1992
|
-
var H, oe, be, Ze, We;
|
|
1993
|
-
if (ko(L))
|
|
1994
|
-
H = L;
|
|
1995
|
-
else {
|
|
1996
|
-
var nn;
|
|
1997
|
-
be = L.key, oe = L.label, H = (nn = L.value) !== null && nn !== void 0 ? nn : be;
|
|
1998
|
-
}
|
|
1999
|
-
var Ee = D.get(H);
|
|
2000
|
-
if (Ee) {
|
|
2001
|
-
var tn;
|
|
2002
|
-
if (oe === void 0 && (oe = Ee == null ? void 0 : Ee[y || ge.label]), be === void 0 && (be = (tn = Ee == null ? void 0 : Ee.key) !== null && tn !== void 0 ? tn : H), Ze = Ee == null ? void 0 : Ee.disabled, We = Ee == null ? void 0 : Ee.title, process.env.NODE_ENV !== "production" && !y) {
|
|
2003
|
-
var Je = Ee == null ? void 0 : Ee[ge.label];
|
|
2004
|
-
Je !== void 0 && !/* @__PURE__ */ o.isValidElement(Je) && !/* @__PURE__ */ o.isValidElement(oe) && Je !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
return {
|
|
2008
|
-
label: oe,
|
|
2009
|
-
value: H,
|
|
2010
|
-
key: be,
|
|
2011
|
-
disabled: Ze,
|
|
2012
|
-
title: We
|
|
2013
|
-
};
|
|
2014
|
-
});
|
|
2015
|
-
}, [ge, y, D]), le = Jn(Z, {
|
|
2016
|
-
value: ne
|
|
2017
|
-
}), me = te(le, 2), re = me[0], we = me[1], ze = o.useMemo(function() {
|
|
2018
|
-
var N, B = J && re === null ? [] : re, L = F(B);
|
|
2019
|
-
return r === "combobox" && io((N = L[0]) === null || N === void 0 ? void 0 : N.value) ? [] : L;
|
|
2020
|
-
}, [re, F, r, J]), xe = Fo(ze, D), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1], Ye = o.useMemo(function() {
|
|
2021
|
-
if (!r && de.length === 1) {
|
|
2022
|
-
var N = de[0];
|
|
2023
|
-
if (N.value === null && (N.label === null || N.label === void 0))
|
|
2024
|
-
return [];
|
|
2025
|
-
}
|
|
2026
|
-
return de.map(function(B) {
|
|
2027
|
-
var L;
|
|
2028
|
-
return ee(ee({}, B), {}, {
|
|
2029
|
-
label: (L = typeof j == "function" ? j(B) : B.label) !== null && L !== void 0 ? L : B.value
|
|
2030
|
-
});
|
|
2031
|
-
});
|
|
2032
|
-
}, [r, de, j]), Se = o.useMemo(function() {
|
|
2033
|
-
return new Set(de.map(function(N) {
|
|
2034
|
-
return N.value;
|
|
2035
|
-
}));
|
|
2036
|
-
}, [de]);
|
|
2037
|
-
o.useEffect(function() {
|
|
2038
|
-
if (r === "combobox") {
|
|
2039
|
-
var N, B = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
|
|
2040
|
-
R(ao(B) ? String(B) : "");
|
|
2041
|
-
}
|
|
2042
|
-
}, [de]);
|
|
2043
|
-
var Oe = Ht(function(N, B) {
|
|
2044
|
-
var L = B ?? N;
|
|
2045
|
-
return ae(ae({}, ge.value, N), ge.label, L);
|
|
2046
|
-
}), Ce = o.useMemo(function() {
|
|
2047
|
-
if (r !== "tags")
|
|
2048
|
-
return $;
|
|
2049
|
-
var N = qe($), B = function(H) {
|
|
2050
|
-
return D.has(H);
|
|
2051
|
-
};
|
|
2052
|
-
return qe(de).sort(function(L, H) {
|
|
2053
|
-
return L.value < H.value ? -1 : 1;
|
|
2054
|
-
}).forEach(function(L) {
|
|
2055
|
-
var H = L.value;
|
|
2056
|
-
B(H) || N.push(Oe(H, L.label));
|
|
2057
|
-
}), N;
|
|
2058
|
-
}, [Oe, $, D, de, r]), $e = Ao(Ce, ge, pe, ye, I), Pe = o.useMemo(function() {
|
|
2059
|
-
return r !== "tags" || !pe || $e.some(function(N) {
|
|
2060
|
-
return N[I || "value"] === pe;
|
|
2061
|
-
}) || $e.some(function(N) {
|
|
2062
|
-
return N[ge.value] === pe;
|
|
2063
|
-
}) ? $e : [Oe(pe)].concat(qe($e));
|
|
2064
|
-
}, [Oe, I, r, $e, pe, ge]), en = function N(B) {
|
|
2065
|
-
var L = qe(B).sort(function(H, oe) {
|
|
2066
|
-
return h(H, oe, {
|
|
2067
|
-
searchValue: pe
|
|
2068
|
-
});
|
|
2069
|
-
});
|
|
2070
|
-
return L.map(function(H) {
|
|
2071
|
-
return Array.isArray(H.options) ? ee(ee({}, H), {}, {
|
|
2072
|
-
options: H.options.length > 0 ? N(H.options) : H.options
|
|
2073
|
-
}) : H;
|
|
2074
|
-
});
|
|
2075
|
-
}, je = o.useMemo(function() {
|
|
2076
|
-
return h ? en(Pe) : Pe;
|
|
2077
|
-
}, [Pe, h, pe]), Fe = o.useMemo(function() {
|
|
2078
|
-
return po(je, {
|
|
2079
|
-
fieldNames: ge,
|
|
2080
|
-
childrenAsData: se
|
|
2081
|
-
});
|
|
2082
|
-
}, [je, ge, se]), Ie = function(B) {
|
|
2083
|
-
var L = F(B);
|
|
2084
|
-
if (we(L), x && // Trigger event only when value changed
|
|
2085
|
-
(L.length !== de.length || L.some(function(be, Ze) {
|
|
2086
|
-
var We;
|
|
2087
|
-
return ((We = de[Ze]) === null || We === void 0 ? void 0 : We.value) !== (be == null ? void 0 : be.value);
|
|
2088
|
-
}))) {
|
|
2089
|
-
var H = Y ? L : L.map(function(be) {
|
|
2090
|
-
return be.value;
|
|
2091
|
-
}), oe = L.map(function(be) {
|
|
2092
|
-
return nt(Ge(be.value));
|
|
2093
|
-
});
|
|
2094
|
-
x(
|
|
2095
|
-
// Value
|
|
2096
|
-
J ? H : H[0],
|
|
2097
|
-
// Option
|
|
2098
|
-
J ? oe : oe[0]
|
|
2099
|
-
);
|
|
2100
|
-
}
|
|
2101
|
-
}, hn = o.useState(null), Ae = te(hn, 2), _e = Ae[0], De = Ae[1], Nn = o.useState(0), En = te(Nn, 2), dn = En[0], bn = En[1], xn = z !== void 0 ? z : r !== "combobox", cn = o.useCallback(function(N, B) {
|
|
2102
|
-
var L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, H = L.source, oe = H === void 0 ? "keyboard" : H;
|
|
2103
|
-
bn(B), l && r === "combobox" && N !== null && oe === "keyboard" && De(String(N));
|
|
2104
|
-
}, [l, r]), Qe = function(B, L, H) {
|
|
2105
|
-
var oe = function() {
|
|
2106
|
-
var rn, ke = Ge(B);
|
|
2107
|
-
return [Y ? {
|
|
2108
|
-
label: ke == null ? void 0 : ke[ge.label],
|
|
2109
|
-
value: B,
|
|
2110
|
-
key: (rn = ke == null ? void 0 : ke.key) !== null && rn !== void 0 ? rn : B
|
|
2111
|
-
} : B, nt(ke)];
|
|
2112
|
-
};
|
|
2113
|
-
if (L && c) {
|
|
2114
|
-
var be = oe(), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
|
|
2115
|
-
c(We, nn);
|
|
2116
|
-
} else if (!L && g && H !== "clear") {
|
|
2117
|
-
var Ee = oe(), tn = te(Ee, 2), Je = tn[0], Pn = tn[1];
|
|
2118
|
-
g(Je, Pn);
|
|
2119
|
-
}
|
|
2120
|
-
}, fn = Ht(function(N, B) {
|
|
2121
|
-
var L, H = J ? B.selected : !0;
|
|
2122
|
-
H ? L = J ? [].concat(qe(de), [N]) : [N] : L = de.filter(function(oe) {
|
|
2123
|
-
return oe.value !== N;
|
|
2124
|
-
}), Ie(L), Qe(N, H), r === "combobox" ? De("") : (!An || b) && (R(""), De(""));
|
|
2125
|
-
}), mn = function(B, L) {
|
|
2126
|
-
Ie(B);
|
|
2127
|
-
var H = L.type, oe = L.values;
|
|
2128
|
-
(H === "remove" || H === "clear") && oe.forEach(function(be) {
|
|
2129
|
-
Qe(be.value, !1, H);
|
|
2130
|
-
});
|
|
2131
|
-
}, Me = function(B, L) {
|
|
2132
|
-
if (R(B), De(null), L.source === "submit") {
|
|
2133
|
-
var H = (B || "").trim();
|
|
2134
|
-
if (H) {
|
|
2135
|
-
var oe = Array.from(new Set([].concat(qe(Se), [H])));
|
|
2136
|
-
Ie(oe), Qe(H, !0), R("");
|
|
2137
|
-
}
|
|
2138
|
-
return;
|
|
2139
|
-
}
|
|
2140
|
-
L.source !== "blur" && (r === "combobox" && Ie(B), v == null || v(B));
|
|
2141
|
-
}, vn = function(B) {
|
|
2142
|
-
var L = B;
|
|
2143
|
-
r !== "tags" && (L = B.map(function(oe) {
|
|
2144
|
-
var be = K.get(oe);
|
|
2145
|
-
return be == null ? void 0 : be.value;
|
|
2146
|
-
}).filter(function(oe) {
|
|
2147
|
-
return oe !== void 0;
|
|
2148
|
-
}));
|
|
2149
|
-
var H = Array.from(new Set([].concat(qe(Se), qe(L))));
|
|
2150
|
-
Ie(H), H.forEach(function(oe) {
|
|
2151
|
-
Qe(oe, !0);
|
|
2152
|
-
});
|
|
2153
|
-
}, an = o.useMemo(function() {
|
|
2154
|
-
var N = q !== !1 && S !== !1;
|
|
2155
|
-
return ee(ee({}, C), {}, {
|
|
2156
|
-
flattenOptions: Fe,
|
|
2157
|
-
onActiveValue: cn,
|
|
2158
|
-
defaultActiveFirstOption: xn,
|
|
2159
|
-
onSelect: fn,
|
|
2160
|
-
menuItemSelectedIcon: V,
|
|
2161
|
-
rawValues: Se,
|
|
2162
|
-
fieldNames: ge,
|
|
2163
|
-
virtual: N,
|
|
2164
|
-
direction: _,
|
|
2165
|
-
listHeight: U,
|
|
2166
|
-
listItemHeight: G,
|
|
2167
|
-
childrenAsData: se,
|
|
2168
|
-
maxCount: M,
|
|
2169
|
-
optionRender: p
|
|
2170
|
-
});
|
|
2171
|
-
}, [M, C, Fe, cn, xn, fn, V, Se, ge, q, S, _, U, G, se, p]);
|
|
2172
|
-
return process.env.NODE_ENV !== "production" && (qo(e), Qo($, ge)), /* @__PURE__ */ o.createElement(dt.Provider, {
|
|
2173
|
-
value: an
|
|
2174
|
-
}, /* @__PURE__ */ o.createElement(Qt, on({}, fe, {
|
|
2175
|
-
// >>> MISC
|
|
2176
|
-
id: ie,
|
|
2177
|
-
prefixCls: i,
|
|
2178
|
-
ref: n,
|
|
2179
|
-
omitDomProps: Jo,
|
|
2180
|
-
mode: r,
|
|
2181
|
-
displayValues: Ye,
|
|
2182
|
-
onDisplayValuesChange: mn,
|
|
2183
|
-
direction: _,
|
|
2184
|
-
searchValue: pe,
|
|
2185
|
-
onSearch: Me,
|
|
2186
|
-
autoClearSearchValue: b,
|
|
2187
|
-
onSearchSplit: vn,
|
|
2188
|
-
dropdownMatchSelectWidth: S,
|
|
2189
|
-
OptionList: er,
|
|
2190
|
-
emptyOptions: !Fe.length,
|
|
2191
|
-
activeValue: _e,
|
|
2192
|
-
activeDescendantId: "".concat(ie, "_list_").concat(dn)
|
|
2193
|
-
})));
|
|
2194
|
-
});
|
|
2195
|
-
process.env.NODE_ENV !== "production" && (nr.displayName = "Select");
|
|
2196
|
-
var gt = nr;
|
|
2197
|
-
gt.Option = mt;
|
|
2198
|
-
gt.OptGroup = ft;
|
|
2199
|
-
const tr = () => {
|
|
2200
|
-
const [, e] = ot(), [n] = ut("Empty"), r = new Vn(e.colorBgBase).toHsl().l < 0.5 ? {
|
|
2201
|
-
opacity: 0.65
|
|
2202
|
-
} : {};
|
|
2203
|
-
return /* @__PURE__ */ o.createElement("svg", {
|
|
2204
|
-
style: r,
|
|
2205
|
-
width: "184",
|
|
2206
|
-
height: "152",
|
|
2207
|
-
viewBox: "0 0 184 152",
|
|
2208
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2209
|
-
}, /* @__PURE__ */ o.createElement("title", null, (n == null ? void 0 : n.description) || "Empty"), /* @__PURE__ */ o.createElement("g", {
|
|
2210
|
-
fill: "none",
|
|
2211
|
-
fillRule: "evenodd"
|
|
2212
|
-
}, /* @__PURE__ */ o.createElement("g", {
|
|
2213
|
-
transform: "translate(24 31.67)"
|
|
2214
|
-
}, /* @__PURE__ */ o.createElement("ellipse", {
|
|
2215
|
-
fillOpacity: ".8",
|
|
2216
|
-
fill: "#F5F5F7",
|
|
2217
|
-
cx: "67.797",
|
|
2218
|
-
cy: "106.89",
|
|
2219
|
-
rx: "67.797",
|
|
2220
|
-
ry: "12.668"
|
|
2221
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2222
|
-
d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
|
|
2223
|
-
fill: "#AEB8C2"
|
|
2224
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2225
|
-
d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
|
|
2226
|
-
fill: "url(#linearGradient-1)",
|
|
2227
|
-
transform: "translate(13.56)"
|
|
2228
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2229
|
-
d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
|
|
2230
|
-
fill: "#F5F5F7"
|
|
2231
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2232
|
-
d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
|
|
2233
|
-
fill: "#DCE0E6"
|
|
2234
|
-
})), /* @__PURE__ */ o.createElement("path", {
|
|
2235
|
-
d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
|
|
2236
|
-
fill: "#DCE0E6"
|
|
2237
|
-
}), /* @__PURE__ */ o.createElement("g", {
|
|
2238
|
-
transform: "translate(149.65 15.383)",
|
|
2239
|
-
fill: "#FFF"
|
|
2240
|
-
}, /* @__PURE__ */ o.createElement("ellipse", {
|
|
2241
|
-
cx: "20.654",
|
|
2242
|
-
cy: "3.167",
|
|
2243
|
-
rx: "2.849",
|
|
2244
|
-
ry: "2.815"
|
|
2245
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2246
|
-
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
|
|
2247
|
-
}))));
|
|
2248
|
-
};
|
|
2249
|
-
process.env.NODE_ENV !== "production" && (tr.displayName = "EmptyImage");
|
|
2250
|
-
const rr = () => {
|
|
2251
|
-
const [, e] = ot(), [n] = ut("Empty"), {
|
|
2252
|
-
colorFill: t,
|
|
2253
|
-
colorFillTertiary: r,
|
|
2254
|
-
colorFillQuaternary: a,
|
|
2255
|
-
colorBgContainer: i
|
|
2256
|
-
} = e, {
|
|
2257
|
-
borderColor: l,
|
|
2258
|
-
shadowColor: u,
|
|
2259
|
-
contentColor: d
|
|
2260
|
-
} = gr(() => ({
|
|
2261
|
-
borderColor: new Vn(t).onBackground(i).toHexString(),
|
|
2262
|
-
shadowColor: new Vn(r).onBackground(i).toHexString(),
|
|
2263
|
-
contentColor: new Vn(a).onBackground(i).toHexString()
|
|
2264
|
-
}), [t, r, a, i]);
|
|
2265
|
-
return /* @__PURE__ */ o.createElement("svg", {
|
|
2266
|
-
width: "64",
|
|
2267
|
-
height: "41",
|
|
2268
|
-
viewBox: "0 0 64 41",
|
|
2269
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2270
|
-
}, /* @__PURE__ */ o.createElement("title", null, (n == null ? void 0 : n.description) || "Empty"), /* @__PURE__ */ o.createElement("g", {
|
|
2271
|
-
transform: "translate(0 1)",
|
|
2272
|
-
fill: "none",
|
|
2273
|
-
fillRule: "evenodd"
|
|
2274
|
-
}, /* @__PURE__ */ o.createElement("ellipse", {
|
|
2275
|
-
fill: u,
|
|
2276
|
-
cx: "32",
|
|
2277
|
-
cy: "33",
|
|
2278
|
-
rx: "32",
|
|
2279
|
-
ry: "7"
|
|
2280
|
-
}), /* @__PURE__ */ o.createElement("g", {
|
|
2281
|
-
fillRule: "nonzero",
|
|
2282
|
-
stroke: l
|
|
2283
|
-
}, /* @__PURE__ */ o.createElement("path", {
|
|
2284
|
-
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
2285
|
-
}), /* @__PURE__ */ o.createElement("path", {
|
|
2286
|
-
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
|
|
2287
|
-
fill: d
|
|
2288
|
-
}))));
|
|
2289
|
-
};
|
|
2290
|
-
process.env.NODE_ENV !== "production" && (rr.displayName = "SimpleImage");
|
|
2291
|
-
const ea = (e) => {
|
|
2292
|
-
const {
|
|
2293
|
-
componentCls: n,
|
|
2294
|
-
margin: t,
|
|
2295
|
-
marginXS: r,
|
|
2296
|
-
marginXL: a,
|
|
2297
|
-
fontSize: i,
|
|
2298
|
-
lineHeight: l
|
|
2299
|
-
} = e;
|
|
2300
|
-
return {
|
|
2301
|
-
[n]: {
|
|
2302
|
-
marginInline: r,
|
|
2303
|
-
fontSize: i,
|
|
2304
|
-
lineHeight: l,
|
|
2305
|
-
textAlign: "center",
|
|
2306
|
-
// 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
|
|
2307
|
-
[`${n}-image`]: {
|
|
2308
|
-
height: e.emptyImgHeight,
|
|
2309
|
-
marginBottom: r,
|
|
2310
|
-
opacity: e.opacityImage,
|
|
2311
|
-
img: {
|
|
2312
|
-
height: "100%"
|
|
2313
|
-
},
|
|
2314
|
-
svg: {
|
|
2315
|
-
maxWidth: "100%",
|
|
2316
|
-
height: "100%",
|
|
2317
|
-
margin: "auto"
|
|
2318
|
-
}
|
|
2319
|
-
},
|
|
2320
|
-
[`${n}-description`]: {
|
|
2321
|
-
color: e.colorTextDescription
|
|
2322
|
-
},
|
|
2323
|
-
// 原来 &-footer 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
|
|
2324
|
-
[`${n}-footer`]: {
|
|
2325
|
-
marginTop: t
|
|
2326
|
-
},
|
|
2327
|
-
"&-normal": {
|
|
2328
|
-
marginBlock: a,
|
|
2329
|
-
color: e.colorTextDescription,
|
|
2330
|
-
[`${n}-description`]: {
|
|
2331
|
-
color: e.colorTextDescription
|
|
2332
|
-
},
|
|
2333
|
-
[`${n}-image`]: {
|
|
2334
|
-
height: e.emptyImgHeightMD
|
|
2335
|
-
}
|
|
2336
|
-
},
|
|
2337
|
-
"&-small": {
|
|
2338
|
-
marginBlock: r,
|
|
2339
|
-
color: e.colorTextDescription,
|
|
2340
|
-
[`${n}-image`]: {
|
|
2341
|
-
height: e.emptyImgHeightSM
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
};
|
|
2346
|
-
}, na = Ft("Empty", (e) => {
|
|
2347
|
-
const {
|
|
2348
|
-
componentCls: n,
|
|
2349
|
-
controlHeightLG: t,
|
|
2350
|
-
calc: r
|
|
2351
|
-
} = e, a = Dn(e, {
|
|
2352
|
-
emptyImgCls: `${n}-img`,
|
|
2353
|
-
emptyImgHeight: r(t).mul(2.5).equal(),
|
|
2354
|
-
emptyImgHeightMD: t,
|
|
2355
|
-
emptyImgHeightSM: r(t).mul(0.875).equal()
|
|
2356
|
-
});
|
|
2357
|
-
return [ea(a)];
|
|
2358
|
-
});
|
|
2359
|
-
var ta = function(e, n) {
|
|
2360
|
-
var t = {};
|
|
2361
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
2362
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
2363
|
-
n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
2364
|
-
return t;
|
|
2365
|
-
};
|
|
2366
|
-
const or = /* @__PURE__ */ o.createElement(tr, null), ar = /* @__PURE__ */ o.createElement(rr, null), gn = (e) => {
|
|
2367
|
-
var n, t, r, a, i, l, u, d;
|
|
2368
|
-
const {
|
|
2369
|
-
className: f,
|
|
2370
|
-
rootClassName: v,
|
|
2371
|
-
prefixCls: s,
|
|
2372
|
-
image: b = or,
|
|
2373
|
-
description: c,
|
|
2374
|
-
children: g,
|
|
2375
|
-
imageStyle: m,
|
|
2376
|
-
style: S,
|
|
2377
|
-
classNames: w,
|
|
2378
|
-
styles: h
|
|
2379
|
-
} = e, I = ta(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
|
|
2380
|
-
getPrefixCls: y,
|
|
2381
|
-
direction: T,
|
|
2382
|
-
empty: p
|
|
2383
|
-
} = o.useContext(at), E = y("empty", s), [z, V, q] = na(E), [_] = ut("Empty"), A = typeof c < "u" ? c : _ == null ? void 0 : _.description, U = typeof A == "string" ? A : "empty";
|
|
2384
|
-
let Q = null;
|
|
2385
|
-
if (typeof b == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
|
|
2386
|
-
alt: U,
|
|
2387
|
-
src: b
|
|
2388
|
-
}) : Q = b, process.env.NODE_ENV !== "production") {
|
|
2389
|
-
const G = it("Empty");
|
|
2390
|
-
[["imageStyle", "styles: { image: {} }"]].forEach((j) => {
|
|
2391
|
-
let [ne, Z] = j;
|
|
2392
|
-
G.deprecated(!(ne in e), ne, Z);
|
|
2393
|
-
});
|
|
2394
|
-
}
|
|
2395
|
-
return z(/* @__PURE__ */ o.createElement("div", Object.assign({
|
|
2396
|
-
className: Be(V, q, E, p == null ? void 0 : p.className, {
|
|
2397
|
-
[`${E}-normal`]: b === ar,
|
|
2398
|
-
[`${E}-rtl`]: T === "rtl"
|
|
2399
|
-
}, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root, w == null ? void 0 : w.root),
|
|
2400
|
-
style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style), h == null ? void 0 : h.root), S)
|
|
2401
|
-
}, I), /* @__PURE__ */ o.createElement("div", {
|
|
2402
|
-
className: Be(`${E}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, w == null ? void 0 : w.image),
|
|
2403
|
-
style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), h == null ? void 0 : h.image)
|
|
2404
|
-
}, Q), A && /* @__PURE__ */ o.createElement("div", {
|
|
2405
|
-
className: Be(`${E}-description`, (i = p == null ? void 0 : p.classNames) === null || i === void 0 ? void 0 : i.description, w == null ? void 0 : w.description),
|
|
2406
|
-
style: Object.assign(Object.assign({}, (l = p == null ? void 0 : p.styles) === null || l === void 0 ? void 0 : l.description), h == null ? void 0 : h.description)
|
|
2407
|
-
}, A), g && /* @__PURE__ */ o.createElement("div", {
|
|
2408
|
-
className: Be(`${E}-footer`, (u = p == null ? void 0 : p.classNames) === null || u === void 0 ? void 0 : u.footer, w == null ? void 0 : w.footer),
|
|
2409
|
-
style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), h == null ? void 0 : h.footer)
|
|
2410
|
-
}, g)));
|
|
2411
|
-
};
|
|
2412
|
-
gn.PRESENTED_IMAGE_DEFAULT = or;
|
|
2413
|
-
gn.PRESENTED_IMAGE_SIMPLE = ar;
|
|
2414
|
-
process.env.NODE_ENV !== "production" && (gn.displayName = "Empty");
|
|
2415
|
-
const ra = (e) => {
|
|
2416
|
-
const {
|
|
2417
|
-
componentName: n
|
|
2418
|
-
} = e, {
|
|
2419
|
-
getPrefixCls: t
|
|
2420
|
-
} = pr(at), r = t("empty");
|
|
2421
|
-
switch (n) {
|
|
2422
|
-
case "Table":
|
|
2423
|
-
case "List":
|
|
2424
|
-
return /* @__PURE__ */ On.createElement(gn, {
|
|
2425
|
-
image: gn.PRESENTED_IMAGE_SIMPLE
|
|
2426
|
-
});
|
|
2427
|
-
case "Select":
|
|
2428
|
-
case "TreeSelect":
|
|
2429
|
-
case "Cascader":
|
|
2430
|
-
case "Transfer":
|
|
2431
|
-
case "Mentions":
|
|
2432
|
-
return /* @__PURE__ */ On.createElement(gn, {
|
|
2433
|
-
image: gn.PRESENTED_IMAGE_SIMPLE,
|
|
2434
|
-
className: `${r}-small`
|
|
2435
|
-
});
|
|
2436
|
-
case "Table.filter":
|
|
2437
|
-
return null;
|
|
2438
|
-
default:
|
|
2439
|
-
return /* @__PURE__ */ On.createElement(gn, null);
|
|
2440
|
-
}
|
|
2441
|
-
}, oa = (e) => {
|
|
2442
|
-
const t = {
|
|
2443
|
-
overflow: {
|
|
2444
|
-
adjustX: !0,
|
|
2445
|
-
adjustY: !0,
|
|
2446
|
-
shiftY: !0
|
|
2447
|
-
},
|
|
2448
|
-
htmlRegion: e === "scroll" ? "scroll" : "visible",
|
|
2449
|
-
dynamicInset: !0
|
|
2450
|
-
};
|
|
2451
|
-
return {
|
|
2452
|
-
bottomLeft: Object.assign(Object.assign({}, t), {
|
|
2453
|
-
points: ["tl", "bl"],
|
|
2454
|
-
offset: [0, 4]
|
|
2455
|
-
}),
|
|
2456
|
-
bottomRight: Object.assign(Object.assign({}, t), {
|
|
2457
|
-
points: ["tr", "br"],
|
|
2458
|
-
offset: [0, 4]
|
|
2459
|
-
}),
|
|
2460
|
-
topLeft: Object.assign(Object.assign({}, t), {
|
|
2461
|
-
points: ["bl", "tl"],
|
|
2462
|
-
offset: [0, -4]
|
|
2463
|
-
}),
|
|
2464
|
-
topRight: Object.assign(Object.assign({}, t), {
|
|
2465
|
-
points: ["br", "tr"],
|
|
2466
|
-
offset: [0, -4]
|
|
2467
|
-
})
|
|
2468
|
-
};
|
|
2469
|
-
};
|
|
2470
|
-
function aa(e, n) {
|
|
2471
|
-
return e || oa(n);
|
|
2472
|
-
}
|
|
2473
|
-
const zt = (e) => {
|
|
2474
|
-
const {
|
|
2475
|
-
optionHeight: n,
|
|
2476
|
-
optionFontSize: t,
|
|
2477
|
-
optionLineHeight: r,
|
|
2478
|
-
optionPadding: a
|
|
2479
|
-
} = e;
|
|
2480
|
-
return {
|
|
2481
|
-
position: "relative",
|
|
2482
|
-
display: "block",
|
|
2483
|
-
minHeight: n,
|
|
2484
|
-
padding: a,
|
|
2485
|
-
color: e.colorText,
|
|
2486
|
-
fontWeight: "normal",
|
|
2487
|
-
fontSize: t,
|
|
2488
|
-
lineHeight: r,
|
|
2489
|
-
boxSizing: "border-box"
|
|
2490
|
-
};
|
|
2491
|
-
}, ia = (e) => {
|
|
2492
|
-
const {
|
|
2493
|
-
antCls: n,
|
|
2494
|
-
componentCls: t
|
|
2495
|
-
} = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`, i = `&${n}-slide-up-appear${n}-slide-up-appear-active`, l = `&${n}-slide-up-leave${n}-slide-up-leave-active`, u = `${t}-dropdown-placement-`, d = `${r}-option-selected`;
|
|
2496
|
-
return [
|
|
2497
|
-
{
|
|
2498
|
-
[`${t}-dropdown`]: Object.assign(Object.assign({}, lt(e)), {
|
|
2499
|
-
position: "absolute",
|
|
2500
|
-
top: -9999,
|
|
2501
|
-
zIndex: e.zIndexPopup,
|
|
2502
|
-
boxSizing: "border-box",
|
|
2503
|
-
padding: e.paddingXXS,
|
|
2504
|
-
overflow: "hidden",
|
|
2505
|
-
fontSize: e.fontSize,
|
|
2506
|
-
// Fix select render lag of long text in chrome
|
|
2507
|
-
// https://github.com/ant-design/ant-design/issues/11456
|
|
2508
|
-
// https://github.com/ant-design/ant-design/issues/11843
|
|
2509
|
-
fontVariant: "initial",
|
|
2510
|
-
backgroundColor: e.colorBgElevated,
|
|
2511
|
-
borderRadius: e.borderRadiusLG,
|
|
2512
|
-
outline: "none",
|
|
2513
|
-
boxShadow: e.boxShadowSecondary,
|
|
2514
|
-
[`
|
|
2515
|
-
${a}${u}bottomLeft,
|
|
2516
|
-
${i}${u}bottomLeft
|
|
2517
|
-
`]: {
|
|
2518
|
-
animationName: Pr
|
|
2519
|
-
},
|
|
2520
|
-
[`
|
|
2521
|
-
${a}${u}topLeft,
|
|
2522
|
-
${i}${u}topLeft,
|
|
2523
|
-
${a}${u}topRight,
|
|
2524
|
-
${i}${u}topRight
|
|
2525
|
-
`]: {
|
|
2526
|
-
animationName: _r
|
|
2527
|
-
},
|
|
2528
|
-
[`${l}${u}bottomLeft`]: {
|
|
2529
|
-
animationName: Tr
|
|
2530
|
-
},
|
|
2531
|
-
[`
|
|
2532
|
-
${l}${u}topLeft,
|
|
2533
|
-
${l}${u}topRight
|
|
2534
|
-
`]: {
|
|
2535
|
-
animationName: Lr
|
|
2536
|
-
},
|
|
2537
|
-
"&-hidden": {
|
|
2538
|
-
display: "none"
|
|
2539
|
-
},
|
|
2540
|
-
[r]: Object.assign(Object.assign({}, zt(e)), {
|
|
2541
|
-
cursor: "pointer",
|
|
2542
|
-
transition: `background ${e.motionDurationSlow} ease`,
|
|
2543
|
-
borderRadius: e.borderRadiusSM,
|
|
2544
|
-
// =========== Group ============
|
|
2545
|
-
"&-group": {
|
|
2546
|
-
color: e.colorTextDescription,
|
|
2547
|
-
fontSize: e.fontSizeSM,
|
|
2548
|
-
cursor: "default"
|
|
2549
|
-
},
|
|
2550
|
-
// =========== Option ===========
|
|
2551
|
-
"&-option": {
|
|
2552
|
-
display: "flex",
|
|
2553
|
-
"&-content": Object.assign({
|
|
2554
|
-
flex: "auto"
|
|
2555
|
-
}, Zn),
|
|
2556
|
-
"&-state": {
|
|
2557
|
-
flex: "none",
|
|
2558
|
-
display: "flex",
|
|
2559
|
-
alignItems: "center"
|
|
2560
|
-
},
|
|
2561
|
-
[`&-active:not(${r}-option-disabled)`]: {
|
|
2562
|
-
backgroundColor: e.optionActiveBg
|
|
2563
|
-
},
|
|
2564
|
-
[`&-selected:not(${r}-option-disabled)`]: {
|
|
2565
|
-
color: e.optionSelectedColor,
|
|
2566
|
-
fontWeight: e.optionSelectedFontWeight,
|
|
2567
|
-
backgroundColor: e.optionSelectedBg,
|
|
2568
|
-
[`${r}-option-state`]: {
|
|
2569
|
-
color: e.colorPrimary
|
|
2570
|
-
}
|
|
2571
|
-
},
|
|
2572
|
-
"&-disabled": {
|
|
2573
|
-
[`&${r}-option-selected`]: {
|
|
2574
|
-
backgroundColor: e.colorBgContainerDisabled
|
|
2575
|
-
},
|
|
2576
|
-
color: e.colorTextDisabled,
|
|
2577
|
-
cursor: "not-allowed"
|
|
2578
|
-
},
|
|
2579
|
-
"&-grouped": {
|
|
2580
|
-
paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
|
|
2581
|
-
}
|
|
2582
|
-
},
|
|
2583
|
-
"&-empty": Object.assign(Object.assign({}, zt(e)), {
|
|
2584
|
-
color: e.colorTextDisabled
|
|
2585
|
-
})
|
|
2586
|
-
}),
|
|
2587
|
-
// https://github.com/ant-design/ant-design/pull/46646
|
|
2588
|
-
[`${d}:has(+ ${d})`]: {
|
|
2589
|
-
borderEndStartRadius: 0,
|
|
2590
|
-
borderEndEndRadius: 0,
|
|
2591
|
-
[`& + ${d}`]: {
|
|
2592
|
-
borderStartStartRadius: 0,
|
|
2593
|
-
borderStartEndRadius: 0
|
|
2594
|
-
}
|
|
2595
|
-
},
|
|
2596
|
-
// =========================== RTL ===========================
|
|
2597
|
-
"&-rtl": {
|
|
2598
|
-
direction: "rtl"
|
|
2599
|
-
}
|
|
2600
|
-
})
|
|
2601
|
-
},
|
|
2602
|
-
// Follow code may reuse in other components
|
|
2603
|
-
It(e, "slide-up"),
|
|
2604
|
-
It(e, "slide-down"),
|
|
2605
|
-
Et(e, "move-up"),
|
|
2606
|
-
Et(e, "move-down")
|
|
2607
|
-
];
|
|
2608
|
-
}, la = (e) => {
|
|
2609
|
-
const {
|
|
2610
|
-
multipleSelectItemHeight: n,
|
|
2611
|
-
paddingXXS: t,
|
|
2612
|
-
lineWidth: r,
|
|
2613
|
-
INTERNAL_FIXED_ITEM_MARGIN: a
|
|
2614
|
-
} = e, i = e.max(e.calc(t).sub(r).equal(), 0), l = e.max(e.calc(i).sub(a).equal(), 0);
|
|
2615
|
-
return {
|
|
2616
|
-
basePadding: i,
|
|
2617
|
-
containerPadding: l,
|
|
2618
|
-
itemHeight: He(n),
|
|
2619
|
-
itemLineHeight: He(e.calc(n).sub(e.calc(e.lineWidth).mul(2)).equal())
|
|
2620
|
-
};
|
|
2621
|
-
}, ua = (e) => {
|
|
2622
|
-
const {
|
|
2623
|
-
multipleSelectItemHeight: n,
|
|
2624
|
-
selectHeight: t,
|
|
2625
|
-
lineWidth: r
|
|
2626
|
-
} = e;
|
|
2627
|
-
return e.calc(t).sub(n).div(2).sub(r).equal();
|
|
2628
|
-
}, ca = (e) => {
|
|
2629
|
-
const {
|
|
2630
|
-
componentCls: n,
|
|
2631
|
-
iconCls: t,
|
|
2632
|
-
borderRadiusSM: r,
|
|
2633
|
-
motionDurationSlow: a,
|
|
2634
|
-
paddingXS: i,
|
|
2635
|
-
multipleItemColorDisabled: l,
|
|
2636
|
-
multipleItemBorderColorDisabled: u,
|
|
2637
|
-
colorIcon: d,
|
|
2638
|
-
colorIconHover: f,
|
|
2639
|
-
INTERNAL_FIXED_ITEM_MARGIN: v
|
|
2640
|
-
} = e;
|
|
2641
|
-
return {
|
|
2642
|
-
/**
|
|
2643
|
-
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
|
|
2644
|
-
* may update to redesign with its align logic.
|
|
2645
|
-
*/
|
|
2646
|
-
// =========================== Overflow ===========================
|
|
2647
|
-
[`${n}-selection-overflow`]: {
|
|
2648
|
-
position: "relative",
|
|
2649
|
-
display: "flex",
|
|
2650
|
-
flex: "auto",
|
|
2651
|
-
flexWrap: "wrap",
|
|
2652
|
-
maxWidth: "100%",
|
|
2653
|
-
"&-item": {
|
|
2654
|
-
flex: "none",
|
|
2655
|
-
alignSelf: "center",
|
|
2656
|
-
maxWidth: "100%",
|
|
2657
|
-
display: "inline-flex"
|
|
2658
|
-
},
|
|
2659
|
-
// ======================== Selections ==========================
|
|
2660
|
-
[`${n}-selection-item`]: {
|
|
2661
|
-
display: "flex",
|
|
2662
|
-
alignSelf: "center",
|
|
2663
|
-
flex: "none",
|
|
2664
|
-
boxSizing: "border-box",
|
|
2665
|
-
maxWidth: "100%",
|
|
2666
|
-
marginBlock: v,
|
|
2667
|
-
borderRadius: r,
|
|
2668
|
-
cursor: "default",
|
|
2669
|
-
transition: `font-size ${a}, line-height ${a}, height ${a}`,
|
|
2670
|
-
marginInlineEnd: e.calc(v).mul(2).equal(),
|
|
2671
|
-
paddingInlineStart: i,
|
|
2672
|
-
paddingInlineEnd: e.calc(i).div(2).equal(),
|
|
2673
|
-
[`${n}-disabled&`]: {
|
|
2674
|
-
color: l,
|
|
2675
|
-
borderColor: u,
|
|
2676
|
-
cursor: "not-allowed"
|
|
2677
|
-
},
|
|
2678
|
-
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
|
|
2679
|
-
"&-content": {
|
|
2680
|
-
display: "inline-block",
|
|
2681
|
-
marginInlineEnd: e.calc(i).div(2).equal(),
|
|
2682
|
-
overflow: "hidden",
|
|
2683
|
-
whiteSpace: "pre",
|
|
2684
|
-
// fix whitespace wrapping. custom tags display all whitespace within.
|
|
2685
|
-
textOverflow: "ellipsis"
|
|
2686
|
-
},
|
|
2687
|
-
"&-remove": Object.assign(Object.assign({}, At()), {
|
|
2688
|
-
display: "inline-flex",
|
|
2689
|
-
alignItems: "center",
|
|
2690
|
-
color: d,
|
|
2691
|
-
fontWeight: "bold",
|
|
2692
|
-
fontSize: 10,
|
|
2693
|
-
lineHeight: "inherit",
|
|
2694
|
-
cursor: "pointer",
|
|
2695
|
-
[`> ${t}`]: {
|
|
2696
|
-
verticalAlign: "-0.2em"
|
|
2697
|
-
},
|
|
2698
|
-
"&:hover": {
|
|
2699
|
-
color: f
|
|
2700
|
-
}
|
|
2701
|
-
})
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
};
|
|
2705
|
-
}, sa = (e, n) => {
|
|
2706
|
-
const {
|
|
2707
|
-
componentCls: t,
|
|
2708
|
-
INTERNAL_FIXED_ITEM_MARGIN: r
|
|
2709
|
-
} = e, a = `${t}-selection-overflow`, i = e.multipleSelectItemHeight, l = ua(e), u = n ? `${t}-${n}` : "", d = la(e);
|
|
2710
|
-
return {
|
|
2711
|
-
[`${t}-multiple${u}`]: Object.assign(Object.assign({}, ca(e)), {
|
|
2712
|
-
// ========================= Selector =========================
|
|
2713
|
-
[`${t}-selector`]: {
|
|
2714
|
-
display: "flex",
|
|
2715
|
-
alignItems: "center",
|
|
2716
|
-
width: "100%",
|
|
2717
|
-
height: "100%",
|
|
2718
|
-
// Multiple is little different that horizontal is follow the vertical
|
|
2719
|
-
paddingInline: d.basePadding,
|
|
2720
|
-
paddingBlock: d.containerPadding,
|
|
2721
|
-
borderRadius: e.borderRadius,
|
|
2722
|
-
[`${t}-disabled&`]: {
|
|
2723
|
-
background: e.multipleSelectorBgDisabled,
|
|
2724
|
-
cursor: "not-allowed"
|
|
2725
|
-
},
|
|
2726
|
-
"&:after": {
|
|
2727
|
-
display: "inline-block",
|
|
2728
|
-
width: 0,
|
|
2729
|
-
margin: `${He(r)} 0`,
|
|
2730
|
-
lineHeight: He(i),
|
|
2731
|
-
visibility: "hidden",
|
|
2732
|
-
content: '"\\a0"'
|
|
2733
|
-
}
|
|
2734
|
-
},
|
|
2735
|
-
// ======================== Selections ========================
|
|
2736
|
-
[`${t}-selection-item`]: {
|
|
2737
|
-
height: d.itemHeight,
|
|
2738
|
-
lineHeight: He(d.itemLineHeight)
|
|
2739
|
-
},
|
|
2740
|
-
// ========================== Wrap ===========================
|
|
2741
|
-
[`${t}-selection-wrap`]: {
|
|
2742
|
-
alignSelf: "flex-start",
|
|
2743
|
-
"&:after": {
|
|
2744
|
-
lineHeight: He(i),
|
|
2745
|
-
marginBlock: r
|
|
2746
|
-
}
|
|
2747
|
-
},
|
|
2748
|
-
// ========================== Input ==========================
|
|
2749
|
-
[`${t}-prefix`]: {
|
|
2750
|
-
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal()
|
|
2751
|
-
},
|
|
2752
|
-
[`${a}-item + ${a}-item,
|
|
2753
|
-
${t}-prefix + ${t}-selection-wrap
|
|
2754
|
-
`]: {
|
|
2755
|
-
[`${t}-selection-search`]: {
|
|
2756
|
-
marginInlineStart: 0
|
|
2757
|
-
},
|
|
2758
|
-
[`${t}-selection-placeholder`]: {
|
|
2759
|
-
insetInlineStart: 0
|
|
2760
|
-
}
|
|
2761
|
-
},
|
|
2762
|
-
// https://github.com/ant-design/ant-design/issues/44754
|
|
2763
|
-
// Same as `wrap:after`
|
|
2764
|
-
[`${a}-item-suffix`]: {
|
|
2765
|
-
minHeight: d.itemHeight,
|
|
2766
|
-
marginBlock: r
|
|
2767
|
-
},
|
|
2768
|
-
[`${t}-selection-search`]: {
|
|
2769
|
-
display: "inline-flex",
|
|
2770
|
-
position: "relative",
|
|
2771
|
-
maxWidth: "100%",
|
|
2772
|
-
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),
|
|
2773
|
-
"\n &-input,\n &-mirror\n ": {
|
|
2774
|
-
height: i,
|
|
2775
|
-
fontFamily: e.fontFamily,
|
|
2776
|
-
lineHeight: He(i),
|
|
2777
|
-
transition: `all ${e.motionDurationSlow}`
|
|
2778
|
-
},
|
|
2779
|
-
"&-input": {
|
|
2780
|
-
width: "100%",
|
|
2781
|
-
minWidth: 4.1
|
|
2782
|
-
// fix search cursor missing
|
|
2783
|
-
},
|
|
2784
|
-
"&-mirror": {
|
|
2785
|
-
position: "absolute",
|
|
2786
|
-
top: 0,
|
|
2787
|
-
insetInlineStart: 0,
|
|
2788
|
-
insetInlineEnd: "auto",
|
|
2789
|
-
zIndex: 999,
|
|
2790
|
-
whiteSpace: "pre",
|
|
2791
|
-
// fix whitespace wrapping caused width calculation bug
|
|
2792
|
-
visibility: "hidden"
|
|
2793
|
-
}
|
|
2794
|
-
},
|
|
2795
|
-
// ======================= Placeholder =======================
|
|
2796
|
-
[`${t}-selection-placeholder`]: {
|
|
2797
|
-
position: "absolute",
|
|
2798
|
-
top: "50%",
|
|
2799
|
-
insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal(),
|
|
2800
|
-
insetInlineEnd: e.inputPaddingHorizontalBase,
|
|
2801
|
-
transform: "translateY(-50%)",
|
|
2802
|
-
transition: `all ${e.motionDurationSlow}`
|
|
2803
|
-
}
|
|
2804
|
-
})
|
|
2805
|
-
};
|
|
2806
|
-
};
|
|
2807
|
-
function Yn(e, n) {
|
|
2808
|
-
const {
|
|
2809
|
-
componentCls: t
|
|
2810
|
-
} = e, r = n ? `${t}-${n}` : "", a = {
|
|
2811
|
-
[`${t}-multiple${r}`]: {
|
|
2812
|
-
fontSize: e.fontSize,
|
|
2813
|
-
// ========================= Selector =========================
|
|
2814
|
-
[`${t}-selector`]: {
|
|
2815
|
-
[`${t}-show-search&`]: {
|
|
2816
|
-
cursor: "text"
|
|
2817
|
-
}
|
|
2818
|
-
},
|
|
2819
|
-
[`
|
|
2820
|
-
&${t}-show-arrow ${t}-selector,
|
|
2821
|
-
&${t}-allow-clear ${t}-selector
|
|
2822
|
-
`]: {
|
|
2823
|
-
paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
};
|
|
2827
|
-
return [sa(e, n), a];
|
|
2828
|
-
}
|
|
2829
|
-
const da = (e) => {
|
|
2830
|
-
const {
|
|
2831
|
-
componentCls: n
|
|
2832
|
-
} = e, t = Dn(e, {
|
|
2833
|
-
selectHeight: e.controlHeightSM,
|
|
2834
|
-
multipleSelectItemHeight: e.multipleItemHeightSM,
|
|
2835
|
-
borderRadius: e.borderRadiusSM,
|
|
2836
|
-
borderRadiusSM: e.borderRadiusXS
|
|
2837
|
-
}), r = Dn(e, {
|
|
2838
|
-
fontSize: e.fontSizeLG,
|
|
2839
|
-
selectHeight: e.controlHeightLG,
|
|
2840
|
-
multipleSelectItemHeight: e.multipleItemHeightLG,
|
|
2841
|
-
borderRadius: e.borderRadiusLG,
|
|
2842
|
-
borderRadiusSM: e.borderRadius
|
|
2843
|
-
});
|
|
2844
|
-
return [
|
|
2845
|
-
Yn(e),
|
|
2846
|
-
// ======================== Small ========================
|
|
2847
|
-
Yn(t, "sm"),
|
|
2848
|
-
// Padding
|
|
2849
|
-
{
|
|
2850
|
-
[`${n}-multiple${n}-sm`]: {
|
|
2851
|
-
[`${n}-selection-placeholder`]: {
|
|
2852
|
-
insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
|
|
2853
|
-
},
|
|
2854
|
-
// https://github.com/ant-design/ant-design/issues/29559
|
|
2855
|
-
[`${n}-selection-search`]: {
|
|
2856
|
-
marginInlineStart: 2
|
|
2857
|
-
// Magic Number
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
},
|
|
2861
|
-
// ======================== Large ========================
|
|
2862
|
-
Yn(r, "lg")
|
|
2863
|
-
];
|
|
2864
|
-
};
|
|
2865
|
-
function qn(e, n) {
|
|
2866
|
-
const {
|
|
2867
|
-
componentCls: t,
|
|
2868
|
-
inputPaddingHorizontalBase: r,
|
|
2869
|
-
borderRadius: a
|
|
2870
|
-
} = e, i = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), l = n ? `${t}-${n}` : "";
|
|
2871
|
-
return {
|
|
2872
|
-
[`${t}-single${l}`]: {
|
|
2873
|
-
fontSize: e.fontSize,
|
|
2874
|
-
height: e.controlHeight,
|
|
2875
|
-
// ========================= Selector =========================
|
|
2876
|
-
[`${t}-selector`]: Object.assign(Object.assign({}, lt(e, !0)), {
|
|
2877
|
-
display: "flex",
|
|
2878
|
-
borderRadius: a,
|
|
2879
|
-
flex: "1 1 auto",
|
|
2880
|
-
[`${t}-selection-search`]: {
|
|
2881
|
-
position: "absolute",
|
|
2882
|
-
inset: 0,
|
|
2883
|
-
width: "100%",
|
|
2884
|
-
"&-input": {
|
|
2885
|
-
width: "100%",
|
|
2886
|
-
WebkitAppearance: "textfield"
|
|
2887
|
-
}
|
|
2888
|
-
},
|
|
2889
|
-
[`
|
|
2890
|
-
${t}-selection-item,
|
|
2891
|
-
${t}-selection-placeholder
|
|
2892
|
-
`]: {
|
|
2893
|
-
display: "block",
|
|
2894
|
-
padding: 0,
|
|
2895
|
-
lineHeight: He(i),
|
|
2896
|
-
transition: `all ${e.motionDurationSlow}, visibility 0s`,
|
|
2897
|
-
alignSelf: "center"
|
|
2898
|
-
},
|
|
2899
|
-
[`${t}-selection-placeholder`]: {
|
|
2900
|
-
transition: "none",
|
|
2901
|
-
pointerEvents: "none"
|
|
2902
|
-
},
|
|
2903
|
-
// For common baseline align
|
|
2904
|
-
[[
|
|
2905
|
-
"&:after",
|
|
2906
|
-
/* For '' value baseline align */
|
|
2907
|
-
`${t}-selection-item:empty:after`,
|
|
2908
|
-
/* For undefined value baseline align */
|
|
2909
|
-
`${t}-selection-placeholder:empty:after`
|
|
2910
|
-
].join(",")]: {
|
|
2911
|
-
display: "inline-block",
|
|
2912
|
-
width: 0,
|
|
2913
|
-
visibility: "hidden",
|
|
2914
|
-
content: '"\\a0"'
|
|
2915
|
-
}
|
|
2916
|
-
}),
|
|
2917
|
-
[`
|
|
2918
|
-
&${t}-show-arrow ${t}-selection-item,
|
|
2919
|
-
&${t}-show-arrow ${t}-selection-search,
|
|
2920
|
-
&${t}-show-arrow ${t}-selection-placeholder
|
|
2921
|
-
`]: {
|
|
2922
|
-
paddingInlineEnd: e.showArrowPaddingInlineEnd
|
|
2923
|
-
},
|
|
2924
|
-
// Opacity selection if open
|
|
2925
|
-
[`&${t}-open ${t}-selection-item`]: {
|
|
2926
|
-
color: e.colorTextPlaceholder
|
|
2927
|
-
},
|
|
2928
|
-
// ========================== Input ==========================
|
|
2929
|
-
// We only change the style of non-customize input which is only support by `combobox` mode.
|
|
2930
|
-
// Not customize
|
|
2931
|
-
[`&:not(${t}-customize-input)`]: {
|
|
2932
|
-
[`${t}-selector`]: {
|
|
2933
|
-
width: "100%",
|
|
2934
|
-
height: "100%",
|
|
2935
|
-
alignItems: "center",
|
|
2936
|
-
padding: `0 ${He(r)}`,
|
|
2937
|
-
[`${t}-selection-search-input`]: {
|
|
2938
|
-
height: i
|
|
2939
|
-
},
|
|
2940
|
-
"&:after": {
|
|
2941
|
-
lineHeight: He(i)
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
},
|
|
2945
|
-
[`&${t}-customize-input`]: {
|
|
2946
|
-
[`${t}-selector`]: {
|
|
2947
|
-
"&:after": {
|
|
2948
|
-
display: "none"
|
|
2949
|
-
},
|
|
2950
|
-
[`${t}-selection-search`]: {
|
|
2951
|
-
position: "static",
|
|
2952
|
-
width: "100%"
|
|
2953
|
-
},
|
|
2954
|
-
[`${t}-selection-placeholder`]: {
|
|
2955
|
-
position: "absolute",
|
|
2956
|
-
insetInlineStart: 0,
|
|
2957
|
-
insetInlineEnd: 0,
|
|
2958
|
-
padding: `0 ${He(r)}`,
|
|
2959
|
-
"&:after": {
|
|
2960
|
-
display: "none"
|
|
2961
|
-
}
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
};
|
|
2967
|
-
}
|
|
2968
|
-
function fa(e) {
|
|
2969
|
-
const {
|
|
2970
|
-
componentCls: n
|
|
2971
|
-
} = e, t = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
|
|
2972
|
-
return [
|
|
2973
|
-
qn(e),
|
|
2974
|
-
// ======================== Small ========================
|
|
2975
|
-
// Shared
|
|
2976
|
-
qn(Dn(e, {
|
|
2977
|
-
controlHeight: e.controlHeightSM,
|
|
2978
|
-
borderRadius: e.borderRadiusSM
|
|
2979
|
-
}), "sm"),
|
|
2980
|
-
// padding
|
|
2981
|
-
{
|
|
2982
|
-
[`${n}-single${n}-sm`]: {
|
|
2983
|
-
[`&:not(${n}-customize-input)`]: {
|
|
2984
|
-
[`${n}-selector`]: {
|
|
2985
|
-
padding: `0 ${He(t)}`
|
|
2986
|
-
},
|
|
2987
|
-
// With arrow should provides `padding-right` to show the arrow
|
|
2988
|
-
[`&${n}-show-arrow ${n}-selection-search`]: {
|
|
2989
|
-
insetInlineEnd: e.calc(t).add(e.calc(e.fontSize).mul(1.5)).equal()
|
|
2990
|
-
},
|
|
2991
|
-
[`
|
|
2992
|
-
&${n}-show-arrow ${n}-selection-item,
|
|
2993
|
-
&${n}-show-arrow ${n}-selection-placeholder
|
|
2994
|
-
`]: {
|
|
2995
|
-
paddingInlineEnd: e.calc(e.fontSize).mul(1.5).equal()
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
}
|
|
2999
|
-
},
|
|
3000
|
-
// ======================== Large ========================
|
|
3001
|
-
// Shared
|
|
3002
|
-
qn(Dn(e, {
|
|
3003
|
-
controlHeight: e.singleItemHeightLG,
|
|
3004
|
-
fontSize: e.fontSizeLG,
|
|
3005
|
-
borderRadius: e.borderRadiusLG
|
|
3006
|
-
}), "lg")
|
|
3007
|
-
];
|
|
3008
|
-
}
|
|
3009
|
-
const ma = (e) => {
|
|
3010
|
-
const {
|
|
3011
|
-
fontSize: n,
|
|
3012
|
-
lineHeight: t,
|
|
3013
|
-
lineWidth: r,
|
|
3014
|
-
controlHeight: a,
|
|
3015
|
-
controlHeightSM: i,
|
|
3016
|
-
controlHeightLG: l,
|
|
3017
|
-
paddingXXS: u,
|
|
3018
|
-
controlPaddingHorizontal: d,
|
|
3019
|
-
zIndexPopupBase: f,
|
|
3020
|
-
colorText: v,
|
|
3021
|
-
fontWeightStrong: s,
|
|
3022
|
-
controlItemBgActive: b,
|
|
3023
|
-
controlItemBgHover: c,
|
|
3024
|
-
colorBgContainer: g,
|
|
3025
|
-
colorFillSecondary: m,
|
|
3026
|
-
colorBgContainerDisabled: S,
|
|
3027
|
-
colorTextDisabled: w,
|
|
3028
|
-
colorPrimaryHover: h,
|
|
3029
|
-
colorPrimary: I,
|
|
3030
|
-
controlOutline: y
|
|
3031
|
-
} = e, T = u * 2, p = r * 2, E = Math.min(a - T, a - p), z = Math.min(i - T, i - p), V = Math.min(l - T, l - p);
|
|
3032
|
-
return {
|
|
3033
|
-
INTERNAL_FIXED_ITEM_MARGIN: Math.floor(u / 2),
|
|
3034
|
-
zIndexPopup: f + 50,
|
|
3035
|
-
optionSelectedColor: v,
|
|
3036
|
-
optionSelectedFontWeight: s,
|
|
3037
|
-
optionSelectedBg: b,
|
|
3038
|
-
optionActiveBg: c,
|
|
3039
|
-
optionPadding: `${(a - n * t) / 2}px ${d}px`,
|
|
3040
|
-
optionFontSize: n,
|
|
3041
|
-
optionLineHeight: t,
|
|
3042
|
-
optionHeight: a,
|
|
3043
|
-
selectorBg: g,
|
|
3044
|
-
clearBg: g,
|
|
3045
|
-
singleItemHeightLG: l,
|
|
3046
|
-
multipleItemBg: m,
|
|
3047
|
-
multipleItemBorderColor: "transparent",
|
|
3048
|
-
multipleItemHeight: E,
|
|
3049
|
-
multipleItemHeightSM: z,
|
|
3050
|
-
multipleItemHeightLG: V,
|
|
3051
|
-
multipleSelectorBgDisabled: S,
|
|
3052
|
-
multipleItemColorDisabled: w,
|
|
3053
|
-
multipleItemBorderColorDisabled: "transparent",
|
|
3054
|
-
showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
|
|
3055
|
-
hoverBorderColor: h,
|
|
3056
|
-
activeBorderColor: I,
|
|
3057
|
-
activeOutlineColor: y,
|
|
3058
|
-
selectAffixPadding: u
|
|
3059
|
-
};
|
|
3060
|
-
}, ir = (e, n) => {
|
|
3061
|
-
const {
|
|
3062
|
-
componentCls: t,
|
|
3063
|
-
antCls: r,
|
|
3064
|
-
controlOutlineWidth: a
|
|
3065
|
-
} = e;
|
|
3066
|
-
return {
|
|
3067
|
-
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3068
|
-
border: `${He(e.lineWidth)} ${e.lineType} ${n.borderColor}`,
|
|
3069
|
-
background: e.selectorBg
|
|
3070
|
-
},
|
|
3071
|
-
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
3072
|
-
[`&:hover ${t}-selector`]: {
|
|
3073
|
-
borderColor: n.hoverBorderHover
|
|
3074
|
-
},
|
|
3075
|
-
[`${t}-focused& ${t}-selector`]: {
|
|
3076
|
-
borderColor: n.activeBorderColor,
|
|
3077
|
-
boxShadow: `0 0 0 ${He(a)} ${n.activeOutlineColor}`,
|
|
3078
|
-
outline: 0
|
|
3079
|
-
},
|
|
3080
|
-
[`${t}-prefix`]: {
|
|
3081
|
-
color: n.color
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
};
|
|
3085
|
-
}, Bt = (e, n) => ({
|
|
3086
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, ir(e, n))
|
|
3087
|
-
}), va = (e) => ({
|
|
3088
|
-
"&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, ir(e, {
|
|
3089
|
-
borderColor: e.colorBorder,
|
|
3090
|
-
hoverBorderHover: e.hoverBorderColor,
|
|
3091
|
-
activeBorderColor: e.activeBorderColor,
|
|
3092
|
-
activeOutlineColor: e.activeOutlineColor,
|
|
3093
|
-
color: e.colorText
|
|
3094
|
-
})), Bt(e, {
|
|
3095
|
-
status: "error",
|
|
3096
|
-
borderColor: e.colorError,
|
|
3097
|
-
hoverBorderHover: e.colorErrorHover,
|
|
3098
|
-
activeBorderColor: e.colorError,
|
|
3099
|
-
activeOutlineColor: e.colorErrorOutline,
|
|
3100
|
-
color: e.colorError
|
|
3101
|
-
})), Bt(e, {
|
|
3102
|
-
status: "warning",
|
|
3103
|
-
borderColor: e.colorWarning,
|
|
3104
|
-
hoverBorderHover: e.colorWarningHover,
|
|
3105
|
-
activeBorderColor: e.colorWarning,
|
|
3106
|
-
activeOutlineColor: e.colorWarningOutline,
|
|
3107
|
-
color: e.colorWarning
|
|
3108
|
-
})), {
|
|
3109
|
-
[`&${e.componentCls}-disabled`]: {
|
|
3110
|
-
[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
|
|
3111
|
-
background: e.colorBgContainerDisabled,
|
|
3112
|
-
color: e.colorTextDisabled
|
|
3113
|
-
}
|
|
3114
|
-
},
|
|
3115
|
-
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3116
|
-
background: e.multipleItemBg,
|
|
3117
|
-
border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3118
|
-
}
|
|
3119
|
-
})
|
|
3120
|
-
}), lr = (e, n) => {
|
|
3121
|
-
const {
|
|
3122
|
-
componentCls: t,
|
|
3123
|
-
antCls: r
|
|
3124
|
-
} = e;
|
|
3125
|
-
return {
|
|
3126
|
-
[`&:not(${t}-customize-input) ${t}-selector`]: {
|
|
3127
|
-
background: n.bg,
|
|
3128
|
-
border: `${He(e.lineWidth)} ${e.lineType} transparent`,
|
|
3129
|
-
color: n.color
|
|
3130
|
-
},
|
|
3131
|
-
[`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
|
|
3132
|
-
[`&:hover ${t}-selector`]: {
|
|
3133
|
-
background: n.hoverBg
|
|
3134
|
-
},
|
|
3135
|
-
[`${t}-focused& ${t}-selector`]: {
|
|
3136
|
-
background: e.selectorBg,
|
|
3137
|
-
borderColor: n.activeBorderColor,
|
|
3138
|
-
outline: 0
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
};
|
|
3142
|
-
}, Vt = (e, n) => ({
|
|
3143
|
-
[`&${e.componentCls}-status-${n.status}`]: Object.assign({}, lr(e, n))
|
|
3144
|
-
}), ga = (e) => ({
|
|
3145
|
-
"&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, lr(e, {
|
|
3146
|
-
bg: e.colorFillTertiary,
|
|
3147
|
-
hoverBg: e.colorFillSecondary,
|
|
3148
|
-
activeBorderColor: e.activeBorderColor,
|
|
3149
|
-
color: e.colorText
|
|
3150
|
-
})), Vt(e, {
|
|
3151
|
-
status: "error",
|
|
3152
|
-
bg: e.colorErrorBg,
|
|
3153
|
-
hoverBg: e.colorErrorBgHover,
|
|
3154
|
-
activeBorderColor: e.colorError,
|
|
3155
|
-
color: e.colorError
|
|
3156
|
-
})), Vt(e, {
|
|
3157
|
-
status: "warning",
|
|
3158
|
-
bg: e.colorWarningBg,
|
|
3159
|
-
hoverBg: e.colorWarningBgHover,
|
|
3160
|
-
activeBorderColor: e.colorWarning,
|
|
3161
|
-
color: e.colorWarning
|
|
3162
|
-
})), {
|
|
3163
|
-
[`&${e.componentCls}-disabled`]: {
|
|
3164
|
-
[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
|
|
3165
|
-
borderColor: e.colorBorder,
|
|
3166
|
-
background: e.colorBgContainerDisabled,
|
|
3167
|
-
color: e.colorTextDisabled
|
|
3168
|
-
}
|
|
3169
|
-
},
|
|
3170
|
-
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3171
|
-
background: e.colorBgContainer,
|
|
3172
|
-
border: `${He(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
|
|
3173
|
-
}
|
|
3174
|
-
})
|
|
3175
|
-
}), pa = (e) => ({
|
|
3176
|
-
"&-borderless": {
|
|
3177
|
-
[`${e.componentCls}-selector`]: {
|
|
3178
|
-
background: "transparent",
|
|
3179
|
-
border: `${He(e.lineWidth)} ${e.lineType} transparent`
|
|
3180
|
-
},
|
|
3181
|
-
[`&${e.componentCls}-disabled`]: {
|
|
3182
|
-
[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
|
|
3183
|
-
color: e.colorTextDisabled
|
|
3184
|
-
}
|
|
3185
|
-
},
|
|
3186
|
-
[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
|
|
3187
|
-
background: e.multipleItemBg,
|
|
3188
|
-
border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
|
|
3189
|
-
},
|
|
3190
|
-
// Status
|
|
3191
|
-
[`&${e.componentCls}-status-error`]: {
|
|
3192
|
-
[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
|
|
3193
|
-
color: e.colorError
|
|
3194
|
-
}
|
|
3195
|
-
},
|
|
3196
|
-
[`&${e.componentCls}-status-warning`]: {
|
|
3197
|
-
[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
|
|
3198
|
-
color: e.colorWarning
|
|
3199
|
-
}
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
}), ha = (e) => ({
|
|
3203
|
-
[e.componentCls]: Object.assign(Object.assign(Object.assign({}, va(e)), ga(e)), pa(e))
|
|
3204
|
-
}), ba = (e) => {
|
|
3205
|
-
const {
|
|
3206
|
-
componentCls: n
|
|
3207
|
-
} = e;
|
|
3208
|
-
return {
|
|
3209
|
-
position: "relative",
|
|
3210
|
-
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
3211
|
-
input: {
|
|
3212
|
-
cursor: "pointer"
|
|
3213
|
-
},
|
|
3214
|
-
[`${n}-show-search&`]: {
|
|
3215
|
-
cursor: "text",
|
|
3216
|
-
input: {
|
|
3217
|
-
cursor: "auto",
|
|
3218
|
-
color: "inherit",
|
|
3219
|
-
height: "100%"
|
|
3220
|
-
}
|
|
3221
|
-
},
|
|
3222
|
-
[`${n}-disabled&`]: {
|
|
3223
|
-
cursor: "not-allowed",
|
|
3224
|
-
input: {
|
|
3225
|
-
cursor: "not-allowed"
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
};
|
|
3229
|
-
}, Sa = (e) => {
|
|
3230
|
-
const {
|
|
3231
|
-
componentCls: n
|
|
3232
|
-
} = e;
|
|
3233
|
-
return {
|
|
3234
|
-
[`${n}-selection-search-input`]: {
|
|
3235
|
-
margin: 0,
|
|
3236
|
-
padding: 0,
|
|
3237
|
-
background: "transparent",
|
|
3238
|
-
border: "none",
|
|
3239
|
-
outline: "none",
|
|
3240
|
-
appearance: "none",
|
|
3241
|
-
fontFamily: "inherit",
|
|
3242
|
-
"&::-webkit-search-cancel-button": {
|
|
3243
|
-
display: "none",
|
|
3244
|
-
"-webkit-appearance": "none"
|
|
3245
|
-
}
|
|
3246
|
-
}
|
|
3247
|
-
};
|
|
3248
|
-
}, wa = (e) => {
|
|
3249
|
-
const {
|
|
3250
|
-
antCls: n,
|
|
3251
|
-
componentCls: t,
|
|
3252
|
-
inputPaddingHorizontalBase: r,
|
|
3253
|
-
iconCls: a
|
|
3254
|
-
} = e;
|
|
3255
|
-
return {
|
|
3256
|
-
[t]: Object.assign(Object.assign({}, lt(e)), {
|
|
3257
|
-
position: "relative",
|
|
3258
|
-
display: "inline-flex",
|
|
3259
|
-
cursor: "pointer",
|
|
3260
|
-
[`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({}, ba(e)), Sa(e)),
|
|
3261
|
-
// ======================== Selection ========================
|
|
3262
|
-
[`${t}-selection-item`]: Object.assign(Object.assign({
|
|
3263
|
-
flex: 1,
|
|
3264
|
-
fontWeight: "normal",
|
|
3265
|
-
position: "relative",
|
|
3266
|
-
userSelect: "none"
|
|
3267
|
-
}, Zn), {
|
|
3268
|
-
// https://github.com/ant-design/ant-design/issues/40421
|
|
3269
|
-
[`> ${n}-typography`]: {
|
|
3270
|
-
display: "inline"
|
|
3271
|
-
}
|
|
3272
|
-
}),
|
|
3273
|
-
// ======================= Placeholder =======================
|
|
3274
|
-
[`${t}-selection-placeholder`]: Object.assign(Object.assign({}, Zn), {
|
|
3275
|
-
flex: 1,
|
|
3276
|
-
color: e.colorTextPlaceholder,
|
|
3277
|
-
pointerEvents: "none"
|
|
3278
|
-
}),
|
|
3279
|
-
// ========================== Arrow ==========================
|
|
3280
|
-
[`${t}-arrow`]: Object.assign(Object.assign({}, At()), {
|
|
3281
|
-
position: "absolute",
|
|
3282
|
-
top: "50%",
|
|
3283
|
-
insetInlineStart: "auto",
|
|
3284
|
-
insetInlineEnd: r,
|
|
3285
|
-
height: e.fontSizeIcon,
|
|
3286
|
-
marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
|
|
3287
|
-
color: e.colorTextQuaternary,
|
|
3288
|
-
fontSize: e.fontSizeIcon,
|
|
3289
|
-
lineHeight: 1,
|
|
3290
|
-
textAlign: "center",
|
|
3291
|
-
pointerEvents: "none",
|
|
3292
|
-
display: "flex",
|
|
3293
|
-
alignItems: "center",
|
|
3294
|
-
transition: `opacity ${e.motionDurationSlow} ease`,
|
|
3295
|
-
[a]: {
|
|
3296
|
-
verticalAlign: "top",
|
|
3297
|
-
transition: `transform ${e.motionDurationSlow}`,
|
|
3298
|
-
"> svg": {
|
|
3299
|
-
verticalAlign: "top"
|
|
3300
|
-
},
|
|
3301
|
-
[`&:not(${t}-suffix)`]: {
|
|
3302
|
-
pointerEvents: "auto"
|
|
3303
|
-
}
|
|
3304
|
-
},
|
|
3305
|
-
[`${t}-disabled &`]: {
|
|
3306
|
-
cursor: "not-allowed"
|
|
3307
|
-
},
|
|
3308
|
-
"> *:not(:last-child)": {
|
|
3309
|
-
marginInlineEnd: 8
|
|
3310
|
-
// FIXME: magic
|
|
3311
|
-
}
|
|
3312
|
-
}),
|
|
3313
|
-
// ========================== Wrap ===========================
|
|
3314
|
-
[`${t}-selection-wrap`]: {
|
|
3315
|
-
display: "flex",
|
|
3316
|
-
width: "100%",
|
|
3317
|
-
position: "relative",
|
|
3318
|
-
minWidth: 0,
|
|
3319
|
-
// https://github.com/ant-design/ant-design/issues/51669
|
|
3320
|
-
"&:after": {
|
|
3321
|
-
content: '"\\a0"',
|
|
3322
|
-
width: 0,
|
|
3323
|
-
overflow: "hidden"
|
|
3324
|
-
}
|
|
3325
|
-
},
|
|
3326
|
-
// ========================= Prefix ==========================
|
|
3327
|
-
[`${t}-prefix`]: {
|
|
3328
|
-
flex: "none",
|
|
3329
|
-
marginInlineEnd: e.selectAffixPadding
|
|
3330
|
-
},
|
|
3331
|
-
// ========================== Clear ==========================
|
|
3332
|
-
[`${t}-clear`]: {
|
|
3333
|
-
position: "absolute",
|
|
3334
|
-
top: "50%",
|
|
3335
|
-
insetInlineStart: "auto",
|
|
3336
|
-
insetInlineEnd: r,
|
|
3337
|
-
zIndex: 1,
|
|
3338
|
-
display: "inline-block",
|
|
3339
|
-
width: e.fontSizeIcon,
|
|
3340
|
-
height: e.fontSizeIcon,
|
|
3341
|
-
marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
|
|
3342
|
-
color: e.colorTextQuaternary,
|
|
3343
|
-
fontSize: e.fontSizeIcon,
|
|
3344
|
-
fontStyle: "normal",
|
|
3345
|
-
lineHeight: 1,
|
|
3346
|
-
textAlign: "center",
|
|
3347
|
-
textTransform: "none",
|
|
3348
|
-
cursor: "pointer",
|
|
3349
|
-
opacity: 0,
|
|
3350
|
-
transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
|
|
3351
|
-
textRendering: "auto",
|
|
3352
|
-
"&:before": {
|
|
3353
|
-
display: "block"
|
|
3354
|
-
},
|
|
3355
|
-
"&:hover": {
|
|
3356
|
-
color: e.colorTextTertiary
|
|
3357
|
-
}
|
|
3358
|
-
},
|
|
3359
|
-
[`&:hover ${t}-clear`]: {
|
|
3360
|
-
opacity: 1,
|
|
3361
|
-
background: e.colorBgBase,
|
|
3362
|
-
borderRadius: "50%"
|
|
3363
|
-
}
|
|
3364
|
-
}),
|
|
3365
|
-
// ========================= Feedback ==========================
|
|
3366
|
-
[`${t}-status`]: {
|
|
3367
|
-
"&-error, &-warning, &-success, &-validating": {
|
|
3368
|
-
[`&${t}-has-feedback`]: {
|
|
3369
|
-
[`${t}-clear`]: {
|
|
3370
|
-
insetInlineEnd: e.calc(r).add(e.fontSize).add(e.paddingXS).equal()
|
|
3371
|
-
}
|
|
3372
|
-
}
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
|
-
};
|
|
3376
|
-
}, ya = (e) => {
|
|
3377
|
-
const {
|
|
3378
|
-
componentCls: n
|
|
3379
|
-
} = e;
|
|
3380
|
-
return [
|
|
3381
|
-
{
|
|
3382
|
-
[n]: {
|
|
3383
|
-
// ==================== In Form ====================
|
|
3384
|
-
[`&${n}-in-form-item`]: {
|
|
3385
|
-
width: "100%"
|
|
3386
|
-
}
|
|
3387
|
-
}
|
|
3388
|
-
},
|
|
3389
|
-
// =====================================================
|
|
3390
|
-
// == LTR ==
|
|
3391
|
-
// =====================================================
|
|
3392
|
-
// Base
|
|
3393
|
-
wa(e),
|
|
3394
|
-
// Single
|
|
3395
|
-
fa(e),
|
|
3396
|
-
// Multiple
|
|
3397
|
-
da(e),
|
|
3398
|
-
// Dropdown
|
|
3399
|
-
ia(e),
|
|
3400
|
-
// =====================================================
|
|
3401
|
-
// == RTL ==
|
|
3402
|
-
// =====================================================
|
|
3403
|
-
{
|
|
3404
|
-
[`${n}-rtl`]: {
|
|
3405
|
-
direction: "rtl"
|
|
3406
|
-
}
|
|
3407
|
-
},
|
|
3408
|
-
// =====================================================
|
|
3409
|
-
// == Space Compact ==
|
|
3410
|
-
// =====================================================
|
|
3411
|
-
Xr(e, {
|
|
3412
|
-
borderElCls: `${n}-selector`,
|
|
3413
|
-
focusElCls: `${n}-focused`
|
|
3414
|
-
})
|
|
3415
|
-
];
|
|
3416
|
-
}, Ca = Ft("Select", (e, n) => {
|
|
3417
|
-
let {
|
|
3418
|
-
rootPrefixCls: t
|
|
3419
|
-
} = n;
|
|
3420
|
-
const r = Dn(e, {
|
|
3421
|
-
rootPrefixCls: t,
|
|
3422
|
-
inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
|
|
3423
|
-
multipleSelectItemHeight: e.multipleItemHeight,
|
|
3424
|
-
selectHeight: e.controlHeight
|
|
3425
|
-
});
|
|
3426
|
-
return [ya(r), ha(r)];
|
|
3427
|
-
}, ma, {
|
|
3428
|
-
unitless: {
|
|
3429
|
-
optionLineHeight: !0,
|
|
3430
|
-
optionSelectedFontWeight: !0
|
|
3431
|
-
}
|
|
3432
|
-
});
|
|
3433
|
-
function Ia(e) {
|
|
3434
|
-
let {
|
|
3435
|
-
suffixIcon: n,
|
|
3436
|
-
clearIcon: t,
|
|
3437
|
-
menuItemSelectedIcon: r,
|
|
3438
|
-
removeIcon: a,
|
|
3439
|
-
loading: i,
|
|
3440
|
-
multiple: l,
|
|
3441
|
-
hasFeedback: u,
|
|
3442
|
-
prefixCls: d,
|
|
3443
|
-
showSuffixIcon: f,
|
|
3444
|
-
feedbackIcon: v,
|
|
3445
|
-
showArrow: s,
|
|
3446
|
-
componentName: b
|
|
3447
|
-
} = e;
|
|
3448
|
-
process.env.NODE_ENV !== "production" && it(b).deprecated(!t, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
3449
|
-
const c = t ?? /* @__PURE__ */ o.createElement(Gr, null), g = (h) => n === null && !u && !s ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, f !== !1 && h, u && v);
|
|
3450
|
-
let m = null;
|
|
3451
|
-
if (n !== void 0)
|
|
3452
|
-
m = g(n);
|
|
3453
|
-
else if (i)
|
|
3454
|
-
m = g(/* @__PURE__ */ o.createElement(qr, {
|
|
3455
|
-
spin: !0
|
|
3456
|
-
}));
|
|
3457
|
-
else {
|
|
3458
|
-
const h = `${d}-suffix`;
|
|
3459
|
-
m = (I) => {
|
|
3460
|
-
let {
|
|
3461
|
-
open: y,
|
|
3462
|
-
showSearch: T
|
|
3463
|
-
} = I;
|
|
3464
|
-
return g(y && T ? /* @__PURE__ */ o.createElement(Qr, {
|
|
3465
|
-
className: h
|
|
3466
|
-
}) : /* @__PURE__ */ o.createElement(Hr, {
|
|
3467
|
-
className: h
|
|
3468
|
-
}));
|
|
3469
|
-
};
|
|
3470
|
-
}
|
|
3471
|
-
let S = null;
|
|
3472
|
-
r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(Ur, null) : S = null;
|
|
3473
|
-
let w = null;
|
|
3474
|
-
return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(Yr, null), {
|
|
3475
|
-
clearIcon: c,
|
|
3476
|
-
suffixIcon: m,
|
|
3477
|
-
itemIcon: S,
|
|
3478
|
-
removeIcon: w
|
|
3479
|
-
};
|
|
3480
|
-
}
|
|
3481
|
-
function Ea(e, n) {
|
|
3482
|
-
return n !== void 0 ? n : e !== null;
|
|
3483
|
-
}
|
|
3484
|
-
var xa = function(e, n) {
|
|
3485
|
-
var t = {};
|
|
3486
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
|
|
3487
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
3488
|
-
n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
|
|
3489
|
-
return t;
|
|
3490
|
-
};
|
|
3491
|
-
const ur = "SECRET_COMBOBOX_MODE_DO_NOT_USE", cr = (e, n) => {
|
|
3492
|
-
var t;
|
|
3493
|
-
const {
|
|
3494
|
-
prefixCls: r,
|
|
3495
|
-
bordered: a,
|
|
3496
|
-
className: i,
|
|
3497
|
-
rootClassName: l,
|
|
3498
|
-
getPopupContainer: u,
|
|
3499
|
-
popupClassName: d,
|
|
3500
|
-
dropdownClassName: f,
|
|
3501
|
-
listHeight: v = 256,
|
|
3502
|
-
placement: s,
|
|
3503
|
-
listItemHeight: b,
|
|
3504
|
-
size: c,
|
|
3505
|
-
disabled: g,
|
|
3506
|
-
notFoundContent: m,
|
|
3507
|
-
status: S,
|
|
3508
|
-
builtinPlacements: w,
|
|
3509
|
-
dropdownMatchSelectWidth: h,
|
|
3510
|
-
popupMatchSelectWidth: I,
|
|
3511
|
-
direction: y,
|
|
3512
|
-
style: T,
|
|
3513
|
-
allowClear: p,
|
|
3514
|
-
variant: E,
|
|
3515
|
-
dropdownStyle: z,
|
|
3516
|
-
transitionName: V,
|
|
3517
|
-
tagRender: q,
|
|
3518
|
-
maxCount: _,
|
|
3519
|
-
prefix: A
|
|
3520
|
-
} = e, U = xa(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]), {
|
|
3521
|
-
getPopupContainer: Q,
|
|
3522
|
-
getPrefixCls: G,
|
|
3523
|
-
renderEmpty: j,
|
|
3524
|
-
direction: ne,
|
|
3525
|
-
virtual: Z,
|
|
3526
|
-
popupMatchSelectWidth: Y,
|
|
3527
|
-
popupOverflow: x,
|
|
3528
|
-
select: M
|
|
3529
|
-
} = o.useContext(at), [, fe] = ot(), ie = b ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), ye = y ?? ne, {
|
|
3530
|
-
compactSize: ge,
|
|
3531
|
-
compactItemClassnames: Re
|
|
3532
|
-
} = Wr(J, ye), [ce, pe] = Br("select", E, a), R = Ar(J), [C, D, K] = Ca(J, R), $ = o.useMemo(() => {
|
|
3533
|
-
const {
|
|
3534
|
-
mode: _e
|
|
3535
|
-
} = e;
|
|
3536
|
-
if (_e !== "combobox")
|
|
3537
|
-
return _e === ur ? "combobox" : _e;
|
|
3538
|
-
}, [e.mode]), F = $ === "multiple" || $ === "tags", le = Ea(e.suffixIcon, e.showArrow), me = (t = I ?? h) !== null && t !== void 0 ? t : Y, {
|
|
3539
|
-
status: re,
|
|
3540
|
-
hasFeedback: we,
|
|
3541
|
-
isFormItemInput: ze,
|
|
3542
|
-
feedbackIcon: xe
|
|
3543
|
-
} = o.useContext(jr), Ne = Fr(re, S);
|
|
3544
|
-
let de;
|
|
3545
|
-
m !== void 0 ? de = m : $ === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(ra, {
|
|
3546
|
-
componentName: "Select"
|
|
3547
|
-
});
|
|
3548
|
-
const {
|
|
3549
|
-
suffixIcon: Ge,
|
|
3550
|
-
itemIcon: Ye,
|
|
3551
|
-
removeIcon: Se,
|
|
3552
|
-
clearIcon: Oe
|
|
3553
|
-
} = Ia(Object.assign(Object.assign({}, U), {
|
|
3554
|
-
multiple: F,
|
|
3555
|
-
hasFeedback: we,
|
|
3556
|
-
feedbackIcon: xe,
|
|
3557
|
-
showSuffixIcon: le,
|
|
3558
|
-
prefixCls: J,
|
|
3559
|
-
componentName: "Select"
|
|
3560
|
-
})), Ce = p === !0 ? {
|
|
3561
|
-
clearIcon: Oe
|
|
3562
|
-
} : p, $e = jt(U, ["suffixIcon", "itemIcon"]), Pe = Be(d || f, {
|
|
3563
|
-
[`${J}-dropdown-${ye}`]: ye === "rtl"
|
|
3564
|
-
}, l, K, R, D), en = Kr((_e) => {
|
|
3565
|
-
var De;
|
|
3566
|
-
return (De = c ?? ge) !== null && De !== void 0 ? De : _e;
|
|
3567
|
-
}), je = o.useContext($r), Fe = g ?? je, Ie = Be({
|
|
3568
|
-
[`${J}-lg`]: en === "large",
|
|
3569
|
-
[`${J}-sm`]: en === "small",
|
|
3570
|
-
[`${J}-rtl`]: ye === "rtl",
|
|
3571
|
-
[`${J}-${ce}`]: pe,
|
|
3572
|
-
[`${J}-in-form-item`]: ze
|
|
3573
|
-
}, Vr(J, Ne, we), Re, M == null ? void 0 : M.className, i, l, K, R, D), hn = o.useMemo(() => s !== void 0 ? s : ye === "rtl" ? "bottomRight" : "bottomLeft", [s, ye]);
|
|
3574
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3575
|
-
const _e = it("Select");
|
|
3576
|
-
_e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(h === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !F), "usage", "`maxCount` only works with mode `multiple` or `tags`");
|
|
3577
|
-
}
|
|
3578
|
-
const [Ae] = Mr("SelectLike", z == null ? void 0 : z.zIndex);
|
|
3579
|
-
return C(/* @__PURE__ */ o.createElement(gt, Object.assign({
|
|
3580
|
-
ref: n,
|
|
3581
|
-
virtual: Z,
|
|
3582
|
-
showSearch: M == null ? void 0 : M.showSearch
|
|
3583
|
-
}, $e, {
|
|
3584
|
-
style: Object.assign(Object.assign({}, M == null ? void 0 : M.style), T),
|
|
3585
|
-
dropdownMatchSelectWidth: me,
|
|
3586
|
-
transitionName: Dr(se, "slide-up", V),
|
|
3587
|
-
builtinPlacements: aa(w, x),
|
|
3588
|
-
listHeight: v,
|
|
3589
|
-
listItemHeight: ie,
|
|
3590
|
-
mode: $,
|
|
3591
|
-
prefixCls: J,
|
|
3592
|
-
placement: hn,
|
|
3593
|
-
direction: ye,
|
|
3594
|
-
prefix: A,
|
|
3595
|
-
suffixIcon: Ge,
|
|
3596
|
-
menuItemSelectedIcon: Ye,
|
|
3597
|
-
removeIcon: Se,
|
|
3598
|
-
allowClear: Ce,
|
|
3599
|
-
notFoundContent: de,
|
|
3600
|
-
className: Ie,
|
|
3601
|
-
getPopupContainer: u || Q,
|
|
3602
|
-
dropdownClassName: Pe,
|
|
3603
|
-
disabled: Fe,
|
|
3604
|
-
dropdownStyle: Object.assign(Object.assign({}, z), {
|
|
3605
|
-
zIndex: Ae
|
|
3606
|
-
}),
|
|
3607
|
-
maxCount: F ? _ : void 0,
|
|
3608
|
-
tagRender: F ? q : void 0
|
|
3609
|
-
})));
|
|
3610
|
-
};
|
|
3611
|
-
process.env.NODE_ENV !== "production" && (cr.displayName = "Select");
|
|
3612
|
-
const In = /* @__PURE__ */ o.forwardRef(cr), $a = zr(In, "dropdownAlign");
|
|
3613
|
-
In.SECRET_COMBOBOX_MODE_DO_NOT_USE = ur;
|
|
3614
|
-
In.Option = mt;
|
|
3615
|
-
In.OptGroup = ft;
|
|
3616
|
-
In._InternalPanelDoNotUseOrYouWillBeFired = $a;
|
|
3617
|
-
process.env.NODE_ENV !== "production" && (In.displayName = "Select");
|
|
3618
|
-
const Qa = jn.div`
|
|
1
|
+
import { d as t } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { S as s } from "../../index-DmZOkMjs.js";
|
|
3
|
+
const u = t.div`
|
|
3619
4
|
position: relative;
|
|
3620
5
|
border: 2px solid transparent;
|
|
3621
6
|
background-color: transparent;
|
|
@@ -3623,21 +8,21 @@ const Qa = jn.div`
|
|
|
3623
8
|
padding: 1px;
|
|
3624
9
|
width: auto;
|
|
3625
10
|
|
|
3626
|
-
${({ $isFocused:
|
|
3627
|
-
border: 2px solid ${
|
|
11
|
+
${({ $isFocused: o, theme: e, type: r = "primary" }) => o && `
|
|
12
|
+
border: 2px solid ${e.colors[r].focussed.ringColor};
|
|
3628
13
|
background-color: transparent;
|
|
3629
14
|
border-radius: 8px;
|
|
3630
15
|
padding: 1px;
|
|
3631
16
|
`}
|
|
3632
17
|
|
|
3633
18
|
.ant-select-dropdown {
|
|
3634
|
-
animation-duration: ${({ theme:
|
|
19
|
+
animation-duration: ${({ theme: o }) => `${o.motion.veryfast}s`} !important;
|
|
3635
20
|
}
|
|
3636
|
-
`,
|
|
21
|
+
`, d = (o) => `all ${o.motion.veryfast}s ease-in-out`, c = ({ colors: o, sizing: e, typography: r, borderRadius: n }, a, i) => `
|
|
3637
22
|
&.ant-select {
|
|
3638
|
-
color: ${
|
|
3639
|
-
font-size: ${
|
|
3640
|
-
line-height: ${
|
|
23
|
+
color: ${o.input};
|
|
24
|
+
font-size: ${e.Size4}px;
|
|
25
|
+
line-height: ${e.Size6}px;
|
|
3641
26
|
letter-spacing: 0;
|
|
3642
27
|
font-weight: 400;
|
|
3643
28
|
border-width: 1px;
|
|
@@ -3646,13 +31,13 @@ const Qa = jn.div`
|
|
|
3646
31
|
min-width: 250px;
|
|
3647
32
|
height: 32px;
|
|
3648
33
|
|
|
3649
|
-
background-color: ${
|
|
3650
|
-
border-radius: ${
|
|
3651
|
-
gap: ${
|
|
34
|
+
background-color: ${o[a][i].backgroundColor};
|
|
35
|
+
border-radius: ${n.BorderRadiusMd}px;
|
|
36
|
+
gap: ${e.Size2}px;
|
|
3652
37
|
|
|
3653
38
|
&:active {
|
|
3654
|
-
background-color: ${
|
|
3655
|
-
border-color: ${
|
|
39
|
+
background-color: ${o[a].pressed.backgroundColor};
|
|
40
|
+
border-color: ${o[a].pressed.borderColor};
|
|
3656
41
|
}
|
|
3657
42
|
|
|
3658
43
|
// Remove focus styles
|
|
@@ -3672,63 +57,63 @@ const Qa = jn.div`
|
|
|
3672
57
|
|
|
3673
58
|
&:disabled,
|
|
3674
59
|
&.ant-select-disabled {
|
|
3675
|
-
color: ${
|
|
3676
|
-
background-color: ${
|
|
3677
|
-
border-color: ${
|
|
60
|
+
color: ${o.inputs.onsurface.disabled};
|
|
61
|
+
background-color: ${o.inputs.surface.disabled};
|
|
62
|
+
border-color: ${o.inputs.surface.border};
|
|
3678
63
|
|
|
3679
64
|
.ant-select-selector {
|
|
3680
|
-
background-color: ${
|
|
65
|
+
background-color: ${o.inputs.surface.disabled};
|
|
3681
66
|
}
|
|
3682
67
|
|
|
3683
68
|
.ant-select-arrow {
|
|
3684
|
-
color: ${
|
|
69
|
+
color: ${o.inputs.onsurface["icon-disabled"]};
|
|
3685
70
|
}
|
|
3686
71
|
}
|
|
3687
72
|
}
|
|
3688
|
-
`,
|
|
73
|
+
`, m = t.div`
|
|
3689
74
|
.ant-select-item-option {
|
|
3690
|
-
transition: ${({ theme:
|
|
75
|
+
transition: ${({ theme: o, type: e }) => d(o)};
|
|
3691
76
|
border-radius: 0px;
|
|
3692
77
|
|
|
3693
78
|
&:hover {
|
|
3694
|
-
background-color: ${({ theme:
|
|
3695
|
-
color: ${({ theme:
|
|
79
|
+
background-color: ${({ theme: o, type: e }) => o.colors.surface.secondary};
|
|
80
|
+
color: ${({ theme: o, type: e }) => o.colors.onsurface["copy-dark"]};
|
|
3696
81
|
}
|
|
3697
82
|
|
|
3698
83
|
&.ant-select-item-option-selected {
|
|
3699
|
-
background-color: ${({ theme:
|
|
3700
|
-
color: ${({ theme:
|
|
84
|
+
background-color: ${({ theme: o, type: e }) => o.colors[e].hover.backgroundColor};
|
|
85
|
+
color: ${({ theme: o, type: e }) => o.colors[e].active.color};
|
|
3701
86
|
font-weight: 400;
|
|
3702
87
|
border-radius: 0px;
|
|
3703
88
|
|
|
3704
89
|
&:hover {
|
|
3705
|
-
background-color: ${({ theme:
|
|
3706
|
-
color: ${({ theme:
|
|
90
|
+
background-color: ${({ theme: o, type: e }) => o.colors[e].hover.backgroundColor};
|
|
91
|
+
color: ${({ theme: o, type: e }) => o.colors[e].hover.color};
|
|
3707
92
|
border-radius: 0px;
|
|
3708
93
|
}
|
|
3709
94
|
}
|
|
3710
95
|
}
|
|
3711
|
-
`,
|
|
96
|
+
`, b = t.div`
|
|
3712
97
|
.ant-select-dropdown {
|
|
3713
|
-
animation-duration: ${({ theme:
|
|
3714
|
-
transition: all ${({ theme:
|
|
98
|
+
animation-duration: ${({ theme: o }) => `${o.motion.veryfast}s`} !important;
|
|
99
|
+
transition: all ${({ theme: o }) => `${o.motion.veryfast}s`}
|
|
3715
100
|
cubic-bezier(0.645, 0.045, 0.355, 1) !important;
|
|
3716
101
|
}
|
|
3717
102
|
|
|
3718
103
|
&.ant-slide-up-enter,
|
|
3719
104
|
&.ant-slide-up-appear {
|
|
3720
|
-
animation-duration: ${({ theme:
|
|
105
|
+
animation-duration: ${({ theme: o }) => `${o.motion.veryfast}s`} !important;
|
|
3721
106
|
}
|
|
3722
107
|
|
|
3723
108
|
&.ant-slide-up-leave {
|
|
3724
|
-
animation-duration: ${({ theme:
|
|
109
|
+
animation-duration: ${({ theme: o }) => `${o.motion.veryfast}s`} !important;
|
|
3725
110
|
}
|
|
3726
|
-
`,
|
|
3727
|
-
${({ theme:
|
|
111
|
+
`, $ = t(s)`
|
|
112
|
+
${({ theme: o, type: e = "primary", state: r = "active" }) => c(o, e, r)}
|
|
3728
113
|
`;
|
|
3729
114
|
export {
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
115
|
+
$ as Select,
|
|
116
|
+
b as SelectDropdown,
|
|
117
|
+
u as SelectWrapper,
|
|
118
|
+
m as StyledMenuItem
|
|
3734
119
|
};
|