@ogcio/design-system-react 1.31.1 → 1.33.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 (114) hide show
  1. package/dist/Heading.d.ts +5 -0
  2. package/dist/Heading.js +22 -0
  3. package/dist/accordion/accordion-item.js +62 -57
  4. package/dist/alert/alert.d.ts +3 -0
  5. package/dist/alert/alert.js +40 -57
  6. package/dist/alert/variants.d.ts +49 -52
  7. package/dist/alert/variants.js +17 -18
  8. package/dist/atoms/{DsButton.d.ts → Button.d.ts} +5 -5
  9. package/dist/atoms/{DsButton.js → Button.js} +22 -36
  10. package/dist/atoms/heading/H1.d.ts +3 -0
  11. package/dist/atoms/heading/H1.js +20 -0
  12. package/dist/atoms/heading/H2.d.ts +3 -0
  13. package/dist/atoms/heading/H2.js +20 -0
  14. package/dist/atoms/heading/H3.d.ts +3 -0
  15. package/dist/atoms/heading/H3.js +20 -0
  16. package/dist/atoms/heading/H4.d.ts +3 -0
  17. package/dist/atoms/heading/H4.js +20 -0
  18. package/dist/atoms/heading/H5.d.ts +3 -0
  19. package/dist/atoms/heading/H5.js +20 -0
  20. package/dist/atoms/heading/H6.d.ts +3 -0
  21. package/dist/atoms/heading/H6.js +20 -0
  22. package/dist/atoms/heading/index.d.ts +9 -0
  23. package/dist/atoms/heading/index.js +18 -0
  24. package/dist/atoms/heading/styles.d.ts +65 -0
  25. package/dist/atoms/heading/styles.js +17 -0
  26. package/dist/atoms/heading/types.d.ts +15 -0
  27. package/dist/atoms/heading/types.js +11 -0
  28. package/dist/atoms/heading/utils.d.ts +2 -0
  29. package/dist/atoms/heading/utils.js +5 -0
  30. package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
  31. package/dist/atoms/icons/ArrowLeft.js +23 -0
  32. package/dist/atoms/icons/ArrowRight.d.ts +3 -0
  33. package/dist/atoms/icons/ArrowRight.js +23 -0
  34. package/dist/atoms/icons/CheckCircle.d.ts +3 -0
  35. package/dist/atoms/icons/CheckCircle.js +23 -0
  36. package/dist/atoms/icons/Error.d.ts +3 -0
  37. package/dist/atoms/icons/Error.js +23 -0
  38. package/dist/atoms/icons/FirstPage.d.ts +3 -0
  39. package/dist/atoms/icons/FirstPage.js +23 -0
  40. package/dist/atoms/icons/Info.d.ts +3 -0
  41. package/dist/atoms/icons/Info.js +23 -0
  42. package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
  43. package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
  44. package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
  45. package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
  46. package/dist/atoms/icons/LastPage.d.ts +3 -0
  47. package/dist/atoms/icons/LastPage.js +23 -0
  48. package/dist/atoms/icons/Warning.d.ts +3 -0
  49. package/dist/atoms/icons/Warning.js +23 -0
  50. package/dist/atoms/icons/index.d.ts +12 -2
  51. package/dist/atoms/icons/index.js +30 -10
  52. package/dist/atoms/index.d.ts +2 -1
  53. package/dist/atoms/index.js +48 -12
  54. package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
  55. package/dist/atoms/storybook/Heading.meta.js +70 -0
  56. package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
  57. package/dist/atoms/storybook/Icons.meta.js +130 -0
  58. package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
  59. package/dist/atoms/storybook/InsetText.meta.js +64 -0
  60. package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
  61. package/dist/atoms/storybook/Logos.meta.js +54 -0
  62. package/dist/breadcrumbs/breadcrumbs.js +20 -19
  63. package/dist/button/button.d.ts +2 -9
  64. package/dist/button/button.js +65 -32
  65. package/dist/button/helpers.d.ts +2 -1
  66. package/dist/button/types.d.ts +25 -8
  67. package/dist/button-group/button-group.js +43 -45
  68. package/dist/button-group/types.d.ts +5 -5
  69. package/dist/card/card-legacy.js +1 -1
  70. package/dist/card/types.d.ts +1 -1
  71. package/dist/combo-box/dropdown-item.js +1 -1
  72. package/dist/cookie-banner/cookie-banner.d.ts +1 -1
  73. package/dist/data-table/data-table-header.js +1 -1
  74. package/dist/drawer/drawer.d.ts +1 -1
  75. package/dist/drawer/drawer.js +17 -17
  76. package/dist/error-text/error-text.js +28 -27
  77. package/dist/forms/form-field/form-field.js +24 -25
  78. package/dist/header/components/header-menu.js +21 -21
  79. package/dist/header/components/header-search.js +5 -5
  80. package/dist/hint-text/hint-text.js +26 -20
  81. package/dist/icon/icon.js +85 -63
  82. package/dist/icon/icons.d.ts +1 -1
  83. package/dist/icon-button/icon-button.d.ts +3 -5
  84. package/dist/icons/index.d.ts +1 -1
  85. package/dist/icons/index.js +19 -10
  86. package/dist/index-Bh2cTIps.js +33899 -0
  87. package/dist/index.d.ts +2 -2
  88. package/dist/index.js +1 -1
  89. package/dist/input-text/input-text.js +1 -1
  90. package/dist/input-text/type.d.ts +1 -1
  91. package/dist/label/label.d.ts +78 -30
  92. package/dist/label/label.js +29 -14
  93. package/dist/modal/modal.content.js +1 -1
  94. package/dist/modal/modal.d.ts +1 -1
  95. package/dist/modal/modal.js +39 -39
  96. package/dist/modal/types.d.ts +5 -4
  97. package/dist/pagination/pagination.js +137 -134
  98. package/dist/paragraph/paragraph.d.ts +1 -1
  99. package/dist/paragraph/paragraph.js +13 -11
  100. package/dist/score-select/type.d.ts +2 -2
  101. package/dist/select/select-next.js +87 -87
  102. package/dist/side-nav/side-nav.js +4 -4
  103. package/dist/side-nav/types.d.ts +1 -1
  104. package/dist/styles.css +1 -1
  105. package/dist/table/table-pagination.js +17 -13
  106. package/dist/tabs/tab-item.js +53 -71
  107. package/dist/tabs/variants.d.ts +269 -0
  108. package/dist/tabs/variants.js +87 -0
  109. package/dist/tooltip/tooltip.js +27 -35
  110. package/dist/tooltip/variants.d.ts +115 -0
  111. package/dist/tooltip/variants.js +59 -0
  112. package/package.json +7 -6
  113. package/dist/heading/heading.d.ts +0 -150
  114. package/dist/heading/heading.js +0 -50
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { type BreadcrumbLinkProps, type BreadcrumbProps, } from './breadcrumbs/t
11
11
  export { ButtonGroup, ButtonGroupItem } from './button-group/button-group.js';
