@pismo/marola 0.0.1-alpha.6 → 0.0.1-alpha.8
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-W6tM-_IT.js → Button-B1umG8kJ.js} +2 -2
- package/dist/ClickAwayListener-BKznXF1d.js +106 -0
- package/dist/Portal-BcdMtRGF.js +73 -0
- package/dist/Tab-CRwnhsj5.js +254 -0
- package/dist/Tabs.module-yYcTJnj6.js +103 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/InputSearch.css +1 -0
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Snackbar.css +1 -0
- package/dist/assets/Toggle.css +1 -0
- package/dist/assets/global.css +1 -1
- package/dist/components/Advice/Advice.d.ts +6 -3
- package/dist/components/Advice/Advice.js +15 -15
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.stories.d.ts +60 -0
- package/dist/components/Button/Button.stories.js +40 -0
- package/dist/components/Dialog/CloseIconButton.js +9 -9
- package/dist/components/Dialog/Dialog.d.ts +3 -2
- package/dist/components/Dialog/Dialog.js +10 -9
- package/dist/components/Dialog/Dialog.stories.d.ts +343 -0
- package/dist/components/Dialog/Dialog.stories.js +59 -0
- package/dist/components/Icon/Icon.d.ts +15 -4
- package/dist/components/Icon/Icon.js +92 -6
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.d.ts +44 -0
- package/dist/components/Input/Input.js +497 -0
- package/dist/components/Input/Input.stories.d.ts +43 -0
- package/dist/components/Input/Input.stories.js +106 -0
- package/dist/components/InputSearch/InputSearch.d.ts +11 -0
- package/dist/components/InputSearch/InputSearch.js +29 -0
- package/dist/components/InputSearch/InputSearch.stories.d.ts +22 -0
- package/dist/components/InputSearch/InputSearch.stories.js +36 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +14 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +38 -0
- package/dist/components/PageHeader/PageHeader.js +25 -25
- package/dist/components/PageHeader/PageHeader.stories.js +3 -3
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.js +10 -10
- package/dist/components/Snackbar/Snackbar.d.ts +13 -0
- package/dist/components/Snackbar/Snackbar.js +622 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +1 -1
- package/dist/components/SortTooltip/SortTooltip.js +8 -8
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +15 -15
- package/dist/components/Tabs/Tab.js +6 -239
- package/dist/components/Tabs/TabPanel.js +18 -19
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.js +12 -8
- package/dist/components/Toggle/Toggle.d.ts +12 -0
- package/dist/components/Toggle/Toggle.js +251 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +22 -0
- package/dist/components/Toggle/Toggle.stories.js +27 -0
- package/dist/components/Tooltip/Tooltip.js +558 -655
- package/dist/components/Typography/Typography.d.ts +5 -5
- package/dist/components/Typography/Typography.stories.d.ts +13 -0
- package/dist/components/Typography/Typography.stories.js +15 -15
- package/dist/components/Typography/typography.test.js +5 -8
- package/dist/{Portal-P3fPvS3-.js → index-BNWbc5Kh.js} +5709 -5776
- package/dist/{index-D2P7y2mE.js → index-CqjC7P5Y.js} +4 -3
- package/dist/main.d.ts +17 -8
- package/dist/main.js +55 -28
- package/dist/useButton-Bc8IAgyk.js +106 -0
- package/dist/useIsFocusVisible-BH4IAdcw.js +69 -0
- package/dist/useTimeout-DxF9kiZL.js +36 -0
- package/package.json +5 -4
- package/dist/ListContext-Dj2Va7Iv.js +0 -18
- package/dist/Tabs.module-BA-PC7fA.js +0 -66
- package/dist/react-CGNQ6M5x.js +0 -117
- package/dist/useButton-JpyBo5M4.js +0 -187
- package/dist/useCompoundItem-CTYi5M_E.js +0 -41
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
classNameWrapper?: string | undefined;
|
|
9
|
+
classNameInputSearch?: string | undefined;
|
|
10
|
+
'data-testid'?: string | undefined;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
tags: string[];
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Simple: Story;
|
|
20
|
+
export declare const WithLabel: Story;
|
|
21
|
+
export declare const WithPlaceholder: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InputSearch as a } from "./InputSearch.js";
|
|
2
|
+
const l = {
|
|
3
|
+
title: "Components/InputSearch",
|
|
4
|
+
component: a,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "padded"
|
|
8
|
+
}
|
|
9
|
+
}, r = {
|
|
10
|
+
args: {}
|
|
11
|
+
}, t = {
|
|
12
|
+
name: "With label",
|
|
13
|
+
args: {
|
|
14
|
+
label: "Search by name or id"
|
|
15
|
+
}
|
|
16
|
+
}, o = {
|
|
17
|
+
name: "With placeholder",
|
|
18
|
+
args: {
|
|
19
|
+
label: "Search",
|
|
20
|
+
placeholder: "Search by name or id"
|
|
21
|
+
}
|
|
22
|
+
}, c = {
|
|
23
|
+
args: {
|
|
24
|
+
label: "Search",
|
|
25
|
+
placeholder: "Search by name or id",
|
|
26
|
+
value: "Marola DS",
|
|
27
|
+
disabled: !0
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
c as Disabled,
|
|
32
|
+
r as Simple,
|
|
33
|
+
t as WithLabel,
|
|
34
|
+
o as WithPlaceholder,
|
|
35
|
+
l as default
|
|
36
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface LoadingSpinnerProps {
|
|
2
|
+
/** Whether to invert colours or not */
|
|
2
3
|
invert?: boolean;
|
|
4
|
+
/** Space seperated list of CSS classes to apply */
|
|
3
5
|
classNames?: string;
|
|
4
6
|
}
|
|
5
7
|
export declare const LoadingSpinner: ({ invert, classNames }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ invert, classNames }: import('./LoadingSpinner').LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
8
|
+
invert?: boolean | undefined;
|
|
9
|
+
classNames?: string | undefined;
|
|
10
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Simple: Story;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import '../../assets/global.css';
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "../Button/Button.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../Dialog/Backdrop.js";
|
|
7
|
+
import "../Typography/Typography.js";
|
|
8
|
+
import "../IconButton/IconButton.js";
|
|
9
|
+
import { LoadingSpinner as i } from "./LoadingSpinner.js";
|
|
10
|
+
import "../Table/Table.js";
|
|
11
|
+
import "../Tabs/Tabs.js";
|
|
12
|
+
const g = {
|
|
13
|
+
title: "Components/LoadingSpinner",
|
|
14
|
+
component: i,
|
|
15
|
+
tags: ["autodocs"],
|
|
16
|
+
decorators: [
|
|
17
|
+
(o) => /* @__PURE__ */ t(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
style: {
|
|
21
|
+
backgroundColor: "#423755",
|
|
22
|
+
width: "5em",
|
|
23
|
+
height: "5em",
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
alignItems: "center"
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ t(o, {})
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
]
|
|
32
|
+
}, f = {
|
|
33
|
+
args: {}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
f as Simple,
|
|
37
|
+
g as default
|
|
38
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import '../../assets/PageHeader.css';
|
|
2
2
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
4
|
import * as _ from "react";
|
|
5
|
-
const
|
|
5
|
+
const z = (n) => /* @__PURE__ */ _.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/solid/arrow-left", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
6
6
|
fill: "currentcolor",
|
|
7
7
|
color: "currentcolor",
|
|
8
8
|
width: "1em",
|
|
9
9
|
height: "1em"
|
|
10
|
-
}, ...
|
|
11
|
-
"page-header": "_page-
|
|
12
|
-
"page-header__top-content": "_page-header__top-
|
|
13
|
-
"page-header__main-content": "_page-header__main-
|
|
14
|
-
"page-header__bottom-content": "_page-header__bottom-
|
|
15
|
-
"page-header__main-left-content": "_page-header__main-left-
|
|
16
|
-
title:
|
|
17
|
-
subtitle:
|
|
18
|
-
"page-header__main-right-content": "_page-header__main-right-
|
|
19
|
-
},
|
|
20
|
-
title:
|
|
10
|
+
}, ...n }, /* @__PURE__ */ _.createElement("path", { d: "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z" })), b = "_title_157kz_45", k = "_subtitle_157kz_46", e = {
|
|
11
|
+
"page-header": "_page-header_157kz_1",
|
|
12
|
+
"page-header__top-content": "_page-header__top-content_157kz_9",
|
|
13
|
+
"page-header__main-content": "_page-header__main-content_157kz_12",
|
|
14
|
+
"page-header__bottom-content": "_page-header__bottom-content_157kz_12",
|
|
15
|
+
"page-header__main-left-content": "_page-header__main-left-content_157kz_39",
|
|
16
|
+
title: b,
|
|
17
|
+
subtitle: k,
|
|
18
|
+
"page-header__main-right-content": "_page-header__main-right-content_157kz_63"
|
|
19
|
+
}, C = ({
|
|
20
|
+
title: n,
|
|
21
21
|
subtitle: d,
|
|
22
|
-
backLinkText:
|
|
22
|
+
backLinkText: c,
|
|
23
23
|
onBackLinkClick: s,
|
|
24
24
|
rightChildren: i,
|
|
25
25
|
bottomChildren: o,
|
|
@@ -28,24 +28,24 @@ const w = (c) => /* @__PURE__ */ _.createElement("svg", { xmlns: "http://www.w3.
|
|
|
28
28
|
classNameTitle: m,
|
|
29
29
|
classNameSubtitle: p,
|
|
30
30
|
"data-testid-wrapper": g,
|
|
31
|
-
"data-testid-backLink":
|
|
32
|
-
"data-testid-title":
|
|
33
|
-
"data-testid-subtitle":
|
|
34
|
-
...
|
|
35
|
-
}) => /* @__PURE__ */ a("div", { className:
|
|
36
|
-
|
|
37
|
-
/* @__PURE__ */ t(
|
|
38
|
-
|
|
31
|
+
"data-testid-backLink": f,
|
|
32
|
+
"data-testid-title": u,
|
|
33
|
+
"data-testid-subtitle": v,
|
|
34
|
+
...w
|
|
35
|
+
}) => /* @__PURE__ */ a("div", { className: r([e["page-header"], l]), "data-testid": g, ...w, children: [
|
|
36
|
+
c && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ a("button", { type: "button", onClick: s, className: h, "data-testid": f, children: [
|
|
37
|
+
/* @__PURE__ */ t(z, { fontSize: 16 }),
|
|
38
|
+
c
|
|
39
39
|
] }) }),
|
|
40
40
|
/* @__PURE__ */ a("div", { className: e["page-header__main-content"], children: [
|
|
41
41
|
/* @__PURE__ */ a("div", { className: e["page-header__main-left-content"], children: [
|
|
42
|
-
/* @__PURE__ */ t("h1", { className:
|
|
43
|
-
/* @__PURE__ */ t("h2", { className:
|
|
42
|
+
/* @__PURE__ */ t("h1", { className: r(e.title, m), "data-testid": u, children: n }),
|
|
43
|
+
/* @__PURE__ */ t("h2", { className: r(e.subtitle, p), "data-testid": v, children: d })
|
|
44
44
|
] }),
|
|
45
45
|
i && /* @__PURE__ */ t("div", { className: e["page-header__main-right-content"], children: i })
|
|
46
46
|
] }),
|
|
47
47
|
o && /* @__PURE__ */ t("div", { className: e["page-header__bottom-content"], children: o })
|
|
48
48
|
] });
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
C as PageHeader
|
|
51
51
|
};
|
|
@@ -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 { T as e } from "../../Tab-CRwnhsj5.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
|
+
}, T = {
|
|
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
|
+
T as WithBottomChildren,
|
|
47
47
|
u as WithRightChildren,
|
|
48
48
|
g as default
|
|
49
49
|
};
|
|
@@ -29,7 +29,7 @@ export type PaginationProps = {
|
|
|
29
29
|
language?: PaginationLanguages;
|
|
30
30
|
t?: PaginationTranslations;
|
|
31
31
|
} & PaginationParams & PaginationCommonProps;
|
|
32
|
-
export declare const
|
|
32
|
+
export declare const paginationDefaultTranslations: {
|
|
33
33
|
[key in PaginationLanguages]: PaginationTranslations;
|
|
34
34
|
};
|
|
35
35
|
export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../assets/Pagination.css';
|
|
2
2
|
import { jsxs as x, jsx as i, Fragment as M } from "react/jsx-runtime";
|
|
3
3
|
import { c as C } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
4
|
+
import { _ as O, a as S } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
|
|
5
|
+
import { u as A } from "../../useControlled-CCMYYdCM.js";
|
|
6
6
|
const E = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
|
|
7
7
|
function $(e = {}) {
|
|
8
8
|
const {
|
|
@@ -18,7 +18,7 @@ function $(e = {}) {
|
|
|
18
18
|
showFirstButton: p = !1,
|
|
19
19
|
showLastButton: f = !1,
|
|
20
20
|
siblingCount: u = 1
|
|
21
|
-
} = e, d =
|
|
21
|
+
} = e, d = O(e, E), [r, k] = A({
|
|
22
22
|
controlled: o,
|
|
23
23
|
default: b,
|
|
24
24
|
name: _,
|
|
@@ -26,10 +26,10 @@ function $(e = {}) {
|
|
|
26
26
|
}), N = (n, l) => {
|
|
27
27
|
o || k(l), t && t(n, l);
|
|
28
28
|
}, v = (n, l) => {
|
|
29
|
-
const
|
|
29
|
+
const F = l - n + 1;
|
|
30
30
|
return Array.from({
|
|
31
|
-
length:
|
|
32
|
-
}, (W,
|
|
31
|
+
length: F
|
|
32
|
+
}, (W, I) => n + I);
|
|
33
33
|
}, j = v(1, Math.min(a, s)), P = v(Math.max(s - a + 1, a + 1), s), w = Math.max(
|
|
34
34
|
Math.min(
|
|
35
35
|
// Natural start
|
|
@@ -76,7 +76,7 @@ function $(e = {}) {
|
|
|
76
76
|
default:
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
|
-
},
|
|
79
|
+
}, D = L.map((n) => typeof n == "number" ? {
|
|
80
80
|
onClick: (l) => {
|
|
81
81
|
N(l, n);
|
|
82
82
|
},
|
|
@@ -94,8 +94,8 @@ function $(e = {}) {
|
|
|
94
94
|
selected: !1,
|
|
95
95
|
disabled: h || n.indexOf("ellipsis") === -1 && (n === "next" || n === "last" ? r >= s : r <= 1)
|
|
96
96
|
});
|
|
97
|
-
return
|
|
98
|
-
items:
|
|
97
|
+
return S({
|
|
98
|
+
items: D
|
|
99
99
|
}, d);
|
|
100
100
|
}
|
|
101
101
|
const R = "_pagination_9gf1w_1", g = {
|
|
@@ -215,5 +215,5 @@ const R = "_pagination_9gf1w_1", g = {
|
|
|
215
215
|
};
|
|
216
216
|
export {
|
|
217
217
|
J as Pagination,
|
|
218
|
-
T as
|
|
218
|
+
T as paginationDefaultTranslations
|
|
219
219
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
type SnackbarProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
'data-testid'?: string;
|
|
6
|
+
classNameWrapper?: string;
|
|
7
|
+
color?: 'success' | 'error' | 'attention';
|
|
8
|
+
snackbarMessage: string;
|
|
9
|
+
autoHideDuration?: number;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const Snackbar: ({ snackbarMessage, color, autoHideDuration, open, onClose, classNameWrapper, "data-testid": dataTestId, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|