@alixpartners/ui-components 2.6.0 → 2.6.2

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 (100) hide show
  1. package/dist/{RichTextEditor-JH6YBGiw.js → RichTextEditor-xCakhho7.js} +1 -1
  2. package/dist/{ToastProvider-DVycF0zU.js → ToastProvider-D5LImZ-Q.js} +26 -26
  3. package/dist/assets/Dialog.css +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/Banner/Banner.test.js +1 -1
  6. package/dist/components/Button/Button.d.ts +1 -1
  7. package/dist/components/Button/Button.test.js +2 -2
  8. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  9. package/dist/components/Checkbox/Checkbox.js +3 -3
  10. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  11. package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
  12. package/dist/components/CorusHeader/CorusHeader.js +1 -1
  13. package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
  14. package/dist/components/CorusHeader/DropdownItemContent.js +5 -5
  15. package/dist/components/CorusHeader/DropdownMenu.d.ts +1 -1
  16. package/dist/components/CorusHeader/DropdownMenu.js +1 -1
  17. package/dist/components/CorusHeader/MegaMenuContent.d.ts +1 -1
  18. package/dist/components/CorusHeader/MegaMenuContent.js +14 -14
  19. package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
  20. package/dist/components/Creatable/Creatable.d.ts +1 -1
  21. package/dist/components/Creatable/Creatable.js +1 -1
  22. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  23. package/dist/components/Datepicker/Datepicker.js +1 -1
  24. package/dist/components/Datepicker/Datepicker.test.js +1 -1
  25. package/dist/components/Dialog/Dialog.d.ts +8 -2
  26. package/dist/components/Dialog/Dialog.js +227 -195
  27. package/dist/components/Dialog/Dialog.test.js +227 -202
  28. package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  29. package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
  30. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  31. package/dist/components/Dropdown/Dropdown.js +1 -1
  32. package/dist/components/FilePicker/FilePicker.d.ts +9 -9
  33. package/dist/components/FilePicker/FilePicker.test.js +2 -2
  34. package/dist/components/Ghost/Ghost.d.ts +1 -1
  35. package/dist/components/Ghost/Ghost.test.js +1 -1
  36. package/dist/components/Icon/Icon.d.ts +1 -1
  37. package/dist/components/Icons/IconsGallery.d.ts +1 -1
  38. package/dist/components/Illustration/Illustration.d.ts +1 -1
  39. package/dist/components/Illustration/Illustration.test.js +1 -1
  40. package/dist/components/Input/Input.test.js +1 -1
  41. package/dist/components/Logo/Logo.d.ts +1 -1
  42. package/dist/components/Logos/LogosGallery.d.ts +1 -1
  43. package/dist/components/NavBar/NavBar.d.ts +1 -1
  44. package/dist/components/NavBar/NavBar.js +1 -1
  45. package/dist/components/Radio/Radio.d.ts +1 -1
  46. package/dist/components/Radio/Radio.js +9 -9
  47. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  48. package/dist/components/RadioGroup/RadioGroup.js +11 -11
  49. package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
  50. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  51. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  52. package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
  53. package/dist/components/Search/Search.d.ts +1 -1
  54. package/dist/components/Search/Search.test.js +1 -1
  55. package/dist/components/Spinner/Spinner.d.ts +1 -1
  56. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  57. package/dist/components/SplitButton/SplitButton.js +3 -3
  58. package/dist/components/SplitButton/SplitButton.test.js +1 -1
  59. package/dist/components/Tab/Tab.d.ts +1 -1
  60. package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
  61. package/dist/components/Tag/Tag.d.ts +1 -1
  62. package/dist/components/Tag/Tag.test.js +1 -1
  63. package/dist/components/TagsFields/TagsFields.d.ts +1 -1
  64. package/dist/components/TagsFields/TagsFields.js +1 -1
  65. package/dist/components/Textarea/Textarea.d.ts +1 -1
  66. package/dist/components/Textarea/Textarea.test.js +1 -1
  67. package/dist/components/Toast/Toast.test.js +1 -1
  68. package/dist/components/ToastProvider/ToastProvider.d.ts +1 -2
  69. package/dist/components/ToastProvider/ToastProvider.js +1 -1
  70. package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
  71. package/dist/components/Toggle/Toggle.d.ts +1 -1
  72. package/dist/components/Toggle/Toggle.js +126 -211
  73. package/dist/components/Toggle/Toggle.test.js +1 -1
  74. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  75. package/dist/components/Tooltip/Tooltip.js +61 -60
  76. package/dist/{index-6DGSlWJb.js → index-C2s_VtSb.js} +3 -3
  77. package/dist/index-C8H9A55g.js +222 -0
  78. package/dist/{index-CcsZYEYy.js → index-CCFDXH-J.js} +28 -29
  79. package/dist/index-CCnm5-ML.js +230 -0
  80. package/dist/{index-BVZdJVFB.js → index-CFqDEbIR.js} +191 -192
  81. package/dist/index-CfIcUHKK.js +70 -0
  82. package/dist/index-ChQc_Cm6.js +1544 -0
  83. package/dist/index-CmGGeUr0.js +142 -0
  84. package/dist/{index-IR8HlW5P.js → index-D_L0ncPJ.js} +4 -4
  85. package/dist/{index-banDzeKa.js → index-DkTDHhag.js} +1 -1
  86. package/dist/index-Ii4UOx3H.js +599 -0
  87. package/dist/{index-6j3vTf--.js → index-Nyh2Wa71.js} +5 -5
  88. package/dist/index-z_kiwVc3.js +237 -0
  89. package/dist/main.js +3 -3
  90. package/dist/storybook-docs-page.d.ts +1 -1
  91. package/dist/{useToast-CpwrYPvx.js → useToast-Cz5MGKnw.js} +1 -1
  92. package/dist/{vi.bdSIJ99Y-DWCVXj6K.js → vi.bdSIJ99Y-017e_Pkz.js} +3 -3
  93. package/package.json +1 -1
  94. package/dist/index-B4szHVNJ.js +0 -248
  95. package/dist/index-Bq1FiX6B.js +0 -93
  96. package/dist/index-CE9NpYQR.js +0 -604
  97. package/dist/index-CHy8gqvu.js +0 -353
  98. package/dist/index-CarlZuEo.js +0 -1610
  99. package/dist/index-DH9SO8qV.js +0 -221
  100. package/dist/index-kgC_DL6e.js +0 -216
