@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,1430 @@
|
|
|
1
|
+
import * as q from "react";
|
|
2
|
+
import s, { forwardRef as te, useState as xe, useRef as j, useEffect as k, useMemo as ee, useContext as We, Children as yr } from "react";
|
|
3
|
+
import { c as H, g as Ze, _ as w, F as Je, f as Sr, a as U, b as $e, e as be } from "./presets-CSXMiWyc.js";
|
|
4
|
+
import { o as xr } from "./omit-B_u6A-HL.js";
|
|
5
|
+
import { C as $r, c as Er, n as Br, p as Hr, v as Or, x as Rr, e as Qe, _ as Ke, a as ke, m as ne, X as he, f as oe, Y as Pr, g as jr, o as Ir, r as Nr, Z as wr, l as Tr, A as Dr } from "./CSSMotionList-DB0khM6h.js";
|
|
6
|
+
import { d as er, D as Lr } from "./index-DCopujxC.js";
|
|
7
|
+
import { W as Ar } from "./index-Br3D3cFM.js";
|
|
8
|
+
import { u as zr } from "./useSize-Ct1guc-z.js";
|
|
9
|
+
import { u as _r } from "./Compact-DFcWZrNo.js";
|
|
10
|
+
import { c as Mr, i as Gr } from "./reactNode-sKPeiqPL.js";
|
|
11
|
+
import { P as He } from "./presetColors-Cl8UP3Nw.js";
|
|
12
|
+
import { R as Fr } from "./LoadingOutlined-DOi5EGOl.js";
|
|
13
|
+
import { u as Vr } from "./useMergedState-D1-TbeEv.js";
|
|
14
|
+
import { g as Wr } from "./compact-item-DH13cl8A.js";
|
|
15
|
+
var Xr = function(e, r) {
|
|
16
|
+
var o = {};
|
|
17
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
18
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
19
|
+
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
20
|
+
return o;
|
|
21
|
+
};
|
|
22
|
+
const rr = /* @__PURE__ */ q.createContext(void 0), qr = (e) => {
|
|
23
|
+
const {
|
|
24
|
+
getPrefixCls: r,
|
|
25
|
+
direction: o
|
|
26
|
+
} = q.useContext($r), {
|
|
27
|
+
prefixCls: t,
|
|
28
|
+
size: n,
|
|
29
|
+
className: a
|
|
30
|
+
} = e, i = Xr(e, ["prefixCls", "size", "className"]), l = r("btn-group", t), [, , c] = Er(), u = q.useMemo(() => {
|
|
31
|
+
switch (n) {
|
|
32
|
+
case "large":
|
|
33
|
+
return "lg";
|
|
34
|
+
case "small":
|
|
35
|
+
return "sm";
|
|
36
|
+
default:
|
|
37
|
+
return "";
|
|
38
|
+
}
|
|
39
|
+
}, [n]);
|
|
40
|
+
if (process.env.NODE_ENV !== "production") {
|
|
41
|
+
const g = er("Button.Group");
|
|
42
|
+
g.deprecated(!1, "Button.Group", "Space.Compact"), process.env.NODE_ENV !== "production" && g(!n || ["large", "small", "middle"].includes(n), "usage", "Invalid prop `size`.");
|
|
43
|
+
}
|
|
44
|
+
const d = H(l, {
|
|
45
|
+
[`${l}-${u}`]: u,
|
|
46
|
+
[`${l}-rtl`]: o === "rtl"
|
|
47
|
+
}, a, c);
|
|
48
|
+
return /* @__PURE__ */ q.createElement(rr.Provider, {
|
|
49
|
+
value: n
|
|
50
|
+
}, /* @__PURE__ */ q.createElement("div", Object.assign({}, i, {
|
|
51
|
+
className: d
|
|
52
|
+
})));
|
|
53
|
+
}, Xe = /^[\u4E00-\u9FA5]{2}$/, Ee = Xe.test.bind(Xe);
|
|
54
|
+
function ot(e) {
|
|
55
|
+
return e === "danger" ? {
|
|
56
|
+
danger: !0
|
|
57
|
+
} : {
|
|
58
|
+
type: e
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function qe(e) {
|
|
62
|
+
return typeof e == "string";
|
|
63
|
+
}
|
|
64
|
+
function re(e) {
|
|
65
|
+
return e === "text" || e === "link";
|
|
66
|
+
}
|
|
67
|
+
function Yr(e, r) {
|
|
68
|
+
if (e == null)
|
|
69
|
+
return;
|
|
70
|
+
const o = r ? " " : "";
|
|
71
|
+
return typeof e != "string" && typeof e != "number" && qe(e.type) && Ee(e.props.children) ? Mr(e, {
|
|
72
|
+
children: e.props.children.split("").join(o)
|
|
73
|
+
}) : qe(e) ? Ee(e) ? /* @__PURE__ */ s.createElement("span", null, e.split("").join(o)) : /* @__PURE__ */ s.createElement("span", null, e) : Gr(e) ? /* @__PURE__ */ s.createElement("span", null, e) : e;
|
|
74
|
+
}
|
|
75
|
+
function Ur(e, r) {
|
|
76
|
+
let o = !1;
|
|
77
|
+
const t = [];
|
|
78
|
+
return s.Children.forEach(e, (n) => {
|
|
79
|
+
const a = typeof n, i = a === "string" || a === "number";
|
|
80
|
+
if (o && i) {
|
|
81
|
+
const l = t.length - 1, c = t[l];
|
|
82
|
+
t[l] = `${c}${n}`;
|
|
83
|
+
} else
|
|
84
|
+
t.push(n);
|
|
85
|
+
o = i;
|
|
86
|
+
}), s.Children.map(t, (n) => Yr(n, r));
|
|
87
|
+
}
|
|
88
|
+
["default", "primary", "danger"].concat(Br(He));
|
|
89
|
+
const Be = /* @__PURE__ */ te((e, r) => {
|
|
90
|
+
const {
|
|
91
|
+
className: o,
|
|
92
|
+
style: t,
|
|
93
|
+
children: n,
|
|
94
|
+
prefixCls: a
|
|
95
|
+
} = e, i = H(`${a}-icon`, o);
|
|
96
|
+
return /* @__PURE__ */ s.createElement("span", {
|
|
97
|
+
ref: r,
|
|
98
|
+
className: i,
|
|
99
|
+
style: t
|
|
100
|
+
}, n);
|
|
101
|
+
}), Ye = /* @__PURE__ */ te((e, r) => {
|
|
102
|
+
const {
|
|
103
|
+
prefixCls: o,
|
|
104
|
+
className: t,
|
|
105
|
+
style: n,
|
|
106
|
+
iconClassName: a
|
|
107
|
+
} = e, i = H(`${o}-loading-icon`, t);
|
|
108
|
+
return /* @__PURE__ */ s.createElement(Be, {
|
|
109
|
+
prefixCls: o,
|
|
110
|
+
className: i,
|
|
111
|
+
style: n,
|
|
112
|
+
ref: r
|
|
113
|
+
}, /* @__PURE__ */ s.createElement(Fr, {
|
|
114
|
+
className: a
|
|
115
|
+
}));
|
|
116
|
+
}), pe = () => ({
|
|
117
|
+
width: 0,
|
|
118
|
+
opacity: 0,
|
|
119
|
+
transform: "scale(0)"
|
|
120
|
+
}), ye = (e) => ({
|
|
121
|
+
width: e.scrollWidth,
|
|
122
|
+
opacity: 1,
|
|
123
|
+
transform: "scale(1)"
|
|
124
|
+
}), Zr = (e) => {
|
|
125
|
+
const {
|
|
126
|
+
prefixCls: r,
|
|
127
|
+
loading: o,
|
|
128
|
+
existIcon: t,
|
|
129
|
+
className: n,
|
|
130
|
+
style: a,
|
|
131
|
+
mount: i
|
|
132
|
+
} = e, l = !!o;
|
|
133
|
+
return t ? /* @__PURE__ */ s.createElement(Ye, {
|
|
134
|
+
prefixCls: r,
|
|
135
|
+
className: n,
|
|
136
|
+
style: a
|
|
137
|
+
}) : /* @__PURE__ */ s.createElement(Hr, {
|
|
138
|
+
visible: l,
|
|
139
|
+
// Used for minus flex gap style only
|
|
140
|
+
motionName: `${r}-loading-icon-motion`,
|
|
141
|
+
motionAppear: !i,
|
|
142
|
+
motionEnter: !i,
|
|
143
|
+
motionLeave: !i,
|
|
144
|
+
removeOnLeave: !0,
|
|
145
|
+
onAppearStart: pe,
|
|
146
|
+
onAppearActive: ye,
|
|
147
|
+
onEnterStart: pe,
|
|
148
|
+
onEnterActive: ye,
|
|
149
|
+
onLeaveStart: ye,
|
|
150
|
+
onLeaveActive: pe
|
|
151
|
+
}, (c, u) => {
|
|
152
|
+
let {
|
|
153
|
+
className: d,
|
|
154
|
+
style: g
|
|
155
|
+
} = c;
|
|
156
|
+
const h = Object.assign(Object.assign({}, a), g);
|
|
157
|
+
return /* @__PURE__ */ s.createElement(Ye, {
|
|
158
|
+
prefixCls: r,
|
|
159
|
+
className: H(n, d),
|
|
160
|
+
style: h,
|
|
161
|
+
ref: u
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}, Ue = (e, r) => ({
|
|
165
|
+
// Border
|
|
166
|
+
[`> span, > ${e}`]: {
|
|
167
|
+
"&:not(:last-child)": {
|
|
168
|
+
[`&, & > ${e}`]: {
|
|
169
|
+
"&:not(:disabled)": {
|
|
170
|
+
borderInlineEndColor: r
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"&:not(:first-child)": {
|
|
175
|
+
[`&, & > ${e}`]: {
|
|
176
|
+
"&:not(:disabled)": {
|
|
177
|
+
borderInlineStartColor: r
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}), Jr = (e) => {
|
|
183
|
+
const {
|
|
184
|
+
componentCls: r,
|
|
185
|
+
fontSize: o,
|
|
186
|
+
lineWidth: t,
|
|
187
|
+
groupBorderColor: n,
|
|
188
|
+
colorErrorHover: a
|
|
189
|
+
} = e;
|
|
190
|
+
return {
|
|
191
|
+
[`${r}-group`]: [
|
|
192
|
+
{
|
|
193
|
+
position: "relative",
|
|
194
|
+
display: "inline-flex",
|
|
195
|
+
// Border
|
|
196
|
+
[`> span, > ${r}`]: {
|
|
197
|
+
"&:not(:last-child)": {
|
|
198
|
+
[`&, & > ${r}`]: {
|
|
199
|
+
borderStartEndRadius: 0,
|
|
200
|
+
borderEndEndRadius: 0
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"&:not(:first-child)": {
|
|
204
|
+
marginInlineStart: e.calc(t).mul(-1).equal(),
|
|
205
|
+
[`&, & > ${r}`]: {
|
|
206
|
+
borderStartStartRadius: 0,
|
|
207
|
+
borderEndStartRadius: 0
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
[r]: {
|
|
212
|
+
position: "relative",
|
|
213
|
+
zIndex: 1,
|
|
214
|
+
"&:hover, &:focus, &:active": {
|
|
215
|
+
zIndex: 2
|
|
216
|
+
},
|
|
217
|
+
"&[disabled]": {
|
|
218
|
+
zIndex: 0
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
[`${r}-icon-only`]: {
|
|
222
|
+
fontSize: o
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
// Border Color
|
|
226
|
+
Ue(`${r}-primary`, n),
|
|
227
|
+
Ue(`${r}-danger`, a)
|
|
228
|
+
]
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
var Qr = ["b"], Kr = ["v"], Se = function(r) {
|
|
232
|
+
return Math.round(Number(r || 0));
|
|
233
|
+
}, kr = function(r) {
|
|
234
|
+
if (r instanceof Je)
|
|
235
|
+
return r;
|
|
236
|
+
if (r && Sr(r) === "object" && "h" in r && "b" in r) {
|
|
237
|
+
var o = r, t = o.b, n = Ze(o, Qr);
|
|
238
|
+
return w(w({}, n), {}, {
|
|
239
|
+
v: t
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return typeof r == "string" && /hsb/.test(r) ? r.replace(/hsb/, "hsv") : r;
|
|
243
|
+
}, T = /* @__PURE__ */ function(e) {
|
|
244
|
+
Or(o, e);
|
|
245
|
+
var r = Rr(o);
|
|
246
|
+
function o(t) {
|
|
247
|
+
return Qe(this, o), r.call(this, kr(t));
|
|
248
|
+
}
|
|
249
|
+
return Ke(o, [{
|
|
250
|
+
key: "toHsbString",
|
|
251
|
+
value: function() {
|
|
252
|
+
var n = this.toHsb(), a = Se(n.s * 100), i = Se(n.b * 100), l = Se(n.h), c = n.a, u = "hsb(".concat(l, ", ").concat(a, "%, ").concat(i, "%)"), d = "hsba(".concat(l, ", ").concat(a, "%, ").concat(i, "%, ").concat(c.toFixed(c === 0 ? 0 : 2), ")");
|
|
253
|
+
return c === 1 ? u : d;
|
|
254
|
+
}
|
|
255
|
+
}, {
|
|
256
|
+
key: "toHsb",
|
|
257
|
+
value: function() {
|
|
258
|
+
var n = this.toHsv(), a = n.v, i = Ze(n, Kr);
|
|
259
|
+
return w(w({}, i), {}, {
|
|
260
|
+
b: a,
|
|
261
|
+
a: this.a
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}]), o;
|
|
265
|
+
}(Je), eo = "rc-color-picker", Y = function(r) {
|
|
266
|
+
return r instanceof T ? r : new T(r);
|
|
267
|
+
}, ro = Y("#1677ff"), or = function(r) {
|
|
268
|
+
var o = r.offset, t = r.targetRef, n = r.containerRef, a = r.color, i = r.type, l = n.current.getBoundingClientRect(), c = l.width, u = l.height, d = t.current.getBoundingClientRect(), g = d.width, h = d.height, f = g / 2, C = h / 2, x = (o.x + f) / c, v = 1 - (o.y + C) / u, b = a.toHsb(), O = x, E = (o.x + f) / c * 360;
|
|
269
|
+
if (i)
|
|
270
|
+
switch (i) {
|
|
271
|
+
case "hue":
|
|
272
|
+
return Y(w(w({}, b), {}, {
|
|
273
|
+
h: E <= 0 ? 0 : E
|
|
274
|
+
}));
|
|
275
|
+
case "alpha":
|
|
276
|
+
return Y(w(w({}, b), {}, {
|
|
277
|
+
a: O <= 0 ? 0 : O
|
|
278
|
+
}));
|
|
279
|
+
}
|
|
280
|
+
return Y({
|
|
281
|
+
h: b.h,
|
|
282
|
+
s: x <= 0 ? 0 : x,
|
|
283
|
+
b: v >= 1 ? 1 : v,
|
|
284
|
+
a: b.a
|
|
285
|
+
});
|
|
286
|
+
}, tr = function(r, o) {
|
|
287
|
+
var t = r.toHsb();
|
|
288
|
+
switch (o) {
|
|
289
|
+
case "hue":
|
|
290
|
+
return {
|
|
291
|
+
x: t.h / 360 * 100,
|
|
292
|
+
y: 50
|
|
293
|
+
};
|
|
294
|
+
case "alpha":
|
|
295
|
+
return {
|
|
296
|
+
x: r.a * 100,
|
|
297
|
+
y: 50
|
|
298
|
+
};
|
|
299
|
+
// Picker panel
|
|
300
|
+
default:
|
|
301
|
+
return {
|
|
302
|
+
x: t.s * 100,
|
|
303
|
+
y: (1 - t.b) * 100
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}, oo = function(r) {
|
|
307
|
+
var o = r.color, t = r.prefixCls, n = r.className, a = r.style, i = r.onClick, l = "".concat(t, "-color-block");
|
|
308
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
309
|
+
className: H(l, n),
|
|
310
|
+
style: a,
|
|
311
|
+
onClick: i
|
|
312
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
313
|
+
className: "".concat(l, "-inner"),
|
|
314
|
+
style: {
|
|
315
|
+
background: o
|
|
316
|
+
}
|
|
317
|
+
}));
|
|
318
|
+
};
|
|
319
|
+
function to(e) {
|
|
320
|
+
var r = "touches" in e ? e.touches[0] : e, o = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset, t = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
|
|
321
|
+
return {
|
|
322
|
+
pageX: r.pageX - o,
|
|
323
|
+
pageY: r.pageY - t
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function nr(e) {
|
|
327
|
+
var r = e.targetRef, o = e.containerRef, t = e.direction, n = e.onDragChange, a = e.onDragChangeComplete, i = e.calculate, l = e.color, c = e.disabledDrag, u = xe({
|
|
328
|
+
x: 0,
|
|
329
|
+
y: 0
|
|
330
|
+
}), d = U(u, 2), g = d[0], h = d[1], f = j(null), C = j(null);
|
|
331
|
+
k(function() {
|
|
332
|
+
h(i());
|
|
333
|
+
}, [l]), k(function() {
|
|
334
|
+
return function() {
|
|
335
|
+
document.removeEventListener("mousemove", f.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", f.current), document.removeEventListener("touchend", C.current), f.current = null, C.current = null;
|
|
336
|
+
};
|
|
337
|
+
}, []);
|
|
338
|
+
var x = function(m) {
|
|
339
|
+
var p = to(m), A = p.pageX, Z = p.pageY, B = o.current.getBoundingClientRect(), F = B.x, z = B.y, _ = B.width, V = B.height, R = r.current.getBoundingClientRect(), W = R.width, D = R.height, M = W / 2, G = D / 2, P = Math.max(0, Math.min(A - F, _)) - M, S = Math.max(0, Math.min(Z - z, V)) - G, J = {
|
|
340
|
+
x: P,
|
|
341
|
+
y: t === "x" ? g.y : S
|
|
342
|
+
};
|
|
343
|
+
if (W === 0 && D === 0 || W !== D)
|
|
344
|
+
return !1;
|
|
345
|
+
n == null || n(J);
|
|
346
|
+
}, v = function(m) {
|
|
347
|
+
m.preventDefault(), x(m);
|
|
348
|
+
}, b = function(m) {
|
|
349
|
+
m.preventDefault(), document.removeEventListener("mousemove", f.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", f.current), document.removeEventListener("touchend", C.current), f.current = null, C.current = null, a == null || a();
|
|
350
|
+
}, O = function(m) {
|
|
351
|
+
document.removeEventListener("mousemove", f.current), document.removeEventListener("mouseup", C.current), !c && (x(m), document.addEventListener("mousemove", v), document.addEventListener("mouseup", b), document.addEventListener("touchmove", v), document.addEventListener("touchend", b), f.current = v, C.current = b);
|
|
352
|
+
};
|
|
353
|
+
return [g, O];
|
|
354
|
+
}
|
|
355
|
+
var ar = function(r) {
|
|
356
|
+
var o = r.size, t = o === void 0 ? "default" : o, n = r.color, a = r.prefixCls;
|
|
357
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
358
|
+
className: H("".concat(a, "-handler"), $e({}, "".concat(a, "-handler-sm"), t === "small")),
|
|
359
|
+
style: {
|
|
360
|
+
backgroundColor: n
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}, lr = function(r) {
|
|
364
|
+
var o = r.children, t = r.style, n = r.prefixCls;
|
|
365
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
366
|
+
className: "".concat(n, "-palette"),
|
|
367
|
+
style: w({
|
|
368
|
+
position: "relative"
|
|
369
|
+
}, t)
|
|
370
|
+
}, o);
|
|
371
|
+
}, ir = /* @__PURE__ */ te(function(e, r) {
|
|
372
|
+
var o = e.children, t = e.x, n = e.y;
|
|
373
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
374
|
+
ref: r,
|
|
375
|
+
style: {
|
|
376
|
+
position: "absolute",
|
|
377
|
+
left: "".concat(t, "%"),
|
|
378
|
+
top: "".concat(n, "%"),
|
|
379
|
+
zIndex: 1,
|
|
380
|
+
transform: "translate(-50%, -50%)"
|
|
381
|
+
}
|
|
382
|
+
}, o);
|
|
383
|
+
}), no = function(r) {
|
|
384
|
+
var o = r.color, t = r.onChange, n = r.prefixCls, a = r.onChangeComplete, i = r.disabled, l = j(), c = j(), u = j(o), d = ke(function(x) {
|
|
385
|
+
var v = or({
|
|
386
|
+
offset: x,
|
|
387
|
+
targetRef: c,
|
|
388
|
+
containerRef: l,
|
|
389
|
+
color: o
|
|
390
|
+
});
|
|
391
|
+
u.current = v, t(v);
|
|
392
|
+
}), g = nr({
|
|
393
|
+
color: o,
|
|
394
|
+
containerRef: l,
|
|
395
|
+
targetRef: c,
|
|
396
|
+
calculate: function() {
|
|
397
|
+
return tr(o);
|
|
398
|
+
},
|
|
399
|
+
onDragChange: d,
|
|
400
|
+
onDragChangeComplete: function() {
|
|
401
|
+
return a == null ? void 0 : a(u.current);
|
|
402
|
+
},
|
|
403
|
+
disabledDrag: i
|
|
404
|
+
}), h = U(g, 2), f = h[0], C = h[1];
|
|
405
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
406
|
+
ref: l,
|
|
407
|
+
className: "".concat(n, "-select"),
|
|
408
|
+
onMouseDown: C,
|
|
409
|
+
onTouchStart: C
|
|
410
|
+
}, /* @__PURE__ */ s.createElement(lr, {
|
|
411
|
+
prefixCls: n
|
|
412
|
+
}, /* @__PURE__ */ s.createElement(ir, {
|
|
413
|
+
x: f.x,
|
|
414
|
+
y: f.y,
|
|
415
|
+
ref: c
|
|
416
|
+
}, /* @__PURE__ */ s.createElement(ar, {
|
|
417
|
+
color: o.toRgbString(),
|
|
418
|
+
prefixCls: n
|
|
419
|
+
})), /* @__PURE__ */ s.createElement("div", {
|
|
420
|
+
className: "".concat(n, "-saturation"),
|
|
421
|
+
style: {
|
|
422
|
+
backgroundColor: "hsl(".concat(o.toHsb().h, ",100%, 50%)"),
|
|
423
|
+
backgroundImage: "linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"
|
|
424
|
+
}
|
|
425
|
+
})));
|
|
426
|
+
}, ao = function(r, o) {
|
|
427
|
+
var t = Vr(r, {
|
|
428
|
+
value: o
|
|
429
|
+
}), n = U(t, 2), a = n[0], i = n[1], l = ee(function() {
|
|
430
|
+
return Y(a);
|
|
431
|
+
}, [a]);
|
|
432
|
+
return [l, i];
|
|
433
|
+
}, lo = function(r) {
|
|
434
|
+
var o = r.colors, t = r.children, n = r.direction, a = n === void 0 ? "to right" : n, i = r.type, l = r.prefixCls, c = ee(function() {
|
|
435
|
+
return o.map(function(u, d) {
|
|
436
|
+
var g = Y(u);
|
|
437
|
+
return i === "alpha" && d === o.length - 1 && (g = new T(g.setA(1))), g.toRgbString();
|
|
438
|
+
}).join(",");
|
|
439
|
+
}, [o, i]);
|
|
440
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
441
|
+
className: "".concat(l, "-gradient"),
|
|
442
|
+
style: {
|
|
443
|
+
position: "absolute",
|
|
444
|
+
inset: 0,
|
|
445
|
+
background: "linear-gradient(".concat(a, ", ").concat(c, ")")
|
|
446
|
+
}
|
|
447
|
+
}, t);
|
|
448
|
+
}, io = function(r) {
|
|
449
|
+
var o = r.prefixCls, t = r.colors, n = r.disabled, a = r.onChange, i = r.onChangeComplete, l = r.color, c = r.type, u = j(), d = j(), g = j(l), h = function(p) {
|
|
450
|
+
return c === "hue" ? p.getHue() : p.a * 100;
|
|
451
|
+
}, f = ke(function(m) {
|
|
452
|
+
var p = or({
|
|
453
|
+
offset: m,
|
|
454
|
+
targetRef: d,
|
|
455
|
+
containerRef: u,
|
|
456
|
+
color: l,
|
|
457
|
+
type: c
|
|
458
|
+
});
|
|
459
|
+
g.current = p, a(h(p));
|
|
460
|
+
}), C = nr({
|
|
461
|
+
color: l,
|
|
462
|
+
targetRef: d,
|
|
463
|
+
containerRef: u,
|
|
464
|
+
calculate: function() {
|
|
465
|
+
return tr(l, c);
|
|
466
|
+
},
|
|
467
|
+
onDragChange: f,
|
|
468
|
+
onDragChangeComplete: function() {
|
|
469
|
+
i(h(g.current));
|
|
470
|
+
},
|
|
471
|
+
direction: "x",
|
|
472
|
+
disabledDrag: n
|
|
473
|
+
}), x = U(C, 2), v = x[0], b = x[1], O = s.useMemo(function() {
|
|
474
|
+
if (c === "hue") {
|
|
475
|
+
var m = l.toHsb();
|
|
476
|
+
m.s = 1, m.b = 1, m.a = 1;
|
|
477
|
+
var p = new T(m);
|
|
478
|
+
return p;
|
|
479
|
+
}
|
|
480
|
+
return l;
|
|
481
|
+
}, [l, c]), E = s.useMemo(function() {
|
|
482
|
+
return t.map(function(m) {
|
|
483
|
+
return "".concat(m.color, " ").concat(m.percent, "%");
|
|
484
|
+
});
|
|
485
|
+
}, [t]);
|
|
486
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
487
|
+
ref: u,
|
|
488
|
+
className: H("".concat(o, "-slider"), "".concat(o, "-slider-").concat(c)),
|
|
489
|
+
onMouseDown: b,
|
|
490
|
+
onTouchStart: b
|
|
491
|
+
}, /* @__PURE__ */ s.createElement(lr, {
|
|
492
|
+
prefixCls: o
|
|
493
|
+
}, /* @__PURE__ */ s.createElement(ir, {
|
|
494
|
+
x: v.x,
|
|
495
|
+
y: v.y,
|
|
496
|
+
ref: d
|
|
497
|
+
}, /* @__PURE__ */ s.createElement(ar, {
|
|
498
|
+
size: "small",
|
|
499
|
+
color: O.toHexString(),
|
|
500
|
+
prefixCls: o
|
|
501
|
+
})), /* @__PURE__ */ s.createElement(lo, {
|
|
502
|
+
colors: E,
|
|
503
|
+
type: c,
|
|
504
|
+
prefixCls: o
|
|
505
|
+
})));
|
|
506
|
+
};
|
|
507
|
+
function co(e) {
|
|
508
|
+
return q.useMemo(function() {
|
|
509
|
+
var r = e || {}, o = r.slider;
|
|
510
|
+
return [o || io];
|
|
511
|
+
}, [e]);
|
|
512
|
+
}
|
|
513
|
+
var so = [{
|
|
514
|
+
color: "rgb(255, 0, 0)",
|
|
515
|
+
percent: 0
|
|
516
|
+
}, {
|
|
517
|
+
color: "rgb(255, 255, 0)",
|
|
518
|
+
percent: 17
|
|
519
|
+
}, {
|
|
520
|
+
color: "rgb(0, 255, 0)",
|
|
521
|
+
percent: 33
|
|
522
|
+
}, {
|
|
523
|
+
color: "rgb(0, 255, 255)",
|
|
524
|
+
percent: 50
|
|
525
|
+
}, {
|
|
526
|
+
color: "rgb(0, 0, 255)",
|
|
527
|
+
percent: 67
|
|
528
|
+
}, {
|
|
529
|
+
color: "rgb(255, 0, 255)",
|
|
530
|
+
percent: 83
|
|
531
|
+
}, {
|
|
532
|
+
color: "rgb(255, 0, 0)",
|
|
533
|
+
percent: 100
|
|
534
|
+
}], uo = /* @__PURE__ */ te(function(e, r) {
|
|
535
|
+
var o = e.value, t = e.defaultValue, n = e.prefixCls, a = n === void 0 ? eo : n, i = e.onChange, l = e.onChangeComplete, c = e.className, u = e.style, d = e.panelRender, g = e.disabledAlpha, h = g === void 0 ? !1 : g, f = e.disabled, C = f === void 0 ? !1 : f, x = e.components, v = co(x), b = U(v, 1), O = b[0], E = ao(t || ro, o), m = U(E, 2), p = m[0], A = m[1], Z = ee(function() {
|
|
536
|
+
return p.setA(1).toRgbString();
|
|
537
|
+
}, [p]), B = function(S, J) {
|
|
538
|
+
o || A(S), i == null || i(S, J);
|
|
539
|
+
}, F = function(S) {
|
|
540
|
+
return new T(p.setHue(S));
|
|
541
|
+
}, z = function(S) {
|
|
542
|
+
return new T(p.setA(S / 100));
|
|
543
|
+
}, _ = function(S) {
|
|
544
|
+
B(F(S), {
|
|
545
|
+
type: "hue",
|
|
546
|
+
value: S
|
|
547
|
+
});
|
|
548
|
+
}, V = function(S) {
|
|
549
|
+
B(z(S), {
|
|
550
|
+
type: "alpha",
|
|
551
|
+
value: S
|
|
552
|
+
});
|
|
553
|
+
}, R = function(S) {
|
|
554
|
+
l && l(F(S));
|
|
555
|
+
}, W = function(S) {
|
|
556
|
+
l && l(z(S));
|
|
557
|
+
}, D = H("".concat(a, "-panel"), c, $e({}, "".concat(a, "-panel-disabled"), C)), M = {
|
|
558
|
+
prefixCls: a,
|
|
559
|
+
disabled: C,
|
|
560
|
+
color: p
|
|
561
|
+
}, G = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(no, be({
|
|
562
|
+
onChange: B
|
|
563
|
+
}, M, {
|
|
564
|
+
onChangeComplete: l
|
|
565
|
+
})), /* @__PURE__ */ s.createElement("div", {
|
|
566
|
+
className: "".concat(a, "-slider-container")
|
|
567
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
568
|
+
className: H("".concat(a, "-slider-group"), $e({}, "".concat(a, "-slider-group-disabled-alpha"), h))
|
|
569
|
+
}, /* @__PURE__ */ s.createElement(O, be({}, M, {
|
|
570
|
+
type: "hue",
|
|
571
|
+
colors: so,
|
|
572
|
+
min: 0,
|
|
573
|
+
max: 359,
|
|
574
|
+
value: p.getHue(),
|
|
575
|
+
onChange: _,
|
|
576
|
+
onChangeComplete: R
|
|
577
|
+
})), !h && /* @__PURE__ */ s.createElement(O, be({}, M, {
|
|
578
|
+
type: "alpha",
|
|
579
|
+
colors: [{
|
|
580
|
+
percent: 0,
|
|
581
|
+
color: "rgba(255, 0, 4, 0)"
|
|
582
|
+
}, {
|
|
583
|
+
percent: 100,
|
|
584
|
+
color: Z
|
|
585
|
+
}],
|
|
586
|
+
min: 0,
|
|
587
|
+
max: 100,
|
|
588
|
+
value: p.a * 100,
|
|
589
|
+
onChange: V,
|
|
590
|
+
onChangeComplete: W
|
|
591
|
+
}))), /* @__PURE__ */ s.createElement(oo, {
|
|
592
|
+
color: p.toRgbString(),
|
|
593
|
+
prefixCls: a
|
|
594
|
+
})));
|
|
595
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
596
|
+
className: D,
|
|
597
|
+
style: u,
|
|
598
|
+
ref: r
|
|
599
|
+
}, typeof d == "function" ? d(G) : G);
|
|
600
|
+
});
|
|
601
|
+
process.env.NODE_ENV !== "production" && (uo.displayName = "ColorPicker");
|
|
602
|
+
const go = (e, r) => (e == null ? void 0 : e.replace(/[^\w/]/g, "").slice(0, r ? 8 : 6)) || "", mo = (e, r) => e ? go(e, r) : "";
|
|
603
|
+
let fo = /* @__PURE__ */ function() {
|
|
604
|
+
function e(r) {
|
|
605
|
+
Qe(this, e);
|
|
606
|
+
var o;
|
|
607
|
+
if (this.cleared = !1, r instanceof e) {
|
|
608
|
+
this.metaColor = r.metaColor.clone(), this.colors = (o = r.colors) === null || o === void 0 ? void 0 : o.map((n) => ({
|
|
609
|
+
color: new e(n.color),
|
|
610
|
+
percent: n.percent
|
|
611
|
+
})), this.cleared = r.cleared;
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
const t = Array.isArray(r);
|
|
615
|
+
t && r.length ? (this.colors = r.map((n) => {
|
|
616
|
+
let {
|
|
617
|
+
color: a,
|
|
618
|
+
percent: i
|
|
619
|
+
} = n;
|
|
620
|
+
return {
|
|
621
|
+
color: new e(a),
|
|
622
|
+
percent: i
|
|
623
|
+
};
|
|
624
|
+
}), this.metaColor = new T(this.colors[0].color.metaColor)) : this.metaColor = new T(t ? "" : r), (!r || t && !this.colors) && (this.metaColor = this.metaColor.setA(0), this.cleared = !0);
|
|
625
|
+
}
|
|
626
|
+
return Ke(e, [{
|
|
627
|
+
key: "toHsb",
|
|
628
|
+
value: function() {
|
|
629
|
+
return this.metaColor.toHsb();
|
|
630
|
+
}
|
|
631
|
+
}, {
|
|
632
|
+
key: "toHsbString",
|
|
633
|
+
value: function() {
|
|
634
|
+
return this.metaColor.toHsbString();
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
key: "toHex",
|
|
638
|
+
value: function() {
|
|
639
|
+
return mo(this.toHexString(), this.metaColor.a < 1);
|
|
640
|
+
}
|
|
641
|
+
}, {
|
|
642
|
+
key: "toHexString",
|
|
643
|
+
value: function() {
|
|
644
|
+
return this.metaColor.toHexString();
|
|
645
|
+
}
|
|
646
|
+
}, {
|
|
647
|
+
key: "toRgb",
|
|
648
|
+
value: function() {
|
|
649
|
+
return this.metaColor.toRgb();
|
|
650
|
+
}
|
|
651
|
+
}, {
|
|
652
|
+
key: "toRgbString",
|
|
653
|
+
value: function() {
|
|
654
|
+
return this.metaColor.toRgbString();
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
key: "isGradient",
|
|
658
|
+
value: function() {
|
|
659
|
+
return !!this.colors && !this.cleared;
|
|
660
|
+
}
|
|
661
|
+
}, {
|
|
662
|
+
key: "getColors",
|
|
663
|
+
value: function() {
|
|
664
|
+
return this.colors || [{
|
|
665
|
+
color: this,
|
|
666
|
+
percent: 0
|
|
667
|
+
}];
|
|
668
|
+
}
|
|
669
|
+
}, {
|
|
670
|
+
key: "toCssString",
|
|
671
|
+
value: function() {
|
|
672
|
+
const {
|
|
673
|
+
colors: o
|
|
674
|
+
} = this;
|
|
675
|
+
return o ? `linear-gradient(90deg, ${o.map((n) => `${n.color.toRgbString()} ${n.percent}%`).join(", ")})` : this.metaColor.toRgbString();
|
|
676
|
+
}
|
|
677
|
+
}, {
|
|
678
|
+
key: "equals",
|
|
679
|
+
value: function(o) {
|
|
680
|
+
return !o || this.isGradient() !== o.isGradient() ? !1 : this.isGradient() ? this.colors.length === o.colors.length && this.colors.every((t, n) => {
|
|
681
|
+
const a = o.colors[n];
|
|
682
|
+
return t.percent === a.percent && t.color.equals(a.color);
|
|
683
|
+
}) : this.toHexString() === o.toHexString();
|
|
684
|
+
}
|
|
685
|
+
}]);
|
|
686
|
+
}();
|
|
687
|
+
const vo = (e, r) => {
|
|
688
|
+
const {
|
|
689
|
+
r: o,
|
|
690
|
+
g: t,
|
|
691
|
+
b: n,
|
|
692
|
+
a
|
|
693
|
+
} = e.toRgb(), i = new T(e.toRgbString()).onBackground(r).toHsv();
|
|
694
|
+
return a <= 0.5 ? i.v > 0.5 : o * 0.299 + t * 0.587 + n * 0.114 > 192;
|
|
695
|
+
}, cr = (e) => {
|
|
696
|
+
const {
|
|
697
|
+
paddingInline: r,
|
|
698
|
+
onlyIconSize: o
|
|
699
|
+
} = e;
|
|
700
|
+
return ne(e, {
|
|
701
|
+
buttonPaddingHorizontal: r,
|
|
702
|
+
buttonPaddingVertical: 0,
|
|
703
|
+
buttonIconOnlyFontSize: o
|
|
704
|
+
});
|
|
705
|
+
}, sr = (e) => {
|
|
706
|
+
var r, o, t, n, a, i;
|
|
707
|
+
const l = (r = e.contentFontSize) !== null && r !== void 0 ? r : e.fontSize, c = (o = e.contentFontSizeSM) !== null && o !== void 0 ? o : e.fontSize, u = (t = e.contentFontSizeLG) !== null && t !== void 0 ? t : e.fontSizeLG, d = (n = e.contentLineHeight) !== null && n !== void 0 ? n : he(l), g = (a = e.contentLineHeightSM) !== null && a !== void 0 ? a : he(c), h = (i = e.contentLineHeightLG) !== null && i !== void 0 ? i : he(u), f = vo(new fo(e.colorBgSolid), "#fff") ? "#000" : "#fff", C = He.reduce((x, v) => Object.assign(Object.assign({}, x), {
|
|
708
|
+
[`${v}ShadowColor`]: `0 ${oe(e.controlOutlineWidth)} 0 ${Pr(e[`${v}1`], e.colorBgContainer)}`
|
|
709
|
+
}), {});
|
|
710
|
+
return Object.assign(Object.assign({}, C), {
|
|
711
|
+
fontWeight: 400,
|
|
712
|
+
defaultShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,
|
|
713
|
+
primaryShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,
|
|
714
|
+
dangerShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,
|
|
715
|
+
primaryColor: e.colorTextLightSolid,
|
|
716
|
+
dangerColor: e.colorTextLightSolid,
|
|
717
|
+
borderColorDisabled: e.colorBorder,
|
|
718
|
+
defaultGhostColor: e.colorBgContainer,
|
|
719
|
+
ghostBg: "transparent",
|
|
720
|
+
defaultGhostBorderColor: e.colorBgContainer,
|
|
721
|
+
paddingInline: e.paddingContentHorizontal - e.lineWidth,
|
|
722
|
+
paddingInlineLG: e.paddingContentHorizontal - e.lineWidth,
|
|
723
|
+
paddingInlineSM: 8 - e.lineWidth,
|
|
724
|
+
onlyIconSize: "inherit",
|
|
725
|
+
onlyIconSizeSM: "inherit",
|
|
726
|
+
onlyIconSizeLG: "inherit",
|
|
727
|
+
groupBorderColor: e.colorPrimaryHover,
|
|
728
|
+
linkHoverBg: "transparent",
|
|
729
|
+
textTextColor: e.colorText,
|
|
730
|
+
textTextHoverColor: e.colorText,
|
|
731
|
+
textTextActiveColor: e.colorText,
|
|
732
|
+
textHoverBg: e.colorFillTertiary,
|
|
733
|
+
defaultColor: e.colorText,
|
|
734
|
+
defaultBg: e.colorBgContainer,
|
|
735
|
+
defaultBorderColor: e.colorBorder,
|
|
736
|
+
defaultBorderColorDisabled: e.colorBorder,
|
|
737
|
+
defaultHoverBg: e.colorBgContainer,
|
|
738
|
+
defaultHoverColor: e.colorPrimaryHover,
|
|
739
|
+
defaultHoverBorderColor: e.colorPrimaryHover,
|
|
740
|
+
defaultActiveBg: e.colorBgContainer,
|
|
741
|
+
defaultActiveColor: e.colorPrimaryActive,
|
|
742
|
+
defaultActiveBorderColor: e.colorPrimaryActive,
|
|
743
|
+
solidTextColor: f,
|
|
744
|
+
contentFontSize: l,
|
|
745
|
+
contentFontSizeSM: c,
|
|
746
|
+
contentFontSizeLG: u,
|
|
747
|
+
contentLineHeight: d,
|
|
748
|
+
contentLineHeightSM: g,
|
|
749
|
+
contentLineHeightLG: h,
|
|
750
|
+
paddingBlock: Math.max((e.controlHeight - l * d) / 2 - e.lineWidth, 0),
|
|
751
|
+
paddingBlockSM: Math.max((e.controlHeightSM - c * g) / 2 - e.lineWidth, 0),
|
|
752
|
+
paddingBlockLG: Math.max((e.controlHeightLG - u * h) / 2 - e.lineWidth, 0)
|
|
753
|
+
});
|
|
754
|
+
}, Co = (e) => {
|
|
755
|
+
const {
|
|
756
|
+
componentCls: r,
|
|
757
|
+
iconCls: o,
|
|
758
|
+
fontWeight: t,
|
|
759
|
+
opacityLoading: n,
|
|
760
|
+
motionDurationSlow: a,
|
|
761
|
+
motionEaseInOut: i,
|
|
762
|
+
marginXS: l,
|
|
763
|
+
calc: c
|
|
764
|
+
} = e;
|
|
765
|
+
return {
|
|
766
|
+
[r]: {
|
|
767
|
+
outline: "none",
|
|
768
|
+
position: "relative",
|
|
769
|
+
display: "inline-flex",
|
|
770
|
+
gap: e.marginXS,
|
|
771
|
+
alignItems: "center",
|
|
772
|
+
justifyContent: "center",
|
|
773
|
+
fontWeight: t,
|
|
774
|
+
whiteSpace: "nowrap",
|
|
775
|
+
textAlign: "center",
|
|
776
|
+
backgroundImage: "none",
|
|
777
|
+
background: "transparent",
|
|
778
|
+
border: `${oe(e.lineWidth)} ${e.lineType} transparent`,
|
|
779
|
+
cursor: "pointer",
|
|
780
|
+
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
781
|
+
userSelect: "none",
|
|
782
|
+
touchAction: "manipulation",
|
|
783
|
+
color: e.colorText,
|
|
784
|
+
"&:disabled > *": {
|
|
785
|
+
pointerEvents: "none"
|
|
786
|
+
},
|
|
787
|
+
// https://github.com/ant-design/ant-design/issues/51380
|
|
788
|
+
[`${r}-icon > svg`]: Nr(),
|
|
789
|
+
"> a": {
|
|
790
|
+
color: "currentColor"
|
|
791
|
+
},
|
|
792
|
+
"&:not(:disabled)": Ir(e),
|
|
793
|
+
[`&${r}-two-chinese-chars::first-letter`]: {
|
|
794
|
+
letterSpacing: "0.34em"
|
|
795
|
+
},
|
|
796
|
+
[`&${r}-two-chinese-chars > *:not(${o})`]: {
|
|
797
|
+
marginInlineEnd: "-0.34em",
|
|
798
|
+
letterSpacing: "0.34em"
|
|
799
|
+
},
|
|
800
|
+
[`&${r}-icon-only`]: {
|
|
801
|
+
paddingInline: 0,
|
|
802
|
+
// make `btn-icon-only` not too narrow
|
|
803
|
+
[`&${r}-compact-item`]: {
|
|
804
|
+
flex: "none"
|
|
805
|
+
},
|
|
806
|
+
[`&${r}-round`]: {
|
|
807
|
+
width: "auto"
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
// Loading
|
|
811
|
+
[`&${r}-loading`]: {
|
|
812
|
+
opacity: n,
|
|
813
|
+
cursor: "default"
|
|
814
|
+
},
|
|
815
|
+
[`${r}-loading-icon`]: {
|
|
816
|
+
transition: ["width", "opacity", "margin"].map((u) => `${u} ${a} ${i}`).join(",")
|
|
817
|
+
},
|
|
818
|
+
// iconPosition
|
|
819
|
+
[`&:not(${r}-icon-end)`]: {
|
|
820
|
+
[`${r}-loading-icon-motion`]: {
|
|
821
|
+
"&-appear-start, &-enter-start": {
|
|
822
|
+
marginInlineEnd: c(l).mul(-1).equal()
|
|
823
|
+
},
|
|
824
|
+
"&-appear-active, &-enter-active": {
|
|
825
|
+
marginInlineEnd: 0
|
|
826
|
+
},
|
|
827
|
+
"&-leave-start": {
|
|
828
|
+
marginInlineEnd: 0
|
|
829
|
+
},
|
|
830
|
+
"&-leave-active": {
|
|
831
|
+
marginInlineEnd: c(l).mul(-1).equal()
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
"&-icon-end": {
|
|
836
|
+
flexDirection: "row-reverse",
|
|
837
|
+
[`${r}-loading-icon-motion`]: {
|
|
838
|
+
"&-appear-start, &-enter-start": {
|
|
839
|
+
marginInlineStart: c(l).mul(-1).equal()
|
|
840
|
+
},
|
|
841
|
+
"&-appear-active, &-enter-active": {
|
|
842
|
+
marginInlineStart: 0
|
|
843
|
+
},
|
|
844
|
+
"&-leave-start": {
|
|
845
|
+
marginInlineStart: 0
|
|
846
|
+
},
|
|
847
|
+
"&-leave-active": {
|
|
848
|
+
marginInlineStart: c(l).mul(-1).equal()
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
}, ur = (e, r, o) => ({
|
|
855
|
+
[`&:not(:disabled):not(${e}-disabled)`]: {
|
|
856
|
+
"&:hover": r,
|
|
857
|
+
"&:active": o
|
|
858
|
+
}
|
|
859
|
+
}), bo = (e) => ({
|
|
860
|
+
minWidth: e.controlHeight,
|
|
861
|
+
paddingInlineStart: 0,
|
|
862
|
+
paddingInlineEnd: 0,
|
|
863
|
+
borderRadius: "50%"
|
|
864
|
+
}), ho = (e) => ({
|
|
865
|
+
borderRadius: e.controlHeight,
|
|
866
|
+
paddingInlineStart: e.calc(e.controlHeight).div(2).equal(),
|
|
867
|
+
paddingInlineEnd: e.calc(e.controlHeight).div(2).equal()
|
|
868
|
+
}), po = (e) => ({
|
|
869
|
+
cursor: "not-allowed",
|
|
870
|
+
borderColor: e.borderColorDisabled,
|
|
871
|
+
color: e.colorTextDisabled,
|
|
872
|
+
background: e.colorBgContainerDisabled,
|
|
873
|
+
boxShadow: "none"
|
|
874
|
+
}), ae = (e, r, o, t, n, a, i, l) => ({
|
|
875
|
+
[`&${e}-background-ghost`]: Object.assign(Object.assign({
|
|
876
|
+
color: o || void 0,
|
|
877
|
+
background: r,
|
|
878
|
+
borderColor: t || void 0,
|
|
879
|
+
boxShadow: "none"
|
|
880
|
+
}, ur(e, Object.assign({
|
|
881
|
+
background: r
|
|
882
|
+
}, i), Object.assign({
|
|
883
|
+
background: r
|
|
884
|
+
}, l))), {
|
|
885
|
+
"&:disabled": {
|
|
886
|
+
cursor: "not-allowed",
|
|
887
|
+
color: n || void 0,
|
|
888
|
+
borderColor: a || void 0
|
|
889
|
+
}
|
|
890
|
+
})
|
|
891
|
+
}), yo = (e) => ({
|
|
892
|
+
[`&:disabled, &${e.componentCls}-disabled`]: Object.assign({}, po(e))
|
|
893
|
+
}), So = (e) => ({
|
|
894
|
+
[`&:disabled, &${e.componentCls}-disabled`]: {
|
|
895
|
+
cursor: "not-allowed",
|
|
896
|
+
color: e.colorTextDisabled
|
|
897
|
+
}
|
|
898
|
+
}), le = (e, r, o, t) => {
|
|
899
|
+
const a = t && ["link", "text"].includes(t) ? So : yo;
|
|
900
|
+
return Object.assign(Object.assign({}, a(e)), ur(e.componentCls, r, o));
|
|
901
|
+
}, ie = (e, r, o, t, n) => ({
|
|
902
|
+
[`&${e.componentCls}-variant-solid`]: Object.assign({
|
|
903
|
+
color: r,
|
|
904
|
+
background: o
|
|
905
|
+
}, le(e, t, n))
|
|
906
|
+
}), ce = (e, r, o, t, n) => ({
|
|
907
|
+
[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]: Object.assign({
|
|
908
|
+
borderColor: r,
|
|
909
|
+
background: o
|
|
910
|
+
}, le(e, t, n))
|
|
911
|
+
}), se = (e) => ({
|
|
912
|
+
[`&${e.componentCls}-variant-dashed`]: {
|
|
913
|
+
borderStyle: "dashed"
|
|
914
|
+
}
|
|
915
|
+
}), ue = (e, r, o, t) => ({
|
|
916
|
+
[`&${e.componentCls}-variant-filled`]: Object.assign({
|
|
917
|
+
boxShadow: "none",
|
|
918
|
+
background: r
|
|
919
|
+
}, le(e, o, t))
|
|
920
|
+
}), I = (e, r, o, t, n) => ({
|
|
921
|
+
[`&${e.componentCls}-variant-${o}`]: Object.assign({
|
|
922
|
+
color: r,
|
|
923
|
+
boxShadow: "none"
|
|
924
|
+
}, le(e, t, n, o))
|
|
925
|
+
}), xo = (e) => {
|
|
926
|
+
const {
|
|
927
|
+
componentCls: r
|
|
928
|
+
} = e;
|
|
929
|
+
return He.reduce((o, t) => {
|
|
930
|
+
const n = e[`${t}6`], a = e[`${t}1`], i = e[`${t}5`], l = e[`${t}2`], c = e[`${t}3`], u = e[`${t}7`];
|
|
931
|
+
return Object.assign(Object.assign({}, o), {
|
|
932
|
+
[`&${r}-color-${t}`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
933
|
+
color: n,
|
|
934
|
+
boxShadow: e[`${t}ShadowColor`]
|
|
935
|
+
}, ie(e, e.colorTextLightSolid, n, {
|
|
936
|
+
background: i
|
|
937
|
+
}, {
|
|
938
|
+
background: u
|
|
939
|
+
})), ce(e, n, e.colorBgContainer, {
|
|
940
|
+
color: i,
|
|
941
|
+
borderColor: i,
|
|
942
|
+
background: e.colorBgContainer
|
|
943
|
+
}, {
|
|
944
|
+
color: u,
|
|
945
|
+
borderColor: u,
|
|
946
|
+
background: e.colorBgContainer
|
|
947
|
+
})), se(e)), ue(e, a, {
|
|
948
|
+
background: l
|
|
949
|
+
}, {
|
|
950
|
+
background: c
|
|
951
|
+
})), I(e, n, "link", {
|
|
952
|
+
color: i
|
|
953
|
+
}, {
|
|
954
|
+
color: u
|
|
955
|
+
})), I(e, n, "text", {
|
|
956
|
+
color: i,
|
|
957
|
+
background: a
|
|
958
|
+
}, {
|
|
959
|
+
color: u,
|
|
960
|
+
background: c
|
|
961
|
+
}))
|
|
962
|
+
});
|
|
963
|
+
}, {});
|
|
964
|
+
}, $o = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
965
|
+
color: e.defaultColor,
|
|
966
|
+
boxShadow: e.defaultShadow
|
|
967
|
+
}, ie(e, e.solidTextColor, e.colorBgSolid, {
|
|
968
|
+
color: e.solidTextColor,
|
|
969
|
+
background: e.colorBgSolidHover
|
|
970
|
+
}, {
|
|
971
|
+
color: e.solidTextColor,
|
|
972
|
+
background: e.colorBgSolidActive
|
|
973
|
+
})), se(e)), ue(e, e.colorFillTertiary, {
|
|
974
|
+
background: e.colorFillSecondary
|
|
975
|
+
}, {
|
|
976
|
+
background: e.colorFill
|
|
977
|
+
})), ae(e.componentCls, e.ghostBg, e.defaultGhostColor, e.defaultGhostBorderColor, e.colorTextDisabled, e.colorBorder)), I(e, e.textTextColor, "link", {
|
|
978
|
+
color: e.colorLinkHover,
|
|
979
|
+
background: e.linkHoverBg
|
|
980
|
+
}, {
|
|
981
|
+
color: e.colorLinkActive
|
|
982
|
+
})), Eo = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
983
|
+
color: e.colorPrimary,
|
|
984
|
+
boxShadow: e.primaryShadow
|
|
985
|
+
}, ce(e, e.colorPrimary, e.colorBgContainer, {
|
|
986
|
+
color: e.colorPrimaryTextHover,
|
|
987
|
+
borderColor: e.colorPrimaryHover,
|
|
988
|
+
background: e.colorBgContainer
|
|
989
|
+
}, {
|
|
990
|
+
color: e.colorPrimaryTextActive,
|
|
991
|
+
borderColor: e.colorPrimaryActive,
|
|
992
|
+
background: e.colorBgContainer
|
|
993
|
+
})), se(e)), ue(e, e.colorPrimaryBg, {
|
|
994
|
+
background: e.colorPrimaryBgHover
|
|
995
|
+
}, {
|
|
996
|
+
background: e.colorPrimaryBorder
|
|
997
|
+
})), I(e, e.colorPrimaryText, "text", {
|
|
998
|
+
color: e.colorPrimaryTextHover,
|
|
999
|
+
background: e.colorPrimaryBg
|
|
1000
|
+
}, {
|
|
1001
|
+
color: e.colorPrimaryTextActive,
|
|
1002
|
+
background: e.colorPrimaryBorder
|
|
1003
|
+
})), I(e, e.colorPrimaryText, "link", {
|
|
1004
|
+
color: e.colorPrimaryTextHover,
|
|
1005
|
+
background: e.linkHoverBg
|
|
1006
|
+
}, {
|
|
1007
|
+
color: e.colorPrimaryTextActive
|
|
1008
|
+
})), ae(e.componentCls, e.ghostBg, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
|
|
1009
|
+
color: e.colorPrimaryHover,
|
|
1010
|
+
borderColor: e.colorPrimaryHover
|
|
1011
|
+
}, {
|
|
1012
|
+
color: e.colorPrimaryActive,
|
|
1013
|
+
borderColor: e.colorPrimaryActive
|
|
1014
|
+
})), Bo = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
1015
|
+
color: e.colorError,
|
|
1016
|
+
boxShadow: e.dangerShadow
|
|
1017
|
+
}, ie(e, e.dangerColor, e.colorError, {
|
|
1018
|
+
background: e.colorErrorHover
|
|
1019
|
+
}, {
|
|
1020
|
+
background: e.colorErrorActive
|
|
1021
|
+
})), ce(e, e.colorError, e.colorBgContainer, {
|
|
1022
|
+
color: e.colorErrorHover,
|
|
1023
|
+
borderColor: e.colorErrorBorderHover
|
|
1024
|
+
}, {
|
|
1025
|
+
color: e.colorErrorActive,
|
|
1026
|
+
borderColor: e.colorErrorActive
|
|
1027
|
+
})), se(e)), ue(e, e.colorErrorBg, {
|
|
1028
|
+
background: e.colorErrorBgFilledHover
|
|
1029
|
+
}, {
|
|
1030
|
+
background: e.colorErrorBgActive
|
|
1031
|
+
})), I(e, e.colorError, "text", {
|
|
1032
|
+
color: e.colorErrorHover,
|
|
1033
|
+
background: e.colorErrorBg
|
|
1034
|
+
}, {
|
|
1035
|
+
color: e.colorErrorHover,
|
|
1036
|
+
background: e.colorErrorBgActive
|
|
1037
|
+
})), I(e, e.colorError, "link", {
|
|
1038
|
+
color: e.colorErrorHover
|
|
1039
|
+
}, {
|
|
1040
|
+
color: e.colorErrorActive
|
|
1041
|
+
})), ae(e.componentCls, e.ghostBg, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
|
|
1042
|
+
color: e.colorErrorHover,
|
|
1043
|
+
borderColor: e.colorErrorHover
|
|
1044
|
+
}, {
|
|
1045
|
+
color: e.colorErrorActive,
|
|
1046
|
+
borderColor: e.colorErrorActive
|
|
1047
|
+
})), Ho = (e) => Object.assign(Object.assign({}, I(e, e.colorLink, "link", {
|
|
1048
|
+
color: e.colorLinkHover
|
|
1049
|
+
}, {
|
|
1050
|
+
color: e.colorLinkActive
|
|
1051
|
+
})), ae(e.componentCls, e.ghostBg, e.colorInfo, e.colorInfo, e.colorTextDisabled, e.colorBorder, {
|
|
1052
|
+
color: e.colorInfoHover,
|
|
1053
|
+
borderColor: e.colorInfoHover
|
|
1054
|
+
}, {
|
|
1055
|
+
color: e.colorInfoActive,
|
|
1056
|
+
borderColor: e.colorInfoActive
|
|
1057
|
+
})), Oo = (e) => {
|
|
1058
|
+
const {
|
|
1059
|
+
componentCls: r
|
|
1060
|
+
} = e;
|
|
1061
|
+
return Object.assign({
|
|
1062
|
+
[`${r}-color-default`]: $o(e),
|
|
1063
|
+
[`${r}-color-primary`]: Eo(e),
|
|
1064
|
+
[`${r}-color-dangerous`]: Bo(e),
|
|
1065
|
+
[`${r}-color-link`]: Ho(e)
|
|
1066
|
+
}, xo(e));
|
|
1067
|
+
}, Ro = (e) => Object.assign(Object.assign(Object.assign(Object.assign({}, ce(e, e.defaultBorderColor, e.defaultBg, {
|
|
1068
|
+
color: e.defaultHoverColor,
|
|
1069
|
+
borderColor: e.defaultHoverBorderColor,
|
|
1070
|
+
background: e.defaultHoverBg
|
|
1071
|
+
}, {
|
|
1072
|
+
color: e.defaultActiveColor,
|
|
1073
|
+
borderColor: e.defaultActiveBorderColor,
|
|
1074
|
+
background: e.defaultActiveBg
|
|
1075
|
+
})), I(e, e.textTextColor, "text", {
|
|
1076
|
+
color: e.textTextHoverColor,
|
|
1077
|
+
background: e.textHoverBg
|
|
1078
|
+
}, {
|
|
1079
|
+
color: e.textTextActiveColor,
|
|
1080
|
+
background: e.colorBgTextActive
|
|
1081
|
+
})), ie(e, e.primaryColor, e.colorPrimary, {
|
|
1082
|
+
background: e.colorPrimaryHover,
|
|
1083
|
+
color: e.primaryColor
|
|
1084
|
+
}, {
|
|
1085
|
+
background: e.colorPrimaryActive,
|
|
1086
|
+
color: e.primaryColor
|
|
1087
|
+
})), I(e, e.colorLink, "link", {
|
|
1088
|
+
color: e.colorLinkHover,
|
|
1089
|
+
background: e.linkHoverBg
|
|
1090
|
+
}, {
|
|
1091
|
+
color: e.colorLinkActive
|
|
1092
|
+
})), Oe = function(e) {
|
|
1093
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
1094
|
+
const {
|
|
1095
|
+
componentCls: o,
|
|
1096
|
+
controlHeight: t,
|
|
1097
|
+
fontSize: n,
|
|
1098
|
+
borderRadius: a,
|
|
1099
|
+
buttonPaddingHorizontal: i,
|
|
1100
|
+
iconCls: l,
|
|
1101
|
+
buttonPaddingVertical: c,
|
|
1102
|
+
buttonIconOnlyFontSize: u
|
|
1103
|
+
} = e;
|
|
1104
|
+
return [
|
|
1105
|
+
{
|
|
1106
|
+
[r]: {
|
|
1107
|
+
fontSize: n,
|
|
1108
|
+
height: t,
|
|
1109
|
+
padding: `${oe(c)} ${oe(i)}`,
|
|
1110
|
+
borderRadius: a,
|
|
1111
|
+
[`&${o}-icon-only`]: {
|
|
1112
|
+
width: t,
|
|
1113
|
+
[l]: {
|
|
1114
|
+
fontSize: u
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
// Shape - patch prefixCls again to override solid border radius style
|
|
1120
|
+
{
|
|
1121
|
+
[`${o}${o}-circle${r}`]: bo(e)
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
[`${o}${o}-round${r}`]: ho(e)
|
|
1125
|
+
}
|
|
1126
|
+
];
|
|
1127
|
+
}, Po = (e) => {
|
|
1128
|
+
const r = ne(e, {
|
|
1129
|
+
fontSize: e.contentFontSize
|
|
1130
|
+
});
|
|
1131
|
+
return Oe(r, e.componentCls);
|
|
1132
|
+
}, jo = (e) => {
|
|
1133
|
+
const r = ne(e, {
|
|
1134
|
+
controlHeight: e.controlHeightSM,
|
|
1135
|
+
fontSize: e.contentFontSizeSM,
|
|
1136
|
+
padding: e.paddingXS,
|
|
1137
|
+
buttonPaddingHorizontal: e.paddingInlineSM,
|
|
1138
|
+
buttonPaddingVertical: 0,
|
|
1139
|
+
borderRadius: e.borderRadiusSM,
|
|
1140
|
+
buttonIconOnlyFontSize: e.onlyIconSizeSM
|
|
1141
|
+
});
|
|
1142
|
+
return Oe(r, `${e.componentCls}-sm`);
|
|
1143
|
+
}, Io = (e) => {
|
|
1144
|
+
const r = ne(e, {
|
|
1145
|
+
controlHeight: e.controlHeightLG,
|
|
1146
|
+
fontSize: e.contentFontSizeLG,
|
|
1147
|
+
buttonPaddingHorizontal: e.paddingInlineLG,
|
|
1148
|
+
buttonPaddingVertical: 0,
|
|
1149
|
+
borderRadius: e.borderRadiusLG,
|
|
1150
|
+
buttonIconOnlyFontSize: e.onlyIconSizeLG
|
|
1151
|
+
});
|
|
1152
|
+
return Oe(r, `${e.componentCls}-lg`);
|
|
1153
|
+
}, No = (e) => {
|
|
1154
|
+
const {
|
|
1155
|
+
componentCls: r
|
|
1156
|
+
} = e;
|
|
1157
|
+
return {
|
|
1158
|
+
[r]: {
|
|
1159
|
+
[`&${r}-block`]: {
|
|
1160
|
+
width: "100%"
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
}, wo = jr("Button", (e) => {
|
|
1165
|
+
const r = cr(e);
|
|
1166
|
+
return [
|
|
1167
|
+
// Shared
|
|
1168
|
+
Co(r),
|
|
1169
|
+
// Size
|
|
1170
|
+
Po(r),
|
|
1171
|
+
jo(r),
|
|
1172
|
+
Io(r),
|
|
1173
|
+
// Block
|
|
1174
|
+
No(r),
|
|
1175
|
+
// Color
|
|
1176
|
+
Oo(r),
|
|
1177
|
+
// https://github.com/ant-design/ant-design/issues/50969
|
|
1178
|
+
Ro(r),
|
|
1179
|
+
// Button Group
|
|
1180
|
+
Jr(r)
|
|
1181
|
+
];
|
|
1182
|
+
}, sr, {
|
|
1183
|
+
unitless: {
|
|
1184
|
+
fontWeight: !0,
|
|
1185
|
+
contentLineHeight: !0,
|
|
1186
|
+
contentLineHeightSM: !0,
|
|
1187
|
+
contentLineHeightLG: !0
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
function To(e, r) {
|
|
1191
|
+
return {
|
|
1192
|
+
// border collapse
|
|
1193
|
+
[`&-item:not(${r}-last-item)`]: {
|
|
1194
|
+
marginBottom: e.calc(e.lineWidth).mul(-1).equal()
|
|
1195
|
+
},
|
|
1196
|
+
"&-item": {
|
|
1197
|
+
"&:hover,&:focus,&:active": {
|
|
1198
|
+
zIndex: 2
|
|
1199
|
+
},
|
|
1200
|
+
"&[disabled]": {
|
|
1201
|
+
zIndex: 0
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1206
|
+
function Do(e, r) {
|
|
1207
|
+
return {
|
|
1208
|
+
[`&-item:not(${r}-first-item):not(${r}-last-item)`]: {
|
|
1209
|
+
borderRadius: 0
|
|
1210
|
+
},
|
|
1211
|
+
[`&-item${r}-first-item:not(${r}-last-item)`]: {
|
|
1212
|
+
[`&, &${e}-sm, &${e}-lg`]: {
|
|
1213
|
+
borderEndEndRadius: 0,
|
|
1214
|
+
borderEndStartRadius: 0
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
[`&-item${r}-last-item:not(${r}-first-item)`]: {
|
|
1218
|
+
[`&, &${e}-sm, &${e}-lg`]: {
|
|
1219
|
+
borderStartStartRadius: 0,
|
|
1220
|
+
borderStartEndRadius: 0
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
function Lo(e) {
|
|
1226
|
+
const r = `${e.componentCls}-compact-vertical`;
|
|
1227
|
+
return {
|
|
1228
|
+
[r]: Object.assign(Object.assign({}, To(e, r)), Do(e.componentCls, r))
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
const Ao = (e) => {
|
|
1232
|
+
const {
|
|
1233
|
+
componentCls: r,
|
|
1234
|
+
colorPrimaryHover: o,
|
|
1235
|
+
lineWidth: t,
|
|
1236
|
+
calc: n
|
|
1237
|
+
} = e, a = n(t).mul(-1).equal(), i = (l) => {
|
|
1238
|
+
const c = `${r}-compact${l ? "-vertical" : ""}-item${r}-primary:not([disabled])`;
|
|
1239
|
+
return {
|
|
1240
|
+
[`${c} + ${c}::before`]: {
|
|
1241
|
+
position: "absolute",
|
|
1242
|
+
top: l ? a : 0,
|
|
1243
|
+
insetInlineStart: l ? 0 : a,
|
|
1244
|
+
backgroundColor: o,
|
|
1245
|
+
content: '""',
|
|
1246
|
+
width: l ? "100%" : t,
|
|
1247
|
+
height: l ? t : "100%"
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1250
|
+
};
|
|
1251
|
+
return Object.assign(Object.assign({}, i()), i(!0));
|
|
1252
|
+
}, zo = wr(["Button", "compact"], (e) => {
|
|
1253
|
+
const r = cr(e);
|
|
1254
|
+
return [
|
|
1255
|
+
// Space Compact
|
|
1256
|
+
Wr(r),
|
|
1257
|
+
Lo(r),
|
|
1258
|
+
Ao(r)
|
|
1259
|
+
];
|
|
1260
|
+
}, sr);
|
|
1261
|
+
var _o = function(e, r) {
|
|
1262
|
+
var o = {};
|
|
1263
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
1264
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, t = Object.getOwnPropertySymbols(e); n < t.length; n++)
|
|
1265
|
+
r.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (o[t[n]] = e[t[n]]);
|
|
1266
|
+
return o;
|
|
1267
|
+
};
|
|
1268
|
+
function Mo(e) {
|
|
1269
|
+
if (typeof e == "object" && e) {
|
|
1270
|
+
let r = e == null ? void 0 : e.delay;
|
|
1271
|
+
return r = !Number.isNaN(r) && typeof r == "number" ? r : 0, {
|
|
1272
|
+
loading: r <= 0,
|
|
1273
|
+
delay: r
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
return {
|
|
1277
|
+
loading: !!e,
|
|
1278
|
+
delay: 0
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
const Go = {
|
|
1282
|
+
default: ["default", "outlined"],
|
|
1283
|
+
primary: ["primary", "solid"],
|
|
1284
|
+
dashed: ["default", "dashed"],
|
|
1285
|
+
// `link` is not a real color but we should compatible with it
|
|
1286
|
+
link: ["link", "link"],
|
|
1287
|
+
text: ["default", "text"]
|
|
1288
|
+
}, Fo = /* @__PURE__ */ s.forwardRef((e, r) => {
|
|
1289
|
+
var o, t;
|
|
1290
|
+
const {
|
|
1291
|
+
loading: n = !1,
|
|
1292
|
+
prefixCls: a,
|
|
1293
|
+
color: i,
|
|
1294
|
+
variant: l,
|
|
1295
|
+
type: c,
|
|
1296
|
+
danger: u = !1,
|
|
1297
|
+
shape: d = "default",
|
|
1298
|
+
size: g,
|
|
1299
|
+
styles: h,
|
|
1300
|
+
disabled: f,
|
|
1301
|
+
className: C,
|
|
1302
|
+
rootClassName: x,
|
|
1303
|
+
children: v,
|
|
1304
|
+
icon: b,
|
|
1305
|
+
iconPosition: O = "start",
|
|
1306
|
+
ghost: E = !1,
|
|
1307
|
+
block: m = !1,
|
|
1308
|
+
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
|
|
1309
|
+
htmlType: p = "button",
|
|
1310
|
+
classNames: A,
|
|
1311
|
+
style: Z = {},
|
|
1312
|
+
autoInsertSpace: B,
|
|
1313
|
+
autoFocus: F
|
|
1314
|
+
} = e, z = _o(e, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]), _ = c || "default", [V, R] = ee(() => {
|
|
1315
|
+
if (i && l)
|
|
1316
|
+
return [i, l];
|
|
1317
|
+
const $ = Go[_] || [];
|
|
1318
|
+
return u ? ["danger", $[1]] : $;
|
|
1319
|
+
}, [c, i, l, u]), D = V === "danger" ? "dangerous" : V, {
|
|
1320
|
+
getPrefixCls: M,
|
|
1321
|
+
direction: G,
|
|
1322
|
+
autoInsertSpace: P,
|
|
1323
|
+
className: S,
|
|
1324
|
+
style: J,
|
|
1325
|
+
classNames: dr,
|
|
1326
|
+
styles: gr
|
|
1327
|
+
} = Tr("button"), de = (o = B ?? P) !== null && o !== void 0 ? o : !0, y = M("btn", a), [Pe, mr, fr] = wo(y), vr = We(Lr), X = f ?? vr, Cr = We(rr), Q = ee(() => Mo(n), [n]), [L, je] = xe(Q.loading), [ge, Ie] = xe(!1), K = j(null), Ne = Dr(r, K), we = yr.count(v) === 1 && !b && !re(R), me = j(!0);
|
|
1328
|
+
s.useEffect(() => (me.current = !1, () => {
|
|
1329
|
+
me.current = !0;
|
|
1330
|
+
}), []), k(() => {
|
|
1331
|
+
let $ = null;
|
|
1332
|
+
Q.delay > 0 ? $ = setTimeout(() => {
|
|
1333
|
+
$ = null, je(!0);
|
|
1334
|
+
}, Q.delay) : je(Q.loading);
|
|
1335
|
+
function N() {
|
|
1336
|
+
$ && (clearTimeout($), $ = null);
|
|
1337
|
+
}
|
|
1338
|
+
return N;
|
|
1339
|
+
}, [Q]), k(() => {
|
|
1340
|
+
if (!K.current || !de)
|
|
1341
|
+
return;
|
|
1342
|
+
const $ = K.current.textContent || "";
|
|
1343
|
+
we && Ee($) ? ge || Ie(!0) : ge && Ie(!1);
|
|
1344
|
+
}), k(() => {
|
|
1345
|
+
F && K.current && K.current.focus();
|
|
1346
|
+
}, []);
|
|
1347
|
+
const Te = s.useCallback(($) => {
|
|
1348
|
+
var N;
|
|
1349
|
+
if (L || X) {
|
|
1350
|
+
$.preventDefault();
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
(N = e.onClick) === null || N === void 0 || N.call(e, ("href" in e, $));
|
|
1354
|
+
}, [e.onClick, L, X]);
|
|
1355
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1356
|
+
const $ = er("Button");
|
|
1357
|
+
process.env.NODE_ENV !== "production" && $(!(typeof b == "string" && b.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${b}\` at https://ant.design/components/icon`), process.env.NODE_ENV !== "production" && $(!(E && re(R)), "usage", "`link` or `text` button can't be a `ghost` button.");
|
|
1358
|
+
}
|
|
1359
|
+
const {
|
|
1360
|
+
compactSize: br,
|
|
1361
|
+
compactItemClassnames: De
|
|
1362
|
+
} = _r(y, G), hr = {
|
|
1363
|
+
large: "lg",
|
|
1364
|
+
small: "sm",
|
|
1365
|
+
middle: void 0
|
|
1366
|
+
}, Le = zr(($) => {
|
|
1367
|
+
var N, Ce;
|
|
1368
|
+
return (Ce = (N = g ?? br) !== null && N !== void 0 ? N : Cr) !== null && Ce !== void 0 ? Ce : $;
|
|
1369
|
+
}), Ae = Le && (t = hr[Le]) !== null && t !== void 0 ? t : "", pr = L ? "loading" : b, fe = xr(z, ["navigate"]), ze = H(y, mr, fr, {
|
|
1370
|
+
[`${y}-${d}`]: d !== "default" && d,
|
|
1371
|
+
// line(253 - 254): Compatible with versions earlier than 5.21.0
|
|
1372
|
+
[`${y}-${_}`]: _,
|
|
1373
|
+
[`${y}-dangerous`]: u,
|
|
1374
|
+
[`${y}-color-${D}`]: D,
|
|
1375
|
+
[`${y}-variant-${R}`]: R,
|
|
1376
|
+
[`${y}-${Ae}`]: Ae,
|
|
1377
|
+
[`${y}-icon-only`]: !v && v !== 0 && !!pr,
|
|
1378
|
+
[`${y}-background-ghost`]: E && !re(R),
|
|
1379
|
+
[`${y}-loading`]: L,
|
|
1380
|
+
[`${y}-two-chinese-chars`]: ge && de && !L,
|
|
1381
|
+
[`${y}-block`]: m,
|
|
1382
|
+
[`${y}-rtl`]: G === "rtl",
|
|
1383
|
+
[`${y}-icon-end`]: O === "end"
|
|
1384
|
+
}, De, C, x, S), _e = Object.assign(Object.assign({}, J), Z), Me = H(A == null ? void 0 : A.icon, dr.icon), Ge = Object.assign(Object.assign({}, (h == null ? void 0 : h.icon) || {}), gr.icon || {}), Fe = b && !L ? /* @__PURE__ */ s.createElement(Be, {
|
|
1385
|
+
prefixCls: y,
|
|
1386
|
+
className: Me,
|
|
1387
|
+
style: Ge
|
|
1388
|
+
}, b) : n && typeof n == "object" && n.icon ? /* @__PURE__ */ s.createElement(Be, {
|
|
1389
|
+
prefixCls: y,
|
|
1390
|
+
className: Me,
|
|
1391
|
+
style: Ge
|
|
1392
|
+
}, n.icon) : /* @__PURE__ */ s.createElement(Zr, {
|
|
1393
|
+
existIcon: !!b,
|
|
1394
|
+
prefixCls: y,
|
|
1395
|
+
loading: L,
|
|
1396
|
+
mount: me.current
|
|
1397
|
+
}), Ve = v || v === 0 ? Ur(v, we && de) : null;
|
|
1398
|
+
if (fe.href !== void 0)
|
|
1399
|
+
return Pe(/* @__PURE__ */ s.createElement("a", Object.assign({}, fe, {
|
|
1400
|
+
className: H(ze, {
|
|
1401
|
+
[`${y}-disabled`]: X
|
|
1402
|
+
}),
|
|
1403
|
+
href: X ? void 0 : fe.href,
|
|
1404
|
+
style: _e,
|
|
1405
|
+
onClick: Te,
|
|
1406
|
+
ref: Ne,
|
|
1407
|
+
tabIndex: X ? -1 : 0
|
|
1408
|
+
}), Fe, Ve));
|
|
1409
|
+
let ve = /* @__PURE__ */ s.createElement("button", Object.assign({}, z, {
|
|
1410
|
+
type: p,
|
|
1411
|
+
className: ze,
|
|
1412
|
+
style: _e,
|
|
1413
|
+
onClick: Te,
|
|
1414
|
+
disabled: X,
|
|
1415
|
+
ref: Ne
|
|
1416
|
+
}), Fe, Ve, De && /* @__PURE__ */ s.createElement(zo, {
|
|
1417
|
+
prefixCls: y
|
|
1418
|
+
}));
|
|
1419
|
+
return re(R) || (ve = /* @__PURE__ */ s.createElement(Ar, {
|
|
1420
|
+
component: "Button",
|
|
1421
|
+
disabled: L
|
|
1422
|
+
}, ve)), Pe(ve);
|
|
1423
|
+
}), Re = Fo;
|
|
1424
|
+
Re.Group = qr;
|
|
1425
|
+
Re.__ANT_BUTTON = !0;
|
|
1426
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "Button");
|
|
1427
|
+
export {
|
|
1428
|
+
Re as B,
|
|
1429
|
+
ot as c
|
|
1430
|
+
};
|