@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.
- package/CHANGELOG.md +176 -0
- package/dist/_shared/portal-container.js +9 -0
- package/dist/_types/atoms/AsyncMultiSelect/AsyncMultiSelect.d.ts +8 -7
- package/dist/_types/atoms/AsyncSelect/AsyncSelect.d.ts +8 -6
- package/dist/_types/atoms/InputPhone/InputPhone.d.ts +8 -5
- package/dist/_types/atoms/MenuButton/MenuButton.d.ts +22 -2
- package/dist/_types/atoms/MultiSelect/MultiSelect.d.ts +8 -6
- package/dist/_types/atoms/Popover/Popover.d.ts +8 -1
- package/dist/_types/atoms/Select/Select.d.ts +8 -7
- package/dist/_types/atoms/Tooltip/Tooltip.d.ts +7 -0
- package/dist/_types/constants/portal-container.d.ts +42 -0
- package/dist/_types/messages/BrandMessages.d.ts +29 -1
- package/dist/_types/messages/index.d.ts +1 -1
- package/dist/_types/molecules/Breadcrumb/Breadcrumb.d.ts +10 -2
- package/dist/_types/molecules/EmptyState/EmptyState.d.ts +2 -0
- package/dist/_types/molecules/Menu/Menu.d.ts +8 -1
- package/dist/_types/molecules/Modal/Modal.d.ts +8 -6
- package/dist/_types/molecules/OrgSwitcher/OrgSwitcher.d.ts +15 -1
- package/dist/_types/molecules/PageIntro/PageIntro.d.ts +12 -7
- package/dist/_types/molecules/PrevNextNav/PrevNextNav.d.ts +17 -2
- package/dist/_types/molecules/Sheet/Sheet.d.ts +8 -7
- package/dist/_types/molecules/SidebarNav/SidebarNav.d.ts +18 -3
- package/dist/_types/molecules/SiteNav/SiteNav.d.ts +9 -0
- package/dist/_types/molecules/TableOfContents/TableOfContents.d.ts +11 -2
- package/dist/_types/molecules/UserMenu/UserMenu.d.ts +16 -1
- package/dist/_types/sections/AppHeader/AppHeader.d.ts +8 -2
- package/dist/_types/sections/AppRoot/AppRoot.d.ts +12 -1
- package/dist/_types/sections/AppShell/AppShell.d.ts +14 -1
- package/dist/_types/sections/Hero/Hero.d.ts +4 -1
- package/dist/_types/sections/Sidebar/Sidebar.d.ts +27 -3
- package/dist/_types/sections/SiteHeader/SiteHeader.d.ts +22 -3
- package/dist/_types/sections/SiteShell/SiteShell.d.ts +11 -5
- package/dist/_types/templates/OnboardingShell/OnboardingShell.d.ts +19 -2
- package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +42 -6
- package/dist/app-header.js +1 -1
- package/dist/app-launcher.js +62 -58
- package/dist/app-root.js +10 -8
- package/dist/app-shell.js +51 -50
- package/dist/async-multi-select.js +65 -64
- package/dist/async-select.js +49 -48
- package/dist/brand.css +12 -2
- package/dist/breadcrumb.js +24 -21
- package/dist/input-phone.js +38 -37
- package/dist/link.css +1 -1
- package/dist/menu-button.js +16 -14
- package/dist/menu.js +44 -40
- package/dist/modal.js +32 -31
- package/dist/multi-select.js +106 -105
- package/dist/onboarding-shell.js +36 -35
- package/dist/org-switcher.js +64 -59
- package/dist/page-intro.css +1 -1
- package/dist/page-intro.js +23 -17
- package/dist/popover.js +27 -22
- package/dist/prev-next-nav.js +38 -36
- package/dist/public-page-shell.js +24 -20
- package/dist/select.js +70 -69
- package/dist/sheet.js +30 -29
- package/dist/sidebar-nav.js +91 -90
- package/dist/sidebar.js +72 -71
- package/dist/site-header.js +44 -43
- package/dist/site-nav.js +27 -25
- package/dist/site-shell.js +23 -15
- package/dist/table-of-contents.js +30 -27
- package/dist/toaster.js +57 -53
- package/dist/tokens.css +2 -2
- package/dist/tooltip.js +45 -41
- package/dist/user-menu.js +58 -52
- package/package.json +1 -1
- package/src/tokens/molecules/page-intro.css +1 -1
- package/src/tokens/scss/molecules/_page-intro.scss +1 -1
package/dist/site-nav.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './site-nav.css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Heading as t } from "./heading.js";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
6
|
//#region src/stories/molecules/SiteNav/SiteNav.tsx
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
function i({ href: e, children: t, className: r, "aria-current": i, target: a, rel: o }) {
|
|
8
|
+
return /* @__PURE__ */ n("a", {
|
|
7
9
|
href: e,
|
|
8
10
|
className: r,
|
|
9
11
|
"aria-current": i,
|
|
10
12
|
target: a,
|
|
11
13
|
rel: o,
|
|
12
|
-
children:
|
|
14
|
+
children: t
|
|
13
15
|
});
|
|
14
16
|
}
|
|
15
|
-
function
|
|
17
|
+
function a(e, t) {
|
|
16
18
|
return t || (e === "_blank" ? "noopener noreferrer" : void 0);
|
|
17
19
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
className:
|
|
23
|
-
"aria-label":
|
|
24
|
-
"data-columns":
|
|
25
|
-
children:
|
|
20
|
+
var o = 5;
|
|
21
|
+
function s({ groups: s, label: c, renderLink: l = i, className: u }) {
|
|
22
|
+
let d = e("siteNav"), f = ["site-nav", u].filter(Boolean).join(" "), p = Math.min(s.length, o) || 1;
|
|
23
|
+
return /* @__PURE__ */ n("nav", {
|
|
24
|
+
className: f,
|
|
25
|
+
"aria-label": d("label", c),
|
|
26
|
+
"data-columns": p,
|
|
27
|
+
children: s.map((e) => /* @__PURE__ */ r("div", {
|
|
26
28
|
className: "site-nav__group",
|
|
27
|
-
children: [/* @__PURE__ */ t
|
|
29
|
+
children: [/* @__PURE__ */ n(t, {
|
|
28
30
|
level: 2,
|
|
29
31
|
size: 6,
|
|
30
32
|
className: "site-nav__label",
|
|
31
|
-
children:
|
|
32
|
-
href:
|
|
33
|
+
children: e.href ? l({
|
|
34
|
+
href: e.href,
|
|
33
35
|
className: "site-nav__label-link",
|
|
34
|
-
children:
|
|
35
|
-
}) :
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
children: e.label
|
|
37
|
+
}) : e.label
|
|
38
|
+
}), /* @__PURE__ */ n("ul", {
|
|
37
39
|
className: "site-nav__list",
|
|
38
|
-
children:
|
|
40
|
+
children: e.items.map((e) => /* @__PURE__ */ n("li", {
|
|
39
41
|
className: "site-nav__item",
|
|
40
|
-
children:
|
|
42
|
+
children: l({
|
|
41
43
|
href: e.href,
|
|
42
44
|
className: ["site-nav__link", e.current ? "site-nav__link--current" : ""].filter(Boolean).join(" "),
|
|
43
45
|
"aria-current": e.current ? "page" : void 0,
|
|
44
46
|
target: e.target,
|
|
45
|
-
rel:
|
|
47
|
+
rel: a(e.target, e.rel),
|
|
46
48
|
children: e.label
|
|
47
49
|
})
|
|
48
50
|
}, e.id))
|
|
49
51
|
})]
|
|
50
|
-
},
|
|
52
|
+
}, e.id))
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
//#endregion
|
|
54
|
-
export {
|
|
56
|
+
export { s as SiteNav };
|
package/dist/site-shell.js
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './site-shell.css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { t as e } from "./_shared/portal-container.js";
|
|
4
|
+
import { forwardRef as t, useCallback as n, useState as r } from "react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
6
|
//#region src/stories/sections/SiteShell/SiteShell.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
var o = t(function({ header: t, footer: o, children: s, className: c }, l) {
|
|
8
|
+
let [u, d] = r(null);
|
|
9
|
+
return /* @__PURE__ */ i("div", {
|
|
10
|
+
ref: n((e) => {
|
|
11
|
+
d(e), typeof l == "function" ? l(e) : l && (l.current = e);
|
|
12
|
+
}, [l]),
|
|
13
|
+
className: ["site-shell", c].filter(Boolean).join(" "),
|
|
14
|
+
children: /* @__PURE__ */ a(e.Provider, {
|
|
15
|
+
value: u,
|
|
16
|
+
children: [
|
|
17
|
+
t,
|
|
18
|
+
/* @__PURE__ */ i("div", {
|
|
19
|
+
className: "site-shell__main",
|
|
20
|
+
children: s
|
|
21
|
+
}),
|
|
22
|
+
o
|
|
23
|
+
]
|
|
24
|
+
})
|
|
17
25
|
});
|
|
18
26
|
});
|
|
19
27
|
//#endregion
|
|
20
|
-
export {
|
|
28
|
+
export { o as SiteShell };
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './table-of-contents.css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Link as t } from "./link.js";
|
|
5
|
+
import { List as n } from "./list.js";
|
|
6
|
+
import { forwardRef as r } from "react";
|
|
7
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
8
|
//#region src/stories/molecules/TableOfContents/TableOfContents.tsx
|
|
7
|
-
function
|
|
9
|
+
function o(e, t) {
|
|
8
10
|
return Math.min(Math.max(e - t, 0), 5);
|
|
9
11
|
}
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var s = r(function({ items: r, activeId: s, ariaLabel: c, title: l, sticky: u = !1, onItemClick: d, className: f, ...p }, m) {
|
|
13
|
+
let h = e("tableOfContents");
|
|
14
|
+
if (r.length === 0) return null;
|
|
15
|
+
let g = Math.min(...r.map((e) => e.level));
|
|
16
|
+
return /* @__PURE__ */ a("nav", {
|
|
17
|
+
ref: m,
|
|
15
18
|
className: [
|
|
16
19
|
"table-of-contents",
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
u ? "table-of-contents--sticky" : "",
|
|
21
|
+
f ?? ""
|
|
19
22
|
].filter(Boolean).join(" "),
|
|
20
|
-
"aria-label":
|
|
21
|
-
...
|
|
22
|
-
children: [
|
|
23
|
+
"aria-label": h("label", c),
|
|
24
|
+
...p,
|
|
25
|
+
children: [l && /* @__PURE__ */ i("p", {
|
|
23
26
|
className: "table-of-contents__title",
|
|
24
|
-
children:
|
|
25
|
-
}), /* @__PURE__ */
|
|
27
|
+
children: l
|
|
28
|
+
}), /* @__PURE__ */ i(n, {
|
|
26
29
|
type: "plain",
|
|
27
30
|
className: "table-of-contents__list",
|
|
28
|
-
children:
|
|
29
|
-
let n =
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
className: `table-of-contents__item table-of-contents__item--level-${
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
href: `#${
|
|
31
|
+
children: r.map((e) => {
|
|
32
|
+
let n = e.id === s;
|
|
33
|
+
return /* @__PURE__ */ i("li", {
|
|
34
|
+
className: `table-of-contents__item table-of-contents__item--level-${o(e.level, g)}`,
|
|
35
|
+
children: /* @__PURE__ */ i(t, {
|
|
36
|
+
href: `#${e.id}`,
|
|
34
37
|
className: ["table-of-contents__link", n ? "table-of-contents__link--active" : ""].filter(Boolean).join(" "),
|
|
35
38
|
"aria-current": n ? "location" : void 0,
|
|
36
|
-
onClick:
|
|
37
|
-
children:
|
|
39
|
+
onClick: d ? (t) => d(e, t) : void 0,
|
|
40
|
+
children: e.label
|
|
38
41
|
})
|
|
39
|
-
},
|
|
42
|
+
}, e.id);
|
|
40
43
|
})
|
|
41
44
|
})]
|
|
42
45
|
});
|
|
43
46
|
});
|
|
44
47
|
//#endregion
|
|
45
|
-
export {
|
|
48
|
+
export { s as TableOfContents };
|
package/dist/toaster.js
CHANGED
|
@@ -1,81 +1,85 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './toaster.css';
|
|
3
3
|
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { n as t } from "./_shared/portal-container.js";
|
|
5
|
+
import { Button as n } from "./button.js";
|
|
6
|
+
import { CloseButton as r } from "./close-button.js";
|
|
7
|
+
import { t as i } from "./_shared/css-properties.js";
|
|
8
|
+
import { TOAST_DURATION as a, setToastDefaultDuration as o, syncLiveToasts as s, toastManager as c } from "./toast.js";
|
|
9
|
+
import { useEffect as l } from "react";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
|
+
import { Toast as f } from "@base-ui/react/toast";
|
|
11
12
|
//#region src/stories/molecules/Toast/Toaster.tsx
|
|
12
|
-
var
|
|
13
|
+
var p = 8, m = {
|
|
13
14
|
success: "alert--success",
|
|
14
15
|
error: "alert--error",
|
|
15
16
|
warning: "alert--warning"
|
|
16
17
|
};
|
|
17
|
-
function
|
|
18
|
+
function h(e, t) {
|
|
18
19
|
return [
|
|
19
20
|
"alert",
|
|
20
|
-
|
|
21
|
+
m[e ?? ""] ?? "",
|
|
21
22
|
e === "warning" ? "" : "surface-dark",
|
|
22
23
|
t ? "alert--dismissible" : "",
|
|
23
24
|
"toast"
|
|
24
25
|
].filter(Boolean).join(" ");
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
let
|
|
27
|
+
function g({ position: a, containerAriaLabel: o, closeLabel: c, closeButton: p, gap: m, expand: g }) {
|
|
28
|
+
let _ = e("toaster"), { toasts: v } = f.useToastManager(), [y, b] = a.split("-"), x = v.map((e) => e.id).join(",");
|
|
29
|
+
l(() => {
|
|
30
|
+
s(x ? x.split(",") : []);
|
|
31
|
+
}, [x]);
|
|
32
|
+
let S = i({ "--toast-gap": `${m}px` }), C = t(void 0), w = [
|
|
32
33
|
"toaster",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
y === "top" ? "toaster--top" : "",
|
|
35
|
+
b === "right" ? "" : `toaster--${b}`,
|
|
36
|
+
g ? "toaster--expanded" : ""
|
|
36
37
|
].filter(Boolean).join(" ");
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
className:
|
|
46
|
-
children: [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
return /* @__PURE__ */ u(f.Portal, {
|
|
39
|
+
container: C,
|
|
40
|
+
children: /* @__PURE__ */ u(f.Viewport, {
|
|
41
|
+
ref: S,
|
|
42
|
+
className: w,
|
|
43
|
+
"aria-label": _("container", o),
|
|
44
|
+
children: v.map((e) => /* @__PURE__ */ d(f.Root, {
|
|
45
|
+
toast: e,
|
|
46
|
+
className: h(e.type, p),
|
|
47
|
+
children: [/* @__PURE__ */ d("div", {
|
|
48
|
+
className: "alert__content",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ u(f.Title, { className: "alert__title" }),
|
|
51
|
+
/* @__PURE__ */ u(f.Description, { className: "alert__description" }),
|
|
52
|
+
/* @__PURE__ */ u(f.Action, {
|
|
53
|
+
className: "toast__action",
|
|
54
|
+
render: /* @__PURE__ */ u(n, {
|
|
55
|
+
variant: "ghost",
|
|
56
|
+
size: "sm"
|
|
57
|
+
})
|
|
54
58
|
})
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
})
|
|
59
|
+
]
|
|
60
|
+
}), p && /* @__PURE__ */ u(f.Close, {
|
|
61
|
+
className: "alert__close",
|
|
62
|
+
render: /* @__PURE__ */ u(r, { label: _("close", c) })
|
|
63
|
+
})]
|
|
64
|
+
}, e.id))
|
|
65
|
+
})
|
|
66
|
+
});
|
|
63
67
|
}
|
|
64
|
-
function
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
toastManager:
|
|
68
|
-
timeout:
|
|
69
|
-
limit:
|
|
70
|
-
children: /* @__PURE__ */
|
|
68
|
+
function _({ position: e = "bottom-right", containerAriaLabel: t, closeLabel: n, closeButton: r = !0, duration: i = a, gap: s = p, visibleToasts: d = 3, expand: m = !1 }) {
|
|
69
|
+
let h = Number.isFinite(i) ? i : 0;
|
|
70
|
+
return l(() => o(h), [h]), /* @__PURE__ */ u(f.Provider, {
|
|
71
|
+
toastManager: c,
|
|
72
|
+
timeout: h,
|
|
73
|
+
limit: d,
|
|
74
|
+
children: /* @__PURE__ */ u(g, {
|
|
71
75
|
position: e,
|
|
72
76
|
containerAriaLabel: t,
|
|
73
77
|
closeLabel: n,
|
|
74
78
|
closeButton: r,
|
|
75
|
-
gap:
|
|
79
|
+
gap: s,
|
|
76
80
|
expand: m
|
|
77
81
|
})
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
84
|
//#endregion
|
|
81
|
-
export {
|
|
85
|
+
export { _ as Toaster };
|