@@ -1,368 +1,393 @@
1
- import { jsx as i, jsxs as B } from "react/jsx-runtime";
2
- import { d as T, i as c, r as l, s as o, g as t, v as d, f as r } from "../../vi.bdSIJ99Y-DWCVXj6K.js";
3
- import s from "./Dialog.js";
1
+ import { jsx as n, jsxs as B } from "react/jsx-runtime";
2
+ import { d as T, i as l, r as c, s as o, g as t, v as d, f as r } from "../../vi.bdSIJ99Y-017e_Pkz.js";
4
3
  import p from "../Button/Button.js";
4
+ import s from "./Dialog.js";
5
5
  T("Dialog", () => {
6
6
  T("Rendering", () => {
7
7
  T("Basic rendering", () => {
8
- c("should render dialog with required props when open", () => {
9
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
8
+ l("should render dialog with required props when open", () => {
9
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
10
10
  const e = o.getByTestId("dialog");
11
11
  t(e).toBeInTheDocument(), t(o.getByTestId("dialog-title")).toHaveTextContent("Test Title"), t(o.getByTestId("dialog-description")).toHaveTextContent("Test Description");
12
- }), c("should render dialog with children trigger", () => {
13
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open Dialog" }) })), t(o.getByText("Open Dialog")).toBeInTheDocument(), t(o.queryByTestId("dialog")).not.toBeInTheDocument();
14
- }), c("should render dialog element with correct structure", () => {
15
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
12
+ }), l("should render dialog with children trigger", () => {
13
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open Dialog" }) })), t(o.getByText("Open Dialog")).toBeInTheDocument(), t(o.queryByTestId("dialog")).not.toBeInTheDocument();
14
+ }), l("should render dialog element with correct structure", () => {
15
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
16
16
  const e = o.getByTestId("dialog");
17
17
  t(e).toBeInTheDocument(), t(o.getByTestId("dialog-content")).toBeInTheDocument(), t(o.getByTestId("dialog-title")).toBeInTheDocument(), t(o.getByTestId("dialog-description")).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
18
18
  });
19
19
  }), T("Conditional rendering", () => {
20
- c("should render close button when onClose is provided", () => {
20
+ l("should render close button when onClose is provided", () => {
21
21
  const e = d.fn();
22
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
23
- const n = o.getByTestId("dialog-close-button");
24
- t(n).toBeInTheDocument();
25
- }), c("should not render close button when onClose is not provided", () => {
26
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description" }));
22
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
23
+ const i = o.getByTestId("dialog-close-button");
24
+ t(i).toBeInTheDocument();
25
+ }), l("should not render close button when onClose is not provided", () => {
26
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description" }));
27
27
  const e = o.queryByTestId("dialog-close-button");
28
28
  t(e).not.toBeInTheDocument();
29
- }), c("should render illustration when illustrationSrc is provided", () => {
30
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", illustrationSrc: "https://example.com/image.png", isOpen: !0 }));
29
+ }), l("should render illustration when illustrationSrc is provided", () => {
30
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", illustrationSrc: "https://example.com/image.png", isOpen: !0 }));
31
31
  const e = o.getByTestId("dialog-illustration");
32
32
  t(e).toBeInTheDocument();
33
- const n = e.querySelector("img");
34
- t(n).toBeInTheDocument(), t(n).toHaveAttribute("src", "https://example.com/image.png"), t(n).toHaveAttribute("alt", "Dialog illustration");
35
- }), c("should not render illustration when illustrationSrc is not provided", () => {
36
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description" }));
33
+ const i = e.querySelector("img");
34
+ t(i).toBeInTheDocument(), t(i).toHaveAttribute("src", "https://example.com/image.png"), t(i).toHaveAttribute("alt", "Dialog illustration");
35
+ }), l("should not render illustration when illustrationSrc is not provided", () => {
36
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description" }));
37
37
  const e = o.queryByTestId("dialog-illustration");
38
38
  t(e).not.toBeInTheDocument();
39
- }), c("should render confirm button when confirmButtonText is provided", () => {
40
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", isOpen: !0 }));
39
+ }), l("should render confirm button when confirmButtonText is provided", () => {
40
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", isOpen: !0 }));
41
41
  const e = o.getByTestId("dialog-buttons");
42
42
  t(e).toBeInTheDocument(), t(o.getByText("Confirm")).toBeInTheDocument();
43
- }), c("should render cancel button when cancelButtonText is provided", () => {
44
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", isOpen: !0 })), t(o.getByText("Cancel")).toBeInTheDocument();
45
- }), c("should render both buttons when both are provided", () => {
46
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", isOpen: !0 })), t(o.getByText("Confirm")).toBeInTheDocument(), t(o.getByText("Cancel")).toBeInTheDocument();
47
- }), c("should render empty buttons container when no buttons are provided", () => {
48
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
43
+ }), l("should render cancel button when cancelButtonText is provided", () => {
44
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", isOpen: !0 })), t(o.getByText("Cancel")).toBeInTheDocument();
45
+ }), l("should render both buttons when both are provided", () => {
46
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", isOpen: !0 })), t(o.getByText("Confirm")).toBeInTheDocument(), t(o.getByText("Cancel")).toBeInTheDocument();
47
+ }), l("should render empty buttons container when no buttons are provided", () => {
48
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
49
49
  const e = o.getByTestId("dialog-buttons");
50
50
  t(e).toBeInTheDocument(), t(e.children.length).toBe(0);
51
51
  });
52
52
  }), T("Content rendering", () => {
53
- c("should render title text correctly", () => {
54
- l(/* @__PURE__ */ i(s, { title: "My Dialog Title", description: "Test Description", isOpen: !0 })), t(o.getByTestId("dialog-title")).toHaveTextContent("My Dialog Title");
55
- }), c("should render description as string correctly", () => {
56
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "My description text", isOpen: !0 })), t(o.getByTestId("dialog-description")).toHaveTextContent("My description text");
57
- }), c("should render description as ReactNode correctly", () => {
58
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: /* @__PURE__ */ B("div", { children: [
59
- /* @__PURE__ */ i("p", { children: "Custom HTML content" }),
60
- /* @__PURE__ */ i("span", { children: "More content" })
53
+ l("should render title text correctly", () => {
54
+ c(/* @__PURE__ */ n(s, { title: "My Dialog Title", description: "Test Description", isOpen: !0 })), t(o.getByTestId("dialog-title")).toHaveTextContent("My Dialog Title");
55
+ }), l("should render description as string correctly", () => {
56
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "My description text", isOpen: !0 })), t(o.getByTestId("dialog-description")).toHaveTextContent("My description text");
57
+ }), l("should render description as ReactNode correctly", () => {
58
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: /* @__PURE__ */ B("div", { children: [
59
+ /* @__PURE__ */ n("p", { children: "Custom HTML content" }),
60
+ /* @__PURE__ */ n("span", { children: "More content" })
61
61
  ] }), isOpen: !0 })), t(o.getByTestId("dialog-description")).toContainHTML("<div><p>Custom HTML content</p><span>More content</span></div>");
62
- }), c("should render button text correctly", () => {
63
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Save Changes", cancelButtonText: "Discard", isOpen: !0 })), t(o.getByText("Save Changes")).toBeInTheDocument(), t(o.getByText("Discard")).toBeInTheDocument();
64
- }), c("should render button icons when provided", () => {
65
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonIcon: "ap-icon-check", cancelButtonText: "Cancel", cancelButtonIcon: "ap-icon-close", isOpen: !0 }));
66
- const e = o.getByText("Confirm").closest('[data-testid="button"]'), n = o.getByText("Cancel").closest('[data-testid="button"]');
67
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
68
- const a = e == null ? void 0 : e.querySelector('[data-testid="button-icon"]'), u = n == null ? void 0 : n.querySelector('[data-testid="button-icon"]');
62
+ }), l("should render button text correctly", () => {
63
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Save Changes", cancelButtonText: "Discard", isOpen: !0 })), t(o.getByText("Save Changes")).toBeInTheDocument(), t(o.getByText("Discard")).toBeInTheDocument();
64
+ }), l("should render button icons when provided", () => {
65
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonIcon: "ap-icon-check", cancelButtonText: "Cancel", cancelButtonIcon: "ap-icon-close", isOpen: !0 }));
66
+ const e = o.getByText("Confirm").closest('[data-testid="button"]'), i = o.getByText("Cancel").closest('[data-testid="button"]');
67
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
68
+ const a = e == null ? void 0 : e.querySelector('[data-testid="button-icon"]'), u = i == null ? void 0 : i.querySelector('[data-testid="button-icon"]');
69
69
  t(a).toBeInTheDocument(), t(u).toBeInTheDocument();
70
70
  });
