@pismo/marola 1.0.0-beta.19 → 1.0.0-beta.2
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/{Button-DiLqcAJG.js → Button-2b1peDFT.js} +2 -2
- package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-BSW-Nd-y.js} +3 -4
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/{Popup-lLWZt2wk.js → Popup-B6ZSGIEI.js} +3 -3
- package/dist/{Portal-B_Es6eUL.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-C8JQKaf4.js +61 -0
- package/dist/Toggle-BCgIItCc.js +142 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/TextDisplay.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-DVjg9PRh.js} +1 -1
- package/dist/components/Advice/Advice.d.ts +17 -32
- package/dist/components/Advice/Advice.js +40 -39
- package/dist/components/Advice/Advice.stories.d.ts +3 -4
- package/dist/components/Button/Button.d.ts +0 -2
- package/dist/components/Button/Button.js +49 -51
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +12 -6
- package/dist/components/Chip/Chip.js +5 -6
- package/dist/components/Chip/Chip.stories.d.ts +14 -5
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +2 -2
- package/dist/components/Dialog/Dialog.d.ts +6 -9
- package/dist/components/Dialog/Dialog.js +162 -162
- package/dist/components/Dialog/Dialog.stories.d.ts +46 -50
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -2
- package/dist/components/Icon/Icon.js +34 -52
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +2 -4
- package/dist/components/Input/Input.js +471 -74
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +1 -7
- package/dist/components/Pagination/Pagination.js +182 -104
- package/dist/components/Select/Select.js +8 -9
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -3
- package/dist/components/Skeleton/Skeleton.js +12 -18
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/Table/Table.d.ts +1 -3
- package/dist/components/Table/Table.js +85 -88
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.js +17 -18
- package/dist/components/Tabs/TabPanel.js +26 -27
- package/dist/components/Tabs/Tabs.js +25 -25
- package/dist/components/TextDisplay/TextDisplay.d.ts +1 -3
- package/dist/components/TextDisplay/TextDisplay.js +28 -42
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Toggle.js +3 -3
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -3
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -1
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{useSlotProps-kRhf7Gil.js → index-CH45lKw7.js} +94 -93
- package/dist/{index-D3Wj0eid.js → index-CjW42-M-.js} +1 -1
- package/dist/main.d.ts +0 -5
- package/dist/main.js +76 -85
- package/dist/{useButton-Bn3MNH8I.js → useButton-DNk3wrQp.js} +1 -1
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/{useList-BpJT77u3.js → useList-B0hog_3-.js} +2 -2
- package/package.json +3 -8
- package/dist/Dialog.module-D9e4RsKo.js +0 -30
- package/dist/Input.module-ZTRZRcNt.js +0 -405
- package/dist/SelectButton-CoOT2txy.js +0 -61
- package/dist/Toggle-CRfZgFJp.js +0 -181
- package/dist/assets/Adornment.css +0 -1
- package/dist/assets/Autocomplete.css +0 -1
- package/dist/assets/ResultWithChips.css +0 -1
- package/dist/assets/StepperNavigator.css +0 -1
- package/dist/components/Adornment/Adornment.d.ts +0 -20
- package/dist/components/Adornment/Adornment.js +0 -13
- package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
- package/dist/components/Adornment/adornment.test.d.ts +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -52
- package/dist/components/Autocomplete/Autocomplete.js +0 -690
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +0 -46
- package/dist/components/Pagination/usePagination.d.ts +0 -90
- package/dist/components/Pagination/usePagination.js +0 -79
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
- package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
- package/dist/components/RowItem/RowItem.d.ts +0 -25
- package/dist/components/RowItem/RowItem.js +0 -19
- package/dist/components/RowItem/RowItem.stories.d.ts +0 -17
- package/dist/components/RowItem/rowItem.test.d.ts +0 -1
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -43
- package/dist/components/StepperNavigator/StepperNavigator.js +0 -56
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -16
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
- package/dist/ownerDocument-B61GUaFs.js +0 -33
- package/dist/useCompoundItem-B7Eo_qZk.js +0 -68
- package/dist/useEventCallback-BAQJJ3ye.js +0 -14
- package/dist/useId-BW-oWmul.js +0 -19
package/dist/Toggle-CRfZgFJp.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import './assets/Toggle2.css';
|
|
2
|
-
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as y } from "react";
|
|
4
|
-
import { c as s } from "./clsx-DB4S2d7J.js";
|
|
5
|
-
import { Icon as C } from "./components/Icon/Icon.js";
|
|
6
|
-
import { Typography as N } from "./components/Typography/Typography.js";
|
|
7
|
-
import "./components/Button/Button.js";
|
|
8
|
-
import { Adornment as v } from "./components/Adornment/Adornment.js";
|
|
9
|
-
import "./components/Dialog/Dialog.js";
|
|
10
|
-
import "./components/IconButton/IconButton.js";
|
|
11
|
-
import "./components/Select/Select.js";
|
|
12
|
-
import "./components/Table/Table.js";
|
|
13
|
-
import "./components/Tabs/Tabs.js";
|
|
14
|
-
import { s as w } from "./Group-B3p31ftp.js";
|
|
15
|
-
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
-
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
17
|
-
import { B as x } from "./Button-DiLqcAJG.js";
|
|
18
|
-
const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121", p = {
|
|
19
|
-
"u-typography-h1": "_u-typography-h1_1wvod_1",
|
|
20
|
-
"u-typography-h2": "_u-typography-h2_1wvod_8",
|
|
21
|
-
"u-typography-h3": "_u-typography-h3_1wvod_15",
|
|
22
|
-
"u-typography-h4": "_u-typography-h4_1wvod_22",
|
|
23
|
-
"u-typography-h5": "_u-typography-h5_1wvod_29",
|
|
24
|
-
"u-typography-h6": "_u-typography-h6_1wvod_36",
|
|
25
|
-
"u-typography-base": "_u-typography-base_1wvod_43",
|
|
26
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1wvod_49",
|
|
27
|
-
"u-typography-base--xl": "_u-typography-base--xl_1wvod_53",
|
|
28
|
-
"u-typography-base--lg": "_u-typography-base--lg_1wvod_57",
|
|
29
|
-
"u-typography-base--sm": "_u-typography-base--sm_1wvod_61",
|
|
30
|
-
chip: I,
|
|
31
|
-
"u-typography-base--bold": "_u-typography-base--bold_1wvod_65",
|
|
32
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1wvod_68",
|
|
33
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1wvod_71",
|
|
34
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1wvod_74",
|
|
35
|
-
"chip--button": "_chip--button_1wvod_90",
|
|
36
|
-
"chip--outlined": "_chip--outlined_1wvod_104",
|
|
37
|
-
"chip--contained": "_chip--contained_1wvod_110",
|
|
38
|
-
chip__adornment: P,
|
|
39
|
-
chip__remove: z,
|
|
40
|
-
"chip__remove--disabled": "_chip__remove--disabled_1wvod_133",
|
|
41
|
-
"chip-loading": "_chip-loading_1wvod_137"
|
|
42
|
-
}, S = y((t, c) => {
|
|
43
|
-
const { children: _, onClickContent: o, disabled: r, className: a, variant: n } = t;
|
|
44
|
-
let e = s(
|
|
45
|
-
p.chip,
|
|
46
|
-
{ [p["chip--outlined"]]: n === "outlined" },
|
|
47
|
-
{ [p["chip--contained"]]: n === "contained" },
|
|
48
|
-
a
|
|
49
|
-
);
|
|
50
|
-
return o ? (e += ` ${p["chip--button"]}`, /* @__PURE__ */ i(
|
|
51
|
-
x,
|
|
52
|
-
{
|
|
53
|
-
onClick: o,
|
|
54
|
-
disabled: r,
|
|
55
|
-
"data-testid": t["data-testid"],
|
|
56
|
-
ref: c,
|
|
57
|
-
className: e,
|
|
58
|
-
children: _
|
|
59
|
-
}
|
|
60
|
-
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: c, className: e, children: _ });
|
|
61
|
-
}), M = y((t, c) => {
|
|
62
|
-
const {
|
|
63
|
-
label: _,
|
|
64
|
-
className: o,
|
|
65
|
-
onClickContent: r,
|
|
66
|
-
leftAdornment: a,
|
|
67
|
-
loading: n = !1,
|
|
68
|
-
disabled: e = !1,
|
|
69
|
-
variant: u = "default",
|
|
70
|
-
onClickRemove: m
|
|
71
|
-
} = t;
|
|
72
|
-
if (n)
|
|
73
|
-
return /* @__PURE__ */ i(
|
|
74
|
-
f,
|
|
75
|
-
{
|
|
76
|
-
className: s(p["chip-loading"], t["className-skeleton"]),
|
|
77
|
-
"data-testid": t["data-testid-skeleton"]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
const g = s(a == null ? void 0 : a.className, p.chip__adornment), b = a != null && a.customIcon ? { ...a, className: g } : { ...a, disabled: e, className: g };
|
|
81
|
-
return /* @__PURE__ */ k(
|
|
82
|
-
S,
|
|
83
|
-
{
|
|
84
|
-
ref: c,
|
|
85
|
-
"data-testid": t["data-testid"],
|
|
86
|
-
onClickContent: r,
|
|
87
|
-
disabled: e,
|
|
88
|
-
className: o,
|
|
89
|
-
variant: u,
|
|
90
|
-
children: [
|
|
91
|
-
a && /* @__PURE__ */ i(v, { ...b }),
|
|
92
|
-
_,
|
|
93
|
-
m && /* @__PURE__ */ i(
|
|
94
|
-
"span",
|
|
95
|
-
{
|
|
96
|
-
className: s(p.chip__remove, { [p["chip__remove--disabled"]]: e }),
|
|
97
|
-
role: "button",
|
|
98
|
-
tabIndex: e ? -1 : 0,
|
|
99
|
-
"aria-label": "remove",
|
|
100
|
-
onClick: (d) => {
|
|
101
|
-
d == null || d.stopPropagation(), d == null || d.nativeEvent.stopImmediatePropagation(), m();
|
|
102
|
-
},
|
|
103
|
-
"aria-disabled": e,
|
|
104
|
-
children: /* @__PURE__ */ i(C, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}), h = {
|
|
111
|
-
"row-item": "_row-item_8z1a0_1",
|
|
112
|
-
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
113
|
-
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
114
|
-
"row-item__content": "_row-item__content_8z1a0_22"
|
|
115
|
-
}, O = y((t, c) => {
|
|
116
|
-
const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons: n, ariaLabel: e, className: u } = t, m = s(o == null ? void 0 : o.className, h["row-item__adornment"]), b = {
|
|
117
|
-
onClick: (l) => {
|
|
118
|
-
r || a && a(l);
|
|
119
|
-
},
|
|
120
|
-
tabIndex: 0,
|
|
121
|
-
"aria-label": e,
|
|
122
|
-
role: "button"
|
|
123
|
-
}, d = o != null && o.customIcon ? o : { size: "1rem", ...o };
|
|
124
|
-
return /* @__PURE__ */ k(
|
|
125
|
-
"div",
|
|
126
|
-
{
|
|
127
|
-
"data-testid": t["data-testid"],
|
|
128
|
-
className: s(
|
|
129
|
-
h["row-item"],
|
|
130
|
-
a && h["row-item--clickable"],
|
|
131
|
-
a && r && h["row-item--disabled"],
|
|
132
|
-
u
|
|
133
|
-
),
|
|
134
|
-
...!!a && b,
|
|
135
|
-
ref: c,
|
|
136
|
-
children: [
|
|
137
|
-
o && /* @__PURE__ */ i(v, { ...d, className: m, disabled: r }),
|
|
138
|
-
/* @__PURE__ */ i("span", { className: s(h["row-item__content"]), children: _ }),
|
|
139
|
-
n && /* @__PURE__ */ i(
|
|
140
|
-
"div",
|
|
141
|
-
{
|
|
142
|
-
onClick: (l) => {
|
|
143
|
-
l == null || l.stopPropagation(), l == null || l.nativeEvent.stopImmediatePropagation();
|
|
144
|
-
},
|
|
145
|
-
children: n
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
}), Q = y((t, c) => {
|
|
152
|
-
const { text: _, isSelected: o = !1, value: r, onChange: a } = t;
|
|
153
|
-
return /* @__PURE__ */ k(
|
|
154
|
-
"label",
|
|
155
|
-
{
|
|
156
|
-
className: s([w.toggle__label], { [w["toggle__label--selected"]]: o }),
|
|
157
|
-
"data-testid": t["data-testid"],
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ i(
|
|
160
|
-
"input",
|
|
161
|
-
{
|
|
162
|
-
className: s([w.toggle__input]),
|
|
163
|
-
type: "radio",
|
|
164
|
-
ref: c,
|
|
165
|
-
value: r.toString(),
|
|
166
|
-
onChange: () => a(r),
|
|
167
|
-
role: "radio",
|
|
168
|
-
checked: o,
|
|
169
|
-
"aria-checked": o
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ i(N, { bold: !0, children: _ })
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
export {
|
|
178
|
-
M as C,
|
|
179
|
-
O as R,
|
|
180
|
-
Q as T
|
|
181
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._adornment_1bwrg_1{display:flex}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._autocomplete_1k4ph_1{margin-bottom:16px;position:relative}._autocomplete__dropdown-list_1k4ph_5{position:absolute;background-color:var(--white-100);margin-top:.1rem;border:solid .0625rem var(--gray-25);border-radius:.375rem}._autocomplete__dropdown-list_1k4ph_5:hover{border-color:var(--gray-75)}._autocomplete__dropdown-item_1k4ph_15{background-color:var(--white-100);padding:.375rem;list-style-type:none;cursor:pointer}._autocomplete__dropdown-item_1k4ph_15:hover{color:var(--accent)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._container_hgp0p_1{position:relative;padding:1.5rem 1rem;background:var(--white-100);border:1px solid var(--gray-50);border-radius:.375rem}._container_hgp0p_1 ._chip-item-wrapper_hgp0p_8{display:flex;gap:.5rem}._container_hgp0p_1:not(first-child){min-height:4.125rem;padding:1rem;margin-top:1.5rem}._container_hgp0p_1 ._label_hgp0p_17{position:absolute;top:-1px;left:1.18rem;display:flex;align-items:center;justify-content:center;padding:0 .25rem;font-family:Lato;font-size:.6875rem;font-style:normal;font-weight:400;line-height:1rem;color:var(--gray-75);background:var(--white-100);transform:translateY(-50%)}._chips-container_hgp0p_35{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}._chip-content_hgp0p_42{display:block;font-family:Lato;font-size:.6875rem;font-style:normal;line-height:1rem;color:var(--gray-90)}._chip-label_hgp0p_51{font-weight:700}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._stepper-navigator_1ouny_1{display:flex;justify-content:space-between;padding:1rem 0}._stepper-navigator_1ouny_1>span{display:flex;gap:1rem}._cancel-button_1ouny_11{color:var(--accent-alert-light);background-color:transparent}._cancel-button_1ouny_11:hover:not(:disabled){color:rgba(var(--alert-dark-rgb),.75);background-color:var(--gray-5)}._previous-button_1ouny_20{color:var(--gray-75);background-color:transparent;border:solid 1px var(--gray-75)}._previous-button_1ouny_20:disabled{border-color:transparent}._previous-button_1ouny_20:hover:not(:disabled){color:rgba(var(--gray-75-rgb),.75);background-color:var(--gray-5);border-color:rgba(var(--gray-75),.75)}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IconProps } from '../Icon/Icon.tsx';
|
|
2
|
-
import { Either } from '../../types/helpers';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
export type AdornmentSlotProps = {
|
|
6
|
-
/** Any additional classes to apply to the adornment */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the adornment */
|
|
9
|
-
'data-testid'?: string;
|
|
10
|
-
};
|
|
11
|
-
export type MarolaIconAdornment = AdornmentSlotProps & Partial<IconProps> & {
|
|
12
|
-
/** Whether to render in a disabled state */
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export type CustomIconAdornment = AdornmentSlotProps & {
|
|
16
|
-
/** Render a complete custom icon outside of Marola icon system */
|
|
17
|
-
customIcon: ReactNode;
|
|
18
|
-
};
|
|
19
|
-
export type AdornmentProps = Either<CustomIconAdornment, MarolaIconAdornment>;
|
|
20
|
-
export declare const Adornment: (props: AdornmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import '../../assets/Adornment.css';
|
|
2
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { Icon as d } from "../Icon/Icon.js";
|
|
5
|
-
const l = "_adornment_1bwrg_1", i = {
|
|
6
|
-
adornment: l
|
|
7
|
-
}, g = (t) => {
|
|
8
|
-
const e = c(t.className), { disabled: a, icon: m } = t, o = a ? "rgb(var(--gray-95-rgb), 0.4)" : t == null ? void 0 : t.color;
|
|
9
|
-
return /* @__PURE__ */ n("span", { className: c(i.adornment, e), "data-testid": t["data-testid"], children: t != null && t.customIcon ? t == null ? void 0 : t.customIcon : /* @__PURE__ */ n(d, { color: o, icon: m, size: t.size }) });
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
g as Adornment
|
|
13
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: (props: import('./Adornment').AdornmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
tags: string[];
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const WithMarolaIcon: Story;
|
|
14
|
-
export declare const WithCustomIcon: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
type AutocompleteProps<T> = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> & {
|
|
4
|
-
/** Label text */
|
|
5
|
-
label?: string;
|
|
6
|
-
/** Options array */
|
|
7
|
-
options?: Array<T>;
|
|
8
|
-
/** callback for new option selected */
|
|
9
|
-
onChange?: (event: SyntheticEvent<Element, Event>, newValue: T) => void;
|
|
10
|
-
/** callback when characters are entered into the input box */
|
|
11
|
-
onInputChange?: (event: SyntheticEvent<Element, Event>, newValue: string) => void;
|
|
12
|
-
/** Info message text */
|
|
13
|
-
infoMessage?: string;
|
|
14
|
-
/** Error message text */
|
|
15
|
-
errorMessage?: string;
|
|
16
|
-
/** Left icon element */
|
|
17
|
-
leftIcon?: ReactNode;
|
|
18
|
-
/** Right icon element */
|
|
19
|
-
rightIcon?: ReactNode;
|
|
20
|
-
/** Input type. Default: text */
|
|
21
|
-
type?: 'text' | 'password' | 'search';
|
|
22
|
-
/** Hide the chars counter */
|
|
23
|
-
hideCharsCounter?: boolean;
|
|
24
|
-
/** CSS classes to be applied on the container element */
|
|
25
|
-
classNameWrapper?: string;
|
|
26
|
-
/** CSS classes to be applied on the label element */
|
|
27
|
-
classNameLabel?: string;
|
|
28
|
-
/** CSS classes to be applied on the input element */
|
|
29
|
-
classNameInput?: string;
|
|
30
|
-
/** CSS classes to be applied on the info message element */
|
|
31
|
-
classNameInfoMessage?: string;
|
|
32
|
-
/** CSS classes to be applied on the error message element */
|
|
33
|
-
classNameErrorMessage?: string;
|
|
34
|
-
/** CSS classes to be applied on the chars counter element */
|
|
35
|
-
classNameCharsCounter?: string;
|
|
36
|
-
/** Id to be applied as `data-testid` on the container element */
|
|
37
|
-
'data-testid-wrapper'?: string;
|
|
38
|
-
/** Id to be applied as `data-testid` on the label element */
|
|
39
|
-
'data-testid-label'?: string;
|
|
40
|
-
/** Id to be applied as `data-testid` on the input element */
|
|
41
|
-
'data-testid-input'?: string;
|
|
42
|
-
/** Id to be applied as `data-testid` on the info message element */
|
|
43
|
-
'data-testid-infoMessage'?: string;
|
|
44
|
-
/** Id to be applied as `data-testid` on the error message element */
|
|
45
|
-
'data-testid-errorMessage'?: string;
|
|
46
|
-
/** Id to be applied as `data-testid` on the chars counter element */
|
|
47
|
-
'data-testid-charsCounter'?: string;
|
|
48
|
-
};
|
|
49
|
-
export declare const Autocomplete: <T extends string | (object & {
|
|
50
|
-
label: string;
|
|
51
|
-
})>({ label, type, options, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, maxLength, onChange, onInputChange, classNameLabel, classNameInput, classNameErrorMessage, classNameInfoMessage, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, ...rest }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export {};
|