12
12
  export * from './button-group/types.js';
13
13
  export { Button } from './button/button.js';
14
- export { type ButtonProps } from './button/types.js';
14
+ export type { ButtonProps } from './button/types';
15
15
  export { CardAction, CardContainer, CardDescription, CardHeader, CardMedia, CardSubtitle, CardTag, CardTitle, } from './card/card-next.js';
16
16
  export { Card } from './card/card.js';
17
17
  export type { CardActionProps, CardContainerProps, CardDescriptionProps, CardHeaderProps, CardMediaProps, CardProps, } from './card/types.js';
@@ -40,7 +40,7 @@ export { HeaderSearch, type HeaderSearchProps, } from './header/components/heade
40
40
  export { Header } from './header/header.js';
41
41
  export * from './header/header-next/index.js';
42
42
  export type { HeaderItem, HeaderProps } from './header/types.js';
43
- export { Heading, type HeadingProps } from './heading/heading.js';
43
+ export { default as Heading, type Props as HeadingProps } from './Heading.js';
44
44
  export type { HintTextProps } from './hint-text/types.js';
45
45
  export * from './i18n/config.js';
46
46
  export { IconButton, type IconButtonProps } from './icon-button/icon-button.js';
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import { HeaderMenuItemButton as We } from "./header/header-next/components/menu
37
37
  import { HeaderMenuItemLink as Ue } from "./header/header-next/components/menu/components/header-menu-item-link.js";
38
38
  import { HeaderMenuItemSeparator as qe } from "./header/header-next/components/menu/components/header-menu-item-separator.js";
39
39
  import { HeaderMenuItemSlot as Je } from "./header/header-next/components/menu/components/header-menu-item-slot.js";
40
- import { Heading as Oe } from "./heading/heading.js";
40
+ import { default as Oe } from "./Heading.js";
41
41
  import { initI18n as Xe } from "./i18n/config.js";