71
71
  }), T("CSS Classes", () => {
72
- c("should apply dialog base class", () => {
73
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
72
+ l("should apply dialog base class", () => {
73
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
74
74
  const e = o.getByTestId("dialog");
75
75
  t(e.className).toContain("dialog");
76
- }), c("should apply custom className to wrapper when children are provided", () => {
76
+ }), l("should apply custom className to wrapper when children are provided", () => {
77
77
  const {
78
78
  container: e
79
- } = l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", className: "custom-wrapper-class", children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) })), n = e.firstChild;
80
- t(n.className).toContain("custom-wrapper-class");
81
- }), c("should always render wrapper div for consistent className support", () => {
79
+ } = c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", className: "custom-wrapper-class", children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) })), i = e.firstChild;
80
+ t(i.className).toContain("custom-wrapper-class");
81
+ }), l("should always render wrapper div for consistent className support", () => {
82
82
  const {
83
83
  container: e
84
- } = l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", className: "custom-class", isOpen: !0 })), n = e.firstChild;
85
- t(n).toBeInTheDocument(), t(n.tagName).toBe("DIV"), t(n.className).toContain("custom-class");
84
+ } = c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", className: "custom-class", isOpen: !0 })), i = e.firstChild;
85
+ t(i).toBeInTheDocument(), t(i.tagName).toBe("DIV"), t(i.className).toContain("custom-class");
86
86
  });
87
87
  });
