@ogcio/design-system-react 1.11.3 → 1.12.1
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 +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/autocomplete/autocomplete.js +4 -4
- package/dist/button-group/button-group.js +44 -44
- package/dist/card/card-next.js +28 -28
- package/dist/combo-box/dropdown-item.js +30 -30
- package/dist/drawer/drawer.content.js +6 -6
- package/dist/drawer/drawer.js +8 -8
- package/dist/error-text/error-text.js +1 -1
- package/dist/forms/form-field/form-field.d.ts +18 -0
- package/dist/forms/form-field/form-field.js +85 -0
- package/dist/forms/form-field/types.d.ts +13 -0
- package/dist/forms/form-field/types.js +1 -0
- package/dist/forms/form-field-with-tag/form-field-with-tag.js +1 -1
- package/dist/heading/heading.js +1 -1
- package/dist/hint-text/hint-text.js +1 -1
- package/dist/icon/icon.js +32 -32
- package/dist/index-2sRBqKFV.js +78 -0
- package/dist/{index-DNkhmzZp.js → index-CB-zPpNk.js} +44 -44
- package/dist/index.d.ts +3 -1
- package/dist/index.js +162 -155
- package/dist/input-checkbox/input-checkbox.js +13 -13
- package/dist/input-radio/input-radio.js +15 -15
- package/dist/label/label.js +1 -1
- package/dist/link/link.js +1 -1
- package/dist/list/list.js +2 -2
- package/dist/modal/modal.content.js +1 -1
- package/dist/modal/modal.js +3 -3
- package/dist/popover/popover.js +471 -467
- package/dist/primitives/anchor.js +1 -1
- package/dist/progress-bar/progress-bar.js +8 -8
- package/dist/progress-stepper/progress-stepper.js +10 -10
- package/dist/score-select/score-select.js +29 -29
- package/dist/select/select-menu.js +1 -0
- package/dist/select/select-next.js +11 -10
- package/dist/side-nav/side-nav.js +23 -23
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/table/table.js +1 -1
- package/dist/textarea/textarea.js +7 -7
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/tooltip.js +1 -1
- package/package.json +2 -2
- package/dist/forms/form-field.d.ts +0 -11
- package/dist/forms/form-field.js +0 -41
- package/dist/index-ntYL1VRC.js +0 -64
package/dist/table/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as d, Fragment as k, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as R, useRef as j, useState as m, useImperativeHandle as p, useEffect as y } from "react";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as g } from "../cn.js";
|
|
5
5
|
import { HintText as z } from "../hint-text/hint-text.js";
|
|
6
6
|
import { translate as A } from "../i18n/utility.js";
|
|
7
7
|
import { Icon as H } from "../icon/icon.js";
|
|
@@ -9,8 +9,8 @@ import { IconButton as O } from "../icon-button/icon-button.js";
|
|
|
9
9
|
const E = R(
|
|
10
10
|
({
|
|
11
11
|
value: i,
|
|
12
|
-
rows:
|
|
13
|
-
cols:
|
|
12
|
+
rows: u = 4,
|
|
13
|
+
cols: f = 100,
|
|
14
14
|
autoComplete: h = "on",
|
|
15
15
|
maxChars: t,
|
|
16
16
|
halfFluid: x = !1,
|
|
@@ -44,7 +44,7 @@ const E = R(
|
|
|
44
44
|
/* @__PURE__ */ n("div", { className: "gi-textarea-container", children: /* @__PURE__ */ d(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
47
|
+
className: g("gi-textarea-inner", {
|
|
48
48
|
"gi-input-half-width": x
|
|
49
49
|
}),
|
|
50
50
|
children: [
|
|
@@ -52,10 +52,10 @@ const E = R(
|
|
|
52
52
|
/* @__PURE__ */ n(
|
|
53
53
|
"textarea",
|
|
54
54
|
{
|
|
55
|
-
rows:
|
|
56
|
-
cols:
|
|
55
|
+
rows: u,
|
|
56
|
+
cols: f,
|
|
57
57
|
autoComplete: h,
|
|
58
|
-
className:
|
|
58
|
+
className: g(v, "gi-textarea"),
|
|
59
59
|
ref: e,
|
|
60
60
|
"data-icon-start": !!c,
|
|
61
61
|
"data-clear-enabled": l,
|
package/dist/toast/ds-toast.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { c as u } from "../index-
|
|
3
|
+
import { c as u } from "../index-CB-zPpNk.js";
|
|
4
4
|
import { Icon as p } from "../icon/icon.js";
|
|
5
5
|
import { IconButton as v } from "../icon-button/icon-button.js";
|
|
6
6
|
import { Link as w } from "../link/link.js";
|
package/dist/tooltip/tooltip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as b, jsx as g } from "react/jsx-runtime";
|
|
3
3
|
import { useState as c, useId as h, useCallback as d, useEffect as v } from "react";
|
|
4
|
-
import { c as y } from "../index-
|
|
4
|
+
import { c as y } from "../index-CB-zPpNk.js";
|
|
5
5
|
const T = ["top", "bottom", "left", "right"], E = y({
|
|
6
6
|
base: "gi-tooltip",
|
|
7
7
|
variants: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/design-system-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "The GOV IE design system React components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"react": "19.0.0",
|
|
52
52
|
"react-dom": "19.0.0",
|
|
53
53
|
"@ogcio/design-system-prettier-config": "1.0.5",
|
|
54
|
+
"@ogcio/design-system-tailwind": "1.11.0",
|
|
54
55
|
"@ogcio/design-system-eslint-config": "1.2.5",
|
|
55
|
-
"@ogcio/design-system-tailwind": "1.10.3",
|
|
56
56
|
"@ogcio/theme-doete": "1.0.0",
|
|
57
57
|
"@ogcio/theme-govie": "1.5.3"
|
|
58
58
|
},
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FieldsetHTMLAttributes } from 'react';
|
|
2
|
-
import { ErrorTextProps } from '../error-text/types.js';
|
|
3
|
-
import { HintTextProps } from '../hint-text/types.js';
|
|
4
|
-
import { LabelTextProps } from '../label/types.js';
|
|
5
|
-
export type FormFieldProps = {
|
|
6
|
-
error?: ErrorTextProps;
|
|
7
|
-
hint?: HintTextProps;
|
|
8
|
-
label?: LabelTextProps;
|
|
9
|
-
className?: string;
|
|
10
|
-
} & Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'style'>;
|
|
11
|
-
export declare const FormField: ({ label, hint, error, children, className, ...props }: FormFieldProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/forms/form-field.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { S as g } from "../index-ntYL1VRC.js";
|
|
3
|
-
import { cn as h } from "../cn.js";
|
|
4
|
-
import { ErrorText as l } from "../error-text/error-text.js";
|
|
5
|
-
import { HintText as a } from "../hint-text/hint-text.js";
|
|
6
|
-
import { Label as z } from "../label/label.js";
|
|
7
|
-
const C = ({
|
|
8
|
-
label: e,
|
|
9
|
-
hint: s,
|
|
10
|
-
error: m,
|
|
11
|
-
children: c,
|
|
12
|
-
className: x,
|
|
13
|
-
...d
|
|
14
|
-
}) => {
|
|
15
|
-
const n = (f, t) => {
|
|
16
|
-
const o = f === "error" ? l : a;
|
|
17
|
-
return t != null && t.text ? typeof t.text == "string" ? /* @__PURE__ */ i(o, { text: t.text, size: t.size, className: "gi-mb-1" }) : /* @__PURE__ */ i(o, { size: t.size, className: "gi-mb-1", children: t.text }) : null;
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ r("fieldset", { className: h({ "gi-error-state": m }, x), ...d, children: [
|
|
20
|
-
/* @__PURE__ */ r("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
|
|
21
|
-
/* @__PURE__ */ r("div", { children: [
|
|
22
|
-
(e == null ? void 0 : e.text) && /* @__PURE__ */ i(
|
|
23
|
-
z,
|
|
24
|
-
{
|
|
25
|
-
text: e.text,
|
|
26
|
-
size: e.size,
|
|
27
|
-
htmlFor: e.htmlFor,
|
|
28
|
-
className: "gi-font-bold",
|
|
29
|
-
children: e.children
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
n("hint", s)
|
|
33
|
-
] }),
|
|
34
|
-
n("error", m)
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ i(g, { children: c })
|
|
37
|
-
] });
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
C as FormField
|
|
41
|
-
};
|
package/dist/index-ntYL1VRC.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
3
|
-
function p(e, r) {
|
|
4
|
-
if (typeof e == "function")
|
|
5
|
-
return e(r);
|
|
6
|
-
e != null && (e.current = r);
|
|
7
|
-
}
|
|
8
|
-
function m(...e) {
|
|
9
|
-
return (r) => {
|
|
10
|
-
let n = !1;
|
|
11
|
-
const l = e.map((t) => {
|
|
12
|
-
const o = p(t, r);
|
|
13
|
-
return !n && typeof o == "function" && (n = !0), o;
|
|
14
|
-
});
|
|
15
|
-
if (n)
|
|
16
|
-
return () => {
|
|
17
|
-
for (let t = 0; t < l.length; t++) {
|
|
18
|
-
const o = l[t];
|
|
19
|
-
typeof o == "function" ? o() : p(e[t], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
var y = i.forwardRef((e, r) => {
|
|
25
|
-
const { children: n, ...l } = e, t = i.Children.toArray(n), o = t.find(h);
|
|
26
|
-
if (o) {
|
|
27
|
-
const s = o.props.children, a = t.map((u) => u === o ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : u);
|
|
28
|
-
return /* @__PURE__ */ c(f, { ...l, ref: r, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
|
|
29
|
-
}
|
|
30
|
-
return /* @__PURE__ */ c(f, { ...l, ref: r, children: n });
|
|
31
|
-
});
|
|
32
|
-
y.displayName = "Slot";
|
|
33
|
-
var f = i.forwardRef((e, r) => {
|
|
34
|
-
const { children: n, ...l } = e;
|
|
35
|
-
if (i.isValidElement(n)) {
|
|
36
|
-
const t = R(n), o = C(l, n.props);
|
|
37
|
-
return n.type !== i.Fragment && (o.ref = r ? m(r, t) : t), i.cloneElement(n, o);
|
|
38
|
-
}
|
|
39
|
-
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
40
|
-
});
|
|
41
|
-
f.displayName = "SlotClone";
|
|
42
|
-
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
43
|
-
function h(e) {
|
|
44
|
-
return i.isValidElement(e) && e.type === g;
|
|
45
|
-
}
|
|
46
|
-
function C(e, r) {
|
|
47
|
-
const n = { ...r };
|
|
48
|
-
for (const l in r) {
|
|
49
|
-
const t = e[l], o = r[l];
|
|
50
|
-
/^on[A-Z]/.test(l) ? t && o ? n[l] = (...a) => {
|
|
51
|
-
o(...a), t(...a);
|
|
52
|
-
} : t && (n[l] = t) : l === "style" ? n[l] = { ...t, ...o } : l === "className" && (n[l] = [t, o].filter(Boolean).join(" "));
|
|
53
|
-
}
|
|
54
|
-
return { ...e, ...n };
|
|
55
|
-
}
|
|
56
|
-
function R(e) {
|
|
57
|
-
var l, t;
|
|
58
|
-
let r = (l = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : l.get, n = r && "isReactWarning" in r && r.isReactWarning;
|
|
59
|
-
return n ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
g as S,
|
|
63
|
-
y as a
|
|
64
|
-
};
|