@pismo/marola 0.0.1-alpha.7 → 0.0.1-alpha.9
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/Tab-CRwnhsj5.js +254 -0
- package/dist/Tabs.module-yYcTJnj6.js +103 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -0
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +104 -104
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/InputSearch/InputSearch.d.ts +11 -0
- package/dist/components/InputSearch/InputSearch.js +29 -0
- package/dist/components/InputSearch/InputSearch.stories.d.ts +22 -0
- package/dist/components/InputSearch/InputSearch.stories.js +36 -0
- package/dist/components/PageHeader/PageHeader.js +25 -25
- package/dist/components/PageHeader/PageHeader.stories.js +3 -3
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +30 -30
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +14 -14
- package/dist/components/Tabs/Tab.js +6 -239
- package/dist/components/Tabs/TabPanel.js +18 -19
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.js +12 -8
- package/dist/components/Toggle/Toggle.d.ts +4 -7
- package/dist/components/Toggle/Toggle.js +99 -103
- package/dist/components/Toggle/Toggle.stories.d.ts +21 -0
- package/dist/components/Toggle/Toggle.stories.js +33 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +42 -35
- package/package.json +1 -1
- package/dist/ListContext-Dj2Va7Iv.js +0 -18
- package/dist/Tabs.module-BA-PC7fA.js +0 -66
- package/dist/useCompoundItem-CTYi5M_E.js +0 -41
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as q, jsx as V } from "react/jsx-runtime";
|
|
3
|
+
import * as m from "react";
|
|
4
4
|
import { useState as pe, useId as ce } from "react";
|
|
5
5
|
import { c as F } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Typography as L } from "../Typography/Typography.js";
|
|
7
|
-
import { a as _, _ as
|
|
8
|
-
import { g as
|
|
7
|
+
import { a as _, _ as fe } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
8
|
+
import { g as me, a as _e, u as he, e as z, b as Q, i as be, P as e, c as ge, d as Ce } from "../../index-CqjC7P5Y.js";
|
|
9
9
|
function ye(s) {
|
|
10
10
|
let l = "https://mui.com/production-error/?code=" + s;
|
|
11
11
|
for (let a = 1; a < arguments.length; a += 1)
|
|
12
12
|
l += "&args[]=" + encodeURIComponent(arguments[a]);
|
|
13
13
|
return "Minified MUI error #" + s + "; visit " + l + " for the full message.";
|
|
14
14
|
}
|
|
15
|
-
const X = /* @__PURE__ */
|
|
15
|
+
const X = /* @__PURE__ */ m.createContext(void 0);
|
|
16
16
|
process.env.NODE_ENV !== "production" && (X.displayName = "FormControlContext");
|
|
17
17
|
function we() {
|
|
18
|
-
return
|
|
18
|
+
return m.useContext(X);
|
|
19
19
|
}
|
|
20
20
|
const Z = "Input";
|
|
21
21
|
function ve(s) {
|
|
22
|
-
return
|
|
22
|
+
return me(Z, s);
|
|
23
23
|
}
|
|
24
24
|
_e(Z, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
25
25
|
function Ne(s = {}) {
|
|
@@ -32,28 +32,28 @@ function Ne(s = {}) {
|
|
|
32
32
|
onFocus: P,
|
|
33
33
|
required: x = !1,
|
|
34
34
|
value: C,
|
|
35
|
-
inputRef:
|
|
35
|
+
inputRef: U
|
|
36
36
|
} = s, n = we();
|
|
37
|
-
let E,
|
|
37
|
+
let E, f, y, w, g;
|
|
38
38
|
if (n) {
|
|
39
|
-
var I, d,
|
|
40
|
-
if (E = void 0,
|
|
39
|
+
var I, d, O;
|
|
40
|
+
if (E = void 0, f = (I = n.disabled) != null ? I : !1, y = (d = n.error) != null ? d : !1, w = (O = n.required) != null ? O : !1, g = n.value, process.env.NODE_ENV !== "production") {
|
|
41
41
|
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => s[r] !== void 0);
|
|
42
42
|
t.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: ${t.join(", ")}`].join(`
|
|
43
43
|
`));
|
|
44
44
|
}
|
|
45
45
|
} else
|
|
46
|
-
E = l,
|
|
46
|
+
E = l, f = a, y = h, w = x, g = C;
|
|
47
47
|
const {
|
|
48
|
-
current:
|
|
49
|
-
} =
|
|
48
|
+
current: M
|
|
49
|
+
} = m.useRef(g != null), k = m.useCallback((t) => {
|
|
50
50
|
process.env.NODE_ENV !== "production" && t && t.nodeName !== "INPUT" && !t.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
|
-
}, []), v =
|
|
53
|
-
|
|
54
|
-
!n &&
|
|
55
|
-
}, [n,
|
|
56
|
-
const
|
|
52
|
+
}, []), v = m.useRef(null), T = he(v, U, k), [N, R] = m.useState(!1);
|
|
53
|
+
m.useEffect(() => {
|
|
54
|
+
!n && f && N && (R(!1), u == null || u());
|
|
55
|
+
}, [n, f, N, u]);
|
|
56
|
+
const A = (t) => (r) => {
|
|
57
57
|
var o;
|
|
58
58
|
if (n != null && n.disabled) {
|
|
59
59
|
r.stopPropagation();
|
|
@@ -64,20 +64,20 @@ function Ne(s = {}) {
|
|
|
64
64
|
n == null || (c = n.onFocus) == null || c.call(n);
|
|
65
65
|
} else
|
|
66
66
|
R(!0);
|
|
67
|
-
},
|
|
67
|
+
}, D = (t) => (r) => {
|
|
68
68
|
var o;
|
|
69
69
|
(o = t.onBlur) == null || o.call(t, r), n && n.onBlur ? n.onBlur() : R(!1);
|
|
70
|
-
},
|
|
71
|
-
var c,
|
|
72
|
-
if (!
|
|
70
|
+
}, S = (t) => (r, ...o) => {
|
|
71
|
+
var c, H;
|
|
72
|
+
if (!M && (r.target || v.current) == null)
|
|
73
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." : ye(17));
|
|
74
|
-
n == null || (c = n.onChange) == null || c.call(n, r), (
|
|
75
|
-
},
|
|
74
|
+
n == null || (c = n.onChange) == null || c.call(n, r), (H = t.onChange) == null || H.call(t, r, ...o);
|
|
75
|
+
}, j = (t) => (r) => {
|
|
76
76
|
var o;
|
|
77
77
|
v.current && r.currentTarget === r.target && v.current.focus(), (o = t.onClick) == null || o.call(t, r);
|
|
78
78
|
};
|
|
79
79
|
return {
|
|
80
|
-
disabled:
|
|
80
|
+
disabled: f,
|
|
81
81
|
error: y,
|
|
82
82
|
focused: N,
|
|
83
83
|
formControlContext: n,
|
|
@@ -87,27 +87,27 @@ function Ne(s = {}) {
|
|
|
87
87
|
onChange: b,
|
|
88
88
|
onFocus: P
|
|
89
89
|
}, z(t)), c = _({}, o, {
|
|
90
|
-
onBlur:
|
|
91
|
-
onChange:
|
|
92
|
-
onFocus:
|
|
90
|
+
onBlur: D(o),
|
|
91
|
+
onChange: S(o),
|
|
92
|
+
onFocus: A(o)
|
|
93
93
|
});
|
|
94
94
|
return _({}, c, {
|
|
95
95
|
"aria-invalid": y || void 0,
|
|
96
96
|
defaultValue: E,
|
|
97
97
|
value: g,
|
|
98
98
|
required: w,
|
|
99
|
-
disabled:
|
|
99
|
+
disabled: f
|
|
100
100
|
}, t, {
|
|
101
|
-
ref:
|
|
101
|
+
ref: T
|
|
102
102
|
}, c);
|
|
103
103
|
},
|
|
104
104
|
getRootProps: (t = {}) => {
|
|
105
105
|
const r = z(s, ["onBlur", "onChange", "onFocus"]), o = _({}, r, z(t));
|
|
106
106
|
return _({}, t, o, {
|
|
107
|
-
onClick:
|
|
107
|
+
onClick: j(o)
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
|
-
inputRef:
|
|
110
|
+
inputRef: T,
|
|
111
111
|
required: w,
|
|
112
112
|
value: g
|
|
113
113
|
};
|
|
@@ -126,40 +126,40 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
126
126
|
root: ["root", l && "disabled", a && "error", h && "focused", !!u && "formControl", b && "multiline", !!P && "adornedStart", !!x && "adornedEnd"],
|
|
127
127
|
input: ["input", l && "disabled", b && "multiline"]
|
|
128
128
|
}, Ce(ve));
|
|
129
|
-
}, ee = /* @__PURE__ */
|
|
129
|
+
}, ee = /* @__PURE__ */ m.forwardRef(function(l, a) {
|
|
130
130
|
var h, u, b;
|
|
131
131
|
const {
|
|
132
132
|
"aria-describedby": P,
|
|
133
133
|
"aria-label": x,
|
|
134
134
|
"aria-labelledby": C,
|
|
135
|
-
autoComplete:
|
|
135
|
+
autoComplete: U,
|
|
136
136
|
autoFocus: n,
|
|
137
137
|
className: E,
|
|
138
|
-
defaultValue:
|
|
138
|
+
defaultValue: f,
|
|
139
139
|
disabled: y,
|
|
140
140
|
endAdornment: w,
|
|
141
141
|
error: g,
|
|
142
142
|
id: I,
|
|
143
143
|
multiline: d = !1,
|
|
144
|
-
name:
|
|
145
|
-
onClick:
|
|
146
|
-
onChange:
|
|
144
|
+
name: O,
|
|
145
|
+
onClick: M,
|
|
146
|
+
onChange: k,
|
|
147
147
|
onKeyDown: v,
|
|
148
|
-
onKeyUp:
|
|
148
|
+
onKeyUp: T,
|
|
149
149
|
onFocus: N,
|
|
150
150
|
onBlur: R,
|
|
151
|
-
placeholder:
|
|
152
|
-
readOnly:
|
|
153
|
-
required:
|
|
154
|
-
startAdornment:
|
|
151
|
+
placeholder: A,
|
|
152
|
+
readOnly: D,
|
|
153
|
+
required: S,
|
|
154
|
+
startAdornment: j,
|
|
155
155
|
value: p,
|
|
156
|
-
type:
|
|
156
|
+
type: B,
|
|
157
157
|
rows: t,
|
|
158
158
|
slotProps: r = {},
|
|
159
159
|
slots: o = {},
|
|
160
160
|
minRows: c,
|
|
161
|
-
maxRows:
|
|
162
|
-
} = l, Y =
|
|
161
|
+
maxRows: H
|
|
162
|
+
} = l, Y = fe(l, Pe), {
|
|
163
163
|
getRootProps: te,
|
|
164
164
|
getInputProps: ne,
|
|
165
165
|
focused: oe,
|
|
@@ -168,15 +168,15 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
168
168
|
disabled: ae
|
|
169
169
|
} = Ne({
|
|
170
170
|
disabled: y,
|
|
171
|
-
defaultValue:
|
|
171
|
+
defaultValue: f,
|
|
172
172
|
error: g,
|
|
173
173
|
onBlur: R,
|
|
174
|
-
onClick:
|
|
175
|
-
onChange:
|
|
174
|
+
onClick: M,
|
|
175
|
+
onChange: k,
|
|
176
176
|
onFocus: N,
|
|
177
|
-
required:
|
|
177
|
+
required: S,
|
|
178
178
|
value: p
|
|
179
|
-
}), W = d ? void 0 :
|
|
179
|
+
}), W = d ? void 0 : B ?? "text", $ = _({}, l, {
|
|
180
180
|
disabled: ae,
|
|
181
181
|
error: se,
|
|
182
182
|
focused: oe,
|
|
@@ -187,14 +187,14 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
187
187
|
"aria-describedby": P,
|
|
188
188
|
"aria-label": x,
|
|
189
189
|
"aria-labelledby": C,
|
|
190
|
-
autoComplete:
|
|
190
|
+
autoComplete: U,
|
|
191
191
|
autoFocus: n,
|
|
192
192
|
id: I,
|
|
193
193
|
onKeyDown: v,
|
|
194
|
-
onKeyUp:
|
|
195
|
-
name:
|
|
196
|
-
placeholder:
|
|
197
|
-
readOnly:
|
|
194
|
+
onKeyUp: T,
|
|
195
|
+
name: O,
|
|
196
|
+
placeholder: A,
|
|
197
|
+
readOnly: D,
|
|
198
198
|
type: W
|
|
199
199
|
}, J = (h = o.root) != null ? h : "div", ie = Q({
|
|
200
200
|
elementType: J,
|
|
@@ -214,13 +214,13 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
214
214
|
rows: d ? t : void 0
|
|
215
215
|
}, d && !be(K) && {
|
|
216
216
|
minRows: t || c,
|
|
217
|
-
maxRows: t ||
|
|
217
|
+
maxRows: t || H
|
|
218
218
|
}),
|
|
219
219
|
ownerState: $,
|
|
220
220
|
className: G.input
|
|
221
221
|
});
|
|
222
|
-
return process.env.NODE_ENV !== "production" && d && t && (c ||
|
|
223
|
-
children: [
|
|
222
|
+
return process.env.NODE_ENV !== "production" && d && t && (c || H) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ q(J, _({}, ie, {
|
|
223
|
+
children: [j, /* @__PURE__ */ V(K, _({}, ue)), w]
|
|
224
224
|
}));
|
|
225
225
|
});
|
|
226
226
|
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
@@ -373,26 +373,26 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
373
373
|
*/
|
|
374
374
|
value: e.any
|
|
375
375
|
});
|
|
376
|
-
const Ee = (s) => /* @__PURE__ */
|
|
376
|
+
const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/solid/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
377
377
|
fill: "currentcolor",
|
|
378
378
|
color: "currentcolor",
|
|
379
379
|
width: "1em",
|
|
380
380
|
height: "1em"
|
|
381
|
-
}, ...s }, /* @__PURE__ */
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
"input__input-el
|
|
385
|
-
"
|
|
386
|
-
"
|
|
387
|
-
"
|
|
388
|
-
"
|
|
389
|
-
"
|
|
390
|
-
"
|
|
391
|
-
"
|
|
392
|
-
|
|
393
|
-
"input--focused": "_input--
|
|
394
|
-
"input--error": "_input--
|
|
395
|
-
},
|
|
381
|
+
}, ...s }, /* @__PURE__ */ m.createElement("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z" })), Re = "_input__label_f2das_1", Fe = "_input_f2das_1", i = {
|
|
382
|
+
input__label: Re,
|
|
383
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_f2das_6",
|
|
384
|
+
"input__input-el": "_input__input-el_f2das_6",
|
|
385
|
+
"input__left-icon": "_input__left-icon_f2das_27",
|
|
386
|
+
"input__right-icon": "_input__right-icon_f2das_30",
|
|
387
|
+
"input__messages-wrapper": "_input__messages-wrapper_f2das_33",
|
|
388
|
+
"input__info-message": "_input__info-message_f2das_41",
|
|
389
|
+
"input__error-message": "_input__error-message_f2das_41",
|
|
390
|
+
"input__chars-counter": "_input__chars-counter_f2das_52",
|
|
391
|
+
"input--disabled": "_input--disabled_f2das_56",
|
|
392
|
+
input: Fe,
|
|
393
|
+
"input--focused": "_input--focused_f2das_62",
|
|
394
|
+
"input--error": "_input--error_f2das_65"
|
|
395
|
+
}, Ue = ({
|
|
396
396
|
label: s,
|
|
397
397
|
infoMessage: l,
|
|
398
398
|
errorMessage: a,
|
|
@@ -402,44 +402,44 @@ const Ee = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3
|
|
|
402
402
|
disabled: P,
|
|
403
403
|
type: x = "text",
|
|
404
404
|
maxLength: C,
|
|
405
|
-
hideCharsCounter:
|
|
405
|
+
hideCharsCounter: U = !1,
|
|
406
406
|
onChange: n,
|
|
407
407
|
classNameWrapper: E,
|
|
408
|
-
classNameLabel:
|
|
408
|
+
classNameLabel: f,
|
|
409
409
|
classNameInput: y,
|
|
410
410
|
classNameInfoMessage: w,
|
|
411
411
|
classNameErrorMessage: g,
|
|
412
412
|
classNameCharsCounter: I,
|
|
413
413
|
"data-testid-wrapper": d,
|
|
414
|
-
"data-testid-label":
|
|
415
|
-
"data-testid-input":
|
|
416
|
-
"data-testid-infoMessage":
|
|
414
|
+
"data-testid-label": O,
|
|
415
|
+
"data-testid-input": M,
|
|
416
|
+
"data-testid-infoMessage": k,
|
|
417
417
|
"data-testid-errorMessage": v,
|
|
418
|
-
"data-testid-charsCounter":
|
|
418
|
+
"data-testid-charsCounter": T,
|
|
419
419
|
...N
|
|
420
420
|
}) => {
|
|
421
|
-
const [R,
|
|
422
|
-
Object.assign(N, { "data-testid":
|
|
423
|
-
const
|
|
424
|
-
var
|
|
425
|
-
|
|
421
|
+
const [R, A] = pe(0), D = ce(), S = b || `input_${D}`;
|
|
422
|
+
Object.assign(N, { "data-testid": M });
|
|
423
|
+
const j = (p) => {
|
|
424
|
+
var B, t;
|
|
425
|
+
A((t = (B = p == null ? void 0 : p.target) == null ? void 0 : B.value) == null ? void 0 : t.length), n && n(p);
|
|
426
426
|
};
|
|
427
|
-
return /* @__PURE__ */
|
|
428
|
-
s && /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ q("div", { className: F(i.input, E), "data-testid": d, children: [
|
|
428
|
+
s && /* @__PURE__ */ V(
|
|
429
429
|
L,
|
|
430
430
|
{
|
|
431
431
|
element: "label",
|
|
432
432
|
variant: "form-label",
|
|
433
|
-
elementProps: { htmlFor:
|
|
434
|
-
className: F(i.input__label,
|
|
435
|
-
"data-testid":
|
|
433
|
+
elementProps: { htmlFor: S },
|
|
434
|
+
className: F(i.input__label, f),
|
|
435
|
+
"data-testid": O,
|
|
436
436
|
children: s
|
|
437
437
|
}
|
|
438
438
|
),
|
|
439
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ V(
|
|
440
440
|
ee,
|
|
441
441
|
{
|
|
442
|
-
id:
|
|
442
|
+
id: S,
|
|
443
443
|
type: x,
|
|
444
444
|
disabled: P,
|
|
445
445
|
error: !!a,
|
|
@@ -455,33 +455,33 @@ const Ee = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3
|
|
|
455
455
|
input: {
|
|
456
456
|
className: F(i["input__input-el"], y),
|
|
457
457
|
maxLength: C,
|
|
458
|
-
onChange:
|
|
458
|
+
onChange: j,
|
|
459
459
|
...N
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
|
-
startAdornment: h && /* @__PURE__ */
|
|
463
|
-
endAdornment: u && /* @__PURE__ */
|
|
462
|
+
startAdornment: h && /* @__PURE__ */ V("span", { className: i["input__left-icon"], children: h }),
|
|
463
|
+
endAdornment: u && /* @__PURE__ */ V("span", { className: i["input__right-icon"], children: u })
|
|
464
464
|
}
|
|
465
465
|
),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
(a || l) && /* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ q("div", { className: i["input__messages-wrapper"], children: [
|
|
467
|
+
(a || l) && /* @__PURE__ */ q(
|
|
468
468
|
L,
|
|
469
469
|
{
|
|
470
470
|
variant: "form-hint",
|
|
471
471
|
className: a ? F(i["input__error-message"], g) : F(i["input__info-message"], w),
|
|
472
|
-
"data-testid": a ? v :
|
|
472
|
+
"data-testid": a ? v : k,
|
|
473
473
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ V(Ee, {}),
|
|
475
475
|
a || l
|
|
476
476
|
]
|
|
477
477
|
}
|
|
478
478
|
),
|
|
479
|
-
C && !
|
|
479
|
+
C && !U && /* @__PURE__ */ q(
|
|
480
480
|
L,
|
|
481
481
|
{
|
|
482
482
|
variant: "form-hint",
|
|
483
483
|
className: F(i["input__chars-counter"], I),
|
|
484
|
-
"data-testid":
|
|
484
|
+
"data-testid": T,
|
|
485
485
|
children: [
|
|
486
486
|
R,
|
|
487
487
|
" / ",
|
|
@@ -493,5 +493,5 @@ const Ee = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3
|
|
|
493
493
|
] });
|
|
494
494
|
};
|
|
495
495
|
export {
|
|
496
|
-
|
|
496
|
+
Ue as Input
|
|
497
497
|
};
|
|
@@ -8,7 +8,7 @@ declare const meta: {
|
|
|
8
8
|
errorMessage?: string | undefined;
|
|
9
9
|
leftIcon?: import('react').ReactNode;
|
|
10
10
|
rightIcon?: import('react').ReactNode;
|
|
11
|
-
type?: "text" | "password" | undefined;
|
|
11
|
+
type?: "search" | "text" | "password" | undefined;
|
|
12
12
|
hideCharsCounter?: boolean | undefined;
|
|
13
13
|
classNameWrapper?: string | undefined;
|
|
14
14
|
classNameLabel?: string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
type InputSearchProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
classNameWrapper?: string;
|
|
7
|
+
classNameInputSearch?: string;
|
|
8
|
+
'data-testid'?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const InputSearch: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '../../assets/InputSearch.css';
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Icon as p } from "../Icon/Icon.js";
|
|
5
|
+
import { Input as m } from "../Input/Input.js";
|
|
6
|
+
const u = "_inputSearch_8ayrz_1", a = {
|
|
7
|
+
inputSearch: u
|
|
8
|
+
}, I = ({
|
|
9
|
+
label: n,
|
|
10
|
+
placeholder: c,
|
|
11
|
+
classNameWrapper: s,
|
|
12
|
+
classNameInputSearch: e,
|
|
13
|
+
disabled: i,
|
|
14
|
+
"data-testid": o
|
|
15
|
+
}) => /* @__PURE__ */ t("div", { className: r(a.inputSearch, s), children: /* @__PURE__ */ t(
|
|
16
|
+
m,
|
|
17
|
+
{
|
|
18
|
+
label: n,
|
|
19
|
+
type: "search",
|
|
20
|
+
placeholder: c,
|
|
21
|
+
leftIcon: /* @__PURE__ */ t(p, { icon: "magnifying-glass" }),
|
|
22
|
+
"data-testid": o,
|
|
23
|
+
disabled: i,
|
|
24
|
+
classNameInput: r(a.input, e)
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
export {
|
|
28
|
+
I as InputSearch
|
|
29
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
classNameWrapper?: string | undefined;
|
|
9
|
+
classNameInputSearch?: string | undefined;
|
|
10
|
+
'data-testid'?: string | undefined;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
tags: string[];
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Simple: Story;
|
|
20
|
+
export declare const WithLabel: Story;
|
|
21
|
+
export declare const WithPlaceholder: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InputSearch as a } from "./InputSearch.js";
|
|
2
|
+
const l = {
|
|
3
|
+
title: "Components/InputSearch",
|
|
4
|
+
component: a,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "padded"
|
|
8
|
+
}
|
|
9
|
+
}, r = {
|
|
10
|
+
args: {}
|
|
11
|
+
}, t = {
|
|
12
|
+
name: "With label",
|
|
13
|
+
args: {
|
|
14
|
+
label: "Search by name or id"
|
|
15
|
+
}
|
|
16
|
+
}, o = {
|
|
17
|
+
name: "With placeholder",
|
|
18
|
+
args: {
|
|
19
|
+
label: "Search",
|
|
20
|
+
placeholder: "Search by name or id"
|
|
21
|
+
}
|
|
22
|
+
}, c = {
|
|
23
|
+
args: {
|
|
24
|
+
label: "Search",
|
|
25
|
+
placeholder: "Search by name or id",
|
|
26
|
+
value: "Marola DS",
|
|
27
|
+
disabled: !0
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
c as Disabled,
|
|
32
|
+
r as Simple,
|
|
33
|
+
t as WithLabel,
|
|
34
|
+
o as WithPlaceholder,
|
|
35
|
+
l as default
|
|
36
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import '../../assets/PageHeader.css';
|
|
2
2
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
4
|
import * as _ from "react";
|
|
5
|
-
const
|
|
5
|
+
const z = (n) => /* @__PURE__ */ _.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/solid/arrow-left", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
6
6
|
fill: "currentcolor",
|
|
7
7
|
color: "currentcolor",
|
|
8
8
|
width: "1em",
|
|
9
9
|
height: "1em"
|
|
10
|
-
}, ...
|
|
11
|
-
"page-header": "_page-
|
|
12
|
-
"page-header__top-content": "_page-header__top-
|
|
13
|
-
"page-header__main-content": "_page-header__main-
|
|
14
|
-
"page-header__bottom-content": "_page-header__bottom-
|
|
15
|
-
"page-header__main-left-content": "_page-header__main-left-
|
|
16
|
-
title:
|
|
17
|
-
subtitle:
|
|
18
|
-
"page-header__main-right-content": "_page-header__main-right-
|
|
19
|
-
},
|
|
20
|
-
title:
|
|
10
|
+
}, ...n }, /* @__PURE__ */ _.createElement("path", { d: "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z" })), b = "_title_157kz_45", k = "_subtitle_157kz_46", e = {
|
|
11
|
+
"page-header": "_page-header_157kz_1",
|
|
12
|
+
"page-header__top-content": "_page-header__top-content_157kz_9",
|
|
13
|
+
"page-header__main-content": "_page-header__main-content_157kz_12",
|
|
14
|
+
"page-header__bottom-content": "_page-header__bottom-content_157kz_12",
|
|
15
|
+
"page-header__main-left-content": "_page-header__main-left-content_157kz_39",
|
|
16
|
+
title: b,
|
|
17
|
+
subtitle: k,
|
|
18
|
+
"page-header__main-right-content": "_page-header__main-right-content_157kz_63"
|
|
19
|
+
}, C = ({
|
|
20
|
+
title: n,
|
|
21
21
|
subtitle: d,
|
|
22
|
-
backLinkText:
|
|
22
|
+
backLinkText: c,
|
|
23
23
|
onBackLinkClick: s,
|
|
24
24
|
rightChildren: i,
|
|
25
25
|
bottomChildren: o,
|
|
@@ -28,24 +28,24 @@ const w = (c) => /* @__PURE__ */ _.createElement("svg", { xmlns: "http://www.w3.
|
|
|
28
28
|
classNameTitle: m,
|
|
29
29
|
classNameSubtitle: p,
|
|
30
30
|
"data-testid-wrapper": g,
|
|
31
|
-
"data-testid-backLink":
|
|
32
|
-
"data-testid-title":
|
|
33
|
-
"data-testid-subtitle":
|
|
34
|
-
...
|
|
35
|
-
}) => /* @__PURE__ */ a("div", { className:
|
|
36
|
-
|
|
37
|
-
/* @__PURE__ */ t(
|
|
38
|
-
|
|
31
|
+
"data-testid-backLink": f,
|
|
32
|
+
"data-testid-title": u,
|
|
33
|
+
"data-testid-subtitle": v,
|
|
34
|
+
...w
|
|
35
|
+
}) => /* @__PURE__ */ a("div", { className: r([e["page-header"], l]), "data-testid": g, ...w, children: [
|
|
36
|
+
c && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ a("button", { type: "button", onClick: s, className: h, "data-testid": f, children: [
|
|
37
|
+
/* @__PURE__ */ t(z, { fontSize: 16 }),
|
|
38
|
+
c
|
|
39
39
|
] }) }),
|
|
40
40
|
/* @__PURE__ */ a("div", { className: e["page-header__main-content"], children: [
|
|
41
41
|
/* @__PURE__ */ a("div", { className: e["page-header__main-left-content"], children: [
|
|
42
|
-
/* @__PURE__ */ t("h1", { className:
|
|
43
|
-
/* @__PURE__ */ t("h2", { className:
|
|
42
|
+
/* @__PURE__ */ t("h1", { className: r(e.title, m), "data-testid": u, children: n }),
|
|
43
|
+
/* @__PURE__ */ t("h2", { className: r(e.subtitle, p), "data-testid": v, children: d })
|
|
44
44
|
] }),
|
|
45
45
|
i && /* @__PURE__ */ t("div", { className: e["page-header__main-right-content"], children: i })
|
|
46
46
|
] }),
|
|
47
47
|
o && /* @__PURE__ */ t("div", { className: e["page-header__bottom-content"], children: o })
|
|
48
48
|
] });
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
C as PageHeader
|
|
51
51
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Button as r } from "../Button/Button.js";
|
|
3
|
-
import {
|
|
3
|
+
import { T as e } from "../../Tab-CRwnhsj5.js";
|
|
4
4
|
import { TabPanel as a } from "../Tabs/TabPanel.js";
|
|
5
5
|
import { Tabs as o } from "../Tabs/Tabs.js";
|
|
6
6
|
import { PageHeader as l } from "./PageHeader.js";
|
|
@@ -26,7 +26,7 @@ const g = {
|
|
|
26
26
|
...i.args,
|
|
27
27
|
rightChildren: /* @__PURE__ */ t(r, { variant: "quick", onClick: () => alert("button clicked"), children: "Click me!" })
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, T = {
|
|
30
30
|
name: "With bottom children",
|
|
31
31
|
args: {
|
|
32
32
|
...i.args,
|
|
@@ -43,7 +43,7 @@ const g = {
|
|
|
43
43
|
export {
|
|
44
44
|
c as Simple,
|
|
45
45
|
i as WithBackLink,
|
|
46
|
-
|
|
46
|
+
T as WithBottomChildren,
|
|
47
47
|
u as WithRightChildren,
|
|
48
48
|
g as default
|
|
49
49
|
};
|
|
@@ -6,7 +6,7 @@ type SnackbarProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
6
6
|
classNameWrapper?: string;
|
|
7
7
|
color?: 'success' | 'error' | 'attention';
|
|
8
8
|
snackbarMessage: string;
|
|
9
|
-
autoHideDuration?: number
|
|
9
|
+
autoHideDuration?: number;
|
|
10
10
|
onClose?: () => void;
|
|
11
11
|
};
|
|
12
12
|
export declare const Snackbar: ({ snackbarMessage, color, autoHideDuration, open, onClose, classNameWrapper, "data-testid": dataTestId, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|