@pismo/marola 0.0.1-alpha.1 → 0.0.1-alpha.12
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 +17 -5
- package/dist/Button-B1umG8kJ.js +131 -0
- package/dist/ClickAwayListener-HI1G6ob9.js +107 -0
- package/dist/Dialog.module-CGVM5V_D.js +15 -0
- package/dist/Popup-DFJQc_jn.js +1249 -0
- package/dist/Portal-D__zvwbZ.js +73 -0
- package/dist/SelectButton-DWtqAiwt.js +45 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/_commonjsHelpers-CT_km90n.js +30 -0
- package/dist/assets/Advice.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/InputSearch.css +1 -0
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/PageHeader.css +1 -0
- package/dist/assets/Pagination.css +1 -0
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Skeleton.css +1 -0
- package/dist/assets/Snackbar.css +1 -0
- package/dist/assets/SortTooltip.css +1 -0
- package/dist/assets/Stepper.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/assets/Tabs.css +1 -0
- package/dist/assets/Toggle.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/global.css +1 -0
- package/dist/combineHooksSlotProps-BHqhiBfc.js +81 -0
- package/dist/components/Advice/Advice.d.ts +16 -0
- package/dist/components/Advice/Advice.js +25 -0
- package/dist/components/Button/Button.d.ts +29 -0
- package/dist/components/Button/Button.js +70 -0
- package/dist/components/Button/Button.stories.d.ts +60 -0
- package/dist/components/Button/Button.stories.js +41 -0
- package/dist/components/Checkbox/Checkbox.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.js +56 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +2 -9
- package/dist/components/Dialog/CloseIconButton.js +11 -10
- package/dist/components/Dialog/Dialog.d.ts +5 -4
- package/dist/components/Dialog/Dialog.js +420 -20077
- package/dist/components/Dialog/Dialog.stories.d.ts +343 -0
- package/dist/components/Dialog/Dialog.stories.js +60 -0
- package/dist/components/Dialog/Title.js +22 -7
- package/dist/components/Icon/Icon.d.ts +18 -0
- package/dist/components/Icon/Icon.js +95 -0
- package/dist/components/IconButton/IconButton.d.ts +22 -0
- package/dist/components/IconButton/IconButton.js +68 -0
- 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.js +12 -13
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +14 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +39 -0
- package/dist/components/PageHeader/PageHeader.d.ts +36 -0
- package/dist/components/PageHeader/PageHeader.js +51 -0
- package/dist/components/PageHeader/PageHeader.stories.d.ts +43 -0
- package/dist/components/PageHeader/PageHeader.stories.js +49 -0
- package/dist/components/Pagination/Pagination.d.ts +36 -0
- package/dist/components/Pagination/Pagination.js +219 -0
- 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 +66 -0
- package/dist/components/Select/SelectButton.d.ts +13 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Skeleton/Skeleton.d.ts +18 -0
- package/dist/components/Skeleton/Skeleton.js +26 -0
- package/dist/components/Snackbar/Snackbar.d.ts +13 -0
- package/dist/components/Snackbar/Snackbar.js +623 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +26 -0
- package/dist/components/SortTooltip/SortTooltip.js +67 -0
- package/dist/components/Stepper/Stepper.d.ts +16 -0
- package/dist/components/Stepper/Stepper.js +33 -0
- package/dist/components/Table/Table.d.ts +39 -0
- package/dist/components/Table/Table.js +122 -0
- package/dist/components/Table/TableContext.d.ts +19 -0
- package/dist/components/Table/TableContext.js +21 -0
- package/dist/components/Tabs/Tab.d.ts +9 -0
- package/dist/components/Tabs/Tab.js +182 -0
- package/dist/components/Tabs/TabPanel.d.ts +8 -0
- package/dist/components/Tabs/TabPanel.js +119 -0
- package/dist/components/Tabs/Tabs.d.ts +11 -0
- package/dist/components/Tabs/Tabs.js +402 -0
- package/dist/components/Toggle/Toggle.d.ts +11 -0
- package/dist/components/Toggle/Toggle.js +252 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +21 -0
- package/dist/components/Toggle/Toggle.stories.js +33 -0
- package/dist/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/components/Tooltip/Tooltip.js +127 -0
- package/dist/components/Typography/Typography.d.ts +15 -6
- package/dist/components/Typography/Typography.js +75 -67
- package/dist/components/Typography/Typography.stories.d.ts +31 -0
- package/dist/components/Typography/Typography.stories.js +31 -0
- package/dist/components/Typography/typography.test.d.ts +1 -0
- package/dist/components/Typography/typography.test.js +11358 -0
- package/dist/index-BJ8HbRCy.js +19585 -0
- package/dist/index-CqjC7P5Y.js +814 -0
- package/dist/magic-string.es-O_8lTkE3.js +738 -0
- package/dist/main.d.ts +19 -2
- package/dist/main.js +60 -15
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +26 -0
- package/dist/test-utils/assertStyles.d.ts +1 -0
- package/dist/test-utils/assertStyles.js +11 -0
- package/dist/types/helpers.d.ts +14 -7
- package/dist/useButton-Bc8IAgyk.js +106 -0
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useControlled-CCMYYdCM.js +31 -0
- package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
- package/dist/useEventCallback-vAfOD-oT.js +45 -0
- package/dist/useIsFocusVisible-BH4IAdcw.js +69 -0
- package/dist/useList-ByMguSS_.js +437 -0
- package/dist/useTimeout-DxF9kiZL.js +36 -0
- package/dist/utils/styleStrings.d.ts +6 -0
- package/dist/utils/styleStrings.js +10 -0
- package/dist/utils/styleStrings.test.d.ts +1 -0
- package/dist/utils/styleStrings.test.js +41 -0
- package/dist/vi.Y_w82WR8-Df0JUamG.js +9860 -0
- package/package.json +53 -10
- package/dist/Button-REznN-RP.js +0 -1139
- package/dist/Dialog.module-BO0mdB7d.js +0 -15
- package/dist/assets/CallToActionButton.css +0 -1
- package/dist/assets/main.css +0 -1
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -23
- package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
- package/src/playground/Playground.tsx +0 -58
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
(props: {
|
|
7
|
+
children: import('react').ReactNode;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
placeholder?: string | number | undefined;
|
|
10
|
+
ariaLabelledby?: string | undefined;
|
|
11
|
+
onChange?: ((value: string | number | null, event?: import('react').SyntheticEvent<Element, Event> | null | undefined) => void) | undefined;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
'data-testid'?: string | undefined;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
Option: (props: {
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
value: string | number;
|
|
18
|
+
children: import('react').ReactNode;
|
|
19
|
+
icon?: import('react').ReactNode;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
'data-testid'?: string | undefined;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
tags: string[];
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Simple: Story;
|
|
29
|
+
export declare const Disabled: Story;
|
|
30
|
+
export declare const WithPrefix: Story;
|
|
31
|
+
export declare const WithIcon: Story;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import '../../assets/global.css';
|
|
2
|
+
import { jsxs as l, Fragment as t, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "../Button/Button.js";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import "../Dialog/Backdrop.js";
|
|
7
|
+
import "../Typography/Typography.js";
|
|
8
|
+
import "../IconButton/IconButton.js";
|
|
9
|
+
import { Select as i } from "./Select.js";
|
|
10
|
+
import "../Table/Table.js";
|
|
11
|
+
import "../Tabs/Tabs.js";
|
|
12
|
+
const r = (o) => /* @__PURE__ */ n.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ n.createElement("path", { d: "M0.512792 11.6594C0.139667 11.2516 0.167167 10.6184 0.574323 10.2447C0.766229 10.0688 1.00839 9.98175 1.24964 9.98175C1.52063 9.98175 1.79026 10.0912 1.98745 10.3064L2.99998 11.4406V2.00094C2.99998 1.44781 3.44779 1 3.99998 1C4.55217 1 4.99998 1.44781 4.99998 2.00094V11.4384L6.01248 10.3325C6.38748 9.92812 7.01873 9.89687 7.42498 10.2719C7.83216 10.6453 7.85935 11.2787 7.48651 11.6866L4.76463 14.6894C4.38588 15.1037 3.66901 15.1037 3.28995 14.6894L0.512792 11.6594Z", fill: "#1897F3" }), /* @__PURE__ */ n.createElement("path", { opacity: 0.4, d: "M9.99998 3H11.5859L9.29279 5.29313C9.00666 5.57925 8.92123 6.00906 9.07598 6.38313C9.23073 6.75719 9.59566 7 9.99973 7H13.9716C14.5531 6.97188 15 6.55313 15 6C15 5.44688 14.5522 5 14 5H12.414L14.7072 2.70688C14.9933 2.42075 15.0787 1.99094 14.924 1.61688C14.7692 1.24281 14.4031 1 13.9719 1H9.99998C9.44685 1 8.99998 1.44719 8.99998 2C8.99998 2.55281 9.44685 3 9.99998 3ZM15.3937 13.5406L12.894 8.5375C12.5553 7.85594 11.444 7.85594 11.1053 8.5375L8.6056 13.5406C8.35854 14.0378 8.55873 14.6419 9.05279 14.8903C9.54873 15.1379 10.1478 14.9365 10.3944 14.4403L10.6179 13.9906H13.3814L13.6049 14.4403C13.7979 14.8288 14.354 15.1863 14.9465 14.8903C15.4406 14.6438 15.6406 14.0375 15.3937 13.5406ZM11.4937 12.2313L12 11.2094L12.5069 12.2291H11.4937V12.2313Z", fill: "#1897F3" })), v = {
|
|
13
|
+
title: "Components/Select",
|
|
14
|
+
component: i,
|
|
15
|
+
tags: ["autodocs"]
|
|
16
|
+
}, O = {
|
|
17
|
+
args: {
|
|
18
|
+
placeholder: "Select an option",
|
|
19
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
20
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
21
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
22
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
23
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
24
|
+
] })
|
|
25
|
+
}
|
|
26
|
+
}, L = {
|
|
27
|
+
args: {
|
|
28
|
+
placeholder: "Select an option",
|
|
29
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
30
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
31
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
32
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
33
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
34
|
+
] }),
|
|
35
|
+
disabled: !0
|
|
36
|
+
}
|
|
37
|
+
}, S = {
|
|
38
|
+
args: {
|
|
39
|
+
placeholder: "Select an option",
|
|
40
|
+
ariaLabelledby: "Filter by",
|
|
41
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
42
|
+
/* @__PURE__ */ e(i.Option, { value: "1", children: "Frodo" }),
|
|
43
|
+
/* @__PURE__ */ e(i.Option, { value: "2", children: "Sam" }),
|
|
44
|
+
/* @__PURE__ */ e(i.Option, { value: "3", children: "Mery" }),
|
|
45
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
46
|
+
] })
|
|
47
|
+
}
|
|
48
|
+
}, g = {
|
|
49
|
+
args: {
|
|
50
|
+
placeholder: "Select an option",
|
|
51
|
+
ariaLabelledby: "Filter by",
|
|
52
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
53
|
+
/* @__PURE__ */ e(i.Option, { value: "1", disabled: !0, children: "Frodo" }),
|
|
54
|
+
/* @__PURE__ */ e(i.Option, { value: "2", icon: /* @__PURE__ */ e(r, {}), children: "Sam" }),
|
|
55
|
+
/* @__PURE__ */ e(i.Option, { value: "3", disabled: !0, children: "Mery" }),
|
|
56
|
+
/* @__PURE__ */ e(i.Option, { value: "4", children: "Pippin" })
|
|
57
|
+
] })
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
L as Disabled,
|
|
62
|
+
O as Simple,
|
|
63
|
+
g as WithIcon,
|
|
64
|
+
S as WithPrefix,
|
|
65
|
+
v as default
|
|
66
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SelectButtonProps {
|
|
4
|
+
className: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
'aria-expanded': boolean;
|
|
8
|
+
'aria-labelledby': string | number;
|
|
9
|
+
type?: HTMLButtonElement['type'];
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type SkeletonProps = {
|
|
3
|
+
style?: React.CSSProperties | undefined;
|
|
4
|
+
className?: string;
|
|
5
|
+
'data-testid'?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Skeleton: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
type SkeletonCircleProps = SkeletonProps & {
|
|
9
|
+
size?: string | number;
|
|
10
|
+
};
|
|
11
|
+
declare const SkeletonCircle: ({ size, ...props }: SkeletonCircleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
type SkeletonTableProps = SkeletonProps & {
|
|
13
|
+
columns?: number;
|
|
14
|
+
rows?: number;
|
|
15
|
+
autoWidth?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const SkeletonTable: ({ columns, rows, autoWidth, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { Skeleton, SkeletonCircle, SkeletonTable };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '../../assets/Skeleton.css';
|
|
2
|
+
import { jsx as l, jsxs as w } from "react/jsx-runtime";
|
|
3
|
+
import { c as a } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
const N = "_skeleton_1lho5_1", p = "_skeletonLoading_1lho5_1", s = {
|
|
5
|
+
skeleton: N,
|
|
6
|
+
"skeleton--table-type": "_skeleton--table-type_1lho5_1",
|
|
7
|
+
skeletonLoading: p,
|
|
8
|
+
"skeleton--circle-type": "_skeleton--circle-type_1lho5_15"
|
|
9
|
+
}, i = (e) => {
|
|
10
|
+
const t = a(s.skeleton, s["skeleton--normal-type"], e.className);
|
|
11
|
+
return /* @__PURE__ */ l("div", { style: {}, ...e, className: t });
|
|
12
|
+
}, C = ({ size: e = "4rem", ...t }) => {
|
|
13
|
+
const n = a(s.skeleton, s["skeleton--circle-type"], t.className);
|
|
14
|
+
return /* @__PURE__ */ l("div", { ...t, style: { width: e, height: e }, className: n });
|
|
15
|
+
}, h = (e = 30) => `${Math.floor(Math.random() * (100 - e + 1) + e)}%`, $ = ({ columns: e = 5, rows: t = 5, autoWidth: n = !0, ...r }) => {
|
|
16
|
+
const k = a(s.skeleton, s["skeleton--table-type"], r.className), c = `${100 / e}%`, d = /* @__PURE__ */ l("tr", { children: new Array(e).fill(null).map((y, o) => /* @__PURE__ */ l("th", { style: { width: c }, children: /* @__PURE__ */ l(i, { style: { width: n ? h(50) : "100%" } }) }, `row-columns-${o}`)) }), m = new Array(t).fill(null).map((y, o) => /* @__PURE__ */ l("tr", { children: new Array(e).fill(null).map((b, _) => /* @__PURE__ */ l("td", { style: { width: c }, children: /* @__PURE__ */ l(i, { style: { width: n ? h() : "100%" } }) }, `row-${o}-cell-${_}`)) }, `row-${o}`));
|
|
17
|
+
return /* @__PURE__ */ w("table", { ...r, className: k, children: [
|
|
18
|
+
/* @__PURE__ */ l("thead", { children: d }),
|
|
19
|
+
/* @__PURE__ */ l("tbody", { children: m })
|
|
20
|
+
] });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
i as Skeleton,
|
|
24
|
+
C as SkeletonCircle,
|
|
25
|
+
$ as SkeletonTable
|
|
26
|
+
};
|
|
@@ -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 {};
|