@ogcio/design-system-react 1.31.1 → 1.33.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/dist/Heading.d.ts +5 -0
- package/dist/Heading.js +22 -0
- package/dist/accordion/accordion-item.js +62 -57
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +40 -57
- package/dist/alert/variants.d.ts +49 -52
- package/dist/alert/variants.js +17 -18
- package/dist/atoms/{DsButton.d.ts → Button.d.ts} +5 -5
- package/dist/atoms/{DsButton.js → Button.js} +22 -36
- package/dist/atoms/heading/H1.d.ts +3 -0
- package/dist/atoms/heading/H1.js +20 -0
- package/dist/atoms/heading/H2.d.ts +3 -0
- package/dist/atoms/heading/H2.js +20 -0
- package/dist/atoms/heading/H3.d.ts +3 -0
- package/dist/atoms/heading/H3.js +20 -0
- package/dist/atoms/heading/H4.d.ts +3 -0
- package/dist/atoms/heading/H4.js +20 -0
- package/dist/atoms/heading/H5.d.ts +3 -0
- package/dist/atoms/heading/H5.js +20 -0
- package/dist/atoms/heading/H6.d.ts +3 -0
- package/dist/atoms/heading/H6.js +20 -0
- package/dist/atoms/heading/index.d.ts +9 -0
- package/dist/atoms/heading/index.js +18 -0
- package/dist/atoms/heading/styles.d.ts +65 -0
- package/dist/atoms/heading/styles.js +17 -0
- package/dist/atoms/heading/types.d.ts +15 -0
- package/dist/atoms/heading/types.js +11 -0
- package/dist/atoms/heading/utils.d.ts +2 -0
- package/dist/atoms/heading/utils.js +5 -0
- package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/ArrowLeft.js +23 -0
- package/dist/atoms/icons/ArrowRight.d.ts +3 -0
- package/dist/atoms/icons/ArrowRight.js +23 -0
- package/dist/atoms/icons/CheckCircle.d.ts +3 -0
- package/dist/atoms/icons/CheckCircle.js +23 -0
- package/dist/atoms/icons/Error.d.ts +3 -0
- package/dist/atoms/icons/Error.js +23 -0
- package/dist/atoms/icons/FirstPage.d.ts +3 -0
- package/dist/atoms/icons/FirstPage.js +23 -0
- package/dist/atoms/icons/Info.d.ts +3 -0
- package/dist/atoms/icons/Info.js +23 -0
- package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
- package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
- package/dist/atoms/icons/LastPage.d.ts +3 -0
- package/dist/atoms/icons/LastPage.js +23 -0
- package/dist/atoms/icons/Warning.d.ts +3 -0
- package/dist/atoms/icons/Warning.js +23 -0
- package/dist/atoms/icons/index.d.ts +12 -2
- package/dist/atoms/icons/index.js +30 -10
- package/dist/atoms/index.d.ts +2 -1
- package/dist/atoms/index.js +48 -12
- package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
- package/dist/atoms/storybook/Heading.meta.js +70 -0
- package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
- package/dist/atoms/storybook/Icons.meta.js +130 -0
- package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
- package/dist/atoms/storybook/InsetText.meta.js +64 -0
- package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
- package/dist/atoms/storybook/Logos.meta.js +54 -0
- package/dist/breadcrumbs/breadcrumbs.js +20 -19
- package/dist/button/button.d.ts +2 -9
- package/dist/button/button.js +65 -32
- package/dist/button/helpers.d.ts +2 -1
- package/dist/button/types.d.ts +25 -8
- package/dist/button-group/button-group.js +43 -45
- package/dist/button-group/types.d.ts +5 -5
- package/dist/card/card-legacy.js +1 -1
- package/dist/card/types.d.ts +1 -1
- package/dist/combo-box/dropdown-item.js +1 -1
- package/dist/cookie-banner/cookie-banner.d.ts +1 -1
- package/dist/data-table/data-table-header.js +1 -1
- package/dist/drawer/drawer.d.ts +1 -1
- package/dist/drawer/drawer.js +17 -17
- package/dist/error-text/error-text.js +28 -27
- package/dist/forms/form-field/form-field.js +24 -25
- package/dist/header/components/header-menu.js +21 -21
- package/dist/header/components/header-search.js +5 -5
- package/dist/hint-text/hint-text.js +26 -20
- package/dist/icon/icon.js +85 -63
- package/dist/icon/icons.d.ts +1 -1
- package/dist/icon-button/icon-button.d.ts +3 -5
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +19 -10
- package/dist/index-Bh2cTIps.js +33899 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/input-text/input-text.js +1 -1
- package/dist/input-text/type.d.ts +1 -1
- package/dist/label/label.d.ts +78 -30
- package/dist/label/label.js +29 -14
- package/dist/modal/modal.content.js +1 -1
- package/dist/modal/modal.d.ts +1 -1
- package/dist/modal/modal.js +39 -39
- package/dist/modal/types.d.ts +5 -4
- package/dist/pagination/pagination.js +137 -134
- package/dist/paragraph/paragraph.d.ts +1 -1
- package/dist/paragraph/paragraph.js +13 -11
- package/dist/score-select/type.d.ts +2 -2
- package/dist/select/select-next.js +87 -87
- package/dist/side-nav/side-nav.js +4 -4
- package/dist/side-nav/types.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/table-pagination.js +17 -13
- package/dist/tabs/tab-item.js +53 -71
- package/dist/tabs/variants.d.ts +269 -0
- package/dist/tabs/variants.js +87 -0
- package/dist/tooltip/tooltip.js +27 -35
- package/dist/tooltip/variants.d.ts +115 -0
- package/dist/tooltip/variants.js +59 -0
- package/package.json +7 -6
- package/dist/heading/heading.d.ts +0 -150
- package/dist/heading/heading.js +0 -50
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
function t(a) {
|
|
3
|
+
return /* @__PURE__ */ e(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
viewBox: "0 -960 960 960",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: a.size ?? 24,
|
|
9
|
+
height: a.size ?? 24,
|
|
10
|
+
className: a.className,
|
|
11
|
+
id: a.id,
|
|
12
|
+
role: a.label ? "img" : void 0,
|
|
13
|
+
"aria-label": a.label,
|
|
14
|
+
"aria-hidden": !a.label,
|
|
15
|
+
fill: a.color ?? "currentColor",
|
|
16
|
+
"data-testid": a.dataTestId ?? "last_page",
|
|
17
|
+
children: /* @__PURE__ */ e("path", { d: "m280-240-56-56 184-184-184-184 56-56 240 240-240 240Zm360 0v-480h80v480h-80Z" })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
t as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
function i(a) {
|
|
3
|
+
return /* @__PURE__ */ t(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
viewBox: "0 -960 960 960",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: a.size ?? 24,
|
|
9
|
+
height: a.size ?? 24,
|
|
10
|
+
className: a.className,
|
|
11
|
+
id: a.id,
|
|
12
|
+
role: a.label ? "img" : void 0,
|
|
13
|
+
"aria-label": a.label,
|
|
14
|
+
"aria-hidden": !a.label,
|
|
15
|
+
fill: a.color ?? "currentColor",
|
|
16
|
+
"data-testid": a.dataTestId ?? "warning",
|
|
17
|
+
children: /* @__PURE__ */ t("path", { d: "m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm330.5-51.5Q520-263 520-280t-11.5-28.5Q497-320 480-320t-28.5 11.5Q440-297 440-280t11.5 28.5Q463-240 480-240t28.5-11.5ZM440-360h80v-200h-80v200Zm40-100Z" })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
i as default
|
|
23
|
+
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
export { default as KeyboardArrowDown } from './KeyboardArrowDown';
|
|
2
|
-
export { default as KeyboardArrowUp } from './KeyboardArrowUp';
|
|
3
1
|
export { default as Close } from './Close';
|
|
4
2
|
export { default as Visibility } from './Visibility';
|
|
5
3
|
export { default as VisibilityOff } from './VisibilityOff';
|
|
4
|
+
export { default as KeyboardArrowLeft } from './KeyboardArrowLeft';
|
|
5
|
+
export { default as KeyboardArrowRight } from './KeyboardArrowRight';
|
|
6
|
+
export { default as KeyboardArrowDown } from './KeyboardArrowDown';
|
|
7
|
+
export { default as KeyboardArrowUp } from './KeyboardArrowUp';
|
|
8
|
+
export { default as ArrowLeft } from './ArrowLeft';
|
|
9
|
+
export { default as ArrowRight } from './ArrowRight';
|
|
10
|
+
export { default as FirstPage } from './FirstPage';
|
|
11
|
+
export { default as LastPage } from './LastPage';
|
|
12
|
+
export { default as Info } from './Info';
|
|
13
|
+
export { default as Error } from './Error';
|
|
14
|
+
export { default as Warning } from './Warning';
|
|
15
|
+
export { default as CheckCircle } from './CheckCircle';
|
|
6
16
|
export * from './types';
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import { default as e } from "./
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
1
|
+
import { default as e } from "./Close.js";
|
|
2
|
+
import { default as t } from "./Visibility.js";
|
|
3
|
+
import { default as s } from "./VisibilityOff.js";
|
|
4
|
+
import { default as l } from "./KeyboardArrowLeft.js";
|
|
5
|
+
import { default as m } from "./KeyboardArrowRight.js";
|
|
6
|
+
import { default as x } from "./KeyboardArrowDown.js";
|
|
7
|
+
import { default as w } from "./KeyboardArrowUp.js";
|
|
8
|
+
import { default as y } from "./ArrowLeft.js";
|
|
9
|
+
import { default as g } from "./ArrowRight.js";
|
|
10
|
+
import { default as K } from "./FirstPage.js";
|
|
11
|
+
import { default as C } from "./LastPage.js";
|
|
12
|
+
import { default as c } from "./Info.js";
|
|
13
|
+
import { default as R } from "./Error.js";
|
|
14
|
+
import { default as k } from "./Warning.js";
|
|
15
|
+
import { default as E } from "./CheckCircle.js";
|
|
6
16
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
y as ArrowLeft,
|
|
18
|
+
g as ArrowRight,
|
|
19
|
+
E as CheckCircle,
|
|
20
|
+
e as Close,
|
|
21
|
+
R as Error,
|
|
22
|
+
K as FirstPage,
|
|
23
|
+
c as Info,
|
|
24
|
+
x as KeyboardArrowDown,
|
|
25
|
+
l as KeyboardArrowLeft,
|
|
26
|
+
m as KeyboardArrowRight,
|
|
27
|
+
w as KeyboardArrowUp,
|
|
28
|
+
C as LastPage,
|
|
29
|
+
t as Visibility,
|
|
30
|
+
s as VisibilityOff,
|
|
31
|
+
k as Warning
|
|
12
32
|
};
|
package/dist/atoms/index.d.ts
CHANGED
package/dist/atoms/index.js
CHANGED
|
@@ -1,16 +1,52 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as o } from "./Button.js";
|
|
2
2
|
import { default as a } from "./InsetText.js";
|
|
3
|
-
import { default as s } from "./
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
3
|
+
import { default as s } from "./heading/H1.js";
|
|
4
|
+
import { default as l } from "./heading/H2.js";
|
|
5
|
+
import { default as x } from "./heading/H3.js";
|
|
6
|
+
import { default as u } from "./heading/H4.js";
|
|
7
|
+
import { default as g } from "./heading/H5.js";
|
|
8
|
+
import { default as w } from "./heading/H6.js";
|
|
9
|
+
import { default as b } from "./heading/styles.js";
|
|
10
|
+
import { getSize as H } from "./heading/utils.js";
|
|
11
|
+
import { default as K } from "./icons/Close.js";
|
|
12
|
+
import { default as L } from "./icons/Visibility.js";
|
|
13
|
+
import { default as I } from "./icons/VisibilityOff.js";
|
|
14
|
+
import { default as R } from "./icons/KeyboardArrowLeft.js";
|
|
15
|
+
import { default as V } from "./icons/KeyboardArrowRight.js";
|
|
16
|
+
import { default as z } from "./icons/KeyboardArrowDown.js";
|
|
17
|
+
import { default as D } from "./icons/KeyboardArrowUp.js";
|
|
18
|
+
import { default as F } from "./icons/ArrowLeft.js";
|
|
19
|
+
import { default as T } from "./icons/ArrowRight.js";
|
|
20
|
+
import { default as W } from "./icons/FirstPage.js";
|
|
21
|
+
import { default as q } from "./icons/LastPage.js";
|
|
22
|
+
import { default as G } from "./icons/Info.js";
|
|
23
|
+
import { default as M } from "./icons/Error.js";
|
|
24
|
+
import { default as Q } from "./icons/Warning.js";
|
|
25
|
+
import { default as Y } from "./icons/CheckCircle.js";
|
|
8
26
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
27
|
+
F as ArrowLeft,
|
|
28
|
+
T as ArrowRight,
|
|
29
|
+
o as Button,
|
|
30
|
+
Y as CheckCircle,
|
|
31
|
+
K as Close,
|
|
32
|
+
M as Error,
|
|
33
|
+
W as FirstPage,
|
|
34
|
+
s as H1,
|
|
35
|
+
l as H2,
|
|
36
|
+
x as H3,
|
|
37
|
+
u as H4,
|
|
38
|
+
g as H5,
|
|
39
|
+
w as H6,
|
|
40
|
+
G as Info,
|
|
11
41
|
a as InsetText,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
42
|
+
z as KeyboardArrowDown,
|
|
43
|
+
R as KeyboardArrowLeft,
|
|
44
|
+
V as KeyboardArrowRight,
|
|
45
|
+
D as KeyboardArrowUp,
|
|
46
|
+
q as LastPage,
|
|
47
|
+
L as Visibility,
|
|
48
|
+
I as VisibilityOff,
|
|
49
|
+
Q as Warning,
|
|
50
|
+
H as getSize,
|
|
51
|
+
b as headingStyles
|
|
16
52
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { StoryContext, Renderer } from '@storybook/types';
|
|
2
|
+
export declare const headingMeta: {
|
|
3
|
+
tags: string[];
|
|
4
|
+
title: string;
|
|
5
|
+
args: {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
readonly size: {
|
|
10
|
+
readonly control: {
|
|
11
|
+
readonly type: "select";
|
|
12
|
+
};
|
|
13
|
+
readonly options: readonly ["", ...("sm" | "md" | "lg" | "xl" | "xs" | "2xs")[]];
|
|
14
|
+
readonly description: "Font size of the heading. Defaults to the size mapped to the heading level.";
|
|
15
|
+
readonly table: {
|
|
16
|
+
readonly type: {
|
|
17
|
+
readonly summary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly id: {
|
|
22
|
+
readonly control: false;
|
|
23
|
+
readonly description: "Optional id for linking/targeting and aria references.";
|
|
24
|
+
};
|
|
25
|
+
readonly className: {
|
|
26
|
+
readonly control: false;
|
|
27
|
+
readonly description: "Additional CSS classes to apply to the heading element.";
|
|
28
|
+
readonly table: {
|
|
29
|
+
readonly type: {
|
|
30
|
+
readonly summary: "string";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly dataTestId: {
|
|
35
|
+
readonly control: false;
|
|
36
|
+
readonly description: "Test id for targeting the element in automated tests.";
|
|
37
|
+
readonly table: {
|
|
38
|
+
readonly type: {
|
|
39
|
+
readonly summary: "string";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
parameters: {
|
|
45
|
+
docs: {
|
|
46
|
+
description: {
|
|
47
|
+
component: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const Default: {
|
|
53
|
+
tags: string[];
|
|
54
|
+
args: {
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const AllHeadingLevels: {
|
|
59
|
+
play: ({ canvasElement, step }: StoryContext<Renderer>) => Promise<void>;
|
|
60
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { K as i, n as t } from "../../index-Bh2cTIps.js";
|
|
2
|
+
import { Size as s } from "../heading/types.js";
|
|
3
|
+
const o = {
|
|
4
|
+
tags: ["autodocs"],
|
|
5
|
+
title: "Typography/Heading",
|
|
6
|
+
args: {
|
|
7
|
+
id: "heading-id"
|
|
8
|
+
},
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "select"
|
|
13
|
+
},
|
|
14
|
+
options: ["", ...Object.values(s)],
|
|
15
|
+
description: "Font size of the heading. Defaults to the size mapped to the heading level.",
|
|
16
|
+
table: {
|
|
17
|
+
type: {
|
|
18
|
+
summary: Object.values(s).map((a) => `"${a}"`).join(" | ")
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
id: {
|
|
23
|
+
control: !1,
|
|
24
|
+
description: "Optional id for linking/targeting and aria references."
|
|
25
|
+
},
|
|
26
|
+
className: {
|
|
27
|
+
control: !1,
|
|
28
|
+
description: "Additional CSS classes to apply to the heading element.",
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: "string"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
dataTestId: {
|
|
36
|
+
control: !1,
|
|
37
|
+
description: "Test id for targeting the element in automated tests.",
|
|
38
|
+
table: {
|
|
39
|
+
type: {
|
|
40
|
+
summary: "string"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
parameters: {
|
|
46
|
+
docs: {
|
|
47
|
+
description: {
|
|
48
|
+
component: "Heading component for rendering semantic heading elements (h1–h6) with consistent typography styles."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, r = {
|
|
53
|
+
tags: ["skip-playwright"],
|
|
54
|
+
args: o.args
|
|
55
|
+
}, l = {
|
|
56
|
+
play: async ({
|
|
57
|
+
canvasElement: a,
|
|
58
|
+
step: n
|
|
59
|
+
}) => {
|
|
60
|
+
const e = i(a);
|
|
61
|
+
await n("renders h1 to h6 with the correct semantic tags", async () => {
|
|
62
|
+
t(e.getByTestId("heading-1").tagName).toBe("H1"), t(e.getByTestId("heading-2").tagName).toBe("H2"), t(e.getByTestId("heading-3").tagName).toBe("H3"), t(e.getByTestId("heading-4").tagName).toBe("H4"), t(e.getByTestId("heading-5").tagName).toBe("H5"), t(e.getByTestId("heading-6").tagName).toBe("H6");
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
l as AllHeadingLevels,
|
|
68
|
+
r as Default,
|
|
69
|
+
o as headingMeta
|
|
70
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { StoryContext, Renderer } from '@storybook/types';
|
|
2
|
+
import { default as ArrowLeft } from '../icons/ArrowLeft';
|
|
3
|
+
export declare const iconList: {
|
|
4
|
+
Component: typeof ArrowLeft;
|
|
5
|
+
name: string;
|
|
6
|
+
selector: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const iconsMeta: {
|
|
9
|
+
tags: string[];
|
|
10
|
+
title: string;
|
|
11
|
+
args: {
|
|
12
|
+
size: number;
|
|
13
|
+
color: string;
|
|
14
|
+
label: string;
|
|
15
|
+
className: string;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
size: {
|
|
19
|
+
control: "number";
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
color: {
|
|
23
|
+
control: "color";
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
label: {
|
|
27
|
+
control: "text";
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
className: {
|
|
31
|
+
control: "text";
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const Default: {
|
|
44
|
+
args: {
|
|
45
|
+
size: number;
|
|
46
|
+
color: string;
|
|
47
|
+
label: string;
|
|
48
|
+
className: string;
|
|
49
|
+
};
|
|
50
|
+
play: ({ canvasElement, step }: StoryContext<Renderer>) => Promise<void>;
|
|
51
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { K as n, n as i } from "../../index-Bh2cTIps.js";
|
|
2
|
+
import a from "../icons/ArrowLeft.js";
|
|
3
|
+
import s from "../icons/ArrowRight.js";
|
|
4
|
+
import c from "../icons/CheckCircle.js";
|
|
5
|
+
import m from "../icons/Close.js";
|
|
6
|
+
import l from "../icons/Error.js";
|
|
7
|
+
import p from "../icons/FirstPage.js";
|
|
8
|
+
import f from "../icons/Info.js";
|
|
9
|
+
import d from "../icons/KeyboardArrowDown.js";
|
|
10
|
+
import y from "../icons/KeyboardArrowLeft.js";
|
|
11
|
+
import b from "../icons/KeyboardArrowRight.js";
|
|
12
|
+
import g from "../icons/KeyboardArrowUp.js";
|
|
13
|
+
import C from "../icons/LastPage.js";
|
|
14
|
+
import w from "../icons/Visibility.js";
|
|
15
|
+
import h from "../icons/VisibilityOff.js";
|
|
16
|
+
import A from "../icons/Warning.js";
|
|
17
|
+
const u = [{
|
|
18
|
+
Component: a,
|
|
19
|
+
name: "ArrowLeft",
|
|
20
|
+
selector: "arrow-left"
|
|
21
|
+
}, {
|
|
22
|
+
Component: s,
|
|
23
|
+
name: "ArrowRight",
|
|
24
|
+
selector: "arrow-right"
|
|
25
|
+
}, {
|
|
26
|
+
Component: c,
|
|
27
|
+
name: "CheckCircle",
|
|
28
|
+
selector: "check-circle"
|
|
29
|
+
}, {
|
|
30
|
+
Component: m,
|
|
31
|
+
name: "Close",
|
|
32
|
+
selector: "close"
|
|
33
|
+
}, {
|
|
34
|
+
Component: l,
|
|
35
|
+
name: "Error",
|
|
36
|
+
selector: "error"
|
|
37
|
+
}, {
|
|
38
|
+
Component: p,
|
|
39
|
+
name: "FirstPage",
|
|
40
|
+
selector: "first-page"
|
|
41
|
+
}, {
|
|
42
|
+
Component: f,
|
|
43
|
+
name: "Info",
|
|
44
|
+
selector: "info"
|
|
45
|
+
}, {
|
|
46
|
+
Component: d,
|
|
47
|
+
name: "KeyboardArrowDown",
|
|
48
|
+
selector: "keyboard-arrow-down"
|
|
49
|
+
}, {
|
|
50
|
+
Component: y,
|
|
51
|
+
name: "KeyboardArrowLeft",
|
|
52
|
+
selector: "keyboard-arrow-left"
|
|
53
|
+
}, {
|
|
54
|
+
Component: b,
|
|
55
|
+
name: "KeyboardArrowRight",
|
|
56
|
+
selector: "keyboard-arrow-right"
|
|
57
|
+
}, {
|
|
58
|
+
Component: g,
|
|
59
|
+
name: "KeyboardArrowUp",
|
|
60
|
+
selector: "keyboard-arrow-up"
|
|
61
|
+
}, {
|
|
62
|
+
Component: C,
|
|
63
|
+
name: "LastPage",
|
|
64
|
+
selector: "last-page"
|
|
65
|
+
}, {
|
|
66
|
+
Component: w,
|
|
67
|
+
name: "Visibility",
|
|
68
|
+
selector: "visibility"
|
|
69
|
+
}, {
|
|
70
|
+
Component: h,
|
|
71
|
+
name: "VisibilityOff",
|
|
72
|
+
selector: "visibility-off"
|
|
73
|
+
}, {
|
|
74
|
+
Component: A,
|
|
75
|
+
name: "Warning",
|
|
76
|
+
selector: "warning"
|
|
77
|
+
}], K = {
|
|
78
|
+
tags: ["autodocs"],
|
|
79
|
+
title: "Foundation/Icons",
|
|
80
|
+
args: {
|
|
81
|
+
size: 48,
|
|
82
|
+
color: "currentColor",
|
|
83
|
+
label: "",
|
|
84
|
+
className: ""
|
|
85
|
+
},
|
|
86
|
+
argTypes: {
|
|
87
|
+
size: {
|
|
88
|
+
control: "number",
|
|
89
|
+
description: "Width and height of the icon in pixels."
|
|
90
|
+
},
|
|
91
|
+
color: {
|
|
92
|
+
control: "color",
|
|
93
|
+
description: "Fill colour — defaults to `currentColor`."
|
|
94
|
+
},
|
|
95
|
+
label: {
|
|
96
|
+
control: "text",
|
|
97
|
+
description: 'Accessible label. When set, renders `role="img"` and `aria-label`. When empty, the icon is hidden from assistive technology via `aria-hidden`.'
|
|
98
|
+
},
|
|
99
|
+
className: {
|
|
100
|
+
control: "text",
|
|
101
|
+
description: "Additional CSS class names."
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
parameters: {
|
|
105
|
+
docs: {
|
|
106
|
+
description: {
|
|
107
|
+
component: "Use icons to visually reinforce actions, status, and navigation. Icons accept a `size` prop (in pixels), an optional `color`, and a `label` for accessibility."
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, E = {
|
|
112
|
+
args: K.args,
|
|
113
|
+
play: async ({
|
|
114
|
+
canvasElement: e,
|
|
115
|
+
step: r
|
|
116
|
+
}) => {
|
|
117
|
+
const t = n(e);
|
|
118
|
+
for (const {
|
|
119
|
+
selector: o
|
|
120
|
+
} of u)
|
|
121
|
+
await r(`renders ${o} icon`, async () => {
|
|
122
|
+
i(t.getByTestId(o)).toBeInTheDocument();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
E as Default,
|
|
128
|
+
u as iconList,
|
|
129
|
+
K as iconsMeta
|
|
130
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StoryContext, Renderer } from '@storybook/types';
|
|
2
|
+
export declare const insetTextMeta: {
|
|
3
|
+
tags: string[];
|
|
4
|
+
title: string;
|
|
5
|
+
args: {
|
|
6
|
+
id: string;
|
|
7
|
+
cite: string;
|
|
8
|
+
describedBy: string;
|
|
9
|
+
labelledBy: string;
|
|
10
|
+
children: string;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
id: {
|
|
19
|
+
control: "text";
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
cite: {
|
|
23
|
+
control: "text";
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
describedBy: {
|
|
27
|
+
control: "text";
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
labelledBy: {
|
|
31
|
+
control: "text";
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const Default: {
|
|
44
|
+
args: {
|
|
45
|
+
id: string;
|
|
46
|
+
cite: string;
|
|
47
|
+
describedBy: string;
|
|
48
|
+
labelledBy: string;
|
|
49
|
+
children: string;
|
|
50
|
+
};
|
|
51
|
+
play: ({ canvasElement, step }: StoryContext<Renderer>) => Promise<void>;
|
|
52
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { K as r, n as t } from "../../index-Bh2cTIps.js";
|
|
2
|
+
const s = {
|
|
3
|
+
tags: ["autodocs"],
|
|
4
|
+
title: "Typography/InsetText",
|
|
5
|
+
args: {
|
|
6
|
+
id: "inset-text-default",
|
|
7
|
+
cite: "https://example.com/source",
|
|
8
|
+
describedBy: "",
|
|
9
|
+
labelledBy: "",
|
|
10
|
+
children: "It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application."
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: !0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
id: {
|
|
19
|
+
control: "text",
|
|
20
|
+
description: "Optional id for linking/targeting and aria references."
|
|
21
|
+
},
|
|
22
|
+
cite: {
|
|
23
|
+
control: "text",
|
|
24
|
+
description: "The source URL or description for the quotation."
|
|
25
|
+
},
|
|
26
|
+
describedBy: {
|
|
27
|
+
control: "text",
|
|
28
|
+
description: "Points to element id(s) whose content describes the inset text. Maps to `aria-describedby`."
|
|
29
|
+
},
|
|
30
|
+
labelledBy: {
|
|
31
|
+
control: "text",
|
|
32
|
+
description: "Points to element id(s) whose content labels the inset text. Maps to `aria-labelledby`."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: "Inset text component to differentiate a block of text from the content that surrounds it."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, l = {
|
|
43
|
+
args: s.args,
|
|
44
|
+
play: async ({
|
|
45
|
+
canvasElement: i,
|
|
46
|
+
step: o
|
|
47
|
+
}) => {
|
|
48
|
+
const n = r(i), a = s.args.children;
|
|
49
|
+
await o("renders content and tag", async () => {
|
|
50
|
+
const e = n.getByText(a);
|
|
51
|
+
t(e).toBeInTheDocument(), t(e.tagName.toLowerCase()).toBe("blockquote");
|
|
52
|
+
}), await o("renders cite attribute when provided", async () => {
|
|
53
|
+
const e = n.getByText(a);
|
|
54
|
+
t(e).toHaveAttribute("cite", s.args.cite);
|
|
55
|
+
}), await o("renders inset text styles", async () => {
|
|
56
|
+
const e = n.getByText(a);
|
|
57
|
+
t(e).toHaveClass("gi-p-4"), t(e).toHaveClass("gi-border-l-2xl"), t(e).toHaveClass("gi-border-gray-500");
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
l as Default,
|
|
63
|
+
s as insetTextMeta
|
|
64
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StoryContext, Renderer } from '@storybook/types';
|
|
2
|
+
export declare const logosMeta: {
|
|
3
|
+
tags: string[];
|
|
4
|
+
title: string;
|
|
5
|
+
args: {
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: "number";
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
className: {
|
|
14
|
+
control: "text";
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
label: {
|
|
18
|
+
control: "text";
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
parameters: {
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const Default: {
|
|
31
|
+
args: {
|
|
32
|
+
label: string;
|
|
33
|
+
};
|
|
34
|
+
play: ({ canvasElement, step }: StoryContext<Renderer>) => Promise<void>;
|
|
35
|
+
};
|