@alixpartners/ui-components 2.5.3 → 2.5.5

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 (61) hide show
  1. package/dist/CorusHeader.module-xOp6ZX_M.js +35 -0
  2. package/dist/RichTextEditor-cvtLFe4t.js +443 -0
  3. package/dist/ap-logos-2dYMA1l5.js +4 -0
  4. package/dist/assets/CorusHeader.css +1 -0
  5. package/dist/assets/Input.css +1 -1
  6. package/dist/assets/RichTextEditor.css +1 -1
  7. package/dist/assets/SplitButton.css +1 -1
  8. package/dist/assets/ap-icons-types.d.ts +1 -1
  9. package/dist/assets/ap-icons.d.ts +1 -1
  10. package/dist/assets/ap-logos-types.d.ts +1 -1
  11. package/dist/assets/ap-logos.d.ts +1 -1
  12. package/dist/assets/main.css +1 -1
  13. package/dist/components/Checkbox/Checkbox.js +3 -3
  14. package/dist/components/CorusHeader/CorusHeader.d.ts +3 -0
  15. package/dist/components/CorusHeader/CorusHeader.js +65 -0
  16. package/dist/components/CorusHeader/CorusHeader.types.d.ts +47 -0
  17. package/dist/components/CorusHeader/DropdownItemContent.d.ts +6 -0
  18. package/dist/components/CorusHeader/DropdownItemContent.js +17 -0
  19. package/dist/components/CorusHeader/DropdownMenu.d.ts +6 -0
  20. package/dist/components/CorusHeader/DropdownMenu.js +26 -0
  21. package/dist/components/CorusHeader/MegaMenuContent.d.ts +6 -0
  22. package/dist/components/CorusHeader/MegaMenuContent.js +24 -0
  23. package/dist/components/CorusHeader/UserProfileIcon.d.ts +3 -0
  24. package/dist/components/CorusHeader/UserProfileIcon.js +9 -0
  25. package/dist/components/Creatable/Creatable.js +1 -1
  26. package/dist/components/Datepicker/Datepicker.js +1 -1
  27. package/dist/components/Dialog/Dialog.js +5 -5
  28. package/dist/components/Dropdown/Dropdown.js +1 -1
  29. package/dist/components/Icons/IconsGallery.js +1 -1
  30. package/dist/components/Logo/Logo.d.ts +1 -1
  31. package/dist/components/Logo/Logo.js +12 -6
  32. package/dist/components/Logos/LogosGallery.js +1 -1
  33. package/dist/components/NavBar/NavBar.js +50 -352
  34. package/dist/components/Radio/Radio.js +1 -1
  35. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  36. package/dist/components/RichTextEditor/RichTextEditor.d.ts +3 -3
  37. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  38. package/dist/components/RichTextEditor/RichTextEditor.model.d.ts +1 -1
  39. package/dist/components/RichTextEditor/RichTextEditor.test.js +76 -59
  40. package/dist/components/SplitButton/SplitButton.js +3 -3
  41. package/dist/components/TagsFields/TagsFields.js +1 -1
  42. package/dist/components/Toggle/Toggle.js +2 -2
  43. package/dist/components/Tooltip/Tooltip.js +50 -50
  44. package/dist/{index-7CBv-Jx6.js → index-C2s_VtSb.js} +3 -3
  45. package/dist/{index-DEphED6n.js → index-C8H9A55g.js} +2 -2
  46. package/dist/{index-DZ4Gof57.js → index-CCFDXH-J.js} +6 -6
  47. package/dist/{index-CpsmI33B.js → index-CCnm5-ML.js} +4 -4
  48. package/dist/{index-Chv2KjIL.js → index-CFqDEbIR.js} +2 -2
  49. package/dist/{index-BymOxiM6.js → index-CfIcUHKK.js} +1 -1
  50. package/dist/{index-D34Qo5Qx.js → index-ChQc_Cm6.js} +3 -3
  51. package/dist/{index-DrR82jOT.js → index-CmGGeUr0.js} +2 -2
  52. package/dist/index-D_L0ncPJ.js +312 -0
  53. package/dist/{index-DgdVwltD.js → index-Ii4UOx3H.js} +7 -7
  54. package/dist/index-Nyh2Wa71.js +27 -0
  55. package/dist/{index-DM51yNMI.js → index-z_kiwVc3.js} +5 -5
  56. package/dist/main.d.ts +1 -0
  57. package/dist/main.js +24 -22
  58. package/package.json +16 -10
  59. package/dist/RichTextEditor-CfINW9Xs.js +0 -412
  60. package/dist/ap-logos-CwA4O8B7.js +0 -4
  61. package/dist/index-CxAtPSMM.js +0 -27
