@pismo/marola 1.0.0-beta.1 → 1.0.0-beta.11
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-2b1peDFT.js → Button-DiLqcAJG.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-BaJ-OV_7.js} +4 -3
- package/dist/Dialog.module-DFcZsVAd.js +30 -0
- package/dist/Input.module-ZTRZRcNt.js +405 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-lLWZt2wk.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-B_Es6eUL.js} +2 -2
- package/dist/SelectButton-CoOT2txy.js +61 -0
- package/dist/Toggle-C7W0gYOI.js +175 -0
- package/dist/assets/Adornment.css +1 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.css +1 -0
- 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-DVjg9PRh.js → combineHooksSlotProps-BtBYUV_B.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +19 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- package/dist/components/Advice/Advice.d.ts +32 -17
- package/dist/components/Advice/Advice.js +39 -40
- package/dist/components/Advice/Advice.stories.d.ts +4 -3
- package/dist/components/Autocomplete/Autocomplete.d.ts +50 -0
- package/dist/components/Autocomplete/Autocomplete.js +689 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +45 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.js +49 -47
- package/dist/components/Button/Button.stories.d.ts +8 -52
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +3 -11
- package/dist/components/Chip/Chip.js +5 -4
- package/dist/components/Chip/Chip.stories.d.ts +3 -2
- 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.js +13 -12
- package/dist/components/Dialog/Dialog.stories.d.ts +44 -44
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/Icon/Icon.js +27 -21
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +4 -2
- package/dist/components/Input/Input.js +74 -471
- 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 +7 -1
- package/dist/components/Pagination/Pagination.js +104 -182
- package/dist/components/Pagination/usePagination.d.ts +90 -0
- package/dist/components/Pagination/usePagination.js +79 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +19 -0
- package/dist/components/Select/Select.js +9 -8
- package/dist/components/Select/SelectButton.js +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.js +96 -96
- package/dist/components/Tabs/Tab.js +18 -17
- package/dist/components/Tabs/TabPanel.js +27 -26
- package/dist/components/Tabs/Tabs.js +25 -25
- package/dist/components/TextDisplay/TextDisplay.d.ts +3 -1
- package/dist/components/TextDisplay/TextDisplay.js +37 -30
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.js +81 -76
- package/dist/ownerDocument-B61GUaFs.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-Bn3MNH8I.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-BpJT77u3.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-kRhf7Gil.js} +93 -94
- package/package.json +6 -2
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: <T extends string | (object & {
|
|
6
|
+
label: string;
|
|
7
|
+
})>({ label, type, options, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, maxLength, onChange, classNameLabel, classNameInput, classNameErrorMessage, classNameInfoMessage, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, ...rest }: import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
options?: T[] | undefined;
|
|
10
|
+
onChange?: ((event: import('react').SyntheticEvent<Element, Event>, newValue: T) => void) | undefined;
|
|
11
|
+
infoMessage?: string | undefined;
|
|
12
|
+
errorMessage?: string | undefined;
|
|
13
|
+
leftIcon?: import('react').ReactNode;
|
|
14
|
+
rightIcon?: import('react').ReactNode;
|
|
15
|
+
type?: "search" | "text" | "password" | undefined;
|
|
16
|
+
hideCharsCounter?: boolean | undefined;
|
|
17
|
+
classNameWrapper?: string | undefined;
|
|
18
|
+
classNameLabel?: string | undefined;
|
|
19
|
+
classNameInput?: string | undefined;
|
|
20
|
+
classNameInfoMessage?: string | undefined;
|
|
21
|
+
classNameErrorMessage?: string | undefined;
|
|
22
|
+
classNameCharsCounter?: string | undefined;
|
|
23
|
+
'data-testid-wrapper'?: string | undefined;
|
|
24
|
+
'data-testid-label'?: string | undefined;
|
|
25
|
+
'data-testid-input'?: string | undefined;
|
|
26
|
+
'data-testid-infoMessage'?: string | undefined;
|
|
27
|
+
'data-testid-errorMessage'?: string | undefined;
|
|
28
|
+
'data-testid-charsCounter'?: string | undefined;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
tags: string[];
|
|
31
|
+
parameters: {
|
|
32
|
+
layout: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Simple: Story;
|
|
38
|
+
export declare const WithLabel: Story;
|
|
39
|
+
export declare const WithSearch: Story;
|
|
40
|
+
export declare const WithPlaceholder: Story;
|
|
41
|
+
export declare const Disabled: Story;
|
|
42
|
+
export declare const WithLeftIcon: Story;
|
|
43
|
+
export declare const WithBothIcons: Story;
|
|
44
|
+
export declare const WithInfoMessage: Story;
|
|
45
|
+
export declare const WithErrorMessage: Story;
|
|
@@ -16,6 +16,8 @@ type ButtonCoreProps = {
|
|
|
16
16
|
variant?: Variant;
|
|
17
17
|
/** mui base button props */
|
|
18
18
|
muiButtonBaseProps?: MUIButtonBaseProps;
|
|
19
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
20
|
+
'data-testid'?: string;
|
|
19
21
|
};
|
|
20
22
|
interface ButtonPropsWithLink extends ButtonCoreProps {
|
|
21
23
|
/** link for component to navigate to, if provide component will be an anchor */
|
|
@@ -1,65 +1,67 @@
|
|
|
1
1
|
import '../../assets/Button.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c as
|
|
5
|
-
import { LoadingSpinner as
|
|
6
|
-
import { B as f } from "../../Button-
|
|
7
|
-
const k = "
|
|
8
|
-
"u-typography-h1": "_u-typography-
|
|
9
|
-
"u-typography-h2": "_u-typography-
|
|
10
|
-
"u-typography-h3": "_u-typography-
|
|
11
|
-
"u-typography-h4": "_u-typography-
|
|
12
|
-
"u-typography-h5": "_u-typography-
|
|
13
|
-
"u-typography-h6": "_u-typography-
|
|
14
|
-
"u-typography-base": "_u-typography-
|
|
15
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
16
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
17
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
2
|
+
import { jsx as p, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as x, useMemo as c } from "react";
|
|
4
|
+
import { c as v } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
|
|
6
|
+
import { B as f } from "../../Button-DiLqcAJG.js";
|
|
7
|
+
const k = "_button_dxo5v_57", t = {
|
|
8
|
+
"u-typography-h1": "_u-typography-h1_dxo5v_1",
|
|
9
|
+
"u-typography-h2": "_u-typography-h2_dxo5v_8",
|
|
10
|
+
"u-typography-h3": "_u-typography-h3_dxo5v_15",
|
|
11
|
+
"u-typography-h4": "_u-typography-h4_dxo5v_22",
|
|
12
|
+
"u-typography-h5": "_u-typography-h5_dxo5v_29",
|
|
13
|
+
"u-typography-h6": "_u-typography-h6_dxo5v_36",
|
|
14
|
+
"u-typography-base": "_u-typography-base_dxo5v_43",
|
|
15
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_dxo5v_49",
|
|
16
|
+
"u-typography-base--xl": "_u-typography-base--xl_dxo5v_53",
|
|
17
|
+
"u-typography-base--lg": "_u-typography-base--lg_dxo5v_57",
|
|
18
18
|
button: k,
|
|
19
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
20
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
21
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
22
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
23
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
24
|
-
"button--primary": "_button--
|
|
25
|
-
"button--secondary": "_button--
|
|
26
|
-
"button--quick": "_button--
|
|
27
|
-
"button__loading-container": "_button__loading-
|
|
28
|
-
},
|
|
19
|
+
"u-typography-base--sm": "_u-typography-base--sm_dxo5v_61",
|
|
20
|
+
"u-typography-base--bold": "_u-typography-base--bold_dxo5v_65",
|
|
21
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_dxo5v_68",
|
|
22
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_dxo5v_71",
|
|
23
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_dxo5v_74",
|
|
24
|
+
"button--primary": "_button--primary_dxo5v_86",
|
|
25
|
+
"button--secondary": "_button--secondary_dxo5v_101",
|
|
26
|
+
"button--quick": "_button--quick_dxo5v_118",
|
|
27
|
+
"button__loading-container": "_button__loading-container_dxo5v_138"
|
|
28
|
+
}, S = x((y, _) => {
|
|
29
29
|
const {
|
|
30
|
-
onClick:
|
|
31
|
-
link:
|
|
30
|
+
onClick: u,
|
|
31
|
+
link: e,
|
|
32
32
|
loading: n,
|
|
33
33
|
children: a,
|
|
34
|
-
type:
|
|
35
|
-
disabled:
|
|
34
|
+
type: s = "button",
|
|
35
|
+
disabled: h,
|
|
36
36
|
className: r,
|
|
37
|
-
variant:
|
|
38
|
-
muiButtonBaseProps:
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
variant: o = "primary",
|
|
38
|
+
muiButtonBaseProps: d,
|
|
39
|
+
"data-testid": g
|
|
40
|
+
} = y, i = {
|
|
41
|
+
invert: o === "secondary" || o === "quick"
|
|
41
42
|
}, b = c(
|
|
42
|
-
() =>
|
|
43
|
-
[r,
|
|
43
|
+
() => v([t.button, t[`button--${o}`], r]),
|
|
44
|
+
[r, o]
|
|
44
45
|
);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ p(
|
|
46
47
|
f,
|
|
47
48
|
{
|
|
48
|
-
type:
|
|
49
|
-
href:
|
|
50
|
-
onClick:
|
|
51
|
-
disabled:
|
|
49
|
+
type: s,
|
|
50
|
+
href: e,
|
|
51
|
+
onClick: u,
|
|
52
|
+
disabled: h,
|
|
52
53
|
className: b,
|
|
53
|
-
ref:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
ref: _,
|
|
55
|
+
"data-testid": g,
|
|
56
|
+
...d ?? {},
|
|
57
|
+
children: n ? /* @__PURE__ */ l("div", { className: t["button__loading-container"], children: [
|
|
58
|
+
/* @__PURE__ */ p(m, { ...i }),
|
|
57
59
|
a
|
|
58
60
|
] }) : a
|
|
59
61
|
}
|
|
60
62
|
);
|
|
61
63
|
});
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
S as Button,
|
|
66
|
+
S as default
|
|
65
67
|
};
|
|
@@ -4,59 +4,15 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: import('react').ForwardRefExoticComponent<import('./Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
tags: string[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
loading?: boolean | undefined;
|
|
10
|
-
disabled?: boolean | undefined;
|
|
11
|
-
className?: string | undefined;
|
|
12
|
-
children: import('react').ReactNode;
|
|
13
|
-
variant?: ("primary" | "secondary" | "quick") | undefined;
|
|
14
|
-
muiButtonBaseProps?: import('@mui/base').ButtonOwnProps | undefined;
|
|
15
|
-
type?: undefined;
|
|
16
|
-
onClick?: undefined;
|
|
17
|
-
ref?: import('react').LegacyRef<HTMLButtonElement> | undefined;
|
|
18
|
-
key?: import('react').Key | null | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
onClick?: (() => void) | undefined;
|
|
21
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
22
|
-
loading?: boolean | undefined;
|
|
23
|
-
disabled?: boolean | undefined;
|
|
24
|
-
className?: string | undefined;
|
|
25
|
-
children: import('react').ReactNode;
|
|
26
|
-
variant?: ("primary" | "secondary" | "quick") | undefined;
|
|
27
|
-
muiButtonBaseProps?: import('@mui/base').ButtonOwnProps | undefined;
|
|
28
|
-
link?: undefined;
|
|
29
|
-
ref?: import('react').LegacyRef<HTMLButtonElement> | undefined;
|
|
30
|
-
key?: import('react').Key | null | undefined;
|
|
31
|
-
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
32
|
-
argTypes: {
|
|
33
|
-
onClick: {
|
|
34
|
-
if: {
|
|
35
|
-
arg: string;
|
|
36
|
-
exists: false;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
type: {
|
|
40
|
-
control: {
|
|
41
|
-
type: "text";
|
|
42
|
-
};
|
|
43
|
-
if: {
|
|
44
|
-
arg: string;
|
|
45
|
-
exists: true;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
link: {
|
|
49
|
-
control: {
|
|
50
|
-
type: "text";
|
|
51
|
-
};
|
|
52
|
-
if: {
|
|
53
|
-
arg: string;
|
|
54
|
-
exists: false;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
57
9
|
};
|
|
58
10
|
};
|
|
59
11
|
export default meta;
|
|
60
12
|
type Story = StoryObj<typeof meta>;
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const
|
|
13
|
+
export declare const Primary: Story;
|
|
14
|
+
export declare const PrimaryDisabled: Story;
|
|
15
|
+
export declare const Secondary: Story;
|
|
16
|
+
export declare const SecondaryDisabled: Story;
|
|
17
|
+
export declare const Quick: Story;
|
|
18
|
+
export declare const QuickDisabled: Story;
|
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import '../../assets/Checkbox.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as w, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
4
|
import { useState as k, useEffect as i } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
const
|
|
7
|
-
"u-typography-h1": "_u-typography-
|
|
8
|
-
"u-typography-h2": "_u-typography-
|
|
9
|
-
"u-typography-h3": "_u-typography-
|
|
10
|
-
"u-typography-h4": "_u-typography-
|
|
11
|
-
"u-typography-h5": "_u-typography-
|
|
12
|
-
"u-typography-h6": "_u-typography-
|
|
13
|
-
"u-typography-base": "_u-typography-
|
|
14
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
15
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
16
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
17
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
18
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
19
|
-
"checkbox-wrapper": "_checkbox-
|
|
20
|
-
"label--highlighted": "_label--
|
|
21
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
22
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
23
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
24
|
-
label:
|
|
25
|
-
"label--highlighted-checked": "_label--highlighted-
|
|
26
|
-
checkmark:
|
|
27
|
-
"checkmark--checked": "_checkmark--
|
|
28
|
-
"checkmark--light-theme": "_checkmark--light-
|
|
29
|
-
"checkmark--accent-theme": "_checkmark--accent-
|
|
30
|
-
"checkmark--small-size": "_checkmark--small-
|
|
31
|
-
"checkmark--normal-size": "_checkmark--normal-
|
|
32
|
-
},
|
|
5
|
+
import { c as _ } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
const v = (a) => /* @__PURE__ */ l.createElement("svg", { width: 14, height: 10, viewBox: "0 0 14 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ l.createElement("path", { d: "M13.7063 0.293438C14.0969 0.684062 14.0969 1.31531 13.7063 1.70594L5.70625 9.70594C5.31563 10.0966 4.68437 10.0966 4.29375 9.70594L0.292875 5.70594C-0.097625 5.31531 -0.097625 4.68406 0.292875 4.29344C0.683437 3.90281 1.31656 3.90281 1.70719 4.29344L4.97188 7.58406L12.2937 0.293438C12.6844 -0.0978125 13.3156 -0.0978125 13.7063 0.293438Z", fill: "#F7F7FC" })), N = "_label_xqg5n_65", z = "_checkmark_xqg5n_94", e = {
|
|
7
|
+
"u-typography-h1": "_u-typography-h1_xqg5n_1",
|
|
8
|
+
"u-typography-h2": "_u-typography-h2_xqg5n_8",
|
|
9
|
+
"u-typography-h3": "_u-typography-h3_xqg5n_15",
|
|
10
|
+
"u-typography-h4": "_u-typography-h4_xqg5n_22",
|
|
11
|
+
"u-typography-h5": "_u-typography-h5_xqg5n_29",
|
|
12
|
+
"u-typography-h6": "_u-typography-h6_xqg5n_36",
|
|
13
|
+
"u-typography-base": "_u-typography-base_xqg5n_43",
|
|
14
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_xqg5n_49",
|
|
15
|
+
"u-typography-base--xl": "_u-typography-base--xl_xqg5n_53",
|
|
16
|
+
"u-typography-base--lg": "_u-typography-base--lg_xqg5n_57",
|
|
17
|
+
"u-typography-base--sm": "_u-typography-base--sm_xqg5n_61",
|
|
18
|
+
"u-typography-base--bold": "_u-typography-base--bold_xqg5n_65",
|
|
19
|
+
"checkbox-wrapper": "_checkbox-wrapper_xqg5n_65",
|
|
20
|
+
"label--highlighted": "_label--highlighted_xqg5n_65",
|
|
21
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_xqg5n_68",
|
|
22
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_xqg5n_71",
|
|
23
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_xqg5n_74",
|
|
24
|
+
label: N,
|
|
25
|
+
"label--highlighted-checked": "_label--highlighted-checked_xqg5n_91",
|
|
26
|
+
checkmark: z,
|
|
27
|
+
"checkmark--checked": "_checkmark--checked_xqg5n_106",
|
|
28
|
+
"checkmark--light-theme": "_checkmark--light-theme_xqg5n_109",
|
|
29
|
+
"checkmark--accent-theme": "_checkmark--accent-theme_xqg5n_116",
|
|
30
|
+
"checkmark--small-size": "_checkmark--small-size_xqg5n_123",
|
|
31
|
+
"checkmark--normal-size": "_checkmark--normal-size_xqg5n_130"
|
|
32
|
+
}, E = (a) => /* @__PURE__ */ l.createElement("svg", { width: 10, height: 3, viewBox: "0 0 10 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ l.createElement("rect", { y: 0.5, width: 10, height: 2, rx: 1, fill: "#1897F3" })), B = ({
|
|
33
33
|
className: a,
|
|
34
|
-
label:
|
|
34
|
+
label: s,
|
|
35
35
|
name: m,
|
|
36
|
-
theme:
|
|
37
|
-
size:
|
|
36
|
+
theme: x = "accent",
|
|
37
|
+
size: u = "normal",
|
|
38
38
|
checked: r,
|
|
39
|
-
onChange:
|
|
40
|
-
isIndeterminate:
|
|
41
|
-
highlightLabel:
|
|
42
|
-
...
|
|
39
|
+
onChange: b,
|
|
40
|
+
isIndeterminate: g,
|
|
41
|
+
highlightLabel: d = !1,
|
|
42
|
+
...o
|
|
43
43
|
}) => {
|
|
44
|
-
const [h,
|
|
44
|
+
const [h, n] = k(r), [t, y] = k(g);
|
|
45
45
|
i(() => {
|
|
46
|
-
r !== h &&
|
|
46
|
+
r !== h && n(r);
|
|
47
47
|
}, [r]), i(() => {
|
|
48
|
-
typeof
|
|
49
|
-
}, [
|
|
50
|
-
const
|
|
48
|
+
typeof g == "boolean" && y(g);
|
|
49
|
+
}, [g]);
|
|
50
|
+
const q = _(e["checkbox-wrapper"], a), C = _(
|
|
51
51
|
e.checkmark,
|
|
52
|
-
e[`checkmark--${
|
|
53
|
-
e[`checkmark--${
|
|
52
|
+
e[`checkmark--${x}-theme`],
|
|
53
|
+
e[`checkmark--${u}-size`],
|
|
54
54
|
(h || t) && e["checkmark--checked"]
|
|
55
|
-
),
|
|
55
|
+
), f = d && (o.children || s) ? _(
|
|
56
56
|
e.label,
|
|
57
57
|
e["label--highlighted"],
|
|
58
58
|
(h || t) && e["label--highlighted-checked"]
|
|
59
59
|
) : e.label;
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
let
|
|
62
|
-
t && (y(!1),
|
|
63
|
-
}, ...
|
|
60
|
+
return /* @__PURE__ */ w("div", { className: q, onClick: () => {
|
|
61
|
+
let p = !h;
|
|
62
|
+
t && (y(!1), p = !0), b(p), n(p);
|
|
63
|
+
}, ...o, children: [
|
|
64
64
|
/* @__PURE__ */ c("input", { name: m, type: "checkbox", checked: !t && h, readOnly: !0 }),
|
|
65
|
-
/* @__PURE__ */ c("span", { className:
|
|
66
|
-
/* @__PURE__ */ c("label", { className:
|
|
65
|
+
/* @__PURE__ */ c("span", { className: C, children: t ? /* @__PURE__ */ c(E, {}) : h && /* @__PURE__ */ c(v, {}) }),
|
|
66
|
+
/* @__PURE__ */ c("label", { className: f, children: o.children || s })
|
|
67
67
|
] });
|
|
68
68
|
};
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
B as Checkbox
|
|
71
71
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AdornmentProps } from '../../main';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
export type Variant = 'default' | 'contained' | 'outlined';
|
|
5
5
|
type ChipProps = {
|
|
@@ -8,7 +8,7 @@ type ChipProps = {
|
|
|
8
8
|
/** Whether to show loading state (skeleton) */
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
/** Left icon to display */
|
|
11
|
-
leftAdornment?:
|
|
11
|
+
leftAdornment?: AdornmentProps;
|
|
12
12
|
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the chip wrapper */
|
|
13
13
|
'data-testid'?: string;
|
|
14
14
|
/** Functionality to perform when the main body of the chip is clicked */
|
|
@@ -27,13 +27,5 @@ type ChipProps = {
|
|
|
27
27
|
/** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
|
|
28
28
|
'data-testid-skeleton'?: string;
|
|
29
29
|
};
|
|
30
|
-
export type ChipAdornmentSlotProps = {
|
|
31
|
-
/** The Marola Icon to display */
|
|
32
|
-
icon: ReactElement<IconProps>;
|
|
33
|
-
/** Any additional classes to apply to icon */
|
|
34
|
-
className?: string;
|
|
35
|
-
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the icon */
|
|
36
|
-
'data-testid'?: string;
|
|
37
|
-
};
|
|
38
30
|
export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<unknown>>;
|
|
39
31
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import "../Adornment/Adornment.js";
|
|
4
5
|
import "../Icon/Icon.js";
|
|
6
|
+
import "../Typography/Typography.js";
|
|
5
7
|
import "../Button/Button.js";
|
|
6
|
-
import { C as
|
|
8
|
+
import { C as k } from "../../Toggle-C7W0gYOI.js";
|
|
7
9
|
import "../Dialog/Backdrop.js";
|
|
8
|
-
import "../Typography/Typography.js";
|
|
9
10
|
import "../IconButton/IconButton.js";
|
|
10
11
|
import "../Select/Select.js";
|
|
11
12
|
import "../Skeleton/Skeleton.js";
|
|
@@ -13,7 +14,7 @@ import "../Table/Table.js";
|
|
|
13
14
|
import "../Tabs/Tabs.js";
|
|
14
15
|
import "../../Group-B3p31ftp.js";
|
|
15
16
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
-
import "../../Button-
|
|
17
|
+
import "../../Button-DiLqcAJG.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
k as Chip
|
|
19
20
|
};
|
|
@@ -5,7 +5,7 @@ declare const meta: {
|
|
|
5
5
|
component: import('react').ForwardRefExoticComponent<{
|
|
6
6
|
label: import('react').ReactNode;
|
|
7
7
|
loading?: boolean | undefined;
|
|
8
|
-
leftAdornment?: import('
|
|
8
|
+
leftAdornment?: import('../Adornment/Adornment').AdornmentProps | undefined;
|
|
9
9
|
'data-testid'?: string | undefined;
|
|
10
10
|
onClickContent?: (() => void) | undefined;
|
|
11
11
|
onClickRemove?: (() => void) | undefined;
|
|
@@ -19,7 +19,7 @@ declare const meta: {
|
|
|
19
19
|
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
20
20
|
label: import('react').ReactNode;
|
|
21
21
|
loading?: boolean | undefined;
|
|
22
|
-
leftAdornment?: import('
|
|
22
|
+
leftAdornment?: import('../Adornment/Adornment').AdornmentProps | undefined;
|
|
23
23
|
'data-testid'?: string | undefined;
|
|
24
24
|
onClickContent?: (() => void) | undefined;
|
|
25
25
|
onClickRemove?: (() => void) | undefined;
|
|
@@ -40,3 +40,4 @@ export declare const ClickableWithRemove: Story;
|
|
|
40
40
|
export declare const FullDefault: Story;
|
|
41
41
|
export declare const FullOutlined: Story;
|
|
42
42
|
export declare const FullContained: Story;
|
|
43
|
+
export declare const FullContainedCustomIcon: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as t } from "../../Dialog.module-
|
|
2
|
+
import { s as t } from "../../Dialog.module-DFcZsVAd.js";
|
|
3
3
|
const i = ({ children: s }) => /* @__PURE__ */ o("div", { className: t.dialog__actions, children: s });
|
|
4
4
|
export {
|
|
5
5
|
i as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
|
-
import { s as e } from "../../Dialog.module-
|
|
3
|
+
import { s as e } from "../../Dialog.module-DFcZsVAd.js";
|
|
4
4
|
const i = t((o, r) => {
|
|
5
5
|
const { open: m, className: p, ...s } = o;
|
|
6
6
|
return /* @__PURE__ */ a("div", { className: e.dialog__backdrop, ref: r, ...s });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as r } from "../Icon/Icon.js";
|
|
3
|
-
import { s as t } from "../../Dialog.module-
|
|
4
|
-
import { B as a } from "../../Button-
|
|
3
|
+
import { s as t } from "../../Dialog.module-DFcZsVAd.js";
|
|
4
|
+
import { B as a } from "../../Button-DiLqcAJG.js";
|
|
5
5
|
const d = ({ handleOnClose: i, className: o }) => {
|
|
6
6
|
const l = o != null ? t["dialog__close-icon "] + o : t["dialog__close-icon"];
|
|
7
7
|
return /* @__PURE__ */ s(
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsxs as $, jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as Ye } from "./Actions.js";
|
|
3
3
|
import oe from "./Backdrop.js";
|
|
4
4
|
import re from "./CloseIconButton.js";
|
|
5
|
-
import { default as
|
|
6
|
-
import { s as q } from "../../Dialog.module-
|
|
5
|
+
import { default as Ge } from "./Content.js";
|
|
6
|
+
import { s as q } from "../../Dialog.module-DFcZsVAd.js";
|
|
7
7
|
import se from "./DialogTitle.js";
|
|
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 "../../
|
|
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 "../../useSlotProps-kRhf7Gil.js";
|
|
9
9
|
import * as f from "react";
|
|
10
|
-
import { o as w, e as ee
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { o as w, e as ee } from "../../ownerDocument-B61GUaFs.js";
|
|
11
|
+
import { u as G } from "../../useEventCallback-BAQJJ3ye.js";
|
|
12
|
+
import { P as fe, H as pe } from "../../Portal-B_Es6eUL.js";
|
|
13
|
+
import { e as be } from "../../index-D3Wj0eid.js";
|
|
13
14
|
function X(...e) {
|
|
14
15
|
return e.reduce((t, o) => o == null ? t : function(...s) {
|
|
15
16
|
t.apply(this, s), o.apply(this, s);
|
|
@@ -613,7 +614,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
613
614
|
root: i.elementType
|
|
614
615
|
})
|
|
615
616
|
});
|
|
616
|
-
const
|
|
617
|
+
const qe = ({
|
|
617
618
|
children: e,
|
|
618
619
|
dialogTitle: t,
|
|
619
620
|
dialogSubtitle: o,
|
|
@@ -638,9 +639,9 @@ const je = ({
|
|
|
638
639
|
}
|
|
639
640
|
);
|
|
640
641
|
export {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
Ye as Actions,
|
|
643
|
+
Ge as Content,
|
|
644
|
+
qe as Dialog,
|
|
644
645
|
se as DialogTitle,
|
|
645
|
-
|
|
646
|
+
qe as default
|
|
646
647
|
};
|