@pismo/marola 1.0.0-beta.7 → 1.0.0-beta.9
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-DFcZsVAd.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-f5brSwAI.js +175 -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/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/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/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 +50 -0
- package/dist/components/Autocomplete/Autocomplete.js +689 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +45 -0
- package/dist/components/Button/Button.js +48 -48
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +2 -2
- package/dist/components/Dialog/Dialog.js +13 -12
- package/dist/components/Dialog/Dialog.stories.d.ts +43 -43
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.js +74 -471
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.js +70 -70
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +8 -7
- package/dist/components/Select/SelectButton.js +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/Table/Table.js +96 -96
- 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/Toggle/Toggle.js +55 -55
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +77 -75
- 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 +1 -1
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BWF0-SPB.js +0 -175
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import '../../assets/Advice.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Icon as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"u-typography-h6": "_u-typography-h6_12o7p_36",
|
|
12
|
-
"u-typography-base": "_u-typography-base_12o7p_43",
|
|
13
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_12o7p_48",
|
|
14
|
-
"u-typography-base--xl": "_u-typography-base--xl_12o7p_52",
|
|
15
|
-
"u-typography-base--lg": "_u-typography-base--lg_12o7p_56",
|
|
16
|
-
advice: n,
|
|
17
|
-
content: d,
|
|
18
|
-
"u-typography-base--sm": "_u-typography-base--sm_12o7p_61",
|
|
19
|
-
"u-typography-base--bold": "_u-typography-base--bold_12o7p_65",
|
|
20
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_12o7p_69",
|
|
21
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_12o7p_72",
|
|
22
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_12o7p_75",
|
|
23
|
-
"content-no-items": "_content-no-items_12o7p_90"
|
|
24
|
-
}, m = {
|
|
2
|
+
import { jsxs as _, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { c as g } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Icon as h } from "../Icon/Icon.js";
|
|
5
|
+
import { Typography as m } from "../Typography/Typography.js";
|
|
6
|
+
const x = "_advice_1wls4_1", f = "_advice__texts_1wls4_8", u = "_advice__content_1wls4_14", c = {
|
|
7
|
+
advice: x,
|
|
8
|
+
advice__texts: f,
|
|
9
|
+
advice__content: u
|
|
10
|
+
}, b = {
|
|
25
11
|
"no-permission": "eye-slash",
|
|
26
12
|
"no-items": "",
|
|
27
13
|
"error-page": "circle-exclamation",
|
|
28
14
|
"without-results": "folder-magnifying-glass"
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
15
|
+
}, T = ({
|
|
16
|
+
type: e,
|
|
17
|
+
icon: a,
|
|
18
|
+
iconSvg: i,
|
|
19
|
+
content: t,
|
|
20
|
+
title: l,
|
|
21
|
+
titleProps: o = { variant: "base-xxl", color: "var(--gray-75)", bold: !0 },
|
|
22
|
+
description: n,
|
|
23
|
+
descriptionProps: s = { variant: "base-lg", color: "var(--gray-75)" },
|
|
24
|
+
className: v,
|
|
25
|
+
...d
|
|
26
|
+
}) => (e && (a = { icon: b[e] }, (e === "without-results" || e === "no-permission") && (o = Object.assign({}, o, { variant: "base-lg" })), e === "no-items" && (s = Object.assign({}, s, {
|
|
27
|
+
elementProps: { style: { maxWidth: 460, color: s.color } }
|
|
28
|
+
})), e === "error-page" && (a.color = "var(--secondary-orange)")), /* @__PURE__ */ _("div", { className: g(c.advice, v), ...d, children: [
|
|
29
|
+
(a == null ? void 0 : a.icon) && /* @__PURE__ */ r(h, { icon: a.icon, size: a.size || "3.375rem", color: a.color || "var(--accent)" }),
|
|
30
|
+
i && i,
|
|
31
|
+
/* @__PURE__ */ _(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: c.advice__texts,
|
|
35
|
+
style: e === "without-results" || e === "no-permission" ? { marginTop: -16 } : {},
|
|
36
|
+
children: [
|
|
37
|
+
l && /* @__PURE__ */ r(m, { element: "h3", ...o, children: l }),
|
|
38
|
+
n && /* @__PURE__ */ r(m, { element: "p", ...s, children: n })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ r("div", { className: c.advice__content, children: t && t })
|
|
43
|
+
] }));
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
T as Advice
|
|
47
46
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ icon,
|
|
5
|
+
component: ({ type, icon, iconSvg: IconSvg, content, title, titleProps, description, descriptionProps, className, ...rest }: import('./Advice').AdviceProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
|
@@ -12,7 +12,8 @@ export default meta;
|
|
|
12
12
|
type Story = StoryObj<typeof meta>;
|
|
13
13
|
export declare const WithoutResults: Story;
|
|
14
14
|
export declare const NoPermission: Story;
|
|
15
|
-
export declare const CustomIcon: Story;
|
|
16
|
-
export declare const CustomIconSVG: Story;
|
|
17
15
|
export declare const NoItems: Story;
|
|
18
16
|
export declare const ErrorPage: Story;
|
|
17
|
+
export declare const CustomIcon: Story;
|
|
18
|
+
export declare const CustomIconSVG: Story;
|
|
19
|
+
export declare const TotallyCustom: Story;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
type AutocompleteProps<T> = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
/** Label text */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Options array */
|
|
7
|
+
options?: Array<T>;
|
|
8
|
+
/** callback for new option selected */
|
|
9
|
+
onChange?: (event: SyntheticEvent<Element, Event>, newValue: T) => void;
|
|
10
|
+
/** Info message text */
|
|
11
|
+
infoMessage?: string;
|
|
12
|
+
/** Error message text */
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
/** Left icon element */
|
|
15
|
+
leftIcon?: ReactNode;
|
|
16
|
+
/** Right icon element */
|
|
17
|
+
rightIcon?: ReactNode;
|
|
18
|
+
/** Input type. Default: text */
|
|
19
|
+
type?: 'text' | 'password' | 'search';
|
|
20
|
+
/** Hide the chars counter */
|
|
21
|
+
hideCharsCounter?: boolean;
|
|
22
|
+
/** CSS classes to be applied on the container element */
|
|
23
|
+
classNameWrapper?: string;
|
|
24
|
+
/** CSS classes to be applied on the label element */
|
|
25
|
+
classNameLabel?: string;
|
|
26
|
+
/** CSS classes to be applied on the input element */
|
|
27
|
+
classNameInput?: string;
|
|
28
|
+
/** CSS classes to be applied on the info message element */
|
|
29
|
+
classNameInfoMessage?: string;
|
|
30
|
+
/** CSS classes to be applied on the error message element */
|
|
31
|
+
classNameErrorMessage?: string;
|
|
32
|
+
/** CSS classes to be applied on the chars counter element */
|
|
33
|
+
classNameCharsCounter?: string;
|
|
34
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
35
|
+
'data-testid-wrapper'?: string;
|
|
36
|
+
/** Id to be applied as `data-testid` on the label element */
|
|
37
|
+
'data-testid-label'?: string;
|
|
38
|
+
/** Id to be applied as `data-testid` on the input element */
|
|
39
|
+
'data-testid-input'?: string;
|
|
40
|
+
/** Id to be applied as `data-testid` on the info message element */
|
|
41
|
+
'data-testid-infoMessage'?: string;
|
|
42
|
+
/** Id to be applied as `data-testid` on the error message element */
|
|
43
|
+
'data-testid-errorMessage'?: string;
|
|
44
|
+
/** Id to be applied as `data-testid` on the chars counter element */
|
|
45
|
+
'data-testid-charsCounter'?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const Autocomplete: <T extends string | (object & {
|
|
48
|
+
label: string;
|
|
49
|
+
})>({ label, type, options, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, maxLength, onChange, classNameLabel, classNameInput, classNameErrorMessage, classNameInfoMessage, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, ...rest }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export {};
|