@pismo/marola 1.0.0-beta.4 → 1.0.0-beta.41

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 (138) hide show
  1. package/dist/{Button-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -3
  3. package/dist/Dialog.module-D9e4RsKo.js +30 -0
  4. package/dist/Group-B80_u5Q1.js +27 -0
  5. package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
  6. package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
  7. package/dist/SelectButton-BlVl6pJn.js +70 -0
  8. package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
  9. package/dist/Toggle-Dl-yPy8S.js +187 -0
  10. package/dist/assets/Adornment.css +1 -0
  11. package/dist/assets/Advice.css +1 -1
  12. package/dist/assets/Autocomplete.css +1 -0
  13. package/dist/assets/Button.css +1 -1
  14. package/dist/assets/Checkbox.css +1 -1
  15. package/dist/assets/Dialog.css +1 -1
  16. package/dist/assets/EllipsisTooltip.css +1 -1
  17. package/dist/assets/Group.css +1 -1
  18. package/dist/assets/IconButton.css +1 -1
  19. package/dist/assets/Input.css +1 -1
  20. package/dist/assets/PageHeader.css +1 -1
  21. package/dist/assets/Pagination.css +1 -1
  22. package/dist/assets/ResultWithChips.css +1 -0
  23. package/dist/assets/SelectButton.css +1 -1
  24. package/dist/assets/Skeleton.css +1 -1
  25. package/dist/assets/Snackbar.css +1 -1
  26. package/dist/assets/SortTooltip.css +1 -1
  27. package/dist/assets/Stepper.css +1 -1
  28. package/dist/assets/StepperNavigator.css +1 -0
  29. package/dist/assets/Table.css +1 -1
  30. package/dist/assets/Tabs.css +1 -1
  31. package/dist/assets/TextDisplay.css +1 -1
  32. package/dist/assets/Toggle.css +1 -1
  33. package/dist/assets/Toggle2.css +1 -1
  34. package/dist/assets/Typography.css +1 -1
  35. package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  36. package/dist/components/Adornment/Adornment.d.ts +20 -0
  37. package/dist/components/Adornment/Adornment.js +13 -0
  38. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  39. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  40. package/dist/components/Advice/Advice.d.ts +32 -17
  41. package/dist/components/Advice/Advice.js +39 -40
  42. package/dist/components/Advice/Advice.stories.d.ts +4 -3
  43. package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
  44. package/dist/components/Autocomplete/Autocomplete.js +679 -0
  45. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
  46. package/dist/components/Button/Button.d.ts +2 -0
  47. package/dist/components/Button/Button.js +51 -49
  48. package/dist/components/Checkbox/Checkbox.js +52 -52
  49. package/dist/components/Chip/Chip.d.ts +6 -12
  50. package/dist/components/Chip/Chip.js +8 -6
  51. package/dist/components/Chip/Chip.stories.d.ts +6 -15
  52. package/dist/components/Dialog/Actions.js +1 -1
  53. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  54. package/dist/components/Dialog/Backdrop.js +8 -7
  55. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  56. package/dist/components/Dialog/CloseIconButton.js +15 -18
  57. package/dist/components/Dialog/Dialog.d.ts +9 -6
  58. package/dist/components/Dialog/Dialog.js +139 -139
  59. package/dist/components/Dialog/Dialog.stories.d.ts +51 -47
  60. package/dist/components/Dialog/DialogTitle.js +1 -1
  61. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  62. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +3 -2
  63. package/dist/components/Icon/Icon.js +141 -47
  64. package/dist/components/Icon/types.d.ts +1 -1
  65. package/dist/components/IconButton/IconButton.js +42 -42
  66. package/dist/components/Input/Input.d.ts +24 -5
  67. package/dist/components/Input/Input.js +291 -278
  68. package/dist/components/Input/Input.stories.d.ts +2 -21
  69. package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -21
  70. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
  71. package/dist/components/PageHeader/PageHeader.js +57 -57
  72. package/dist/components/Pagination/Pagination.d.ts +5 -1
  73. package/dist/components/Pagination/Pagination.js +87 -185
  74. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  75. package/dist/components/Pagination/usePagination.d.ts +90 -0
  76. package/dist/components/Pagination/usePagination.js +79 -0
  77. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  78. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  79. package/dist/components/RowItem/RowItem.d.ts +25 -0
  80. package/dist/components/RowItem/RowItem.js +20 -0
  81. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  82. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  83. package/dist/components/Select/Select.d.ts +7 -0
  84. package/dist/components/Select/Select.js +409 -365
  85. package/dist/components/Select/SelectButton.d.ts +1 -0
  86. package/dist/components/Select/SelectButton.js +1 -1
  87. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  88. package/dist/components/Skeleton/Skeleton.js +20 -14
  89. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  90. package/dist/components/Snackbar/Snackbar.js +94 -94
  91. package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
  92. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  93. package/dist/components/Stepper/Stepper.js +35 -35
  94. package/dist/components/StepperNavigator/StepperNavigator.d.ts +43 -0
  95. package/dist/components/StepperNavigator/StepperNavigator.js +56 -0
  96. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +16 -0
  97. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  98. package/dist/components/Table/Table.d.ts +3 -1
  99. package/dist/components/Table/Table.js +87 -99
  100. package/dist/components/Table/Table.stories.d.ts +1 -1
  101. package/dist/components/Tabs/Tab.d.ts +5 -3
  102. package/dist/components/Tabs/Tab.js +38 -36
  103. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  104. package/dist/components/Tabs/TabPanel.js +51 -40
  105. package/dist/components/Tabs/Tabs.d.ts +6 -4
  106. package/dist/components/Tabs/Tabs.js +131 -128
  107. package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
  108. package/dist/components/TextDisplay/TextDisplay.js +45 -31
  109. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  110. package/dist/components/Toggle/Toggle.js +56 -56
  111. package/dist/components/ToggleGroup/Group.js +1 -1
  112. package/dist/components/ToggleGroup/Toggle.d.ts +1 -0
  113. package/dist/components/ToggleGroup/Toggle.js +6 -5
  114. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  115. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  116. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  117. package/dist/components/Tooltip/Tooltip.js +4 -4
  118. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -1
  119. package/dist/components/Typography/Typography.js +47 -47
  120. package/dist/components/Typography/Typography.stories.d.ts +1 -1
  121. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  122. package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
  123. package/dist/main.d.ts +5 -0
  124. package/dist/main.js +85 -76
  125. package/dist/ownerDocument-YGhwAnr1.js +33 -0
  126. package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
  127. package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
  128. package/dist/useEventCallback-BAQJJ3ye.js +14 -0
  129. package/dist/useId-BW-oWmul.js +19 -0
  130. package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
  131. package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
  132. package/package.json +21 -12
  133. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  134. package/dist/Group-B3p31ftp.js +0 -26
  135. package/dist/SelectButton-K3OIfR5m.js +0 -61
  136. package/dist/Toggle-BCgIItCc.js +0 -142
  137. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  138. package/dist/useEventCallback-xTG9piMa.js +0 -45
@@ -1,58 +1,58 @@
1
1
  import '../../assets/IconButton.css';
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";
2
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
+ import { forwardRef as d, useMemo as l } from "react";
4
+ import { c as j } from "../../clsx-DB4S2d7J.js";
5
+ import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
6
+ import { B as x } from "../../Button-BAljjMv3.js";
7
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) => {
8
+ "u-typography-h1": "_u-typography-h1_gt5j9_1",
9
+ "u-typography-h2": "_u-typography-h2_gt5j9_8",
10
+ "u-typography-h3": "_u-typography-h3_gt5j9_15",
11
+ "u-typography-h4": "_u-typography-h4_gt5j9_22",
12
+ "u-typography-h5": "_u-typography-h5_gt5j9_29",
13
+ "u-typography-h6": "_u-typography-h6_gt5j9_36",
14
+ "u-typography-base": "_u-typography-base_gt5j9_43",
15
+ "icon-button": "_icon-button_gt5j9_43",
16
+ "u-typography-base--xxl": "_u-typography-base--xxl_gt5j9_49",
17
+ "u-typography-base--xl": "_u-typography-base--xl_gt5j9_53",
18
+ "u-typography-base--lg": "_u-typography-base--lg_gt5j9_57",
19
+ "u-typography-base--sm": "_u-typography-base--sm_gt5j9_61",
20
+ "u-typography-base--bold": "_u-typography-base--bold_gt5j9_65",
21
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_gt5j9_68",
22
+ "u-typography-base--underlined": "_u-typography-base--underlined_gt5j9_71",
23
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_gt5j9_74",
24
+ "icon-button--primary": "_icon-button--primary_gt5j9_87",
25
+ "icon-button--square": "_icon-button--square_gt5j9_109",
26
+ "icon-button__container": "_icon-button__container_gt5j9_125"
27
+ }, B = d((p, y) => {
28
28
  const {
29
29
  onClick: _,
30
30
  icon: e,
31
31
  link: u,
32
- loading: n,
33
- children: h,
34
- type: s = "button",
35
- disabled: i,
36
- className: y,
32
+ loading: g,
33
+ children: n,
34
+ type: h = "button",
35
+ disabled: s,
36
+ className: a,
37
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]
38
+ "data-testid": i
39
+ } = p, b = l(
40
+ () => j([o["icon-button"], o[`icon-button--${t}`], a]),
41
+ [a, t]
42
42
  );
43
- return /* @__PURE__ */ a(
44
- m,
43
+ return /* @__PURE__ */ r(
44
+ x,
45
45
  {
46
- type: s,
46
+ type: h,
47
47
  href: u,
48
48
  onClick: _,
49
- disabled: i,
49
+ disabled: s,
50
50
  className: b,
51
- ref: p,
52
- "data-testid": g,
51
+ ref: y,
52
+ "data-testid": i,
53
53
  children: /* @__PURE__ */ c("div", { className: o["icon-button__container"], children: [
54
- n ? /* @__PURE__ */ a(j, { invert: !0 }) : e,
55
- t !== "square" && h
54
+ g ? /* @__PURE__ */ r(m, { invert: !0 }) : e,
55
+ t !== "square" && n
56
56
  ] })
57
57
  }
58
58
  );
@@ -1,18 +1,24 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
1
+ import { HTMLInputTypeAttribute, InputHTMLAttributes, ReactNode } from 'react';
2
2
 
3
- type InputProps = InputHTMLAttributes<HTMLInputElement> & {
3
+ type ExcludedInputTypes = 'checkbox' | 'radio' | 'submit';
4
+ type CustomInputTypeAttribute = Exclude<HTMLInputTypeAttribute, ExcludedInputTypes>;
5
+ export type SingleInputProps = InputHTMLAttributes<HTMLInputElement> & {
4
6
  /** Label text */
5
7
  label?: string;
6
8
  /** Info message text */
7
9
  infoMessage?: string;
8
- /** Error message text */
10
+ /** Show the field layout as an error */
11
+ error?: boolean;
12
+ /** Error message text, if has "errorMessage", the "error" props will be "true" */
9
13
  errorMessage?: string;
14
+ /** If "true", a "textarea" element is rendered. */
15
+ multiline?: false;
10
16
  /** Left icon element */
11
17
  leftIcon?: ReactNode;
12
18
  /** Right icon element */
13
19
  rightIcon?: ReactNode;
14
20
  /** Input type. Default: text */
15
- type?: 'text' | 'password' | 'search';
21
+ type?: CustomInputTypeAttribute;
16
22
  /** Hide the chars counter */
17
23
  hideCharsCounter?: boolean;
18
24
  /** CSS classes to be applied on the container element */
@@ -40,5 +46,18 @@ type InputProps = InputHTMLAttributes<HTMLInputElement> & {
40
46
  /** Id to be applied as `data-testid` on the chars counter element */
41
47
  'data-testid-charsCounter'?: string;
42
48
  };
43
- export declare const Input: ({ label, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, type, maxLength, hideCharsCounter, onChange, classNameWrapper, classNameLabel, classNameInput, classNameInfoMessage, classNameErrorMessage, classNameCharsCounter, "data-testid-wrapper": testIdWrapper, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, "data-testid-charsCounter": testIdCharsCounter, ...rest }: InputProps) => import("react/jsx-runtime").JSX.Element;
49
+ type MultilineInputProps = Omit<SingleInputProps, 'multiline'> & {
50
+ /** If "true", a "textarea" element is rendered. */
51
+ multiline: true;
52
+ /** Minimum number of rows to display when multiline option is set to true. */
53
+ minRows?: number;
54
+ /** Maximum number of rows to display when multiline option is set to true. */
55
+ maxRows?: number;
56
+ /** Number of rows to display when multiline option is set to true.
57
+ * The prop defaults to the value (5)
58
+ */
59
+ rows?: number;
60
+ };
61
+ export type InputProps = SingleInputProps | MultilineInputProps;
62
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
44
63
  export {};