88
88
  }), T("User Interactions", () => {
89
89
  T("Trigger interactions", () => {
90
- c("should open dialog when trigger is clicked", () => {
91
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
90
+ l("should open dialog when trigger is clicked", () => {
91
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
92
92
  const e = o.getByText("Open");
93
93
  t(o.queryByTestId("dialog")).not.toBeInTheDocument(), r.click(e);
94
- const n = o.getByTestId("dialog");
95
- t(n).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
96
- }), c("should not render trigger when children are not provided", () => {
97
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description" }));
98
- const n = o.queryAllByTestId("button").filter((a) => a.textContent !== "Confirm" && a.textContent !== "Cancel");
99
- t(n.length).toBe(0);
94
+ const i = o.getByTestId("dialog");
95
+ t(i).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
96
+ }), l("should not render trigger when children are not provided", () => {
97
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description" }));
98
+ const i = o.queryAllByTestId("button").filter((a) => a.textContent !== "Confirm" && a.textContent !== "Cancel");
99
+ t(i.length).toBe(0);
100
100
  });
101
101
  }), T("Close button interactions", () => {
102
- c("should call onClose when close button is clicked", () => {
102
+ l("should call onClose when close button is clicked", () => {
103
103
  const e = d.fn();
104
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
105
- const n = o.getByTestId("dialog-close-button");
106
- r.click(n), t(e).toHaveBeenCalledTimes(1);
107
- }), c("should close dialog when close button is clicked in uncontrolled mode", () => {
104
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
105
+ const i = o.getByTestId("dialog-close-button");
106
+ r.click(i), t(e).toHaveBeenCalledTimes(1);
107
+ }), l("should close dialog when close button is clicked in uncontrolled mode", () => {
108
108
  const e = d.fn();
109
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
110
- const n = o.getByText("Open");
111
- r.click(n);
109
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
110
+ const i = o.getByText("Open");
111
+ r.click(i);
112
112
  const a = o.getByTestId("dialog");
113
113
  t(a).toBeInTheDocument();
114
114
  const u = o.getByTestId("dialog-close-button");
115
115
  r.click(u), t(e).toHaveBeenCalledTimes(1);
116
116
  });
117
117
  }), T("Confirm button interactions", () => {
118
- c("should call onConfirm when confirm button is clicked", () => {
118
+ l("should call onConfirm when confirm button is clicked", () => {
119
119
  const e = d.fn();
120
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, isOpen: !0 }));
121
- const n = o.getByText("Confirm");
122
- r.click(n), t(e).toHaveBeenCalledTimes(1);
123
- }), c("should close dialog when confirm button is clicked in uncontrolled mode", () => {
124
- const e = d.fn(), n = d.fn();
125
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
120
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, isOpen: !0 }));
121
+ const i = o.getByText("Confirm");
122
+ r.click(i), t(e).toHaveBeenCalledTimes(1);
123
+ }), l("should close dialog when confirm button is clicked in uncontrolled mode", () => {
124
+ const e = d.fn(), i = d.fn();
125
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
126
126
  const a = o.getByText("Open");
127
127
  r.click(a);
128
128
  const u = o.getByTestId("dialog");
129
129
  t(u).toBeInTheDocument();
130
130
  const m = o.getByText("Confirm");
131
- r.click(m), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
132
- }), c("should call onClose after onConfirm in uncontrolled mode", () => {
133
- const e = d.fn(), n = d.fn();
134
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
131
+ r.click(m), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
132
+ }), l("should call onClose after onConfirm in uncontrolled mode", () => {
133
+ const e = d.fn(), i = d.fn();
134
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
135
135
  const a = o.getByText("Open");
136
136
  r.click(a);
137
137
  const u = o.getByText("Confirm");
138
- r.click(u), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
138
+ r.click(u), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
139
139
  });
140
140
  }), T("Cancel button interactions", () => {
141
- c("should call onCancel when cancel button is clicked", () => {
141
+ l("should call onCancel when cancel button is clicked", () => {
142
142
  const e = d.fn();
143
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, isOpen: !0 }));
144
- const n = o.getByText("Cancel");
145
- r.click(n), t(e).toHaveBeenCalledTimes(1);
146
- }), c("should close dialog when cancel button is clicked in uncontrolled mode", () => {
147
- const e = d.fn(), n = d.fn();
148
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
143
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, isOpen: !0 }));
144
+ const i = o.getByText("Cancel");
145
+ r.click(i), t(e).toHaveBeenCalledTimes(1);
146
+ }), l("should close dialog when cancel button is clicked in uncontrolled mode", () => {
147
+ const e = d.fn(), i = d.fn();
148
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
149
149
  const a = o.getByText("Open");
150
150
  r.click(a);
151
151
  const u = o.getByTestId("dialog");
152
152
  t(u).toBeInTheDocument();
153
153
  const m = o.getByText("Cancel");
154
- r.click(m), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
155
- }), c("should call onClose after onCancel in uncontrolled mode", () => {
156
- const e = d.fn(), n = d.fn();
157
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
154
+ r.click(m), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
155
+ }), l("should call onClose after onCancel in uncontrolled mode", () => {
156
+ const e = d.fn(), i = d.fn();
157
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
158
158
  const a = o.getByText("Open");
159
159
  r.click(a);
160
160
  const u = o.getByText("Cancel");
161
- r.click(u), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
161
+ r.click(u), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
162
162
  });
