@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
package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { d as W } from "
|
|
1
|
+
import { d as W } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
import { R as A, a as j } from "
|
|
4
|
-
import { R as z } from "
|
|
5
|
-
import {
|
|
6
|
-
import { I as
|
|
3
|
+
import { R as A, a as j } from "../../ExclamationCircleFilled-C0Kj5KQV.js";
|
|
4
|
+
import { R as z } from "../../CloseCircleFilled-DXCxlIQL.js";
|
|
5
|
+
import { a as $, c as k } from "../../warning-C63HNL9U.js";
|
|
6
|
+
import { I as S } from "../../AntdIcon-BoLh1dP8.js";
|
|
7
|
+
import { g as x, m as N, q as m, C as I, v as H } from "../../index-oK7z6jnz.js";
|
|
7
8
|
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) {
|
|
8
|
-
return /* @__PURE__ */ e.createElement(
|
|
9
|
+
return /* @__PURE__ */ e.createElement(S, $({}, l, {
|
|
9
10
|
ref: a,
|
|
10
11
|
icon: R
|
|
11
12
|
}));
|
|
@@ -515,7 +516,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
515
516
|
d: "M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",
|
|
516
517
|
fill: "#F2D7AD",
|
|
517
518
|
mask: "url(#d)"
|
|
518
|
-
}))),
|
|
519
|
+
}))), w = (t) => {
|
|
519
520
|
const {
|
|
520
521
|
componentCls: l,
|
|
521
522
|
lineHeightHeading3: a,
|
|
@@ -578,7 +579,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
581
|
};
|
|
581
|
-
},
|
|
582
|
+
}, _ = (t) => {
|
|
582
583
|
const {
|
|
583
584
|
componentCls: l,
|
|
584
585
|
iconCls: a
|
|
@@ -597,13 +598,13 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
597
598
|
color: t.resultWarningIconColor
|
|
598
599
|
}
|
|
599
600
|
};
|
|
600
|
-
}, T = (t) => [
|
|
601
|
+
}, T = (t) => [w(t), _(t)], O = (t) => T(t), G = (t) => ({
|
|
601
602
|
titleFontSize: t.fontSizeHeading3,
|
|
602
603
|
subtitleFontSize: t.fontSize,
|
|
603
604
|
iconFontSize: t.fontSizeHeading3 * 3,
|
|
604
605
|
extraMargin: `${t.paddingLG}px 0 0 0`
|
|
605
|
-
}), P =
|
|
606
|
-
const l = t.colorInfo, a = t.colorError, r = t.colorSuccess, n = t.colorWarning, s =
|
|
606
|
+
}), P = x("Result", (t) => {
|
|
607
|
+
const l = t.colorInfo, a = t.colorError, r = t.colorSuccess, n = t.colorWarning, s = N(t, {
|
|
607
608
|
resultInfoIconColor: l,
|
|
608
609
|
resultErrorIconColor: a,
|
|
609
610
|
resultSuccessIconColor: r,
|
|
@@ -612,7 +613,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
612
613
|
imageHeight: 295
|
|
613
614
|
});
|
|
614
615
|
return [O(s)];
|
|
615
|
-
}, G),
|
|
616
|
+
}, G), q = () => /* @__PURE__ */ e.createElement("svg", {
|
|
616
617
|
width: "251",
|
|
617
618
|
height: "294"
|
|
618
619
|
}, /* @__PURE__ */ e.createElement("title", null, "Unauthorized"), /* @__PURE__ */ e.createElement("g", {
|
|
@@ -834,7 +835,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
834
835
|
strokeWidth: "1.051",
|
|
835
836
|
strokeLinecap: "round",
|
|
836
837
|
strokeLinejoin: "round"
|
|
837
|
-
}))),
|
|
838
|
+
}))), U = {
|
|
838
839
|
success: A,
|
|
839
840
|
error: z,
|
|
840
841
|
info: j,
|
|
@@ -842,8 +843,8 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
842
843
|
}, h = {
|
|
843
844
|
404: V,
|
|
844
845
|
500: b,
|
|
845
|
-
403:
|
|
846
|
-
},
|
|
846
|
+
403: q
|
|
847
|
+
}, X = Object.keys(h), J = (t) => {
|
|
847
848
|
let {
|
|
848
849
|
prefixCls: l,
|
|
849
850
|
icon: a,
|
|
@@ -851,16 +852,16 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
851
852
|
} = t;
|
|
852
853
|
const n = k(`${l}-icon`);
|
|
853
854
|
if (process.env.NODE_ENV !== "production") {
|
|
854
|
-
const o =
|
|
855
|
+
const o = H("Result");
|
|
855
856
|
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`);
|
|
856
857
|
}
|
|
857
|
-
if (
|
|
858
|
+
if (X.includes(`${r}`)) {
|
|
858
859
|
const o = h[r];
|
|
859
860
|
return /* @__PURE__ */ e.createElement("div", {
|
|
860
861
|
className: `${n} ${l}-image`
|
|
861
862
|
}, /* @__PURE__ */ e.createElement(o, null));
|
|
862
863
|
}
|
|
863
|
-
const s = /* @__PURE__ */ e.createElement(
|
|
864
|
+
const s = /* @__PURE__ */ e.createElement(U[r]);
|
|
864
865
|
return a === null || a === !1 ? null : /* @__PURE__ */ e.createElement("div", {
|
|
865
866
|
className: n
|
|
866
867
|
}, a || s);
|
|
@@ -889,7 +890,7 @@ const V = () => /* @__PURE__ */ e.createElement("svg", {
|
|
|
889
890
|
getPrefixCls: f,
|
|
890
891
|
direction: L,
|
|
891
892
|
result: d
|
|
892
|
-
} = e.useContext(
|
|
893
|
+
} = e.useContext(I), c = f("result", l), [B, g, v] = P(c), C = k(c, `${c}-${E}`, a, d == null ? void 0 : d.className, r, {
|
|
893
894
|
[`${c}-rtl`]: L === "rtl"
|
|
894
895
|
}, g, v), D = Object.assign(Object.assign({}, d == null ? void 0 : d.style), o);
|
|
895
896
|
return B(/* @__PURE__ */ e.createElement("div", {
|
|
@@ -914,7 +915,7 @@ M.PRESENTED_IMAGE_403 = h[403];
|
|
|
914
915
|
M.PRESENTED_IMAGE_404 = h[404];
|
|
915
916
|
M.PRESENTED_IMAGE_500 = h[500];
|
|
916
917
|
process.env.NODE_ENV !== "production" && (M.displayName = "Result");
|
|
917
|
-
const
|
|
918
|
+
const a1 = W(M)`
|
|
918
919
|
height: 100vh;
|
|
919
920
|
display: flex;
|
|
920
921
|
flex-direction: column;
|
|
@@ -926,5 +927,5 @@ const l1 = W(M)`
|
|
|
926
927
|
}
|
|
927
928
|
`;
|
|
928
929
|
export {
|
|
929
|
-
|
|
930
|
+
a1 as StyledErrorBoundaryFallback
|
|
930
931
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormProps as AntFormProps, FormInstance } from 'antd';
|
|
3
|
+
import { TYPE, STATE } from '../../constants';
|
|
4
|
+
|
|
5
|
+
import * as S from "./styles";
|
|
6
|
+
export interface FormProps extends AntFormProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
type?: keyof typeof TYPE;
|
|
9
|
+
state?: keyof typeof STATE;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormItem: (<Values = any>(props: import('antd').FormItemProps<Values>) => React.ReactElement) & {
|
|
12
|
+
useStatus: () => {
|
|
13
|
+
status?: import('antd/es/form/FormItem').ValidateStatus;
|
|
14
|
+
errors: React.ReactNode[];
|
|
15
|
+
warnings: React.ReactNode[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
interface GenesisFormProps extends FormProps {
|
|
19
|
+
form?: FormInstance;
|
|
20
|
+
}
|
|
21
|
+
interface FormType extends React.FC<GenesisFormProps> {
|
|
22
|
+
Item: typeof S.Form.Item;
|
|
23
|
+
useForm: typeof S.Form.useForm;
|
|
24
|
+
}
|
|
25
|
+
declare const Form: FormType;
|
|
26
|
+
export default Form;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as o, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { F as c, a as s, h as i } from "../../../Typography-aGoDUl4R.js";
|
|
3
|
+
import "../../Badge/styles.js";
|
|
4
|
+
import "../../Breadcrumb/styles.js";
|
|
5
|
+
import "../../../providers/ThemeProvider.js";
|
|
6
|
+
import m from "../../Button/Button.js";
|
|
7
|
+
import d from "../../Checkbox/Checkbox.js";
|
|
8
|
+
import "../../ErrorBoundaryFallback/styles.js";
|
|
9
|
+
import u from "../../Input/Input.js";
|
|
10
|
+
import "../../Message/styles.js";
|
|
11
|
+
import "../../Notification/styles.js";
|
|
12
|
+
import h from "../../Select/Select.js";
|
|
13
|
+
import "../../Toast/styles.js";
|
|
14
|
+
import f from "react";
|
|
15
|
+
import { F as b } from "../../../styles-CT_fyXBd.js";
|
|
16
|
+
import { S as l } from "../../../index-BZAhCB_K.js";
|
|
17
|
+
const F = [
|
|
18
|
+
{ value: "apple", label: /* @__PURE__ */ e("span", { children: "apple" }) },
|
|
19
|
+
{ value: "pear", label: /* @__PURE__ */ e("span", { children: "pear" }) }
|
|
20
|
+
], _ = () => {
|
|
21
|
+
const [n, t] = f.useState(null), [a] = b.useForm();
|
|
22
|
+
return /* @__PURE__ */ o(p, { children: [
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
c,
|
|
25
|
+
{
|
|
26
|
+
form: a,
|
|
27
|
+
autoComplete: "off",
|
|
28
|
+
initialValues: { remember: !0 },
|
|
29
|
+
onFinish: (r) => {
|
|
30
|
+
console.log("Success:", r), t(r);
|
|
31
|
+
},
|
|
32
|
+
onFinishFailed: (r) => {
|
|
33
|
+
console.log("Failed:", r);
|
|
34
|
+
},
|
|
35
|
+
children: /* @__PURE__ */ o(l, { direction: "vertical", children: [
|
|
36
|
+
/* @__PURE__ */ e(s, { variant: "heading1", children: "Ship with GoBolt" }),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
i,
|
|
39
|
+
{
|
|
40
|
+
label: "What is your name?",
|
|
41
|
+
name: "username",
|
|
42
|
+
rules: [{ required: !0, message: "Please input your name!" }],
|
|
43
|
+
labelCol: { span: 24 },
|
|
44
|
+
children: /* @__PURE__ */ e(u, {})
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
i,
|
|
49
|
+
{
|
|
50
|
+
label: "What's for lunch?",
|
|
51
|
+
name: "fruit",
|
|
52
|
+
rules: [{ required: !1 }],
|
|
53
|
+
labelCol: { span: 24 },
|
|
54
|
+
children: /* @__PURE__ */ e(h, { options: F, placeholder: "Select a fruit" })
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ e(
|
|
58
|
+
i,
|
|
59
|
+
{
|
|
60
|
+
name: "subscribe",
|
|
61
|
+
labelCol: { span: 24 },
|
|
62
|
+
label: "Interested in updates?",
|
|
63
|
+
children: /* @__PURE__ */ e(l, { direction: "horizontal", children: /* @__PURE__ */ e(d, { label: "Yes, Sign me up" }) })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ e(i, { label: null, name: "subscribe", valuePropName: "checked", children: /* @__PURE__ */ o(l, { direction: "horizontal", size: 180, children: [
|
|
67
|
+
/* @__PURE__ */ e(m, { themeType: "secondary", onClick: () => {
|
|
68
|
+
a.resetFields(), t(null);
|
|
69
|
+
}, children: "Reset" }),
|
|
70
|
+
/* @__PURE__ */ e(m, { htmlType: "submit", children: "Submit" })
|
|
71
|
+
] }) })
|
|
72
|
+
] })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
n && /* @__PURE__ */ o(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
style: {
|
|
79
|
+
marginTop: "20px",
|
|
80
|
+
padding: "10px",
|
|
81
|
+
border: "1px solid #ccc"
|
|
82
|
+
},
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ e(s, { variant: "heading3", children: "Form Values:" }),
|
|
85
|
+
/* @__PURE__ */ e("pre", { children: JSON.stringify(n, null, 2) })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] });
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
_ as FormStory
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { v as e, s as m, a as t } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import { F as i } from "../../../Typography-aGoDUl4R.js";
|
|
4
|
+
describe("<Form />", () => {
|
|
5
|
+
let o;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
o = {
|
|
8
|
+
onFinish: e.fn(),
|
|
9
|
+
onFinishFailed: e.fn()
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
const r = () => t(/* @__PURE__ */ s(i, { ...o }));
|
|
13
|
+
it("should render the form", () => {
|
|
14
|
+
r();
|
|
15
|
+
const n = m.getByRole("form");
|
|
16
|
+
expect(n).toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { STATE } from '../../constants';
|
|
3
3
|
import { InputProps as AntInputProps } from 'antd';
|
|
4
4
|
|
|
5
|
-
export type GenesisInputType = keyof typeof TYPE;
|
|
6
5
|
export interface InputProps extends AntInputProps {
|
|
7
|
-
type?: GenesisButtonType;
|
|
8
6
|
state?: keyof typeof STATE;
|
|
9
7
|
}
|
|
10
8
|
declare const Input: React.FC<InputProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Input as p } from "./styles.js";
|
|
3
|
+
import { useBreakpoint as e } from "../../providers/ThemeProvider.js";
|
|
4
|
+
import { STATE as a } from "../../constants/index.js";
|
|
5
|
+
const f = ({ state: t = a.active, ...o }) => {
|
|
6
|
+
e();
|
|
7
|
+
const { type: d, ...r } = o;
|
|
8
|
+
return /* @__PURE__ */ i(
|
|
9
|
+
p,
|
|
10
|
+
{
|
|
11
|
+
state: t,
|
|
12
|
+
disabled: t === "disabled" || o.disabled,
|
|
13
|
+
...r
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
f as default
|
|
19
|
+
};
|
|
@@ -5,6 +5,10 @@ declare const meta: Meta<typeof Input>;
|
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof Input>;
|
|
7
7
|
export declare const Default: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Filled: Story;
|
|
9
|
+
export declare const Focussed: Story;
|
|
10
|
+
export declare const Success: Story;
|
|
11
|
+
export declare const Error: Story;
|
|
12
|
+
export declare const AddonAfterOnlyNumbers: Story;
|
|
9
13
|
export declare const AddonBefore: Story;
|
|
10
14
|
export declare const AddonBeforeAfter: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { d as r, i as o, a as s, s as n, g as a } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import i from "../Input.js";
|
|
4
|
+
import { STATE as c } from "../../../constants/index.js";
|
|
5
|
+
r("Input Component", () => {
|
|
6
|
+
o("customRenders input with default props", () => {
|
|
7
|
+
s(/* @__PURE__ */ e(i, {}));
|
|
8
|
+
const t = n.getByRole("textbox");
|
|
9
|
+
a(t).toBeInTheDocument();
|
|
10
|
+
}), o("customRenders input with active state", () => {
|
|
11
|
+
s(/* @__PURE__ */ e(i, { state: c.active }));
|
|
12
|
+
const t = n.getByRole("textbox");
|
|
13
|
+
a(t).toBeEnabled();
|
|
14
|
+
}), o("passes through additional props", () => {
|
|
15
|
+
const t = "Enter text";
|
|
16
|
+
s(/* @__PURE__ */ e(i, { placeholder: t }));
|
|
17
|
+
const p = n.getByPlaceholderText(t);
|
|
18
|
+
a(p).toBeInTheDocument();
|
|
19
|
+
}), o("handles disabled state", () => {
|
|
20
|
+
s(/* @__PURE__ */ e(i, { disabled: !0 }));
|
|
21
|
+
const t = n.getByRole("textbox");
|
|
22
|
+
a(t).toBeDisabled();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InputProps as AntInputProps } from 'antd';
|
|
2
|
+
import { STATE } from '../../constants';
|
|
2
3
|
|
|
3
4
|
interface InputStyledProps extends AntInputProps {
|
|
5
|
+
state?: keyof typeof STATE;
|
|
4
6
|
}
|
|
5
7
|
export declare const Input: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<AntInputProps & import('react').RefAttributes<import('antd').InputRef>, "ref"> & {
|
|
6
8
|
ref?: import('react').Ref<import('antd').InputRef>;
|