@gobolt/genesis 0.0.7 → 0.0.8
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 -2
- package/dist/AntdIcon-c395a1c4.js +204 -0
- package/dist/CheckOutlined-52d9ac25.js +29 -0
- package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
- package/dist/CloseOutlined-14b8bba1.js +16 -0
- package/dist/Compact-c39ed20d.js +179 -0
- package/dist/ContextIsolator-b09b2c52.js +20 -0
- package/dist/DownOutlined-64a4732a.js +206 -0
- package/dist/EllipsisOutlined-60122660.js +1115 -0
- package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
- package/dist/InfoCircleFilled-c5f90c20.js +16 -0
- package/dist/Overflow-a570fa69.js +361 -0
- package/dist/RightOutlined-83515eb4.js +16 -0
- package/dist/SearchOutlined-a9014e08.js +16 -0
- package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
- package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
- package/dist/collapse-345bc884.js +20 -0
- package/dist/compact-item-b8f85aa6.js +75 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.js +102 -0
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
- package/dist/components/Badge/__tests__/Badge.test.js +72 -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 +23 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/styles.js +35 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -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 +70 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.js +27 -0
- package/dist/components/Breadcrumb/styles.d.ts +23 -0
- package/dist/components/Breadcrumb/styles.js +2457 -0
- package/dist/components/Button/Button.js +42 -0
- package/dist/components/Button/__tests__/Button.test.js +61 -0
- package/dist/components/Button/index.js +22 -0
- package/dist/components/{atoms/button → Button}/styles.js +30 -19
- package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.js +70 -0
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
- package/dist/components/Checkbox/index.js +49 -0
- package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
- package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
- package/dist/components/ErrorBoundaryFallback/index.js +51 -0
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
- package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
- package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
- package/dist/components/Form/Form.js +49 -0
- package/dist/components/Form/__stories__/FormStory.js +130 -0
- package/dist/components/Form/index.js +48 -0
- package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
- package/dist/components/Input/Input.js +42 -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 +69 -0
- package/dist/components/Input/index.js +31 -0
- package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
- package/dist/components/Input/styles.js +542 -0
- package/dist/components/Message/Message.d.ts +13 -0
- package/dist/components/Message/Message.js +105 -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 +88 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.js +50 -0
- package/dist/components/Message/styles.d.ts +5 -0
- package/dist/components/Message/styles.js +35 -0
- package/dist/components/Notification/Notification.d.ts +16 -0
- package/dist/components/Notification/Notification.js +1436 -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 +76 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/Notification/styles.d.ts +6 -0
- package/dist/components/Notification/styles.js +49 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/Radio.js +114 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/RadioGroup.js +86 -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 +85 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +58 -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/{atoms/select → Select}/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +48 -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/Select/__tests__/Select.test.js +101 -0
- package/dist/components/Select/index.js +30 -0
- package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
- package/dist/components/Select/styles.js +3723 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +48 -0
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +63 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.js +48 -0
- package/dist/components/Toast/styles.d.ts +5 -0
- package/dist/components/Toast/styles.js +39 -0
- package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
- package/dist/components/Typography/Typography.js +48 -0
- package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +60 -0
- package/dist/components/Typography/index.js +48 -0
- package/dist/components/Typography/styles.d.ts +7 -0
- package/dist/components/Typography/styles.js +55 -0
- package/dist/components/index.d.ts +18 -14
- package/dist/components/index.js +70 -14
- package/dist/constants/index.d.ts +104 -0
- package/dist/constants/index.js +41 -7
- package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
- package/dist/genesis/GenesisThemeBreakdown.js +69 -22
- package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
- package/dist/genesis/GenesisThemeDemo.js +53 -4
- package/dist/genesis/styles.d.ts +2 -6
- package/dist/genesis/styles.js +1144 -2210
- package/dist/index-0a886e53.js +100 -0
- package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
- package/dist/index-1a33c134.js +1389 -0
- package/dist/index-4003d75b.js +3748 -0
- package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
- package/dist/index-89035ea5.js +3242 -0
- package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
- package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -18
- package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
- package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
- package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
- package/dist/presets-83ccb923.js +787 -0
- package/dist/providers/GenesisProvider.d.ts +5 -0
- package/dist/providers/GenesisProvider.js +59 -5
- package/dist/providers/ThemeProvider.d.ts +2 -1
- package/dist/providers/ThemeProvider.js +16 -11
- package/dist/providers/ToastProvider.d.ts +6 -0
- package/dist/providers/ToastProvider.js +49 -0
- package/dist/providers/ToastWrapper.d.ts +7 -0
- package/dist/providers/ToastWrapper.js +56 -0
- package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +51 -4
- package/dist/setup-aaca7b6f.js +21158 -0
- package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
- package/dist/styles/design-tokens/variables.d.ts +7 -7
- package/dist/styles/design-tokens/variables.js +48 -48
- package/dist/styles/global-styles.js +4 -3
- package/dist/styles/theme/genesis-theme.d.ts +3 -0
- package/dist/styles/theme/genesis-theme.js +402 -263
- package/dist/styles/theme/global-styles.js +4 -3
- package/dist/styles/theme/index.js +5 -4
- package/dist/test/setup.js +46 -2
- package/dist/useVariants-a0d64298.js +30 -0
- package/dist/utils/isAllEnglishString.js +2 -1
- package/package.json +34 -28
- package/dist/AntdIcon-Bsnbyy6g.js +0 -200
- package/dist/CheckOutlined-DAynWe12.js +0 -527
- package/dist/Compact-CJBo3f0u.js +0 -185
- package/dist/ContextIsolator-CGkdKtc3.js +0 -20
- package/dist/Form-Cylpi4M4.js +0 -1815
- package/dist/Overflow-CP1M4Z0s.js +0 -369
- package/dist/compact-item-DH13cl8A.js +0 -61
- package/dist/components/atoms/button/Button.js +0 -27
- package/dist/components/atoms/button/index.js +0 -4
- package/dist/components/atoms/checkbox/Checkbox.js +0 -13
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
- package/dist/components/atoms/checkbox/index.js +0 -4
- 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/index.js +0 -4
- package/dist/components/atoms/input/styles.js +0 -415
- package/dist/components/atoms/select/Select.js +0 -24
- package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
- package/dist/components/atoms/select/index.js +0 -4
- package/dist/components/atoms/select/styles.js +0 -3868
- 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.js +0 -35
- package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
- package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
- 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-3MWkSVA1.js +0 -96
- package/dist/index-BPtFqhcp.js +0 -19110
- package/dist/index-BWys7dkb.js +0 -4462
- package/dist/index-VDH3iLaC.js +0 -884
- package/dist/setup-CMYVZCPF.js +0 -33883
- package/dist/useVariants-CEpw6Ww6.js +0 -29
- /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}/Button.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}/styles.d.ts +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/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +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.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/select → Select}/index.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
- /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
- /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
- /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { f as
|
|
2
|
-
|
|
1
|
+
import { f as r } from "../../styled-components.browser.esm-02f500bc.js";
|
|
2
|
+
import "react";
|
|
3
|
+
const i = r`
|
|
3
4
|
h1, h2, h3, h4, h5, h6 {
|
|
4
5
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
5
6
|
font-weight: 700;
|
|
@@ -31,5 +32,5 @@ const e = a`
|
|
|
31
32
|
}
|
|
32
33
|
`;
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
i as GlobalStyles
|
|
35
36
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TypographySizeKey as
|
|
1
|
+
import { TypographySizeKey as r, baseTokens as p, breakpoints as a, darkTheme as h, lightTheme as m, sizing as s } from "./genesis-theme.js";
|
|
2
|
+
import "../design-tokens/variables.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
r as TypographySizeKey,
|
|
5
|
+
p as baseTokens,
|
|
5
6
|
a as breakpoints,
|
|
6
7
|
h as darkTheme,
|
|
7
|
-
|
|
8
|
+
m as lightTheme,
|
|
8
9
|
s as sizing
|
|
9
10
|
};
|
package/dist/test/setup.js
CHANGED
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { c as X } from "../setup-aaca7b6f.js";
|
|
3
|
+
import "@testing-library/react";
|
|
3
4
|
import "../providers/GenesisProvider.js";
|
|
4
5
|
import "../providers/ThemeProvider.js";
|
|
6
|
+
import "../index-89035ea5.js";
|
|
7
|
+
import "../presets-83ccb923.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import "../styled-components.browser.esm-02f500bc.js";
|
|
10
|
+
import "../styles/theme/genesis-theme.js";
|
|
11
|
+
import "../styles/design-tokens/variables.js";
|
|
12
|
+
import "../constants/index.js";
|
|
13
|
+
import "../components/Button/styles.js";
|
|
14
|
+
import "../button-fa1c119c.js";
|
|
15
|
+
import "../isVisible-729780f5.js";
|
|
16
|
+
import "../index-4003d75b.js";
|
|
17
|
+
import "react-dom";
|
|
18
|
+
import "../index-e2b72ca8.js";
|
|
19
|
+
import "../reactNode-f4391605.js";
|
|
20
|
+
import "../Compact-c39ed20d.js";
|
|
21
|
+
import "../presetColors-ccf8cb4c.js";
|
|
22
|
+
import "../compact-item-b8f85aa6.js";
|
|
23
|
+
import "../AntdIcon-c395a1c4.js";
|
|
24
|
+
import "../components/Checkbox/styles.js";
|
|
25
|
+
import "../context-3b8a39af.js";
|
|
26
|
+
import "../components/ErrorBoundaryFallback/styles.js";
|
|
27
|
+
import "../ExclamationCircleFilled-23ef9812.js";
|
|
28
|
+
import "../CloseCircleFilled-ddc51e7e.js";
|
|
29
|
+
import "../components/Input/styles.js";
|
|
30
|
+
import "../TextArea-20825221.js";
|
|
31
|
+
import "../index-8c8d2d0c.js";
|
|
32
|
+
import "../useVariants-a0d64298.js";
|
|
33
|
+
import "../ContextIsolator-b09b2c52.js";
|
|
34
|
+
import "../pickAttrs-00ba4687.js";
|
|
35
|
+
import "../SearchOutlined-a9014e08.js";
|
|
36
|
+
import "../components/Select/styles.js";
|
|
37
|
+
import "../index-1a33c134.js";
|
|
38
|
+
import "../Overflow-a570fa69.js";
|
|
39
|
+
import "../DownOutlined-64a4732a.js";
|
|
40
|
+
import "../CheckOutlined-52d9ac25.js";
|
|
41
|
+
import "../CloseOutlined-14b8bba1.js";
|
|
42
|
+
import "../components/Typography/styles.js";
|
|
43
|
+
import "../index-501fc13d.js";
|
|
44
|
+
import "../index-0b9ee239.js";
|
|
45
|
+
import "../components/Badge/styles.js";
|
|
46
|
+
import "../InfoCircleFilled-c5f90c20.js";
|
|
47
|
+
import "../components/Toast/styles.js";
|
|
48
|
+
import "../collapse-345bc884.js";
|
|
5
49
|
export {
|
|
6
|
-
|
|
50
|
+
X as customRender
|
|
7
51
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { c as g } from "./presets-83ccb923.js";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import { V as m } from "./context-3b8a39af.js";
|
|
4
|
+
import { C as f, V } from "./index-4003d75b.js";
|
|
5
|
+
function p(n, t, e) {
|
|
6
|
+
return g({
|
|
7
|
+
[`${n}-status-success`]: t === "success",
|
|
8
|
+
[`${n}-status-warning`]: t === "warning",
|
|
9
|
+
[`${n}-status-error`]: t === "error",
|
|
10
|
+
[`${n}-status-validating`]: t === "validating",
|
|
11
|
+
[`${n}-has-feedback`]: e
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const h = (n, t) => t || n, v = function(n, t) {
|
|
15
|
+
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
|
|
16
|
+
var s, o;
|
|
17
|
+
const {
|
|
18
|
+
variant: c,
|
|
19
|
+
[n]: r
|
|
20
|
+
} = u.useContext(f), i = u.useContext(m), d = r == null ? void 0 : r.variant;
|
|
21
|
+
let a;
|
|
22
|
+
typeof t < "u" ? a = t : e === !1 ? a = "borderless" : a = (o = (s = i ?? d) !== null && s !== void 0 ? s : c) !== null && o !== void 0 ? o : "outlined";
|
|
23
|
+
const l = V.includes(a);
|
|
24
|
+
return [a, l];
|
|
25
|
+
}, w = v;
|
|
26
|
+
export {
|
|
27
|
+
p as a,
|
|
28
|
+
h as g,
|
|
29
|
+
w as u
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,24 +11,9 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"dev": "vite",
|
|
16
|
-
"build": "tsc --extendedDiagnostics --p ./tsconfig-build.json && vite build",
|
|
17
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
18
|
-
"preview": "vite preview",
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
|
-
"start": "storybook dev -p 6006",
|
|
21
|
-
"storybook": "storybook dev -p 6006",
|
|
22
|
-
"build-storybook": "storybook build",
|
|
23
|
-
"test": "vitest run",
|
|
24
|
-
"coverage": "vitest run --coverage",
|
|
25
|
-
"generate": "tsx ./lab/generate/generate-component",
|
|
26
|
-
"generate:story": "tsx ./lab/generate/generate-story",
|
|
27
|
-
"test:watch": "vitest"
|
|
28
|
-
},
|
|
29
14
|
"peerDependencies": {
|
|
30
|
-
"react": "^
|
|
31
|
-
"react-dom": "^
|
|
15
|
+
"react": "^17.0.2",
|
|
16
|
+
"react-dom": "^17.0.2"
|
|
32
17
|
},
|
|
33
18
|
"devDependencies": {
|
|
34
19
|
"@changesets/cli": "^2.27.8",
|
|
@@ -44,11 +29,11 @@
|
|
|
44
29
|
"@storybook/test": "^8.5.0",
|
|
45
30
|
"@storybook/test-runner": "^0.19.1",
|
|
46
31
|
"@types/jest": "^29.5.11",
|
|
47
|
-
"@types/react": "^
|
|
48
|
-
"@types/react-dom": "^
|
|
32
|
+
"@types/react": "^17.0.38",
|
|
33
|
+
"@types/react-dom": "^17.0.11",
|
|
49
34
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
50
35
|
"@typescript-eslint/parser": "^6.10.0",
|
|
51
|
-
"@vitejs/plugin-react": "^4.
|
|
36
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
52
37
|
"@vitest/browser": "^2.0.2",
|
|
53
38
|
"eslint": "^8.57.1",
|
|
54
39
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -57,16 +42,19 @@
|
|
|
57
42
|
"glob": "^10.3.10",
|
|
58
43
|
"jest": "^29.7.0",
|
|
59
44
|
"jsdom": "^23.0.1",
|
|
60
|
-
"react": "^
|
|
61
|
-
"react-dom": "^
|
|
45
|
+
"react": "^17.0.2",
|
|
46
|
+
"react-dom": "^17.0.2",
|
|
62
47
|
"rollup-plugin-dts": "^6.1.1",
|
|
63
48
|
"storybook": "8.5.0",
|
|
64
49
|
"tsx": "^4.19.2",
|
|
65
50
|
"typescript": "^5.2.2",
|
|
66
|
-
"vite": "^
|
|
51
|
+
"vite": "^4.3.9",
|
|
67
52
|
"vite-plugin-dts": "^3.6.4",
|
|
68
53
|
"vite-plugin-lib-inject-css": "^1.3.0",
|
|
69
|
-
"vitest": "^2.1.8"
|
|
54
|
+
"vitest": "^2.1.8",
|
|
55
|
+
"@testing-library/react": "^12.1.5",
|
|
56
|
+
"@testing-library/dom": "^8.0.0",
|
|
57
|
+
"@testing-library/user-event": "^13.5.0"
|
|
70
58
|
},
|
|
71
59
|
"dependencies": {
|
|
72
60
|
"@ant-design/icons": "^5.5.2",
|
|
@@ -80,13 +68,17 @@
|
|
|
80
68
|
"@testing-library/react": "^14.1.2",
|
|
81
69
|
"@testing-library/user-event": "^14.6.0",
|
|
82
70
|
"antd": "^5.23.1",
|
|
71
|
+
"chalk": "^5.4.1",
|
|
83
72
|
"clsx": "^1.1.0",
|
|
84
73
|
"date-fns": "^3.6.0",
|
|
74
|
+
"rc-notification": "^5.6.2",
|
|
85
75
|
"react-error-boundary": "^4.0.11",
|
|
86
76
|
"rollup-plugin-css-only": "^4.5.2",
|
|
87
77
|
"styled-components": "^6.1.14",
|
|
88
78
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
89
|
-
"vite-tsconfig-paths": "^5.1.4"
|
|
79
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
80
|
+
"react": "^17.0.2",
|
|
81
|
+
"react-dom": "^17.0.2"
|
|
90
82
|
},
|
|
91
83
|
"sideEffects": [
|
|
92
84
|
"**/*.css"
|
|
@@ -111,5 +103,19 @@
|
|
|
111
103
|
"bugs": {
|
|
112
104
|
"url": "https://github.com/SecondCloset/genesis/issues"
|
|
113
105
|
},
|
|
114
|
-
"homepage": "https://github.com/SecondCloset/genesis#readme"
|
|
115
|
-
|
|
106
|
+
"homepage": "https://github.com/SecondCloset/genesis#readme",
|
|
107
|
+
"scripts": {
|
|
108
|
+
"dev": "vite",
|
|
109
|
+
"build": "tsc --extendedDiagnostics --p ./tsconfig-build.json && vite build",
|
|
110
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
111
|
+
"preview": "vite preview",
|
|
112
|
+
"start": "storybook dev -p 6006",
|
|
113
|
+
"storybook": "storybook dev -p 6006",
|
|
114
|
+
"build-storybook": "storybook build",
|
|
115
|
+
"test": "vitest run",
|
|
116
|
+
"coverage": "vitest run --coverage",
|
|
117
|
+
"generate": "tsx ./lab/generate/generate-component",
|
|
118
|
+
"generate:story": "tsx ./lab/generate/generate-story",
|
|
119
|
+
"test:watch": "vitest"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { w as L, b, a as c, g as U, I, u as W, d as N, e as R, f as q, c as F, h, _ as G } from "./index-BWys7dkb.js";
|
|
2
|
-
import * as f from "react";
|
|
3
|
-
import x, { useContext as H, useEffect as J } from "react";
|
|
4
|
-
function S(n) {
|
|
5
|
-
var o;
|
|
6
|
-
return n == null || (o = n.getRootNode) === null || o === void 0 ? void 0 : o.call(n);
|
|
7
|
-
}
|
|
8
|
-
function K(n) {
|
|
9
|
-
return S(n) instanceof ShadowRoot;
|
|
10
|
-
}
|
|
11
|
-
function M(n) {
|
|
12
|
-
return K(n) ? S(n) : null;
|
|
13
|
-
}
|
|
14
|
-
function Q(n) {
|
|
15
|
-
return n.replace(/-(.)/g, function(o, e) {
|
|
16
|
-
return e.toUpperCase();
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function V(n, o) {
|
|
20
|
-
L(n, "[@ant-design/icons] ".concat(o));
|
|
21
|
-
}
|
|
22
|
-
function _(n) {
|
|
23
|
-
return b(n) === "object" && typeof n.name == "string" && typeof n.theme == "string" && (b(n.icon) === "object" || typeof n.icon == "function");
|
|
24
|
-
}
|
|
25
|
-
function k() {
|
|
26
|
-
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
27
|
-
return Object.keys(n).reduce(function(o, e) {
|
|
28
|
-
var r = n[e];
|
|
29
|
-
switch (e) {
|
|
30
|
-
case "class":
|
|
31
|
-
o.className = r, delete o.class;
|
|
32
|
-
break;
|
|
33
|
-
default:
|
|
34
|
-
delete o[e], o[Q(e)] = r;
|
|
35
|
-
}
|
|
36
|
-
return o;
|
|
37
|
-
}, {});
|
|
38
|
-
}
|
|
39
|
-
function T(n, o, e) {
|
|
40
|
-
return e ? /* @__PURE__ */ x.createElement(n.tag, c(c({
|
|
41
|
-
key: o
|
|
42
|
-
}, k(n.attrs)), e), (n.children || []).map(function(r, t) {
|
|
43
|
-
return T(r, "".concat(o, "-").concat(n.tag, "-").concat(t));
|
|
44
|
-
})) : /* @__PURE__ */ x.createElement(n.tag, c({
|
|
45
|
-
key: o
|
|
46
|
-
}, k(n.attrs)), (n.children || []).map(function(r, t) {
|
|
47
|
-
return T(r, "".concat(o, "-").concat(n.tag, "-").concat(t));
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
function z(n) {
|
|
51
|
-
return U(n)[0];
|
|
52
|
-
}
|
|
53
|
-
function E(n) {
|
|
54
|
-
return n ? Array.isArray(n) ? n : [n] : [];
|
|
55
|
-
}
|
|
56
|
-
var X = `
|
|
57
|
-
.anticon {
|
|
58
|
-
display: inline-flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
color: inherit;
|
|
61
|
-
font-style: normal;
|
|
62
|
-
line-height: 0;
|
|
63
|
-
text-align: center;
|
|
64
|
-
text-transform: none;
|
|
65
|
-
vertical-align: -0.125em;
|
|
66
|
-
text-rendering: optimizeLegibility;
|
|
67
|
-
-webkit-font-smoothing: antialiased;
|
|
68
|
-
-moz-osx-font-smoothing: grayscale;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.anticon > * {
|
|
72
|
-
line-height: 1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.anticon svg {
|
|
76
|
-
display: inline-block;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.anticon::before {
|
|
80
|
-
display: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.anticon .anticon-icon {
|
|
84
|
-
display: block;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.anticon[tabindex] {
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.anticon-spin::before,
|
|
92
|
-
.anticon-spin {
|
|
93
|
-
display: inline-block;
|
|
94
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
95
|
-
animation: loadingCircle 1s infinite linear;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@-webkit-keyframes loadingCircle {
|
|
99
|
-
100% {
|
|
100
|
-
-webkit-transform: rotate(360deg);
|
|
101
|
-
transform: rotate(360deg);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@keyframes loadingCircle {
|
|
106
|
-
100% {
|
|
107
|
-
-webkit-transform: rotate(360deg);
|
|
108
|
-
transform: rotate(360deg);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
`, Y = function(o) {
|
|
112
|
-
var e = H(I), r = e.csp, t = e.prefixCls, i = X;
|
|
113
|
-
t && (i = i.replace(/anticon/g, t)), J(function() {
|
|
114
|
-
var l = o.current, s = M(l);
|
|
115
|
-
W(i, "@ant-design-icons", {
|
|
116
|
-
prepend: !0,
|
|
117
|
-
csp: r,
|
|
118
|
-
attachTo: s
|
|
119
|
-
});
|
|
120
|
-
}, []);
|
|
121
|
-
}, Z = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"], m = {
|
|
122
|
-
primaryColor: "#333",
|
|
123
|
-
secondaryColor: "#E6E6E6",
|
|
124
|
-
calculated: !1
|
|
125
|
-
};
|
|
126
|
-
function nn(n) {
|
|
127
|
-
var o = n.primaryColor, e = n.secondaryColor;
|
|
128
|
-
m.primaryColor = o, m.secondaryColor = e || z(o), m.calculated = !!e;
|
|
129
|
-
}
|
|
130
|
-
function on() {
|
|
131
|
-
return c({}, m);
|
|
132
|
-
}
|
|
133
|
-
var d = function(o) {
|
|
134
|
-
var e = o.icon, r = o.className, t = o.onClick, i = o.style, l = o.primaryColor, s = o.secondaryColor, y = N(o, Z), C = f.useRef(), u = m;
|
|
135
|
-
if (l && (u = {
|
|
136
|
-
primaryColor: l,
|
|
137
|
-
secondaryColor: s || z(l)
|
|
138
|
-
}), Y(C), V(_(e), "icon should be icon definiton, but got ".concat(e)), !_(e))
|
|
139
|
-
return null;
|
|
140
|
-
var a = e;
|
|
141
|
-
return a && typeof a.icon == "function" && (a = c(c({}, a), {}, {
|
|
142
|
-
icon: a.icon(u.primaryColor, u.secondaryColor)
|
|
143
|
-
})), T(a.icon, "svg-".concat(a.name), c(c({
|
|
144
|
-
className: r,
|
|
145
|
-
onClick: t,
|
|
146
|
-
style: i,
|
|
147
|
-
"data-icon": a.name,
|
|
148
|
-
width: "1em",
|
|
149
|
-
height: "1em",
|
|
150
|
-
fill: "currentColor",
|
|
151
|
-
"aria-hidden": "true"
|
|
152
|
-
}, y), {}, {
|
|
153
|
-
ref: C
|
|
154
|
-
}));
|
|
155
|
-
};
|
|
156
|
-
d.displayName = "IconReact";
|
|
157
|
-
d.getTwoToneColors = on;
|
|
158
|
-
d.setTwoToneColors = nn;
|
|
159
|
-
function $(n) {
|
|
160
|
-
var o = E(n), e = R(o, 2), r = e[0], t = e[1];
|
|
161
|
-
return d.setTwoToneColors({
|
|
162
|
-
primaryColor: r,
|
|
163
|
-
secondaryColor: t
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function en() {
|
|
167
|
-
var n = d.getTwoToneColors();
|
|
168
|
-
return n.calculated ? [n.primaryColor, n.secondaryColor] : n.primaryColor;
|
|
169
|
-
}
|
|
170
|
-
var rn = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
171
|
-
$(q.primary);
|
|
172
|
-
var v = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
173
|
-
var e = n.className, r = n.icon, t = n.spin, i = n.rotate, l = n.tabIndex, s = n.onClick, y = n.twoToneColor, C = N(n, rn), u = f.useContext(I), a = u.prefixCls, g = a === void 0 ? "anticon" : a, j = u.rootClassName, A = F(j, g, h(h({}, "".concat(g, "-").concat(r.name), !!r.name), "".concat(g, "-spin"), !!t || r.name === "loading"), e), p = l;
|
|
174
|
-
p === void 0 && s && (p = -1);
|
|
175
|
-
var P = i ? {
|
|
176
|
-
msTransform: "rotate(".concat(i, "deg)"),
|
|
177
|
-
transform: "rotate(".concat(i, "deg)")
|
|
178
|
-
} : void 0, B = E(y), w = R(B, 2), O = w[0], D = w[1];
|
|
179
|
-
return /* @__PURE__ */ f.createElement("span", G({
|
|
180
|
-
role: "img",
|
|
181
|
-
"aria-label": r.name
|
|
182
|
-
}, C, {
|
|
183
|
-
ref: o,
|
|
184
|
-
tabIndex: p,
|
|
185
|
-
onClick: s,
|
|
186
|
-
className: A
|
|
187
|
-
}), /* @__PURE__ */ f.createElement(d, {
|
|
188
|
-
icon: r,
|
|
189
|
-
primaryColor: O,
|
|
190
|
-
secondaryColor: D,
|
|
191
|
-
style: P
|
|
192
|
-
}));
|
|
193
|
-
});
|
|
194
|
-
v.displayName = "AntdIcon";
|
|
195
|
-
v.getTwoToneColor = en;
|
|
196
|
-
v.setTwoToneColor = $;
|
|
197
|
-
export {
|
|
198
|
-
v as I,
|
|
199
|
-
M as g
|
|
200
|
-
};
|