@gobolt/genesis 0.1.1 → 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 +8 -8
- 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-BjIR5S0o.js +0 -24731
- 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,1118 @@
|
|
|
1
|
+
import { g as re, a as L, c as ve, e as T, b as w, _ as A, w as Pe, f as Gn } from "./presets-CSXMiWyc.js";
|
|
2
|
+
import { T as Qt } from "./index-DRGbc-fW.js";
|
|
3
|
+
import { w as we, q as en, z as tn, y as nn, L as qn, n as ye, A as Yn, v as Xn, x as Jn, e as Zn, _ as Qn, p as er, D as tr } from "./CSSMotionList-DB0khM6h.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import Z, { forwardRef as nr, useMemo as rr, useRef as Je, useCallback as Se, useImperativeHandle as ar } from "react";
|
|
6
|
+
import { K as ie } from "./KeyCode-B3vHb2gY.js";
|
|
7
|
+
import { F as Ve } from "./Overflow-CVbsx7Gn.js";
|
|
8
|
+
import { u as Ze } from "./useMergedState-D1-TbeEv.js";
|
|
9
|
+
import { i as rn } from "./index-DCopujxC.js";
|
|
10
|
+
import { i as ir } from "./isVisible-D3-B85BJ.js";
|
|
11
|
+
import { o as St } from "./omit-B_u6A-HL.js";
|
|
12
|
+
import { t as or } from "./toArray-D5kvYi_U.js";
|
|
13
|
+
import { I as lr } from "./AntdIcon-DP6hPDqu.js";
|
|
14
|
+
var ur = ie.ESC, sr = ie.TAB;
|
|
15
|
+
function cr(e) {
|
|
16
|
+
var r = e.visible, a = e.triggerRef, t = e.onVisibleChange, i = e.autoFocus, o = e.overlayRef, l = n.useRef(!1), u = function() {
|
|
17
|
+
if (r) {
|
|
18
|
+
var c, f;
|
|
19
|
+
(c = a.current) === null || c === void 0 || (f = c.focus) === null || f === void 0 || f.call(c), t == null || t(!1);
|
|
20
|
+
}
|
|
21
|
+
}, d = function() {
|
|
22
|
+
var c;
|
|
23
|
+
return (c = o.current) !== null && c !== void 0 && c.focus ? (o.current.focus(), l.current = !0, !0) : !1;
|
|
24
|
+
}, s = function(c) {
|
|
25
|
+
switch (c.keyCode) {
|
|
26
|
+
case ur:
|
|
27
|
+
u();
|
|
28
|
+
break;
|
|
29
|
+
case sr: {
|
|
30
|
+
var f = !1;
|
|
31
|
+
l.current || (f = d()), f ? c.preventDefault() : u();
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
n.useEffect(function() {
|
|
37
|
+
return r ? (window.addEventListener("keydown", s), i && we(d, 3), function() {
|
|
38
|
+
window.removeEventListener("keydown", s), l.current = !1;
|
|
39
|
+
}) : function() {
|
|
40
|
+
l.current = !1;
|
|
41
|
+
};
|
|
42
|
+
}, [r]);
|
|
43
|
+
}
|
|
44
|
+
var fr = /* @__PURE__ */ nr(function(e, r) {
|
|
45
|
+
var a = e.overlay, t = e.arrow, i = e.prefixCls, o = rr(function() {
|
|
46
|
+
var u;
|
|
47
|
+
return typeof a == "function" ? u = a() : u = a, u;
|
|
48
|
+
}, [a]), l = en(r, tn(o));
|
|
49
|
+
return /* @__PURE__ */ Z.createElement(Z.Fragment, null, t && /* @__PURE__ */ Z.createElement("div", {
|
|
50
|
+
className: "".concat(i, "-arrow")
|
|
51
|
+
}), /* @__PURE__ */ Z.cloneElement(o, {
|
|
52
|
+
ref: nn(o) ? l : void 0
|
|
53
|
+
}));
|
|
54
|
+
}), Ee = {
|
|
55
|
+
adjustX: 1,
|
|
56
|
+
adjustY: 1
|
|
57
|
+
}, xe = [0, 0], dr = {
|
|
58
|
+
topLeft: {
|
|
59
|
+
points: ["bl", "tl"],
|
|
60
|
+
overflow: Ee,
|
|
61
|
+
offset: [0, -4],
|
|
62
|
+
targetOffset: xe
|
|
63
|
+
},
|
|
64
|
+
top: {
|
|
65
|
+
points: ["bc", "tc"],
|
|
66
|
+
overflow: Ee,
|
|
67
|
+
offset: [0, -4],
|
|
68
|
+
targetOffset: xe
|
|
69
|
+
},
|
|
70
|
+
topRight: {
|
|
71
|
+
points: ["br", "tr"],
|
|
72
|
+
overflow: Ee,
|
|
73
|
+
offset: [0, -4],
|
|
74
|
+
targetOffset: xe
|
|
75
|
+
},
|
|
76
|
+
bottomLeft: {
|
|
77
|
+
points: ["tl", "bl"],
|
|
78
|
+
overflow: Ee,
|
|
79
|
+
offset: [0, 4],
|
|
80
|
+
targetOffset: xe
|
|
81
|
+
},
|
|
82
|
+
bottom: {
|
|
83
|
+
points: ["tc", "bc"],
|
|
84
|
+
overflow: Ee,
|
|
85
|
+
offset: [0, 4],
|
|
86
|
+
targetOffset: xe
|
|
87
|
+
},
|
|
88
|
+
bottomRight: {
|
|
89
|
+
points: ["tr", "br"],
|
|
90
|
+
overflow: Ee,
|
|
91
|
+
offset: [0, 4],
|
|
92
|
+
targetOffset: xe
|
|
93
|
+
}
|
|
94
|
+
}, vr = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
95
|
+
function mr(e, r) {
|
|
96
|
+
var a, t = e.arrow, i = t === void 0 ? !1 : t, o = e.prefixCls, l = o === void 0 ? "rc-dropdown" : o, u = e.transitionName, d = e.animation, s = e.align, g = e.placement, c = g === void 0 ? "bottomLeft" : g, f = e.placements, b = f === void 0 ? dr : f, h = e.getPopupContainer, E = e.showAction, C = e.hideAction, I = e.overlayClassName, P = e.overlayStyle, v = e.visible, m = e.trigger, y = m === void 0 ? ["hover"] : m, p = e.autoFocus, R = e.overlay, _ = e.children, S = e.onVisibleChange, j = re(e, vr), O = Z.useState(), K = L(O, 2), H = K[0], B = K[1], G = "visible" in e ? v : H, Y = Z.useRef(null), V = Z.useRef(null), q = Z.useRef(null);
|
|
97
|
+
Z.useImperativeHandle(r, function() {
|
|
98
|
+
return Y.current;
|
|
99
|
+
});
|
|
100
|
+
var F = function(D) {
|
|
101
|
+
B(D), S == null || S(D);
|
|
102
|
+
};
|
|
103
|
+
cr({
|
|
104
|
+
visible: G,
|
|
105
|
+
triggerRef: q,
|
|
106
|
+
onVisibleChange: F,
|
|
107
|
+
autoFocus: p,
|
|
108
|
+
overlayRef: V
|
|
109
|
+
});
|
|
110
|
+
var Q = function(D) {
|
|
111
|
+
var te = e.onOverlayClick;
|
|
112
|
+
B(!1), te && te(D);
|
|
113
|
+
}, oe = function() {
|
|
114
|
+
return /* @__PURE__ */ Z.createElement(fr, {
|
|
115
|
+
ref: V,
|
|
116
|
+
overlay: R,
|
|
117
|
+
prefixCls: l,
|
|
118
|
+
arrow: i
|
|
119
|
+
});
|
|
120
|
+
}, le = function() {
|
|
121
|
+
return typeof R == "function" ? oe : oe();
|
|
122
|
+
}, se = function() {
|
|
123
|
+
var D = e.minOverlayWidthMatchTrigger, te = e.alignPoint;
|
|
124
|
+
return "minOverlayWidthMatchTrigger" in e ? D : !te;
|
|
125
|
+
}, ce = function() {
|
|
126
|
+
var D = e.openClassName;
|
|
127
|
+
return D !== void 0 ? D : "".concat(l, "-open");
|
|
128
|
+
}, k = /* @__PURE__ */ Z.cloneElement(_, {
|
|
129
|
+
className: ve((a = _.props) === null || a === void 0 ? void 0 : a.className, G && ce()),
|
|
130
|
+
ref: nn(_) ? en(q, tn(_)) : void 0
|
|
131
|
+
}), z = C;
|
|
132
|
+
return !z && y.indexOf("contextMenu") !== -1 && (z = ["click"]), /* @__PURE__ */ Z.createElement(Qt, T({
|
|
133
|
+
builtinPlacements: b
|
|
134
|
+
}, j, {
|
|
135
|
+
prefixCls: l,
|
|
136
|
+
ref: Y,
|
|
137
|
+
popupClassName: ve(I, w({}, "".concat(l, "-show-arrow"), i)),
|
|
138
|
+
popupStyle: P,
|
|
139
|
+
action: y,
|
|
140
|
+
showAction: E,
|
|
141
|
+
hideAction: z,
|
|
142
|
+
popupPlacement: c,
|
|
143
|
+
popupAlign: s,
|
|
144
|
+
popupTransitionName: u,
|
|
145
|
+
popupAnimation: d,
|
|
146
|
+
popupVisible: G,
|
|
147
|
+
stretch: se() ? "minWidth" : "",
|
|
148
|
+
popup: le(),
|
|
149
|
+
onPopupVisibleChange: F,
|
|
150
|
+
onPopupClick: Q,
|
|
151
|
+
getPopupContainer: h
|
|
152
|
+
}), k);
|
|
153
|
+
}
|
|
154
|
+
const fa = /* @__PURE__ */ Z.forwardRef(mr);
|
|
155
|
+
var an = /* @__PURE__ */ n.createContext(null);
|
|
156
|
+
function on(e, r) {
|
|
157
|
+
return e === void 0 ? null : "".concat(e, "-").concat(r);
|
|
158
|
+
}
|
|
159
|
+
function ln(e) {
|
|
160
|
+
var r = n.useContext(an);
|
|
161
|
+
return on(r, e);
|
|
162
|
+
}
|
|
163
|
+
var pr = ["children", "locked"], ae = /* @__PURE__ */ n.createContext(null);
|
|
164
|
+
function gr(e, r) {
|
|
165
|
+
var a = A({}, e);
|
|
166
|
+
return Object.keys(r).forEach(function(t) {
|
|
167
|
+
var i = r[t];
|
|
168
|
+
i !== void 0 && (a[t] = i);
|
|
169
|
+
}), a;
|
|
170
|
+
}
|
|
171
|
+
function Fe(e) {
|
|
172
|
+
var r = e.children, a = e.locked, t = re(e, pr), i = n.useContext(ae), o = qn(function() {
|
|
173
|
+
return gr(i, t);
|
|
174
|
+
}, [i, t], function(l, u) {
|
|
175
|
+
return !a && (l[0] !== u[0] || !rn(l[1], u[1], !0));
|
|
176
|
+
});
|
|
177
|
+
return /* @__PURE__ */ n.createElement(ae.Provider, {
|
|
178
|
+
value: o
|
|
179
|
+
}, r);
|
|
180
|
+
}
|
|
181
|
+
var hr = [], un = /* @__PURE__ */ n.createContext(null);
|
|
182
|
+
function nt() {
|
|
183
|
+
return n.useContext(un);
|
|
184
|
+
}
|
|
185
|
+
var sn = /* @__PURE__ */ n.createContext(hr);
|
|
186
|
+
function ze(e) {
|
|
187
|
+
var r = n.useContext(sn);
|
|
188
|
+
return n.useMemo(function() {
|
|
189
|
+
return e !== void 0 ? [].concat(ye(r), [e]) : r;
|
|
190
|
+
}, [r, e]);
|
|
191
|
+
}
|
|
192
|
+
var cn = /* @__PURE__ */ n.createContext(null), Et = /* @__PURE__ */ n.createContext({});
|
|
193
|
+
function Gt(e) {
|
|
194
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
195
|
+
if (ir(e)) {
|
|
196
|
+
var a = e.nodeName.toLowerCase(), t = (
|
|
197
|
+
// Focusable element
|
|
198
|
+
["input", "select", "textarea", "button"].includes(a) || // Editable element
|
|
199
|
+
e.isContentEditable || // Anchor with href element
|
|
200
|
+
a === "a" && !!e.getAttribute("href")
|
|
201
|
+
), i = e.getAttribute("tabindex"), o = Number(i), l = null;
|
|
202
|
+
return i && !Number.isNaN(o) ? l = o : t && l === null && (l = 0), t && e.disabled && (l = null), l !== null && (l >= 0 || r && l < 0);
|
|
203
|
+
}
|
|
204
|
+
return !1;
|
|
205
|
+
}
|
|
206
|
+
function Cr(e) {
|
|
207
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a = ye(e.querySelectorAll("*")).filter(function(t) {
|
|
208
|
+
return Gt(t, r);
|
|
209
|
+
});
|
|
210
|
+
return Gt(e, r) && a.unshift(e), a;
|
|
211
|
+
}
|
|
212
|
+
var Ct = ie.LEFT, bt = ie.RIGHT, yt = ie.UP, Qe = ie.DOWN, et = ie.ENTER, fn = ie.ESC, $e = ie.HOME, Le = ie.END, qt = [yt, Qe, Ct, bt];
|
|
213
|
+
function br(e, r, a, t) {
|
|
214
|
+
var i, o = "prev", l = "next", u = "children", d = "parent";
|
|
215
|
+
if (e === "inline" && t === et)
|
|
216
|
+
return {
|
|
217
|
+
inlineTrigger: !0
|
|
218
|
+
};
|
|
219
|
+
var s = w(w({}, yt, o), Qe, l), g = w(w(w(w({}, Ct, a ? l : o), bt, a ? o : l), Qe, u), et, u), c = w(w(w(w(w(w({}, yt, o), Qe, l), et, u), fn, d), Ct, a ? u : d), bt, a ? d : u), f = {
|
|
220
|
+
inline: s,
|
|
221
|
+
horizontal: g,
|
|
222
|
+
vertical: c,
|
|
223
|
+
inlineSub: s,
|
|
224
|
+
horizontalSub: c,
|
|
225
|
+
verticalSub: c
|
|
226
|
+
}, b = (i = f["".concat(e).concat(r ? "" : "Sub")]) === null || i === void 0 ? void 0 : i[t];
|
|
227
|
+
switch (b) {
|
|
228
|
+
case o:
|
|
229
|
+
return {
|
|
230
|
+
offset: -1,
|
|
231
|
+
sibling: !0
|
|
232
|
+
};
|
|
233
|
+
case l:
|
|
234
|
+
return {
|
|
235
|
+
offset: 1,
|
|
236
|
+
sibling: !0
|
|
237
|
+
};
|
|
238
|
+
case d:
|
|
239
|
+
return {
|
|
240
|
+
offset: -1,
|
|
241
|
+
sibling: !1
|
|
242
|
+
};
|
|
243
|
+
case u:
|
|
244
|
+
return {
|
|
245
|
+
offset: 1,
|
|
246
|
+
sibling: !1
|
|
247
|
+
};
|
|
248
|
+
default:
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function yr(e) {
|
|
253
|
+
for (var r = e; r; ) {
|
|
254
|
+
if (r.getAttribute("data-menu-list"))
|
|
255
|
+
return r;
|
|
256
|
+
r = r.parentElement;
|
|
257
|
+
}
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
function Mr(e, r) {
|
|
261
|
+
for (var a = e || document.activeElement; a; ) {
|
|
262
|
+
if (r.has(a))
|
|
263
|
+
return a;
|
|
264
|
+
a = a.parentElement;
|
|
265
|
+
}
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
function xt(e, r) {
|
|
269
|
+
var a = Cr(e, !0);
|
|
270
|
+
return a.filter(function(t) {
|
|
271
|
+
return r.has(t);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
function Yt(e, r, a) {
|
|
275
|
+
var t = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
|
|
276
|
+
if (!e)
|
|
277
|
+
return null;
|
|
278
|
+
var i = xt(e, r), o = i.length, l = i.findIndex(function(u) {
|
|
279
|
+
return a === u;
|
|
280
|
+
});
|
|
281
|
+
return t < 0 ? l === -1 ? l = o - 1 : l -= 1 : t > 0 && (l += 1), l = (l + o) % o, i[l];
|
|
282
|
+
}
|
|
283
|
+
var Mt = function(r, a) {
|
|
284
|
+
var t = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
285
|
+
return r.forEach(function(l) {
|
|
286
|
+
var u = document.querySelector("[data-menu-id='".concat(on(a, l), "']"));
|
|
287
|
+
u && (t.add(u), o.set(u, l), i.set(l, u));
|
|
288
|
+
}), {
|
|
289
|
+
elements: t,
|
|
290
|
+
key2element: i,
|
|
291
|
+
element2key: o
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
function Ir(e, r, a, t, i, o, l, u, d, s) {
|
|
295
|
+
var g = n.useRef(), c = n.useRef();
|
|
296
|
+
c.current = r;
|
|
297
|
+
var f = function() {
|
|
298
|
+
we.cancel(g.current);
|
|
299
|
+
};
|
|
300
|
+
return n.useEffect(function() {
|
|
301
|
+
return function() {
|
|
302
|
+
f();
|
|
303
|
+
};
|
|
304
|
+
}, []), function(b) {
|
|
305
|
+
var h = b.which;
|
|
306
|
+
if ([].concat(qt, [et, fn, $e, Le]).includes(h)) {
|
|
307
|
+
var E = o(), C = Mt(E, t), I = C, P = I.elements, v = I.key2element, m = I.element2key, y = v.get(r), p = Mr(y, P), R = m.get(p), _ = br(e, l(R, !0).length === 1, a, h);
|
|
308
|
+
if (!_ && h !== $e && h !== Le)
|
|
309
|
+
return;
|
|
310
|
+
(qt.includes(h) || [$e, Le].includes(h)) && b.preventDefault();
|
|
311
|
+
var S = function(V) {
|
|
312
|
+
if (V) {
|
|
313
|
+
var q = V, F = V.querySelector("a");
|
|
314
|
+
F != null && F.getAttribute("href") && (q = F);
|
|
315
|
+
var Q = m.get(V);
|
|
316
|
+
u(Q), f(), g.current = we(function() {
|
|
317
|
+
c.current === Q && q.focus();
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
if ([$e, Le].includes(h) || _.sibling || !p) {
|
|
322
|
+
var j;
|
|
323
|
+
!p || e === "inline" ? j = i.current : j = yr(p);
|
|
324
|
+
var O, K = xt(j, P);
|
|
325
|
+
h === $e ? O = K[0] : h === Le ? O = K[K.length - 1] : O = Yt(j, P, p, _.offset), S(O);
|
|
326
|
+
} else if (_.inlineTrigger)
|
|
327
|
+
d(R);
|
|
328
|
+
else if (_.offset > 0)
|
|
329
|
+
d(R, !0), f(), g.current = we(function() {
|
|
330
|
+
C = Mt(E, t);
|
|
331
|
+
var Y = p.getAttribute("aria-controls"), V = document.getElementById(Y), q = Yt(V, C.elements);
|
|
332
|
+
S(q);
|
|
333
|
+
}, 5);
|
|
334
|
+
else if (_.offset < 0) {
|
|
335
|
+
var H = l(R, !0), B = H[H.length - 2], G = v.get(B);
|
|
336
|
+
d(B, !1), S(G);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
s == null || s(b);
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function Rr(e) {
|
|
343
|
+
Promise.resolve().then(e);
|
|
344
|
+
}
|
|
345
|
+
var wt = "__RC_UTIL_PATH_SPLIT__", Xt = function(r) {
|
|
346
|
+
return r.join(wt);
|
|
347
|
+
}, Sr = function(r) {
|
|
348
|
+
return r.split(wt);
|
|
349
|
+
}, It = "rc-menu-more";
|
|
350
|
+
function Er() {
|
|
351
|
+
var e = n.useState({}), r = L(e, 2), a = r[1], t = Je(/* @__PURE__ */ new Map()), i = Je(/* @__PURE__ */ new Map()), o = n.useState([]), l = L(o, 2), u = l[0], d = l[1], s = Je(0), g = Je(!1), c = function() {
|
|
352
|
+
g.current || a({});
|
|
353
|
+
}, f = Se(function(v, m) {
|
|
354
|
+
process.env.NODE_ENV !== "production" && Pe(!t.current.has(v), "Duplicated key '".concat(v, "' used in Menu by path [").concat(m.join(" > "), "]"));
|
|
355
|
+
var y = Xt(m);
|
|
356
|
+
i.current.set(y, v), t.current.set(v, y), s.current += 1;
|
|
357
|
+
var p = s.current;
|
|
358
|
+
Rr(function() {
|
|
359
|
+
p === s.current && c();
|
|
360
|
+
});
|
|
361
|
+
}, []), b = Se(function(v, m) {
|
|
362
|
+
var y = Xt(m);
|
|
363
|
+
i.current.delete(y), t.current.delete(v);
|
|
364
|
+
}, []), h = Se(function(v) {
|
|
365
|
+
d(v);
|
|
366
|
+
}, []), E = Se(function(v, m) {
|
|
367
|
+
var y = t.current.get(v) || "", p = Sr(y);
|
|
368
|
+
return m && u.includes(p[0]) && p.unshift(It), p;
|
|
369
|
+
}, [u]), C = Se(function(v, m) {
|
|
370
|
+
return v.filter(function(y) {
|
|
371
|
+
return y !== void 0;
|
|
372
|
+
}).some(function(y) {
|
|
373
|
+
var p = E(y, !0);
|
|
374
|
+
return p.includes(m);
|
|
375
|
+
});
|
|
376
|
+
}, [E]), I = function() {
|
|
377
|
+
var m = ye(t.current.keys());
|
|
378
|
+
return u.length && m.push(It), m;
|
|
379
|
+
}, P = Se(function(v) {
|
|
380
|
+
var m = "".concat(t.current.get(v)).concat(wt), y = /* @__PURE__ */ new Set();
|
|
381
|
+
return ye(i.current.keys()).forEach(function(p) {
|
|
382
|
+
p.startsWith(m) && y.add(i.current.get(p));
|
|
383
|
+
}), y;
|
|
384
|
+
}, []);
|
|
385
|
+
return n.useEffect(function() {
|
|
386
|
+
return function() {
|
|
387
|
+
g.current = !0;
|
|
388
|
+
};
|
|
389
|
+
}, []), {
|
|
390
|
+
// Register
|
|
391
|
+
registerPath: f,
|
|
392
|
+
unregisterPath: b,
|
|
393
|
+
refreshOverflowKeys: h,
|
|
394
|
+
// Util
|
|
395
|
+
isSubPathKey: C,
|
|
396
|
+
getKeyPath: E,
|
|
397
|
+
getKeys: I,
|
|
398
|
+
getSubPathKeys: P
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function Te(e) {
|
|
402
|
+
var r = n.useRef(e);
|
|
403
|
+
r.current = e;
|
|
404
|
+
var a = n.useCallback(function() {
|
|
405
|
+
for (var t, i = arguments.length, o = new Array(i), l = 0; l < i; l++)
|
|
406
|
+
o[l] = arguments[l];
|
|
407
|
+
return (t = r.current) === null || t === void 0 ? void 0 : t.call.apply(t, [r].concat(o));
|
|
408
|
+
}, []);
|
|
409
|
+
return e ? a : void 0;
|
|
410
|
+
}
|
|
411
|
+
var xr = Math.random().toFixed(5).toString().slice(2), Jt = 0;
|
|
412
|
+
function wr(e) {
|
|
413
|
+
var r = Ze(e, {
|
|
414
|
+
value: e
|
|
415
|
+
}), a = L(r, 2), t = a[0], i = a[1];
|
|
416
|
+
return n.useEffect(function() {
|
|
417
|
+
Jt += 1;
|
|
418
|
+
var o = process.env.NODE_ENV === "test" ? "test" : "".concat(xr, "-").concat(Jt);
|
|
419
|
+
i("rc-menu-uuid-".concat(o));
|
|
420
|
+
}, []), t;
|
|
421
|
+
}
|
|
422
|
+
function dn(e, r, a, t) {
|
|
423
|
+
var i = n.useContext(ae), o = i.activeKey, l = i.onActive, u = i.onInactive, d = {
|
|
424
|
+
active: o === e
|
|
425
|
+
};
|
|
426
|
+
return r || (d.onMouseEnter = function(s) {
|
|
427
|
+
a == null || a({
|
|
428
|
+
key: e,
|
|
429
|
+
domEvent: s
|
|
430
|
+
}), l(e);
|
|
431
|
+
}, d.onMouseLeave = function(s) {
|
|
432
|
+
t == null || t({
|
|
433
|
+
key: e,
|
|
434
|
+
domEvent: s
|
|
435
|
+
}), u(e);
|
|
436
|
+
}), d;
|
|
437
|
+
}
|
|
438
|
+
function vn(e) {
|
|
439
|
+
var r = n.useContext(ae), a = r.mode, t = r.rtl, i = r.inlineIndent;
|
|
440
|
+
if (a !== "inline")
|
|
441
|
+
return null;
|
|
442
|
+
var o = e;
|
|
443
|
+
return t ? {
|
|
444
|
+
paddingRight: o * i
|
|
445
|
+
} : {
|
|
446
|
+
paddingLeft: o * i
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function mn(e) {
|
|
450
|
+
var r = e.icon, a = e.props, t = e.children, i;
|
|
451
|
+
return r === null || r === !1 ? null : (typeof r == "function" ? i = /* @__PURE__ */ n.createElement(r, A({}, a)) : typeof r != "boolean" && (i = r), i || t || null);
|
|
452
|
+
}
|
|
453
|
+
var Pr = ["item"];
|
|
454
|
+
function tt(e) {
|
|
455
|
+
var r = e.item, a = re(e, Pr);
|
|
456
|
+
return Object.defineProperty(a, "item", {
|
|
457
|
+
get: function() {
|
|
458
|
+
return Pe(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), r;
|
|
459
|
+
}
|
|
460
|
+
}), a;
|
|
461
|
+
}
|
|
462
|
+
var Nr = ["title", "attribute", "elementRef"], _r = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], Kr = ["active"], Or = /* @__PURE__ */ function(e) {
|
|
463
|
+
Xn(a, e);
|
|
464
|
+
var r = Jn(a);
|
|
465
|
+
function a() {
|
|
466
|
+
return Zn(this, a), r.apply(this, arguments);
|
|
467
|
+
}
|
|
468
|
+
return Qn(a, [{
|
|
469
|
+
key: "render",
|
|
470
|
+
value: function() {
|
|
471
|
+
var i = this.props, o = i.title, l = i.attribute, u = i.elementRef, d = re(i, Nr), s = St(d, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
|
|
472
|
+
return Pe(!l, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ n.createElement(Ve.Item, T({}, l, {
|
|
473
|
+
title: typeof o == "string" ? o : void 0
|
|
474
|
+
}, s, {
|
|
475
|
+
ref: u
|
|
476
|
+
}));
|
|
477
|
+
}
|
|
478
|
+
}]), a;
|
|
479
|
+
}(n.Component), Ar = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
480
|
+
var a = e.style, t = e.className, i = e.eventKey, o = e.warnKey, l = e.disabled, u = e.itemIcon, d = e.children, s = e.role, g = e.onMouseEnter, c = e.onMouseLeave, f = e.onClick, b = e.onKeyDown, h = e.onFocus, E = re(e, _r), C = ln(i), I = n.useContext(ae), P = I.prefixCls, v = I.onItemClick, m = I.disabled, y = I.overflowDisabled, p = I.itemIcon, R = I.selectedKeys, _ = I.onActive, S = n.useContext(Et), j = S._internalRenderMenuItem, O = "".concat(P, "-item"), K = n.useRef(), H = n.useRef(), B = m || l, G = Yn(r, H), Y = ze(i);
|
|
481
|
+
process.env.NODE_ENV !== "production" && o && Pe(!1, "MenuItem should not leave undefined `key`.");
|
|
482
|
+
var V = function(U) {
|
|
483
|
+
return {
|
|
484
|
+
key: i,
|
|
485
|
+
// Note: For legacy code is reversed which not like other antd component
|
|
486
|
+
keyPath: ye(Y).reverse(),
|
|
487
|
+
item: K.current,
|
|
488
|
+
domEvent: U
|
|
489
|
+
};
|
|
490
|
+
}, q = u || p, F = dn(i, B, g, c), Q = F.active, oe = re(F, Kr), le = R.includes(i), se = vn(Y.length), ce = function(U) {
|
|
491
|
+
if (!B) {
|
|
492
|
+
var ue = V(U);
|
|
493
|
+
f == null || f(tt(ue)), v(ue);
|
|
494
|
+
}
|
|
495
|
+
}, k = function(U) {
|
|
496
|
+
if (b == null || b(U), U.which === ie.ENTER) {
|
|
497
|
+
var ue = V(U);
|
|
498
|
+
f == null || f(tt(ue)), v(ue);
|
|
499
|
+
}
|
|
500
|
+
}, z = function(U) {
|
|
501
|
+
_(i), h == null || h(U);
|
|
502
|
+
}, ee = {};
|
|
503
|
+
e.role === "option" && (ee["aria-selected"] = le);
|
|
504
|
+
var D = /* @__PURE__ */ n.createElement(Or, T({
|
|
505
|
+
ref: K,
|
|
506
|
+
elementRef: G,
|
|
507
|
+
role: s === null ? "none" : s || "menuitem",
|
|
508
|
+
tabIndex: l ? null : -1,
|
|
509
|
+
"data-menu-id": y && C ? null : C
|
|
510
|
+
}, St(E, ["extra"]), oe, ee, {
|
|
511
|
+
component: "li",
|
|
512
|
+
"aria-disabled": l,
|
|
513
|
+
style: A(A({}, se), a),
|
|
514
|
+
className: ve(O, w(w(w({}, "".concat(O, "-active"), Q), "".concat(O, "-selected"), le), "".concat(O, "-disabled"), B), t),
|
|
515
|
+
onClick: ce,
|
|
516
|
+
onKeyDown: k,
|
|
517
|
+
onFocus: z
|
|
518
|
+
}), d, /* @__PURE__ */ n.createElement(mn, {
|
|
519
|
+
props: A(A({}, e), {}, {
|
|
520
|
+
isSelected: le
|
|
521
|
+
}),
|
|
522
|
+
icon: q
|
|
523
|
+
}));
|
|
524
|
+
return j && (D = j(D, e, {
|
|
525
|
+
selected: le
|
|
526
|
+
})), D;
|
|
527
|
+
});
|
|
528
|
+
function kr(e, r) {
|
|
529
|
+
var a = e.eventKey, t = nt(), i = ze(a);
|
|
530
|
+
return n.useEffect(function() {
|
|
531
|
+
if (t)
|
|
532
|
+
return t.registerPath(a, i), function() {
|
|
533
|
+
t.unregisterPath(a, i);
|
|
534
|
+
};
|
|
535
|
+
}, [i]), t ? null : /* @__PURE__ */ n.createElement(Ar, T({}, e, {
|
|
536
|
+
ref: r
|
|
537
|
+
}));
|
|
538
|
+
}
|
|
539
|
+
const Pt = /* @__PURE__ */ n.forwardRef(kr);
|
|
540
|
+
var Dr = ["className", "children"], $r = function(r, a) {
|
|
541
|
+
var t = r.className, i = r.children, o = re(r, Dr), l = n.useContext(ae), u = l.prefixCls, d = l.mode, s = l.rtl;
|
|
542
|
+
return /* @__PURE__ */ n.createElement("ul", T({
|
|
543
|
+
className: ve(u, s && "".concat(u, "-rtl"), "".concat(u, "-sub"), "".concat(u, "-").concat(d === "inline" ? "inline" : "vertical"), t),
|
|
544
|
+
role: "menu"
|
|
545
|
+
}, o, {
|
|
546
|
+
"data-menu-list": !0,
|
|
547
|
+
ref: a
|
|
548
|
+
}), i);
|
|
549
|
+
}, Nt = /* @__PURE__ */ n.forwardRef($r);
|
|
550
|
+
Nt.displayName = "SubMenuList";
|
|
551
|
+
function _t(e, r) {
|
|
552
|
+
return or(e).map(function(a, t) {
|
|
553
|
+
if (/* @__PURE__ */ n.isValidElement(a)) {
|
|
554
|
+
var i, o, l = a.key, u = (i = (o = a.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && i !== void 0 ? i : l, d = u == null;
|
|
555
|
+
d && (u = "tmp_key-".concat([].concat(ye(r), [t]).join("-")));
|
|
556
|
+
var s = {
|
|
557
|
+
key: u,
|
|
558
|
+
eventKey: u
|
|
559
|
+
};
|
|
560
|
+
return process.env.NODE_ENV !== "production" && d && (s.warnKey = !0), /* @__PURE__ */ n.cloneElement(a, s);
|
|
561
|
+
}
|
|
562
|
+
return a;
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
var W = {
|
|
566
|
+
adjustX: 1,
|
|
567
|
+
adjustY: 1
|
|
568
|
+
}, Lr = {
|
|
569
|
+
topLeft: {
|
|
570
|
+
points: ["bl", "tl"],
|
|
571
|
+
overflow: W
|
|
572
|
+
},
|
|
573
|
+
topRight: {
|
|
574
|
+
points: ["br", "tr"],
|
|
575
|
+
overflow: W
|
|
576
|
+
},
|
|
577
|
+
bottomLeft: {
|
|
578
|
+
points: ["tl", "bl"],
|
|
579
|
+
overflow: W
|
|
580
|
+
},
|
|
581
|
+
bottomRight: {
|
|
582
|
+
points: ["tr", "br"],
|
|
583
|
+
overflow: W
|
|
584
|
+
},
|
|
585
|
+
leftTop: {
|
|
586
|
+
points: ["tr", "tl"],
|
|
587
|
+
overflow: W
|
|
588
|
+
},
|
|
589
|
+
leftBottom: {
|
|
590
|
+
points: ["br", "bl"],
|
|
591
|
+
overflow: W
|
|
592
|
+
},
|
|
593
|
+
rightTop: {
|
|
594
|
+
points: ["tl", "tr"],
|
|
595
|
+
overflow: W
|
|
596
|
+
},
|
|
597
|
+
rightBottom: {
|
|
598
|
+
points: ["bl", "br"],
|
|
599
|
+
overflow: W
|
|
600
|
+
}
|
|
601
|
+
}, Tr = {
|
|
602
|
+
topLeft: {
|
|
603
|
+
points: ["bl", "tl"],
|
|
604
|
+
overflow: W
|
|
605
|
+
},
|
|
606
|
+
topRight: {
|
|
607
|
+
points: ["br", "tr"],
|
|
608
|
+
overflow: W
|
|
609
|
+
},
|
|
610
|
+
bottomLeft: {
|
|
611
|
+
points: ["tl", "bl"],
|
|
612
|
+
overflow: W
|
|
613
|
+
},
|
|
614
|
+
bottomRight: {
|
|
615
|
+
points: ["tr", "br"],
|
|
616
|
+
overflow: W
|
|
617
|
+
},
|
|
618
|
+
rightTop: {
|
|
619
|
+
points: ["tr", "tl"],
|
|
620
|
+
overflow: W
|
|
621
|
+
},
|
|
622
|
+
rightBottom: {
|
|
623
|
+
points: ["br", "bl"],
|
|
624
|
+
overflow: W
|
|
625
|
+
},
|
|
626
|
+
leftTop: {
|
|
627
|
+
points: ["tl", "tr"],
|
|
628
|
+
overflow: W
|
|
629
|
+
},
|
|
630
|
+
leftBottom: {
|
|
631
|
+
points: ["bl", "br"],
|
|
632
|
+
overflow: W
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
function pn(e, r, a) {
|
|
636
|
+
if (r)
|
|
637
|
+
return r;
|
|
638
|
+
if (a)
|
|
639
|
+
return a[e] || a.other;
|
|
640
|
+
}
|
|
641
|
+
var Vr = {
|
|
642
|
+
horizontal: "bottomLeft",
|
|
643
|
+
vertical: "rightTop",
|
|
644
|
+
"vertical-left": "rightTop",
|
|
645
|
+
"vertical-right": "leftTop"
|
|
646
|
+
};
|
|
647
|
+
function Fr(e) {
|
|
648
|
+
var r = e.prefixCls, a = e.visible, t = e.children, i = e.popup, o = e.popupStyle, l = e.popupClassName, u = e.popupOffset, d = e.disabled, s = e.mode, g = e.onVisibleChange, c = n.useContext(ae), f = c.getPopupContainer, b = c.rtl, h = c.subMenuOpenDelay, E = c.subMenuCloseDelay, C = c.builtinPlacements, I = c.triggerSubMenuAction, P = c.forceSubMenuRender, v = c.rootClassName, m = c.motion, y = c.defaultMotions, p = n.useState(!1), R = L(p, 2), _ = R[0], S = R[1], j = b ? A(A({}, Tr), C) : A(A({}, Lr), C), O = Vr[s], K = pn(s, m, y), H = n.useRef(K);
|
|
649
|
+
s !== "inline" && (H.current = K);
|
|
650
|
+
var B = A(A({}, H.current), {}, {
|
|
651
|
+
leavedClassName: "".concat(r, "-hidden"),
|
|
652
|
+
removeOnLeave: !1,
|
|
653
|
+
motionAppear: !0
|
|
654
|
+
}), G = n.useRef();
|
|
655
|
+
return n.useEffect(function() {
|
|
656
|
+
return G.current = we(function() {
|
|
657
|
+
S(a);
|
|
658
|
+
}), function() {
|
|
659
|
+
we.cancel(G.current);
|
|
660
|
+
};
|
|
661
|
+
}, [a]), /* @__PURE__ */ n.createElement(Qt, {
|
|
662
|
+
prefixCls: r,
|
|
663
|
+
popupClassName: ve("".concat(r, "-popup"), w({}, "".concat(r, "-rtl"), b), l, v),
|
|
664
|
+
stretch: s === "horizontal" ? "minWidth" : null,
|
|
665
|
+
getPopupContainer: f,
|
|
666
|
+
builtinPlacements: j,
|
|
667
|
+
popupPlacement: O,
|
|
668
|
+
popupVisible: _,
|
|
669
|
+
popup: i,
|
|
670
|
+
popupStyle: o,
|
|
671
|
+
popupAlign: u && {
|
|
672
|
+
offset: u
|
|
673
|
+
},
|
|
674
|
+
action: d ? [] : [I],
|
|
675
|
+
mouseEnterDelay: h,
|
|
676
|
+
mouseLeaveDelay: E,
|
|
677
|
+
onPopupVisibleChange: g,
|
|
678
|
+
forceRender: P,
|
|
679
|
+
popupMotion: B,
|
|
680
|
+
fresh: !0
|
|
681
|
+
}, t);
|
|
682
|
+
}
|
|
683
|
+
function zr(e) {
|
|
684
|
+
var r = e.id, a = e.open, t = e.keyPath, i = e.children, o = "inline", l = n.useContext(ae), u = l.prefixCls, d = l.forceSubMenuRender, s = l.motion, g = l.defaultMotions, c = l.mode, f = n.useRef(!1);
|
|
685
|
+
f.current = c === o;
|
|
686
|
+
var b = n.useState(!f.current), h = L(b, 2), E = h[0], C = h[1], I = f.current ? a : !1;
|
|
687
|
+
n.useEffect(function() {
|
|
688
|
+
f.current && C(!1);
|
|
689
|
+
}, [c]);
|
|
690
|
+
var P = A({}, pn(o, s, g));
|
|
691
|
+
t.length > 1 && (P.motionAppear = !1);
|
|
692
|
+
var v = P.onVisibleChanged;
|
|
693
|
+
return P.onVisibleChanged = function(m) {
|
|
694
|
+
return !f.current && !m && C(!0), v == null ? void 0 : v(m);
|
|
695
|
+
}, E ? null : /* @__PURE__ */ n.createElement(Fe, {
|
|
696
|
+
mode: o,
|
|
697
|
+
locked: !f.current
|
|
698
|
+
}, /* @__PURE__ */ n.createElement(er, T({
|
|
699
|
+
visible: I
|
|
700
|
+
}, P, {
|
|
701
|
+
forceRender: d,
|
|
702
|
+
removeOnLeave: !1,
|
|
703
|
+
leavedClassName: "".concat(u, "-hidden")
|
|
704
|
+
}), function(m) {
|
|
705
|
+
var y = m.className, p = m.style;
|
|
706
|
+
return /* @__PURE__ */ n.createElement(Nt, {
|
|
707
|
+
id: r,
|
|
708
|
+
className: y,
|
|
709
|
+
style: p
|
|
710
|
+
}, i);
|
|
711
|
+
}));
|
|
712
|
+
}
|
|
713
|
+
var Ur = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], Wr = ["active"], jr = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
714
|
+
var a = e.style, t = e.className, i = e.title, o = e.eventKey, l = e.warnKey, u = e.disabled, d = e.internalPopupClose, s = e.children, g = e.itemIcon, c = e.expandIcon, f = e.popupClassName, b = e.popupOffset, h = e.popupStyle, E = e.onClick, C = e.onMouseEnter, I = e.onMouseLeave, P = e.onTitleClick, v = e.onTitleMouseEnter, m = e.onTitleMouseLeave, y = re(e, Ur), p = ln(o), R = n.useContext(ae), _ = R.prefixCls, S = R.mode, j = R.openKeys, O = R.disabled, K = R.overflowDisabled, H = R.activeKey, B = R.selectedKeys, G = R.itemIcon, Y = R.expandIcon, V = R.onItemClick, q = R.onOpenChange, F = R.onActive, Q = n.useContext(Et), oe = Q._internalRenderSubMenuItem, le = n.useContext(cn), se = le.isSubPathKey, ce = ze(), k = "".concat(_, "-submenu"), z = O || u, ee = n.useRef(), D = n.useRef();
|
|
715
|
+
process.env.NODE_ENV !== "production" && l && Pe(!1, "SubMenu should not leave undefined `key`.");
|
|
716
|
+
var te = g ?? G, U = c ?? Y, ue = j.includes(o), fe = !K && ue, Ue = se(B, o), Me = dn(o, z, v, m), pe = Me.active, it = re(Me, Wr), ot = n.useState(!1), We = L(ot, 2), Ne = We[0], je = We[1], _e = function(ne) {
|
|
717
|
+
z || je(ne);
|
|
718
|
+
}, lt = function(ne) {
|
|
719
|
+
_e(!0), C == null || C({
|
|
720
|
+
key: o,
|
|
721
|
+
domEvent: ne
|
|
722
|
+
});
|
|
723
|
+
}, ut = function(ne) {
|
|
724
|
+
_e(!1), I == null || I({
|
|
725
|
+
key: o,
|
|
726
|
+
domEvent: ne
|
|
727
|
+
});
|
|
728
|
+
}, Ke = n.useMemo(function() {
|
|
729
|
+
return pe || (S !== "inline" ? Ne || se([H], o) : !1);
|
|
730
|
+
}, [S, pe, H, Ne, o, se]), de = vn(ce.length), st = function(ne) {
|
|
731
|
+
z || (P == null || P({
|
|
732
|
+
key: o,
|
|
733
|
+
domEvent: ne
|
|
734
|
+
}), S === "inline" && q(o, !ue));
|
|
735
|
+
}, ct = Te(function($) {
|
|
736
|
+
E == null || E(tt($)), V($);
|
|
737
|
+
}), He = function(ne) {
|
|
738
|
+
S !== "inline" && q(o, ne);
|
|
739
|
+
}, Be = function() {
|
|
740
|
+
F(o);
|
|
741
|
+
}, Oe = p && "".concat(p, "-popup"), Ie = n.useMemo(function() {
|
|
742
|
+
return /* @__PURE__ */ n.createElement(mn, {
|
|
743
|
+
icon: S !== "horizontal" ? U : void 0,
|
|
744
|
+
props: A(A({}, e), {}, {
|
|
745
|
+
isOpen: fe,
|
|
746
|
+
// [Legacy] Not sure why need this mark
|
|
747
|
+
isSubMenu: !0
|
|
748
|
+
})
|
|
749
|
+
}, /* @__PURE__ */ n.createElement("i", {
|
|
750
|
+
className: "".concat(k, "-arrow")
|
|
751
|
+
}));
|
|
752
|
+
}, [S, U, e, fe, k]), ge = /* @__PURE__ */ n.createElement("div", T({
|
|
753
|
+
role: "menuitem",
|
|
754
|
+
style: de,
|
|
755
|
+
className: "".concat(k, "-title"),
|
|
756
|
+
tabIndex: z ? null : -1,
|
|
757
|
+
ref: ee,
|
|
758
|
+
title: typeof i == "string" ? i : null,
|
|
759
|
+
"data-menu-id": K && p ? null : p,
|
|
760
|
+
"aria-expanded": fe,
|
|
761
|
+
"aria-haspopup": !0,
|
|
762
|
+
"aria-controls": Oe,
|
|
763
|
+
"aria-disabled": z,
|
|
764
|
+
onClick: st,
|
|
765
|
+
onFocus: Be
|
|
766
|
+
}, it), i, Ie), he = n.useRef(S);
|
|
767
|
+
if (S !== "inline" && ce.length > 1 ? he.current = "vertical" : he.current = S, !K) {
|
|
768
|
+
var Ae = he.current;
|
|
769
|
+
ge = /* @__PURE__ */ n.createElement(Fr, {
|
|
770
|
+
mode: Ae,
|
|
771
|
+
prefixCls: k,
|
|
772
|
+
visible: !d && fe && S !== "inline",
|
|
773
|
+
popupClassName: f,
|
|
774
|
+
popupOffset: b,
|
|
775
|
+
popupStyle: h,
|
|
776
|
+
popup: /* @__PURE__ */ n.createElement(
|
|
777
|
+
Fe,
|
|
778
|
+
{
|
|
779
|
+
mode: Ae === "horizontal" ? "vertical" : Ae
|
|
780
|
+
},
|
|
781
|
+
/* @__PURE__ */ n.createElement(Nt, {
|
|
782
|
+
id: Oe,
|
|
783
|
+
ref: D
|
|
784
|
+
}, s)
|
|
785
|
+
),
|
|
786
|
+
disabled: z,
|
|
787
|
+
onVisibleChange: He
|
|
788
|
+
}, ge);
|
|
789
|
+
}
|
|
790
|
+
var Re = /* @__PURE__ */ n.createElement(Ve.Item, T({
|
|
791
|
+
ref: r,
|
|
792
|
+
role: "none"
|
|
793
|
+
}, y, {
|
|
794
|
+
component: "li",
|
|
795
|
+
style: a,
|
|
796
|
+
className: ve(k, "".concat(k, "-").concat(S), t, w(w(w(w({}, "".concat(k, "-open"), fe), "".concat(k, "-active"), Ke), "".concat(k, "-selected"), Ue), "".concat(k, "-disabled"), z)),
|
|
797
|
+
onMouseEnter: lt,
|
|
798
|
+
onMouseLeave: ut
|
|
799
|
+
}), ge, !K && /* @__PURE__ */ n.createElement(zr, {
|
|
800
|
+
id: Oe,
|
|
801
|
+
open: fe,
|
|
802
|
+
keyPath: ce
|
|
803
|
+
}, s));
|
|
804
|
+
return oe && (Re = oe(Re, e, {
|
|
805
|
+
selected: Ue,
|
|
806
|
+
active: Ke,
|
|
807
|
+
open: fe,
|
|
808
|
+
disabled: z
|
|
809
|
+
})), /* @__PURE__ */ n.createElement(Fe, {
|
|
810
|
+
onItemClick: ct,
|
|
811
|
+
mode: S === "horizontal" ? "vertical" : S,
|
|
812
|
+
itemIcon: te,
|
|
813
|
+
expandIcon: U
|
|
814
|
+
}, Re);
|
|
815
|
+
}), rt = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
816
|
+
var a = e.eventKey, t = e.children, i = ze(a), o = _t(t, i), l = nt();
|
|
817
|
+
n.useEffect(function() {
|
|
818
|
+
if (l)
|
|
819
|
+
return l.registerPath(a, i), function() {
|
|
820
|
+
l.unregisterPath(a, i);
|
|
821
|
+
};
|
|
822
|
+
}, [i]);
|
|
823
|
+
var u;
|
|
824
|
+
return l ? u = o : u = /* @__PURE__ */ n.createElement(jr, T({
|
|
825
|
+
ref: r
|
|
826
|
+
}, e), o), /* @__PURE__ */ n.createElement(sn.Provider, {
|
|
827
|
+
value: i
|
|
828
|
+
}, u);
|
|
829
|
+
});
|
|
830
|
+
process.env.NODE_ENV !== "production" && (rt.displayName = "SubMenu");
|
|
831
|
+
function gn(e) {
|
|
832
|
+
var r = e.className, a = e.style, t = n.useContext(ae), i = t.prefixCls, o = nt();
|
|
833
|
+
return o ? null : /* @__PURE__ */ n.createElement("li", {
|
|
834
|
+
role: "separator",
|
|
835
|
+
className: ve("".concat(i, "-item-divider"), r),
|
|
836
|
+
style: a
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
var Hr = ["className", "title", "eventKey", "children"], Br = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
840
|
+
var a = e.className, t = e.title;
|
|
841
|
+
e.eventKey;
|
|
842
|
+
var i = e.children, o = re(e, Hr), l = n.useContext(ae), u = l.prefixCls, d = "".concat(u, "-item-group");
|
|
843
|
+
return /* @__PURE__ */ n.createElement("li", T({
|
|
844
|
+
ref: r,
|
|
845
|
+
role: "presentation"
|
|
846
|
+
}, o, {
|
|
847
|
+
onClick: function(g) {
|
|
848
|
+
return g.stopPropagation();
|
|
849
|
+
},
|
|
850
|
+
className: ve(d, a)
|
|
851
|
+
}), /* @__PURE__ */ n.createElement("div", {
|
|
852
|
+
role: "presentation",
|
|
853
|
+
className: "".concat(d, "-title"),
|
|
854
|
+
title: typeof t == "string" ? t : void 0
|
|
855
|
+
}, t), /* @__PURE__ */ n.createElement("ul", {
|
|
856
|
+
role: "group",
|
|
857
|
+
className: "".concat(d, "-list")
|
|
858
|
+
}, i));
|
|
859
|
+
}), Kt = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
860
|
+
var a = e.eventKey, t = e.children, i = ze(a), o = _t(t, i), l = nt();
|
|
861
|
+
return l ? o : /* @__PURE__ */ n.createElement(Br, T({
|
|
862
|
+
ref: r
|
|
863
|
+
}, St(e, ["warnKey"])), o);
|
|
864
|
+
});
|
|
865
|
+
process.env.NODE_ENV !== "production" && (Kt.displayName = "MenuItemGroup");
|
|
866
|
+
var Gr = ["label", "children", "key", "type", "extra"];
|
|
867
|
+
function Rt(e, r, a) {
|
|
868
|
+
var t = r.item, i = r.group, o = r.submenu, l = r.divider;
|
|
869
|
+
return (e || []).map(function(u, d) {
|
|
870
|
+
if (u && Gn(u) === "object") {
|
|
871
|
+
var s = u, g = s.label, c = s.children, f = s.key, b = s.type, h = s.extra, E = re(s, Gr), C = f ?? "tmp-".concat(d);
|
|
872
|
+
return c || b === "group" ? b === "group" ? /* @__PURE__ */ n.createElement(i, T({
|
|
873
|
+
key: C
|
|
874
|
+
}, E, {
|
|
875
|
+
title: g
|
|
876
|
+
}), Rt(c, r, a)) : /* @__PURE__ */ n.createElement(o, T({
|
|
877
|
+
key: C
|
|
878
|
+
}, E, {
|
|
879
|
+
title: g
|
|
880
|
+
}), Rt(c, r, a)) : b === "divider" ? /* @__PURE__ */ n.createElement(l, T({
|
|
881
|
+
key: C
|
|
882
|
+
}, E)) : /* @__PURE__ */ n.createElement(t, T({
|
|
883
|
+
key: C
|
|
884
|
+
}, E, {
|
|
885
|
+
extra: h
|
|
886
|
+
}), g, (!!h || h === 0) && /* @__PURE__ */ n.createElement("span", {
|
|
887
|
+
className: "".concat(a, "-item-extra")
|
|
888
|
+
}, h));
|
|
889
|
+
}
|
|
890
|
+
return null;
|
|
891
|
+
}).filter(function(u) {
|
|
892
|
+
return u;
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
function Zt(e, r, a, t, i) {
|
|
896
|
+
var o = e, l = A({
|
|
897
|
+
divider: gn,
|
|
898
|
+
item: Pt,
|
|
899
|
+
group: Kt,
|
|
900
|
+
submenu: rt
|
|
901
|
+
}, t);
|
|
902
|
+
return r && (o = Rt(r, l, i)), _t(o, a);
|
|
903
|
+
}
|
|
904
|
+
var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], be = [], Yr = /* @__PURE__ */ n.forwardRef(function(e, r) {
|
|
905
|
+
var a, t = e, i = t.prefixCls, o = i === void 0 ? "rc-menu" : i, l = t.rootClassName, u = t.style, d = t.className, s = t.tabIndex, g = s === void 0 ? 0 : s, c = t.items, f = t.children, b = t.direction, h = t.id, E = t.mode, C = E === void 0 ? "vertical" : E, I = t.inlineCollapsed, P = t.disabled, v = t.disabledOverflow, m = t.subMenuOpenDelay, y = m === void 0 ? 0.1 : m, p = t.subMenuCloseDelay, R = p === void 0 ? 0.1 : p, _ = t.forceSubMenuRender, S = t.defaultOpenKeys, j = t.openKeys, O = t.activeKey, K = t.defaultActiveFirst, H = t.selectable, B = H === void 0 ? !0 : H, G = t.multiple, Y = G === void 0 ? !1 : G, V = t.defaultSelectedKeys, q = t.selectedKeys, F = t.onSelect, Q = t.onDeselect, oe = t.inlineIndent, le = oe === void 0 ? 24 : oe, se = t.motion, ce = t.defaultMotions, k = t.triggerSubMenuAction, z = k === void 0 ? "hover" : k, ee = t.builtinPlacements, D = t.itemIcon, te = t.expandIcon, U = t.overflowedIndicator, ue = U === void 0 ? "..." : U, fe = t.overflowedIndicatorPopupClassName, Ue = t.getPopupContainer, Me = t.onClick, pe = t.onOpenChange, it = t.onKeyDown, ot = t.openAnimation, We = t.openTransitionName, Ne = t._internalRenderMenuItem, je = t._internalRenderSubMenuItem, _e = t._internalComponents, lt = re(t, qr), ut = n.useMemo(function() {
|
|
906
|
+
return [Zt(f, c, be, _e, o), Zt(f, c, be, {}, o)];
|
|
907
|
+
}, [f, c, _e]), Ke = L(ut, 2), de = Ke[0], st = Ke[1], ct = n.useState(!1), He = L(ct, 2), Be = He[0], Oe = He[1], Ie = n.useRef(), ge = wr(h), he = b === "rtl";
|
|
908
|
+
process.env.NODE_ENV !== "production" && Pe(!ot && !We, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
|
|
909
|
+
var Ae = Ze(S, {
|
|
910
|
+
value: j,
|
|
911
|
+
postState: function(M) {
|
|
912
|
+
return M || be;
|
|
913
|
+
}
|
|
914
|
+
}), Re = L(Ae, 2), $ = Re[0], ne = Re[1], ft = function(M) {
|
|
915
|
+
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
916
|
+
function X() {
|
|
917
|
+
ne(M), pe == null || pe(M);
|
|
918
|
+
}
|
|
919
|
+
x ? tr.flushSync(X) : X();
|
|
920
|
+
}, hn = n.useState($), Ot = L(hn, 2), Cn = Ot[0], bn = Ot[1], dt = n.useRef(!1), yn = n.useMemo(function() {
|
|
921
|
+
return (C === "inline" || C === "vertical") && I ? ["vertical", I] : [C, !1];
|
|
922
|
+
}, [C, I]), At = L(yn, 2), Ge = At[0], vt = At[1], kt = Ge === "inline", Mn = n.useState(Ge), Dt = L(Mn, 2), me = Dt[0], In = Dt[1], Rn = n.useState(vt), $t = L(Rn, 2), Sn = $t[0], En = $t[1];
|
|
923
|
+
n.useEffect(function() {
|
|
924
|
+
In(Ge), En(vt), dt.current && (kt ? ne(Cn) : ft(be));
|
|
925
|
+
}, [Ge, vt]);
|
|
926
|
+
var xn = n.useState(0), Lt = L(xn, 2), qe = Lt[0], wn = Lt[1], mt = qe >= de.length - 1 || me !== "horizontal" || v;
|
|
927
|
+
n.useEffect(function() {
|
|
928
|
+
kt && bn($);
|
|
929
|
+
}, [$]), n.useEffect(function() {
|
|
930
|
+
return dt.current = !0, function() {
|
|
931
|
+
dt.current = !1;
|
|
932
|
+
};
|
|
933
|
+
}, []);
|
|
934
|
+
var Ce = Er(), Tt = Ce.registerPath, Vt = Ce.unregisterPath, Pn = Ce.refreshOverflowKeys, Ft = Ce.isSubPathKey, Nn = Ce.getKeyPath, zt = Ce.getKeys, _n = Ce.getSubPathKeys, Kn = n.useMemo(function() {
|
|
935
|
+
return {
|
|
936
|
+
registerPath: Tt,
|
|
937
|
+
unregisterPath: Vt
|
|
938
|
+
};
|
|
939
|
+
}, [Tt, Vt]), On = n.useMemo(function() {
|
|
940
|
+
return {
|
|
941
|
+
isSubPathKey: Ft
|
|
942
|
+
};
|
|
943
|
+
}, [Ft]);
|
|
944
|
+
n.useEffect(function() {
|
|
945
|
+
Pn(mt ? be : de.slice(qe + 1).map(function(N) {
|
|
946
|
+
return N.key;
|
|
947
|
+
}));
|
|
948
|
+
}, [qe, mt]);
|
|
949
|
+
var An = Ze(O || K && ((a = de[0]) === null || a === void 0 ? void 0 : a.key), {
|
|
950
|
+
value: O
|
|
951
|
+
}), Ut = L(An, 2), ke = Ut[0], pt = Ut[1], kn = Te(function(N) {
|
|
952
|
+
pt(N);
|
|
953
|
+
}), Dn = Te(function() {
|
|
954
|
+
pt(void 0);
|
|
955
|
+
});
|
|
956
|
+
ar(r, function() {
|
|
957
|
+
return {
|
|
958
|
+
list: Ie.current,
|
|
959
|
+
focus: function(M) {
|
|
960
|
+
var x, X = zt(), J = Mt(X, ge), Xe = J.elements, gt = J.key2element, Hn = J.element2key, Ht = xt(Ie.current, Xe), Bt = ke ?? (Ht[0] ? Hn.get(Ht[0]) : (x = de.find(function(Bn) {
|
|
961
|
+
return !Bn.props.disabled;
|
|
962
|
+
})) === null || x === void 0 ? void 0 : x.key), De = gt.get(Bt);
|
|
963
|
+
if (Bt && De) {
|
|
964
|
+
var ht;
|
|
965
|
+
De == null || (ht = De.focus) === null || ht === void 0 || ht.call(De, M);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
});
|
|
970
|
+
var $n = Ze(V || [], {
|
|
971
|
+
value: q,
|
|
972
|
+
// Legacy convert key to array
|
|
973
|
+
postState: function(M) {
|
|
974
|
+
return Array.isArray(M) ? M : M == null ? be : [M];
|
|
975
|
+
}
|
|
976
|
+
}), Wt = L($n, 2), Ye = Wt[0], Ln = Wt[1], Tn = function(M) {
|
|
977
|
+
if (B) {
|
|
978
|
+
var x = M.key, X = Ye.includes(x), J;
|
|
979
|
+
Y ? X ? J = Ye.filter(function(gt) {
|
|
980
|
+
return gt !== x;
|
|
981
|
+
}) : J = [].concat(ye(Ye), [x]) : J = [x], Ln(J);
|
|
982
|
+
var Xe = A(A({}, M), {}, {
|
|
983
|
+
selectedKeys: J
|
|
984
|
+
});
|
|
985
|
+
X ? Q == null || Q(Xe) : F == null || F(Xe);
|
|
986
|
+
}
|
|
987
|
+
!Y && $.length && me !== "inline" && ft(be);
|
|
988
|
+
}, Vn = Te(function(N) {
|
|
989
|
+
Me == null || Me(tt(N)), Tn(N);
|
|
990
|
+
}), jt = Te(function(N, M) {
|
|
991
|
+
var x = $.filter(function(J) {
|
|
992
|
+
return J !== N;
|
|
993
|
+
});
|
|
994
|
+
if (M)
|
|
995
|
+
x.push(N);
|
|
996
|
+
else if (me !== "inline") {
|
|
997
|
+
var X = _n(N);
|
|
998
|
+
x = x.filter(function(J) {
|
|
999
|
+
return !X.has(J);
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
rn($, x, !0) || ft(x, !0);
|
|
1003
|
+
}), Fn = function(M, x) {
|
|
1004
|
+
var X = x ?? !$.includes(M);
|
|
1005
|
+
jt(M, X);
|
|
1006
|
+
}, zn = Ir(me, ke, he, ge, Ie, zt, Nn, pt, Fn, it);
|
|
1007
|
+
n.useEffect(function() {
|
|
1008
|
+
Oe(!0);
|
|
1009
|
+
}, []);
|
|
1010
|
+
var Un = n.useMemo(function() {
|
|
1011
|
+
return {
|
|
1012
|
+
_internalRenderMenuItem: Ne,
|
|
1013
|
+
_internalRenderSubMenuItem: je
|
|
1014
|
+
};
|
|
1015
|
+
}, [Ne, je]), Wn = me !== "horizontal" || v ? de : (
|
|
1016
|
+
// Need wrap for overflow dropdown that do not response for open
|
|
1017
|
+
de.map(function(N, M) {
|
|
1018
|
+
return (
|
|
1019
|
+
// Always wrap provider to avoid sub node re-mount
|
|
1020
|
+
/* @__PURE__ */ n.createElement(Fe, {
|
|
1021
|
+
key: N.key,
|
|
1022
|
+
overflowDisabled: M > qe
|
|
1023
|
+
}, N)
|
|
1024
|
+
);
|
|
1025
|
+
})
|
|
1026
|
+
), jn = /* @__PURE__ */ n.createElement(Ve, T({
|
|
1027
|
+
id: h,
|
|
1028
|
+
ref: Ie,
|
|
1029
|
+
prefixCls: "".concat(o, "-overflow"),
|
|
1030
|
+
component: "ul",
|
|
1031
|
+
itemComponent: Pt,
|
|
1032
|
+
className: ve(o, "".concat(o, "-root"), "".concat(o, "-").concat(me), d, w(w({}, "".concat(o, "-inline-collapsed"), Sn), "".concat(o, "-rtl"), he), l),
|
|
1033
|
+
dir: b,
|
|
1034
|
+
style: u,
|
|
1035
|
+
role: "menu",
|
|
1036
|
+
tabIndex: g,
|
|
1037
|
+
data: Wn,
|
|
1038
|
+
renderRawItem: function(M) {
|
|
1039
|
+
return M;
|
|
1040
|
+
},
|
|
1041
|
+
renderRawRest: function(M) {
|
|
1042
|
+
var x = M.length, X = x ? de.slice(-x) : null;
|
|
1043
|
+
return /* @__PURE__ */ n.createElement(rt, {
|
|
1044
|
+
eventKey: It,
|
|
1045
|
+
title: ue,
|
|
1046
|
+
disabled: mt,
|
|
1047
|
+
internalPopupClose: x === 0,
|
|
1048
|
+
popupClassName: fe
|
|
1049
|
+
}, X);
|
|
1050
|
+
},
|
|
1051
|
+
maxCount: me !== "horizontal" || v ? Ve.INVALIDATE : Ve.RESPONSIVE,
|
|
1052
|
+
ssr: "full",
|
|
1053
|
+
"data-menu-list": !0,
|
|
1054
|
+
onVisibleChange: function(M) {
|
|
1055
|
+
wn(M);
|
|
1056
|
+
},
|
|
1057
|
+
onKeyDown: zn
|
|
1058
|
+
}, lt));
|
|
1059
|
+
return /* @__PURE__ */ n.createElement(Et.Provider, {
|
|
1060
|
+
value: Un
|
|
1061
|
+
}, /* @__PURE__ */ n.createElement(an.Provider, {
|
|
1062
|
+
value: ge
|
|
1063
|
+
}, /* @__PURE__ */ n.createElement(Fe, {
|
|
1064
|
+
prefixCls: o,
|
|
1065
|
+
rootClassName: l,
|
|
1066
|
+
mode: me,
|
|
1067
|
+
openKeys: $,
|
|
1068
|
+
rtl: he,
|
|
1069
|
+
disabled: P,
|
|
1070
|
+
motion: Be ? se : null,
|
|
1071
|
+
defaultMotions: Be ? ce : null,
|
|
1072
|
+
activeKey: ke,
|
|
1073
|
+
onActive: kn,
|
|
1074
|
+
onInactive: Dn,
|
|
1075
|
+
selectedKeys: Ye,
|
|
1076
|
+
inlineIndent: le,
|
|
1077
|
+
subMenuOpenDelay: y,
|
|
1078
|
+
subMenuCloseDelay: R,
|
|
1079
|
+
forceSubMenuRender: _,
|
|
1080
|
+
builtinPlacements: ee,
|
|
1081
|
+
triggerSubMenuAction: z,
|
|
1082
|
+
getPopupContainer: Ue,
|
|
1083
|
+
itemIcon: D,
|
|
1084
|
+
expandIcon: te,
|
|
1085
|
+
onItemClick: Vn,
|
|
1086
|
+
onOpenChange: jt
|
|
1087
|
+
}, /* @__PURE__ */ n.createElement(cn.Provider, {
|
|
1088
|
+
value: On
|
|
1089
|
+
}, jn), /* @__PURE__ */ n.createElement("div", {
|
|
1090
|
+
style: {
|
|
1091
|
+
display: "none"
|
|
1092
|
+
},
|
|
1093
|
+
"aria-hidden": !0
|
|
1094
|
+
}, /* @__PURE__ */ n.createElement(un.Provider, {
|
|
1095
|
+
value: Kn
|
|
1096
|
+
}, st)))));
|
|
1097
|
+
}), at = Yr;
|
|
1098
|
+
at.Item = Pt;
|
|
1099
|
+
at.SubMenu = rt;
|
|
1100
|
+
at.ItemGroup = Kt;
|
|
1101
|
+
at.Divider = gn;
|
|
1102
|
+
var Xr = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" }, Jr = function(r, a) {
|
|
1103
|
+
return /* @__PURE__ */ n.createElement(lr, T({}, r, {
|
|
1104
|
+
ref: a,
|
|
1105
|
+
icon: Xr
|
|
1106
|
+
}));
|
|
1107
|
+
}, Zr = /* @__PURE__ */ n.forwardRef(Jr);
|
|
1108
|
+
process.env.NODE_ENV !== "production" && (Zr.displayName = "EllipsisOutlined");
|
|
1109
|
+
export {
|
|
1110
|
+
fa as D,
|
|
1111
|
+
at as E,
|
|
1112
|
+
Pt as M,
|
|
1113
|
+
Zr as R,
|
|
1114
|
+
rt as S,
|
|
1115
|
+
gn as a,
|
|
1116
|
+
Kt as b,
|
|
1117
|
+
ze as u
|
|
1118
|
+
};
|