@axa-fr/design-system-look-and-feel-react 0.2.0-beta.306
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/dist/Accordion/Accordion.d.ts +8 -0
- package/dist/Accordion/Accordion.js +7 -0
- package/dist/Accordion/Accordion.stories.d.ts +8 -0
- package/dist/Accordion/Accordion.stories.js +24 -0
- package/dist/Accordion/AccordionItem.d.ts +6 -0
- package/dist/Accordion/AccordionItem.js +10 -0
- package/dist/Alert/Alert.d.ts +12 -0
- package/dist/Alert/Alert.js +26 -0
- package/dist/Alert/Alert.stories.d.ts +5 -0
- package/dist/Alert/Alert.stories.js +26 -0
- package/dist/Button/Button.d.ts +17 -0
- package/dist/Button/Button.js +15 -0
- package/dist/Button/Button.stories.d.ts +22 -0
- package/dist/Button/Button.stories.js +99 -0
- package/dist/Card/Card.d.ts +6 -0
- package/dist/Card/Card.js +9 -0
- package/dist/Card/Card.stories.d.ts +6 -0
- package/dist/Card/Card.stories.js +40 -0
- package/dist/Card/__tests__/Card.test.d.ts +1 -0
- package/dist/Card/__tests__/Card.test.js +27 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +2 -0
- package/dist/Form/Checkbox/Checkbox.d.ts +7 -0
- package/dist/Form/Checkbox/Checkbox.js +15 -0
- package/dist/Form/Checkbox/Checkbox.stories.d.ts +6 -0
- package/dist/Form/Checkbox/Checkbox.stories.js +38 -0
- package/dist/Form/Checkbox/CheckboxSelect.d.ts +15 -0
- package/dist/Form/Checkbox/CheckboxSelect.js +7 -0
- package/dist/Form/Checkbox/CheckboxSelect.stories.d.ts +6 -0
- package/dist/Form/Checkbox/CheckboxSelect.stories.js +55 -0
- package/dist/Form/Checkbox/index.d.ts +2 -0
- package/dist/Form/Checkbox/index.js +2 -0
- package/dist/Form/FileUpload/FIleUpload.stories.d.ts +6 -0
- package/dist/Form/FileUpload/FIleUpload.stories.js +54 -0
- package/dist/Form/FileUpload/FileUpload.d.ts +32 -0
- package/dist/Form/FileUpload/FileUpload.js +51 -0
- package/dist/Form/FileUpload/index.d.ts +1 -0
- package/dist/Form/FileUpload/index.js +1 -0
- package/dist/Form/InputError/InputError.d.ts +7 -0
- package/dist/Form/InputError/InputError.js +5 -0
- package/dist/Form/InputError/InputError.stories.d.ts +5 -0
- package/dist/Form/InputError/InputError.stories.js +12 -0
- package/dist/Form/InputError/index.d.ts +1 -0
- package/dist/Form/InputError/index.js +1 -0
- package/dist/Form/Radio/Radio.d.ts +7 -0
- package/dist/Form/Radio/Radio.js +14 -0
- package/dist/Form/Radio/Radio.stories.d.ts +6 -0
- package/dist/Form/Radio/Radio.stories.js +38 -0
- package/dist/Form/Radio/RadioSelect.d.ts +18 -0
- package/dist/Form/Radio/RadioSelect.js +16 -0
- package/dist/Form/Radio/RadioSelect.stories.d.ts +7 -0
- package/dist/Form/Radio/RadioSelect.stories.js +90 -0
- package/dist/Form/Radio/index.d.ts +2 -0
- package/dist/Form/Radio/index.js +2 -0
- package/dist/Form/Select/CustomOption.d.ts +4 -0
- package/dist/Form/Select/CustomOption.js +8 -0
- package/dist/Form/Select/DropdownIndicator.d.ts +4 -0
- package/dist/Form/Select/DropdownIndicator.js +11 -0
- package/dist/Form/Select/Select.d.ts +27 -0
- package/dist/Form/Select/Select.js +27 -0
- package/dist/Form/Select/Select.stories.d.ts +10 -0
- package/dist/Form/Select/Select.stories.js +31 -0
- package/dist/Form/Select/index.d.ts +1 -0
- package/dist/Form/Select/index.js +1 -0
- package/dist/Form/Text/Text.d.ts +12 -0
- package/dist/Form/Text/Text.js +12 -0
- package/dist/Form/Text/Text.stories.d.ts +8 -0
- package/dist/Form/Text/Text.stories.js +46 -0
- package/dist/Form/Text/index.d.ts +1 -0
- package/dist/Form/Text/index.js +1 -0
- package/dist/Form/core/Field.d.ts +16 -0
- package/dist/Form/core/Field.js +12 -0
- package/dist/Form/core/FieldError.d.ts +7 -0
- package/dist/Form/core/FieldError.js +8 -0
- package/dist/Form/core/FieldForm.d.ts +59 -0
- package/dist/Form/core/FieldForm.js +151 -0
- package/dist/Form/core/FieldInput.d.ts +9 -0
- package/dist/Form/core/FieldInput.js +9 -0
- package/dist/Form/core/FormClassManager.d.ts +7 -0
- package/dist/Form/core/FormClassManager.js +33 -0
- package/dist/Form/core/HelpMessage.d.ts +7 -0
- package/dist/Form/core/HelpMessage.js +2 -0
- package/dist/Form/core/InputList.d.ts +8 -0
- package/dist/Form/core/InputList.js +4 -0
- package/dist/Form/core/MessageTypes.d.ts +5 -0
- package/dist/Form/core/MessageTypes.js +6 -0
- package/dist/Form/core/getComponentClassName.d.ts +1 -0
- package/dist/Form/core/getComponentClassName.js +27 -0
- package/dist/Form/core/getFirstId.d.ts +2 -0
- package/dist/Form/core/getFirstId.js +1 -0
- package/dist/Form/core/getOptionClassName.d.ts +1 -0
- package/dist/Form/core/getOptionClassName.js +10 -0
- package/dist/Form/core/index.d.ts +31 -0
- package/dist/Form/core/index.js +13 -0
- package/dist/Form/core/useInputClassModifier.d.ts +4 -0
- package/dist/Form/core/useInputClassModifier.js +12 -0
- package/dist/Form/core/useOptionsWithId.d.ts +2 -0
- package/dist/Form/core/useOptionsWithId.js +13 -0
- package/dist/IconBg/IconBg.d.ts +9 -0
- package/dist/IconBg/IconBg.js +13 -0
- package/dist/IconBg/IconBg.stories.d.ts +5 -0
- package/dist/IconBg/IconBg.stories.js +23 -0
- package/dist/IconBg/__tests__/IconBg.test.d.ts +1 -0
- package/dist/IconBg/__tests__/IconBg.test.js +22 -0
- package/dist/IconBg/index.d.ts +2 -0
- package/dist/IconBg/index.js +2 -0
- package/dist/Layout/Footer/DynamicIcons.d.ts +4 -0
- package/dist/Layout/Footer/DynamicIcons.js +20 -0
- package/dist/Layout/Footer/Footer.d.ts +14 -0
- package/dist/Layout/Footer/Footer.js +16 -0
- package/dist/Layout/Footer/Footer.stories.d.ts +14 -0
- package/dist/Layout/Footer/Footer.stories.js +48 -0
- package/dist/Layout/Footer/MenuIcons.d.ts +9 -0
- package/dist/Layout/Footer/MenuIcons.js +8 -0
- package/dist/Layout/Footer/MenuLink.d.ts +11 -0
- package/dist/Layout/Footer/MenuLink.js +11 -0
- package/dist/Layout/Header/Header.d.ts +9 -0
- package/dist/Layout/Header/Header.js +11 -0
- package/dist/Layout/Header/Header.stories.d.ts +10 -0
- package/dist/Layout/Header/Header.stories.js +52 -0
- package/dist/Layout/Header/NavBar/NavBar.d.ts +8 -0
- package/dist/Layout/Header/NavBar/NavBar.js +13 -0
- package/dist/Layout/Header/NavBar/NavBar.stories.d.ts +8 -0
- package/dist/Layout/Header/NavBar/NavBar.stories.js +17 -0
- package/dist/Layout/Header/NavBar/index.d.ts +1 -0
- package/dist/Layout/Header/NavBar/index.js +1 -0
- package/dist/Layout/Header/PreviousLink/PreviousLink.d.ts +7 -0
- package/dist/Layout/Header/PreviousLink/PreviousLink.js +14 -0
- package/dist/Layout/Header/PreviousLink/PreviousLink.stories.d.ts +8 -0
- package/dist/Layout/Header/PreviousLink/PreviousLink.stories.js +16 -0
- package/dist/Layout/Header/PreviousLink/index.d.ts +1 -0
- package/dist/Layout/Header/PreviousLink/index.js +1 -0
- package/dist/Layout/Header/index.d.ts +1 -0
- package/dist/Layout/Header/index.js +1 -0
- package/dist/Link/Link.d.ts +7 -0
- package/dist/Link/Link.js +11 -0
- package/dist/Link/Link.stories.d.ts +5 -0
- package/dist/Link/Link.stories.js +14 -0
- package/dist/List/ClickList/ClickList.d.ts +11 -0
- package/dist/List/ClickList/ClickList.js +6 -0
- package/dist/List/ClickList/ClickList.stories.d.ts +6 -0
- package/dist/List/ClickList/ClickList.stories.js +60 -0
- package/dist/List/ClickList/__tests__/ClickList.client.test.d.ts +1 -0
- package/dist/List/ClickList/__tests__/ClickList.client.test.js +18 -0
- package/dist/List/ClickList/index.d.ts +1 -0
- package/dist/List/ClickList/index.js +1 -0
- package/dist/List/ContentItemDuo/ContentItemDuo.d.ts +13 -0
- package/dist/List/ContentItemDuo/ContentItemDuo.js +18 -0
- package/dist/List/ContentItemDuo/ContentItemDuo.stories.d.ts +28 -0
- package/dist/List/ContentItemDuo/ContentItemDuo.stories.js +86 -0
- package/dist/List/ContentItemDuo/__tests__/ContentItemDuo.test.d.ts +1 -0
- package/dist/List/ContentItemDuo/__tests__/ContentItemDuo.test.js +40 -0
- package/dist/List/ContentItemDuo/index.d.ts +2 -0
- package/dist/List/ContentItemDuo/index.js +2 -0
- package/dist/List/ContentItemMono/ContentItemMono.d.ts +16 -0
- package/dist/List/ContentItemMono/ContentItemMono.js +16 -0
- package/dist/List/ContentItemMono/ContentItemMono.stories.d.ts +16 -0
- package/dist/List/ContentItemMono/ContentItemMono.stories.js +99 -0
- package/dist/List/ContentItemMono/__tests__/ContentItemMono.test.d.ts +1 -0
- package/dist/List/ContentItemMono/__tests__/ContentItemMono.test.js +45 -0
- package/dist/List/ContentItemMono/constants.d.ts +4 -0
- package/dist/List/ContentItemMono/constants.js +5 -0
- package/dist/List/ContentItemMono/index.d.ts +3 -0
- package/dist/List/ContentItemMono/index.js +3 -0
- package/dist/List/ContentTabList/ContentTabItem/ContentTabItem.d.ts +6 -0
- package/dist/List/ContentTabList/ContentTabItem/ContentTabItem.js +6 -0
- package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.test.d.ts +1 -0
- package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.test.js +100 -0
- package/dist/List/ContentTabList/ContentTabItem/index.d.ts +2 -0
- package/dist/List/ContentTabList/ContentTabItem/index.js +1 -0
- package/dist/List/ContentTabList/ContentTabList.d.ts +8 -0
- package/dist/List/ContentTabList/ContentTabList.js +10 -0
- package/dist/List/ContentTabList/ContentTabList.stories.d.ts +7 -0
- package/dist/List/ContentTabList/ContentTabList.stories.js +78 -0
- package/dist/List/ContentTabList/__tests__/ContentTabList.test.d.ts +1 -0
- package/dist/List/ContentTabList/__tests__/ContentTabList.test.js +57 -0
- package/dist/List/ContentTabList/index.d.ts +1 -0
- package/dist/List/ContentTabList/index.js +1 -0
- package/dist/List/List.d.ts +6 -0
- package/dist/List/List.js +9 -0
- package/dist/List/List.stories.d.ts +8 -0
- package/dist/List/List.stories.js +56 -0
- package/dist/List/__tests__/List.test.d.ts +1 -0
- package/dist/List/__tests__/List.test.js +30 -0
- package/dist/List/index.d.ts +1 -0
- package/dist/List/index.js +1 -0
- package/dist/Loader/Loader.d.ts +11 -0
- package/dist/Loader/Loader.js +10 -0
- package/dist/Loader/Loader.stories.d.ts +6 -0
- package/dist/Loader/Loader.stories.js +15 -0
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Loader/index.js +1 -0
- package/dist/ModalClient/Modal.d.ts +23 -0
- package/dist/ModalClient/Modal.js +44 -0
- package/dist/ModalClient/Modal.stories.d.ts +20 -0
- package/dist/ModalClient/Modal.stories.js +37 -0
- package/dist/Pagination/Pagination.d.ts +9 -0
- package/dist/Pagination/Pagination.js +15 -0
- package/dist/Pagination/Pagination.stories.d.ts +11 -0
- package/dist/Pagination/Pagination.stories.js +19 -0
- package/dist/Pagination/PaginationDesktop.d.ts +9 -0
- package/dist/Pagination/PaginationDesktop.js +31 -0
- package/dist/Pagination/PaginationMobile.d.ts +9 -0
- package/dist/Pagination/PaginationMobile.js +10 -0
- package/dist/Stepper/Stepper.d.ts +12 -0
- package/dist/Stepper/Stepper.js +22 -0
- package/dist/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/Stepper/Stepper.stories.js +23 -0
- package/dist/Svg/Svg.d.ts +7 -0
- package/dist/Svg/Svg.js +47 -0
- package/dist/Svg/Svg.stories.d.ts +7 -0
- package/dist/Svg/Svg.stories.js +40 -0
- package/dist/Svg/__tests__/Svg.test.d.ts +1 -0
- package/dist/Svg/__tests__/Svg.test.js +38 -0
- package/dist/Svg/index.d.ts +1 -0
- package/dist/Svg/index.js +1 -0
- package/dist/Svg/svgInjector.d.ts +12 -0
- package/dist/Svg/svgInjector.js +28 -0
- package/dist/Tabs/Tabs.d.ts +16 -0
- package/dist/Tabs/Tabs.js +48 -0
- package/dist/Tabs/Tabs.stories.d.ts +17 -0
- package/dist/Tabs/Tabs.stories.js +89 -0
- package/dist/Tag/Tag.d.ts +6 -0
- package/dist/Tag/Tag.js +7 -0
- package/dist/Tag/Tag.stories.d.ts +5 -0
- package/dist/Tag/Tag.stories.js +22 -0
- package/dist/Tag/__test__/Tag.test.d.ts +1 -0
- package/dist/Tag/__test__/Tag.test.js +18 -0
- package/dist/Tag/index.d.ts +2 -0
- package/dist/Tag/index.js +2 -0
- package/dist/Title/Title.d.ts +13 -0
- package/dist/Title/Title.js +11 -0
- package/dist/Title/Title.stories.d.ts +6 -0
- package/dist/Title/Title.stories.js +45 -0
- package/dist/Title/TitleWithSubtitles.d.ts +8 -0
- package/dist/Title/TitleWithSubtitles.js +2 -0
- package/dist/Title/__tests__/Title.test.d.ts +1 -0
- package/dist/Title/__tests__/Title.test.js +28 -0
- package/dist/Title/__tests__/TitleWithSubtitles.test.d.ts +1 -0
- package/dist/Title/__tests__/TitleWithSubtitles.test.js +14 -0
- package/dist/Title/constants.d.ts +4 -0
- package/dist/Title/constants.js +5 -0
- package/dist/Title/index.d.ts +3 -0
- package/dist/Title/index.js +3 -0
- package/dist/assets/svg/facebook.svg +1 -0
- package/dist/assets/svg/linkedin.svg +1 -0
- package/dist/assets/svg/twitterx.svg +1 -0
- package/dist/assets/svg/youtube.svg +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +27 -0
- package/dist/utilities/helpers/getComponentClassName.d.ts +1 -0
- package/dist/utilities/helpers/getComponentClassName.js +27 -0
- package/dist/utilities/hooks/useIsSmallScreen.d.ts +1 -0
- package/dist/utilities/hooks/useIsSmallScreen.js +14 -0
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.js +2 -0
- package/package.json +119 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import "./Svg.stories.css";
|
3
|
+
import { Svg } from ".";
|
4
|
+
declare const meta: Meta;
|
5
|
+
export default meta;
|
6
|
+
export declare const Default: StoryObj<typeof Svg>;
|
7
|
+
export declare const Headphones: StoryObj<typeof Svg>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import headphonesIcons from "@material-symbols/svg-400/outlined/headphones.svg";
|
3
|
+
import homeIcons from "@material-symbols/svg-400/outlined/home.svg";
|
4
|
+
import saveIcons from "@material-symbols/svg-400/outlined/save.svg";
|
5
|
+
import closeIcons from "@material-symbols/svg-400/outlined/close.svg";
|
6
|
+
import "./Svg.stories.css";
|
7
|
+
import { Svg } from ".";
|
8
|
+
const meta = {
|
9
|
+
title: "Components/Svg",
|
10
|
+
component: Svg,
|
11
|
+
};
|
12
|
+
export default meta;
|
13
|
+
const MODIFIERS = {
|
14
|
+
"/public/headphones.svg": headphonesIcons,
|
15
|
+
"/public/home.svg": homeIcons,
|
16
|
+
"/public/save.svg": saveIcons,
|
17
|
+
"/public/close.svg": closeIcons,
|
18
|
+
"simulate svg error": "foo",
|
19
|
+
};
|
20
|
+
export const Default = {
|
21
|
+
name: "Svg",
|
22
|
+
render: ({ src, ...args }) => _jsx(Svg, { src: MODIFIERS[src], ...args }),
|
23
|
+
args: {
|
24
|
+
src: "/public/headphones.svg",
|
25
|
+
fill: "#00008f",
|
26
|
+
width: 24,
|
27
|
+
height: 24,
|
28
|
+
alt: "error",
|
29
|
+
},
|
30
|
+
argTypes: {
|
31
|
+
src: {
|
32
|
+
options: Object.keys(MODIFIERS),
|
33
|
+
control: { type: "select" },
|
34
|
+
},
|
35
|
+
},
|
36
|
+
};
|
37
|
+
export const Headphones = {
|
38
|
+
name: "Svg Headphones",
|
39
|
+
render: () => _jsx(Svg, { src: headphonesIcons, fill: "#00008f" }),
|
40
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { render, screen } from "@testing-library/react";
|
3
|
+
import { axe } from "jest-axe";
|
4
|
+
import { Svg } from "../Svg";
|
5
|
+
const mocks = vi.hoisted(() => {
|
6
|
+
return {
|
7
|
+
SVGInjector: vi.fn(),
|
8
|
+
};
|
9
|
+
});
|
10
|
+
vi.mock("@tanem/svg-injector", () => mocks);
|
11
|
+
describe("<Svg />", () => {
|
12
|
+
describe("render", () => {
|
13
|
+
it("renders correctly", () => {
|
14
|
+
mocks.SVGInjector.mockImplementationOnce((el, { afterEach }) => {
|
15
|
+
afterEach(undefined, el);
|
16
|
+
});
|
17
|
+
const svgSrc = "svgSrc";
|
18
|
+
render(_jsx(Svg, { src: "svgSrc", alt: "foo", "aria-label": "test" }));
|
19
|
+
const svg = screen.getByLabelText("test");
|
20
|
+
expect(svg).toBeInTheDocument();
|
21
|
+
expect(svg).toHaveAttribute("data-src", svgSrc);
|
22
|
+
});
|
23
|
+
it("renders fallback when src not found", async () => {
|
24
|
+
mocks.SVGInjector.mockImplementationOnce((_, { afterEach }) => {
|
25
|
+
afterEach("error");
|
26
|
+
});
|
27
|
+
render(_jsx(Svg, { src: "fake", alt: "foo", "aria-label": "test" }));
|
28
|
+
const svg = screen.getByText("foo");
|
29
|
+
expect(svg).toBeInTheDocument();
|
30
|
+
});
|
31
|
+
});
|
32
|
+
describe("A11Y", () => {
|
33
|
+
it("shouldn't have an accessibility violation <Svg />", async () => {
|
34
|
+
const { container } = render(_jsx(Svg, { src: "svgSrc", alt: "foo" }));
|
35
|
+
expect(await axe(container)).toHaveNoViolations();
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Svg } from "./Svg";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Svg } from "./Svg";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { type AfterAll, type BeforeEach, type Errback, type EvalScripts } from "@tanem/svg-injector";
|
2
|
+
type Options = {
|
3
|
+
afterAll?: AfterAll;
|
4
|
+
afterEach?: Errback;
|
5
|
+
beforeEach?: BeforeEach;
|
6
|
+
cacheRequests?: boolean;
|
7
|
+
evalScripts?: EvalScripts;
|
8
|
+
httpRequestWithCredentials?: boolean;
|
9
|
+
renumerateIRIElements?: boolean;
|
10
|
+
};
|
11
|
+
export declare const svgInjector: (element: HTMLElement | SVGSVGElement | null, { beforeEach, ...options }?: Options) => void;
|
12
|
+
export {};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { SVGInjector, } from "@tanem/svg-injector";
|
2
|
+
import DOMPurify from "dompurify";
|
3
|
+
const attributesToRestore = ["fill", "stroke"];
|
4
|
+
const restoreAttributes = (element, svg) => {
|
5
|
+
const attributes = {};
|
6
|
+
element?.getAttributeNames().forEach((attribute) => {
|
7
|
+
if (attribute.startsWith("aria-") ||
|
8
|
+
attributesToRestore.includes(attribute)) {
|
9
|
+
attributes[attribute] = element.getAttribute(attribute);
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.keys(attributes).forEach((attribute) => {
|
13
|
+
svg.setAttribute(attribute, attributes[attribute]);
|
14
|
+
});
|
15
|
+
};
|
16
|
+
export const svgInjector = (element, { beforeEach = () => { }, ...options } = {}) => {
|
17
|
+
SVGInjector(element, {
|
18
|
+
...options,
|
19
|
+
beforeEach: (svg) => {
|
20
|
+
DOMPurify.sanitize(svg, {
|
21
|
+
USE_PROFILES: { svg: true, svgFilters: true },
|
22
|
+
IN_PLACE: true,
|
23
|
+
});
|
24
|
+
restoreAttributes(element, svg);
|
25
|
+
beforeEach(svg);
|
26
|
+
},
|
27
|
+
});
|
28
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Tabs/Tabs.scss";
|
2
|
+
import { ReactNode } from "react";
|
3
|
+
export declare enum Direction {
|
4
|
+
center = "center"
|
5
|
+
}
|
6
|
+
type TabsProps = {
|
7
|
+
items: {
|
8
|
+
title: string;
|
9
|
+
content: string | ReactNode;
|
10
|
+
icon?: ReactNode;
|
11
|
+
}[];
|
12
|
+
preSelectedTabIndex?: number;
|
13
|
+
direction?: Direction;
|
14
|
+
};
|
15
|
+
export declare const TabsClient: ({ items, preSelectedTabIndex, direction, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
16
|
+
export {};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Tabs/Tabs.scss";
|
3
|
+
import classNames from "classnames";
|
4
|
+
import { useCallback, useRef, useState } from "react";
|
5
|
+
export var Direction;
|
6
|
+
(function (Direction) {
|
7
|
+
Direction["center"] = "center";
|
8
|
+
})(Direction || (Direction = {}));
|
9
|
+
export const TabsClient = ({ items, preSelectedTabIndex, direction, }) => {
|
10
|
+
const [selectedTabIndex, setSelectedTabIndex] = useState(preSelectedTabIndex || 0);
|
11
|
+
const buttonRefs = useRef([]);
|
12
|
+
const tablistRef = useRef(null);
|
13
|
+
const totalTabs = items.length;
|
14
|
+
const isActive = (index) => index === selectedTabIndex;
|
15
|
+
const onChangeTab = useCallback((e) => {
|
16
|
+
const firstTabIndex = 0;
|
17
|
+
const lastTabIndex = totalTabs - 1;
|
18
|
+
const goToNextTab = (nextTabIndex) => {
|
19
|
+
setSelectedTabIndex(nextTabIndex);
|
20
|
+
buttonRefs.current[nextTabIndex].focus();
|
21
|
+
e.stopPropagation();
|
22
|
+
e.preventDefault();
|
23
|
+
};
|
24
|
+
switch (e.key) {
|
25
|
+
case "ArrowRight":
|
26
|
+
goToNextTab(selectedTabIndex < lastTabIndex
|
27
|
+
? selectedTabIndex + 1
|
28
|
+
: firstTabIndex);
|
29
|
+
break;
|
30
|
+
case "ArrowLeft":
|
31
|
+
goToNextTab(selectedTabIndex > firstTabIndex
|
32
|
+
? selectedTabIndex - 1
|
33
|
+
: lastTabIndex);
|
34
|
+
break;
|
35
|
+
case "Home":
|
36
|
+
goToNextTab(firstTabIndex);
|
37
|
+
break;
|
38
|
+
case "End":
|
39
|
+
goToNextTab(lastTabIndex);
|
40
|
+
break;
|
41
|
+
default:
|
42
|
+
break;
|
43
|
+
}
|
44
|
+
}, [selectedTabIndex, totalTabs]);
|
45
|
+
return (_jsxs("div", { className: classNames("af-tabs-client", direction === Direction.center ? `af-tabs-client--center` : ""), children: [_jsx("div", { role: "tablist", ref: tablistRef, children: items.map((item, index) => (_jsxs("button", { role: "tab", id: `tab-${index}`, "aria-selected": isActive(index), "aria-controls": `tabpanel-${index}`, onKeyDown: onChangeTab, onClick: () => setSelectedTabIndex(index), ref: (element) => {
|
46
|
+
buttonRefs.current[index] = element;
|
47
|
+
}, type: "button", tabIndex: isActive(index) ? 0 : -1, children: [item.icon, _jsx("span", { children: item.title })] }, `tab-${item.title}`))) }), items.map((item, index) => (_jsx("div", { role: "tabpanel", "aria-hidden": !isActive(index), id: `tabpanel-${index}`, "aria-labelledby": `tab-${index}`, children: item.content }, `tabpanel-${item.title}`)))] }));
|
48
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import { ReactNode } from "react";
|
3
|
+
import { Direction, TabsClient } from "./Tabs";
|
4
|
+
declare const meta: Meta<typeof TabsClient>;
|
5
|
+
export default meta;
|
6
|
+
type StoryProps = Omit<React.ComponentProps<typeof TabsClient>, "items" | "direction" | "preSelectedTabIndex"> & {
|
7
|
+
items: {
|
8
|
+
title: string;
|
9
|
+
content: string | ReactNode;
|
10
|
+
icon?: ReactNode;
|
11
|
+
}[];
|
12
|
+
preSelectedTabIndex?: number;
|
13
|
+
direction?: Direction;
|
14
|
+
};
|
15
|
+
export declare const TabsStory: StoryObj<StoryProps>;
|
16
|
+
export declare const TabsCenterDirectionStory: StoryObj<StoryProps>;
|
17
|
+
export declare const TabsWithReactNodeStory: StoryObj<typeof TabsClient>;
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import accessTime from "@material-symbols/svg-400/outlined/schedule.svg";
|
3
|
+
import bluetoothAudio from "@material-symbols/svg-400/outlined/bluetooth_searching.svg";
|
4
|
+
import { Direction, TabsClient } from "./Tabs";
|
5
|
+
import { Svg } from "../Svg";
|
6
|
+
const meta = {
|
7
|
+
component: TabsClient,
|
8
|
+
title: "Components/Tabs",
|
9
|
+
parameters: {
|
10
|
+
layout: "fullscreen",
|
11
|
+
},
|
12
|
+
};
|
13
|
+
export default meta;
|
14
|
+
export const TabsStory = {
|
15
|
+
name: "Tabs",
|
16
|
+
render: ({ items, preSelectedTabIndex, direction }) => {
|
17
|
+
const props = {
|
18
|
+
items,
|
19
|
+
preSelectedTabIndex,
|
20
|
+
};
|
21
|
+
if (direction === Direction.center) {
|
22
|
+
props.direction = Direction.center;
|
23
|
+
}
|
24
|
+
return _jsx(TabsClient, { ...props });
|
25
|
+
},
|
26
|
+
args: {
|
27
|
+
items: [
|
28
|
+
{ title: "Tab 1", content: "Content 1" },
|
29
|
+
{ title: "Tab 2", content: "Content 2", icon: _jsx(Svg, { src: accessTime }) },
|
30
|
+
{ title: "Tab 3", content: "Content 3" },
|
31
|
+
],
|
32
|
+
preSelectedTabIndex: 0,
|
33
|
+
},
|
34
|
+
argTypes: {
|
35
|
+
items: {
|
36
|
+
control: { type: "object" },
|
37
|
+
},
|
38
|
+
preSelectedTabIndex: {
|
39
|
+
control: { type: "number" },
|
40
|
+
},
|
41
|
+
direction: {
|
42
|
+
control: "select",
|
43
|
+
options: ["default", "center"],
|
44
|
+
},
|
45
|
+
},
|
46
|
+
};
|
47
|
+
export const TabsCenterDirectionStory = {
|
48
|
+
name: "TabsCenterDirection",
|
49
|
+
render: (args) => _jsx(TabsClient, { ...args }),
|
50
|
+
args: {
|
51
|
+
items: [
|
52
|
+
{ title: "Center tab 1", content: "Content 1" },
|
53
|
+
{
|
54
|
+
title: "Center tab 2",
|
55
|
+
content: "Content 2",
|
56
|
+
icon: _jsx(Svg, { src: accessTime }),
|
57
|
+
},
|
58
|
+
{
|
59
|
+
title: "Center tab 3",
|
60
|
+
content: "Content 3",
|
61
|
+
icon: _jsx(Svg, { src: bluetoothAudio }),
|
62
|
+
},
|
63
|
+
],
|
64
|
+
preSelectedTabIndex: 0,
|
65
|
+
direction: Direction.center,
|
66
|
+
},
|
67
|
+
};
|
68
|
+
export const TabsWithReactNodeStory = {
|
69
|
+
name: "TabsWithReactNode",
|
70
|
+
render: (args) => _jsx(TabsClient, { ...args }),
|
71
|
+
args: {
|
72
|
+
items: [
|
73
|
+
{
|
74
|
+
title: "ReactNode tab 1",
|
75
|
+
content: (_jsxs(_Fragment, { children: [_jsx("h2", { children: "Titre 1" }), _jsx("p", { children: "Content 1" })] })),
|
76
|
+
},
|
77
|
+
{
|
78
|
+
title: "ReactNode tab 2",
|
79
|
+
content: (_jsxs(_Fragment, { children: [_jsx("h2", { children: "Titre 2" }), _jsx("p", { children: "Content 2" })] })),
|
80
|
+
},
|
81
|
+
{
|
82
|
+
title: "ReactNode tab 3",
|
83
|
+
content: (_jsxs(_Fragment, { children: [_jsx("h2", { children: "Titre 3" }), _jsx("p", { children: "Content 3" })] })),
|
84
|
+
},
|
85
|
+
],
|
86
|
+
direction: Direction.center,
|
87
|
+
preSelectedTabIndex: 0,
|
88
|
+
},
|
89
|
+
};
|
package/dist/Tag/Tag.js
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useMemo } from "react";
|
3
|
+
import { getComponentClassName } from "../utilities";
|
4
|
+
export const Tag = ({ children, className, classModifier = "", ...divProps }) => {
|
5
|
+
const componentClassName = useMemo(() => getComponentClassName(className, classModifier, "af-tag"), [className, classModifier]);
|
6
|
+
return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
|
7
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Tag } from ".";
|
3
|
+
const meta = {
|
4
|
+
title: "Components/Tag",
|
5
|
+
component: Tag,
|
6
|
+
};
|
7
|
+
export default meta;
|
8
|
+
export const Default = {
|
9
|
+
name: "Tag",
|
10
|
+
render: (args) => _jsx(Tag, { ...args }),
|
11
|
+
args: {
|
12
|
+
children: "Texte",
|
13
|
+
classModifier: "",
|
14
|
+
},
|
15
|
+
argTypes: {
|
16
|
+
classModifier: {
|
17
|
+
options: ["", "success", "error", "warning", "info"],
|
18
|
+
control: { type: "select" },
|
19
|
+
defaultValue: "",
|
20
|
+
},
|
21
|
+
},
|
22
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { render, screen } from "@testing-library/react";
|
3
|
+
import { Tag } from "../Tag";
|
4
|
+
describe("Tag", () => {
|
5
|
+
it("should render children correctly", () => {
|
6
|
+
const children = "Sample Tag";
|
7
|
+
render(_jsx(Tag, { children: children }));
|
8
|
+
const tagSpan = screen.getByText(children);
|
9
|
+
expect(tagSpan).toHaveClass("af-tag__label");
|
10
|
+
expect(tagSpan.parentElement).toHaveClass("af-tag");
|
11
|
+
});
|
12
|
+
it("should have custom classModifier", () => {
|
13
|
+
const children = "Sample Tag";
|
14
|
+
const classModifier = "modifier";
|
15
|
+
render(_jsx(Tag, { classModifier: classModifier, children: children }));
|
16
|
+
expect(screen.getByText(children).parentElement).toHaveClass(`af-tag af-tag--${classModifier}`);
|
17
|
+
});
|
18
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { type ReactNode } from "react";
|
2
|
+
import { TitleSize } from "./constants";
|
3
|
+
type TitleProps = {
|
4
|
+
children: ReactNode;
|
5
|
+
firstSubtitle: string;
|
6
|
+
className?: string;
|
7
|
+
classModifier?: string;
|
8
|
+
icon?: ReactNode;
|
9
|
+
secondSubtitle?: string;
|
10
|
+
size?: TitleSize;
|
11
|
+
};
|
12
|
+
export declare const Title: ({ children: title, className, classModifier, firstSubtitle, icon, secondSubtitle, size, }: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
13
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useCallback, useMemo, } from "react";
|
3
|
+
import { IconBg } from "..";
|
4
|
+
import { getComponentClassName } from "../utilities";
|
5
|
+
import { TitleSize } from "./constants";
|
6
|
+
import { TitleWithSubtitles } from "./TitleWithSubtitles";
|
7
|
+
export const Title = ({ children: title, className, classModifier, firstSubtitle, icon, secondSubtitle, size = TitleSize.XL, }) => {
|
8
|
+
const componentClassName = useMemo(() => getComponentClassName(className, classModifier ? `${classModifier} ${size}` : size, "af-title"), [classModifier, className, size]);
|
9
|
+
const TitleWithSubtitlesPart = useCallback(({ ...args }) => (_jsx(TitleWithSubtitles, { title: title, firstSubtitle: firstSubtitle, ...args })), [title, firstSubtitle]);
|
10
|
+
return (_jsx("div", { className: componentClassName, children: icon && size === TitleSize.XL ? (_jsxs(_Fragment, { children: [_jsx(IconBg, { className: "af-title__icon af-icon-bg", children: icon }), _jsx("div", { className: "af-title__text-container", children: _jsx(TitleWithSubtitlesPart, { secondSubtitle: secondSubtitle }) })] })) : (_jsx(TitleWithSubtitlesPart, {})) }));
|
11
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import { Title } from ".";
|
3
|
+
declare const meta: Meta<typeof Title>;
|
4
|
+
export default meta;
|
5
|
+
export declare const TitleWithIcon: StoryObj<typeof Title>;
|
6
|
+
export declare const TitleWithoutIcon: StoryObj<typeof Title>;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import article from "@material-symbols/svg-400/outlined/article-fill.svg";
|
3
|
+
import { Title } from ".";
|
4
|
+
import { Svg } from "../Svg";
|
5
|
+
import { TitleSize } from "./constants";
|
6
|
+
const meta = {
|
7
|
+
title: "Components/Title",
|
8
|
+
component: Title,
|
9
|
+
};
|
10
|
+
export default meta;
|
11
|
+
export const TitleWithIcon = {
|
12
|
+
name: "Title With Icon",
|
13
|
+
render: (args) => _jsx(Title, { ...args }),
|
14
|
+
args: {
|
15
|
+
children: "Titre de la page",
|
16
|
+
firstSubtitle: "Sous-titre 1",
|
17
|
+
secondSubtitle: "Sous-titre 2",
|
18
|
+
icon: _jsx(Svg, { src: article }),
|
19
|
+
size: TitleSize.XL,
|
20
|
+
},
|
21
|
+
argTypes: {
|
22
|
+
size: {
|
23
|
+
options: Object.values(TitleSize),
|
24
|
+
control: { type: "select" },
|
25
|
+
defaultValue: TitleSize.XL,
|
26
|
+
},
|
27
|
+
},
|
28
|
+
};
|
29
|
+
export const TitleWithoutIcon = {
|
30
|
+
name: "Title Without Icon",
|
31
|
+
render: (args) => _jsx(Title, { ...args }),
|
32
|
+
args: {
|
33
|
+
children: "Titre de la page",
|
34
|
+
firstSubtitle: "Sous-titre 1",
|
35
|
+
secondSubtitle: "Sous-titre 2",
|
36
|
+
size: TitleSize.XL,
|
37
|
+
},
|
38
|
+
argTypes: {
|
39
|
+
size: {
|
40
|
+
options: Object.values(TitleSize),
|
41
|
+
control: { type: "select" },
|
42
|
+
defaultValue: TitleSize.XL,
|
43
|
+
},
|
44
|
+
},
|
45
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ReactNode } from "react";
|
2
|
+
type TitleTextProps = {
|
3
|
+
title: ReactNode;
|
4
|
+
firstSubtitle?: string;
|
5
|
+
secondSubtitle?: string;
|
6
|
+
};
|
7
|
+
export declare const TitleWithSubtitles: ({ title, firstSubtitle, secondSubtitle, }: TitleTextProps) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
export const TitleWithSubtitles = ({ title, firstSubtitle, secondSubtitle, }) => (_jsxs(_Fragment, { children: [_jsx("h1", { className: "af-title__title", children: title }), firstSubtitle && (_jsx("span", { className: "af-title__subtitle", children: firstSubtitle })), secondSubtitle && (_jsx("span", { className: "af-title__subtitle", children: secondSubtitle }))] }));
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { render, screen } from "@testing-library/react";
|
3
|
+
import { Title } from "..";
|
4
|
+
import { TitleSize } from "../constants";
|
5
|
+
describe("Title", () => {
|
6
|
+
it("should render correctly", () => {
|
7
|
+
render(_jsx(Title, { firstSubtitle: "firstSubtitle", secondSubtitle: "secondSubtitle", icon: "icon", children: "Title" }));
|
8
|
+
expect(screen.getByRole("heading", { name: "Title", level: 1 })).toBeInTheDocument();
|
9
|
+
expect(screen.getByText("firstSubtitle")).toBeInTheDocument();
|
10
|
+
expect(screen.getByText("secondSubtitle")).toBeInTheDocument();
|
11
|
+
expect(screen.getByText("icon")).toBeInTheDocument();
|
12
|
+
});
|
13
|
+
it("should have custom class", () => {
|
14
|
+
render(_jsx(Title, { firstSubtitle: "firstSubtitle", className: "custom-class", children: "Title" }));
|
15
|
+
expect(screen.getByText("Title").parentElement).toHaveClass("custom-class");
|
16
|
+
});
|
17
|
+
it("should have custom class with modifier", () => {
|
18
|
+
render(_jsx(Title, { firstSubtitle: "firstSubtitle", className: "custom-class", classModifier: "modifier", children: "Title" }));
|
19
|
+
expect(screen.getByText("Title").parentElement).toHaveClass("custom-class custom-class--modifier");
|
20
|
+
});
|
21
|
+
it('should not display icon and second subtitle when size is "L"', () => {
|
22
|
+
render(_jsx(Title, { firstSubtitle: "firstSubtitle", secondSubtitle: "secondSubtitle", icon: "icon", size: TitleSize.L, children: "Title" }));
|
23
|
+
expect(screen.getByRole("heading", { name: "Title", level: 1 })).toBeInTheDocument();
|
24
|
+
expect(screen.getByText("firstSubtitle")).toBeInTheDocument();
|
25
|
+
expect(screen.queryByText("secondSubtitle")).not.toBeInTheDocument();
|
26
|
+
expect(screen.queryByText("icon")).not.toBeInTheDocument();
|
27
|
+
});
|
28
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { render, screen } from "@testing-library/react";
|
3
|
+
import { TitleWithSubtitles } from "../TitleWithSubtitles";
|
4
|
+
describe("TitleWithSubtitles", () => {
|
5
|
+
it("should render title and the two subtitles", () => {
|
6
|
+
const title = "Sample Title";
|
7
|
+
const firstSubtitle = "First Subtitle";
|
8
|
+
const secondSubtitle = "Second Subtitle";
|
9
|
+
render(_jsx(TitleWithSubtitles, { title: title, firstSubtitle: firstSubtitle, secondSubtitle: secondSubtitle }));
|
10
|
+
screen.getByRole("heading", { name: title, level: 1 });
|
11
|
+
expect(screen.getByText(firstSubtitle)).toBeInTheDocument();
|
12
|
+
expect(screen.getByText(secondSubtitle)).toBeInTheDocument();
|
13
|
+
});
|
14
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"></path></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z"></path></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M10 15l5.19-3L10 9v6m11.56-7.83c.13.47.22 1.1.28 1.9.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83-.25.9-.83 1.48-1.73 1.73-.47.13-1.33.22-2.65.28-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44-.9-.25-1.48-.83-1.73-1.73-.13-.47-.22-1.1-.28-1.9-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83.25-.9.83-1.48 1.73-1.73.47-.13 1.33-.22 2.65-.28 1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44.9.25 1.48.83 1.73 1.73z"></path></svg>
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
import "@fontsource/source-sans-pro";
|
2
|
+
export { Accordion } from "./Accordion/Accordion";
|
3
|
+
export { Alert } from "./Alert/Alert";
|
4
|
+
export type { AlertType } from "./Alert/Alert";
|
5
|
+
export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
|
6
|
+
export { Card } from "./Card";
|
7
|
+
export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
|
8
|
+
export { FileUpload } from "./Form/FileUpload";
|
9
|
+
export { Radio, RadioSelect } from "./Form/Radio";
|
10
|
+
export { Select } from "./Form/Select";
|
11
|
+
export { Text as TextInput } from "./Form/Text";
|
12
|
+
export { IconBg } from "./IconBg";
|
13
|
+
export { Footer } from "./Layout/Footer/Footer";
|
14
|
+
export { Header } from "./Layout/Header";
|
15
|
+
export { Link } from "./Link/Link";
|
16
|
+
export { List } from "./List";
|
17
|
+
export { ClickList } from "./List/ClickList";
|
18
|
+
export { ContentItemDuo } from "./List/ContentItemDuo";
|
19
|
+
export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
|
20
|
+
export { ContentTabList } from "./List/ContentTabList";
|
21
|
+
export { Loader } from "./Loader";
|
22
|
+
export { Modal } from "./ModalClient/Modal";
|
23
|
+
export type { ButtonAction as ModalButtonAction } from "./ModalClient/Modal";
|
24
|
+
export { Pagination } from "./Pagination/Pagination";
|
25
|
+
export { Stepper } from "./Stepper/Stepper";
|
26
|
+
export { Svg } from "./Svg";
|
27
|
+
export { TabsClient as Tabs } from "./Tabs/Tabs";
|
28
|
+
export { Tag } from "./Tag";
|
29
|
+
export { Title, TitleSize } from "./Title";
|
package/dist/index.js
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
import "@fontsource/source-sans-pro";
|
2
|
+
export { Accordion } from "./Accordion/Accordion";
|
3
|
+
export { Alert } from "./Alert/Alert";
|
4
|
+
export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
|
5
|
+
export { Card } from "./Card";
|
6
|
+
export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
|
7
|
+
export { FileUpload } from "./Form/FileUpload";
|
8
|
+
export { Radio, RadioSelect } from "./Form/Radio";
|
9
|
+
export { Select } from "./Form/Select";
|
10
|
+
export { Text as TextInput } from "./Form/Text";
|
11
|
+
export { IconBg } from "./IconBg";
|
12
|
+
export { Footer } from "./Layout/Footer/Footer";
|
13
|
+
export { Header } from "./Layout/Header";
|
14
|
+
export { Link } from "./Link/Link";
|
15
|
+
export { List } from "./List";
|
16
|
+
export { ClickList } from "./List/ClickList";
|
17
|
+
export { ContentItemDuo } from "./List/ContentItemDuo";
|
18
|
+
export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
|
19
|
+
export { ContentTabList } from "./List/ContentTabList";
|
20
|
+
export { Loader } from "./Loader";
|
21
|
+
export { Modal } from "./ModalClient/Modal";
|
22
|
+
export { Pagination } from "./Pagination/Pagination";
|
23
|
+
export { Stepper } from "./Stepper/Stepper";
|
24
|
+
export { Svg } from "./Svg";
|
25
|
+
export { TabsClient as Tabs } from "./Tabs/Tabs";
|
26
|
+
export { Tag } from "./Tag";
|
27
|
+
export { Title, TitleSize } from "./Title";
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getComponentClassName: (className?: string, classModifier?: string, defaultClassName?: string) => string;
|