@ogcio/design-system-react 1.28.0 → 1.30.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/README.md +11 -33
- package/dist/alert/variants.d.ts +78 -2
- package/dist/assets/logos/LogoBlack.d.ts +3 -0
- package/dist/assets/logos/LogoBlack.js +322 -0
- package/dist/assets/logos/LogoGoldGreen.d.ts +3 -0
- package/dist/assets/logos/LogoGoldGreen.js +322 -0
- package/dist/assets/logos/LogoGoldWhite.d.ts +3 -0
- package/dist/assets/logos/LogoGoldWhite.js +82 -0
- package/dist/assets/logos/LogoHarpBlack.d.ts +3 -0
- package/dist/assets/logos/{harp/harp-white.js → LogoHarpBlack.js} +24 -21
- package/dist/assets/logos/LogoHarpWhite.d.ts +3 -0
- package/dist/assets/logos/LogoHarpWhite.js +60 -0
- package/dist/assets/logos/LogoWhite.d.ts +3 -0
- package/dist/assets/logos/LogoWhite.js +322 -0
- package/dist/assets/logos/index.d.ts +6 -0
- package/dist/assets/logos/index.js +14 -0
- package/dist/atoms/DsButton.d.ts +194 -0
- package/dist/atoms/DsButton.js +329 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +22 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +22 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +22 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +22 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +22 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- package/dist/atoms/icons/types.d.ts +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +2 -0
- package/dist/atoms/index.js +14 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- package/dist/combo-box/dropdown-item.js +39 -40
- package/dist/data-table/data-table-footer.js +57 -51
- package/dist/data-table/data-table-header.d.ts +7 -7
- package/dist/data-table/data-table-header.js +97 -110
- package/dist/data-table/data-table-selected-rows.d.ts +1 -0
- package/dist/data-table/data-table-selected-rows.js +15 -19
- package/dist/footer/footer.js +9 -9
- package/dist/forms/form-field/form-field.d.ts +2 -2
- package/dist/forms/form-field/form-field.js +40 -30
- package/dist/forms/form-field/types.d.ts +10 -3
- package/dist/header/components/header-slot.js +33 -32
- package/dist/header/header-legacy.js +41 -41
- package/dist/header/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-breakpoint.js +15 -12
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +64 -52
- package/dist/icon/icons.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +174 -171
- package/dist/input-password/input-password.js +13 -12
- package/dist/input-text/input-text.js +18 -16
- package/dist/label/label.d.ts +43 -0
- package/dist/label/label.js +7 -6
- package/dist/modal/modal.js +8 -7
- package/dist/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- package/dist/text-input/text-input.d.ts +1 -1
- package/dist/textarea/textarea.js +27 -28
- package/dist/toast/ds-toast.d.ts +78 -2
- package/dist/utils/placeholder.d.ts +2 -0
- package/dist/utils/placeholder.js +24 -0
- package/fonts.css +10 -0
- package/package.json +21 -8
- package/dist/assets/logos/gov-of-ireland/harp-black.d.ts +0 -2
- package/dist/assets/logos/gov-of-ireland/harp-black.js +0 -322
- package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.d.ts +0 -2
- package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.js +0 -322
- package/dist/assets/logos/gov-of-ireland/harp-white.d.ts +0 -2
- package/dist/assets/logos/gov-of-ireland/harp-white.js +0 -322
- package/dist/assets/logos/harp/harp-black.d.ts +0 -2
- package/dist/assets/logos/harp/harp-black.js +0 -63
- package/dist/assets/logos/harp/harp-white.d.ts +0 -2
package/dist/label/label.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as r } from "react";
|
|
3
3
|
import { c as o } from "../index-CB-zPpNk.js";
|
|
4
4
|
const d = {
|
|
@@ -17,11 +17,12 @@ const d = {
|
|
|
17
17
|
defaultVariants: {
|
|
18
18
|
size: "md"
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
21
|
-
({ text: e, size: a = d.Medium, className:
|
|
20
|
+
}), c = r(
|
|
21
|
+
({ text: e, size: a = d.Medium, className: m, children: s, ...t }, l) => /* @__PURE__ */ i("label", { className: g({ size: a, className: m }), ref: l, ...t, children: s ?? e })
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
c.displayName = "Label";
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
d as LabelSize
|
|
25
|
+
c as Label,
|
|
26
|
+
d as LabelSize,
|
|
27
|
+
g as styles
|
|
27
28
|
};
|
package/dist/modal/modal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as y, Fragment as j } from "react/jsx-runtime";
|
|
3
|
-
import { isValidElement as U, cloneElement as
|
|
3
|
+
import { isValidElement as U, cloneElement as T, useState as A, useRef as W, useMemo as _, Children as z, useId as G, useEffect as C } from "react";
|
|
4
4
|
import { createPortal as J } from "react-dom";
|
|
5
5
|
import { Button as E } from "../button/button.js";
|
|
6
6
|
import { cn as u } from "../cn.js";
|
|
@@ -45,6 +45,7 @@ const I = {
|
|
|
45
45
|
variant: "flat",
|
|
46
46
|
size: t,
|
|
47
47
|
appearance: "dark",
|
|
48
|
+
dataTestid: "modal-close-button",
|
|
48
49
|
...o
|
|
49
50
|
}
|
|
50
51
|
);
|
|
@@ -85,12 +86,12 @@ const I = {
|
|
|
85
86
|
const [D, S] = _(
|
|
86
87
|
() => R(v),
|
|
87
88
|
[v]
|
|
88
|
-
), F = z.toArray(g),
|
|
89
|
+
), F = z.toArray(g), b = (m) => F.find(
|
|
89
90
|
(p) => et(p) === m
|
|
90
|
-
), f =
|
|
91
|
+
), f = b("ModalTitle"), N = b("ModalFooter") || b("DrawerFooter"), L = G(), H = ((k = f == null ? void 0 : f.props) == null ? void 0 : k.id) || `gi-modal-title-${L}`, $ = f ? T(f, {
|
|
91
92
|
as: t === "sm" ? "h5" : "h4",
|
|
92
93
|
id: H
|
|
93
|
-
}) : null, V =
|
|
94
|
+
}) : null, V = N ? T(N, {
|
|
94
95
|
dataModalSize: t
|
|
95
96
|
}) : null, q = F.filter(
|
|
96
97
|
(m) => !tt(m, ["ModalTitle", "ModalFooter", "DrawerFooter"])
|
|
@@ -159,7 +160,7 @@ const I = {
|
|
|
159
160
|
closeButtonSize: a
|
|
160
161
|
}
|
|
161
162
|
),
|
|
162
|
-
/* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !
|
|
163
|
+
/* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !N }), children: [
|
|
163
164
|
q,
|
|
164
165
|
V
|
|
165
166
|
] })
|
|
@@ -223,7 +224,7 @@ const ht = ({
|
|
|
223
224
|
children: d.map(
|
|
224
225
|
(a, l) => {
|
|
225
226
|
var c;
|
|
226
|
-
return
|
|
227
|
+
return T(a, {
|
|
227
228
|
key: a.key || a.props.id || a.props.dataTestid || `modal-footer-button-${l}`,
|
|
228
229
|
id: a.props.id || `modal-footer-button-${l}`,
|
|
229
230
|
className: u((c = a == null ? void 0 : a.props) == null ? void 0 : c.className, g)
|
|
@@ -259,7 +260,7 @@ const nt = ({
|
|
|
259
260
|
startsOpen: o,
|
|
260
261
|
...n
|
|
261
262
|
}) => {
|
|
262
|
-
const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g =
|
|
263
|
+
const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g = T(t, {
|
|
263
264
|
"data-testid": "modal-trigger-button-container",
|
|
264
265
|
"aria-haspopup": "dialog",
|
|
265
266
|
onClick: h
|
|
@@ -12,7 +12,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
12
12
|
md: string;
|
|
13
13
|
sm: string;
|
|
14
14
|
};
|
|
15
|
-
}, undefined, undefined, TVConfig<
|
|
15
|
+
}, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
16
|
+
size: {
|
|
17
|
+
xl: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
md: string;
|
|
20
|
+
sm: string;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
size: {
|
|
24
|
+
xl: string;
|
|
25
|
+
lg: string;
|
|
26
|
+
md: string;
|
|
27
|
+
sm: string;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
16
30
|
size: {
|
|
17
31
|
xl: string;
|
|
18
32
|
lg: string;
|
|
@@ -26,7 +40,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
26
40
|
md: string;
|
|
27
41
|
sm: string;
|
|
28
42
|
};
|
|
29
|
-
}, undefined, undefined, TVConfig<
|
|
43
|
+
}, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
44
|
+
size: {
|
|
45
|
+
xl: string;
|
|
46
|
+
lg: string;
|
|
47
|
+
md: string;
|
|
48
|
+
sm: string;
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
size: {
|
|
52
|
+
xl: string;
|
|
53
|
+
lg: string;
|
|
54
|
+
md: string;
|
|
55
|
+
sm: string;
|
|
56
|
+
};
|
|
57
|
+
}>, unknown, unknown, undefined>>;
|
|
30
58
|
export type SpinnerProps = VariantProps<typeof spinnerVariants> & {
|
|
31
59
|
inline?: boolean;
|
|
32
60
|
dataTestid?: string;
|