@pismo/marola 0.0.1-alpha.16 → 0.0.1-alpha.18
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-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-HI1G6ob9.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
- package/dist/{Popup-DFJQc_jn.js → Popup-B6ZSGIEI.js} +12 -13
- package/dist/{Portal-D__zvwbZ.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
- package/dist/assets/Chip.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/TextDisplay.css +1 -0
- package/dist/{combineHooksSlotProps-BHqhiBfc.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +15 -16
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Icon/Icon.d.ts +10 -1
- package/dist/components/Icon/Icon.js +39 -25
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +14 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +38 -39
- package/dist/components/PageHeader/PageHeader.js +23 -23
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +119 -116
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.js +137 -138
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +12 -15
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.js +6 -7
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +27 -16
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.js +38 -40
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +9 -10
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +13 -14
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +36 -37
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +7 -8
- package/dist/components/Tooltip/Tooltip.d.ts +18 -6
- package/dist/components/Tooltip/Tooltip.js +104 -92
- package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/components/Typography/Typography.js +40 -29
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
- package/dist/{index-BJ8HbRCy.js → index-CjW42-M-.js} +5 -6
- package/dist/main.d.ts +5 -1
- package/dist/main.js +34 -32
- package/dist/marola.css +1 -0
- package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/{useEventCallback-vAfOD-oT.js → useEventCallback-xTG9piMa.js} +1 -1
- package/dist/{useList-ByMguSS_.js → useList-B0hog_3-.js} +48 -49
- package/package.json +2 -2
- package/dist/_commonjsHelpers-CT_km90n.js +0 -30
- package/dist/components/Advice/Advice.stories.js +0 -48
- package/dist/components/Button/Button.stories.js +0 -40
- package/dist/components/Chip/Chip.stories.js +0 -59
- package/dist/components/Chip/chip.test.js +0 -17303
- package/dist/components/Dialog/Dialog.stories.js +0 -59
- package/dist/components/Input/Input.stories.js +0 -106
- package/dist/components/InputSearch/InputSearch.stories.js +0 -73
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
- package/dist/components/PageHeader/PageHeader.stories.js +0 -49
- package/dist/components/Select/Select.stories.js +0 -89
- package/dist/components/Snackbar/Snackbar.stories.js +0 -62
- package/dist/components/Toggle/Toggle.stories.js +0 -33
- package/dist/components/Typography/Typography.stories.js +0 -30
- package/dist/components/Typography/typography.test.js +0 -234
- package/dist/magic-string.es-O_8lTkE3.js +0 -738
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
- package/dist/react.esm-DGd9_oKA.js +0 -11126
- package/dist/utils/styleStrings.test.js +0 -41
- package/dist/vi.Y_w82WR8-XVYrIxgm.js +0 -9861
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsxs as $, jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as $e } from "./Actions.js";
|
|
3
3
|
import oe from "./Backdrop.js";
|
|
4
4
|
import re from "./CloseIconButton.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as ze } from "./Content.js";
|
|
6
6
|
import { s as q } from "../../Dialog.module-B8COssqi.js";
|
|
7
7
|
import se from "./Title.js";
|
|
8
|
-
import {
|
|
8
|
+
import { u as Z, P as i, f as ie, b as C, g as ae, a as le, _ as ce, c as z, d as de, e as ue } from "../../index-CH45lKw7.js";
|
|
9
9
|
import * as f from "react";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { e as be } from "../../index-BJ8HbRCy.js";
|
|
10
|
+
import { o as w, e as ee, u as G } from "../../useEventCallback-xTG9piMa.js";
|
|
11
|
+
import { P as fe, H as pe } from "../../Portal-DIeBsWdL.js";
|
|
12
|
+
import { e as be } from "../../index-CjW42-M-.js";
|
|
14
13
|
function X(...e) {
|
|
15
14
|
return e.reduce((t, o) => o == null ? t : function(...s) {
|
|
16
15
|
t.apply(this, s), o.apply(this, s);
|
|
@@ -361,7 +360,7 @@ function Se(e) {
|
|
|
361
360
|
};
|
|
362
361
|
return {
|
|
363
362
|
getRootProps: (b = {}) => {
|
|
364
|
-
const u =
|
|
363
|
+
const u = ie(e);
|
|
365
364
|
delete u.onTransitionEnter, delete u.onTransitionExited;
|
|
366
365
|
const P = C({}, u, b);
|
|
367
366
|
return C({
|
|
@@ -400,9 +399,9 @@ function Se(e) {
|
|
|
400
399
|
}
|
|
401
400
|
const te = "Modal";
|
|
402
401
|
function we(e) {
|
|
403
|
-
return
|
|
402
|
+
return ae(te, e);
|
|
404
403
|
}
|
|
405
|
-
|
|
404
|
+
le(te, ["root", "hidden", "backdrop"]);
|
|
406
405
|
const Oe = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"], Ae = (e) => {
|
|
407
406
|
const {
|
|
408
407
|
open: t,
|
|
@@ -430,7 +429,7 @@ const Oe = ["children", "closeAfterTransition", "container", "disableAutoFocus",
|
|
|
430
429
|
open: I,
|
|
431
430
|
slotProps: A = {},
|
|
432
431
|
slots: N = {}
|
|
433
|
-
} = t, l =
|
|
432
|
+
} = t, l = ce(t, Oe), v = C({}, t, {
|
|
434
433
|
closeAfterTransition: r,
|
|
435
434
|
disableAutoFocus: d,
|
|
436
435
|
disableEnforceFocus: p,
|
|
@@ -614,7 +613,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
614
613
|
root: i.elementType
|
|
615
614
|
})
|
|
616
615
|
});
|
|
617
|
-
const
|
|
616
|
+
const je = ({
|
|
618
617
|
children: e,
|
|
619
618
|
dialogTitle: t,
|
|
620
619
|
dialogSubtitle: o,
|
|
@@ -639,9 +638,9 @@ const qe = ({
|
|
|
639
638
|
}
|
|
640
639
|
);
|
|
641
640
|
export {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
641
|
+
$e as Actions,
|
|
642
|
+
ze as Content,
|
|
643
|
+
je as Dialog,
|
|
645
644
|
se as DialogTitle,
|
|
646
|
-
|
|
645
|
+
je as default
|
|
647
646
|
};
|
|
@@ -82,7 +82,7 @@ declare const meta: {
|
|
|
82
82
|
tabIndex?: number | undefined;
|
|
83
83
|
"aria-activedescendant"?: string | undefined;
|
|
84
84
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
85
|
-
"aria-autocomplete"?: "list" | "none" | "
|
|
85
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
86
86
|
"aria-braillelabel"?: string | undefined;
|
|
87
87
|
"aria-brailleroledescription"?: string | undefined;
|
|
88
88
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -97,7 +97,7 @@ declare const meta: {
|
|
|
97
97
|
"aria-description"?: string | undefined;
|
|
98
98
|
"aria-details"?: string | undefined;
|
|
99
99
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
"aria-dropeffect"?: "link" | "none" | "copy" | "
|
|
100
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
101
101
|
"aria-errormessage"?: string | undefined;
|
|
102
102
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
103
103
|
"aria-flowto"?: string | undefined;
|
|
@@ -119,7 +119,7 @@ declare const meta: {
|
|
|
119
119
|
"aria-posinset"?: number | undefined;
|
|
120
120
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
121
121
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
122
|
-
"aria-relevant"?: "text" | "
|
|
122
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
123
123
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
124
124
|
"aria-roledescription"?: string | undefined;
|
|
125
125
|
"aria-rowcount"?: number | undefined;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
export declare const FamilyAndIcons: {
|
|
2
|
-
readonly 'fa/duotone': readonly ["calendar-days", "circle-arrow-right", "
|
|
2
|
+
readonly 'fa/duotone': readonly ["arrow-down-arrow-up", "calendar-days", "circle-arrow-right", "circle-exclamation", "circle-xmark", "eye-slash", "folder-magnifying-glass", "lock-keyhole", "magnifying-glass", "xmark"];
|
|
3
3
|
readonly pi: readonly ["logo"];
|
|
4
4
|
};
|
|
5
5
|
export type IconFamilies = keyof typeof FamilyAndIcons;
|
|
6
6
|
export type IconPropsByIconFamily<T extends IconFamilies> = {
|
|
7
|
+
/** Icon family name */
|
|
7
8
|
iconFamily: T;
|
|
9
|
+
/** Icon name */
|
|
8
10
|
icon: (typeof FamilyAndIcons)[T][number];
|
|
9
11
|
} | {
|
|
12
|
+
/** Icon family name */
|
|
10
13
|
iconFamily?: never | undefined;
|
|
14
|
+
/** Icon name */
|
|
11
15
|
icon: (typeof FamilyAndIcons)['fa/duotone'][number];
|
|
12
16
|
};
|
|
13
17
|
export type IconCommonProps = {
|
|
18
|
+
/** Size of icon */
|
|
14
19
|
size?: number | string;
|
|
20
|
+
/** Color of the icon */
|
|
15
21
|
color?: string;
|
|
16
22
|
};
|
|
17
23
|
export type IconProps<T extends IconFamilies> = IconCommonProps & IconPropsByIconFamily<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Icon component for most common icons used in Marola
|
|
26
|
+
*/
|
|
18
27
|
export declare const Icon: <T extends "fa/duotone" | "pi">({ iconFamily, icon, size, color }: IconProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/duotone/
|
|
3
|
+
const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/duotone/arrow-down-arrow-up", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
4
|
+
fill: "currentcolor",
|
|
5
|
+
color: "currentcolor",
|
|
6
|
+
width: "1em",
|
|
7
|
+
height: "1em"
|
|
8
|
+
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M237.6 328.7c13.03 11.95 13.9 32.22 1.969 45.27l-87.1 96.09c-12.12 13.26-35.06 13.26-47.19 0l-87.1-96.09c-11.94-13.05-11.06-33.31 1.969-45.27c13.59-12.46 33.8-10.48 45.22 1.969L96 366.1V64.03C96 46.33 110.3 32 128 32s32 14.33 32 32.03v302l32.4-35.4C204.4 317.7 224.6 316.8 237.6 328.7z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M431.6 138l-87.1-96.09c-12.12-13.26-35.06-13.26-47.19 0l-87.1 96.09C196.5 151.1 197.3 171.4 210.4 183.3c13.02 11.95 33.27 11.04 45.22-1.973L288 145.9v302C288 465.7 302.3 480 320 480s32-14.33 32-32.03V145.9l32.4 35.39c11.42 12.45 31.63 14.43 45.22 1.973C442.7 171.4 443.5 151.1 431.6 138z" })), m = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/duotone/calendar-days", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
4
9
|
fill: "currentcolor",
|
|
5
10
|
color: "currentcolor",
|
|
6
11
|
width: "1em",
|
|
@@ -10,7 +15,7 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
10
15
|
color: "currentcolor",
|
|
11
16
|
width: "1em",
|
|
12
17
|
height: "1em"
|
|
13
|
-
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z" })),
|
|
18
|
+
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z" })), d = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/duotone/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
14
19
|
fill: "currentcolor",
|
|
15
20
|
color: "currentcolor",
|
|
16
21
|
width: "1em",
|
|
@@ -19,7 +24,7 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
19
24
|
.fa-secondary {
|
|
20
25
|
opacity: .4
|
|
21
26
|
}
|
|
22
|
-
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M256 304c13.25 0 24-10.75 24-24v-128C280 138.8 269.3 128 256 128S232 138.8 232 152v128C232 293.3 242.8 304 256 304zM256 337.1c-17.36 0-31.44 14.08-31.44 31.44C224.6 385.9 238.6 400 256 400s31.44-14.08 31.44-31.44C287.4 351.2 273.4 337.1 256 337.1z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", 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" })),
|
|
27
|
+
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M256 304c13.25 0 24-10.75 24-24v-128C280 138.8 269.3 128 256 128S232 138.8 232 152v128C232 293.3 242.8 304 256 304zM256 337.1c-17.36 0-31.44 14.08-31.44 31.44C224.6 385.9 238.6 400 256 400s31.44-14.08 31.44-31.44C287.4 351.2 273.4 337.1 256 337.1z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", 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" })), h = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/duotone/circle-xmark", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
23
28
|
fill: "currentcolor",
|
|
24
29
|
color: "currentcolor",
|
|
25
30
|
width: "1em",
|
|
@@ -28,7 +33,7 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
28
33
|
.fa-secondary {
|
|
29
34
|
opacity: .4
|
|
30
35
|
}
|
|
31
|
-
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z" })),
|
|
36
|
+
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z" })), w = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512", "data-waves-icon": "fa/duotone/eye-slash", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
32
37
|
fill: "currentcolor",
|
|
33
38
|
color: "currentcolor",
|
|
34
39
|
width: "1em",
|
|
@@ -42,7 +47,12 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
42
47
|
color: "currentcolor",
|
|
43
48
|
width: "1em",
|
|
44
49
|
height: "1em"
|
|
45
|
-
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M376.1 375l-48.67-48.67C338.1 310.5 344 292 344 272c0-57.44-46.56-104-104-104S136 214.6 136 272s46.56 104 104 104c19.1 0 38.5-5.922 54.36-15.71l48.67 48.67C347.7 413.7 353.8 416 360 416s12.28-2.344 16.97-7.031C386.3 399.6 386.3 384.4 376.1 375zM240 328c-30.88 0-56-25.12-56-56c0-30.88 25.12-56 56-56c30.88 0 56 25.12 56 56C296 302.9 270.9 328 240 328z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M464 96h-192l-64-64h-160C21.5 32 0 53.5 0 80v352C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48v-288C512 117.5 490.5 96 464 96zM376.1 408.1C372.3 413.7 366.2 416 360 416s-12.28-2.344-16.97-7.031l-48.67-48.67C278.5 370.1 259.1 376 240 376c-57.44 0-104-46.56-104-104S182.6 168 240 168s104 46.56 104 104c0 20-5.922 38.5-15.71 54.36l48.67 48.67C386.3 384.4 386.3 399.6 376.1 408.1zM240 216c-30.88 0-56 25.12-56 56c0 30.88 25.12 56 56 56c30.88 0 56-25.12 56-56C296 241.1 270.9 216 240 216z" })), f = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0
|
|
50
|
+
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M376.1 375l-48.67-48.67C338.1 310.5 344 292 344 272c0-57.44-46.56-104-104-104S136 214.6 136 272s46.56 104 104 104c19.1 0 38.5-5.922 54.36-15.71l48.67 48.67C347.7 413.7 353.8 416 360 416s12.28-2.344 16.97-7.031C386.3 399.6 386.3 384.4 376.1 375zM240 328c-30.88 0-56-25.12-56-56c0-30.88 25.12-56 56-56c30.88 0 56 25.12 56 56C296 302.9 270.9 328 240 328z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M464 96h-192l-64-64h-160C21.5 32 0 53.5 0 80v352C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48v-288C512 117.5 490.5 96 464 96zM376.1 408.1C372.3 413.7 366.2 416 360 416s-12.28-2.344-16.97-7.031l-48.67-48.67C278.5 370.1 259.1 376 240 376c-57.44 0-104-46.56-104-104S182.6 168 240 168s104 46.56 104 104c0 20-5.922 38.5-15.71 54.36l48.67 48.67C386.3 384.4 386.3 399.6 376.1 408.1zM240 216c-30.88 0-56 25.12-56 56c0 30.88 25.12 56 56 56c30.88 0 56-25.12 56-56C296 241.1 270.9 216 240 216z" })), f = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/duotone/lock-keyhole", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
51
|
+
fill: "currentcolor",
|
|
52
|
+
color: "currentcolor",
|
|
53
|
+
width: "1em",
|
|
54
|
+
height: "1em"
|
|
55
|
+
}, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, ".fa-secondary{opacity:.4}")), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M384 192C419.3 192 448 220.7 448 256V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V256C0 220.7 28.65 192 64 192H384zM256 320C256 302.3 241.7 288 224 288C206.3 288 192 302.3 192 320V384C192 401.7 206.3 416 224 416C241.7 416 256 401.7 256 384V320z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M224 64C179.8 64 144 99.82 144 144V192H80V144C80 64.47 144.5 0 224 0C303.5 0 368 64.47 368 144V192H304V144C304 99.82 268.2 64 224 64z" })), u = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/duotone/magnifying-glass", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
46
56
|
fill: "currentcolor",
|
|
47
57
|
color: "currentcolor",
|
|
48
58
|
width: "1em",
|
|
@@ -51,7 +61,7 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
51
61
|
.fa-secondary {
|
|
52
62
|
opacity: .4
|
|
53
63
|
}
|
|
54
|
-
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M500.3 443.7l-119.7-119.7c-15.03 22.3-34.26 41.54-56.57 56.57l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M207.1 0C93.12 0-.0002 93.13-.0002 208S93.12 416 207.1 416s208-93.13 208-208S322.9 0 207.1 0zM207.1 336c-70.58 0-128-57.42-128-128c0-70.58 57.42-128 128-128s128 57.42 128 128C335.1 278.6 278.6 336 207.1 336z" })),
|
|
64
|
+
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M500.3 443.7l-119.7-119.7c-15.03 22.3-34.26 41.54-56.57 56.57l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M207.1 0C93.12 0-.0002 93.13-.0002 208S93.12 416 207.1 416s208-93.13 208-208S322.9 0 207.1 0zM207.1 336c-70.58 0-128-57.42-128-128c0-70.58 57.42-128 128-128s128 57.42 128 128C335.1 278.6 278.6 336 207.1 336z" })), y = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", "data-waves-icon": "fa/duotone/xmark", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
55
65
|
fill: "currentcolor",
|
|
56
66
|
color: "currentcolor",
|
|
57
67
|
width: "1em",
|
|
@@ -60,43 +70,47 @@ const C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.
|
|
|
60
70
|
.fa-secondary {
|
|
61
71
|
opacity: .4
|
|
62
72
|
}
|
|
63
|
-
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z" })),
|
|
73
|
+
`)), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z" })), p = (t) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 664 652", xmlns: "http://www.w3.org/2000/svg", "data-waves-icon": "pi/logo", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
64
74
|
fill: "currentcolor",
|
|
65
75
|
color: "currentcolor",
|
|
66
76
|
width: "1em",
|
|
67
77
|
height: "1em"
|
|
68
|
-
}, ...t }, /* @__PURE__ */ e.createElement("path", { d: "M391.42 125.965C448.039 184.645 504.938 243.615 565.81 185.331C583.085 168.806 588.671 138.702 583.932 117.95C552.33 -20.4551 366.687 -26.094 284.964 44.5249L285.069 45.0613C321.006 52.9875 356.159 89.4202 391.42 125.965Z" }), /* @__PURE__ */ e.createElement("path", { d: "M522.431 495.702C448.189 455.82 486.69 383.483 525.002 311.503C548.862 266.674 572.648 221.983 569.081 185.356L569.559 185.09C661.976 240.991 713.98 419.291 592.114 492.115C573.842 503.035 543.486 507.025 522.431 495.702V495.702Z" }), /* @__PURE__ */ e.createElement("path", { d: "M213.844 550.355C228.833 467.423 309.526 481.686 389.823 495.879C439.831 504.719 489.685 513.531 523.417 498.82L523.818 499.192C499.211 604.36 345.708 708.916 238.789 615.519C222.757 601.516 209.582 573.878 213.844 550.355Z" }), /* @__PURE__ */ e.createElement("path", { d: "M284.035 48.1638C320.656 124.068 246.989 159.959 173.686 195.673C128.033 217.916 82.5196 240.09 63.8762 271.819L63.3335 271.753C21.4251 172.207 84.1548 -2.6076 225.552 10.1071C246.753 12.0131 273.657 26.6279 284.035 48.1638Z" }), /* @__PURE__ */ e.createElement("path", { d: "M172.699 424.293C161.384 343.54 150.014 262.389 66.5079 273.761C42.819 276.977 20.6057 298.048 12.2415 317.622C-43.5448 448.169 103.33 561.849 210.954 552.754L211.185 552.258C186.77 524.722 179.745 474.585 172.699 424.293Z" })),
|
|
78
|
+
}, ...t }, /* @__PURE__ */ e.createElement("path", { d: "M391.42 125.965C448.039 184.645 504.938 243.615 565.81 185.331C583.085 168.806 588.671 138.702 583.932 117.95C552.33 -20.4551 366.687 -26.094 284.964 44.5249L285.069 45.0613C321.006 52.9875 356.159 89.4202 391.42 125.965Z" }), /* @__PURE__ */ e.createElement("path", { d: "M522.431 495.702C448.189 455.82 486.69 383.483 525.002 311.503C548.862 266.674 572.648 221.983 569.081 185.356L569.559 185.09C661.976 240.991 713.98 419.291 592.114 492.115C573.842 503.035 543.486 507.025 522.431 495.702V495.702Z" }), /* @__PURE__ */ e.createElement("path", { d: "M213.844 550.355C228.833 467.423 309.526 481.686 389.823 495.879C439.831 504.719 489.685 513.531 523.417 498.82L523.818 499.192C499.211 604.36 345.708 708.916 238.789 615.519C222.757 601.516 209.582 573.878 213.844 550.355Z" }), /* @__PURE__ */ e.createElement("path", { d: "M284.035 48.1638C320.656 124.068 246.989 159.959 173.686 195.673C128.033 217.916 82.5196 240.09 63.8762 271.819L63.3335 271.753C21.4251 172.207 84.1548 -2.6076 225.552 10.1071C246.753 12.0131 273.657 26.6279 284.035 48.1638Z" }), /* @__PURE__ */ e.createElement("path", { d: "M172.699 424.293C161.384 343.54 150.014 262.389 66.5079 273.761C42.819 276.977 20.6057 298.048 12.2415 317.622C-43.5448 448.169 103.33 561.849 210.954 552.754L211.185 552.258C186.77 524.722 179.745 474.585 172.699 424.293Z" })), v = {
|
|
69
79
|
// icon family / icon name
|
|
70
80
|
// fa/duotone / eye-slash
|
|
81
|
+
"fa/duotone/arrow-down-arrow-up": C,
|
|
82
|
+
"fa/duotone/calendar-days": m,
|
|
71
83
|
"fa/duotone/circle-arrow-right": i,
|
|
72
|
-
"fa/duotone/
|
|
84
|
+
"fa/duotone/circle-exclamation": d,
|
|
85
|
+
"fa/duotone/circle-xmark": h,
|
|
86
|
+
"fa/duotone/eye-slash": w,
|
|
73
87
|
"fa/duotone/folder-magnifying-glass": g,
|
|
74
|
-
"fa/duotone/
|
|
75
|
-
"fa/duotone/
|
|
76
|
-
"fa/duotone/
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
"pi/logo": u
|
|
80
|
-
}, E = {
|
|
88
|
+
"fa/duotone/lock-keyhole": f,
|
|
89
|
+
"fa/duotone/magnifying-glass": u,
|
|
90
|
+
"fa/duotone/xmark": y,
|
|
91
|
+
"pi/logo": p
|
|
92
|
+
}, L = {
|
|
81
93
|
"fa/duotone": [
|
|
94
|
+
"arrow-down-arrow-up",
|
|
82
95
|
"calendar-days",
|
|
83
96
|
"circle-arrow-right",
|
|
97
|
+
"circle-exclamation",
|
|
98
|
+
"circle-xmark",
|
|
84
99
|
"eye-slash",
|
|
85
100
|
"folder-magnifying-glass",
|
|
101
|
+
"lock-keyhole",
|
|
86
102
|
"magnifying-glass",
|
|
87
|
-
"circle-exclamation",
|
|
88
|
-
"circle-xmark",
|
|
89
103
|
"xmark"
|
|
90
104
|
],
|
|
91
105
|
pi: ["logo"]
|
|
92
|
-
},
|
|
93
|
-
const r = `${t ?? "fa/duotone"}/${
|
|
106
|
+
}, E = ({ iconFamily: t, icon: c, size: l, color: n }) => {
|
|
107
|
+
const r = `${t ?? "fa/duotone"}/${c}`, o = v[r] ?? /* @__PURE__ */ s("span", { title: r, children: [
|
|
94
108
|
"ERROR ICON ",
|
|
95
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ a(E, { icon: "circle-exclamation" })
|
|
96
110
|
] });
|
|
97
|
-
return
|
|
111
|
+
return o && /* @__PURE__ */ a(o, { style: { color: n, height: l, width: l } });
|
|
98
112
|
};
|
|
99
113
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
L as FamilyAndIcons,
|
|
115
|
+
E as Icon
|
|
102
116
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <T extends "fa/duotone" | "pi">({ iconFamily, icon, size, color }: import('./Icon').IconProps<T>) => 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 Simple: Story;
|
|
14
|
+
export declare const CustomFamily: Story;
|
|
15
|
+
export declare const CustomSize: Story;
|
|
16
|
+
export declare const CustomColor: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -3,20 +3,34 @@ import { ReactNode, SyntheticEvent } from 'react';
|
|
|
3
3
|
|
|
4
4
|
type variant = 'primary' | 'square';
|
|
5
5
|
type IconButtonCoreProps = {
|
|
6
|
+
/** The icon can be any ReactNode element, including the Icon component. */
|
|
6
7
|
icon: ReactNode;
|
|
8
|
+
/** Loading status */
|
|
7
9
|
loading?: boolean;
|
|
10
|
+
/** Disabled status */
|
|
8
11
|
disabled?: boolean;
|
|
12
|
+
/** ClassNames for MuiButton */
|
|
9
13
|
className?: string;
|
|
14
|
+
/** Children content */
|
|
10
15
|
children?: ReactNode;
|
|
16
|
+
/** Variant of component */
|
|
11
17
|
variant?: variant;
|
|
12
18
|
};
|
|
13
19
|
interface IconButtonPropsWithLink extends IconButtonCoreProps {
|
|
20
|
+
/** Link to access when Icon Button is clicked */
|
|
14
21
|
link: string;
|
|
15
22
|
}
|
|
16
23
|
interface IconButtonPropsWithOnClick extends IconButtonCoreProps {
|
|
24
|
+
/** Functionality executed when the Icon Button is clicked */
|
|
17
25
|
onClick: (e: SyntheticEvent<HTMLButtonElement>) => void;
|
|
26
|
+
/** Button type */
|
|
18
27
|
type?: HTMLButtonElement['type'];
|
|
19
28
|
}
|
|
20
29
|
export type IconButtonProps = Either<IconButtonPropsWithLink, IconButtonPropsWithOnClick>;
|
|
30
|
+
/**
|
|
31
|
+
* The icon button is used in some cases where you need the icon to be pressed, sometimes it can contain text.
|
|
32
|
+
* Icon buttons are commonly found in app bars and toolbars.
|
|
33
|
+
* Icons are also appropriate for toggle buttons that allow a single choice to be selected or deselected, such as adding or removing a star to an item.
|
|
34
|
+
*/
|
|
21
35
|
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
22
36
|
export default IconButton;
|
|
@@ -3,7 +3,7 @@ import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as c, useMemo as m } from "react";
|
|
4
4
|
import { c as y } from "../../clsx-DB4S2d7J.js";
|
|
5
5
|
import { LoadingSpinner as g } from "../LoadingSpinner/LoadingSpinner.js";
|
|
6
|
-
import { B as k } from "../../Button-
|
|
6
|
+
import { B as k } from "../../Button-2b1peDFT.js";
|
|
7
7
|
const p = "_h1_f1r29_1", q = "_h2_f1r29_11", M = "_h3_f1r29_21", S = "_h4_f1r29_31", w = "_body_f1r29_41", x = "_quote_f1r29_75", N = "_form__input_f1r29_98", v = "_form__hint_f1r29_103", B = "_form__label_f1r29_108", j = "_form__dropdown_f1r29_113", C = "_table__header_f1r29_131", I = "_table__body_f1r29_136", L = "_button_f1r29_159", R = "_SM_f1r29_178", o = {
|
|
8
8
|
h1: p,
|
|
9
9
|
"h1--bold": "_h1--bold_f1r29_7",
|
|
@@ -4,8 +4,7 @@ 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 me, a as _e, u as he, e as z, b as Q, i as be, P as e, c as ge, d as ye } from "../../index-CqjC7P5Y.js";
|
|
7
|
+
import { g as fe, a as me, u as _e, f as z, b as _, _ as he, c as Q, i as be, P as e, d as ge, e as we } from "../../index-CH45lKw7.js";
|
|
9
8
|
function Ce(s) {
|
|
10
9
|
let l = "https://mui.com/production-error/?code=" + s;
|
|
11
10
|
for (let a = 1; a < arguments.length; a += 1)
|
|
@@ -14,14 +13,14 @@ function Ce(s) {
|
|
|
14
13
|
}
|
|
15
14
|
const X = /* @__PURE__ */ m.createContext(void 0);
|
|
16
15
|
process.env.NODE_ENV !== "production" && (X.displayName = "FormControlContext");
|
|
17
|
-
function
|
|
16
|
+
function ye() {
|
|
18
17
|
return m.useContext(X);
|
|
19
18
|
}
|
|
20
19
|
const Z = "Input";
|
|
21
20
|
function ve(s) {
|
|
22
|
-
return
|
|
21
|
+
return fe(Z, s);
|
|
23
22
|
}
|
|
24
|
-
|
|
23
|
+
me(Z, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
25
24
|
function Ne(s = {}) {
|
|
26
25
|
const {
|
|
27
26
|
defaultValue: l,
|
|
@@ -31,25 +30,25 @@ function Ne(s = {}) {
|
|
|
31
30
|
onChange: b,
|
|
32
31
|
onFocus: P,
|
|
33
32
|
required: x = !1,
|
|
34
|
-
value:
|
|
33
|
+
value: w,
|
|
35
34
|
inputRef: U
|
|
36
|
-
} = s, n =
|
|
37
|
-
let E, f, C,
|
|
35
|
+
} = s, n = ye();
|
|
36
|
+
let E, f, C, y, g;
|
|
38
37
|
if (n) {
|
|
39
38
|
var I, d, O;
|
|
40
|
-
if (E = void 0, f = (I = n.disabled) != null ? I : !1, C = (d = n.error) != null ? d : !1,
|
|
39
|
+
if (E = void 0, f = (I = n.disabled) != null ? I : !1, C = (d = n.error) != null ? d : !1, y = (O = n.required) != null ? O : !1, g = n.value, process.env.NODE_ENV !== "production") {
|
|
41
40
|
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => s[r] !== void 0);
|
|
42
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(`
|
|
43
42
|
`));
|
|
44
43
|
}
|
|
45
44
|
} else
|
|
46
|
-
E = l, f = a, C = h,
|
|
45
|
+
E = l, f = a, C = h, y = x, g = w;
|
|
47
46
|
const {
|
|
48
47
|
current: M
|
|
49
48
|
} = m.useRef(g != null), k = m.useCallback((t) => {
|
|
50
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(`
|
|
51
50
|
`));
|
|
52
|
-
}, []), v = m.useRef(null), T =
|
|
51
|
+
}, []), v = m.useRef(null), T = _e(v, U, k), [N, R] = m.useState(!1);
|
|
53
52
|
m.useEffect(() => {
|
|
54
53
|
!n && f && N && (R(!1), u == null || u());
|
|
55
54
|
}, [n, f, N, u]);
|
|
@@ -95,7 +94,7 @@ function Ne(s = {}) {
|
|
|
95
94
|
"aria-invalid": C || void 0,
|
|
96
95
|
defaultValue: E,
|
|
97
96
|
value: g,
|
|
98
|
-
required:
|
|
97
|
+
required: y,
|
|
99
98
|
disabled: f
|
|
100
99
|
}, t, {
|
|
101
100
|
ref: T
|
|
@@ -108,7 +107,7 @@ function Ne(s = {}) {
|
|
|
108
107
|
});
|
|
109
108
|
},
|
|
110
109
|
inputRef: T,
|
|
111
|
-
required:
|
|
110
|
+
required: y,
|
|
112
111
|
value: g
|
|
113
112
|
};
|
|
114
113
|
}
|
|
@@ -125,19 +124,19 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
125
124
|
return ge({
|
|
126
125
|
root: ["root", l && "disabled", a && "error", h && "focused", !!u && "formControl", b && "multiline", !!P && "adornedStart", !!x && "adornedEnd"],
|
|
127
126
|
input: ["input", l && "disabled", b && "multiline"]
|
|
128
|
-
},
|
|
127
|
+
}, we(ve));
|
|
129
128
|
}, ee = /* @__PURE__ */ m.forwardRef(function(l, a) {
|
|
130
129
|
var h, u, b;
|
|
131
130
|
const {
|
|
132
131
|
"aria-describedby": P,
|
|
133
132
|
"aria-label": x,
|
|
134
|
-
"aria-labelledby":
|
|
133
|
+
"aria-labelledby": w,
|
|
135
134
|
autoComplete: U,
|
|
136
135
|
autoFocus: n,
|
|
137
136
|
className: E,
|
|
138
137
|
defaultValue: f,
|
|
139
138
|
disabled: C,
|
|
140
|
-
endAdornment:
|
|
139
|
+
endAdornment: y,
|
|
141
140
|
error: g,
|
|
142
141
|
id: I,
|
|
143
142
|
multiline: d = !1,
|
|
@@ -159,7 +158,7 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
159
158
|
slots: o = {},
|
|
160
159
|
minRows: c,
|
|
161
160
|
maxRows: H
|
|
162
|
-
} = l, Y =
|
|
161
|
+
} = l, Y = he(l, Pe), {
|
|
163
162
|
getRootProps: te,
|
|
164
163
|
getInputProps: ne,
|
|
165
164
|
focused: oe,
|
|
@@ -186,7 +185,7 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
186
185
|
}), G = xe($), le = {
|
|
187
186
|
"aria-describedby": P,
|
|
188
187
|
"aria-label": x,
|
|
189
|
-
"aria-labelledby":
|
|
188
|
+
"aria-labelledby": w,
|
|
190
189
|
autoComplete: U,
|
|
191
190
|
autoFocus: n,
|
|
192
191
|
id: I,
|
|
@@ -220,7 +219,7 @@ const Pe = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
220
219
|
className: G.input
|
|
221
220
|
});
|
|
222
221
|
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)),
|
|
222
|
+
children: [j, /* @__PURE__ */ V(K, _({}, ue)), y]
|
|
224
223
|
}));
|
|
225
224
|
});
|
|
226
225
|
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
@@ -378,21 +377,21 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
378
377
|
color: "currentcolor",
|
|
379
378
|
width: "1em",
|
|
380
379
|
height: "1em"
|
|
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 = "
|
|
380
|
+
}, ...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_29e4w_1", Fe = "_input_29e4w_1", i = {
|
|
382
381
|
input__label: Re,
|
|
383
|
-
"input__input-el-wrapper": "_input__input-el-
|
|
384
|
-
"input__input-el": "_input__input-
|
|
385
|
-
"input__left-icon": "_input__left-
|
|
386
|
-
"input__right-icon": "_input__right-
|
|
387
|
-
"input__messages-wrapper": "_input__messages-
|
|
388
|
-
"input__info-message": "_input__info-
|
|
389
|
-
"input__error-message": "_input__error-
|
|
390
|
-
"input__chars-counter": "_input__chars-
|
|
391
|
-
"input--disabled": "_input--
|
|
382
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_29e4w_6",
|
|
383
|
+
"input__input-el": "_input__input-el_29e4w_6",
|
|
384
|
+
"input__left-icon": "_input__left-icon_29e4w_27",
|
|
385
|
+
"input__right-icon": "_input__right-icon_29e4w_27",
|
|
386
|
+
"input__messages-wrapper": "_input__messages-wrapper_29e4w_39",
|
|
387
|
+
"input__info-message": "_input__info-message_29e4w_47",
|
|
388
|
+
"input__error-message": "_input__error-message_29e4w_47",
|
|
389
|
+
"input__chars-counter": "_input__chars-counter_29e4w_58",
|
|
390
|
+
"input--disabled": "_input--disabled_29e4w_62",
|
|
392
391
|
input: Fe,
|
|
393
|
-
"input--focused": "_input--
|
|
394
|
-
"input--error": "_input--
|
|
395
|
-
},
|
|
392
|
+
"input--focused": "_input--focused_29e4w_68",
|
|
393
|
+
"input--error": "_input--error_29e4w_71"
|
|
394
|
+
}, Ve = ({
|
|
396
395
|
label: s,
|
|
397
396
|
infoMessage: l,
|
|
398
397
|
errorMessage: a,
|
|
@@ -401,13 +400,13 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
401
400
|
id: b,
|
|
402
401
|
disabled: P,
|
|
403
402
|
type: x = "text",
|
|
404
|
-
maxLength:
|
|
403
|
+
maxLength: w,
|
|
405
404
|
hideCharsCounter: U = !1,
|
|
406
405
|
onChange: n,
|
|
407
406
|
classNameWrapper: E,
|
|
408
407
|
classNameLabel: f,
|
|
409
408
|
classNameInput: C,
|
|
410
|
-
classNameInfoMessage:
|
|
409
|
+
classNameInfoMessage: y,
|
|
411
410
|
classNameErrorMessage: g,
|
|
412
411
|
classNameCharsCounter: I,
|
|
413
412
|
"data-testid-wrapper": d,
|
|
@@ -454,7 +453,7 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
454
453
|
}),
|
|
455
454
|
input: {
|
|
456
455
|
className: F(i["input__input-el"], C),
|
|
457
|
-
maxLength:
|
|
456
|
+
maxLength: w,
|
|
458
457
|
onChange: j,
|
|
459
458
|
...N
|
|
460
459
|
}
|
|
@@ -468,7 +467,7 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
468
467
|
L,
|
|
469
468
|
{
|
|
470
469
|
variant: "form-hint",
|
|
471
|
-
className: a ? F(i["input__error-message"], g) : F(i["input__info-message"],
|
|
470
|
+
className: a ? F(i["input__error-message"], g) : F(i["input__info-message"], y),
|
|
472
471
|
"data-testid": a ? v : k,
|
|
473
472
|
children: [
|
|
474
473
|
/* @__PURE__ */ V(Ee, {}),
|
|
@@ -476,7 +475,7 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
476
475
|
]
|
|
477
476
|
}
|
|
478
477
|
),
|
|
479
|
-
|
|
478
|
+
w && !U && /* @__PURE__ */ q(
|
|
480
479
|
L,
|
|
481
480
|
{
|
|
482
481
|
variant: "form-hint",
|
|
@@ -485,7 +484,7 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
485
484
|
children: [
|
|
486
485
|
R,
|
|
487
486
|
" / ",
|
|
488
|
-
|
|
487
|
+
w
|
|
489
488
|
]
|
|
490
489
|
}
|
|
491
490
|
)
|
|
@@ -493,5 +492,5 @@ const Ee = (s) => /* @__PURE__ */ m.createElement("svg", { xmlns: "http://www.w3
|
|
|
493
492
|
] });
|
|
494
493
|
};
|
|
495
494
|
export {
|
|
496
|
-
|
|
495
|
+
Ve as Input
|
|
497
496
|
};
|