@studiolxd/brand 38.17.0 → 40.0.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 +141 -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 +4 -0
- package/dist/_types/atoms/StarRating/StarRating.d.ts +87 -30
- 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/Card/Card.d.ts +12 -1
- package/dist/_types/molecules/ConfirmDialog/ConfirmDialog.d.ts +42 -2
- package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
- 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.js +1 -1
- 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 +11 -2
- package/dist/button.js +7 -7
- package/dist/calendar-planner.js +16 -16
- package/dist/calendar.js +38 -38
- package/dist/card.js +28 -29
- 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.css +1 -1
- package/dist/confirm-dialog.js +65 -42
- 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.css +1 -1
- package/dist/star-rating.js +55 -41
- 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 +11 -2
- 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/components/description-list.css +1 -1
- package/src/tokens/components/star-rating.css +5 -0
- package/src/tokens/molecules/confirm-dialog.css +1 -0
- package/src/tokens/scss/components/_description-list.scss +1 -1
- package/src/tokens/scss/components/_star-rating.scss +3 -0
- package/src/tokens/scss/molecules/_confirm-dialog.scss +1 -0
- package/src/tokens/surface-invert.css +2 -0
- package/src/tokens/surface-public.css +1 -0
- package/src/tokens/tokens.json +4 -0
package/dist/input-field.js
CHANGED
|
@@ -6,17 +6,17 @@ import { ErrorText as n } from "./error-text.js";
|
|
|
6
6
|
import { Input as r } from "./input.js";
|
|
7
7
|
import { Label as i } from "./label.js";
|
|
8
8
|
import { n as a } from "./_shared/field-labels.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { forwardRef as o, useImperativeHandle as s, useRef as c, useState as l } from "react";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
11
|
//#region src/stories/molecules/InputField/InputField.tsx
|
|
12
|
-
var f =
|
|
13
|
-
let F = a(p), I = t(T), L = D ? `${
|
|
12
|
+
var f = o(function({ id: o, label: f, labelHidden: p, name: m, type: h, kind: g = "text", clearable: _ = !1, clearLabel: v = "Borrar", onClear: y, placeholder: b, value: x, defaultValue: S, disabled: C, readOnly: w, size: T, error: E = !1, errorMessage: D, helperText: O, onChange: k, onBlur: A, onFocus: j, className: M, ...N }, P) {
|
|
13
|
+
let F = a(p), I = t(T), L = D ? `${o}-error` : void 0, R = O ? `${o}-helper` : void 0, z = [
|
|
14
14
|
L,
|
|
15
15
|
R,
|
|
16
16
|
N["aria-describedby"]
|
|
17
|
-
].filter(Boolean).join(" ") || void 0, B = E || !!D, V = g === "search", H =
|
|
18
|
-
|
|
19
|
-
let [U, W] =
|
|
17
|
+
].filter(Boolean).join(" ") || void 0, B = E || !!D, V = g === "search", H = c(null);
|
|
18
|
+
s(P, () => H.current);
|
|
19
|
+
let [U, W] = l(() => (S ?? "") !== ""), G = V && _ && (x === void 0 ? U : x !== "") && !C && !w;
|
|
20
20
|
function K(e) {
|
|
21
21
|
x === void 0 && W(e.target.value !== ""), k?.(e);
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ var f = c(function({ id: c, label: f, labelHidden: p, name: m, type: h, kind: g
|
|
|
24
24
|
let e = H.current;
|
|
25
25
|
e && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), W(!1), e.focus(), y?.());
|
|
26
26
|
}
|
|
27
|
-
let J = /* @__PURE__ */
|
|
27
|
+
let J = /* @__PURE__ */ u(r, {
|
|
28
28
|
ref: H,
|
|
29
29
|
...V ? {
|
|
30
30
|
type: "text",
|
|
@@ -32,7 +32,7 @@ var f = c(function({ id: c, label: f, labelHidden: p, name: m, type: h, kind: g
|
|
|
32
32
|
enterKeyHint: "search"
|
|
33
33
|
} : { type: h },
|
|
34
34
|
...N,
|
|
35
|
-
id:
|
|
35
|
+
id: o,
|
|
36
36
|
name: m,
|
|
37
37
|
placeholder: b ?? (F ? f : void 0),
|
|
38
38
|
value: x,
|
|
@@ -46,49 +46,49 @@ var f = c(function({ id: c, label: f, labelHidden: p, name: m, type: h, kind: g
|
|
|
46
46
|
onBlur: A,
|
|
47
47
|
onFocus: j
|
|
48
48
|
});
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ d("div", {
|
|
50
50
|
className: ["input-field", M].filter(Boolean).join(" "),
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
htmlFor:
|
|
52
|
+
/* @__PURE__ */ u(i, {
|
|
53
|
+
htmlFor: o,
|
|
54
54
|
hidden: F,
|
|
55
55
|
size: I,
|
|
56
56
|
children: f
|
|
57
57
|
}),
|
|
58
|
-
V ? /* @__PURE__ */
|
|
58
|
+
V ? /* @__PURE__ */ d("div", {
|
|
59
59
|
className: [
|
|
60
60
|
"input-field__search",
|
|
61
61
|
I === "md" ? "" : `input-field__search--${I}`,
|
|
62
62
|
_ ? "input-field__search--clearable" : ""
|
|
63
63
|
].filter(Boolean).join(" "),
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ u("span", {
|
|
66
66
|
className: "input-field__search-icon",
|
|
67
67
|
"aria-hidden": "true",
|
|
68
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ u(e, {
|
|
69
69
|
name: "search",
|
|
70
70
|
className: "input-field__search-glyph"
|
|
71
71
|
})
|
|
72
72
|
}),
|
|
73
73
|
J,
|
|
74
|
-
G && /* @__PURE__ */
|
|
74
|
+
G && /* @__PURE__ */ u("button", {
|
|
75
75
|
type: "button",
|
|
76
76
|
className: "input-field__clear",
|
|
77
77
|
"aria-label": v,
|
|
78
|
-
"aria-controls":
|
|
78
|
+
"aria-controls": o,
|
|
79
79
|
onClick: q,
|
|
80
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ u(e, {
|
|
81
81
|
name: "close",
|
|
82
82
|
className: "input-field__search-glyph"
|
|
83
83
|
})
|
|
84
84
|
})
|
|
85
85
|
]
|
|
86
86
|
}) : J,
|
|
87
|
-
D && /* @__PURE__ */
|
|
87
|
+
D && /* @__PURE__ */ u(n, {
|
|
88
88
|
id: L,
|
|
89
89
|
children: D
|
|
90
90
|
}),
|
|
91
|
-
O && /* @__PURE__ */
|
|
91
|
+
O && /* @__PURE__ */ u("span", {
|
|
92
92
|
id: R,
|
|
93
93
|
className: "input-field__helper",
|
|
94
94
|
children: O
|
|
@@ -5,21 +5,21 @@ import { ErrorText as t } from "./error-text.js";
|
|
|
5
5
|
import { InputPhone as n } from "./input-phone.js";
|
|
6
6
|
import { Label as r } from "./label.js";
|
|
7
7
|
import { n as i } from "./_shared/field-labels.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { forwardRef as a, useId as o } from "react";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
10
|
//#region src/stories/molecules/InputPhoneField/InputPhoneField.tsx
|
|
11
|
-
var l =
|
|
12
|
-
let A = i(u), j = e(S), M =
|
|
13
|
-
return /* @__PURE__ */
|
|
11
|
+
var l = a(function({ id: a, label: l, labelHidden: u, value: d, defaultCountry: f, placeholder: p, disabled: m, readOnly: h, required: g, name: _, autoComplete: v, error: y = !1, errorMessage: b, helperText: x, size: S, className: C, countryLabel: w, internationalLabel: T, onChange: E, onBlur: D, onFocus: O }, k) {
|
|
12
|
+
let A = i(u), j = e(S), M = o(), N = a ?? M, P = b ? `${N}-error` : void 0, F = x ? `${N}-helper` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = y || !!b;
|
|
13
|
+
return /* @__PURE__ */ c("div", {
|
|
14
14
|
className: ["input-phone-field", C].filter(Boolean).join(" "),
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ s(r, {
|
|
17
17
|
htmlFor: N,
|
|
18
18
|
hidden: A,
|
|
19
19
|
size: j,
|
|
20
20
|
children: l
|
|
21
21
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ s(n, {
|
|
23
23
|
ref: k,
|
|
24
24
|
id: N,
|
|
25
25
|
name: _,
|
|
@@ -39,11 +39,11 @@ var l = s(function({ id: s, label: l, labelHidden: u, value: d, defaultCountry:
|
|
|
39
39
|
onBlur: D,
|
|
40
40
|
onFocus: O
|
|
41
41
|
}),
|
|
42
|
-
b && /* @__PURE__ */
|
|
42
|
+
b && /* @__PURE__ */ s(t, {
|
|
43
43
|
id: P,
|
|
44
44
|
children: b
|
|
45
45
|
}),
|
|
46
|
-
x && /* @__PURE__ */
|
|
46
|
+
x && /* @__PURE__ */ s("span", {
|
|
47
47
|
id: F,
|
|
48
48
|
className: "input-phone-field__helper",
|
|
49
49
|
children: x
|
package/dist/input-phone.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './input-phone.css';
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t, useMemo as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
import { Select as a } from "@base-ui/react/select";
|
|
7
7
|
import o, { getCountryCallingCode as s } from "react-phone-number-input";
|
|
8
8
|
//#region src/stories/atoms/InputPhone/InputPhone.tsx
|
|
9
|
-
function c({ value:
|
|
9
|
+
function c({ value: t, onChange: n, options: o, disabled: c, size: l = "md", countryLabel: u = "País", internationalLabel: d = "🌐", container: f }) {
|
|
10
10
|
let p = "__intl__", m = (e) => e ?? p, h = (e) => e === p ? void 0 : e, g = l === "sm" ? "xs" : l === "lg" ? "md" : "sm", _ = ["input-phone__country-content", l === "md" ? "" : `input-phone__country-content--${l}`].filter(Boolean).join(" ");
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
value: m(
|
|
13
|
-
onValueChange: (e) =>
|
|
11
|
+
return /* @__PURE__ */ i(a.Root, {
|
|
12
|
+
value: m(t),
|
|
13
|
+
onValueChange: (e) => n(h(e)),
|
|
14
14
|
disabled: c,
|
|
15
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ i(a.Trigger, {
|
|
16
16
|
className: "input-phone__country",
|
|
17
17
|
"aria-label": u,
|
|
18
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ r(a.Value, { children: t ? `+${s(t)}` : d }), /* @__PURE__ */ r(e, {
|
|
19
19
|
name: "chevron",
|
|
20
20
|
className: "input-phone__country-icon",
|
|
21
21
|
size: g
|
|
22
22
|
})]
|
|
23
|
-
}), /* @__PURE__ */
|
|
23
|
+
}), /* @__PURE__ */ r(a.Portal, {
|
|
24
24
|
container: f,
|
|
25
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ r(a.Positioner, {
|
|
26
26
|
className: "input-phone__country-positioner",
|
|
27
27
|
side: "bottom",
|
|
28
28
|
align: "start",
|
|
29
29
|
alignItemWithTrigger: !1,
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ r(a.Popup, {
|
|
31
31
|
className: _,
|
|
32
|
-
children: o.map(({ value: e, label:
|
|
32
|
+
children: o.map(({ value: e, label: t }) => /* @__PURE__ */ r(a.Item, {
|
|
33
33
|
value: m(e),
|
|
34
34
|
className: "input-phone__country-item",
|
|
35
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ r(a.ItemText, { children: t })
|
|
36
36
|
}, m(e)))
|
|
37
37
|
})
|
|
38
38
|
})
|
|
39
39
|
})]
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
var l =
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
var l = t(function({ value: e, defaultCountry: i = "ES", placeholder: a, disabled: s, error: l = !1, size: d = "md", id: f, name: p, describedBy: m, "aria-describedby": h, "aria-label": g, autoComplete: _, required: v, readOnly: y, onChange: b, onBlur: x, onFocus: S, countryLabel: C, internationalLabel: w, container: T }, E) {
|
|
43
|
+
return /* @__PURE__ */ r(o, {
|
|
44
44
|
className: [
|
|
45
45
|
"input-phone",
|
|
46
46
|
l ? "input-phone--error" : "",
|
|
47
47
|
d === "md" ? "" : `input-phone--${d}`
|
|
48
48
|
].filter(Boolean).join(" "),
|
|
49
49
|
value: e,
|
|
50
|
-
defaultCountry:
|
|
50
|
+
defaultCountry: i,
|
|
51
51
|
placeholder: a,
|
|
52
52
|
disabled: s,
|
|
53
53
|
readOnly: y,
|
|
@@ -55,11 +55,11 @@ var l = r(function({ value: e, defaultCountry: n = "ES", placeholder: a, disable
|
|
|
55
55
|
autoComplete: _,
|
|
56
56
|
id: f,
|
|
57
57
|
name: p,
|
|
58
|
-
inputComponent:
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
inputComponent: n(() => t(function(e, t) {
|
|
59
|
+
return /* @__PURE__ */ r("input", {
|
|
60
60
|
...e,
|
|
61
61
|
ref: (e) => {
|
|
62
|
-
u(
|
|
62
|
+
u(t, e), u(E, e);
|
|
63
63
|
},
|
|
64
64
|
className: "input-phone__number"
|
|
65
65
|
});
|
package/dist/input.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './input.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { forwardRef as e } from "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
5
|
//#region src/stories/atoms/Input/Input.tsx
|
|
6
|
-
var n =
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
var n = e(function({ size: e = "md", error: n = !1, className: r, describedBy: i, ariaLabel: a, ...o }, s) {
|
|
7
|
+
return /* @__PURE__ */ t("input", {
|
|
8
8
|
ref: s,
|
|
9
9
|
className: [
|
|
10
10
|
"input",
|
|
11
|
-
|
|
11
|
+
e === "md" ? "" : `input--${e}`,
|
|
12
12
|
n ? "input--error" : "",
|
|
13
13
|
r ?? ""
|
|
14
14
|
].filter(Boolean).join(" "),
|
package/dist/kbd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './kbd.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/Kbd/Kbd.tsx
|
|
5
|
-
var n =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
var n = e(function({ size: e = "md", className: n, children: r, ...i }, a) {
|
|
6
|
+
return /* @__PURE__ */ t("kbd", {
|
|
7
7
|
ref: a,
|
|
8
8
|
className: [
|
|
9
9
|
"kbd",
|
|
10
|
-
|
|
10
|
+
e === "md" ? "" : `kbd--${e}`,
|
|
11
11
|
n ?? ""
|
|
12
12
|
].filter(Boolean).join(" "),
|
|
13
13
|
...i,
|
package/dist/label.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './label.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/Label/Label.tsx
|
|
5
|
-
var n =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
var n = e(function({ children: e, hidden: n = !1, size: r = "md", className: i, ...a }, o) {
|
|
6
|
+
return /* @__PURE__ */ t("label", {
|
|
7
7
|
ref: o,
|
|
8
8
|
className: [
|
|
9
9
|
"label",
|
|
@@ -12,7 +12,7 @@ var n = t(function({ children: t, hidden: n = !1, size: r = "md", className: i,
|
|
|
12
12
|
i ?? ""
|
|
13
13
|
].filter(Boolean).join(" "),
|
|
14
14
|
...a,
|
|
15
|
-
children:
|
|
15
|
+
children: e
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
package/dist/link.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './link.css';
|
|
3
3
|
import { Icon as e } from "./icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
import { useRender as a } from "@base-ui/react/use-render";
|
|
7
7
|
//#region src/stories/atoms/Link/Link.tsx
|
|
8
|
-
var o =
|
|
8
|
+
var o = t(function({ href: t, children: o, external: s = !1, tone: c = "accent", icon: l, iconPosition: u = "start", render: d, className: f, ...p }, m) {
|
|
9
9
|
let h = [
|
|
10
10
|
"link",
|
|
11
11
|
c === "ink" ? "link--ink" : c === "accent-1" ? "link--accent-1" : "",
|
|
12
12
|
l ? "link--with-icon" : "",
|
|
13
13
|
f
|
|
14
|
-
].filter(Boolean).join(" "), g = l ? /* @__PURE__ */
|
|
14
|
+
].filter(Boolean).join(" "), g = l ? /* @__PURE__ */ r(e, {
|
|
15
15
|
name: l,
|
|
16
16
|
size: "sm",
|
|
17
17
|
className: "link__icon"
|
|
18
|
-
}) : null, _ = /* @__PURE__ */
|
|
18
|
+
}) : null, _ = /* @__PURE__ */ i(n, { children: [
|
|
19
19
|
u === "start" && g,
|
|
20
20
|
o,
|
|
21
21
|
u === "end" && g
|
|
@@ -29,9 +29,9 @@ var o = i(function({ href: i, children: o, external: s = !1, tone: c = "accent",
|
|
|
29
29
|
...p,
|
|
30
30
|
children: _
|
|
31
31
|
}
|
|
32
|
-
}) || /* @__PURE__ */
|
|
32
|
+
}) || /* @__PURE__ */ r("a", {
|
|
33
33
|
ref: m,
|
|
34
|
-
href:
|
|
34
|
+
href: t,
|
|
35
35
|
className: h,
|
|
36
36
|
...s ? {
|
|
37
37
|
target: "_blank",
|
package/dist/list.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import './list.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/List/List.tsx
|
|
5
|
-
var n =
|
|
6
|
-
return /* @__PURE__ */ e
|
|
5
|
+
var n = e(function({ type: e = "unordered", className: n, children: r, ...i }, a) {
|
|
6
|
+
return /* @__PURE__ */ t(e === "ordered" ? "ol" : "ul", {
|
|
7
7
|
ref: a,
|
|
8
8
|
className: [
|
|
9
9
|
"list",
|
|
10
|
-
`list--${
|
|
10
|
+
`list--${e}`,
|
|
11
11
|
n ?? ""
|
|
12
12
|
].filter(Boolean).join(" "),
|
|
13
13
|
...i,
|
|
14
14
|
children: r
|
|
15
15
|
});
|
|
16
|
-
}), r =
|
|
17
|
-
return /* @__PURE__ */ e
|
|
16
|
+
}), r = e(function({ as: e = "li", className: n, children: r, ...i }, a) {
|
|
17
|
+
return /* @__PURE__ */ t(e, {
|
|
18
18
|
ref: a,
|
|
19
19
|
className: ["list__item", n ?? ""].filter(Boolean).join(" "),
|
|
20
20
|
...i,
|
package/dist/menu-button.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './menu-button.css';
|
|
3
3
|
import { Icon as e } from "./icon.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/MenuButton/MenuButton.tsx
|
|
7
|
-
var r =
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
var r = t(function({ isOpen: t = !1, label: r = "Menú", closeLabel: i, size: a = "md", className: o, ...s }, c) {
|
|
8
|
+
return /* @__PURE__ */ n("button", {
|
|
9
9
|
ref: c,
|
|
10
10
|
type: "button",
|
|
11
11
|
className: [
|
|
@@ -13,10 +13,10 @@ var r = n(function({ isOpen: n = !1, label: r = "Menú", closeLabel: i, size: a
|
|
|
13
13
|
`menu-button--${a}`,
|
|
14
14
|
o
|
|
15
15
|
].filter(Boolean).join(" "),
|
|
16
|
-
"aria-label":
|
|
17
|
-
"aria-expanded":
|
|
16
|
+
"aria-label": t && i ? i : r,
|
|
17
|
+
"aria-expanded": t,
|
|
18
18
|
...s,
|
|
19
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ n(e, {
|
|
20
20
|
name: "menu",
|
|
21
21
|
size: a === "lg" ? "lg" : "md",
|
|
22
22
|
className: "menu-button__icon"
|
package/dist/message-bubble.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './message-bubble.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/MessageBubble/MessageBubble.tsx
|
|
5
|
-
var n =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
var n = e(function({ role: e, children: n, className: r, ...i }, a) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
7
|
ref: a,
|
|
8
8
|
className: [
|
|
9
9
|
"message-bubble",
|
|
10
|
-
`message-bubble--${
|
|
10
|
+
`message-bubble--${e}`,
|
|
11
11
|
r ?? ""
|
|
12
12
|
].filter(Boolean).join(" "),
|
|
13
13
|
...i,
|
package/dist/message-composer.js
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import './message-composer.css';
|
|
3
3
|
import { Button as e } from "./button.js";
|
|
4
4
|
import { Textarea as t } from "./textarea.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { forwardRef as n, useId as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/stories/molecules/MessageComposer/MessageComposer.tsx
|
|
8
|
-
var o =
|
|
9
|
-
let b = `${
|
|
8
|
+
var o = n(function({ value: n, onChange: o, onSend: s, placeholder: c = "Escribe un mensaje…", disabled: l, sendLabel: u = "Enviar", helperText: d, actions: f, inputId: p, inputLabel: m, inputLabelledBy: h, rows: g = 2, className: _, ...v }, y) {
|
|
9
|
+
let b = `${r()}-helper`;
|
|
10
10
|
function x() {
|
|
11
|
-
|
|
11
|
+
n.trim() && s();
|
|
12
12
|
}
|
|
13
13
|
function S(e) {
|
|
14
14
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), x());
|
|
15
15
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ a("div", {
|
|
17
17
|
ref: y,
|
|
18
18
|
className: [
|
|
19
19
|
"message-composer",
|
|
@@ -21,9 +21,9 @@ var o = i(function({ value: i, onChange: o, onSend: s, placeholder: c = "Escribe
|
|
|
21
21
|
_ ?? ""
|
|
22
22
|
].filter(Boolean).join(" "),
|
|
23
23
|
...v,
|
|
24
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ a("div", {
|
|
25
25
|
className: "message-composer__box",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ i(t, {
|
|
27
27
|
bare: !0,
|
|
28
28
|
className: "message-composer__input",
|
|
29
29
|
id: p,
|
|
@@ -31,22 +31,22 @@ var o = i(function({ value: i, onChange: o, onSend: s, placeholder: c = "Escribe
|
|
|
31
31
|
"aria-labelledby": h,
|
|
32
32
|
"aria-describedby": d ? b : void 0,
|
|
33
33
|
placeholder: c,
|
|
34
|
-
value:
|
|
34
|
+
value: n,
|
|
35
35
|
disabled: l,
|
|
36
36
|
rows: g,
|
|
37
37
|
onChange: (e) => o(e.target.value),
|
|
38
38
|
onKeyDown: S
|
|
39
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ a("div", {
|
|
40
40
|
className: "message-composer__actions",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ i(e, {
|
|
42
42
|
variant: "primary",
|
|
43
43
|
size: "md",
|
|
44
|
-
disabled: l || !
|
|
44
|
+
disabled: l || !n.trim(),
|
|
45
45
|
onClick: x,
|
|
46
46
|
children: u
|
|
47
47
|
}), f]
|
|
48
48
|
})]
|
|
49
|
-
}), d && /* @__PURE__ */
|
|
49
|
+
}), d && /* @__PURE__ */ i("p", {
|
|
50
50
|
className: "message-composer__helper",
|
|
51
51
|
id: b,
|
|
52
52
|
children: d
|
package/dist/messages.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { n as e, t } from "./_shared/brandmessagescontext.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/stories/messages/BrandMessagesProvider.tsx
|
|
5
|
+
function r({ messages: e, children: r }) {
|
|
6
|
+
return /* @__PURE__ */ n(t.Provider, {
|
|
7
|
+
value: e,
|
|
8
|
+
children: r
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as BrandMessagesProvider, e as useBrandMessages };
|
|
@@ -5,22 +5,22 @@ import { ErrorText as t } from "./error-text.js";
|
|
|
5
5
|
import { Label as n } from "./label.js";
|
|
6
6
|
import { MultiSelect as r } from "./multi-select.js";
|
|
7
7
|
import { n as i } from "./_shared/field-labels.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { forwardRef as a, useId as o } from "react";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
10
|
//#region src/stories/molecules/MultiSelectField/MultiSelectField.tsx
|
|
11
|
-
var l =
|
|
12
|
-
let D = i(u), O = e(v), k =
|
|
13
|
-
return /* @__PURE__ */
|
|
11
|
+
var l = a(function({ id: a, label: l, labelHidden: u, options: d, value: f, defaultValue: p, placeholder: m, name: h, disabled: g, readOnly: _, size: v, error: y = !1, errorMessage: b, helperText: x, className: S, removeLabel: C, onValueChange: w, onBlur: T }, E) {
|
|
12
|
+
let D = i(u), O = e(v), k = o(), A = a ?? k, j = b ? `${A}-error` : void 0, M = x ? `${A}-helper` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = y || !!b;
|
|
13
|
+
return /* @__PURE__ */ c("div", {
|
|
14
14
|
className: ["multi-select-field", S].filter(Boolean).join(" "),
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ s(n, {
|
|
17
17
|
id: `${A}-label`,
|
|
18
18
|
htmlFor: A,
|
|
19
19
|
hidden: D,
|
|
20
20
|
size: O,
|
|
21
21
|
children: l
|
|
22
22
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ s(r, {
|
|
24
24
|
ref: E,
|
|
25
25
|
id: A,
|
|
26
26
|
"aria-labelledby": `${A}-label`,
|
|
@@ -38,11 +38,11 @@ var l = s(function({ id: s, label: l, labelHidden: u, options: d, value: f, defa
|
|
|
38
38
|
onValueChange: w,
|
|
39
39
|
onBlur: T
|
|
40
40
|
}),
|
|
41
|
-
b && /* @__PURE__ */
|
|
41
|
+
b && /* @__PURE__ */ s(t, {
|
|
42
42
|
id: j,
|
|
43
43
|
children: b
|
|
44
44
|
}),
|
|
45
|
-
x && /* @__PURE__ */
|
|
45
|
+
x && /* @__PURE__ */ s("span", {
|
|
46
46
|
id: M,
|
|
47
47
|
className: "multi-select-field__helper",
|
|
48
48
|
children: x
|