@ogcio/design-system-react 1.15.2 → 1.16.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/assets/logos/gov-of-ireland/harp-black.d.ts +2 -0
- package/dist/assets/logos/gov-of-ireland/harp-black.js +322 -0
- package/dist/assets/logos/harp/harp-black.d.ts +2 -0
- package/dist/assets/logos/harp/harp-black.js +63 -0
- package/dist/autocomplete/autocomplete.js +56 -53
- package/dist/button/button.js +1 -1
- package/dist/drawer/drawer.content.js +29 -43
- package/dist/drawer/drawer.d.ts +2 -1
- package/dist/drawer/drawer.js +11 -7
- package/dist/file-upload/file-upload.d.ts +3 -1
- package/dist/forms/form-field/form-field.d.ts +1 -1
- package/dist/forms/form-field/form-field.js +29 -19
- package/dist/header/components/header-menu.js +53 -47
- package/dist/header/components/header-slot.d.ts +5 -3
- package/dist/header/components/header-slot.js +58 -47
- package/dist/header/header.d.ts +1 -1
- package/dist/header/header.js +128 -106
- package/dist/header/types.d.ts +2 -0
- package/dist/header/variants.d.ts +160 -0
- package/dist/header/variants.js +88 -0
- package/dist/input-file/input-file.d.ts +3 -2
- package/dist/input-file/input-file.js +13 -12
- package/dist/input-file/types.d.ts +3 -1
- package/dist/input-text/input-text.d.ts +2 -0
- package/dist/input-text/input-text.js +56 -55
- package/dist/input-text/type.d.ts +1 -0
- package/dist/modal/modal.d.ts +2 -2
- package/dist/modal/modal.js +185 -149
- package/dist/modal/types.d.ts +5 -0
- package/dist/phase-banner/phase-banner.d.ts +4 -2
- package/dist/phase-banner/phase-banner.js +30 -7
- package/dist/popover/popover.js +560 -524
- package/dist/select/select-menu.js +61 -63
- package/dist/select/select-next.js +61 -57
- package/dist/select/types.d.ts +0 -3
- package/dist/styles.css +1 -1
- package/dist/table/table-pagination.js +63 -46
- package/dist/table/table.js +18 -18
- package/dist/text-input/text-input.d.ts +1 -0
- package/dist/textarea/textarea.js +52 -49
- package/dist/toast/toast.js +6 -9
- package/package.json +4 -3
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as d, useRef as W, useImperativeHandle as _, useMemo as j } from "react";
|
|
4
4
|
import { cn as u } from "../cn.js";
|
|
5
|
-
import { Icon as
|
|
5
|
+
import { Icon as x } from "../icon/icon.js";
|
|
6
6
|
import { IconButton as O } from "../icon-button/icon-button.js";
|
|
7
7
|
import { Input as y } from "../primitives/input.js";
|
|
8
8
|
const H = d(
|
|
9
|
-
({ onChange: a, ...
|
|
10
|
-
const
|
|
11
|
-
return _(r, () =>
|
|
12
|
-
|
|
9
|
+
({ onChange: a, ...e }, r) => {
|
|
10
|
+
const t = W(null);
|
|
11
|
+
return _(r, () => t.current), /* @__PURE__ */ n(
|
|
12
|
+
h,
|
|
13
13
|
{
|
|
14
|
-
...
|
|
14
|
+
...e,
|
|
15
15
|
onChange: a,
|
|
16
|
-
ref:
|
|
16
|
+
ref: t,
|
|
17
17
|
inputActionButton: {
|
|
18
18
|
icon: "close",
|
|
19
19
|
onClick: () => {
|
|
20
|
-
|
|
20
|
+
t != null && t.current && (t.current.value = "", t.current.focus());
|
|
21
21
|
const f = {
|
|
22
|
-
target:
|
|
23
|
-
currentTarget:
|
|
22
|
+
target: t.current,
|
|
23
|
+
currentTarget: t.current,
|
|
24
24
|
__origin: "clear_button"
|
|
25
25
|
};
|
|
26
26
|
a && a(f);
|
|
@@ -29,41 +29,41 @@ const H = d(
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
),
|
|
32
|
+
), h = d(
|
|
33
33
|
({
|
|
34
34
|
prefix: a,
|
|
35
|
-
inputActionButton:
|
|
35
|
+
inputActionButton: e,
|
|
36
36
|
inputActionPosition: r = "beforeSuffix",
|
|
37
|
-
suffix:
|
|
37
|
+
suffix: t,
|
|
38
38
|
halfFluid: l = !1,
|
|
39
39
|
className: f,
|
|
40
40
|
type: g = "text",
|
|
41
41
|
iconStart: c,
|
|
42
|
-
iconStartClassName:
|
|
43
|
-
onIconStartClick:
|
|
42
|
+
iconStartClassName: v,
|
|
43
|
+
onIconStartClick: N,
|
|
44
44
|
iconEnd: s,
|
|
45
|
-
iconEndClassName:
|
|
46
|
-
onIconEndClick:
|
|
45
|
+
iconEndClassName: T,
|
|
46
|
+
onIconEndClick: w,
|
|
47
47
|
disabled: i,
|
|
48
|
-
inputClassName:
|
|
49
|
-
iconEndRef:
|
|
50
|
-
containerProps:
|
|
51
|
-
...
|
|
48
|
+
inputClassName: C,
|
|
49
|
+
iconEndRef: b,
|
|
50
|
+
containerProps: k,
|
|
51
|
+
...m
|
|
52
52
|
}, z) => {
|
|
53
|
-
const R = j(() =>
|
|
53
|
+
const R = j(() => e && r === "beforeSuffix" ? /* @__PURE__ */ n(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
className: "gi-input-text-action-before-suffix",
|
|
57
|
-
"data-suffix": !!
|
|
57
|
+
"data-suffix": !!t,
|
|
58
58
|
"data-has-icon-end": !!s,
|
|
59
|
-
children: /* @__PURE__ */ n(
|
|
59
|
+
children: /* @__PURE__ */ n(p, { ...e, disabled: i })
|
|
60
60
|
}
|
|
61
|
-
) : null, [
|
|
61
|
+
) : null, [e]);
|
|
62
62
|
return /* @__PURE__ */ o(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: u(f, "gi-input-text-container"),
|
|
66
|
-
...
|
|
66
|
+
...k,
|
|
67
67
|
children: [
|
|
68
68
|
a && /* @__PURE__ */ n("div", { className: "gi-input-text-prefix", "data-disabled": i, children: a }),
|
|
69
69
|
/* @__PURE__ */ o(
|
|
@@ -76,11 +76,11 @@ const H = d(
|
|
|
76
76
|
c && /* @__PURE__ */ n(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
|
-
className: u("gi-input-text-icon-start",
|
|
80
|
-
onClick:
|
|
79
|
+
className: u("gi-input-text-icon-start", v),
|
|
80
|
+
onClick: N,
|
|
81
81
|
"data-prefix": !!a,
|
|
82
82
|
children: typeof c == "string" ? /* @__PURE__ */ n(
|
|
83
|
-
|
|
83
|
+
x,
|
|
84
84
|
{
|
|
85
85
|
icon: c,
|
|
86
86
|
size: "md",
|
|
@@ -95,41 +95,42 @@ const H = d(
|
|
|
95
95
|
type: g,
|
|
96
96
|
"data-icon-start": !!c,
|
|
97
97
|
"data-icon-end": !!s,
|
|
98
|
-
"data-end-element": !!
|
|
98
|
+
"data-end-element": !!e,
|
|
99
99
|
"data-prefix": !!a,
|
|
100
|
-
"data-suffix": !!
|
|
101
|
-
|
|
100
|
+
"data-suffix": !!t,
|
|
101
|
+
"data-testid": m.dataTestId,
|
|
102
|
+
className: u("gi-input-text", C),
|
|
102
103
|
ref: z,
|
|
103
104
|
disabled: i,
|
|
104
|
-
...
|
|
105
|
+
...m
|
|
105
106
|
}
|
|
106
107
|
),
|
|
107
108
|
s && /* @__PURE__ */ n(
|
|
108
109
|
"div",
|
|
109
110
|
{
|
|
110
|
-
className: u("gi-input-text-icon-end",
|
|
111
|
-
"data-end-element": !!
|
|
112
|
-
"data-suffix": !!
|
|
113
|
-
onClick:
|
|
114
|
-
ref:
|
|
115
|
-
children: typeof s == "string" ? /* @__PURE__ */ n(
|
|
111
|
+
className: u("gi-input-text-icon-end", T),
|
|
112
|
+
"data-end-element": !!e && r === "afterSuffix",
|
|
113
|
+
"data-suffix": !!t,
|
|
114
|
+
onClick: w,
|
|
115
|
+
ref: b,
|
|
116
|
+
children: typeof s == "string" ? /* @__PURE__ */ n(x, { icon: s, size: "md", disabled: i }) : s
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
119
|
R
|
|
119
120
|
]
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
e && r === "afterSuffix" && /* @__PURE__ */ n("div", { className: "gi-input-text-end-element", "data-suffix": !!t, children: /* @__PURE__ */ n(p, { ...e, disabled: i }) }),
|
|
124
|
+
t && /* @__PURE__ */ n("div", { className: "gi-input-text-suffix", "data-disabled": i, children: t })
|
|
124
125
|
]
|
|
125
126
|
}
|
|
126
127
|
);
|
|
127
128
|
}
|
|
128
|
-
),
|
|
129
|
+
), p = ({
|
|
129
130
|
onClick: a,
|
|
130
|
-
ariaLabel:
|
|
131
|
+
ariaLabel: e,
|
|
131
132
|
icon: r,
|
|
132
|
-
dataTestId:
|
|
133
|
+
dataTestId: t,
|
|
133
134
|
...l
|
|
134
135
|
}) => /* @__PURE__ */ n(
|
|
135
136
|
O,
|
|
@@ -138,31 +139,31 @@ const H = d(
|
|
|
138
139
|
icon: {
|
|
139
140
|
icon: r
|
|
140
141
|
},
|
|
141
|
-
"data-testid":
|
|
142
|
-
"aria-label":
|
|
142
|
+
"data-testid": t,
|
|
143
|
+
"aria-label": e || "",
|
|
143
144
|
onClick: a,
|
|
144
145
|
variant: "flat",
|
|
145
146
|
size: "small",
|
|
146
147
|
appearance: "dark"
|
|
147
148
|
}
|
|
148
|
-
),
|
|
149
|
-
({ type: a = "text", clearButtonEnabled:
|
|
149
|
+
), I = d(
|
|
150
|
+
({ type: a = "text", clearButtonEnabled: e, ...r }, t) => e || a === "search" ? /* @__PURE__ */ n(H, { ref: t, type: a, ...r }) : /* @__PURE__ */ n(h, { ref: t, type: a, ...r })
|
|
150
151
|
);
|
|
151
|
-
|
|
152
|
-
const F = d(({ type: a = "text", error:
|
|
153
|
-
|
|
152
|
+
I.displayName = "InputText";
|
|
153
|
+
const F = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
|
|
154
|
+
I,
|
|
154
155
|
{
|
|
155
156
|
...r,
|
|
156
157
|
containerProps: {
|
|
157
158
|
"data-table-cell": !0,
|
|
158
|
-
"data-table-cell-error-state":
|
|
159
|
+
"data-table-cell-error-state": e == null ? void 0 : e.toString()
|
|
159
160
|
},
|
|
160
|
-
ref:
|
|
161
|
+
ref: t,
|
|
161
162
|
type: a
|
|
162
163
|
}
|
|
163
164
|
));
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
p as InputActionButton,
|
|
167
|
+
I as InputText,
|
|
167
168
|
F as InputTextTableCell
|
|
168
169
|
};
|
|
@@ -26,6 +26,7 @@ export type InputTextProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
26
26
|
halfFluid?: boolean;
|
|
27
27
|
clearButtonEnabled?: boolean;
|
|
28
28
|
containerProps?: any;
|
|
29
|
+
dataTestId?: string;
|
|
29
30
|
};
|
|
30
31
|
export type InputTextTableCellProps = InputTextProps & {
|
|
31
32
|
error?: boolean;
|
package/dist/modal/modal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { HeadingProps } from '../heading/heading.js';
|
|
3
3
|
import { ModalFooterProps, ModalProps, ModalWrapperProps } from './types.js';
|
|
4
|
-
export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, closeOnEscape, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const ModalTitle: {
|
|
6
6
|
({ children, as, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
@@ -11,7 +11,7 @@ export declare const ModalBody: ({ children, className, }: {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare const ModalFooter: {
|
|
14
|
-
({ className, children, orientation, dataModalSize, }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ className, children, orientation, dataModalSize, stacked, }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const Modal: ({ children, triggerButton, startsOpen, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|