@pismo/marola 1.0.0-beta.46 → 1.0.0-beta.48
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/dist/SelectButton-B38avP9u.js +75 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/components/Input/Input.js +213 -213
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/SelectButton.d.ts +1 -0
- package/dist/components/Select/SelectButton.js +1 -1
- package/package.json +1 -1
- package/dist/SelectButton-rvRI0bTU.js +0 -73
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import './assets/SelectButton.css';
|
|
2
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as g } from "react";
|
|
4
|
+
import { c as d } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import { Icon as p } from "./components/Icon/Icon.js";
|
|
6
|
+
import { Typography as b } from "./components/Typography/Typography.js";
|
|
7
|
+
const q = "_select__listbox__option__text_1abqy_65", x = "_select__wrapper_1abqy_78", m = "_select__label_1abqy_84", f = "_select_1abqy_57", w = "_select__popup_1abqy_99", v = "_select__listbox_1abqy_65", S = "_select__listbox__option_1abqy_65", k = "_select__listbox__option__icon_1abqy_129", t = {
|
|
8
|
+
"u-typography-h1": "_u-typography-h1_1abqy_1",
|
|
9
|
+
"u-typography-h2": "_u-typography-h2_1abqy_8",
|
|
10
|
+
"u-typography-h3": "_u-typography-h3_1abqy_15",
|
|
11
|
+
"u-typography-h4": "_u-typography-h4_1abqy_22",
|
|
12
|
+
"u-typography-h5": "_u-typography-h5_1abqy_29",
|
|
13
|
+
"u-typography-h6": "_u-typography-h6_1abqy_36",
|
|
14
|
+
"u-typography-base": "_u-typography-base_1abqy_43",
|
|
15
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1abqy_49",
|
|
16
|
+
"u-typography-base--xl": "_u-typography-base--xl_1abqy_53",
|
|
17
|
+
"u-typography-base--lg": "_u-typography-base--lg_1abqy_57",
|
|
18
|
+
"select-button__text": "_select-button__text_1abqy_57",
|
|
19
|
+
"u-typography-base--sm": "_u-typography-base--sm_1abqy_61",
|
|
20
|
+
"u-typography-base--bold": "_u-typography-base--bold_1abqy_65",
|
|
21
|
+
select__listbox__option__text: q,
|
|
22
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1abqy_68",
|
|
23
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1abqy_71",
|
|
24
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1abqy_74",
|
|
25
|
+
select__wrapper: x,
|
|
26
|
+
"select__wrapper--fit-content-width": "_select__wrapper--fit-content-width_1abqy_81",
|
|
27
|
+
select__label: m,
|
|
28
|
+
"messages-wrapper": "_messages-wrapper_1abqy_92",
|
|
29
|
+
select: f,
|
|
30
|
+
select__popup: w,
|
|
31
|
+
select__listbox: v,
|
|
32
|
+
select__listbox__option: S,
|
|
33
|
+
select__listbox__option__icon: k,
|
|
34
|
+
"select__listbox__option--disabled": "_select__listbox__option--disabled_1abqy_132",
|
|
35
|
+
"select__listbox__option--selected": "_select__listbox__option--selected_1abqy_132",
|
|
36
|
+
"select-button": "_select-button_1abqy_57",
|
|
37
|
+
"select-button--full-width": "_select-button--full-width_1abqy_167",
|
|
38
|
+
"select-button--placeholder": "_select-button--placeholder_1abqy_170",
|
|
39
|
+
"base-Select-popup": "_base-Select-popup_1abqy_176",
|
|
40
|
+
"select-button__icon": "_select-button__icon_1abqy_188",
|
|
41
|
+
"select-button--active": "_select-button--active_1abqy_191",
|
|
42
|
+
"select-button--error": "_select-button--error_1abqy_194",
|
|
43
|
+
"info-message": "_info-message_1abqy_223",
|
|
44
|
+
"error-message": "_error-message_1abqy_224"
|
|
45
|
+
}, C = g((_, y) => {
|
|
46
|
+
const { children: o, disabled: c, className: r, "data-testid": n, prefix: s, onClick: i, fullWidth: u, placeholder: h } = _, a = _["aria-expanded"];
|
|
47
|
+
return /* @__PURE__ */ l(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
className: d(
|
|
51
|
+
r,
|
|
52
|
+
a ? t["select-button--active"] : "",
|
|
53
|
+
t["select-button"],
|
|
54
|
+
u && t["select-button--full-width"],
|
|
55
|
+
String(h) === String(o) && t["select-button--placeholder"]
|
|
56
|
+
),
|
|
57
|
+
type: "button",
|
|
58
|
+
onClick: i,
|
|
59
|
+
disabled: c,
|
|
60
|
+
"data-testid": n,
|
|
61
|
+
ref: y,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ l("span", { className: t["select-button__text"], children: [
|
|
64
|
+
s && /* @__PURE__ */ e(b, { variant: "base-lg", children: s }),
|
|
65
|
+
/* @__PURE__ */ e(b, { variant: "base-lg", children: o })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ e("span", { className: t["select-button__icon"], children: a ? /* @__PURE__ */ e(p, { icon: "chevron-up" }) : /* @__PURE__ */ e(p, { icon: "chevron-down" }) })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
C as S,
|
|
74
|
+
t as s
|
|
75
|
+
};
|
package/dist/assets/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_3n32h_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_3n32h_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_3n32h_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_3n32h_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_3n32h_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_3n32h_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_3n32h_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_3n32h_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_3n32h_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_3n32h_57,._input__input-el_3n32h_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_3n32h_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_3n32h_65,._input__input-el_3n32h_57{font-weight:var(--base-bold)}._u-typography-base--strikethrough_3n32h_68{text-decoration:line-through}._u-typography-base--underlined_3n32h_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_3n32h_74{text-decoration:underline line-through}._input_3n32h_57{position:relative}._input_3n32h_57:has(._input__messages-wrapper_3n32h_81:not(:empty)){padding-bottom:1.6875rem}._input__label_3n32h_84{display:block;margin-bottom:.3125rem;color:var(--gray-75)}._input__input-el-wrapper_3n32h_89{display:flex;align-items:center;height:2.5rem;border:solid .0625rem var(--gray-25);border-radius:.375rem;transition:all .3s}._input__input-el_3n32h_57{all:unset;width:100%;height:2.5rem;padding:0 1rem;color:var(--gray-90);outline:none}._input__input-el_3n32h_57::placeholder{color:var(--gray-50)}._input__left-icon_3n32h_108,._input__right-icon_3n32h_108{display:flex;align-items:center;justify-content:center;height:1rem}._input__left-icon_3n32h_108{padding-left:1rem}._input__right-icon_3n32h_108{padding-right:1rem}._input__messages-wrapper_3n32h_81{position:absolute;display:flex;gap:1rem;justify-content:space-between;width:100%}._input__messages-wrapper_3n32h_81:not(:empty){margin-top:.3125rem}._input__messages-wrapper_3n32h_81 svg{min-width:1rem;min-height:1rem}._input__info-message_3n32h_134,._input__error-message_3n32h_134{display:flex;gap:.375rem;align-items:center}._input__info-message_3n32h_134{color:var(--gray-75)}._input__error-message_3n32h_134{color:var(--alert)}._input__chars-counter_3n32h_145{margin-left:auto;color:var(--gray-75);white-space:nowrap}._input--disabled_3n32h_150 ._input__input-el_3n32h_57{color:var(--gray-50)}._input_3n32h_57:has(._input--disabled_3n32h_150) ._input__label_3n32h_84{color:var(--gray-25)}._input--focused_3n32h_156._input__input-el-wrapper_3n32h_89{border-color:var(--accent)}._input--error_3n32h_159._input__input-el-wrapper_3n32h_89{border-color:var(--alert)}._input__input-el-wrapper_3n32h_89:hover:not(._input--disabled_3n32h_150,._input--focused_3n32h_156,._input--error_3n32h_159){border-color:var(--gray-75)}textarea._input__input-el_3n32h_57{height:auto;padding:.5rem 1rem;resize:vertical}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_1abqy_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_1abqy_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_1abqy_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_1abqy_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_1abqy_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_1abqy_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_1abqy_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1abqy_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1abqy_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1abqy_57,._select-button__text_1abqy_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1abqy_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1abqy_65,._select__listbox__option__text_1abqy_65{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1abqy_68{text-decoration:line-through}._u-typography-base--underlined_1abqy_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_1abqy_74{text-decoration:underline line-through}._select__wrapper_1abqy_78{position:relative}._select__wrapper--fit-content-width_1abqy_81{width:fit-content}._select__wrapper_1abqy_78 ._select__label_1abqy_84{display:block;margin-bottom:.3125rem;color:var(--gray-75)}._select__wrapper_1abqy_78:has(:disabled) ._select__label_1abqy_84{color:var(--gray-25)}._select__wrapper_1abqy_78:has(._messages-wrapper_1abqy_92:not(:empty)){padding-bottom:1.6875rem}._select_1abqy_57{background-color:transparent}._select__popup_1abqy_99{z-index:9999;width:100%}._select__listbox_1abqy_65{min-width:10.75rem;max-height:400px;padding:.5rem;margin-top:.25rem;overflow-y:auto;background-color:#fff;border-radius:var(--border-radius);box-shadow:0 6px 12px rgba(var(--black-100-rgb),20%)}._select__listbox_1abqy_65 [class*=base-Option-highlighted]{outline:none}._select__listbox_1abqy_65 [class*=base-Option-highlighted]:not([class*=--selected]){color:var(--accent)}._select__listbox__option_1abqy_65{display:flex;gap:.5rem;align-items:center;padding:.625rem;color:var(--gray-90);list-style:none;cursor:pointer;border-radius:var(--border-radius-soft)}._select__listbox__option__icon_1abqy_129{display:flex}._select__listbox__option_1abqy_65:hover:not(._select__listbox__option--disabled_1abqy_132,._select__listbox__option--selected_1abqy_132){padding:.625rem;color:var(--accent);background-color:rgba(var(--black-100-rgb),4%);border-radius:var(--border-radius-soft)}._select__listbox__option_1abqy_65:active:not(._select__listbox__option--disabled_1abqy_132){color:var(--accent-dark)}._select__listbox__option--selected_1abqy_132{color:var(--gray-90);background-color:var(--accent-lighter)}._select__listbox__option--disabled_1abqy_132{color:var(--gray-50);cursor:default;border:transparent}._select-button_1abqy_57{display:flex;gap:.5rem;align-items:center;justify-content:space-between;width:11.875rem;min-width:fit-content;height:2.5rem;padding:.625rem 1rem;color:var(--gray-90);cursor:pointer;background-color:var(--white-100);border:1px solid var(--gray-25);border-radius:var(--border-radius);outline:none}._select-button--full-width_1abqy_167{width:100%}._select-button--placeholder_1abqy_170{color:var(--gray-50)}._select-button_1abqy_57+input[aria-hidden=true]{position:fixed!important}._select-button_1abqy_57 ._base-Select-popup_1abqy_176{z-index:1}._select-button__text_1abqy_57{display:flex;gap:.5rem;width:100%;overflow:hidden;text-align:start;text-overflow:ellipsis;text-wrap:nowrap}._select-button__icon_1abqy_188{display:flex}._select-button--active_1abqy_191{border:1px solid var(--accent)}._select-button--error_1abqy_194{border:solid 1px var(--alert)}._select-button_1abqy_57:disabled{color:var(--gray-50);cursor:default;border:1px solid var(--gray-25)}._select-button_1abqy_57:hover:not(._select-button_1abqy_57:disabled,._select-button--active_1abqy_191,._select-button--error_1abqy_194){border:1px solid var(--gray-75)}._select-button_1abqy_57:focus:not(._select-button_1abqy_57:disabled,._select-button--error_1abqy_194),._select-button_1abqy_57:active:not(._select-button_1abqy_57:disabled,._select-button--error_1abqy_194){border:1px solid var(--accent)}._messages-wrapper_1abqy_92{position:absolute;display:flex;align-items:center;justify-content:space-between}._messages-wrapper_1abqy_92:not(:empty){margin-top:.3125rem}._messages-wrapper_1abqy_92 svg{min-width:1rem;min-height:1rem}._info-message_1abqy_223,._error-message_1abqy_224{display:flex;gap:.375rem;align-items:center}._info-message_1abqy_223{color:var(--gray-75)}._error-message_1abqy_224{color:var(--alert)}
|
|
@@ -1,226 +1,226 @@
|
|
|
1
1
|
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { forwardRef as de, useState as ce, useId as _e, useMemo as
|
|
5
|
-
import { c as
|
|
6
|
-
import { Icon as
|
|
2
|
+
import { jsxs as q, jsx as k } from "react/jsx-runtime";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { forwardRef as de, useState as ce, useId as _e, useMemo as he } from "react";
|
|
5
|
+
import { c as E } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { Icon as me } from "../Icon/Icon.js";
|
|
7
7
|
import { Typography as L } from "../Typography/Typography.js";
|
|
8
|
-
import { g as
|
|
9
|
-
function
|
|
8
|
+
import { g as fe, a as ye, u as ge, f as Y, b as f, _ as be, c as Q, i as Ce, P as e, d as we, e as xe } from "../../useSlotProps-C_I1kEHr.js";
|
|
9
|
+
function Pe(s) {
|
|
10
10
|
let l = "https://mui.com/production-error/?code=" + s;
|
|
11
11
|
for (let d = 1; d < arguments.length; d += 1)
|
|
12
12
|
l += "&args[]=" + encodeURIComponent(arguments[d]);
|
|
13
13
|
return "Minified MUI error #" + s + "; visit " + l + " for the full message.";
|
|
14
14
|
}
|
|
15
15
|
const X = "Input";
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function Ne(s) {
|
|
17
|
+
return fe(X, s);
|
|
18
18
|
}
|
|
19
19
|
ye(X, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
20
|
-
const Z = /* @__PURE__ */
|
|
20
|
+
const Z = /* @__PURE__ */ x.createContext(void 0);
|
|
21
21
|
process.env.NODE_ENV !== "production" && (Z.displayName = "FormControlContext");
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function ve() {
|
|
23
|
+
return x.useContext(Z);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Re(s = {}) {
|
|
26
26
|
const {
|
|
27
27
|
defaultValue: l,
|
|
28
28
|
disabled: d = !1,
|
|
29
29
|
error: u = !1,
|
|
30
30
|
onBlur: c,
|
|
31
|
-
onChange:
|
|
32
|
-
onFocus:
|
|
33
|
-
required:
|
|
34
|
-
value:
|
|
35
|
-
inputRef:
|
|
36
|
-
} = s,
|
|
37
|
-
let g,
|
|
38
|
-
if (
|
|
39
|
-
var
|
|
40
|
-
if (g = void 0,
|
|
41
|
-
const
|
|
42
|
-
|
|
31
|
+
onChange: h,
|
|
32
|
+
onFocus: P,
|
|
33
|
+
required: N = !1,
|
|
34
|
+
value: F,
|
|
35
|
+
inputRef: v
|
|
36
|
+
} = s, t = ve();
|
|
37
|
+
let g, m, b, C, y;
|
|
38
|
+
if (t) {
|
|
39
|
+
var I, _, O;
|
|
40
|
+
if (g = void 0, m = (I = t.disabled) != null ? I : !1, b = (_ = t.error) != null ? _ : !1, C = (O = t.required) != null ? O : !1, y = t.value, process.env.NODE_ENV !== "production") {
|
|
41
|
+
const n = ["defaultValue", "disabled", "error", "required", "value"].filter((o) => s[o] !== void 0);
|
|
42
|
+
n.length > 0 && console.warn(["MUI: You have set props on an input that is inside a FormControl.", "Set these props on a FormControl instead. Otherwise they will be ignored.", `Ignored props: ${n.join(", ")}`].join(`
|
|
43
43
|
`));
|
|
44
44
|
}
|
|
45
45
|
} else
|
|
46
|
-
g = l,
|
|
46
|
+
g = l, m = d, b = u, C = N, y = F;
|
|
47
47
|
const {
|
|
48
|
-
current:
|
|
49
|
-
} =
|
|
50
|
-
process.env.NODE_ENV !== "production" &&
|
|
48
|
+
current: B
|
|
49
|
+
} = x.useRef(y != null), U = x.useCallback((n) => {
|
|
50
|
+
process.env.NODE_ENV !== "production" && n && n.nodeName !== "INPUT" && !n.focus && console.error(["MUI: You have provided a `slots.input` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
51
51
|
`));
|
|
52
|
-
}, []), w =
|
|
53
|
-
|
|
54
|
-
!
|
|
55
|
-
}, [
|
|
56
|
-
const
|
|
52
|
+
}, []), w = x.useRef(null), T = ge(w, v, U), [R, a] = x.useState(!1);
|
|
53
|
+
x.useEffect(() => {
|
|
54
|
+
!t && m && R && (a(!1), c == null || c());
|
|
55
|
+
}, [t, m, R, c]);
|
|
56
|
+
const V = (n) => (o) => {
|
|
57
57
|
var r;
|
|
58
|
-
if (
|
|
59
|
-
|
|
58
|
+
if (t != null && t.disabled) {
|
|
59
|
+
o.stopPropagation();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
if ((r =
|
|
62
|
+
if ((r = n.onFocus) == null || r.call(n, o), t && t.onFocus) {
|
|
63
63
|
var i;
|
|
64
|
-
|
|
64
|
+
t == null || (i = t.onFocus) == null || i.call(t);
|
|
65
65
|
} else
|
|
66
66
|
a(!0);
|
|
67
|
-
},
|
|
67
|
+
}, S = (n) => (o) => {
|
|
68
68
|
var r;
|
|
69
|
-
(r =
|
|
70
|
-
},
|
|
71
|
-
var i,
|
|
72
|
-
if (!
|
|
73
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." :
|
|
74
|
-
|
|
75
|
-
},
|
|
69
|
+
(r = n.onBlur) == null || r.call(n, o), t && t.onBlur ? t.onBlur() : a(!1);
|
|
70
|
+
}, A = (n) => (o, ...r) => {
|
|
71
|
+
var i, H;
|
|
72
|
+
if (!B && (o.target || w.current) == null)
|
|
73
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : Pe(17));
|
|
74
|
+
t == null || (i = t.onChange) == null || i.call(t, o), (H = n.onChange) == null || H.call(n, o, ...r);
|
|
75
|
+
}, D = (n) => (o) => {
|
|
76
76
|
var r;
|
|
77
|
-
w.current &&
|
|
77
|
+
w.current && o.currentTarget === o.target && w.current.focus(), (r = n.onClick) == null || r.call(n, o);
|
|
78
78
|
};
|
|
79
79
|
return {
|
|
80
|
-
disabled:
|
|
80
|
+
disabled: m,
|
|
81
81
|
error: b,
|
|
82
|
-
focused:
|
|
83
|
-
formControlContext:
|
|
84
|
-
getInputProps: (
|
|
85
|
-
const r =
|
|
82
|
+
focused: R,
|
|
83
|
+
formControlContext: t,
|
|
84
|
+
getInputProps: (n = {}) => {
|
|
85
|
+
const r = f({}, {
|
|
86
86
|
onBlur: c,
|
|
87
|
-
onChange:
|
|
88
|
-
onFocus:
|
|
89
|
-
}, Y(
|
|
90
|
-
onBlur:
|
|
91
|
-
onChange:
|
|
92
|
-
onFocus:
|
|
87
|
+
onChange: h,
|
|
88
|
+
onFocus: P
|
|
89
|
+
}, Y(n)), i = f({}, r, {
|
|
90
|
+
onBlur: S(r),
|
|
91
|
+
onChange: A(r),
|
|
92
|
+
onFocus: V(r)
|
|
93
93
|
});
|
|
94
|
-
return
|
|
94
|
+
return f({}, i, {
|
|
95
95
|
"aria-invalid": b || void 0,
|
|
96
96
|
defaultValue: g,
|
|
97
97
|
value: y,
|
|
98
98
|
required: C,
|
|
99
|
-
disabled:
|
|
100
|
-
},
|
|
101
|
-
ref:
|
|
99
|
+
disabled: m
|
|
100
|
+
}, n, {
|
|
101
|
+
ref: T
|
|
102
102
|
}, i);
|
|
103
103
|
},
|
|
104
|
-
getRootProps: (
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
onClick:
|
|
104
|
+
getRootProps: (n = {}) => {
|
|
105
|
+
const o = Y(s, ["onBlur", "onChange", "onFocus"]), r = f({}, o, Y(n));
|
|
106
|
+
return f({}, n, r, {
|
|
107
|
+
onClick: D(r)
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
|
-
inputRef:
|
|
110
|
+
inputRef: T,
|
|
111
111
|
required: C,
|
|
112
112
|
value: y
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Ee = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"], Fe = (s) => {
|
|
116
116
|
const {
|
|
117
117
|
disabled: l,
|
|
118
118
|
error: d,
|
|
119
119
|
focused: u,
|
|
120
120
|
formControlContext: c,
|
|
121
|
-
multiline:
|
|
122
|
-
startAdornment:
|
|
123
|
-
endAdornment:
|
|
121
|
+
multiline: h,
|
|
122
|
+
startAdornment: P,
|
|
123
|
+
endAdornment: N
|
|
124
124
|
} = s;
|
|
125
125
|
return we({
|
|
126
|
-
root: ["root", l && "disabled", d && "error", u && "focused", !!c && "formControl",
|
|
127
|
-
input: ["input", l && "disabled",
|
|
128
|
-
},
|
|
129
|
-
}, ee = /* @__PURE__ */
|
|
130
|
-
var u, c,
|
|
126
|
+
root: ["root", l && "disabled", d && "error", u && "focused", !!c && "formControl", h && "multiline", !!P && "adornedStart", !!N && "adornedEnd"],
|
|
127
|
+
input: ["input", l && "disabled", h && "multiline"]
|
|
128
|
+
}, xe(Ne));
|
|
129
|
+
}, ee = /* @__PURE__ */ x.forwardRef(function(l, d) {
|
|
130
|
+
var u, c, h;
|
|
131
131
|
const {
|
|
132
|
-
"aria-describedby":
|
|
133
|
-
"aria-label":
|
|
134
|
-
"aria-labelledby":
|
|
135
|
-
autoComplete:
|
|
136
|
-
autoFocus:
|
|
132
|
+
"aria-describedby": P,
|
|
133
|
+
"aria-label": N,
|
|
134
|
+
"aria-labelledby": F,
|
|
135
|
+
autoComplete: v,
|
|
136
|
+
autoFocus: t,
|
|
137
137
|
className: g,
|
|
138
|
-
defaultValue:
|
|
138
|
+
defaultValue: m,
|
|
139
139
|
disabled: b,
|
|
140
140
|
endAdornment: C,
|
|
141
141
|
error: y,
|
|
142
|
-
id:
|
|
142
|
+
id: I,
|
|
143
143
|
multiline: _ = !1,
|
|
144
|
-
name:
|
|
145
|
-
onClick:
|
|
146
|
-
onChange:
|
|
144
|
+
name: O,
|
|
145
|
+
onClick: B,
|
|
146
|
+
onChange: U,
|
|
147
147
|
onKeyDown: w,
|
|
148
|
-
onKeyUp:
|
|
149
|
-
onFocus:
|
|
148
|
+
onKeyUp: T,
|
|
149
|
+
onFocus: R,
|
|
150
150
|
onBlur: a,
|
|
151
|
-
placeholder:
|
|
152
|
-
readOnly:
|
|
153
|
-
required:
|
|
154
|
-
startAdornment:
|
|
155
|
-
value:
|
|
156
|
-
type:
|
|
157
|
-
rows:
|
|
158
|
-
slotProps:
|
|
151
|
+
placeholder: V,
|
|
152
|
+
readOnly: S,
|
|
153
|
+
required: A,
|
|
154
|
+
startAdornment: D,
|
|
155
|
+
value: j,
|
|
156
|
+
type: M,
|
|
157
|
+
rows: n,
|
|
158
|
+
slotProps: o = {},
|
|
159
159
|
slots: r = {},
|
|
160
160
|
minRows: i,
|
|
161
|
-
maxRows:
|
|
162
|
-
} = l, W = be(l,
|
|
163
|
-
getRootProps:
|
|
164
|
-
getInputProps:
|
|
165
|
-
focused:
|
|
161
|
+
maxRows: H
|
|
162
|
+
} = l, W = be(l, Ee), {
|
|
163
|
+
getRootProps: ne,
|
|
164
|
+
getInputProps: oe,
|
|
165
|
+
focused: te,
|
|
166
166
|
formControlContext: re,
|
|
167
167
|
error: ae,
|
|
168
168
|
disabled: se
|
|
169
|
-
} =
|
|
169
|
+
} = Re({
|
|
170
170
|
disabled: b,
|
|
171
|
-
defaultValue:
|
|
171
|
+
defaultValue: m,
|
|
172
172
|
error: y,
|
|
173
173
|
onBlur: a,
|
|
174
|
-
onClick:
|
|
175
|
-
onChange:
|
|
176
|
-
onFocus:
|
|
177
|
-
required:
|
|
178
|
-
value:
|
|
179
|
-
}), z = _ ? void 0 :
|
|
174
|
+
onClick: B,
|
|
175
|
+
onChange: U,
|
|
176
|
+
onFocus: R,
|
|
177
|
+
required: A,
|
|
178
|
+
value: j
|
|
179
|
+
}), z = _ ? void 0 : M ?? "text", $ = f({}, l, {
|
|
180
180
|
disabled: se,
|
|
181
181
|
error: ae,
|
|
182
|
-
focused:
|
|
182
|
+
focused: te,
|
|
183
183
|
formControlContext: re,
|
|
184
184
|
multiline: _,
|
|
185
185
|
type: z
|
|
186
|
-
}), G =
|
|
187
|
-
"aria-describedby":
|
|
188
|
-
"aria-label":
|
|
189
|
-
"aria-labelledby":
|
|
190
|
-
autoComplete:
|
|
191
|
-
autoFocus:
|
|
192
|
-
id:
|
|
186
|
+
}), G = Fe($), le = {
|
|
187
|
+
"aria-describedby": P,
|
|
188
|
+
"aria-label": N,
|
|
189
|
+
"aria-labelledby": F,
|
|
190
|
+
autoComplete: v,
|
|
191
|
+
autoFocus: t,
|
|
192
|
+
id: I,
|
|
193
193
|
onKeyDown: w,
|
|
194
|
-
onKeyUp:
|
|
195
|
-
name:
|
|
196
|
-
placeholder:
|
|
197
|
-
readOnly:
|
|
194
|
+
onKeyUp: T,
|
|
195
|
+
name: O,
|
|
196
|
+
placeholder: V,
|
|
197
|
+
readOnly: S,
|
|
198
198
|
type: z
|
|
199
199
|
}, J = (u = r.root) != null ? u : "div", ie = Q({
|
|
200
200
|
elementType: J,
|
|
201
|
-
getSlotProps:
|
|
202
|
-
externalSlotProps:
|
|
201
|
+
getSlotProps: ne,
|
|
202
|
+
externalSlotProps: o.root,
|
|
203
203
|
externalForwardedProps: W,
|
|
204
204
|
additionalProps: {
|
|
205
205
|
ref: d
|
|
206
206
|
},
|
|
207
207
|
ownerState: $,
|
|
208
208
|
className: [G.root, g]
|
|
209
|
-
}), K = _ ? (c = r.textarea) != null ? c : "textarea" : (
|
|
209
|
+
}), K = _ ? (c = r.textarea) != null ? c : "textarea" : (h = r.input) != null ? h : "input", ue = Q({
|
|
210
210
|
elementType: K,
|
|
211
|
-
getSlotProps: (pe) =>
|
|
212
|
-
externalSlotProps:
|
|
213
|
-
additionalProps:
|
|
214
|
-
rows: _ ?
|
|
211
|
+
getSlotProps: (pe) => oe(f({}, le, pe)),
|
|
212
|
+
externalSlotProps: o.input,
|
|
213
|
+
additionalProps: f({
|
|
214
|
+
rows: _ ? n : void 0
|
|
215
215
|
}, _ && !Ce(K) && {
|
|
216
|
-
minRows:
|
|
217
|
-
maxRows:
|
|
216
|
+
minRows: n || i,
|
|
217
|
+
maxRows: n || H
|
|
218
218
|
}),
|
|
219
219
|
ownerState: $,
|
|
220
220
|
className: G.input
|
|
221
221
|
});
|
|
222
|
-
return process.env.NODE_ENV !== "production" && _ &&
|
|
223
|
-
children: [
|
|
222
|
+
return process.env.NODE_ENV !== "production" && _ && n && (i || H) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ q(J, f({}, ie, {
|
|
223
|
+
children: [D, /* @__PURE__ */ k(K, f({}, ue)), C]
|
|
224
224
|
}));
|
|
225
225
|
});
|
|
226
226
|
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
@@ -373,70 +373,70 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
373
373
|
*/
|
|
374
374
|
value: e.any
|
|
375
375
|
});
|
|
376
|
-
const
|
|
377
|
-
"u-typography-h1": "_u-typography-
|
|
378
|
-
"u-typography-h2": "_u-typography-
|
|
379
|
-
"u-typography-h3": "_u-typography-
|
|
380
|
-
"u-typography-h4": "_u-typography-
|
|
381
|
-
"u-typography-h5": "_u-typography-
|
|
382
|
-
"u-typography-h6": "_u-typography-
|
|
383
|
-
"u-typography-base": "_u-typography-
|
|
384
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
385
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
386
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
387
|
-
"input__input-el": "_input__input-
|
|
388
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
389
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
390
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
391
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
392
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
393
|
-
input:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
"
|
|
397
|
-
"
|
|
398
|
-
"
|
|
399
|
-
"input__info-message": "_input__info-
|
|
400
|
-
"input__error-message": "_input__error-
|
|
401
|
-
"input__chars-counter": "_input__chars-
|
|
402
|
-
"input--disabled": "_input--
|
|
403
|
-
"input--focused": "_input--
|
|
404
|
-
"input--error": "_input--
|
|
405
|
-
},
|
|
376
|
+
const Ie = "_input_3n32h_57", Oe = "_input__label_3n32h_84", p = {
|
|
377
|
+
"u-typography-h1": "_u-typography-h1_3n32h_1",
|
|
378
|
+
"u-typography-h2": "_u-typography-h2_3n32h_8",
|
|
379
|
+
"u-typography-h3": "_u-typography-h3_3n32h_15",
|
|
380
|
+
"u-typography-h4": "_u-typography-h4_3n32h_22",
|
|
381
|
+
"u-typography-h5": "_u-typography-h5_3n32h_29",
|
|
382
|
+
"u-typography-h6": "_u-typography-h6_3n32h_36",
|
|
383
|
+
"u-typography-base": "_u-typography-base_3n32h_43",
|
|
384
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_3n32h_49",
|
|
385
|
+
"u-typography-base--xl": "_u-typography-base--xl_3n32h_53",
|
|
386
|
+
"u-typography-base--lg": "_u-typography-base--lg_3n32h_57",
|
|
387
|
+
"input__input-el": "_input__input-el_3n32h_57",
|
|
388
|
+
"u-typography-base--sm": "_u-typography-base--sm_3n32h_61",
|
|
389
|
+
"u-typography-base--bold": "_u-typography-base--bold_3n32h_65",
|
|
390
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_3n32h_68",
|
|
391
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_3n32h_71",
|
|
392
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_3n32h_74",
|
|
393
|
+
input: Ie,
|
|
394
|
+
"input__messages-wrapper": "_input__messages-wrapper_3n32h_81",
|
|
395
|
+
input__label: Oe,
|
|
396
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_3n32h_89",
|
|
397
|
+
"input__left-icon": "_input__left-icon_3n32h_108",
|
|
398
|
+
"input__right-icon": "_input__right-icon_3n32h_108",
|
|
399
|
+
"input__info-message": "_input__info-message_3n32h_134",
|
|
400
|
+
"input__error-message": "_input__error-message_3n32h_134",
|
|
401
|
+
"input__chars-counter": "_input__chars-counter_3n32h_145",
|
|
402
|
+
"input--disabled": "_input--disabled_3n32h_150",
|
|
403
|
+
"input--focused": "_input--focused_3n32h_156",
|
|
404
|
+
"input--error": "_input--error_3n32h_159"
|
|
405
|
+
}, Ae = de(
|
|
406
406
|
({
|
|
407
407
|
label: s,
|
|
408
408
|
infoMessage: l,
|
|
409
409
|
error: d,
|
|
410
410
|
errorMessage: u,
|
|
411
411
|
leftIcon: c,
|
|
412
|
-
rightIcon:
|
|
413
|
-
id:
|
|
414
|
-
disabled:
|
|
415
|
-
type:
|
|
416
|
-
maxLength:
|
|
417
|
-
hideCharsCounter:
|
|
412
|
+
rightIcon: h,
|
|
413
|
+
id: P,
|
|
414
|
+
disabled: N,
|
|
415
|
+
type: F = "text",
|
|
416
|
+
maxLength: v,
|
|
417
|
+
hideCharsCounter: t = !1,
|
|
418
418
|
onChange: g,
|
|
419
|
-
classNameWrapper:
|
|
419
|
+
classNameWrapper: m,
|
|
420
420
|
classNameLabel: b,
|
|
421
421
|
classNameInput: C,
|
|
422
422
|
classNameInfoMessage: y,
|
|
423
|
-
classNameErrorMessage:
|
|
423
|
+
classNameErrorMessage: I,
|
|
424
424
|
classNameCharsCounter: _,
|
|
425
|
-
"data-testid-wrapper":
|
|
426
|
-
"data-testid-label":
|
|
427
|
-
"data-testid-input":
|
|
425
|
+
"data-testid-wrapper": O,
|
|
426
|
+
"data-testid-label": B,
|
|
427
|
+
"data-testid-input": U,
|
|
428
428
|
"data-testid-infoMessage": w,
|
|
429
|
-
"data-testid-errorMessage":
|
|
430
|
-
"data-testid-charsCounter":
|
|
429
|
+
"data-testid-errorMessage": T,
|
|
430
|
+
"data-testid-charsCounter": R,
|
|
431
431
|
...a
|
|
432
|
-
},
|
|
433
|
-
const [
|
|
434
|
-
Object.assign(a, { "data-testid":
|
|
435
|
-
const
|
|
432
|
+
}, V) => {
|
|
433
|
+
const [S, A] = ce(0), D = _e(), j = P || `input_${D}`;
|
|
434
|
+
Object.assign(a, { "data-testid": U });
|
|
435
|
+
const M = (o) => {
|
|
436
436
|
var r, i;
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
type:
|
|
437
|
+
A((i = (r = o == null ? void 0 : o.target) == null ? void 0 : r.value) == null ? void 0 : i.length), g && g(o);
|
|
438
|
+
}, n = he(() => a.multiline !== !0 ? {
|
|
439
|
+
type: F,
|
|
440
440
|
multiline: a.multiline
|
|
441
441
|
} : {
|
|
442
442
|
type: void 0,
|
|
@@ -445,66 +445,66 @@ const Fe = "_input_1iqdc_57", Ie = "_input__label_1iqdc_81", p = {
|
|
|
445
445
|
minRows: a == null ? void 0 : a.minRows,
|
|
446
446
|
maxRows: a == null ? void 0 : a.maxRows
|
|
447
447
|
}, [a]);
|
|
448
|
-
return /* @__PURE__ */
|
|
449
|
-
s && /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ q("div", { className: E(p.input, m), "data-testid": O, children: [
|
|
449
|
+
s && /* @__PURE__ */ k(
|
|
450
450
|
L,
|
|
451
451
|
{
|
|
452
452
|
element: "label",
|
|
453
|
-
elementProps: { htmlFor:
|
|
454
|
-
className:
|
|
455
|
-
"data-testid":
|
|
453
|
+
elementProps: { htmlFor: j },
|
|
454
|
+
className: E(p.input__label, b),
|
|
455
|
+
"data-testid": B,
|
|
456
456
|
children: s
|
|
457
457
|
}
|
|
458
458
|
),
|
|
459
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ k(
|
|
460
460
|
ee,
|
|
461
461
|
{
|
|
462
|
-
id:
|
|
463
|
-
disabled:
|
|
462
|
+
id: j,
|
|
463
|
+
disabled: N,
|
|
464
464
|
error: typeof d == "boolean" ? d : !!u,
|
|
465
465
|
"aria-label": s,
|
|
466
466
|
slotProps: {
|
|
467
|
-
root: (
|
|
468
|
-
className:
|
|
469
|
-
[p["input--disabled"]]:
|
|
470
|
-
[p["input--focused"]]:
|
|
471
|
-
[p["input--error"]]:
|
|
467
|
+
root: (o) => ({
|
|
468
|
+
className: E(p["input__input-el-wrapper"], {
|
|
469
|
+
[p["input--disabled"]]: o.disabled,
|
|
470
|
+
[p["input--focused"]]: o.focused,
|
|
471
|
+
[p["input--error"]]: o.error
|
|
472
472
|
})
|
|
473
473
|
}),
|
|
474
474
|
input: {
|
|
475
|
-
ref:
|
|
476
|
-
className:
|
|
477
|
-
maxLength:
|
|
478
|
-
onChange:
|
|
475
|
+
ref: V,
|
|
476
|
+
className: E(p["input__input-el"], C),
|
|
477
|
+
maxLength: v,
|
|
478
|
+
onChange: M,
|
|
479
479
|
...a
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
|
-
startAdornment: c && /* @__PURE__ */
|
|
483
|
-
endAdornment:
|
|
484
|
-
...
|
|
482
|
+
startAdornment: c && /* @__PURE__ */ k("span", { className: p["input__left-icon"], children: c }),
|
|
483
|
+
endAdornment: h && /* @__PURE__ */ k("span", { className: p["input__right-icon"], children: h }),
|
|
484
|
+
...n
|
|
485
485
|
}
|
|
486
486
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
(u || l) && /* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ q("div", { className: p["input__messages-wrapper"], children: [
|
|
488
|
+
(u || l) && /* @__PURE__ */ q(
|
|
489
489
|
L,
|
|
490
490
|
{
|
|
491
|
-
className: u ?
|
|
492
|
-
"data-testid": u ?
|
|
491
|
+
className: u ? E(p["input__error-message"], I) : E(p["input__info-message"], y),
|
|
492
|
+
"data-testid": u ? T : w,
|
|
493
493
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ k(me, { icon: u ? "circle-exclamation" : "circle-info" }),
|
|
495
495
|
u || l
|
|
496
496
|
]
|
|
497
497
|
}
|
|
498
498
|
),
|
|
499
|
-
|
|
499
|
+
v && !t && /* @__PURE__ */ q(
|
|
500
500
|
L,
|
|
501
501
|
{
|
|
502
|
-
className:
|
|
503
|
-
"data-testid":
|
|
502
|
+
className: E(p["input__chars-counter"], _),
|
|
503
|
+
"data-testid": R,
|
|
504
504
|
children: [
|
|
505
|
-
|
|
505
|
+
S,
|
|
506
506
|
" / ",
|
|
507
|
-
|
|
507
|
+
v
|
|
508
508
|
]
|
|
509
509
|
}
|
|
510
510
|
)
|
|
@@ -513,5 +513,5 @@ const Fe = "_input_1iqdc_57", Ie = "_input__label_1iqdc_81", p = {
|
|
|
513
513
|
}
|
|
514
514
|
);
|
|
515
515
|
export {
|
|
516
|
-
|
|
516
|
+
Ae as Input
|
|
517
517
|
};
|
|
@@ -4,7 +4,7 @@ import { useId as ze } from "react";
|
|
|
4
4
|
import { c as U } from "../../clsx-DB4S2d7J.js";
|
|
5
5
|
import { Icon as We } from "../Icon/Icon.js";
|
|
6
6
|
import { Typography as _e } from "../Typography/Typography.js";
|
|
7
|
-
import { s as y, S as Je } from "../../SelectButton-
|
|
7
|
+
import { s as y, S as Je } from "../../SelectButton-B38avP9u.js";
|
|
8
8
|
import { g as we, a as Ie, u as Y, f as le, b as m, P as l, _ as Ne, c as se, d as Me, e as ke } from "../../useSlotProps-C_I1kEHr.js";
|
|
9
9
|
import { u as Ge, c as ae, a as Se, L as X } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
10
10
|
import { u as Te } from "../../useButton-DcihopJG.js";
|
|
@@ -887,7 +887,7 @@ const Ct = (n) => {
|
|
|
887
887
|
className: U(y.select, i, (_ || g) && y["select-button--error"]),
|
|
888
888
|
slots: { root: Je },
|
|
889
889
|
slotProps: {
|
|
890
|
-
root: { fullWidth: V },
|
|
890
|
+
root: { fullWidth: V, placeholder: p.placeholder },
|
|
891
891
|
listbox: { className: y.select__listbox },
|
|
892
892
|
popup: {
|
|
893
893
|
className: y.select__popup,
|
|
@@ -9,5 +9,6 @@ export interface SelectButtonProps {
|
|
|
9
9
|
'data-testid'?: string;
|
|
10
10
|
onClick: () => void;
|
|
11
11
|
fullWidth?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare const SelectButton: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import './assets/SelectButton.css';
|
|
2
|
-
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as y } from "react";
|
|
4
|
-
import { c as g } from "./clsx-DB4S2d7J.js";
|
|
5
|
-
import { Icon as i } from "./components/Icon/Icon.js";
|
|
6
|
-
import { Typography as p } from "./components/Typography/Typography.js";
|
|
7
|
-
const d = "_select__listbox__option__text_1t1ci_65", x = "_select__wrapper_1t1ci_78", m = "_select__label_1t1ci_84", f = "_select_1t1ci_57", w = "_select__popup_1t1ci_96", v = "_select__listbox_1t1ci_65", k = "_select__listbox__option_1t1ci_65", N = "_select__listbox__option__icon_1t1ci_126", _ = {
|
|
8
|
-
"u-typography-h1": "_u-typography-h1_1t1ci_1",
|
|
9
|
-
"u-typography-h2": "_u-typography-h2_1t1ci_8",
|
|
10
|
-
"u-typography-h3": "_u-typography-h3_1t1ci_15",
|
|
11
|
-
"u-typography-h4": "_u-typography-h4_1t1ci_22",
|
|
12
|
-
"u-typography-h5": "_u-typography-h5_1t1ci_29",
|
|
13
|
-
"u-typography-h6": "_u-typography-h6_1t1ci_36",
|
|
14
|
-
"u-typography-base": "_u-typography-base_1t1ci_43",
|
|
15
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1t1ci_49",
|
|
16
|
-
"u-typography-base--xl": "_u-typography-base--xl_1t1ci_53",
|
|
17
|
-
"u-typography-base--lg": "_u-typography-base--lg_1t1ci_57",
|
|
18
|
-
"select-button__text": "_select-button__text_1t1ci_57",
|
|
19
|
-
"u-typography-base--sm": "_u-typography-base--sm_1t1ci_61",
|
|
20
|
-
"u-typography-base--bold": "_u-typography-base--bold_1t1ci_65",
|
|
21
|
-
select__listbox__option__text: d,
|
|
22
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1t1ci_68",
|
|
23
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1t1ci_71",
|
|
24
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1t1ci_74",
|
|
25
|
-
select__wrapper: x,
|
|
26
|
-
"select__wrapper--fit-content-width": "_select__wrapper--fit-content-width_1t1ci_81",
|
|
27
|
-
select__label: m,
|
|
28
|
-
select: f,
|
|
29
|
-
select__popup: w,
|
|
30
|
-
select__listbox: v,
|
|
31
|
-
select__listbox__option: k,
|
|
32
|
-
select__listbox__option__icon: N,
|
|
33
|
-
"select__listbox__option--disabled": "_select__listbox__option--disabled_1t1ci_129",
|
|
34
|
-
"select__listbox__option--selected": "_select__listbox__option--selected_1t1ci_129",
|
|
35
|
-
"select-button": "_select-button_1t1ci_57",
|
|
36
|
-
"select-button--full-width": "_select-button--full-width_1t1ci_164",
|
|
37
|
-
"base-Select-popup": "_base-Select-popup_1t1ci_170",
|
|
38
|
-
"select-button__icon": "_select-button__icon_1t1ci_182",
|
|
39
|
-
"select-button--active": "_select-button--active_1t1ci_185",
|
|
40
|
-
"select-button--error": "_select-button--error_1t1ci_188",
|
|
41
|
-
"messages-wrapper": "_messages-wrapper_1t1ci_203",
|
|
42
|
-
"info-message": "_info-message_1t1ci_217",
|
|
43
|
-
"error-message": "_error-message_1t1ci_218"
|
|
44
|
-
}, C = y((e, l) => {
|
|
45
|
-
const { children: a, disabled: r, className: n, "data-testid": u, prefix: o, onClick: b, fullWidth: h } = e, s = e["aria-expanded"];
|
|
46
|
-
return /* @__PURE__ */ c(
|
|
47
|
-
"button",
|
|
48
|
-
{
|
|
49
|
-
className: g(
|
|
50
|
-
n,
|
|
51
|
-
s ? _["select-button--active"] : "",
|
|
52
|
-
_["select-button"],
|
|
53
|
-
h && _["select-button--full-width"]
|
|
54
|
-
),
|
|
55
|
-
type: "button",
|
|
56
|
-
onClick: b,
|
|
57
|
-
disabled: r,
|
|
58
|
-
"data-testid": u,
|
|
59
|
-
ref: l,
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ c("span", { className: _["select-button__text"], children: [
|
|
62
|
-
o && /* @__PURE__ */ t(p, { variant: "base-lg", children: o }),
|
|
63
|
-
/* @__PURE__ */ t(p, { variant: "base-lg", children: a })
|
|
64
|
-
] }),
|
|
65
|
-
/* @__PURE__ */ t("span", { className: _["select-button__icon"], children: s ? /* @__PURE__ */ t(i, { icon: "chevron-up" }) : /* @__PURE__ */ t(i, { icon: "chevron-down" }) })
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
C as S,
|
|
72
|
-
_ as s
|
|
73
|
-
};
|