@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
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import '../../assets/Chip.css';
|
|
2
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as u, cloneElement as p } from "react";
|
|
4
|
+
import { c as s } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { Icon as f } from "../Icon/Icon.js";
|
|
6
|
+
import "../Button/Button.js";
|
|
7
|
+
import "../Dialog/Backdrop.js";
|
|
8
|
+
import "../Typography/Typography.js";
|
|
9
|
+
import "../IconButton/IconButton.js";
|
|
10
|
+
import "../Select/Select.js";
|
|
11
|
+
import { Skeleton as y } from "../Skeleton/Skeleton.js";
|
|
12
|
+
import "../Table/Table.js";
|
|
13
|
+
import "../Tabs/Tabs.js";
|
|
14
|
+
import { B as g } from "../../Button-B1umG8kJ.js";
|
|
15
|
+
const k = "_h1_1hro6_1", q = "_h2_1hro6_11", C = "_h3_1hro6_21", x = "_h4_1hro6_31", N = "_body_1hro6_41", v = "_quote_1hro6_75", S = "_form__input_1hro6_98", w = "_form__hint_1hro6_103", M = "_form__label_1hro6_108", R = "_form__dropdown_1hro6_113", A = "_table__header_1hro6_131", I = "_table__body_1hro6_136", T = "_button_1hro6_159", j = "_SM_1hro6_178", B = "_chip_1hro6_178", E = "_chip__adornment_1hro6_224", P = "_chip__remove_1hro6_229", e = {
|
|
16
|
+
h1: k,
|
|
17
|
+
"h1--bold": "_h1--bold_1hro6_7",
|
|
18
|
+
h2: q,
|
|
19
|
+
"h2--bold": "_h2--bold_1hro6_17",
|
|
20
|
+
h3: C,
|
|
21
|
+
"h3--bold": "_h3--bold_1hro6_27",
|
|
22
|
+
h4: x,
|
|
23
|
+
"h4--bold": "_h4--bold_1hro6_37",
|
|
24
|
+
body: N,
|
|
25
|
+
"body--large": "_body--large_1hro6_46",
|
|
26
|
+
"body--medium": "_body--medium_1hro6_50",
|
|
27
|
+
"body--small": "_body--small_1hro6_54",
|
|
28
|
+
"body--tiny": "_body--tiny_1hro6_58",
|
|
29
|
+
"body--bold": "_body--bold_1hro6_62",
|
|
30
|
+
"body--strikethrough": "_body--strikethrough_1hro6_65",
|
|
31
|
+
"body--underlined": "_body--underlined_1hro6_68",
|
|
32
|
+
"body--strikethrough-underlined": "_body--strikethrough-underlined_1hro6_71",
|
|
33
|
+
quote: v,
|
|
34
|
+
"quote--large": "_quote--large_1hro6_80",
|
|
35
|
+
"quote--bold": "_quote--bold_1hro6_85",
|
|
36
|
+
"quote--strikethrough": "_quote--strikethrough_1hro6_88",
|
|
37
|
+
"quote--underlined": "_quote--underlined_1hro6_91",
|
|
38
|
+
"quote--strikethrough-underlined": "_quote--strikethrough-underlined_1hro6_94",
|
|
39
|
+
form__input: S,
|
|
40
|
+
form__hint: w,
|
|
41
|
+
form__label: M,
|
|
42
|
+
form__dropdown: R,
|
|
43
|
+
"form--bold": "_form--bold_1hro6_118",
|
|
44
|
+
"form--strikethrough": "_form--strikethrough_1hro6_121",
|
|
45
|
+
"form--underlined": "_form--underlined_1hro6_124",
|
|
46
|
+
"form--strikethrough-underlined": "_form--strikethrough-underlined_1hro6_127",
|
|
47
|
+
table__header: A,
|
|
48
|
+
table__body: I,
|
|
49
|
+
"table__body--secondary": "_table__body--secondary_1hro6_141",
|
|
50
|
+
"table--bold": "_table--bold_1hro6_146",
|
|
51
|
+
"table--strikethrough": "_table--strikethrough_1hro6_149",
|
|
52
|
+
"table--underlined": "_table--underlined_1hro6_152",
|
|
53
|
+
"table--strikethrough-underlined": "_table--strikethrough-underlined_1hro6_155",
|
|
54
|
+
button: T,
|
|
55
|
+
"button--bold": "_button--bold_1hro6_165",
|
|
56
|
+
"button--strikethrough": "_button--strikethrough_1hro6_168",
|
|
57
|
+
"button--underlined": "_button--underlined_1hro6_171",
|
|
58
|
+
"button--strikethrough-underlined": "_button--strikethrough-underlined_1hro6_174",
|
|
59
|
+
SM: j,
|
|
60
|
+
chip: B,
|
|
61
|
+
"SM--bold": "_SM--bold_1hro6_183",
|
|
62
|
+
"chip--button": "_chip--button_1hro6_199",
|
|
63
|
+
"chip--outlined": "_chip--outlined_1hro6_212",
|
|
64
|
+
"chip--contained": "_chip--contained_1hro6_218",
|
|
65
|
+
chip__adornment: E,
|
|
66
|
+
chip__remove: P,
|
|
67
|
+
"chip__remove--disabled": "_chip__remove--disabled_1hro6_240"
|
|
68
|
+
}, z = u((o, _) => {
|
|
69
|
+
const { children: d, onClickContent: h, disabled: l, className: n, variant: a } = o;
|
|
70
|
+
let r = s(
|
|
71
|
+
e.chip,
|
|
72
|
+
{ [e["chip--outlined"]]: a === "outlined" },
|
|
73
|
+
{ [e["chip--contained"]]: a === "contained" },
|
|
74
|
+
n
|
|
75
|
+
);
|
|
76
|
+
return h ? (r += ` ${e["chip--button"]}`, /* @__PURE__ */ t(
|
|
77
|
+
g,
|
|
78
|
+
{
|
|
79
|
+
onClick: h,
|
|
80
|
+
disabled: l,
|
|
81
|
+
"data-testid": o["data-testid"],
|
|
82
|
+
ref: _,
|
|
83
|
+
className: r,
|
|
84
|
+
children: d
|
|
85
|
+
}
|
|
86
|
+
)) : /* @__PURE__ */ t("span", { "data-testid": o["data-testid"], ref: _, className: r, children: d });
|
|
87
|
+
}), U = (o) => {
|
|
88
|
+
const { icon: _, disabled: d = !1, className: h } = o;
|
|
89
|
+
if (_) {
|
|
90
|
+
const l = s(e.chip__adornment, h), n = d ? p(_, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : _;
|
|
91
|
+
return /* @__PURE__ */ t("span", { className: l, children: n });
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}, Y = u((o, _) => {
|
|
95
|
+
const {
|
|
96
|
+
label: d,
|
|
97
|
+
className: h,
|
|
98
|
+
onClickContent: l,
|
|
99
|
+
leftAdornment: n,
|
|
100
|
+
loading: a = !1,
|
|
101
|
+
disabled: r = !1,
|
|
102
|
+
variant: c = "default",
|
|
103
|
+
onClickRemove: b
|
|
104
|
+
} = o;
|
|
105
|
+
return a ? /* @__PURE__ */ t(
|
|
106
|
+
y,
|
|
107
|
+
{
|
|
108
|
+
style: { width: "6rem", height: "2rem", borderRadius: "4rem", display: "inline-flex" },
|
|
109
|
+
"data-testid": o["data-testid-skeleton"]
|
|
110
|
+
}
|
|
111
|
+
) : /* @__PURE__ */ m(
|
|
112
|
+
z,
|
|
113
|
+
{
|
|
114
|
+
ref: _,
|
|
115
|
+
"data-testid": o["data-testid"],
|
|
116
|
+
onClickContent: l,
|
|
117
|
+
disabled: r,
|
|
118
|
+
className: h,
|
|
119
|
+
variant: c,
|
|
120
|
+
children: [
|
|
121
|
+
n && /* @__PURE__ */ t(U, { ...n, disabled: r }),
|
|
122
|
+
d,
|
|
123
|
+
b && /* @__PURE__ */ t(
|
|
124
|
+
"span",
|
|
125
|
+
{
|
|
126
|
+
className: s(e.chip__remove, { [e["chip__remove--disabled"]]: r }),
|
|
127
|
+
role: "button",
|
|
128
|
+
tabIndex: r ? -1 : 0,
|
|
129
|
+
"aria-label": "remove",
|
|
130
|
+
onClick: (i) => {
|
|
131
|
+
i == null || i.stopPropagation(), i == null || i.nativeEvent.stopImmediatePropagation(), b();
|
|
132
|
+
},
|
|
133
|
+
"aria-disabled": r,
|
|
134
|
+
children: /* @__PURE__ */ t(f, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
export {
|
|
142
|
+
Y as Chip
|
|
143
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<{
|
|
6
|
+
label: import('react').ReactNode;
|
|
7
|
+
loading?: boolean | undefined;
|
|
8
|
+
leftAdornment?: import('./Chip').ChipAdornmentSlotProps | undefined;
|
|
9
|
+
'data-testid'?: string | undefined;
|
|
10
|
+
onClickContent?: (() => void) | undefined;
|
|
11
|
+
onClickRemove?: (() => void) | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
variant?: import('./Chip').Variant | undefined;
|
|
15
|
+
'data-testid-skeleton'?: string | undefined;
|
|
16
|
+
} & import('react').RefAttributes<unknown>>;
|
|
17
|
+
tags: string[];
|
|
18
|
+
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
19
|
+
label: import('react').ReactNode;
|
|
20
|
+
loading?: boolean | undefined;
|
|
21
|
+
leftAdornment?: import('./Chip').ChipAdornmentSlotProps | undefined;
|
|
22
|
+
'data-testid'?: string | undefined;
|
|
23
|
+
onClickContent?: (() => void) | undefined;
|
|
24
|
+
onClickRemove?: (() => void) | undefined;
|
|
25
|
+
disabled?: boolean | undefined;
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
variant?: import('./Chip').Variant | undefined;
|
|
28
|
+
'data-testid-skeleton'?: string | undefined;
|
|
29
|
+
ref?: import('react').LegacyRef<unknown> | undefined;
|
|
30
|
+
key?: import('react').Key | null | undefined;
|
|
31
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Simple: Story;
|
|
36
|
+
export declare const Clickable: Story;
|
|
37
|
+
export declare const ClickableWithRemove: Story;
|
|
38
|
+
export declare const FullDefault: Story;
|
|
39
|
+
export declare const FullOutlined: Story;
|
|
40
|
+
export declare const FullContained: Story;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Chip as i } from "./Chip.js";
|
|
3
|
+
import { Icon as e } from "../Icon/Icon.js";
|
|
4
|
+
import "../Button/Button.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../Dialog/Backdrop.js";
|
|
7
|
+
import "../Typography/Typography.js";
|
|
8
|
+
import "../IconButton/IconButton.js";
|
|
9
|
+
import "../Select/Select.js";
|
|
10
|
+
import "../Table/Table.js";
|
|
11
|
+
import "../Tabs/Tabs.js";
|
|
12
|
+
const f = {
|
|
13
|
+
title: "Components/Chip",
|
|
14
|
+
component: i,
|
|
15
|
+
tags: ["autodocs"],
|
|
16
|
+
decorators: [
|
|
17
|
+
(s) => /* @__PURE__ */ a("div", { style: { padding: "1em" }, children: /* @__PURE__ */ a(s, {}) })
|
|
18
|
+
]
|
|
19
|
+
}, r = {
|
|
20
|
+
args: {
|
|
21
|
+
label: "Example text"
|
|
22
|
+
}
|
|
23
|
+
}, t = {
|
|
24
|
+
args: {
|
|
25
|
+
...r == null ? void 0 : r.args,
|
|
26
|
+
onClickContent: () => alert("Button was clicked!")
|
|
27
|
+
}
|
|
28
|
+
}, n = {
|
|
29
|
+
args: {
|
|
30
|
+
...t == null ? void 0 : t.args,
|
|
31
|
+
onClickRemove: () => alert("Remove changes!")
|
|
32
|
+
}
|
|
33
|
+
}, o = {
|
|
34
|
+
args: {
|
|
35
|
+
...n == null ? void 0 : n.args,
|
|
36
|
+
leftAdornment: {
|
|
37
|
+
icon: /* @__PURE__ */ a(e, { icon: "calendar-days", color: "rgba(var(--gray-95-rgb), 0.45)", size: "1.125rem" })
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, b = {
|
|
41
|
+
args: {
|
|
42
|
+
...o == null ? void 0 : o.args,
|
|
43
|
+
variant: "outlined"
|
|
44
|
+
}
|
|
45
|
+
}, j = {
|
|
46
|
+
args: {
|
|
47
|
+
...o == null ? void 0 : o.args,
|
|
48
|
+
variant: "contained"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
t as Clickable,
|
|
53
|
+
n as ClickableWithRemove,
|
|
54
|
+
j as FullContained,
|
|
55
|
+
o as FullDefault,
|
|
56
|
+
b as FullOutlined,
|
|
57
|
+
r as Simple,
|
|
58
|
+
f as default
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|