@pismo/marola 1.0.0-beta.0 → 1.0.0-beta.10
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-C7W0gYOI.js +175 -0
- package/dist/assets/Adornment.css +1 -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/TextDisplay.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/Adornment/Adornment.d.ts +19 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- 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 +50 -50
- package/dist/components/Button/Button.stories.d.ts +8 -52
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +3 -11
- package/dist/components/Chip/Chip.js +5 -4
- package/dist/components/Chip/Chip.stories.d.ts +3 -2
- 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 +44 -44
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/Icon/Icon.js +72 -59
- package/dist/components/Icon/Icon.stories.d.ts +3 -4
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +4 -2
- package/dist/components/Input/Input.js +74 -471
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +7 -1
- package/dist/components/Pagination/Pagination.js +104 -182
- package/dist/components/Pagination/usePagination.d.ts +90 -0
- package/dist/components/Pagination/usePagination.js +79 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +19 -0
- package/dist/components/Select/Select.js +9 -8
- 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/TextDisplay/TextDisplay.d.ts +3 -1
- package/dist/components/TextDisplay/TextDisplay.js +37 -30
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- 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.d.ts +1 -0
- package/dist/components/Typography/Typography.js +47 -46
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.js +81 -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 +2 -2
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -1,30 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypographyProps } from '../Typography/Typography';
|
|
2
|
+
import { IconProps } from '../Icon/Icon';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
/** Advice
|
|
7
|
-
* This property uses the Icon Component Props
|
|
8
|
-
*/
|
|
9
|
-
icon?: React.ComponentProps<typeof Icon>;
|
|
10
|
-
/** Advice SVG icon */
|
|
11
|
-
IconSvg?: React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
|
|
12
|
-
title?: string | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
/** Type of advice */
|
|
15
|
-
type?: AdviceTypes;
|
|
16
|
-
/** Advice content message */
|
|
17
|
-
content?: ReactNode;
|
|
5
|
+
export type AdviceType = 'without-results' | 'no-permission' | 'no-items' | 'error-page';
|
|
6
|
+
type AdviceCommonProps = {
|
|
7
|
+
/** Advice title message */
|
|
18
8
|
title?: string;
|
|
9
|
+
/** Advice title message props */
|
|
10
|
+
titleProps?: Omit<TypographyProps, 'children'>;
|
|
11
|
+
/** Advice description message */
|
|
19
12
|
description?: string;
|
|
20
|
-
/**
|
|
13
|
+
/** Advice description message props */
|
|
14
|
+
descriptionProps?: Omit<TypographyProps, 'children'>;
|
|
15
|
+
/** Advice content message */
|
|
16
|
+
content?: ReactNode;
|
|
17
|
+
/** Space separated list of CSS classes to apply */
|
|
21
18
|
className?: string;
|
|
22
19
|
/** ID that tests can use to get this component from the DOM */
|
|
23
20
|
'data-testid'?: string;
|
|
21
|
+
type?: never;
|
|
22
|
+
icon?: never;
|
|
23
|
+
iconSvg?: never;
|
|
24
|
+
};
|
|
25
|
+
type AdviceWithType = Omit<AdviceCommonProps, 'type'> & {
|
|
26
|
+
/** Type of advice */
|
|
27
|
+
type?: AdviceType;
|
|
28
|
+
};
|
|
29
|
+
type AdviceWithIcon = Omit<AdviceCommonProps, 'icon'> & {
|
|
30
|
+
/** Advice icon.
|
|
31
|
+
* This property uses the Icon Component Props
|
|
32
|
+
*/
|
|
33
|
+
icon?: IconProps;
|
|
34
|
+
};
|
|
35
|
+
type AdviceWithIconSvg = Omit<AdviceCommonProps, 'iconSvg'> & {
|
|
36
|
+
/** Advice SVG icon */
|
|
37
|
+
iconSvg?: ReactNode;
|
|
24
38
|
};
|
|
39
|
+
export type AdviceProps = AdviceWithType | AdviceWithIcon | AdviceWithIconSvg;
|
|
25
40
|
/**
|
|
26
41
|
* Advice component provide HTML with an icon and a message.
|
|
27
42
|
* Is commonly used to indicate No Permission and No Results.
|
|
28
43
|
*/
|
|
29
|
-
declare const Advice: ({ icon,
|
|
44
|
+
declare const Advice: ({ type, icon, iconSvg: IconSvg, content, title, titleProps, description, descriptionProps, className, ...rest }: AdviceProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
45
|
export { Advice };
|
|
@@ -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 {};
|