@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.
Files changed (167) hide show
  1. package/README.md +1 -1
  2. package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
  3. package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-BSW-Nd-y.js} +3 -2
  4. package/dist/Dialog.module-DFEmFdYT.js +30 -0
  5. package/dist/Group-B3p31ftp.js +26 -0
  6. package/dist/Popup-B6ZSGIEI.js +1248 -0
  7. package/dist/{Portal-BcdMtRGF.js → Portal-DIeBsWdL.js} +2 -2
  8. package/dist/SelectButton-C8JQKaf4.js +61 -0
  9. package/dist/Tabs.module-jkH1Qjn7.js +22 -0
  10. package/dist/Toggle-BCgIItCc.js +142 -0
  11. package/dist/assets/Advice.css +1 -1
  12. package/dist/assets/Button.css +1 -1
  13. package/dist/assets/Checkbox.css +1 -1
  14. package/dist/assets/Dialog.css +1 -1
  15. package/dist/assets/EllipsisTooltip.css +1 -0
  16. package/dist/assets/Group.css +1 -0
  17. package/dist/assets/IconButton.css +1 -1
  18. package/dist/assets/Input.css +1 -1
  19. package/dist/assets/InputSearch.css +1 -1
  20. package/dist/assets/PageHeader.css +1 -1
  21. package/dist/assets/Pagination.css +1 -1
  22. package/dist/assets/SelectButton.css +1 -0
  23. package/dist/assets/Skeleton.css +1 -1
  24. package/dist/assets/Snackbar.css +1 -1
  25. package/dist/assets/SortTooltip.css +1 -1
  26. package/dist/assets/Stepper.css +1 -1
  27. package/dist/assets/Table.css +1 -1
  28. package/dist/assets/TextDisplay.css +1 -0
  29. package/dist/assets/Toggle.css +1 -1
  30. package/dist/assets/Toggle2.css +1 -0
  31. package/dist/assets/Typography.css +1 -1
  32. package/dist/combineHooksSlotProps-DVjg9PRh.js +80 -0
  33. package/dist/components/Advice/Advice.d.ts +17 -3
  34. package/dist/components/Advice/Advice.js +39 -17
  35. package/dist/components/Advice/Advice.stories.d.ts +18 -0
  36. package/dist/components/Button/Button.d.ts +6 -3
  37. package/dist/components/Button/Button.js +60 -65
  38. package/dist/components/Button/Button.stories.d.ts +3 -1
  39. package/dist/components/Checkbox/Checkbox.d.ts +19 -2
  40. package/dist/components/Checkbox/Checkbox.js +63 -40
  41. package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
  42. package/dist/components/Chip/Chip.d.ts +39 -0
  43. package/dist/components/Chip/Chip.js +19 -0
  44. package/dist/components/Chip/Chip.stories.d.ts +42 -0
  45. package/dist/components/Chip/chip.test.d.ts +1 -0
  46. package/dist/components/Dialog/Actions.js +1 -1
  47. package/dist/components/Dialog/Backdrop.js +1 -1
  48. package/dist/components/Dialog/CloseIconButton.js +2 -2
  49. package/dist/components/Dialog/Dialog.d.ts +1 -1
  50. package/dist/components/Dialog/Dialog.js +13 -13
  51. package/dist/components/Dialog/Dialog.stories.d.ts +10 -10
  52. package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
  53. package/dist/components/Dialog/DialogTitle.js +29 -0
  54. package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +7 -0
  55. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +23 -0
  56. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +31 -0
  57. package/dist/components/Icon/Icon.d.ts +8 -15
  58. package/dist/components/Icon/Icon.js +85 -41
  59. package/dist/components/Icon/Icon.stories.d.ts +15 -0
  60. package/dist/components/Icon/types.d.ts +5 -0
  61. package/dist/components/Icon/types.js +1 -0
  62. package/dist/components/IconButton/Icon.stories.d.ts +15 -0
  63. package/dist/components/IconButton/IconButton.d.ts +18 -2
  64. package/dist/components/IconButton/IconButton.js +58 -63
  65. package/dist/components/Input/Input.d.ts +1 -1
  66. package/dist/components/Input/Input.js +241 -230
  67. package/dist/components/InputSearch/InputSearch.d.ts +7 -9
  68. package/dist/components/InputSearch/InputSearch.js +30 -25
  69. package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
  70. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
  71. package/dist/components/PageHeader/PageHeader.d.ts +36 -6
  72. package/dist/components/PageHeader/PageHeader.js +83 -47
  73. package/dist/components/PageHeader/PageHeader.stories.d.ts +2 -31
  74. package/dist/components/Pagination/Pagination.d.ts +24 -5
  75. package/dist/components/Pagination/Pagination.js +127 -109
  76. package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
  77. package/dist/components/Select/Select.d.ts +26 -0
  78. package/dist/components/Select/Select.js +857 -0
  79. package/dist/components/Select/Select.stories.d.ts +22 -0
  80. package/dist/components/Select/SelectButton.d.ts +12 -0
  81. package/dist/components/Select/SelectButton.js +8 -0
  82. package/dist/components/Skeleton/Skeleton.d.ts +10 -3
  83. package/dist/components/Skeleton/Skeleton.js +16 -19
  84. package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
  85. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
  86. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
  87. package/dist/components/Snackbar/Snackbar.d.ts +19 -5
  88. package/dist/components/Snackbar/Snackbar.js +247 -230
  89. package/dist/components/Snackbar/Snackbar.stories.d.ts +319 -0
  90. package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
  91. package/dist/components/SortTooltip/SortTooltip.js +55 -29
  92. package/dist/components/Stepper/Stepper.d.ts +11 -1
  93. package/dist/components/Stepper/Stepper.js +37 -22
  94. package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
  95. package/dist/components/Table/Table.d.ts +33 -16
  96. package/dist/components/Table/Table.js +106 -91
  97. package/dist/components/Table/Table.stories.d.ts +29 -0
  98. package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
  99. package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
  100. package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
  101. package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
  102. package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
  103. package/dist/components/Tabs/Tab.d.ts +5 -0
  104. package/dist/components/Tabs/Tab.js +179 -6
  105. package/dist/components/Tabs/Tab.stories.d.ts +15 -0
  106. package/dist/components/Tabs/TabPanel.d.ts +4 -0
  107. package/dist/components/Tabs/TabPanel.js +12 -12
  108. package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
  109. package/dist/components/Tabs/Tabs.d.ts +5 -1
  110. package/dist/components/Tabs/Tabs.js +242 -668
  111. package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
  112. package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
  113. package/dist/components/TextDisplay/TextDisplay.js +37 -0
  114. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
  115. package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
  116. package/dist/components/Toggle/Toggle.d.ts +2 -3
  117. package/dist/components/Toggle/Toggle.js +148 -133
  118. package/dist/components/Toggle/Toggle.stories.d.ts +2 -3
  119. package/dist/components/ToggleGroup/Group.d.ts +18 -0
  120. package/dist/components/ToggleGroup/Group.js +7 -0
  121. package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
  122. package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
  123. package/dist/components/ToggleGroup/Toggle.js +17 -0
  124. package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
  125. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  126. package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
  127. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
  128. package/dist/components/Tooltip/Tooltip.d.ts +22 -6
  129. package/dist/components/Tooltip/Tooltip.js +114 -1339
  130. package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
  131. package/dist/components/Typography/Typography.d.ts +4 -2
  132. package/dist/components/Typography/Typography.js +56 -73
  133. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  134. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
  135. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
  136. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
  137. package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
  138. package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
  139. package/dist/main.d.ts +10 -1
  140. package/dist/main.js +73 -55
  141. package/dist/marola.css +1 -0
  142. package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
  143. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  144. package/dist/useEventCallback-xTG9piMa.js +45 -0
  145. package/dist/useList-B0hog_3-.js +436 -0
  146. package/dist/utils/styleStrings.d.ts +1 -1
  147. package/dist/utils/styleStrings.js +7 -7
  148. package/package.json +4 -4
  149. package/dist/Dialog.module-CGVM5V_D.js +0 -15
  150. package/dist/Tab-CRwnhsj5.js +0 -254
  151. package/dist/Tabs.module-yYcTJnj6.js +0 -103
  152. package/dist/_commonjsHelpers-CT_km90n.js +0 -30
  153. package/dist/assets/global.css +0 -1
  154. package/dist/components/Button/Button.stories.js +0 -40
  155. package/dist/components/Dialog/Dialog.stories.js +0 -59
  156. package/dist/components/Dialog/Title.js +0 -29
  157. package/dist/components/Input/Input.stories.js +0 -106
  158. package/dist/components/InputSearch/InputSearch.stories.js +0 -36
  159. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
  160. package/dist/components/PageHeader/PageHeader.stories.js +0 -49
  161. package/dist/components/Toggle/Toggle.stories.js +0 -27
  162. package/dist/components/Typography/Typography.stories.js +0 -30
  163. package/dist/components/Typography/typography.test.js +0 -11357
  164. package/dist/magic-string.es-O_8lTkE3.js +0 -738
  165. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
  166. package/dist/utils/styleStrings.test.js +0 -41
  167. 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
