@pismo/marola 0.0.1-alpha.9 → 1.0.0-beta.1

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 (165) 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 +108 -57
  59. package/dist/components/Icon/Icon.stories.d.ts +14 -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.js +143 -129
  117. package/dist/components/ToggleGroup/Group.d.ts +18 -0
  118. package/dist/components/ToggleGroup/Group.js +7 -0
  119. package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
  120. package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
  121. package/dist/components/ToggleGroup/Toggle.js +17 -0
  122. package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
  123. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  124. package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
  125. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
  126. package/dist/components/Tooltip/Tooltip.d.ts +22 -6
  127. package/dist/components/Tooltip/Tooltip.js +114 -1339
  128. package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
  129. package/dist/components/Typography/Typography.d.ts +5 -2
  130. package/dist/components/Typography/Typography.js +58 -74
  131. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  132. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
  133. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
  134. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
  135. package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
  136. package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
  137. package/dist/main.d.ts +10 -1
  138. package/dist/main.js +74 -55
  139. package/dist/marola.css +1 -0
  140. package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
  141. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  142. package/dist/useEventCallback-xTG9piMa.js +45 -0
  143. package/dist/useList-B0hog_3-.js +436 -0
  144. package/dist/utils/styleStrings.d.ts +1 -1
  145. package/dist/utils/styleStrings.js +7 -7
  146. package/package.json +4 -4
  147. package/dist/Dialog.module-CGVM5V_D.js +0 -15
  148. package/dist/Tab-CRwnhsj5.js +0 -254
  149. package/dist/Tabs.module-yYcTJnj6.js +0 -103
  150. package/dist/_commonjsHelpers-CT_km90n.js +0 -30
  151. package/dist/assets/global.css +0 -1
  152. package/dist/components/Button/Button.stories.js +0 -40
  153. package/dist/components/Dialog/Dialog.stories.js +0 -59
  154. package/dist/components/Dialog/Title.js +0 -29
  155. package/dist/components/Input/Input.stories.js +0 -106
  156. package/dist/components/InputSearch/InputSearch.stories.js +0 -36
  157. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
  158. package/dist/components/PageHeader/PageHeader.stories.js +0 -49
  159. package/dist/components/Toggle/Toggle.stories.js +0 -33
  160. package/dist/components/Typography/Typography.stories.js +0 -30
  161. package/dist/components/Typography/typography.test.js +0 -11357
  162. package/dist/magic-string.es-O_8lTkE3.js +0 -738
  163. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
  164. package/dist/utils/styleStrings.test.js +0 -41
  165. 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 {};
