@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 { STATE, SIZE } from '../../constants';
|
|
2
|
+
|
|
3
|
+
export interface ToastProps {
|
|
4
|
+
state: keyof typeof STATE;
|
|
5
|
+
message: string;
|
|
6
|
+
action?: {
|
|
7
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
close?: () => void;
|
|
11
|
+
size?: keyof typeof SIZE;
|
|
12
|
+
}
|
|
13
|
+
declare const Toast: ({ state, message, action, close, size, }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Toast;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../constants/index.js";
|
|
3
|
+
import "../Badge/styles.js";
|
|
4
|
+
import "../Breadcrumb/styles.js";
|
|
5
|
+
import "../../providers/ThemeProvider.js";
|
|
6
|
+
import { T as g } from "../../Typography-aGoDUl4R.js";
|
|
7
|
+
import "../Button/styles.js";
|
|
8
|
+
import "../Checkbox/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 "./styles.js";
|
|
16
|
+
import "../../CloseOutlined-ClXDNn82.js";
|
|
17
|
+
export {
|
|
18
|
+
g as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Toast } from '../Toast';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Toast>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Toast>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const ShowToast: Story;
|
|
9
|
+
export declare const SuccessMessage: Story;
|
|
10
|
+
export declare const ErrorMessage: Story;
|
|
11
|
+
export declare const InfoMessage: Story;
|
|
12
|
+
export declare const WarningMessage: Story;
|
|
13
|
+
export declare const GenericMessage: Story;
|
|
14
|
+
export declare const LongWarningMessage: Story;
|
|
15
|
+
export declare const NoAction: Story;
|
|
16
|
+
export declare const NoActionAndNoClose: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { v as m, a as n } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import { T as a } from "../../../Typography-aGoDUl4R.js";
|
|
4
|
+
describe("<Toast />", () => {
|
|
5
|
+
let e;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
e = {
|
|
8
|
+
message: "Test message",
|
|
9
|
+
state: "info",
|
|
10
|
+
close: m.fn()
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
const s = () => n(/* @__PURE__ */ r(a, { ...e }));
|
|
14
|
+
it("should render message correctly", () => {
|
|
15
|
+
const { getByText: o } = s(), t = o("Test message");
|
|
16
|
+
expect(t).toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ToastRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
state: string;
|
|
3
|
+
size: string;
|
|
4
|
+
}>> & string;
|
|
5
|
+
export declare const ToastActionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
6
|
+
export declare const ToastCloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
7
|
+
export declare const ToastContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
8
|
+
state: string;
|
|
9
|
+
size: string;
|
|
10
|
+
}>> & string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { d as e } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { SIZE as r } from "../../constants/index.js";
|
|
3
|
+
const d = e.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: ${({ theme: t }) => t.sizing.Size4}px;
|
|
7
|
+
padding: ${({ theme: t }) => t.sizing.Size3}px;
|
|
8
|
+
background-color: ${({ theme: t, state: o }) => t.colors.surface.default};
|
|
9
|
+
border-left: ${({ theme: t, state: o }) => `2px solid ${t.colors.status[o].default}`};
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
cursor: default;
|
|
12
|
+
border-radius: ${({ theme: t }) => t.borderRadius.BorderRadiusXs}px;
|
|
13
|
+
height: 56px;
|
|
14
|
+
width: ${({ theme: t, state: o, size: i }) => i === "standard" ? "340px" : "240px"};
|
|
15
|
+
background-color: ${({ theme: t, state: o }) => t.colors.surface.default};
|
|
16
|
+
box-shadow: 0px 4px 16px 0px #00000026;
|
|
17
|
+
`, s = e.button`
|
|
18
|
+
border: ${({ theme: t }) => `1px solid ${t.colors.interactive.utility.border}`};
|
|
19
|
+
background: none;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
pointer-events: all;
|
|
22
|
+
color: ${({ theme: t }) => t.colors.interactive.utility.onsurface};
|
|
23
|
+
border-radius: ${({ theme: t }) => t.borderRadius.BorderRadiusSm}px;
|
|
24
|
+
padding: ${({ theme: t }) => `${t.components.utilityButton.padding.verPadding}px ${t.components.utilityButton.padding.horPadding}px`};
|
|
25
|
+
`, p = e.button`
|
|
26
|
+
text-decoration: underline;
|
|
27
|
+
border: none;
|
|
28
|
+
background: none;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
pointer-events: all;
|
|
31
|
+
`, l = e.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: ${({ theme: t }) => t.sizing.Size2}px;
|
|
35
|
+
flex: 1;
|
|
36
|
+
max-width: ${({ theme: t, state: o, size: i }) => i === "standard" ? "340px" : "240px"};
|
|
37
|
+
|
|
38
|
+
.ant-typography {
|
|
39
|
+
display: -webkit-box;
|
|
40
|
+
-webkit-line-clamp: 3;
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
font-family: ${({ theme: t }) => t.typography.fontFamily};
|
|
46
|
+
line-height: ${({ theme: t, size: o }) => o === r.standard ? t.typography.lineHeight : "16px"};
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
export {
|
|
50
|
+
s as ToastActionButton,
|
|
51
|
+
p as ToastCloseButton,
|
|
52
|
+
l as ToastContent,
|
|
53
|
+
d as ToastRow
|
|
54
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TYPE, TYPOGRAPHY_VARIANT, STATE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5;
|
|
5
|
+
export interface TypographyProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
variant?: keyof typeof TYPOGRAPHY_VARIANT;
|
|
8
|
+
themeType?: keyof typeof TYPE;
|
|
9
|
+
state?: keyof typeof STATE;
|
|
10
|
+
color?: string;
|
|
11
|
+
level?: HeadingLevel;
|
|
12
|
+
isText?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Typography: ({ children, themeType, variant, state, color, isText, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Typography;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { d as a, i, c, a as p, g as m, s as n } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import { a as y } from "../../../Typography-aGoDUl4R.js";
|
|
4
|
+
import { TYPE as d, TYPOGRAPHY_VARIANT as f } from "../../../constants/index.js";
|
|
5
|
+
a("Typography", () => {
|
|
6
|
+
i("renders type and variant correctly", () => {
|
|
7
|
+
const e = Object.keys(d), s = Object.keys(f);
|
|
8
|
+
e.forEach((t) => {
|
|
9
|
+
s.forEach((r) => {
|
|
10
|
+
c(), p(
|
|
11
|
+
/* @__PURE__ */ o(
|
|
12
|
+
y,
|
|
13
|
+
{
|
|
14
|
+
themeType: t,
|
|
15
|
+
variant: r,
|
|
16
|
+
children: "Logistics, Simplified."
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
), m(n.getByText("Logistics, Simplified.")).toBeInTheDocument();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
import { TYPE, STATE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
interface TypographyStyledProps {
|
|
5
|
+
theme: GenesisTheme;
|
|
6
|
+
$themeType?: keyof typeof TYPE;
|
|
7
|
+
variant?: string;
|
|
8
|
+
state?: keyof typeof STATE;
|
|
9
|
+
breakpoint?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Headline: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd/es/typography/Title').TitleProps & import('react').RefAttributes<HTMLElement>, "ref"> & {
|
|
13
|
+
ref?: import('react').Ref<HTMLElement>;
|
|
14
|
+
}, TypographyStyledProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd/es/typography/Title').TitleProps & import('react').RefAttributes<HTMLElement>>, keyof import('react').Component<any, {}, any>>;
|
|
15
|
+
export declare const Paragraph: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd/es/typography/Paragraph').ParagraphProps & import('react').RefAttributes<HTMLElement>, "ref"> & {
|
|
16
|
+
ref?: import('react').Ref<HTMLElement>;
|
|
17
|
+
}, TypographyStyledProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd/es/typography/Paragraph').ParagraphProps & import('react').RefAttributes<HTMLElement>>, keyof import('react').Component<any, {}, any>>;
|
|
18
|
+
export declare const Text: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd/es/typography/Text').TextProps & import('react').RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
19
|
+
ref?: import('react').Ref<HTMLSpanElement>;
|
|
20
|
+
}, TypographyStyledProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd/es/typography/Text').TextProps & import('react').RefAttributes<HTMLSpanElement>>, keyof import('react').Component<any, {}, any>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { d as i } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { T as a } from "../../index-C0SmxWLS.js";
|
|
3
|
+
const l = (t, e, n) => `
|
|
4
|
+
font-size: ${t[n][e].fontSize}px !important;
|
|
5
|
+
line-height: ${t[n][e].lineHeight};
|
|
6
|
+
letter-spacing: ${t[n][e].letterSpacing}px;
|
|
7
|
+
font-weight: ${t[n][e].fontWeight};
|
|
8
|
+
`, f = (t, e, n) => t || e[n].active.color, $ = (t) => `
|
|
9
|
+
${t.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
10
|
+
`, g = ({ colors: t, typography: e }, n, o, s, r, c) => `
|
|
11
|
+
&.ant-typography {
|
|
12
|
+
font-family: ${$(o)};
|
|
13
|
+
color: ${f(c, t, n)} !important;
|
|
14
|
+
${l(e, o, r)}
|
|
15
|
+
}
|
|
16
|
+
`, u = i(a.Title)`
|
|
17
|
+
${({ theme: t, $themeType: e, variant: n, state: o, breakpoint: s, color: r }) => g(
|
|
18
|
+
t,
|
|
19
|
+
e,
|
|
20
|
+
n,
|
|
21
|
+
o,
|
|
22
|
+
s,
|
|
23
|
+
r
|
|
24
|
+
)}
|
|
25
|
+
`, h = i(a.Paragraph)`
|
|
26
|
+
${({ theme: t, $themeType: e, variant: n, state: o, breakpoint: s, color: r }) => g(
|
|
27
|
+
t,
|
|
28
|
+
e,
|
|
29
|
+
n,
|
|
30
|
+
o,
|
|
31
|
+
s,
|
|
32
|
+
r
|
|
33
|
+
)}
|
|
34
|
+
`, T = i(a.Text)`
|
|
35
|
+
${({ theme: t, $themeType: e, variant: n, state: o, breakpoint: s, color: r }) => g(
|
|
36
|
+
t,
|
|
37
|
+
e,
|
|
38
|
+
n,
|
|
39
|
+
o,
|
|
40
|
+
s,
|
|
41
|
+
r
|
|
42
|
+
)}
|
|
43
|
+
`;
|
|
44
|
+
export {
|
|
45
|
+
u as Headline,
|
|
46
|
+
h as Paragraph,
|
|
47
|
+
T as Text
|
|
48
|
+
};
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export type {
|
|
3
|
-
export { default as
|
|
4
|
-
export type {
|
|
5
|
-
export { default as
|
|
6
|
-
export type {
|
|
7
|
-
export { default as Checkbox } from './
|
|
8
|
-
export type { CheckboxProps } from './
|
|
9
|
-
export { default as
|
|
10
|
-
export type {
|
|
11
|
-
export { default as Form } from './
|
|
12
|
-
export type { FormProps } from './
|
|
13
|
-
export { default as
|
|
14
|
-
export type {
|
|
1
|
+
export { default as Badge } from './Badge';
|
|
2
|
+
export type { BadgeProps } from './Badge';
|
|
3
|
+
export { default as Breadcrumb } from './Breadcrumb';
|
|
4
|
+
export type { BreadcrumbProps } from './Breadcrumb';
|
|
5
|
+
export { default as Button } from './Button';
|
|
6
|
+
export type { ButtonProps } from './Button';
|
|
7
|
+
export { default as Checkbox } from './Checkbox';
|
|
8
|
+
export type { CheckboxProps } from './Checkbox';
|
|
9
|
+
export { default as ErrorBoundaryFallback } from './ErrorBoundaryFallback';
|
|
10
|
+
export type { ErrorBoundaryFallbackProps } from './ErrorBoundaryFallback';
|
|
11
|
+
export { default as Form } from './Form';
|
|
12
|
+
export type { FormProps } from './Form';
|
|
13
|
+
export { default as Input } from './Input';
|
|
14
|
+
export type { InputProps } from './Input';
|
|
15
|
+
export { default as Message } from './Message';
|
|
16
|
+
export type { MessageProps } from './Message';
|
|
17
|
+
export { default as Notification } from './Notification';
|
|
18
|
+
export type { NotificationProps } from './Notification';
|
|
19
|
+
export { default as RadioGroup } from './Radio';
|
|
20
|
+
export type { RadioGroupProps } from './Radio';
|
|
21
|
+
export { default as Select } from './Select';
|
|
22
|
+
export type { SelectProps } from './Select';
|
|
23
|
+
export { default as Toast } from './Toast';
|
|
24
|
+
export type { ToastProps } from './Toast';
|
|
25
|
+
export { default as Typography } from './Typography';
|
|
26
|
+
export type { TypographyProps } from './Typography';
|
package/dist/components/index.js
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as u } from "./
|
|
5
|
-
import { default as
|
|
6
|
-
import { F as
|
|
7
|
-
import { default as
|
|
1
|
+
import { default as r } from "./Badge/Badge.js";
|
|
2
|
+
import { default as t } from "./Breadcrumb/Breadcrumb.js";
|
|
3
|
+
import { default as s } from "./Button/Button.js";
|
|
4
|
+
import { default as u } from "./Checkbox/Checkbox.js";
|
|
5
|
+
import { default as l } from "./ErrorBoundaryFallback/ErrorBoundaryFallback.js";
|
|
6
|
+
import { F as x, T as c, a as i } from "../Typography-aGoDUl4R.js";
|
|
7
|
+
import { default as B } from "./Input/Input.js";
|
|
8
|
+
import { default as g } from "./Message/Message.js";
|
|
9
|
+
import { default as F } from "./Notification/Notification.js";
|
|
10
|
+
import { default as h } from "./Radio/RadioGroup.js";
|
|
11
|
+
import { default as C } from "./Select/Select.js";
|
|
8
12
|
export {
|
|
9
|
-
|
|
13
|
+
r as Badge,
|
|
14
|
+
t as Breadcrumb,
|
|
15
|
+
s as Button,
|
|
10
16
|
u as Checkbox,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
l as ErrorBoundaryFallback,
|
|
18
|
+
x as Form,
|
|
19
|
+
B as Input,
|
|
20
|
+
g as Message,
|
|
21
|
+
F as Notification,
|
|
22
|
+
h as RadioGroup,
|
|
23
|
+
C as Select,
|
|
24
|
+
c as Toast,
|
|
25
|
+
i as Typography
|
|
16
26
|
};
|
|
@@ -14,6 +14,14 @@ export declare const STATE: {
|
|
|
14
14
|
pressed: string;
|
|
15
15
|
focussed: string;
|
|
16
16
|
disabled: string;
|
|
17
|
+
error: string;
|
|
18
|
+
success: string;
|
|
19
|
+
warning: string;
|
|
20
|
+
progress: string;
|
|
21
|
+
info: string;
|
|
22
|
+
filled: string;
|
|
23
|
+
generic: string;
|
|
24
|
+
removed: string;
|
|
17
25
|
};
|
|
18
26
|
export declare const TYPOGRAPHY_VARIANT: {
|
|
19
27
|
display1: string;
|
|
@@ -49,3 +57,99 @@ export declare const BUTTON_VARIANT: {
|
|
|
49
57
|
secondary: string;
|
|
50
58
|
tertiary: string;
|
|
51
59
|
};
|
|
60
|
+
export declare const SIZE: {
|
|
61
|
+
small: string;
|
|
62
|
+
medium: string;
|
|
63
|
+
large: string;
|
|
64
|
+
standard: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const BADGE: {
|
|
67
|
+
appointment: string;
|
|
68
|
+
asn: string;
|
|
69
|
+
inventory: string;
|
|
70
|
+
parcel: string;
|
|
71
|
+
product: string;
|
|
72
|
+
route: string;
|
|
73
|
+
shipment: string;
|
|
74
|
+
shoppingCart: string;
|
|
75
|
+
system: string;
|
|
76
|
+
};
|
|
77
|
+
declare const _default: {
|
|
78
|
+
TYPE: {
|
|
79
|
+
primary: string;
|
|
80
|
+
secondary: string;
|
|
81
|
+
tertiary: string;
|
|
82
|
+
};
|
|
83
|
+
BREAKPOINTS: {
|
|
84
|
+
wide: string;
|
|
85
|
+
medium: string;
|
|
86
|
+
narrow: string;
|
|
87
|
+
};
|
|
88
|
+
STATE: {
|
|
89
|
+
active: string;
|
|
90
|
+
hover: string;
|
|
91
|
+
pressed: string;
|
|
92
|
+
focussed: string;
|
|
93
|
+
disabled: string;
|
|
94
|
+
error: string;
|
|
95
|
+
success: string;
|
|
96
|
+
warning: string;
|
|
97
|
+
progress: string;
|
|
98
|
+
info: string;
|
|
99
|
+
filled: string;
|
|
100
|
+
generic: string;
|
|
101
|
+
removed: string;
|
|
102
|
+
};
|
|
103
|
+
TYPOGRAPHY_VARIANT: {
|
|
104
|
+
display1: string;
|
|
105
|
+
display2: string;
|
|
106
|
+
display3: string;
|
|
107
|
+
heading1: string;
|
|
108
|
+
heading2: string;
|
|
109
|
+
heading3: string;
|
|
110
|
+
subHeading1: string;
|
|
111
|
+
subHeading2: string;
|
|
112
|
+
subHeading3: string;
|
|
113
|
+
body1: string;
|
|
114
|
+
body2: string;
|
|
115
|
+
body3: string;
|
|
116
|
+
body4: string;
|
|
117
|
+
body5: string;
|
|
118
|
+
message: string;
|
|
119
|
+
overline1: string;
|
|
120
|
+
overline2: string;
|
|
121
|
+
overline3: string;
|
|
122
|
+
label1: string;
|
|
123
|
+
label2: string;
|
|
124
|
+
label3: string;
|
|
125
|
+
link1: string;
|
|
126
|
+
link2: string;
|
|
127
|
+
link3: string;
|
|
128
|
+
digits1: string;
|
|
129
|
+
digits2: string;
|
|
130
|
+
digits3: string;
|
|
131
|
+
};
|
|
132
|
+
BUTTON_VARIANT: {
|
|
133
|
+
primary: string;
|
|
134
|
+
secondary: string;
|
|
135
|
+
tertiary: string;
|
|
136
|
+
};
|
|
137
|
+
SIZE: {
|
|
138
|
+
small: string;
|
|
139
|
+
medium: string;
|
|
140
|
+
large: string;
|
|
141
|
+
standard: string;
|
|
142
|
+
};
|
|
143
|
+
BADGE: {
|
|
144
|
+
appointment: string;
|
|
145
|
+
asn: string;
|
|
146
|
+
inventory: string;
|
|
147
|
+
parcel: string;
|
|
148
|
+
product: string;
|
|
149
|
+
route: string;
|
|
150
|
+
shipment: string;
|
|
151
|
+
shoppingCart: string;
|
|
152
|
+
system: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export default _default;
|
package/dist/constants/index.js
CHANGED
|
@@ -6,13 +6,21 @@ const e = {
|
|
|
6
6
|
wide: "wide",
|
|
7
7
|
medium: "medium",
|
|
8
8
|
narrow: "narrow"
|
|
9
|
-
},
|
|
9
|
+
}, s = {
|
|
10
10
|
active: "active",
|
|
11
11
|
hover: "hover",
|
|
12
12
|
pressed: "pressed",
|
|
13
13
|
focussed: "focus",
|
|
14
|
-
disabled: "disabled"
|
|
15
|
-
|
|
14
|
+
disabled: "disabled",
|
|
15
|
+
error: "error",
|
|
16
|
+
success: "success",
|
|
17
|
+
warning: "warning",
|
|
18
|
+
progress: "progress",
|
|
19
|
+
info: "info",
|
|
20
|
+
filled: "filled",
|
|
21
|
+
generic: "generic",
|
|
22
|
+
removed: "removed"
|
|
23
|
+
}, r = {
|
|
16
24
|
display1: "display1",
|
|
17
25
|
display2: "display2",
|
|
18
26
|
display3: "display3",
|
|
@@ -40,15 +48,41 @@ const e = {
|
|
|
40
48
|
digits1: "digits1",
|
|
41
49
|
digits2: "digits2",
|
|
42
50
|
digits3: "digits3"
|
|
43
|
-
},
|
|
51
|
+
}, a = {
|
|
44
52
|
primary: "primary",
|
|
45
53
|
secondary: "secondary",
|
|
46
54
|
tertiary: "tertiary"
|
|
55
|
+
}, d = {
|
|
56
|
+
small: "small",
|
|
57
|
+
medium: "medium",
|
|
58
|
+
large: "large",
|
|
59
|
+
standard: "standard"
|
|
60
|
+
}, n = {
|
|
61
|
+
appointment: "appointment",
|
|
62
|
+
asn: "asn",
|
|
63
|
+
inventory: "inventory",
|
|
64
|
+
parcel: "parcel",
|
|
65
|
+
product: "product",
|
|
66
|
+
route: "route",
|
|
67
|
+
shipment: "shipment",
|
|
68
|
+
shoppingCart: "shopping cart",
|
|
69
|
+
system: "system"
|
|
70
|
+
}, o = {
|
|
71
|
+
TYPE: e,
|
|
72
|
+
BREAKPOINTS: i,
|
|
73
|
+
STATE: s,
|
|
74
|
+
TYPOGRAPHY_VARIANT: r,
|
|
75
|
+
BUTTON_VARIANT: a,
|
|
76
|
+
SIZE: d,
|
|
77
|
+
BADGE: n
|
|
47
78
|
};
|
|
48
79
|
export {
|
|
80
|
+
n as BADGE,
|
|
49
81
|
i as BREAKPOINTS,
|
|
50
|
-
|
|
51
|
-
d as
|
|
82
|
+
a as BUTTON_VARIANT,
|
|
83
|
+
d as SIZE,
|
|
84
|
+
s as STATE,
|
|
52
85
|
e as TYPE,
|
|
53
|
-
|
|
86
|
+
r as TYPOGRAPHY_VARIANT,
|
|
87
|
+
o as default
|
|
54
88
|
};
|