@studiolxd/brand 46.0.0 → 47.0.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 (60) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/dist/_shared/portal-container.js +9 -0
  3. package/dist/_types/atoms/AsyncMultiSelect/AsyncMultiSelect.d.ts +8 -7
  4. package/dist/_types/atoms/AsyncSelect/AsyncSelect.d.ts +8 -6
  5. package/dist/_types/atoms/InputPhone/InputPhone.d.ts +8 -5
  6. package/dist/_types/atoms/MenuButton/MenuButton.d.ts +22 -2
  7. package/dist/_types/atoms/MultiSelect/MultiSelect.d.ts +8 -6
  8. package/dist/_types/atoms/Popover/Popover.d.ts +8 -1
  9. package/dist/_types/atoms/Select/Select.d.ts +8 -7
  10. package/dist/_types/atoms/Tooltip/Tooltip.d.ts +7 -0
  11. package/dist/_types/constants/portal-container.d.ts +42 -0
  12. package/dist/_types/messages/BrandMessages.d.ts +29 -1
  13. package/dist/_types/messages/index.d.ts +1 -1
  14. package/dist/_types/molecules/Breadcrumb/Breadcrumb.d.ts +10 -2
  15. package/dist/_types/molecules/Menu/Menu.d.ts +8 -1
  16. package/dist/_types/molecules/Modal/Modal.d.ts +8 -6
  17. package/dist/_types/molecules/OrgSwitcher/OrgSwitcher.d.ts +15 -1
  18. package/dist/_types/molecules/PrevNextNav/PrevNextNav.d.ts +17 -2
  19. package/dist/_types/molecules/Sheet/Sheet.d.ts +8 -7
  20. package/dist/_types/molecules/SidebarNav/SidebarNav.d.ts +18 -3
  21. package/dist/_types/molecules/SiteNav/SiteNav.d.ts +9 -0
  22. package/dist/_types/molecules/TableOfContents/TableOfContents.d.ts +11 -2
  23. package/dist/_types/molecules/UserMenu/UserMenu.d.ts +16 -1
  24. package/dist/_types/sections/AppHeader/AppHeader.d.ts +8 -2
  25. package/dist/_types/sections/AppRoot/AppRoot.d.ts +12 -1
  26. package/dist/_types/sections/AppShell/AppShell.d.ts +14 -1
  27. package/dist/_types/sections/Sidebar/Sidebar.d.ts +27 -3
  28. package/dist/_types/sections/SiteHeader/SiteHeader.d.ts +22 -3
  29. package/dist/_types/sections/SiteShell/SiteShell.d.ts +11 -5
  30. package/dist/_types/templates/OnboardingShell/OnboardingShell.d.ts +19 -2
  31. package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +42 -6
  32. package/dist/app-header.js +1 -1
  33. package/dist/app-launcher.js +62 -58
  34. package/dist/app-root.js +10 -8
  35. package/dist/app-shell.js +51 -50
  36. package/dist/async-multi-select.js +65 -64
  37. package/dist/async-select.js +49 -48
  38. package/dist/breadcrumb.js +24 -21
  39. package/dist/input-phone.js +38 -37
  40. package/dist/menu-button.js +16 -14
  41. package/dist/menu.js +44 -40
  42. package/dist/modal.js +32 -31
  43. package/dist/multi-select.js +106 -105
  44. package/dist/onboarding-shell.js +36 -35
  45. package/dist/org-switcher.js +64 -59
  46. package/dist/popover.js +27 -22
  47. package/dist/prev-next-nav.js +38 -36
  48. package/dist/public-page-shell.js +24 -20
  49. package/dist/select.js +70 -69
  50. package/dist/sheet.js +30 -29
  51. package/dist/sidebar-nav.js +91 -90
  52. package/dist/sidebar.js +72 -71
  53. package/dist/site-header.js +44 -43
  54. package/dist/site-nav.js +27 -25
  55. package/dist/site-shell.js +23 -15
  56. package/dist/table-of-contents.js +30 -27
  57. package/dist/toaster.js +57 -53
  58. package/dist/tooltip.js +45 -41
  59. package/dist/user-menu.js +58 -52
  60. package/package.json +1 -1
