@pismo/marola 0.0.1-alpha.8 → 1.0.0-beta.0
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/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-BSW-Nd-y.js} +3 -2
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/Popup-B6ZSGIEI.js +1248 -0
- package/dist/{Portal-BcdMtRGF.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-C8JQKaf4.js +61 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/Toggle-BCgIItCc.js +142 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -0
- package/dist/assets/Group.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Skeleton.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 -0
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +80 -0
- package/dist/components/Advice/Advice.d.ts +17 -3
- package/dist/components/Advice/Advice.js +39 -17
- package/dist/components/Advice/Advice.stories.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +6 -3
- package/dist/components/Button/Button.js +60 -65
- package/dist/components/Button/Button.stories.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +19 -2
- package/dist/components/Checkbox/Checkbox.js +63 -40
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.d.ts +39 -0
- package/dist/components/Chip/Chip.js +19 -0
- package/dist/components/Chip/Chip.stories.d.ts +42 -0
- package/dist/components/Chip/chip.test.d.ts +1 -0
- 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.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +13 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +10 -10
- package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
- package/dist/components/Dialog/DialogTitle.js +29 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +7 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +23 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +31 -0
- package/dist/components/Icon/Icon.d.ts +8 -15
- package/dist/components/Icon/Icon.js +85 -41
- package/dist/components/Icon/Icon.stories.d.ts +15 -0
- package/dist/components/Icon/types.d.ts +5 -0
- package/dist/components/Icon/types.js +1 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +18 -2
- package/dist/components/IconButton/IconButton.js +58 -63
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +241 -230
- package/dist/components/InputSearch/InputSearch.d.ts +7 -9
- package/dist/components/InputSearch/InputSearch.js +30 -25
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +36 -6
- package/dist/components/PageHeader/PageHeader.js +83 -47
- package/dist/components/PageHeader/PageHeader.stories.d.ts +2 -31
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +127 -109
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.js +857 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/Select/SelectButton.d.ts +12 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +16 -19
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.d.ts +19 -5
- package/dist/components/Snackbar/Snackbar.js +247 -230
- package/dist/components/Snackbar/Snackbar.stories.d.ts +319 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +55 -29
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.js +37 -22
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +33 -16
- package/dist/components/Table/Table.js +106 -91
- package/dist/components/Table/Table.stories.d.ts +29 -0
- package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
- package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
- package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
- package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
- package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +179 -6
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +12 -12
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +242 -668
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +2 -3
- package/dist/components/Toggle/Toggle.js +148 -133
- package/dist/components/Toggle/Toggle.stories.d.ts +2 -3
- package/dist/components/ToggleGroup/Group.d.ts +18 -0
- package/dist/components/ToggleGroup/Group.js +7 -0
- package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
- package/dist/components/ToggleGroup/Toggle.js +17 -0
- package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -6
- package/dist/components/Tooltip/Tooltip.js +114 -1339
- package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
- package/dist/components/Typography/Typography.d.ts +4 -2
- package/dist/components/Typography/Typography.js +56 -73
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
- package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
- package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
- package/dist/main.d.ts +10 -1
- package/dist/main.js +73 -55
- package/dist/marola.css +1 -0
- package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/useList-B0hog_3-.js +436 -0
- package/dist/utils/styleStrings.d.ts +1 -1
- package/dist/utils/styleStrings.js +7 -7
- package/package.json +4 -4
- package/dist/Dialog.module-CGVM5V_D.js +0 -15
- package/dist/Tab-CRwnhsj5.js +0 -254
- package/dist/Tabs.module-yYcTJnj6.js +0 -103
- package/dist/_commonjsHelpers-CT_km90n.js +0 -30
- package/dist/assets/global.css +0 -1
- package/dist/components/Button/Button.stories.js +0 -40
- package/dist/components/Dialog/Dialog.stories.js +0 -59
- package/dist/components/Dialog/Title.js +0 -29
- package/dist/components/Input/Input.stories.js +0 -106
- package/dist/components/InputSearch/InputSearch.stories.js +0 -36
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
- package/dist/components/PageHeader/PageHeader.stories.js +0 -49
- package/dist/components/Toggle/Toggle.stories.js +0 -27
- package/dist/components/Typography/Typography.stories.js +0 -30
- package/dist/components/Typography/typography.test.js +0 -11357
- package/dist/magic-string.es-O_8lTkE3.js +0 -738
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
- package/dist/utils/styleStrings.test.js +0 -41
- package/dist/vi.Y_w82WR8-Df0JUamG.js +0 -9860
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is automatically generated. Any changes will be lost.
|
|
3
|
+
* run "yarn generate-icon-types" or "yarn build" to regenerate it.
|
|
4
|
+
*/
|
|
5
|
+
export type IconName = 'account-group' | 'arrow-down-arrow-up' | 'arrow-left' | 'calendar-days' | 'chevron-down' | 'chevron-up' | 'circle-arrow-right' | 'circle-check' | 'circle-exclamation' | 'circle-xmark' | 'eye-slash' | 'folder-magnifying-glass' | 'lock-keyhole' | 'magnifying-glass' | 'rectangle-history' | 'trash' | 'warehouse-full' | 'xmark' | 'logo';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<import('./IconButton').IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Simple: Story;
|
|
14
|
+
export declare const WithChildren: Story;
|
|
15
|
+
export declare const Square: Story;
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import { Either } from '../../types/helpers';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
type variant = 'primary' | 'square';
|
|
5
5
|
type IconButtonCoreProps = {
|
|
6
|
+
/** The icon can be any ReactNode element, including the Icon component. */
|
|
6
7
|
icon: ReactNode;
|
|
8
|
+
/** Loading status */
|
|
7
9
|
loading?: boolean;
|
|
10
|
+
/** Disabled status */
|
|
8
11
|
disabled?: boolean;
|
|
12
|
+
/** ClassNames for MuiButton */
|
|
9
13
|
className?: string;
|
|
14
|
+
/** Children content */
|
|
10
15
|
children?: ReactNode;
|
|
16
|
+
/** Variant of component */
|
|
11
17
|
variant?: variant;
|
|
18
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
19
|
+
'data-testid'?: string;
|
|
12
20
|
};
|
|
13
21
|
interface IconButtonPropsWithLink extends IconButtonCoreProps {
|
|
22
|
+
/** Link to access when Icon Button is clicked */
|
|
14
23
|
link: string;
|
|
15
24
|
}
|
|
16
25
|
interface IconButtonPropsWithOnClick extends IconButtonCoreProps {
|
|
17
|
-
|
|
26
|
+
/** Functionality executed when the Icon Button is clicked */
|
|
27
|
+
onClick: (e: SyntheticEvent<HTMLButtonElement>) => void;
|
|
28
|
+
/** Button type */
|
|
18
29
|
type?: HTMLButtonElement['type'];
|
|
19
30
|
}
|
|
20
31
|
export type IconButtonProps = Either<IconButtonPropsWithLink, IconButtonPropsWithOnClick>;
|
|
32
|
+
/**
|
|
33
|
+
* The icon button is used in some cases where you need the icon to be pressed, sometimes it can contain text.
|
|
34
|
+
* Icon buttons are commonly found in app bars and toolbars.
|
|
35
|
+
* Icons are also appropriate for toggle buttons that allow a single choice to be selected or deselected, such as adding or removing a star to an item.
|
|
36
|
+
*/
|
|
21
37
|
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
22
38
|
export default IconButton;
|
|
@@ -1,68 +1,63 @@
|
|
|
1
1
|
import '../../assets/IconButton.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c } from "../../clsx-DB4S2d7J.js";
|
|
5
|
-
import { LoadingSpinner as
|
|
6
|
-
import { B as
|
|
7
|
-
const
|
|
8
|
-
h1:
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
[t, _]
|
|
2
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as x, useMemo as d } from "react";
|
|
4
|
+
import { c as l } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { LoadingSpinner as j } from "../LoadingSpinner/LoadingSpinner.js";
|
|
6
|
+
import { B as m } from "../../Button-2b1peDFT.js";
|
|
7
|
+
const o = {
|
|
8
|
+
"u-typography-h1": "_u-typography-h1_1xyj5_1",
|
|
9
|
+
"u-typography-h2": "_u-typography-h2_1xyj5_8",
|
|
10
|
+
"u-typography-h3": "_u-typography-h3_1xyj5_15",
|
|
11
|
+
"u-typography-h4": "_u-typography-h4_1xyj5_22",
|
|
12
|
+
"u-typography-h5": "_u-typography-h5_1xyj5_29",
|
|
13
|
+
"u-typography-h6": "_u-typography-h6_1xyj5_36",
|
|
14
|
+
"u-typography-base": "_u-typography-base_1xyj5_43",
|
|
15
|
+
"icon-button": "_icon-button_1xyj5_43",
|
|
16
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1xyj5_48",
|
|
17
|
+
"u-typography-base--xl": "_u-typography-base--xl_1xyj5_52",
|
|
18
|
+
"u-typography-base--lg": "_u-typography-base--lg_1xyj5_56",
|
|
19
|
+
"u-typography-base--sm": "_u-typography-base--sm_1xyj5_60",
|
|
20
|
+
"u-typography-base--bold": "_u-typography-base--bold_1xyj5_64",
|
|
21
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1xyj5_67",
|
|
22
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1xyj5_70",
|
|
23
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1xyj5_73",
|
|
24
|
+
"icon-button--primary": "_icon-button--primary_1xyj5_86",
|
|
25
|
+
"icon-button--square": "_icon-button--square_1xyj5_108",
|
|
26
|
+
"icon-button__container": "_icon-button__container_1xyj5_124"
|
|
27
|
+
}, B = x((r, p) => {
|
|
28
|
+
const {
|
|
29
|
+
onClick: _,
|
|
30
|
+
icon: e,
|
|
31
|
+
link: u,
|
|
32
|
+
loading: n,
|
|
33
|
+
children: h,
|
|
34
|
+
type: s = "button",
|
|
35
|
+
disabled: i,
|
|
36
|
+
className: y,
|
|
37
|
+
variant: t = "primary",
|
|
38
|
+
"data-testid": g
|
|
39
|
+
} = r, b = d(
|
|
40
|
+
() => l([o["icon-button"], o[`icon-button--${t}`], y]),
|
|
41
|
+
[y, t]
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ a(
|
|
44
|
+
m,
|
|
45
|
+
{
|
|
46
|
+
type: s,
|
|
47
|
+
href: u,
|
|
48
|
+
onClick: _,
|
|
49
|
+
disabled: i,
|
|
50
|
+
className: b,
|
|
51
|
+
ref: p,
|
|
52
|
+
"data-testid": g,
|
|
53
|
+
children: /* @__PURE__ */ c("div", { className: o["icon-button__container"], children: [
|
|
54
|
+
n ? /* @__PURE__ */ a(j, { invert: !0 }) : e,
|
|
55
|
+
t !== "square" && h
|
|
56
|
+
] })
|
|
57
|
+
}
|
|
59
58
|
);
|
|
60
|
-
return /* @__PURE__ */ e(g, { type: y, href: u, onClick: n, disabled: f, className: h, ref: r, children: /* @__PURE__ */ s("div", { className: o["icon-button__container"], children: [
|
|
61
|
-
b ? /* @__PURE__ */ e(m, { invert: !0 }) : d,
|
|
62
|
-
_ !== "square" && l
|
|
63
|
-
] }) });
|
|
64
59
|
});
|
|
65
60
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
B as IconButton,
|
|
62
|
+
B as default
|
|
68
63
|
};
|
|
@@ -13,7 +13,7 @@ type InputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
13
13
|
rightIcon?: ReactNode;
|
|
14
14
|
/** Input type. Default: text */
|
|
15
15
|
type?: 'text' | 'password' | 'search';
|
|
16
|
-
/** Hide the chars counter
|
|
16
|
+
/** Hide the chars counter */
|
|
17
17
|
hideCharsCounter?: boolean;
|
|
18
18
|
/** CSS classes to be applied on the container element */
|
|
19
19
|
classNameWrapper?: string;
|