@@ -1,91 +1,108 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { d, i as r, r as a, g as t, s as e, f as i, w as y, v as b } from "../../vi.bdSIJ99Y-017e_Pkz.js";
3
- import { s as c, R as n } from "../../RichTextEditor-CfINW9Xs.js";
2
+ import { d, i as a, r, g as t, s as e, f as c, w as b, v as u } from "../../vi.bdSIJ99Y-017e_Pkz.js";
3
+ import { s as i, R as n } from "../../RichTextEditor-cvtLFe4t.js";
4
4
  d("RichTextEditor", () => {
5
5
  d("Rendering", () => {
6
- r("renders label and required marker", () => {
7
- a(/* @__PURE__ */ o(n, { label: "Body", required: !0 })), t(e.getByTestId("rte-label")).toHaveTextContent("Body"), t(e.getByTestId("rte-required")).toHaveTextContent("*");
8
- }), r("does not render label when omitted", () => {
9
- a(/* @__PURE__ */ o(n, {})), t(e.queryByTestId("rte-label")).not.toBeInTheDocument();
10
- }), r("shows toolbar by default", () => {
11
- a(/* @__PURE__ */ o(n, { label: "Body" })), t(e.getByTestId("rte-toolbar")).toBeInTheDocument();
12
- }), r("hides toolbar when showToolbar is false", () => {
13
- a(/* @__PURE__ */ o(n, { label: "Body", showToolbar: !1 })), t(e.queryByTestId("rte-toolbar")).not.toBeInTheDocument();
14
- }), r("hides word count when showWordCount is false", () => {
15
- a(/* @__PURE__ */ o(n, { label: "Body", showWordCount: !1 })), t(e.queryByTestId("rte-word-count")).not.toBeInTheDocument();
16
- }), r("places word counter inside the same frame as the editor", () => {
17
- a(/* @__PURE__ */ o(n, { label: "Body" }));
18
- const s = e.getByTestId("rte-editor"), l = e.getByTestId("rte-word-count");
19
- t(l.parentElement).toBe(s.parentElement);
20
- }), r("applies stacked toolbar class when toolbarLayout is stacked", () => {
21
- a(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "stacked" }));
22
- const s = e.getByTestId("rte-toolbar");
23
- t(s.className).toContain(c.toolbarStacked);
24
- }), r("renders two toolbar rows when stacked", () => {
25
- a(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "stacked" }));
26
- const l = e.getByTestId("rte-toolbar").querySelectorAll(`.${c.toolbarRow}`);
27
- t(l.length).toBe(2);
28
- }), r("renders one toolbar row when inline", () => {
29
- a(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "inline" }));
30
- const l = e.getByTestId("rte-toolbar").querySelectorAll(`.${c.toolbarRow}`);
31
- t(l.length).toBe(1);
6
+ a("renders label and required marker", () => {
7
+ r(/* @__PURE__ */ o(n, { label: "Body", required: !0 })), t(e.getByTestId("rte-label")).toHaveTextContent("Body"), t(e.getByTestId("rte-required")).toHaveTextContent("*");
8
+ }), a("does not render label when omitted", () => {
9
+ r(/* @__PURE__ */ o(n, {})), t(e.queryByTestId("rte-label")).not.toBeInTheDocument();
10
+ }), a("shows toolbar by default", () => {
11
+ r(/* @__PURE__ */ o(n, { label: "Body" })), t(e.getByTestId("rte-toolbar")).toBeInTheDocument();
12
+ }), a("hides toolbar when showToolbar is false", () => {
13
+ r(/* @__PURE__ */ o(n, { label: "Body", showToolbar: !1 })), t(e.queryByTestId("rte-toolbar")).not.toBeInTheDocument();
14
+ }), a("hides character count when showCharacterCount is false", () => {
15
+ r(/* @__PURE__ */ o(n, { label: "Body", showCharacterCount: !1 })), t(e.queryByTestId("rte-character-count")).not.toBeInTheDocument();
16
+ }), a("places character counter inside the same frame as the editor", () => {
17
+ r(/* @__PURE__ */ o(n, { label: "Body" }));
18
+ const l = e.getByTestId("rte-editor"), s = e.getByTestId("rte-character-count");
19
+ t(s.parentElement).toBe(l.parentElement);
20
+ }), a("applies stacked toolbar class when toolbarLayout is stacked", () => {
21
+ r(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "stacked" }));
22
+ const l = e.getByTestId("rte-toolbar");
23
+ t(l.className).toContain(i.toolbarStacked);
24
+ }), a("renders two toolbar rows when stacked", () => {
25
+ r(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "stacked" }));
26
+ const s = e.getByTestId("rte-toolbar").querySelectorAll(`.${i.toolbarRow}`);
27
+ t(s.length).toBe(2);
28
+ }), a("renders one toolbar row when inline", () => {
29
+ r(/* @__PURE__ */ o(n, { label: "Body", toolbarLayout: "inline" }));
30
+ const s = e.getByTestId("rte-toolbar").querySelectorAll(`.${i.toolbarRow}`);
31
+ t(s.length).toBe(1);
32
32
  });