42
42
  import { IconButton as Ze } from "./icon-button/icon-button.js";
43
43
  import { Icon as $e } from "./icon/icon.js";
@@ -142,7 +142,7 @@ const H = d(
142
142
  icon: r
143
143
  },
144
144
  "data-testid": t,
145
- "aria-label": e || "",
145
+ "aria-label": e || void 0,
146
146
  onClick: a,
147
147
  variant: "flat",
148
148
  size: "small",
@@ -4,7 +4,7 @@ export type InputActionButtonProps = {
4
4
  icon: IconId;
5
5
  onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  disabled?: boolean;
7
- ariaLabel?: string;
7
+ ariaLabel: string;
8
8
  dataTestId?: string;
9
9
  ref?: React.Ref<HTMLButtonElement>;
10
10
  };
@@ -3,52 +3,100 @@ export declare const LabelSize: {
3
3
  readonly Medium: "md";
4
4
  readonly Large: "lg";
5
5
  };
6
+ export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
7
+ text?: string | React.ReactElement;
8
+ size?: import('./types.js').LabelSizeType;
9
+ } & {
10
+ children?: import('react').ReactNode | undefined;
11
+ } & import('react').RefAttributes<HTMLLabelElement>>;
6
12
  export declare const styles: import('tailwind-variants').TVReturnType<{
7
13
  size: {
8
- sm: string;
9
- md: string;
10
- lg: string;
14
+ sm: {
15
+ base: string;
16
+ };
17
+ md: {
18
+ base: string;
19
+ };
20
+ lg: {
21
+ base: string;
22
+ };
11
23
  };
12
- }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
24
+ }, {
25
+ base: string;
26
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
13
27
  size: {
14
- sm: string;
15
- md: string;
16
- lg: string;
28
+ sm: {
29
+ base: string;
30
+ };
31
+ md: {
32
+ base: string;
33
+ };
34
+ lg: {
35
+ base: string;
36
+ };
17
37
  };
18
38
  }, {
19
39
  size: {
20
- sm: string;
21
- md: string;
22
- lg: string;
40
+ sm: {
41
+ base: string;
42
+ };
43
+ md: {
44
+ base: string;
45
+ };
46
+ lg: {
47
+ base: string;
48
+ };
23
49
  };
24
50
  }>, {
25
51
  size: {
26
- sm: string;
27
- md: string;
28
- lg: string;
52
+ sm: {
53
+ base: string;
54
+ };
55
+ md: {
56
+ base: string;
57
+ };
58
+ lg: {
59
+ base: string;
60
+ };
29
61
  };
30
- }, undefined, import('tailwind-variants').TVReturnType<{
62
+ }, {
63
+ base: string;
64
+ }, import('tailwind-variants').TVReturnType<{
31
65
  size: {
32
- sm: string;
33
- md: string;
34
- lg: string;
66
+ sm: {
67
+ base: string;
68
+ };
69
+ md: {
70
+ base: string;
71
+ };
72
+ lg: {
73
+ base: string;
74
+ };
35
75
  };
36
- }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
76
+ }, {
77
+ base: string;
78
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
37
79
  size: {
38
- sm: string;
39
- md: string;
40
- lg: string;
80
+ sm: {
81
+ base: string;
82
+ };
83
+ md: {
84
+ base: string;
85
+ };
86
+ lg: {
87
+ base: string;
88
+ };
41
89
  };
42
90
  }, {
43
91
  size: {
44
- sm: string;
45
- md: string;
46
- lg: string;
92
+ sm: {
93
+ base: string;
94
+ };
95
+ md: {
96
+ base: string;
97
+ };
98
+ lg: {
99
+ base: string;
100
+ };
47
101
  };
48
102
  }>, unknown, unknown, undefined>>;
