@ogcio/design-system-react 1.17.0 → 1.17.2
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 +0 -1
- package/dist/alert/alert.d.ts +2 -1
- package/dist/alert/alert.js +32 -31
- package/dist/drawer/drawer.js +19 -12
- package/dist/icon-button/icon-button.js +18 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +100 -97
- package/dist/modal/modal.d.ts +2 -1
- package/dist/modal/modal.js +160 -148
- package/dist/progress-bar/progress-bar.d.ts +3 -2
- package/dist/progress-bar/progress-bar.js +18 -14
- package/dist/progress-stepper/progress-stepper.d.ts +5 -3
- package/dist/progress-stepper/progress-stepper.js +132 -121
- package/dist/progress-stepper/types.d.ts +16 -4
- package/dist/progress-stepper/types.js +12 -2
- package/dist/section-break/section-break.d.ts +2 -3
- package/dist/section-break/section-break.js +12 -12
- package/dist/styles.css +1 -1
- package/dist/utils/utilities.d.ts +1 -0
- package/dist/utils/utilities.js +25 -19
- package/package.json +2 -2
|
@@ -22,4 +22,5 @@ type DisplayPage = number | -1 | -2;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const getDisplayPages: (currentPage: number, totalPages: number, breakpoint: BreakpointType) => DisplayPage[];
|
|
24
24
|
export declare const safeCloneElement: (element: React.ReactElement, props?: Record<string, any>) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
25
|
+
export declare const splitAriaProps: (props?: any) => readonly [Record<string, unknown>, Record<string, unknown>];
|
|
25
26
|
export {};
|
package/dist/utils/utilities.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { cloneElement as
|
|
2
|
-
import { Breakpoint as
|
|
3
|
-
const
|
|
4
|
-
if (h ===
|
|
5
|
-
const
|
|
1
|
+
import { cloneElement as d } from "react";
|
|
2
|
+
import { Breakpoint as n } from "../hooks/use-breakpoint.js";
|
|
3
|
+
const r = (i, s, h) => {
|
|
4
|
+
if (h === n.Small || h === n.Medium) {
|
|
5
|
+
const f = [];
|
|
6
6
|
if (s <= 3) {
|
|
7
|
-
for (let
|
|
8
|
-
|
|
9
|
-
return
|
|
7
|
+
for (let o = 1; o <= s; o++)
|
|
8
|
+
f.push(o);
|
|
9
|
+
return f;
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return f.push(1), i > 2 && f.push(-1), i > 1 && i < s && f.push(i), i < s - 1 && f.push(-2), s > 1 && f.push(s), f;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
for (let
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
},
|
|
19
|
-
const { __type: h, ...
|
|
20
|
-
return
|
|
13
|
+
const p = [];
|
|
14
|
+
i > 3 && p.push(1), i > 4 && p.push(-1);
|
|
15
|
+
for (let f = i - 2; f <= i + 2; f++)
|
|
16
|
+
f >= 1 && f <= s && p.push(f);
|
|
17
|
+
return i < s - 3 && p.push(-2), i < s - 2 && p.push(s), p;
|
|
18
|
+
}, y = (i, s = {}) => {
|
|
19
|
+
const { __type: h, ...p } = i.props;
|
|
20
|
+
return d(i, { ...p, ...s });
|
|
21
|
+
}, l = (i = {}) => {
|
|
22
|
+
const s = {}, h = {};
|
|
23
|
+
for (const p in i)
|
|
24
|
+
p === "role" || p.startsWith("aria-") ? s[p] = i[p] : h[p] = i[p];
|
|
25
|
+
return [s, h];
|
|
21
26
|
};
|
|
22
27
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
r as getDisplayPages,
|
|
29
|
+
y as safeCloneElement,
|
|
30
|
+
l as splitAriaProps
|
|
25
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/design-system-react",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.2",
|
|
4
4
|
"description": "The GOV IE design system React components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-dom": "19.0.0",
|
|
53
53
|
"@ogcio/design-system-eslint-config": "1.2.6",
|
|
54
54
|
"@ogcio/design-system-prettier-config": "1.0.6",
|
|
55
|
-
"@ogcio/design-system-tailwind": "1.14.
|
|
55
|
+
"@ogcio/design-system-tailwind": "1.14.3",
|
|
56
56
|
"@ogcio/theme-doete": "1.0.0",
|
|
57
57
|
"@ogcio/theme-govie": "1.7.0"
|
|
58
58
|
},
|