@gobolt/genesis 0.0.7 → 0.0.9
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 +18 -2
- package/dist/{AntdIcon-Bsnbyy6g.js → AntdIcon-BoLh1dP8.js} +37 -35
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-DXCxlIQL.js} +2 -2
- package/dist/CloseOutlined-ClXDNn82.js +13 -0
- package/dist/{Compact-CJBo3f0u.js → Compact-CGY560JF.js} +45 -53
- package/dist/{ContextIsolator-CGkdKtc3.js → ContextIsolator-D5x2Ih51.js} +2 -2
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-C0Kj5KQV.js} +2 -2
- package/dist/{CheckOutlined-DAynWe12.js → KeyCode-DM2sFh3-.js} +10 -20
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/Overflow-PBZD-PFm.js +360 -0
- package/dist/PurePanel-BqPLRtc2.js +203 -0
- package/dist/SearchOutlined-BP3Z2K6j.js +13 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-DKwCct3i.js} +26 -16
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-BNV2qdrP.js → button-CDQgO1OK.js} +200 -197
- package/dist/collapse-Dtpt-6W_.js +20 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +103 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +18 -0
- package/dist/components/Badge/icons/ASN.d.ts +2 -0
- package/dist/components/Badge/icons/ASN.js +23 -0
- package/dist/components/Badge/icons/Appointment.d.ts +2 -0
- package/dist/components/Badge/icons/Appointment.js +23 -0
- package/dist/components/Badge/icons/Inventory.d.ts +2 -0
- package/dist/components/Badge/icons/Inventory.js +23 -0
- package/dist/components/Badge/icons/Parcel.d.ts +2 -0
- package/dist/components/Badge/icons/Parcel.js +23 -0
- package/dist/components/Badge/icons/Product.d.ts +2 -0
- package/dist/components/Badge/icons/Product.js +23 -0
- package/dist/components/Badge/icons/Route.d.ts +2 -0
- package/dist/components/Badge/icons/Route.js +23 -0
- package/dist/components/Badge/icons/Shipment.d.ts +2 -0
- package/dist/components/Badge/icons/Shipment.js +23 -0
- package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
- package/dist/components/Badge/icons/ShoppingCart.js +23 -0
- package/dist/components/Badge/icons/System.d.ts +2 -0
- package/dist/components/Badge/icons/System.js +23 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +4 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +34 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +22 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +23 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +4 -0
- package/dist/components/Breadcrumb/styles.d.ts +27 -0
- package/dist/components/Breadcrumb/styles.js +2436 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.js +22 -0
- package/dist/components/Button/__tests__/Button.test.js +16 -0
- package/dist/components/Button/styles.d.ts +16 -0
- package/dist/components/{atoms/button → Button}/styles.js +12 -12
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +40 -0
- package/dist/components/{atoms/checkbox → Checkbox}/__tests__/Checkbox.test.js +1 -1
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +5 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +97 -96
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +40 -0
- package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +22 -21
- package/dist/components/Form/Form.d.ts +26 -0
- package/dist/components/Form/Form.js +8 -0
- package/dist/components/Form/__stories__/FormStory.js +93 -0
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +4 -0
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +19 -0
- package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
- package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
- package/dist/components/Input/__tests__/Input.test.js +24 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -0
- package/dist/components/Input/styles.js +529 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +78 -0
- package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
- package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
- package/dist/components/Message/__tests__/Message.test.js +42 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +4 -0
- package/dist/components/Message/styles.d.ts +8 -0
- package/dist/components/Message/styles.js +41 -0
- package/dist/components/Notification/Notification.d.ts +17 -0
- package/dist/components/Notification/Notification.js +1370 -0
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
- package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/components/Notification/__tests__/Notification.test.js +15 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +4 -0
- package/dist/components/Notification/styles.d.ts +16 -0
- package/dist/components/Notification/styles.js +65 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +28 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +33 -0
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
- package/dist/components/Radio/__tests__/RadioGroup.test.js +30 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +4 -0
- package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioChecked.js +18 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
- package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioUnchecked.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/Select.js +36 -0
- package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
- package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/{atoms/select → Select}/__tests__/Select.test.js +1165 -1140
- package/dist/components/Select/styles.d.ts +32 -0
- package/dist/components/{atoms/select → Select}/styles.js +1517 -1651
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +19 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +16 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +18 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/styles.d.ts +10 -0
- package/dist/components/Toast/styles.js +54 -0
- package/dist/components/Typography/Typography.d.ts +15 -0
- package/dist/components/Typography/Typography.js +8 -0
- package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +23 -0
- package/dist/components/Typography/index.js +4 -0
- package/dist/components/Typography/styles.d.ts +21 -0
- package/dist/components/Typography/styles.js +48 -0
- package/dist/components/index.d.ts +26 -14
- package/dist/components/index.js +23 -13
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-BMW3aJEf.js} +162 -161
- package/dist/genesis/GenesisThemeBreakdown.js +54 -24
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +3 -4
- package/dist/genesis/styles.js +1095 -2186
- package/dist/{index-C7kFNqp2.js → index-1CBpubM3.js} +36 -36
- package/dist/{index-3MWkSVA1.js → index-BZAhCB_K.js} +6 -5
- package/dist/{index-D1v_7IIx.js → index-C0SmxWLS.js} +95 -94
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/{index-VDH3iLaC.js → index-CfDY25LP.js} +298 -309
- package/dist/{index-SAAXFt-P.js → index-DPW8XdWj.js} +255 -249
- package/dist/{index-BQO27mgE.js → index-bKlRxQp4.js} +52 -51
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-A-IfeFoT.js} +34 -33
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-D2FWSwU3.js} +1 -1
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-B0YTfcV1.js} +16 -26
- package/dist/providers/GenesisProvider.js +9 -5
- package/dist/providers/ThemeProvider.d.ts +2 -2
- package/dist/providers/ThemeProvider.js +4 -1
- package/dist/providers/ToastProvider.d.ts +13 -0
- package/dist/providers/ToastProvider.js +20 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +4 -4
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/{setup-CMYVZCPF.js → setup-BvfREoHl.js} +6948 -6940
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +22 -16
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +21 -15
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +17 -17
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +13 -29
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +461 -277
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/{Form-Cylpi4M4.js → styles-CT_fyXBd.js} +417 -424
- package/dist/test/setup.js +2 -1
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/{useVariants-CEpw6Ww6.js → useVariants-DvhXfgJY.js} +9 -8
- package/dist/warning-C63HNL9U.js +789 -0
- package/package.json +10 -4
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/components/atoms/button/Button.d.ts +0 -12
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/styles.d.ts +0 -12
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/atoms/index.js +0 -3
- package/dist/components/atoms/input/Input.js +0 -12
- package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
- package/dist/components/atoms/input/styles.js +0 -415
- package/dist/components/atoms/select/Select.d.ts +0 -11
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/styles.d.ts +0 -15
- package/dist/components/atoms/typography/Typography.d.ts +0 -11
- package/dist/components/atoms/typography/Typography.js +0 -44
- package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
- package/dist/components/atoms/typography/index.js +0 -4
- package/dist/components/atoms/typography/styles.d.ts +0 -11
- package/dist/components/atoms/typography/styles.js +0 -28
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +0 -10
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.d.ts +0 -1
- package/dist/components/molecules/form/Form.d.ts +0 -15
- package/dist/components/molecules/form/Form.js +0 -7
- package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
- package/dist/components/molecules/form/index.js +0 -4
- package/dist/index-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -35
- /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
- /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
- /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
- /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
- /package/dist/components/{atoms/button → Button}/index.js +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
- /package/dist/components/{atoms/checkbox → Checkbox}/index.js +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.js +0 -0
- /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
- /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
- /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
- /package/dist/components/{atoms/input → Input}/index.js +0 -0
- /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/select → Select}/index.js +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const i = (o) => ({
|
|
2
|
+
[o.componentCls]: {
|
|
3
|
+
// For common/openAnimation
|
|
4
|
+
[`${o.antCls}-motion-collapse-legacy`]: {
|
|
5
|
+
overflow: "hidden",
|
|
6
|
+
"&-active": {
|
|
7
|
+
transition: `height ${o.motionDurationMid} ${o.motionEaseInOut},
|
|
8
|
+
opacity ${o.motionDurationMid} ${o.motionEaseInOut} !important`
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
[`${o.antCls}-motion-collapse`]: {
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
transition: `height ${o.motionDurationMid} ${o.motionEaseInOut},
|
|
14
|
+
opacity ${o.motionDurationMid} ${o.motionEaseInOut} !important`
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
i as g
|
|
20
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import g from "./icons/Appointment.js";
|
|
3
|
+
import v from "./icons/ASN.js";
|
|
4
|
+
import C from "./icons/Inventory.js";
|
|
5
|
+
import h from "./icons/Parcel.js";
|
|
6
|
+
import S from "./icons/Product.js";
|
|
7
|
+
import I from "./icons/Route.js";
|
|
8
|
+
import z from "./icons/Shipment.js";
|
|
9
|
+
import y from "./icons/ShoppingCart.js";
|
|
10
|
+
import B from "./icons/System.js";
|
|
11
|
+
import { BADGE as n, STATE as t } from "../../constants/index.js";
|
|
12
|
+
import { n as F } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
13
|
+
import { BadgeWrapper as R, Badge as w, BadgeState as E } from "./styles.js";
|
|
14
|
+
import { a as i } from "../../warning-C63HNL9U.js";
|
|
15
|
+
import * as c from "react";
|
|
16
|
+
import { I as l } from "../../AntdIcon-BoLh1dP8.js";
|
|
17
|
+
import { R as $, a as N } from "../../ExclamationCircleFilled-C0Kj5KQV.js";
|
|
18
|
+
import { R as x } from "../../CloseCircleFilled-DXCxlIQL.js";
|
|
19
|
+
var M = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z" } }] }, name: "clock-circle", theme: "filled" }, k = function(e, a) {
|
|
20
|
+
return /* @__PURE__ */ c.createElement(l, i({}, e, {
|
|
21
|
+
ref: a,
|
|
22
|
+
icon: M
|
|
23
|
+
}));
|
|
24
|
+
}, u = /* @__PURE__ */ c.forwardRef(k);
|
|
25
|
+
process.env.NODE_ENV !== "production" && (u.displayName = "ClockCircleFilled");
|
|
26
|
+
var V = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, b = function(e, a) {
|
|
27
|
+
return /* @__PURE__ */ c.createElement(l, i({}, e, {
|
|
28
|
+
ref: a,
|
|
29
|
+
icon: V
|
|
30
|
+
}));
|
|
31
|
+
}, m = /* @__PURE__ */ c.forwardRef(b);
|
|
32
|
+
process.env.NODE_ENV !== "production" && (m.displayName = "InfoCircleFilled");
|
|
33
|
+
var D = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z" } }] }, name: "minus-circle", theme: "filled" }, _ = function(e, a) {
|
|
34
|
+
return /* @__PURE__ */ c.createElement(l, i({}, e, {
|
|
35
|
+
ref: a,
|
|
36
|
+
icon: D
|
|
37
|
+
}));
|
|
38
|
+
}, d = /* @__PURE__ */ c.forwardRef(_);
|
|
39
|
+
process.env.NODE_ENV !== "production" && (d.displayName = "MinusCircleFilled");
|
|
40
|
+
const s = 14, A = (o, e) => {
|
|
41
|
+
switch (o) {
|
|
42
|
+
case t.error:
|
|
43
|
+
return e.colors.status.error.onsurface;
|
|
44
|
+
case t.success:
|
|
45
|
+
return e.colors.status.success.onsurface;
|
|
46
|
+
case t.warning:
|
|
47
|
+
return e.colors.status.warning.default;
|
|
48
|
+
case t.removed:
|
|
49
|
+
return e.colors.status.generic.default;
|
|
50
|
+
case t.progress:
|
|
51
|
+
return e.colors.timebox.evening.default;
|
|
52
|
+
case t.info:
|
|
53
|
+
default:
|
|
54
|
+
return e.colors.status.info.onsurface;
|
|
55
|
+
}
|
|
56
|
+
}, O = (o, e) => {
|
|
57
|
+
switch (o) {
|
|
58
|
+
case t.warning:
|
|
59
|
+
return /* @__PURE__ */ r(N, { style: { color: e, fontSize: s } });
|
|
60
|
+
case t.error:
|
|
61
|
+
return /* @__PURE__ */ r(x, { style: { color: e, fontSize: s } });
|
|
62
|
+
case t.success:
|
|
63
|
+
return /* @__PURE__ */ r($, { style: { color: e, fontSize: s } });
|
|
64
|
+
case t.progress:
|
|
65
|
+
return /* @__PURE__ */ r(u, { style: { color: e, fontSize: s } });
|
|
66
|
+
case t.removed:
|
|
67
|
+
return /* @__PURE__ */ r(d, { style: { color: e, fontSize: s } });
|
|
68
|
+
case t.info:
|
|
69
|
+
default:
|
|
70
|
+
return /* @__PURE__ */ r(m, { style: { color: e, fontSize: s } });
|
|
71
|
+
}
|
|
72
|
+
}, j = (o) => {
|
|
73
|
+
switch (o) {
|
|
74
|
+
case n.appointment:
|
|
75
|
+
return /* @__PURE__ */ r(g, {});
|
|
76
|
+
case n.asn:
|
|
77
|
+
return /* @__PURE__ */ r(v, {});
|
|
78
|
+
case n.inventory:
|
|
79
|
+
return /* @__PURE__ */ r(C, {});
|
|
80
|
+
case n.parcel:
|
|
81
|
+
return /* @__PURE__ */ r(h, {});
|
|
82
|
+
case n.product:
|
|
83
|
+
return /* @__PURE__ */ r(S, {});
|
|
84
|
+
case n.route:
|
|
85
|
+
return /* @__PURE__ */ r(I, {});
|
|
86
|
+
case n.shipment:
|
|
87
|
+
return /* @__PURE__ */ r(z, {});
|
|
88
|
+
case n.shoppingCart:
|
|
89
|
+
return /* @__PURE__ */ r(y, {});
|
|
90
|
+
case n.system:
|
|
91
|
+
default:
|
|
92
|
+
return /* @__PURE__ */ r(B, {});
|
|
93
|
+
}
|
|
94
|
+
}, oe = ({ badge: o = n.product, state: e = t.info }) => {
|
|
95
|
+
const a = F(), f = A(e, a);
|
|
96
|
+
return /* @__PURE__ */ r(R, { children: /* @__PURE__ */ p(w, { "data-testid": "Badge", children: [
|
|
97
|
+
/* @__PURE__ */ r(E, { "data-testid": "BadgeState", color: f, children: O(e, f) }),
|
|
98
|
+
j(o)
|
|
99
|
+
] }) });
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
oe as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Badge } from '../Badge';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Badge>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Badge>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Success: Story;
|
|
9
|
+
export declare const Warning: Story;
|
|
10
|
+
export declare const Removed: Story;
|
|
11
|
+
export declare const Progress: Story;
|
|
12
|
+
export declare const Error: Story;
|
|
13
|
+
export declare const Info: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import d from "../Badge.js";
|
|
3
|
+
import { BADGE as n, STATE as a } from "../../../constants/index.js";
|
|
4
|
+
import { a as m } from "../../../setup-BvfREoHl.js";
|
|
5
|
+
describe("<Badge />", () => {
|
|
6
|
+
let e;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
e = {
|
|
9
|
+
badge: n.product,
|
|
10
|
+
state: a.info
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
const o = () => m(/* @__PURE__ */ r(d, { ...e }));
|
|
14
|
+
it("should render badge and state elements", () => {
|
|
15
|
+
const { getByTestId: t } = o();
|
|
16
|
+
expect(t("Badge")).toBeInTheDocument(), expect(t("BadgeState")).toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
const l = (a) => /* @__PURE__ */ h(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...a,
|
|
10
|
+
children: /* @__PURE__ */ h(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M12 2.182H3.273a1.09 1.09 0 0 0-1.091 1.09V12c0 .602.488 1.09 1.09 1.09h1.092V7.637a3.273 3.273 0 0 1 3.272-3.272h5.455V3.273A1.09 1.09 0 0 0 12 2.182Zm-8.727 13.09h1.09v1.092a3.273 3.273 0 0 0 3.273 3.272h1.091v1.091A3.273 3.273 0 0 0 12 24h8.727A3.273 3.273 0 0 0 24 20.727V12a3.273 3.273 0 0 0-3.273-3.273h-1.09v-1.09a3.273 3.273 0 0 0-3.273-3.273h-1.091V3.273A3.273 3.273 0 0 0 12 0H3.273A3.273 3.273 0 0 0 0 3.273V12a3.273 3.273 0 0 0 3.273 3.273Zm14.181-6.545v-1.09a1.09 1.09 0 0 0-1.09-1.092H7.636a1.09 1.09 0 0 0-1.09 1.091v8.727c0 .603.488 1.091 1.09 1.091h1.091V12A3.273 3.273 0 0 1 12 8.727h5.454Zm2.182 2.182H12A1.09 1.09 0 0 0 10.91 12V20.727c0 .603.488 1.091 1.09 1.091h8.727a1.09 1.09 0 0 0 1.091-1.09V12a1.09 1.09 0 0 0-1.09-1.09h-1.092Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
l as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M11.293 2.293a1 1 0 0 1 1.414 0l9 9a1 1 0 0 1-1.414 1.414L20 12.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7.586l-.293.293a1 1 0 0 1-1.414-1.414l9-9ZM6 10.414V20h3v-4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v4h3v-9.586l-6-6-6 6ZM13 20v-4h-2v4h2Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const e = (h) => /* @__PURE__ */ a(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...h,
|
|
10
|
+
children: /* @__PURE__ */ a(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M7 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h3v2H7a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3h5.586A2 2 0 0 1 14 2.586L19.414 8A2 2 0 0 1 20 9.414V10a4.974 4.974 0 0 0-2.376-.961L12.586 4H7Zm12.83 16H14v2h6v-2h-.17ZM12 22v-3a1 1 0 0 1 1-1h3v-1.17A3.01 3.01 0 0 1 14.17 15a2.997 2.997 0 0 1 0-2 3.01 3.01 0 0 1 1.537-1.708A2.997 2.997 0 0 1 20 14a3.004 3.004 0 0 1-2 2.83V18h3a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1Zm6-8a1 1 0 1 0-2 0 1 1 0 0 0 2 0Zm-9-3h4a4.977 4.977 0 0 0-.9 2H9a1 1 0 1 1 0-2Zm3.44 5.052A4.958 4.958 0 0 1 12.1 15H9a1 1 0 1 0 0 2h1.764a2.996 2.996 0 0 1 1.675-.948Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
e as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M11.553 2.106a1 1 0 0 1 .894 0l8 4A1 1 0 0 1 21 7v10a1 1 0 0 1-.553.894l-8 4a1 1 0 0 1-.894 0l-8-4A1 1 0 0 1 3 17V7a1 1 0 0 1 .553-.894l8-4ZM9 10.618V14a.5.5 0 0 1-.724.447l-1-.5A.5.5 0 0 1 7 13.5V9.618l-2-1v7.764l6 3v-7.764l-2-1Zm1.364-1.554L12 9.882 17.764 7l-2.285-1.142a.5.5 0 0 1-.242.583l-4.873 2.623Zm3.462-4.033a.508.508 0 0 0-.063.029L8.27 8.017 6.236 7 12 4.118l1.826.913ZM13 19.382l6-3V8.618l-6 3v7.764Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M11.553 2.106a1 1 0 0 1 .894 0l8 4A1 1 0 0 1 21 7v10a1 1 0 0 1-.553.894l-8 4a1 1 0 0 1-.894 0l-8-4A1 1 0 0 1 3 17V7a1 1 0 0 1 .553-.894l8-4ZM5 8.618l6 3v7.764l-6-3V8.618Zm8 10.764 6-3V8.618l-6 3v7.764Zm-1-9.5L17.764 7 12 4.118 6.236 7 12 9.882Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const o = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M14.553 3.106a1 1 0 0 1 .894 0l5.447 2.723A2 2 0 0 1 22 7.618v10.764a2 2 0 0 1-2.894 1.789L15 18.118l-5.553 2.776a1 1 0 0 1-.894 0l-5.447-2.723A2 2 0 0 1 2 16.382V5.618a2 2 0 0 1 2.894-1.789L9 5.882l5.553-2.776ZM8 7.618l-4-2v10.764l4 2V7.618Zm2 10.764 4-2V5.618l-4 2v10.764Zm6-12.764v10.764l4 2V7.618l-4-2Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
o as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const e = (h) => /* @__PURE__ */ a(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...h,
|
|
10
|
+
children: /* @__PURE__ */ a(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M12 2a3.001 3.001 0 0 0-2.83 2H8a3 3 0 0 0-3 3v5H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h4a2 2 0 0 0 1.732-1H18a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3h-1.17A3.001 3.001 0 0 0 14 2h-2ZM5 14h3v1.5H4V14h1Zm-1 3.5V21h4v-3.5H4Zm6-3.5v6h8a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-1.17A3.001 3.001 0 0 1 14 8h-2a3.001 3.001 0 0 1-2.83-2H8a1 1 0 0 0-1 1v5h1a2 2 0 0 1 2 2Zm1-9a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1Zm2 6a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-5a1 1 0 0 0-1-1Zm2 4a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
e as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const t = (a) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...a,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M2 3a1 1 0 0 1 1-1h2a1 1 0 0 1 .98.804L6.22 4H21a1 1 0 0 1 .894 1.447l-4 8A1 1 0 0 1 17 14H7.414l-2 2H17a3 3 0 1 1-2.83 2H9.83a3 3 0 1 1-5.521-.326c-.98-.65-1.268-2.129-.309-3.088l1.914-1.915L4.18 4H3a1 1 0 0 1-1-1Zm5.82 9h8.562l3-6H6.62l1.2 6ZM7 18a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm10 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const h = (a) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 24,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...a,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#3E3E3E",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M2 5a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-3.47l.373 1.489.804.804A1 1 0 0 1 16 22H8a1 1 0 0 1-.707-1.707l.804-.804L8.469 18H5a3 3 0 0 1-3-3V5Zm2 9v1a1 1 0 0 0 1 1H19a1 1 0 0 0 1-1v-1H4Zm16-2H4V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v7Zm-6.53 6h-2.94l-.5 2h3.94l-.5-2Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
h as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const BadgeState: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Badge: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const BadgeWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { d as o } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
const i = o.div`
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
position: absolute;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
top: -10px;
|
|
9
|
+
left: 16px;
|
|
10
|
+
width: 20px;
|
|
11
|
+
height: 20px;
|
|
12
|
+
border: 2px solid ${({ color: e }) => e};
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
background-color: white;
|
|
16
|
+
`, r = o.div`
|
|
17
|
+
display: flex;
|
|
18
|
+
position: relative;
|
|
19
|
+
`, d = o.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 40px;
|
|
25
|
+
height: 40px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
border: 1px solid ${({ theme: e }) => e.colors.surface.border};
|
|
28
|
+
background-color: ${({ theme: e }) => e.colors.surface.default};
|
|
29
|
+
`;
|
|
30
|
+
export {
|
|
31
|
+
r as Badge,
|
|
32
|
+
i as BadgeState,
|
|
33
|
+
d as BadgeWrapper
|
|
34
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BreadcrumbItem } from './Breadcrumb.types';
|
|
2
|
+
|
|
3
|
+
export interface BreadcrumbProps {
|
|
4
|
+
items: BreadcrumbItem[];
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Breadcrumb: ({ items, isDisabled }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { BreadcrumbWrapper as s, Breadcrumb as i } from "./styles.js";
|
|
3
|
+
import "../../providers/ThemeProvider.js";
|
|
4
|
+
import { u as m } from "../../Typography-aGoDUl4R.js";
|
|
5
|
+
const c = ({ items: e, isDisabled: a = !1 }) => {
|
|
6
|
+
const { breakpoint: o } = m();
|
|
7
|
+
return /* @__PURE__ */ r(s, { $isDisabled: a, children: /* @__PURE__ */ r(i, { items: e, breakpoint: o, role: "navigation" }) });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
c as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MenuProps } from 'antd';
|
|
2
|
+
|
|
3
|
+
export interface BreadcrumbRoute {
|
|
4
|
+
key: string;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
path?: string;
|
|
7
|
+
menu?: Omit<MenuProps, "items"> & {
|
|
8
|
+
items?: MenuProps["items"];
|
|
9
|
+
};
|
|
10
|
+
href?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BreadcrumbMenuItem {
|
|
13
|
+
key: string;
|
|
14
|
+
label: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface BreadcrumbItem {
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
menu?: Omit<MenuProps, "items"> & {
|
|
19
|
+
items?: MenuProps["items"];
|
|
20
|
+
};
|
|
21
|
+
href?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Breadcrumb } from '../Breadcrumb';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Breadcrumb>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Breadcrumb>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const OneBreadcrumb: Story;
|
|
9
|
+
export declare const TwoBreadcrumb: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { s, a as c } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import m from "../Breadcrumb.js";
|
|
4
|
+
const n = [
|
|
5
|
+
{ title: "Home", href: "/" },
|
|
6
|
+
{ title: "Products", href: "/products" },
|
|
7
|
+
{ title: "Current Page", href: "/products/current" }
|
|
8
|
+
];
|
|
9
|
+
describe("<Breadcrumb />", () => {
|
|
10
|
+
let e;
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
e = {
|
|
13
|
+
items: n,
|
|
14
|
+
isDisabled: !1
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
const r = () => c(/* @__PURE__ */ o(m, { ...e }));
|
|
18
|
+
it("should render the Breadcrumb component", () => {
|
|
19
|
+
r();
|
|
20
|
+
const t = s.getByRole("navigation");
|
|
21
|
+
expect(t).toBeInTheDocument();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
|
|
3
|
+
interface StyledBreadcrumbProps {
|
|
4
|
+
theme?: GenesisTheme;
|
|
5
|
+
$isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface StyledBreadcrumbComponentProps extends StyledBreadcrumbProps {
|
|
8
|
+
type?: string;
|
|
9
|
+
state?: string;
|
|
10
|
+
breakpoint?: string;
|
|
11
|
+
role?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const getGenesisClass: ({ colors, typography }: GenesisTheme, breakpoint?: string) => string;
|
|
14
|
+
export declare const BreadcrumbWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBreadcrumbProps>> & string;
|
|
15
|
+
export declare const Breadcrumb: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('antd').BreadcrumbProps<import('antd/es/_util/type').AnyObject>, StyledBreadcrumbComponentProps>> & string & Omit<{
|
|
16
|
+
<T extends import('antd/es/_util/type').AnyObject = import('antd/es/_util/type').AnyObject>(props: import('antd').BreadcrumbProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
Item: React.FC<import('antd').BreadcrumbItemProps> & {
|
|
18
|
+
__ANT_BREADCRUMB_ITEM: boolean;
|
|
19
|
+
};
|
|
20
|
+
Separator: React.FC<{
|
|
21
|
+
children?: React.ReactNode | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
__ANT_BREADCRUMB_SEPARATOR: boolean;
|
|
24
|
+
};
|
|
25
|
+
displayName: string;
|
|
26
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
27
|
+
export default Breadcrumb;
|