@pismo/marola 1.0.0-beta.2 → 1.0.0-beta.20
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-D9e4RsKo.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-CRfZgFJp.js +181 -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/ResultWithChips.css +1 -0
- 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/StepperNavigator.css +1 -0
- 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 +20 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
- package/dist/components/Adornment/adornment.test.d.ts +1 -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 +52 -0
- package/dist/components/Autocomplete/Autocomplete.js +690 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +46 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.js +51 -49
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +6 -12
- package/dist/components/Chip/Chip.js +6 -5
- package/dist/components/Chip/Chip.stories.d.ts +5 -14
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +8 -7
- package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
- package/dist/components/Dialog/CloseIconButton.js +15 -18
- package/dist/components/Dialog/Dialog.d.ts +9 -6
- package/dist/components/Dialog/Dialog.js +139 -139
- package/dist/components/Dialog/Dialog.stories.d.ts +50 -46
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +2 -1
- package/dist/components/Icon/Icon.js +62 -34
- 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/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +19 -0
- package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
- package/dist/components/RowItem/rowItem.test.d.ts +1 -0
- package/dist/components/Select/Select.js +9 -8
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +18 -12
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +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/StepperNavigator/StepperNavigator.d.ts +43 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +56 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +16 -0
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +88 -85
- package/dist/components/Table/Table.stories.d.ts +1 -1
- 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 +42 -28
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Toggle.js +3 -3
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +5 -0
- package/dist/main.js +85 -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 +8 -3
- 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,79 @@
|
|
|
1
|
+
function w(l = {}) {
|
|
2
|
+
const {
|
|
3
|
+
boundaryCount: t = 1,
|
|
4
|
+
count: s = 1,
|
|
5
|
+
disabled: i = !1,
|
|
6
|
+
hideNextButton: d = !1,
|
|
7
|
+
hidePrevButton: g = !1,
|
|
8
|
+
page: n = l.page || 1,
|
|
9
|
+
showFirstButton: f = !1,
|
|
10
|
+
showLastButton: h = !1,
|
|
11
|
+
siblingCount: a = 1,
|
|
12
|
+
...p
|
|
13
|
+
} = l, r = (e, y) => {
|
|
14
|
+
const P = y - e + 1;
|
|
15
|
+
return Array.from({ length: P }, (B, m) => e + m);
|
|
16
|
+
}, x = r(1, Math.min(t, s)), o = r(Math.max(s - t + 1, t + 1), s), u = Math.max(
|
|
17
|
+
Math.min(
|
|
18
|
+
// Natural start
|
|
19
|
+
n - a,
|
|
20
|
+
// Lower boundary when page is high
|
|
21
|
+
s - t - a * 2 - 1
|
|
22
|
+
),
|
|
23
|
+
// Greater than startPages
|
|
24
|
+
t + 2
|
|
25
|
+
), c = Math.min(
|
|
26
|
+
Math.max(
|
|
27
|
+
// Natural end
|
|
28
|
+
n + a,
|
|
29
|
+
// Upper boundary when page is low
|
|
30
|
+
t + a * 2 + 2
|
|
31
|
+
),
|
|
32
|
+
// Less than endPages
|
|
33
|
+
o.length > 0 ? o[0] - 2 : s - 1
|
|
34
|
+
), b = [
|
|
35
|
+
...f ? ["first"] : [],
|
|
36
|
+
...g ? [] : ["previous"],
|
|
37
|
+
...x,
|
|
38
|
+
// Start ellipsis
|
|
39
|
+
...u > t + 2 ? ["start-ellipsis"] : t + 1 < s - t ? [t + 1] : [],
|
|
40
|
+
// Sibling pages
|
|
41
|
+
...r(u, c),
|
|
42
|
+
// End ellipsis
|
|
43
|
+
...c < s - t - 1 ? ["end-ellipsis"] : s - t > t ? [s - t] : [],
|
|
44
|
+
...o,
|
|
45
|
+
...d ? [] : ["next"],
|
|
46
|
+
...h ? ["last"] : []
|
|
47
|
+
], M = (e) => {
|
|
48
|
+
switch (e) {
|
|
49
|
+
case "first":
|
|
50
|
+
return 1;
|
|
51
|
+
case "previous":
|
|
52
|
+
return n - 1;
|
|
53
|
+
case "next":
|
|
54
|
+
return n + 1;
|
|
55
|
+
case "last":
|
|
56
|
+
return s;
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
items: b.map((e) => typeof e == "number" ? {
|
|
63
|
+
type: "page",
|
|
64
|
+
page: e,
|
|
65
|
+
selected: e === n,
|
|
66
|
+
disabled: i,
|
|
67
|
+
"aria-current": e === n ? "true" : void 0
|
|
68
|
+
} : {
|
|
69
|
+
type: e,
|
|
70
|
+
page: M(e),
|
|
71
|
+
selected: !1,
|
|
72
|
+
disabled: i || e.indexOf("ellipsis") === -1 && (e === "next" || e === "last" ? n >= s : n <= 1)
|
|
73
|
+
}),
|
|
74
|
+
...p
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
w as default
|
|
79
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChipProps } from '../Chip/Chip';
|
|
2
|
+
|
|
3
|
+
type ResultWithChipsProps = {
|
|
4
|
+
chips: Array<Partial<ChipProps> & {
|
|
5
|
+
joinLabel?: string | React.ReactNode;
|
|
6
|
+
key?: string;
|
|
7
|
+
}>;
|
|
8
|
+
title: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const ResultWithChips: ({ chips, title, className, ...rest }: ResultWithChipsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { ResultWithChips };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '../../assets/ResultWithChips.css';
|
|
2
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { C as t } from "../../Toggle-CRfZgFJp.js";
|
|
4
|
+
const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
|
|
5
|
+
container: r,
|
|
6
|
+
"chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
|
|
7
|
+
label: o,
|
|
8
|
+
"chips-container": "_chips-container_hgp0p_35",
|
|
9
|
+
"chip-content": "_chip-content_hgp0p_42",
|
|
10
|
+
"chip-label": "_chip-label_hgp0p_51"
|
|
11
|
+
}, b = ({ chips: c, title: p, className: s, ...h }) => /* @__PURE__ */ i("div", { ...h, className: [a.container, s || ""].join(" ").trim(), children: [
|
|
12
|
+
/* @__PURE__ */ e("span", { className: a.label, children: p }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: a["chips-container"], "data-testid": "chips-container", children: c.map((l, n) => /* @__PURE__ */ i("span", { className: a["chip-item-wrapper"], children: [
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
t,
|
|
16
|
+
{
|
|
17
|
+
...l,
|
|
18
|
+
label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: typeof l.label == "string" ? /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.label }) : l.label })
|
|
19
|
+
},
|
|
20
|
+
`chip-${n}`
|
|
21
|
+
),
|
|
22
|
+
l.joinLabel && n < c.length - 1 && /* @__PURE__ */ e(
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.joinLabel }) })
|
|
26
|
+
},
|
|
27
|
+
`join-${n}`
|
|
28
|
+
)
|
|
29
|
+
] }, `full-chip-${n}`)) })
|
|
30
|
+
] });
|
|
31
|
+
export {
|
|
32
|
+
b as ResultWithChips
|
|
33
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RequireAllOrNone } from '../../types/helpers';
|
|
2
|
+
import { AdornmentProps } from '../../main';
|
|
3
|
+
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export type RowItemBaseProps = {
|
|
6
|
+
/** Items to display as main content of the row */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Buttons to render */
|
|
9
|
+
buttons?: ReactNode;
|
|
10
|
+
/** Left adornment */
|
|
11
|
+
leftAdornment?: AdornmentProps;
|
|
12
|
+
/** Whether the row is disabled (not interactable */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Space seperated list of CSS classes to apply */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Callback for when the row is clicked, required when ariaLabel is provided */
|
|
17
|
+
onClick?: (event?: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement> | undefined) => void;
|
|
18
|
+
/** An accessible name for the row, required when onClick is provided */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
/** ID to use in tests*/
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
};
|
|
23
|
+
export type RowItemProps = RequireAllOrNone<RowItemBaseProps, 'onClick' | 'ariaLabel'>;
|
|
24
|
+
export declare const RowItem: import('react').ForwardRefExoticComponent<RowItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export default RowItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import "../Adornment/Adornment.js";
|
|
5
|
+
import "../Icon/Icon.js";
|
|
6
|
+
import "../Typography/Typography.js";
|
|
7
|
+
import "../Button/Button.js";
|
|
8
|
+
import { R as I, R as b } from "../../Toggle-CRfZgFJp.js";
|
|
9
|
+
import "../Dialog/Dialog.js";
|
|
10
|
+
import "../IconButton/IconButton.js";
|
|
11
|
+
import "../Select/Select.js";
|
|
12
|
+
import "../Table/Table.js";
|
|
13
|
+
import "../Tabs/Tabs.js";
|
|
14
|
+
import "../../Group-B3p31ftp.js";
|
|
15
|
+
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
+
export {
|
|
17
|
+
I as RowItem,
|
|
18
|
+
b as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<import('./RowItem').RowItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Simple: Story;
|
|
14
|
+
export declare const Clickable: Story;
|
|
15
|
+
export declare const WithAdornement: Story;
|
|
16
|
+
export declare const WithButtons: Story;
|
|
17
|
+
export declare const WithButtonsAndAdornementDisabled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as h, jsxs as Oe } from "react/jsx-runtime";
|
|
2
2
|
import { c as _e } from "../../clsx-DB4S2d7J.js";
|
|
3
3
|
import { Typography as Ke } from "../Typography/Typography.js";
|
|
4
|
-
import { s as L, S as ze } from "../../SelectButton-
|
|
5
|
-
import { g as Ve, a as we, u as X, f as ne, b as g, P as l, _ as ke, c as le, d as Ie, e as Ne } from "../../
|
|
4
|
+
import { s as L, S as ze } from "../../SelectButton-CoOT2txy.js";
|
|
5
|
+
import { g as Ve, a as we, u as X, f as ne, b as g, P as l, _ as ke, c as le, d as Ie, e as Ne } from "../../useSlotProps-kRhf7Gil.js";
|
|
6
6
|
import * as s from "react";
|
|
7
|
-
import { u as Je, c as se, a as ye, L as Q } from "../../combineHooksSlotProps-
|
|
8
|
-
import { u as Me } from "../../useButton-
|
|
9
|
-
import { u as Te
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { u as Je, c as se, a as ye, L as Q } from "../../combineHooksSlotProps-BtBYUV_B.js";
|
|
8
|
+
import { u as Me } from "../../useButton-Bn3MNH8I.js";
|
|
9
|
+
import { u as Te } from "../../useId-BW-oWmul.js";
|
|
10
|
+
import { u as We, a as Ge, C as Qe } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
11
|
+
import { P as Xe } from "../../Popup-lLWZt2wk.js";
|
|
12
|
+
import { m as ve, h as Ye, l as Ze, u as et } from "../../useList-BpJT77u3.js";
|
|
12
13
|
import { u as tt } from "../../useEnhancedEffect-CJGo-L3B.js";
|
|
13
14
|
const ot = {
|
|
14
15
|
border: 0,
|
|
@@ -844,7 +845,7 @@ const ht = (n) => {
|
|
|
844
845
|
slots: { root: ze },
|
|
845
846
|
slotProps: {
|
|
846
847
|
listbox: { className: L.select__listbox },
|
|
847
|
-
popup: { className: L.select__popup }
|
|
848
|
+
popup: { className: L.select__popup, strategy: "fixed" }
|
|
848
849
|
},
|
|
849
850
|
children: o
|
|
850
851
|
}
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-DB4S2d7J.js";
|
|
4
4
|
import "../Typography/Typography.js";
|
|
5
|
-
import { S as e } from "../../SelectButton-
|
|
5
|
+
import { S as e } from "../../SelectButton-CoOT2txy.js";
|
|
6
6
|
export {
|
|
7
7
|
e as SelectButton
|
|
8
8
|
};
|
|
@@ -20,6 +20,8 @@ export type SkeletonTableProps = SkeletonProps & {
|
|
|
20
20
|
rows?: number;
|
|
21
21
|
/** Controls if the with of the cells should be automatically defined */
|
|
22
22
|
autoWidth?: boolean;
|
|
23
|
+
/** Controls if show or not the skeleton of the table header */
|
|
24
|
+
showHeader?: boolean;
|
|
23
25
|
};
|
|
24
|
-
declare const SkeletonTable: ({ columns, rows, autoWidth, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const SkeletonTable: ({ columns, rows, autoWidth, showHeader, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export { Skeleton, SkeletonCircle, SkeletonTable };
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import '../../assets/Skeleton.css';
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as N } from "react/jsx-runtime";
|
|
3
3
|
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
const
|
|
5
|
-
skeleton:
|
|
4
|
+
const u = "_skeleton_dtmoz_1", b = "_skeletonLoading_dtmoz_1", o = {
|
|
5
|
+
skeleton: u,
|
|
6
6
|
skeletonLoading: b,
|
|
7
7
|
"skeleton--circle-type": "_skeleton--circle-type_dtmoz_13",
|
|
8
8
|
"skeleton--table-type": "_skeleton--table-type_dtmoz_17"
|
|
9
|
-
},
|
|
9
|
+
}, d = (e) => /* @__PURE__ */ t("div", { ...e, className: r(o.skeleton, e.className) }), C = ({ size: e = "4rem", ...l }) => {
|
|
10
10
|
const s = r(o.skeleton, o["skeleton--circle-type"], l.className);
|
|
11
11
|
return /* @__PURE__ */ t("div", { ...l, style: { width: e, height: e }, className: s });
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}, m = (e = 30) => `${Math.floor(Math.random() * (100 - e + 1) + e)}%`, L = ({
|
|
13
|
+
columns: e = 5,
|
|
14
|
+
rows: l = 5,
|
|
15
|
+
autoWidth: s = !0,
|
|
16
|
+
showHeader: c = !0,
|
|
17
|
+
...a
|
|
18
|
+
}) => {
|
|
19
|
+
const k = r(o["skeleton--table-type"], a.className), i = `${100 / e}%`, h = c && /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((_, n) => /* @__PURE__ */ t("th", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m(50) : "100%" } }) }, `row-columns-${n}`)) }), y = new Array(l).fill(null).map((_, n) => /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((f, w) => /* @__PURE__ */ t("td", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m() : "100%" } }) }, `row-${n}-cell-${w}`)) }, `row-${n}`));
|
|
20
|
+
return /* @__PURE__ */ N("table", { ...a, className: k, children: [
|
|
21
|
+
c && /* @__PURE__ */ t("thead", { children: h }),
|
|
22
|
+
/* @__PURE__ */ t("tbody", { children: y })
|
|
17
23
|
] });
|
|
18
24
|
};
|
|
19
25
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
d as Skeleton,
|
|
27
|
+
C as SkeletonCircle,
|
|
28
|
+
L as SkeletonTable
|
|
23
29
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ columns, rows, autoWidth, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ columns, rows, autoWidth, showHeader, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|