163
163
  }), T("Escape key handling", () => {
164
- c("should handle Escape key press on dialog", () => {
164
+ l("should handle Escape key press on dialog", () => {
165
165
  const e = d.fn();
166
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
167
- const n = o.getByTestId("dialog");
168
- t(n).toBeInTheDocument(), r.keyDown(n, {
166
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
167
+ const i = o.getByTestId("dialog");
168
+ t(i).toBeInTheDocument(), r.keyDown(i, {
169
169
  key: "Escape",
170
170
  code: "Escape"
171
- }), t(n).toBeInTheDocument();
171
+ }), t(i).toBeInTheDocument();
172
172
  });
173
173
  });
174
174
  }), T("Controlled Mode", () => {
175
- c("should open dialog when isOpen is true", () => {
176
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
177
- const e = o.getByTestId("dialog"), n = o.getByTestId("dialog-overlay");
178
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
179
- }), c("should close dialog when isOpen is false", () => {
180
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !1 })), t(o.queryByTestId("dialog")).not.toBeInTheDocument(), t(o.queryByTestId("dialog-overlay")).not.toBeInTheDocument();
181
- }), c("should update dialog state when isOpen changes", async () => {
175
+ l("should open dialog when isOpen is true", () => {
176
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
177
+ const e = o.getByTestId("dialog"), i = o.getByTestId("dialog-overlay");
178
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
179
+ }), l("should close dialog when isOpen is false", () => {
180
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !1 })), t(o.queryByTestId("dialog")).not.toBeInTheDocument(), t(o.queryByTestId("dialog-overlay")).not.toBeInTheDocument();
181
+ }), l("should update dialog state when isOpen changes", async () => {
182
182
  const {
183
183
  rerender: e
184
- } = l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !1 }));
185
- t(o.queryByTestId("dialog")).not.toBeInTheDocument(), e(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
186
- const n = o.getByTestId("dialog");
187
- t(n).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
188
- }), c("should call onClose when confirm is clicked in controlled mode", () => {
189
- const e = d.fn(), n = d.fn();
190
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0, confirmButtonText: "Confirm", onConfirm: e, onClose: n }));
184
+ } = c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !1 }));
185
+ t(o.queryByTestId("dialog")).not.toBeInTheDocument(), e(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
186
+ const i = o.getByTestId("dialog");
187
+ t(i).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
188
+ }), l("should call onClose when confirm is clicked in controlled mode", () => {
189
+ const e = d.fn(), i = d.fn();
190
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0, confirmButtonText: "Confirm", onConfirm: e, onClose: i }));
191
191
  const a = o.getByText("Confirm");
192
- r.click(a), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
193
- }), c("should call onClose when cancel is clicked in controlled mode", () => {
194
- const e = d.fn(), n = d.fn();
195
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0, cancelButtonText: "Cancel", onCancel: e, onClose: n }));
192
+ r.click(a), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
193
+ }), l("should call onClose when cancel is clicked in controlled mode", () => {
194
+ const e = d.fn(), i = d.fn();
195
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0, cancelButtonText: "Cancel", onCancel: e, onClose: i }));
196
196
  const a = o.getByText("Cancel");
197
- r.click(a), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
198
- }), c("should work without children in controlled mode", () => {
199
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
197
+ r.click(a), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
198
+ }), l("should work without children in controlled mode", () => {
199
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
200
200
  const e = o.getByTestId("dialog");
201
201
  t(e).toBeInTheDocument();
202
202
  });
