@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,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 24,
|
|
7
|
+
height: 25,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#6C6C6C",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M8.752 18.148a1.2 1.2 0 0 1 0-1.697l3.951-3.951-3.951-3.951a1.2 1.2 0 1 1 1.697-1.698l4.8 4.8a1.2 1.2 0 0 1 0 1.697l-4.8 4.8a1.2 1.2 0 0 1-1.697 0Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Notification } from '../Notification';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Notification>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Notification>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const UnreadVsRead: Story;
|
|
9
|
+
export declare const WithoutFormattedDate: Story;
|
|
10
|
+
export declare const WithActionWithoutArrow: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s, a as i } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import n from "../Notification.js";
|
|
4
|
+
describe("<Notification />", () => {
|
|
5
|
+
let e;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
e = {
|
|
8
|
+
message: "Test notification message"
|
|
9
|
+
};
|
|
10
|
+
});
|
|
11
|
+
const o = () => i(/* @__PURE__ */ t(n, { ...e }));
|
|
12
|
+
it("should render the notification message", () => {
|
|
13
|
+
o(), expect(s.getByText(e.message)).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type NotificationRowProps = {
|
|
2
|
+
state: string;
|
|
3
|
+
size: string;
|
|
4
|
+
isUnread: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const NotificationRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, NotificationRowProps>> & string;
|
|
7
|
+
export declare const NotificationContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
8
|
+
size: string;
|
|
9
|
+
}>> & string;
|
|
10
|
+
export declare const NotificationUnread: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
11
|
+
state: string;
|
|
12
|
+
size: string;
|
|
13
|
+
}>> & string;
|
|
14
|
+
export declare const NotificationActionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
15
|
+
export declare const ChevronButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { d as i } from "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { SIZE as e } from "../../constants/index.js";
|
|
3
|
+
const a = i.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: ${({ theme: t }) => t.sizing.Size4}px;
|
|
8
|
+
padding: ${({ theme: t }) => t.sizing.Size3}px;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
cursor: default;
|
|
11
|
+
border-radius: ${({ theme: t }) => t.borderRadius.BorderRadiusSm}px;
|
|
12
|
+
height: 85px;
|
|
13
|
+
width: 500px;
|
|
14
|
+
background-color: ${({ theme: t, isUnread: o }) => o ? "#F4F4F4" : t.colors.surface.default};
|
|
15
|
+
`, p = i.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: ${({ theme: t }) => t.sizing.Size2}px;
|
|
19
|
+
flex: 1;
|
|
20
|
+
max-width: 500px;
|
|
21
|
+
|
|
22
|
+
.ant-typography {
|
|
23
|
+
display: -webkit-box;
|
|
24
|
+
-webkit-line-clamp: 3;
|
|
25
|
+
-webkit-box-orient: vertical;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
font-family: ${({ theme: t }) => t.typography.fontFamily};
|
|
29
|
+
line-height: ${({ theme: t, size: o }) => o === e.standard ? t.typography.lineHeight : "16px"};
|
|
30
|
+
}
|
|
31
|
+
`, s = i.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${({ theme: t }) => t.colors.status.info.default};
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
height: 8px;
|
|
38
|
+
width: 8px;
|
|
39
|
+
aspect-ratio: 1;
|
|
40
|
+
min-height: 8px;
|
|
41
|
+
`, n = (t) => `1px solid ${t.colors.interactive.utility.border}`, c = i.button`
|
|
42
|
+
border: ${({ theme: t }) => n(t)};
|
|
43
|
+
background: "none";
|
|
44
|
+
cursor: "pointer";
|
|
45
|
+
pointer-events: "all";
|
|
46
|
+
color: ${({ theme: t }) => t.colors.interactive.utility.onsurface};
|
|
47
|
+
border-radius: ${({ theme: t }) => t.borderRadius.BorderRadiusSm};
|
|
48
|
+
padding-top: "2px";
|
|
49
|
+
padding-bottom: "2px";
|
|
50
|
+
padding-left: ${({ theme: t }) => t.components.utilityButton.padding.horPadding};
|
|
51
|
+
padding-right: ${({ theme: t }) => t.components.utilityButton.padding.horPadding};
|
|
52
|
+
`, l = i.button`
|
|
53
|
+
text-decoration: underline;
|
|
54
|
+
border: none;
|
|
55
|
+
background: none;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
pointer-events: all;
|
|
58
|
+
`;
|
|
59
|
+
export {
|
|
60
|
+
l as ChevronButton,
|
|
61
|
+
c as NotificationActionButton,
|
|
62
|
+
p as NotificationContent,
|
|
63
|
+
a as NotificationRow,
|
|
64
|
+
s as NotificationUnread
|
|
65
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
selectedId: string;
|
|
7
|
+
onChange: (id: string) => void;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const RadioWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
11
|
+
$isDisabled: boolean;
|
|
12
|
+
}>> & string;
|
|
13
|
+
declare const Radio: ({ id, label, selectedId, onChange, isDisabled }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Radio;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../constants/index.js";
|
|
4
|
+
import "../../styled-components.browser.esm-CZ1XM4o4.js";
|
|
5
|
+
import "../Badge/styles.js";
|
|
6
|
+
import "../Breadcrumb/styles.js";
|
|
7
|
+
import "../../providers/ThemeProvider.js";
|
|
8
|
+
import { k as w, f as y } from "../../Typography-aGoDUl4R.js";
|
|
9
|
+
import "../Button/styles.js";
|
|
10
|
+
import "../Checkbox/styles.js";
|
|
11
|
+
import "../ErrorBoundaryFallback/styles.js";
|
|
12
|
+
import "../Input/styles.js";
|
|
13
|
+
import "../Message/styles.js";
|
|
14
|
+
import "../Notification/styles.js";
|
|
15
|
+
import "../Select/styles.js";
|
|
16
|
+
import "../Toast/styles.js";
|
|
17
|
+
import "./states/RadioChecked.js";
|
|
18
|
+
import "./states/RadioCheckedHover.js";
|
|
19
|
+
import "./states/RadioCheckedFocussed.js";
|
|
20
|
+
import "./states/RadioCheckedDisabled.js";
|
|
21
|
+
import "./states/RadioUnchecked.js";
|
|
22
|
+
import "./states/RadioUncheckedHover.js";
|
|
23
|
+
import "./states/RadioUncheckedFocussed.js";
|
|
24
|
+
import "./states/RadioUncheckedDisabled.js";
|
|
25
|
+
export {
|
|
26
|
+
w as RadioWrapper,
|
|
27
|
+
y as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type RadioData = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
export interface RadioGroupProps {
|
|
6
|
+
options: RadioData[];
|
|
7
|
+
selectedId: string;
|
|
8
|
+
onChange: (item: RadioData) => void;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const RadioGroup: ({ selectedId, options, onChange, isDisabled, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default RadioGroup;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { f } from "../../Typography-aGoDUl4R.js";
|
|
3
|
+
const u = ({
|
|
4
|
+
selectedId: d,
|
|
5
|
+
options: r,
|
|
6
|
+
onChange: a,
|
|
7
|
+
isDisabled: e = !1
|
|
8
|
+
}) => /* @__PURE__ */ l(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
role: "radiogroup",
|
|
12
|
+
style: {
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexDirection: "column",
|
|
15
|
+
border: "none",
|
|
16
|
+
cursor: e ? "not-allowed" : "pointer"
|
|
17
|
+
},
|
|
18
|
+
children: r.map((o) => /* @__PURE__ */ l(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
id: o.id,
|
|
22
|
+
selectedId: d,
|
|
23
|
+
label: o.label,
|
|
24
|
+
onChange: (i) => a(r.find((n) => n.id === i)),
|
|
25
|
+
isDisabled: e
|
|
26
|
+
},
|
|
27
|
+
o.id
|
|
28
|
+
))
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
export {
|
|
32
|
+
u as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as RadioGroup } from '../RadioGroup';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof RadioGroup>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof RadioGroup>;
|
|
7
|
+
export declare const RadioGroupStory: Story;
|
|
8
|
+
export declare const NoLabelsStory: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { v as n, f as r, a as d } from "../../../setup-BvfREoHl.js";
|
|
3
|
+
import l from "../RadioGroup.js";
|
|
4
|
+
describe("<RadioGroup />", () => {
|
|
5
|
+
const t = {
|
|
6
|
+
name: "test-radio-group",
|
|
7
|
+
selectedId: "1",
|
|
8
|
+
onChange: n.fn(),
|
|
9
|
+
options: [
|
|
10
|
+
{ id: "1", label: "Option 1" },
|
|
11
|
+
{ id: "2", label: "Option 2" },
|
|
12
|
+
{ id: "3", label: "Option 3" }
|
|
13
|
+
]
|
|
14
|
+
}, a = (e = t) => d(/* @__PURE__ */ i(l, { ...e }));
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
n.clearAllMocks();
|
|
17
|
+
}), it("should render all radio options", () => {
|
|
18
|
+
const { getAllByRole: e } = a(), o = e("radio");
|
|
19
|
+
expect(o).toHaveLength(3);
|
|
20
|
+
}), it("should call onChange when a radio is selected", () => {
|
|
21
|
+
const e = n.fn(), { getByText: o } = a({ ...t, onChange: e });
|
|
22
|
+
r.click(o("Option 1")), expect(e).toHaveBeenCalledWith({ id: "1", label: "Option 1" });
|
|
23
|
+
}), it("should mark the correct radio as checked based on value prop", () => {
|
|
24
|
+
const { getByRole: e } = a({
|
|
25
|
+
...t,
|
|
26
|
+
selectedId: "2"
|
|
27
|
+
}), o = e("radio", { name: "Option 2" });
|
|
28
|
+
expect(o).toHaveAttribute("aria-checked", "true");
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
const h = (t) => /* @__PURE__ */ e(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...t,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ i("rect", { width: 20, height: 20, fill: "#384DF6", rx: 10 }),
|
|
12
|
+
/* @__PURE__ */ i("circle", { cx: 10, cy: 10, r: 4, fill: "#fff" })
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
h as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as e, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const r = (c) => /* @__PURE__ */ e(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...c,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ l("circle", { cx: 10, cy: 10, r: 9.5, fill: "#F4F4F4", stroke: "#9A9A9A" }),
|
|
12
|
+
/* @__PURE__ */ l("circle", { cx: 10, cy: 10, r: 4, fill: "#6C6C6C" })
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
r as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
const r = (e) => /* @__PURE__ */ i(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 26,
|
|
7
|
+
height: 26,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ t("rect", { width: 20, height: 20, x: 3, y: 3, fill: "#384DF6", rx: 10 }),
|
|
12
|
+
/* @__PURE__ */ t("circle", { cx: 13, cy: 13, r: 4, fill: "#fff" }),
|
|
13
|
+
/* @__PURE__ */ t(
|
|
14
|
+
"rect",
|
|
15
|
+
{
|
|
16
|
+
width: 24,
|
|
17
|
+
height: 24,
|
|
18
|
+
x: 1,
|
|
19
|
+
y: 1,
|
|
20
|
+
stroke: "#384DF6",
|
|
21
|
+
strokeWidth: 2,
|
|
22
|
+
rx: 12
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
r as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const r = (i) => /* @__PURE__ */ t(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...i,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ e("rect", { width: 20, height: 20, fill: "#384DF6", rx: 10 }),
|
|
12
|
+
/* @__PURE__ */ e("circle", { cx: 10, cy: 10, r: 4, fill: "#fff" })
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
r as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const i = (t) => /* @__PURE__ */ e(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...t,
|
|
10
|
+
children: /* @__PURE__ */ e("circle", { cx: 10, cy: 10, r: 9.5, fill: "#fff", stroke: "#9A9A9A" })
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
export {
|
|
14
|
+
i as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const t = (i) => /* @__PURE__ */ e(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...i,
|
|
10
|
+
children: /* @__PURE__ */ e("circle", { cx: 10, cy: 10, r: 9.5, fill: "#fff", stroke: "#9A9A9A" })
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
export {
|
|
14
|
+
t as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
const i = (e) => /* @__PURE__ */ s(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 26,
|
|
7
|
+
height: 26,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ t("circle", { cx: 13, cy: 13, r: 9.5, fill: "#fff", stroke: "#9A9A9A" }),
|
|
12
|
+
/* @__PURE__ */ t(
|
|
13
|
+
"rect",
|
|
14
|
+
{
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
x: 1,
|
|
18
|
+
y: 1,
|
|
19
|
+
stroke: "#384DF6",
|
|
20
|
+
strokeWidth: 2,
|
|
21
|
+
rx: 12
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
export {
|
|
28
|
+
i as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as l, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
const i = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ c("circle", { cx: 10, cy: 10, r: 9.5, fill: "#fff", stroke: "#9A9A9A" }),
|
|
12
|
+
/* @__PURE__ */ c("circle", { cx: 10, cy: 10, r: 4, fill: "#6C6C6C" })
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
i as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const d = (e) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
fill: "none",
|
|
9
|
+
...e,
|
|
10
|
+
children: /* @__PURE__ */ l(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
fill: "#222",
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414Z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
d as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TYPE, STATE } from '../../constants';
|
|
3
|
+
import { SelectProps as AntSelectProps } from 'antd';
|
|
4
|
+
|
|
5
|
+
export interface SelectProps extends AntSelectProps {
|
|
6
|
+
type?: keyof typeof TYPE;
|
|
7
|
+
state?: keyof typeof STATE;
|
|
8
|
+
}
|
|
9
|
+
interface GenesisSelectProps extends SelectProps, AntSelectProps {
|
|
10
|
+
options?: {
|
|
11
|
+
value: string;
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
declare const Select: ({ type, state, ...rest }: GenesisSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Select;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import s, { useEffect as m } from "react";
|
|
3
|
+
import { useBreakpoint as l } from "../../providers/ThemeProvider.js";
|
|
4
|
+
import { TYPE as p } from "../../constants/index.js";
|
|
5
|
+
import u from "./DropdownChevron.js";
|
|
6
|
+
import { SelectWrapper as i, Select as a, SelectDropdown as f, StyledMenuItem as h } from "./styles.js";
|
|
7
|
+
const E = ({
|
|
8
|
+
type: t = p.primary,
|
|
9
|
+
state: r,
|
|
10
|
+
...d
|
|
11
|
+
}) => {
|
|
12
|
+
l();
|
|
13
|
+
const [c, n] = s.useState(!1);
|
|
14
|
+
return m(() => {
|
|
15
|
+
const e = document.createElement("style");
|
|
16
|
+
return e.textContent = `
|
|
17
|
+
.ant-select-dropdown {
|
|
18
|
+
padding: 0px !important;
|
|
19
|
+
}
|
|
20
|
+
`, document.head.appendChild(e), () => {
|
|
21
|
+
document.head.removeChild(e);
|
|
22
|
+
};
|
|
23
|
+
}, []), /* @__PURE__ */ o(i, { $isFocused: c, type: t, children: /* @__PURE__ */ o(
|
|
24
|
+
a,
|
|
25
|
+
{
|
|
26
|
+
...d,
|
|
27
|
+
suffixIcon: /* @__PURE__ */ o(u, {}),
|
|
28
|
+
dropdownRender: (e) => /* @__PURE__ */ o(f, { type: t, state: r, children: /* @__PURE__ */ o(h, { type: t, state: r, children: e }) }),
|
|
29
|
+
onFocus: () => n(!0),
|
|
30
|
+
onBlur: () => n(!1)
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
E as default
|
|
36
|
+
};
|
|
@@ -5,4 +5,6 @@ declare const meta: Meta<typeof Select>;
|
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof Select>;
|
|
7
7
|
export declare const Default: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Filled: Story;
|
|
9
|
+
export declare const Focussed: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|