@pismo/marola 0.0.1-alpha.32 → 0.0.1-alpha.4

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 (176) hide show
  1. package/README.md +5 -17
  2. package/dist/{Button-2b1peDFT.js → Button-C3Qm852g.js} +23 -23
  3. package/dist/Dialog.module-BO0mdB7d.js +15 -0
  4. package/dist/ListContext-D6-YwtZn.js +18 -0
  5. package/dist/Tabs.module-_kSbSyth.js +66 -0
  6. package/dist/assets/CallToActionButton.css +1 -0
  7. package/dist/assets/Dialog.css +1 -1
  8. package/dist/assets/LoadingSpinner.css +1 -1
  9. package/dist/assets/Tabs.css +1 -1
  10. package/dist/assets/Typography.css +1 -1
  11. package/dist/assets/main.css +1 -0
  12. package/dist/components/CallToActionButton/CallToActionButton.d.ts +21 -0
  13. package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
  14. package/dist/components/Dialog/Actions.js +1 -1
  15. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  16. package/dist/components/Dialog/Backdrop.js +9 -2
  17. package/dist/components/Dialog/CloseIconButton.js +124 -12
  18. package/dist/components/Dialog/Dialog.d.ts +5 -6
  19. package/dist/components/Dialog/Dialog.js +20103 -445
  20. package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
  21. package/dist/components/Dialog/Title.js +14 -0
  22. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
  23. package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
  24. package/dist/components/Tabs/Tab.d.ts +1 -6
  25. package/dist/components/Tabs/Tab.js +173 -118
  26. package/dist/components/Tabs/TabPanel.d.ts +1 -5
  27. package/dist/components/Tabs/TabPanel.js +10 -8
  28. package/dist/components/Tabs/Tabs.d.ts +2 -8
  29. package/dist/components/Tabs/Tabs.js +701 -250
  30. package/dist/components/Typography/Typography.d.ts +6 -17
  31. package/dist/components/Typography/Typography.js +64 -55
  32. package/dist/{index-CH45lKw7.js → index-BZ1lkM_M.js} +159 -162
  33. package/dist/main.d.ts +5 -27
  34. package/dist/main.js +21 -75
  35. package/dist/types/helpers.d.ts +7 -14
  36. package/dist/useButton-CbmjmH5z.js +186 -0
  37. package/dist/useCompoundItem-B7wfGDHQ.js +41 -0
  38. package/package.json +9 -50
  39. package/src/playground/Playground.tsx +20 -0
  40. package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
  41. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  42. package/dist/Group-B3p31ftp.js +0 -26
  43. package/dist/Popup-B6ZSGIEI.js +0 -1248
  44. package/dist/Portal-DIeBsWdL.js +0 -73
  45. package/dist/SelectButton-C8JQKaf4.js +0 -61
  46. package/dist/Tabs.module-jkH1Qjn7.js +0 -22
  47. package/dist/Toggle-BCgIItCc.js +0 -142
  48. package/dist/assets/Advice.css +0 -1
  49. package/dist/assets/Button.css +0 -1
  50. package/dist/assets/Checkbox.css +0 -1
  51. package/dist/assets/EllipsisTooltip.css +0 -1
  52. package/dist/assets/Group.css +0 -1
  53. package/dist/assets/IconButton.css +0 -1
  54. package/dist/assets/Input.css +0 -1
  55. package/dist/assets/InputSearch.css +0 -1
  56. package/dist/assets/PageHeader.css +0 -1
  57. package/dist/assets/Pagination.css +0 -1
  58. package/dist/assets/SelectButton.css +0 -1
  59. package/dist/assets/Skeleton.css +0 -1
  60. package/dist/assets/Snackbar.css +0 -1
  61. package/dist/assets/SortTooltip.css +0 -1
  62. package/dist/assets/Stepper.css +0 -1
  63. package/dist/assets/Table.css +0 -1
  64. package/dist/assets/TextDisplay.css +0 -1
  65. package/dist/assets/Toggle.css +0 -1
  66. package/dist/assets/Toggle2.css +0 -1
  67. package/dist/assets/Tooltip.css +0 -1
  68. package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
  69. package/dist/components/Advice/Advice.d.ts +0 -30
  70. package/dist/components/Advice/Advice.js +0 -47
  71. package/dist/components/Advice/Advice.stories.d.ts +0 -18
  72. package/dist/components/Button/Button.d.ts +0 -32
  73. package/dist/components/Button/Button.js +0 -65
  74. package/dist/components/Button/Button.stories.d.ts +0 -62
  75. package/dist/components/Checkbox/Checkbox.d.ts +0 -34
  76. package/dist/components/Checkbox/Checkbox.js +0 -71
  77. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
  78. package/dist/components/Chip/Chip.d.ts +0 -39
  79. package/dist/components/Chip/Chip.js +0 -19
  80. package/dist/components/Chip/Chip.stories.d.ts +0 -42
  81. package/dist/components/Chip/chip.test.d.ts +0 -1
  82. package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
  83. package/dist/components/Dialog/DialogTitle.js +0 -29
  84. package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
  85. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
  86. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
  87. package/dist/components/Icon/Icon.d.ts +0 -11
  88. package/dist/components/Icon/Icon.js +0 -127
  89. package/dist/components/Icon/Icon.stories.d.ts +0 -15
  90. package/dist/components/Icon/types.d.ts +0 -5
  91. package/dist/components/Icon/types.js +0 -1
  92. package/dist/components/IconButton/Icon.stories.d.ts +0 -15
  93. package/dist/components/IconButton/IconButton.d.ts +0 -38
  94. package/dist/components/IconButton/IconButton.js +0 -63
  95. package/dist/components/Input/Input.d.ts +0 -44
  96. package/dist/components/Input/Input.js +0 -508
  97. package/dist/components/Input/Input.stories.d.ts +0 -43
  98. package/dist/components/InputSearch/InputSearch.d.ts +0 -9
  99. package/dist/components/InputSearch/InputSearch.js +0 -34
  100. package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
  101. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
  102. package/dist/components/PageHeader/PageHeader.d.ts +0 -66
  103. package/dist/components/PageHeader/PageHeader.js +0 -87
  104. package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
  105. package/dist/components/Pagination/Pagination.d.ts +0 -55
  106. package/dist/components/Pagination/Pagination.js +0 -237
  107. package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
  108. package/dist/components/Select/Select.d.ts +0 -26
  109. package/dist/components/Select/Select.js +0 -857
  110. package/dist/components/Select/Select.stories.d.ts +0 -22
  111. package/dist/components/Select/SelectButton.d.ts +0 -12
  112. package/dist/components/Select/SelectButton.js +0 -8
  113. package/dist/components/Skeleton/Skeleton.d.ts +0 -25
  114. package/dist/components/Skeleton/Skeleton.js +0 -23
  115. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
  116. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
  117. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
  118. package/dist/components/Snackbar/Snackbar.d.ts +0 -27
  119. package/dist/components/Snackbar/Snackbar.js +0 -639
  120. package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
  121. package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
  122. package/dist/components/SortTooltip/SortTooltip.js +0 -93
  123. package/dist/components/Stepper/Stepper.d.ts +0 -26
  124. package/dist/components/Stepper/Stepper.js +0 -48
  125. package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
  126. package/dist/components/Table/Table.d.ts +0 -56
  127. package/dist/components/Table/Table.js +0 -137
  128. package/dist/components/Table/Table.stories.d.ts +0 -29
  129. package/dist/components/Table/TableContext.d.ts +0 -19
  130. package/dist/components/Table/TableContext.js +0 -21
  131. package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
  132. package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
  133. package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
  134. package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
  135. package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
  136. package/dist/components/Tabs/Tab.stories.d.ts +0 -15
  137. package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
  138. package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
  139. package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
  140. package/dist/components/TextDisplay/TextDisplay.js +0 -37
  141. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
  142. package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
  143. package/dist/components/Toggle/Toggle.d.ts +0 -11
  144. package/dist/components/Toggle/Toggle.js +0 -266
  145. package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
  146. package/dist/components/ToggleGroup/Group.d.ts +0 -18
  147. package/dist/components/ToggleGroup/Group.js +0 -7
  148. package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
  149. package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
  150. package/dist/components/ToggleGroup/Toggle.js +0 -17
  151. package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
  152. package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
  153. package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
  154. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
  155. package/dist/components/Tooltip/Tooltip.d.ts +0 -33
  156. package/dist/components/Tooltip/Tooltip.js +0 -141
  157. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
  158. package/dist/components/Typography/Typography.stories.d.ts +0 -32
  159. package/dist/components/Typography/typography.test.d.ts +0 -1
  160. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
  161. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
  162. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
  163. package/dist/index-CjW42-M-.js +0 -19584
  164. package/dist/marola.css +0 -1
  165. package/dist/test-utils/assertStyles.d.ts +0 -1
  166. package/dist/test-utils/assertStyles.js +0 -11
  167. package/dist/useButton-DNk3wrQp.js +0 -105
  168. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  169. package/dist/useControlled-CCMYYdCM.js +0 -31
  170. package/dist/useEventCallback-xTG9piMa.js +0 -45
  171. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  172. package/dist/useList-B0hog_3-.js +0 -436
  173. package/dist/useTimeout-DxF9kiZL.js +0 -36
  174. package/dist/utils/styleStrings.d.ts +0 -6
  175. package/dist/utils/styleStrings.js +0 -10
  176. package/dist/utils/styleStrings.test.d.ts +0 -1
