@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,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
3
|
+
import { STATE } from '../../constants';
|
|
4
|
+
|
|
5
|
+
type ButtonThemeType = "primary" | "secondary" | "tertiary";
|
|
6
|
+
export interface ButtonProps extends Omit<AntButtonProps, "type"> {
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
themeType?: ButtonThemeType;
|
|
10
|
+
state?: keyof typeof STATE;
|
|
11
|
+
isIconButton?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Button: React.FC<ButtonProps>;
|
|
14
|
+
export default Button;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { Button as n } from "./styles.js";
|
|
3
|
+
const m = ({
|
|
4
|
+
children: o,
|
|
5
|
+
onClick: a,
|
|
6
|
+
themeType: i = "primary",
|
|
7
|
+
state: t = "active",
|
|
8
|
+
...e
|
|
9
|
+
}) => /* @__PURE__ */ d(
|
|
10
|
+
n,
|
|
11
|
+
{
|
|
12
|
+
onClick: a,
|
|
13
|
+
$themeType: i,
|
|
14
|
+
$state: t === "active" || t === "disabled" ? t : "active",
|
|
15
|
+
disabled: t === "disabled" || e.disabled,
|
|
16
|
+
...e,
|
|
17
|
+
children: o
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
export {
|
|
21
|
+
m as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { v as r, s as n, a as i } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import m from "../Button.js";
|
|
4
|
+
describe("<Button />", () => {
|
|
5
|
+
let e;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
e = {
|
|
8
|
+
onClick: r.fn(),
|
|
9
|
+
themeType: "primary"
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
const t = () => i(/* @__PURE__ */ o(m, { ...e, children: "Ship it!" }));
|
|
13
|
+
it("should render the button", () => {
|
|
14
|
+
t(), expect(n.getByText("Ship it!")).toBeInTheDocument();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
2
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
3
|
+
import { TYPE } from '../../constants';
|
|
4
|
+
|
|
5
|
+
interface StyledButtonProps extends AntButtonProps {
|
|
6
|
+
theme?: GenesisTheme;
|
|
7
|
+
$themeType?: keyof typeof TYPE;
|
|
8
|
+
$state?: "active" | "hover" | "pressed" | "focus" | "disabled";
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Button: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<AntButtonProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>, "ref"> & {
|
|
12
|
+
ref?: import('react').Ref<HTMLAnchorElement | HTMLButtonElement>;
|
|
13
|
+
}, StyledButtonProps>> & string & Omit<import('react').ForwardRefExoticComponent<AntButtonProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>> & {
|
|
14
|
+
Group: import('react').FC<import('antd/es/button').ButtonGroupProps>;
|
|
15
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
16
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { B as
|
|
3
|
-
const
|
|
1
|
+
import { d as l } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { B as u } from "../../button-CDQgO1OK.js";
|
|
3
|
+
const g = ({ colors: o, sizing: d, typography: i, borderRadius: n, components: a }, r, b, t) => `
|
|
4
4
|
&.ant-btn {
|
|
5
5
|
|
|
6
|
-
color: ${o[r][
|
|
6
|
+
color: ${o[r][b].color};
|
|
7
7
|
font-size: ${d.Size4}px;
|
|
8
8
|
line-height: ${d.Size6}px;
|
|
9
9
|
letter-spacing: 0;
|
|
10
10
|
font-weight: 400;
|
|
11
11
|
border-width: 1px;
|
|
12
12
|
|
|
13
|
-
min-width: ${
|
|
13
|
+
min-width: ${t ? "auto" : "40px"};
|
|
14
14
|
height: 40px;
|
|
15
15
|
|
|
16
|
-
background-color: ${o[r][
|
|
16
|
+
background-color: ${o[r][b].backgroundColor};
|
|
17
17
|
padding-top: ${a.button.padding.verPadding}px;
|
|
18
18
|
padding-bottom: ${a.button.padding.verPadding}px;
|
|
19
19
|
padding-left: ${a.button.padding.horPadding}px;
|
|
@@ -24,7 +24,7 @@ const l = ({ colors: o, sizing: d, typography: i, borderRadius: n, components: a
|
|
|
24
24
|
|
|
25
25
|
border-width: 1px;
|
|
26
26
|
border-style: solid;
|
|
27
|
-
border-color: ${o[r][
|
|
27
|
+
border-color: ${o[r][b].borderColor};
|
|
28
28
|
|
|
29
29
|
transition: all 0.2s ease-in-out;
|
|
30
30
|
|
|
@@ -57,15 +57,15 @@ const l = ({ colors: o, sizing: d, typography: i, borderRadius: n, components: a
|
|
|
57
57
|
cursor: not-allowed;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`, s = (o, d, i, n) => `
|
|
61
61
|
&.ant-btn {
|
|
62
62
|
font-family: 'Inter', sans-serif;
|
|
63
63
|
|
|
64
|
-
${
|
|
64
|
+
${g(o, d, i, n)}
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
67
|
-
${({ theme: o,
|
|
66
|
+
`, f = l(u)`
|
|
67
|
+
${({ theme: o, $themeType: d, $state: i, children: n }) => s(o, d, i, n)}
|
|
68
68
|
`;
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
f as Button
|
|
71
71
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CheckboxProps as AntCheckboxProps } from 'antd';
|
|
3
|
-
import { TYPE, STATE } from '
|
|
3
|
+
import { TYPE, STATE } from '../../constants';
|
|
4
4
|
|
|
5
5
|
export type GenesisCheckboxType = keyof typeof TYPE;
|
|
6
6
|
export interface CheckboxProps extends AntCheckboxProps {
|
|
7
7
|
state?: keyof typeof STATE;
|
|
8
|
+
label?: string;
|
|
8
9
|
}
|
|
9
10
|
declare const Checkbox: React.FC<CheckboxProps>;
|
|
10
11
|
export default Checkbox;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { StyledCheckbox as p } from "./styles.js";
|
|
3
|
+
import { useBreakpoint as d } from "../../providers/ThemeProvider.js";
|
|
4
|
+
import { TYPE as e } from "../../constants/index.js";
|
|
5
|
+
import "../Badge/styles.js";
|
|
6
|
+
import "../Breadcrumb/styles.js";
|
|
7
|
+
import { a } from "../../Typography-aGoDUl4R.js";
|
|
8
|
+
import "../Button/styles.js";
|
|
9
|
+
import "../ErrorBoundaryFallback/styles.js";
|
|
10
|
+
import "../Input/styles.js";
|
|
11
|
+
import "../Message/styles.js";
|
|
12
|
+
import "../Notification/styles.js";
|
|
13
|
+
import "react";
|
|
14
|
+
import "../Select/styles.js";
|
|
15
|
+
import "../Toast/styles.js";
|
|
16
|
+
const j = ({
|
|
17
|
+
state: i = "active",
|
|
18
|
+
label: m,
|
|
19
|
+
...o
|
|
20
|
+
}) => {
|
|
21
|
+
d();
|
|
22
|
+
const t = e.secondary;
|
|
23
|
+
return m ? /* @__PURE__ */ r(
|
|
24
|
+
p,
|
|
25
|
+
{
|
|
26
|
+
...o,
|
|
27
|
+
disabled: i === "disabled" || o.disabled,
|
|
28
|
+
children: /* @__PURE__ */ r(a, { variant: "body1", type: t, state: i, ...o, isText: !0, children: m })
|
|
29
|
+
}
|
|
30
|
+
) : /* @__PURE__ */ r(
|
|
31
|
+
p,
|
|
32
|
+
{
|
|
33
|
+
...o,
|
|
34
|
+
disabled: i === "disabled" || o.disabled
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
j as default
|
|
40
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { d as a, i as o, a as t, s, g as r } from "
|
|
2
|
+
import { d as a, i as o, a as t, s, g as r } from "../../../setup-BvfREoHl.js";
|
|
3
3
|
import d from "../Checkbox.js";
|
|
4
4
|
a("Checkbox", () => {
|
|
5
5
|
o("renders checkbox component", () => {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CheckboxProps } from './Checkbox';
|
|
2
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
3
|
|
|
4
|
+
declare module 'styled-components' {
|
|
5
|
+
interface DefaultTheme extends GenesisTheme {
|
|
6
|
+
}
|
|
7
|
+
}
|
|
3
8
|
export declare const getGenesisClass: ({ colors, borderRadius }: {
|
|
4
9
|
colors: any;
|
|
5
10
|
borderRadius: any;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { d as re } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import X, { forwardRef as ne, useRef as L, useImperativeHandle as oe } from "react";
|
|
4
|
+
import { e as ae, f as ce, c as F, h as G, a as te, _ as T } from "../../warning-C63HNL9U.js";
|
|
5
|
+
import { u as le, o as ie } from "../../isVisible-A-IfeFoT.js";
|
|
6
|
+
import { w as W, g as se, m as de, o as z, p as ue, q, C as K, D as be, t as fe, v as he, x as H } from "../../index-oK7z6jnz.js";
|
|
7
|
+
import { T as pe, W as xe } from "../../index-1CBpubM3.js";
|
|
8
|
+
import { F as Ce, u as U } from "../../context-BMW3aJEf.js";
|
|
9
|
+
var me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], ge = /* @__PURE__ */ ne(function(e, r) {
|
|
10
|
+
var n = e.prefixCls, o = n === void 0 ? "rc-checkbox" : n, s = e.className, C = e.style, $ = e.checked, h = e.disabled, O = e.defaultChecked, y = O === void 0 ? !1 : O, d = e.type, S = d === void 0 ? "checkbox" : d, P = e.title, l = e.onChange, E = ae(e, me), m = L(null), u = L(null), a = le(y, {
|
|
10
11
|
value: $
|
|
11
12
|
}), _ = ce(a, 2), N = _[0], A = _[1];
|
|
12
|
-
|
|
13
|
+
oe(r, function() {
|
|
13
14
|
return {
|
|
14
15
|
focus: function(i) {
|
|
15
16
|
var f;
|
|
@@ -23,9 +24,9 @@ var ge = ["prefixCls", "className", "style", "checked", "disabled", "defaultChec
|
|
|
23
24
|
nativeElement: u.current
|
|
24
25
|
};
|
|
25
26
|
});
|
|
26
|
-
var b =
|
|
27
|
+
var b = F(o, s, G(G({}, "".concat(o, "-checked"), N), "".concat(o, "-disabled"), h)), p = function(i) {
|
|
27
28
|
h || ("checked" in e || A(i.target.checked), l == null || l({
|
|
28
|
-
target:
|
|
29
|
+
target: T(T({}, e), {}, {
|
|
29
30
|
type: S,
|
|
30
31
|
checked: i.target.checked
|
|
31
32
|
}),
|
|
@@ -38,24 +39,24 @@ var ge = ["prefixCls", "className", "style", "checked", "disabled", "defaultChec
|
|
|
38
39
|
nativeEvent: i.nativeEvent
|
|
39
40
|
}));
|
|
40
41
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
42
43
|
className: b,
|
|
43
44
|
title: P,
|
|
44
45
|
style: C,
|
|
45
46
|
ref: u
|
|
46
|
-
}, /* @__PURE__ */
|
|
47
|
+
}, /* @__PURE__ */ t.createElement("input", te({}, E, {
|
|
47
48
|
className: "".concat(o, "-input"),
|
|
48
49
|
ref: m,
|
|
49
50
|
onChange: p,
|
|
50
51
|
disabled: h,
|
|
51
52
|
checked: !!N,
|
|
52
53
|
type: S
|
|
53
|
-
})), /* @__PURE__ */
|
|
54
|
+
})), /* @__PURE__ */ t.createElement("span", {
|
|
54
55
|
className: "".concat(o, "-inner")
|
|
55
56
|
}));
|
|
56
57
|
});
|
|
57
|
-
function
|
|
58
|
-
const r =
|
|
58
|
+
function ke(e) {
|
|
59
|
+
const r = X.useRef(null), n = () => {
|
|
59
60
|
W.cancel(r.current), r.current = null;
|
|
60
61
|
};
|
|
61
62
|
return [() => {
|
|
@@ -66,7 +67,7 @@ function ve(e) {
|
|
|
66
67
|
r.current && (C.stopPropagation(), n()), e == null || e(C);
|
|
67
68
|
}];
|
|
68
69
|
}
|
|
69
|
-
const
|
|
70
|
+
const ve = (e) => {
|
|
70
71
|
const {
|
|
71
72
|
checkboxCls: r
|
|
72
73
|
} = e, n = `${r}-wrapper`;
|
|
@@ -74,7 +75,7 @@ const $e = (e) => {
|
|
|
74
75
|
// ===================== Basic =====================
|
|
75
76
|
{
|
|
76
77
|
// Group
|
|
77
|
-
[`${r}-group`]: Object.assign(Object.assign({},
|
|
78
|
+
[`${r}-group`]: Object.assign(Object.assign({}, z(e)), {
|
|
78
79
|
display: "inline-flex",
|
|
79
80
|
flexWrap: "wrap",
|
|
80
81
|
columnGap: e.marginXS,
|
|
@@ -84,7 +85,7 @@ const $e = (e) => {
|
|
|
84
85
|
}
|
|
85
86
|
}),
|
|
86
87
|
// Wrapper
|
|
87
|
-
[n]: Object.assign(Object.assign({},
|
|
88
|
+
[n]: Object.assign(Object.assign({}, z(e)), {
|
|
88
89
|
display: "inline-flex",
|
|
89
90
|
alignItems: "baseline",
|
|
90
91
|
cursor: "pointer",
|
|
@@ -109,7 +110,7 @@ const $e = (e) => {
|
|
|
109
110
|
}
|
|
110
111
|
}),
|
|
111
112
|
// Wrapper > Checkbox
|
|
112
|
-
[r]: Object.assign(Object.assign({},
|
|
113
|
+
[r]: Object.assign(Object.assign({}, z(e)), {
|
|
113
114
|
position: "relative",
|
|
114
115
|
whiteSpace: "nowrap",
|
|
115
116
|
lineHeight: 1,
|
|
@@ -129,7 +130,7 @@ const $e = (e) => {
|
|
|
129
130
|
cursor: "pointer",
|
|
130
131
|
opacity: 0,
|
|
131
132
|
margin: 0,
|
|
132
|
-
[`&:focus-visible + ${r}-inner`]: Object.assign({},
|
|
133
|
+
[`&:focus-visible + ${r}-inner`]: Object.assign({}, ue(e))
|
|
133
134
|
},
|
|
134
135
|
// Wrapper > Checkbox > inner
|
|
135
136
|
[`${r}-inner`]: {
|
|
@@ -276,27 +277,27 @@ const $e = (e) => {
|
|
|
276
277
|
}
|
|
277
278
|
];
|
|
278
279
|
};
|
|
279
|
-
function
|
|
280
|
-
const n =
|
|
280
|
+
function $e(e, r) {
|
|
281
|
+
const n = de(r, {
|
|
281
282
|
checkboxCls: `.${e}`,
|
|
282
283
|
checkboxSize: r.controlInteractiveSize
|
|
283
284
|
});
|
|
284
|
-
return [
|
|
285
|
+
return [ve(n)];
|
|
285
286
|
}
|
|
286
|
-
const
|
|
287
|
+
const J = se("Checkbox", (e, r) => {
|
|
287
288
|
let {
|
|
288
289
|
prefixCls: n
|
|
289
290
|
} = r;
|
|
290
|
-
return [
|
|
291
|
-
}),
|
|
292
|
-
var
|
|
291
|
+
return [$e(n, e)];
|
|
292
|
+
}), Q = /* @__PURE__ */ X.createContext(null);
|
|
293
|
+
var ye = function(e, r) {
|
|
293
294
|
var n = {};
|
|
294
295
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
295
296
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, o = Object.getOwnPropertySymbols(e); s < o.length; s++)
|
|
296
297
|
r.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[s]) && (n[o[s]] = e[o[s]]);
|
|
297
298
|
return n;
|
|
298
299
|
};
|
|
299
|
-
const
|
|
300
|
+
const Se = (e, r) => {
|
|
300
301
|
var n;
|
|
301
302
|
const {
|
|
302
303
|
prefixCls: o,
|
|
@@ -309,67 +310,67 @@ const Ae = (e, r) => {
|
|
|
309
310
|
onMouseLeave: d,
|
|
310
311
|
skipGroup: S = !1,
|
|
311
312
|
disabled: P
|
|
312
|
-
} = e, l =
|
|
313
|
+
} = e, l = ye(e, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]), {
|
|
313
314
|
getPrefixCls: E,
|
|
314
315
|
direction: m,
|
|
315
316
|
checkbox: u
|
|
316
|
-
} =
|
|
317
|
+
} = t.useContext(K), a = t.useContext(Q), {
|
|
317
318
|
isFormItemInput: _
|
|
318
|
-
} =
|
|
319
|
+
} = t.useContext(Ce), N = t.useContext(be), A = (n = (a == null ? void 0 : a.disabled) || P) !== null && n !== void 0 ? n : N, b = t.useRef(l.value), p = t.useRef(null), w = fe(r, p);
|
|
319
320
|
if (process.env.NODE_ENV !== "production") {
|
|
320
|
-
const x =
|
|
321
|
+
const x = he("Checkbox");
|
|
321
322
|
process.env.NODE_ENV !== "production" && x("checked" in l || !!a || !("value" in l), "usage", "`value` is not a valid prop, do you mean `checked`?");
|
|
322
323
|
}
|
|
323
|
-
|
|
324
|
+
t.useEffect(() => {
|
|
324
325
|
a == null || a.registerValue(l.value);
|
|
325
|
-
}, []),
|
|
326
|
+
}, []), t.useEffect(() => {
|
|
326
327
|
if (!S)
|
|
327
328
|
return l.value !== b.current && (a == null || a.cancelValue(b.current), a == null || a.registerValue(l.value), b.current = l.value), () => a == null ? void 0 : a.cancelValue(l.value);
|
|
328
|
-
}, [l.value]),
|
|
329
|
+
}, [l.value]), t.useEffect(() => {
|
|
329
330
|
var x;
|
|
330
331
|
!((x = p.current) === null || x === void 0) && x.input && (p.current.input.indeterminate = h);
|
|
331
332
|
}, [h]);
|
|
332
|
-
const i = E("checkbox", o), f =
|
|
333
|
+
const i = E("checkbox", o), f = U(i), [V, R, j] = J(i, f), g = Object.assign({}, l);
|
|
333
334
|
a && !S && (g.onChange = function() {
|
|
334
335
|
l.onChange && l.onChange.apply(l, arguments), a.toggleOption && a.toggleOption({
|
|
335
336
|
label: $,
|
|
336
337
|
value: l.value
|
|
337
338
|
});
|
|
338
339
|
}, g.name = a.name, g.checked = a.value.includes(l.value));
|
|
339
|
-
const
|
|
340
|
+
const D = F(`${i}-wrapper`, {
|
|
340
341
|
[`${i}-rtl`]: m === "rtl",
|
|
341
342
|
[`${i}-wrapper-checked`]: g.checked,
|
|
342
343
|
[`${i}-wrapper-disabled`]: A,
|
|
343
344
|
[`${i}-wrapper-in-form-item`]: _
|
|
344
|
-
}, u == null ? void 0 : u.className, s, C,
|
|
345
|
+
}, u == null ? void 0 : u.className, s, C, j, f, R), c = F({
|
|
345
346
|
[`${i}-indeterminate`]: h
|
|
346
|
-
},
|
|
347
|
-
return
|
|
347
|
+
}, pe, R), [k, v] = ke(g.onClick);
|
|
348
|
+
return V(/* @__PURE__ */ t.createElement(xe, {
|
|
348
349
|
component: "Checkbox",
|
|
349
350
|
disabled: A
|
|
350
|
-
}, /* @__PURE__ */
|
|
351
|
-
className:
|
|
351
|
+
}, /* @__PURE__ */ t.createElement("label", {
|
|
352
|
+
className: D,
|
|
352
353
|
style: Object.assign(Object.assign({}, u == null ? void 0 : u.style), O),
|
|
353
354
|
onMouseEnter: y,
|
|
354
355
|
onMouseLeave: d,
|
|
355
356
|
onClick: k
|
|
356
|
-
}, /* @__PURE__ */
|
|
357
|
+
}, /* @__PURE__ */ t.createElement(ge, Object.assign({}, g, {
|
|
357
358
|
onClick: v,
|
|
358
359
|
prefixCls: i,
|
|
359
|
-
className:
|
|
360
|
+
className: c,
|
|
360
361
|
disabled: A,
|
|
361
362
|
ref: w
|
|
362
|
-
})), $ !== void 0 && /* @__PURE__ */
|
|
363
|
-
},
|
|
364
|
-
process.env.NODE_ENV !== "production" && (
|
|
365
|
-
var
|
|
363
|
+
})), $ !== void 0 && /* @__PURE__ */ t.createElement("span", null, $))));
|
|
364
|
+
}, M = /* @__PURE__ */ t.forwardRef(Se);
|
|
365
|
+
process.env.NODE_ENV !== "production" && (M.displayName = "Checkbox");
|
|
366
|
+
var Ae = function(e, r) {
|
|
366
367
|
var n = {};
|
|
367
368
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
368
369
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, o = Object.getOwnPropertySymbols(e); s < o.length; s++)
|
|
369
370
|
r.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[s]) && (n[o[s]] = e[o[s]]);
|
|
370
371
|
return n;
|
|
371
372
|
};
|
|
372
|
-
const
|
|
373
|
+
const we = /* @__PURE__ */ t.forwardRef((e, r) => {
|
|
373
374
|
const {
|
|
374
375
|
defaultValue: n,
|
|
375
376
|
children: o,
|
|
@@ -379,39 +380,39 @@ const Oe = /* @__PURE__ */ c.forwardRef((e, r) => {
|
|
|
379
380
|
rootClassName: h,
|
|
380
381
|
style: O,
|
|
381
382
|
onChange: y
|
|
382
|
-
} = e, d =
|
|
383
|
+
} = e, d = Ae(e, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]), {
|
|
383
384
|
getPrefixCls: S,
|
|
384
385
|
direction: P
|
|
385
|
-
} =
|
|
386
|
-
|
|
386
|
+
} = t.useContext(K), [l, E] = t.useState(d.value || n || []), [m, u] = t.useState([]);
|
|
387
|
+
t.useEffect(() => {
|
|
387
388
|
"value" in d && E(d.value || []);
|
|
388
389
|
}, [d.value]);
|
|
389
|
-
const a =
|
|
390
|
-
label:
|
|
391
|
-
value:
|
|
392
|
-
} :
|
|
393
|
-
u((k) => k.filter((v) => v !==
|
|
394
|
-
}, N = (
|
|
395
|
-
u((k) => [].concat(
|
|
396
|
-
}, A = (
|
|
397
|
-
const k = l.indexOf(
|
|
398
|
-
k === -1 ? v.push(
|
|
399
|
-
const
|
|
400
|
-
return
|
|
390
|
+
const a = t.useMemo(() => s.map((c) => typeof c == "string" || typeof c == "number" ? {
|
|
391
|
+
label: c,
|
|
392
|
+
value: c
|
|
393
|
+
} : c), [s]), _ = (c) => {
|
|
394
|
+
u((k) => k.filter((v) => v !== c));
|
|
395
|
+
}, N = (c) => {
|
|
396
|
+
u((k) => [].concat(H(k), [c]));
|
|
397
|
+
}, A = (c) => {
|
|
398
|
+
const k = l.indexOf(c.value), v = H(l);
|
|
399
|
+
k === -1 ? v.push(c.value) : v.splice(k, 1), "value" in d || E(v), y == null || y(v.filter((x) => m.includes(x)).sort((x, Y) => {
|
|
400
|
+
const Z = a.findIndex((B) => B.value === x), ee = a.findIndex((B) => B.value === Y);
|
|
401
|
+
return Z - ee;
|
|
401
402
|
}));
|
|
402
|
-
}, b = S("checkbox", C), p = `${b}-group`, w =
|
|
403
|
+
}, b = S("checkbox", C), p = `${b}-group`, w = U(b), [i, f, V] = J(b, w), R = ie(d, ["value", "disabled"]), j = s.length ? a.map((c) => /* @__PURE__ */ t.createElement(M, {
|
|
403
404
|
prefixCls: b,
|
|
404
|
-
key:
|
|
405
|
-
disabled: "disabled" in
|
|
406
|
-
value:
|
|
407
|
-
checked: l.includes(
|
|
408
|
-
onChange:
|
|
405
|
+
key: c.value.toString(),
|
|
406
|
+
disabled: "disabled" in c ? c.disabled : d.disabled,
|
|
407
|
+
value: c.value,
|
|
408
|
+
checked: l.includes(c.value),
|
|
409
|
+
onChange: c.onChange,
|
|
409
410
|
className: `${p}-item`,
|
|
410
|
-
style:
|
|
411
|
-
title:
|
|
412
|
-
id:
|
|
413
|
-
required:
|
|
414
|
-
},
|
|
411
|
+
style: c.style,
|
|
412
|
+
title: c.title,
|
|
413
|
+
id: c.id,
|
|
414
|
+
required: c.required
|
|
415
|
+
}, c.label)) : o, g = {
|
|
415
416
|
toggleOption: A,
|
|
416
417
|
value: l,
|
|
417
418
|
disabled: d.disabled,
|
|
@@ -419,22 +420,22 @@ const Oe = /* @__PURE__ */ c.forwardRef((e, r) => {
|
|
|
419
420
|
// https://github.com/ant-design/ant-design/issues/16376
|
|
420
421
|
registerValue: N,
|
|
421
422
|
cancelValue: _
|
|
422
|
-
},
|
|
423
|
+
}, D = F(p, {
|
|
423
424
|
[`${p}-rtl`]: P === "rtl"
|
|
424
|
-
}, $, h,
|
|
425
|
-
return i(/* @__PURE__ */
|
|
426
|
-
className:
|
|
425
|
+
}, $, h, V, w, f);
|
|
426
|
+
return i(/* @__PURE__ */ t.createElement("div", Object.assign({
|
|
427
|
+
className: D,
|
|
427
428
|
style: O
|
|
428
|
-
},
|
|
429
|
+
}, R, {
|
|
429
430
|
ref: r
|
|
430
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ t.createElement(Q.Provider, {
|
|
431
432
|
value: g
|
|
432
|
-
},
|
|
433
|
-
}),
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
process.env.NODE_ENV !== "production" && (
|
|
437
|
-
const
|
|
433
|
+
}, j)));
|
|
434
|
+
}), I = M;
|
|
435
|
+
I.Group = we;
|
|
436
|
+
I.__ANT_CHECKBOX = !0;
|
|
437
|
+
process.env.NODE_ENV !== "production" && (I.displayName = "Checkbox");
|
|
438
|
+
const Oe = ({ colors: e, borderRadius: r }, n = "primary", o = "active") => `
|
|
438
439
|
.ant-checkbox-inner {
|
|
439
440
|
background-color: #FFFFFF;
|
|
440
441
|
border-color: #9A9A9A;
|
|
@@ -529,13 +530,13 @@ const R = "#384DF6", Ee = ({ colors: e, borderRadius: r }, n = "primary", o = "a
|
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
532
|
-
background-color: ${
|
|
533
|
-
border-color: ${
|
|
533
|
+
background-color: ${e.inputs.surface.checked};
|
|
534
|
+
border-color: ${e.inputs.surface.checked};
|
|
534
535
|
}
|
|
535
536
|
|
|
536
537
|
&:hover .ant-checkbox-checked .ant-checkbox-inner {
|
|
537
|
-
background-color: ${
|
|
538
|
-
border-color: ${
|
|
538
|
+
background-color: ${e.inputs.surface.checked};
|
|
539
|
+
border-color: ${e.inputs.surface.checked};
|
|
539
540
|
}
|
|
540
541
|
|
|
541
542
|
&:hover .ant-checkbox-checked .ant-checkbox-inner::after {
|
|
@@ -573,10 +574,10 @@ const R = "#384DF6", Ee = ({ colors: e, borderRadius: r }, n = "primary", o = "a
|
|
|
573
574
|
border-color: #9A9A9A;
|
|
574
575
|
transition: box-shadow 0.2s ease-in-out;
|
|
575
576
|
}
|
|
576
|
-
`, Ve =
|
|
577
|
-
${({ theme: e, type: r, state: n }) =>
|
|
577
|
+
`, Ve = re(I)`
|
|
578
|
+
${({ theme: e, type: r, state: n }) => Oe(e, r, n)}
|
|
578
579
|
`;
|
|
579
580
|
export {
|
|
580
581
|
Ve as StyledCheckbox,
|
|
581
|
-
|
|
582
|
+
Oe as getGenesisClass
|
|
582
583
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ErrorBoundaryFallbackProps {
|
|
2
|
+
error?: Error | null;
|
|
3
|
+
componentStack?: string | null;
|
|
4
|
+
eventId: string | null;
|
|
5
|
+
resetError: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ErrorBoundaryFallback: (props: ErrorBoundaryFallbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ErrorBoundaryFallback;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { StyledErrorBoundaryFallback as a } from "./styles.js";
|
|
3
|
+
import "../Badge/styles.js";
|
|
4
|
+
import "../Breadcrumb/styles.js";
|
|
5
|
+
import "../../providers/ThemeProvider.js";
|
|
6
|
+
import { a as t } from "../../Typography-aGoDUl4R.js";
|
|
7
|
+
import i from "../Button/Button.js";
|
|
8
|
+
import "../Checkbox/styles.js";
|
|
9
|
+
import "../Input/styles.js";
|
|
10
|
+
import "../Message/styles.js";
|
|
11
|
+
import "../Notification/styles.js";
|
|
12
|
+
import "react";
|
|
13
|
+
import "../Select/styles.js";
|
|
14
|
+
import "../Toast/styles.js";
|
|
15
|
+
import { S as n } from "../../index-BZAhCB_K.js";
|
|
16
|
+
const S = (e) => {
|
|
17
|
+
const m = () => window.location.href = "/";
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
status: "500",
|
|
22
|
+
title: "Sorry, It looks like we're having some internal issues.",
|
|
23
|
+
subTitle: /* @__PURE__ */ o(n, { direction: "vertical", children: [
|
|
24
|
+
/* @__PURE__ */ r(t, { themeType: "secondary", children: "Our team has been notified. If this issue persist contact customer service." }),
|
|
25
|
+
/* @__PURE__ */ o(t, { themeType: "secondary", children: [
|
|
26
|
+
"(reference: ",
|
|
27
|
+
e.eventId,
|
|
28
|
+
")"
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
extra: [
|
|
32
|
+
/* @__PURE__ */ r(i, { themeType: "secondary", onClick: e.resetError, children: "Try again" }, "reset"),
|
|
33
|
+
/* @__PURE__ */ r(i, { onClick: m, children: "Take me home" }, "back-home")
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
S as default
|
|
40
|
+
};
|