@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
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { a as c } from "../../../setup-
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { a as c } from "../../../setup-aZdxWCJq.js";
|
|
3
|
+
import d from "../ErrorBoundary.js";
|
|
4
|
+
import { d as l, b as i, a as m, i as s, g as a, v as h } from "../../../vi.B5EKKJdE-BsDIxc7v.js";
|
|
5
|
+
const p = () => {
|
|
5
6
|
throw new Error("Test error");
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
}),
|
|
13
|
-
|
|
7
|
+
}, E = () => /* @__PURE__ */ o("div", { "data-testid": "error-fallback", children: "Error" });
|
|
8
|
+
l("<ErrorBoundary />", () => {
|
|
9
|
+
let e = {}, t;
|
|
10
|
+
i(() => {
|
|
11
|
+
t = h.spyOn(console, "error").mockImplementation(() => {
|
|
12
|
+
}), e = {};
|
|
13
|
+
}), m(() => {
|
|
14
|
+
t.mockRestore();
|
|
14
15
|
});
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const { getByTestId: r } =
|
|
18
|
-
/* @__PURE__ */
|
|
16
|
+
const n = (r) => c(/* @__PURE__ */ o(d, { ...e, children: r }));
|
|
17
|
+
s("should render children when no error occurs", () => {
|
|
18
|
+
const { getByTestId: r } = n(
|
|
19
|
+
/* @__PURE__ */ o("div", { "data-testid": "child", children: "Content" })
|
|
19
20
|
);
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
a(r("child")).toBeInTheDocument();
|
|
22
|
+
}), s("should render fallback UI when error occurs", () => {
|
|
23
|
+
e = {
|
|
24
|
+
errorComponent: /* @__PURE__ */ o(E, {}),
|
|
25
|
+
hasError: !0
|
|
26
|
+
};
|
|
27
|
+
const { getByTestId: r } = n(/* @__PURE__ */ o(p, {}));
|
|
28
|
+
a(r("error-fallback")).toBeInTheDocument();
|
|
24
29
|
});
|
|
25
30
|
});
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { StyledErrorBoundaryFallback as p } from "./styles.js";
|
|
3
3
|
import "../Avatar/styles.js";
|
|
4
4
|
import "../Badge/styles.js";
|
|
5
5
|
import "../../providers/BreakpointThemeProvider.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as i } from "../../Typography-B2J8CPnt.js";
|
|
7
7
|
import "../Breadcrumb/styles.js";
|
|
8
|
-
import
|
|
8
|
+
import m from "../Button/Button.js";
|
|
9
9
|
import "../Card/styles.js";
|
|
10
10
|
import "../Checkbox/styles.js";
|
|
11
|
+
import "../DateRangePicker/DateRangePicker.js";
|
|
11
12
|
import "react";
|
|
12
|
-
import "
|
|
13
|
+
import "../../styles-XuoEGUZZ.js";
|
|
13
14
|
import "../Layout/Content/styles.js";
|
|
14
15
|
import "../Message/styles.js";
|
|
15
16
|
import "../Notification/NotificationBadge/styles.js";
|
|
16
17
|
import "../Notification/styles.js";
|
|
17
|
-
import "../../styles-
|
|
18
|
+
import "../../styles-DNay6iFa.js";
|
|
18
19
|
import "../Progress/styles.js";
|
|
19
|
-
import "../../styles/global-styles.js";
|
|
20
20
|
import "../Row/styles.js";
|
|
21
|
+
import "../../styles/global-styles.js";
|
|
21
22
|
import "../Row/RowLabelValue/styles.js";
|
|
22
23
|
import "../Row/RowActions/styles.js";
|
|
23
24
|
import "../SegmentedControls/styles.js";
|
|
24
25
|
import "../Select/styles.js";
|
|
25
26
|
import "../Switch/styles.js";
|
|
26
|
-
import { S as n } from "../../styles-
|
|
27
|
+
import { S as n } from "../../styles-Wpm1RiGr.js";
|
|
27
28
|
import "../Tabs/styles.js";
|
|
28
29
|
import "../Tile/styles.js";
|
|
29
30
|
import "../Toast/styles.js";
|
|
30
31
|
import "../Tooltip/styles.js";
|
|
31
|
-
const
|
|
32
|
-
const
|
|
32
|
+
const K = (r) => {
|
|
33
|
+
const t = () => window.location.href = "/";
|
|
33
34
|
return /* @__PURE__ */ o(
|
|
34
35
|
p,
|
|
35
36
|
{
|
|
36
37
|
status: "500",
|
|
37
38
|
title: "Sorry, It looks like we're having some internal issues.",
|
|
38
|
-
subTitle: /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ o(
|
|
40
|
-
r.eventId ? /* @__PURE__ */
|
|
39
|
+
subTitle: /* @__PURE__ */ e(n, { direction: "vertical", children: [
|
|
40
|
+
/* @__PURE__ */ o(i, { themeType: "secondary", children: "Our team has been notified. If this issue persist contact customer service." }),
|
|
41
|
+
r.eventId ? /* @__PURE__ */ e(i, { themeType: "secondary", children: [
|
|
41
42
|
"(reference: ",
|
|
42
43
|
r.eventId,
|
|
43
44
|
")"
|
|
44
45
|
] }) : null
|
|
45
46
|
] }),
|
|
46
47
|
extra: [
|
|
47
|
-
r.resetError && /* @__PURE__ */ o(
|
|
48
|
-
/* @__PURE__ */ o(
|
|
48
|
+
r.resetError && /* @__PURE__ */ o(m, { themeType: "secondary", onClick: r.resetError, children: "Try again" }, "reset"),
|
|
49
|
+
t && /* @__PURE__ */ o(m, { onClick: t, children: "Take me home" }, "back-home")
|
|
49
50
|
].filter(Boolean)
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
K as default
|
|
55
56
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as W } from "../../styled-components.browser.esm-
|
|
1
|
+
import { d as W } from "../../styled-components.browser.esm-C47QHsU4.js";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
import { R as A } from "../../CheckCircleFilled-
|
|
4
|
-
import { R as j } from "../../CloseCircleFilled-
|
|
5
|
-
import { R as z } from "../../ExclamationCircleFilled-
|
|
6
|
-
import {
|
|
7
|
-
import { I as S } from "../../AntdIcon-
|
|
8
|
-
import {
|
|
9
|
-
import "../../
|
|
3
|
+
import { R as A } from "../../CheckCircleFilled-B-wrMduA.js";
|
|
4
|
+
import { R as j } from "../../CloseCircleFilled-WEQ0SaSW.js";
|
|
5
|
+
import { R as z } from "../../ExclamationCircleFilled-x8Sr29BN.js";
|
|
6
|
+
import { e as $, c as k } from "../../presets-CSXMiWyc.js";
|
|
7
|
+
import { I as S } from "../../AntdIcon-DP6hPDqu.js";
|
|
8
|
+
import { d as x } from "../../index-DCopujxC.js";
|
|
9
|
+
import { g as N, m as I, f as m, C as H } from "../../CSSMotionList-DB0khM6h.js";
|
|
10
10
|
var R = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "warning", theme: "filled" }, y = function(l, a) {
|
|
11
11
|
return /* @__PURE__ */ e.createElement(S, $({}, l, {
|
|
12
12
|
ref: a,
|
|
@@ -605,8 +605,8 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
605
605
|
subtitleFontSize: t.fontSize,
|
|
606
606
|
iconFontSize: t.fontSizeHeading3 * 3,
|
|
607
607
|
extraMargin: `${t.paddingLG}px 0 0 0`
|
|
608
|
-
}), P =
|
|
609
|
-
const l = t.colorInfo, a = t.colorError, r = t.colorSuccess, n = t.colorWarning, s =
|
|
608
|
+
}), P = N("Result", (t) => {
|
|
609
|
+
const l = t.colorInfo, a = t.colorError, r = t.colorSuccess, n = t.colorWarning, s = I(t, {
|
|
610
610
|
resultInfoIconColor: l,
|
|
611
611
|
resultErrorIconColor: a,
|
|
612
612
|
resultSuccessIconColor: r,
|
|
@@ -854,7 +854,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
854
854
|
} = t;
|
|
855
855
|
const n = k(`${l}-icon`);
|
|
856
856
|
if (process.env.NODE_ENV !== "production") {
|
|
857
|
-
const o =
|
|
857
|
+
const o = x("Result");
|
|
858
858
|
process.env.NODE_ENV !== "production" && o(!(typeof a == "string" && a.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${a}\` at https://ant.design/components/icon`);
|
|
859
859
|
}
|
|
860
860
|
if (q.includes(`${r}`)) {
|
|
@@ -892,9 +892,9 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
892
892
|
getPrefixCls: f,
|
|
893
893
|
direction: L,
|
|
894
894
|
result: d
|
|
895
|
-
} = e.useContext(
|
|
895
|
+
} = e.useContext(H), c = f("result", l), [B, v, g] = P(c), C = k(c, `${c}-${E}`, a, d == null ? void 0 : d.className, r, {
|
|
896
896
|
[`${c}-rtl`]: L === "rtl"
|
|
897
|
-
},
|
|
897
|
+
}, v, g), D = Object.assign(Object.assign({}, d == null ? void 0 : d.style), o);
|
|
898
898
|
return B(/* @__PURE__ */ e.createElement("div", {
|
|
899
899
|
className: C,
|
|
900
900
|
style: D
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FormProps as AntFormProps, FormInstance } from 'antd';
|
|
3
3
|
import { TYPE, STATE } from '../../constants';
|
|
4
|
-
|
|
5
4
|
import * as S from "./styles";
|
|
6
5
|
export interface FormProps extends AntFormProps {
|
|
7
6
|
children?: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../providers/BreakpointThemeProvider.js";
|
|
3
|
-
import { d as a, F as e } from "../../Typography-
|
|
4
|
-
import "
|
|
3
|
+
import { d as a, F as e } from "../../Typography-B2J8CPnt.js";
|
|
4
|
+
import "./styles.js";
|
|
5
5
|
export {
|
|
6
6
|
a as FormItem,
|
|
7
7
|
e as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { F as P, a as c, d as a } from "../../../Typography-
|
|
2
|
+
import { useState as u, useMemo as x } from "react";
|
|
3
|
+
import { F as P, a as c, d as a } from "../../../Typography-B2J8CPnt.js";
|
|
4
4
|
import "../../Avatar/styles.js";
|
|
5
5
|
import "../../Badge/styles.js";
|
|
6
6
|
import "../../../providers/BreakpointThemeProvider.js";
|
|
@@ -8,13 +8,14 @@ import "../../Breadcrumb/styles.js";
|
|
|
8
8
|
import p from "../../Button/Button.js";
|
|
9
9
|
import V from "../../Card/Card.js";
|
|
10
10
|
import k from "../../Checkbox/Checkbox.js";
|
|
11
|
+
import "../../DateRangePicker/DateRangePicker.js";
|
|
11
12
|
import "../../ErrorBoundaryFallback/styles.js";
|
|
12
13
|
import d from "../../Input/Input.js";
|
|
13
14
|
import "../../Layout/Content/styles.js";
|
|
14
15
|
import "../../Message/styles.js";
|
|
15
16
|
import "../../Notification/NotificationBadge/styles.js";
|
|
16
17
|
import "../../Notification/styles.js";
|
|
17
|
-
import "../../../styles-
|
|
18
|
+
import "../../../styles-DNay6iFa.js";
|
|
18
19
|
import S from "../../Progress/Progress.js";
|
|
19
20
|
import "../../Row/styles.js";
|
|
20
21
|
import "../../../styles/global-styles.js";
|
|
@@ -23,12 +24,12 @@ import "../../Row/RowActions/styles.js";
|
|
|
23
24
|
import "../../SegmentedControls/styles.js";
|
|
24
25
|
import I from "../../Select/Select.js";
|
|
25
26
|
import "../../Switch/styles.js";
|
|
26
|
-
import { S as h } from "../../../styles-
|
|
27
|
+
import { S as h } from "../../../styles-Wpm1RiGr.js";
|
|
27
28
|
import "../../Tabs/styles.js";
|
|
28
29
|
import "../../Tile/styles.js";
|
|
29
30
|
import "../../Toast/styles.js";
|
|
30
31
|
import "../../Tooltip/styles.js";
|
|
31
|
-
import { F as v } from "../../../
|
|
32
|
+
import { F as v } from "../../../index-CupwdUIJ.js";
|
|
32
33
|
const N = [
|
|
33
34
|
{ value: "sedan_tesla_3", label: "Tesla Model 3", isEv: !0 },
|
|
34
35
|
{ value: "suv_tesla_y", label: "Tesla Model Y", isEv: !0 },
|
|
@@ -42,12 +43,12 @@ const N = [
|
|
|
42
43
|
{ value: "suv_crv", label: "Honda CR-V", isEv: !1 },
|
|
43
44
|
{ value: "other_ev", label: "Other EV", isEv: !0 },
|
|
44
45
|
{ value: "other_ice", label: "Other ICE", isEv: !1 }
|
|
45
|
-
],
|
|
46
|
-
const [b, f] =
|
|
46
|
+
], ce = () => {
|
|
47
|
+
const [b, f] = u({
|
|
47
48
|
value: 0,
|
|
48
49
|
status: "success",
|
|
49
50
|
text: null
|
|
50
|
-
}), [o, i] =
|
|
51
|
+
}), [o, i] = u(null), [r] = v.useForm(), g = (l) => {
|
|
51
52
|
console.log("Success:", l), i(l);
|
|
52
53
|
}, y = (l) => {
|
|
53
54
|
console.log("Failed:", l);
|
|
@@ -59,7 +60,7 @@ const N = [
|
|
|
59
60
|
), C = () => {
|
|
60
61
|
const l = ["email", "routeNumber"], t = r.getFieldsValue(), _ = l.length;
|
|
61
62
|
return l.filter(
|
|
62
|
-
(
|
|
63
|
+
(m) => t[m] !== void 0 && t[m] !== ""
|
|
63
64
|
).length / _ * 100;
|
|
64
65
|
};
|
|
65
66
|
return /* @__PURE__ */ s(T, { children: [
|
|
@@ -166,5 +167,5 @@ const N = [
|
|
|
166
167
|
] });
|
|
167
168
|
};
|
|
168
169
|
export {
|
|
169
|
-
|
|
170
|
+
ce as FormStory
|
|
170
171
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { F as i } from "../../../Typography-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { a as s, s as t } from "../../../setup-aZdxWCJq.js";
|
|
3
|
+
import { F as i } from "../../../Typography-B2J8CPnt.js";
|
|
4
|
+
import { v as e } from "../../../vi.B5EKKJdE-BsDIxc7v.js";
|
|
4
5
|
describe("<Form />", () => {
|
|
5
6
|
let o;
|
|
6
7
|
beforeEach(() => {
|
|
@@ -9,10 +10,10 @@ describe("<Form />", () => {
|
|
|
9
10
|
onFinishFailed: e.fn()
|
|
10
11
|
};
|
|
11
12
|
});
|
|
12
|
-
const r = () =>
|
|
13
|
+
const r = () => s(/* @__PURE__ */ n(i, { ...o }));
|
|
13
14
|
it("should render the form", () => {
|
|
14
15
|
r();
|
|
15
|
-
const
|
|
16
|
-
expect(
|
|
16
|
+
const m = t.getByRole("form");
|
|
17
|
+
expect(m).toBeInTheDocument();
|
|
17
18
|
});
|
|
18
19
|
});
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import "../../styled-components.browser.esm-
|
|
2
|
-
import {
|
|
1
|
+
import { d as t } from "../../styled-components.browser.esm-C47QHsU4.js";
|
|
2
|
+
import { F as o } from "../../index-CupwdUIJ.js";
|
|
3
|
+
const a = t(o)`
|
|
4
|
+
label,
|
|
5
|
+
.ant-form-item-label > label,
|
|
6
|
+
.ant-form-item-required,
|
|
7
|
+
.ant-form-item-row > label {
|
|
8
|
+
height: auto !important;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
3
11
|
export {
|
|
4
12
|
a as Form
|
|
5
13
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormProps as AntFormProps, FormInstance } from 'antd';
|
|
3
|
+
import { TYPE, STATE } from '../../constants';
|
|
4
|
+
import * as S from "./styles";
|
|
5
|
+
export interface FormProps extends AntFormProps {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
type?: keyof typeof TYPE;
|
|
8
|
+
state?: keyof typeof STATE;
|
|
9
|
+
}
|
|
10
|
+
export declare const FormItem: (<Values = any>(props: import('antd').FormItemProps<Values>) => React.ReactElement) & {
|
|
11
|
+
useStatus: () => {
|
|
12
|
+
status?: import('antd/es/form/FormItem').ValidateStatus;
|
|
13
|
+
errors: React.ReactNode[];
|
|
14
|
+
warnings: React.ReactNode[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
interface GenesisFormProps extends FormProps {
|
|
18
|
+
form?: FormInstance;
|
|
19
|
+
}
|
|
20
|
+
interface FormType extends React.FC<GenesisFormProps> {
|
|
21
|
+
Item: typeof S.Form.Item;
|
|
22
|
+
useForm: typeof S.Form.useForm;
|
|
23
|
+
}
|
|
24
|
+
declare const Form: FormType;
|
|
25
|
+
export default Form;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "../../providers/BreakpointThemeProvider.js";
|
|
3
|
+
import { u as e } from "../../Typography-B2J8CPnt.js";
|
|
4
|
+
import { Form as o } from "./styles.js";
|
|
5
|
+
const s = o.Item, F = Object.assign(
|
|
6
|
+
({ children: r, ...m }) => {
|
|
7
|
+
const { breakpoint: i } = e();
|
|
8
|
+
return /* @__PURE__ */ t(o, { role: "form", ...m, children: r });
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
Item: s,
|
|
12
|
+
useForm: o.useForm
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
s as FormItem,
|
|
17
|
+
F as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormStory: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsxs as o, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useMemo as x } from "react";
|
|
3
|
+
import P, { FormItem as t } from "../Form.js";
|
|
4
|
+
import "../../Avatar/styles.js";
|
|
5
|
+
import "../../Badge/styles.js";
|
|
6
|
+
import "../../../providers/BreakpointThemeProvider.js";
|
|
7
|
+
import { a as c } from "../../../Typography-B2J8CPnt.js";
|
|
8
|
+
import "../../Breadcrumb/styles.js";
|
|
9
|
+
import p from "../../Button/Button.js";
|
|
10
|
+
import V from "../../Card/Card.js";
|
|
11
|
+
import k from "../../Checkbox/Checkbox.js";
|
|
12
|
+
import "../../DateRangePicker/DateRangePicker.js";
|
|
13
|
+
import "../../ErrorBoundaryFallback/styles.js";
|
|
14
|
+
import d from "../../Input/Input.js";
|
|
15
|
+
import "../../Layout/Content/styles.js";
|
|
16
|
+
import "../../Message/styles.js";
|
|
17
|
+
import "../../Notification/NotificationBadge/styles.js";
|
|
18
|
+
import "../../Notification/styles.js";
|
|
19
|
+
import "../../../styles-DNay6iFa.js";
|
|
20
|
+
import S from "../../Progress/Progress.js";
|
|
21
|
+
import "../../Row/styles.js";
|
|
22
|
+
import "../../../styles/global-styles.js";
|
|
23
|
+
import "../../Row/RowLabelValue/styles.js";
|
|
24
|
+
import "../../Row/RowActions/styles.js";
|
|
25
|
+
import "../../SegmentedControls/styles.js";
|
|
26
|
+
import I from "../../Select/Select.js";
|
|
27
|
+
import "../../Switch/styles.js";
|
|
28
|
+
import { S as h } from "../../../styles-Wpm1RiGr.js";
|
|
29
|
+
import "../../Tabs/styles.js";
|
|
30
|
+
import "../../Tile/styles.js";
|
|
31
|
+
import "../../Toast/styles.js";
|
|
32
|
+
import "../../Tooltip/styles.js";
|
|
33
|
+
import { F as v } from "../../../index-CupwdUIJ.js";
|
|
34
|
+
const N = [
|
|
35
|
+
{ value: "sedan_tesla_3", label: "Tesla Model 3", isEv: !0 },
|
|
36
|
+
{ value: "suv_tesla_y", label: "Tesla Model Y", isEv: !0 },
|
|
37
|
+
{ value: "sedan_lucid", label: "Lucid Air", isEv: !0 },
|
|
38
|
+
{ value: "sedan_camry", label: "Toyota Camry", isEv: !1 },
|
|
39
|
+
{ value: "suv_rav4", label: "Toyota RAV4", isEv: !1 },
|
|
40
|
+
{ value: "pickup_f150", label: "Ford F-150", isEv: !1 },
|
|
41
|
+
{ value: "van_transit", label: "Ford Transit", isEv: !1 },
|
|
42
|
+
{ value: "suv_highlander", label: "Toyota Highlander", isEv: !1 },
|
|
43
|
+
{ value: "sedan_accord", label: "Honda Accord", isEv: !1 },
|
|
44
|
+
{ value: "suv_crv", label: "Honda CR-V", isEv: !1 },
|
|
45
|
+
{ value: "other_ev", label: "Other EV", isEv: !0 },
|
|
46
|
+
{ value: "other_ice", label: "Other ICE", isEv: !1 }
|
|
47
|
+
], pe = () => {
|
|
48
|
+
const [b, f] = u({
|
|
49
|
+
value: 0,
|
|
50
|
+
status: "success",
|
|
51
|
+
text: null
|
|
52
|
+
}), [s, i] = u(null), [l] = v.useForm(), g = (r) => {
|
|
53
|
+
console.log("Success:", r), i(r);
|
|
54
|
+
}, y = (r) => {
|
|
55
|
+
console.log("Failed:", r);
|
|
56
|
+
}, F = () => {
|
|
57
|
+
l.resetFields(), i(null);
|
|
58
|
+
}, n = v.useWatch("isEv", l), E = x(
|
|
59
|
+
() => N.filter((r) => n ? r.isEv : !0),
|
|
60
|
+
[n]
|
|
61
|
+
), C = () => {
|
|
62
|
+
const r = ["email", "routeNumber"], a = l.getFieldsValue(), _ = r.length;
|
|
63
|
+
return r.filter(
|
|
64
|
+
(m) => a[m] !== void 0 && a[m] !== ""
|
|
65
|
+
).length / _ * 100;
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
form: l,
|
|
72
|
+
autoComplete: "off",
|
|
73
|
+
initialValues: { remember: !0 },
|
|
74
|
+
onFinish: g,
|
|
75
|
+
onFinishFailed: y,
|
|
76
|
+
onValuesChange: () => {
|
|
77
|
+
f({
|
|
78
|
+
text: null,
|
|
79
|
+
value: C(),
|
|
80
|
+
status: l.getFieldsError().some((r) => r.errors.length > 0) ? "error" : "success"
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ e(V, { cover: /* @__PURE__ */ e("img", { alt: "driver check in", src: "/gobolt_warehouse.png" }), children: /* @__PURE__ */ e(c, { variant: "heading2", children: "Driver Check In" }) }),
|
|
85
|
+
/* @__PURE__ */ e(
|
|
86
|
+
t,
|
|
87
|
+
{
|
|
88
|
+
label: "What is your email?",
|
|
89
|
+
name: "email",
|
|
90
|
+
rules: [
|
|
91
|
+
{ required: !0, message: "Please input your email!" },
|
|
92
|
+
{ type: "email", message: "Please enter a valid email address!" }
|
|
93
|
+
],
|
|
94
|
+
labelCol: { span: 24 },
|
|
95
|
+
children: /* @__PURE__ */ e(d, {})
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
t,
|
|
100
|
+
{
|
|
101
|
+
label: "What is your route number?",
|
|
102
|
+
name: "routeNumber",
|
|
103
|
+
rules: [
|
|
104
|
+
{ required: !0, message: "Please input only numbers" },
|
|
105
|
+
{ pattern: /^[0-9]*$/, message: "Please input numbers only" }
|
|
106
|
+
],
|
|
107
|
+
help: "Please input only numbers",
|
|
108
|
+
labelCol: { span: 24 },
|
|
109
|
+
style: { marginBottom: "48px" },
|
|
110
|
+
children: /* @__PURE__ */ e(
|
|
111
|
+
d,
|
|
112
|
+
{
|
|
113
|
+
placeholder: "Enter a route number",
|
|
114
|
+
type: "number",
|
|
115
|
+
maxLength: 10,
|
|
116
|
+
onKeyPress: (r) => {
|
|
117
|
+
/[0-9]/.test(r.key) || r.preventDefault();
|
|
118
|
+
},
|
|
119
|
+
onChange: (r) => {
|
|
120
|
+
const a = r.target.value.replace(/[^0-9]/g, "");
|
|
121
|
+
l.setFieldValue("routeNumber", a);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ e(
|
|
128
|
+
t,
|
|
129
|
+
{
|
|
130
|
+
name: "isEv",
|
|
131
|
+
labelCol: { span: 24 },
|
|
132
|
+
valuePropName: "checked",
|
|
133
|
+
children: /* @__PURE__ */ e(h, { direction: "horizontal", children: /* @__PURE__ */ e(k, { children: "Is your vehicle an EV?" }) })
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ e(
|
|
137
|
+
t,
|
|
138
|
+
{
|
|
139
|
+
label: "Please select your vehicle type",
|
|
140
|
+
name: "vehicleType",
|
|
141
|
+
rules: [{ required: !1 }],
|
|
142
|
+
labelCol: { span: 24 },
|
|
143
|
+
children: /* @__PURE__ */ e(I, { options: E, placeholder: "Select a vehicle type" })
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ e(t, { label: null, name: "subscribe", valuePropName: "checked", children: /* @__PURE__ */ o(h, { direction: "horizontal", children: [
|
|
147
|
+
/* @__PURE__ */ e(p, { htmlType: "submit", children: "Check In" }),
|
|
148
|
+
/* @__PURE__ */ e(p, { themeType: "secondary", onClick: F, children: "Reset" }),
|
|
149
|
+
/* @__PURE__ */ e(S, { firstBarData: b })
|
|
150
|
+
] }) })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
s && /* @__PURE__ */ o(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
style: {
|
|
158
|
+
marginTop: "20px",
|
|
159
|
+
padding: "10px",
|
|
160
|
+
border: "1px solid #ccc"
|
|
161
|
+
},
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ e(c, { variant: "heading3", children: "Form Values:" }),
|
|
164
|
+
/* @__PURE__ */ e("pre", { children: JSON.stringify(s, null, 2) })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
] });
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
pe as FormStory
|
|
172
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { a as t, s } from "../../../setup-aZdxWCJq.js";
|
|
3
|
+
import i from "../Form.js";
|
|
4
|
+
import { v as e } from "../../../vi.B5EKKJdE-BsDIxc7v.js";
|
|
5
|
+
describe("<Form />", () => {
|
|
6
|
+
let o;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
o = {
|
|
9
|
+
onFinish: e.fn(),
|
|
10
|
+
onFinishFailed: e.fn()
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
const r = () => t(/* @__PURE__ */ n(i, { ...o }));
|
|
14
|
+
it("should render the form", () => {
|
|
15
|
+
r();
|
|
16
|
+
const m = s.getByRole("form");
|
|
17
|
+
expect(m).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { d as t } from "../../styled-components.browser.esm-C47QHsU4.js";
|
|
2
|
+
import { F as o } from "../../index-CupwdUIJ.js";
|
|
3
|
+
const a = t(o)`
|
|
4
|
+
label,
|
|
5
|
+
.ant-form-item-label > label,
|
|
6
|
+
.ant-form-item-required,
|
|
7
|
+
.ant-form-item-row > label {
|
|
8
|
+
height: auto !important;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
export {
|
|
12
|
+
a as Form
|
|
13
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { G as a } from "../../iconBase-
|
|
2
|
+
import { G as a } from "../../iconBase-DSKTHwal.js";
|
|
3
3
|
function o(r) {
|
|
4
|
-
return a({
|
|
4
|
+
return a({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }, child: [] }, { tag: "path", attr: { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" }, child: [] }, { tag: "path", attr: { d: "M4 2C2.8 3.7 2 5.7 2 8" }, child: [] }, { tag: "path", attr: { d: "M22 8c0-2.3-.8-4.3-2-6" }, child: [] }] })(r);
|
|
5
5
|
}
|
|
6
6
|
const e = ({}) => /* @__PURE__ */ t("div", { "data-testid": "Glyph", children: /* @__PURE__ */ t(o, {}) });
|
|
7
7
|
export {
|