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