@pismo/marola 0.0.1-alpha.12 → 0.0.1-alpha.14
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/Dialog.module-B8COssqi.js +15 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Chip.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Advice/Advice.d.ts +12 -0
- package/dist/components/Advice/Advice.stories.d.ts +16 -0
- package/dist/components/Advice/Advice.stories.js +48 -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 +1 -2
- 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/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.js +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Dialog/Dialog.stories.js +1 -2
- package/dist/components/Dialog/Title.js +1 -1
- 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 +1 -2
- package/dist/components/Select/Select.stories.js +1 -2
- package/dist/components/Table/Table.js +64 -64
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +76 -74
- package/dist/components/Typography/Typography.stories.js +1 -2
- package/dist/components/Typography/typography.test.js +195 -11319
- package/dist/main.d.ts +1 -0
- package/dist/main.js +57 -57
- package/dist/react.esm-DGd9_oKA.js +11126 -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 +2 -2
- package/dist/Dialog.module-CGVM5V_D.js +0 -15
- package/dist/assets/global.css +0 -1
|
@@ -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,37 +1,37 @@
|
|
|
1
1
|
import '../../assets/Table.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
2
|
+
import { jsxs as b, jsx as r, Fragment as v } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { useState as T } from "react";
|
|
5
5
|
import { c as h } from "../../clsx-DB4S2d7J.js";
|
|
6
|
-
import { paginationDefaultTranslations as
|
|
7
|
-
import { sortTooltipDefaultTranslations as x, SortTooltip as
|
|
6
|
+
import { paginationDefaultTranslations as w, Pagination as u } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as x, SortTooltip as g } from "../SortTooltip/SortTooltip.js";
|
|
8
8
|
import { TableProvider as N, useTable as C } from "./TableContext.js";
|
|
9
|
-
const L = (l) => /* @__PURE__ */
|
|
9
|
+
const L = (l) => /* @__PURE__ */ n.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ n.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ n.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__ */ n.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__ */ n.createElement("defs", null, /* @__PURE__ */ n.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ n.createElement("rect", { width: 7, height: 10, fill: "white" })))), E = "_table_olvxb_1", y = "_th__wrapper_olvxb_40", P = "_tr_olvxb_58", B = "_td_olvxb_62", t = {
|
|
10
10
|
table: E,
|
|
11
|
-
"table--full-width": "_table--full-
|
|
12
|
-
"table--white-theme": "_table--white-
|
|
13
|
-
"table--transparent-theme": "_table--transparent-
|
|
14
|
-
"cell--left-alignment": "_cell--left-
|
|
15
|
-
"cell--center-alignment": "_cell--center-
|
|
16
|
-
"cell--right-alignment": "_cell--right-
|
|
17
|
-
th__wrapper:
|
|
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-
|
|
28
|
-
},
|
|
11
|
+
"table--full-width": "_table--full-width_olvxb_5",
|
|
12
|
+
"table--white-theme": "_table--white-theme_olvxb_8",
|
|
13
|
+
"table--transparent-theme": "_table--transparent-theme_olvxb_11",
|
|
14
|
+
"cell--left-alignment": "_cell--left-alignment_olvxb_14",
|
|
15
|
+
"cell--center-alignment": "_cell--center-alignment_olvxb_18",
|
|
16
|
+
"cell--right-alignment": "_cell--right-alignment_olvxb_22",
|
|
17
|
+
th__wrapper: y,
|
|
18
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_olvxb_43",
|
|
19
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_olvxb_47",
|
|
20
|
+
"th__sort-icon-container": "_th__sort-icon-container_olvxb_50",
|
|
21
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_olvxb_58",
|
|
22
|
+
tr: P,
|
|
23
|
+
td: B,
|
|
24
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_olvxb_67",
|
|
25
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_olvxb_68",
|
|
26
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_olvxb_72",
|
|
27
|
+
"td-wrapper": "_td-wrapper_olvxb_76"
|
|
28
|
+
}, D = {
|
|
29
29
|
pt: {
|
|
30
|
-
...
|
|
30
|
+
...w.pt,
|
|
31
31
|
...x.pt
|
|
32
32
|
},
|
|
33
33
|
en: {
|
|
34
|
-
...
|
|
34
|
+
...w.en,
|
|
35
35
|
...x.en
|
|
36
36
|
},
|
|
37
37
|
// example to add a new language translation
|
|
@@ -48,75 +48,75 @@ const L = (l) => /* @__PURE__ */ c.createElement("svg", { width: 7, height: 10,
|
|
|
48
48
|
children: l,
|
|
49
49
|
theme: e = "white",
|
|
50
50
|
fullWidth: a = !0,
|
|
51
|
-
className:
|
|
52
|
-
paginationProps:
|
|
53
|
-
language:
|
|
54
|
-
translations:
|
|
51
|
+
className: s,
|
|
52
|
+
paginationProps: o,
|
|
53
|
+
language: _,
|
|
54
|
+
translations: c,
|
|
55
55
|
...m
|
|
56
56
|
}) => {
|
|
57
|
-
const
|
|
57
|
+
const i = h(
|
|
58
58
|
t.table,
|
|
59
59
|
a ? t["table--full-width"] : "",
|
|
60
60
|
t[`table--${e}-theme`],
|
|
61
|
-
|
|
62
|
-
),
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */ r("table", { ...m, className:
|
|
65
|
-
|
|
61
|
+
s
|
|
62
|
+
), p = _ && D[_] || c;
|
|
63
|
+
return /* @__PURE__ */ b(N, { initialTranslations: p, children: [
|
|
64
|
+
/* @__PURE__ */ r("table", { ...m, className: i, children: l }),
|
|
65
|
+
o && /* @__PURE__ */ r(u, { ...o, t: p })
|
|
66
66
|
] });
|
|
67
|
-
},
|
|
68
|
-
const
|
|
67
|
+
}, F = ({ children: l, ...e }) => /* @__PURE__ */ r("thead", { ...e, children: l }), M = ({ children: l, ...e }) => /* @__PURE__ */ r("tbody", { ...e, children: l }), O = ({ children: l, onClick: e, disabled: a, className: s, ...o }) => {
|
|
68
|
+
const _ = h(
|
|
69
69
|
t.tr,
|
|
70
70
|
e && !a ? t["tr__row-or-cell--clickable"] : a ? t["tr__row-or-cell--disabled"] : "",
|
|
71
|
-
|
|
71
|
+
s
|
|
72
72
|
);
|
|
73
|
-
return /* @__PURE__ */ r("tr", { ...
|
|
74
|
-
},
|
|
75
|
-
const
|
|
73
|
+
return /* @__PURE__ */ r("tr", { ...o, className: _, onClick: () => !a && (e == null ? void 0 : e()), children: l });
|
|
74
|
+
}, $ = ({ children: l, onClick: e, disabled: a, className: s, align: o = "left", ..._ }) => {
|
|
75
|
+
const c = h(
|
|
76
76
|
t.td,
|
|
77
77
|
e && !a ? t["td__row-or-cell--clickable"] : a ? t["td__row-or-cell--disabled"] : "",
|
|
78
|
-
t[`cell--${
|
|
79
|
-
|
|
78
|
+
t[`cell--${o}-alignment`],
|
|
79
|
+
s
|
|
80
80
|
);
|
|
81
|
-
return /* @__PURE__ */ r("td", { ...
|
|
82
|
-
},
|
|
81
|
+
return /* @__PURE__ */ r("td", { ..._, className: c, onClick: () => !a && (e == null ? void 0 : e()), children: /* @__PURE__ */ r("span", { className: t["td-wrapper"], children: l }) });
|
|
82
|
+
}, j = ({
|
|
83
83
|
children: l,
|
|
84
84
|
onSort: e,
|
|
85
85
|
sortType: a,
|
|
86
|
-
className:
|
|
87
|
-
classNameTooltip:
|
|
88
|
-
align:
|
|
89
|
-
...
|
|
86
|
+
className: s,
|
|
87
|
+
classNameTooltip: o,
|
|
88
|
+
align: _ = "left",
|
|
89
|
+
...c
|
|
90
90
|
}) => {
|
|
91
|
-
const { translations: m } = C(), [
|
|
91
|
+
const { translations: m } = C(), [i, p] = T(!1), f = h(
|
|
92
92
|
t.th__wrapper,
|
|
93
|
-
|
|
93
|
+
i ? t["th__wrapper--pressed"] : "",
|
|
94
94
|
e ? t["th__wrapper--clickable"] : "",
|
|
95
|
-
|
|
95
|
+
s
|
|
96
96
|
);
|
|
97
|
-
return /* @__PURE__ */ r("th", { ...
|
|
97
|
+
return /* @__PURE__ */ r("th", { ...c, className: t[`cell--${_}-alignment`], children: /* @__PURE__ */ b("span", { className: f, onClick: e && (() => p(!i)), children: [
|
|
98
98
|
/* @__PURE__ */ r("span", { children: l }),
|
|
99
|
-
e && /* @__PURE__ */
|
|
99
|
+
e && /* @__PURE__ */ b(v, { children: [
|
|
100
100
|
/* @__PURE__ */ r("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ r(L, {}) }),
|
|
101
101
|
/* @__PURE__ */ r(
|
|
102
|
-
|
|
102
|
+
g,
|
|
103
103
|
{
|
|
104
|
-
onClose: () =>
|
|
104
|
+
onClose: () => p(!1),
|
|
105
105
|
onSort: e,
|
|
106
|
-
show:
|
|
106
|
+
show: i,
|
|
107
107
|
sortType: a,
|
|
108
|
-
className:
|
|
108
|
+
className: o,
|
|
109
109
|
t: m
|
|
110
110
|
}
|
|
111
111
|
)
|
|
112
112
|
] })
|
|
113
113
|
] }) });
|
|
114
114
|
};
|
|
115
|
-
d.THead =
|
|
116
|
-
d.TBody =
|
|
117
|
-
d.Tr =
|
|
118
|
-
d.Td =
|
|
119
|
-
d.Th =
|
|
115
|
+
d.THead = F;
|
|
116
|
+
d.TBody = M;
|
|
117
|
+
d.Tr = O;
|
|
118
|
+
d.Td = $;
|
|
119
|
+
d.Th = j;
|
|
120
120
|
export {
|
|
121
121
|
d as Table
|
|
122
122
|
};
|
|
@@ -9,7 +9,7 @@ export type TypographyProps = {
|
|
|
9
9
|
element?: ElementType;
|
|
10
10
|
/** Style to be visually displayed as */
|
|
11
11
|
variant?: VariantType;
|
|
12
|
-
/** Space
|
|
12
|
+
/** Space separated list of CSS classes to apply */
|
|
13
13
|
className?: string;
|
|
14
14
|
/** Whether to apply underline text decoration */
|
|
15
15
|
underline?: boolean;
|
|
@@ -1,81 +1,83 @@
|
|
|
1
1
|
import '../../assets/Typography.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { bemify as g, getBEMBase as
|
|
5
|
-
import { c as
|
|
6
|
-
const E = "
|
|
7
|
-
h1:
|
|
8
|
-
"h1--bold": "_h1--
|
|
9
|
-
h2:
|
|
10
|
-
"h2--bold": "_h2--
|
|
11
|
-
h3:
|
|
12
|
-
"h3--bold": "_h3--
|
|
13
|
-
h4:
|
|
14
|
-
"h4--bold": "_h4--
|
|
15
|
-
body:
|
|
16
|
-
"body--large": "_body--
|
|
17
|
-
"body--medium": "_body--
|
|
18
|
-
"body--small": "_body--
|
|
19
|
-
"body--tiny": "_body--
|
|
20
|
-
"body--bold": "_body--
|
|
21
|
-
"body--strikethrough": "_body--
|
|
22
|
-
"body--underlined": "_body--
|
|
23
|
-
"body--strikethrough-underlined": "_body--strikethrough-
|
|
24
|
-
quote:
|
|
25
|
-
"quote--large": "_quote--
|
|
26
|
-
"quote--bold": "_quote--
|
|
27
|
-
"quote--strikethrough": "_quote--
|
|
28
|
-
"quote--underlined": "_quote--
|
|
29
|
-
"quote--strikethrough-underlined": "_quote--strikethrough-
|
|
30
|
-
form__input:
|
|
31
|
-
form__hint:
|
|
32
|
-
form__label:
|
|
33
|
-
form__dropdown:
|
|
34
|
-
"form--bold": "_form--
|
|
35
|
-
"form--strikethrough": "_form--
|
|
36
|
-
"form--underlined": "_form--
|
|
37
|
-
"form--strikethrough-underlined": "_form--strikethrough-
|
|
38
|
-
table__header:
|
|
39
|
-
table__body:
|
|
40
|
-
"table__body--secondary": "_table__body--
|
|
41
|
-
"table--bold": "_table--
|
|
42
|
-
"table--strikethrough": "_table--
|
|
43
|
-
"table--underlined": "_table--
|
|
44
|
-
"table--strikethrough-underlined": "_table--strikethrough-
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f, useMemo as y } from "react";
|
|
4
|
+
import { bemify as g, getBEMBase as p, getBEMBlock as q } from "../../utils/styleStrings.js";
|
|
5
|
+
import { c as M } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
const B = "_h1_1elsk_1", E = "_h2_1elsk_11", S = "_h3_1elsk_21", $ = "_h4_1elsk_31", w = "_body_1elsk_41", v = "_quote_1elsk_75", x = "_form__input_1elsk_98", N = "_form__hint_1elsk_103", T = "_form__label_1elsk_108", j = "_form__dropdown_1elsk_113", P = "_table__header_1elsk_131", R = "_table__body_1elsk_136", U = "_button_1elsk_159", V = "_SM_1elsk_178", t = {
|
|
7
|
+
h1: B,
|
|
8
|
+
"h1--bold": "_h1--bold_1elsk_7",
|
|
9
|
+
h2: E,
|
|
10
|
+
"h2--bold": "_h2--bold_1elsk_17",
|
|
11
|
+
h3: S,
|
|
12
|
+
"h3--bold": "_h3--bold_1elsk_27",
|
|
13
|
+
h4: $,
|
|
14
|
+
"h4--bold": "_h4--bold_1elsk_37",
|
|
15
|
+
body: w,
|
|
16
|
+
"body--large": "_body--large_1elsk_46",
|
|
17
|
+
"body--medium": "_body--medium_1elsk_50",
|
|
18
|
+
"body--small": "_body--small_1elsk_54",
|
|
19
|
+
"body--tiny": "_body--tiny_1elsk_58",
|
|
20
|
+
"body--bold": "_body--bold_1elsk_62",
|
|
21
|
+
"body--strikethrough": "_body--strikethrough_1elsk_65",
|
|
22
|
+
"body--underlined": "_body--underlined_1elsk_68",
|
|
23
|
+
"body--strikethrough-underlined": "_body--strikethrough-underlined_1elsk_71",
|
|
24
|
+
quote: v,
|
|
25
|
+
"quote--large": "_quote--large_1elsk_80",
|
|
26
|
+
"quote--bold": "_quote--bold_1elsk_85",
|
|
27
|
+
"quote--strikethrough": "_quote--strikethrough_1elsk_88",
|
|
28
|
+
"quote--underlined": "_quote--underlined_1elsk_91",
|
|
29
|
+
"quote--strikethrough-underlined": "_quote--strikethrough-underlined_1elsk_94",
|
|
30
|
+
form__input: x,
|
|
31
|
+
form__hint: N,
|
|
32
|
+
form__label: T,
|
|
33
|
+
form__dropdown: j,
|
|
34
|
+
"form--bold": "_form--bold_1elsk_118",
|
|
35
|
+
"form--strikethrough": "_form--strikethrough_1elsk_121",
|
|
36
|
+
"form--underlined": "_form--underlined_1elsk_124",
|
|
37
|
+
"form--strikethrough-underlined": "_form--strikethrough-underlined_1elsk_127",
|
|
38
|
+
table__header: P,
|
|
39
|
+
table__body: R,
|
|
40
|
+
"table__body--secondary": "_table__body--secondary_1elsk_141",
|
|
41
|
+
"table--bold": "_table--bold_1elsk_146",
|
|
42
|
+
"table--strikethrough": "_table--strikethrough_1elsk_149",
|
|
43
|
+
"table--underlined": "_table--underlined_1elsk_152",
|
|
44
|
+
"table--strikethrough-underlined": "_table--strikethrough-underlined_1elsk_155",
|
|
45
45
|
button: U,
|
|
46
|
-
"button--bold": "_button--
|
|
47
|
-
"button--strikethrough": "_button--
|
|
48
|
-
"button--underlined": "_button--
|
|
49
|
-
"button--strikethrough-underlined": "_button--strikethrough-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
"button--bold": "_button--bold_1elsk_165",
|
|
47
|
+
"button--strikethrough": "_button--strikethrough_1elsk_168",
|
|
48
|
+
"button--underlined": "_button--underlined_1elsk_171",
|
|
49
|
+
"button--strikethrough-underlined": "_button--strikethrough-underlined_1elsk_174",
|
|
50
|
+
SM: V,
|
|
51
|
+
"SM--bold": "_SM--bold_1elsk_183"
|
|
52
|
+
}, W = ["form", "table"], z = (o) => {
|
|
53
|
+
const e = o.toString();
|
|
54
|
+
let _ = "body";
|
|
55
|
+
return e.match(/^h[1-4]/) ? _ = e : e.match(/^h[5-6]/) && (_ = "h4"), e === "th" && (_ = "table-header"), e === "td" && (_ = "table-body"), _;
|
|
56
|
+
}, G = f((o, e) => {
|
|
55
57
|
const {
|
|
56
|
-
children:
|
|
57
|
-
className:
|
|
58
|
-
underline:
|
|
59
|
-
element:
|
|
60
|
-
bold:
|
|
61
|
-
variant:
|
|
62
|
-
strikethrough:
|
|
63
|
-
elementProps:
|
|
64
|
-
} =
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
{ [
|
|
69
|
-
|
|
70
|
-
{ [
|
|
71
|
-
{ [
|
|
72
|
-
{ [
|
|
73
|
-
{ [
|
|
58
|
+
children: _,
|
|
59
|
+
className: n,
|
|
60
|
+
underline: d = !1,
|
|
61
|
+
element: b = "span",
|
|
62
|
+
bold: h = !1,
|
|
63
|
+
variant: u = z(b),
|
|
64
|
+
strikethrough: l = !1,
|
|
65
|
+
elementProps: k
|
|
66
|
+
} = o, a = b, m = y(() => {
|
|
67
|
+
const r = g(u, W), i = p(r), s = q(r);
|
|
68
|
+
return M(
|
|
69
|
+
t[i],
|
|
70
|
+
{ [t[`${r}`]]: r !== i },
|
|
71
|
+
n,
|
|
72
|
+
{ [t[`${s}--bold`]]: h },
|
|
73
|
+
{ [t[`${s}--underlined`]]: d },
|
|
74
|
+
{ [t[`${s}--strikethrough`]]: l },
|
|
75
|
+
{ [t[`${s}--strikethrough-underlined`]]: l && l && d }
|
|
74
76
|
);
|
|
75
|
-
}, [
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
+
}, [h, n, l, d, u]);
|
|
78
|
+
return /* @__PURE__ */ c(a, { ref: e, "data-testid": o["data-testid"], ...k ?? {}, className: m, children: _ });
|
|
77
79
|
});
|
|
78
80
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
G as Typography,
|
|
82
|
+
G as default
|
|
81
83
|
};
|