@studiolxd/brand 46.0.0 → 47.1.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 (70) hide show
  1. package/CHANGELOG.md +176 -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/EmptyState/EmptyState.d.ts +2 -0
  16. package/dist/_types/molecules/Menu/Menu.d.ts +8 -1
  17. package/dist/_types/molecules/Modal/Modal.d.ts +8 -6
  18. package/dist/_types/molecules/OrgSwitcher/OrgSwitcher.d.ts +15 -1
  19. package/dist/_types/molecules/PageIntro/PageIntro.d.ts +12 -7
  20. package/dist/_types/molecules/PrevNextNav/PrevNextNav.d.ts +17 -2
  21. package/dist/_types/molecules/Sheet/Sheet.d.ts +8 -7
  22. package/dist/_types/molecules/SidebarNav/SidebarNav.d.ts +18 -3
  23. package/dist/_types/molecules/SiteNav/SiteNav.d.ts +9 -0
  24. package/dist/_types/molecules/TableOfContents/TableOfContents.d.ts +11 -2
  25. package/dist/_types/molecules/UserMenu/UserMenu.d.ts +16 -1
  26. package/dist/_types/sections/AppHeader/AppHeader.d.ts +8 -2
  27. package/dist/_types/sections/AppRoot/AppRoot.d.ts +12 -1
  28. package/dist/_types/sections/AppShell/AppShell.d.ts +14 -1
  29. package/dist/_types/sections/Hero/Hero.d.ts +4 -1
  30. package/dist/_types/sections/Sidebar/Sidebar.d.ts +27 -3
  31. package/dist/_types/sections/SiteHeader/SiteHeader.d.ts +22 -3
  32. package/dist/_types/sections/SiteShell/SiteShell.d.ts +11 -5
  33. package/dist/_types/templates/OnboardingShell/OnboardingShell.d.ts +19 -2
  34. package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +42 -6
  35. package/dist/app-header.js +1 -1
  36. package/dist/app-launcher.js +62 -58
  37. package/dist/app-root.js +10 -8
  38. package/dist/app-shell.js +51 -50
  39. package/dist/async-multi-select.js +65 -64
  40. package/dist/async-select.js +49 -48
  41. package/dist/brand.css +12 -2
  42. package/dist/breadcrumb.js +24 -21
  43. package/dist/input-phone.js +38 -37
  44. package/dist/link.css +1 -1
  45. package/dist/menu-button.js +16 -14
  46. package/dist/menu.js +44 -40
  47. package/dist/modal.js +32 -31
  48. package/dist/multi-select.js +106 -105
  49. package/dist/onboarding-shell.js +36 -35
  50. package/dist/org-switcher.js +64 -59
  51. package/dist/page-intro.css +1 -1
  52. package/dist/page-intro.js +23 -17
  53. package/dist/popover.js +27 -22
  54. package/dist/prev-next-nav.js +38 -36
  55. package/dist/public-page-shell.js +24 -20
  56. package/dist/select.js +70 -69
  57. package/dist/sheet.js +30 -29
  58. package/dist/sidebar-nav.js +91 -90
  59. package/dist/sidebar.js +72 -71
  60. package/dist/site-header.js +44 -43
  61. package/dist/site-nav.js +27 -25
  62. package/dist/site-shell.js +23 -15
  63. package/dist/table-of-contents.js +30 -27
  64. package/dist/toaster.js +57 -53
  65. package/dist/tokens.css +2 -2
  66. package/dist/tooltip.js +45 -41
  67. package/dist/user-menu.js +58 -52
  68. package/package.json +1 -1
  69. package/src/tokens/molecules/page-intro.css +1 -1
  70. package/src/tokens/scss/molecules/_page-intro.scss +1 -1
@@ -2,165 +2,166 @@
2
2
  import './multi-select.css';
3
3
  import { n as e } from "./_shared/brandmessagescontext.js";
4
4
  import { Icon as t } from "./icon.js";
5
- import { forwardRef as n, useEffect as r, useId as i, useRef as a, useState as o } from "react";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { Popover as l } from "@base-ui/react/popover";
5
+ import { n } from "./_shared/portal-container.js";
6
+ import { forwardRef as r, useEffect as i, useId as a, useRef as o, useState as s } from "react";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { Popover as u } from "@base-ui/react/popover";
8
9
  //#region src/stories/atoms/MultiSelect/MultiSelect.tsx
