@pismo/marola 1.0.0-beta.9 → 1.0.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 (157) hide show
  1. package/dist/{Button-DiLqcAJG.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-DbEYZpyh.js} +3 -3
  3. package/dist/Dialog.module-W7UCXlf3.js +29 -0
  4. package/dist/Group-DspH8hyO.js +30 -0
  5. package/dist/Popover.module-B4boCutS.js +10 -0
  6. package/dist/{Popup-lLWZt2wk.js → Popup-Ck3XlWMq.js} +3 -3
  7. package/dist/{Portal-B_Es6eUL.js → Portal-oY3enyAm.js} +2 -2
  8. package/dist/SelectButton-B38avP9u.js +75 -0
  9. package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
  10. package/dist/Toggle-MfR7l8Wn.js +190 -0
  11. package/dist/assets/Alert.css +1 -0
  12. package/dist/assets/Autocomplete.css +1 -1
  13. package/dist/assets/Avatar.css +1 -0
  14. package/dist/assets/Description.css +1 -0
  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/Input.css +1 -1
  19. package/dist/assets/PageHeader.css +1 -1
  20. package/dist/assets/Popover.css +1 -0
  21. package/dist/assets/RadioButton.css +1 -0
  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/StepperNavigator.css +1 -0
  27. package/dist/assets/Table.css +1 -1
  28. package/dist/assets/Tabs.css +1 -1
  29. package/dist/assets/Toggle2.css +1 -1
  30. package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  31. package/dist/components/Adornment/Adornment.d.ts +11 -2
  32. package/dist/components/Adornment/Adornment.js +6 -6
  33. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  34. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  35. package/dist/components/Advice/Advice.d.ts +2 -2
  36. package/dist/components/Alert/Alert.d.ts +11 -0
  37. package/dist/components/Alert/Alert.js +46 -0
  38. package/dist/components/Alert/Alert.stories.d.ts +24 -0
  39. package/dist/components/Alert/Alert.test.d.ts +1 -0
  40. package/dist/components/Autocomplete/Autocomplete.d.ts +12 -42
  41. package/dist/components/Autocomplete/Autocomplete.js +422 -432
  42. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -25
  43. package/dist/components/Avatar/Avatar.d.ts +15 -0
  44. package/dist/components/Avatar/Avatar.js +51 -0
  45. package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
  46. package/dist/components/Button/Button.d.ts +2 -0
  47. package/dist/components/Button/Button.js +23 -21
  48. package/dist/components/Chip/Chip.d.ts +6 -4
  49. package/dist/components/Chip/Chip.js +10 -6
  50. package/dist/components/Chip/Chip.stories.d.ts +5 -14
  51. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
  52. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
  53. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
  54. package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
  55. package/dist/components/Description/Description.d.ts +21 -0
  56. package/dist/components/Description/Description.js +66 -0
  57. package/dist/components/Description/Description.stories.d.ts +22 -0
  58. package/dist/components/Description/Description.test.d.ts +1 -0
  59. package/dist/components/Dialog/Actions.js +1 -1
  60. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  61. package/dist/components/Dialog/Backdrop.js +8 -7
  62. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  63. package/dist/components/Dialog/CloseIconButton.js +15 -18
  64. package/dist/components/Dialog/Dialog.d.ts +16 -10
  65. package/dist/components/Dialog/Dialog.js +167 -167
  66. package/dist/components/Dialog/Dialog.stories.d.ts +73 -67
  67. package/dist/components/Dialog/DialogTitle.d.ts +5 -2
  68. package/dist/components/Dialog/DialogTitle.js +22 -16
  69. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  70. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
  71. package/dist/components/Icon/Icon.js +331 -51
  72. package/dist/components/Icon/types.d.ts +1 -1
  73. package/dist/components/IconButton/IconButton.js +1 -1
  74. package/dist/components/Input/Input.d.ts +26 -5
  75. package/dist/components/Input/Input.js +514 -102
  76. package/dist/components/Input/Input.stories.d.ts +2 -21
  77. package/dist/components/InputSearch/InputSearch.d.ts +37 -7
  78. package/dist/components/InputSearch/InputSearch.js +27 -29
  79. package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
  80. package/dist/components/PageHeader/PageHeader.d.ts +6 -2
  81. package/dist/components/PageHeader/PageHeader.js +77 -70
  82. package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
  83. package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
  84. package/dist/components/Pagination/Pagination.d.ts +5 -1
  85. package/dist/components/Pagination/Pagination.js +45 -46
  86. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  87. package/dist/components/Popover/Popover.d.ts +32 -0
  88. package/dist/components/Popover/Popover.js +24 -0
  89. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  90. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  91. package/dist/components/Popover/PopoverBody.js +6 -0
  92. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  93. package/dist/components/Popover/PopoverFooter.js +6 -0
  94. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  95. package/dist/components/Popover/PopoverHeader.js +6 -0
  96. package/dist/components/RadioButton/RadioButton.d.ts +19 -0
  97. package/dist/components/RadioButton/RadioButton.js +37 -0
  98. package/dist/components/RadioButton/RadioButton.stories.d.ts +24 -0
  99. package/dist/components/RadioButton/RadioButton.test.d.ts +1 -0
  100. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  101. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  102. package/dist/components/RowItem/RowItem.d.ts +2 -2
  103. package/dist/components/RowItem/RowItem.js +9 -5
  104. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  105. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  106. package/dist/components/Select/Select.d.ts +22 -0
  107. package/dist/components/Select/Select.js +476 -414
  108. package/dist/components/Select/SelectButton.d.ts +2 -0
  109. package/dist/components/Select/SelectButton.js +3 -2
  110. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  111. package/dist/components/Skeleton/Skeleton.js +20 -14
  112. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  113. package/dist/components/Snackbar/Snackbar.js +119 -134
  114. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  115. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  116. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  117. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  118. package/dist/components/Table/Table.d.ts +3 -1
  119. package/dist/components/Table/Table.js +89 -101
  120. package/dist/components/Table/Table.stories.d.ts +1 -1
  121. package/dist/components/Tabs/Tab.d.ts +5 -3
  122. package/dist/components/Tabs/Tab.js +36 -35
  123. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  124. package/dist/components/Tabs/TabPanel.js +48 -38
  125. package/dist/components/Tabs/Tabs.d.ts +6 -4
  126. package/dist/components/Tabs/Tabs.js +115 -112
  127. package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
  128. package/dist/components/TextDisplay/TextDisplay.js +44 -37
  129. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  130. package/dist/components/Toggle/Toggle.js +1 -1
  131. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  132. package/dist/components/ToggleGroup/Group.js +4 -2
  133. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  134. package/dist/components/ToggleGroup/Toggle.js +8 -4
  135. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  136. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
  137. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  138. package/dist/components/Tooltip/Tooltip.js +4 -4
  139. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  140. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +2 -2
  141. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +35 -30
  142. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  143. package/dist/{index-D3Wj0eid.js → index-bQFToy-I.js} +1 -1
  144. package/dist/main.d.ts +8 -0
  145. package/dist/main.js +95 -79
  146. package/dist/marola.css +1 -1
  147. package/dist/{ownerDocument-B61GUaFs.js → ownerDocument-YGhwAnr1.js} +1 -1
  148. package/dist/test-utils/assertStyles.d.ts +1 -1
  149. package/dist/{useButton-Bn3MNH8I.js → useButton-DcihopJG.js} +1 -1
  150. package/dist/{useList-BpJT77u3.js → useList-B9C55YB7.js} +2 -2
  151. package/dist/{useSlotProps-kRhf7Gil.js → useSlotProps-C_I1kEHr.js} +73 -72
  152. package/package.json +22 -13
  153. package/dist/Dialog.module-DFcZsVAd.js +0 -30
  154. package/dist/Group-B3p31ftp.js +0 -26
  155. package/dist/Input.module-ZTRZRcNt.js +0 -405
  156. package/dist/SelectButton-CoOT2txy.js +0 -61
  157. package/dist/Toggle-f5brSwAI.js +0 -175
