@pismo/marola 0.0.1-alpha.32 → 0.0.1-alpha.5
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/README.md +2 -13
- package/dist/{Button-2b1peDFT.js → Button-D--uN90N.js} +26 -25
- package/dist/Dialog.module-BKWFakxu.js +15 -0
- package/dist/ListContext-Dj2Va7Iv.js +18 -0
- package/dist/Tabs.module-BKlNuSPH.js +66 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/Button/Button.d.ts +2 -13
- package/dist/components/Button/Button.js +49 -60
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +124 -12
- package/dist/components/Dialog/Dialog.d.ts +3 -4
- package/dist/components/Dialog/Dialog.js +20098 -444
- package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
- package/dist/components/Dialog/Title.js +29 -0
- package/dist/components/IconButton/IconButton.d.ts +5 -21
- package/dist/components/IconButton/IconButton.js +76 -60
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/PageHeader/PageHeader.d.ts +16 -56
- package/dist/components/PageHeader/PageHeader.js +65 -83
- package/dist/components/Pagination/Pagination.d.ts +6 -25
- package/dist/components/Pagination/Pagination.js +113 -131
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +1 -93
- package/dist/components/Table/Table.d.ts +0 -56
- package/dist/components/Table/Table.js +1 -137
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +1 -21
- package/dist/components/Tabs/Tab.d.ts +1 -6
- package/dist/components/Tabs/Tab.js +173 -113
- package/dist/components/Tabs/TabPanel.d.ts +1 -5
- package/dist/components/Tabs/TabPanel.js +16 -15
- package/dist/components/Tabs/Tabs.d.ts +2 -8
- package/dist/components/Tabs/Tabs.js +664 -242
- package/dist/components/Tooltip/Tooltip.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.js +1 -141
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +58 -58
- package/dist/{index-CH45lKw7.js → index-BvA1HyDs.js} +300 -322
- package/dist/main.d.ts +8 -27
- package/dist/main.js +28 -75
- package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
- package/dist/types/helpers.d.ts +0 -8
- package/dist/useButton-abQpo0za.js +187 -0
- package/dist/useCompoundItem-wTwXbURC.js +41 -0
- package/package.json +9 -30
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/EllipsisTooltip.css +0 -1
- package/dist/assets/Group.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Toggle2.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -30
- package/dist/components/Advice/Advice.js +0 -47
- package/dist/components/Advice/Advice.stories.d.ts +0 -18
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -71
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -39
- package/dist/components/Chip/Chip.js +0 -19
- package/dist/components/Chip/Chip.stories.d.ts +0 -42
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Dialog/DialogTitle.js +0 -29
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
- package/dist/components/Icon/Icon.d.ts +0 -11
- package/dist/components/Icon/Icon.js +0 -127
- package/dist/components/Icon/Icon.stories.d.ts +0 -15
- package/dist/components/Icon/types.d.ts +0 -5
- package/dist/components/Icon/types.js +0 -1
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -508
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -27
- package/dist/components/Snackbar/Snackbar.js +0 -639
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -48
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.stories.d.ts +0 -29
- package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
- package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
- package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
- package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
- package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -266
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/ToggleGroup/Group.d.ts +0 -18
- package/dist/components/ToggleGroup/Group.js +0 -7
- package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
- package/dist/components/ToggleGroup/Toggle.js +0 -17
- package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is automatically generated. Any changes will be lost.
|
|
3
|
-
* run "yarn generate-icon-types" or "yarn build" to regenerate it.
|
|
4
|
-
*/
|
|
5
|
-
export type IconName = 'account-group' | 'arrow-down-arrow-up' | 'arrow-left' | 'calendar-days' | 'circle-arrow-right' | 'circle-check' | 'circle-exclamation' | 'circle-xmark' | 'eye-slash' | 'folder-magnifying-glass' | 'lock-keyhole' | 'magnifying-glass' | 'rectangle-history' | 'trash' | 'warehouse-full' | 'xmark' | 'logo';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<import('./IconButton').IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
tags: string[];
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Simple: Story;
|
|
14
|
-
export declare const WithChildren: Story;
|
|
15
|
-
export declare const Square: Story;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type InputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
-
/** Label text */
|
|
5
|
-
label?: string;
|
|
6
|
-
/** Info message text */
|
|
7
|
-
infoMessage?: string;
|
|
8
|
-
/** Error message text */
|
|
9
|
-
errorMessage?: string;
|
|
10
|
-
/** Left icon element */
|
|
11
|
-
leftIcon?: ReactNode;
|
|
12
|
-
/** Right icon element */
|
|
13
|
-
rightIcon?: ReactNode;
|
|
14
|
-
/** Input type. Default: text */
|
|
15
|
-
type?: 'text' | 'password' | 'search';
|
|
16
|
-
/** Hide the chars counter */
|
|
17
|
-
hideCharsCounter?: boolean;
|
|
18
|
-
/** CSS classes to be applied on the container element */
|
|
19
|
-
classNameWrapper?: string;
|
|
20
|
-
/** CSS classes to be applied on the label element */
|
|
21
|
-
classNameLabel?: string;
|
|
22
|
-
/** CSS classes to be applied on the input element */
|
|
23
|
-
classNameInput?: string;
|
|
24
|
-
/** CSS classes to be applied on the info message element */
|
|
25
|
-
classNameInfoMessage?: string;
|
|
26
|
-
/** CSS classes to be applied on the error message element */
|
|
27
|
-
classNameErrorMessage?: string;
|
|
28
|
-
/** CSS classes to be applied on the chars counter element */
|
|
29
|
-
classNameCharsCounter?: string;
|
|
30
|
-
/** Id to be applied as `data-testid` on the container element */
|
|
31
|
-
'data-testid-wrapper'?: string;
|
|
32
|
-
/** Id to be applied as `data-testid` on the label element */
|
|
33
|
-
'data-testid-label'?: string;
|
|
34
|
-
/** Id to be applied as `data-testid` on the input element */
|
|
35
|
-
'data-testid-input'?: string;
|
|
36
|
-
/** Id to be applied as `data-testid` on the info message element */
|
|
37
|
-
'data-testid-infoMessage'?: string;
|
|
38
|
-
/** Id to be applied as `data-testid` on the error message element */
|
|
39
|
-
'data-testid-errorMessage'?: string;
|
|
40
|
-
/** Id to be applied as `data-testid` on the chars counter element */
|
|
41
|
-
'data-testid-charsCounter'?: string;
|
|
42
|
-
};
|
|
43
|
-
export declare const Input: ({ label, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, type, maxLength, hideCharsCounter, onChange, classNameWrapper, classNameLabel, classNameInput, classNameInfoMessage, classNameErrorMessage, classNameCharsCounter, "data-testid-wrapper": testIdWrapper, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, "data-testid-charsCounter": testIdCharsCounter, ...rest }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
export {};
|
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as q, jsx as B } from "react/jsx-runtime";
|
|
3
|
-
import * as h from "react";
|
|
4
|
-
import { useState as de, useId as ce } from "react";
|
|
5
|
-
import { c as R } from "../../clsx-DB4S2d7J.js";
|
|
6
|
-
import { Typography as L } from "../Typography/Typography.js";
|
|
7
|
-
import { g as _e, a as he, u as me, f as z, b as m, _ as fe, c as Q, i as be, P as e, d as ye, e as ge } from "../../index-CH45lKw7.js";
|
|
8
|
-
function ve(a) {
|
|
9
|
-
let l = "https://mui.com/production-error/?code=" + a;
|
|
10
|
-
for (let s = 1; s < arguments.length; s += 1)
|
|
11
|
-
l += "&args[]=" + encodeURIComponent(arguments[s]);
|
|
12
|
-
return "Minified MUI error #" + a + "; visit " + l + " for the full message.";
|
|
13
|
-
}
|
|
14
|
-
const X = /* @__PURE__ */ h.createContext(void 0);
|
|
15
|
-
process.env.NODE_ENV !== "production" && (X.displayName = "FormControlContext");
|
|
16
|
-
function Ce() {
|
|
17
|
-
return h.useContext(X);
|
|
18
|
-
}
|
|
19
|
-
const Z = "Input";
|
|
20
|
-
function we(a) {
|
|
21
|
-
return _e(Z, a);
|
|
22
|
-
}
|
|
23
|
-
he(Z, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
24
|
-
function ke(a = {}) {
|
|
25
|
-
const {
|
|
26
|
-
defaultValue: l,
|
|
27
|
-
disabled: s = !1,
|
|
28
|
-
error: f = !1,
|
|
29
|
-
onBlur: i,
|
|
30
|
-
onChange: b,
|
|
31
|
-
onFocus: x,
|
|
32
|
-
required: N = !1,
|
|
33
|
-
value: g,
|
|
34
|
-
inputRef: V
|
|
35
|
-
} = a, o = Ce();
|
|
36
|
-
let P, _, v, C, y;
|
|
37
|
-
if (o) {
|
|
38
|
-
var F, p, I;
|
|
39
|
-
if (P = void 0, _ = (F = o.disabled) != null ? F : !1, v = (p = o.error) != null ? p : !1, C = (I = o.required) != null ? I : !1, y = o.value, process.env.NODE_ENV !== "production") {
|
|
40
|
-
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => a[r] !== void 0);
|
|
41
|
-
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(`
|
|
42
|
-
`));
|
|
43
|
-
}
|
|
44
|
-
} else
|
|
45
|
-
P = l, _ = s, v = f, C = N, y = g;
|
|
46
|
-
const {
|
|
47
|
-
current: U
|
|
48
|
-
} = h.useRef(y != null), M = h.useCallback((t) => {
|
|
49
|
-
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(`
|
|
50
|
-
`));
|
|
51
|
-
}, []), w = h.useRef(null), O = me(w, V, M), [k, E] = h.useState(!1);
|
|
52
|
-
h.useEffect(() => {
|
|
53
|
-
!o && _ && k && (E(!1), i == null || i());
|
|
54
|
-
}, [o, _, k, i]);
|
|
55
|
-
const A = (t) => (r) => {
|
|
56
|
-
var n;
|
|
57
|
-
if (o != null && o.disabled) {
|
|
58
|
-
r.stopPropagation();
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if ((n = t.onFocus) == null || n.call(t, r), o && o.onFocus) {
|
|
62
|
-
var c;
|
|
63
|
-
o == null || (c = o.onFocus) == null || c.call(o);
|
|
64
|
-
} else
|
|
65
|
-
E(!0);
|
|
66
|
-
}, D = (t) => (r) => {
|
|
67
|
-
var n;
|
|
68
|
-
(n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : E(!1);
|
|
69
|
-
}, T = (t) => (r, ...n) => {
|
|
70
|
-
var c, H;
|
|
71
|
-
if (!U && (r.target || w.current) == null)
|
|
72
|
-
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." : ve(17));
|
|
73
|
-
o == null || (c = o.onChange) == null || c.call(o, r), (H = t.onChange) == null || H.call(t, r, ...n);
|
|
74
|
-
}, j = (t) => (r) => {
|
|
75
|
-
var n;
|
|
76
|
-
w.current && r.currentTarget === r.target && w.current.focus(), (n = t.onClick) == null || n.call(t, r);
|
|
77
|
-
};
|
|
78
|
-
return {
|
|
79
|
-
disabled: _,
|
|
80
|
-
error: v,
|
|
81
|
-
focused: k,
|
|
82
|
-
formControlContext: o,
|
|
83
|
-
getInputProps: (t = {}) => {
|
|
84
|
-
const n = m({}, {
|
|
85
|
-
onBlur: i,
|
|
86
|
-
onChange: b,
|
|
87
|
-
onFocus: x
|
|
88
|
-
}, z(t)), c = m({}, n, {
|
|
89
|
-
onBlur: D(n),
|
|
90
|
-
onChange: T(n),
|
|
91
|
-
onFocus: A(n)
|
|
92
|
-
});
|
|
93
|
-
return m({}, c, {
|
|
94
|
-
"aria-invalid": v || void 0,
|
|
95
|
-
defaultValue: P,
|
|
96
|
-
value: y,
|
|
97
|
-
required: C,
|
|
98
|
-
disabled: _
|
|
99
|
-
}, t, {
|
|
100
|
-
ref: O
|
|
101
|
-
}, c);
|
|
102
|
-
},
|
|
103
|
-
getRootProps: (t = {}) => {
|
|
104
|
-
const r = z(a, ["onBlur", "onChange", "onFocus"]), n = m({}, r, z(t));
|
|
105
|
-
return m({}, t, n, {
|
|
106
|
-
onClick: j(n)
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
inputRef: O,
|
|
110
|
-
required: C,
|
|
111
|
-
value: y
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
const xe = ["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"], Ne = (a) => {
|
|
115
|
-
const {
|
|
116
|
-
disabled: l,
|
|
117
|
-
error: s,
|
|
118
|
-
focused: f,
|
|
119
|
-
formControlContext: i,
|
|
120
|
-
multiline: b,
|
|
121
|
-
startAdornment: x,
|
|
122
|
-
endAdornment: N
|
|
123
|
-
} = a;
|
|
124
|
-
return ye({
|
|
125
|
-
root: ["root", l && "disabled", s && "error", f && "focused", !!i && "formControl", b && "multiline", !!x && "adornedStart", !!N && "adornedEnd"],
|
|
126
|
-
input: ["input", l && "disabled", b && "multiline"]
|
|
127
|
-
}, ge(we));
|
|
128
|
-
}, ee = /* @__PURE__ */ h.forwardRef(function(l, s) {
|
|
129
|
-
var f, i, b;
|
|
130
|
-
const {
|
|
131
|
-
"aria-describedby": x,
|
|
132
|
-
"aria-label": N,
|
|
133
|
-
"aria-labelledby": g,
|
|
134
|
-
autoComplete: V,
|
|
135
|
-
autoFocus: o,
|
|
136
|
-
className: P,
|
|
137
|
-
defaultValue: _,
|
|
138
|
-
disabled: v,
|
|
139
|
-
endAdornment: C,
|
|
140
|
-
error: y,
|
|
141
|
-
id: F,
|
|
142
|
-
multiline: p = !1,
|
|
143
|
-
name: I,
|
|
144
|
-
onClick: U,
|
|
145
|
-
onChange: M,
|
|
146
|
-
onKeyDown: w,
|
|
147
|
-
onKeyUp: O,
|
|
148
|
-
onFocus: k,
|
|
149
|
-
onBlur: E,
|
|
150
|
-
placeholder: A,
|
|
151
|
-
readOnly: D,
|
|
152
|
-
required: T,
|
|
153
|
-
startAdornment: j,
|
|
154
|
-
value: d,
|
|
155
|
-
type: S,
|
|
156
|
-
rows: t,
|
|
157
|
-
slotProps: r = {},
|
|
158
|
-
slots: n = {},
|
|
159
|
-
minRows: c,
|
|
160
|
-
maxRows: H
|
|
161
|
-
} = l, Y = fe(l, xe), {
|
|
162
|
-
getRootProps: te,
|
|
163
|
-
getInputProps: oe,
|
|
164
|
-
focused: ne,
|
|
165
|
-
formControlContext: re,
|
|
166
|
-
error: ae,
|
|
167
|
-
disabled: se
|
|
168
|
-
} = ke({
|
|
169
|
-
disabled: v,
|
|
170
|
-
defaultValue: _,
|
|
171
|
-
error: y,
|
|
172
|
-
onBlur: E,
|
|
173
|
-
onClick: U,
|
|
174
|
-
onChange: M,
|
|
175
|
-
onFocus: k,
|
|
176
|
-
required: T,
|
|
177
|
-
value: d
|
|
178
|
-
}), W = p ? void 0 : S ?? "text", $ = m({}, l, {
|
|
179
|
-
disabled: se,
|
|
180
|
-
error: ae,
|
|
181
|
-
focused: ne,
|
|
182
|
-
formControlContext: re,
|
|
183
|
-
multiline: p,
|
|
184
|
-
type: W
|
|
185
|
-
}), G = Ne($), le = {
|
|
186
|
-
"aria-describedby": x,
|
|
187
|
-
"aria-label": N,
|
|
188
|
-
"aria-labelledby": g,
|
|
189
|
-
autoComplete: V,
|
|
190
|
-
autoFocus: o,
|
|
191
|
-
id: F,
|
|
192
|
-
onKeyDown: w,
|
|
193
|
-
onKeyUp: O,
|
|
194
|
-
name: I,
|
|
195
|
-
placeholder: A,
|
|
196
|
-
readOnly: D,
|
|
197
|
-
type: W
|
|
198
|
-
}, J = (f = n.root) != null ? f : "div", ue = Q({
|
|
199
|
-
elementType: J,
|
|
200
|
-
getSlotProps: te,
|
|
201
|
-
externalSlotProps: r.root,
|
|
202
|
-
externalForwardedProps: Y,
|
|
203
|
-
additionalProps: {
|
|
204
|
-
ref: s
|
|
205
|
-
},
|
|
206
|
-
ownerState: $,
|
|
207
|
-
className: [G.root, P]
|
|
208
|
-
}), K = p ? (i = n.textarea) != null ? i : "textarea" : (b = n.input) != null ? b : "input", ie = Q({
|
|
209
|
-
elementType: K,
|
|
210
|
-
getSlotProps: (pe) => oe(m({}, le, pe)),
|
|
211
|
-
externalSlotProps: r.input,
|
|
212
|
-
additionalProps: m({
|
|
213
|
-
rows: p ? t : void 0
|
|
214
|
-
}, p && !be(K) && {
|
|
215
|
-
minRows: t || c,
|
|
216
|
-
maxRows: t || H
|
|
217
|
-
}),
|
|
218
|
-
ownerState: $,
|
|
219
|
-
className: G.input
|
|
220
|
-
});
|
|
221
|
-
return process.env.NODE_ENV !== "production" && p && 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, m({}, ue, {
|
|
222
|
-
children: [j, /* @__PURE__ */ B(K, m({}, ie)), C]
|
|
223
|
-
}));
|
|
224
|
-
});
|
|
225
|
-
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
226
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
227
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
228
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
229
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
230
|
-
/**
|
|
231
|
-
* @ignore
|
|
232
|
-
*/
|
|
233
|
-
"aria-describedby": e.string,
|
|
234
|
-
/**
|
|
235
|
-
* @ignore
|
|
236
|
-
*/
|
|
237
|
-
"aria-label": e.string,
|
|
238
|
-
/**
|
|
239
|
-
* @ignore
|
|
240
|
-
*/
|
|
241
|
-
"aria-labelledby": e.string,
|
|
242
|
-
/**
|
|
243
|
-
* This prop helps users to fill forms faster, especially on mobile devices.
|
|
244
|
-
* The name can be confusing, as it's more like an autofill.
|
|
245
|
-
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
|
246
|
-
*/
|
|
247
|
-
autoComplete: e.string,
|
|
248
|
-
/**
|
|
249
|
-
* If `true`, the `input` element is focused during the first mount.
|
|
250
|
-
*/
|
|
251
|
-
autoFocus: e.bool,
|
|
252
|
-
/**
|
|
253
|
-
* Class name applied to the root element.
|
|
254
|
-
*/
|
|
255
|
-
className: e.string,
|
|
256
|
-
/**
|
|
257
|
-
* The default value. Use when the component is not controlled.
|
|
258
|
-
*/
|
|
259
|
-
defaultValue: e.any,
|
|
260
|
-
/**
|
|
261
|
-
* If `true`, the component is disabled.
|
|
262
|
-
* The prop defaults to the value (`false`) inherited from the parent FormControl component.
|
|
263
|
-
*/
|
|
264
|
-
disabled: e.bool,
|
|
265
|
-
/**
|
|
266
|
-
* Trailing adornment for this input.
|
|
267
|
-
*/
|
|
268
|
-
endAdornment: e.node,
|
|
269
|
-
/**
|
|
270
|
-
* If `true`, the `input` will indicate an error by setting the `aria-invalid` attribute on the input and the `baseui--error` class on the root element.
|
|
271
|
-
* The prop defaults to the value (`false`) inherited from the parent FormControl component.
|
|
272
|
-
*/
|
|
273
|
-
error: e.bool,
|
|
274
|
-
/**
|
|
275
|
-
* The id of the `input` element.
|
|
276
|
-
*/
|
|
277
|
-
id: e.string,
|
|
278
|
-
/**
|
|
279
|
-
* @ignore
|
|
280
|
-
*/
|
|
281
|
-
inputRef: e.oneOfType([e.func, e.shape({
|
|
282
|
-
current: e.object
|
|
283
|
-
})]),
|
|
284
|
-
/**
|
|
285
|
-
* Maximum number of rows to display when multiline option is set to true.
|
|
286
|
-
*/
|
|
287
|
-
maxRows: e.number,
|
|
288
|
-
/**
|
|
289
|
-
* Minimum number of rows to display when multiline option is set to true.
|
|
290
|
-
*/
|
|
291
|
-
minRows: e.number,
|
|
292
|
-
/**
|
|
293
|
-
* If `true`, a `textarea` element is rendered.
|
|
294
|
-
* @default false
|
|
295
|
-
*/
|
|
296
|
-
multiline: e.bool,
|
|
297
|
-
/**
|
|
298
|
-
* Name attribute of the `input` element.
|
|
299
|
-
*/
|
|
300
|
-
name: e.string,
|
|
301
|
-
/**
|
|
302
|
-
* @ignore
|
|
303
|
-
*/
|
|
304
|
-
onBlur: e.func,
|
|
305
|
-
/**
|
|
306
|
-
* @ignore
|
|
307
|
-
*/
|
|
308
|
-
onChange: e.func,
|
|
309
|
-
/**
|
|
310
|
-
* @ignore
|
|
311
|
-
*/
|
|
312
|
-
onClick: e.func,
|
|
313
|
-
/**
|
|
314
|
-
* @ignore
|
|
315
|
-
*/
|
|
316
|
-
onFocus: e.func,
|
|
317
|
-
/**
|
|
318
|
-
* @ignore
|
|
319
|
-
*/
|
|
320
|
-
onKeyDown: e.func,
|
|
321
|
-
/**
|
|
322
|
-
* @ignore
|
|
323
|
-
*/
|
|
324
|
-
onKeyUp: e.func,
|
|
325
|
-
/**
|
|
326
|
-
* The short hint displayed in the `input` before the user enters a value.
|
|
327
|
-
*/
|
|
328
|
-
placeholder: e.string,
|
|
329
|
-
/**
|
|
330
|
-
* It prevents the user from changing the value of the field
|
|
331
|
-
* (not from interacting with the field).
|
|
332
|
-
*/
|
|
333
|
-
readOnly: e.bool,
|
|
334
|
-
/**
|
|
335
|
-
* If `true`, the `input` element is required.
|
|
336
|
-
* The prop defaults to the value (`false`) inherited from the parent FormControl component.
|
|
337
|
-
*/
|
|
338
|
-
required: e.bool,
|
|
339
|
-
/**
|
|
340
|
-
* Number of rows to display when multiline option is set to true.
|
|
341
|
-
*/
|
|
342
|
-
rows: e.number,
|
|
343
|
-
/**
|
|
344
|
-
* The props used for each slot inside the Input.
|
|
345
|
-
* @default {}
|
|
346
|
-
*/
|
|
347
|
-
slotProps: e.shape({
|
|
348
|
-
input: e.oneOfType([e.func, e.object]),
|
|
349
|
-
root: e.oneOfType([e.func, e.object])
|
|
350
|
-
}),
|
|
351
|
-
/**
|
|
352
|
-
* The components used for each slot inside the InputBase.
|
|
353
|
-
* Either a string to use a HTML element or a component.
|
|
354
|
-
* @default {}
|
|
355
|
-
*/
|
|
356
|
-
slots: e.shape({
|
|
357
|
-
input: e.elementType,
|
|
358
|
-
root: e.elementType,
|
|
359
|
-
textarea: e.elementType
|
|
360
|
-
}),
|
|
361
|
-
/**
|
|
362
|
-
* Leading adornment for this input.
|
|
363
|
-
*/
|
|
364
|
-
startAdornment: e.node,
|
|
365
|
-
/**
|
|
366
|
-
* Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
|
|
367
|
-
* @default 'text'
|
|
368
|
-
*/
|
|
369
|
-
type: e.oneOf(["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"]),
|
|
370
|
-
/**
|
|
371
|
-
* The value of the `input` element, required for a controlled component.
|
|
372
|
-
*/
|
|
373
|
-
value: e.any
|
|
374
|
-
});
|
|
375
|
-
const Pe = (a) => /* @__PURE__ */ h.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: {
|
|
376
|
-
fill: "currentcolor",
|
|
377
|
-
color: "currentcolor",
|
|
378
|
-
width: "1em",
|
|
379
|
-
height: "1em"
|
|
380
|
-
}, ...a }, /* @__PURE__ */ h.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" })), Ee = "_input__label_19vkb_77", Re = "_input_19vkb_56", u = {
|
|
381
|
-
"u-typography-h1": "_u-typography-h1_19vkb_1",
|
|
382
|
-
"u-typography-h2": "_u-typography-h2_19vkb_8",
|
|
383
|
-
"u-typography-h3": "_u-typography-h3_19vkb_15",
|
|
384
|
-
"u-typography-h4": "_u-typography-h4_19vkb_22",
|
|
385
|
-
"u-typography-h5": "_u-typography-h5_19vkb_29",
|
|
386
|
-
"u-typography-h6": "_u-typography-h6_19vkb_36",
|
|
387
|
-
"u-typography-base": "_u-typography-base_19vkb_43",
|
|
388
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_19vkb_48",
|
|
389
|
-
"u-typography-base--xl": "_u-typography-base--xl_19vkb_52",
|
|
390
|
-
"u-typography-base--lg": "_u-typography-base--lg_19vkb_56",
|
|
391
|
-
"input__input-el": "_input__input-el_19vkb_56",
|
|
392
|
-
"u-typography-base--sm": "_u-typography-base--sm_19vkb_60",
|
|
393
|
-
"u-typography-base--bold": "_u-typography-base--bold_19vkb_64",
|
|
394
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_19vkb_67",
|
|
395
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_19vkb_70",
|
|
396
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_19vkb_73",
|
|
397
|
-
input__label: Ee,
|
|
398
|
-
"input__input-el-wrapper": "_input__input-el-wrapper_19vkb_82",
|
|
399
|
-
"input__left-icon": "_input__left-icon_19vkb_100",
|
|
400
|
-
"input__right-icon": "_input__right-icon_19vkb_100",
|
|
401
|
-
"input__messages-wrapper": "_input__messages-wrapper_19vkb_112",
|
|
402
|
-
"input__info-message": "_input__info-message_19vkb_120",
|
|
403
|
-
"input__error-message": "_input__error-message_19vkb_120",
|
|
404
|
-
"input__chars-counter": "_input__chars-counter_19vkb_131",
|
|
405
|
-
"input--disabled": "_input--disabled_19vkb_135",
|
|
406
|
-
input: Re,
|
|
407
|
-
"input--focused": "_input--focused_19vkb_141",
|
|
408
|
-
"input--error": "_input--error_19vkb_144"
|
|
409
|
-
}, Be = ({
|
|
410
|
-
label: a,
|
|
411
|
-
infoMessage: l,
|
|
412
|
-
errorMessage: s,
|
|
413
|
-
leftIcon: f,
|
|
414
|
-
rightIcon: i,
|
|
415
|
-
id: b,
|
|
416
|
-
disabled: x,
|
|
417
|
-
type: N = "text",
|
|
418
|
-
maxLength: g,
|
|
419
|
-
hideCharsCounter: V = !1,
|
|
420
|
-
onChange: o,
|
|
421
|
-
classNameWrapper: P,
|
|
422
|
-
classNameLabel: _,
|
|
423
|
-
classNameInput: v,
|
|
424
|
-
classNameInfoMessage: C,
|
|
425
|
-
classNameErrorMessage: y,
|
|
426
|
-
classNameCharsCounter: F,
|
|
427
|
-
"data-testid-wrapper": p,
|
|
428
|
-
"data-testid-label": I,
|
|
429
|
-
"data-testid-input": U,
|
|
430
|
-
"data-testid-infoMessage": M,
|
|
431
|
-
"data-testid-errorMessage": w,
|
|
432
|
-
"data-testid-charsCounter": O,
|
|
433
|
-
...k
|
|
434
|
-
}) => {
|
|
435
|
-
const [E, A] = de(0), D = ce(), T = b || `input_${D}`;
|
|
436
|
-
Object.assign(k, { "data-testid": U });
|
|
437
|
-
const j = (d) => {
|
|
438
|
-
var S, t;
|
|
439
|
-
A((t = (S = d == null ? void 0 : d.target) == null ? void 0 : S.value) == null ? void 0 : t.length), o && o(d);
|
|
440
|
-
};
|
|
441
|
-
return /* @__PURE__ */ q("div", { className: R(u.input, P), "data-testid": p, children: [
|
|
442
|
-
a && /* @__PURE__ */ B(
|
|
443
|
-
L,
|
|
444
|
-
{
|
|
445
|
-
element: "label",
|
|
446
|
-
elementProps: { htmlFor: T },
|
|
447
|
-
className: R(u.input__label, _),
|
|
448
|
-
"data-testid": I,
|
|
449
|
-
children: a
|
|
450
|
-
}
|
|
451
|
-
),
|
|
452
|
-
/* @__PURE__ */ B(
|
|
453
|
-
ee,
|
|
454
|
-
{
|
|
455
|
-
id: T,
|
|
456
|
-
type: N,
|
|
457
|
-
disabled: x,
|
|
458
|
-
error: !!s,
|
|
459
|
-
"aria-label": a,
|
|
460
|
-
slotProps: {
|
|
461
|
-
root: (d) => ({
|
|
462
|
-
className: R(u["input__input-el-wrapper"], {
|
|
463
|
-
[u["input--disabled"]]: d.disabled,
|
|
464
|
-
[u["input--focused"]]: d.focused,
|
|
465
|
-
[u["input--error"]]: d.error
|
|
466
|
-
})
|
|
467
|
-
}),
|
|
468
|
-
input: {
|
|
469
|
-
className: R(u["input__input-el"], v),
|
|
470
|
-
maxLength: g,
|
|
471
|
-
onChange: j,
|
|
472
|
-
...k
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
startAdornment: f && /* @__PURE__ */ B("span", { className: u["input__left-icon"], children: f }),
|
|
476
|
-
endAdornment: i && /* @__PURE__ */ B("span", { className: u["input__right-icon"], children: i })
|
|
477
|
-
}
|
|
478
|
-
),
|
|
479
|
-
/* @__PURE__ */ q("div", { className: u["input__messages-wrapper"], children: [
|
|
480
|
-
(s || l) && /* @__PURE__ */ q(
|
|
481
|
-
L,
|
|
482
|
-
{
|
|
483
|
-
className: s ? R(u["input__error-message"], y) : R(u["input__info-message"], C),
|
|
484
|
-
"data-testid": s ? w : M,
|
|
485
|
-
children: [
|
|
486
|
-
/* @__PURE__ */ B(Pe, {}),
|
|
487
|
-
s || l
|
|
488
|
-
]
|
|
489
|
-
}
|
|
490
|
-
),
|
|
491
|
-
g && !V && /* @__PURE__ */ q(
|
|
492
|
-
L,
|
|
493
|
-
{
|
|
494
|
-
className: R(u["input__chars-counter"], F),
|
|
495
|
-
"data-testid": O,
|
|
496
|
-
children: [
|
|
497
|
-
E,
|
|
498
|
-
" / ",
|
|
499
|
-
g
|
|
500
|
-
]
|
|
501
|
-
}
|
|
502
|
-
)
|
|
503
|
-
] })
|
|
504
|
-
] });
|
|
505
|
-
};
|
|
506
|
-
export {
|
|
507
|
-
Be as Input
|
|
508
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ label, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, type, maxLength, hideCharsCounter, onChange, classNameWrapper, classNameLabel, classNameInput, classNameInfoMessage, classNameErrorMessage, classNameCharsCounter, "data-testid-wrapper": testIdWrapper, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, "data-testid-charsCounter": testIdCharsCounter, ...rest }: import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
-
label?: string | undefined;
|
|
7
|
-
infoMessage?: string | undefined;
|
|
8
|
-
errorMessage?: string | undefined;
|
|
9
|
-
leftIcon?: import('react').ReactNode;
|
|
10
|
-
rightIcon?: import('react').ReactNode;
|
|
11
|
-
type?: "search" | "text" | "password" | undefined;
|
|
12
|
-
hideCharsCounter?: boolean | undefined;
|
|
13
|
-
classNameWrapper?: string | undefined;
|
|
14
|
-
classNameLabel?: string | undefined;
|
|
15
|
-
classNameInput?: string | undefined;
|
|
16
|
-
classNameInfoMessage?: string | undefined;
|
|
17
|
-
classNameErrorMessage?: string | undefined;
|
|
18
|
-
classNameCharsCounter?: string | undefined;
|
|
19
|
-
'data-testid-wrapper'?: string | undefined;
|
|
20
|
-
'data-testid-label'?: string | undefined;
|
|
21
|
-
'data-testid-input'?: string | undefined;
|
|
22
|
-
'data-testid-infoMessage'?: string | undefined;
|
|
23
|
-
'data-testid-errorMessage'?: string | undefined;
|
|
24
|
-
'data-testid-charsCounter'?: string | undefined;
|
|
25
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
tags: string[];
|
|
27
|
-
parameters: {
|
|
28
|
-
layout: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export default meta;
|
|
32
|
-
type Story = StoryObj<typeof meta>;
|
|
33
|
-
export declare const Simple: Story;
|
|
34
|
-
export declare const WithLabel: Story;
|
|
35
|
-
export declare const WithPlaceholder: Story;
|
|
36
|
-
export declare const Disabled: Story;
|
|
37
|
-
export declare const WithMaxLength: Story;
|
|
38
|
-
export declare const WithMaxLengthAndHideCharsCounter: Story;
|
|
39
|
-
export declare const WithLeftIcon: Story;
|
|
40
|
-
export declare const WithRightIconAndClickEvent: Story;
|
|
41
|
-
export declare const WithBothIcons: Story;
|
|
42
|
-
export declare const WithInfoMessage: Story;
|
|
43
|
-
export declare const WithErrorMessage: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Input } from '../Input/Input';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
type InputSearchProps = {
|
|
5
|
-
/** How many milliseconds to wait before trigger the onChange event */
|
|
6
|
-
triggerDelay?: number;
|
|
7
|
-
} & ComponentProps<typeof Input>;
|
|
8
|
-
export declare const InputSearch: ({ classNameWrapper, triggerDelay, value, onChange, ...rest }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import '../../assets/InputSearch.css';
|
|
2
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { Icon as p } from "../Icon/Icon.js";
|
|
5
|
-
import { Input as u } from "../Input/Input.js";
|
|
6
|
-
const l = "_inputSearch_114e1_1", h = {
|
|
7
|
-
inputSearch: l
|
|
8
|
-
};
|
|
9
|
-
let n;
|
|
10
|
-
const d = ({
|
|
11
|
-
classNameWrapper: r,
|
|
12
|
-
triggerDelay: o = 500,
|
|
13
|
-
value: c,
|
|
14
|
-
onChange: i = () => {
|
|
15
|
-
},
|
|
16
|
-
...a
|
|
17
|
-
}) => {
|
|
18
|
-
const s = (t) => {
|
|
19
|
-
n && clearTimeout(n), n = setTimeout(() => i(t), o);
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ e("div", { className: m(h.inputSearch, r), children: /* @__PURE__ */ e(
|
|
22
|
-
u,
|
|
23
|
-
{
|
|
24
|
-
type: "search",
|
|
25
|
-
...a,
|
|
26
|
-
leftIcon: /* @__PURE__ */ e(p, { icon: "magnifying-glass" }),
|
|
27
|
-
defaultValue: c,
|
|
28
|
-
onChange: (t) => s(t)
|
|
29
|
-
}
|
|
30
|
-
) });
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
d as InputSearch
|
|
34
|
-
};
|