@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/accordion.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './accordion.css';
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Children as t, createContext as n, useContext as r } from "react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
import { Accordion as o } from "@base-ui/react/accordion";
|
|
7
7
|
//#region src/stories/atoms/Accordion/AccordionContext.ts
|
|
8
|
-
var s =
|
|
8
|
+
var s = n(null);
|
|
9
9
|
function c() {
|
|
10
|
-
return
|
|
10
|
+
return r(s);
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/stories/atoms/Accordion/Accordion.tsx
|
|
@@ -15,10 +15,10 @@ var l = (e) => String(e).padStart(2, "0");
|
|
|
15
15
|
function u(e) {
|
|
16
16
|
if (e !== void 0) return Array.isArray(e) ? e : e === "" ? [] : [e];
|
|
17
17
|
}
|
|
18
|
-
function d({ className: e, children: n, id:
|
|
18
|
+
function d({ className: e, children: n, id: r, disabled: a, numbered: c = !1, formatIndex: d = l, ...f }) {
|
|
19
19
|
let p = f.type === "multiple", m = f.type === "single" ? f.collapsible ?? !0 : !0, h = f.value;
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
id:
|
|
20
|
+
return /* @__PURE__ */ i(o.Root, {
|
|
21
|
+
id: r,
|
|
22
22
|
disabled: a,
|
|
23
23
|
multiple: p,
|
|
24
24
|
value: u(h),
|
|
@@ -36,52 +36,52 @@ function d({ className: e, children: n, id: i, disabled: a, numbered: c = !1, fo
|
|
|
36
36
|
c ? "accordion--numbered" : "",
|
|
37
37
|
e
|
|
38
38
|
].filter(Boolean).join(" "),
|
|
39
|
-
children: c ?
|
|
39
|
+
children: c ? t.map(n, (e, t) => /* @__PURE__ */ i(s.Provider, {
|
|
40
40
|
value: {
|
|
41
|
-
index:
|
|
41
|
+
index: t + 1,
|
|
42
42
|
formatIndex: d
|
|
43
43
|
},
|
|
44
44
|
children: e
|
|
45
45
|
})) : n
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function f({ className: e, children:
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
function f({ className: e, children: t, ...n }) {
|
|
49
|
+
return /* @__PURE__ */ i(o.Item, {
|
|
50
50
|
className: ["accordion__item", e].filter(Boolean).join(" "),
|
|
51
|
-
...
|
|
52
|
-
children:
|
|
51
|
+
...n,
|
|
52
|
+
children: t
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function p({ className:
|
|
55
|
+
function p({ className: t, chevronSize: n = "sm", children: r }) {
|
|
56
56
|
let s = c();
|
|
57
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ i(o.Header, {
|
|
58
58
|
className: "accordion__header",
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
className: ["accordion__trigger",
|
|
59
|
+
children: /* @__PURE__ */ a(o.Trigger, {
|
|
60
|
+
className: ["accordion__trigger", t].filter(Boolean).join(" "),
|
|
61
61
|
children: [
|
|
62
|
-
s && /* @__PURE__ */
|
|
62
|
+
s && /* @__PURE__ */ i("span", {
|
|
63
63
|
className: "accordion__index",
|
|
64
64
|
children: s.formatIndex(s.index)
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ i("span", {
|
|
67
67
|
className: "accordion__trigger-text",
|
|
68
|
-
children:
|
|
68
|
+
children: r
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ i(e, {
|
|
71
71
|
name: "chevron",
|
|
72
72
|
className: "accordion__chevron",
|
|
73
|
-
size:
|
|
73
|
+
size: n
|
|
74
74
|
})
|
|
75
75
|
]
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function m({ className: e, children:
|
|
80
|
-
return /* @__PURE__ */
|
|
79
|
+
function m({ className: e, children: t }) {
|
|
80
|
+
return /* @__PURE__ */ i(o.Panel, {
|
|
81
81
|
className: ["accordion__content", e].filter(Boolean).join(" "),
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ i("div", {
|
|
83
83
|
className: "accordion__content-inner",
|
|
84
|
-
children:
|
|
84
|
+
children: t
|
|
85
85
|
})
|
|
86
86
|
});
|
|
87
87
|
}
|
package/dist/alert.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './alert.css';
|
|
3
3
|
import { CloseButton as e } from "./close-button.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t, useState as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/stories/molecules/Alert/Alert.tsx
|
|
7
7
|
var a = {
|
|
8
8
|
default: "status",
|
|
9
9
|
success: "status",
|
|
10
10
|
error: "alert",
|
|
11
11
|
warning: "alert"
|
|
12
|
-
}, o =
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
}, o = t(function({ className: e, children: t, ...n }, i) {
|
|
13
|
+
return /* @__PURE__ */ r("p", {
|
|
14
14
|
ref: i,
|
|
15
15
|
className: ["alert__title", e ?? ""].filter(Boolean).join(" "),
|
|
16
|
-
...
|
|
17
|
-
children:
|
|
16
|
+
...n,
|
|
17
|
+
children: t
|
|
18
18
|
});
|
|
19
|
-
}), s =
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
}), s = t(function({ className: e, children: t, ...n }, i) {
|
|
20
|
+
return /* @__PURE__ */ r("div", {
|
|
21
21
|
ref: i,
|
|
22
22
|
className: ["alert__description", e ?? ""].filter(Boolean).join(" "),
|
|
23
|
-
...
|
|
24
|
-
children:
|
|
23
|
+
...n,
|
|
24
|
+
children: t
|
|
25
25
|
});
|
|
26
|
-
}), c =
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
}), c = t(function({ className: e, children: t, ...n }, i) {
|
|
27
|
+
return /* @__PURE__ */ r("div", {
|
|
28
28
|
ref: i,
|
|
29
29
|
className: ["alert__actions", e ?? ""].filter(Boolean).join(" "),
|
|
30
|
-
...
|
|
31
|
-
children:
|
|
30
|
+
...n,
|
|
31
|
+
children: t
|
|
32
32
|
});
|
|
33
|
-
}), l =
|
|
34
|
-
let [v, y] =
|
|
33
|
+
}), l = t(function({ variant: t = "default", title: o, description: s, actions: c, dismissible: l = !1, onDismiss: u, finalFocus: d, closeLabel: f = "Cerrar", className: p, children: m, role: h, ...g }, _) {
|
|
34
|
+
let [v, y] = n(!1);
|
|
35
35
|
if (v) return null;
|
|
36
36
|
let b = [
|
|
37
37
|
"alert",
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
t === "default" ? "" : `alert--${t}`,
|
|
39
|
+
t === "success" || t === "error" ? "surface-dark" : "",
|
|
40
40
|
l ? "alert--dismissible" : "",
|
|
41
41
|
p ?? ""
|
|
42
|
-
].filter(Boolean).join(" "), x =
|
|
42
|
+
].filter(Boolean).join(" "), x = t === "default" ? " surface-invert" : "";
|
|
43
43
|
function S() {
|
|
44
44
|
if (typeof document > "u") return;
|
|
45
45
|
let e = d?.current;
|
|
@@ -53,29 +53,29 @@ var a = {
|
|
|
53
53
|
function C() {
|
|
54
54
|
S(), u ? u() : y(!0);
|
|
55
55
|
}
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ i("div", {
|
|
57
57
|
ref: _,
|
|
58
|
-
role: h ?? a[
|
|
58
|
+
role: h ?? a[t],
|
|
59
59
|
className: b,
|
|
60
60
|
...g,
|
|
61
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ i("div", {
|
|
62
62
|
className: `alert__content${x}`,
|
|
63
63
|
children: [
|
|
64
|
-
o && /* @__PURE__ */
|
|
64
|
+
o && /* @__PURE__ */ r("p", {
|
|
65
65
|
className: "alert__title",
|
|
66
66
|
children: o
|
|
67
67
|
}),
|
|
68
|
-
s && /* @__PURE__ */
|
|
68
|
+
s && /* @__PURE__ */ r("div", {
|
|
69
69
|
className: "alert__description",
|
|
70
70
|
children: s
|
|
71
71
|
}),
|
|
72
72
|
m,
|
|
73
|
-
c && /* @__PURE__ */
|
|
73
|
+
c && /* @__PURE__ */ r("div", {
|
|
74
74
|
className: "alert__actions",
|
|
75
75
|
children: c
|
|
76
76
|
})
|
|
77
77
|
]
|
|
78
|
-
}), l && /* @__PURE__ */
|
|
78
|
+
}), l && /* @__PURE__ */ r(e, {
|
|
79
79
|
className: `alert__close${x}`,
|
|
80
80
|
label: f,
|
|
81
81
|
onClick: C
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.annotation-thread{gap:var(--annotation-thread-gap);padding-block:var(--annotation-thread-padding-block);padding-inline:var(--annotation-thread-padding-inline);border:var(--annotation-thread-border-width) var(--annotation-thread-border-style) var(--annotation-thread-border-color);flex-direction:column;display:flex}.annotation-thread.annotation-thread--resolved{opacity:var(--annotation-thread-resolved-opacity)}.annotation-thread__status{display:flex}.annotation-thread__item{gap:var(--annotation-thread-item-gap);flex-direction:column;display:flex}.annotation-thread__header{align-items:center;gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__avatar{flex-shrink:0;display:inline-flex}.annotation-thread__author{font-family:var(--annotation-thread-author-font-family);font-size:var(--annotation-thread-author-font-size);font-weight:var(--annotation-thread-author-font-weight);color:var(--annotation-thread-author-color)}.annotation-thread__date,.annotation-thread__edited{font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color)}.annotation-thread__body{font-size:var(--annotation-thread-body-font-size);line-height:var(--annotation-thread-body-line-height);color:var(--annotation-thread-body-color)}.annotation-thread__item-actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__replies{gap:var(--annotation-thread-items-gap);border-inline-start:var(--annotation-thread-reply-guide-width) var(--annotation-thread-reply-guide-style) var(--annotation-thread-reply-guide-color);flex-direction:column;padding-inline-start:var(--annotation-thread-reply-indent);display:flex}.annotation-thread__replies-label{font-size:var(--annotation-thread-replies-label-font-size);color:var(--annotation-thread-replies-label-color);margin-block:0}.annotation-thread__actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}
|
|
1
|
+
.annotation-thread{gap:var(--annotation-thread-gap);padding-block:var(--annotation-thread-padding-block);padding-inline:var(--annotation-thread-padding-inline);border:var(--annotation-thread-border-width) var(--annotation-thread-border-style) var(--annotation-thread-border-color);flex-direction:column;display:flex}.annotation-thread.annotation-thread--acknowledged{opacity:var(--annotation-thread-acknowledged-opacity)}.annotation-thread.annotation-thread--resolved{opacity:var(--annotation-thread-resolved-opacity)}.annotation-thread__status{display:flex}.annotation-thread__item{gap:var(--annotation-thread-item-gap);flex-direction:column;display:flex}.annotation-thread__header{align-items:center;gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__avatar{flex-shrink:0;display:inline-flex}.annotation-thread__author{font-family:var(--annotation-thread-author-font-family);font-size:var(--annotation-thread-author-font-size);font-weight:var(--annotation-thread-author-font-weight);color:var(--annotation-thread-author-color)}.annotation-thread__date,.annotation-thread__edited{font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color)}.annotation-thread__meta{align-items:center;gap:var(--annotation-thread-header-gap);overflow-wrap:anywhere;min-inline-size:0;font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color);flex-wrap:wrap;display:inline-flex}.annotation-thread__body{font-size:var(--annotation-thread-body-font-size);line-height:var(--annotation-thread-body-line-height);color:var(--annotation-thread-body-color)}.annotation-thread__item-actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__replies{gap:var(--annotation-thread-items-gap);border-inline-start:var(--annotation-thread-reply-guide-width) var(--annotation-thread-reply-guide-style) var(--annotation-thread-reply-guide-color);flex-direction:column;padding-inline-start:var(--annotation-thread-reply-indent);display:flex}.annotation-thread__replies-label{font-size:var(--annotation-thread-replies-label-font-size);color:var(--annotation-thread-replies-label-color);margin-block:0}.annotation-thread__actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import './annotation-thread.css';
|
|
2
2
|
import { Tag as e } from "./tag.js";
|
|
3
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
3
|
import "react";
|
|
4
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
5
|
//#region src/stories/organisms/AnnotationThread/AnnotationThread.tsx
|
|
6
6
|
var r = {
|
|
7
|
+
open: "warning",
|
|
8
|
+
acknowledged: "info",
|
|
9
|
+
resolved: "success"
|
|
10
|
+
}, i = {
|
|
7
11
|
day: "numeric",
|
|
8
12
|
month: "short",
|
|
9
13
|
hour: "2-digit",
|
|
10
14
|
minute: "2-digit"
|
|
11
15
|
};
|
|
12
|
-
function
|
|
16
|
+
function a({ entry: e, locale: r, dateFormat: i, editedLabel: a }) {
|
|
13
17
|
let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(r, i).format(o);
|
|
14
18
|
return /* @__PURE__ */ n("article", {
|
|
15
19
|
className: "annotation-thread__item",
|
|
@@ -33,6 +37,10 @@ function i({ entry: e, locale: r, dateFormat: i, editedLabel: a }) {
|
|
|
33
37
|
e.edited && /* @__PURE__ */ t("span", {
|
|
34
38
|
className: "annotation-thread__edited",
|
|
35
39
|
children: a
|
|
40
|
+
}),
|
|
41
|
+
e.meta && /* @__PURE__ */ t("span", {
|
|
42
|
+
className: "annotation-thread__meta",
|
|
43
|
+
children: e.meta
|
|
36
44
|
})
|
|
37
45
|
]
|
|
38
46
|
}),
|
|
@@ -47,52 +55,55 @@ function i({ entry: e, locale: r, dateFormat: i, editedLabel: a }) {
|
|
|
47
55
|
]
|
|
48
56
|
});
|
|
49
57
|
}
|
|
50
|
-
function
|
|
51
|
-
let y = s === "resolved";
|
|
58
|
+
function o({ annotation: o, replies: s = [], status: c = "open", actions: l, reply: u, locale: d = "es-ES", dateFormat: f = i, openLabel: p = "Abierta", acknowledgedLabel: m = "Atendida", resolvedLabel: h = "Resuelta", editedLabel: g = "editada", repliesLabel: _ = (e) => e === 1 ? "1 respuesta" : `${e} respuestas`, label: v = "Hilo de anotaciones", className: y, ...b }) {
|
|
52
59
|
return /* @__PURE__ */ n("article", {
|
|
53
60
|
className: [
|
|
54
61
|
"annotation-thread",
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
c === "open" ? "" : `annotation-thread--${c}`,
|
|
63
|
+
y ?? ""
|
|
57
64
|
].filter(Boolean).join(" "),
|
|
58
|
-
"aria-label":
|
|
59
|
-
...
|
|
65
|
+
"aria-label": v,
|
|
66
|
+
...b,
|
|
60
67
|
children: [
|
|
61
68
|
/* @__PURE__ */ t("div", {
|
|
62
69
|
className: "annotation-thread__status",
|
|
63
70
|
children: /* @__PURE__ */ t(e, {
|
|
64
|
-
variant:
|
|
65
|
-
children:
|
|
71
|
+
variant: r[c],
|
|
72
|
+
children: {
|
|
73
|
+
open: p,
|
|
74
|
+
acknowledged: m,
|
|
75
|
+
resolved: h
|
|
76
|
+
}[c]
|
|
66
77
|
})
|
|
67
78
|
}),
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
entry:
|
|
70
|
-
locale:
|
|
71
|
-
dateFormat:
|
|
72
|
-
editedLabel:
|
|
79
|
+
/* @__PURE__ */ t(a, {
|
|
80
|
+
entry: o,
|
|
81
|
+
locale: d,
|
|
82
|
+
dateFormat: f,
|
|
83
|
+
editedLabel: g
|
|
73
84
|
}),
|
|
74
|
-
|
|
85
|
+
s.length > 0 && /* @__PURE__ */ n("div", {
|
|
75
86
|
className: "annotation-thread__replies",
|
|
76
87
|
children: [/* @__PURE__ */ t("p", {
|
|
77
88
|
className: "annotation-thread__replies-label",
|
|
78
|
-
children:
|
|
79
|
-
}),
|
|
89
|
+
children: _(s.length)
|
|
90
|
+
}), s.map((e) => /* @__PURE__ */ t(a, {
|
|
80
91
|
entry: e,
|
|
81
|
-
locale:
|
|
82
|
-
dateFormat:
|
|
83
|
-
editedLabel:
|
|
92
|
+
locale: d,
|
|
93
|
+
dateFormat: f,
|
|
94
|
+
editedLabel: g
|
|
84
95
|
}, e.id))]
|
|
85
96
|
}),
|
|
86
|
-
|
|
97
|
+
u && /* @__PURE__ */ t("div", {
|
|
87
98
|
className: "annotation-thread__reply",
|
|
88
|
-
children:
|
|
99
|
+
children: u
|
|
89
100
|
}),
|
|
90
|
-
|
|
101
|
+
l && /* @__PURE__ */ t("footer", {
|
|
91
102
|
className: "annotation-thread__actions",
|
|
92
|
-
children:
|
|
103
|
+
children: l
|
|
93
104
|
})
|
|
94
105
|
]
|
|
95
106
|
});
|
|
96
107
|
}
|
|
97
108
|
//#endregion
|
|
98
|
-
export {
|
|
109
|
+
export { o as AnnotationThread };
|
package/dist/app-header.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import './app-header.css';
|
|
3
3
|
import { MenuButton as e } from "./menu-button.js";
|
|
4
4
|
import { t } from "./_shared/appshellcontext.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useContext as n, useState as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/stories/sections/AppHeader/AppHeader.tsx
|
|
8
8
|
function o({ start: o, notifications: s, end: c, menuLabel: l = "Menú de navegación", menuCloseLabel: u, sidebarId: d }) {
|
|
9
|
-
let f =
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
let f = n(t), [p, m] = r(!1), h = f ? f.sidebar === "open" : p;
|
|
10
|
+
return /* @__PURE__ */ a("header", {
|
|
11
11
|
className: "app-header",
|
|
12
12
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ i(e, {
|
|
14
14
|
isOpen: h,
|
|
15
15
|
onClick: f ? f.toggleSidebar : () => m((e) => !e),
|
|
16
16
|
label: l,
|
|
@@ -18,15 +18,15 @@ function o({ start: o, notifications: s, end: c, menuLabel: l = "Menú de navega
|
|
|
18
18
|
"aria-controls": d,
|
|
19
19
|
"aria-expanded": h
|
|
20
20
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ i("div", {
|
|
22
22
|
className: "app-header__start",
|
|
23
23
|
children: o
|
|
24
24
|
}),
|
|
25
|
-
s && /* @__PURE__ */
|
|
25
|
+
s && /* @__PURE__ */ i("div", {
|
|
26
26
|
className: "app-header__notifications",
|
|
27
27
|
children: s
|
|
28
28
|
}),
|
|
29
|
-
c && /* @__PURE__ */
|
|
29
|
+
c && /* @__PURE__ */ i("div", {
|
|
30
30
|
className: "app-header__end",
|
|
31
31
|
children: c
|
|
32
32
|
})
|
package/dist/app-launcher.js
CHANGED
|
@@ -3,19 +3,19 @@ import './app-launcher.css';
|
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
4
|
import { Tag as t } from "./tag.js";
|
|
5
5
|
import { Modal as n } from "./modal.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useState as r } from "react";
|
|
7
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
8
|
import { Popover as s } from "@base-ui/react/popover";
|
|
9
9
|
//#region src/stories/molecules/AppLauncher/AppLauncher.tsx
|
|
10
10
|
function c({ app: e, isCurrent: n, newLabel: r }) {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ o("a", {
|
|
12
12
|
href: e.url,
|
|
13
13
|
className: `app-launcher__tile${n ? " app-launcher__tile--active" : ""}`,
|
|
14
14
|
"aria-current": n ? "page" : void 0,
|
|
15
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ a("span", {
|
|
16
16
|
className: "app-launcher__tile-name",
|
|
17
17
|
children: e.name
|
|
18
|
-
}), e.isNew && /* @__PURE__ */
|
|
18
|
+
}), e.isNew && /* @__PURE__ */ a(t, {
|
|
19
19
|
variant: "info",
|
|
20
20
|
className: "app-launcher__tile-badge",
|
|
21
21
|
children: r
|
|
@@ -23,46 +23,46 @@ function c({ app: e, isCurrent: n, newLabel: r }) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function l({ apps: e, currentAppId: t, newLabel: n }) {
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ a("ul", {
|
|
27
27
|
className: "app-launcher__grid",
|
|
28
28
|
role: "list",
|
|
29
|
-
children: e.map((e) => /* @__PURE__ */
|
|
29
|
+
children: e.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(c, {
|
|
30
30
|
app: e,
|
|
31
31
|
isCurrent: e.id === t,
|
|
32
32
|
newLabel: n
|
|
33
33
|
}) }, e.id))
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function u({ apps: t, labels: n, currentAppId: r, open:
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
open:
|
|
36
|
+
function u({ apps: t, labels: n, currentAppId: r, open: i, defaultOpen: c, onOpenChange: u }) {
|
|
37
|
+
return /* @__PURE__ */ o(s.Root, {
|
|
38
|
+
open: i,
|
|
39
39
|
defaultOpen: c,
|
|
40
40
|
onOpenChange: (e) => u?.(e),
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ a(s.Trigger, { render: n.trigger ? /* @__PURE__ */ o("button", {
|
|
42
42
|
type: "button",
|
|
43
43
|
className: "app-launcher__trigger app-launcher__trigger--label",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ a(e, {
|
|
45
45
|
name: "grid",
|
|
46
46
|
size: "md"
|
|
47
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ a("span", {
|
|
48
48
|
className: "app-launcher__trigger-label",
|
|
49
49
|
children: n.trigger
|
|
50
50
|
})]
|
|
51
|
-
}) : /* @__PURE__ */
|
|
51
|
+
}) : /* @__PURE__ */ a("button", {
|
|
52
52
|
type: "button",
|
|
53
53
|
className: "app-launcher__trigger",
|
|
54
54
|
"aria-label": n.open,
|
|
55
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ a(e, {
|
|
56
56
|
name: "grid",
|
|
57
57
|
size: "md"
|
|
58
58
|
})
|
|
59
|
-
}) }), /* @__PURE__ */
|
|
59
|
+
}) }), /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Positioner, {
|
|
60
60
|
className: "app-launcher__positioner",
|
|
61
61
|
sideOffset: 4,
|
|
62
62
|
align: "end",
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ a(s.Popup, {
|
|
64
64
|
className: "app-launcher__content",
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ a(l, {
|
|
66
66
|
apps: t,
|
|
67
67
|
currentAppId: r,
|
|
68
68
|
newLabel: n.new
|
|
@@ -72,48 +72,48 @@ function u({ apps: t, labels: n, currentAppId: r, open: o, defaultOpen: c, onOpe
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
function d(e, t, n) {
|
|
75
|
-
let [
|
|
76
|
-
return [e ??
|
|
77
|
-
e === void 0 &&
|
|
75
|
+
let [i, a] = r(t ?? !1);
|
|
76
|
+
return [e ?? i, (t) => {
|
|
77
|
+
e === void 0 && a(t), n?.(t);
|
|
78
78
|
}];
|
|
79
79
|
}
|
|
80
|
-
function f({ apps: t, labels:
|
|
80
|
+
function f({ apps: t, labels: r, currentAppId: s, open: c, defaultOpen: u, onOpenChange: f }) {
|
|
81
81
|
let [p, m] = d(c, u, f);
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ o(i, { children: [r.trigger ? /* @__PURE__ */ o("button", {
|
|
83
83
|
type: "button",
|
|
84
84
|
className: "app-launcher__trigger app-launcher__trigger--label",
|
|
85
85
|
"aria-haspopup": "dialog",
|
|
86
86
|
onClick: () => m(!0),
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ a(e, {
|
|
88
88
|
name: "grid",
|
|
89
89
|
size: "md"
|
|
90
|
-
}), /* @__PURE__ */
|
|
90
|
+
}), /* @__PURE__ */ a("span", {
|
|
91
91
|
className: "app-launcher__trigger-label",
|
|
92
|
-
children:
|
|
92
|
+
children: r.trigger
|
|
93
93
|
})]
|
|
94
|
-
}) : /* @__PURE__ */
|
|
94
|
+
}) : /* @__PURE__ */ a("button", {
|
|
95
95
|
type: "button",
|
|
96
96
|
className: "app-launcher__trigger",
|
|
97
|
-
"aria-label":
|
|
97
|
+
"aria-label": r.open,
|
|
98
98
|
"aria-haspopup": "dialog",
|
|
99
99
|
onClick: () => m(!0),
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ a(e, {
|
|
101
101
|
name: "grid",
|
|
102
102
|
size: "md"
|
|
103
103
|
})
|
|
104
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ a(n, {
|
|
105
105
|
open: p,
|
|
106
106
|
onClose: () => m(!1),
|
|
107
|
-
title:
|
|
108
|
-
children: /* @__PURE__ */
|
|
107
|
+
title: r.title ?? "Aplicaciones",
|
|
108
|
+
children: /* @__PURE__ */ a(l, {
|
|
109
109
|
apps: t,
|
|
110
110
|
currentAppId: s,
|
|
111
|
-
newLabel:
|
|
111
|
+
newLabel: r.new
|
|
112
112
|
})
|
|
113
113
|
})] });
|
|
114
114
|
}
|
|
115
115
|
function p({ presentation: e = "modal", ...t }) {
|
|
116
|
-
return
|
|
116
|
+
return a(e === "popover" ? u : f, { ...t });
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
export { p as AppLauncher };
|
package/dist/app-shell.js
CHANGED
|
@@ -4,24 +4,24 @@ import { SkipLink as e } from "./skip-link.js";
|
|
|
4
4
|
import { TooltipProvider as t } from "./tooltip.js";
|
|
5
5
|
import { t as n } from "./_shared/css-properties.js";
|
|
6
6
|
import { n as r, t as i } from "./_shared/appshellcontext.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
//#region src/stories/sections/AppShell/AppShell.tsx
|
|
10
10
|
var d = "(min-width: 1024px)";
|
|
11
11
|
function f() {
|
|
12
|
-
let [e, t] =
|
|
13
|
-
return
|
|
12
|
+
let [e, t] = c(() => typeof window > "u" ? !0 : window.matchMedia(d).matches);
|
|
13
|
+
return o(() => {
|
|
14
14
|
let e = window.matchMedia(d), n = () => t(e.matches);
|
|
15
15
|
return n(), e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
16
16
|
}, []), e;
|
|
17
17
|
}
|
|
18
18
|
function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sidebarState: h, onSidebarChange: g, defaultSidebarWidth: _, onSidebarWidthChange: v, skipLabel: y = "Saltar al contenido principal" }) {
|
|
19
|
-
let b = f(), [x, S] =
|
|
19
|
+
let b = f(), [x, S] = c(m), [C, w] = c(!1), [T, E] = c(_), D = b ? h ?? x : C ? "open" : "closed", O = a((e) => {
|
|
20
20
|
b ? (S(e), g?.(e)) : w(e === "open");
|
|
21
|
-
}, [b, g]), k =
|
|
21
|
+
}, [b, g]), k = a(() => O(D === "open" ? "closed" : "open"), [O, D]), A = a(() => O("closed"), [O]), j = a((e) => {
|
|
22
22
|
E(e), v?.(e);
|
|
23
23
|
}, [v]);
|
|
24
|
-
|
|
24
|
+
o(() => {
|
|
25
25
|
if (b || !C) return;
|
|
26
26
|
let e = (e) => {
|
|
27
27
|
e.key === "Escape" && w(!1);
|
|
@@ -32,7 +32,7 @@ function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sid
|
|
|
32
32
|
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
33
33
|
};
|
|
34
34
|
}, [b, C]);
|
|
35
|
-
let M =
|
|
35
|
+
let M = s(() => ({
|
|
36
36
|
sidebar: D,
|
|
37
37
|
setSidebar: O,
|
|
38
38
|
sidebarWidth: T ?? 0,
|
|
@@ -49,25 +49,25 @@ function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sid
|
|
|
49
49
|
A,
|
|
50
50
|
b
|
|
51
51
|
]), N = n({ "--app-shell-sidebar-width": T ? `${T}px` : void 0 }), P = !b && C;
|
|
52
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ l(i.Provider, {
|
|
53
53
|
value: M,
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(e, {
|
|
55
55
|
href: "#main-content",
|
|
56
56
|
children: y
|
|
57
|
-
}), /* @__PURE__ */
|
|
57
|
+
}), /* @__PURE__ */ u("div", {
|
|
58
58
|
ref: N,
|
|
59
59
|
className: "app-shell",
|
|
60
60
|
"data-sidebar": D,
|
|
61
|
-
children: [r, /* @__PURE__ */
|
|
61
|
+
children: [r, /* @__PURE__ */ u("div", {
|
|
62
62
|
className: "app-shell__body",
|
|
63
63
|
children: [
|
|
64
64
|
d,
|
|
65
|
-
P && /* @__PURE__ */
|
|
65
|
+
P && /* @__PURE__ */ l("div", {
|
|
66
66
|
className: "app-shell__backdrop",
|
|
67
67
|
onClick: A,
|
|
68
68
|
"aria-hidden": "true"
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ l("main", {
|
|
71
71
|
id: "main-content",
|
|
72
72
|
tabIndex: -1,
|
|
73
73
|
className: "app-shell__content",
|
|
@@ -2,25 +2,25 @@ import './assistant-message.css';
|
|
|
2
2
|
import { MessageBubble as e } from "./message-bubble.js";
|
|
3
3
|
import { TypingIndicator as t } from "./typing-indicator.js";
|
|
4
4
|
import { t as n } from "./_shared/messagetimestamp.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { forwardRef as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/stories/molecules/AssistantMessage/AssistantMessage.tsx
|
|
8
|
-
var o =
|
|
8
|
+
var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingLabel: d, className: f, ...p }, m) {
|
|
9
9
|
let h = n(s, c, l);
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ a("div", {
|
|
11
11
|
ref: m,
|
|
12
12
|
className: `assistant-message${f ? ` ${f}` : ""}`,
|
|
13
13
|
...p,
|
|
14
14
|
children: [
|
|
15
|
-
o && /* @__PURE__ */
|
|
15
|
+
o && /* @__PURE__ */ i("span", {
|
|
16
16
|
className: "assistant-message__model",
|
|
17
17
|
children: o
|
|
18
18
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ i(e, {
|
|
20
20
|
role: "assistant",
|
|
21
|
-
children: u ? /* @__PURE__ */
|
|
21
|
+
children: u ? /* @__PURE__ */ i(t, { label: d }) : r
|
|
22
22
|
}),
|
|
23
|
-
h && !u && /* @__PURE__ */
|
|
23
|
+
h && !u && /* @__PURE__ */ i("time", {
|
|
24
24
|
className: "assistant-message__timestamp",
|
|
25
25
|
dateTime: h.dateTime,
|
|
26
26
|
children: h.label
|