@pismo/marola 0.0.1-alpha.4 → 0.0.1-alpha.5
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 +4 -3
- package/dist/{Button-C3Qm852g.js → Button-D--uN90N.js} +6 -5
- package/dist/Dialog.module-BKWFakxu.js +15 -0
- package/dist/{ListContext-D6-YwtZn.js → ListContext-Dj2Va7Iv.js} +2 -2
- package/dist/{Tabs.module-_kSbSyth.js → Tabs.module-BKlNuSPH.js} +20 -20
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.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/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/components/Button/Button.d.ts +21 -0
- package/dist/components/Button/Button.js +54 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +2 -9
- package/dist/components/Dialog/CloseIconButton.js +3 -3
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/Dialog/Dialog.js +22 -26
- package/dist/components/Dialog/Title.js +22 -7
- package/dist/components/IconButton/IconButton.d.ts +22 -0
- package/dist/components/IconButton/IconButton.js +79 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
- package/dist/components/PageHeader/PageHeader.d.ts +26 -0
- package/dist/components/PageHeader/PageHeader.js +69 -0
- package/dist/components/Pagination/Pagination.d.ts +36 -0
- package/dist/components/Pagination/Pagination.js +219 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -0
- package/dist/components/SortTooltip/SortTooltip.js +1 -0
- package/dist/components/Table/Table.d.ts +0 -0
- package/dist/components/Table/Table.js +1 -0
- package/dist/components/Table/TableContext.d.ts +0 -0
- package/dist/components/Table/TableContext.js +1 -0
- package/dist/components/Tabs/Tab.js +42 -37
- package/dist/components/Tabs/TabPanel.js +20 -21
- package/dist/components/Tabs/Tabs.js +185 -214
- package/dist/components/Tooltip/Tooltip.d.ts +0 -0
- package/dist/components/Tooltip/Tooltip.js +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +38 -47
- package/dist/{index-BZ1lkM_M.js → index-BvA1HyDs.js} +274 -293
- package/dist/main.d.ts +4 -1
- package/dist/main.js +22 -15
- package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
- package/dist/types/helpers.d.ts +6 -7
- package/dist/{useButton-CbmjmH5z.js → useButton-abQpo0za.js} +17 -16
- package/dist/{useCompoundItem-B7wfGDHQ.js → useCompoundItem-wTwXbURC.js} +1 -1
- package/dist/useControlled-CCMYYdCM.js +31 -0
- package/package.json +26 -6
- package/dist/Dialog.module-BO0mdB7d.js +0 -15
- package/dist/assets/CallToActionButton.css +0 -1
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -21
- package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
- package/src/playground/Playground.tsx +0 -20
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
export type VariantType =
|
|
3
|
+
export type VariantType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-large' | 'body-medium' | 'body' | 'body-small' | 'body-tiny' | 'quote-large' | 'quote' | 'form-input' | 'form-label' | 'form-hint' | 'form-dropdown' | 'table-header' | 'table-body' | 'table-body-secondary' | 'button' | 'link';
|
|
4
4
|
export type CommonTypographyHTMLAttributes = HTMLAttributes<HTMLParagraphElement> & HTMLAttributes<HTMLHeadingElement> & HTMLAttributes<HTMLSpanElement> & HTMLAttributes<HTMLTableCellElement>;
|
|
5
5
|
export type TypographyProps = {
|
|
6
6
|
children: ReactNode;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import '../../assets/Typography.css';
|
|
2
2
|
import { jsx as y } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c
|
|
5
|
-
const
|
|
6
|
-
h1:
|
|
7
|
-
"h1--bold": "_h1--
|
|
8
|
-
h2:
|
|
9
|
-
"h2--bold": "_h2--
|
|
10
|
-
h3:
|
|
11
|
-
"h3--bold": "_h3--
|
|
12
|
-
h4:
|
|
13
|
-
"h4--bold": "_h4--
|
|
14
|
-
body:
|
|
15
|
-
"body--large": "_body--
|
|
16
|
-
"body--medium": "_body--
|
|
17
|
-
"body--small": "_body--
|
|
18
|
-
"body--tiny": "_body--
|
|
19
|
-
"body--bold": "_body--
|
|
20
|
-
"body--strikethrough": "_body--
|
|
21
|
-
"body--underlined": "_body--
|
|
22
|
-
"body--strikethrough-underlined": "_body--strikethrough-
|
|
23
|
-
quote:
|
|
24
|
-
"quote--large": "_quote--
|
|
25
|
-
form__input:
|
|
26
|
-
form__hint:
|
|
3
|
+
import { forwardRef as k, useMemo as u } from "react";
|
|
4
|
+
import { c } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
const v = "_h1_nv7ki_1", f = "_h2_nv7ki_11", p = "_h3_nv7ki_21", g = "_h4_nv7ki_31", q = "_body_nv7ki_41", T = "_quote_nv7ki_75", $ = "_form__input_nv7ki_86", w = "_form__hint_nv7ki_91", x = "_form__label_nv7ki_96", N = "_form__dropdown_nv7ki_101", S = "_table__header_nv7ki_107", E = "_table__body_nv7ki_112", V = "_button_nv7ki_123", n = {
|
|
6
|
+
h1: v,
|
|
7
|
+
"h1--bold": "_h1--bold_nv7ki_7",
|
|
8
|
+
h2: f,
|
|
9
|
+
"h2--bold": "_h2--bold_nv7ki_17",
|
|
10
|
+
h3: p,
|
|
11
|
+
"h3--bold": "_h3--bold_nv7ki_27",
|
|
12
|
+
h4: g,
|
|
13
|
+
"h4--bold": "_h4--bold_nv7ki_37",
|
|
14
|
+
body: q,
|
|
15
|
+
"body--large": "_body--large_nv7ki_46",
|
|
16
|
+
"body--medium": "_body--medium_nv7ki_50",
|
|
17
|
+
"body--small": "_body--small_nv7ki_54",
|
|
18
|
+
"body--tiny": "_body--tiny_nv7ki_58",
|
|
19
|
+
"body--bold": "_body--bold_nv7ki_62",
|
|
20
|
+
"body--strikethrough": "_body--strikethrough_nv7ki_65",
|
|
21
|
+
"body--underlined": "_body--underlined_nv7ki_68",
|
|
22
|
+
"body--strikethrough-underlined": "_body--strikethrough-underlined_nv7ki_71",
|
|
23
|
+
quote: T,
|
|
24
|
+
"quote--large": "_quote--large_nv7ki_80",
|
|
25
|
+
form__input: $,
|
|
26
|
+
form__hint: w,
|
|
27
27
|
form__label: x,
|
|
28
28
|
form__dropdown: N,
|
|
29
|
-
table__header:
|
|
29
|
+
table__header: S,
|
|
30
30
|
table__body: E,
|
|
31
|
-
"table__body--secondary": "_table__body--
|
|
31
|
+
"table__body--secondary": "_table__body--secondary_nv7ki_117",
|
|
32
32
|
button: V
|
|
33
33
|
}, j = (e) => {
|
|
34
34
|
const _ = e.toString();
|
|
@@ -36,36 +36,27 @@ const p = "_h1_111i6_1", g = "_h2_111i6_11", k = "_h3_111i6_21", q = "_h4_111i6_
|
|
|
36
36
|
return _.match(/^h[1-4]/) ? o = _ : _.match(/^h[5-6]/) && (o = "h4"), _ === "th" && (o = "table-header"), _ === "td" && (o = "table-body"), o;
|
|
37
37
|
}, z = (e) => {
|
|
38
38
|
let _ = e.replace(/^([a-z]*)-/, "$1__");
|
|
39
|
-
return _ = _.replace(new RegExp("(?<!-)-(?!-)", "g"), "--"),
|
|
40
|
-
}, R =
|
|
39
|
+
return _ = _.replace(new RegExp("(?<!-)-(?!-)", "g"), "--"), _;
|
|
40
|
+
}, R = k((e, _) => {
|
|
41
41
|
const {
|
|
42
42
|
dataTestId: o,
|
|
43
43
|
children: b,
|
|
44
44
|
className: l,
|
|
45
|
-
underline:
|
|
45
|
+
underline: d = !1,
|
|
46
46
|
element: i = "span",
|
|
47
47
|
bold: a = !1,
|
|
48
48
|
variant: t = j(i),
|
|
49
|
-
strikethrough:
|
|
49
|
+
strikethrough: r = !1,
|
|
50
50
|
elementProps: s
|
|
51
|
-
} = e, h = i, m =
|
|
52
|
-
|
|
51
|
+
} = e, h = i, m = u(() => c(
|
|
52
|
+
n[z(t)],
|
|
53
53
|
l,
|
|
54
|
-
{ [
|
|
55
|
-
{ [
|
|
56
|
-
{ [
|
|
57
|
-
{ [
|
|
58
|
-
), [a, l,
|
|
59
|
-
return /* @__PURE__ */ y(
|
|
60
|
-
h,
|
|
61
|
-
{
|
|
62
|
-
ref: _,
|
|
63
|
-
"data-testid": o,
|
|
64
|
-
...s != null && s,
|
|
65
|
-
className: m,
|
|
66
|
-
children: b
|
|
67
|
-
}
|
|
68
|
-
);
|
|
54
|
+
{ [n[`${t}--bold`]]: a },
|
|
55
|
+
{ [n[`${t}--underlined`]]: d },
|
|
56
|
+
{ [n[`${t}--strikethrough`]]: r },
|
|
57
|
+
{ [n[`${t}--strikethrough-underlined`]]: r && r && d }
|
|
58
|
+
), [a, l, r, d, t]);
|
|
59
|
+
return /* @__PURE__ */ y(h, { ref: _, "data-testid": o, ...s != null && s, className: m, children: b });
|
|
69
60
|
});
|
|
70
61
|
export {
|
|
71
62
|
R as Typography,
|