49
- export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
50
- text?: string | React.ReactElement;
51
- size?: import('./types.js').LabelSizeType;
52
- } & {
53
- children?: import('react').ReactNode | undefined;
54
- } & import('react').RefAttributes<HTMLLabelElement>>;
@@ -1,28 +1,43 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as r } from "react";
3
- import { c as o } from "../index-CB-zPpNk.js";
4
- const d = {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as o } from "react";
3
+ import { c as d } from "../index-CB-zPpNk.js";
4
+ const b = {
5
5
  Small: "sm",
6
6
  Medium: "md",
7
7
  Large: "lg"
8
- }, g = o({
9
- base: "gi-label",
8
+ }, c = o(
9
+ ({ text: e, size: t = b.Medium, className: s, children: a, ...l }, m) => {
10
+ const { base: i } = g({ size: t });
11
+ return /* @__PURE__ */ r(
12
+ "label",
13
+ {
14
+ className: i({ className: s }),
15
+ "data-testid": "label",
16
+ ref: m,
17
+ ...l,
18
+ children: a ?? e
19
+ }
20
+ );
21
+ }
22
+ );
23
+ c.displayName = "Label";
24
+ const g = d({
25
+ slots: {
26
+ base: "gi-block gi-text-color-text-system-neutral-default"
27
+ },
10
28
  variants: {
11
29
  size: {
12
- sm: "gi-text-sm",
13
- md: "gi-text-md",
14
- lg: "gi-text-lg"
30
+ sm: { base: "gi-text-sm" },
31
+ md: { base: "gi-text-md" },
32
+ lg: { base: "gi-text-lg" }
15
33
  }
16
34
  },
17
35
  defaultVariants: {
18
36
  size: "md"
19
37
  }
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
- );
23
- c.displayName = "Label";
38
+ });
24
39
  export {
25
40
  c as Label,
26
- d as LabelSize,
41
+ b as LabelSize,
27
42
  g as styles
28
43
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as t, Fragment as r } from "react/jsx-runtime";
2
- import { Button as o } from "../button/button.js";
2
+ import o from "../atoms/Button.js";
3
3
  import { ModalTitle as e, ModalBody as a, ModalFooter as n } from "./modal.js";
