@pismo/marola 0.0.1-alpha.31 → 0.0.1-alpha.4
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 +5 -17
- package/dist/{Button-2b1peDFT.js → Button-C3Qm852g.js} +23 -23
- package/dist/Dialog.module-BO0mdB7d.js +15 -0
- package/dist/ListContext-D6-YwtZn.js +18 -0
- package/dist/Tabs.module-_kSbSyth.js +66 -0
- package/dist/assets/CallToActionButton.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/LoadingSpinner.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/CallToActionButton/CallToActionButton.d.ts +21 -0
- package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +9 -2
- package/dist/components/Dialog/CloseIconButton.js +124 -12
- package/dist/components/Dialog/Dialog.d.ts +5 -6
- package/dist/components/Dialog/Dialog.js +20103 -445
- package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
- package/dist/components/Dialog/Title.js +14 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
- package/dist/components/Tabs/Tab.d.ts +1 -6
- package/dist/components/Tabs/Tab.js +173 -118
- package/dist/components/Tabs/TabPanel.d.ts +1 -5
- package/dist/components/Tabs/TabPanel.js +10 -8
- package/dist/components/Tabs/Tabs.d.ts +2 -8
- package/dist/components/Tabs/Tabs.js +701 -250
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +64 -55
- package/dist/{index-CH45lKw7.js → index-BZ1lkM_M.js} +159 -162
- package/dist/main.d.ts +5 -27
- package/dist/main.js +21 -76
- package/dist/types/helpers.d.ts +7 -14
- package/dist/useButton-CbmjmH5z.js +186 -0
- package/dist/useCompoundItem-B7wfGDHQ.js +41 -0
- package/package.json +10 -51
- package/src/playground/Playground.tsx +20 -0
- 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-BXcLAMNy.js +0 -142
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Button.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/IconButton.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/PageHeader.css +0 -1
- package/dist/assets/Pagination.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 -48
- package/dist/components/Advice/Advice.stories.d.ts +0 -18
- package/dist/components/Button/Button.d.ts +0 -32
- package/dist/components/Button/Button.js +0 -65
- 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 -27
- package/dist/components/Icon/Icon.js +0 -136
- package/dist/components/Icon/Icon.stories.d.ts +0 -16
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/IconButton/IconButton.d.ts +0 -38
- package/dist/components/IconButton/IconButton.js +0 -63
- 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.d.ts +0 -66
- package/dist/components/PageHeader/PageHeader.js +0 -87
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.d.ts +0 -55
- package/dist/components/Pagination/Pagination.js +0 -237
- 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/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +0 -93
- 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.d.ts +0 -56
- package/dist/components/Table/Table.js +0 -137
- package/dist/components/Table/Table.stories.d.ts +0 -29
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +0 -21
- 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 -16
- 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.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.js +0 -141
- 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/useControlled-CCMYYdCM.js +0 -31
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import '../../assets/Advice.css';
|
|
2
|
-
import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { c as i } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { Icon as d } from "../Icon/Icon.js";
|
|
5
|
-
const n = "_advice_12o7p_56", m = "_content_12o7p_56", s = {
|
|
6
|
-
"u-typography-h1": "_u-typography-h1_12o7p_1",
|
|
7
|
-
"u-typography-h2": "_u-typography-h2_12o7p_8",
|
|
8
|
-
"u-typography-h3": "_u-typography-h3_12o7p_15",
|
|
9
|
-
"u-typography-h4": "_u-typography-h4_12o7p_22",
|
|
10
|
-
"u-typography-h5": "_u-typography-h5_12o7p_29",
|
|
11
|
-
"u-typography-h6": "_u-typography-h6_12o7p_36",
|
|
12
|
-
"u-typography-base": "_u-typography-base_12o7p_43",
|
|
13
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_12o7p_48",
|
|
14
|
-
"u-typography-base--xl": "_u-typography-base--xl_12o7p_52",
|
|
15
|
-
"u-typography-base--lg": "_u-typography-base--lg_12o7p_56",
|
|
16
|
-
advice: n,
|
|
17
|
-
content: m,
|
|
18
|
-
"u-typography-base--sm": "_u-typography-base--sm_12o7p_61",
|
|
19
|
-
"u-typography-base--bold": "_u-typography-base--bold_12o7p_65",
|
|
20
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_12o7p_69",
|
|
21
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_12o7p_72",
|
|
22
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_12o7p_75",
|
|
23
|
-
"content-no-items": "_content-no-items_12o7p_90"
|
|
24
|
-
}, h = {
|
|
25
|
-
"no-permission": "eye-slash",
|
|
26
|
-
"no-items": "",
|
|
27
|
-
"error-page": "circle-exclamation",
|
|
28
|
-
"without-results": "folder-magnifying-glass"
|
|
29
|
-
}, f = ({ icon: o, type: p, content: e, title: _, description: g, className: u, IconSvg: t, ...l }) => {
|
|
30
|
-
const a = {
|
|
31
|
-
color: o != null && o.color ? o == null ? void 0 : o.color : p !== "error-page" ? "var(--accent)" : "var(--secondary-orange)",
|
|
32
|
-
size: (o == null ? void 0 : o.size) || "3.375rem",
|
|
33
|
-
icon: h[p] || (o == null ? void 0 : o.icon) || "",
|
|
34
|
-
iconFamily: h[p] ? "fa/duotone" : (o == null ? void 0 : o.iconFamily) || "fa/duotone"
|
|
35
|
-
};
|
|
36
|
-
return /* @__PURE__ */ y("div", { className: i(s.advice, u), ...l, children: [
|
|
37
|
-
t && p !== "no-items" && p !== "error-page" && /* @__PURE__ */ r(t, { style: { color: a.color, height: a.size, width: a.size } }),
|
|
38
|
-
!t && p !== "no-items" && /* @__PURE__ */ r(d, { ...a }),
|
|
39
|
-
p !== "error-page" && p !== "no-items" ? typeof e == "string" ? /* @__PURE__ */ r("p", { children: e }) : /* @__PURE__ */ r("div", { className: s.content, children: e }) : /* @__PURE__ */ y("div", { className: s["content-no-items"], children: [
|
|
40
|
-
/* @__PURE__ */ r("h3", { children: _ }),
|
|
41
|
-
/* @__PURE__ */ r("p", { children: g }),
|
|
42
|
-
e
|
|
43
|
-
] })
|
|
44
|
-
] });
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
f as Advice
|
|
48
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ icon, type, content, title, description, className, IconSvg, ...rest }: import('./Advice').AdviceProps) => 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 WithoutResults: Story;
|
|
14
|
-
export declare const NoPermission: Story;
|
|
15
|
-
export declare const CustomIcon: Story;
|
|
16
|
-
export declare const CustomIconSVG: Story;
|
|
17
|
-
export declare const NoItems: Story;
|
|
18
|
-
export declare const ErrorPage: Story;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Either } from '../../types/helpers';
|
|
2
|
-
import { ButtonOwnProps as MUIButtonBaseProps } from '@mui/base';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
type Variant = 'primary' | 'secondary' | 'quick';
|
|
6
|
-
type ButtonCoreProps = {
|
|
7
|
-
/** Button to display and act in a loading state */
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
/** Button to display and act in a disabled state */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Space separated list of CSS classes to apply */
|
|
12
|
-
className?: string;
|
|
13
|
-
/** Text or children to display */
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
/** alternative style to use*/
|
|
16
|
-
variant?: Variant;
|
|
17
|
-
/** mui base button props */
|
|
18
|
-
muiButtonBaseProps?: MUIButtonBaseProps;
|
|
19
|
-
};
|
|
20
|
-
interface ButtonPropsWithLink extends ButtonCoreProps {
|
|
21
|
-
/** link for component to navigate to, if provide component will be an anchor */
|
|
22
|
-
link: string;
|
|
23
|
-
}
|
|
24
|
-
interface ButtonPropsWithOnClick extends ButtonCoreProps {
|
|
25
|
-
/** functionality to perform once clicked */
|
|
26
|
-
onClick?: () => void;
|
|
27
|
-
/** HTML type of button */
|
|
28
|
-
type?: HTMLButtonElement['type'];
|
|
29
|
-
}
|
|
30
|
-
export type ButtonProps = Either<ButtonPropsWithLink, ButtonPropsWithOnClick>;
|
|
31
|
-
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
32
|
-
export default Button;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import '../../assets/Button.css';
|
|
2
|
-
import { jsx as h, jsxs as l } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as d, useMemo as c } from "react";
|
|
4
|
-
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
5
|
-
import { LoadingSpinner as x } from "../LoadingSpinner/LoadingSpinner.js";
|
|
6
|
-
import { B as f } from "../../Button-2b1peDFT.js";
|
|
7
|
-
const k = "_button_1h876_56", o = {
|
|
8
|
-
"u-typography-h1": "_u-typography-h1_1h876_1",
|
|
9
|
-
"u-typography-h2": "_u-typography-h2_1h876_8",
|
|
10
|
-
"u-typography-h3": "_u-typography-h3_1h876_15",
|
|
11
|
-
"u-typography-h4": "_u-typography-h4_1h876_22",
|
|
12
|
-
"u-typography-h5": "_u-typography-h5_1h876_29",
|
|
13
|
-
"u-typography-h6": "_u-typography-h6_1h876_36",
|
|
14
|
-
"u-typography-base": "_u-typography-base_1h876_43",
|
|
15
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1h876_48",
|
|
16
|
-
"u-typography-base--xl": "_u-typography-base--xl_1h876_52",
|
|
17
|
-
"u-typography-base--lg": "_u-typography-base--lg_1h876_56",
|
|
18
|
-
button: k,
|
|
19
|
-
"u-typography-base--sm": "_u-typography-base--sm_1h876_60",
|
|
20
|
-
"u-typography-base--bold": "_u-typography-base--bold_1h876_64",
|
|
21
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1h876_67",
|
|
22
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1h876_70",
|
|
23
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1h876_73",
|
|
24
|
-
"button--primary": "_button--primary_1h876_86",
|
|
25
|
-
"button--secondary": "_button--secondary_1h876_105",
|
|
26
|
-
"button--quick": "_button--quick_1h876_122",
|
|
27
|
-
"button__loading-container": "_button__loading-container_1h876_145"
|
|
28
|
-
}, P = d((p, y) => {
|
|
29
|
-
const {
|
|
30
|
-
onClick: _,
|
|
31
|
-
link: u,
|
|
32
|
-
loading: n,
|
|
33
|
-
children: a,
|
|
34
|
-
type: e = "button",
|
|
35
|
-
disabled: s,
|
|
36
|
-
className: r,
|
|
37
|
-
variant: t = "primary",
|
|
38
|
-
muiButtonBaseProps: g
|
|
39
|
-
} = p, i = {
|
|
40
|
-
invert: t === "secondary" || t === "quick"
|
|
41
|
-
}, b = c(
|
|
42
|
-
() => m([o.button, o[`button--${t}`], r]),
|
|
43
|
-
[r, t]
|
|
44
|
-
);
|
|
45
|
-
return /* @__PURE__ */ h(
|
|
46
|
-
f,
|
|
47
|
-
{
|
|
48
|
-
type: e,
|
|
49
|
-
href: u,
|
|
50
|
-
onClick: _,
|
|
51
|
-
disabled: s,
|
|
52
|
-
className: b,
|
|
53
|
-
ref: y,
|
|
54
|
-
...g ?? {},
|
|
55
|
-
children: n ? /* @__PURE__ */ l("div", { className: o["button__loading-container"], children: [
|
|
56
|
-
/* @__PURE__ */ h(x, { ...i }),
|
|
57
|
-
a
|
|
58
|
-
] }) : a
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
});
|
|
62
|
-
export {
|
|
63
|
-
P as Button,
|
|
64
|
-
P as default
|
|
65
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<import('./Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
tags: string[];
|
|
7
|
-
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
8
|
-
link: string;
|
|
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
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export default meta;
|
|
60
|
-
type Story = StoryObj<typeof meta>;
|
|
61
|
-
export declare const Simple: Story;
|
|
62
|
-
export declare const Link: Story;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type CheckboxTheme = 'light' | 'accent';
|
|
4
|
-
type CheckboxSizes = 'small' | 'normal';
|
|
5
|
-
type CheckboxProps = {
|
|
6
|
-
/** Space separated list of CSS classes to apply */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** ID that tests can use to get this component from the DOM */
|
|
9
|
-
'data-testid'?: string;
|
|
10
|
-
/** Checkbox label */
|
|
11
|
-
label?: ReactNode;
|
|
12
|
-
/** Checkbox theme */
|
|
13
|
-
theme?: CheckboxTheme;
|
|
14
|
-
/** Checkbox size */
|
|
15
|
-
size?: CheckboxSizes;
|
|
16
|
-
/** Checkbox size */
|
|
17
|
-
checked?: boolean;
|
|
18
|
-
/** Indeterminate state */
|
|
19
|
-
isIndeterminate?: boolean;
|
|
20
|
-
/** Name */
|
|
21
|
-
name?: string;
|
|
22
|
-
/** Functionality to perform when the checkbox value change */
|
|
23
|
-
onChange: (checked: boolean) => void;
|
|
24
|
-
/** Checkbox label */
|
|
25
|
-
children?: ReactNode;
|
|
26
|
-
/** Set the highlight of the label */
|
|
27
|
-
highlightLabel?: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
31
|
-
* Checkboxes can be used to turn an option on or off.
|
|
32
|
-
*/
|
|
33
|
-
declare const Checkbox: ({ className, label, name, theme, size, checked, onChange, isIndeterminate, highlightLabel, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export { Checkbox };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import '../../assets/Checkbox.css';
|
|
2
|
-
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
|
3
|
-
import * as o from "react";
|
|
4
|
-
import { useState as k, useEffect as i } from "react";
|
|
5
|
-
import { c as s } from "../../clsx-DB4S2d7J.js";
|
|
6
|
-
const N = (a) => /* @__PURE__ */ o.createElement("svg", { width: 14, height: 10, viewBox: "0 0 14 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ o.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" })), z = "_label_18hen_64", E = "_checkmark_18hen_93", e = {
|
|
7
|
-
"u-typography-h1": "_u-typography-h1_18hen_1",
|
|
8
|
-
"u-typography-h2": "_u-typography-h2_18hen_8",
|
|
9
|
-
"u-typography-h3": "_u-typography-h3_18hen_15",
|
|
10
|
-
"u-typography-h4": "_u-typography-h4_18hen_22",
|
|
11
|
-
"u-typography-h5": "_u-typography-h5_18hen_29",
|
|
12
|
-
"u-typography-h6": "_u-typography-h6_18hen_36",
|
|
13
|
-
"u-typography-base": "_u-typography-base_18hen_43",
|
|
14
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_18hen_48",
|
|
15
|
-
"u-typography-base--xl": "_u-typography-base--xl_18hen_52",
|
|
16
|
-
"u-typography-base--lg": "_u-typography-base--lg_18hen_56",
|
|
17
|
-
"u-typography-base--sm": "_u-typography-base--sm_18hen_60",
|
|
18
|
-
"u-typography-base--bold": "_u-typography-base--bold_18hen_64",
|
|
19
|
-
"checkbox-wrapper": "_checkbox-wrapper_18hen_64",
|
|
20
|
-
"label--highlighted": "_label--highlighted_18hen_64",
|
|
21
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_18hen_67",
|
|
22
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_18hen_70",
|
|
23
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_18hen_73",
|
|
24
|
-
label: z,
|
|
25
|
-
"label--highlighted-checked": "_label--highlighted-checked_18hen_90",
|
|
26
|
-
checkmark: E,
|
|
27
|
-
"checkmark--checked": "_checkmark--checked_18hen_105",
|
|
28
|
-
"checkmark--light-theme": "_checkmark--light-theme_18hen_108",
|
|
29
|
-
"checkmark--accent-theme": "_checkmark--accent-theme_18hen_115",
|
|
30
|
-
"checkmark--small-size": "_checkmark--small-size_18hen_122",
|
|
31
|
-
"checkmark--normal-size": "_checkmark--normal-size_18hen_129"
|
|
32
|
-
}, F = (a) => /* @__PURE__ */ o.createElement("svg", { width: 10, height: 3, viewBox: "0 0 10 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ o.createElement("rect", { y: 0.5, width: 10, height: 2, rx: 1, fill: "#1897F3" })), M = ({
|
|
33
|
-
className: a,
|
|
34
|
-
label: n,
|
|
35
|
-
name: m,
|
|
36
|
-
theme: u = "accent",
|
|
37
|
-
size: b = "normal",
|
|
38
|
-
checked: r,
|
|
39
|
-
onChange: d,
|
|
40
|
-
isIndeterminate: l,
|
|
41
|
-
highlightLabel: x = !1,
|
|
42
|
-
...p
|
|
43
|
-
}) => {
|
|
44
|
-
const [h, g] = k(r), [t, y] = k(l);
|
|
45
|
-
i(() => {
|
|
46
|
-
r !== h && g(r);
|
|
47
|
-
}, [r]), i(() => {
|
|
48
|
-
typeof l == "boolean" && y(l);
|
|
49
|
-
}, [l]);
|
|
50
|
-
const C = s(e["checkbox-wrapper"], a), f = s(
|
|
51
|
-
e.checkmark,
|
|
52
|
-
e[`checkmark--${u}-theme`],
|
|
53
|
-
e[`checkmark--${b}-size`],
|
|
54
|
-
(h || t) && e["checkmark--checked"]
|
|
55
|
-
), w = x && (p.children || n) ? s(
|
|
56
|
-
e.label,
|
|
57
|
-
e["label--highlighted"],
|
|
58
|
-
(h || t) && e["label--highlighted-checked"]
|
|
59
|
-
) : e.label;
|
|
60
|
-
return /* @__PURE__ */ v("div", { className: C, onClick: () => {
|
|
61
|
-
let _ = !h;
|
|
62
|
-
t && (y(!1), _ = !0), d(_), g(_);
|
|
63
|
-
}, ...p, children: [
|
|
64
|
-
/* @__PURE__ */ c("input", { name: m, type: "checkbox", checked: !t && h, readOnly: !0 }),
|
|
65
|
-
/* @__PURE__ */ c("span", { className: f, children: t ? /* @__PURE__ */ c(F, {}) : h && /* @__PURE__ */ c(N, {}) }),
|
|
66
|
-
/* @__PURE__ */ c("label", { className: w, children: p.children || n })
|
|
67
|
-
] });
|
|
68
|
-
};
|
|
69
|
-
export {
|
|
70
|
-
M as Checkbox
|
|
71
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ className, label, name, theme, size, checked, onChange, isIndeterminate, highlightLabel, ...rest }: {
|
|
6
|
-
className?: string | undefined;
|
|
7
|
-
'data-testid'?: string | undefined;
|
|
8
|
-
label?: import('react').ReactNode;
|
|
9
|
-
theme?: ("light" | "accent") | undefined;
|
|
10
|
-
size?: ("small" | "normal") | undefined;
|
|
11
|
-
checked?: boolean | undefined;
|
|
12
|
-
isIndeterminate?: boolean | undefined;
|
|
13
|
-
name?: string | undefined;
|
|
14
|
-
onChange: (checked: boolean) => void;
|
|
15
|
-
children?: import('react').ReactNode;
|
|
16
|
-
highlightLabel?: boolean | undefined;
|
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
tags: string[];
|
|
19
|
-
parameters: {
|
|
20
|
-
layout: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default meta;
|
|
24
|
-
type Story = StoryObj<typeof meta>;
|
|
25
|
-
export declare const Default: Story;
|
|
26
|
-
export declare const DefaultWithLabel: Story;
|
|
27
|
-
export declare const LightTheme: Story;
|
|
28
|
-
export declare const LightThemeIndeterminate: Story;
|
|
29
|
-
export declare const LabelAsChildren: Story;
|
|
30
|
-
export declare const HighlightLabel: Story;
|
|
31
|
-
export declare const SmallSize: Story;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { IconFamilies, IconProps } from '../../main';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
export type Variant = 'default' | 'contained' | 'outlined';
|
|
5
|
-
type ChipProps = {
|
|
6
|
-
/** Main content to display, typically just some text */
|
|
7
|
-
label: ReactNode;
|
|
8
|
-
/** Whether to show loading state (skeleton) */
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
/** Left icon to display */
|
|
11
|
-
leftAdornment?: ChipAdornmentSlotProps;
|
|
12
|
-
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the chip wrapper */
|
|
13
|
-
'data-testid'?: string;
|
|
14
|
-
/** Functionality to perform when the main body of the chip is clicked */
|
|
15
|
-
onClickContent?: () => void;
|
|
16
|
-
/** If present an 'x' icon will be on the right side of the button when clicked whatever functionality is passed to
|
|
17
|
-
* this will be executed */
|
|
18
|
-
onClickRemove?: () => void;
|
|
19
|
-
/** Whether to show the button in a disabled state, user will be unable to interact with the chip */
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
/** Any additional classes to apply to the Chip wrapper */
|
|
22
|
-
className?: string;
|
|
23
|
-
/** Any additional classes to apply to the chip skeleton */
|
|
24
|
-
'className-skeleton'?: string;
|
|
25
|
-
/** Which style of chip to show */
|
|
26
|
-
variant?: Variant;
|
|
27
|
-
/** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
|
|
28
|
-
'data-testid-skeleton'?: string;
|
|
29
|
-
};
|
|
30
|
-
export type ChipAdornmentSlotProps = {
|
|
31
|
-
/** The Marola Icon to display */
|
|
32
|
-
icon: ReactElement<IconProps<IconFamilies>>;
|
|
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
|
-
export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<unknown>>;
|
|
39
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import "../Icon/Icon.js";
|
|
5
|
-
import "../Button/Button.js";
|
|
6
|
-
import { C as j } from "../../Toggle-BXcLAMNy.js";
|
|
7
|
-
import "../Dialog/Backdrop.js";
|
|
8
|
-
import "../Typography/Typography.js";
|
|
9
|
-
import "../IconButton/IconButton.js";
|
|
10
|
-
import "../Select/Select.js";
|
|
11
|
-
import "../Skeleton/Skeleton.js";
|
|
12
|
-
import "../Table/Table.js";
|
|
13
|
-
import "../Tabs/Tabs.js";
|
|
14
|
-
import "../../Group-B3p31ftp.js";
|
|
15
|
-
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
-
import "../../Button-2b1peDFT.js";
|
|
17
|
-
export {
|
|
18
|
-
j as Chip
|
|
19
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<{
|
|
6
|
-
label: import('react').ReactNode;
|
|
7
|
-
loading?: boolean | undefined;
|
|
8
|
-
leftAdornment?: import('./Chip').ChipAdornmentSlotProps | undefined;
|
|
9
|
-
'data-testid'?: string | undefined;
|
|
10
|
-
onClickContent?: (() => void) | undefined;
|
|
11
|
-
onClickRemove?: (() => void) | undefined;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
|
-
className?: string | undefined;
|
|
14
|
-
'className-skeleton'?: string | undefined;
|
|
15
|
-
variant?: import('./Chip').Variant | undefined;
|
|
16
|
-
'data-testid-skeleton'?: string | undefined;
|
|
17
|
-
} & import('react').RefAttributes<unknown>>;
|
|
18
|
-
tags: string[];
|
|
19
|
-
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
20
|
-
label: import('react').ReactNode;
|
|
21
|
-
loading?: boolean | undefined;
|
|
22
|
-
leftAdornment?: import('./Chip').ChipAdornmentSlotProps | undefined;
|
|
23
|
-
'data-testid'?: string | undefined;
|
|
24
|
-
onClickContent?: (() => void) | undefined;
|
|
25
|
-
onClickRemove?: (() => void) | undefined;
|
|
26
|
-
disabled?: boolean | undefined;
|
|
27
|
-
className?: string | undefined;
|
|
28
|
-
'className-skeleton'?: string | undefined;
|
|
29
|
-
variant?: import('./Chip').Variant | undefined;
|
|
30
|
-
'data-testid-skeleton'?: string | undefined;
|
|
31
|
-
ref?: import('react').LegacyRef<unknown> | undefined;
|
|
32
|
-
key?: import('react').Key | null | undefined;
|
|
33
|
-
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
34
|
-
};
|
|
35
|
-
export default meta;
|
|
36
|
-
type Story = StoryObj<typeof meta>;
|
|
37
|
-
export declare const Simple: Story;
|
|
38
|
-
export declare const Clickable: Story;
|
|
39
|
-
export declare const ClickableWithRemove: Story;
|
|
40
|
-
export declare const FullDefault: Story;
|
|
41
|
-
export declare const FullOutlined: Story;
|
|
42
|
-
export declare const FullContained: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|