- onClick: () => void;
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 e, jsxs as s } from "react/jsx-runtime";
3
- import { forwardRef as q, useMemo as a } from "react";
4
- import { c } from "../../clsx-DB4S2d7J.js";
5
- import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
6
- import { B as g } from "../../Button-B1umG8kJ.js";
7
- const k = "_h1_8qiyf_1", p = "_h2_8qiyf_11", w = "_h3_8qiyf_21", x = "_h4_8qiyf_31", N = "_body_8qiyf_41", v = "_quote_8qiyf_75", B = "_form__input_8qiyf_98", j = "_form__hint_8qiyf_103", C = "_form__label_8qiyf_108", I = "_form__dropdown_8qiyf_113", L = "_table__header_8qiyf_131", M = "_table__body_8qiyf_136", R = "_button_8qiyf_159", o = {
8
- h1: k,
9
- "h1--bold": "_h1--bold_8qiyf_7",
10
- h2: p,
11
- "h2--bold": "_h2--bold_8qiyf_17",
12
- h3: w,
13
- "h3--bold": "_h3--bold_8qiyf_27",
14
- h4: x,
15
- "h4--bold": "_h4--bold_8qiyf_37",
16
- body: N,
17
- "body--large": "_body--large_8qiyf_46",
18
- "body--medium": "_body--medium_8qiyf_50",
19
- "body--small": "_body--small_8qiyf_54",
20
- "body--tiny": "_body--tiny_8qiyf_58",
21
- "body--bold": "_body--bold_8qiyf_62",
22
- "body--strikethrough": "_body--strikethrough_8qiyf_65",
23
- "body--underlined": "_body--underlined_8qiyf_68",
24
- "body--strikethrough-underlined": "_body--strikethrough-underlined_8qiyf_71",
25
- quote: v,
26
- "quote--large": "_quote--large_8qiyf_80",
27
- "quote--bold": "_quote--bold_8qiyf_85",
28
- "quote--strikethrough": "_quote--strikethrough_8qiyf_88",
29
- "quote--underlined": "_quote--underlined_8qiyf_91",
30
- "quote--strikethrough-underlined": "_quote--strikethrough-underlined_8qiyf_94",
31
- form__input: B,
32
- form__hint: j,
33
- form__label: C,
34
- form__dropdown: I,
35
- "form--bold": "_form--bold_8qiyf_118",
36
- "form--strikethrough": "_form--strikethrough_8qiyf_121",
37
- "form--underlined": "_form--underlined_8qiyf_124",
38
- "form--strikethrough-underlined": "_form--strikethrough-underlined_8qiyf_127",
39
- table__header: L,
40
- table__body: M,
41
- "table__body--secondary": "_table__body--secondary_8qiyf_141",
42
- "table--bold": "_table--bold_8qiyf_146",
43
- "table--strikethrough": "_table--strikethrough_8qiyf_149",
44
- "table--underlined": "_table--underlined_8qiyf_152",
45
- "table--strikethrough-underlined": "_table--strikethrough-underlined_8qiyf_155",
46
- button: R,
47
- "button--bold": "_button--bold_8qiyf_165",
48
- "button--strikethrough": "_button--strikethrough_8qiyf_168",
49
- "button--underlined": "_button--underlined_8qiyf_171",
50
- "button--strikethrough-underlined": "_button--strikethrough-underlined_8qiyf_174",
51
- "icon-button": "_icon-button_8qiyf_178",
52
- "icon-button--primary": "_icon-button--primary_8qiyf_190",
53
- "icon-button--square": "_icon-button--square_8qiyf_212",
54
- "icon-button__container": "_icon-button__container_8qiyf_228"
55
- }, E = q((i, r) => {
56
- const { onClick: n, icon: d, link: u, loading: b, children: l, type: y = "button", disabled: f, className: t, variant: _ = "primary" } = i, h = a(
57
- () => c([o["icon-button"], o[`icon-button--${_}`], t]),
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
- E as IconButton,
67
- E as default
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. Default: false */
16
+ /** Hide the chars counter */
17
17
  hideCharsCounter?: boolean;
18
18
  /** CSS classes to be applied on the container element */
19
19
  classNameWrapper?: string;