@@ -2,31 +2,7 @@ import { StoryObj } from '@storybook/react';
2
2
 
3
3
  declare const meta: {
4
4
  title: string;
5
- component: <T extends string | (object & {
6
- label: string;
7
- })>({ 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 }: import('react').InputHTMLAttributes<HTMLInputElement> & {
8
- label?: string | undefined;
9
- options?: T[] | undefined;
10
- onChange?: ((event: import('react').SyntheticEvent<Element, Event>, newValue: T) => void) | undefined;
11
- infoMessage?: string | undefined;
12
- errorMessage?: string | undefined;
13
- leftIcon?: import('react').ReactNode;
14
- rightIcon?: import('react').ReactNode;
15
- type?: "search" | "text" | "password" | undefined;
16
- hideCharsCounter?: boolean | undefined;
17
- classNameWrapper?: string | undefined;
18
- classNameLabel?: string | undefined;
19
- classNameInput?: string | undefined;
20
- classNameInfoMessage?: string | undefined;
21
- classNameErrorMessage?: string | undefined;
22
- classNameCharsCounter?: string | undefined;
23
- 'data-testid-wrapper'?: string | undefined;
24
- 'data-testid-label'?: string | undefined;
25
- 'data-testid-input'?: string | undefined;
26
- 'data-testid-infoMessage'?: string | undefined;
27
- 'data-testid-errorMessage'?: string | undefined;
28
- 'data-testid-charsCounter'?: string | undefined;
29
- }) => import("react/jsx-runtime").JSX.Element;
5
+ component: <T extends string | object>({ labelKey, valueKey, options, type, value, onChange, onInputChange, "data-testid-wrapper": dataTestId, ...props }: import('./Autocomplete.tsx').AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
30
6
  tags: string[];
31
7
  parameters: {
32
8
  layout: string;
@@ -35,6 +11,8 @@ declare const meta: {
35
11
  export default meta;
36
12
  type Story = StoryObj<typeof meta>;
37
13
  export declare const Simple: Story;
14
+ export declare const WithObjectsOptions: Story;
15
+ export declare const WithAHugeList: Story;
38
16
  export declare const WithLabel: Story;
39
17
  export declare const WithSearch: Story;
40
18
  export declare const WithPlaceholder: Story;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ type AvatarType = 'icon' | 'image' | 'text';
4
+ type AvatarSize = 'default' | 'large' | 'small' | number;
5
+ type AvatarShape = 'circle' | 'square';
6
+ type AvatarCoreProps = {
7
+ type: AvatarType;
8
+ size?: AvatarSize;
9
+ shape?: AvatarShape;
10
+ children: ReactNode;
11
+ className?: string;
12
+ 'data-testid'?: string;
13
+ };
14
+ export declare const Avatar: import('react').ForwardRefExoticComponent<AvatarCoreProps & import('react').RefAttributes<HTMLDivElement>>;
15
+ export {};
@@ -0,0 +1,51 @@
1
+ import '../../assets/Avatar.css';
2
+ import { jsxs as v, jsx as _ } from "react/jsx-runtime";
3
+ import { forwardRef as c, useMemo as y } from "react";
4
+ import { c as d } from "../../clsx-DB4S2d7J.js";
5
+ const m = "_avatar_4n12g_57", b = "_avatar__icon_4n12g_108", x = "_avatar__image_4n12g_108", f = "_avatar__text_4n12g_108", t = {
6
+ "u-typography-h1": "_u-typography-h1_4n12g_1",
7
+ "u-typography-h2": "_u-typography-h2_4n12g_8",
8
+ "u-typography-h3": "_u-typography-h3_4n12g_15",
9
+ "u-typography-h4": "_u-typography-h4_4n12g_22",
10
+ "u-typography-h5": "_u-typography-h5_4n12g_29",
11
+ "u-typography-h6": "_u-typography-h6_4n12g_36",
12
+ "u-typography-base": "_u-typography-base_4n12g_43",
13
+ "u-typography-base--xxl": "_u-typography-base--xxl_4n12g_49",
14
+ "u-typography-base--xl": "_u-typography-base--xl_4n12g_53",
15
+ "u-typography-base--lg": "_u-typography-base--lg_4n12g_57",
16
+ avatar: m,
17
+ "u-typography-base--sm": "_u-typography-base--sm_4n12g_61",
18
+ "u-typography-base--bold": "_u-typography-base--bold_4n12g_65",
19
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_4n12g_68",
20
+ "u-typography-base--underlined": "_u-typography-base--underlined_4n12g_71",
21
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_4n12g_74",
22
+ "avatar--large": "_avatar--large_4n12g_86",
23
+ "avatar--default": "_avatar--default_4n12g_90",
24
+ "avatar--small": "_avatar--small_4n12g_94",
25
+ "avatar--custom": "_avatar--custom_4n12g_98",
26
+ "avatar--circle": "_avatar--circle_4n12g_102",
27
+ "avatar--square": "_avatar--square_4n12g_105",
28
+ avatar__icon: b,
29
+ avatar__image: x,
30
+ avatar__text: f
31
+ }, $ = c((h, n) => {
32
+ const { type: e, size: a = "default", shape: g = "circle", children: s, className: o, "data-testid": u } = h, r = typeof a == "number", i = y(
33
+ () => ({
34
+ width: r ? a : void 0,
35
+ height: r ? a : void 0,
36
+ "--avatar-custom-size": r ? `${a}px` : void 0
37
+ }),
38
+ [a, r]
39
+ ), p = r ? "custom" : a, l = y(
40
+ () => d(t.avatar, t[`avatar--${p}`], t[`avatar--${g}`], o),
41
+ [p, g, o]
42
+ );
43
+ return /* @__PURE__ */ v("div", { ref: n, style: i, className: l, "data-testid": u, children: [
44
+ e === "icon" && /* @__PURE__ */ _("span", { className: t.avatar__icon, children: s }),
45
+ e === "image" && /* @__PURE__ */ _("div", { className: t.avatar__image, children: /* @__PURE__ */ _("img", { src: s, alt: "avatar" }) }),
46
+ e === "text" && /* @__PURE__ */ _("span", { className: t.avatar__text, children: s })
47
+ ] });
48
+ });
49
+ export {
50
+ $ as Avatar
51
+ };
@@ -0,0 +1,25 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: import('react').ForwardRefExoticComponent<{
6
+ type: "icon" | "image" | "text";
7
+ size?: (number | "default" | "small" | "large") | undefined;
8
+ shape?: ("circle" | "square") | undefined;
9
+ children: import('react').ReactNode;
10
+ className?: string | undefined;
11
+ 'data-testid'?: string | undefined;
12
+ } & import('react').RefAttributes<HTMLDivElement>>;
13
+ tags: string[];
14
+ parameters: {
15
+ layout: string;
16
+ };
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Icon: Story;
21
+ export declare const Image: Story;
22
+ export declare const Text: Story;
23
+ export declare const CustomSize: Story;
24
+ export declare const LargeSquare: Story;
25
+ export declare const SmallCircle: Story;
@@ -16,6 +16,8 @@ type ButtonCoreProps = {
16
16
  variant?: Variant;
17
17
  /** mui base button props */
18
18
  muiButtonBaseProps?: MUIButtonBaseProps;
19
+ /** Id to be applied as `data-testid` on the container element */
20
+ 'data-testid'?: string;
19
21
  };
20
22
  interface ButtonPropsWithLink extends ButtonCoreProps {
21
23
  /** link for component to navigate to, if provide component will be an anchor */
@@ -1,10 +1,10 @@
1
1
  import '../../assets/Button.css';
2
- import { jsx as p, jsxs as b } from "react/jsx-runtime";
3
- import { forwardRef as l, useMemo as x } from "react";
4
- import { c } from "../../clsx-DB4S2d7J.js";
5
- import { LoadingSpinner as v } from "../LoadingSpinner/LoadingSpinner.js";
6
- import { B as m } from "../../Button-DiLqcAJG.js";
7
- const f = "_button_dxo5v_57", t = {
2
+ import { jsx as p, jsxs as l } from "react/jsx-runtime";
3
+ import { forwardRef as x, useMemo as c } from "react";
4
+ import { c as v } from "../../clsx-DB4S2d7J.js";
5
+ import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
6
+ import { B as f } from "../../Button-BAljjMv3.js";
7
+ const k = "_button_dxo5v_57", t = {
8
8
  "u-typography-h1": "_u-typography-h1_dxo5v_1",
9
9
  "u-typography-h2": "_u-typography-h2_dxo5v_8",
10
10
  "u-typography-h3": "_u-typography-h3_dxo5v_15",
@@ -15,7 +15,7 @@ const f = "_button_dxo5v_57", t = {
15
15
  "u-typography-base--xxl": "_u-typography-base--xxl_dxo5v_49",
16
16
  "u-typography-base--xl": "_u-typography-base--xl_dxo5v_53",
17
17
  "u-typography-base--lg": "_u-typography-base--lg_dxo5v_57",
18
- button: f,
18
+ button: k,
19
19
  "u-typography-base--sm": "_u-typography-base--sm_dxo5v_61",
20
20
  "u-typography-base--bold": "_u-typography-base--bold_dxo5v_65",
21
21
  "u-typography-base--strikethrough": "_u-typography-base--strikethrough_dxo5v_68",
@@ -25,41 +25,43 @@ const f = "_button_dxo5v_57", t = {
25
25
  "button--secondary": "_button--secondary_dxo5v_101",
26
26
  "button--quick": "_button--quick_dxo5v_118",
27
27
  "button__loading-container": "_button__loading-container_dxo5v_138"
28
- }, P = l((y, _) => {
28
+ }, S = x((y, _) => {
29
29
  const {
30
30
  onClick: u,
31
- link: n,
32
- loading: e,
31
+ link: e,
32
+ loading: n,
33
33
  children: a,
34
34
  type: s = "button",
35
35
  disabled: h,
36
36
  className: r,
37
37
  variant: o = "primary",
38
- muiButtonBaseProps: d
39
- } = y, g = {
38
+ muiButtonBaseProps: d,
39
+ "data-testid": g
40
+ } = y, i = {
40
41
  invert: o === "secondary" || o === "quick"
41
- }, i = x(
42
- () => c([t.button, t[`button--${o}`], r]),
42
+ }, b = c(
43
+ () => v([t.button, t[`button--${o}`], r]),
43
44
  [r, o]
44
45
  );
45
46
  return /* @__PURE__ */ p(
46
- m,
47
+ f,
47
48
  {
48
49
  type: s,
49
- href: n,
50
+ href: e,
50
51
  onClick: u,
51
52
  disabled: h,
52
- className: i,
53
+ className: b,
53
54
  ref: _,
55
+ "data-testid": g,
54
56
  ...d ?? {},
55
- children: e ? /* @__PURE__ */ b("div", { className: t["button__loading-container"], children: [
56
- /* @__PURE__ */ p(v, { ...g }),
57
+ children: n ? /* @__PURE__ */ l("div", { className: t["button__loading-container"], children: [
58
+ /* @__PURE__ */ p(m, { ...i }),
57
59
  a
58
60
  ] }) : a
59
61
  }
60
62
  );
61
63
  });
62
64
  export {
63
- P as Button,
64
- P as default
65
+ S as Button,
66
+ S as default
65
67
  };
@@ -1,14 +1,14 @@
1
- import { AdornmentSlotProps } from '../../main';
1
+ import { AdornmentProps } from '../../main';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  export type Variant = 'default' | 'contained' | 'outlined';
5
- type ChipProps = {
5
+ export type ChipProps = {
6
6
  /** Main content to display, typically just some text */
7
7
  label: ReactNode;
8
8
  /** Whether to show loading state (skeleton) */
9
9
  loading?: boolean;
10
10
  /** Left icon to display */
11
- leftAdornment?: AdornmentSlotProps;
11
+ leftAdornment?: AdornmentProps;
12
12
  /** Dataset test id only used for tests to reach in and grab the rendered DOM node of the chip wrapper */
13
13
  'data-testid'?: string;
14
14
  /** Functionality to perform when the main body of the chip is clicked */
@@ -27,5 +27,7 @@ type ChipProps = {
27
27
  /** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
28
28
  'data-testid-skeleton'?: string;
29
29
  };
30
+ export type ChipWrapperProps = Pick<ChipProps, 'data-testid' | 'onClickContent' | 'disabled' | 'className' | 'variant'> & {
31
+ children?: ReactNode;
32
+ };
30
33
  export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<unknown>>;
31
- export {};
@@ -4,17 +4,21 @@ import "../../clsx-DB4S2d7J.js";
4
4
  import "../Adornment/Adornment.js";
5
5
  import "../Icon/Icon.js";
6
6
  import "../Typography/Typography.js";
7
+ import "../Input/Input.js";
8
+ import "../Avatar/Avatar.js";
7
9
  import "../Button/Button.js";
8
- import { C as k } from "../../Toggle-f5brSwAI.js";
9
- import "../Dialog/Backdrop.js";
10
+ import { C as u } from "../../Toggle-MfR7l8Wn.js";
11
+ import "../Dialog/Dialog.js";
12
+ import "../Skeleton/Skeleton.js";
10
13
  import "../IconButton/IconButton.js";
14
+ import "../InputSearch/InputSearch.js";
11
15
  import "../Select/Select.js";
12
- import "../Skeleton/Skeleton.js";
16
+ import "../Popover/Popover.js";
13
17
  import "../Table/Table.js";
14
18
  import "../Tabs/Tabs.js";
15
- import "../../Group-B3p31ftp.js";
19
+ import "../../Group-DspH8hyO.js";
16
20
  import "../../contexts/SnackbarProvider/SnackbarProvider.js";
17
- import "../../Button-DiLqcAJG.js";
21
+ import "../../Button-BAljjMv3.js";
18
22
  export {
19
- k as Chip
23
+ u as Chip
20
24
  };
@@ -2,24 +2,12 @@ import { StoryObj } from '@storybook/react';
2
2
 
3
3
  declare const meta: {
4
4
  title: string;
5
- component: import('react').ForwardRefExoticComponent<{
6
- label: import('react').ReactNode;
7
- loading?: boolean | undefined;
8
- leftAdornment?: import('../Adornment/Adornment').AdornmentSlotProps | undefined;
9
- 'data-testid'?: string | undefined;
10
- onClickContent?: (() => void) | undefined;
11
- onClickRemove?: (() => void) | undefined;
12
- disabled?: boolean | undefined;
13
- className?: string | undefined;
14
- 'className-skeleton'?: string | undefined;
15
- variant?: import('./Chip').Variant | undefined;
16
- 'data-testid-skeleton'?: string | undefined;
17
- } & import('react').RefAttributes<unknown>>;
5
+ component: import('react').ForwardRefExoticComponent<import('./Chip').ChipProps & import('react').RefAttributes<unknown>>;
18
6
  tags: string[];
19
7
  decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
20
8
  label: import('react').ReactNode;
21
9
  loading?: boolean | undefined;
22
- leftAdornment?: import('../Adornment/Adornment').AdornmentSlotProps | undefined;
10
+ leftAdornment?: import('../Adornment/Adornment').AdornmentProps | undefined;
23
11
  'data-testid'?: string | undefined;
24
12
  onClickContent?: (() => void) | undefined;
25
13
  onClickRemove?: (() => void) | undefined;
@@ -36,7 +24,10 @@ export default meta;
36
24
  type Story = StoryObj<typeof meta>;
37
25
  export declare const Simple: Story;
38
26
  export declare const Clickable: Story;
27
+ export declare const Disabled: Story;
39
28
  export declare const ClickableWithRemove: Story;
29
+ export declare const ClickableOnlyRemove: Story;
40
30
  export declare const FullDefault: Story;
41
31
  export declare const FullOutlined: Story;
42
32
  export declare const FullContained: Story;
33
+ export declare const FullContainedCustomIcon: Story;
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ConfirmationDialogProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ title?: ReactNode;
7
+ subtitle?: ReactNode;
8
+ confirmLabel: string;
9
+ cancelLabel: string;
10
+ content?: ReactNode;
11
+ confirmAction: () => void;
12
+ cancelAction: () => void;
13
+ }
14
+ export declare const ConfirmationDialog: ({ open, onClose, title, subtitle, content, cancelAction, confirmAction, confirmLabel, cancelLabel, }: ConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { jsx as o, jsxs as i, Fragment as f } from "react/jsx-runtime";
2
+ import { Button as n } from "../Button/Button.js";
3
+ import { Dialog as s } from "../Dialog/Dialog.js";
4
+ import { Typography as t } from "../Typography/Typography.js";
5
+ import g from "../Dialog/Content.js";
6
+ import C from "../Dialog/Actions.js";
7
+ const T = ({
8
+ open: l,
9
+ onClose: e,
10
+ title: m,
11
+ subtitle: c,
12
+ content: r,
13
+ cancelAction: d,
14
+ confirmAction: a,
15
+ confirmLabel: h,
16
+ cancelLabel: p
17
+ }) => /* @__PURE__ */ o(
18
+ s,
19
+ {
20
+ open: l,
21
+ dialogTitle: m,
22
+ dialogSubtitle: c,
23
+ onClose: () => {
24
+ e();
25
+ },
26
+ children: /* @__PURE__ */ i(f, { children: [
27
+ r && /* @__PURE__ */ o(g, { children: r }),
28
+ /* @__PURE__ */ i(C, { children: [
29
+ /* @__PURE__ */ o(n, { variant: "secondary", onClick: () => d(), children: /* @__PURE__ */ o(t, { children: p }) }),
30
+ /* @__PURE__ */ o(n, { onClick: () => a(), children: /* @__PURE__ */ o(t, { children: h }) })
31
+ ] })
32
+ ] })
33
+ }
34
+ );
35
+ export {
36
+ T as ConfirmationDialog
37
+ };
@@ -0,0 +1,23 @@
1
+ import { ConfirmationDialogProps } from '../../main';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: ({ open, onClose, title, subtitle, content, cancelAction, confirmAction, confirmLabel, cancelLabel, }: ConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
7
+ tags: string[];
8
+ decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
9
+ open: boolean;
10
+ onClose: () => void;
11
+ title?: import('react').ReactNode;
12
+ subtitle?: import('react').ReactNode;
13
+ confirmLabel: string;
14
+ cancelLabel: string;
15
+ content?: import('react').ReactNode;
16
+ confirmAction: () => void;
17
+ cancelAction: () => void;
18
+ }>) => import("react/jsx-runtime").JSX.Element)[];
19
+ };
20
+ export default meta;
21
+ type Story = StoryObj<typeof meta>;
22
+ export declare const Simple: Story;
23
+ export declare const WithContent: Story;
@@ -0,0 +1,21 @@
1
+ import { VariantType } from '../Typography/Typography.tsx';
2
+
3
+ export interface DescriptionProps {
4
+ /** Description label */
5
+ label: React.ReactNode;
6
+ /** Description value */
7
+ value: React.ReactNode;
8
+ /** Renders skeleton when true */
9
+ isLoading?: boolean;
10
+ /** Description label and value color */
11
+ color?: string;
12
+ /** Sets the data-testid prefix for label, value and skeletons */
13
+ 'data-testid'?: string;
14
+ /** Sets the label and value onto the same line */
15
+ inline?: boolean;
16
+ /** Sets the label size variant */
17
+ labelVariant?: VariantType;
18
+ /** Sets the value size variant */
19
+ valueVariant?: VariantType;
20
+ }
21
+ export declare const Description: ({ label, value, isLoading, color, "data-testid": dataTestId, inline, labelVariant, valueVariant, }: DescriptionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,66 @@
1
+ import '../../assets/Description.css';
2
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
3
+ import { c as g } from "../../clsx-DB4S2d7J.js";
4
+ import { Skeleton as y } from "../Skeleton/Skeleton.js";
5
+ import { Typography as _ } from "../Typography/Typography.js";
6
+ const l = "_container_he0z3_78", a = {
7
+ "u-typography-h1": "_u-typography-h1_he0z3_1",
8
+ "u-typography-h2": "_u-typography-h2_he0z3_8",
9
+ "u-typography-h3": "_u-typography-h3_he0z3_15",
10
+ "u-typography-h4": "_u-typography-h4_he0z3_22",
11
+ "u-typography-h5": "_u-typography-h5_he0z3_29",
12
+ "u-typography-h6": "_u-typography-h6_he0z3_36",
13
+ "u-typography-base": "_u-typography-base_he0z3_43",
14
+ "u-typography-base--xxl": "_u-typography-base--xxl_he0z3_49",
15
+ "u-typography-base--xl": "_u-typography-base--xl_he0z3_53",
16
+ "u-typography-base--lg": "_u-typography-base--lg_he0z3_57",
17
+ "u-typography-base--sm": "_u-typography-base--sm_he0z3_61",
18
+ "u-typography-base--bold": "_u-typography-base--bold_he0z3_65",
19
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_he0z3_68",
20
+ "u-typography-base--underlined": "_u-typography-base--underlined_he0z3_71",
21
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_he0z3_74",
22
+ container: l,
23
+ "container--text": "_container--text_he0z3_82",
24
+ "container--inline": "_container--inline_he0z3_85"
25
+ }, m = ({
26
+ label: s,
27
+ value: n,
28
+ isLoading: r,
29
+ color: h = "var(--gray-95)",
30
+ "data-testid": e = "Description",
31
+ inline: p,
32
+ labelVariant: i = "base",
33
+ valueVariant: o
34
+ }) => /* @__PURE__ */ u(
35
+ "div",
36
+ {
37
+ className: g([a.container, { [a["container--inline"]]: p }]),
38
+ "data-testid": `${e}-container`,
39
+ children: [
40
+ /* @__PURE__ */ t(
41
+ _,
42
+ {
43
+ color: h,
44
+ className: a["container--text"],
45
+ variant: i,
46
+ "data-testid": `${e}-label`,
47
+ children: r ? /* @__PURE__ */ t(y, { style: { width: 70, marginBottom: 2 }, "data-testid": `${e}-skeletonLabel` }) : s
48
+ }
49
+ ),
50
+ /* @__PURE__ */ t(
51
+ _,
52
+ {
53
+ className: a["container--text"],
54
+ bold: !0,
55
+ color: h,
56
+ variant: o || (p ? "base" : "base-lg"),
57
+ "data-testid": `${e}-value`,
58
+ children: r ? /* @__PURE__ */ t(y, { style: { width: 100 }, "data-testid": `${e}-skeletonValue` }) : n || "-"
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ );
64
+ export {
65
+ m as Description
66
+ };
@@ -0,0 +1,22 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ label, value, isLoading, color, "data-testid": dataTestId, inline, labelVariant, valueVariant, }: import('./Description').DescriptionProps) => import("react/jsx-runtime").JSX.Element;
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 WithColor: Story;
15
+ export declare const InLine: Story;
16
+ export declare const InLineWithColor: Story;
17
+ export declare const Loading: Story;
18
+ export declare const LoadingInline: Story;
19
+ export declare const InLineWithButton: Story;
20
+ export declare const WithButton: Story;
21
+ export declare const WithSmallSize: Story;
22
+ export declare const WithLargeSize: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { s as t } from "../../Dialog.module-DFcZsVAd.js";
2
+ import { s as t } from "../../Dialog.module-W7UCXlf3.js";
3
3
  const i = ({ children: s }) => /* @__PURE__ */ o("div", { className: t.dialog__actions, children: s });
4
4
  export {
5
5
  i as default
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- declare const Backdrop: import('react').ForwardRefExoticComponent<{
3
- open?: boolean | undefined;
1
+ import { ModalBackdropSlotProps } from '@mui/base';
2
+
3
+ declare const Backdrop: import('react').ForwardRefExoticComponent<ModalBackdropSlotProps & {
4
4
  className: string;
5
5
  } & import('react').RefAttributes<HTMLDivElement>>;
6
6
  export default Backdrop;
@@ -1,10 +1,11 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as t } from "react";
3
- import { s as e } from "../../Dialog.module-DFcZsVAd.js";
4
- const i = t((o, r) => {
5
- const { open: m, className: p, ...s } = o;
6
- return /* @__PURE__ */ a("div", { className: e.dialog__backdrop, ref: r, ...s });
7
- });
2
+ import { forwardRef as s } from "react";
3
+ import { c as t } from "../../clsx-DB4S2d7J.js";
4
+ import { s as m } from "../../Dialog.module-W7UCXlf3.js";
5
+ const l = s(
6
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
+ ({ ownerState: e, ...r }, o) => /* @__PURE__ */ a("div", { ...r, className: t(m.dialog__backdrop, r.className), ref: o })
8
+ );
8
9
  export {
9
- i as default
10
+ l as default
10
11
  };
@@ -1,6 +1,5 @@
1
1
  export interface CloseIconButtonProps {
2
2
  handleOnClose: () => void;
3
- className: string;
4
3
  }
5
- declare const CloseIconButton: ({ handleOnClose, className }: CloseIconButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const CloseIconButton: ({ handleOnClose }: CloseIconButtonProps) => import("react/jsx-runtime").JSX.Element;
6
5
  export default CloseIconButton;
@@ -1,20 +1,17 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { Icon as r } from "../Icon/Icon.js";
3
- import { s as t } from "../../Dialog.module-DFcZsVAd.js";
4
- import { B as a } from "../../Button-DiLqcAJG.js";
5
- const d = ({ handleOnClose: i, className: o }) => {
6
- const l = o != null ? t["dialog__close-icon "] + o : t["dialog__close-icon"];
7
- return /* @__PURE__ */ s(
8
- a,
9
- {
10
- className: l,
11
- "aria-description": "Close dialog",
12
- onClick: i,
13
- "data-testid": "dialog-close-button",
14
- children: /* @__PURE__ */ s(r, { icon: "circle-xmark", size: 32, color: "var(--gray-75)" })
15
- }
16
- );
17
- };
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Icon as i } from "../Icon/Icon.js";
3
+ import { s as r } from "../../Dialog.module-W7UCXlf3.js";
4
+ import { B as s } from "../../Button-BAljjMv3.js";
5
+ const n = ({ handleOnClose: t }) => /* @__PURE__ */ o(
6
+ s,
7
+ {
8
+ className: r["dialog__close-icon"],
9
+ "aria-description": "Close dialog",
10
+ onClick: t,
11
+ "data-testid": "dialog-close-button",
12
+ children: /* @__PURE__ */ o(i, { icon: "circle-xmark", size: 24, color: "#3F3D4B73" })
13
+ }
14
+ );
18
15
  export {
19
- d as default
16
+ n as default
20
17
  };
@@ -1,22 +1,28 @@
1
- import { default as DialogTitle } from './DialogTitle';
2
- import { default as Content } from './Content';
3
- import { default as Actions } from './Actions';
1
+ import { default as DialogTitle, DialogTitleProps } from './DialogTitle';
2
+ import { default as Content, DialogContentProps } from './Content';
3
+ import { default as Actions, DialogActionProps } from './Actions';
4
+ import { Icon } from '../Icon/Icon';
4
5
  import { ModalProps } from '@mui/base';
5
- import { JSXElementConstructor, ReactElement, ReactNode } from 'react';
6
+ import { ComponentProps, JSXElementConstructor, ReactElement, ReactNode } from 'react';
6
7
 
7
8
  export type CloseReason = 'backdropClick' | 'escapeKeyDown' | 'closeButtonClick';
8
- export interface DialogProps extends ModalProps {
9
+ export type DialogProps = Omit<ModalProps, 'onClose'> & {
9
10
  /** main content */
10
11
  children: ReactElement<unknown, string | JSXElementConstructor<unknown>>;
11
12
  /** display title label */
12
13
  dialogTitle: ReactNode;
13
14
  /** display subtitle */
14
15
  dialogSubtitle?: ReactNode;
15
- /** if true, show skeleton */
16
- isLoading?: boolean;
16
+ /** icon to show in the left side of the title */
17
+ icon?: ComponentProps<typeof Icon>;
17
18
  /** callback for when close is clicked */
18
- onClose?: () => void;
19
- }
20
- declare const Dialog: ({ children, dialogTitle, dialogSubtitle, isLoading, onClose, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
19
+ onClose?: (reason?: CloseReason) => void;
20
+ };
21
+ declare const Dialog: {
22
+ ({ children, dialogTitle, dialogSubtitle, icon, onClose, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
23
+ Title: import('react').FunctionComponent<DialogTitleProps>;
24
+ Content: import('react').FunctionComponent<DialogContentProps>;
25
+ Actions: import('react').FunctionComponent<DialogActionProps>;
26
+ };
21
27
  export { Dialog, DialogTitle, Content, Actions };
22
28
  export default Dialog;