@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
package/dist/main.d.ts
CHANGED
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is automatically generated. Any changes will be lost.
|
|
3
|
-
* run "yarn export-files" or "yarn build" to regenerate it.
|
|
4
|
-
*/
|
|
5
|
-
export * from './components/Advice/Advice';
|
|
6
|
-
export * from './components/Button/Button';
|
|
7
|
-
export * from './components/Checkbox/Checkbox';
|
|
8
|
-
export * from './components/Chip/Chip';
|
|
1
|
+
|
|
9
2
|
export * from './components/Dialog/Dialog';
|
|
10
|
-
export * from './components/
|
|
11
|
-
export * from './components/Icon/Icon';
|
|
12
|
-
export * from './components/IconButton/IconButton';
|
|
13
|
-
export * from './components/Input/Input';
|
|
14
|
-
export * from './components/InputSearch/InputSearch';
|
|
3
|
+
export * from './components/Typography/Typography';
|
|
15
4
|
export * from './components/LoadingSpinner/LoadingSpinner';
|
|
16
|
-
export * from './components/PageHeader/PageHeader';
|
|
17
|
-
export * from './components/Pagination/Pagination';
|
|
18
|
-
export * from './components/Select/Select';
|
|
19
|
-
export * from './components/Skeleton/Skeleton';
|
|
20
|
-
export * from './components/Snackbar/Snackbar';
|
|
21
|
-
export * from './components/SortTooltip/SortTooltip';
|
|
22
|
-
export * from './components/Stepper/Stepper';
|
|
23
|
-
export * from './components/Table/Table';
|
|
24
5
|
export * from './components/Tabs/Tabs';
|
|
25
|
-
export * from './components/
|
|
26
|
-
export * from './components/
|
|
27
|
-
export * from './components/
|
|
28
|
-
export * from './components/
|
|
29
|
-
export * from './components/
|
|
30
|
-
export * from './
|
|
6
|
+
export * from './components/Tabs/Tab';
|
|
7
|
+
export * from './components/Tabs/TabPanel';
|
|
8
|
+
export * from './components/Pagination/Pagination';
|
|
9
|
+
export * from './components/PageHeader/PageHeader';
|
|
10
|
+
export * from './components/Button/Button';
|
|
11
|
+
export * from './components/IconButton/IconButton';
|
package/dist/main.js
CHANGED
|
@@ -1,77 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { Skeleton as L, SkeletonCircle as O, SkeletonTable as j } from "./components/Skeleton/Skeleton.js";
|
|
16
|
-
import { Snackbar as w } from "./components/Snackbar/Snackbar.js";
|
|
17
|
-
import { SortTooltip as F, sortTooltipDefaultTranslations as J } from "./components/SortTooltip/SortTooltip.js";
|
|
18
|
-
import { Stepper as M } from "./components/Stepper/Stepper.js";
|
|
19
|
-
import { TBody as Q, THead as R, Table as U, Td as V, Th as W, Tr as X } from "./components/Table/Table.js";
|
|
20
|
-
import { Tabs as Z } from "./components/Tabs/Tabs.js";
|
|
21
|
-
import { TextDisplay as $ } from "./components/TextDisplay/TextDisplay.js";
|
|
22
|
-
import { Toggle as ro } from "./components/Toggle/Toggle.js";
|
|
23
|
-
import { G as to } from "./Group-B3p31ftp.js";
|
|
24
|
-
import { Tooltip as ao } from "./components/Tooltip/Tooltip.js";
|
|
25
|
-
import { Typography as xo } from "./components/Typography/Typography.js";
|
|
26
|
-
import { SnackbarContext as no, SnackbarProvider as lo, useSnackbar as io } from "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
27
|
-
import { default as so } from "./components/Dialog/DialogTitle.js";
|
|
28
|
-
import { default as go } from "./components/Dialog/Content.js";
|
|
29
|
-
import { default as uo } from "./components/Dialog/Actions.js";
|
|
30
|
-
import { Tab as ko } from "./components/Tabs/Tab.js";
|
|
31
|
-
import { TabPanel as ho } from "./components/Tabs/TabPanel.js";
|
|
1
|
+
import './assets/main.css';
|
|
2
|
+
import { Dialog as t } from "./components/Dialog/Dialog.js";
|
|
3
|
+
import { Typography as a } from "./components/Typography/Typography.js";
|
|
4
|
+
import { LoadingSpinner as p } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
5
|
+
import { Tabs as m } from "./components/Tabs/Tabs.js";
|
|
6
|
+
import { Tab as i } from "./components/Tabs/Tab.js";
|
|
7
|
+
import { TabPanel as s } from "./components/Tabs/TabPanel.js";
|
|
8
|
+
import { Pagination as g, defaultTranslations as u } from "./components/Pagination/Pagination.js";
|
|
9
|
+
import { PageHeader as b } from "./components/PageHeader/PageHeader.js";
|
|
10
|
+
import { Button as c } from "./components/Button/Button.js";
|
|
11
|
+
import { IconButton as B } from "./components/IconButton/IconButton.js";
|
|
12
|
+
import { default as h } from "./components/Dialog/Title.js";
|
|
13
|
+
import { default as C } from "./components/Dialog/Content.js";
|
|
14
|
+
import { default as I } from "./components/Dialog/Actions.js";
|
|
32
15
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
y as PageHeader,
|
|
48
|
-
B as Pagination,
|
|
49
|
-
A as Select,
|
|
50
|
-
H as SelectOption,
|
|
51
|
-
L as Skeleton,
|
|
52
|
-
O as SkeletonCircle,
|
|
53
|
-
j as SkeletonTable,
|
|
54
|
-
w as Snackbar,
|
|
55
|
-
no as SnackbarContext,
|
|
56
|
-
lo as SnackbarProvider,
|
|
57
|
-
F as SortTooltip,
|
|
58
|
-
M as Stepper,
|
|
59
|
-
Q as TBody,
|
|
60
|
-
R as THead,
|
|
61
|
-
ko as Tab,
|
|
62
|
-
ho as TabPanel,
|
|
63
|
-
U as Table,
|
|
64
|
-
Z as Tabs,
|
|
65
|
-
V as Td,
|
|
66
|
-
$ as TextDisplay,
|
|
67
|
-
W as Th,
|
|
68
|
-
ro as Toggle,
|
|
69
|
-
to as ToggleGroup,
|
|
70
|
-
n as ToggleGroupItem,
|
|
71
|
-
ao as Tooltip,
|
|
72
|
-
X as Tr,
|
|
73
|
-
xo as Typography,
|
|
74
|
-
G as paginationDefaultTranslations,
|
|
75
|
-
J as sortTooltipDefaultTranslations,
|
|
76
|
-
io as useSnackbar
|
|
16
|
+
I as Actions,
|
|
17
|
+
c as Button,
|
|
18
|
+
C as Content,
|
|
19
|
+
t as Dialog,
|
|
20
|
+
h as DialogTitle,
|
|
21
|
+
B as IconButton,
|
|
22
|
+
p as LoadingSpinner,
|
|
23
|
+
b as PageHeader,
|
|
24
|
+
g as Pagination,
|
|
25
|
+
i as Tab,
|
|
26
|
+
s as TabPanel,
|
|
27
|
+
m as Tabs,
|
|
28
|
+
a as Typography,
|
|
29
|
+
u as defaultTranslations
|
|
77
30
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function o() {
|
|
2
|
+
return o = Object.assign ? Object.assign.bind() : function(t) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var n = arguments[e];
|
|
5
|
+
for (var r in n)
|
|
6
|
+
Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
}, o.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
function s(t, e) {
|
|
12
|
+
if (t == null)
|
|
13
|
+
return {};
|
|
14
|
+
var n = {}, r = Object.keys(t), a, i;
|
|
15
|
+
for (i = 0; i < r.length; i++)
|
|
16
|
+
a = r[i], !(e.indexOf(a) >= 0) && (n[a] = t[a]);
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
s as _,
|
|
21
|
+
o as a
|
|
22
|
+
};
|
package/dist/types/helpers.d.ts
CHANGED
|
@@ -17,11 +17,3 @@ type RequireAllOrNone<T, U extends keyof T = never> = (
|
|
|
17
17
|
| Partial<Record<U, never>> // Require none
|
|
18
18
|
) &
|
|
19
19
|
Omit<T, U>; // remaining keys not listed in U
|
|
20
|
-
|
|
21
|
-
// S = string, D = delimiter to split by. Then split S by D and return array of strings. "foo-bar-baz" = ["foo","bar","baz"]
|
|
22
|
-
// Fallback if no '-' return [s] which is an array of the input string e.g. foo = [foo]
|
|
23
|
-
type Split<S extends string, D extends string> = string extends S
|
|
24
|
-
? string[]
|
|
25
|
-
: S extends `${infer T}${D}${infer Rest}`
|
|
26
|
-
? [T, ...Split<Rest, D>]
|
|
27
|
-
: [S];
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { a as k } from "./objectWithoutPropertiesLoose-ClNcje2_.js";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { f as A, h as I } from "./index-BvA1HyDs.js";
|
|
4
|
+
function _(r) {
|
|
5
|
+
const {
|
|
6
|
+
rootElementName: n = "",
|
|
7
|
+
componentName: o
|
|
8
|
+
} = r, [s, i] = l.useState(n.toUpperCase());
|
|
9
|
+
process.env.NODE_ENV !== "production" && l.useEffect(() => {
|
|
10
|
+
n && s !== n.toUpperCase() && console.error(`useRootElementName: the \`rootElementName\` prop of ${o ? `the ${o} component` : "a component"} expected the '${n}' element, but a '${s.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
|
|
11
|
+
}, [n, s, o]);
|
|
12
|
+
const c = l.useCallback((b) => {
|
|
13
|
+
var f;
|
|
14
|
+
i((f = b == null ? void 0 : b.tagName) != null ? f : "");
|
|
15
|
+
}, []);
|
|
16
|
+
return [s, c];
|
|
17
|
+
}
|
|
18
|
+
class F {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.currentId = null, this.clear = () => {
|
|
21
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
22
|
+
}, this.disposeEffect = () => this.clear;
|
|
23
|
+
}
|
|
24
|
+
static create() {
|
|
25
|
+
return new F();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
29
|
+
*/
|
|
30
|
+
start(n, o) {
|
|
31
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
32
|
+
this.currentId = null, o();
|
|
33
|
+
}, n);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
let R = !0, w = !1;
|
|
37
|
+
const W = new F(), j = {
|
|
38
|
+
text: !0,
|
|
39
|
+
search: !0,
|
|
40
|
+
url: !0,
|
|
41
|
+
tel: !0,
|
|
42
|
+
email: !0,
|
|
43
|
+
password: !0,
|
|
44
|
+
number: !0,
|
|
45
|
+
date: !0,
|
|
46
|
+
month: !0,
|
|
47
|
+
week: !0,
|
|
48
|
+
time: !0,
|
|
49
|
+
datetime: !0,
|
|
50
|
+
"datetime-local": !0
|
|
51
|
+
};
|
|
52
|
+
function X(r) {
|
|
53
|
+
const {
|
|
54
|
+
type: n,
|
|
55
|
+
tagName: o
|
|
56
|
+
} = r;
|
|
57
|
+
return !!(o === "INPUT" && j[n] && !r.readOnly || o === "TEXTAREA" && !r.readOnly || r.isContentEditable);
|
|
58
|
+
}
|
|
59
|
+
function q(r) {
|
|
60
|
+
r.metaKey || r.altKey || r.ctrlKey || (R = !0);
|
|
61
|
+
}
|
|
62
|
+
function T() {
|
|
63
|
+
R = !1;
|
|
64
|
+
}
|
|
65
|
+
function z() {
|
|
66
|
+
this.visibilityState === "hidden" && w && (R = !0);
|
|
67
|
+
}
|
|
68
|
+
function G(r) {
|
|
69
|
+
r.addEventListener("keydown", q, !0), r.addEventListener("mousedown", T, !0), r.addEventListener("pointerdown", T, !0), r.addEventListener("touchstart", T, !0), r.addEventListener("visibilitychange", z, !0);
|
|
70
|
+
}
|
|
71
|
+
function J(r) {
|
|
72
|
+
const {
|
|
73
|
+
target: n
|
|
74
|
+
} = r;
|
|
75
|
+
try {
|
|
76
|
+
return n.matches(":focus-visible");
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
return R || X(n);
|
|
80
|
+
}
|
|
81
|
+
function Q() {
|
|
82
|
+
const r = l.useCallback((i) => {
|
|
83
|
+
i != null && G(i.ownerDocument);
|
|
84
|
+
}, []), n = l.useRef(!1);
|
|
85
|
+
function o() {
|
|
86
|
+
return n.current ? (w = !0, W.start(100, () => {
|
|
87
|
+
w = !1;
|
|
88
|
+
}), n.current = !1, !0) : !1;
|
|
89
|
+
}
|
|
90
|
+
function s(i) {
|
|
91
|
+
return J(i) ? (n.current = !0, !0) : !1;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
isFocusVisibleRef: n,
|
|
95
|
+
onFocus: s,
|
|
96
|
+
onBlur: o,
|
|
97
|
+
ref: r
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function ee(r = {}) {
|
|
101
|
+
const {
|
|
102
|
+
disabled: n = !1,
|
|
103
|
+
focusableWhenDisabled: o,
|
|
104
|
+
href: s,
|
|
105
|
+
rootRef: i,
|
|
106
|
+
tabIndex: c,
|
|
107
|
+
to: b,
|
|
108
|
+
type: f,
|
|
109
|
+
rootElementName: V
|
|
110
|
+
} = r, y = l.useRef(), [K, E] = l.useState(!1), {
|
|
111
|
+
isFocusVisibleRef: h,
|
|
112
|
+
onFocus: x,
|
|
113
|
+
onBlur: B,
|
|
114
|
+
ref: v
|
|
115
|
+
} = Q(), [p, N] = l.useState(!1);
|
|
116
|
+
n && !o && p && N(!1), l.useEffect(() => {
|
|
117
|
+
h.current = p;
|
|
118
|
+
}, [p, h]);
|
|
119
|
+
const [m, M] = _({
|
|
120
|
+
rootElementName: V ?? (s || b ? "a" : void 0),
|
|
121
|
+
componentName: "Button"
|
|
122
|
+
}), U = (t) => (e) => {
|
|
123
|
+
var u;
|
|
124
|
+
p && e.preventDefault(), (u = t.onMouseLeave) == null || u.call(t, e);
|
|
125
|
+
}, L = (t) => (e) => {
|
|
126
|
+
var u;
|
|
127
|
+
B(e), h.current === !1 && N(!1), (u = t.onBlur) == null || u.call(t, e);
|
|
128
|
+
}, P = (t) => (e) => {
|
|
129
|
+
var u;
|
|
130
|
+
if (y.current || (y.current = e.currentTarget), x(e), h.current === !0) {
|
|
131
|
+
var d;
|
|
132
|
+
N(!0), (d = t.onFocusVisible) == null || d.call(t, e);
|
|
133
|
+
}
|
|
134
|
+
(u = t.onFocus) == null || u.call(t, e);
|
|
135
|
+
}, g = () => {
|
|
136
|
+
const t = y.current;
|
|
137
|
+
return m === "BUTTON" || m === "INPUT" && ["button", "submit", "reset"].includes(t == null ? void 0 : t.type) || m === "A" && (t == null ? void 0 : t.href);
|
|
138
|
+
}, C = (t) => (e) => {
|
|
139
|
+
if (!n) {
|
|
140
|
+
var u;
|
|
141
|
+
(u = t.onClick) == null || u.call(t, e);
|
|
142
|
+
}
|
|
143
|
+
}, $ = (t) => (e) => {
|
|
144
|
+
var u;
|
|
145
|
+
n || (E(!0), document.addEventListener("mouseup", () => {
|
|
146
|
+
E(!1);
|
|
147
|
+
}, {
|
|
148
|
+
once: !0
|
|
149
|
+
})), (u = t.onMouseDown) == null || u.call(t, e);
|
|
150
|
+
}, S = (t) => (e) => {
|
|
151
|
+
var u;
|
|
152
|
+
if ((u = t.onKeyDown) == null || u.call(t, e), !e.defaultMuiPrevented && (e.target === e.currentTarget && !g() && e.key === " " && e.preventDefault(), e.target === e.currentTarget && e.key === " " && !n && E(!0), e.target === e.currentTarget && !g() && e.key === "Enter" && !n)) {
|
|
153
|
+
var d;
|
|
154
|
+
(d = t.onClick) == null || d.call(t, e), e.preventDefault();
|
|
155
|
+
}
|
|
156
|
+
}, O = (t) => (e) => {
|
|
157
|
+
var u;
|
|
158
|
+
if (e.target === e.currentTarget && E(!1), (u = t.onKeyUp) == null || u.call(t, e), e.target === e.currentTarget && !g() && !n && e.key === " " && !e.defaultMuiPrevented) {
|
|
159
|
+
var d;
|
|
160
|
+
(d = t.onClick) == null || d.call(t, e);
|
|
161
|
+
}
|
|
162
|
+
}, D = A(M, i, v, y), a = {};
|
|
163
|
+
return c !== void 0 && (a.tabIndex = c), m === "BUTTON" ? (a.type = f ?? "button", o ? a["aria-disabled"] = n : a.disabled = n) : m === "INPUT" ? f && ["button", "submit", "reset"].includes(f) && (o ? a["aria-disabled"] = n : a.disabled = n) : m !== "" && (!s && !b && (a.role = "button", a.tabIndex = c ?? 0), n && (a["aria-disabled"] = n, a.tabIndex = o ? c ?? 0 : -1)), {
|
|
164
|
+
getRootProps: (t = {}) => {
|
|
165
|
+
const e = k({}, I(r), I(t)), u = k({
|
|
166
|
+
type: f
|
|
167
|
+
}, e, a, t, {
|
|
168
|
+
onBlur: L(e),
|
|
169
|
+
onClick: C(e),
|
|
170
|
+
onFocus: P(e),
|
|
171
|
+
onKeyDown: S(e),
|
|
172
|
+
onKeyUp: O(e),
|
|
173
|
+
onMouseDown: $(e),
|
|
174
|
+
onMouseLeave: U(e),
|
|
175
|
+
ref: D
|
|
176
|
+
});
|
|
177
|
+
return delete u.onFocusVisible, u;
|
|
178
|
+
},
|
|
179
|
+
focusVisible: p,
|
|
180
|
+
setFocusVisible: N,
|
|
181
|
+
active: K,
|
|
182
|
+
rootRef: D
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
export {
|
|
186
|
+
ee as u
|
|
187
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { C as a } from "./Tabs.module-BKlNuSPH.js";
|
|
3
|
+
import { u as I } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
4
|
+
let r = 0;
|
|
5
|
+
function i(t) {
|
|
6
|
+
const [e, n] = o.useState(t), u = t || e;
|
|
7
|
+
return o.useEffect(() => {
|
|
8
|
+
e == null && (r += 1, n(`mui-${r}`));
|
|
9
|
+
}, [e]), u;
|
|
10
|
+
}
|
|
11
|
+
const d = o.useId;
|
|
12
|
+
function C(t) {
|
|
13
|
+
if (d !== void 0) {
|
|
14
|
+
const e = d();
|
|
15
|
+
return t ?? e;
|
|
16
|
+
}
|
|
17
|
+
return i(t);
|
|
18
|
+
}
|
|
19
|
+
function g(t, e) {
|
|
20
|
+
const n = o.useContext(a);
|
|
21
|
+
if (n === null)
|
|
22
|
+
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
23
|
+
const {
|
|
24
|
+
registerItem: u
|
|
25
|
+
} = n, [s, f] = o.useState(typeof t == "function" ? void 0 : t);
|
|
26
|
+
return I(() => {
|
|
27
|
+
const {
|
|
28
|
+
id: c,
|
|
29
|
+
deregister: m
|
|
30
|
+
} = u(t, e);
|
|
31
|
+
return f(c), m;
|
|
32
|
+
}, [u, e, t]), {
|
|
33
|
+
id: s,
|
|
34
|
+
index: s !== void 0 ? n.getItemIndex(s) : -1,
|
|
35
|
+
totalItemCount: n.totalSubitemCount
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
g as a,
|
|
40
|
+
C as u
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pismo/marola",
|
|
3
3
|
"description": "CDX tribe component library",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.5",
|
|
5
|
+
"private": false,
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/main.js",
|
|
7
8
|
"types": "dist/main.d.ts",
|
|
@@ -17,24 +18,15 @@
|
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"dev": "vite",
|
|
21
|
+
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
20
22
|
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
|
21
23
|
"lint:fix": "yarn lint --fix",
|
|
22
24
|
"lint:scss": "stylelint \"**/*.scss\" --fix",
|
|
23
25
|
"prettier": "prettier . --write",
|
|
24
26
|
"preview": "vite preview",
|
|
25
27
|
"prepublishOnly": "npm run build",
|
|
26
|
-
"test": "
|
|
27
|
-
"
|
|
28
|
-
"test:unit:visual": "vitest-preview",
|
|
29
|
-
"test:unit:watch": "vitest",
|
|
30
|
-
"test:e2e": "echo \"no test implemented\"",
|
|
31
|
-
"coverage": "vitest run --coverage",
|
|
32
|
-
"export-files": "node scripts/export-files.cjs",
|
|
33
|
-
"generate-icon-types": "node scripts/generate-icon-types.cjs",
|
|
34
|
-
"prebuild": "yarn export-files & yarn generate-icon-types",
|
|
35
|
-
"build": "tsc --p ./tsconfig-build.json && vite build && mv ./dist/assets/marola.css ./dist",
|
|
36
|
-
"postbuild": "storybook build --disable-telemetry --output-dir build",
|
|
37
|
-
"storybook": "storybook dev -p 6006"
|
|
28
|
+
"test": "vitest",
|
|
29
|
+
"coverage": "vitest run --coverage"
|
|
38
30
|
},
|
|
39
31
|
"peerDependencies": {
|
|
40
32
|
"react": "^18.2.0",
|
|
@@ -42,15 +34,6 @@
|
|
|
42
34
|
},
|
|
43
35
|
"devDependencies": {
|
|
44
36
|
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
|
45
|
-
"@storybook/addon-a11y": "^8.0.8",
|
|
46
|
-
"@storybook/addon-essentials": "^8.0.8",
|
|
47
|
-
"@storybook/addon-interactions": "^8.0.8",
|
|
48
|
-
"@storybook/addon-links": "^8.0.8",
|
|
49
|
-
"@storybook/blocks": "^8.0.8",
|
|
50
|
-
"@storybook/react": "^8.0.8",
|
|
51
|
-
"@storybook/react-vite": "^8.0.8",
|
|
52
|
-
"@storybook/test": "^8.0.8",
|
|
53
|
-
"@testing-library/react": "^15.0.5",
|
|
54
37
|
"@types/node": "^20.12.2",
|
|
55
38
|
"@types/react": "^18.2.66",
|
|
56
39
|
"@types/react-dom": "^18.2.22",
|
|
@@ -59,22 +42,18 @@
|
|
|
59
42
|
"@vitejs/plugin-react": "^4.2.1",
|
|
60
43
|
"clsx": "^2.1.0",
|
|
61
44
|
"commitlint": "^19.2.1",
|
|
62
|
-
"cypress": "^13.8.1",
|
|
63
45
|
"eslint": "^8.57.0",
|
|
64
46
|
"eslint-config-prettier": "^9.1.0",
|
|
65
47
|
"eslint-plugin-prettier": "^5.1.3",
|
|
66
48
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
67
49
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
68
50
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
69
|
-
"
|
|
70
|
-
"glob": "^10.3.14",
|
|
51
|
+
"glob": "^10.3.12",
|
|
71
52
|
"husky": "^9.0.11",
|
|
72
|
-
"jsdom": "^24.0.0",
|
|
73
53
|
"prettier": "^3.2.5",
|
|
74
54
|
"react": "^18.2.0",
|
|
75
55
|
"react-dom": "^18.2.0",
|
|
76
56
|
"sass": "^1.72.0",
|
|
77
|
-
"storybook": "^8.0.8",
|
|
78
57
|
"stylelint": "^16.3.1",
|
|
79
58
|
"stylelint-config-recess-order": "^5.0.0",
|
|
80
59
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
@@ -84,11 +63,11 @@
|
|
|
84
63
|
"vite-plugin-dts": "^3.8.1",
|
|
85
64
|
"vite-plugin-lib-inject-css": "^2.0.1",
|
|
86
65
|
"vite-plugin-svgr": "^4.2.0",
|
|
87
|
-
"vitest": "^1.4.0"
|
|
88
|
-
"vitest-preview": "^0.0.1"
|
|
66
|
+
"vitest": "^1.4.0"
|
|
89
67
|
},
|
|
90
68
|
"dependencies": {
|
|
91
69
|
"@mui/base": "^5.0.0-beta.40",
|
|
92
|
-
"@mui/material": "^5.15.15"
|
|
70
|
+
"@mui/material": "^5.15.15",
|
|
71
|
+
"@pismo/waves-icons": "^1.3.3"
|
|
93
72
|
}
|
|
94
73
|
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
import { u as C, P as f } from "./index-CH45lKw7.js";
|
|
3
|
-
import { jsx as w } from "react/jsx-runtime";
|
|
4
|
-
import { u as L, o as h, e as b } from "./useEventCallback-xTG9piMa.js";
|
|
5
|
-
import { e as g } from "./index-CjW42-M-.js";
|
|
6
|
-
function T(c) {
|
|
7
|
-
return c.substring(2).toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
function D(c, s) {
|
|
10
|
-
return s.documentElement.clientWidth < c.clientX || s.documentElement.clientHeight < c.clientY;
|
|
11
|
-
}
|
|
12
|
-
function v(c) {
|
|
13
|
-
const {
|
|
14
|
-
children: s,
|
|
15
|
-
disableReactTree: y = !1,
|
|
16
|
-
mouseEvent: i = "onClick",
|
|
17
|
-
onClickAway: P,
|
|
18
|
-
touchEvent: u = "onTouchEnd"
|
|
19
|
-
} = c, l = t.useRef(!1), o = t.useRef(null), d = t.useRef(!1), p = t.useRef(!1);
|
|
20
|
-
t.useEffect(() => (setTimeout(() => {
|
|
21
|
-
d.current = !0;
|
|
22
|
-
}, 0), () => {
|
|
23
|
-
d.current = !1;
|
|
24
|
-
}), []);
|
|
25
|
-
const k = C(
|
|
26
|
-
// @ts-expect-error TODO upstream fix
|
|
27
|
-
s.ref,
|
|
28
|
-
o
|
|
29
|
-
), a = L((e) => {
|
|
30
|
-
const n = p.current;
|
|
31
|
-
p.current = !1;
|
|
32
|
-
const r = h(o.current);
|
|
33
|
-
if (!d.current || !o.current || "clientX" in e && D(e, r))
|
|
34
|
-
return;
|
|
35
|
-
if (l.current) {
|
|
36
|
-
l.current = !1;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
let E;
|
|
40
|
-
e.composedPath ? E = e.composedPath().indexOf(o.current) > -1 : E = !r.documentElement.contains(
|
|
41
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
42
|
-
e.target
|
|
43
|
-
) || o.current.contains(
|
|
44
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
45
|
-
e.target
|
|
46
|
-
), !E && (y || !n) && P(e);
|
|
47
|
-
}), R = (e) => (n) => {
|
|
48
|
-
p.current = !0;
|
|
49
|
-
const r = s.props[e];
|
|
50
|
-
r && r(n);
|
|
51
|
-
}, m = {
|
|
52
|
-
ref: k
|
|
53
|
-
};
|
|
54
|
-
return u !== !1 && (m[u] = R(u)), t.useEffect(() => {
|
|
55
|
-
if (u !== !1) {
|
|
56
|
-
const e = T(u), n = h(o.current), r = () => {
|
|
57
|
-
l.current = !0;
|
|
58
|
-
};
|
|
59
|
-
return n.addEventListener(e, a), n.addEventListener("touchmove", r), () => {
|
|
60
|
-
n.removeEventListener(e, a), n.removeEventListener("touchmove", r);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}, [a, u]), i !== !1 && (m[i] = R(i)), t.useEffect(() => {
|
|
64
|
-
if (i !== !1) {
|
|
65
|
-
const e = T(i), n = h(o.current);
|
|
66
|
-
return n.addEventListener(e, a), () => {
|
|
67
|
-
n.removeEventListener(e, a);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}, [a, i]), /* @__PURE__ */ w(t.Fragment, {
|
|
71
|
-
children: /* @__PURE__ */ t.cloneElement(s, m)
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
75
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
76
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
77
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
78
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
79
|
-
/**
|
|
80
|
-
* The wrapped element.
|
|
81
|
-
*/
|
|
82
|
-
children: b.isRequired,
|
|
83
|
-
/**
|
|
84
|
-
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
85
|
-
* This prop changes how portaled elements are handled.
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
disableReactTree: f.bool,
|
|
89
|
-
/**
|
|
90
|
-
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
91
|
-
* @default 'onClick'
|
|
92
|
-
*/
|
|
93
|
-
mouseEvent: f.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
94
|
-
/**
|
|
95
|
-
* Callback fired when a "click away" event is detected.
|
|
96
|
-
*/
|
|
97
|
-
onClickAway: f.func.isRequired,
|
|
98
|
-
/**
|
|
99
|
-
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
100
|
-
* @default 'onTouchEnd'
|
|
101
|
-
*/
|
|
102
|
-
touchEvent: f.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
103
|
-
});
|
|
104
|
-
process.env.NODE_ENV !== "production" && (v.propTypes = g(v.propTypes));
|
|
105
|
-
export {
|
|
106
|
-
v as C
|
|
107
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import './assets/Dialog.css';
|
|
2
|
-
const _ = "_dialog__subtitle_yi7uo_52", o = "_dialog_yi7uo_52", a = "_dialog__backdrop_yi7uo_87", y = "_dialog__panel_yi7uo_95", i = "_dialog__title_yi7uo_56", p = "_dialog__divider_yi7uo_121", t = "_dialog__actions_yi7uo_134", u = {
|
|
3
|
-
"u-typography-h1": "_u-typography-h1_yi7uo_1",
|
|
4
|
-
"u-typography-h2": "_u-typography-h2_yi7uo_8",
|
|
5
|
-
"u-typography-h3": "_u-typography-h3_yi7uo_15",
|
|
6
|
-
"u-typography-h4": "_u-typography-h4_yi7uo_22",
|
|
7
|
-
"u-typography-h5": "_u-typography-h5_yi7uo_29",
|
|
8
|
-
"u-typography-h6": "_u-typography-h6_yi7uo_36",
|
|
9
|
-
"u-typography-base": "_u-typography-base_yi7uo_43",
|
|
10
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_yi7uo_48",
|
|
11
|
-
"u-typography-base--xl": "_u-typography-base--xl_yi7uo_52",
|
|
12
|
-
dialog__subtitle: _,
|
|
13
|
-
"u-typography-base--lg": "_u-typography-base--lg_yi7uo_56",
|
|
14
|
-
"dialog__title--small": "_dialog__title--small_yi7uo_56",
|
|
15
|
-
"u-typography-base--sm": "_u-typography-base--sm_yi7uo_60",
|
|
16
|
-
"u-typography-base--bold": "_u-typography-base--bold_yi7uo_64",
|
|
17
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_yi7uo_67",
|
|
18
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_yi7uo_70",
|
|
19
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_yi7uo_73",
|
|
20
|
-
dialog: o,
|
|
21
|
-
dialog__backdrop: a,
|
|
22
|
-
dialog__panel: y,
|
|
23
|
-
dialog__title: i,
|
|
24
|
-
dialog__divider: p,
|
|
25
|
-
"dialog__close-icon": "_dialog__close-icon_yi7uo_125",
|
|
26
|
-
dialog__actions: t
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
u as s
|
|
30
|
-
};
|
package/dist/Group-B3p31ftp.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import './assets/Group.css';
|
|
2
|
-
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as i } from "react";
|
|
4
|
-
import { Icon as n } from "./components/Icon/Icon.js";
|
|
5
|
-
const c = "_toggle__input_wlkvp_1", p = "_toggle__label_wlkvp_8", o = {
|
|
6
|
-
toggle__input: c,
|
|
7
|
-
toggle__label: p,
|
|
8
|
-
"toggle__label--selected": "_toggle__label--selected_wlkvp_15",
|
|
9
|
-
"toggle-group__fieldset": "_toggle-group__fieldset_wlkvp_20",
|
|
10
|
-
"toggle-group__options": "_toggle-group__options_wlkvp_25",
|
|
11
|
-
"toggle-group__error": "_toggle-group__error_wlkvp_29"
|
|
12
|
-
}, f = i((e, r) => {
|
|
13
|
-
const { children: s, legend: l, error: _ } = e, d = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, a = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
|
|
14
|
-
return /* @__PURE__ */ g("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
|
|
15
|
-
l && /* @__PURE__ */ t("legend", { "data-testid": d, children: l }),
|
|
16
|
-
/* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
|
|
17
|
-
_ && /* @__PURE__ */ g("div", { className: o["toggle-group__error"], "data-testid": a, children: [
|
|
18
|
-
/* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
|
|
19
|
-
_
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
f as G,
|
|
25
|
-
o as s
|
|
26
|
-
};
|