@studiolxd/brand 41.1.0 → 42.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 +65 -0
- package/dist/_types/atoms/AsyncMultiSelect/AsyncMultiSelect.d.ts +28 -5
- package/dist/_types/atoms/AsyncSelect/AsyncSelect.d.ts +26 -6
- package/dist/_types/atoms/InputPhone/InputPhone.d.ts +15 -4
- package/dist/_types/atoms/MultiSelect/MultiSelect.d.ts +20 -1
- package/dist/_types/atoms/NumberInput/NumberInput.d.ts +14 -4
- package/dist/_types/atoms/OtpInput/OtpInput.d.ts +15 -4
- package/dist/_types/atoms/Select/Select.d.ts +18 -1
- package/dist/_types/messages/BrandMessages.d.ts +25 -1
- package/dist/_types/messages/index.d.ts +1 -1
- package/dist/_types/molecules/DocsSearch/DocsSearch.d.ts +31 -12
- package/dist/_types/molecules/FilterBar/FilterBar.d.ts +10 -1
- package/dist/_types/molecules/InputField/InputField.d.ts +16 -2
- package/dist/_types/molecules/MultiSelectField/MultiSelectField.d.ts +9 -1
- package/dist/_types/molecules/PasswordField/PasswordField.d.ts +22 -2
- package/dist/_types/molecules/SearchForm/SearchForm.d.ts +18 -6
- package/dist/_types/molecules/SelectField/SelectField.d.ts +5 -0
- package/dist/async-multi-select.js +50 -49
- package/dist/async-select.js +89 -88
- package/dist/docs-search.js +38 -37
- package/dist/filter-bar.css +1 -1
- package/dist/filter-bar.js +19 -17
- package/dist/input-field.js +66 -65
- package/dist/input-phone.js +39 -38
- package/dist/multi-select.js +109 -108
- package/dist/number-input.js +61 -60
- package/dist/otp-input.js +86 -85
- package/dist/password-field.js +46 -45
- package/dist/search-form.js +35 -34
- package/dist/select.js +75 -71
- package/package.json +1 -1
package/dist/filter-bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.filter-bar{gap:var(--filter-bar-gap);flex-direction:column;display:flex}.filter-bar__search{inline-size:100%}.filter-bar__row{
|
|
1
|
+
.filter-bar{gap:var(--filter-bar-gap);flex-direction:column;display:flex}.filter-bar__search{inline-size:100%}.filter-bar__row{column-gap:var(--filter-bar-column-gap);row-gap:var(--filter-bar-row-gap);grid-template-columns:1fr;display:grid}.filter-bar__filters{display:contents}.filter-bar__filter{min-inline-size:0}.filter-bar__actions{align-items:stretch;gap:var(--filter-bar-actions-gap);flex-direction:column;min-inline-size:0;display:flex}.filter-bar__actions>*{inline-size:100%}@media (width>=768px){.filter-bar__row{grid-template-columns:repeat(auto-fill, minmax(min(var(--filter-bar-column-min-inline-size), 100%), 1fr))}.filter-bar__actions{flex-flow:wrap;align-items:center}.filter-bar__actions>*{inline-size:auto}:is(.filter-bar__row:has(.label:not(.visually-hidden)) .filter-bar__filter:not(:has(.label:not(.visually-hidden))),.filter-bar__row:has(.label:not(.visually-hidden))>.filter-bar__actions){align-self:start;padding-block-start:var(--filter-bar-label-offset)}.filter-bar__row:has(.label:not(.visually-hidden)) .filter-bar__filter:not(:has(.label:not(.visually-hidden))){block-size:calc(var(--filter-bar-label-offset) + var(--filter-bar-control-block-size));flex-direction:column;justify-content:center;display:flex}.filter-bar__row:has(.label:not(.visually-hidden))>.filter-bar__actions{min-block-size:calc(var(--filter-bar-label-offset) + var(--filter-bar-control-block-size))}}
|
package/dist/filter-bar.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './filter-bar.css';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Children as t } from "react";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
6
|
//#region src/stories/molecules/FilterBar/FilterBar.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
className: ["filter-bar",
|
|
7
|
+
function i({ search: i, children: a, actions: o, ariaLabel: s, className: c, ...l }) {
|
|
8
|
+
let u = e("filterBar"), d = t.toArray(a);
|
|
9
|
+
return /* @__PURE__ */ r("div", {
|
|
10
|
+
className: ["filter-bar", c].filter(Boolean).join(" "),
|
|
9
11
|
role: "search",
|
|
10
|
-
"aria-label":
|
|
11
|
-
...
|
|
12
|
-
children: [
|
|
12
|
+
"aria-label": u("label", s),
|
|
13
|
+
...l,
|
|
14
|
+
children: [i && /* @__PURE__ */ n("div", {
|
|
13
15
|
className: "filter-bar__search",
|
|
14
|
-
children:
|
|
15
|
-
}), (
|
|
16
|
+
children: i
|
|
17
|
+
}), (d.length > 0 || o) && /* @__PURE__ */ r("div", {
|
|
16
18
|
className: "filter-bar__row",
|
|
17
|
-
children: [
|
|
19
|
+
children: [d.length > 0 && /* @__PURE__ */ n("div", {
|
|
18
20
|
className: "filter-bar__filters",
|
|
19
|
-
children:
|
|
21
|
+
children: d.map((e, t) => /* @__PURE__ */ n("div", {
|
|
20
22
|
className: "filter-bar__filter",
|
|
21
23
|
children: e
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
+
}, t))
|
|
25
|
+
}), o && /* @__PURE__ */ n("div", {
|
|
24
26
|
className: "filter-bar__actions",
|
|
25
|
-
children:
|
|
27
|
+
children: o
|
|
26
28
|
})]
|
|
27
29
|
})]
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
//#endregion
|
|
31
|
-
export {
|
|
33
|
+
export { i as FilterBar };
|
package/dist/input-field.js
CHANGED
|
@@ -1,100 +1,101 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './input-field.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Icon as t } from "./icon.js";
|
|
5
|
+
import { n } from "./_shared/form-size.js";
|
|
6
|
+
import { ErrorText as r } from "./error-text.js";
|
|
7
|
+
import { Input as i } from "./input.js";
|
|
8
|
+
import { Label as a } from "./label.js";
|
|
9
|
+
import { n as o } from "./_shared/field-labels.js";
|
|
10
|
+
import { forwardRef as s, useImperativeHandle as c, useRef as l, useState as u } from "react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
12
|
//#region src/stories/molecules/InputField/InputField.tsx
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
].filter(Boolean).join(" ") || void 0,
|
|
18
|
-
|
|
19
|
-
let [
|
|
20
|
-
function
|
|
21
|
-
|
|
13
|
+
var p = s(function({ id: s, label: p, labelHidden: m, name: h, type: g, kind: _ = "text", clearable: v = !1, clearLabel: y, onClear: b, placeholder: x, value: S, defaultValue: C, disabled: w, readOnly: T, size: E, error: D = !1, errorMessage: O, helperText: k, onChange: A, onBlur: j, onFocus: M, className: N, ...P }, F) {
|
|
14
|
+
let I = e("inputField"), L = o(m), R = n(E), z = O ? `${s}-error` : void 0, B = k ? `${s}-helper` : void 0, V = [
|
|
15
|
+
z,
|
|
16
|
+
B,
|
|
17
|
+
P["aria-describedby"]
|
|
18
|
+
].filter(Boolean).join(" ") || void 0, H = D || !!O, U = _ === "search", W = l(null);
|
|
19
|
+
c(F, () => W.current);
|
|
20
|
+
let [G, K] = u(() => (C ?? "") !== ""), q = U && v && (S === void 0 ? G : S !== "") && !w && !T;
|
|
21
|
+
function J(e) {
|
|
22
|
+
S === void 0 && K(e.target.value !== ""), A?.(e);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
let e =
|
|
25
|
-
e && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
24
|
+
function Y() {
|
|
25
|
+
let e = W.current;
|
|
26
|
+
e && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), K(!1), e.focus(), b?.());
|
|
26
27
|
}
|
|
27
|
-
let
|
|
28
|
-
ref:
|
|
29
|
-
...
|
|
28
|
+
let X = /* @__PURE__ */ d(i, {
|
|
29
|
+
ref: W,
|
|
30
|
+
...U ? {
|
|
30
31
|
type: "text",
|
|
31
32
|
autoComplete: "off",
|
|
32
33
|
enterKeyHint: "search"
|
|
33
|
-
} : { type:
|
|
34
|
-
...
|
|
35
|
-
id:
|
|
36
|
-
name:
|
|
37
|
-
placeholder:
|
|
38
|
-
value:
|
|
39
|
-
defaultValue:
|
|
40
|
-
disabled:
|
|
41
|
-
readOnly:
|
|
42
|
-
size:
|
|
43
|
-
error:
|
|
44
|
-
"aria-describedby":
|
|
45
|
-
onChange:
|
|
46
|
-
onBlur:
|
|
47
|
-
onFocus:
|
|
34
|
+
} : { type: g },
|
|
35
|
+
...P,
|
|
36
|
+
id: s,
|
|
37
|
+
name: h,
|
|
38
|
+
placeholder: x ?? (L ? p : void 0),
|
|
39
|
+
value: S,
|
|
40
|
+
defaultValue: C,
|
|
41
|
+
disabled: w,
|
|
42
|
+
readOnly: T,
|
|
43
|
+
size: R,
|
|
44
|
+
error: H,
|
|
45
|
+
"aria-describedby": V,
|
|
46
|
+
onChange: J,
|
|
47
|
+
onBlur: j,
|
|
48
|
+
onFocus: M
|
|
48
49
|
});
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
className: ["input-field",
|
|
50
|
+
return /* @__PURE__ */ f("div", {
|
|
51
|
+
className: ["input-field", N].filter(Boolean).join(" "),
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
htmlFor:
|
|
54
|
-
hidden:
|
|
55
|
-
size:
|
|
56
|
-
children:
|
|
53
|
+
/* @__PURE__ */ d(a, {
|
|
54
|
+
htmlFor: s,
|
|
55
|
+
hidden: L,
|
|
56
|
+
size: R,
|
|
57
|
+
children: p
|
|
57
58
|
}),
|
|
58
|
-
|
|
59
|
+
U ? /* @__PURE__ */ f("div", {
|
|
59
60
|
className: [
|
|
60
61
|
"input-field__search",
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
R === "md" ? "" : `input-field__search--${R}`,
|
|
63
|
+
v ? "input-field__search--clearable" : ""
|
|
63
64
|
].filter(Boolean).join(" "),
|
|
64
65
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ d("span", {
|
|
66
67
|
className: "input-field__search-icon",
|
|
67
68
|
"aria-hidden": "true",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ d(t, {
|
|
69
70
|
name: "search",
|
|
70
71
|
className: "input-field__search-glyph"
|
|
71
72
|
})
|
|
72
73
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
X,
|
|
75
|
+
q && /* @__PURE__ */ d("button", {
|
|
75
76
|
type: "button",
|
|
76
77
|
className: "input-field__clear",
|
|
77
|
-
"aria-label":
|
|
78
|
-
"aria-controls":
|
|
79
|
-
onClick:
|
|
80
|
-
children: /* @__PURE__ */
|
|
78
|
+
"aria-label": I("clear", y),
|
|
79
|
+
"aria-controls": s,
|
|
80
|
+
onClick: Y,
|
|
81
|
+
children: /* @__PURE__ */ d(t, {
|
|
81
82
|
name: "close",
|
|
82
83
|
className: "input-field__search-glyph"
|
|
83
84
|
})
|
|
84
85
|
})
|
|
85
86
|
]
|
|
86
|
-
}) :
|
|
87
|
-
|
|
88
|
-
id:
|
|
89
|
-
children:
|
|
87
|
+
}) : X,
|
|
88
|
+
O && /* @__PURE__ */ d(r, {
|
|
89
|
+
id: z,
|
|
90
|
+
children: O
|
|
90
91
|
}),
|
|
91
|
-
|
|
92
|
-
id:
|
|
92
|
+
k && /* @__PURE__ */ d("span", {
|
|
93
|
+
id: B,
|
|
93
94
|
className: "input-field__helper",
|
|
94
|
-
children:
|
|
95
|
+
children: k
|
|
95
96
|
})
|
|
96
97
|
]
|
|
97
98
|
});
|
|
98
99
|
});
|
|
99
100
|
//#endregion
|
|
100
|
-
export {
|
|
101
|
+
export { p as InputField };
|
package/dist/input-phone.js
CHANGED
|
@@ -1,72 +1,73 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './input-phone.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Icon as t } from "./icon.js";
|
|
5
|
+
import { forwardRef as n, useMemo as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { Select as o } from "@base-ui/react/select";
|
|
8
|
+
import s, { getCountryCallingCode as c } from "react-phone-number-input";
|
|
8
9
|
//#region src/stories/atoms/InputPhone/InputPhone.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
value:
|
|
13
|
-
onValueChange: (e) =>
|
|
14
|
-
disabled:
|
|
15
|
-
children: [/* @__PURE__ */
|
|
10
|
+
function l({ value: n, onChange: r, options: s, disabled: l, size: u = "md", countryLabel: d, internationalLabel: f = "🌐", container: p }) {
|
|
11
|
+
let m = e("inputPhone"), h = "__intl__", g = (e) => e ?? h, _ = (e) => e === h ? void 0 : e, v = u === "sm" ? "xs" : u === "lg" ? "md" : "sm", y = ["input-phone__country-content", u === "md" ? "" : `input-phone__country-content--${u}`].filter(Boolean).join(" ");
|
|
12
|
+
return /* @__PURE__ */ a(o.Root, {
|
|
13
|
+
value: g(n),
|
|
14
|
+
onValueChange: (e) => r(_(e)),
|
|
15
|
+
disabled: l,
|
|
16
|
+
children: [/* @__PURE__ */ a(o.Trigger, {
|
|
16
17
|
className: "input-phone__country",
|
|
17
|
-
"aria-label":
|
|
18
|
-
children: [/* @__PURE__ */
|
|
18
|
+
"aria-label": m("country", d),
|
|
19
|
+
children: [/* @__PURE__ */ i(o.Value, { children: n ? `+${c(n)}` : f }), /* @__PURE__ */ i(t, {
|
|
19
20
|
name: "chevron",
|
|
20
21
|
className: "input-phone__country-icon",
|
|
21
|
-
size:
|
|
22
|
+
size: v
|
|
22
23
|
})]
|
|
23
|
-
}), /* @__PURE__ */
|
|
24
|
-
container:
|
|
25
|
-
children: /* @__PURE__ */
|
|
24
|
+
}), /* @__PURE__ */ i(o.Portal, {
|
|
25
|
+
container: p,
|
|
26
|
+
children: /* @__PURE__ */ i(o.Positioner, {
|
|
26
27
|
className: "input-phone__country-positioner",
|
|
27
28
|
side: "bottom",
|
|
28
29
|
align: "start",
|
|
29
30
|
alignItemWithTrigger: !1,
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
className:
|
|
32
|
-
children:
|
|
33
|
-
value:
|
|
31
|
+
children: /* @__PURE__ */ i(o.Popup, {
|
|
32
|
+
className: y,
|
|
33
|
+
children: s.map(({ value: e, label: t }) => /* @__PURE__ */ i(o.Item, {
|
|
34
|
+
value: g(e),
|
|
34
35
|
className: "input-phone__country-item",
|
|
35
|
-
children: /* @__PURE__ */
|
|
36
|
-
},
|
|
36
|
+
children: /* @__PURE__ */ i(o.ItemText, { children: t })
|
|
37
|
+
}, g(e)))
|
|
37
38
|
})
|
|
38
39
|
})
|
|
39
40
|
})]
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
|
-
var
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
var u = n(function({ value: e, defaultCountry: t = "ES", placeholder: a, disabled: o, error: c = !1, size: u = "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) {
|
|
44
|
+
return /* @__PURE__ */ i(s, {
|
|
44
45
|
className: [
|
|
45
46
|
"input-phone",
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
c ? "input-phone--error" : "",
|
|
48
|
+
u === "md" ? "" : `input-phone--${u}`
|
|
48
49
|
].filter(Boolean).join(" "),
|
|
49
50
|
value: e,
|
|
50
|
-
defaultCountry:
|
|
51
|
+
defaultCountry: t,
|
|
51
52
|
placeholder: a,
|
|
52
|
-
disabled:
|
|
53
|
+
disabled: o,
|
|
53
54
|
readOnly: y,
|
|
54
55
|
required: v,
|
|
55
56
|
autoComplete: _,
|
|
56
57
|
id: f,
|
|
57
58
|
name: p,
|
|
58
|
-
inputComponent:
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
inputComponent: r(() => n(function(e, t) {
|
|
60
|
+
return /* @__PURE__ */ i("input", {
|
|
60
61
|
...e,
|
|
61
62
|
ref: (e) => {
|
|
62
|
-
|
|
63
|
+
d(t, e), d(E, e);
|
|
63
64
|
},
|
|
64
65
|
className: "input-phone__number"
|
|
65
66
|
});
|
|
66
67
|
}), [E]),
|
|
67
|
-
countrySelectComponent:
|
|
68
|
+
countrySelectComponent: l,
|
|
68
69
|
countrySelectProps: {
|
|
69
|
-
size:
|
|
70
|
+
size: u,
|
|
70
71
|
countryLabel: C,
|
|
71
72
|
internationalLabel: w,
|
|
72
73
|
container: T
|
|
@@ -77,12 +78,12 @@ var l = t(function({ value: e, defaultCountry: i = "ES", placeholder: a, disable
|
|
|
77
78
|
numberInputProps: {
|
|
78
79
|
"aria-describedby": h ?? m,
|
|
79
80
|
"aria-label": g,
|
|
80
|
-
"aria-invalid":
|
|
81
|
+
"aria-invalid": c || void 0
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
});
|
|
84
|
-
function
|
|
85
|
+
function d(e, t) {
|
|
85
86
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
86
87
|
}
|
|
87
88
|
//#endregion
|
|
88
|
-
export {
|
|
89
|
+
export { u as InputPhone };
|