9
- function u(e, t) {
10
+ function d(e, t) {
10
11
  typeof e == "function" ? e(t) : e && (e.current = t);
11
12
  }
12
- var d = 500, f = n(function({ options: n, value: f, defaultValue: p = [], placeholder: m, disabled: h, readOnly: g, size: _ = "md", onValueChange: v, id: y, name: b, error: x = !1, onBlur: S, className: C, "aria-label": w, "aria-labelledby": T, "aria-describedby": E, removeLabel: D, container: O }, k) {
13
- let A = e("multiSelect"), [j, M] = o(!1), [N, P] = o(p), [F, I] = o(-1), L = a(null), R = a(null), z = i(), B = i(), V = a(""), H = a(0), U = f === void 0 ? N : f, W = (e) => `${B}-opt-${e}`;
14
- function G(e) {
15
- let t = U.includes(e) ? U.filter((t) => t !== e) : [...U, e];
16
- f === void 0 && P(t), v?.(t);
13
+ var f = 500, p = r(function({ options: r, value: p, defaultValue: m = [], placeholder: h, disabled: g, readOnly: _, size: v = "md", onValueChange: y, id: b, name: x, error: S = !1, onBlur: C, className: w, "aria-label": T, "aria-labelledby": E, "aria-describedby": D, removeLabel: O, container: k }, A) {
14
+ let j = e("multiSelect"), M = n(k), [N, P] = s(!1), [F, I] = s(m), [L, R] = s(-1), z = o(null), B = o(null), V = a(), H = a(), U = o(""), W = o(0), G = p === void 0 ? F : p, K = (e) => `${H}-opt-${e}`;
15
+ function q(e) {
16
+ let t = G.includes(e) ? G.filter((t) => t !== e) : [...G, e];
17
+ p === void 0 && I(t), y?.(t);
17
18
  }
18
- function K(e) {
19
- h || g || (M(!0), I(n.length === 0 ? -1 : e));
19
+ function J(e) {
20
+ g || _ || (P(!0), R(r.length === 0 ? -1 : e));
20
21
  }
21
- function q() {
22
- M(!1), I(-1), V.current = "";
22
+ function Y() {
23
+ P(!1), R(-1), U.current = "";
23
24
  }
24
- function J(e, t) {
25
+ function X(e, t) {
25
26
  if (!e) {
26
27
  if (t.reason === "outside-press") {
27
28
  let e = t.event?.target;
28
- if (e instanceof Node && L.current?.contains(e)) return;
29
+ if (e instanceof Node && z.current?.contains(e)) return;
29
30
  }
30
- q();
31
+ Y();
31
32
  }
32
33
  }
33
- function Y(e) {
34
- if (n.length === 0) return;
35
- let t = Date.now(), r = t - H.current > d ? e : V.current + e;
36
- V.current = r, H.current = t;
37
- let i = r.length === 1 ? F + 1 : Math.max(F, 0), a = r.toLowerCase();
38
- for (let e = 0; e < n.length; e++) {
39
- let t = (i + e) % n.length;
40
- if (n[t].label.toLowerCase().startsWith(a)) {
41
- I(t), j || M(!0);
34
+ function Z(e) {
35
+ if (r.length === 0) return;
36
+ let t = Date.now(), n = t - W.current > f ? e : U.current + e;
37
+ U.current = n, W.current = t;
38
+ let i = n.length === 1 ? L + 1 : Math.max(L, 0), a = n.toLowerCase();
39
+ for (let e = 0; e < r.length; e++) {
40
+ let t = (i + e) % r.length;
41
+ if (r[t].label.toLowerCase().startsWith(a)) {
42
+ R(t), N || P(!0);
42
43
  return;
43
44
  }
44
45
  }
45
46
  }
46
- function X(e) {
47
- if (h || g) return;
48
- let t = n.length - 1;
49
- if (e.key === "ArrowDown") e.preventDefault(), j ? I((e) => Math.min(e + 1, t)) : K(0);
50
- else if (e.key === "ArrowUp") e.preventDefault(), j ? I((e) => Math.max(e - 1, 0)) : K(t);
51
- else if (e.key === "Home") e.preventDefault(), j ? I(n.length === 0 ? -1 : 0) : K(0);
52
- else if (e.key === "End") e.preventDefault(), j ? I(t) : K(t);
53
- else if (e.key === "Enter" || e.key === " ") e.preventDefault(), j ? F >= 0 && F < n.length && G(n[F].value) : K(0);
47
+ function Q(e) {
48
+ if (g || _) return;
49
+ let t = r.length - 1;
50
+ if (e.key === "ArrowDown") e.preventDefault(), N ? R((e) => Math.min(e + 1, t)) : J(0);
51
+ else if (e.key === "ArrowUp") e.preventDefault(), N ? R((e) => Math.max(e - 1, 0)) : J(t);
52
+ else if (e.key === "Home") e.preventDefault(), N ? R(r.length === 0 ? -1 : 0) : J(0);
53
+ else if (e.key === "End") e.preventDefault(), N ? R(t) : J(t);
54
+ else if (e.key === "Enter" || e.key === " ") e.preventDefault(), N ? L >= 0 && L < r.length && q(r[L].value) : J(0);
54
55
  else if (e.key === "Escape") {
55
- if (!j) return;
56
- e.preventDefault(), q();
57
- } else e.key === "Tab" ? j && q() : e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.preventDefault(), Y(e.key));
56
+ if (!N) return;
57
+ e.preventDefault(), Y();
58
+ } else e.key === "Tab" ? N && Y() : e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.preventDefault(), Z(e.key));
58
59
  }
59
- function Z(e) {
60
- h || g || e.target instanceof Element && e.target.closest(".multi-select__pill-remove") || (e.preventDefault(), R.current?.focus(), j ? q() : K(0));
60
+ function $(e) {
61
+ g || _ || e.target instanceof Element && e.target.closest(".multi-select__pill-remove") || (e.preventDefault(), B.current?.focus(), N ? Y() : J(0));
61
62
  }
62
- r(() => {
63
- !j || F < 0 || document.getElementById(W(F))?.scrollIntoView({ block: "nearest" });
63
+ i(() => {
64
+ !N || L < 0 || document.getElementById(K(L))?.scrollIntoView({ block: "nearest" });
64
65
  }, [
65
- j,
66
- F,
67
- B
66
+ N,
67
+ L,
68
+ H
68
69
  ]);
69
- let Q = [
70
+ let ee = [
70
71
  "multi-select",
71
- _ === "md" ? "" : `multi-select--${_}`,
72
- h ? "multi-select--disabled" : "",
73
- x ? "multi-select--error" : "",
74
- C ?? ""
75
- ].filter(Boolean).join(" "), $ = ["multi-select__content", _ === "md" ? "" : `multi-select__content--${_}`].filter(Boolean).join(" ");
76
- return /* @__PURE__ */ c(l.Root, {
77
- open: j,
78
- onOpenChange: J,
79
- children: [/* @__PURE__ */ c("div", {
80
- ref: L,
81
- className: Q,
82
- "data-popup-open": j || void 0,
83
- onPointerDown: Z,
72
+ v === "md" ? "" : `multi-select--${v}`,
73
+ g ? "multi-select--disabled" : "",
74
+ S ? "multi-select--error" : "",
75
+ w ?? ""
76
+ ].filter(Boolean).join(" "), te = ["multi-select__content", v === "md" ? "" : `multi-select__content--${v}`].filter(Boolean).join(" ");
77
+ return /* @__PURE__ */ l(u.Root, {
78
+ open: N,
79
+ onOpenChange: X,
80
+ children: [/* @__PURE__ */ l("div", {
81
+ ref: z,
82
+ className: ee,
83
+ "data-popup-open": N || void 0,
84
+ onPointerDown: $,
84
85
  children: [
85
- /* @__PURE__ */ c("div", {
86
+ /* @__PURE__ */ l("div", {
86
87
  className: "multi-select__values",
87
- children: [U.map((e) => {
88
- let r = n.find((t) => t.value === e);
89
- return r ? /* @__PURE__ */ c("span", {
88
+ children: [G.map((e) => {
89
+ let n = r.find((t) => t.value === e);
90
+ return n ? /* @__PURE__ */ l("span", {
90
91
  className: "multi-select__pill",
91
- children: [/* @__PURE__ */ s("span", {
92
+ children: [/* @__PURE__ */ c("span", {
92
93
  className: "multi-select__pill-label",
93
- children: r.label
94
- }), !h && !g && /* @__PURE__ */ s("button", {
94
+ children: n.label
95
+ }), !g && !_ && /* @__PURE__ */ c("button", {
95
96
  type: "button",
96
97
  className: "multi-select__pill-remove",
97
- "aria-label": A("remove", D)(r.label),
98
+ "aria-label": j("remove", O)(n.label),
98
99
  tabIndex: -1,
99
100
  onClick: (t) => {
100
- t.stopPropagation(), G(e), R.current?.focus();
101
+ t.stopPropagation(), q(e), B.current?.focus();
101
102
  },
102
- children: /* @__PURE__ */ s(t, {
103
+ children: /* @__PURE__ */ c(t, {
103
104
  name: "close",
104
105
  size: "xs"
105
106
  })
106
107
  })]
107
108
  }, e) : null;
108
- }), /* @__PURE__ */ s("div", {
109
+ }), /* @__PURE__ */ c("div", {
109
110
  ref: (e) => {
110
- R.current = e, u(k, e);
111
+ B.current = e, d(A, e);
111
112
  },
112
113
  className: "multi-select__combobox",
113
- tabIndex: h ? -1 : 0,
114
+ tabIndex: g ? -1 : 0,
114
115
  role: "combobox",
115
- "aria-expanded": j,
116
+ "aria-expanded": N,
116
117
  "aria-haspopup": "listbox",
117
- "aria-controls": j ? z : void 0,
118
- "aria-activedescendant": j && F >= 0 ? W(F) : void 0,
119
- "aria-label": T ? void 0 : w ?? A("placeholder", m),
120
- "aria-labelledby": T,
121
- "aria-describedby": E,
122
- "aria-invalid": x || void 0,
123
- "aria-disabled": h || void 0,
124
- "aria-readonly": g || void 0,
125
- id: y,
126
- onKeyDown: X,
127
- onBlur: S,
128
- children: U.length === 0 && /* @__PURE__ */ s("span", {
118
+ "aria-controls": N ? V : void 0,
119
+ "aria-activedescendant": N && L >= 0 ? K(L) : void 0,
120
+ "aria-label": E ? void 0 : T ?? j("placeholder", h),
121
+ "aria-labelledby": E,
122
+ "aria-describedby": D,
123
+ "aria-invalid": S || void 0,
124
+ "aria-disabled": g || void 0,
125
+ "aria-readonly": _ || void 0,
126
+ id: b,
127
+ onKeyDown: Q,
128
+ onBlur: C,
129
+ children: G.length === 0 && /* @__PURE__ */ c("span", {
129
130
  className: "multi-select__placeholder",
130
- children: A("placeholder", m)
131
+ children: j("placeholder", h)
131
132
  })
132
133
  })]
133
134
  }),
134
- /* @__PURE__ */ s(t, {
135
+ /* @__PURE__ */ c(t, {
135
136
  name: "chevron",
136
137
  className: "multi-select__icon"
137
138
  }),
138
- b && U.map((e) => /* @__PURE__ */ s("input", {
139
+ x && G.map((e) => /* @__PURE__ */ c("input", {
139
140
  type: "hidden",
140
- name: b,
141
+ name: x,
141
142
  value: e
142
143
  }, e))
143
144
  ]
144
- }), /* @__PURE__ */ s(l.Portal, {
145
- container: O,
146
- children: /* @__PURE__ */ s(l.Positioner, {
145
+ }), /* @__PURE__ */ c(u.Portal, {
146
+ container: M,
147
+ children: /* @__PURE__ */ c(u.Positioner, {
147
148
  className: "multi-select__positioner",
148
- anchor: L,
149
+ anchor: z,
149
150
  align: "start",
150
151
  sideOffset: -1,
151
- children: /* @__PURE__ */ s(l.Popup, {
152
- className: $,
152
+ children: /* @__PURE__ */ c(u.Popup, {
153
+ className: te,
153
154
  initialFocus: !1,
154
155
  finalFocus: !1,
155
- children: /* @__PURE__ */ s("div", {
156
+ children: /* @__PURE__ */ c("div", {
156
157
  role: "listbox",
157
158
  "aria-multiselectable": "true",
158
- "aria-label": w ?? m,
159
- id: z,
160
- children: n.map((e, t) => {
161
- let n = U.includes(e.value), r = F === t;
162
- return /* @__PURE__ */ c("div", {
163
- id: W(t),
159
+ "aria-label": T ?? h,
160
+ id: V,
161
+ children: r.map((e, t) => {
162
+ let n = G.includes(e.value), r = L === t;
163
+ return /* @__PURE__ */ l("div", {
164
+ id: K(t),
164
165
  role: "option",
165
166
  "aria-selected": n,
166
167
  "aria-label": e["aria-label"] ?? e.label,
@@ -173,13 +174,13 @@ var d = 500, f = n(function({ options: n, value: f, defaultValue: p = [], placeh
173
174
  e.preventDefault(), e.stopPropagation();
174
175
  },
175
176
  onClick: () => {
176
- G(e.value), I(t), R.current?.focus();
177
+ q(e.value), R(t), B.current?.focus();
177
178
  },
178
- children: [/* @__PURE__ */ s("span", {
179
+ children: [/* @__PURE__ */ c("span", {
179
180
  className: "multi-select__item-check",
180
181
  "aria-hidden": "true",
181
- children: /* @__PURE__ */ s("span", { className: "multi-select__item-check-mark" })
182
- }), /* @__PURE__ */ s("span", { children: e.label })]
182
+ children: /* @__PURE__ */ c("span", { className: "multi-select__item-check-mark" })
183
+ }), /* @__PURE__ */ c("span", { children: e.label })]
183
184
  }, e.value);
184
185
  })
185
186
  })
@@ -189,4 +190,4 @@ var d = 500, f = n(function({ options: n, value: f, defaultValue: p = [], placeh
189
190
  });
190
191
  });
191
192
  //#endregion
192
- export { f as MultiSelect };
193
+ export { p as MultiSelect };
@@ -1,69 +1,70 @@
1
1
  'use client';
2
2
  import './onboarding-shell.css';
3
- import { t as e } from "./_shared/form-size.js";
4
- import { Container as t } from "./container.js";
5
- import { PublicPageShell as n } from "./public-page-shell.js";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { t } from "./_shared/form-size.js";
5
+ import { Container as n } from "./container.js";
6
+ import { PublicPageShell as r } from "./public-page-shell.js";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
8
  //#region src/stories/templates/OnboardingShell/OnboardingShell.tsx
8
- function a({ children: a, brand: o, preferences: s, switchers: c, preferencesLabel: l, stepper: u, primaryAction: d, backAction: f, exitAction: p, actionsLabel: m = "Acciones del paso", id: h = "main-content", shell: g = !0, width: _ = "md", className: v }) {
9
- let y = !!(d || f || p), b = s ?? c, x = o && /* @__PURE__ */ r("div", {
9
+ function o({ children: o, brand: s, preferences: c, switchers: l, preferencesLabel: u, stepper: d, primaryAction: f, backAction: p, exitAction: m, actionsLabel: h, id: g = "main-content", shell: _ = !0, width: v = "md", className: y }) {
10
+ let b = e("onboardingShell"), x = e("publicPageShell"), S = !!(f || p || m), C = c ?? l, w = s && /* @__PURE__ */ i("div", {
10
11
  className: "onboarding-shell__brand",
11
- children: o
12
+ children: s
12
13
  });
13
- return /* @__PURE__ */ r(n, {
14
- id: h,
15
- shell: g,
16
- header: x && /* @__PURE__ */ r(t, {
14
+ return /* @__PURE__ */ i(r, {
15
+ id: g,
16
+ shell: _,
17
+ header: w && /* @__PURE__ */ i(n, {
17
18
  as: "header",
18
19
  className: "onboarding-shell__top onboarding-shell__top--band",
19
20
  innerClassName: "onboarding-shell__bar",
20
- children: x
21
+ children: w
21
22
  }),
22
- preferences: b,
23
- preferencesLabel: l,
24
- children: /* @__PURE__ */ i("div", {
25
- className: ["onboarding-shell", v].filter(Boolean).join(" "),
23
+ preferences: C,
24
+ preferencesLabel: u,
25
+ children: /* @__PURE__ */ a("div", {
26
+ className: ["onboarding-shell", y].filter(Boolean).join(" "),
26
27
  children: [
27
- !g && x && /* @__PURE__ */ r("header", {
28
+ !_ && w && /* @__PURE__ */ i("header", {
28
29
  className: "onboarding-shell__top onboarding-shell__bar",
29
- children: x
30
+ children: w
30
31
  }),
31
- /* @__PURE__ */ r(e.Provider, {
32
+ /* @__PURE__ */ i(t.Provider, {
32
33
  value: "lg",
33
- children: /* @__PURE__ */ i("div", {
34
- className: ["onboarding-shell__step", _ === "wide" ? "onboarding-shell__step--wide" : ""].filter(Boolean).join(" "),
34
+ children: /* @__PURE__ */ a("div", {
35
+ className: ["onboarding-shell__step", v === "wide" ? "onboarding-shell__step--wide" : ""].filter(Boolean).join(" "),
35
36
  children: [
36
- u && /* @__PURE__ */ r("div", {
37
+ d && /* @__PURE__ */ i("div", {
37
38
  className: "onboarding-shell__progress",
38
- children: u
39
+ children: d
39
40
  }),
40
- /* @__PURE__ */ r("div", {
41
+ /* @__PURE__ */ i("div", {
41
42
  className: "onboarding-shell__body",
42
- children: a
43
+ children: o
43
44
  }),
44
- y && /* @__PURE__ */ i("div", {
45
+ S && /* @__PURE__ */ a("div", {
45
46
  className: "onboarding-shell__actions",
46
47
  role: "group",
47
- "aria-label": m,
48
- children: [f, (p || d) && /* @__PURE__ */ i("div", {
48
+ "aria-label": b("actions", h),
49
+ children: [p, (m || f) && /* @__PURE__ */ a("div", {
49
50
  className: "onboarding-shell__decisions",
50
- children: [p && /* @__PURE__ */ r("div", {
51
+ children: [m && /* @__PURE__ */ i("div", {
51
52
  className: "onboarding-shell__exit",
52
- children: p
53
- }), d]
53
+ children: m
54
+ }), f]
54
55
  })]
55
56
  })
56
57
  ]
57
58
  })
58
59
  }),
59
- !g && b && /* @__PURE__ */ r("section", {
60
+ !_ && C && /* @__PURE__ */ i("section", {
60
61
  className: "onboarding-shell__settings",
61
- "aria-label": l ?? "Preferencias",
62
- children: b
62
+ "aria-label": x("preferences", u),
63
+ children: C
63
64
  })
64
65
  ]
65
66
  })
66
67
  });
67
68
  }
68
69
  //#endregion
69
- export { a as OnboardingShell };
70
+ export { o as OnboardingShell };
@@ -1,81 +1,86 @@
1
1
  'use client';
2
2
  import './org-switcher.css';
3
- import { Icon as e } from "./icon.js";
4
- import { Avatar as t } from "./avatar.js";
5
- import { n, t as r } from "./_shared/dropdownitems.js";
6
- import { n as i } from "./_shared/sidebarcontext.js";
7
- import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { Menu as c } from "@base-ui/react/menu";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { n } from "./_shared/portal-container.js";
6
+ import { Avatar as r } from "./avatar.js";
7
+ import { n as i, t as a } from "./_shared/dropdownitems.js";
8
+ import { n as o } from "./_shared/sidebarcontext.js";
9
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
10
+ import { Menu as u } from "@base-ui/react/menu";
9
11
  //#region src/stories/molecules/OrgSwitcher/OrgSwitcher.tsx
10
- function l({ label: l, block: u = !1, compact: d, current: f, organizations: p, onOrgChange: m, defaultOpen: h, items: g, renderLink: _ = r }) {
11
- let v = p.filter((e) => e.id !== f.id), y = i(), b = d ?? y.rail;
12
- return /* @__PURE__ */ s(c.Root, {
13
- defaultOpen: h,
14
- children: [/* @__PURE__ */ s(c.Trigger, {
12
+ function d({ label: d, block: f = !1, compact: p, current: m, organizations: h, onOrgChange: g, defaultOpen: _, items: v, renderLink: y = a }) {
13
+ let b = e("orgSwitcher"), x = n(void 0), S = h.filter((e) => e.id !== m.id), C = o(), w = p ?? C.rail;
14
+ return /* @__PURE__ */ l(u.Root, {
15
+ defaultOpen: _,
16
+ children: [/* @__PURE__ */ l(u.Trigger, {
15
17
  className: [
16
18
  "org-switcher__trigger",
17
- u && !b ? "org-switcher__trigger--block" : "",
18
- b ? "org-switcher__trigger--compact" : ""
19
+ f && !w ? "org-switcher__trigger--block" : "",
20
+ w ? "org-switcher__trigger--compact" : ""
19
21
  ].filter(Boolean).join(" "),
20
- "aria-label": l ?? `Organización: ${f.name}`,
22
+ "aria-label": d ?? b("trigger")(m.name),
21
23
  children: [
22
- /* @__PURE__ */ o(t, {
23
- src: f.logoUrl,
24
- name: f.name,
24
+ /* @__PURE__ */ c(r, {
25
+ src: m.logoUrl,
26
+ name: m.name,
25
27
  alt: "",
26
28
  size: "sm",
27
29
  shape: "square"
28
30
  }),
29
- !b && /* @__PURE__ */ o("span", {
31
+ !w && /* @__PURE__ */ c("span", {
30
32
  className: "org-switcher__name",
31
- children: f.name
33
+ children: m.name
32
34
  }),
33
- !b && /* @__PURE__ */ o(e, {
35
+ !w && /* @__PURE__ */ c(t, {
34
36
  name: "chevron",
35
37
  size: "sm",
36
38
  className: "org-switcher__chevron"
37
39
  })
38
40
  ]
39
- }), /* @__PURE__ */ o(c.Portal, { children: /* @__PURE__ */ o(c.Positioner, {
40
- className: "org-switcher__positioner",
41
- sideOffset: 4,
42
- align: "start",
43
- children: /* @__PURE__ */ s(c.Popup, {
44
- className: "org-switcher__content",
45
- children: [
46
- /* @__PURE__ */ s(c.CheckboxItem, {
47
- className: "org-switcher__item org-switcher__item--active",
48
- checked: !0,
49
- onCheckedChange: () => void 0,
50
- children: [/* @__PURE__ */ o(t, {
51
- src: f.logoUrl,
52
- name: f.name,
53
- alt: "",
54
- size: "sm",
55
- shape: "square"
56
- }), /* @__PURE__ */ o("span", { children: f.name })]
57
- }),
58
- v.map((e) => /* @__PURE__ */ s(c.Item, {
59
- className: "org-switcher__item",
60
- onClick: () => m(e.id),
61
- children: [/* @__PURE__ */ o(t, {
62
- src: e.logoUrl,
63
- name: e.name,
64
- alt: "",
65
- size: "sm",
66
- shape: "square"
67
- }), /* @__PURE__ */ o("span", { children: e.name })]
68
- }, e.id)),
69
- g && g.length > 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(c.Separator, { className: "org-switcher__separator" }), n({
70
- items: g,
71
- itemClass: (e) => ["org-switcher__item", e ? "org-switcher__item--destructive" : ""].filter(Boolean).join(" "),
72
- separatorClass: "org-switcher__separator",
73
- renderLink: _
74
- })] })
75
- ]
41
+ }), /* @__PURE__ */ c(u.Portal, {
42
+ container: x,
43
+ children: /* @__PURE__ */ c(u.Positioner, {
44
+ className: "org-switcher__positioner",
45
+ sideOffset: 4,
46
+ align: "start",
47
+ children: /* @__PURE__ */ l(u.Popup, {
48
+ className: "org-switcher__content",
49
+ children: [
50
+ /* @__PURE__ */ l(u.CheckboxItem, {
51
+ className: "org-switcher__item org-switcher__item--active",
52
+ checked: !0,
53
+ onCheckedChange: () => void 0,
54
+ children: [/* @__PURE__ */ c(r, {
55
+ src: m.logoUrl,
56
+ name: m.name,
57
+ alt: "",
58
+ size: "sm",
59
+ shape: "square"
60
+ }), /* @__PURE__ */ c("span", { children: m.name })]
61
+ }),
62
+ S.map((e) => /* @__PURE__ */ l(u.Item, {
63
+ className: "org-switcher__item",
64
+ onClick: () => g(e.id),
65
+ children: [/* @__PURE__ */ c(r, {
66
+ src: e.logoUrl,
67
+ name: e.name,
68
+ alt: "",
69
+ size: "sm",
70
+ shape: "square"
71
+ }), /* @__PURE__ */ c("span", { children: e.name })]
72
+ }, e.id)),
73
+ v && v.length > 0 && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(u.Separator, { className: "org-switcher__separator" }), i({
74
+ items: v,
75
+ itemClass: (e) => ["org-switcher__item", e ? "org-switcher__item--destructive" : ""].filter(Boolean).join(" "),
76
+ separatorClass: "org-switcher__separator",
77
+ renderLink: y
78
+ })] })
79
+ ]
80
+ })
76
81
  })
77
- }) })]
82
+ })]
78
83
  });
79
84
  }
80
85
  //#endregion
81
- export { l as OrgSwitcher };
86
+ export { d as OrgSwitcher };
@@ -1 +1 @@
1
- .page-intro{flex-direction:column;inline-size:100%;display:flex}.page-intro .paragraph{margin:0}.page-intro>:not(.heading)+*{margin-block-start:var(--spacing-3)}.page-intro__row{align-items:flex-start;row-gap:var(--page-intro-row-gap);flex-direction:column;display:flex}.page-intro__row>.heading{margin-block-end:0}.page-intro__actions{align-self:stretch;align-items:stretch;gap:var(--page-intro-actions-gap);flex-direction:column;display:flex}@media (width>=768px){.page-intro__row{align-items:baseline;column-gap:var(--page-intro-row-column-gap);flex-direction:row;row-gap:0}.page-intro__row>.heading{min-inline-size:0;flex:1;margin-block-end:var(--page-intro-title-space-after)}.page-intro__row:last-child>.heading{margin-block-end:0}.page-intro__actions{flex-flow:wrap;flex:none;align-self:auto;align-items:center}.page-intro>.page-intro__row+*{margin-block-start:0}}
1
+ .page-intro{flex-direction:column;inline-size:100%;display:flex}.page-intro .paragraph{margin:0}.page-intro>:not(.heading)+*{margin-block-start:var(--spacing-3)}.page-intro__eyebrow{margin-block-end:var(--page-intro-row-gap)}.page-intro__row{align-items:flex-start;row-gap:var(--page-intro-row-gap);flex-direction:column;display:flex}.page-intro__row>.page-intro__title-group>.heading{margin-block-end:0}.page-intro__actions{align-self:stretch;align-items:stretch;gap:var(--page-intro-actions-gap);flex-direction:column;display:flex}@media (width>=768px){.page-intro__row{align-items:baseline;column-gap:var(--page-intro-row-column-gap);flex-direction:row;row-gap:0}.page-intro__row>.page-intro__title-group{flex:1;min-inline-size:0}.page-intro__row>.page-intro__title-group>.heading{margin-block-end:var(--page-intro-title-space-after)}.page-intro__row:last-child>.page-intro__title-group>.heading{margin-block-end:0}.page-intro__actions{flex-flow:wrap;flex:none;align-self:auto;align-items:center}.page-intro>.page-intro__row+*{margin-block-start:0}}
@@ -1,31 +1,37 @@
1
1
  import './page-intro.css';
2
2
  import { Heading as e } from "./heading.js";
3
3
  import { Paragraph as t } from "./paragraph.js";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  //#region src/stories/molecules/PageIntro/PageIntro.tsx
6
- function i({ title: i, description: a, actions: o, level: s = 1, size: c, as: l = "header", className: u, children: d }) {
7
- let f = /* @__PURE__ */ n(e, {
8
- level: s,
9
- size: c,
10
- children: i
11
- });
12
- return /* @__PURE__ */ r(l, {
13
- className: ["page-intro", u].filter(Boolean).join(" "),
6
+ function a({ eyebrow: a, title: o, description: s, actions: c, level: l = 1, size: u, as: d = "header", className: f, children: p }) {
7
+ let m = /* @__PURE__ */ i(n, { children: [a && /* @__PURE__ */ r("div", {
8
+ className: "page-intro__eyebrow",
9
+ children: a
10
+ }), /* @__PURE__ */ r(e, {
11
+ level: l,
12
+ size: u,
13
+ children: o
14
+ })] });
15
+ return /* @__PURE__ */ i(d, {
16
+ className: ["page-intro", f].filter(Boolean).join(" "),
14
17
  children: [
15
- o ? /* @__PURE__ */ r("div", {
18
+ c ? /* @__PURE__ */ i("div", {
16
19
  className: "page-intro__row",
17
- children: [f, /* @__PURE__ */ n("div", {
20
+ children: [/* @__PURE__ */ r("div", {
21
+ className: "page-intro__title-group",
22
+ children: m
23
+ }), /* @__PURE__ */ r("div", {
18
24
  className: "page-intro__actions",
19
- children: o
25
+ children: c
20
26
  })]
21
- }) : f,
22
- a && /* @__PURE__ */ n(t, {
27
+ }) : m,
28
+ s && /* @__PURE__ */ r(t, {
23
29
  size: "large",
24
- children: a
30
+ children: s
25
31
  }),
26
- d
32
+ p
27
33
  ]
28
34
  });
29
35
  }
30
36
  //#endregion
31
- export { i as PageIntro };
37
+ export { a as PageIntro };