@ogcio/design-system-react 1.15.2 → 1.16.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 (42) hide show
  1. package/dist/assets/logos/gov-of-ireland/harp-black.d.ts +2 -0
  2. package/dist/assets/logos/gov-of-ireland/harp-black.js +322 -0
  3. package/dist/assets/logos/harp/harp-black.d.ts +2 -0
  4. package/dist/assets/logos/harp/harp-black.js +63 -0
  5. package/dist/autocomplete/autocomplete.js +56 -53
  6. package/dist/button/button.js +1 -1
  7. package/dist/drawer/drawer.content.js +29 -43
  8. package/dist/drawer/drawer.d.ts +2 -1
  9. package/dist/drawer/drawer.js +11 -7
  10. package/dist/file-upload/file-upload.d.ts +3 -1
  11. package/dist/forms/form-field/form-field.d.ts +1 -1
  12. package/dist/forms/form-field/form-field.js +29 -19
  13. package/dist/header/components/header-menu.js +53 -47
  14. package/dist/header/components/header-slot.d.ts +5 -3
  15. package/dist/header/components/header-slot.js +58 -47
  16. package/dist/header/header.d.ts +1 -1
  17. package/dist/header/header.js +128 -106
  18. package/dist/header/types.d.ts +2 -0
  19. package/dist/header/variants.d.ts +160 -0
  20. package/dist/header/variants.js +88 -0
  21. package/dist/input-file/input-file.d.ts +3 -2
  22. package/dist/input-file/input-file.js +13 -12
  23. package/dist/input-file/types.d.ts +3 -1
  24. package/dist/input-text/input-text.d.ts +2 -0
  25. package/dist/input-text/input-text.js +56 -55
  26. package/dist/input-text/type.d.ts +1 -0
  27. package/dist/modal/modal.d.ts +2 -2
  28. package/dist/modal/modal.js +185 -149
  29. package/dist/modal/types.d.ts +5 -0
  30. package/dist/phase-banner/phase-banner.d.ts +4 -2
  31. package/dist/phase-banner/phase-banner.js +30 -7
  32. package/dist/popover/popover.js +560 -524
  33. package/dist/select/select-menu.js +61 -63
  34. package/dist/select/select-next.js +61 -57
  35. package/dist/select/types.d.ts +0 -3
  36. package/dist/styles.css +1 -1
  37. package/dist/table/table-pagination.js +63 -46
  38. package/dist/table/table.js +18 -18
  39. package/dist/text-input/text-input.d.ts +1 -0
  40. package/dist/textarea/textarea.js +52 -49
  41. package/dist/toast/toast.js +6 -9
  42. package/package.json +4 -3
@@ -2,25 +2,25 @@
2
2
  import { jsx as n, jsxs as o } from "react/jsx-runtime";
3
3
  import { forwardRef as d, useRef as W, useImperativeHandle as _, useMemo as j } from "react";
4
4
  import { cn as u } from "../cn.js";
5
- import { Icon as m } from "../icon/icon.js";
5
+ import { Icon as x } from "../icon/icon.js";
6
6
  import { IconButton as O } from "../icon-button/icon-button.js";
7
7
  import { Input as y } from "../primitives/input.js";
