@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,14 @@
1
+ import { TabsProps } from './Tabs.tsx';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
7
+ tags: string[];
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Simple: Story;
@@ -0,0 +1,23 @@
1
+ import { VariantType } from '../Typography/Typography.tsx';
2
+ import { default as React } from 'react';
3
+
4
+ type OptionsProps = {
5
+ variant?: VariantType;
6
+ color?: string;
7
+ };
8
+ export interface TextDisplayProps {
9
+ /** TextDisplay label */
10
+ label: React.ReactNode;
11
+ /** TextDisplay value */
12
+ value: React.ReactNode;
13
+ /** Renders skeleton when true */
14
+ isLoading?: boolean;
15
+ /** Sets the testId prefix for label, value and skeletons */
16
+ testId?: string;
17
+ /** Sets the label options */
18
+ labelOptions?: OptionsProps;
19
+ /** Sets the value options */
20
+ valueOptions?: OptionsProps;
21
+ }
22
+ export declare const TextDisplay: ({ label, value, isLoading, testId, labelOptions, valueOptions, }: TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,37 @@
1
+ import '../../assets/TextDisplay.css';
2
+ import { jsxs as h, jsx as c } from "react/jsx-runtime";
3
+ import { Skeleton as d } from "../Skeleton/Skeleton.js";
4
+ import { Typography as o } from "../Typography/Typography.js";
5
+ const x = "_container_13z5o_1", f = {
6
+ container: x
7
+ }, $ = ({
8
+ label: m,
9
+ value: y,
10
+ isLoading: e = !1,
11
+ testId: t = "TextDisplay",
12
+ labelOptions: r,
13
+ valueOptions: a
14
+ }) => /* @__PURE__ */ h("div", { className: f.container, children: [
15
+ /* @__PURE__ */ c(
16
+ o,
17
+ {
18
+ color: (r == null ? void 0 : r.color) || "var(--gray-90)",
19
+ variant: (r == null ? void 0 : r.variant) || "base",
20
+ "data-testid": `${t}-label`,
21
+ children: e ? /* @__PURE__ */ c(d, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : m
22
+ }
23
+ ),
24
+ /* @__PURE__ */ c(
25
+ o,
26
+ {
27
+ bold: !0,
28
+ color: (a == null ? void 0 : a.color) || "var(--gray-90)",
29
+ variant: (a == null ? void 0 : a.variant) || "base-lg",
30
+ "data-testid": `${t}-value`,
31
+ children: e ? /* @__PURE__ */ c(d, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : y || "-"
32
+ }
33
+ )
34
+ ] });
35
+ export {
36
+ $ as TextDisplay
37
+ };
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ label, value, isLoading, testId, labelOptions, valueOptions, }: import('./TextDisplay').TextDisplayProps) => import("react/jsx-runtime").JSX.Element;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Simple: Story;
11
+ export declare const WithLoading: Story;
12
+ export declare const Size: Story;
13
+ export declare const Color: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,11 +2,10 @@ import { InputHTMLAttributes } from 'react';
2
2
 
3
3
  type ToggleProps = InputHTMLAttributes<HTMLInputElement> & {
4
4
  label?: string;
5
- disabled?: boolean;
6
- 'data-testid'?: string;
7
5
  classNameWrapper?: string;
8
6
  classNameInput?: string;
9
7
  classNameLabel?: string;
8
+ 'data-testid'?: string;
10
9
  };
11
- export declare const Toggle: ({ onChange, label, disabled, classNameWrapper, "data-testid": dataTestId, classNameInput, classNameLabel, }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Toggle: ({ label, checked, disabled, classNameWrapper, classNameInput, "data-testid": dataTestId, onChange, classNameLabel, }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
12
11
  export {};
@@ -1,134 +1,133 @@
1
- import '../../assets/Toggle.css';
2
- import { jsxs as I, jsx as P } from "react/jsx-runtime";
1
+ import '../../assets/Toggle2.css';
2
+ import { jsxs as j, jsx as P } from "react/jsx-runtime";
3
3
  import { c as O } from "../../clsx-DB4S2d7J.js";
4
- import { a as k, _ as v } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
5
- import * as N from "react";
6
- import { u as U, g as q, a as H, b as C, P as e, c as M, d as A } from "../../index-CqjC7P5Y.js";
7
- import { u as D } from "../../useControlled-CCMYYdCM.js";
8
- import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
9
- function W(c) {
4
+ import { u as E, b as k, g as v, a as U, _ as q, c as C, P as e, d as H, e as M } from "../../index-CH45lKw7.js";
5
+ import * as F from "react";
6
+ import { u as A } from "../../useControlled-CCMYYdCM.js";
7
+ import { u as D } from "../../useIsFocusVisible-BH4IAdcw.js";
8
+ function L(l) {
10
9
  const {
11
- checked: o,
10
+ checked: s,
12
11
  defaultChecked: i,
13
- disabled: n,
14
- onBlur: a,
15
- onChange: d,
16
- onFocus: g,
17
- onFocusVisible: r,
18
- readOnly: s,
19
- required: V
20
- } = c, [S, x] = D({
21
- controlled: o,
12
+ disabled: r,
13
+ onBlur: c,
14
+ onChange: h,
15
+ onFocus: n,
16
+ onFocusVisible: u,
17
+ readOnly: a,
18
+ required: p
19
+ } = l, [N, V] = A({
20
+ controlled: s,
22
21
  default: !!i,
23
22
  name: "Switch",
24
23
  state: "checked"
25
- }), B = (t) => (l) => {
26
- var p;
27
- l.nativeEvent.defaultPrevented || (x(l.target.checked), d == null || d(l), (p = t.onChange) == null || p.call(t, l));
24
+ }), S = (t) => (o) => {
25
+ var d;
26
+ o.nativeEvent.defaultPrevented || (V(o.target.checked), h == null || h(o), (d = t.onChange) == null || d.call(t, o));
28
27
  }, {
29
- isFocusVisibleRef: h,
30
- onBlur: w,
31
- onFocus: b,
32
- ref: _
33
- } = L(), [f, y] = N.useState(!1);
34
- n && f && y(!1), N.useEffect(() => {
35
- h.current = f;
36
- }, [f, h]);
37
- const m = N.useRef(null), R = (t) => (l) => {
38
- var p;
39
- m.current || (m.current = l.currentTarget), b(l), h.current === !0 && (y(!0), r == null || r(l)), g == null || g(l), (p = t.onFocus) == null || p.call(t, l);
40
- }, T = (t) => (l) => {
41
- var p;
42
- w(l), h.current === !1 && y(!1), a == null || a(l), (p = t.onBlur) == null || p.call(t, l);
43
- }, F = U(_, m);
28
+ isFocusVisibleRef: b,
29
+ onBlur: B,
30
+ onFocus: _,
31
+ ref: f
32
+ } = D(), [y, z] = F.useState(!1);
33
+ r && y && z(!1), F.useEffect(() => {
34
+ b.current = y;
35
+ }, [y, b]);
36
+ const m = F.useRef(null), w = (t) => (o) => {
37
+ var d;
38
+ m.current || (m.current = o.currentTarget), _(o), b.current === !0 && (z(!0), u == null || u(o)), n == null || n(o), (d = t.onFocus) == null || d.call(t, o);
39
+ }, T = (t) => (o) => {
40
+ var d;
41
+ B(o), b.current === !1 && z(!1), c == null || c(o), (d = t.onBlur) == null || d.call(t, o);
42
+ }, x = E(f, m);
44
43
  return {
45
- checked: S,
46
- disabled: !!n,
47
- focusVisible: f,
44
+ checked: N,
45
+ disabled: !!r,
46
+ focusVisible: y,
48
47
  getInputProps: (t = {}) => k({
49
- checked: o,
48
+ checked: s,
50
49
  defaultChecked: i,
51
- disabled: n,
52
- readOnly: s,
53
- ref: F,
54
- required: V,
50
+ disabled: r,
51
+ readOnly: a,
52
+ ref: x,
53
+ required: p,
55
54
  type: "checkbox",
56
55
  role: "switch",
57
- "aria-checked": o
56
+ "aria-checked": s
58
57
  }, t, {
59
- onChange: B(t),
60
- onFocus: R(t),
58
+ onChange: S(t),
59
+ onFocus: w(t),
61
60
  onBlur: T(t)
62
61
  }),
63
- inputRef: F,
64
- readOnly: !!s
62
+ inputRef: x,
63
+ readOnly: !!a
65
64
  };
66
65
  }
67
- const $ = "Switch";
68
- function z(c) {
69
- return q($, c);
66
+ const I = "Switch";
67
+ function W(l) {
68
+ return v(I, l);
70
69
  }
71
- H($, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
72
- const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (c) => {
70
+ U(I, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
71
+ const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (l) => {
73
72
  const {
74
- checked: o,
73
+ checked: s,
75
74
  disabled: i,
76
- focusVisible: n,
77
- readOnly: a
78
- } = c;
79
- return M({
80
- root: ["root", o && "checked", i && "disabled", n && "focusVisible", a && "readOnly"],
75
+ focusVisible: r,
76
+ readOnly: c
77
+ } = l;
78
+ return H({
79
+ root: ["root", s && "checked", i && "disabled", r && "focusVisible", c && "readOnly"],
81
80
  thumb: ["thumb"],
82
81
  input: ["input"],
83
82
  track: ["track"]
84
- }, A(z));
85
- }, E = /* @__PURE__ */ N.forwardRef(function(o, i) {
86
- var n, a, d, g;
83
+ }, M(W));
84
+ }, $ = /* @__PURE__ */ F.forwardRef(function(s, i) {
85
+ var r, c, h, n;
87
86
  const {
88
- slotProps: r = {},
89
- slots: s = {}
90
- } = o, V = v(o, G), {
91
- getInputProps: S,
92
- checked: x,
93
- disabled: B,
94
- focusVisible: h,
95
- readOnly: w
96
- } = W(o), b = k({}, o, {
97
- checked: x,
98
- disabled: B,
99
- focusVisible: h,
100
- readOnly: w
101
- }), _ = J(b), f = (n = s.root) != null ? n : "span", y = C({
102
- elementType: f,
103
- externalSlotProps: r.root,
104
- externalForwardedProps: V,
87
+ slotProps: u = {},
88
+ slots: a = {}
89
+ } = s, p = q(s, G), {
90
+ getInputProps: N,
91
+ checked: V,
92
+ disabled: S,
93
+ focusVisible: b,
94
+ readOnly: B
95
+ } = L(s), _ = k({}, s, {
96
+ checked: V,
97
+ disabled: S,
98
+ focusVisible: b,
99
+ readOnly: B
100
+ }), f = J(_), y = (r = a.root) != null ? r : "span", z = C({
101
+ elementType: y,
102
+ externalSlotProps: u.root,
103
+ externalForwardedProps: p,
105
104
  additionalProps: {
106
105
  ref: i
107
106
  },
108
- ownerState: b,
109
- className: _.root
110
- }), m = (a = s.thumb) != null ? a : "span", R = C({
107
+ ownerState: _,
108
+ className: f.root
109
+ }), m = (c = a.thumb) != null ? c : "span", w = C({
111
110
  elementType: m,
112
- externalSlotProps: r.thumb,
113
- ownerState: b,
114
- className: _.thumb
115
- }), T = (d = s.input) != null ? d : "input", F = C({
111
+ externalSlotProps: u.thumb,
112
+ ownerState: _,
113
+ className: f.thumb
114
+ }), T = (h = a.input) != null ? h : "input", x = C({
116
115
  elementType: T,
117
- getSlotProps: S,
118
- externalSlotProps: r.input,
119
- ownerState: b,
120
- className: _.input
121
- }), j = s.track === null ? () => null : (g = s.track) != null ? g : "span", t = C({
122
- elementType: j,
123
- externalSlotProps: r.track,
124
- ownerState: b,
125
- className: _.track
116
+ getSlotProps: N,
117
+ externalSlotProps: u.input,
118
+ ownerState: _,
119
+ className: f.input
120
+ }), R = a.track === null ? () => null : (n = a.track) != null ? n : "span", t = C({
121
+ elementType: R,
122
+ externalSlotProps: u.track,
123
+ ownerState: _,
124
+ className: f.track
126
125
  });
127
- return /* @__PURE__ */ I(f, k({}, y, {
128
- children: [/* @__PURE__ */ P(j, k({}, t)), /* @__PURE__ */ P(m, k({}, R)), /* @__PURE__ */ P(T, k({}, F))]
126
+ return /* @__PURE__ */ j(y, k({}, z, {
127
+ children: [/* @__PURE__ */ P(R, k({}, t)), /* @__PURE__ */ P(m, k({}, w)), /* @__PURE__ */ P(T, k({}, x))]
129
128
  }));
130
129
  });
131
- process.env.NODE_ENV !== "production" && (E.propTypes = {
130
+ process.env.NODE_ENV !== "production" && ($.propTypes = {
132
131
  // ┌────────────────────────────── Warning ──────────────────────────────┐
133
132
  // │ These PropTypes are generated from the TypeScript type definitions. │
134
133
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -199,53 +198,69 @@ process.env.NODE_ENV !== "production" && (E.propTypes = {
199
198
  track: e.oneOfType([e.elementType, e.oneOf([null])])
200
199
  })
201
200
  });
202
- const K = "_toggle_11c3l_1", Q = "_input_11c3l_12", X = "_thumb_11c3l_23", Y = "_track_11c3l_37", Z = "_toggle__label_11c3l_61", u = {
203
- toggle: K,
204
- "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_11c3l_8",
205
- input: Q,
206
- thumb: X,
207
- track: Y,
208
- "toggle--focus-visible": "_toggle--focus-visible_11c3l_47",
209
- "toggle--checked": "_toggle--checked_11c3l_51",
210
- toggle__label: Z,
211
- "toggle--disabled": "_toggle--disabled_11c3l_66"
212
- }, ne = ({
213
- onChange: c,
214
- label: o,
201
+ const K = "_toggle__label_1rzg2_43", Q = "_toggle_1rzg2_43", X = "_input_1rzg2_88", Y = "_thumb_1rzg2_99", Z = "_track_1rzg2_113", g = {
202
+ "u-typography-h1": "_u-typography-h1_1rzg2_1",
203
+ "u-typography-h2": "_u-typography-h2_1rzg2_8",
204
+ "u-typography-h3": "_u-typography-h3_1rzg2_15",
205
+ "u-typography-h4": "_u-typography-h4_1rzg2_22",
206
+ "u-typography-h5": "_u-typography-h5_1rzg2_29",
207
+ "u-typography-h6": "_u-typography-h6_1rzg2_36",
208
+ "u-typography-base": "_u-typography-base_1rzg2_43",
209
+ toggle__label: K,
210
+ "u-typography-base--xxl": "_u-typography-base--xxl_1rzg2_48",
211
+ "u-typography-base--xl": "_u-typography-base--xl_1rzg2_52",
212
+ "u-typography-base--lg": "_u-typography-base--lg_1rzg2_56",
213
+ "u-typography-base--sm": "_u-typography-base--sm_1rzg2_60",
214
+ "u-typography-base--bold": "_u-typography-base--bold_1rzg2_64",
215
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1rzg2_67",
216
+ "u-typography-base--underlined": "_u-typography-base--underlined_1rzg2_70",
217
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1rzg2_73",
218
+ toggle: Q,
219
+ "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_1rzg2_84",
220
+ input: X,
221
+ thumb: Y,
222
+ track: Z,
223
+ "toggle--focus-visible": "_toggle--focus-visible_1rzg2_123",
224
+ "toggle--checked": "_toggle--checked_1rzg2_127",
225
+ "toggle--disabled": "_toggle--disabled_1rzg2_140"
226
+ }, re = ({
227
+ label: l,
228
+ checked: s,
215
229
  disabled: i,
216
- classNameWrapper: n,
217
- "data-testid": a,
218
- classNameInput: d,
219
- classNameLabel: g
230
+ classNameWrapper: r,
231
+ classNameInput: c,
232
+ "data-testid": h,
233
+ onChange: n,
234
+ classNameLabel: u
220
235
  }) => {
221
- const r = (s) => {
222
- c == null || c(s);
236
+ const a = (p) => {
237
+ n == null || n(p);
223
238
  };
224
- return /* @__PURE__ */ I("div", { className: O(u.toggle, n), "data-testid": a, children: [
239
+ return /* @__PURE__ */ j("div", { className: O(g.toggle, r), "data-testid": h, children: [
225
240
  /* @__PURE__ */ P(
226
- E,
241
+ $,
227
242
  {
243
+ checked: s === !0,
228
244
  disabled: i,
229
- onChange: r,
230
- autoFocus: !0,
231
- "aria-label": o,
245
+ onChange: a,
246
+ "aria-label": l,
232
247
  slotProps: {
233
- root: (s) => ({
234
- className: O(u["toggle__toggle-el-wrapper"], {
235
- [u["toggle--disabled"]]: s.disabled,
236
- [u["toggle--focus-visible"]]: s.focusVisible,
237
- [u["toggle--checked"]]: s.checked
248
+ root: (p) => ({
249
+ className: O(g["toggle__toggle-el-wrapper"], {
250
+ [g["toggle--disabled"]]: p.disabled,
251
+ [g["toggle--focus-visible"]]: p.focusVisible,
252
+ [g["toggle--checked"]]: p.checked
238
253
  })
239
254
  }),
240
- input: { className: O(u.input, d) },
241
- thumb: { className: u.thumb },
242
- track: { className: u.track }
255
+ input: { className: O(g.input, c) },
256
+ thumb: { className: g.thumb },
257
+ track: { className: g.track }
243
258
  }
244
259
  }
245
260
  ),
246
- o && /* @__PURE__ */ P("label", { className: O(u.toggle__label, g), children: o })
261
+ l && /* @__PURE__ */ P("label", { className: O(g.toggle__label, u), children: l })
247
262
  ] });
248
263
  };
249
264
  export {
250
- ne as Toggle
265
+ re as Toggle
251
266
  };
@@ -2,13 +2,12 @@ import { StoryObj } from '@storybook/react';
2
2
 
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ onChange, label, disabled, classNameWrapper, "data-testid": dataTestId, classNameInput, classNameLabel, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
5
+ component: ({ label, checked, disabled, classNameWrapper, classNameInput, "data-testid": dataTestId, onChange, classNameLabel, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
6
6
  label?: string | undefined;
7
- disabled?: boolean | undefined;
8
- 'data-testid'?: string | undefined;
9
7
  classNameWrapper?: string | undefined;
10
8
  classNameInput?: string | undefined;
11
9
  classNameLabel?: string | undefined;
10
+ 'data-testid'?: string | undefined;
12
11
  }) => import("react/jsx-runtime").JSX.Element;
13
12
  tags: string[];
14
13
  parameters: {
@@ -0,0 +1,18 @@
1
+ import { ToggleGroupItemProps } from './Toggle.tsx';
2
+ import { ReactElement, ReactNode } from 'react';
3
+
4
+ export type ToggleGroupProps = {
5
+ /** Optional title and description content */
6
+ legend?: ReactNode;
7
+ /** Optional any errors to display */
8
+ error?: ReactNode;
9
+ /** ToggleGroupItems to display; options to toggle between */
10
+ children: Array<ReactElement<ToggleGroupItemProps<string | number>>>;
11
+ /**
12
+ * Dataset test id only used for tests to reach in and grab the rendered DOM nodes base value is used for fieldset
13
+ * error and legend append their names e.g. {data-testid}-error and {data-testid}-legend
14
+ * */
15
+ 'data-testid'?: string;
16
+ };
17
+ declare const Group: import('react').ForwardRefExoticComponent<ToggleGroupProps & import('react').RefAttributes<HTMLFieldSetElement>>;
18
+ export default Group;
@@ -0,0 +1,7 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../Icon/Icon.js";
4
+ import { G as i } from "../../Group-B3p31ftp.js";
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export type ToggleGroupItemProps<T extends string | number> = {
3
+ /** The display text to show for this option */
4
+ text: string;
5
+ /** The underlining value of this option */
6
+ value: T;
7
+ /** Whether this radio button is selected */
8
+ isSelected?: boolean;
9
+ /** callback for selection change */
10
+ onChange: (value: T | '') => void;
11
+ /** Dataset test id only used for tests to reach in and grab the rendered DOM node of the label */
12
+ 'data-testid'?: string;
13
+ };
14
+ declare const Toggle: import('react').ForwardRefExoticComponent<ToggleGroupItemProps<string | number> & import('react').RefAttributes<HTMLInputElement>>;
15
+ export default Toggle;
@@ -0,0 +1,17 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../../clsx-DB4S2d7J.js";
4
+ import "../Icon/Icon.js";
5
+ import "../Button/Button.js";
6
+ import { T as b } from "../../Toggle-BCgIItCc.js";
7
+ import "../Dialog/Backdrop.js";
8
+ import "../Typography/Typography.js";
9
+ import "../IconButton/IconButton.js";
10
+ import "../Select/Select.js";
11
+ import "../Table/Table.js";
12
+ import "../Tabs/Tabs.js";
13
+ import "../../Group-B3p31ftp.js";
14
+ import "../../contexts/SnackbarProvider/SnackbarProvider.js";
15
+ export {
16
+ b as default
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as ToggleGroupItem } from './Toggle';
2
+ export { default as ToggleGroup } from './Group';
@@ -0,0 +1,6 @@
1
+ import { T as e } from "../../Toggle-BCgIItCc.js";
2
+ import { G as p } from "../../Group-B3p31ftp.js";
3
+ export {
4
+ p as ToggleGroup,
5
+ e as ToggleGroupItem
6
+ };
@@ -0,0 +1,25 @@
1
+ import { ToggleGroupProps } from './Group.tsx';
2
+ import { StoryObj } from '@storybook/react';
3
+ import { FunctionComponent } from 'react';
4
+
5
+ declare const meta: {
6
+ title: string;
7
+ component: import('react').ForwardRefExoticComponent<ToggleGroupProps & import('react').RefAttributes<HTMLFieldSetElement>>;
8
+ tags: string[];
9
+ decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
10
+ legend?: import('react').ReactNode;
11
+ error?: import('react').ReactNode;
12
+ children: import('react').ReactElement<import('./Toggle.tsx').ToggleGroupItemProps<string | number>, string | import('react').JSXElementConstructor<any>>[];
13
+ 'data-testid'?: string | undefined;
14
+ ref?: import('react').LegacyRef<HTMLFieldSetElement> | undefined;
15
+ key?: import('react').Key | null | undefined;
16
+ }>) => import("react/jsx-runtime").JSX.Element)[];
17
+ subcomponents: {
18
+ ToggleGroupItem: FunctionComponent<unknown>;
19
+ };
20
+ };
21
+ export default meta;
22
+ type Story = StoryObj<typeof meta>;
23
+ export declare const Simple: Story;
24
+ export declare const NoLegend: Story;
25
+ export declare const WithError: Story;
@@ -1,17 +1,33 @@
1
1
  import { PopupPlacement } from '@mui/base';
2
+ import { AriaRole, CSSProperties, ReactNode } from 'react';
2
3
 
3
- type TooltipProps = {
4
- children: React.ReactNode;
5
- show?: boolean;
6
- anchorRef?: HTMLElement | null | undefined;
4
+ export type TooltipProps = {
5
+ /** Tooltip reference element. */
6
+ children: ReactNode;
7
+ /** Tooltip title. Zero-length titles string, undefined, null and false are never displayed. */
8
+ title: ReactNode;
9
+ /** Should the tooltip be initially open */
10
+ open?: boolean;
11
+ /** Disable the hover listener */
7
12
  disableHoverListener?: boolean;
13
+ /** Function to run when the tooltip is closed */
8
14
  onClose?: () => void;
15
+ /** The color of the tooltip */
9
16
  theme?: 'white' | 'black';
17
+ /** Dhe padding applied to the tooltip */
10
18
  padding?: 'small' | 'normal';
19
+ /** The Position where the tooltip will be display relative to the anchor element */
11
20
  position?: PopupPlacement;
12
- arialRole?: React.AriaRole;
21
+ /** Accessibility role label */
22
+ arialRole?: AriaRole;
23
+ /** Additional classnames to be applied to the tooltip */
13
24
  className?: string;
25
+ /** Additional styles to be applied to the tooltip */
26
+ style?: CSSProperties;
27
+ /** Test id */
14
28
  'data-testid'?: string;
29
+ /** Function thats return the HTML Element of target. Important to EllipsisTooltip knows if the node needs or not the ellipsis */
30
+ onTargetCreated?: (e: HTMLElement) => void;
15
31
  };
16
- declare const Tooltip: ({ children, show, anchorRef, onClose, arialRole, position, theme, padding, className, disableHoverListener, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
32
+ declare const Tooltip: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
17
33
  export { Tooltip };