@@ -1,39 +1,41 @@
1
+ 'use client';
1
2
  import './prev-next-nav.css';
2
- import { Icon as e } from "./icon.js";
3
- import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
6
  //#region src/stories/molecules/PrevNextNav/PrevNextNav.tsx
5
- function i({ href: i, onClick: a, label: o, title: s, disabled: c, direction: l, chevronSize: u, linkComponent: d }) {
7
+ function a({ href: e, onClick: a, label: o, title: s, disabled: c, direction: l, chevronSize: u, linkComponent: d }) {
6
8
  let f = [
7
9
  "prev-next-nav__btn",
8
10
  `prev-next-nav__btn--${l}`,
9
11
  s ? "prev-next-nav__btn--titled" : "",
10
12
  c ? "prev-next-nav__btn--disabled" : ""
11
- ].filter(Boolean).join(" "), p = /* @__PURE__ */ n(e, {
13
+ ].filter(Boolean).join(" "), p = /* @__PURE__ */ r(t, {
12
14
  name: "chevron",
13
15
  size: u
14
- }), m = s ? /* @__PURE__ */ r(t, { children: [p, /* @__PURE__ */ r("span", {
16
+ }), m = s ? /* @__PURE__ */ i(n, { children: [p, /* @__PURE__ */ i("span", {
15
17
  className: "prev-next-nav__text",
16
- children: [/* @__PURE__ */ n("span", {
18
+ children: [/* @__PURE__ */ r("span", {
17
19
  className: "prev-next-nav__eyebrow",
18
20
  children: o
19
- }), /* @__PURE__ */ n("span", {
21
+ }), /* @__PURE__ */ r("span", {
20
22
  className: "prev-next-nav__title",
21
23
  children: s
22
24
  })]
23
25
  })] }) : p, h = s ? void 0 : o;
24
- return c ? /* @__PURE__ */ n("button", {
26
+ return c ? /* @__PURE__ */ r("button", {
25
27
  type: "button",
26
28
  className: f,
27
29
  "aria-label": h,
28
30
  disabled: !0,
29
31
  children: m
30
- }) : i ? /* @__PURE__ */ n(d ?? "a", {
31
- href: i,
32
+ }) : e ? /* @__PURE__ */ r(d ?? "a", {
33
+ href: e,
32
34
  className: f,
33
35
  "aria-label": h,
34
36
  onClick: a,
35
37
  children: m
36
- }) : /* @__PURE__ */ n("button", {
38
+ }) : /* @__PURE__ */ r("button", {
37
39
  type: "button",
38
40
  className: f,
39
41
  "aria-label": h,
@@ -41,42 +43,42 @@ function i({ href: i, onClick: a, label: o, title: s, disabled: c, direction: l,
41
43
  children: m
42
44
  });
43
45
  }
44
- function a({ prevHref: e, nextHref: t, prevOnClick: a, nextOnClick: o, prevLabel: s = "Anterior", nextLabel: c = "Siguiente", prevTitle: l, nextTitle: u, label: d, labelId: f, linkComponent: p, size: m = "md" }) {
45
- let h = m === "sm" ? "sm" : "md";
46
- return /* @__PURE__ */ r("div", {
46
+ function o({ prevHref: t, nextHref: n, prevOnClick: o, nextOnClick: s, prevLabel: c, nextLabel: l, prevTitle: u, nextTitle: d, label: f, labelId: p, linkComponent: m, size: h = "md" }) {
47
+ let g = e("prevNextNav"), _ = h === "sm" ? "sm" : "md";
48
+ return /* @__PURE__ */ i("div", {
47
49
  className: [
48
50
  "prev-next-nav",
49
- m === "sm" ? "prev-next-nav--sm" : "",
50
- l !== void 0 || u !== void 0 ? "prev-next-nav--titled" : ""
51
+ h === "sm" ? "prev-next-nav--sm" : "",
52
+ u !== void 0 || d !== void 0 ? "prev-next-nav--titled" : ""
51
53
  ].filter(Boolean).join(" "),
52
54
  children: [
53
- /* @__PURE__ */ n(i, {
54
- href: e,
55
- onClick: a,
56
- label: s,
57
- disabled: !e && !a,
55
+ /* @__PURE__ */ r(a, {
56
+ href: t,
57
+ onClick: o,
58
+ label: g("previous", c),
59
+ disabled: !t && !o,
58
60
  direction: "prev",
59
- title: l,
60
- chevronSize: h,
61
- linkComponent: p
61
+ title: u,
62
+ chevronSize: _,
63
+ linkComponent: m
62
64
  }),
63
- d !== void 0 && /* @__PURE__ */ n("strong", {
64
- id: f,
65
+ f !== void 0 && /* @__PURE__ */ r("strong", {
66
+ id: p,
65
67
  className: "prev-next-nav__label",
66
- children: d
68
+ children: f
67
69
  }),
68
- /* @__PURE__ */ n(i, {
69
- href: t,
70
- onClick: o,
71
- label: c,
72
- disabled: !t && !o,
70
+ /* @__PURE__ */ r(a, {
71
+ href: n,
72
+ onClick: s,
73
+ label: g("next", l),
74
+ disabled: !n && !s,
73
75
  direction: "next",
74
- title: u,
75
- chevronSize: h,
76
- linkComponent: p
76
+ title: d,
77
+ chevronSize: _,
78
+ linkComponent: m
77
79
  })
78
80
  ]
79
81
  });
80
82
  }
81
83
  //#endregion
82
- export { a as PrevNextNav };
84
+ export { o as PrevNextNav };
@@ -1,34 +1,38 @@
1
1
  'use client';
2
2
  import './public-page-shell.css';
3
- import { Container as e } from "./container.js";
4
- import { ErrorBoundary as t } from "./error-boundary.js";
5
- import { SiteShell as n } from "./site-shell.js";
6
- import { forwardRef as r } from "react";
7
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Container as t } from "./container.js";
5
+ import { ErrorBoundary as n } from "./error-boundary.js";
6
+ import { SiteShell as r } from "./site-shell.js";
7
+ import { forwardRef as i } from "react";
8
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
8
9
  //#region src/stories/templates/PublicPageShell/PublicPageShell.tsx
9
- var s = r(function({ children: r, header: s, footer: c, preferences: l, preferencesLabel: u = "Preferencias", id: d = "main-content", shell: f = !0 }, p) {
10
- if (!f) return /* @__PURE__ */ a(i, { children: r });
11
- let m = l && /* @__PURE__ */ a(e, {
10
+ var c = i(function({ children: i, header: c, footer: l, preferences: u, preferencesLabel: d, mainWidth: f = "xl", mainSpace: p = "xl", mainFlush: m = !1, id: h = "main-content", shell: g = !0 }, _) {
11
+ let v = e("publicPageShell");
12
+ if (!g) return /* @__PURE__ */ o(a, { children: i });
13
+ let y = u && /* @__PURE__ */ o(t, {
12
14
  as: "section",
13
15
  className: "public-page-shell__preferences",
14
- "aria-label": u,
15
- children: /* @__PURE__ */ a("div", {
16
+ "aria-label": v("preferences", d),
17
+ children: /* @__PURE__ */ o("div", {
16
18
  className: "public-page-shell__preferences-row",
17
- children: l
19
+ children: u
18
20
  })
19
21
  });
20
- return /* @__PURE__ */ a(n, {
21
- ref: p,
22
- header: s && /* @__PURE__ */ a(t, { children: s }),
23
- footer: (m || c) && /* @__PURE__ */ o(i, { children: [m && /* @__PURE__ */ a(t, { children: m }), c && /* @__PURE__ */ a(t, { children: c })] }),
24
- children: /* @__PURE__ */ a(e, {
22
+ return /* @__PURE__ */ o(r, {
23
+ ref: _,
24
+ header: c && /* @__PURE__ */ o(n, { children: c }),
25
+ footer: (y || l) && /* @__PURE__ */ s(a, { children: [y && /* @__PURE__ */ o(n, { children: y }), l && /* @__PURE__ */ o(n, { children: l })] }),
26
+ children: /* @__PURE__ */ o(t, {
25
27
  as: "main",
26
- id: d,
28
+ id: h,
27
29
  tabIndex: -1,
28
- space: "xl",
29
- children: r
30
+ width: f,
31
+ space: p,
32
+ flush: m,
33
+ children: i
30
34
  })
31
35
  });
32
36
  });
33
37
  //#endregion
34
- export { s as PublicPageShell };
38
+ export { c as PublicPageShell };
package/dist/select.js CHANGED
@@ -2,158 +2,159 @@
2
2
  import './select.css';
3
3
  import { n as e } from "./_shared/brandmessagescontext.js";
4
4
  import { Icon as t } from "./icon.js";
5
- import { Children as n, createContext as r, forwardRef as i, isValidElement as a, useContext as o, useMemo as s } from "react";
6
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import { Select as d } from "@base-ui/react/select";
5
+ import { n } from "./_shared/portal-container.js";
6
+ import { Children as r, createContext as i, forwardRef as a, isValidElement as o, useContext as s, useMemo as c } from "react";
7
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { Select as f } from "@base-ui/react/select";
8
9
  //#region src/stories/atoms/Select/Select.tsx
9
- function f(e) {
10
+ function p(e) {
10
11
  return Array.isArray(e.options);
11
12
  }
12
- var p = r(null);
13
- function m(e, t) {
14
- n.forEach(e, (e) => {
15
- if (!a(e)) return;
13
+ var m = i(null);
14
+ function h(e, t) {
15
+ r.forEach(e, (e) => {
16
+ if (!o(e)) return;
16
17
  let n = e.props ?? {};
17
- if (e.type === b || typeof n.value == "string" && e.type !== h) {
18
+ if (e.type === x || typeof n.value == "string" && e.type !== g) {
18
19
  typeof n.value == "string" && t.set(n.value, n.children);
19
20
  return;
20
21
  }
21
- n.children != null && m(n.children, t);
22
+ n.children != null && h(n.children, t);
22
23
  });
23
24
  }
24
- function h({ children: e, onValueChange: t, ...n }) {
25
- let r = s(() => {
25
+ function g({ children: e, onValueChange: t, ...n }) {
26
+ let r = c(() => {
26
27
  let t = /* @__PURE__ */ new Map();
27
- return m(e, t), t;
28
+ return h(e, t), t;
28
29
  }, [e]);
29
- return /* @__PURE__ */ l(p.Provider, {
30
+ return /* @__PURE__ */ u(m.Provider, {
30
31
  value: r,
31
- children: /* @__PURE__ */ l(d.Root, {
32
+ children: /* @__PURE__ */ u(f.Root, {
32
33
  onValueChange: t ? (e) => t(e) : void 0,
33
34
  ...n,
34
35
  children: e
35
36
  })
36
37
  });
37
38
  }
38
- var g = i(function({ placeholder: e, children: t, ...n }, r) {
39
- let i = o(p);
40
- return /* @__PURE__ */ l(d.Value, {
39
+ var _ = a(function({ placeholder: e, children: t, ...n }, r) {
40
+ let i = s(m);
41
+ return /* @__PURE__ */ u(f.Value, {
41
42
  ref: r,
42
43
  ...n,
43
44
  children: (n) => typeof t == "function" ? t(n) : t ?? (n == null || n === "" ? e ?? null : i?.get(n) ?? n)
44
45
  });
45
- }), _ = i(function({ className: e, children: t, ...n }, r) {
46
+ }), v = a(function({ className: e, children: t, ...n }, r) {
46
47
  let i = ["select__group", e ?? ""].filter(Boolean).join(" ");
47
- return /* @__PURE__ */ l(d.Group, {
48
+ return /* @__PURE__ */ u(f.Group, {
48
49
  ref: r,
49
50
  className: i,
50
51
  ...n,
51
52
  children: t
52
53
  });
53
- }), v = i(function({ size: e = "md", className: n, children: r, ...i }, a) {
54
+ }), y = a(function({ size: e = "md", className: n, children: r, ...i }, a) {
54
55
  let o = [
55
56
  "select",
56
57
  e === "md" ? "" : `select--${e}`,
57
58
  n ?? ""
58
59
  ].filter(Boolean).join(" ");
59
- return /* @__PURE__ */ u(d.Trigger, {
60
+ return /* @__PURE__ */ d(f.Trigger, {
60
61
  ref: a,
61
62
  className: o,
62
63
  ...i,
63
- children: [r, /* @__PURE__ */ l(t, {
64
+ children: [r, /* @__PURE__ */ u(t, {
64
65
  name: "chevron",
65
66
  className: "select__icon"
66
67
  })]
67
68
  });
68
- }), y = i(function({ size: e = "md", container: t, className: n, children: r, side: i = "bottom", align: a = "start", sideOffset: o = -1, ...s }, c) {
69
- let u = [
69
+ }), b = a(function({ size: e = "md", container: t, className: r, children: i, side: a = "bottom", align: o = "start", sideOffset: s = -1, ...c }, l) {
70
+ let d = n(t), p = [
70
71
  "select__content",
71
72
  e === "md" ? "" : `select__content--${e}`,
72
- n ?? ""
73
+ r ?? ""
73
74
  ].filter(Boolean).join(" ");
74
- return /* @__PURE__ */ l(d.Portal, {
75
- container: t,
76
- children: /* @__PURE__ */ l(d.Positioner, {
75
+ return /* @__PURE__ */ u(f.Portal, {
76
+ container: d,
77
+ children: /* @__PURE__ */ u(f.Positioner, {
77
78
  className: "select__positioner",
78
- side: i,
79
- align: a,
80
- sideOffset: o,
79
+ side: a,
80
+ align: o,
81
+ sideOffset: s,
81
82
  alignItemWithTrigger: !1,
82
- children: /* @__PURE__ */ l(d.Popup, {
83
- ref: c,
84
- className: u,
85
- ...s,
86
- children: r
83
+ children: /* @__PURE__ */ u(f.Popup, {
84
+ ref: l,
85
+ className: p,
86
+ ...c,
87
+ children: i
87
88
  })
88
89
  })
89
90
  });
90
- }), b = i(function({ className: e, children: t, ...n }, r) {
91
+ }), x = a(function({ className: e, children: t, ...n }, r) {
91
92
  let i = ["select__item", e ?? ""].filter(Boolean).join(" ");
92
- return /* @__PURE__ */ l(d.Item, {
93
+ return /* @__PURE__ */ u(f.Item, {
93
94
  ref: r,
94
95
  className: i,
95
96
  ...n,
96
- children: /* @__PURE__ */ l(d.ItemText, { children: t })
97
+ children: /* @__PURE__ */ u(f.ItemText, { children: t })
97
98
  });
98
- }), x = i(function({ className: e, children: t, ...n }, r) {
99
+ }), S = a(function({ className: e, children: t, ...n }, r) {
99
100
  let i = ["select__label", e ?? ""].filter(Boolean).join(" ");
100
- return /* @__PURE__ */ l(d.GroupLabel, {
101
+ return /* @__PURE__ */ u(f.GroupLabel, {
101
102
  ref: r,
102
103
  className: i,
103
104
  ...n,
104
105
  children: t
105
106
  });
106
- }), S = i(function({ className: e, ...t }, n) {
107
+ }), C = a(function({ className: e, ...t }, n) {
107
108
  let r = ["select__separator", e ?? ""].filter(Boolean).join(" ");
108
- return /* @__PURE__ */ l(d.Separator, {
109
+ return /* @__PURE__ */ u(f.Separator, {
109
110
  ref: n,
110
111
  className: r,
111
112
  ...t
112
113
  });
113
114
  });
114
- function C({ value: e, label: t, "aria-label": n }) {
115
- return /* @__PURE__ */ l(b, {
115
+ function w({ value: e, label: t, "aria-label": n }) {
116
+ return /* @__PURE__ */ u(x, {
116
117
  value: e,
117
118
  "aria-label": n,
118
119
  children: t
119
120
  }, e);
120
121
  }
121
- function w({ override: t }) {
122
- return /* @__PURE__ */ l(c, { children: e("select")("placeholder", t) });
122
+ function T({ override: t }) {
123
+ return /* @__PURE__ */ u(l, { children: e("select")("placeholder", t) });
123
124
  }
124
- var T = i(function({ options: e, value: t, defaultValue: n, placeholder: r, disabled: i, readOnly: a, size: o = "md", onValueChange: s, id: c, name: d, required: p, onBlur: m, "aria-label": b, "aria-describedby": S, "aria-invalid": T, container: E }, D) {
125
- return /* @__PURE__ */ u(h, {
125
+ var E = a(function({ options: e, value: t, defaultValue: n, placeholder: r, disabled: i, readOnly: a, size: o = "md", onValueChange: s, id: c, name: l, required: f, onBlur: m, "aria-label": h, "aria-describedby": x, "aria-invalid": C, container: E }, D) {
126
+ return /* @__PURE__ */ d(g, {
126
127
  value: t,
127
128
  defaultValue: n,
128
129
  disabled: i,
129
130
  readOnly: a,
130
- name: d,
131
- required: p,
131
+ name: l,
132
+ required: f,
132
133
  onValueChange: s,
133
- children: [/* @__PURE__ */ l(v, {
134
+ children: [/* @__PURE__ */ u(y, {
134
135
  ref: D,
135
136
  size: o,
136
137
  id: c,
137
138
  onBlur: m,
138
- "aria-label": b,
139
- "aria-describedby": S,
140
- "aria-invalid": T || void 0,
141
- children: /* @__PURE__ */ l(g, { placeholder: /* @__PURE__ */ l(w, { override: r }) })
142
- }), /* @__PURE__ */ l(y, {
139
+ "aria-label": h,
140
+ "aria-describedby": x,
141
+ "aria-invalid": C || void 0,
142
+ children: /* @__PURE__ */ u(_, { placeholder: /* @__PURE__ */ u(T, { override: r }) })
143
+ }), /* @__PURE__ */ u(b, {
143
144
  size: o,
144
145
  container: E,
145
- children: e.map((e, t) => f(e) ? /* @__PURE__ */ u(_, { children: [/* @__PURE__ */ l(x, { children: e.label }), e.options.map(C)] }, `group-${t}`) : C(e))
146
+ children: e.map((e, t) => p(e) ? /* @__PURE__ */ d(v, { children: [/* @__PURE__ */ u(S, { children: e.label }), e.options.map(w)] }, `group-${t}`) : w(e))
146
147
  })]
147
148
  });
148
- }), E = Object.assign(T, {
149
- Root: h,
150
- Trigger: v,
151
- Value: g,
152
- Content: y,
153
- Group: _,
154
- Label: x,
155
- Item: b,
156
- Separator: S
149
+ }), D = Object.assign(E, {
150
+ Root: g,
151
+ Trigger: y,
152
+ Value: _,
153
+ Content: b,
154
+ Group: v,
155
+ Label: S,
156
+ Item: x,
157
+ Separator: C
157
158
  });
158
159
  //#endregion
159
- export { E as Select, y as SelectContent, _ as SelectGroup, b as SelectItem, x as SelectLabel, h as SelectRoot, S as SelectSeparator, v as SelectTrigger, g as SelectValue, f as isSelectOptionGroup };
160
+ export { D as Select, b as SelectContent, v as SelectGroup, x as SelectItem, S as SelectLabel, g as SelectRoot, C as SelectSeparator, y as SelectTrigger, _ as SelectValue, p as isSelectOptionGroup };
package/dist/sheet.js CHANGED
@@ -2,54 +2,55 @@
2
2
  import './sheet.css';
3
3
  import { n as e } from "./_shared/brandmessagescontext.js";
4
4
  import { VisuallyHidden as t } from "./visually-hidden.js";
5
- import { CloseButton as n } from "./close-button.js";
6
- import { n as r, r as i, t as a } from "./_shared/dialogsurface.js";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { Dialog as c } from "@base-ui/react/dialog";
5
+ import { n } from "./_shared/portal-container.js";
6
+ import { CloseButton as r } from "./close-button.js";
7
+ import { n as i, r as a, t as o } from "./_shared/dialogsurface.js";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ import { Dialog as l } from "@base-ui/react/dialog";
9
10
  //#region src/stories/molecules/Sheet/Sheet.tsx
10
- function l({ className: e, ...t }) {
11
- return /* @__PURE__ */ o(a, {
11
+ function u({ className: e, ...t }) {
12
+ return /* @__PURE__ */ s(o, {
12
13
  className: ["sheet__footer", e].filter(Boolean).join(" "),
13
14
  ...t
14
15
  });
15
16
  }
16
- function u({ open: a, onOpenChange: u, side: d = "right", title: f, titleHidden: p = !1, description: m, footer: h, children: g, closeLabel: _, hideClose: v = !1, trigger: y, container: b, onAnimationEndCapture: x, className: S, ...C }) {
17
- let w = e("sheet");
18
- return /* @__PURE__ */ s(c.Root, {
19
- open: a,
20
- onOpenChange: (e) => u(e),
21
- children: [y && /* @__PURE__ */ o(c.Trigger, { render: y }), /* @__PURE__ */ s(c.Portal, {
22
- container: b,
23
- children: [/* @__PURE__ */ o(i, { className: "sheet__overlay" }), /* @__PURE__ */ s(c.Popup, {
24
- className: ["sheet", S].filter(Boolean).join(" "),
25
- "data-side": d,
26
- onAnimationEndCapture: x,
27
- ...C,
17
+ function d({ open: o, onOpenChange: d, side: f = "right", title: p, titleHidden: m = !1, description: h, footer: g, children: _, closeLabel: v, hideClose: y = !1, trigger: b, container: x, onAnimationEndCapture: S, className: C, ...w }) {
18
+ let T = e("sheet"), E = n(x);
19
+ return /* @__PURE__ */ c(l.Root, {
20
+ open: o,
21
+ onOpenChange: (e) => d(e),
22
+ children: [b && /* @__PURE__ */ s(l.Trigger, { render: b }), /* @__PURE__ */ c(l.Portal, {
23
+ container: E,
24
+ children: [/* @__PURE__ */ s(a, { className: "sheet__overlay" }), /* @__PURE__ */ c(l.Popup, {
25
+ className: ["sheet", C].filter(Boolean).join(" "),
26
+ "data-side": f,
27
+ onAnimationEndCapture: S,
28
+ ...w,
28
29
  children: [
29
- /* @__PURE__ */ s(r, {
30
+ /* @__PURE__ */ c(i, {
30
31
  layout: "stacked",
31
32
  className: "sheet__header",
32
- children: [p ? /* @__PURE__ */ o(c.Title, { render: /* @__PURE__ */ o(t, { children: f }) }) : /* @__PURE__ */ o(c.Title, {
33
+ children: [m ? /* @__PURE__ */ s(l.Title, { render: /* @__PURE__ */ s(t, { children: p }) }) : /* @__PURE__ */ s(l.Title, {
33
34
  className: "sheet__title",
34
- children: f
35
- }), m != null && /* @__PURE__ */ o(c.Description, {
35
+ children: p
36
+ }), h != null && /* @__PURE__ */ s(l.Description, {
36
37
  className: "sheet__description",
37
- children: m
38
+ children: h
38
39
  })]
39
40
  }),
40
- !v && /* @__PURE__ */ o(c.Close, {
41
+ !y && /* @__PURE__ */ s(l.Close, {
41
42
  className: "sheet__close",
42
- render: /* @__PURE__ */ o(n, { label: w("close", _) })
43
+ render: /* @__PURE__ */ s(r, { label: T("close", v) })
43
44
  }),
44
- /* @__PURE__ */ o("div", {
45
+ /* @__PURE__ */ s("div", {
45
46
  className: "sheet__body",
46
- children: g
47
+ children: _
47
48
  }),
48
- h && /* @__PURE__ */ o(l, { children: h })
49
+ g && /* @__PURE__ */ s(u, { children: g })
49
50
  ]
50
51
  })]
51
52
  })]
52
53
  });
53
54
  }
54
55
  //#endregion
55
- export { u as Sheet, l as SheetFooter };
56
+ export { d as Sheet, u as SheetFooter };