@@ -1,266 +0,0 @@
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) {
9
- const {
10
- checked: s,
11
- defaultChecked: i,
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,
21
- default: !!i,
22
- name: "Switch",
23
- state: "checked"
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));
27
- }, {
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);
43
- return {
44
- checked: N,
45
- disabled: !!r,
46
- focusVisible: y,
47
- getInputProps: (t = {}) => k({
48
- checked: s,
49
- defaultChecked: i,
50
- disabled: r,
51
- readOnly: a,
52
- ref: x,
53
- required: p,
54
- type: "checkbox",
55
- role: "switch",
56
- "aria-checked": s
57
- }, t, {
58
- onChange: S(t),
59
- onFocus: w(t),
60
- onBlur: T(t)
61
- }),
62
- inputRef: x,
63
- readOnly: !!a
64
- };
65
- }
66
- const I = "Switch";
67
- function W(l) {
68
- return v(I, l);
69
- }
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) => {
72
- const {
73
- checked: s,
74
- disabled: i,
75
- focusVisible: r,
76
- readOnly: c
77
- } = l;
78
- return H({
79
- root: ["root", s && "checked", i && "disabled", r && "focusVisible", c && "readOnly"],
80
- thumb: ["thumb"],
81
- input: ["input"],
82
- track: ["track"]
83
- }, M(W));
84
- }, $ = /* @__PURE__ */ F.forwardRef(function(s, i) {
85
- var r, c, h, n;
86
- const {
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,
104
- additionalProps: {
105
- ref: i
106
- },
107
- ownerState: _,
108
- className: f.root
109
- }), m = (c = a.thumb) != null ? c : "span", w = C({
110
- elementType: m,
111
- externalSlotProps: u.thumb,
112
- ownerState: _,
113
- className: f.thumb
114
- }), T = (h = a.input) != null ? h : "input", x = C({
115
- elementType: T,
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
125
- });
126
- return /* @__PURE__ */ j(y, k({}, z, {
127
- children: [/* @__PURE__ */ P(R, k({}, t)), /* @__PURE__ */ P(m, k({}, w)), /* @__PURE__ */ P(T, k({}, x))]
128
- }));
129
- });
130
- process.env.NODE_ENV !== "production" && ($.propTypes = {
131
- // ┌────────────────────────────── Warning ──────────────────────────────┐
132
- // │ These PropTypes are generated from the TypeScript type definitions. │
133
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
134
- // └─────────────────────────────────────────────────────────────────────┘
135
- /**
136
- * If `true`, the component is checked.
137
- */
138
- checked: e.bool,
139
- /**
140
- * Class name applied to the root element.
141
- */
142
- className: e.string,
143
- /**
144
- * The default checked state. Use when the component is not controlled.
145
- */
146
- defaultChecked: e.bool,
147
- /**
148
- * If `true`, the component is disabled.
149
- */
150
- disabled: e.bool,
151
- /**
152
- * @ignore
153
- */
154
- onBlur: e.func,
155
- /**
156
- * Callback fired when the state is changed.
157
- *
158
- * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
159
- * You can pull out the new value by accessing `event.target.value` (string).
160
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
161
- */
162
- onChange: e.func,
163
- /**
164
- * @ignore
165
- */
166
- onFocus: e.func,
167
- /**
168
- * @ignore
169
- */
170
- onFocusVisible: e.func,
171
- /**
172
- * If `true`, the component is read only.
173
- */
174
- readOnly: e.bool,
175
- /**
176
- * If `true`, the `input` element is required.
177
- */
178
- required: e.bool,
179
- /**
180
- * The props used for each slot inside the Switch.
181
- * @default {}
182
- */
183
- slotProps: e.shape({
184
- input: e.oneOfType([e.func, e.object]),
185
- root: e.oneOfType([e.func, e.object]),
186
- thumb: e.oneOfType([e.func, e.object]),
187
- track: e.oneOfType([e.func, e.object])
188
- }),
189
- /**
190
- * The components used for each slot inside the Switch.
191
- * Either a string to use a HTML element or a component.
192
- * @default {}
193
- */
194
- slots: e.shape({
195
- input: e.elementType,
196
- root: e.elementType,
197
- thumb: e.elementType,
198
- track: e.oneOfType([e.elementType, e.oneOf([null])])
199
- })
200
- });
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,
229
- disabled: i,
230
- classNameWrapper: r,
231
- classNameInput: c,
232
- "data-testid": h,
233
- onChange: n,
234
- classNameLabel: u
235
- }) => {
236
- const a = (p) => {
237
- n == null || n(p);
238
- };
239
- return /* @__PURE__ */ j("div", { className: O(g.toggle, r), "data-testid": h, children: [
240
- /* @__PURE__ */ P(
241
- $,
242
- {
243
- checked: s === !0,
244
- disabled: i,
245
- onChange: a,
246
- "aria-label": l,
247
- slotProps: {
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
253
- })
254
- }),
255
- input: { className: O(g.input, c) },
256
- thumb: { className: g.thumb },
257
- track: { className: g.track }
258
- }
259
- }
260
- ),
261
- l && /* @__PURE__ */ P("label", { className: O(g.toggle__label, u), children: l })
262
- ] });
263
- };
264
- export {
265
- re as Toggle
266
- };
@@ -1,21 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
-
3
- declare const meta: {
4
- title: string;
5
- component: ({ label, checked, disabled, classNameWrapper, classNameInput, "data-testid": dataTestId, onChange, classNameLabel, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
6
- label?: string | undefined;
7
- classNameWrapper?: string | undefined;
8
- classNameInput?: string | undefined;
9
- classNameLabel?: string | undefined;
10
- 'data-testid'?: string | undefined;
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- tags: string[];
13
- parameters: {
14
- layout: string;
15
- };
16
- };
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
- export declare const Simple: Story;
20
- export declare const WithLabel: Story;
21
- export declare const Disabled: Story;
@@ -1,18 +0,0 @@
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;
@@ -1,7 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
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;
@@ -1,17 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { default as ToggleGroupItem } from './Toggle';
2
- export { default as ToggleGroup } from './Group';
@@ -1,6 +0,0 @@
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
- };
@@ -1,25 +0,0 @@
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,33 +0,0 @@
1
- import { PopupPlacement } from '@mui/base';
2
- import { AriaRole, CSSProperties, ReactNode } from 'react';
3
-
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 */
12
- disableHoverListener?: boolean;
13
- /** Function to run when the tooltip is closed */
14
- onClose?: () => void;
15
- /** The color of the tooltip */
16
- theme?: 'white' | 'black';
17
- /** Dhe padding applied to the tooltip */
18
- padding?: 'small' | 'normal';
19
- /** The Position where the tooltip will be display relative to the anchor element */
20
- position?: PopupPlacement;
21
- /** Accessibility role label */
22
- arialRole?: AriaRole;
23
- /** Additional classnames to be applied to the tooltip */
24
- className?: string;
25
- /** Additional styles to be applied to the tooltip */
26
- style?: CSSProperties;
27
- /** Test id */
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;
31
- };
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;
33
- export { Tooltip };
@@ -1,141 +0,0 @@
1
- import '../../assets/Tooltip.css';
2
- import { jsx as a, jsxs as v, Fragment as P } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import { useRef as R, useState as T, useEffect as E, isValidElement as q, cloneElement as M } from "react";
5
- import { T as O, P as V } from "../../Popup-B6ZSGIEI.js";
6
- import { _ as $, b as z, P as l } from "../../index-CH45lKw7.js";
7
- import { c as D } from "../../clsx-DB4S2d7J.js";
8
- import { C as F } from "../../ClickAwayListener-BSW-Nd-y.js";
9
- function I() {
10
- const e = u.useContext(O);
11
- if (!e)
12
- throw new Error("Missing transition context");
13
- const {
14
- registerTransition: o,
15
- requestedEnter: r,
16
- onExited: n
17
- } = e;
18
- return u.useEffect(() => o(), [o]), {
19
- onExited: n,
20
- requestedEnter: r
21
- };
22
- }
23
- const W = ["children", "className", "enterAnimationName", "enterClassName", "exitAnimationName", "exitClassName"];
24
- function b(e) {
25
- const {
26
- children: o,
27
- className: r,
28
- enterAnimationName: n,
29
- enterClassName: c,
30
- exitAnimationName: _,
31
- exitClassName: f
32
- } = e, p = $(e, W), {
33
- requestedEnter: d,
34
- onExited: s
35
- } = I(), i = u.useRef(!0);
36
- u.useEffect(() => {
37
- d && i.current && (i.current = !1);
38
- }, [d]);
39
- const N = u.useCallback((t) => {
40
- t.animationName === _ ? (s(), i.current = !0) : t.animationName === n && (i.current = !1);
41
- }, [s, _, n]);
42
- return /* @__PURE__ */ a("div", z({
43
- onAnimationEnd: N,
44
- className: D(r, d ? c : f)
45
- }, p, {
46
- children: o
47
- }));
48
- }
49
- process.env.NODE_ENV !== "production" && (b.propTypes = {
50
- children: l.node,
51
- className: l.string,
52
- enterAnimationName: l.string,
53
- enterClassName: l.string,
54
- exitAnimationName: l.string,
55
- exitClassName: l.string
56
- });
57
- const B = "_tooltip_1dujm_1", m = {
58
- tooltip: B,
59
- "tooltip--small-padding": "_tooltip--small-padding_1dujm_5",
60
- "tooltip--normal-padding": "_tooltip--normal-padding_1dujm_8",
61
- "tooltip--white-theme": "_tooltip--white-theme_1dujm_11",
62
- "tooltip--black-theme": "_tooltip--black-theme_1dujm_15",
63
- "tooltip--animation": "_tooltip--animation_1dujm_20",
64
- "tooltip--anim-open": "_tooltip--anim-open_1dujm_20",
65
- "tooltip--open-animation": "_tooltip--open-animation_1dujm_1",
66
- "tooltip--anim-close": "_tooltip--anim-close_1dujm_23",
67
- "tooltip--close-animation": "_tooltip--close-animation_1dujm_1"
68
- }, X = ({
69
- arialRole: e,
70
- children: o,
71
- className: r,
72
- disableHoverListener: n,
73
- onClose: c,
74
- padding: _ = "small",
75
- position: f = "bottom",
76
- open: p,
77
- theme: d = "black",
78
- title: s,
79
- onTargetCreated: i,
80
- ...N
81
- }) => {
82
- const t = R(null), [y, h] = T(p || !1);
83
- let j = y;
84
- E(() => {
85
- h(p || !1);
86
- }, [p]);
87
- const A = q(o) ? o : /* @__PURE__ */ a("span", { children: o });
88
- !s && s !== 0 && (j = !1);
89
- const k = () => {
90
- c == null || c(), !n && h(!1);
91
- };
92
- E(() => {
93
- var C;
94
- if (t != null && t.current) {
95
- i == null || i(t == null ? void 0 : t.current);
96
- const x = (C = t == null ? void 0 : t.current) == null ? void 0 : C.parentElement;
97
- x && (n || (x.onpointerenter = () => h(!0), x.onpointerleave = () => h(!1)));
98
- }
99
- }, [t, n]);
100
- const w = {
101
- padding: f.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
102
- zIndex: 1
103
- }, S = [
104
- m.tooltip,
105
- m[`tooltip--${d}-theme`],
106
- m[`tooltip--${_}-padding`],
107
- r || ""
108
- ].join(" ").trim(), g = {
109
- ...A.props,
110
- ref: t
111
- };
112
- return /* @__PURE__ */ v(P, { children: [
113
- M(A, g),
114
- /* @__PURE__ */ a(
115
- V,
116
- {
117
- ...N,
118
- open: j,
119
- anchor: t == null ? void 0 : t.current,
120
- disablePortal: !0,
121
- style: w,
122
- role: e,
123
- placement: f,
124
- children: /* @__PURE__ */ a(
125
- b,
126
- {
127
- className: m["tooltip--animation"],
128
- enterClassName: m["tooltip--anim-open"],
129
- exitClassName: m["tooltip--anim-close"],
130
- enterAnimationName: "tooltip--open-animation",
131
- exitAnimationName: "tooltip--close-animation",
132
- children: /* @__PURE__ */ a("div", { className: S, children: /* @__PURE__ */ a(F, { onClickAway: k, children: /* @__PURE__ */ a("div", { children: s }) }) })
133
- }
134
- )
135
- }
136
- )
137
- ] });
138
- };
139
- export {
140
- X as Tooltip
141
- };
@@ -1,35 +0,0 @@
1
- import { TooltipProps } from './Tooltip.tsx';
2
- import { StoryObj } from '@storybook/react';
3
-
4
- declare const meta: {
5
- title: string;
6
- component: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
7
- tags: string[];
8
- parameters: {
9
- layout: string;
10
- };
11
- decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
12
- children: import('react').ReactNode;
13
- title: import('react').ReactNode;
14
- open?: boolean | undefined;
15
- disableHoverListener?: boolean | undefined;
16
- onClose?: (() => void) | undefined;
17
- theme?: "black" | "white" | undefined;
18
- padding?: "small" | "normal" | undefined;
19
- position?: import('@floating-ui/utils').Placement | undefined;
20
- arialRole?: import('react').AriaRole | undefined;
21
- className?: string | undefined;
22
- style?: import('react').CSSProperties | undefined;
23
- 'data-testid'?: string | undefined;
24
- onTargetCreated?: ((e: HTMLElement) => void) | undefined;
25
- }>) => import("react/jsx-runtime").JSX.Element)[];
26
- };
27
- export default meta;
28
- type Story = StoryObj<typeof meta>;
29
- export declare const Simple: Story;
30
- export declare const Onclose: Story;
31
- export declare const InitialOpen: Story;
32
- export declare const WhiteTheme: Story;
33
- export declare const DisabledHover: Story;
34
- export declare const NormalPadding: Story;
35
- export declare const Positioning: Story;
@@ -1,32 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
-
3
- declare const meta: {
4
- title: string;
5
- component: import('react').ForwardRefExoticComponent<import('./Typography').TypographyProps & import('react').RefAttributes<import('react').ElementType | import('react').ComponentType>>;
6
- tags: string[];
7
- argTypes: {
8
- element: {
9
- options: string[];
10
- control: {
11
- type: "select";
12
- };
13
- };
14
- };
15
- decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
16
- children: import('react').ReactNode;
17
- element?: import('react').ElementType | undefined;
18
- variant?: import('./Typography').VariantType | undefined;
19
- className?: string | undefined;
20
- color?: string | undefined;
21
- underline?: boolean | undefined;
22
- strikethrough?: boolean | undefined;
23
- bold?: boolean | undefined;
24
- elementProps?: (import('react').HTMLAttributes<import('./Typography').CommonTypographyHTMLAttributes> & import('react').LabelHTMLAttributes<HTMLLabelElement>) | undefined;
25
- "data-testid"?: string | undefined;
26
- ref?: import('react').LegacyRef<import('react').ElementType | import('react').ComponentType> | undefined;
27
- key?: import('react').Key | null | undefined;
28
- }>) => import("react/jsx-runtime").JSX.Element)[];
29
- };
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
- export declare const Simple: Story;
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { SnackbarProps } from '../../components/Snackbar/Snackbar';
2
-
3
- export type SnackbarContextProps = {
4
- showMessage: (message: string, variant?: SnackbarProps['variant'], duration?: number) => void;
5
- };
6
- export declare const SnackbarContext: import('react').Context<SnackbarContextProps>;
7
- export type SnackbarProviderProps = {
8
- children: React.ReactNode;
9
- };
10
- export declare const SnackbarProvider: ({ children }: SnackbarProviderProps) => import("react/jsx-runtime").JSX.Element;
11
- export declare const useSnackbar: () => SnackbarContextProps;