@ogcio/design-system-react 1.28.0 → 1.30.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 (80) hide show
  1. package/README.md +11 -33
  2. package/dist/alert/variants.d.ts +78 -2
  3. package/dist/assets/logos/LogoBlack.d.ts +3 -0
  4. package/dist/assets/logos/LogoBlack.js +322 -0
  5. package/dist/assets/logos/LogoGoldGreen.d.ts +3 -0
  6. package/dist/assets/logos/LogoGoldGreen.js +322 -0
  7. package/dist/assets/logos/LogoGoldWhite.d.ts +3 -0
  8. package/dist/assets/logos/LogoGoldWhite.js +82 -0
  9. package/dist/assets/logos/LogoHarpBlack.d.ts +3 -0
  10. package/dist/assets/logos/{harp/harp-white.js → LogoHarpBlack.js} +24 -21
  11. package/dist/assets/logos/LogoHarpWhite.d.ts +3 -0
  12. package/dist/assets/logos/LogoHarpWhite.js +60 -0
  13. package/dist/assets/logos/LogoWhite.d.ts +3 -0
  14. package/dist/assets/logos/LogoWhite.js +322 -0
  15. package/dist/assets/logos/index.d.ts +6 -0
  16. package/dist/assets/logos/index.js +14 -0
  17. package/dist/atoms/DsButton.d.ts +194 -0
  18. package/dist/atoms/DsButton.js +329 -0
  19. package/dist/atoms/icons/Close.d.ts +3 -0
  20. package/dist/atoms/icons/Close.js +22 -0
  21. package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
  22. package/dist/atoms/icons/KeyboardArrowDown.js +22 -0
  23. package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
  24. package/dist/atoms/icons/KeyboardArrowUp.js +22 -0
  25. package/dist/atoms/icons/Visibility.d.ts +3 -0
  26. package/dist/atoms/icons/Visibility.js +22 -0
  27. package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
  28. package/dist/atoms/icons/VisibilityOff.js +22 -0
  29. package/dist/atoms/icons/index.d.ts +6 -0
  30. package/dist/atoms/icons/index.js +12 -0
  31. package/dist/atoms/icons/types.d.ts +10 -0
  32. package/dist/atoms/icons/types.js +1 -0
  33. package/dist/atoms/index.d.ts +2 -0
  34. package/dist/atoms/index.js +14 -0
  35. package/dist/autocomplete/autocomplete.js +131 -115
  36. package/dist/combo-box/dropdown-item.js +39 -40
  37. package/dist/data-table/data-table-footer.js +57 -51
  38. package/dist/data-table/data-table-header.d.ts +7 -7
  39. package/dist/data-table/data-table-header.js +97 -110
  40. package/dist/data-table/data-table-selected-rows.d.ts +1 -0
  41. package/dist/data-table/data-table-selected-rows.js +15 -19
  42. package/dist/footer/footer.js +9 -9
  43. package/dist/forms/form-field/form-field.d.ts +2 -2
  44. package/dist/forms/form-field/form-field.js +40 -30
  45. package/dist/forms/form-field/types.d.ts +10 -3
  46. package/dist/header/components/header-slot.js +33 -32
  47. package/dist/header/header-legacy.js +41 -41
  48. package/dist/header/variants.d.ts +220 -20
  49. package/dist/heading/heading.d.ts +70 -2
  50. package/dist/hooks/use-breakpoint.js +15 -12
  51. package/dist/icon/icon.d.ts +10 -0
  52. package/dist/icon/icon.js +64 -52
  53. package/dist/icon/icons.d.ts +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +174 -171
  56. package/dist/input-password/input-password.js +13 -12
  57. package/dist/input-text/input-text.js +18 -16
  58. package/dist/label/label.d.ts +43 -0
  59. package/dist/label/label.js +7 -6
  60. package/dist/modal/modal.js +8 -7
  61. package/dist/spinner/spinner.d.ts +30 -2
  62. package/dist/styles.css +12 -2
  63. package/dist/table/table.d.ts +22 -2
  64. package/dist/tabs/tab-item.d.ts +2 -2
  65. package/dist/text-input/text-input.d.ts +1 -1
  66. package/dist/textarea/textarea.js +27 -28
  67. package/dist/toast/ds-toast.d.ts +78 -2
  68. package/dist/utils/placeholder.d.ts +2 -0
  69. package/dist/utils/placeholder.js +24 -0
  70. package/fonts.css +10 -0
  71. package/package.json +21 -8
  72. package/dist/assets/logos/gov-of-ireland/harp-black.d.ts +0 -2
  73. package/dist/assets/logos/gov-of-ireland/harp-black.js +0 -322
  74. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.d.ts +0 -2
  75. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.js +0 -322
  76. package/dist/assets/logos/gov-of-ireland/harp-white.d.ts +0 -2
  77. package/dist/assets/logos/gov-of-ireland/harp-white.js +0 -322
  78. package/dist/assets/logos/harp/harp-black.d.ts +0 -2
  79. package/dist/assets/logos/harp/harp-black.js +0 -63
  80. package/dist/assets/logos/harp/harp-white.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import { forwardRef as r } from "react";
3
3
  import { c as o } from "../index-CB-zPpNk.js";
