@ogcio/design-system-react 1.31.1 → 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.
Files changed (82) hide show
  1. package/dist/Heading.d.ts +5 -0
  2. package/dist/Heading.js +22 -0
  3. package/dist/alert/alert.d.ts +3 -0
  4. package/dist/alert/alert.js +46 -61
  5. package/dist/atoms/{DsButton.d.ts → Button.d.ts} +3 -3
  6. package/dist/atoms/{DsButton.js → Button.js} +20 -35
  7. package/dist/atoms/heading/H1.d.ts +3 -0
  8. package/dist/atoms/heading/H1.js +20 -0
  9. package/dist/atoms/heading/H2.d.ts +3 -0
  10. package/dist/atoms/heading/H2.js +20 -0
  11. package/dist/atoms/heading/H3.d.ts +3 -0
  12. package/dist/atoms/heading/H3.js +20 -0
  13. package/dist/atoms/heading/H4.d.ts +3 -0
  14. package/dist/atoms/heading/H4.js +20 -0
  15. package/dist/atoms/heading/H5.d.ts +3 -0
  16. package/dist/atoms/heading/H5.js +20 -0
  17. package/dist/atoms/heading/H6.d.ts +3 -0
  18. package/dist/atoms/heading/H6.js +20 -0
  19. package/dist/atoms/heading/index.d.ts +9 -0
  20. package/dist/atoms/heading/index.js +18 -0
  21. package/dist/atoms/heading/styles.d.ts +65 -0
  22. package/dist/atoms/heading/styles.js +17 -0
  23. package/dist/atoms/heading/types.d.ts +15 -0
  24. package/dist/atoms/heading/types.js +11 -0
  25. package/dist/atoms/heading/utils.d.ts +2 -0
  26. package/dist/atoms/heading/utils.js +5 -0
  27. package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
  28. package/dist/atoms/icons/ArrowLeft.js +23 -0
  29. package/dist/atoms/icons/ArrowRight.d.ts +3 -0
  30. package/dist/atoms/icons/ArrowRight.js +23 -0
  31. package/dist/atoms/icons/CheckCircle.d.ts +3 -0
  32. package/dist/atoms/icons/CheckCircle.js +23 -0
  33. package/dist/atoms/icons/Error.d.ts +3 -0
  34. package/dist/atoms/icons/Error.js +23 -0
  35. package/dist/atoms/icons/FirstPage.d.ts +3 -0
  36. package/dist/atoms/icons/FirstPage.js +23 -0
  37. package/dist/atoms/icons/Info.d.ts +3 -0
  38. package/dist/atoms/icons/Info.js +23 -0
  39. package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
  40. package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
  41. package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
  42. package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
  43. package/dist/atoms/icons/LastPage.d.ts +3 -0
  44. package/dist/atoms/icons/LastPage.js +23 -0
  45. package/dist/atoms/icons/Warning.d.ts +3 -0
  46. package/dist/atoms/icons/Warning.js +23 -0
  47. package/dist/atoms/icons/index.d.ts +12 -2
  48. package/dist/atoms/icons/index.js +30 -10
  49. package/dist/atoms/index.d.ts +2 -1
  50. package/dist/atoms/index.js +48 -12
  51. package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
  52. package/dist/atoms/storybook/Heading.meta.js +70 -0
  53. package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
  54. package/dist/atoms/storybook/Icons.meta.js +130 -0
  55. package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
  56. package/dist/atoms/storybook/InsetText.meta.js +64 -0
  57. package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
  58. package/dist/atoms/storybook/Logos.meta.js +54 -0
  59. package/dist/breadcrumbs/breadcrumbs.js +20 -19
  60. package/dist/header/components/header-menu.js +21 -21
  61. package/dist/header/components/header-search.js +4 -4
  62. package/dist/icon/icon.js +85 -63
  63. package/dist/icon/icons.d.ts +1 -1
  64. package/dist/icons/index.d.ts +1 -1
  65. package/dist/icons/index.js +19 -10
  66. package/dist/index-Bh2cTIps.js +33899 -0
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/input-text/input-text.js +1 -1
  70. package/dist/input-text/type.d.ts +1 -1
  71. package/dist/modal/modal.d.ts +1 -1
  72. package/dist/modal/modal.js +1 -1
  73. package/dist/pagination/pagination.js +139 -135
  74. package/dist/paragraph/paragraph.d.ts +1 -1
  75. package/dist/paragraph/paragraph.js +13 -11
  76. package/dist/side-nav/side-nav.js +4 -4
  77. package/dist/side-nav/types.d.ts +1 -1
  78. package/dist/styles.css +1 -1
  79. package/dist/table/table-pagination.js +17 -13
  80. package/package.json +7 -6
  81. package/dist/heading/heading.d.ts +0 -150
  82. package/dist/heading/heading.js +0 -50
@@ -1,9 +1,9 @@
1
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
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 v } from "../select/select-native.js";
6
- const j = ({
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__ */ o(
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__ */ o(
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: (c) => l(Number(c.target.value)),
71
- children: Array.from({ length: e }, (c, r) => /* @__PURE__ */ a(v, { value: r + 1, children: r + 1 }, r + 1))
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
- j as TablePagination,
113
- j as default
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.31.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-prettier-config": "1.1.0",
67
- "@ogcio/design-system-tailwind": "1.22.0",
68
- "@ogcio/design-system-eslint-config": "1.3.0",
69
- "@ogcio/theme-govie": "1.21.3",
70
- "@ogcio/theme-doete": "1.0.0"
67
+ "@ogcio/design-system-eslint-config": "1.4.0",
68
+ "@ogcio/design-system-prettier-config": "1.1.1",
69
+ "@ogcio/theme-doete": "1.0.0",
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;
@@ -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
- };