203
203
  }), T("Uncontrolled Mode", () => {
204
- c("should open dialog when trigger is clicked", () => {
205
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
204
+ l("should open dialog when trigger is clicked", () => {
205
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
206
206
  const e = o.getByText("Open");
207
207
  t(o.queryByTestId("dialog")).not.toBeInTheDocument(), r.click(e);
208
- const n = o.getByTestId("dialog");
209
- t(n).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
210
- }), c("should close dialog automatically when confirm is clicked", () => {
211
- const e = d.fn(), n = d.fn();
212
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
208
+ const i = o.getByTestId("dialog");
209
+ t(i).toBeInTheDocument(), t(o.getByTestId("dialog-overlay")).toBeInTheDocument();
210
+ }), l("should close dialog automatically when confirm is clicked", () => {
211
+ const e = d.fn(), i = d.fn();
212
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", onConfirm: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
213
213
  const a = o.getByText("Open");
214
214
  r.click(a);
215
215
  const u = o.getByTestId("dialog");
216
216
  t(u).toBeInTheDocument();
217
217
  const m = o.getByText("Confirm");
218
- r.click(m), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
219
- }), c("should close dialog automatically when cancel is clicked", () => {
220
- const e = d.fn(), n = d.fn();
221
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
218
+ r.click(m), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
219
+ }), l("should close dialog automatically when cancel is clicked", () => {
220
+ const e = d.fn(), i = d.fn();
221
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", cancelButtonText: "Cancel", onCancel: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
222
222
  const a = o.getByText("Open");
223
223
  r.click(a);
224
224
  const u = o.getByTestId("dialog");
225
225
  t(u).toBeInTheDocument();
226
226
  const m = o.getByText("Cancel");
227
- r.click(m), t(e).toHaveBeenCalledTimes(1), t(n).toHaveBeenCalledTimes(1);
227
+ r.click(m), t(e).toHaveBeenCalledTimes(1), t(i).toHaveBeenCalledTimes(1);
228
228
  });
229
229
  }), T("Button Configuration", () => {
230
- c("should pass button type props correctly", () => {
231
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonType: "secondary", cancelButtonText: "Cancel", cancelButtonType: "tertiary", isOpen: !0 }));
232
- const e = o.getByText("Confirm").closest('[data-testid="button"]'), n = o.getByText("Cancel").closest('[data-testid="button"]');
233
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
234
- }), c("should pass button variant props correctly", () => {
235
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonVariant: "danger", cancelButtonText: "Cancel", cancelButtonVariant: "cancel", isOpen: !0 }));
236
- const e = o.getByText("Confirm").closest('[data-testid="button"]'), n = o.getByText("Cancel").closest('[data-testid="button"]');
237
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
238
- }), c("should pass button size props correctly", () => {
239
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonSize: "sm", cancelButtonText: "Cancel", cancelButtonSize: "sm", isOpen: !0 }));
240
- const e = o.getByText("Confirm").closest('[data-testid="button"]'), n = o.getByText("Cancel").closest('[data-testid="button"]');
241
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
242
- }), c("should use default button props when not provided", () => {
243
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", isOpen: !0 }));
244
- const e = o.getByText("Confirm").closest('[data-testid="button"]'), n = o.getByText("Cancel").closest('[data-testid="button"]');
245
- t(e).toBeInTheDocument(), t(n).toBeInTheDocument();
230
+ l("should pass button type props correctly", () => {
231
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonType: "secondary", cancelButtonText: "Cancel", cancelButtonType: "tertiary", isOpen: !0 }));
232
+ const e = o.getByText("Confirm").closest('[data-testid="button"]'), i = o.getByText("Cancel").closest('[data-testid="button"]');
233
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
234
+ }), l("should pass button variant props correctly", () => {
235
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonVariant: "danger", cancelButtonText: "Cancel", cancelButtonVariant: "cancel", isOpen: !0 }));
236
+ const e = o.getByText("Confirm").closest('[data-testid="button"]'), i = o.getByText("Cancel").closest('[data-testid="button"]');
237
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
238
+ }), l("should pass button size props correctly", () => {
239
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonSize: "sm", cancelButtonText: "Cancel", cancelButtonSize: "sm", isOpen: !0 }));
240
+ const e = o.getByText("Confirm").closest('[data-testid="button"]'), i = o.getByText("Cancel").closest('[data-testid="button"]');
241
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
242
+ }), l("should use default button props when not provided", () => {
243
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", isOpen: !0 }));
244
+ const e = o.getByText("Confirm").closest('[data-testid="button"]'), i = o.getByText("Cancel").closest('[data-testid="button"]');
245
+ t(e).toBeInTheDocument(), t(i).toBeInTheDocument();
246
+ }), l("should disable confirm button when confirmButtonDisabled is true", () => {
247
+ const e = d.fn();
248
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", confirmButtonDisabled: !0, onConfirm: e, isOpen: !0 }));
249
+ const i = o.getByText("Confirm").closest('[data-testid="button"]');
250
+ t(i).toBeDisabled(), r.click(i), t(e).not.toHaveBeenCalled();
246
251
  });
247
252
  }), T("Edge Cases", () => {
248
- c("should handle empty string for button text", () => {
249
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "", isOpen: !0 }));
253
+ l("should handle empty string for button text", () => {
254
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "", isOpen: !0 }));
250
255
  const e = o.queryByTestId("dialog-buttons");
251
256
  t(e).toBeInTheDocument(), t(e == null ? void 0 : e.children.length).toBe(0);