4
4
  const d = {
@@ -17,11 +17,12 @@ const d = {
17
17
  defaultVariants: {
18
18
  size: "md"
19
19
  }
20
- }), b = r(
21
- ({ text: e, size: a = d.Medium, className: l, children: m, ...t }, i) => /* @__PURE__ */ s("label", { className: g({ size: a, className: l }), ref: i, ...t, children: m ?? e })
20
+ }), c = r(
21
+ ({ text: e, size: a = d.Medium, className: m, children: s, ...t }, l) => /* @__PURE__ */ i("label", { className: g({ size: a, className: m }), ref: l, ...t, children: s ?? e })
22
22
  );
23
- b.displayName = "Label";
23
+ c.displayName = "Label";
24
24
  export {
25
- b as Label,
26
- d as LabelSize
25
+ c as Label,
26
+ d as LabelSize,
27
+ g as styles
27
28
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as i, jsxs as y, Fragment as j } from "react/jsx-runtime";
3
- import { isValidElement as U, cloneElement as N, useState as A, useRef as W, useMemo as _, Children as z, useId as G, useEffect as C } from "react";
3
+ import { isValidElement as U, cloneElement as T, useState as A, useRef as W, useMemo as _, Children as z, useId as G, useEffect as C } from "react";
4
4
  import { createPortal as J } from "react-dom";
5
5
  import { Button as E } from "../button/button.js";
6
6
  import { cn as u } from "../cn.js";
@@ -45,6 +45,7 @@ const I = {
45
45
  variant: "flat",
46
46
  size: t,
47
47
  appearance: "dark",
48
+ dataTestid: "modal-close-button",
48
49
  ...o
49
50
  }
50
51
  );
@@ -85,12 +86,12 @@ const I = {
85
86
  const [D, S] = _(
86
87
  () => R(v),
87
88
  [v]
88
- ), F = z.toArray(g), T = (m) => F.find(
89
+ ), F = z.toArray(g), b = (m) => F.find(
89
90
  (p) => et(p) === m
90
- ), f = T("ModalTitle"), b = T("ModalFooter") || T("DrawerFooter"), L = G(), H = ((k = f == null ? void 0 : f.props) == null ? void 0 : k.id) || `gi-modal-title-${L}`, $ = f ? N(f, {
91
+ ), f = b("ModalTitle"), N = b("ModalFooter") || b("DrawerFooter"), L = G(), H = ((k = f == null ? void 0 : f.props) == null ? void 0 : k.id) || `gi-modal-title-${L}`, $ = f ? T(f, {
91
92
  as: t === "sm" ? "h5" : "h4",
92
93
  id: H
93
- }) : null, V = b ? N(b, {
94
+ }) : null, V = N ? T(N, {
94
95
  dataModalSize: t
95
96
  }) : null, q = F.filter(
96
97
  (m) => !tt(m, ["ModalTitle", "ModalFooter", "DrawerFooter"])
@@ -159,7 +160,7 @@ const I = {
159
160
  closeButtonSize: a
160
161
  }
161
162
  ),
162
- /* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !b }), children: [
163
+ /* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !N }), children: [
163
164
  q,
164
165
  V
165
166
  ] })
@@ -223,7 +224,7 @@ const ht = ({
223
224
  children: d.map(
224
225
  (a, l) => {
225
226
  var c;
226
- return N(a, {
227
+ return T(a, {
227
228
  key: a.key || a.props.id || a.props.dataTestid || `modal-footer-button-${l}`,
228
229
  id: a.props.id || `modal-footer-button-${l}`,
229
230
  className: u((c = a == null ? void 0 : a.props) == null ? void 0 : c.className, g)
@@ -259,7 +260,7 @@ const nt = ({
259
260
  startsOpen: o,
260
261
  ...n
261
262
  }) => {
262
- const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g = N(t, {
263
+ const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g = T(t, {
263
264
  "data-testid": "modal-trigger-button-container",
264
265
  "aria-haspopup": "dialog",
265
266
  onClick: h
@@ -12,7 +12,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
12
12
  md: string;
13
13
  sm: string;
14
14
  };
15
- }, undefined, undefined, TVConfig<V, EV>, {
15
+ }, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
16
+ size: {
17
+ xl: string;
18
+ lg: string;
19
+ md: string;
20
+ sm: string;
21
+ };
22
+ }, {
23
+ size: {
24
+ xl: string;
25
+ lg: string;
26
+ md: string;
27
+ sm: string;
28
+ };
29
+ }>, {
16
30
  size: {
17
31
  xl: string;
18
32
  lg: string;
@@ -26,7 +40,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
26
40
  md: string;
27
41
  sm: string;
28
42
  };
29
- }, undefined, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
43
+ }, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
44
+ size: {
45
+ xl: string;
46
+ lg: string;
47
+ md: string;
48
+ sm: string;
49
+ };
50
+ }, {
51
+ size: {
52
+ xl: string;
53
+ lg: string;
54
+ md: string;
55
+ sm: string;
56
+ };
57
+ }>, unknown, unknown, undefined>>;
30
58
  export type SpinnerProps = VariantProps<typeof spinnerVariants> & {
31
59
  inline?: boolean;
32
60
  dataTestid?: string;