@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,54 @@
|
|
|
1
|
+
import { K as n, n as t } from "../../index-Bh2cTIps.js";
|
|
2
|
+
const s = {
|
|
3
|
+
tags: ["autodocs"],
|
|
4
|
+
title: "Foundation/Logos",
|
|
5
|
+
args: {
|
|
6
|
+
label: ""
|
|
7
|
+
},
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: "number",
|
|
11
|
+
description: "Size of the Logo in pixels."
|
|
12
|
+
},
|
|
13
|
+
className: {
|
|
14
|
+
control: "text",
|
|
15
|
+
description: "Additional CSS class names."
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
control: "text",
|
|
19
|
+
description: 'Accessible label. When set, renders `role="img"` and `aria-label`. When empty, the icon is hidden from assistive technology via `aria-hidden`.'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
parameters: {
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component: "Use the logo component to display the Government of Ireland brand mark."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, i = {
|
|
30
|
+
args: s.args,
|
|
31
|
+
play: async ({
|
|
32
|
+
canvasElement: a,
|
|
33
|
+
step: e
|
|
34
|
+
}) => {
|
|
35
|
+
const o = n(a);
|
|
36
|
+
await e("renders Logo Black", async () => {
|
|
37
|
+
t(o.getByTestId("logo-black")).toBeInTheDocument();
|
|
38
|
+
}), await e("renders Logo Gold Green", async () => {
|
|
39
|
+
t(o.getByTestId("logo-gold-green")).toBeInTheDocument();
|
|
40
|
+
}), await e("renders Logo White", async () => {
|
|
41
|
+
t(o.getByTestId("logo-white")).toBeInTheDocument();
|
|
42
|
+
}), await e("renders Logo Harp Black", async () => {
|
|
43
|
+
t(o.getByTestId("logo-harp-black")).toBeInTheDocument();
|
|
44
|
+
}), await e("renders Logo Harp White", async () => {
|
|
45
|
+
t(o.getByTestId("logo-harp-white")).toBeInTheDocument();
|
|
46
|
+
}), await e("renders Logo Gold White", async () => {
|
|
47
|
+
t(o.getByTestId("logo-gold-white")).toBeInTheDocument();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
i as Default,
|
|
53
|
+
s as logosMeta
|
|
54
|
+
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "../atoms/icons/KeyboardArrowLeft.js";
|
|
3
|
+
import { translate as n } from "../i18n/utility.js";
|
|
4
|
+
import { Icon as c } from "../icon/icon.js";
|
|
5
|
+
import { Link as o } from "../link/link.js";
|
|
6
|
+
const h = () => /* @__PURE__ */ r("div", { "aria-hidden": "true", children: /* @__PURE__ */ r(c, { className: "gi-text-gray-700", icon: "more_horiz" }) }), g = ({
|
|
7
|
+
href: e,
|
|
7
8
|
children: i,
|
|
8
9
|
asChild: a,
|
|
9
10
|
...s
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
|
|
11
|
+
}) => /* @__PURE__ */ r(
|
|
12
|
+
o,
|
|
12
13
|
{
|
|
13
14
|
noColor: !0,
|
|
14
15
|
asChild: a,
|
|
15
|
-
href:
|
|
16
|
+
href: e,
|
|
16
17
|
"aria-label": `${i} page`,
|
|
17
18
|
size: "sm",
|
|
18
19
|
className: "gi-text-ellipsis gi-whitespace-nowrap gi-line-clamp-1",
|
|
19
20
|
...s,
|
|
20
21
|
children: i
|
|
21
22
|
}
|
|
22
|
-
),
|
|
23
|
-
const a = Array.isArray(
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
), N = (e) => /* @__PURE__ */ r(g, { ...e, "aria-current": "page" }), p = () => /* @__PURE__ */ r("span", { className: "gi-px-3 gi-text-gray-500", children: "/" }), B = ({ children: e, iconStart: i }) => {
|
|
24
|
+
const a = Array.isArray(e) ? e : [e];
|
|
25
|
+
return /* @__PURE__ */ r(
|
|
25
26
|
"nav",
|
|
26
27
|
{
|
|
27
|
-
"aria-label":
|
|
28
|
+
"aria-label": n("breadcrumbs.breadcrumbs", { defaultValue: "Breadcrumbs" }),
|
|
28
29
|
className: "gi-flex gi-items-center gi-gap-1",
|
|
29
30
|
children: /* @__PURE__ */ t(
|
|
30
31
|
"ol",
|
|
@@ -38,7 +39,7 @@ const f = () => /* @__PURE__ */ e("div", { "aria-hidden": "true", children: /* @
|
|
|
38
39
|
[&>li]:gi-items-center
|
|
39
40
|
`,
|
|
40
41
|
children: [
|
|
41
|
-
i && /* @__PURE__ */
|
|
42
|
+
i && /* @__PURE__ */ r("li", { role: "listitem", className: "gi-pr-1", children: /* @__PURE__ */ r(m, { className: "gi-block gi-shrink-0", size: 16 }) }),
|
|
42
43
|
a.map((s, l) => /* @__PURE__ */ t(
|
|
43
44
|
"li",
|
|
44
45
|
{
|
|
@@ -46,7 +47,7 @@ const f = () => /* @__PURE__ */ e("div", { "aria-hidden": "true", children: /* @
|
|
|
46
47
|
role: "listitem",
|
|
47
48
|
children: [
|
|
48
49
|
s,
|
|
49
|
-
l < a.length - 1 && /* @__PURE__ */
|
|
50
|
+
l < a.length - 1 && /* @__PURE__ */ r(p, {})
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
53
|
`breadcrumb_item_${l}`
|
|
@@ -58,8 +59,8 @@ const f = () => /* @__PURE__ */ e("div", { "aria-hidden": "true", children: /* @
|
|
|
58
59
|
);
|
|
59
60
|
};
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
N as BreadcrumbCurrentLink,
|
|
63
|
+
h as BreadcrumbEllipsis,
|
|
64
|
+
g as BreadcrumbLink,
|
|
65
|
+
B as Breadcrumbs
|
|
65
66
|
};
|
package/dist/button/button.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
appearance?: import('./types.js').ButtonAppearance;
|
|
4
|
-
size?: import('./types.js').ButtonSize;
|
|
5
|
-
form?: string;
|
|
6
|
-
value?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
dataTestid?: string;
|
|
9
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import { ButtonProps } from './types';
|
|
2
|
+
export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
package/dist/button/button.js
CHANGED
|
@@ -1,43 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { getSizeClass as c, isButtonDisabled as b, getVariantAppearanceClass as B } from "./helpers.js";
|
|
6
|
-
const r = p(
|
|
1
|
+
import { jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import q from "../atoms/Button.js";
|
|
4
|
+
const a = g(
|
|
7
5
|
({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
id: e,
|
|
7
|
+
variant: r,
|
|
8
|
+
appearance: t,
|
|
9
|
+
size: o,
|
|
10
|
+
children: i,
|
|
11
|
+
disabled: d,
|
|
12
|
+
className: p,
|
|
13
|
+
onClick: s,
|
|
14
|
+
onFocus: l,
|
|
15
|
+
onBlur: n,
|
|
16
|
+
onKeyDown: b,
|
|
17
|
+
onKeyUp: m,
|
|
18
|
+
role: u,
|
|
19
|
+
type: f,
|
|
20
|
+
form: c,
|
|
21
|
+
value: y,
|
|
22
|
+
tabIndex: B,
|
|
23
|
+
dataTestid: x,
|
|
24
|
+
"aria-label": h,
|
|
25
|
+
"aria-labelledby": j,
|
|
26
|
+
"aria-describedby": w,
|
|
27
|
+
"aria-checked": T,
|
|
28
|
+
"aria-pressed": k,
|
|
29
|
+
"aria-expanded": v,
|
|
30
|
+
"aria-controls": I,
|
|
31
|
+
"aria-haspopup": N,
|
|
32
|
+
"aria-busy": O,
|
|
33
|
+
"data-testid": P
|
|
34
|
+
}, R) => /* @__PURE__ */ $(
|
|
35
|
+
q,
|
|
18
36
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
ref: R,
|
|
38
|
+
id: e,
|
|
39
|
+
variant: r,
|
|
40
|
+
appearance: t,
|
|
41
|
+
size: o,
|
|
42
|
+
children: i,
|
|
43
|
+
disabled: d,
|
|
44
|
+
className: p,
|
|
45
|
+
onClick: s,
|
|
46
|
+
onFocus: l,
|
|
47
|
+
onBlur: n,
|
|
48
|
+
onKeyDown: b,
|
|
49
|
+
onKeyUp: m,
|
|
50
|
+
ariaLabel: h,
|
|
51
|
+
ariaLabelledBy: j,
|
|
52
|
+
ariaDescribedBy: w,
|
|
53
|
+
ariaChecked: T,
|
|
54
|
+
ariaPressed: k,
|
|
55
|
+
ariaExpanded: v,
|
|
56
|
+
ariaControls: I,
|
|
57
|
+
ariaHasPopup: N,
|
|
58
|
+
ariaBusy: O,
|
|
59
|
+
role: u,
|
|
60
|
+
type: f,
|
|
61
|
+
form: c,
|
|
62
|
+
value: y,
|
|
63
|
+
tabIndex: B,
|
|
64
|
+
dataTestId: P ?? x
|
|
32
65
|
}
|
|
33
66
|
)
|
|
34
67
|
);
|
|
35
|
-
|
|
36
|
-
Object.defineProperty(
|
|
68
|
+
a.displayName = "Button";
|
|
69
|
+
Object.defineProperty(a, "componentType", {
|
|
37
70
|
value: "Button",
|
|
38
71
|
writable: !1,
|
|
39
72
|
enumerable: !1
|
|
40
73
|
});
|
|
41
74
|
export {
|
|
42
|
-
|
|
75
|
+
a as Button
|
|
43
76
|
};
|
package/dist/button/helpers.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IconButtonProps } from '../icon-button/icon-button.js';
|
|
1
2
|
import { ButtonAppearance, ButtonVariant, ButtonSize } from './types.js';
|
|
2
3
|
export declare const getVariantAppearanceClass: ({ disabled, variant, appearance, }: {
|
|
3
4
|
disabled?: boolean;
|
|
@@ -5,7 +6,7 @@ export declare const getVariantAppearanceClass: ({ disabled, variant, appearance
|
|
|
5
6
|
appearance?: ButtonAppearance;
|
|
6
7
|
}) => string | undefined;
|
|
7
8
|
export declare const getSizeClass: (size?: ButtonSize) => "gi-btn-small" | "gi-btn-large" | "gi-btn-regular";
|
|
8
|
-
export declare const getButtonIconSizeClass: (size?:
|
|
9
|
+
export declare const getButtonIconSizeClass: (size?: IconButtonProps["size"]) => "gi-icon-btn-small" | "gi-icon-btn-large" | "gi-icon-btn-extra-large" | "gi-icon-btn-regular";
|
|
9
10
|
export declare const isButtonDisabled: ({ disabled, variant, appearance, }: {
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
variant?: ButtonVariant;
|
package/dist/button/types.d.ts
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
+
import { Props as GiButtonProps } from '../atoms/Button.js';
|
|
2
|
+
import * as React from 'react';
|
|
1
3
|
export declare const ButtonVariants: readonly ["primary", "secondary", "flat"];
|
|
2
4
|
export type ButtonVariant = (typeof ButtonVariants)[number];
|
|
3
5
|
export type ButtonAppearance = 'default' | 'dark' | 'light';
|
|
4
|
-
export type ButtonSize = 'medium' | 'small' | 'large'
|
|
5
|
-
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
-
|
|
7
|
-
appearance?: ButtonAppearance;
|
|
8
|
-
size?: ButtonSize;
|
|
9
|
-
form?: string;
|
|
10
|
-
value?: string;
|
|
11
|
-
className?: string;
|
|
6
|
+
export type ButtonSize = 'medium' | 'small' | 'large';
|
|
7
|
+
export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-checked' | 'aria-pressed' | 'aria-expanded' | 'aria-controls' | 'aria-haspopup' | 'aria-busy'> & GiButtonProps & {
|
|
8
|
+
/** @deprecated Use dataTestId instead */
|
|
12
9
|
dataTestid?: string;
|
|
10
|
+
/** @deprecated Use dataTestId instead */
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
/** @deprecated Use ariaLabel instead */
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
/** @deprecated Use ariaLabelledBy instead */
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
/** @deprecated Use ariaDescribedBy instead */
|
|
17
|
+
'aria-describedby'?: string;
|
|
18
|
+
/** @deprecated Use ariaChecked instead */
|
|
19
|
+
'aria-checked'?: boolean | 'true' | 'false' | 'mixed';
|
|
20
|
+
/** @deprecated Use ariaPressed instead */
|
|
21
|
+
'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';
|
|
22
|
+
/** @deprecated Use ariaExpanded instead */
|
|
23
|
+
'aria-expanded'?: boolean | 'true' | 'false';
|
|
24
|
+
/** @deprecated Use ariaControls instead */
|
|
25
|
+
'aria-controls'?: string;
|
|
26
|
+
/** @deprecated Use ariaHasPopup instead */
|
|
27
|
+
'aria-haspopup'?: boolean | 'true' | 'false' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
28
|
+
/** @deprecated Use ariaBusy instead */
|
|
29
|
+
'aria-busy'?: boolean | 'true' | 'false';
|
|
13
30
|
};
|
|
@@ -1,95 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as G, useState as V, useEffect as k, useContext as w } from "react";
|
|
4
|
-
import
|
|
4
|
+
import S from "../atoms/Button.js";
|
|
5
5
|
import { cn as g } from "../cn.js";
|
|
6
6
|
import { useDomId as j } from "../hooks/use-dom-id.js";
|
|
7
|
-
const
|
|
7
|
+
const y = G(
|
|
8
8
|
void 0
|
|
9
9
|
), D = ({
|
|
10
|
-
value:
|
|
10
|
+
value: o,
|
|
11
11
|
children: s,
|
|
12
12
|
role: d,
|
|
13
13
|
"aria-checked": e,
|
|
14
|
-
"aria-label":
|
|
15
|
-
...t
|
|
14
|
+
"aria-label": n
|
|
16
15
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
16
|
+
const t = w(y);
|
|
17
|
+
if (!t)
|
|
19
18
|
throw new Error("ButtonGroupItem must be used within a ButtonGroup");
|
|
20
19
|
const {
|
|
21
|
-
selectedValue:
|
|
22
|
-
setSelectedValue:
|
|
23
|
-
size:
|
|
24
|
-
onChange:
|
|
20
|
+
selectedValue: a,
|
|
21
|
+
setSelectedValue: u,
|
|
22
|
+
size: l,
|
|
23
|
+
onChange: r,
|
|
25
24
|
groupId: m,
|
|
26
25
|
appearance: p
|
|
27
|
-
} =
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
return /* @__PURE__ */
|
|
26
|
+
} = t, i = a === o, c = () => {
|
|
27
|
+
u(o), r == null || r(o);
|
|
28
|
+
}, b = `${m}-${o}`;
|
|
29
|
+
return /* @__PURE__ */ f(
|
|
31
30
|
S,
|
|
32
31
|
{
|
|
33
32
|
variant: i ? "primary" : "secondary",
|
|
34
|
-
size:
|
|
33
|
+
size: l,
|
|
35
34
|
appearance: p,
|
|
36
|
-
onClick:
|
|
37
|
-
id:
|
|
35
|
+
onClick: c,
|
|
36
|
+
id: b,
|
|
38
37
|
role: d || "radio",
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
ariaChecked: e === void 0 ? i : e,
|
|
39
|
+
ariaLabel: n,
|
|
41
40
|
type: "button",
|
|
42
|
-
...t,
|
|
43
41
|
children: s
|
|
44
42
|
}
|
|
45
43
|
);
|
|
46
44
|
}, N = ({
|
|
47
|
-
name:
|
|
45
|
+
name: o,
|
|
48
46
|
size: s = "medium",
|
|
49
47
|
appearance: d = "dark",
|
|
50
48
|
onChange: e,
|
|
51
|
-
defaultValue:
|
|
49
|
+
defaultValue: n,
|
|
52
50
|
value: t,
|
|
53
|
-
children:
|
|
54
|
-
role:
|
|
51
|
+
children: a,
|
|
52
|
+
role: u,
|
|
55
53
|
"aria-labelledby": l,
|
|
56
|
-
"aria-describedby":
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
54
|
+
"aria-describedby": r,
|
|
55
|
+
className: m,
|
|
56
|
+
...p
|
|
59
57
|
}) => {
|
|
60
|
-
const [
|
|
61
|
-
|
|
62
|
-
), b = t === void 0 ?
|
|
58
|
+
const [i, c] = V(
|
|
59
|
+
n
|
|
60
|
+
), b = t === void 0 ? i : t;
|
|
63
61
|
k(() => {
|
|
64
|
-
t !== void 0 &&
|
|
62
|
+
t !== void 0 && c(t);
|
|
65
63
|
}, [t]);
|
|
66
|
-
const
|
|
67
|
-
t === void 0 &&
|
|
64
|
+
const I = (x) => {
|
|
65
|
+
t === void 0 && c(x), e == null || e(x);
|
|
68
66
|
}, B = j();
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
67
|
+
return /* @__PURE__ */ f(
|
|
68
|
+
y.Provider,
|
|
71
69
|
{
|
|
72
70
|
value: {
|
|
73
71
|
selectedValue: b,
|
|
74
|
-
setSelectedValue:
|
|
75
|
-
name:
|
|
72
|
+
setSelectedValue: I,
|
|
73
|
+
name: o,
|
|
76
74
|
size: s,
|
|
77
75
|
onChange: e,
|
|
78
76
|
groupId: B,
|
|
79
77
|
appearance: d,
|
|
80
|
-
...
|
|
78
|
+
...p
|
|
81
79
|
},
|
|
82
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ f(
|
|
83
81
|
"div",
|
|
84
82
|
{
|
|
85
83
|
className: g(
|
|
86
84
|
"gi-flex gi-flex-wrap gi-gap-3 [&_button]:gi-min-w-12 [&_button]:gi-justify-center",
|
|
87
|
-
|
|
85
|
+
m
|
|
88
86
|
),
|
|
89
|
-
role:
|
|
87
|
+
role: u || "radiogroup",
|
|
90
88
|
"aria-labelledby": l,
|
|
91
|
-
"aria-describedby":
|
|
92
|
-
children:
|
|
89
|
+
"aria-describedby": r,
|
|
90
|
+
children: a
|
|
93
91
|
}
|
|
94
92
|
)
|
|
95
93
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
export type ButtonGroupProps = PropsWithChildren<{
|
|
4
4
|
name: string;
|
|
5
|
-
size?:
|
|
6
|
-
appearance?:
|
|
5
|
+
size?: ButtonProps['size'];
|
|
6
|
+
appearance?: ButtonProps['appearance'];
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
value?: string;
|
|
@@ -22,8 +22,8 @@ export type ButtonGroupContextType = {
|
|
|
22
22
|
selectedValue?: string;
|
|
23
23
|
setSelectedValue: (value: string) => void;
|
|
24
24
|
name: string;
|
|
25
|
-
size:
|
|
26
|
-
appearance?:
|
|
25
|
+
size: ButtonProps['size'];
|
|
26
|
+
appearance?: ButtonProps['appearance'];
|
|
27
27
|
onChange?: (value: string) => void;
|
|
28
28
|
groupId: string;
|
|
29
29
|
};
|
package/dist/card/card-legacy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import k from "../atoms/Button.js";
|
|
3
3
|
import { translate as c } from "../i18n/utility.js";
|
|
4
4
|
import { Link as u } from "../link/link.js";
|
|
5
5
|
import { CardNext as b, CardMedia as L, CardContainer as T, CardHeader as V, CardTitle as $, CardSubtitle as j, CardTag as A, CardDescription as B, CardAction as H } from "./card-next.js";
|
package/dist/card/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '../
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
import { IconProps } from '../icon/icon.js';
|
|
4
4
|
import { LinkProps } from '../link/link.js';
|
|
5
5
|
import { TagProps } from '../tag/tag.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useId as j, useEffect as q } from "react";
|
|
4
|
-
import
|
|
4
|
+
import B from "../atoms/Button.js";
|
|
5
5
|
import { cn as x } from "../cn.js";
|
|
6
6
|
import { translate as N } from "../i18n/utility.js";
|
|
7
7
|
import { Icon as D } from "../icon/icon.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as A, Children as L, isValidElement as O } from "react";
|
|
3
3
|
import { c as P } from "../index-CB-zPpNk.js";
|
|
4
|
-
import
|
|
4
|
+
import w from "../atoms/Button.js";
|
|
5
5
|
import { Chip as S } from "../chip/chip.js";
|
|
6
6
|
import { cn as n } from "../cn.js";
|
|
7
7
|
import { translate as x } from "../i18n/utility.js";
|
package/dist/drawer/drawer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '../
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
import { ModalProps, ModalWrapperProps } from '../modal/types.js';
|
|
4
4
|
type DrawerChildren = Array<ReactElement<typeof DrawerBody | typeof DrawerBody>> | ReactElement<typeof Fragment>;
|
|
5
5
|
export type DrawerPosition = 'left' | 'right' | 'bottom';
|
package/dist/drawer/drawer.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as a, jsxs as x, Fragment as C } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as D, cloneElement as O } from "react";
|
|
4
4
|
import { cn as l } from "../cn.js";
|
|
5
5
|
import { ModalBody as u, ModalFooter as j, ModalWrapper as v } from "../modal/modal.js";
|
|
6
|
-
const
|
|
6
|
+
const T = ({
|
|
7
7
|
children: o,
|
|
8
8
|
className: e,
|
|
9
9
|
...r
|
|
@@ -15,29 +15,29 @@ const h = ({
|
|
|
15
15
|
...r,
|
|
16
16
|
children: o
|
|
17
17
|
}
|
|
18
|
-
),
|
|
18
|
+
), h = ({
|
|
19
19
|
children: o,
|
|
20
20
|
triggerButton: e,
|
|
21
21
|
startsOpen: r,
|
|
22
|
-
closeButtonLabel:
|
|
22
|
+
closeButtonLabel: i,
|
|
23
23
|
position: t = "right",
|
|
24
24
|
className: f
|
|
25
25
|
}) => {
|
|
26
26
|
const [d, s] = D(!!r), m = () => s(!0), w = () => s(!1), b = O(e, {
|
|
27
|
-
|
|
27
|
+
dataTestId: "drawer-trigger-button-container",
|
|
28
28
|
onClick: (y) => {
|
|
29
|
-
var c,
|
|
30
|
-
const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (
|
|
29
|
+
var c, p;
|
|
30
|
+
const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (p = e == null ? void 0 : e.props) == null ? void 0 : p.onClick : void 0;
|
|
31
31
|
n && n(y), m();
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
return /* @__PURE__ */ x(C, { children: [
|
|
35
35
|
b,
|
|
36
36
|
/* @__PURE__ */ a(
|
|
37
|
-
|
|
37
|
+
T,
|
|
38
38
|
{
|
|
39
39
|
children: o,
|
|
40
|
-
closeButtonLabel:
|
|
40
|
+
closeButtonLabel: i,
|
|
41
41
|
position: t,
|
|
42
42
|
className: f,
|
|
43
43
|
isOpen: d,
|
|
@@ -46,12 +46,12 @@ const h = ({
|
|
|
46
46
|
)
|
|
47
47
|
] });
|
|
48
48
|
};
|
|
49
|
-
Object.defineProperty(
|
|
49
|
+
Object.defineProperty(h, "componentType", {
|
|
50
50
|
value: "Drawer",
|
|
51
51
|
writable: !1,
|
|
52
52
|
enumerable: !1
|
|
53
53
|
});
|
|
54
|
-
const
|
|
54
|
+
const k = ({ children: o, className: e }) => /* @__PURE__ */ a(
|
|
55
55
|
u,
|
|
56
56
|
{
|
|
57
57
|
includeModalClass: !1,
|
|
@@ -62,24 +62,24 @@ const F = ({ children: o, className: e }) => /* @__PURE__ */ a(
|
|
|
62
62
|
children: o
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
Object.defineProperty(
|
|
65
|
+
Object.defineProperty(k, "componentType", {
|
|
66
66
|
value: "DrawerBody",
|
|
67
67
|
writable: !1,
|
|
68
68
|
enumerable: !1
|
|
69
69
|
});
|
|
70
|
-
const
|
|
70
|
+
const F = ({
|
|
71
71
|
children: o,
|
|
72
72
|
className: e,
|
|
73
73
|
stacked: r
|
|
74
74
|
}) => /* @__PURE__ */ a(j, { stacked: r, className: l("gi-drawer-footer", e), children: o });
|
|
75
|
-
Object.defineProperty(
|
|
75
|
+
Object.defineProperty(F, "componentType", {
|
|
76
76
|
value: "DrawerFooter",
|
|
77
77
|
writable: !1,
|
|
78
78
|
enumerable: !1
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
h as Drawer,
|
|
82
|
+
k as DrawerBody,
|
|
83
|
+
F as DrawerFooter,
|
|
84
|
+
T as DrawerWrapper
|
|
85
85
|
};
|