4
4
  const c = /* @__PURE__ */ i(r, { children: [
5
5
  /* @__PURE__ */ t(e, { children: "Modal Title" }),
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { HeadingProps } from '../heading/heading.js';
2
+ import { Props as HeadingProps } from '../Heading.js';
3
3
  import { ModalFooterProps, ModalProps, ModalWrapperProps } from './types.js';
4
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: {
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsx as l, jsxs as y, Fragment as j } from "react/jsx-runtime";
3
- import { isValidElement as K, cloneElement as T, useState as A, useRef as U, useMemo as W, Children as _, useId as z, useEffect as C } from "react";
2
+ import { jsx as l, jsxs as y, Fragment as P } from "react/jsx-runtime";
3
+ import { isValidElement as K, cloneElement as T, useState as j, useRef as U, useMemo as W, Children as _, useId as z, useEffect as C } from "react";
4
4
  import { createPortal as G } from "react-dom";
5
- import { Button as E } from "../button/button.js";
5
+ import J from "../Heading.js";
6
+ import A from "../atoms/Button.js";
6
7
  import { cn as u } from "../cn.js";
7
- import { Heading as J } from "../heading/heading.js";
8
8
  import { useAriaHider as Q } from "../hooks/use-aria-hider.js";
9
9
  import { useFocusTrap as X } from "../hooks/use-focus-trap.js";
10
10
  import { Icon as Y } from "../icon/icon.js";
11
11
  import { IconButton as Z } from "../icon-button/icon-button.js";
12
12
  import { splitAriaProps as O, isSpecialComponent as ee, getSpecialComponentType as te } from "../utils/utilities.js";
13
- const I = {
13
+ const B = {
14
14
  flat: 0,
15
15
  secondary: 1,
16
16
  primary: 2
@@ -21,16 +21,16 @@ const I = {
21
21
  }) => {
22
22
  let n = "sm";
23
23
  return (o === "large" || o === "medium") && (n = "md"), e ? /* @__PURE__ */ l(
24
- E,
24
+ A,
25
25
  {
26
26
  onClick: t.onClick,
27
27
  variant: "flat",
28
28
  size: o,
29
29
  appearance: "dark",
30
30
  className: "gi-modal-icon",
31
- "aria-label": e,
31
+ ariaLabel: e,
32
32
  ...t,
33
- children: /* @__PURE__ */ y(j, { children: [
33
+ children: /* @__PURE__ */ y(P, { children: [
34
34
  e,
35
35
  /* @__PURE__ */ l(Y, { icon: "close", size: n })
36
36
  ] })
@@ -72,25 +72,25 @@ const I = {
72
72
  closeOnOverlayClick: n = !0,
73
73
  isOpen: a,
74
74
  onClose: d,
75
- closeButtonLabel: h,
75
+ closeButtonLabel: v,
76
76
  className: s,
77
77
  children: f,
78
78
  closeButtonSize: r,
79
79
  closeOnEscape: i,
80
80
  dataTestId: c,
81
- ...v
81
+ ...h
82
82
  }) => {
83
- var w;
83
+ var I;
84
84
  const M = U(null);
85
85
  Q(M, a);
86
- const [D, R] = W(
87
- () => O(v),
88
- [v]
86
+ const [D, L] = W(
87
+ () => O(h),
88
+ [h]
89
89
  ), F = _.toArray(f), N = (m) => F.find(
90
90
  (p) => te(p) === m
91
- ), g = N("ModalTitle"), b = N("ModalFooter") || N("DrawerFooter"), S = z(), L = ((w = g == null ? void 0 : g.props) == null ? void 0 : w.id) || `gi-modal-title-${S}`, H = g ? T(g, {
91
+ ), g = N("ModalTitle"), b = N("ModalFooter") || N("DrawerFooter"), R = z(), S = ((I = g == null ? void 0 : g.props) == null ? void 0 : I.id) || `gi-modal-title-${R}`, H = g ? T(g, {
92
92
  as: o === "sm" ? "h5" : "h4",
93
- id: L
93
+ id: S
94
94
  }) : null, $ = b ? T(b, {
95
95
  dataModalSize: o
96
96
  }) : null, V = F.filter(
@@ -109,18 +109,18 @@ const I = {
109
109
  if (!a || !t || !n)
110
110
  return;
111
111
  const m = (p) => {
112
- var B;
113
- const k = (B = M.current) == null ? void 0 : B.querySelector(
112
+ var k;
113
+ const w = (k = M.current) == null ? void 0 : k.querySelector(
114
114
  ".gi-modal-container-control"
115
115
  );
116
- k && (k.contains(p.target) || d());
116
+ w && (w.contains(p.target) || d());
117
117
  };
118
118
  return document.addEventListener("pointerdown", m, !0), () => document.removeEventListener("pointerdown", m, !0);
119
119
  }, [a, t, n, d]);
120
120
  const q = /* @__PURE__ */ l(
121
121
  "div",
122
122
  {
123
- ...R,
123
+ ...L,
124
124
  ref: M,
125
125
  className: u("gi-modal", {
126
126
  "gi-modal-open": a,
@@ -153,7 +153,7 @@ const I = {
153
153
  /* @__PURE__ */ l(
154
154
  ae,
155
155
  {
156
- closeButtonLabel: h,
156
+ closeButtonLabel: v,
157
157
  modalTitle: H,
158
158
  closeOnClick: t,
159
159
  onClose: d,
@@ -170,14 +170,14 @@ const I = {
170
170
  }
171
171
  );
172
172
  return /* @__PURE__ */ l(ne, { modalRef: M, isOpen: a, children: q });
173
- }, P = ({ children: e, as: o = "h4", ...t }) => /* @__PURE__ */ l("div", { className: "gi-flex-1", id: t.id, "aria-label": e == null ? void 0 : e.toString(), children: /* @__PURE__ */ l(J, { as: o, ...t, children: e }) });
174
- Object.defineProperty(P, "componentType", {
173
+ }, E = ({ children: e, as: o = "h4", ...t }) => /* @__PURE__ */ l("div", { className: "gi-flex-1", id: t.id, "aria-label": e == null ? void 0 : e.toString(), children: /* @__PURE__ */ l(J, { as: o, ...t, children: e }) });
174
+ Object.defineProperty(E, "componentType", {
175
175
  value: "ModalTitle",
176
176
  writable: !1,
177
177
  enumerable: !1
178
178
  });
179
- P.displayName = "ModalTitle";
180
- const he = ({
179
+ E.displayName = "ModalTitle";
180
+ const ve = ({
181
181
  children: e,
182
182
  className: o,
183
183
  includeModalClass: t = !0
@@ -199,10 +199,10 @@ const he = ({
199
199
  }) => {
200
200
  const s = (Array.isArray(o) ? o : [o]).filter((r) => {
201
201
  var i, c;
202
- return K(r) && (r.type === E || ((i = r.type) == null ? void 0 : i.displayName) === "Button" || ((c = r.props) == null ? void 0 : c["data-button"]));
202
+ return K(r) && (r.type === A || ((i = r.type) == null ? void 0 : i.displayName) === "Button" || ((c = r.props) == null ? void 0 : c["data-button"]));
203
203
  }).sort((r, i) => {
204
- const c = r.props.variant ?? "primary", v = i.props.variant ?? "primary";
205
- return (I[c] || 0) - (I[v] || 0);
204
+ const c = r.props.variant ?? "primary", h = i.props.variant ?? "primary";
205
+ return (B[c] || 0) - (B[h] || 0);
206
206
  }), f = u({
207
207
  "gi-justify-center sm:gi-justify-start": !t && n !== "sm" && !a,
208
208
  "gi-justify-center": t === "vertical" || n === "sm" || a,
@@ -225,7 +225,7 @@ const he = ({
225
225
  (r, i) => {
226
226
  var c;
227
227
  return T(r, {
228
- key: r.key || r.props.id || r.props.dataTestid || `modal-footer-button-${i}`,
228
+ key: r.key || r.props.id || r.props.dataTestId || `modal-footer-button-${i}`,
229
229
  id: r.props.id || `modal-footer-button-${i}`,
230
230
  className: u((c = r == null ? void 0 : r.props) == null ? void 0 : c.className, f)
231
231
  });
@@ -247,22 +247,22 @@ const ne = ({
247
247
  modalRef: o,
248
248
  isOpen: t
249
249
  }) => {
250
- const [n, a] = A(!1);
250
+ const [n, a] = j(!1);
251
251
  return C(() => {
252
252
  a(!0);
253
253
  }, []), X(o, t && n), n ? G(e, document.body) : null;
254
- }, ve = ({
254
+ }, he = ({
255
255
  children: e,
256
256
  triggerButton: o,
257
257
  startsOpen: t,
258
258
  ...n
259
259
  }) => {
260
- const [a, d] = A(!!t), h = () => d(!0), s = () => d(!1), f = T(o, {
261
- "data-testid": "modal-trigger-button-container",
262
- "aria-haspopup": "dialog",
263
- onClick: h
260
+ const [a, d] = j(!!t), v = () => d(!0), s = () => d(!1), f = T(o, {
261
+ dataTestId: "modal-trigger-button-container",
262
+ ariaHasPopup: "dialog",
263
+ onClick: v
264
264
  });
265
- return /* @__PURE__ */ y(j, { children: [
265
+ return /* @__PURE__ */ y(P, { children: [
266
266
  f,
267
267
  /* @__PURE__ */ l(
268
268
  re,
@@ -277,9 +277,9 @@ const ne = ({
277
277
  ] });
278
278
  };
279
279
  export {
280
- ve as Modal,
281
- he as ModalBody,
280
+ he as Modal,
281
+ ve as ModalBody,
282
282
  x as ModalFooter,
283
- P as ModalTitle,
283
+ E as ModalTitle,
284
284
  re as ModalWrapper
285
285
  };
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactElement } from 'react';
2
- import { ButtonProps, ButtonSize, ButtonVariant } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  import { IconButtonProps } from '../icon-button/icon-button.js';
4
4
  import { ModalBody, ModalFooter, ModalTitle } from './modal.js';
5
5
  export type ModalPositions = 'center' | 'left' | 'right' | 'bottom';
@@ -10,7 +10,7 @@ type ModalWrapperOwnProps = {
10
10
  isOpen: boolean;
11
11
  onClose: () => void;
12
12
  position?: ModalPositions;
13
- closeButtonSize?: ButtonSize;
13
+ closeButtonSize?: ButtonProps['size'];
14
14
  };
15
15
  export type ModalWrapperProps = ModalWrapperOwnProps & Omit<ComponentPropsWithoutRef<'div'>, 'role'> & Omit<ModalProps, 'triggerButton'>;
16
16
  export type ModalSize = 'sm' | 'md' | 'lg';
@@ -27,10 +27,11 @@ export type ModalProps = React.AriaAttributes & {
27
27
  };
28
28
  export type ModalCloseButtonProps = {
29
29
  label?: string;
30
- } & Omit<IconButtonProps, 'className' | 'icon' | 'variant' | 'appearance'>;
30
+ size?: ButtonProps['size'];
31
+ } & Omit<IconButtonProps, 'className' | 'icon' | 'variant' | 'appearance' | 'size'>;
31
32
  export type ModalFooterButton = {
32
33
  label: string;
33
- variant: ButtonVariant;
34
+ variant: ButtonProps['variant'];
34
35
  } & ButtonProps;
35
36
  export type ModalFooterProps = {
36
37
  className?: string;