@ilo-org/react 0.12.0 → 0.14.0
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/.storybook/main.ts +41 -0
- package/.storybook/manager-head.html +92 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.tsx +81 -0
- package/.storybook/styles.scss +25 -0
- package/.storybook/theme.ts +46 -0
- package/.turbo/turbo-build:lib.log +15 -0
- package/CHANGELOG.md +43 -0
- package/lib/cjs/components/Cards/CardGroup/CardGroup.js +41 -0
- package/lib/cjs/components/Cards/CardGroup/index.js +796 -0
- package/lib/cjs/components/Cards/DataCard/DataCard.js +27 -0
- package/lib/cjs/components/Cards/DataCard/index.js +73 -19
- package/lib/cjs/components/Cards/DetailCard/DetailCard.js +20 -0
- package/lib/cjs/components/Cards/DetailCard/index.js +17 -12
- package/lib/cjs/components/Cards/FactlistCard/FactListCard.js +22 -0
- package/lib/cjs/components/Cards/FactlistCard/index.js +16 -15
- package/lib/cjs/components/Cards/FeatureCard/FeatureCard.js +24 -0
- package/lib/cjs/components/Cards/FeatureCard/index.js +31 -16
- package/lib/cjs/components/Cards/MultilinkCard/MultiLinkCard.js +24 -0
- package/lib/cjs/components/Cards/MultilinkCard/index.js +35 -16
- package/lib/cjs/components/Cards/PromoCard/PromoCard.js +23 -0
- package/lib/cjs/components/Cards/PromoCard/index.js +18 -15
- package/lib/cjs/components/Cards/StatCard/StatCard.js +21 -0
- package/lib/cjs/components/Cards/StatCard/index.js +15 -13
- package/lib/cjs/components/Cards/TextCard/TextCard.js +23 -0
- package/lib/cjs/components/Cards/TextCard/index.js +22 -17
- package/lib/cjs/components/Footer/Footer.js +1 -1
- package/lib/cjs/components/List/List.js +9 -11
- package/lib/cjs/components/List/ListItem.js +4 -7
- package/lib/cjs/components/List/index.js +1 -2
- package/lib/cjs/components/Navigation/Navigation.js +3 -3
- package/lib/cjs/components/Pagination/Pagination.js +1 -1
- package/lib/cjs/components/index.js +10 -13
- package/lib/cjs/index.js +10 -13
- package/lib/esm/components/Cards/CardGroup/CardGroup.js +39 -0
- package/lib/esm/components/Cards/CardGroup/index.js +793 -0
- package/lib/esm/components/Cards/DataCard/DataCard.js +25 -0
- package/lib/esm/components/Cards/DataCard/index.js +72 -19
- package/lib/esm/components/Cards/DetailCard/DetailCard.js +18 -0
- package/lib/esm/components/Cards/DetailCard/index.js +16 -12
- package/lib/esm/components/Cards/FactlistCard/FactListCard.js +20 -0
- package/lib/esm/components/Cards/FactlistCard/index.js +15 -15
- package/lib/esm/components/Cards/FeatureCard/FeatureCard.js +22 -0
- package/lib/esm/components/Cards/FeatureCard/index.js +30 -16
- package/lib/esm/components/Cards/MultilinkCard/MultiLinkCard.js +22 -0
- package/lib/esm/components/Cards/MultilinkCard/index.js +34 -16
- package/lib/esm/components/Cards/PromoCard/PromoCard.js +21 -0
- package/lib/esm/components/Cards/PromoCard/index.js +17 -15
- package/lib/esm/components/Cards/StatCard/StatCard.js +19 -0
- package/lib/esm/components/Cards/StatCard/index.js +14 -13
- package/lib/esm/components/Cards/TextCard/TextCard.js +21 -0
- package/lib/esm/components/Cards/TextCard/index.js +21 -17
- package/lib/esm/components/Footer/Footer.js +1 -1
- package/lib/esm/components/List/List.js +10 -12
- package/lib/esm/components/List/ListItem.js +4 -7
- package/lib/esm/components/List/index.js +1 -2
- package/lib/esm/components/Navigation/Navigation.js +3 -3
- package/lib/esm/components/Pagination/Pagination.js +1 -1
- package/lib/esm/components/index.js +9 -11
- package/lib/esm/index.js +9 -11
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.args.d.ts +13 -0
- package/lib/types/react/src/components/Cards/CardGroup/CardGroup.props.d.ts +58 -0
- package/lib/types/react/src/components/Cards/CardGroup/index.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DataCard/DataCard.props.d.ts +50 -0
- package/lib/types/react/src/components/Cards/DataCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/DetailCard/DetailCard.props.d.ts +35 -0
- package/lib/types/react/src/components/Cards/DetailCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FactlistCard/FactListCard.props.d.ts +16 -0
- package/lib/types/react/src/components/Cards/FactlistCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/FeatureCard/FeatureCard.props.d.ts +31 -0
- package/lib/types/react/src/components/Cards/FeatureCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/MultilinkCard/MultiLinkCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.args.d.ts +2 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/MultilinkCard.props.d.ts +25 -0
- package/lib/types/react/src/components/Cards/MultilinkCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/PromoCard/PromoCard.props.d.ts +30 -0
- package/lib/types/react/src/components/Cards/PromoCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/StatCard/StatCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/StatCard/StatCard.props.d.ts +18 -0
- package/lib/types/react/src/components/Cards/StatCard/index.d.ts +3 -4
- package/lib/types/react/src/components/Cards/TextCard/TextCard.args.d.ts +3 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.d.ts +4 -0
- package/lib/types/react/src/components/Cards/TextCard/TextCard.props.d.ts +26 -0
- package/lib/types/react/src/components/Cards/TextCard/index.d.ts +3 -4
- package/lib/types/react/src/components/List/List.props.d.ts +2 -9
- package/lib/types/react/src/components/List/ListItem.props.d.ts +0 -6
- package/lib/types/react/src/components/index.d.ts +1 -1
- package/lib/types/react/src/types/index.d.ts +4 -2
- package/package.json +32 -12
- package/public/react.svg +8 -0
- package/rollup.config.mjs +2 -0
- package/src/__tests__/Accordion.test.tsx +16 -0
- package/src/__tests__/Button.test.tsx +60 -0
- package/src/__tests__/Callout.test.tsx +43 -0
- package/src/__tests__/ContextMenu.test.tsx +19 -0
- package/src/__tests__/Dropdown.test.tsx +38 -0
- package/src/__tests__/Heading.test.tsx +51 -0
- package/src/__tests__/Image.test.tsx +21 -0
- package/src/__tests__/LinkList.test.tsx +17 -0
- package/src/__tests__/List.test.tsx +25 -0
- package/src/__tests__/Loading.test.tsx +33 -0
- package/src/__tests__/Notification.test.tsx +39 -0
- package/src/__tests__/Pagination.test.tsx +58 -0
- package/src/__tests__/Profile.test.tsx +48 -0
- package/src/__tests__/ReadMore.test.tsx +43 -0
- package/src/__tests__/RichText.test.tsx +16 -0
- package/src/__tests__/SearchField.test.tsx +35 -0
- package/src/__tests__/TableOfContents.test.tsx +12 -0
- package/src/__tests__/Tag.test.tsx +10 -0
- package/src/components/Cards/{CardGroup.args.ts → CardGroup/CardGroup.args.ts} +299 -437
- package/src/components/Cards/CardGroup/CardGroup.props.ts +78 -0
- package/src/components/Cards/CardGroup/CardGroup.tsx +54 -0
- package/src/components/Cards/CardGroup/index.tsx +3 -0
- package/src/components/Cards/DataCard/DataCard.args.ts +69 -0
- package/src/components/Cards/DataCard/DataCard.props.ts +60 -0
- package/src/components/Cards/DataCard/DataCard.tsx +107 -0
- package/src/components/Cards/DataCard/index.tsx +3 -107
- package/src/components/Cards/DetailCard/DetailCard.args.ts +17 -0
- package/src/components/Cards/DetailCard/DetailCard.props.ts +43 -0
- package/src/components/Cards/DetailCard/DetailCard.tsx +62 -0
- package/src/components/Cards/DetailCard/index.tsx +3 -62
- package/src/components/Cards/FactlistCard/FactListCard.args.ts +14 -0
- package/src/components/Cards/FactlistCard/FactListCard.props.ts +19 -0
- package/src/components/Cards/FactlistCard/FactListCard.tsx +42 -0
- package/src/components/Cards/FactlistCard/index.tsx +3 -42
- package/src/components/Cards/FeatureCard/FeatureCard.args.ts +30 -0
- package/src/components/Cards/FeatureCard/FeatureCard.props.ts +38 -0
- package/src/components/Cards/FeatureCard/FeatureCard.tsx +69 -0
- package/src/components/Cards/FeatureCard/index.tsx +3 -69
- package/src/components/Cards/MultilinkCard/MultiLinkCard.tsx +76 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.args.ts +33 -0
- package/src/components/Cards/MultilinkCard/MultilinkCard.props.ts +30 -0
- package/src/components/Cards/MultilinkCard/index.tsx +3 -76
- package/src/components/Cards/PromoCard/PromoCard.args.ts +19 -0
- package/src/components/Cards/PromoCard/PromoCard.props.ts +36 -0
- package/src/components/Cards/PromoCard/PromoCard.tsx +60 -0
- package/src/components/Cards/PromoCard/index.tsx +3 -60
- package/src/components/Cards/StatCard/StatCard.args.ts +14 -0
- package/src/components/Cards/StatCard/StatCard.props.ts +21 -0
- package/src/components/Cards/StatCard/StatCard.tsx +36 -0
- package/src/components/Cards/StatCard/index.tsx +3 -36
- package/src/components/Cards/TextCard/TextCard.args.ts +21 -0
- package/src/components/Cards/TextCard/TextCard.props.ts +32 -0
- package/src/components/Cards/TextCard/TextCard.tsx +62 -0
- package/src/components/Cards/TextCard/index.tsx +3 -63
- package/src/components/Footer/Footer.args.ts +4 -16
- package/src/components/Footer/Footer.tsx +41 -37
- package/src/components/List/List.props.ts +2 -10
- package/src/components/List/List.tsx +17 -22
- package/src/components/List/ListItem.props.ts +0 -7
- package/src/components/List/ListItem.tsx +6 -11
- package/src/components/Navigation/Navigation.tsx +5 -5
- package/src/components/Pagination/Pagination.tsx +2 -1
- package/src/components/index.ts +1 -1
- package/src/setup.ts +6 -0
- package/src/stories/Accordion/Accordion.stories.tsx +145 -0
- package/src/stories/Breadcrumb/Breadcrumb.mdx +17 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.tsx +20 -0
- package/src/stories/Button/Button.mdx +94 -0
- package/src/stories/Button/Button.stories.tsx +68 -0
- package/src/stories/Callout/Callout.mdx +35 -0
- package/src/stories/Callout/Callout.stories.tsx +43 -0
- package/src/stories/Card/DataCard.stories.tsx +45 -0
- package/src/stories/Card/DetailCard.stories.tsx +41 -0
- package/src/stories/Card/FactlistCard.stories.tsx +48 -0
- package/src/stories/Card/FeatureCard.stories.tsx +56 -0
- package/src/stories/Card/MultilinkCard.stories.tsx +48 -0
- package/src/stories/Card/PromoCard.stories.tsx +48 -0
- package/src/stories/Card/StatCard.stories.tsx +45 -0
- package/src/stories/Card/TextCard.stories.tsx +45 -0
- package/src/stories/CardGroup/CardGroup.mdx +17 -0
- package/src/stories/CardGroup/CardGroup.stories.tsx +50 -0
- package/src/stories/Checkbox/Checkbox.stories.tsx +118 -0
- package/src/stories/ContextMenu/ContextMenu.stories.tsx +83 -0
- package/src/stories/DatePicker/DatePicker.stories.tsx +110 -0
- package/src/stories/Dropdown/Dropdown.stories.tsx +145 -0
- package/src/stories/Empty/Empty.stories.tsx +53 -0
- package/src/stories/Fieldset/Fieldset.stories.tsx +167 -0
- package/src/stories/FileUpload/FileUpload.stories.tsx +103 -0
- package/src/stories/Footer/Footer.mdx +17 -0
- package/src/stories/Footer/Footer.stories.tsx +15 -0
- package/src/stories/Form/Form.mdx +58 -0
- package/src/stories/Form/Form.stories.tsx +162 -0
- package/src/stories/GetStarted.mdx +57 -0
- package/src/stories/Heading/Heading.stories.tsx +193 -0
- package/src/stories/Hero/Hero.stories.tsx +68 -0
- package/src/stories/Image/Image.stories.tsx +50 -0
- package/src/stories/Link/Link.stories.tsx +81 -0
- package/src/stories/LinkList/LinkList.args.ts +190 -0
- package/src/stories/LinkList/LinkList.stories.tsx +60 -0
- package/src/stories/List/List.stories.tsx +167 -0
- package/src/stories/Loading/Loading.stories.tsx +97 -0
- package/src/stories/LocalNav/LocalNav.mdx +17 -0
- package/src/stories/LocalNav/LocalNav.stories.tsx +15 -0
- package/src/stories/Logo/Logo.stories.tsx +172 -0
- package/src/stories/LogoGrid/LogoGrid.stories.tsx +59 -0
- package/src/stories/Navigation/Navigation.mdx +17 -0
- package/src/stories/Navigation/Navigation.stories.tsx +15 -0
- package/src/stories/Notification/Notification.stories.tsx +187 -0
- package/src/stories/NumberPicker/NumberPicker.stories.tsx +69 -0
- package/src/stories/Pagination/Pagination.stories.tsx +86 -0
- package/src/stories/Profile/Profile.stories.tsx +64 -0
- package/src/stories/Radio/Radio.stories.tsx +232 -0
- package/src/stories/ReadMore/ReadMore.stories.tsx +59 -0
- package/src/stories/RichText/RichText.stories.tsx +63 -0
- package/src/stories/SearchField/SearchField.stories.tsx +91 -0
- package/src/stories/SocialMedia/SocialMedia.stories.tsx +60 -0
- package/src/stories/TableOfContents/TableOfContents.stories.tsx +55 -0
- package/src/stories/Tabs/Tabs.mdx +17 -0
- package/src/stories/Tabs/Tabs.stories.tsx +25 -0
- package/src/stories/Tag/Tag.stories.tsx +130 -0
- package/src/stories/TextInput/TextInput.stories.tsx +100 -0
- package/src/stories/Textarea/Textarea.stories.tsx +147 -0
- package/src/stories/Toggle/Toggle.stories.tsx +99 -0
- package/src/stories/Tooltip/Tooltip.stories.tsx +82 -0
- package/src/stories/Video/Video.stories.tsx +71 -0
- package/src/stories/Welcome.stories.mdx +37 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/welcome.scss +133 -0
- package/src/types/index.ts +6 -2
- package/lib/cjs/ListCtx-14aa546f.js +0 -9
- package/lib/cjs/components/Cards/Card.js +0 -40
- package/lib/cjs/components/Cards/CardGroup.js +0 -33
- package/lib/cjs/components/Cards/index.js +0 -37
- package/lib/esm/ListCtx-da435fdf.js +0 -6
- package/lib/esm/components/Cards/Card.js +0 -38
- package/lib/esm/components/Cards/CardGroup.js +0 -31
- package/lib/esm/components/Cards/index.js +0 -22
- package/lib/types/react/src/components/Cards/Card.d.ts +0 -4
- package/lib/types/react/src/components/Cards/Card.props.d.ts +0 -307
- package/lib/types/react/src/components/Cards/CardGroup.props.d.ts +0 -16
- package/lib/types/react/src/components/Cards/index.d.ts +0 -11
- package/lib/types/react/src/components/List/ListCtx.d.ts +0 -4
- package/src/components/Cards/Card.args.ts +0 -220
- package/src/components/Cards/Card.props.ts +0 -382
- package/src/components/Cards/Card.tsx +0 -36
- package/src/components/Cards/CardGroup.props.ts +0 -19
- package/src/components/Cards/CardGroup.tsx +0 -54
- package/src/components/Cards/index.ts +0 -22
- package/src/components/List/ListCtx.ts +0 -7
- /package/lib/types/react/src/components/Cards/{CardGroup.d.ts → CardGroup/CardGroup.d.ts} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const core = {
|
|
2
|
+
disableTelemetry: true,
|
|
3
|
+
builder: "@storybook/builder-vite",
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export const framework = {
|
|
7
|
+
name: "@storybook/react-vite",
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const stories = [
|
|
11
|
+
"../src/stories/**/*.mdx",
|
|
12
|
+
"../src/stories/**/*.stories.@(js|jsx|ts|tsx)",
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export const docs = {
|
|
16
|
+
defaultName: "Overview",
|
|
17
|
+
autodocs: "tag",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const staticDirs = [
|
|
21
|
+
"../public",
|
|
22
|
+
{ from: "../node_modules/@ilo-org/fonts/font-css", to: "/fonts" },
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const addons = [
|
|
26
|
+
"@storybook/addon-links",
|
|
27
|
+
"@storybook/addon-essentials",
|
|
28
|
+
"@storybook/addon-a11y",
|
|
29
|
+
"@storybook/addon-styling",
|
|
30
|
+
"storybook-addon-rtl-direction",
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const typescript = {
|
|
34
|
+
reactDocgen: "react-docgen-typescript",
|
|
35
|
+
reactDocgenTypescriptOptions: {
|
|
36
|
+
compilerOptions: {
|
|
37
|
+
allowSyntheticDefaultImports: true,
|
|
38
|
+
esModuleInterop: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<!-- .storybook/manager-head.html -->
|
|
2
|
+
<style>
|
|
3
|
+
@import url("/fonts/fonts-google.css");
|
|
4
|
+
@import url("https://fonts.googleapis.com/css2?family=Fira+Code&display=swap");
|
|
5
|
+
</style>
|
|
6
|
+
|
|
7
|
+
<!-- Canonical URL -->
|
|
8
|
+
|
|
9
|
+
<link href="https://react.ui.ilo.org" rel="canonical" />
|
|
10
|
+
|
|
11
|
+
<!-- Favicon -->
|
|
12
|
+
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
|
13
|
+
|
|
14
|
+
<style>
|
|
15
|
+
:root {
|
|
16
|
+
--ilo-white: #fff;
|
|
17
|
+
--ilo-dark-blue: #230050;
|
|
18
|
+
--ilo-light-blue: #ffcd2d;
|
|
19
|
+
--ilo-turquoise: #05d2d2;
|
|
20
|
+
--ilo-purple: #960a55;
|
|
21
|
+
--ilo-light-blue: rgba(235, 245, 253, 1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
font-family: "Noto Sans", sans-serif;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
a[id*="overview"] > svg {
|
|
29
|
+
color: var(--ilo-purple);
|
|
30
|
+
font-family: "Overpass", sans-serif;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a:not[id*="overview"] > svg {
|
|
34
|
+
color: var(--ilo-turquoise);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Remount component */
|
|
38
|
+
button[title="Remount component"]:hover,
|
|
39
|
+
button[title="Zoom in"]:hover,
|
|
40
|
+
button[title="Zoom out"]:hover,
|
|
41
|
+
button[title="Reset zoom"]:hover,
|
|
42
|
+
button[title="Change the background of the preview"]:hover,
|
|
43
|
+
button[title="Apply a grid to the preview"]:hover,
|
|
44
|
+
button[title="Change the size of the preview"]:hover,
|
|
45
|
+
button[title="Enable measure"]:hover,
|
|
46
|
+
button[title="Apply outlines to the preview"]:hover,
|
|
47
|
+
button[title="Vision simulator"]:hover,
|
|
48
|
+
button[title="Go full screen [F]"]:hover,
|
|
49
|
+
a[title="Open canvas in new tab"]:hover,
|
|
50
|
+
button[title="Copy canvas link"]:hover {
|
|
51
|
+
color: var(--ilo-dark-blue);
|
|
52
|
+
background-color: var(--ilo-light-blue);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
button.sto-1qova3h,
|
|
56
|
+
button.sto-4f61h0,
|
|
57
|
+
button[title="Rotate viewport"]:hover {
|
|
58
|
+
color: var(--ilo-light-blue);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
button.tabbutton:active,
|
|
62
|
+
button.tabbutton:focus {
|
|
63
|
+
border-bottom-color: var(--ilo-light-blue);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.realm {
|
|
67
|
+
width: 100%;
|
|
68
|
+
background: transparent;
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
text-align: left;
|
|
71
|
+
font-size: 0.8rem;
|
|
72
|
+
border-top: 1px solid #d3dce3;
|
|
73
|
+
padding-top: 15px;
|
|
74
|
+
color: #1e2dbe;
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
font-family: "Nunito Sans", sans-serif;
|
|
77
|
+
margin-top: -10px;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
window.addEventListener("load", function () {
|
|
83
|
+
const sidebar = document.querySelector(".sidebar-header");
|
|
84
|
+
const customLabel = document.createElement("div");
|
|
85
|
+
customLabel.classList.add("realm");
|
|
86
|
+
customLabel.textContent = "React Components";
|
|
87
|
+
|
|
88
|
+
if (sidebar) {
|
|
89
|
+
sidebar.insertAdjacentElement("afterend", customLabel);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { GlobalProvider } from "../src/components/GlobalProvider";
|
|
2
|
+
import { themeprefix } from "@ilo-org/themes/tokens/theme/base.json";
|
|
3
|
+
import { Decorator } from "@storybook/react";
|
|
4
|
+
import { theme } from "./theme";
|
|
5
|
+
import "./styles.scss";
|
|
6
|
+
import { brand } from "@ilo-org/themes/tokens/brand/base.json";
|
|
7
|
+
|
|
8
|
+
export const parameters = {
|
|
9
|
+
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
10
|
+
controls: {
|
|
11
|
+
expanded: true,
|
|
12
|
+
matchers: {
|
|
13
|
+
color: /(background|color)$/i,
|
|
14
|
+
date: /Date$/,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
options: {
|
|
18
|
+
storySort: {
|
|
19
|
+
method: "alphabetical",
|
|
20
|
+
order: ["Welcome", "GettingStarted"],
|
|
21
|
+
locales: "en-US",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
backgrounds: {
|
|
25
|
+
values: [
|
|
26
|
+
{ name: "light", value: "white" },
|
|
27
|
+
{ name: "dark", value: brand["ilo-dark-blue"].value },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
previewTabs: {
|
|
31
|
+
"storybook/docs/panel": { index: -1 },
|
|
32
|
+
canvas: { title: "Code", hidden: false },
|
|
33
|
+
},
|
|
34
|
+
viewMode: "docs",
|
|
35
|
+
layout: "padded",
|
|
36
|
+
docs: {
|
|
37
|
+
theme: theme,
|
|
38
|
+
source: {
|
|
39
|
+
excludeDecorators: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const decorators: Decorator[] = [
|
|
45
|
+
// Providces the GlobalProvider context to all stories
|
|
46
|
+
(Story) => (
|
|
47
|
+
<GlobalProvider prefix={themeprefix.value}>
|
|
48
|
+
<Story />
|
|
49
|
+
</GlobalProvider>
|
|
50
|
+
),
|
|
51
|
+
// Wraps components in story mode
|
|
52
|
+
(Story, ctx) => {
|
|
53
|
+
// Should this story be rendered in full width?
|
|
54
|
+
const fullWidthStories = ["footer", "localnav", "navigation", "hero"];
|
|
55
|
+
const isFullWidth = fullWidthStories.some((story) =>
|
|
56
|
+
ctx.title.toLocaleLowerCase().includes(story)
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
if (ctx.viewMode === "story") {
|
|
60
|
+
if (isFullWidth) {
|
|
61
|
+
return <Story />;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div className="story-decorator-wrapper ">
|
|
66
|
+
<div className="story-decorator">
|
|
67
|
+
<Story />
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return <Story />;
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
export const globalTypes = {
|
|
77
|
+
rtlDirection: {
|
|
78
|
+
description: "HTML dir attribute",
|
|
79
|
+
defaultValue: false,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@import "@ilo-org/themes/build/scss/tokens";
|
|
2
|
+
@import "@ilo-org/styles/scss/monorepo";
|
|
3
|
+
|
|
4
|
+
h1,
|
|
5
|
+
h2,
|
|
6
|
+
h3,
|
|
7
|
+
h4,
|
|
8
|
+
h5 {
|
|
9
|
+
font-family: "Overpass", sans-serif !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
button[title="Zoom in"]:hover,
|
|
13
|
+
button[title="Zoom out"]:hover,
|
|
14
|
+
button[title="Reset zoom"]:hover {
|
|
15
|
+
color: $brand-ilo-dark-blue;
|
|
16
|
+
background-color: $brand-ilo-light-blue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
a[class*="ilo--button"] {
|
|
20
|
+
color: $brand-ilo-dark-blue;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
color: $brand-ilo-blue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// .storybook/YourTheme.js
|
|
2
|
+
|
|
3
|
+
import { create } from "@storybook/theming/create";
|
|
4
|
+
import ilo_logo from "@ilo-org/brand-assets/logo_en_horizontal_blue.svg";
|
|
5
|
+
import brandColors from "@ilo-org/themes/tokens/brand/base.json";
|
|
6
|
+
|
|
7
|
+
const { brand } = brandColors;
|
|
8
|
+
|
|
9
|
+
export const theme = create({
|
|
10
|
+
base: "light",
|
|
11
|
+
brandTitle: "ILO Design System for React",
|
|
12
|
+
brandUrl: "https://www.ilo.org/",
|
|
13
|
+
brandImage: ilo_logo,
|
|
14
|
+
brandTarget: "_self",
|
|
15
|
+
|
|
16
|
+
colorPrimary: brand["ilo-dark-blue"].value,
|
|
17
|
+
colorSecondary: brand["ilo-blue"].value,
|
|
18
|
+
|
|
19
|
+
// UI
|
|
20
|
+
appBg: brand["ilo-light-blue"].value,
|
|
21
|
+
appContentBg: brand["ilo-white"].value,
|
|
22
|
+
appBorderColor: brand["ilo-grey-ui"].value,
|
|
23
|
+
appBorderRadius: 0,
|
|
24
|
+
|
|
25
|
+
fontBase: "'Noto Sans', sans-serif",
|
|
26
|
+
fontCode: "'Fira Code', monospace",
|
|
27
|
+
|
|
28
|
+
// Text colors
|
|
29
|
+
textColor: brand["ilo-dark-blue"].value,
|
|
30
|
+
textInverseColor: brand["ilo-white"].value,
|
|
31
|
+
textMutedColor: brand["ilo-grey-accessible"].value,
|
|
32
|
+
|
|
33
|
+
// Toolbar default and active colors
|
|
34
|
+
barTextColor: brand["ilo-white"].value,
|
|
35
|
+
barSelectedColor: brand["ilo-yellow"].value,
|
|
36
|
+
barBg: brand["ilo-dark-blue"].value,
|
|
37
|
+
|
|
38
|
+
buttonBg: brand["ilo-white"].value,
|
|
39
|
+
buttonBorder: brand["ilo-grey-ui"].value,
|
|
40
|
+
booleanBg: brand["ilo-light-blue"].value,
|
|
41
|
+
booleanSelectedBg: brand["ilo-white"].value,
|
|
42
|
+
inputBg: brand["ilo-light-blue"].value,
|
|
43
|
+
inputBorder: brand["ilo-grey-ui"].value,
|
|
44
|
+
inputTextColor: brand["ilo-dark-blue"].value,
|
|
45
|
+
inputBorderRadius: 3,
|
|
46
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
> @ilo-org/react@0.14.0 build:lib /home/runner/work/designsystem/designsystem/packages/react
|
|
3
|
+
> rollup -c
|
|
4
|
+
|
|
5
|
+
[36m
|
|
6
|
+
[1msrc/index.ts, src/components/**/index.ts, src/components/**/*.tsx, src/hooks/*.ts, src/utils/*.ts[22m → [1mlib/esm, lib/cjs[22m...[39m
|
|
7
|
+
[1m[33m(!) Mixing named and default exports[39m[22m
|
|
8
|
+
[90mhttps://rollupjs.org/configuration-options/#output-exports[39m
|
|
9
|
+
[1mThe following entry modules are using named and default exports together:[22m
|
|
10
|
+
src/components/Fieldset/Fieldset.tsx
|
|
11
|
+
src/components/FormControl/FormControl.tsx
|
|
12
|
+
src/hooks/usePrevious.ts
|
|
13
|
+
|
|
14
|
+
Consumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
15
|
+
[32mcreated [1mlib/esm, lib/cjs[22m in [1m16s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @ilo-org/react
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 977e15006: Fixes a bug where some distribution assets weren't getting included in Design System packages while a lot of non-essential development assets were. At the same time, this removes some `src` directories from the packages which some consumers might have been using.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 0d38e6428: Update video.js types
|
|
12
|
+
- f226b7be3: added home screen
|
|
13
|
+
- 8e6c502a7: Fixes some layout issues in List that caused parts of the list item numbers to get chopped off in ordered lists when they were rendered in containers with hidden overflow, as well as some incorrect rendering in RTL layouts.
|
|
14
|
+
- f5a78ab73: Fix profile hover in dark mode in text card
|
|
15
|
+
- 92f05c1fe: commonjs module resolution
|
|
16
|
+
- Updated dependencies [3ceaceaa3]
|
|
17
|
+
- Updated dependencies [13bcd92df]
|
|
18
|
+
- Updated dependencies [8e6c502a7]
|
|
19
|
+
- Updated dependencies [f5a78ab73]
|
|
20
|
+
- Updated dependencies [d0a08d7c3]
|
|
21
|
+
- Updated dependencies [977e15006]
|
|
22
|
+
- @ilo-org/styles@0.16.0
|
|
23
|
+
- @ilo-org/brand-assets@0.5.0
|
|
24
|
+
- @ilo-org/fonts@0.2.0
|
|
25
|
+
- @ilo-org/icons-react@0.1.0
|
|
26
|
+
- @ilo-org/themes@0.8.0
|
|
27
|
+
- @ilo-org/utils@0.1.0
|
|
28
|
+
|
|
29
|
+
## 0.13.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- 16e117853: Refactor card group to fix styles and use individual card components
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- de97f52fc: removed extra dirs from bundle
|
|
38
|
+
- 10dadfad7: Fix design bug in pagination for rtl
|
|
39
|
+
- 53c5be426: Sync footer and navigation markup with twig
|
|
40
|
+
- 65f03a82a: Fix tagline on navigation
|
|
41
|
+
- Updated dependencies [7e1460a88]
|
|
42
|
+
- Updated dependencies [10dadfad7]
|
|
43
|
+
- Updated dependencies [5bc989f5d]
|
|
44
|
+
- @ilo-org/styles@0.15.0
|
|
45
|
+
|
|
3
46
|
## 0.12.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var hooks_useGlobalSettings = require('../../../hooks/useGlobalSettings.js');
|
|
6
|
+
var components_Cards_DataCard_DataCard = require('../DataCard/DataCard.js');
|
|
7
|
+
var components_Cards_DetailCard_DetailCard = require('../DetailCard/DetailCard.js');
|
|
8
|
+
var components_Cards_FactlistCard_FactListCard = require('../FactlistCard/FactListCard.js');
|
|
9
|
+
var components_Cards_FeatureCard_FeatureCard = require('../FeatureCard/FeatureCard.js');
|
|
10
|
+
var components_Cards_MultilinkCard_MultiLinkCard = require('../MultilinkCard/MultiLinkCard.js');
|
|
11
|
+
var components_Cards_PromoCard_PromoCard = require('../PromoCard/PromoCard.js');
|
|
12
|
+
var components_Cards_StatCard_StatCard = require('../StatCard/StatCard.js');
|
|
13
|
+
var components_Cards_TextCard_TextCard = require('../TextCard/TextCard.js');
|
|
14
|
+
require('tslib');
|
|
15
|
+
require('react');
|
|
16
|
+
require('../../../GlobalCtx-10114bdd.js');
|
|
17
|
+
require('../../Link/Link.js');
|
|
18
|
+
require('../../List/List.js');
|
|
19
|
+
require('../../List/ListItem.js');
|
|
20
|
+
require('../../LinkList/LinkList.js');
|
|
21
|
+
require('../../Profile/Profile.js');
|
|
22
|
+
|
|
23
|
+
const cardMapper = {
|
|
24
|
+
stat: components_Cards_StatCard_StatCard,
|
|
25
|
+
multilink: components_Cards_MultilinkCard_MultiLinkCard,
|
|
26
|
+
text: components_Cards_TextCard_TextCard,
|
|
27
|
+
promo: components_Cards_PromoCard_PromoCard,
|
|
28
|
+
feature: components_Cards_FeatureCard_FeatureCard,
|
|
29
|
+
detail: components_Cards_DetailCard_DetailCard,
|
|
30
|
+
factlist: components_Cards_FactlistCard_FactListCard,
|
|
31
|
+
data: components_Cards_DataCard_DataCard,
|
|
32
|
+
};
|
|
33
|
+
const CardGroup = ({ cards, cardCount, cta, type }) => {
|
|
34
|
+
const Cards = cardMapper[type];
|
|
35
|
+
const { prefix } = hooks_useGlobalSettings();
|
|
36
|
+
const baseClass = `${prefix}--cardgroup`;
|
|
37
|
+
const cardGroupClasses = classNames(baseClass, `${baseClass}__count__${cardCount}`);
|
|
38
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: cardGroupClasses }, { children: [jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--inner` }, { children: cards && cards.map((card, index) => jsxRuntime.jsx(Cards, Object.assign({}, card), index)) })), cta && (jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--button-wrap` }, { children: jsxRuntime.jsx("a", Object.assign({ className: `${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`, href: cta.url }, { children: jsxRuntime.jsx("span", Object.assign({ className: "button__label" }, { children: cta.label })) })) })))] })));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
module.exports = CardGroup;
|