252
- }), c("should handle custom HTML content in description", () => {
253
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: /* @__PURE__ */ B("div", { children: [
254
- /* @__PURE__ */ i("h3", { children: "Custom Title" }),
255
- /* @__PURE__ */ i("p", { children: "Custom paragraph" }),
257
+ }), l("should handle custom HTML content in description", () => {
258
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: /* @__PURE__ */ B("div", { children: [
259
+ /* @__PURE__ */ n("h3", { children: "Custom Title" }),
260
+ /* @__PURE__ */ n("p", { children: "Custom paragraph" }),
256
261
  /* @__PURE__ */ B("ul", { children: [
257
- /* @__PURE__ */ i("li", { children: "Item 1" }),
258
- /* @__PURE__ */ i("li", { children: "Item 2" })
262
+ /* @__PURE__ */ n("li", { children: "Item 1" }),
263
+ /* @__PURE__ */ n("li", { children: "Item 2" })
259
264
  ] })
260
265
  ] }), isOpen: !0 })), t(o.getByText("Custom Title")).toBeInTheDocument(), t(o.getByText("Custom paragraph")).toBeInTheDocument(), t(o.getByText("Item 1")).toBeInTheDocument(), t(o.getByText("Item 2")).toBeInTheDocument();
261
- }), c("should handle multiple rapid open/close actions", () => {
266
+ }), l("should handle multiple rapid open/close actions", () => {
262
267
  const e = d.fn();
263
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
264
- const n = o.getByText("Open");
265
- t(o.queryByTestId("dialog")).not.toBeInTheDocument(), r.click(n), t(o.getByTestId("dialog")).toBeInTheDocument();
268
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
269
+ const i = o.getByText("Open");
270
+ t(o.queryByTestId("dialog")).not.toBeInTheDocument(), r.click(i), t(o.getByTestId("dialog")).toBeInTheDocument();
266
271
  const a = o.getByTestId("dialog-close-button");
267
- r.click(a), t(e).toHaveBeenCalledTimes(1), r.click(n), t(o.getByTestId("dialog")).toBeInTheDocument();
272
+ r.click(a), t(e).toHaveBeenCalledTimes(1), r.click(i), t(o.getByTestId("dialog")).toBeInTheDocument();
268
273
  const u = o.getByTestId("dialog-close-button");
269
274
  r.click(u), t(e).toHaveBeenCalledTimes(2);
270
- }), c("should handle undefined callbacks gracefully", () => {
271
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
275
+ }), l("should handle undefined callbacks gracefully", () => {
276
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", confirmButtonText: "Confirm", cancelButtonText: "Cancel", children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
272
277
  const e = o.getByText("Open");
273
278
  t(o.queryByTestId("dialog")).not.toBeInTheDocument(), r.click(e), t(o.getByTestId("dialog")).toBeInTheDocument();
274
- const n = o.getByText("Confirm");
275
- r.click(n), r.click(e), t(o.getByTestId("dialog")).toBeInTheDocument();
279
+ const i = o.getByText("Confirm");
280
+ r.click(i), r.click(e), t(o.getByTestId("dialog")).toBeInTheDocument();
276
281
  const a = o.getByText("Cancel");
277
282
  r.click(a);
278
283
  });
