@ogcio/design-system-react 1.23.0 → 1.25.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 +5 -5
- package/dist/accordion/accordion-item.d.ts +3 -5
- package/dist/accordion/accordion-item.js +36 -31
- package/dist/accordion/accordion.d.ts +3 -5
- package/dist/accordion/accordion.js +22 -33
- package/dist/autocomplete/autocomplete.js +105 -101
- package/dist/autocomplete/use-autocomplete-controller.js +60 -58
- package/dist/browser-support/browser-support.d.ts +6 -0
- package/dist/browser-support/browser-support.js +2202 -0
- package/dist/browser-support/index.d.ts +1 -0
- package/dist/browser-support/index.js +4 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/cn.js +4 -16
- package/dist/constants.d.ts +43 -0
- package/dist/constants.js +46 -0
- package/dist/icon/icon.d.ts +16 -4
- package/dist/icon/icon.js +79 -166
- package/dist/index.d.ts +3 -3
- package/dist/index.js +193 -190
- package/dist/pagination/pagination.js +305 -565
- package/dist/select/select-next.js +74 -71
- package/dist/side-nav/index.d.ts +2 -0
- package/dist/side-nav/index.js +6 -0
- package/dist/side-nav/side-nav.d.ts +2 -1
- package/dist/side-nav/side-nav.js +119 -98
- package/dist/side-nav/types.d.ts +4 -0
- package/dist/styles.css +1 -1
- package/dist/tabs/tab-item.d.ts +1 -1
- package/dist/tag/tag.d.ts +9 -3
- package/dist/tag/tag.js +35 -18
- package/dist/useTranslation-BmIU4GBA.js +272 -0
- package/package.json +8 -11
- package/dist/browser-support/runtime.d.ts +0 -43
- package/dist/browser-support/runtime.js +0 -282
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './browser-support.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as c
|
|
16
|
+
};
|
package/dist/cn.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
-
var o = r.length;
|
|
6
|
-
for (f = 0; f < o; f++) r[f] && (n = i(r[f])) && (t && (t += " "), t += n);
|
|
7
|
-
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
-
return t;
|
|
9
|
-
}
|
|
10
|
-
function u() {
|
|
11
|
-
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = i(r)) && (t && (t += " "), t += f);
|
|
12
|
-
return t;
|
|
13
|
-
}
|
|
14
|
-
function a(...r) {
|
|
15
|
-
return u(r);
|
|
1
|
+
import { c } from "./clsx-OuTLNxxd.js";
|
|
2
|
+
function o(...r) {
|
|
3
|
+
return c(r);
|
|
16
4
|
}
|
|
17
5
|
export {
|
|
18
|
-
|
|
6
|
+
o as cn
|
|
19
7
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const DS_HOST = "https://ds.services.gov.ie";
|
|
2
|
+
export declare const BROWSER_POLICY: {
|
|
3
|
+
readonly desktop: {
|
|
4
|
+
readonly chrome: ">=109";
|
|
5
|
+
readonly firefox: ">=128";
|
|
6
|
+
readonly safari: ">=18";
|
|
7
|
+
readonly edge: ">=136";
|
|
8
|
+
readonly chromium: ">=109";
|
|
9
|
+
readonly opera: ">=109";
|
|
10
|
+
readonly vivaldi: ">=109";
|
|
11
|
+
readonly yandex: ">=109";
|
|
12
|
+
readonly uc: ">=109";
|
|
13
|
+
readonly qq: ">=109";
|
|
14
|
+
};
|
|
15
|
+
readonly mobile: {
|
|
16
|
+
readonly chrome: ">=138";
|
|
17
|
+
readonly firefox: ">=140";
|
|
18
|
+
readonly safari: ">=18";
|
|
19
|
+
readonly 'mobile safari': ">=18";
|
|
20
|
+
readonly samsung_internet: ">=27";
|
|
21
|
+
readonly edge: ">=138";
|
|
22
|
+
readonly chromium: ">=138";
|
|
23
|
+
readonly opera: ">=138";
|
|
24
|
+
readonly vivaldi: ">=138";
|
|
25
|
+
readonly yandex: ">=138";
|
|
26
|
+
readonly uc: ">=138";
|
|
27
|
+
readonly qq: ">=138";
|
|
28
|
+
};
|
|
29
|
+
readonly tablet: {
|
|
30
|
+
readonly chrome: ">=138";
|
|
31
|
+
readonly firefox: ">=140";
|
|
32
|
+
readonly safari: ">=18";
|
|
33
|
+
readonly 'mobile safari': ">=18";
|
|
34
|
+
readonly samsung_internet: ">=27";
|
|
35
|
+
readonly edge: ">=138";
|
|
36
|
+
readonly chromium: ">=138";
|
|
37
|
+
readonly opera: ">=138";
|
|
38
|
+
readonly vivaldi: ">=138";
|
|
39
|
+
readonly yandex: ">=138";
|
|
40
|
+
readonly uc: ">=138";
|
|
41
|
+
readonly qq: ">=138";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const e = "https://ds.services.gov.ie", i = {
|
|
2
|
+
desktop: {
|
|
3
|
+
chrome: ">=109",
|
|
4
|
+
firefox: ">=128",
|
|
5
|
+
safari: ">=18",
|
|
6
|
+
edge: ">=136",
|
|
7
|
+
chromium: ">=109",
|
|
8
|
+
opera: ">=109",
|
|
9
|
+
vivaldi: ">=109",
|
|
10
|
+
yandex: ">=109",
|
|
11
|
+
uc: ">=109",
|
|
12
|
+
qq: ">=109"
|
|
13
|
+
},
|
|
14
|
+
mobile: {
|
|
15
|
+
chrome: ">=138",
|
|
16
|
+
firefox: ">=140",
|
|
17
|
+
safari: ">=18",
|
|
18
|
+
"mobile safari": ">=18",
|
|
19
|
+
samsung_internet: ">=27",
|
|
20
|
+
edge: ">=138",
|
|
21
|
+
chromium: ">=138",
|
|
22
|
+
opera: ">=138",
|
|
23
|
+
vivaldi: ">=138",
|
|
24
|
+
yandex: ">=138",
|
|
25
|
+
uc: ">=138",
|
|
26
|
+
qq: ">=138"
|
|
27
|
+
},
|
|
28
|
+
tablet: {
|
|
29
|
+
chrome: ">=138",
|
|
30
|
+
firefox: ">=140",
|
|
31
|
+
safari: ">=18",
|
|
32
|
+
"mobile safari": ">=18",
|
|
33
|
+
samsung_internet: ">=27",
|
|
34
|
+
edge: ">=138",
|
|
35
|
+
chromium: ">=138",
|
|
36
|
+
opera: ">=138",
|
|
37
|
+
vivaldi: ">=138",
|
|
38
|
+
yandex: ">=138",
|
|
39
|
+
uc: ">=138",
|
|
40
|
+
qq: ">=138"
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
i as BROWSER_POLICY,
|
|
45
|
+
e as DS_HOST
|
|
46
|
+
};
|
package/dist/icon/icon.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, MouseEventHandler } from 'react';
|
|
1
2
|
import { iconIds } from './icons.js';
|
|
2
3
|
export type IconId = (typeof iconIds)[number];
|
|
3
4
|
export type IconSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
-
export type IconProps =
|
|
5
|
+
export type IconProps = {
|
|
5
6
|
icon: IconId;
|
|
6
7
|
size?: IconSize;
|
|
7
8
|
filled?: boolean;
|
|
@@ -10,6 +11,17 @@ export type IconProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
|
10
11
|
ariaLabel?: string;
|
|
11
12
|
inline?: boolean;
|
|
12
13
|
className?: string;
|
|
13
|
-
onClick?:
|
|
14
|
-
}
|
|
15
|
-
export declare
|
|
14
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
15
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'children'>;
|
|
16
|
+
export declare const Icon: import('react').ForwardRefExoticComponent<{
|
|
17
|
+
icon: IconId;
|
|
18
|
+
size?: IconSize;
|
|
19
|
+
filled?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
ariaHidden?: boolean;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
inline?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
26
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
export default Icon;
|
package/dist/icon/icon.js
CHANGED
|
@@ -1,173 +1,86 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as u } from "react";
|
|
4
|
+
import { cn as m } from "../cn.js";
|
|
5
|
+
import _ from "./svgs/bluesky.js";
|
|
6
|
+
import x from "./svgs/facebook.js";
|
|
7
|
+
import h from "./svgs/instagram.js";
|
|
8
|
+
import I from "./svgs/linkedin.js";
|
|
9
|
+
import S from "./svgs/placeholder.js";
|
|
10
|
+
import R from "./svgs/threads.js";
|
|
11
|
+
import z from "./svgs/tiktok.js";
|
|
12
|
+
import T from "./svgs/x.js";
|
|
13
|
+
import v from "./svgs/youtube.js";
|
|
14
|
+
const d = {
|
|
15
|
+
sm: "16px",
|
|
16
|
+
md: "24px",
|
|
17
|
+
lg: "32px",
|
|
18
|
+
xl: "48px"
|
|
19
|
+
}, w = {
|
|
20
|
+
social_bluesky: { Component: _, disabledClass: "gi-stroke-gray-700" },
|
|
21
|
+
social_facebook: { Component: x, disabledClass: "gi-stroke-gray-700" },
|
|
22
|
+
social_instagram: {
|
|
23
|
+
Component: h,
|
|
24
|
+
disabledClass: "gi-stroke-gray-700"
|
|
25
|
+
},
|
|
26
|
+
social_linkedin: { Component: I, disabledClass: "gi-stroke-gray-700" },
|
|
27
|
+
social_threads: { Component: R, disabledClass: "gi-stroke-gray-700" },
|
|
28
|
+
social_tiktok: { Component: z, disabledClass: "gi-stroke-gray-700" },
|
|
29
|
+
social_x: { Component: T, disabledClass: "gi-stroke-gray-700" },
|
|
30
|
+
social_youtube: { Component: v, disabledClass: "gi-stroke-gray-700" },
|
|
31
|
+
placeholder: { Component: S, disabledClass: "gi-fill-gray-700" }
|
|
32
|
+
}, M = u(
|
|
33
|
+
({
|
|
34
|
+
icon: i,
|
|
35
|
+
size: g = "md",
|
|
36
|
+
filled: c,
|
|
37
|
+
disabled: e,
|
|
38
|
+
ariaHidden: k,
|
|
39
|
+
ariaLabel: a,
|
|
40
|
+
inline: o,
|
|
41
|
+
className: r,
|
|
42
|
+
onClick: C,
|
|
43
|
+
...s
|
|
44
|
+
}, p) => {
|
|
45
|
+
const t = d[g] ?? d.md, l = w[String(i)];
|
|
46
|
+
if (l) {
|
|
47
|
+
const { Component: f, disabledClass: b } = l, y = m(
|
|
48
|
+
{ "gi-block": !o, "gi-inline-block": o },
|
|
49
|
+
e && b,
|
|
50
|
+
r
|
|
51
|
+
);
|
|
52
|
+
return /* @__PURE__ */ n(f, { size: t, className: y });
|
|
30
53
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
case "xl": {
|
|
36
|
-
o = "48px";
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (t === "social_bluesky")
|
|
41
|
-
return /* @__PURE__ */ e(
|
|
42
|
-
b,
|
|
43
|
-
{
|
|
44
|
-
size: o,
|
|
45
|
-
className: i({
|
|
46
|
-
"gi-block": !r,
|
|
47
|
-
"gi-inline-block": r,
|
|
48
|
-
"gi-stroke-gray-700": s
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
if (t === "social_facebook")
|
|
53
|
-
return /* @__PURE__ */ e(
|
|
54
|
-
u,
|
|
55
|
-
{
|
|
56
|
-
size: o,
|
|
57
|
-
className: i({
|
|
58
|
-
"gi-block": !r,
|
|
59
|
-
"gi-inline-block": r,
|
|
60
|
-
"gi-stroke-gray-700": s
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
if (t === "social_instagram")
|
|
65
|
-
return /* @__PURE__ */ e(
|
|
66
|
-
y,
|
|
67
|
-
{
|
|
68
|
-
size: o,
|
|
69
|
-
className: i({
|
|
70
|
-
"gi-block": !r,
|
|
71
|
-
"gi-inline-block": r,
|
|
72
|
-
"gi-stroke-gray-700": s
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
if (t === "social_linkedin")
|
|
77
|
-
return /* @__PURE__ */ e(
|
|
78
|
-
z,
|
|
79
|
-
{
|
|
80
|
-
size: o,
|
|
81
|
-
className: i({
|
|
82
|
-
"gi-block": !r,
|
|
83
|
-
"gi-inline-block": r,
|
|
84
|
-
"gi-stroke-gray-700": s
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
if (t === "social_threads")
|
|
89
|
-
return /* @__PURE__ */ e(
|
|
90
|
-
h,
|
|
54
|
+
return /* @__PURE__ */ n(
|
|
55
|
+
"span",
|
|
91
56
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
57
|
+
"aria-hidden": k,
|
|
58
|
+
"aria-label": a,
|
|
59
|
+
"data-testid": "govie-icon",
|
|
60
|
+
...s,
|
|
61
|
+
ref: p,
|
|
62
|
+
onClick: C,
|
|
63
|
+
role: a ? "img" : "presentation",
|
|
64
|
+
className: m(
|
|
65
|
+
{
|
|
66
|
+
"gi-block": !o,
|
|
67
|
+
"gi-inline-block": o,
|
|
68
|
+
"gi-text-gray-700": e
|
|
69
|
+
},
|
|
70
|
+
"material-symbols-outlined",
|
|
71
|
+
r
|
|
72
|
+
),
|
|
73
|
+
style: {
|
|
74
|
+
fontSize: t,
|
|
75
|
+
fontVariationSettings: `'FILL' ${c ? 1 : 0}, 'wght' 400, 'GRAD' 0, 'opsz' ${t}`,
|
|
76
|
+
...s == null ? void 0 : s.style
|
|
77
|
+
},
|
|
78
|
+
children: i
|
|
98
79
|
}
|
|
99
80
|
);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
x,
|
|
103
|
-
{
|
|
104
|
-
size: o,
|
|
105
|
-
className: i({
|
|
106
|
-
"gi-block": !r,
|
|
107
|
-
"gi-inline-block": r,
|
|
108
|
-
"gi-stroke-gray-700": s
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
if (t === "social_x")
|
|
113
|
-
return /* @__PURE__ */ e(
|
|
114
|
-
_,
|
|
115
|
-
{
|
|
116
|
-
size: o,
|
|
117
|
-
className: i({
|
|
118
|
-
"gi-block": !r,
|
|
119
|
-
"gi-inline-block": r,
|
|
120
|
-
"gi-stroke-gray-700": s
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
if (t === "social_youtube")
|
|
125
|
-
return /* @__PURE__ */ e(
|
|
126
|
-
n,
|
|
127
|
-
{
|
|
128
|
-
size: o,
|
|
129
|
-
className: i({
|
|
130
|
-
"gi-block": !r,
|
|
131
|
-
"gi-inline-block": r,
|
|
132
|
-
"gi-stroke-gray-700": s
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
if (t === "placeholder")
|
|
137
|
-
return /* @__PURE__ */ e(
|
|
138
|
-
N,
|
|
139
|
-
{
|
|
140
|
-
size: o,
|
|
141
|
-
className: i({
|
|
142
|
-
"gi-block": !r,
|
|
143
|
-
"gi-inline-block": r,
|
|
144
|
-
"gi-fill-gray-700": s
|
|
145
|
-
})
|
|
146
|
-
}
|
|
147
|
-
);
|
|
148
|
-
const p = c ? "'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' " + o : "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' " + o;
|
|
149
|
-
return /* @__PURE__ */ e(
|
|
150
|
-
"span",
|
|
151
|
-
{
|
|
152
|
-
"data-testid": "govie-icon",
|
|
153
|
-
...f,
|
|
154
|
-
onClick: m,
|
|
155
|
-
"aria-hidden": l || void 0,
|
|
156
|
-
"aria-label": a,
|
|
157
|
-
role: a ? "img" : "presentation",
|
|
158
|
-
className: i(
|
|
159
|
-
{ "gi-block": !r, "gi-text-gray-700": s },
|
|
160
|
-
"material-symbols-outlined",
|
|
161
|
-
k
|
|
162
|
-
),
|
|
163
|
-
style: {
|
|
164
|
-
fontSize: o,
|
|
165
|
-
fontVariationSettings: p
|
|
166
|
-
},
|
|
167
|
-
children: t
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
}
|
|
81
|
+
}
|
|
82
|
+
);
|
|
171
83
|
export {
|
|
172
|
-
|
|
84
|
+
M as Icon,
|
|
85
|
+
M as default
|
|
173
86
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -80,8 +80,7 @@ export { SectionBreak, type SectionBreakProps, } from './section-break/section-b
|
|
|
80
80
|
export { Select, SelectGroupItem, SelectItem, SelectTableCell, } from './select/select.js';
|
|
81
81
|
export { SelectNext, SelectGroupItemNext, SelectItemNext, } from './select/select-next.js';
|
|
82
82
|
export type { SelectGroupItemProps, SelectMenuOptionProps, SelectMenuProps, SelectNextGroupProps, SelectNextOptionProps, SelectNextProps, } from './select/types.js';
|
|
83
|
-
export
|
|
84
|
-
export type { SideNavItemProps, SideNavProps } from './side-nav/types.js';
|
|
83
|
+
export * from './side-nav/index.js';
|
|
85
84
|
export { Spinner, type SpinnerProps } from './spinner/spinner.js';
|
|
86
85
|
export { Stack } from './stack/stack.js';
|
|
87
86
|
export { type StackProps } from './stack/types.js';
|
|
@@ -102,10 +101,11 @@ export { TabPanel } from './tabs/tab-panel.js';
|
|
|
102
101
|
export { Tabs } from './tabs/tabs.js';
|
|
103
102
|
export type { TabItemProps, TabsProps, TabPanelProps } from './tabs/types.js';
|
|
104
103
|
export * from './data-table/index.js';
|
|
105
|
-
export { Tag, TagTypeEnum, type TagProps, type TagType } from './tag/tag.js';
|
|
104
|
+
export { Tag, TagTypeEnum, type TagProps, type TagType, type TagSize, } from './tag/tag.js';
|
|
106
105
|
export { TextInput, type TextInputProps } from './text-input/text-input.js';
|
|
107
106
|
export { TextArea, type TextAreaProps } from './textarea/textarea.js';
|
|
108
107
|
export { toaster, ToastProvider } from './toast/toast.js';
|
|
109
108
|
export type { ToastHorizontalPosition, ToastPosition, ToastProps, ToastVariant, ToastVerticalPosition, } from './toast/types.js';
|
|
110
109
|
export { Tooltip, type TooltipProps } from './tooltip/tooltip.js';
|
|
111
110
|
export { useToggleMap } from './hooks/use-toggle-map.js';
|
|
111
|
+
export * from './browser-support/index.js';
|