@ogcio/design-system-react 1.32.0 → 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/accordion/accordion-item.js +62 -57
- package/dist/alert/alert.js +37 -39
- package/dist/alert/variants.d.ts +49 -52
- package/dist/alert/variants.js +17 -18
- package/dist/atoms/Button.d.ts +2 -2
- package/dist/atoms/Button.js +2 -1
- 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-search.js +2 -2
- package/dist/hint-text/hint-text.js +26 -20
- package/dist/icon-button/icon-button.d.ts +3 -5
- package/dist/index.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.js +38 -38
- package/dist/modal/types.d.ts +5 -4
- package/dist/pagination/pagination.js +27 -28
- package/dist/score-select/type.d.ts +2 -2
- package/dist/select/select-next.js +87 -87
- package/dist/side-nav/side-nav.js +1 -1
- package/dist/styles.css +1 -1
- 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 +2 -2
|
@@ -1,61 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { c as
|
|
6
|
-
import { Icon as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
variant: {
|
|
10
|
-
default: "gi-px-2 gi-py-4 gi-text-md gi-font-bold",
|
|
11
|
-
small: "gi-py-2 gi-px-2 gi-text-sm gi-font-bold"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}), j = ({
|
|
15
|
-
defaultExpanded: s,
|
|
2
|
+
import { jsxs as n, Fragment as y, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as s } from "../clsx-OuTLNxxd.js";
|
|
4
|
+
import { useState as w, useRef as I } from "react";
|
|
5
|
+
import { c as k } from "../index-CB-zPpNk.js";
|
|
6
|
+
import { Icon as v } from "../icon/icon.js";
|
|
7
|
+
const $ = ({
|
|
8
|
+
defaultExpanded: d,
|
|
16
9
|
children: c,
|
|
17
|
-
label:
|
|
18
|
-
disabled:
|
|
10
|
+
label: o,
|
|
11
|
+
disabled: t,
|
|
19
12
|
className: l,
|
|
20
|
-
variant:
|
|
21
|
-
...
|
|
13
|
+
variant: i = "default",
|
|
14
|
+
...g
|
|
22
15
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
|
|
16
|
+
const [e, r] = w(d), m = I(null), p = `${o}-button`, f = `${o}-panel`, u = (h) => {
|
|
17
|
+
h.key === "Enter" && !t && r(!e);
|
|
18
|
+
}, { base: x, header: b } = N({ variant: i, disabled: !!t });
|
|
19
|
+
return /* @__PURE__ */ n(y, { children: [
|
|
25
20
|
/* @__PURE__ */ a(
|
|
26
21
|
"div",
|
|
27
22
|
{
|
|
28
|
-
...
|
|
29
|
-
ref:
|
|
30
|
-
"data-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
23
|
+
...g,
|
|
24
|
+
ref: m,
|
|
25
|
+
"data-testid": "accordion-item",
|
|
26
|
+
"data-disabled": !!t,
|
|
27
|
+
onClick: () => !t && r(!e),
|
|
28
|
+
onKeyDown: u,
|
|
35
29
|
tabIndex: 0,
|
|
36
|
-
className:
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
size: "md",
|
|
51
|
-
className: t({
|
|
52
|
-
"gi-pt-[1.5px]": e === "default"
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
)
|
|
30
|
+
className: s(x(), l),
|
|
31
|
+
children: /* @__PURE__ */ n("div", { "data-testid": "accordion-header", className: b(), children: [
|
|
32
|
+
o,
|
|
33
|
+
/* @__PURE__ */ a(
|
|
34
|
+
v,
|
|
35
|
+
{
|
|
36
|
+
icon: e ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
37
|
+
size: "md",
|
|
38
|
+
className: s({
|
|
39
|
+
"gi-pt-[1.5px]": i === "default"
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] })
|
|
59
44
|
}
|
|
60
45
|
),
|
|
61
46
|
/* @__PURE__ */ a(
|
|
@@ -64,17 +49,37 @@ const I = h({
|
|
|
64
49
|
id: f,
|
|
65
50
|
role: "region",
|
|
66
51
|
"aria-labelledby": p,
|
|
67
|
-
className:
|
|
68
|
-
"gi-block":
|
|
69
|
-
"gi-hidden": !
|
|
70
|
-
"gi-text-md":
|
|
71
|
-
"gi-text-sm":
|
|
52
|
+
className: s("gi-px-2 gi-pb-4 gi-pt-2 gi-font-normal", {
|
|
53
|
+
"gi-block": e,
|
|
54
|
+
"gi-hidden": !e,
|
|
55
|
+
"gi-text-md": i === "default",
|
|
56
|
+
"gi-text-sm": i === "small"
|
|
72
57
|
}),
|
|
73
58
|
children: c
|
|
74
59
|
}
|
|
75
60
|
)
|
|
76
61
|
] });
|
|
77
|
-
}
|
|
62
|
+
}, N = k({
|
|
63
|
+
slots: {
|
|
64
|
+
base: "gi-focus-visible-state-outline-inner-shadow-sm",
|
|
65
|
+
header: " gi-flex gi-items-start gi-justify-between"
|
|
66
|
+
},
|
|
67
|
+
variants: {
|
|
68
|
+
variant: {
|
|
69
|
+
default: { header: "gi-px-2 gi-py-4 gi-text-md gi-font-bold" },
|
|
70
|
+
small: { header: "gi-py-2 gi-px-2 gi-text-sm gi-font-bold" }
|
|
71
|
+
},
|
|
72
|
+
disabled: {
|
|
73
|
+
false: {
|
|
74
|
+
base: "hover:gi-bg-gray-200 gi-focus-state-outline-inner-shadow-sm",
|
|
75
|
+
header: "gi-cursor-pointer"
|
|
76
|
+
},
|
|
77
|
+
true: {
|
|
78
|
+
header: "gi-cursor-not-allowed gi-text-gray-600"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
78
83
|
export {
|
|
79
|
-
|
|
84
|
+
$ as AccordionItem
|
|
80
85
|
};
|
package/dist/alert/alert.js
CHANGED
|
@@ -1,69 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as i, jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { jsx as i, jsxs as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as I } from "react";
|
|
4
|
+
import k from "../atoms/icons/Info.js";
|
|
5
|
+
import v from "../atoms/icons/Error.js";
|
|
6
|
+
import b from "../atoms/icons/Warning.js";
|
|
7
7
|
import x from "../atoms/icons/CheckCircle.js";
|
|
8
|
-
import { cn as
|
|
9
|
-
import { translate as
|
|
10
|
-
import { IconButton as
|
|
11
|
-
import { alertVariants as
|
|
12
|
-
const
|
|
13
|
-
warning: (r) => /* @__PURE__ */ i(
|
|
8
|
+
import { cn as t } from "../cn.js";
|
|
9
|
+
import { translate as D } from "../i18n/utility.js";
|
|
10
|
+
import { IconButton as V } from "../icon-button/icon-button.js";
|
|
11
|
+
import { alertVariants as j } from "./variants.js";
|
|
12
|
+
const E = {
|
|
13
|
+
warning: (r) => /* @__PURE__ */ i(b, { ...r }),
|
|
14
14
|
success: (r) => /* @__PURE__ */ i(x, { ...r }),
|
|
15
|
-
danger: (r) => /* @__PURE__ */ i(
|
|
16
|
-
info: (r) => /* @__PURE__ */ i(
|
|
15
|
+
danger: (r) => /* @__PURE__ */ i(v, { ...r }),
|
|
16
|
+
info: (r) => /* @__PURE__ */ i(k, { ...r })
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function q({
|
|
19
19
|
title: r,
|
|
20
|
-
children:
|
|
20
|
+
children: n,
|
|
21
21
|
variant: a = "info",
|
|
22
|
-
showIcon:
|
|
23
|
-
dismissible:
|
|
22
|
+
showIcon: o = !0,
|
|
23
|
+
dismissible: m,
|
|
24
24
|
onClose: s,
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
25
|
+
className: l,
|
|
26
|
+
...c
|
|
27
27
|
}) {
|
|
28
|
-
const [f,
|
|
29
|
-
variant: a
|
|
30
|
-
}), A = e ? h : u;
|
|
28
|
+
const [f, d] = I(!1), { base: p, heading: u, container: g, dismiss: h } = j({ variant: a });
|
|
31
29
|
if (f)
|
|
32
30
|
return null;
|
|
33
|
-
const
|
|
34
|
-
return /* @__PURE__ */
|
|
31
|
+
const N = E[a ?? "info"];
|
|
32
|
+
return /* @__PURE__ */ e(
|
|
35
33
|
"div",
|
|
36
34
|
{
|
|
37
|
-
className:
|
|
35
|
+
className: t(p(), l, "gi-not-prose"),
|
|
38
36
|
role: "alert",
|
|
39
37
|
"aria-live": "assertive",
|
|
40
|
-
...
|
|
38
|
+
...c,
|
|
41
39
|
children: [
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
40
|
+
o ? /* @__PURE__ */ i(N, { className: "gi-shrink-0 gi-block" }) : null,
|
|
41
|
+
/* @__PURE__ */ e(
|
|
44
42
|
"div",
|
|
45
43
|
{
|
|
46
|
-
className:
|
|
44
|
+
className: t(g(), {
|
|
47
45
|
"gi-gap-1": r
|
|
48
46
|
}),
|
|
49
47
|
children: [
|
|
50
|
-
r && /* @__PURE__ */ i("p", { className:
|
|
51
|
-
|
|
48
|
+
r && /* @__PURE__ */ i("p", { className: u(), "data-testid": "alert-heading", children: r }),
|
|
49
|
+
n
|
|
52
50
|
]
|
|
53
51
|
}
|
|
54
52
|
),
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
m && /* @__PURE__ */ i(
|
|
54
|
+
V,
|
|
57
55
|
{
|
|
58
|
-
onClick: (
|
|
59
|
-
|
|
56
|
+
onClick: (A) => {
|
|
57
|
+
d(!0), s == null || s(A);
|
|
60
58
|
},
|
|
61
|
-
className:
|
|
59
|
+
className: h(),
|
|
62
60
|
size: "small",
|
|
63
61
|
appearance: "dark",
|
|
64
62
|
variant: "flat",
|
|
65
63
|
icon: { icon: "close" },
|
|
66
|
-
"aria-label":
|
|
64
|
+
"aria-label": D("alert.dismissAlert", {
|
|
67
65
|
defaultValue: "Dismiss alert"
|
|
68
66
|
})
|
|
69
67
|
}
|
|
@@ -73,6 +71,6 @@ function C({
|
|
|
73
71
|
);
|
|
74
72
|
}
|
|
75
73
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
E as ALERT_VARIANT_ICONS,
|
|
75
|
+
q as Alert
|
|
78
76
|
};
|
package/dist/alert/variants.d.ts
CHANGED
|
@@ -2,24 +2,23 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
|
|
|
2
2
|
variant: {
|
|
3
3
|
info: {
|
|
4
4
|
base: string;
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
danger: {
|
|
8
|
-
base: string;
|
|
9
|
-
baseDismissible: string;
|
|
5
|
+
icon: string;
|
|
10
6
|
};
|
|
11
7
|
success: {
|
|
12
8
|
base: string;
|
|
13
|
-
|
|
9
|
+
icon: string;
|
|
14
10
|
};
|
|
15
11
|
warning: {
|
|
16
12
|
base: string;
|
|
17
|
-
|
|
13
|
+
icon: string;
|
|
14
|
+
};
|
|
15
|
+
danger: {
|
|
16
|
+
base: string;
|
|
17
|
+
icon: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
}, {
|
|
21
21
|
base: string;
|
|
22
|
-
baseDismissible: string;
|
|
23
22
|
container: string;
|
|
24
23
|
heading: string;
|
|
25
24
|
dismiss: string;
|
|
@@ -27,62 +26,61 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
|
|
|
27
26
|
variant: {
|
|
28
27
|
info: {
|
|
29
28
|
base: string;
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
danger: {
|
|
33
|
-
base: string;
|
|
34
|
-
baseDismissible: string;
|
|
29
|
+
icon: string;
|
|
35
30
|
};
|
|
36
31
|
success: {
|
|
37
32
|
base: string;
|
|
38
|
-
|
|
33
|
+
icon: string;
|
|
39
34
|
};
|
|
40
35
|
warning: {
|
|
41
36
|
base: string;
|
|
42
|
-
|
|
37
|
+
icon: string;
|
|
38
|
+
};
|
|
39
|
+
danger: {
|
|
40
|
+
base: string;
|
|
41
|
+
icon: string;
|
|
43
42
|
};
|
|
44
43
|
};
|
|
45
44
|
}, {
|
|
46
45
|
variant: {
|
|
47
46
|
info: {
|
|
48
47
|
base: string;
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
danger: {
|
|
52
|
-
base: string;
|
|
53
|
-
baseDismissible: string;
|
|
48
|
+
icon: string;
|
|
54
49
|
};
|
|
55
50
|
success: {
|
|
56
51
|
base: string;
|
|
57
|
-
|
|
52
|
+
icon: string;
|
|
58
53
|
};
|
|
59
54
|
warning: {
|
|
60
55
|
base: string;
|
|
61
|
-
|
|
56
|
+
icon: string;
|
|
57
|
+
};
|
|
58
|
+
danger: {
|
|
59
|
+
base: string;
|
|
60
|
+
icon: string;
|
|
62
61
|
};
|
|
63
62
|
};
|
|
64
63
|
}>, {
|
|
65
64
|
variant: {
|
|
66
65
|
info: {
|
|
67
66
|
base: string;
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
danger: {
|
|
71
|
-
base: string;
|
|
72
|
-
baseDismissible: string;
|
|
67
|
+
icon: string;
|
|
73
68
|
};
|
|
74
69
|
success: {
|
|
75
70
|
base: string;
|
|
76
|
-
|
|
71
|
+
icon: string;
|
|
77
72
|
};
|
|
78
73
|
warning: {
|
|
79
74
|
base: string;
|
|
80
|
-
|
|
75
|
+
icon: string;
|
|
76
|
+
};
|
|
77
|
+
danger: {
|
|
78
|
+
base: string;
|
|
79
|
+
icon: string;
|
|
81
80
|
};
|
|
82
81
|
};
|
|
83
82
|
}, {
|
|
84
83
|
base: string;
|
|
85
|
-
baseDismissible: string;
|
|
86
84
|
container: string;
|
|
87
85
|
heading: string;
|
|
88
86
|
dismiss: string;
|
|
@@ -90,24 +88,23 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
|
|
|
90
88
|
variant: {
|
|
91
89
|
info: {
|
|
92
90
|
base: string;
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
danger: {
|
|
96
|
-
base: string;
|
|
97
|
-
baseDismissible: string;
|
|
91
|
+
icon: string;
|
|
98
92
|
};
|
|
99
93
|
success: {
|
|
100
94
|
base: string;
|
|
101
|
-
|
|
95
|
+
icon: string;
|
|
102
96
|
};
|
|
103
97
|
warning: {
|
|
104
98
|
base: string;
|
|
105
|
-
|
|
99
|
+
icon: string;
|
|
100
|
+
};
|
|
101
|
+
danger: {
|
|
102
|
+
base: string;
|
|
103
|
+
icon: string;
|
|
106
104
|
};
|
|
107
105
|
};
|
|
108
106
|
}, {
|
|
109
107
|
base: string;
|
|
110
|
-
baseDismissible: string;
|
|
111
108
|
container: string;
|
|
112
109
|
heading: string;
|
|
113
110
|
dismiss: string;
|
|
@@ -115,38 +112,38 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
|
|
|
115
112
|
variant: {
|
|
116
113
|
info: {
|
|
117
114
|
base: string;
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
danger: {
|
|
121
|
-
base: string;
|
|
122
|
-
baseDismissible: string;
|
|
115
|
+
icon: string;
|
|
123
116
|
};
|
|
124
117
|
success: {
|
|
125
118
|
base: string;
|
|
126
|
-
|
|
119
|
+
icon: string;
|
|
127
120
|
};
|
|
128
121
|
warning: {
|
|
129
122
|
base: string;
|
|
130
|
-
|
|
123
|
+
icon: string;
|
|
124
|
+
};
|
|
125
|
+
danger: {
|
|
126
|
+
base: string;
|
|
127
|
+
icon: string;
|
|
131
128
|
};
|
|
132
129
|
};
|
|
133
130
|
}, {
|
|
134
131
|
variant: {
|
|
135
132
|
info: {
|
|
136
133
|
base: string;
|
|
137
|
-
|
|
138
|
-
};
|
|
139
|
-
danger: {
|
|
140
|
-
base: string;
|
|
141
|
-
baseDismissible: string;
|
|
134
|
+
icon: string;
|
|
142
135
|
};
|
|
143
136
|
success: {
|
|
144
137
|
base: string;
|
|
145
|
-
|
|
138
|
+
icon: string;
|
|
146
139
|
};
|
|
147
140
|
warning: {
|
|
148
141
|
base: string;
|
|
149
|
-
|
|
142
|
+
icon: string;
|
|
143
|
+
};
|
|
144
|
+
danger: {
|
|
145
|
+
base: string;
|
|
146
|
+
icon: string;
|
|
150
147
|
};
|
|
151
148
|
};
|
|
152
149
|
}>, unknown, unknown, undefined>>;
|
package/dist/alert/variants.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as t } from "../index-CB-zPpNk.js";
|
|
2
|
+
const i = t({
|
|
3
3
|
slots: {
|
|
4
|
-
base: "gi-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
dismiss: "gi-alert-dismiss"
|
|
4
|
+
base: "gi-relative gi-flex gi-flex-row gi-p-3 gi-border-xs gi-rounded-sm gi-gap-2 gi-max-w-[640px] [width:inherit]",
|
|
5
|
+
container: "gi-flex gi-flex-col gi-items-start gi-grow gi-pr-2",
|
|
6
|
+
heading: "gi-text-2md gi-font-bold",
|
|
7
|
+
dismiss: "gi-absolute gi-top-2 gi-right-2"
|
|
9
8
|
},
|
|
10
9
|
variants: {
|
|
11
10
|
variant: {
|
|
12
11
|
info: {
|
|
13
|
-
base: "gi-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
danger: {
|
|
17
|
-
base: "gi-alert-danger",
|
|
18
|
-
baseDismissible: "gi-alert-danger"
|
|
12
|
+
base: "gi-bg-color-surface-intent-info-default gi-border-color-border-intent-info-subtle gi-text-color-text-intent-info-default",
|
|
13
|
+
icon: "gi-text-color-icon-intent-info-default"
|
|
19
14
|
},
|
|
20
15
|
success: {
|
|
21
|
-
base: "gi-
|
|
22
|
-
|
|
16
|
+
base: "gi-bg-color-surface-intent-success-default gi-border-color-border-intent-success-subtle gi-text-color-text-intent-success-default",
|
|
17
|
+
icon: "gi-text-color-icon-intent-success-default"
|
|
23
18
|
},
|
|
24
19
|
warning: {
|
|
25
|
-
base: "gi-
|
|
26
|
-
|
|
20
|
+
base: "gi-bg-color-surface-intent-warning-default gi-border-color-border-intent-warning-subtle gi-text-color-text-intent-warning-default",
|
|
21
|
+
icon: "gi-text-color-icon-intent-warning-default"
|
|
22
|
+
},
|
|
23
|
+
danger: {
|
|
24
|
+
base: "gi-bg-color-surface-intent-error-default gi-border-color-border-intent-error-subtle gi-text-color-text-intent-error-default",
|
|
25
|
+
icon: "gi-text-color-icon-intent-error-default"
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
},
|
|
@@ -32,5 +31,5 @@ const a = i({
|
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
i as alertVariants
|
|
36
35
|
};
|
package/dist/atoms/Button.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The file source is in `packages/core/atoms/Button.lite.tsx`
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
type Props = {
|
|
7
|
+
export type Props = {
|
|
8
8
|
id?: string;
|
|
9
9
|
variant?: (typeof Variant)[keyof typeof Variant];
|
|
10
10
|
appearance?: (typeof Appearance)[keyof typeof Appearance];
|
|
@@ -20,6 +20,7 @@ type Props = {
|
|
|
20
20
|
ariaLabel?: string;
|
|
21
21
|
ariaLabelledBy?: string;
|
|
22
22
|
ariaDescribedBy?: string;
|
|
23
|
+
ariaChecked?: boolean;
|
|
23
24
|
ariaPressed?: boolean | 'mixed';
|
|
24
25
|
ariaExpanded?: boolean;
|
|
25
26
|
ariaControls?: string;
|
|
@@ -31,7 +32,6 @@ type Props = {
|
|
|
31
32
|
value?: string;
|
|
32
33
|
tabIndex?: number;
|
|
33
34
|
dataTestId?: string;
|
|
34
|
-
dataTestid?: string;
|
|
35
35
|
ref?: any;
|
|
36
36
|
};
|
|
37
37
|
export declare const Variant: {
|
package/dist/atoms/Button.js
CHANGED
|
@@ -291,6 +291,7 @@ const r = {
|
|
|
291
291
|
"aria-label": e.ariaLabel,
|
|
292
292
|
"aria-labelledby": e.ariaLabelledBy,
|
|
293
293
|
"aria-describedby": e.ariaDescribedBy,
|
|
294
|
+
"aria-checked": e.ariaChecked,
|
|
294
295
|
"aria-pressed": e.ariaPressed,
|
|
295
296
|
"aria-expanded": e.ariaExpanded,
|
|
296
297
|
"aria-controls": e.ariaControls,
|
|
@@ -301,7 +302,7 @@ const r = {
|
|
|
301
302
|
form: e.form,
|
|
302
303
|
value: e.value,
|
|
303
304
|
tabIndex: e.tabIndex,
|
|
304
|
-
"data-testid": e.dataTestId
|
|
305
|
+
"data-testid": e.dataTestId,
|
|
305
306
|
children: e.children
|
|
306
307
|
}
|
|
307
308
|
);
|
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
|
};
|