279
284
  }), T("Accessibility", () => {
280
- c("should render dialog element with proper semantic structure", () => {
281
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
285
+ l("should render dialog element with proper semantic structure", () => {
286
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
282
287
  const e = o.getByTestId("dialog");
283
288
  t(e).toBeInTheDocument();
284
- const n = o.getByTestId("dialog-title");
285
- t(n).toBeInTheDocument();
286
- }), c("should have accessible close button", () => {
287
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
289
+ const i = o.getByTestId("dialog-title");
290
+ t(i).toBeInTheDocument();
291
+ }), l("should have accessible close button", () => {
292
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
288
293
  const e = o.getByTestId("dialog-close-button");
289
294
  t(e).toBeInTheDocument();
290
- }), c("should render overlay for accessibility", () => {
291
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
295
+ }), l("should render overlay for accessibility", () => {
296
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
292
297
  const e = o.getByTestId("dialog-overlay");
293
298
  t(e).toBeInTheDocument();
294
299
  });
295
300
  }), T("Portal Rendering", () => {
296
- c("should render dialog content via Portal", () => {
297
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
301
+ l("should render dialog content via Portal", () => {
302
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
298
303
  const e = o.getByTestId("dialog");
299
304
  t(e).toBeInTheDocument(), t(document.body.contains(e)).toBe(!0);
300
- }), c("should render overlay via Portal", () => {
301
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
305
+ }), l("should render overlay via Portal", () => {
306
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
302
307
  const e = o.getByTestId("dialog-overlay");
303
308
  t(e).toBeInTheDocument(), t(document.body.contains(e)).toBe(!0);
304
309
  });
305
310
  }), T("New Props", () => {
306
311
  T("defaultOpen", () => {
307
- c("should open dialog initially when defaultOpen is true", () => {
308
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", defaultOpen: !0 }));
312
+ l("should open dialog initially when defaultOpen is true", () => {
313
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", defaultOpen: !0 }));
309
314
  const e = o.getByTestId("dialog");
310
315
  t(e).toBeInTheDocument();
311
- }), c("should keep dialog closed initially when defaultOpen is false", () => {
312
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", defaultOpen: !1, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) })), t(o.queryByTestId("dialog")).not.toBeInTheDocument();
316
+ }), l("should keep dialog closed initially when defaultOpen is false", () => {
317
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", defaultOpen: !1, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) })), t(o.queryByTestId("dialog")).not.toBeInTheDocument();
313
318
  });
314
319
  }), T("showCloseButton", () => {
315
- c("should show close button when showCloseButton is true even without onClose", () => {
316
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", showCloseButton: !0, isOpen: !0 }));
320
+ l("should show close button when showCloseButton is true even without onClose", () => {
321
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", showCloseButton: !0, isOpen: !0 }));
317
322
  const e = o.getByTestId("dialog-close-button");
318
323
  t(e).toBeInTheDocument();
319
- }), c("should hide close button when showCloseButton is false even with onClose", () => {
320
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", showCloseButton: !1, onClose: d.fn(), isOpen: !0 }));
324
+ }), l("should hide close button when showCloseButton is false even with onClose", () => {
325
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", showCloseButton: !1, onClose: d.fn(), isOpen: !0 }));
321
326
  const e = o.queryByTestId("dialog-close-button");
322
327
  t(e).not.toBeInTheDocument();
323
- }), c("should show close button by default when onClose is provided (backward compatible)", () => {
324
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
328
+ }), l("should show close button by default when onClose is provided (backward compatible)", () => {
329
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
325
330
  const e = o.getByTestId("dialog-close-button");
326
331
  t(e).toBeInTheDocument();
327
332
  });
328
333
  }), T("onOpenChange", () => {
329
- c("should call onOpenChange when dialog opens", () => {
334
+ l("should call onOpenChange when dialog opens", () => {
330
335
  const e = d.fn();
331
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onOpenChange: e, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
332
- const n = o.getByText("Open");
333
- r.click(n), t(e).toHaveBeenCalledWith(!0);
334
- }), c("should call onOpenChange when dialog closes", () => {
335
- const e = d.fn(), n = d.fn();
336
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onOpenChange: e, onClose: n, children: /* @__PURE__ */ i(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
336
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onOpenChange: e, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
337
+ const i = o.getByText("Open");
338
+ r.click(i), t(e).toHaveBeenCalledWith(!0);
339
+ }), l("should call onOpenChange when dialog closes", () => {
340
+ const e = d.fn(), i = d.fn();
341
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onOpenChange: e, onClose: i, children: /* @__PURE__ */ n(p, { type: "primary", variant: "default", size: "md", children: "Open" }) }));
337
342
  const a = o.getByText("Open");
338
343
  r.click(a);
339
344
  const u = o.getByTestId("dialog-close-button");
340
345
  r.click(u), t(e).toHaveBeenCalledWith(!1);
341
346
  });
342
347
  }), T("closeOnEscape", () => {
343
- c("should close dialog on Escape key by default", () => {
348
+ l("should close dialog on Escape key by default", () => {
344
349
  const e = d.fn();
345
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
346
- const n = o.getByTestId("dialog");
347
- r.keyDown(n, {
350
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, isOpen: !0 }));
351
+ const i = o.getByTestId("dialog");
352
+ r.keyDown(i, {
348
353
  key: "Escape",
349
354
  code: "Escape"
350
355
  }), t(e).toHaveBeenCalled();
351
- }), c("should not close dialog on Escape key when closeOnEscape is false", () => {
356
+ }), l("should not close dialog on Escape key when closeOnEscape is false", () => {
352
357
  const e = d.fn();
353
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: e, closeOnEscape: !1, isOpen: !0 }));
354
- const n = o.getByTestId("dialog");
355
- r.keyDown(n, {
358
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: e, closeOnEscape: !1, isOpen: !0 }));
359
+ const i = o.getByTestId("dialog");
360
+ r.keyDown(i, {
356
361
  key: "Escape",
357
362
  code: "Escape"
358
363
  }), t(e).not.toHaveBeenCalled();
359
364
  });
360
365
  }), T("aria-label on close button", () => {
361
- c("should have aria-label on close button for accessibility", () => {
362
- l(/* @__PURE__ */ i(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
366
+ l("should have aria-label on close button for accessibility", () => {
367
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", onClose: d.fn(), isOpen: !0 }));
363
368
  const e = o.getByTestId("dialog-close-button");
364
369
  t(e).toHaveAttribute("aria-label", "Close dialog");
365
370
  });
366
371
  });
372
+ }), T("widthAuto property", () => {
373
+ l("should apply auto width class when widthAuto is true", () => {
374
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", widthAuto: !0, isOpen: !0 }));
375
+ const e = o.getByTestId("dialog");
376
+ t(e.className).toContain("dialog-width-auto");
377
+ }), l("should not apply auto width class by default", () => {
378
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
379
+ const e = o.getByTestId("dialog");
380
+ t(e.className).not.toContain("dialog-width-auto");
381
+ });
382
+ }), T("descriptionScrollable property", () => {
383
+ l("should apply scrollable description class when descriptionScrollable is true", () => {
384
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", descriptionScrollable: !0, isOpen: !0 }));
385
+ const e = o.getByTestId("dialog");
386
+ t(e.className).toContain("dialog-scrollable");
387
+ }), l("should not apply scrollable description class by default", () => {
388
+ c(/* @__PURE__ */ n(s, { title: "Test Title", description: "Test Description", isOpen: !0 }));
389
+ const e = o.getByTestId("dialog");
390
+ t(e.className).not.toContain("dialog-scrollable");
391
+ });
367
392
  });
368
393
  });