@studiolxd/brand 39.0.0 → 40.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 +107 -0
- package/dist/_shared/brandmessagescontext.js +15 -0
- package/dist/_shared/calendargrid.js +42 -42
- package/dist/_shared/datepicker.js +41 -41
- package/dist/_shared/imagecropdialog.js +54 -54
- package/dist/_shared/tokens.js +1 -0
- package/dist/_types/messages/BrandMessages.d.ts +26 -0
- package/dist/_types/messages/BrandMessagesContext.d.ts +21 -0
- package/dist/_types/messages/BrandMessagesProvider.d.ts +46 -0
- package/dist/_types/messages/index.d.ts +5 -0
- package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
- package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +27 -5
- package/dist/_types/organisms/DataTable/DataTable.d.ts +3 -2
- package/dist/accordion.js +26 -26
- package/dist/alert.js +26 -26
- package/dist/annotation-thread.css +1 -1
- package/dist/annotation-thread.js +37 -26
- package/dist/app-header.js +8 -8
- package/dist/app-launcher.js +34 -34
- package/dist/app-shell.js +14 -14
- package/dist/assistant-message.js +8 -8
- package/dist/async-multi-select-field.js +9 -9
- package/dist/async-multi-select.js +40 -40
- package/dist/async-select-field.js +9 -9
- package/dist/async-select.js +64 -64
- package/dist/avatar-upload.js +40 -40
- package/dist/avatar.js +5 -5
- package/dist/banner.js +9 -9
- package/dist/brand.css +2 -1
- package/dist/button.js +7 -7
- package/dist/calendar-planner.js +16 -16
- package/dist/calendar.js +38 -38
- package/dist/card.js +28 -28
- package/dist/carousel.js +19 -19
- package/dist/chart.js +137 -137
- package/dist/chat-shell.js +23 -23
- package/dist/checkbox-field.js +11 -11
- package/dist/checkbox.js +7 -7
- package/dist/close-button.js +6 -6
- package/dist/code-block.js +15 -15
- package/dist/code.js +5 -5
- package/dist/collapsible.js +1 -1
- package/dist/columns.js +7 -7
- package/dist/command-palette.js +14 -14
- package/dist/confirm-dialog.js +10 -10
- package/dist/connector-auth-shell.js +9 -9
- package/dist/consent.js +23 -23
- package/dist/container.js +6 -6
- package/dist/conversation-list.js +19 -19
- package/dist/conversation-thread.js +15 -15
- package/dist/copy-button.js +9 -9
- package/dist/copyable-value.js +17 -17
- package/dist/data-table.js +29 -29
- package/dist/date-picker-field.js +9 -9
- package/dist/date-time-field.js +12 -12
- package/dist/description-list.js +12 -12
- package/dist/docs-search.js +1 -1
- package/dist/dots-button.js +7 -7
- package/dist/dropdown-field.js +13 -13
- package/dist/email.js +44 -44
- package/dist/error-text.js +4 -4
- package/dist/field-row.js +20 -20
- package/dist/figure.js +8 -8
- package/dist/file-upload-field.js +9 -9
- package/dist/file-upload.js +29 -29
- package/dist/filter-bar.js +10 -10
- package/dist/floating-dock.js +17 -17
- package/dist/form-field.js +43 -43
- package/dist/form.js +14 -14
- package/dist/heading.js +5 -5
- package/dist/input-field.js +20 -20
- package/dist/input-phone-field.js +9 -9
- package/dist/input-phone.js +19 -19
- package/dist/input.js +5 -5
- package/dist/kbd.js +5 -5
- package/dist/label.js +5 -5
- package/dist/link.js +7 -7
- package/dist/list.js +7 -7
- package/dist/menu-button.js +7 -7
- package/dist/message-bubble.js +5 -5
- package/dist/message-composer.js +13 -13
- package/dist/messages.js +12 -0
- package/dist/multi-select-field.js +9 -9
- package/dist/multi-select.js +52 -52
- package/dist/notification-button.js +8 -8
- package/dist/notification-panel.js +25 -25
- package/dist/number-input-field.js +9 -9
- package/dist/number-input.js +11 -11
- package/dist/otp-field.js +9 -9
- package/dist/otp-input.js +48 -48
- package/dist/pagination.js +92 -89
- package/dist/paragraph.js +5 -5
- package/dist/password-field.js +15 -15
- package/dist/prose.js +4 -4
- package/dist/public-page-shell.js +11 -11
- package/dist/radio-field.js +11 -11
- package/dist/radio-group.js +5 -5
- package/dist/radio.js +5 -5
- package/dist/scroll-area.js +11 -11
- package/dist/search-form.js +8 -8
- package/dist/select-field.js +9 -9
- package/dist/select.js +85 -85
- package/dist/separator.js +6 -6
- package/dist/sidebar.js +16 -16
- package/dist/site-header.js +14 -14
- package/dist/site-shell.js +6 -6
- package/dist/sparkline.js +9 -9
- package/dist/star-rating.js +24 -24
- package/dist/stat-tile.js +12 -12
- package/dist/steps.js +32 -32
- package/dist/switcher-field.js +13 -13
- package/dist/switcher.js +8 -8
- package/dist/table-of-contents.js +14 -14
- package/dist/tag.js +5 -5
- package/dist/text.js +7 -7
- package/dist/textarea-field.js +11 -11
- package/dist/textarea.js +5 -5
- package/dist/time-field.js +9 -9
- package/dist/time-select.js +17 -17
- package/dist/toaster.js +16 -16
- package/dist/toggle-group.js +7 -7
- package/dist/toggle.js +5 -5
- package/dist/tokens.css +2 -1
- package/dist/tooltip.js +16 -16
- package/dist/tree-view.js +41 -41
- package/dist/uptime-bars.js +34 -34
- package/dist/user-message.js +8 -8
- package/dist/visually-hidden.js +5 -5
- package/package.json +5 -1
- package/src/tokens/molecules/annotation-thread.css +1 -0
- package/src/tokens/scss/molecules/_annotation-thread.scss +1 -0
- package/src/tokens/tokens.json +1 -0
package/dist/radio-group.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './radio-group.css';
|
|
3
3
|
import { t as e } from "./_shared/radiogroupcontext.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useCallback as t, useId as n, useState as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/stories/atoms/RadioGroup/RadioGroup.tsx
|
|
7
7
|
function a({ value: a, defaultValue: o, onValueChange: s, name: c, disabled: l, size: u, error: d, orientation: f = "vertical", children: p, className: m, ...h }) {
|
|
8
|
-
let g =
|
|
8
|
+
let g = n(), [_, v] = r(o), y = a !== void 0, b = y ? a : _, x = t((e) => {
|
|
9
9
|
y || v(e), s?.(e);
|
|
10
10
|
}, [y, s]), S = [
|
|
11
11
|
"radio-group",
|
|
12
12
|
f === "horizontal" ? "radio-group--horizontal" : "",
|
|
13
13
|
m ?? ""
|
|
14
14
|
].filter(Boolean).join(" ");
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ i(e.Provider, {
|
|
16
16
|
value: {
|
|
17
17
|
name: c ?? g,
|
|
18
18
|
value: b,
|
|
@@ -21,7 +21,7 @@ function a({ value: a, defaultValue: o, onValueChange: s, name: c, disabled: l,
|
|
|
21
21
|
size: u,
|
|
22
22
|
error: d
|
|
23
23
|
},
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ i("div", {
|
|
25
25
|
role: "radiogroup",
|
|
26
26
|
className: S,
|
|
27
27
|
...h,
|
package/dist/radio.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './radio.css';
|
|
3
3
|
import { n as e } from "./_shared/radiogroupcontext.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
6
|
//#region src/stories/atoms/Radio/Radio.tsx
|
|
7
|
-
var r =
|
|
8
|
-
let s = e(), c =
|
|
7
|
+
var r = t(function({ size: t, error: r, className: i, ...a }, o) {
|
|
8
|
+
let s = e(), c = t ?? s?.size ?? "md", l = r ?? s?.error ?? !1, u = a.name ?? s?.name, d = a.disabled ?? s?.disabled, f = a.checked ?? (s && a.value !== void 0 ? s.value === a.value : void 0), p = [
|
|
9
9
|
"radio",
|
|
10
10
|
c === "md" ? "" : `radio--${c}`,
|
|
11
11
|
l ? "radio--error" : "",
|
|
@@ -14,7 +14,7 @@ var r = n(function({ size: n, error: r, className: i, ...a }, o) {
|
|
|
14
14
|
function m(e) {
|
|
15
15
|
a.onChange?.(e), s && e.target.checked && s.select(e.target.value);
|
|
16
16
|
}
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ n("input", {
|
|
18
18
|
ref: o,
|
|
19
19
|
className: p,
|
|
20
20
|
"aria-invalid": l || void 0,
|
package/dist/scroll-area.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './scroll-area.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { forwardRef as e } from "react";
|
|
4
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
5
|
import { ScrollArea as r } from "@base-ui/react/scroll-area";
|
|
6
6
|
//#region src/stories/atoms/ScrollArea/ScrollArea.tsx
|
|
7
|
-
var i =
|
|
8
|
-
let l =
|
|
9
|
-
return /* @__PURE__ */
|
|
7
|
+
var i = e(function({ orientation: e = "vertical", label: i, children: a, className: o, ...s }, c) {
|
|
8
|
+
let l = e === "vertical" || e === "both", u = e === "horizontal" || e === "both";
|
|
9
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
10
10
|
ref: c,
|
|
11
11
|
className: ["scroll-area", o].filter(Boolean).join(" "),
|
|
12
12
|
...s,
|
|
13
13
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ t(r.Viewport, {
|
|
15
15
|
className: "scroll-area__viewport",
|
|
16
16
|
role: i ? "region" : void 0,
|
|
17
17
|
"aria-label": i,
|
|
18
18
|
children: a
|
|
19
19
|
}),
|
|
20
|
-
l && /* @__PURE__ */
|
|
20
|
+
l && /* @__PURE__ */ t(r.Scrollbar, {
|
|
21
21
|
keepMounted: !0,
|
|
22
22
|
orientation: "vertical",
|
|
23
23
|
className: "scroll-area__scrollbar",
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ t(r.Thumb, { className: "scroll-area__thumb" })
|
|
25
25
|
}),
|
|
26
|
-
u && /* @__PURE__ */
|
|
26
|
+
u && /* @__PURE__ */ t(r.Scrollbar, {
|
|
27
27
|
keepMounted: !0,
|
|
28
28
|
orientation: "horizontal",
|
|
29
29
|
className: "scroll-area__scrollbar",
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ t(r.Thumb, { className: "scroll-area__thumb" })
|
|
31
31
|
}),
|
|
32
|
-
l && u && /* @__PURE__ */
|
|
32
|
+
l && u && /* @__PURE__ */ t(r.Corner, { className: "scroll-area__corner" })
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
35
|
});
|
package/dist/search-form.js
CHANGED
|
@@ -3,11 +3,11 @@ import './search-form.css';
|
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
4
|
import { n as t } from "./_shared/form-size.js";
|
|
5
5
|
import { InputField as n } from "./input-field.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { forwardRef as r, useId as i } from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
8
|
//#region src/stories/molecules/SearchForm/SearchForm.tsx
|
|
9
|
-
var s =
|
|
10
|
-
let x = t(v === "xl" ? void 0 : v), S = v === "xl" ? "xl" : x, C = S === "xl" ? "lg" : S, w =
|
|
9
|
+
var s = r(function({ id: r, name: s = "q", value: c, defaultValue: l, onChange: u, onSubmit: d, action: f, method: p = "get", label: m = "Buscar", labelHidden: h = !0, placeholder: g = "Buscar…", submitLabel: _ = "Buscar", size: v, disabled: y }, b) {
|
|
10
|
+
let x = t(v === "xl" ? void 0 : v), S = v === "xl" ? "xl" : x, C = S === "xl" ? "lg" : S, w = i(), T = r ?? w;
|
|
11
11
|
function E(e) {
|
|
12
12
|
let t = String(new FormData(e.currentTarget).get(s) ?? "").trim();
|
|
13
13
|
if (d) {
|
|
@@ -16,14 +16,14 @@ var s = a(function({ id: a, name: s = "q", value: c, defaultValue: l, onChange:
|
|
|
16
16
|
}
|
|
17
17
|
t || e.preventDefault();
|
|
18
18
|
}
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ o("form", {
|
|
20
20
|
className: ["search-form", S === "md" ? "" : `search-form--${S}`].filter(Boolean).join(" "),
|
|
21
21
|
role: "search",
|
|
22
22
|
"aria-label": m,
|
|
23
23
|
action: f,
|
|
24
24
|
method: p,
|
|
25
25
|
onSubmit: E,
|
|
26
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ a(n, {
|
|
27
27
|
ref: b,
|
|
28
28
|
className: "search-form__field",
|
|
29
29
|
id: T,
|
|
@@ -39,12 +39,12 @@ var s = a(function({ id: a, name: s = "q", value: c, defaultValue: l, onChange:
|
|
|
39
39
|
disabled: y,
|
|
40
40
|
size: C,
|
|
41
41
|
onChange: u
|
|
42
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ a("button", {
|
|
43
43
|
className: "search-form__submit",
|
|
44
44
|
type: "submit",
|
|
45
45
|
disabled: y,
|
|
46
46
|
"aria-label": _,
|
|
47
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ a(e, {
|
|
48
48
|
name: "arrow",
|
|
49
49
|
className: "search-form__submit-glyph"
|
|
50
50
|
})
|
package/dist/select-field.js
CHANGED
|
@@ -5,8 +5,8 @@ import { ErrorText as t } from "./error-text.js";
|
|
|
5
5
|
import { Label as n } from "./label.js";
|
|
6
6
|
import { Select as r, isSelectOptionGroup as i } from "./select.js";
|
|
7
7
|
import { n as a } from "./_shared/field-labels.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { forwardRef as o, useId as s } from "react";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
10
|
//#region src/stories/molecules/SelectField/SelectField.tsx
|
|
11
11
|
var u = "__empty__";
|
|
12
12
|
function d(e, t) {
|
|
@@ -21,21 +21,21 @@ function p(e) {
|
|
|
21
21
|
value: u
|
|
22
22
|
} : e;
|
|
23
23
|
}
|
|
24
|
-
var m =
|
|
25
|
-
let A = a(m), j = e(S), M =
|
|
24
|
+
var m = o(function({ id: o, label: u, labelHidden: m, options: h, value: g, defaultValue: _, placeholder: v, name: y, disabled: b, required: x, size: S, error: C = !1, errorMessage: w, helperText: T, className: E, onValueChange: D, onBlur: O }, k) {
|
|
25
|
+
let A = a(m), j = e(S), M = s(), N = o ?? M, P = w ? `${N}-error` : void 0, F = T ? `${N}-helper` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = C || !!w, R = h.some((e) => i(e) ? e.options.some((e) => e.value === "") : e.value === ""), z = R ? h.map((e) => i(e) ? {
|
|
26
26
|
...e,
|
|
27
27
|
options: e.options.map(p)
|
|
28
28
|
} : p(e)) : h;
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ l("div", {
|
|
30
30
|
className: ["select-field", E].filter(Boolean).join(" "),
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ c(n, {
|
|
33
33
|
htmlFor: N,
|
|
34
34
|
hidden: A,
|
|
35
35
|
size: j,
|
|
36
36
|
children: u
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ c(r, {
|
|
39
39
|
ref: k,
|
|
40
40
|
id: N,
|
|
41
41
|
name: y,
|
|
@@ -51,11 +51,11 @@ var m = c(function({ id: c, label: u, labelHidden: m, options: h, value: g, defa
|
|
|
51
51
|
onValueChange: D ? (e) => D(f(e)) : void 0,
|
|
52
52
|
onBlur: O
|
|
53
53
|
}),
|
|
54
|
-
w && /* @__PURE__ */
|
|
54
|
+
w && /* @__PURE__ */ c(t, {
|
|
55
55
|
id: P,
|
|
56
56
|
children: w
|
|
57
57
|
}),
|
|
58
|
-
T && /* @__PURE__ */
|
|
58
|
+
T && /* @__PURE__ */ c("span", {
|
|
59
59
|
id: F,
|
|
60
60
|
className: "select-field__helper",
|
|
61
61
|
children: T
|
package/dist/select.js
CHANGED
|
@@ -1,145 +1,145 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './select.css';
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Children as t, createContext as n, forwardRef as r, isValidElement as i, useContext as a, useMemo as o } from "react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
6
|
import { Select as l } from "@base-ui/react/select";
|
|
7
7
|
//#region src/stories/atoms/Select/Select.tsx
|
|
8
8
|
function u(e) {
|
|
9
9
|
return Array.isArray(e.options);
|
|
10
10
|
}
|
|
11
|
-
var d =
|
|
12
|
-
function f(e,
|
|
13
|
-
|
|
14
|
-
if (!
|
|
15
|
-
let
|
|
16
|
-
if (e.type === v || typeof
|
|
17
|
-
typeof
|
|
11
|
+
var d = n(null);
|
|
12
|
+
function f(e, n) {
|
|
13
|
+
t.forEach(e, (e) => {
|
|
14
|
+
if (!i(e)) return;
|
|
15
|
+
let t = e.props ?? {};
|
|
16
|
+
if (e.type === v || typeof t.value == "string" && e.type !== p) {
|
|
17
|
+
typeof t.value == "string" && n.set(t.value, t.children);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
t.children != null && f(t.children, n);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function p({ children: e, onValueChange:
|
|
24
|
-
let
|
|
23
|
+
function p({ children: e, onValueChange: t, ...n }) {
|
|
24
|
+
let r = o(() => {
|
|
25
25
|
let t = /* @__PURE__ */ new Map();
|
|
26
26
|
return f(e, t), t;
|
|
27
27
|
}, [e]);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
value:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
onValueChange:
|
|
32
|
-
...
|
|
28
|
+
return /* @__PURE__ */ s(d.Provider, {
|
|
29
|
+
value: r,
|
|
30
|
+
children: /* @__PURE__ */ s(l.Root, {
|
|
31
|
+
onValueChange: t ? (e) => t(e) : void 0,
|
|
32
|
+
...n,
|
|
33
33
|
children: e
|
|
34
34
|
})
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var m =
|
|
38
|
-
let
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
ref:
|
|
41
|
-
...
|
|
42
|
-
children: (
|
|
37
|
+
var m = r(function({ placeholder: e, children: t, ...n }, r) {
|
|
38
|
+
let i = a(d);
|
|
39
|
+
return /* @__PURE__ */ s(l.Value, {
|
|
40
|
+
ref: r,
|
|
41
|
+
...n,
|
|
42
|
+
children: (n) => typeof t == "function" ? t(n) : t ?? (n == null || n === "" ? e ?? null : i?.get(n) ?? n)
|
|
43
43
|
});
|
|
44
|
-
}), h =
|
|
45
|
-
let
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
ref:
|
|
48
|
-
className:
|
|
49
|
-
...
|
|
50
|
-
children:
|
|
44
|
+
}), h = r(function({ className: e, children: t, ...n }, r) {
|
|
45
|
+
let i = ["select__group", e ?? ""].filter(Boolean).join(" ");
|
|
46
|
+
return /* @__PURE__ */ s(l.Group, {
|
|
47
|
+
ref: r,
|
|
48
|
+
className: i,
|
|
49
|
+
...n,
|
|
50
|
+
children: t
|
|
51
51
|
});
|
|
52
|
-
}), g =
|
|
53
|
-
let
|
|
52
|
+
}), g = r(function({ size: t = "md", className: n, children: r, ...i }, a) {
|
|
53
|
+
let o = [
|
|
54
54
|
"select",
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
t === "md" ? "" : `select--${t}`,
|
|
56
|
+
n ?? ""
|
|
57
57
|
].filter(Boolean).join(" ");
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
ref:
|
|
60
|
-
className:
|
|
61
|
-
...
|
|
62
|
-
children: [
|
|
58
|
+
return /* @__PURE__ */ c(l.Trigger, {
|
|
59
|
+
ref: a,
|
|
60
|
+
className: o,
|
|
61
|
+
...i,
|
|
62
|
+
children: [r, /* @__PURE__ */ s(e, {
|
|
63
63
|
name: "chevron",
|
|
64
64
|
className: "select__icon",
|
|
65
|
-
size:
|
|
65
|
+
size: t === "sm" ? "xs" : t === "lg" ? "md" : "sm"
|
|
66
66
|
})]
|
|
67
67
|
});
|
|
68
|
-
}), _ =
|
|
68
|
+
}), _ = r(function({ size: e = "md", container: t, className: n, children: r, side: i = "bottom", align: a = "start", sideOffset: o = -1, ...c }, u) {
|
|
69
69
|
let d = [
|
|
70
70
|
"select__content",
|
|
71
71
|
e === "md" ? "" : `select__content--${e}`,
|
|
72
|
-
|
|
72
|
+
n ?? ""
|
|
73
73
|
].filter(Boolean).join(" ");
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
container:
|
|
76
|
-
children: /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ s(l.Portal, {
|
|
75
|
+
container: t,
|
|
76
|
+
children: /* @__PURE__ */ s(l.Positioner, {
|
|
77
77
|
className: "select__positioner",
|
|
78
|
-
side:
|
|
79
|
-
align:
|
|
80
|
-
sideOffset:
|
|
78
|
+
side: i,
|
|
79
|
+
align: a,
|
|
80
|
+
sideOffset: o,
|
|
81
81
|
alignItemWithTrigger: !1,
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ s(l.Popup, {
|
|
83
83
|
ref: u,
|
|
84
84
|
className: d,
|
|
85
85
|
...c,
|
|
86
|
-
children:
|
|
86
|
+
children: r
|
|
87
87
|
})
|
|
88
88
|
})
|
|
89
89
|
});
|
|
90
|
-
}), v =
|
|
91
|
-
let
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
ref:
|
|
94
|
-
className:
|
|
95
|
-
...
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
});
|
|
98
|
-
}), y = a(function({ className: e, children: n, ...r }, i) {
|
|
99
|
-
let a = ["select__label", e ?? ""].filter(Boolean).join(" ");
|
|
100
|
-
return /* @__PURE__ */ t(l.GroupLabel, {
|
|
101
|
-
ref: i,
|
|
102
|
-
className: a,
|
|
103
|
-
...r,
|
|
104
|
-
children: n
|
|
90
|
+
}), v = r(function({ className: e, children: t, ...n }, r) {
|
|
91
|
+
let i = ["select__item", e ?? ""].filter(Boolean).join(" ");
|
|
92
|
+
return /* @__PURE__ */ s(l.Item, {
|
|
93
|
+
ref: r,
|
|
94
|
+
className: i,
|
|
95
|
+
...n,
|
|
96
|
+
children: /* @__PURE__ */ s(l.ItemText, { children: t })
|
|
105
97
|
});
|
|
106
|
-
}),
|
|
107
|
-
let i = ["
|
|
108
|
-
return /* @__PURE__ */
|
|
98
|
+
}), y = r(function({ className: e, children: t, ...n }, r) {
|
|
99
|
+
let i = ["select__label", e ?? ""].filter(Boolean).join(" ");
|
|
100
|
+
return /* @__PURE__ */ s(l.GroupLabel, {
|
|
109
101
|
ref: r,
|
|
110
102
|
className: i,
|
|
111
|
-
...n
|
|
103
|
+
...n,
|
|
104
|
+
children: t
|
|
105
|
+
});
|
|
106
|
+
}), b = r(function({ className: e, ...t }, n) {
|
|
107
|
+
let r = ["select__separator", e ?? ""].filter(Boolean).join(" ");
|
|
108
|
+
return /* @__PURE__ */ s(l.Separator, {
|
|
109
|
+
ref: n,
|
|
110
|
+
className: r,
|
|
111
|
+
...t
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
|
-
function x({ value: e, label:
|
|
115
|
-
return /* @__PURE__ */
|
|
114
|
+
function x({ value: e, label: t, "aria-label": n }) {
|
|
115
|
+
return /* @__PURE__ */ s(v, {
|
|
116
116
|
value: e,
|
|
117
|
-
"aria-label":
|
|
118
|
-
children:
|
|
117
|
+
"aria-label": n,
|
|
118
|
+
children: t
|
|
119
119
|
}, e);
|
|
120
120
|
}
|
|
121
|
-
var S =
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
value:
|
|
124
|
-
defaultValue:
|
|
125
|
-
disabled:
|
|
126
|
-
readOnly:
|
|
121
|
+
var S = r(function({ options: e, value: t, defaultValue: n, placeholder: r = "Seleccionar…", disabled: i, readOnly: a, size: o = "md", onValueChange: l, id: d, name: f, required: v, onBlur: b, "aria-label": S, "aria-describedby": C, "aria-invalid": w, container: T }, E) {
|
|
122
|
+
return /* @__PURE__ */ c(p, {
|
|
123
|
+
value: t,
|
|
124
|
+
defaultValue: n,
|
|
125
|
+
disabled: i,
|
|
126
|
+
readOnly: a,
|
|
127
127
|
name: f,
|
|
128
128
|
required: v,
|
|
129
129
|
onValueChange: l,
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ s(g, {
|
|
131
131
|
ref: E,
|
|
132
|
-
size:
|
|
132
|
+
size: o,
|
|
133
133
|
id: d,
|
|
134
134
|
onBlur: b,
|
|
135
135
|
"aria-label": S,
|
|
136
136
|
"aria-describedby": C,
|
|
137
137
|
"aria-invalid": w || void 0,
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
}), /* @__PURE__ */
|
|
140
|
-
size:
|
|
138
|
+
children: /* @__PURE__ */ s(m, { placeholder: r })
|
|
139
|
+
}), /* @__PURE__ */ s(_, {
|
|
140
|
+
size: o,
|
|
141
141
|
container: T,
|
|
142
|
-
children: e.map((e,
|
|
142
|
+
children: e.map((e, t) => u(e) ? /* @__PURE__ */ c(h, { children: [/* @__PURE__ */ s(y, { children: e.label }), e.options.map(x)] }, `group-${t}`) : x(e))
|
|
143
143
|
})]
|
|
144
144
|
});
|
|
145
145
|
}), C = Object.assign(S, {
|
package/dist/separator.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import './separator.css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/stories/atoms/Separator/Separator.tsx
|
|
5
|
-
var n =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
var n = e(function({ orientation: e = "horizontal", decorative: n = !0, spacing: r = "md", className: i, ...a }, o) {
|
|
6
|
+
return /* @__PURE__ */ t("hr", {
|
|
7
7
|
ref: o,
|
|
8
8
|
className: [
|
|
9
9
|
"separator",
|
|
10
|
-
|
|
10
|
+
e === "vertical" ? "separator--vertical" : "",
|
|
11
11
|
r === "md" ? "" : `separator--${r}`,
|
|
12
12
|
i ?? ""
|
|
13
13
|
].filter(Boolean).join(" "),
|
|
14
|
-
...n ? { role: "none" } :
|
|
14
|
+
...n ? { role: "none" } : e === "vertical" ? { "aria-orientation": "vertical" } : {},
|
|
15
15
|
...a
|
|
16
16
|
});
|
|
17
17
|
});
|
package/dist/sidebar.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import './sidebar.css';
|
|
3
3
|
import { n as e, t } from "./_shared/sidebarcontext.js";
|
|
4
4
|
import { t as n } from "./_shared/appshellcontext.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useCallback as r, useContext as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
//#region src/stories/sections/Sidebar/Sidebar.tsx
|
|
8
8
|
function u(e, t) {
|
|
9
9
|
let n = document.createElement("div");
|
|
@@ -12,8 +12,8 @@ function u(e, t) {
|
|
|
12
12
|
return n.remove(), r;
|
|
13
13
|
}
|
|
14
14
|
function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral", resizerLabel: h = "Ancho de la barra lateral", resizerValueText: g = (e) => `${e} píxeles`, mode: _ }) {
|
|
15
|
-
let v =
|
|
16
|
-
|
|
15
|
+
let v = i(n), y = v ? v.sidebar : _ ?? "open", b = v ? v.isDesktop : !0, x = b && y === "rail", S = !b, C = o(null), w = o(null), [T, E] = s(null);
|
|
16
|
+
a(() => {
|
|
17
17
|
let e = C.current;
|
|
18
18
|
if (!e) return;
|
|
19
19
|
let t = {
|
|
@@ -26,7 +26,7 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
|
|
|
26
26
|
}, []);
|
|
27
27
|
let D = (e) => {
|
|
28
28
|
!S || !v || e.target.closest("a[href], [aria-haspopup=\"dialog\"]") && v.closeSidebar();
|
|
29
|
-
}, O =
|
|
29
|
+
}, O = r((e) => {
|
|
30
30
|
let t = C.current;
|
|
31
31
|
if (!t || !v) return;
|
|
32
32
|
let n = u(t, "--sidebar-min-width"), r = u(t, "--sidebar-max-width");
|
|
@@ -45,7 +45,7 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
|
|
|
45
45
|
let t = u(C.current, "--sidebar-resize-step-px"), n = C.current.getBoundingClientRect().width;
|
|
46
46
|
e.key === "ArrowLeft" && (e.preventDefault(), O(n - t)), e.key === "ArrowRight" && (e.preventDefault(), y === "open" ? O(n + t) : v.setSidebar("open")), e.key === "Home" && (e.preventDefault(), v.setSidebar("rail")), e.key === "End" && (e.preventDefault(), O(u(C.current, "--sidebar-max-width")));
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
a(() => {
|
|
49
49
|
if (!S) return;
|
|
50
50
|
if (y === "open") {
|
|
51
51
|
w.current = document.activeElement, C.current?.focus();
|
|
@@ -55,9 +55,9 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
|
|
|
55
55
|
(e && t instanceof Node && e.contains(t) || t === document.body || t === null) && w.current?.focus?.(), w.current = null;
|
|
56
56
|
}, [S, y]);
|
|
57
57
|
let j = Math.round(y === "rail" ? T?.rail ?? 0 : (v?.sidebarWidth || T?.base) ?? 0), M = ["sidebar", S ? "sidebar--drawer" : `sidebar--${y}`].join(" ");
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ c(t.Provider, {
|
|
59
59
|
value: { rail: x },
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ l("aside", {
|
|
61
61
|
ref: C,
|
|
62
62
|
id: p,
|
|
63
63
|
className: M,
|
|
@@ -68,23 +68,23 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
|
|
|
68
68
|
tabIndex: S ? -1 : void 0,
|
|
69
69
|
inert: S && y === "closed" ? !0 : void 0,
|
|
70
70
|
onClick: D,
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ l("div", {
|
|
72
72
|
className: "sidebar__inner",
|
|
73
73
|
children: [
|
|
74
|
-
e && /* @__PURE__ */
|
|
74
|
+
e && /* @__PURE__ */ c("div", {
|
|
75
75
|
className: "sidebar__header",
|
|
76
76
|
children: e
|
|
77
77
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ c("div", {
|
|
79
79
|
className: "sidebar__panel",
|
|
80
80
|
children: d
|
|
81
81
|
}),
|
|
82
|
-
f && /* @__PURE__ */
|
|
82
|
+
f && /* @__PURE__ */ c("div", {
|
|
83
83
|
className: "sidebar__footer",
|
|
84
84
|
children: f
|
|
85
85
|
})
|
|
86
86
|
]
|
|
87
|
-
}), b && v && y !== "closed" && /* @__PURE__ */
|
|
87
|
+
}), b && v && y !== "closed" && /* @__PURE__ */ c("div", {
|
|
88
88
|
className: "sidebar__resizer",
|
|
89
89
|
role: "separator",
|
|
90
90
|
"aria-orientation": "vertical",
|
|
@@ -101,19 +101,19 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
function f({ className: e, ...t }) {
|
|
104
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ c("div", {
|
|
105
105
|
className: ["sidebar__group", e].filter(Boolean).join(" "),
|
|
106
106
|
...t
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function p({ className: e, ...t }) {
|
|
110
|
-
return /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ c("div", {
|
|
111
111
|
className: ["sidebar__group-content", e].filter(Boolean).join(" "),
|
|
112
112
|
...t
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
function m({ className: e, ...t }) {
|
|
116
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ c("hr", {
|
|
117
117
|
className: ["sidebar__separator", e].filter(Boolean).join(" "),
|
|
118
118
|
...t
|
|
119
119
|
});
|
package/dist/site-header.js
CHANGED
|
@@ -3,20 +3,20 @@ import './site-header.css';
|
|
|
3
3
|
import { Container as e } from "./container.js";
|
|
4
4
|
import { MenuButton as t } from "./menu-button.js";
|
|
5
5
|
import { t as n } from "./_shared/logo.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
//#region src/stories/sections/SiteHeader/SiteHeader.tsx
|
|
9
9
|
function c({ children: e, ...t }) {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ o("a", {
|
|
11
11
|
...t,
|
|
12
12
|
children: e
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", menuLabel: d = "Menú de navegación", menuCloseLabel: f, logoSize: p = "xxl", logo: m = /* @__PURE__ */
|
|
16
|
-
let [T, E] =
|
|
15
|
+
function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", menuLabel: d = "Menú de navegación", menuCloseLabel: f, logoSize: p = "xxl", logo: m = /* @__PURE__ */ o(n, { size: p }), menuButtonSize: h = "lg", renderLogoLink: g = c, width: _ = "xl", open: v, onOpenChange: y, children: b, settings: x, panelId: S = "site-header-panel", actions: C, language: w }) {
|
|
16
|
+
let [T, E] = a(!1), D = v !== void 0, O = D ? v : T, k = !!(b || x || w), A = i(null), j = i(null), M = (e) => {
|
|
17
17
|
D || E(e), y?.(e);
|
|
18
18
|
};
|
|
19
|
-
return
|
|
19
|
+
return r(() => {
|
|
20
20
|
if (!O) return;
|
|
21
21
|
let e = (e) => {
|
|
22
22
|
e.key === "Escape" && (M(!1), j.current?.focus());
|
|
@@ -29,10 +29,10 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
|
|
|
29
29
|
return document.body.style.overflow = "hidden", () => {
|
|
30
30
|
document.removeEventListener("keydown", e), document.removeEventListener("pointerdown", t), document.body.style.overflow = n;
|
|
31
31
|
};
|
|
32
|
-
}, [O]), /* @__PURE__ */
|
|
32
|
+
}, [O]), /* @__PURE__ */ o("header", {
|
|
33
33
|
ref: A,
|
|
34
34
|
className: "site-header",
|
|
35
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ s(e, {
|
|
36
36
|
width: _,
|
|
37
37
|
innerClassName: "site-header__bar",
|
|
38
38
|
children: [
|
|
@@ -42,12 +42,12 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
|
|
|
42
42
|
"aria-label": u,
|
|
43
43
|
children: m
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ s("div", {
|
|
46
46
|
className: "site-header__controls",
|
|
47
|
-
children: [C && /* @__PURE__ */
|
|
47
|
+
children: [C && /* @__PURE__ */ o("div", {
|
|
48
48
|
className: "site-header__actions",
|
|
49
49
|
children: C
|
|
50
|
-
}), k && /* @__PURE__ */
|
|
50
|
+
}), k && /* @__PURE__ */ o(t, {
|
|
51
51
|
ref: j,
|
|
52
52
|
isOpen: O,
|
|
53
53
|
onClick: () => M(!O),
|
|
@@ -57,16 +57,16 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
|
|
|
57
57
|
"aria-controls": S
|
|
58
58
|
})]
|
|
59
59
|
}),
|
|
60
|
-
k && /* @__PURE__ */
|
|
60
|
+
k && /* @__PURE__ */ o("div", {
|
|
61
61
|
className: ["site-header__panel", O ? "site-header__panel--open" : ""].filter(Boolean).join(" "),
|
|
62
62
|
id: S,
|
|
63
63
|
inert: !O,
|
|
64
64
|
"aria-hidden": !O,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ s(e, {
|
|
66
66
|
width: _,
|
|
67
67
|
space: "none",
|
|
68
68
|
innerClassName: "site-header__panel-inner",
|
|
69
|
-
children: [b, (w || x) && /* @__PURE__ */
|
|
69
|
+
children: [b, (w || x) && /* @__PURE__ */ s("div", {
|
|
70
70
|
className: "site-header__settings",
|
|
71
71
|
children: [w, x]
|
|
72
72
|
})]
|