@pismo/marola 0.0.1-alpha.19 → 0.0.1-alpha.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/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/SelectButton-C8JQKaf4.js +61 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Chip.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/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/Table.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Advice/Advice.js +32 -17
- package/dist/components/Button/Button.js +56 -85
- package/dist/components/Checkbox/Checkbox.js +57 -42
- package/dist/components/Chip/Chip.js +81 -111
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +2 -2
- package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
- package/dist/components/Dialog/DialogTitle.js +29 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +31 -25
- package/dist/components/IconButton/IconButton.js +34 -64
- package/dist/components/Input/Input.js +241 -229
- package/dist/components/PageHeader/PageHeader.js +52 -37
- package/dist/components/Pagination/Pagination.js +127 -113
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Snackbar/Snackbar.js +176 -161
- package/dist/components/SortTooltip/SortTooltip.js +53 -38
- package/dist/components/Stepper/Stepper.js +37 -22
- package/dist/components/Table/Table.d.ts +33 -16
- package/dist/components/Table/Table.js +98 -81
- package/dist/components/Table/Table.stories.d.ts +29 -0
- package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
- package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
- package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
- package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
- package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
- package/dist/components/TextDisplay/TextDisplay.js +13 -13
- package/dist/components/Toggle/Toggle.js +138 -123
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +54 -84
- package/dist/main.js +42 -37
- package/dist/marola.css +1 -1
- package/dist/utils/styleStrings.d.ts +1 -1
- package/dist/utils/styleStrings.js +7 -7
- package/package.json +1 -1
- package/dist/Dialog.module-B8COssqi.js +0 -15
- package/dist/SelectButton-pciwIWcj.js +0 -46
- package/dist/components/Dialog/Title.js +0 -29
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import '../../assets/SortTooltip.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Tooltip as
|
|
2
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as d } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
5
5
|
import * as t from "react";
|
|
6
|
-
const
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
6
|
+
const m = (h) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...h }, /* @__PURE__ */ t.createElement("path", { d: "M4.73768 14.6906C4.35893 15.105 3.64205 15.105 3.26299 14.6906L0.541112 11.6878C0.167987 11.28 0.195487 10.6469 0.602643 10.2731C1.00952 9.89969 1.64233 9.92812 2.01577 10.3348L3.00017 11.4406V2.00094C3.00017 1.44781 3.44799 1 4.00017 1C4.55236 1 5.00017 1.44781 5.00017 2.00094V11.4384L6.01267 10.3325C6.3708 9.94219 7.00236 9.88281 7.4258 10.2708C7.83299 10.6443 7.86018 11.2777 7.48733 11.6855L4.73768 14.6906Z", fill: "#1897F3" }), /* @__PURE__ */ t.createElement("path", { opacity: 0.4, d: "M14.0001 13H12.4141L14.7073 10.7069C14.9934 10.4208 15.0788 9.99098 14.9241 9.61691C14.7693 9.24285 14.4032 9.00004 13.972 9.00004H9.97196C9.44696 9.00004 9.00008 9.44691 9.00008 10C9.00008 10.5532 9.4479 11 10.0001 11H11.586L9.2929 13.2932C9.00677 13.5793 8.92133 14.0091 9.07608 14.3832C9.23083 14.7572 9.59696 15 9.97196 15H13.9438C14.5532 15 15.0001 14.5532 15.0001 14C15.0001 13.4469 14.5532 13 14.0001 13ZM15.3938 6.54066L12.8941 1.53754C12.5554 0.855977 11.4441 0.855977 11.1054 1.53754L8.60633 6.54066C8.35927 7.03785 8.55946 7.64191 9.05352 7.89035C9.54946 8.13791 10.1485 7.93651 10.3951 7.44035L10.6186 6.99066H13.3821L13.6056 7.44035C13.7986 7.82879 14.3547 8.18629 14.9472 7.89035C15.4407 7.64379 15.6407 7.03754 15.3938 6.54066ZM11.4938 5.23129L12.0001 4.20941L12.507 5.2291H11.4938V5.23129Z", fill: "#1897F3" })), L = (h) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...h }, /* @__PURE__ */ t.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__ */ t.createElement("path", { opacity: 0.4, d: "M10.0002 3H11.5862L9.29303 5.29313C9.00691 5.57925 8.92147 6.00906 9.07622 6.38313C9.23097 6.75719 9.59591 7 9.99997 7H13.9718C14.5533 6.97188 15.0002 6.55313 15.0002 6C15.0002 5.44688 14.5524 5 14.0002 5H12.4143L14.7074 2.70688C14.9935 2.42075 15.079 1.99094 14.9242 1.61688C14.7695 1.24281 14.4033 1 13.9721 1H10.0002C9.44709 1 9.00022 1.44719 9.00022 2C9.00022 2.55281 9.44709 3 10.0002 3ZM15.394 13.5406L12.8943 8.5375C12.5555 7.85594 11.4443 7.85594 11.1055 8.5375L8.60584 13.5406C8.35878 14.0378 8.55897 14.6419 9.05303 14.8903C9.54897 15.1379 10.148 14.9365 10.3946 14.4403L10.6182 13.9906H13.3816L13.6052 14.4403C13.7981 14.8288 14.3542 15.1863 14.9467 14.8903C15.4408 14.6438 15.6408 14.0375 15.394 13.5406ZM11.494 12.2313L12.0002 11.2094L12.5071 12.2291H11.494V12.2313Z", fill: "#1897F3" })), p = {
|
|
7
|
+
"u-typography-h1": "_u-typography-h1_1hhgh_1",
|
|
8
|
+
"u-typography-h2": "_u-typography-h2_1hhgh_8",
|
|
9
|
+
"u-typography-h3": "_u-typography-h3_1hhgh_15",
|
|
10
|
+
"u-typography-h4": "_u-typography-h4_1hhgh_22",
|
|
11
|
+
"u-typography-h5": "_u-typography-h5_1hhgh_29",
|
|
12
|
+
"u-typography-h6": "_u-typography-h6_1hhgh_36",
|
|
13
|
+
"u-typography-base": "_u-typography-base_1hhgh_43",
|
|
14
|
+
"sort-tooltip": "_sort-tooltip_1hhgh_43",
|
|
15
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1hhgh_48",
|
|
16
|
+
"u-typography-base--xl": "_u-typography-base--xl_1hhgh_52",
|
|
17
|
+
"u-typography-base--lg": "_u-typography-base--lg_1hhgh_56",
|
|
18
|
+
"u-typography-base--sm": "_u-typography-base--sm_1hhgh_60",
|
|
19
|
+
"u-typography-base--bold": "_u-typography-base--bold_1hhgh_64",
|
|
20
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1hhgh_67",
|
|
21
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1hhgh_70",
|
|
22
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1hhgh_73",
|
|
23
|
+
"button--selected": "_button--selected_1hhgh_94"
|
|
24
|
+
}, w = {
|
|
10
25
|
pt: {
|
|
11
26
|
asc: "Ascendente",
|
|
12
27
|
desc: "Descendente"
|
|
@@ -15,64 +30,64 @@ const u = (e) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16,
|
|
|
15
30
|
asc: "Sort ascending",
|
|
16
31
|
desc: "Sort descending"
|
|
17
32
|
}
|
|
18
|
-
},
|
|
19
|
-
children:
|
|
20
|
-
className:
|
|
21
|
-
language:
|
|
22
|
-
onClose:
|
|
23
|
-
onSort:
|
|
24
|
-
show:
|
|
25
|
-
sortType:
|
|
26
|
-
t:
|
|
27
|
-
...
|
|
33
|
+
}, Z = ({
|
|
34
|
+
children: h,
|
|
35
|
+
className: y,
|
|
36
|
+
language: l,
|
|
37
|
+
onClose: o,
|
|
38
|
+
onSort: r,
|
|
39
|
+
show: n,
|
|
40
|
+
sortType: s,
|
|
41
|
+
t: i,
|
|
42
|
+
..._
|
|
28
43
|
}) => {
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
44
|
+
const u = d(p["sort-tooltip"], y), C = i || w[l || "en"], g = (c) => C[c];
|
|
45
|
+
return /* @__PURE__ */ e(
|
|
46
|
+
b,
|
|
32
47
|
{
|
|
33
|
-
className:
|
|
34
|
-
onClose:
|
|
35
|
-
open:
|
|
48
|
+
className: u,
|
|
49
|
+
onClose: o,
|
|
50
|
+
open: n,
|
|
36
51
|
theme: "white",
|
|
37
52
|
padding: "normal",
|
|
38
53
|
position: "bottom-start",
|
|
39
54
|
disableHoverListener: !0,
|
|
40
|
-
title: /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
55
|
+
title: /* @__PURE__ */ a("ul", { children: [
|
|
56
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
42
57
|
"button",
|
|
43
58
|
{
|
|
44
59
|
type: "button",
|
|
45
60
|
onClick: () => {
|
|
46
|
-
|
|
61
|
+
o(), r("ASC");
|
|
47
62
|
},
|
|
48
|
-
className:
|
|
63
|
+
className: s === "ASC" ? p["button--selected"] : "",
|
|
49
64
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
65
|
+
/* @__PURE__ */ e(m, {}),
|
|
66
|
+
g`asc`
|
|
52
67
|
]
|
|
53
68
|
}
|
|
54
69
|
) }),
|
|
55
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
56
71
|
"button",
|
|
57
72
|
{
|
|
58
73
|
type: "button",
|
|
59
74
|
onClick: () => {
|
|
60
|
-
|
|
75
|
+
o(), r("DESC");
|
|
61
76
|
},
|
|
62
|
-
className:
|
|
77
|
+
className: s === "DESC" ? p["button--selected"] : "",
|
|
63
78
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
79
|
+
/* @__PURE__ */ e(L, {}),
|
|
80
|
+
g`desc`
|
|
66
81
|
]
|
|
67
82
|
}
|
|
68
83
|
) })
|
|
69
84
|
] }),
|
|
70
|
-
...
|
|
71
|
-
children:
|
|
85
|
+
..._,
|
|
86
|
+
children: h
|
|
72
87
|
}
|
|
73
88
|
);
|
|
74
89
|
};
|
|
75
90
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
Z as SortTooltip,
|
|
92
|
+
w as sortTooltipDefaultTranslations
|
|
78
93
|
};
|
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
import '../../assets/Stepper.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { jsx as _, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import { c as p } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
const m = "_stepper_a47qe_60", c = "_item_a47qe_60", n = "_name_a47qe_60", l = "_counter_a47qe_64", e = {
|
|
5
|
+
"u-typography-h1": "_u-typography-h1_a47qe_1",
|
|
6
|
+
"u-typography-h2": "_u-typography-h2_a47qe_8",
|
|
7
|
+
"u-typography-h3": "_u-typography-h3_a47qe_15",
|
|
8
|
+
"u-typography-h4": "_u-typography-h4_a47qe_22",
|
|
9
|
+
"u-typography-h5": "_u-typography-h5_a47qe_29",
|
|
10
|
+
"u-typography-h6": "_u-typography-h6_a47qe_36",
|
|
11
|
+
"u-typography-base": "_u-typography-base_a47qe_43",
|
|
12
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_a47qe_48",
|
|
13
|
+
"u-typography-base--xl": "_u-typography-base--xl_a47qe_52",
|
|
14
|
+
"u-typography-base--lg": "_u-typography-base--lg_a47qe_56",
|
|
15
|
+
"u-typography-base--sm": "_u-typography-base--sm_a47qe_60",
|
|
16
|
+
stepper: m,
|
|
17
|
+
item: c,
|
|
18
|
+
name: n,
|
|
19
|
+
"u-typography-base--bold": "_u-typography-base--bold_a47qe_64",
|
|
20
|
+
"item--active": "_item--active_a47qe_64",
|
|
21
|
+
"item--completed": "_item--completed_a47qe_64",
|
|
22
|
+
counter: l,
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_a47qe_67",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_a47qe_70",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_a47qe_73"
|
|
26
|
+
}, v = ({ currentStep: y = 0, steps: r, classNameItem: s, classNameCounter: o, classNameName: h, ...a }) => /* @__PURE__ */ _("div", { className: p(e.stepper, a.className), "data-testid": a["data-testid"], children: r.map((u, t) => {
|
|
27
|
+
const i = t < y, g = t === y;
|
|
28
|
+
return /* @__PURE__ */ d(
|
|
14
29
|
"div",
|
|
15
30
|
{
|
|
16
|
-
className:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
className: p(
|
|
32
|
+
e.item,
|
|
33
|
+
i && e["item--completed"],
|
|
34
|
+
g && e["item--active"],
|
|
35
|
+
s
|
|
21
36
|
),
|
|
22
|
-
"data-testid":
|
|
37
|
+
"data-testid": a["data-testid-item"],
|
|
23
38
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ _("div", { className: p(e.counter, o), "data-testid": a["data-testid-counter"], children: t + 1 }),
|
|
40
|
+
/* @__PURE__ */ _("div", { className: p(e.name, h), "data-testid": a["data-testid-name"], children: u })
|
|
26
41
|
]
|
|
27
42
|
},
|
|
28
|
-
|
|
43
|
+
t
|
|
29
44
|
);
|
|
30
45
|
}) });
|
|
31
46
|
export {
|
|
32
|
-
|
|
47
|
+
v as Stepper
|
|
33
48
|
};
|
|
@@ -2,38 +2,55 @@ import { TableTranslations } from './TableContext';
|
|
|
2
2
|
import { SortType } from '../SortTooltip/SortTooltip';
|
|
3
3
|
import { PaginationProps } from '../Pagination/Pagination';
|
|
4
4
|
|
|
5
|
-
type ChildrenProps = {
|
|
5
|
+
export type ChildrenProps = {
|
|
6
|
+
/** Children of the component */
|
|
6
7
|
children: React.ReactNode;
|
|
8
|
+
/** CSS classes to be applied on the component */
|
|
7
9
|
className?: string;
|
|
10
|
+
/** Id to be applied as data-testid on the component */
|
|
8
11
|
'data-testid'?: string;
|
|
9
12
|
};
|
|
13
|
+
type ActionProps = {
|
|
14
|
+
/** Disabled status */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Functionality to perform once clicked */
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
};
|
|
19
|
+
type AlignProps = {
|
|
20
|
+
/** Alignment */
|
|
21
|
+
align?: 'left' | 'right' | 'center';
|
|
22
|
+
};
|
|
10
23
|
type TableTheme = 'white' | 'transparent';
|
|
11
|
-
type TableProps = ChildrenProps & {
|
|
24
|
+
export type TableProps = ChildrenProps & {
|
|
25
|
+
/** Set if the table is full width */
|
|
12
26
|
fullWidth?: boolean;
|
|
27
|
+
/** Pagination Props */
|
|
13
28
|
paginationProps?: PaginationProps;
|
|
29
|
+
/** Set theme */
|
|
14
30
|
theme?: TableTheme;
|
|
31
|
+
/** Set language */
|
|
15
32
|
language?: string;
|
|
33
|
+
/** Set translations to labels */
|
|
16
34
|
translations?: TableTranslations;
|
|
17
35
|
};
|
|
18
36
|
declare const Table: {
|
|
19
37
|
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
THead:
|
|
21
|
-
TBody:
|
|
22
|
-
Tr:
|
|
23
|
-
Td:
|
|
24
|
-
Th:
|
|
25
|
-
};
|
|
26
|
-
type Alignment = 'left' | 'right' | 'center';
|
|
27
|
-
type CellProps = {
|
|
28
|
-
align?: Alignment;
|
|
29
|
-
};
|
|
30
|
-
type RowOrCellProps = ChildrenProps & {
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
onClick?: () => void;
|
|
38
|
+
THead: import('react').FunctionComponent<ChildrenProps>;
|
|
39
|
+
TBody: import('react').FunctionComponent<ChildrenProps>;
|
|
40
|
+
Tr: import('react').FunctionComponent<TrProps>;
|
|
41
|
+
Td: import('react').FunctionComponent<TdProps>;
|
|
42
|
+
Th: import('react').FunctionComponent<ThProps>;
|
|
33
43
|
};
|
|
34
|
-
|
|
44
|
+
export declare const THead: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const TBody: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export type TrProps = ChildrenProps & ActionProps;
|
|
47
|
+
export declare const Tr: ({ children, onClick, disabled, className, ...rest }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export type TdProps = ChildrenProps & ActionProps & AlignProps;
|
|
49
|
+
export declare const Td: ({ children, onClick, disabled, className, align, ...rest }: TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export type ThProps = ChildrenProps & AlignProps & {
|
|
35
51
|
onSort?: (order: SortType) => void;
|
|
36
52
|
sortType?: SortType;
|
|
37
53
|
classNameTooltip?: string;
|
|
38
54
|
};
|
|
55
|
+
export declare const Th: ({ children, onSort, sortType, className, classNameTooltip, align, ...rest }: ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
56
|
export { Table, type TableTranslations };
|
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
import '../../assets/Table.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { c as
|
|
6
|
-
import { paginationDefaultTranslations as
|
|
7
|
-
import { sortTooltipDefaultTranslations as
|
|
8
|
-
import { TableProvider as
|
|
9
|
-
const C = (
|
|
2
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import * as h from "react";
|
|
4
|
+
import { useState as w } from "react";
|
|
5
|
+
import { c as g } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { paginationDefaultTranslations as y, Pagination as T } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as u, SortTooltip as f } from "../SortTooltip/SortTooltip.js";
|
|
8
|
+
import { TableProvider as N, useTable as x } from "./TableContext.js";
|
|
9
|
+
const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...p }, /* @__PURE__ */ h.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ h.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ h.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ h.createElement("defs", null, /* @__PURE__ */ h.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ h.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1gspp_43", E = "_th__wrapper_1gspp_114", k = "_tr_1gspp_130", v = "_td_1gspp_134", t = {
|
|
10
|
+
"u-typography-h1": "_u-typography-h1_1gspp_1",
|
|
11
|
+
"u-typography-h2": "_u-typography-h2_1gspp_8",
|
|
12
|
+
"u-typography-h3": "_u-typography-h3_1gspp_15",
|
|
13
|
+
"u-typography-h4": "_u-typography-h4_1gspp_22",
|
|
14
|
+
"u-typography-h5": "_u-typography-h5_1gspp_29",
|
|
15
|
+
"u-typography-h6": "_u-typography-h6_1gspp_36",
|
|
16
|
+
"u-typography-base": "_u-typography-base_1gspp_43",
|
|
10
17
|
table: L,
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
18
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1gspp_48",
|
|
19
|
+
"u-typography-base--xl": "_u-typography-base--xl_1gspp_52",
|
|
20
|
+
"u-typography-base--lg": "_u-typography-base--lg_1gspp_56",
|
|
21
|
+
"u-typography-base--sm": "_u-typography-base--sm_1gspp_60",
|
|
22
|
+
"u-typography-base--bold": "_u-typography-base--bold_1gspp_64",
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1gspp_67",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1gspp_70",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1gspp_73",
|
|
26
|
+
"table--full-width": "_table--full-width_1gspp_81",
|
|
27
|
+
"table--white-theme": "_table--white-theme_1gspp_84",
|
|
28
|
+
"table--transparent-theme": "_table--transparent-theme_1gspp_87",
|
|
29
|
+
"cell--left-alignment": "_cell--left-alignment_1gspp_90",
|
|
30
|
+
"cell--center-alignment": "_cell--center-alignment_1gspp_94",
|
|
31
|
+
"cell--right-alignment": "_cell--right-alignment_1gspp_98",
|
|
17
32
|
th__wrapper: E,
|
|
18
|
-
"th__wrapper--pressed": "_th__wrapper--
|
|
19
|
-
"th__wrapper--clickable": "_th__wrapper--
|
|
20
|
-
"th__sort-icon-container": "_th__sort-icon-
|
|
21
|
-
"tr__row-or-cell--disabled": "_tr__row-or-cell--
|
|
22
|
-
tr:
|
|
23
|
-
td:
|
|
24
|
-
"tr__row-or-cell--clickable": "_tr__row-or-cell--
|
|
25
|
-
"td__row-or-cell--clickable": "_td__row-or-cell--
|
|
26
|
-
"td__row-or-cell--disabled": "_td__row-or-cell--
|
|
27
|
-
"td-wrapper": "_td-
|
|
33
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_1gspp_117",
|
|
34
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_1gspp_121",
|
|
35
|
+
"th__sort-icon-container": "_th__sort-icon-container_1gspp_124",
|
|
36
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1gspp_130",
|
|
37
|
+
tr: k,
|
|
38
|
+
td: v,
|
|
39
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1gspp_139",
|
|
40
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_1gspp_140",
|
|
41
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_1gspp_144",
|
|
42
|
+
"td-wrapper": "_td-wrapper_1gspp_148"
|
|
28
43
|
}, B = {
|
|
29
44
|
pt: {
|
|
30
|
-
...
|
|
31
|
-
...
|
|
45
|
+
...y.pt,
|
|
46
|
+
...u.pt
|
|
32
47
|
},
|
|
33
48
|
en: {
|
|
34
|
-
...
|
|
35
|
-
...
|
|
49
|
+
...y.en,
|
|
50
|
+
...u.en
|
|
36
51
|
},
|
|
37
52
|
// example to add a new language translation
|
|
38
53
|
es: {
|
|
@@ -44,77 +59,79 @@ const C = (l) => /* @__PURE__ */ n.createElement("svg", { width: 7, height: 10,
|
|
|
44
59
|
of: "de",
|
|
45
60
|
results: "resultados"
|
|
46
61
|
}
|
|
47
|
-
},
|
|
48
|
-
children:
|
|
62
|
+
}, l = ({
|
|
63
|
+
children: p,
|
|
49
64
|
theme: e = "white",
|
|
50
|
-
fullWidth:
|
|
51
|
-
className:
|
|
52
|
-
paginationProps:
|
|
65
|
+
fullWidth: r = !0,
|
|
66
|
+
className: o,
|
|
67
|
+
paginationProps: s,
|
|
53
68
|
language: _,
|
|
54
|
-
translations:
|
|
55
|
-
...
|
|
69
|
+
translations: n,
|
|
70
|
+
...d
|
|
56
71
|
}) => {
|
|
57
|
-
const
|
|
72
|
+
const c = g(
|
|
58
73
|
t.table,
|
|
59
|
-
|
|
74
|
+
r ? t["table--full-width"] : "",
|
|
60
75
|
t[`table--${e}-theme`],
|
|
61
|
-
|
|
62
|
-
),
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
76
|
+
o
|
|
77
|
+
), i = _ && B[_] || n;
|
|
78
|
+
return /* @__PURE__ */ b(N, { initialTranslations: i, children: [
|
|
79
|
+
/* @__PURE__ */ a("table", { ...d, className: c, children: p }),
|
|
80
|
+
s && /* @__PURE__ */ a(T, { ...s, t: i })
|
|
66
81
|
] });
|
|
67
|
-
},
|
|
68
|
-
const _ =
|
|
82
|
+
}, H = ({ children: p, ...e }) => /* @__PURE__ */ a("thead", { ...e, children: p }), P = ({ children: p, ...e }) => /* @__PURE__ */ a("tbody", { ...e, children: p }), D = ({ children: p, onClick: e, disabled: r, className: o, ...s }) => {
|
|
83
|
+
const _ = g(
|
|
69
84
|
t.tr,
|
|
70
|
-
e && !
|
|
71
|
-
|
|
85
|
+
e && !r ? t["tr__row-or-cell--clickable"] : r ? t["tr__row-or-cell--disabled"] : "",
|
|
86
|
+
o
|
|
72
87
|
);
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
},
|
|
75
|
-
const
|
|
88
|
+
return /* @__PURE__ */ a("tr", { ...s, className: _, onClick: () => !r && (e == null ? void 0 : e()), children: p });
|
|
89
|
+
}, M = ({ children: p, onClick: e, disabled: r, className: o, align: s = "left", ..._ }) => {
|
|
90
|
+
const n = g(
|
|
76
91
|
t.td,
|
|
77
|
-
e && !
|
|
78
|
-
t[`cell--${
|
|
79
|
-
|
|
92
|
+
e && !r ? t["td__row-or-cell--clickable"] : r ? t["td__row-or-cell--disabled"] : "",
|
|
93
|
+
t[`cell--${s}-alignment`],
|
|
94
|
+
o
|
|
80
95
|
);
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
onSort: e,
|
|
85
|
-
sortType: a,
|
|
86
|
-
className: s,
|
|
87
|
-
classNameTooltip: o,
|
|
88
|
-
align: _ = "left",
|
|
89
|
-
...c
|
|
90
|
-
}) => {
|
|
91
|
-
const { translations: b } = N(), [i, p] = v(!1), f = h(
|
|
96
|
+
return /* @__PURE__ */ a("td", { ..._, className: n, onClick: () => !r && (e == null ? void 0 : e()), children: /* @__PURE__ */ a("span", { className: t["td-wrapper"], children: p }) });
|
|
97
|
+
}, O = ({ children: p, onSort: e, sortType: r, className: o, classNameTooltip: s, align: _ = "left", ...n }) => {
|
|
98
|
+
const { translations: d } = x(), [c, i] = w(!1), m = g(
|
|
92
99
|
t.th__wrapper,
|
|
93
|
-
|
|
100
|
+
c ? t["th__wrapper--pressed"] : "",
|
|
94
101
|
e ? t["th__wrapper--clickable"] : "",
|
|
95
|
-
|
|
102
|
+
o
|
|
96
103
|
);
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
|
|
104
|
+
return /* @__PURE__ */ a("th", { ...n, className: t[`cell--${_}-alignment`], children: /* @__PURE__ */ a("span", { className: m, onClick: e && (() => i(!c)), children: e ? /* @__PURE__ */ b(
|
|
105
|
+
f,
|
|
99
106
|
{
|
|
100
|
-
onClose: () =>
|
|
107
|
+
onClose: () => i(!1),
|
|
101
108
|
onSort: e,
|
|
102
|
-
show:
|
|
103
|
-
sortType:
|
|
104
|
-
className:
|
|
105
|
-
t:
|
|
109
|
+
show: c,
|
|
110
|
+
sortType: r,
|
|
111
|
+
className: s,
|
|
112
|
+
t: d,
|
|
106
113
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ a("span", { children: p }),
|
|
115
|
+
/* @__PURE__ */ a("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ a(C, {}) })
|
|
109
116
|
]
|
|
110
117
|
}
|
|
111
|
-
) : /* @__PURE__ */
|
|
118
|
+
) : /* @__PURE__ */ a("span", { children: p }) }) });
|
|
112
119
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
l.THead = H;
|
|
121
|
+
l.THead.displayName = "Table.THead";
|
|
122
|
+
l.TBody = P;
|
|
123
|
+
l.TBody.displayName = "Table.TBody";
|
|
124
|
+
l.Tr = D;
|
|
125
|
+
l.Tr.displayName = "Table.Tr";
|
|
126
|
+
l.Td = M;
|
|
127
|
+
l.Td.displayName = "Table.Td";
|
|
128
|
+
l.Th = O;
|
|
129
|
+
l.Th.displayName = "Table.Th";
|
|
118
130
|
export {
|
|
119
|
-
|
|
131
|
+
P as TBody,
|
|
132
|
+
H as THead,
|
|
133
|
+
l as Table,
|
|
134
|
+
M as Td,
|
|
135
|
+
O as Th,
|
|
136
|
+
D as Tr
|
|
120
137
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: import('./Table').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
THead: import('react').FunctionComponent<import('./Table').ChildrenProps>;
|
|
8
|
+
TBody: import('react').FunctionComponent<import('./Table').ChildrenProps>;
|
|
9
|
+
Tr: import('react').FunctionComponent<import('./Table').TrProps>;
|
|
10
|
+
Td: import('react').FunctionComponent<import('./Table').TdProps>;
|
|
11
|
+
Th: import('react').FunctionComponent<import('./Table').ThProps>;
|
|
12
|
+
};
|
|
13
|
+
tags: string[];
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: string;
|
|
16
|
+
};
|
|
17
|
+
subcomponents: {
|
|
18
|
+
'Table.THead': import('react').FunctionComponent<unknown>;
|
|
19
|
+
'Table.TBody': import('react').FunctionComponent<unknown>;
|
|
20
|
+
'Table.Tr': import('react').FunctionComponent<unknown>;
|
|
21
|
+
'Table.Th': import('react').FunctionComponent<unknown>;
|
|
22
|
+
'Table.Td': import('react').FunctionComponent<unknown>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const WithPagination: Story;
|
|
29
|
+
export declare const WithLanguage: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChildrenProps } from './Table';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChildrenProps } from './Table';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ children, ...rest }: ChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TdProps } from './Table';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ children, onClick, disabled, className, align, ...rest }: TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const WithAlign: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ThProps } from './Table';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ children, onSort, sortType, className, classNameTooltip, align, ...rest }: ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const WithAlign: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TrProps } from './Table';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ children, onClick, disabled, className, ...rest }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const Disabled: Story;
|