@@ -1,134 +1,133 @@
1
- import '../../assets/Toggle.css';
2
- import { jsxs as I, jsx as T } from "react/jsx-runtime";
3
- import { c as F } from "../../clsx-DB4S2d7J.js";
4
- import { a as y, _ as v } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
5
- import * as V from "react";
6
- import { u as U, g as q, a as H, b as N, 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(l) {
1
+ import '../../assets/Toggle2.css';
2
+ import { jsxs as j, jsx as P } from "react/jsx-runtime";
3
+ import { c as O } from "../../clsx-DB4S2d7J.js";
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
10
  checked: s,
12
- defaultChecked: p,
13
- disabled: c,
14
- onBlur: a,
15
- onChange: g,
16
- onFocus: r,
11
+ defaultChecked: i,
12
+ disabled: r,
13
+ onBlur: c,
14
+ onChange: h,
15
+ onFocus: n,
17
16
  onFocusVisible: u,
18
- readOnly: n,
19
- required: i
20
- } = l, [S, x] = D({
17
+ readOnly: a,
18
+ required: p
19
+ } = l, [N, V] = A({
21
20
  controlled: s,
22
- default: !!p,
21
+ default: !!i,
23
22
  name: "Switch",
24
23
  state: "checked"
25
- }), B = (t) => (o) => {
26
- var b;
27
- o.nativeEvent.defaultPrevented || (x(o.target.checked), g == null || g(o), (b = t.onChange) == null || b.call(t, o));
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: _,
30
- onBlur: w,
31
- onFocus: f,
32
- ref: m
33
- } = L(), [h, P] = V.useState(!1);
34
- c && h && P(!1), V.useEffect(() => {
35
- _.current = h;
36
- }, [h, _]);
37
- const k = V.useRef(null), R = (t) => (o) => {
38
- var b;
39
- k.current || (k.current = o.currentTarget), f(o), _.current === !0 && (P(!0), u == null || u(o)), r == null || r(o), (b = t.onFocus) == null || b.call(t, o);
40
- }, O = (t) => (o) => {
41
- var b;
42
- w(o), _.current === !1 && P(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
43
- }, C = U(m, k);
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: !!c,
47
- focusVisible: h,
48
- getInputProps: (t = {}) => y({
44
+ checked: N,
45
+ disabled: !!r,
46
+ focusVisible: y,
47
+ getInputProps: (t = {}) => k({
49
48
  checked: s,
50
- defaultChecked: p,
51
- disabled: c,
52
- readOnly: n,
53
- ref: C,
54
- required: i,
49
+ defaultChecked: i,
50
+ disabled: r,
51
+ readOnly: a,
52
+ ref: x,
53
+ required: p,
55
54
  type: "checkbox",
56
55
  role: "switch",
57
56
  "aria-checked": s
58
57
  }, t, {
59
- onChange: B(t),
60
- onFocus: R(t),
61
- onBlur: O(t)
58
+ onChange: S(t),
59
+ onFocus: w(t),
60
+ onBlur: T(t)
62
61
  }),
63
- inputRef: C,
64
- readOnly: !!n
62
+ inputRef: x,
63
+ readOnly: !!a
65
64
  };
66
65
  }
67
- const $ = "Switch";
68
- function z(l) {
69
- return q($, l);
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"]);
70
+ U(I, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
72
71
  const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (l) => {
73
72
  const {
74
73
  checked: s,
75
- disabled: p,
76
- focusVisible: c,
77
- readOnly: a
74
+ disabled: i,
75
+ focusVisible: r,
76
+ readOnly: c
78
77
  } = l;
79
- return M({
80
- root: ["root", s && "checked", p && "disabled", c && "focusVisible", a && "readOnly"],
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__ */ V.forwardRef(function(s, p) {
86
- var c, a, g, r;
83
+ }, M(W));
84
+ }, $ = /* @__PURE__ */ F.forwardRef(function(s, i) {
85
+ var r, c, h, n;
87
86
  const {
88
87
  slotProps: u = {},
89
- slots: n = {}
90
- } = s, i = v(s, G), {
91
- getInputProps: S,
92
- checked: x,
93
- disabled: B,
94
- focusVisible: _,
95
- readOnly: w
96
- } = W(s), f = y({}, s, {
97
- checked: x,
98
- disabled: B,
99
- focusVisible: _,
100
- readOnly: w
101
- }), m = J(f), h = (c = n.root) != null ? c : "span", P = N({
102
- elementType: h,
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,
103
102
  externalSlotProps: u.root,
104
- externalForwardedProps: i,
103
+ externalForwardedProps: p,
105
104
  additionalProps: {
106
- ref: p
105
+ ref: i
107
106
  },
108
- ownerState: f,
109
- className: m.root
110
- }), k = (a = n.thumb) != null ? a : "span", R = N({
111
- elementType: k,
107
+ ownerState: _,
108
+ className: f.root
109
+ }), m = (c = a.thumb) != null ? c : "span", w = C({
110
+ elementType: m,
112
111
  externalSlotProps: u.thumb,
113
- ownerState: f,
114
- className: m.thumb
115
- }), O = (g = n.input) != null ? g : "input", C = N({
116
- elementType: O,
117
- getSlotProps: S,
112
+ ownerState: _,
113
+ className: f.thumb
114
+ }), T = (h = a.input) != null ? h : "input", x = C({
115
+ elementType: T,
116
+ getSlotProps: N,
118
117
  externalSlotProps: u.input,
119
- ownerState: f,
120
- className: m.input
121
- }), j = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = N({
122
- elementType: j,
118
+ ownerState: _,
119
+ className: f.input
120
+ }), R = a.track === null ? () => null : (n = a.track) != null ? n : "span", t = C({
121
+ elementType: R,
123
122
  externalSlotProps: u.track,
124
- ownerState: f,
125
- className: m.track
123
+ ownerState: _,
124
+ className: f.track
126
125
  });
127
- return /* @__PURE__ */ I(h, y({}, P, {
128
- children: [/* @__PURE__ */ T(j, y({}, t)), /* @__PURE__ */ T(k, y({}, R)), /* @__PURE__ */ T(O, y({}, C))]
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,54 +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", d = {
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 = ({
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 = ({
213
227
  label: l,
214
228
  checked: s,
215
- disabled: p,
216
- classNameWrapper: c,
217
- classNameInput: a,
218
- "data-testid": g,
219
- onChange: r,
229
+ disabled: i,
230
+ classNameWrapper: r,
231
+ classNameInput: c,
232
+ "data-testid": h,
233
+ onChange: n,
220
234
  classNameLabel: u
221
235
  }) => {
222
- const n = (i) => {
223
- r == null || r(i);
236
+ const a = (p) => {
237
+ n == null || n(p);
224
238
  };
225
- return /* @__PURE__ */ I("div", { className: F(d.toggle, c), "data-testid": g, children: [
226
- /* @__PURE__ */ T(
227
- E,
239
+ return /* @__PURE__ */ j("div", { className: O(g.toggle, r), "data-testid": h, children: [
240
+ /* @__PURE__ */ P(
241
+ $,
228
242
  {
229
243
  checked: s === !0,
230
- disabled: p,
231
- onChange: n,
244
+ disabled: i,
245
+ onChange: a,
232
246
  "aria-label": l,
233
247
  slotProps: {
234
- root: (i) => ({
235
- className: F(d["toggle__toggle-el-wrapper"], {
236
- [d["toggle--disabled"]]: i.disabled,
237
- [d["toggle--focus-visible"]]: i.focusVisible,
238
- [d["toggle--checked"]]: i.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
239
253
  })
240
254
  }),
241
- input: { className: F(d.input, a) },
242
- thumb: { className: d.thumb },
243
- track: { className: d.track }
255
+ input: { className: O(g.input, c) },
256
+ thumb: { className: g.thumb },
257
+ track: { className: g.track }
244
258
  }
245
259
  }
246
260
  ),
247
- l && /* @__PURE__ */ T("label", { className: F(d.toggle__label, u), children: l })
261
+ l && /* @__PURE__ */ P("label", { className: O(g.toggle__label, u), children: l })
248
262
  ] });
249
263
  };
250
264
  export {
251
- ne as Toggle
265
+ re as Toggle
252
266
  };
@@ -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 };