@pismo/marola 0.0.1-alpha.11 → 0.0.1-alpha.13
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 +1 -1
- package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-HI1G6ob9.js} +2 -1
- package/dist/Popup-DFJQc_jn.js +1249 -0
- package/dist/{Portal-BcdMtRGF.js → Portal-D__zvwbZ.js} +1 -1
- package/dist/SelectButton-DWtqAiwt.js +45 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Chip.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/combineHooksSlotProps-BHqhiBfc.js +81 -0
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +87 -63
- package/dist/components/Button/Button.stories.d.ts +2 -0
- package/dist/components/Button/Button.stories.js +8 -8
- package/dist/components/Chip/Chip.d.ts +37 -0
- package/dist/components/Chip/Chip.js +143 -0
- package/dist/components/Chip/Chip.stories.d.ts +40 -0
- package/dist/components/Chip/Chip.stories.js +59 -0
- package/dist/components/Chip/chip.test.d.ts +1 -0
- package/dist/components/Chip/chip.test.js +17303 -0
- package/dist/components/Dialog/Dialog.js +13 -12
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Dialog/Dialog.stories.js +9 -9
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +27 -20
- package/dist/components/IconButton/IconButton.d.ts +2 -2
- package/dist/components/IconButton/IconButton.js +63 -61
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +32 -32
- package/dist/components/InputSearch/InputSearch.d.ts +7 -9
- package/dist/components/InputSearch/InputSearch.js +31 -26
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
- package/dist/components/InputSearch/InputSearch.stories.js +55 -18
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +6 -6
- package/dist/components/PageHeader/PageHeader.stories.js +3 -3
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/Select.js +860 -0
- package/dist/components/Select/Select.stories.d.ts +31 -0
- package/dist/components/Select/Select.stories.js +65 -0
- package/dist/components/Select/SelectButton.d.ts +13 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Snackbar/Snackbar.js +5 -4
- package/dist/components/Tabs/Tab.js +180 -6
- package/dist/components/Tabs/TabPanel.js +19 -18
- package/dist/components/Tabs/Tabs.js +237 -662
- package/dist/components/Tooltip/Tooltip.js +89 -1328
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +76 -74
- package/dist/components/Typography/Typography.stories.js +6 -6
- package/dist/components/Typography/typography.test.js +196 -11319
- package/dist/{index-BNWbc5Kh.js → index-BJ8HbRCy.js} +3109 -3152
- package/dist/main.d.ts +2 -0
- package/dist/main.js +57 -54
- package/dist/react.esm-DGd9_oKA.js +11126 -0
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-vAfOD-oT.js +45 -0
- package/dist/useList-ByMguSS_.js +437 -0
- package/dist/utils/styleStrings.test.js +1 -1
- package/dist/{vi.Y_w82WR8-Df0JUamG.js → vi.Y_w82WR8-XVYrIxgm.js} +2 -1
- package/package.json +1 -1
- package/dist/Tab-CRwnhsj5.js +0 -254
- package/dist/Tabs.module-yYcTJnj6.js +0 -103
- package/dist/assets/global.css +0 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Input } from '../Input/Input';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
2
3
|
|
|
3
|
-
type InputSearchProps =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'data-testid'?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const InputSearch: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type InputSearchProps = {
|
|
5
|
+
/** How many milliseconds to wait before trigger the onChange event */
|
|
6
|
+
triggerDelay?: number;
|
|
7
|
+
} & ComponentProps<typeof Input>;
|
|
8
|
+
export declare const InputSearch: ({ classNameWrapper, triggerDelay, value, onChange, ...rest }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
export {};
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
import '../../assets/InputSearch.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Input as
|
|
6
|
-
const
|
|
7
|
-
inputSearch:
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
classNameWrapper:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Icon as u } from "../Icon/Icon.js";
|
|
5
|
+
import { Input as p } from "../Input/Input.js";
|
|
6
|
+
const l = "_inputSearch_lmxu2_1", h = {
|
|
7
|
+
inputSearch: l
|
|
8
|
+
};
|
|
9
|
+
let n;
|
|
10
|
+
const x = ({
|
|
11
|
+
classNameWrapper: r,
|
|
12
|
+
triggerDelay: o = 500,
|
|
13
|
+
value: c,
|
|
14
|
+
onChange: i = () => {
|
|
15
|
+
},
|
|
16
|
+
...a
|
|
17
|
+
}) => {
|
|
18
|
+
const s = (t) => {
|
|
19
|
+
n && clearTimeout(n), n = setTimeout(() => i(t), o);
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ e("div", { className: m(h.inputSearch, r), children: /* @__PURE__ */ e(
|
|
22
|
+
p,
|
|
23
|
+
{
|
|
24
|
+
type: "search",
|
|
25
|
+
...a,
|
|
26
|
+
leftIcon: /* @__PURE__ */ e(u, { icon: "magnifying-glass" }),
|
|
27
|
+
defaultValue: c,
|
|
28
|
+
onChange: (t) => s(t)
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
};
|
|
27
32
|
export {
|
|
28
|
-
|
|
33
|
+
x as InputSearch
|
|
29
34
|
};
|
|
@@ -2,12 +2,28 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({
|
|
5
|
+
component: ({ classNameWrapper, triggerDelay, value, onChange, ...rest }: {
|
|
6
|
+
triggerDelay?: number | undefined;
|
|
7
|
+
} & import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
6
8
|
label?: string | undefined;
|
|
7
|
-
|
|
9
|
+
infoMessage?: string | undefined;
|
|
10
|
+
errorMessage?: string | undefined;
|
|
11
|
+
leftIcon?: import('react').ReactNode;
|
|
12
|
+
rightIcon?: import('react').ReactNode;
|
|
13
|
+
type?: "search" | "text" | "password" | undefined;
|
|
14
|
+
hideCharsCounter?: boolean | undefined;
|
|
8
15
|
classNameWrapper?: string | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
classNameLabel?: string | undefined;
|
|
17
|
+
classNameInput?: string | undefined;
|
|
18
|
+
classNameInfoMessage?: string | undefined;
|
|
19
|
+
classNameErrorMessage?: string | undefined;
|
|
20
|
+
classNameCharsCounter?: string | undefined;
|
|
21
|
+
'data-testid-wrapper'?: string | undefined;
|
|
22
|
+
'data-testid-label'?: string | undefined;
|
|
23
|
+
'data-testid-input'?: string | undefined;
|
|
24
|
+
'data-testid-infoMessage'?: string | undefined;
|
|
25
|
+
'data-testid-errorMessage'?: string | undefined;
|
|
26
|
+
'data-testid-charsCounter'?: string | undefined;
|
|
11
27
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
28
|
tags: string[];
|
|
13
29
|
parameters: {
|
|
@@ -18,5 +34,6 @@ export default meta;
|
|
|
18
34
|
type Story = StoryObj<typeof meta>;
|
|
19
35
|
export declare const Simple: Story;
|
|
20
36
|
export declare const WithLabel: Story;
|
|
37
|
+
export declare const WithCustomDelay: Story;
|
|
21
38
|
export declare const WithPlaceholder: Story;
|
|
22
39
|
export declare const Disabled: Story;
|
|
@@ -1,25 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useEffect as n } from "react";
|
|
3
|
+
import { InputSearch as t } from "./InputSearch.js";
|
|
4
|
+
const d = {
|
|
3
5
|
title: "Components/InputSearch",
|
|
4
|
-
component:
|
|
6
|
+
component: t,
|
|
5
7
|
tags: ["autodocs"],
|
|
6
8
|
parameters: {
|
|
7
9
|
layout: "padded"
|
|
8
10
|
}
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
}, h = {
|
|
12
|
+
render: () => {
|
|
13
|
+
const [e, a] = l(void 0);
|
|
14
|
+
return n(() => {
|
|
15
|
+
e !== void 0 && alert("Search triggered after 500 milliseconds");
|
|
16
|
+
}, [e]), /* @__PURE__ */ o(t, { value: e, onChange: (r) => a(r.target.value) });
|
|
17
|
+
}
|
|
18
|
+
}, m = {
|
|
12
19
|
name: "With label",
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
render: () => {
|
|
21
|
+
const [e, a] = l(void 0);
|
|
22
|
+
return n(() => {
|
|
23
|
+
e !== void 0 && alert("Search triggered after 500 milliseconds");
|
|
24
|
+
}, [e]), /* @__PURE__ */ o(t, { label: "Search by name or id", value: e, onChange: (r) => a(r.target.value) });
|
|
25
|
+
}
|
|
26
|
+
}, u = {
|
|
27
|
+
name: "With custom delay",
|
|
28
|
+
render: () => {
|
|
29
|
+
const [e, a] = l(void 0);
|
|
30
|
+
return n(() => {
|
|
31
|
+
e !== void 0 && alert("Search triggered after 2000 milliseconds");
|
|
32
|
+
}, [e]), /* @__PURE__ */ o(
|
|
33
|
+
t,
|
|
34
|
+
{
|
|
35
|
+
label: "Search by name or id",
|
|
36
|
+
value: e,
|
|
37
|
+
onChange: (r) => a(r.target.value),
|
|
38
|
+
triggerDelay: 2e3
|
|
39
|
+
}
|
|
40
|
+
);
|
|
15
41
|
}
|
|
16
|
-
},
|
|
42
|
+
}, g = {
|
|
17
43
|
name: "With placeholder",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
render: () => {
|
|
45
|
+
const [e, a] = l(void 0);
|
|
46
|
+
return n(() => {
|
|
47
|
+
e !== void 0 && alert("Search triggered after 500 milliseconds");
|
|
48
|
+
}, [e]), /* @__PURE__ */ o(
|
|
49
|
+
t,
|
|
50
|
+
{
|
|
51
|
+
label: "Search",
|
|
52
|
+
placeholder: "Search by name or id",
|
|
53
|
+
value: e,
|
|
54
|
+
onChange: (r) => a(r.target.value)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
21
57
|
}
|
|
22
|
-
},
|
|
58
|
+
}, S = {
|
|
23
59
|
args: {
|
|
24
60
|
label: "Search",
|
|
25
61
|
placeholder: "Search by name or id",
|
|
@@ -28,9 +64,10 @@ const l = {
|
|
|
28
64
|
}
|
|
29
65
|
};
|
|
30
66
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
67
|
+
S as Disabled,
|
|
68
|
+
h as Simple,
|
|
69
|
+
u as WithCustomDelay,
|
|
70
|
+
m as WithLabel,
|
|
71
|
+
g as WithPlaceholder,
|
|
72
|
+
d as default
|
|
36
73
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface LoadingSpinnerProps {
|
|
2
2
|
/** Whether to invert colours or not */
|
|
3
3
|
invert?: boolean;
|
|
4
|
-
/** Space
|
|
4
|
+
/** Space separated list of CSS classes to apply */
|
|
5
5
|
classNames?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const LoadingSpinner: ({ invert, classNames }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import '../../assets/global.css';
|
|
2
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
2
|
+
import "../Chip/Chip.js";
|
|
4
3
|
import "../Button/Button.js";
|
|
5
4
|
import "react";
|
|
6
5
|
import "../Dialog/Backdrop.js";
|
|
7
6
|
import "../Typography/Typography.js";
|
|
8
7
|
import "../IconButton/IconButton.js";
|
|
9
8
|
import { LoadingSpinner as i } from "./LoadingSpinner.js";
|
|
9
|
+
import "../Select/Select.js";
|
|
10
10
|
import "../Table/Table.js";
|
|
11
11
|
import "../Tabs/Tabs.js";
|
|
12
|
-
const
|
|
12
|
+
const f = {
|
|
13
13
|
title: "Components/LoadingSpinner",
|
|
14
14
|
component: i,
|
|
15
15
|
tags: ["autodocs"],
|
|
@@ -29,10 +29,10 @@ const g = {
|
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
]
|
|
32
|
-
},
|
|
32
|
+
}, h = {
|
|
33
33
|
args: {}
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
h as Simple,
|
|
37
|
+
f as default
|
|
38
38
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Button as r } from "../Button/Button.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Tab as e } from "../Tabs/Tab.js";
|
|
4
4
|
import { TabPanel as a } from "../Tabs/TabPanel.js";
|
|
5
5
|
import { Tabs as o } from "../Tabs/Tabs.js";
|
|
6
6
|
import { PageHeader as l } from "./PageHeader.js";
|
|
@@ -26,7 +26,7 @@ const g = {
|
|
|
26
26
|
...i.args,
|
|
27
27
|
rightChildren: /* @__PURE__ */ t(r, { variant: "quick", onClick: () => alert("button clicked"), children: "Click me!" })
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, p = {
|
|
30
30
|
name: "With bottom children",
|
|
31
31
|
args: {
|
|
32
32
|
...i.args,
|
|
@@ -43,7 +43,7 @@ const g = {
|
|
|
43
43
|
export {
|
|
44
44
|
c as Simple,
|
|
45
45
|
i as WithBackLink,
|
|
46
|
-
|
|
46
|
+
p as WithBottomChildren,
|
|
47
47
|
u as WithRightChildren,
|
|
48
48
|
g as default
|
|
49
49
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type SelectOptionProps = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
value: string | number;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
};
|
|
11
|
+
type SelectProps = {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
placeholder?: string | number;
|
|
15
|
+
ariaLabelledby?: string;
|
|
16
|
+
onChange?: (value: number | string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const Option: (props: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const Select: {
|
|
22
|
+
(props: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Option: (props: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
export { Select };
|