@ogcio/design-system-react 1.31.0 → 1.32.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/Heading.d.ts +5 -0
- package/dist/Heading.js +22 -0
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +46 -61
- package/dist/atoms/{DsButton.d.ts → Button.d.ts} +3 -3
- package/dist/atoms/{DsButton.js → Button.js} +20 -35
- package/dist/atoms/heading/H1.d.ts +3 -0
- package/dist/atoms/heading/H1.js +20 -0
- package/dist/atoms/heading/H2.d.ts +3 -0
- package/dist/atoms/heading/H2.js +20 -0
- package/dist/atoms/heading/H3.d.ts +3 -0
- package/dist/atoms/heading/H3.js +20 -0
- package/dist/atoms/heading/H4.d.ts +3 -0
- package/dist/atoms/heading/H4.js +20 -0
- package/dist/atoms/heading/H5.d.ts +3 -0
- package/dist/atoms/heading/H5.js +20 -0
- package/dist/atoms/heading/H6.d.ts +3 -0
- package/dist/atoms/heading/H6.js +20 -0
- package/dist/atoms/heading/index.d.ts +9 -0
- package/dist/atoms/heading/index.js +18 -0
- package/dist/atoms/heading/styles.d.ts +65 -0
- package/dist/atoms/heading/styles.js +17 -0
- package/dist/atoms/heading/types.d.ts +15 -0
- package/dist/atoms/heading/types.js +11 -0
- package/dist/atoms/heading/utils.d.ts +2 -0
- package/dist/atoms/heading/utils.js +5 -0
- package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/ArrowLeft.js +23 -0
- package/dist/atoms/icons/ArrowRight.d.ts +3 -0
- package/dist/atoms/icons/ArrowRight.js +23 -0
- package/dist/atoms/icons/CheckCircle.d.ts +3 -0
- package/dist/atoms/icons/CheckCircle.js +23 -0
- package/dist/atoms/icons/Error.d.ts +3 -0
- package/dist/atoms/icons/Error.js +23 -0
- package/dist/atoms/icons/FirstPage.d.ts +3 -0
- package/dist/atoms/icons/FirstPage.js +23 -0
- package/dist/atoms/icons/Info.d.ts +3 -0
- package/dist/atoms/icons/Info.js +23 -0
- package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
- package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
- package/dist/atoms/icons/LastPage.d.ts +3 -0
- package/dist/atoms/icons/LastPage.js +23 -0
- package/dist/atoms/icons/Warning.d.ts +3 -0
- package/dist/atoms/icons/Warning.js +23 -0
- package/dist/atoms/icons/index.d.ts +12 -2
- package/dist/atoms/icons/index.js +30 -10
- package/dist/atoms/icons/logos/LogoBlack.js +1 -1
- package/dist/atoms/icons/logos/LogoGoldGreen.js +1 -1
- package/dist/atoms/icons/logos/LogoGoldWhite.js +8 -8
- package/dist/atoms/icons/logos/LogoHarpBlack.js +1 -1
- package/dist/atoms/icons/logos/LogoWhite.js +1 -1
- package/dist/atoms/index.d.ts +2 -1
- package/dist/atoms/index.js +48 -12
- package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
- package/dist/atoms/storybook/Heading.meta.js +70 -0
- package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
- package/dist/atoms/storybook/Icons.meta.js +130 -0
- package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
- package/dist/atoms/storybook/InsetText.meta.js +64 -0
- package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
- package/dist/atoms/storybook/Logos.meta.js +54 -0
- package/dist/breadcrumbs/breadcrumbs.js +20 -19
- package/dist/header/components/header-menu.js +21 -21
- package/dist/header/components/header-search.js +4 -4
- package/dist/icon/icon.js +85 -63
- package/dist/icon/icons.d.ts +1 -1
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +19 -10
- package/dist/index-Bh2cTIps.js +33899 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/input-text/input-text.js +1 -1
- package/dist/input-text/type.d.ts +1 -1
- package/dist/modal/modal.d.ts +1 -1
- package/dist/modal/modal.js +1 -1
- package/dist/pagination/pagination.js +139 -135
- package/dist/paragraph/paragraph.d.ts +1 -1
- package/dist/paragraph/paragraph.js +13 -11
- package/dist/side-nav/side-nav.js +4 -4
- package/dist/side-nav/types.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/table-pagination.js +17 -13
- package/package.json +6 -5
- package/dist/heading/heading.d.ts +0 -150
- package/dist/heading/heading.js +0 -50
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as p } from "../cn.js";
|
|
3
3
|
import { translate as s } from "../i18n/utility.js";
|
|
4
4
|
import { IconButton as t } from "../icon-button/icon-button.js";
|
|
5
|
-
import { SelectNative as f, SelectItem as
|
|
6
|
-
const
|
|
5
|
+
import { SelectNative as f, SelectItem as u } from "../select/select-native.js";
|
|
6
|
+
const I = ({
|
|
7
7
|
currentPage: i,
|
|
8
8
|
totalPages: e,
|
|
9
9
|
onPageChange: l,
|
|
@@ -14,7 +14,7 @@ const j = ({
|
|
|
14
14
|
}, m = () => {
|
|
15
15
|
i < e && l(i + 1);
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ c(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
className: p(
|
|
@@ -35,7 +35,8 @@ const j = ({
|
|
|
35
35
|
variant: "flat",
|
|
36
36
|
className: "gi-mr-2",
|
|
37
37
|
icon: {
|
|
38
|
-
icon: "first_page"
|
|
38
|
+
icon: "first_page",
|
|
39
|
+
useFontIcon: !0
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
),
|
|
@@ -48,11 +49,12 @@ const j = ({
|
|
|
48
49
|
variant: "flat",
|
|
49
50
|
className: "gi-mr-2",
|
|
50
51
|
icon: {
|
|
51
|
-
icon: "chevron_left"
|
|
52
|
+
icon: "chevron_left",
|
|
53
|
+
useFontIcon: !0
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ c(
|
|
56
58
|
"div",
|
|
57
59
|
{
|
|
58
60
|
className: "gi-table-pagination-label gi-space-x-2",
|
|
@@ -67,8 +69,8 @@ const j = ({
|
|
|
67
69
|
"aria-label": "Select page",
|
|
68
70
|
value: i,
|
|
69
71
|
className: "!gi-min-w-12 !gi-border-color-border-system-neutral-interactive-muted",
|
|
70
|
-
onChange: (
|
|
71
|
-
children: Array.from({ length: e }, (
|
|
72
|
+
onChange: (o) => l(Number(o.target.value)),
|
|
73
|
+
children: Array.from({ length: e }, (o, r) => /* @__PURE__ */ a(u, { value: r + 1, children: r + 1 }, r + 1))
|
|
72
74
|
}
|
|
73
75
|
),
|
|
74
76
|
/* @__PURE__ */ a("span", { children: s("table.pagination.ofTotal", {
|
|
@@ -87,7 +89,8 @@ const j = ({
|
|
|
87
89
|
variant: "flat",
|
|
88
90
|
className: "gi-ml-2",
|
|
89
91
|
icon: {
|
|
90
|
-
icon: "chevron_right"
|
|
92
|
+
icon: "chevron_right",
|
|
93
|
+
useFontIcon: !0
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
),
|
|
@@ -100,7 +103,8 @@ const j = ({
|
|
|
100
103
|
variant: "flat",
|
|
101
104
|
className: "gi-ml-2",
|
|
102
105
|
icon: {
|
|
103
|
-
icon: "last_page"
|
|
106
|
+
icon: "last_page",
|
|
107
|
+
useFontIcon: !0
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
)
|
|
@@ -109,6 +113,6 @@ const j = ({
|
|
|
109
113
|
);
|
|
110
114
|
};
|
|
111
115
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
I as TablePagination,
|
|
117
|
+
I as default
|
|
114
118
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/design-system-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "The Government of Ireland Design System React components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"rollup-preserve-directives": "^1.1.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"@storybook/types": "^8.6.14",
|
|
51
52
|
"@testing-library/jest-dom": "^6.4.8",
|
|
52
53
|
"@testing-library/react": "^16.0.1",
|
|
53
54
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -63,11 +64,11 @@
|
|
|
63
64
|
"postcss-import": "^16.1.0",
|
|
64
65
|
"react": "19.0.0",
|
|
65
66
|
"react-dom": "19.0.0",
|
|
66
|
-
"@ogcio/design-system-eslint-config": "1.
|
|
67
|
-
"@ogcio/design-system-
|
|
68
|
-
"@ogcio/design-system-prettier-config": "1.1.0",
|
|
67
|
+
"@ogcio/design-system-eslint-config": "1.4.0",
|
|
68
|
+
"@ogcio/design-system-prettier-config": "1.1.1",
|
|
69
69
|
"@ogcio/theme-doete": "1.0.0",
|
|
70
|
-
"@ogcio/
|
|
70
|
+
"@ogcio/design-system-tailwind": "1.23.0",
|
|
71
|
+
"@ogcio/theme-govie": "1.21.4"
|
|
71
72
|
},
|
|
72
73
|
"scripts": {
|
|
73
74
|
"format": "prettier 'src/**/*.{ts,tsx}' --write",
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'tailwind-variants';
|
|
2
|
-
export declare const sizeVariants: {
|
|
3
|
-
xl: string;
|
|
4
|
-
lg: string;
|
|
5
|
-
md: string;
|
|
6
|
-
sm: string;
|
|
7
|
-
xs: string;
|
|
8
|
-
'2xs': string;
|
|
9
|
-
};
|
|
10
|
-
export declare const asVariants: {
|
|
11
|
-
h1: string;
|
|
12
|
-
h2: string;
|
|
13
|
-
h3: string;
|
|
14
|
-
h4: string;
|
|
15
|
-
h5: string;
|
|
16
|
-
h6: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const headingVariants: import('tailwind-variants').TVReturnType<{
|
|
19
|
-
size: {
|
|
20
|
-
xl: string;
|
|
21
|
-
lg: string;
|
|
22
|
-
md: string;
|
|
23
|
-
sm: string;
|
|
24
|
-
xs: string;
|
|
25
|
-
'2xs': string;
|
|
26
|
-
};
|
|
27
|
-
as: {
|
|
28
|
-
h1: string;
|
|
29
|
-
h2: string;
|
|
30
|
-
h3: string;
|
|
31
|
-
h4: string;
|
|
32
|
-
h5: string;
|
|
33
|
-
h6: string;
|
|
34
|
-
};
|
|
35
|
-
}, {
|
|
36
|
-
text: string;
|
|
37
|
-
base: string;
|
|
38
|
-
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
39
|
-
size: {
|
|
40
|
-
xl: string;
|
|
41
|
-
lg: string;
|
|
42
|
-
md: string;
|
|
43
|
-
sm: string;
|
|
44
|
-
xs: string;
|
|
45
|
-
'2xs': string;
|
|
46
|
-
};
|
|
47
|
-
as: {
|
|
48
|
-
h1: string;
|
|
49
|
-
h2: string;
|
|
50
|
-
h3: string;
|
|
51
|
-
h4: string;
|
|
52
|
-
h5: string;
|
|
53
|
-
h6: string;
|
|
54
|
-
};
|
|
55
|
-
}, {
|
|
56
|
-
size: {
|
|
57
|
-
xl: string;
|
|
58
|
-
lg: string;
|
|
59
|
-
md: string;
|
|
60
|
-
sm: string;
|
|
61
|
-
xs: string;
|
|
62
|
-
'2xs': string;
|
|
63
|
-
};
|
|
64
|
-
as: {
|
|
65
|
-
h1: string;
|
|
66
|
-
h2: string;
|
|
67
|
-
h3: string;
|
|
68
|
-
h4: string;
|
|
69
|
-
h5: string;
|
|
70
|
-
h6: string;
|
|
71
|
-
};
|
|
72
|
-
}>, {
|
|
73
|
-
size: {
|
|
74
|
-
xl: string;
|
|
75
|
-
lg: string;
|
|
76
|
-
md: string;
|
|
77
|
-
sm: string;
|
|
78
|
-
xs: string;
|
|
79
|
-
'2xs': string;
|
|
80
|
-
};
|
|
81
|
-
as: {
|
|
82
|
-
h1: string;
|
|
83
|
-
h2: string;
|
|
84
|
-
h3: string;
|
|
85
|
-
h4: string;
|
|
86
|
-
h5: string;
|
|
87
|
-
h6: string;
|
|
88
|
-
};
|
|
89
|
-
}, {
|
|
90
|
-
text: string;
|
|
91
|
-
base: string;
|
|
92
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
93
|
-
size: {
|
|
94
|
-
xl: string;
|
|
95
|
-
lg: string;
|
|
96
|
-
md: string;
|
|
97
|
-
sm: string;
|
|
98
|
-
xs: string;
|
|
99
|
-
'2xs': string;
|
|
100
|
-
};
|
|
101
|
-
as: {
|
|
102
|
-
h1: string;
|
|
103
|
-
h2: string;
|
|
104
|
-
h3: string;
|
|
105
|
-
h4: string;
|
|
106
|
-
h5: string;
|
|
107
|
-
h6: string;
|
|
108
|
-
};
|
|
109
|
-
}, {
|
|
110
|
-
text: string;
|
|
111
|
-
base: string;
|
|
112
|
-
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
113
|
-
size: {
|
|
114
|
-
xl: string;
|
|
115
|
-
lg: string;
|
|
116
|
-
md: string;
|
|
117
|
-
sm: string;
|
|
118
|
-
xs: string;
|
|
119
|
-
'2xs': string;
|
|
120
|
-
};
|
|
121
|
-
as: {
|
|
122
|
-
h1: string;
|
|
123
|
-
h2: string;
|
|
124
|
-
h3: string;
|
|
125
|
-
h4: string;
|
|
126
|
-
h5: string;
|
|
127
|
-
h6: string;
|
|
128
|
-
};
|
|
129
|
-
}, {
|
|
130
|
-
size: {
|
|
131
|
-
xl: string;
|
|
132
|
-
lg: string;
|
|
133
|
-
md: string;
|
|
134
|
-
sm: string;
|
|
135
|
-
xs: string;
|
|
136
|
-
'2xs': string;
|
|
137
|
-
};
|
|
138
|
-
as: {
|
|
139
|
-
h1: string;
|
|
140
|
-
h2: string;
|
|
141
|
-
h3: string;
|
|
142
|
-
h4: string;
|
|
143
|
-
h5: string;
|
|
144
|
-
h6: string;
|
|
145
|
-
};
|
|
146
|
-
}>, unknown, unknown, undefined>>;
|
|
147
|
-
export type HeadingProps = VariantProps<typeof headingVariants> & {
|
|
148
|
-
caption?: string;
|
|
149
|
-
} & React.HTMLAttributes<HTMLHeadingElement>;
|
|
150
|
-
export declare function Heading({ as, size, children, caption, className, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/heading/heading.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, Fragment as o, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { c as l } from "../index-CB-zPpNk.js";
|
|
3
|
-
import { cn as e } from "../cn.js";
|
|
4
|
-
const c = {
|
|
5
|
-
xl: "gi-heading-xl",
|
|
6
|
-
lg: "gi-heading-lg",
|
|
7
|
-
md: "gi-heading-md",
|
|
8
|
-
sm: "gi-heading-sm",
|
|
9
|
-
xs: "gi-heading-xs",
|
|
10
|
-
"2xs": "gi-heading-2xs"
|
|
11
|
-
}, f = {
|
|
12
|
-
h1: "gi-heading-xl",
|
|
13
|
-
h2: "gi-heading-lg",
|
|
14
|
-
h3: "gi-heading-md",
|
|
15
|
-
h4: "gi-heading-sm",
|
|
16
|
-
h5: "gi-heading-xs",
|
|
17
|
-
h6: "gi-heading-2xs"
|
|
18
|
-
}, p = l({
|
|
19
|
-
slots: {
|
|
20
|
-
text: "gi-text-gray-600",
|
|
21
|
-
base: ""
|
|
22
|
-
},
|
|
23
|
-
variants: {
|
|
24
|
-
size: c,
|
|
25
|
-
as: f
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
as: "h1"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function j({
|
|
32
|
-
as: i,
|
|
33
|
-
size: g,
|
|
34
|
-
children: n,
|
|
35
|
-
caption: a,
|
|
36
|
-
className: t,
|
|
37
|
-
...h
|
|
38
|
-
}) {
|
|
39
|
-
const d = i || "h1", { text: r, base: m } = p({ as: i, size: g });
|
|
40
|
-
return /* @__PURE__ */ x(o, { children: [
|
|
41
|
-
a && /* @__PURE__ */ s("span", { className: e(r()), "aria-hidden": "true", children: a }),
|
|
42
|
-
/* @__PURE__ */ s(d, { className: e(m(), t), ...h, children: n })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
j as Heading,
|
|
47
|
-
f as asVariants,
|
|
48
|
-
p as headingVariants,
|
|
49
|
-
c as sizeVariants
|
|
50
|
-
};
|