33
33
  }), d("Toolbar actions", () => {
34
- r("does not render justify or numbered list actions", () => {
35
- a(/* @__PURE__ */ o(n, { label: "Body" })), t(e.queryByTestId("rte-action-align-justify")).not.toBeInTheDocument(), t(e.queryByTestId("rte-action-numbered")).not.toBeInTheDocument();
36
- }), r("renders bold, align, list, and link actions", () => {
37
- a(/* @__PURE__ */ o(n, { label: "Body" })), t(e.getByTestId("rte-action-bold")).toBeInTheDocument(), t(e.getByTestId("rte-action-align-left")).toBeInTheDocument(), t(e.getByTestId("rte-action-bulleted")).toBeInTheDocument(), t(e.getByTestId("rte-action-insert-link")).toBeInTheDocument();
34
+ a("does not render justify or numbered list actions", () => {
35
+ r(/* @__PURE__ */ o(n, { label: "Body" })), t(e.queryByTestId("rte-action-align-justify")).not.toBeInTheDocument(), t(e.queryByTestId("rte-action-numbered")).not.toBeInTheDocument();
36
+ }), a("renders bold, align, list, and link actions", () => {
37
+ r(/* @__PURE__ */ o(n, { label: "Body" })), t(e.getByTestId("rte-action-bold")).toBeInTheDocument(), t(e.getByTestId("rte-action-align-left")).toBeInTheDocument(), t(e.getByTestId("rte-action-bulleted")).toBeInTheDocument(), t(e.getByTestId("rte-action-insert-link")).toBeInTheDocument();
38
38
  });
39
39
  }), d("Format dropdown", () => {
40
- r("opens format menu and shows default format options", async () => {
41
- a(/* @__PURE__ */ o(n, { label: "Body" })), i.click(e.getByTestId("rte-format-select")), await y(() => {
40
+ a("opens format menu and shows default format options", async () => {
41
+ r(/* @__PURE__ */ o(n, { label: "Body" })), c.click(e.getByTestId("rte-format-select")), await b(() => {
42
42
  t(e.getByTestId("rte-format-menu")).toBeInTheDocument();
43
43
  }), t(e.getByTestId("rte-format-option-paragraph")).toBeInTheDocument(), t(e.getByTestId("rte-format-option-heading1")).toBeInTheDocument();
44
- }), r("uses custom format option labels", async () => {
45
- a(/* @__PURE__ */ o(n, { label: "Body", formatOptions: [{
44
+ }), a("uses custom format option labels", async () => {
45
+ r(/* @__PURE__ */ o(n, { label: "Body", formatOptions: [{
46
46
  label: "Custom block",
47
47
  value: "paragraph"
48
- }] })), i.click(e.getByTestId("rte-format-select")), await y(() => {
48
+ }] })), c.click(e.getByTestId("rte-format-select")), await b(() => {
49
49
  t(e.getByTestId("rte-format-menu")).toBeInTheDocument();
50
50
  }), t(e.getByTestId("rte-format-option-paragraph")).toHaveTextContent("Custom block");
51
51
  });
52
- }), d("Word count", () => {
53
- r("shows word count and updates it", () => {
54
- a(/* @__PURE__ */ o(n, { label: "Body", value: "<p>Hello world</p>", maxWords: 8 })), t(e.getByTestId("rte-word-count")).toHaveTextContent("2/8");
55
- const s = e.getByTestId("rte-editor");
56
- i.input(s, {
52
+ }), d("Character count", () => {
53
+ a("shows character count and updates it", () => {
54
+ r(/* @__PURE__ */ o(n, { label: "Body", value: "<p>Hello world</p>", maxCharacters: 80 })), t(e.getByTestId("rte-character-count")).toHaveTextContent("11/80");
55
+ const l = e.getByTestId("rte-editor");
56
+ c.input(l, {
57
57
  target: {
58
58
  innerHTML: "<p>Hello world again now</p>"
59
59
  }
60
- }), t(e.getByTestId("rte-word-count")).toHaveTextContent("4/8");
60
+ }), t(e.getByTestId("rte-character-count")).toHaveTextContent("21/80");
61
+ }), a("blocks insertion once maxCharacters is reached", () => {
62
+ r(/* @__PURE__ */ o(n, { label: "Body", value: "<p>Hello</p>", maxCharacters: 5 }));
63
+ const l = e.getByTestId("rte-editor"), s = new InputEvent("beforeinput", {
64
+ bubbles: !0,
65
+ cancelable: !0,
66
+ inputType: "insertText",
67
+ data: "x"
68
+ });
69
+ l.dispatchEvent(s), t(s.defaultPrevented).toBe(!0);
70
+ }), a("allows deletion when maxCharacters is reached", () => {
71
+ r(/* @__PURE__ */ o(n, { label: "Body", value: "<p>Hello</p>", maxCharacters: 5 }));
72
+ const l = e.getByTestId("rte-editor"), s = new InputEvent("beforeinput", {
73
+ bubbles: !0,
74
+ cancelable: !0,
75
+ inputType: "deleteContentBackward"
76
+ });
77
+ l.dispatchEvent(s), t(s.defaultPrevented).toBe(!1);
61
78
  });
62
79
  }), d("Callbacks and editor props", () => {
63
- r("fires onChange with rendered html", () => {
64
- const s = b.fn();
65
- a(/* @__PURE__ */ o(n, { label: "Body", onChange: s }));
66
- const l = e.getByTestId("rte-editor");
67
- i.input(l, {
80
+ a("fires onChange with rendered html", () => {
81
+ const l = u.fn();
82
+ r(/* @__PURE__ */ o(n, { label: "Body", onChange: l }));
83
+ const s = e.getByTestId("rte-editor");
84
+ c.input(s, {
68
85
  target: {
69
86
  innerHTML: "<p>Test value</p>"
70
87
  }
71
- }), t(s).toHaveBeenCalled(), t(s.mock.calls[0][0]).toContain("<p>Test value</p>");
72
- }), r("fires onModelChange when content changes", () => {
73
- const s = b.fn();
74
- a(/* @__PURE__ */ o(n, { label: "Body", onModelChange: s }));
75
- const l = e.getByTestId("rte-editor");
76
- i.input(l, {
88
+ }), t(l).toHaveBeenCalled(), t(l.mock.calls[0][0]).toContain("<p>Test value</p>");
89
+ }), a("fires onModelChange when content changes", () => {
90
+ const l = u.fn();
91
+ r(/* @__PURE__ */ o(n, { label: "Body", onModelChange: l }));
92
+ const s = e.getByTestId("rte-editor");
93
+ c.input(s, {
77
94
  target: {
78
95
  innerHTML: "<p>Model test</p>"
79
96
  }
80
- }), t(s).toHaveBeenCalled(), t(s.mock.calls[0][0]).toMatchObject({
97
+ }), t(l).toHaveBeenCalled(), t(l.mock.calls[0][0]).toMatchObject({
81
98
  blocks: t.any(Array)
82
99
  });
83
- }), r("sets resize none when resizable is false", () => {
84
- a(/* @__PURE__ */ o(n, { label: "Body", resizable: !1 })), t(e.getByTestId("rte-editor")).toHaveStyle({
100
+ }), a("sets resize none when resizable is false", () => {
101
+ r(/* @__PURE__ */ o(n, { label: "Body", resizable: !1 })), t(e.getByTestId("rte-editor-body")).toHaveStyle({
85
102
  resize: "none"
86
103
  });
87
- }), r("sets contentEditable false when disabled", () => {
88
- a(/* @__PURE__ */ o(n, { label: "Body", disabled: !0 })), t(e.getByTestId("rte-editor")).toHaveAttribute("contenteditable", "false");
104
+ }), a("sets contentEditable false when disabled", () => {
105
+ r(/* @__PURE__ */ o(n, { label: "Body", disabled: !0 })), t(e.getByTestId("rte-editor")).toHaveAttribute("contenteditable", "false");
89
106
  });
90
107
  });
91
108
  });
@@ -5,9 +5,9 @@ import * as p from "react";
5
5
  import { useRef as U, useState as I, useEffect as $ } from "react";
6
6
  import K from "../Icon/Icon.js";
7
7
  import "../Input/Input.js";
8
- import { u as j, P as H, c as v, a as F, b as V } from "../../index-DM51yNMI.js";
9
- import { R as X, A as q, P as J, C as Q, I as Y, c as C, G as Z, L as ee, a as oe, b as ne, d as te, e as re, S as ae, f as ie, g as de, h as pe } from "../../index-DgdVwltD.js";
10
- import { u as y } from "../../index-7CBv-Jx6.js";
8
+ import { u as j, P as H, c as v, a as F, b as V } from "../../index-z_kiwVc3.js";
9
+ import { R as X, A as q, P as J, C as Q, I as Y, c as C, G as Z, L as ee, a as oe, b as ne, d as te, e as re, S as ae, f as ie, g as de, h as pe } from "../../index-Ii4UOx3H.js";
10
+ import { u as y } from "../../index-C2s_VtSb.js";
11
11
  import '../../assets/SplitButton.css';var D = "DropdownMenu", [se] = V(
12
12
  D,
13
13
  [C]
@@ -5,7 +5,7 @@ import W from "../Icon/Icon.js";
5
5
  import Ie from "../Button/Button.js";
6
6
  import "../Input/Input.js";
7
7
  import Fe from "../Tooltip/Tooltip.js";
8
- import { R as ve, A as Te, P as Ne, C as Le } from "../../index-DZ4Gof57.js";
8
+ import { R as ve, A as Te, P as Ne, C as Le } from "../../index-CCFDXH-J.js";
9
9
  import '../../assets/TagsFields.css';const De = "TagsFields-module__dropdownContainer___GIsND", Ce = "TagsFields-module__dropdownLabel___AUP9W", ye = "TagsFields-module__dropdownLabelDisabled___hilvh", Oe = "TagsFields-module__required___Ybg21", ke = "TagsFields-module__dropdownWrapper___KxTZl", Re = "TagsFields-module__selectedItemsCreatable___Pnf8l", xe = "TagsFields-module__selectedItem___Tp6lp", Ae = "TagsFields-module__selectedItemLabel___SwoJL", Se = "TagsFields-module__removeButton___od0yh", We = "TagsFields-module__removeIcon___2WRCF", Ee = "TagsFields-module__singleSelectedCreatableItem___QwENt", Me = "TagsFields-module__singleSelectedCreatableItemRemoveButton___1PeN7", Ve = "TagsFields-module__dropdownActions___USb5V", Be = "TagsFields-module__dropdownArrow___JT9d3", Pe = "TagsFields-module__dropdownArrowOpen___jPfTk", je = "TagsFields-module__dropdownMenu___gPhtC", qe = "TagsFields-module__dropdownCreatableSearchContainer___mltcH", Ge = "TagsFields-module__disabled___1OfNF", ze = "TagsFields-module__dropdownCreatableError___R6oyD", Je = "TagsFields-module__creatableInput___qz9jI", Qe = "TagsFields-module__optionsList___qyawx", Ue = "TagsFields-module__categoryGroup___In039", Ye = "TagsFields-module__categoryDivider___eROv0", Ke = "TagsFields-module__categoryLabel___Cv2h5", He = "TagsFields-module__optionItem___UujFS", Xe = "TagsFields-module__optionItemDisabled___9gB8N", Ze = "TagsFields-module__optionItemFocused___4rsDt", $e = "TagsFields-module__optionContent___QSC9G", et = "TagsFields-module__optionLabel___N-fQ7", tt = "TagsFields-module__tickIcon___3uRY-", st = "TagsFields-module__noOptions___ugYj9", lt = "TagsFields-module__helpers___ab6f-", ot = "TagsFields-module__helpText___Qzdqh", dt = "TagsFields-module__helpTextDisabled___m-oFo", nt = "TagsFields-module__helpLink___JQDmR", at = "TagsFields-module__helpLinkDisabled___Nk1BX", rt = "TagsFields-module__errorMessage___b-ugf", t = {
10
10
  dropdownContainer: De,
11
11
  dropdownLabel: Ce,
@@ -2,9 +2,9 @@ import { jsxs as k, jsx as d } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { useId as D, useEffect as M, useState as j } from "react";
4
4
  import { c as F } from "../../clsx-OuTLNxxd.js";
5
- import { d as y, u as H, P, c as K, b as A } from "../../index-DM51yNMI.js";
5
+ import { d as y, u as H, P, c as K, b as A } from "../../index-z_kiwVc3.js";
6
6
  import { u as U } from "../../index-BZPx6jYI.js";
7
- import { u as q } from "../../index-CxAtPSMM.js";
7
+ import { u as q } from "../../index-Nyh2Wa71.js";
8
8
  import '../../assets/Toggle.css';var v = "Switch", [z] = A(v), [L, O] = z(v), T = m.forwardRef(
9
9
  (r, c) => {
10
10
  const {
@@ -3,11 +3,11 @@ import * as l from "react";
3
3
  import { useState as ee } from "react";
4
4
  import { c as j } from "../../clsx-OuTLNxxd.js";
5
5
  import te from "../Icon/Icon.js";
6
- import { P as F, u as oe, d as G, c as C, b as re, h as ne } from "../../index-DM51yNMI.js";
7
- import { P as le, D as ie } from "../../index-DrR82jOT.js";
8
- import { u as se } from "../../index-7CBv-Jx6.js";
9
- import { R as ae, A as ce, a as ue, c as B, C as pe } from "../../index-D34Qo5Qx.js";
10
- import { P as K } from "../../index-BymOxiM6.js";
6
+ import { P as F, u as oe, d as G, c as C, b as re, g as ne } from "../../index-z_kiwVc3.js";
7
+ import { P as le, D as ie } from "../../index-CmGGeUr0.js";
8
+ import { u as se } from "../../index-C2s_VtSb.js";
9
+ import { R as ae, A as ce, a as ue, c as B, C as pe } from "../../index-ChQc_Cm6.js";
10
+ import { P as K } from "../../index-CfIcUHKK.js";
11
11
  import '../../assets/Tooltip.css';var de = Object.freeze({
12
12
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
13
13
  position: "absolute",
@@ -31,16 +31,16 @@ import '../../assets/Tooltip.css';var de = Object.freeze({
31
31
  )
32
32
  );
33
33
  U.displayName = fe;
34
- var he = U, [D] = re("Tooltip", [
34
+ var ve = U, [D] = re("Tooltip", [
35
35
  B
36
- ]), L = B(), V = "TooltipProvider", ve = 700, A = "tooltip.open", [_e, I] = D(V), $ = (e) => {
36
+ ]), L = B(), V = "TooltipProvider", he = 700, A = "tooltip.open", [_e, I] = D(V), $ = (e) => {
37
37
  const {
38
38
  __scopeTooltip: o,
39
- delayDuration: t = ve,
39
+ delayDuration: t = he,
40
40
  skipDelayDuration: r = 300,
41
41
  disableHoverableContent: n = !1,
42
42
  children: s
43
- } = e, a = l.useRef(!0), v = l.useRef(!1), i = l.useRef(0);
43
+ } = e, a = l.useRef(!0), h = l.useRef(!1), i = l.useRef(0);
44
44
  return l.useEffect(() => {
45
45
  const p = i.current;
46
46
  return () => window.clearTimeout(p);
@@ -59,9 +59,9 @@ var he = U, [D] = re("Tooltip", [
59
59
  r
60
60
  );
61
61
  }, [r]),
62
- isPointerInTransitRef: v,
62
+ isPointerInTransitRef: h,
63
63
  onPointerInTransitChange: l.useCallback((p) => {
64
- v.current = p;
64
+ h.current = p;
65
65
  }, []),
66
66
  disableHoverableContent: n,
67
67
  children: s
@@ -77,23 +77,23 @@ var R = "Tooltip", [me, O] = D(R), Y = (e) => {
77
77
  defaultOpen: n,
78
78
  onOpenChange: s,
79
79
  disableHoverableContent: a,
80
- delayDuration: v
81
- } = e, i = I(R, e.__scopeTooltip), p = L(o), [u, h] = l.useState(null), f = se(), d = l.useRef(0), m = a ?? i.disableHoverableContent, T = v ?? i.delayDuration, _ = l.useRef(!1), [g, x] = oe({
80
+ delayDuration: h
81
+ } = e, i = I(R, e.__scopeTooltip), p = L(o), [u, v] = l.useState(null), f = se(), d = l.useRef(0), m = a ?? i.disableHoverableContent, T = h ?? i.delayDuration, _ = l.useRef(!1), [x, g] = oe({
82
82
  prop: r,
83
83
  defaultProp: n ?? !1,
84
84
  onChange: (S) => {
85
85
  S ? (i.onOpen(), document.dispatchEvent(new CustomEvent(A))) : i.onClose(), s == null || s(S);
86
86
  },
87
87
  caller: R
88
- }), w = l.useMemo(() => g ? _.current ? "delayed-open" : "instant-open" : "closed", [g]), E = l.useCallback(() => {
89
- window.clearTimeout(d.current), d.current = 0, _.current = !1, x(!0);
90
- }, [x]), P = l.useCallback(() => {
91
- window.clearTimeout(d.current), d.current = 0, x(!1);
92
- }, [x]), H = l.useCallback(() => {
88
+ }), w = l.useMemo(() => x ? _.current ? "delayed-open" : "instant-open" : "closed", [x]), E = l.useCallback(() => {
89
+ window.clearTimeout(d.current), d.current = 0, _.current = !1, g(!0);
90
+ }, [g]), P = l.useCallback(() => {
91
+ window.clearTimeout(d.current), d.current = 0, g(!1);
92
+ }, [g]), H = l.useCallback(() => {
93
93
  window.clearTimeout(d.current), d.current = window.setTimeout(() => {
94
- _.current = !0, x(!0), d.current = 0;
94
+ _.current = !0, g(!0), d.current = 0;
95
95
  }, T);
96
- }, [T, x]);
96
+ }, [T, g]);
97
97
  return l.useEffect(() => () => {
98
98
  d.current && (window.clearTimeout(d.current), d.current = 0);
99
99
  }, []), /* @__PURE__ */ c(ae, { ...p, children: /* @__PURE__ */ c(
@@ -101,10 +101,10 @@ var R = "Tooltip", [me, O] = D(R), Y = (e) => {
101
101
  {
102
102
  scope: o,
103
103
  contentId: f,
104
- open: g,
104
+ open: x,
105
105
  stateAttribute: w,
106
106
  trigger: u,
107
- onTriggerChange: h,
107
+ onTriggerChange: v,
108
108
  onTriggerEnter: l.useCallback(() => {
109
109
  i.isOpenDelayedRef.current ? H() : E();
110
110
  }, [i.isOpenDelayedRef, H, E]),
@@ -121,8 +121,8 @@ var R = "Tooltip", [me, O] = D(R), Y = (e) => {
121
121
  Y.displayName = R;
122
122
  var N = "TooltipTrigger", X = l.forwardRef(
123
123
  (e, o) => {
124
- const { __scopeTooltip: t, ...r } = e, n = O(N, t), s = I(N, t), a = L(t), v = l.useRef(null), i = G(o, v, n.onTriggerChange), p = l.useRef(!1), u = l.useRef(!1), h = l.useCallback(() => p.current = !1, []);
125
- return l.useEffect(() => () => document.removeEventListener("pointerup", h), [h]), /* @__PURE__ */ c(ce, { asChild: !0, ...a, children: /* @__PURE__ */ c(
124
+ const { __scopeTooltip: t, ...r } = e, n = O(N, t), s = I(N, t), a = L(t), h = l.useRef(null), i = G(o, h, n.onTriggerChange), p = l.useRef(!1), u = l.useRef(!1), v = l.useCallback(() => p.current = !1, []);
125
+ return l.useEffect(() => () => document.removeEventListener("pointerup", v), [v]), /* @__PURE__ */ c(ce, { asChild: !0, ...a, children: /* @__PURE__ */ c(
126
126
  F.button,
127
127
  {
128
128
  "aria-describedby": n.open ? n.contentId : void 0,
@@ -136,7 +136,7 @@ var N = "TooltipTrigger", X = l.forwardRef(
136
136
  n.onTriggerLeave(), u.current = !1;
137
137
  }),
138
138
  onPointerDown: C(e.onPointerDown, () => {
139
- n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", h, { once: !0 });
139
+ n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", v, { once: !0 });
140
140
  }),
141
141
  onFocus: C(e.onFocus, () => {
142
142
  p.current || n.onOpen();
@@ -158,17 +158,17 @@ q.displayName = M;
158
158
  var b = "TooltipContent", W = l.forwardRef(
159
159
  (e, o) => {
160
160
  const t = ye(b, e.__scopeTooltip), { forceMount: r = t.forceMount, side: n = "top", ...s } = e, a = O(b, e.__scopeTooltip);
161
- return /* @__PURE__ */ c(K, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(z, { side: n, ...s, ref: o }) : /* @__PURE__ */ c(xe, { side: n, ...s, ref: o }) });
161
+ return /* @__PURE__ */ c(K, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(z, { side: n, ...s, ref: o }) : /* @__PURE__ */ c(ge, { side: n, ...s, ref: o }) });
162
162
  }
163
- ), xe = l.forwardRef((e, o) => {
164
- const t = O(b, e.__scopeTooltip), r = I(b, e.__scopeTooltip), n = l.useRef(null), s = G(o, n), [a, v] = l.useState(null), { trigger: i, onClose: p } = t, u = n.current, { onPointerInTransitChange: h } = r, f = l.useCallback(() => {
165
- v(null), h(!1);
166
- }, [h]), d = l.useCallback(
163
+ ), ge = l.forwardRef((e, o) => {
164
+ const t = O(b, e.__scopeTooltip), r = I(b, e.__scopeTooltip), n = l.useRef(null), s = G(o, n), [a, h] = l.useState(null), { trigger: i, onClose: p } = t, u = n.current, { onPointerInTransitChange: v } = r, f = l.useCallback(() => {
165
+ h(null), v(!1);
166
+ }, [v]), d = l.useCallback(
167
167
  (m, T) => {
168
- const _ = m.currentTarget, g = { x: m.clientX, y: m.clientY }, x = we(g, _.getBoundingClientRect()), w = Ee(g, x), E = Pe(T.getBoundingClientRect()), P = Oe([...w, ...E]);
169
- v(P), h(!0);
168
+ const _ = m.currentTarget, x = { x: m.clientX, y: m.clientY }, g = we(x, _.getBoundingClientRect()), w = Ee(x, g), E = Pe(T.getBoundingClientRect()), P = Oe([...w, ...E]);
169
+ h(P), v(!0);
170
170
  },
171
- [h]
171
+ [v]
172
172
  );
173
173
  return l.useEffect(() => () => f(), [f]), l.useEffect(() => {
174
174
  if (i && u) {
@@ -180,13 +180,13 @@ var b = "TooltipContent", W = l.forwardRef(
180
180
  }, [i, u, d, f]), l.useEffect(() => {
181
181
  if (a) {
182
182
  const m = (T) => {
183
- const _ = T.target, g = { x: T.clientX, y: T.clientY }, x = (i == null ? void 0 : i.contains(_)) || (u == null ? void 0 : u.contains(_)), w = !Re(g, a);
184
- x ? f() : w && (f(), p());
183
+ const _ = T.target, x = { x: T.clientX, y: T.clientY }, g = (i == null ? void 0 : i.contains(_)) || (u == null ? void 0 : u.contains(_)), w = !Re(x, a);
184
+ g ? f() : w && (f(), p());
185
185
  };
186
186
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
187
187
  }
188
188
  }, [i, u, a, p, f]), /* @__PURE__ */ c(z, { ...e, ref: s });
189
- }), [ge, Ce] = D(R, { isInside: !1 }), be = ne("TooltipContent"), z = l.forwardRef(
189
+ }), [xe, Ce] = D(R, { isInside: !1 }), be = ne("TooltipContent"), z = l.forwardRef(
190
190
  (e, o) => {
191
191
  const {
192
192
  __scopeTooltip: t,
@@ -194,15 +194,15 @@ var b = "TooltipContent", W = l.forwardRef(
194
194
  "aria-label": n,
195
195
  onEscapeKeyDown: s,
196
196
  onPointerDownOutside: a,
197
- ...v
197
+ ...h
198
198
  } = e, i = O(b, t), p = L(t), { onClose: u } = i;
199
199
  return l.useEffect(() => (document.addEventListener(A, u), () => document.removeEventListener(A, u)), [u]), l.useEffect(() => {
200
200
  if (i.trigger) {
201
- const h = (f) => {
201
+ const v = (f) => {
202
202
  const d = f.target;
203
203
  d != null && d.contains(i.trigger) && u();
204
204
  };
205
- return window.addEventListener("scroll", h, { capture: !0 }), () => window.removeEventListener("scroll", h, { capture: !0 });
205
+ return window.addEventListener("scroll", v, { capture: !0 }), () => window.removeEventListener("scroll", v, { capture: !0 });
206
206
  }
207
207
  }, [i.trigger, u]), /* @__PURE__ */ c(
208
208
  ie,
@@ -211,17 +211,17 @@ var b = "TooltipContent", W = l.forwardRef(
211
211
  disableOutsidePointerEvents: !1,
212
212
  onEscapeKeyDown: s,
213
213
  onPointerDownOutside: a,
214
- onFocusOutside: (h) => h.preventDefault(),
214
+ onFocusOutside: (v) => v.preventDefault(),
215
215
  onDismiss: u,
216
216
  children: /* @__PURE__ */ k(
217
217
  pe,
218
218
  {
219
219
  "data-state": i.stateAttribute,
220
220
  ...p,
221
- ...v,
221
+ ...h,
222
222
  ref: o,
223
223
  style: {
224
- ...v.style,
224
+ ...h.style,
225
225
  "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
226
226
  "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
227
227
  "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
@@ -230,7 +230,7 @@ var b = "TooltipContent", W = l.forwardRef(
230
230
  },
231
231
  children: [
232
232
  /* @__PURE__ */ c(be, { children: r }),
233
- /* @__PURE__ */ c(ge, { scope: t, isInside: !0, children: /* @__PURE__ */ c(he, { id: i.contentId, role: "tooltip", children: n || r }) })
233
+ /* @__PURE__ */ c(xe, { scope: t, isInside: !0, children: /* @__PURE__ */ c(ve, { id: i.contentId, role: "tooltip", children: n || r }) })
234
234
  ]
235
235
  }
236
236
  )
@@ -307,8 +307,8 @@ function Re(e, o) {
307
307
  const { x: t, y: r } = e;
308
308
  let n = !1;
309
309
  for (let s = 0, a = o.length - 1; s < o.length; a = s++) {
310
- const v = o[s], i = o[a], p = v.x, u = v.y, h = i.x, f = i.y;
311
- u > r != f > r && t < (h - p) * (r - u) / (f - u) + p && (n = !n);
310
+ const h = o[s], i = o[a], p = h.x, u = h.y, v = i.x, f = i.y;
311
+ u > r != f > r && t < (v - p) * (r - u) / (f - u) + p && (n = !n);
312
312
  }
313
313
  return n;
314
314
  }
@@ -367,12 +367,12 @@ function Xe({
367
367
  theme: n = "dark",
368
368
  tipSide: s = "top",
369
369
  tipAlignment: a = "center",
370
- keepVisible: v = !1,
370
+ keepVisible: h = !1,
371
371
  startVisible: i = !1,
372
372
  onClose: p,
373
373
  className: u
374
374
  }) {
375
- const [h, f] = ee(i);
375
+ const [v, f] = ee(i);
376
376
  if (t)
377
377
  return /* @__PURE__ */ c(Z, { children: e });
378
378
  const d = () => {
@@ -380,8 +380,8 @@ function Xe({
380
380
  }, m = (_) => {
381
381
  _.key === "Escape" && f(!1);
382
382
  };
383
- return /* @__PURE__ */ c(Le, { children: /* @__PURE__ */ c(ke, { defaultOpen: i, open: h, onOpenChange: (_) => {
384
- if (v)
383
+ return /* @__PURE__ */ c(Le, { children: /* @__PURE__ */ c(ke, { defaultOpen: i, open: v, onOpenChange: (_) => {
384
+ if (h)
385
385
  return f(!0);
386
386
  f(_), _ || p == null || p();
387
387
  }, children: /* @__PURE__ */ k("div", { className: j(y["tooltip-container"], u), children: [
@@ -394,7 +394,7 @@ function Xe({
394
394
  zIndex: 9999
395
395
  }, align: a, side: s, sideOffset: 0, children: /* @__PURE__ */ k("div", { id: "tooltip", role: "tooltip", className: j(y.tooltip, y[`tooltip-${r}`], y[`tooltip-${n}`], y[`tooltip-${s}`], y[`tooltip-${a}`], p && y.closable), children: [
396
396
  /* @__PURE__ */ c("div", { className: y["tooltip-content"], children: o }),
397
- (p || v) && r === "md" && /* @__PURE__ */ c("button", { className: y["tooltip-close-button"], onClick: d, children: /* @__PURE__ */ c(te, { icon: "ap-icon-close", className: y["tooltip-close-icon"] }) }),
397
+ (p || h) && r === "md" && /* @__PURE__ */ c("button", { className: y["tooltip-close-button"], onClick: d, children: /* @__PURE__ */ c(te, { icon: "ap-icon-close", className: y["tooltip-close-icon"] }) }),
398
398
  /* @__PURE__ */ c(Me, { width: 12, height: 6, className: y["tooltip-arrow"] })
399
399
  ] }) }) })
400
400
  ] }) }) });
@@ -1,11 +1,11 @@
1
1
  import * as e from "react";
2
- import { i as o } from "./index-DM51yNMI.js";
2
+ import { h as o } from "./index-z_kiwVc3.js";
3
3
  var n = e[" useId ".trim().toString()] || (() => {
4
- }), i = 0;
4
+ }), a = 0;
5
5
  function f(r) {
6
6
  const [t, s] = e.useState(n());
7
7
  return o(() => {
8
- s((u) => u ?? String(i++));
8
+ s((u) => u ?? String(a++));
9
9
  }, [r]), t ? `radix-${t}` : "";
10
10
  }
11
11
  function c(r) {
@@ -1,8 +1,8 @@
1
1
  import * as i from "react";
2
2
  import g from "react";
3
- import { b as L, d as P, f as G, P as K, c as A, u as $ } from "./index-DM51yNMI.js";
3
+ import { b as L, d as P, e as G, P as K, c as A, u as $ } from "./index-z_kiwVc3.js";
4
4
  import { jsx as m } from "react/jsx-runtime";
5
- import { u as J, a as Q } from "./index-7CBv-Jx6.js";
5
+ import { u as J, a as Q } from "./index-C2s_VtSb.js";
6
6
  function W(e) {
7
7
  const o = e + "CollectionProvider", [u, n] = L(o), [_, v] = u(
8
8
  o,
@@ -1,10 +1,10 @@
1
1
  import * as i from "react";
2
- import { u as G, d as O, P as _, c as P, b as H, f as K } from "./index-DM51yNMI.js";
3
- import { P as $, D as j } from "./index-DrR82jOT.js";
4
- import { h as U, R as V, u as W, F as Z } from "./index-Chv2KjIL.js";
5
- import { u as q } from "./index-7CBv-Jx6.js";
6
- import { R as z, A as x, c as w, C as B, a as J } from "./index-D34Qo5Qx.js";
7
- import { P as E } from "./index-BymOxiM6.js";
2
+ import { u as G, d as O, P as _, c as P, b as H, e as K } from "./index-z_kiwVc3.js";
3
+ import { P as $, D as j } from "./index-CmGGeUr0.js";
4
+ import { h as U, R as V, u as W, F as Z } from "./index-CFqDEbIR.js";
5
+ import { u as q } from "./index-C2s_VtSb.js";
6
+ import { R as z, A as x, c as w, C as B, a as J } from "./index-ChQc_Cm6.js";
7
+ import { P as E } from "./index-CfIcUHKK.js";
8
8
  import { jsx as p } from "react/jsx-runtime";
9
9
  var m = "Popover", [b] = H(m, [
10
10
  w
@@ -1,9 +1,9 @@
1
1
  import * as s from "react";
2
- import { d as P, c as C, u as B, P as b, b as _ } from "./index-DM51yNMI.js";
3
- import { I as q, u as K, R as T, c as w } from "./index-DEphED6n.js";
4
- import { u as U } from "./index-CxAtPSMM.js";
2
+ import { d as P, c as C, u as B, P as b, b as _ } from "./index-z_kiwVc3.js";
3
+ import { I as q, u as K, R as T, c as w } from "./index-C8H9A55g.js";
4
+ import { u as U } from "./index-Nyh2Wa71.js";
5
5
  import { u as V } from "./index-BZPx6jYI.js";
6
- import { P as j } from "./index-BymOxiM6.js";
6
+ import { P as j } from "./index-CfIcUHKK.js";
7
7
  import { jsx as p, jsxs as z } from "react/jsx-runtime";
8
8
  var E = "Radio", [H, g] = _(E), [W, X] = H(E), k = s.forwardRef(
9
9
  (a, d) => {
@@ -1,7 +1,7 @@
1
1
  import * as u from "react";
2
2
  import { useState as ge } from "react";
3
- import { d as ye, P as be } from "./index-DM51yNMI.js";
4
- import { a as q } from "./index-7CBv-Jx6.js";
3
+ import { d as ye, P as be } from "./index-z_kiwVc3.js";
4
+ import { a as q } from "./index-C2s_VtSb.js";
5
5
  import { jsx as Ee } from "react/jsx-runtime";
6
6
  var _ = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", Q = { bubbles: !1, cancelable: !0 }, Se = "FocusScope", we = u.forwardRef((e, t) => {
7
7
  const {
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { d as T, i as A } from "./index-DM51yNMI.js";
2
+ import { d as T, h as A } from "./index-z_kiwVc3.js";
3
3
  function E(n, e) {
4
4
  return a.useReducer((r, t) => e[r][t] ?? r, n);
5
5
  }
@@ -1,10 +1,10 @@
1
1
  import * as O from "react";
2
2
  import { useLayoutEffect as Se } from "react";
3
3
  import * as Ee from "react-dom";
4
- import { P as At, d as Kt, b as Le, i as Ht } from "./index-DM51yNMI.js";
4
+ import { P as At, d as Kt, b as Le, h as Ht } from "./index-z_kiwVc3.js";
5
5
  import { jsx as j } from "react/jsx-runtime";
6
- import { a as De } from "./index-7CBv-Jx6.js";
7
- import { u as Me } from "./index-CxAtPSMM.js";
6
+ import { a as De } from "./index-C2s_VtSb.js";
7
+ import { u as Me } from "./index-Nyh2Wa71.js";
8
8
  const Te = ["top", "right", "bottom", "left"], Z = Math.min, W = Math.max, at = Math.round, ct = Math.floor, I = (t) => ({
9
9
  x: t,
10
10
  y: t
@@ -1,6 +1,6 @@
1
1
  import * as i from "react";
2
- import { d as T, P as b, c as h, e as I, i as M } from "./index-DM51yNMI.js";
3
- import { a as m } from "./index-7CBv-Jx6.js";
2
+ import { d as T, P as b, c as h, i as I, h as M } from "./index-z_kiwVc3.js";
3
+ import { a as m } from "./index-C2s_VtSb.js";
4
4
  import { jsx as P } from "react/jsx-runtime";
5
5
  import U from "react-dom";
6
6
  function z(r, e = globalThis == null ? void 0 : globalThis.document) {