@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/multi-select.js
CHANGED
|
@@ -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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
10
|
+
function d(e, t) {
|
|
10
11
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
11
12
|
}
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
let t =
|
|
16
|
-
|
|
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
|
|
19
|
-
|
|
19
|
+
function J(e) {
|
|
20
|
+
g || _ || (P(!0), R(r.length === 0 ? -1 : e));
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
22
|
+
function Y() {
|
|
23
|
+
P(!1), R(-1), U.current = "";
|
|
23
24
|
}
|
|
24
|
-
function
|
|
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 &&
|
|
29
|
+
if (e instanceof Node && z.current?.contains(e)) return;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
Y();
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
35
|
-
let t = Date.now(),
|
|
36
|
-
|
|
37
|
-
let i =
|
|
38
|
-
for (let e = 0; e <
|
|
39
|
-
let t = (i + e) %
|
|
40
|
-
if (
|
|
41
|
-
|
|
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
|
|
47
|
-
if (
|
|
48
|
-
let t =
|
|
49
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
50
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
51
|
-
else if (e.key === "Home") e.preventDefault(),
|
|
52
|
-
else if (e.key === "End") e.preventDefault(),
|
|
53
|
-
else if (e.key === "Enter" || e.key === " ") e.preventDefault(),
|
|
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 (!
|
|
56
|
-
e.preventDefault(),
|
|
57
|
-
} else e.key === "Tab" ?
|
|
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
|
|
60
|
-
|
|
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
|
-
|
|
63
|
-
!
|
|
63
|
+
i(() => {
|
|
64
|
+
!N || L < 0 || document.getElementById(K(L))?.scrollIntoView({ block: "nearest" });
|
|
64
65
|
}, [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
N,
|
|
67
|
+
L,
|
|
68
|
+
H
|
|
68
69
|
]);
|
|
69
|
-
let
|
|
70
|
+
let ee = [
|
|
70
71
|
"multi-select",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
].filter(Boolean).join(" "),
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
open:
|
|
78
|
-
onOpenChange:
|
|
79
|
-
children: [/* @__PURE__ */
|
|
80
|
-
ref:
|
|
81
|
-
className:
|
|
82
|
-
"data-popup-open":
|
|
83
|
-
onPointerDown:
|
|
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__ */
|
|
86
|
+
/* @__PURE__ */ l("div", {
|
|
86
87
|
className: "multi-select__values",
|
|
87
|
-
children: [
|
|
88
|
-
let
|
|
89
|
-
return
|
|
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__ */
|
|
92
|
+
children: [/* @__PURE__ */ c("span", {
|
|
92
93
|
className: "multi-select__pill-label",
|
|
93
|
-
children:
|
|
94
|
-
}), !
|
|
94
|
+
children: n.label
|
|
95
|
+
}), !g && !_ && /* @__PURE__ */ c("button", {
|
|
95
96
|
type: "button",
|
|
96
97
|
className: "multi-select__pill-remove",
|
|
97
|
-
"aria-label":
|
|
98
|
+
"aria-label": j("remove", O)(n.label),
|
|
98
99
|
tabIndex: -1,
|
|
99
100
|
onClick: (t) => {
|
|
100
|
-
t.stopPropagation(),
|
|
101
|
+
t.stopPropagation(), q(e), B.current?.focus();
|
|
101
102
|
},
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ c(t, {
|
|
103
104
|
name: "close",
|
|
104
105
|
size: "xs"
|
|
105
106
|
})
|
|
106
107
|
})]
|
|
107
108
|
}, e) : null;
|
|
108
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ c("div", {
|
|
109
110
|
ref: (e) => {
|
|
110
|
-
|
|
111
|
+
B.current = e, d(A, e);
|
|
111
112
|
},
|
|
112
113
|
className: "multi-select__combobox",
|
|
113
|
-
tabIndex:
|
|
114
|
+
tabIndex: g ? -1 : 0,
|
|
114
115
|
role: "combobox",
|
|
115
|
-
"aria-expanded":
|
|
116
|
+
"aria-expanded": N,
|
|
116
117
|
"aria-haspopup": "listbox",
|
|
117
|
-
"aria-controls":
|
|
118
|
-
"aria-activedescendant":
|
|
119
|
-
"aria-label":
|
|
120
|
-
"aria-labelledby":
|
|
121
|
-
"aria-describedby":
|
|
122
|
-
"aria-invalid":
|
|
123
|
-
"aria-disabled":
|
|
124
|
-
"aria-readonly":
|
|
125
|
-
id:
|
|
126
|
-
onKeyDown:
|
|
127
|
-
onBlur:
|
|
128
|
-
children:
|
|
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:
|
|
131
|
+
children: j("placeholder", h)
|
|
131
132
|
})
|
|
132
133
|
})]
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ c(t, {
|
|
135
136
|
name: "chevron",
|
|
136
137
|
className: "multi-select__icon"
|
|
137
138
|
}),
|
|
138
|
-
|
|
139
|
+
x && G.map((e) => /* @__PURE__ */ c("input", {
|
|
139
140
|
type: "hidden",
|
|
140
|
-
name:
|
|
141
|
+
name: x,
|
|
141
142
|
value: e
|
|
142
143
|
}, e))
|
|
143
144
|
]
|
|
144
|
-
}), /* @__PURE__ */
|
|
145
|
-
container:
|
|
146
|
-
children: /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ c(u.Portal, {
|
|
146
|
+
container: M,
|
|
147
|
+
children: /* @__PURE__ */ c(u.Positioner, {
|
|
147
148
|
className: "multi-select__positioner",
|
|
148
|
-
anchor:
|
|
149
|
+
anchor: z,
|
|
149
150
|
align: "start",
|
|
150
151
|
sideOffset: -1,
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
className:
|
|
152
|
+
children: /* @__PURE__ */ c(u.Popup, {
|
|
153
|
+
className: te,
|
|
153
154
|
initialFocus: !1,
|
|
154
155
|
finalFocus: !1,
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ c("div", {
|
|
156
157
|
role: "listbox",
|
|
157
158
|
"aria-multiselectable": "true",
|
|
158
|
-
"aria-label":
|
|
159
|
-
id:
|
|
160
|
-
children:
|
|
161
|
-
let n =
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
id:
|
|
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
|
-
|
|
177
|
+
q(e.value), R(t), B.current?.focus();
|
|
177
178
|
},
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ c("span", {
|
|
179
180
|
className: "multi-select__item-check",
|
|
180
181
|
"aria-hidden": "true",
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
}), /* @__PURE__ */
|
|
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 {
|
|
193
|
+
export { p as MultiSelect };
|
package/dist/onboarding-shell.js
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './onboarding-shell.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
9
|
-
let
|
|
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:
|
|
12
|
+
children: s
|
|
12
13
|
});
|
|
13
|
-
return /* @__PURE__ */ r
|
|
14
|
-
id:
|
|
15
|
-
shell:
|
|
16
|
-
header:
|
|
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:
|
|
21
|
+
children: w
|
|
21
22
|
}),
|
|
22
|
-
preferences:
|
|
23
|
-
preferencesLabel:
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
className: ["onboarding-shell",
|
|
23
|
+
preferences: C,
|
|
24
|
+
preferencesLabel: u,
|
|
25
|
+
children: /* @__PURE__ */ a("div", {
|
|
26
|
+
className: ["onboarding-shell", y].filter(Boolean).join(" "),
|
|
26
27
|
children: [
|
|
27
|
-
!
|
|
28
|
+
!_ && w && /* @__PURE__ */ i("header", {
|
|
28
29
|
className: "onboarding-shell__top onboarding-shell__bar",
|
|
29
|
-
children:
|
|
30
|
+
children: w
|
|
30
31
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ i(t.Provider, {
|
|
32
33
|
value: "lg",
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
className: ["onboarding-shell__step",
|
|
34
|
+
children: /* @__PURE__ */ a("div", {
|
|
35
|
+
className: ["onboarding-shell__step", v === "wide" ? "onboarding-shell__step--wide" : ""].filter(Boolean).join(" "),
|
|
35
36
|
children: [
|
|
36
|
-
|
|
37
|
+
d && /* @__PURE__ */ i("div", {
|
|
37
38
|
className: "onboarding-shell__progress",
|
|
38
|
-
children:
|
|
39
|
+
children: d
|
|
39
40
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ i("div", {
|
|
41
42
|
className: "onboarding-shell__body",
|
|
42
|
-
children:
|
|
43
|
+
children: o
|
|
43
44
|
}),
|
|
44
|
-
|
|
45
|
+
S && /* @__PURE__ */ a("div", {
|
|
45
46
|
className: "onboarding-shell__actions",
|
|
46
47
|
role: "group",
|
|
47
|
-
"aria-label":
|
|
48
|
-
children: [
|
|
48
|
+
"aria-label": b("actions", h),
|
|
49
|
+
children: [p, (m || f) && /* @__PURE__ */ a("div", {
|
|
49
50
|
className: "onboarding-shell__decisions",
|
|
50
|
-
children: [
|
|
51
|
+
children: [m && /* @__PURE__ */ i("div", {
|
|
51
52
|
className: "onboarding-shell__exit",
|
|
52
|
-
children:
|
|
53
|
-
}),
|
|
53
|
+
children: m
|
|
54
|
+
}), f]
|
|
54
55
|
})]
|
|
55
56
|
})
|
|
56
57
|
]
|
|
57
58
|
})
|
|
58
59
|
}),
|
|
59
|
-
!
|
|
60
|
+
!_ && C && /* @__PURE__ */ i("section", {
|
|
60
61
|
className: "onboarding-shell__settings",
|
|
61
|
-
"aria-label":
|
|
62
|
-
children:
|
|
62
|
+
"aria-label": x("preferences", u),
|
|
63
|
+
children: C
|
|
63
64
|
})
|
|
64
65
|
]
|
|
65
66
|
})
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
//#endregion
|
|
69
|
-
export {
|
|
70
|
+
export { o as OnboardingShell };
|
package/dist/org-switcher.js
CHANGED
|
@@ -1,81 +1,86 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './org-switcher.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
defaultOpen:
|
|
14
|
-
children: [/* @__PURE__ */
|
|
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
|
-
|
|
18
|
-
|
|
19
|
+
f && !w ? "org-switcher__trigger--block" : "",
|
|
20
|
+
w ? "org-switcher__trigger--compact" : ""
|
|
19
21
|
].filter(Boolean).join(" "),
|
|
20
|
-
"aria-label":
|
|
22
|
+
"aria-label": d ?? b("trigger")(m.name),
|
|
21
23
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
src:
|
|
24
|
-
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
|
-
!
|
|
31
|
+
!w && /* @__PURE__ */ c("span", {
|
|
30
32
|
className: "org-switcher__name",
|
|
31
|
-
children:
|
|
33
|
+
children: m.name
|
|
32
34
|
}),
|
|
33
|
-
!
|
|
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__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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 {
|
|
86
|
+
export { d as OrgSwitcher };
|
package/dist/page-intro.css
CHANGED
|
@@ -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>.
|
|
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}}
|
package/dist/page-intro.js
CHANGED
|
@@ -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 {
|
|
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
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
18
|
+
c ? /* @__PURE__ */ i("div", {
|
|
16
19
|
className: "page-intro__row",
|
|
17
|
-
children: [
|
|
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:
|
|
25
|
+
children: c
|
|
20
26
|
})]
|
|
21
|
-
}) :
|
|
22
|
-
|
|
27
|
+
}) : m,
|
|
28
|
+
s && /* @__PURE__ */ r(t, {
|
|
23
29
|
size: "large",
|
|
24
|
-
children:
|
|
30
|
+
children: s
|
|
25
31
|
}),
|
|
26
|
-
|
|
32
|
+
p
|
|
27
33
|
]
|
|
28
34
|
});
|
|
29
35
|
}
|
|
30
36
|
//#endregion
|
|
31
|
-
export {
|
|
37
|
+
export { a as PageIntro };
|