8
8
  const H = d(
9
- ({ onChange: a, ...t }, r) => {
10
- const e = W(null);
11
- return _(r, () => e.current), /* @__PURE__ */ n(
12
- p,
9
+ ({ onChange: a, ...e }, r) => {
10
+ const t = W(null);
11
+ return _(r, () => t.current), /* @__PURE__ */ n(
12
+ h,
13
13
  {
14
- ...t,
14
+ ...e,
15
15
  onChange: a,
16
- ref: e,
16
+ ref: t,
17
17
  inputActionButton: {
18
18
  icon: "close",
19
19
  onClick: () => {
20
- e != null && e.current && (e.current.value = "", e.current.focus());
20
+ t != null && t.current && (t.current.value = "", t.current.focus());
21
21
  const f = {
22
- target: e.current,
23
- currentTarget: e.current,
22
+ target: t.current,
23
+ currentTarget: t.current,
24
24
  __origin: "clear_button"
25
25
  };
26
26
  a && a(f);
@@ -29,41 +29,41 @@ const H = d(
29
29
  }
30
30
  );
31
31
  }
32
- ), p = d(
32
+ ), h = d(
33
33
  ({
34
34
  prefix: a,
35
- inputActionButton: t,
35
+ inputActionButton: e,
36
36
  inputActionPosition: r = "beforeSuffix",
37
- suffix: e,
37
+ suffix: t,
38
38
  halfFluid: l = !1,
39
39
  className: f,
40
40
  type: g = "text",
41
41
  iconStart: c,
42
- iconStartClassName: I,
43
- onIconStartClick: v,
42
+ iconStartClassName: v,
43
+ onIconStartClick: N,
44
44
  iconEnd: s,
45
- iconEndClassName: N,
46
- onIconEndClick: T,
45
+ iconEndClassName: T,
46
+ onIconEndClick: w,
47
47
  disabled: i,
48
- inputClassName: w,
49
- iconEndRef: C,
50
- containerProps: b,
51
- ...k
48
+ inputClassName: C,
49
+ iconEndRef: b,
50
+ containerProps: k,
51
+ ...m
52
52
  }, z) => {
53
- const R = j(() => t && r === "beforeSuffix" ? /* @__PURE__ */ n(
53
+ const R = j(() => e && r === "beforeSuffix" ? /* @__PURE__ */ n(
54
54
  "div",
55
55
  {
56
56
  className: "gi-input-text-action-before-suffix",
57
- "data-suffix": !!e,
57
+ "data-suffix": !!t,
58
58
  "data-has-icon-end": !!s,
59
- children: /* @__PURE__ */ n(x, { ...t, disabled: i })
59
+ children: /* @__PURE__ */ n(p, { ...e, disabled: i })
60
60
  }
61
- ) : null, [t]);
61
+ ) : null, [e]);
62
62
  return /* @__PURE__ */ o(
63
63
  "div",
64
64
  {
65
65
  className: u(f, "gi-input-text-container"),
66
- ...b,
66
+ ...k,
67
67
  children: [
68
68
  a && /* @__PURE__ */ n("div", { className: "gi-input-text-prefix", "data-disabled": i, children: a }),
69
69
  /* @__PURE__ */ o(
@@ -76,11 +76,11 @@ const H = d(
76
76
  c && /* @__PURE__ */ n(
77
77
  "div",
78
78
  {
79
- className: u("gi-input-text-icon-start", I),
80
- onClick: v,
79
+ className: u("gi-input-text-icon-start", v),
80
+ onClick: N,
81
81
  "data-prefix": !!a,
82
82
  children: typeof c == "string" ? /* @__PURE__ */ n(
83
- m,
83
+ x,
84
84
  {
85
85
  icon: c,
86
86
  size: "md",
@@ -95,41 +95,42 @@ const H = d(
95
95
  type: g,
96
96
  "data-icon-start": !!c,
97
97
  "data-icon-end": !!s,
98
- "data-end-element": !!t,
98
+ "data-end-element": !!e,
99
99
  "data-prefix": !!a,
100
- "data-suffix": !!e,
101
- className: u("gi-input-text", w),
100
+ "data-suffix": !!t,
101
+ "data-testid": m.dataTestId,
102
+ className: u("gi-input-text", C),
102
103
  ref: z,
103
104
  disabled: i,
104
- ...k
105
+ ...m
105
106
  }
106
107
  ),
107
108
  s && /* @__PURE__ */ n(
108
109
  "div",
109
110
  {
110
- className: u("gi-input-text-icon-end", N),
111
- "data-end-element": !!t && r === "afterSuffix",
112
- "data-suffix": !!e,
113
- onClick: T,
114
- ref: C,
115
- children: typeof s == "string" ? /* @__PURE__ */ n(m, { icon: s, size: "md", disabled: i }) : s
111
+ className: u("gi-input-text-icon-end", T),
112
+ "data-end-element": !!e && r === "afterSuffix",
113
+ "data-suffix": !!t,
114
+ onClick: w,
115
+ ref: b,
116
+ children: typeof s == "string" ? /* @__PURE__ */ n(x, { icon: s, size: "md", disabled: i }) : s
116
117
  }
117
118
  ),
118
119
  R
119
120
  ]
120
121
  }
121
122
  ),
122
- t && r === "afterSuffix" && /* @__PURE__ */ n("div", { className: "gi-input-text-end-element", "data-suffix": !!e, children: /* @__PURE__ */ n(x, { ...t, disabled: i }) }),
123
- e && /* @__PURE__ */ n("div", { className: "gi-input-text-suffix", "data-disabled": i, children: e })
123
+ e && r === "afterSuffix" && /* @__PURE__ */ n("div", { className: "gi-input-text-end-element", "data-suffix": !!t, children: /* @__PURE__ */ n(p, { ...e, disabled: i }) }),
124
+ t && /* @__PURE__ */ n("div", { className: "gi-input-text-suffix", "data-disabled": i, children: t })
124
125
  ]
125
126
  }
126
127
  );
127
128
  }
128
- ), x = ({
129
+ ), p = ({
129
130
  onClick: a,
130
- ariaLabel: t,
131
+ ariaLabel: e,
131
132
  icon: r,
132
- dataTestId: e,
133
+ dataTestId: t,
133
134
  ...l
134
135
  }) => /* @__PURE__ */ n(
135
136
  O,
@@ -138,31 +139,31 @@ const H = d(
138
139
  icon: {
139
140
  icon: r
140
141
  },
141
- "data-testid": e,
142
- "aria-label": t || "",
142
+ "data-testid": t,
143
+ "aria-label": e || "",
143
144
  onClick: a,
144
145
  variant: "flat",
145
146
  size: "small",
146
147
  appearance: "dark"
147
148
  }
148
- ), h = d(
149
- ({ type: a = "text", clearButtonEnabled: t, ...r }, e) => t || a === "search" ? /* @__PURE__ */ n(H, { ref: e, type: a, ...r }) : /* @__PURE__ */ n(p, { ref: e, type: a, ...r })
149
+ ), I = d(
150
+ ({ type: a = "text", clearButtonEnabled: e, ...r }, t) => e || a === "search" ? /* @__PURE__ */ n(H, { ref: t, type: a, ...r }) : /* @__PURE__ */ n(h, { ref: t, type: a, ...r })
150
151
  );
151
- h.displayName = "InputText";
152
- const F = d(({ type: a = "text", error: t, ...r }, e) => /* @__PURE__ */ n(
153
- h,
152
+ I.displayName = "InputText";
153
+ const F = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
154
+ I,
154
155
  {
155
156
  ...r,
156
157
  containerProps: {
157
158
  "data-table-cell": !0,
158
- "data-table-cell-error-state": t == null ? void 0 : t.toString()
159
+ "data-table-cell-error-state": e == null ? void 0 : e.toString()
159
160
  },
160
- ref: e,
161
+ ref: t,
161
162
  type: a
162
163
  }
163
164
  ));
164
165
  export {
165
- x as InputActionButton,
166
- h as InputText,
166
+ p as InputActionButton,
167
+ I as InputText,
167
168
  F as InputTextTableCell
168
169
  };
@@ -26,6 +26,7 @@ export type InputTextProps = React.InputHTMLAttributes<HTMLInputElement> & {
26
26
  halfFluid?: boolean;
27
27
  clearButtonEnabled?: boolean;
28
28
  containerProps?: any;
29
+ dataTestId?: string;
29
30
  };
30
31
  export type InputTextTableCellProps = InputTextProps & {
31
32
  error?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { HeadingProps } from '../heading/heading.js';
3
3
  import { ModalFooterProps, ModalProps, ModalWrapperProps } from './types.js';
4
- export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, closeOnEscape, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const ModalTitle: {
6
6
  ({ children, as, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
7
7
  displayName: string;
@@ -11,7 +11,7 @@ export declare const ModalBody: ({ children, className, }: {
11
11
  className?: string;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
13
  export declare const ModalFooter: {
14
- ({ className, children, orientation, dataModalSize, }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
14
+ ({ className, children, orientation, dataModalSize, stacked, }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
15
15
  displayName: string;
16
16
  };
17
17
  export declare const Modal: ({ children, triggerButton, startsOpen, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;