@pismo/marola 0.0.1-alpha.19 → 0.0.1-alpha.2

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 (145) hide show
  1. package/README.md +5 -17
  2. package/dist/Button-REznN-RP.js +1139 -0
  3. package/dist/Dialog.module-BO0mdB7d.js +15 -0
  4. package/dist/assets/CallToActionButton.css +1 -0
  5. package/dist/assets/Dialog.css +1 -1
  6. package/dist/assets/LoadingSpinner.css +1 -1
  7. package/dist/assets/Typography.css +1 -1
  8. package/dist/assets/main.css +1 -0
  9. package/dist/components/CallToActionButton/CallToActionButton.d.ts +23 -0
  10. package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
  11. package/dist/components/Dialog/Actions.js +1 -1
  12. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  13. package/dist/components/Dialog/Backdrop.js +9 -2
  14. package/dist/components/Dialog/CloseIconButton.js +10 -11
  15. package/dist/components/Dialog/Dialog.d.ts +4 -5
  16. package/dist/components/Dialog/Dialog.js +20103 -445
  17. package/dist/components/Dialog/Title.js +7 -22
  18. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
  19. package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
  20. package/dist/components/Typography/Typography.d.ts +6 -17
  21. package/dist/components/Typography/Typography.js +64 -85
  22. package/dist/main.d.ts +3 -25
  23. package/dist/main.js +15 -62
  24. package/dist/types/helpers.d.ts +7 -14
  25. package/package.json +9 -51
  26. package/src/playground/Playground.tsx +58 -0
  27. package/dist/Button-2b1peDFT.js +0 -130
  28. package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
  29. package/dist/Dialog.module-B8COssqi.js +0 -15
  30. package/dist/Popup-B6ZSGIEI.js +0 -1248
  31. package/dist/Portal-DIeBsWdL.js +0 -73
  32. package/dist/SelectButton-pciwIWcj.js +0 -46
  33. package/dist/Tabs.module-jkH1Qjn7.js +0 -22
  34. package/dist/assets/Advice.css +0 -1
  35. package/dist/assets/Button.css +0 -1
  36. package/dist/assets/Checkbox.css +0 -1
  37. package/dist/assets/Chip.css +0 -1
  38. package/dist/assets/IconButton.css +0 -1
  39. package/dist/assets/Input.css +0 -1
  40. package/dist/assets/InputSearch.css +0 -1
  41. package/dist/assets/PageHeader.css +0 -1
  42. package/dist/assets/Pagination.css +0 -1
  43. package/dist/assets/SelectButton.css +0 -1
  44. package/dist/assets/Skeleton.css +0 -1
  45. package/dist/assets/Snackbar.css +0 -1
  46. package/dist/assets/SortTooltip.css +0 -1
  47. package/dist/assets/Stepper.css +0 -1
  48. package/dist/assets/Table.css +0 -1
  49. package/dist/assets/Tabs.css +0 -1
  50. package/dist/assets/TextDisplay.css +0 -1
  51. package/dist/assets/Toggle.css +0 -1
  52. package/dist/assets/Tooltip.css +0 -1
  53. package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
  54. package/dist/components/Advice/Advice.d.ts +0 -28
  55. package/dist/components/Advice/Advice.js +0 -25
  56. package/dist/components/Advice/Advice.stories.d.ts +0 -16
  57. package/dist/components/Button/Button.d.ts +0 -32
  58. package/dist/components/Button/Button.js +0 -94
  59. package/dist/components/Button/Button.stories.d.ts +0 -62
  60. package/dist/components/Checkbox/Checkbox.d.ts +0 -34
  61. package/dist/components/Checkbox/Checkbox.js +0 -56
  62. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
  63. package/dist/components/Chip/Chip.d.ts +0 -37
  64. package/dist/components/Chip/Chip.js +0 -143
  65. package/dist/components/Chip/Chip.stories.d.ts +0 -40
  66. package/dist/components/Chip/chip.test.d.ts +0 -1
  67. package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
  68. package/dist/components/Icon/Icon.d.ts +0 -27
  69. package/dist/components/Icon/Icon.js +0 -116
  70. package/dist/components/Icon/Icon.stories.d.ts +0 -16
  71. package/dist/components/IconButton/Icon.stories.d.ts +0 -15
  72. package/dist/components/IconButton/IconButton.d.ts +0 -36
  73. package/dist/components/IconButton/IconButton.js +0 -70
  74. package/dist/components/Input/Input.d.ts +0 -44
  75. package/dist/components/Input/Input.js +0 -496
  76. package/dist/components/Input/Input.stories.d.ts +0 -43
  77. package/dist/components/InputSearch/InputSearch.d.ts +0 -9
  78. package/dist/components/InputSearch/InputSearch.js +0 -34
  79. package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
  80. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
  81. package/dist/components/PageHeader/PageHeader.d.ts +0 -36
  82. package/dist/components/PageHeader/PageHeader.js +0 -51
  83. package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -43
  84. package/dist/components/Pagination/Pagination.d.ts +0 -55
  85. package/dist/components/Pagination/Pagination.js +0 -222
  86. package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
  87. package/dist/components/Select/Select.d.ts +0 -26
  88. package/dist/components/Select/Select.js +0 -857
  89. package/dist/components/Select/Select.stories.d.ts +0 -22
  90. package/dist/components/Select/SelectButton.d.ts +0 -12
  91. package/dist/components/Select/SelectButton.js +0 -8
  92. package/dist/components/Skeleton/Skeleton.d.ts +0 -25
  93. package/dist/components/Skeleton/Skeleton.js +0 -23
  94. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
  95. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
  96. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
  97. package/dist/components/Snackbar/Snackbar.d.ts +0 -25
  98. package/dist/components/Snackbar/Snackbar.js +0 -622
  99. package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -318
  100. package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
  101. package/dist/components/SortTooltip/SortTooltip.js +0 -78
  102. package/dist/components/Stepper/Stepper.d.ts +0 -26
  103. package/dist/components/Stepper/Stepper.js +0 -33
  104. package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
  105. package/dist/components/Table/Table.d.ts +0 -39
  106. package/dist/components/Table/Table.js +0 -120
  107. package/dist/components/Table/TableContext.d.ts +0 -19
  108. package/dist/components/Table/TableContext.js +0 -21
  109. package/dist/components/Tabs/Tab.d.ts +0 -14
  110. package/dist/components/Tabs/Tab.js +0 -181
  111. package/dist/components/Tabs/Tab.stories.d.ts +0 -15
  112. package/dist/components/Tabs/TabPanel.d.ts +0 -12
  113. package/dist/components/Tabs/TabPanel.js +0 -118
  114. package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
  115. package/dist/components/Tabs/Tabs.d.ts +0 -15
  116. package/dist/components/Tabs/Tabs.js +0 -401
  117. package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
  118. package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
  119. package/dist/components/TextDisplay/TextDisplay.js +0 -37
  120. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
  121. package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
  122. package/dist/components/Toggle/Toggle.d.ts +0 -11
  123. package/dist/components/Toggle/Toggle.js +0 -251
  124. package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
  125. package/dist/components/Tooltip/Tooltip.d.ts +0 -29
  126. package/dist/components/Tooltip/Tooltip.js +0 -139
  127. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -33
  128. package/dist/components/Typography/Typography.stories.d.ts +0 -32
  129. package/dist/components/Typography/typography.test.d.ts +0 -1
  130. package/dist/index-CH45lKw7.js +0 -840
  131. package/dist/index-CjW42-M-.js +0 -19584
  132. package/dist/marola.css +0 -1
  133. package/dist/test-utils/assertStyles.d.ts +0 -1
  134. package/dist/test-utils/assertStyles.js +0 -11
  135. package/dist/useButton-DNk3wrQp.js +0 -105
  136. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  137. package/dist/useControlled-CCMYYdCM.js +0 -31
  138. package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
  139. package/dist/useEventCallback-xTG9piMa.js +0 -45
  140. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  141. package/dist/useList-B0hog_3-.js +0 -436
  142. package/dist/useTimeout-DxF9kiZL.js +0 -36
  143. package/dist/utils/styleStrings.d.ts +0 -6
  144. package/dist/utils/styleStrings.js +0 -10
  145. package/dist/utils/styleStrings.test.d.ts +0 -1
@@ -1,251 +0,0 @@
1
- import '../../assets/Toggle.css';
2
- import { jsxs as I, jsx as P } from "react/jsx-runtime";
3
- import { c as C } from "../../clsx-DB4S2d7J.js";
4
- import { u as v, b as x, g as U, a as q, _ as H, c as F, P as e, d as M, e as A } from "../../index-CH45lKw7.js";
5
- import * as N from "react";
6
- import { u as D } from "../../useControlled-CCMYYdCM.js";
7
- import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
8
- function W(l) {
9
- const {
10
- checked: s,
11
- defaultChecked: p,
12
- disabled: c,
13
- onBlur: a,
14
- onChange: g,
15
- onFocus: r,
16
- onFocusVisible: u,
17
- readOnly: n,
18
- required: i
19
- } = l, [V, S] = D({
20
- controlled: s,
21
- default: !!p,
22
- name: "Switch",
23
- state: "checked"
24
- }), B = (t) => (o) => {
25
- var b;
26
- o.nativeEvent.defaultPrevented || (S(o.target.checked), g == null || g(o), (b = t.onChange) == null || b.call(t, o));
27
- }, {
28
- isFocusVisibleRef: _,
29
- onBlur: w,
30
- onFocus: f,
31
- ref: m
32
- } = L(), [h, y] = N.useState(!1);
33
- c && h && y(!1), N.useEffect(() => {
34
- _.current = h;
35
- }, [h, _]);
36
- const k = N.useRef(null), R = (t) => (o) => {
37
- var b;
38
- k.current || (k.current = o.currentTarget), f(o), _.current === !0 && (y(!0), u == null || u(o)), r == null || r(o), (b = t.onFocus) == null || b.call(t, o);
39
- }, T = (t) => (o) => {
40
- var b;
41
- w(o), _.current === !1 && y(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
42
- }, O = v(m, k);
43
- return {
44
- checked: V,
45
- disabled: !!c,
46
- focusVisible: h,
47
- getInputProps: (t = {}) => x({
48
- checked: s,
49
- defaultChecked: p,
50
- disabled: c,
51
- readOnly: n,
52
- ref: O,
53
- required: i,
54
- type: "checkbox",
55
- role: "switch",
56
- "aria-checked": s
57
- }, t, {
58
- onChange: B(t),
59
- onFocus: R(t),
60
- onBlur: T(t)
61
- }),
62
- inputRef: O,
63
- readOnly: !!n
64
- };
65
- }
66
- const $ = "Switch";
67
- function z(l) {
68
- return U($, l);
69
- }
70
- q($, ["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: p,
75
- focusVisible: c,
76
- readOnly: a
77
- } = l;
78
- return M({
79
- root: ["root", s && "checked", p && "disabled", c && "focusVisible", a && "readOnly"],
80
- thumb: ["thumb"],
81
- input: ["input"],
82
- track: ["track"]
83
- }, A(z));
84
- }, E = /* @__PURE__ */ N.forwardRef(function(s, p) {
85
- var c, a, g, r;
86
- const {
87
- slotProps: u = {},
88
- slots: n = {}
89
- } = s, i = H(s, G), {
90
- getInputProps: V,
91
- checked: S,
92
- disabled: B,
93
- focusVisible: _,
94
- readOnly: w
95
- } = W(s), f = x({}, s, {
96
- checked: S,
97
- disabled: B,
98
- focusVisible: _,
99
- readOnly: w
100
- }), m = J(f), h = (c = n.root) != null ? c : "span", y = F({
101
- elementType: h,
102
- externalSlotProps: u.root,
103
- externalForwardedProps: i,
104
- additionalProps: {
105
- ref: p
106
- },
107
- ownerState: f,
108
- className: m.root
109
- }), k = (a = n.thumb) != null ? a : "span", R = F({
110
- elementType: k,
111
- externalSlotProps: u.thumb,
112
- ownerState: f,
113
- className: m.thumb
114
- }), T = (g = n.input) != null ? g : "input", O = F({
115
- elementType: T,
116
- getSlotProps: V,
117
- externalSlotProps: u.input,
118
- ownerState: f,
119
- className: m.input
120
- }), j = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = F({
121
- elementType: j,
122
- externalSlotProps: u.track,
123
- ownerState: f,
124
- className: m.track
125
- });
126
- return /* @__PURE__ */ I(h, x({}, y, {
127
- children: [/* @__PURE__ */ P(j, x({}, t)), /* @__PURE__ */ P(k, x({}, R)), /* @__PURE__ */ P(T, x({}, O))]
128
- }));
129
- });
130
- process.env.NODE_ENV !== "production" && (E.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_1icxx_1", Q = "_input_1icxx_12", X = "_thumb_1icxx_23", Y = "_track_1icxx_37", Z = "_toggle__label_1icxx_61", d = {
202
- toggle: K,
203
- "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_1icxx_8",
204
- input: Q,
205
- thumb: X,
206
- track: Y,
207
- "toggle--focus-visible": "_toggle--focus-visible_1icxx_47",
208
- "toggle--checked": "_toggle--checked_1icxx_51",
209
- toggle__label: Z,
210
- "toggle--disabled": "_toggle--disabled_1icxx_66"
211
- }, ce = ({
212
- label: l,
213
- checked: s,
214
- disabled: p,
215
- classNameWrapper: c,
216
- classNameInput: a,
217
- "data-testid": g,
218
- onChange: r,
219
- classNameLabel: u
220
- }) => {
221
- const n = (i) => {
222
- r == null || r(i);
223
- };
224
- return /* @__PURE__ */ I("div", { className: C(d.toggle, c), "data-testid": g, children: [
225
- /* @__PURE__ */ P(
226
- E,
227
- {
228
- checked: s === !0,
229
- disabled: p,
230
- onChange: n,
231
- "aria-label": l,
232
- slotProps: {
233
- root: (i) => ({
234
- className: C(d["toggle__toggle-el-wrapper"], {
235
- [d["toggle--disabled"]]: i.disabled,
236
- [d["toggle--focus-visible"]]: i.focusVisible,
237
- [d["toggle--checked"]]: i.checked
238
- })
239
- }),
240
- input: { className: C(d.input, a) },
241
- thumb: { className: d.thumb },
242
- track: { className: d.track }
243
- }
244
- }
245
- ),
246
- l && /* @__PURE__ */ P("label", { className: C(d.toggle__label, u), children: l })
247
- ] });
248
- };
249
- export {
250
- ce as Toggle
251
- };
@@ -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,29 +0,0 @@
1
- import { PopupPlacement } from '@mui/base';
2
- import { AriaRole, 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
- /** Test id */
26
- 'data-testid'?: string;
27
- };
28
- declare const Tooltip: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
29
- export { Tooltip };
@@ -1,139 +0,0 @@
1
- import '../../assets/Tooltip.css';
2
- import { jsx as i, jsxs as w, Fragment as S } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import { useRef as v, useState as P, useEffect as E, isValidElement as R, cloneElement as q } from "react";
5
- import { T as M, P as O } from "../../Popup-B6ZSGIEI.js";
6
- import { _ as V, b as $, P as l } from "../../index-CH45lKw7.js";
7
- import { c as z } from "../../clsx-DB4S2d7J.js";
8
- import { C as D } from "../../ClickAwayListener-BSW-Nd-y.js";
9
- function F() {
10
- const n = u.useContext(M);
11
- if (!n)
12
- throw new Error("Missing transition context");
13
- const {
14
- registerTransition: e,
15
- requestedEnter: r,
16
- onExited: o
17
- } = n;
18
- return u.useEffect(() => e(), [e]), {
19
- onExited: o,
20
- requestedEnter: r
21
- };
22
- }
23
- const I = ["children", "className", "enterAnimationName", "enterClassName", "exitAnimationName", "exitClassName"];
24
- function g(n) {
25
- const {
26
- children: e,
27
- className: r,
28
- enterAnimationName: o,
29
- enterClassName: c,
30
- exitAnimationName: _,
31
- exitClassName: f
32
- } = n, p = V(n, I), {
33
- requestedEnter: d,
34
- onExited: a
35
- } = F(), s = u.useRef(!0);
36
- u.useEffect(() => {
37
- d && s.current && (s.current = !1);
38
- }, [d]);
39
- const t = u.useCallback((h) => {
40
- h.animationName === _ ? (a(), s.current = !0) : h.animationName === o && (s.current = !1);
41
- }, [a, _, o]);
42
- return /* @__PURE__ */ i("div", $({
43
- onAnimationEnd: t,
44
- className: z(r, d ? c : f)
45
- }, p, {
46
- children: e
47
- }));
48
- }
49
- process.env.NODE_ENV !== "production" && (g.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 W = "_tooltip_1dujm_1", m = {
58
- tooltip: W,
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
- }, U = ({
69
- arialRole: n,
70
- children: e,
71
- className: r,
72
- disableHoverListener: o,
73
- onClose: c,
74
- padding: _ = "small",
75
- position: f = "bottom",
76
- open: p,
77
- theme: d = "black",
78
- title: a,
79
- ...s
80
- }) => {
81
- const t = v(null), [h, N] = P(p || !1);
82
- let j = h;
83
- E(() => {
84
- N(p || !1);
85
- }, [p]);
86
- const C = R(e) ? e : /* @__PURE__ */ i("span", { children: e });
87
- !a && a !== 0 && (j = !1);
88
- const b = () => {
89
- c == null || c(), !o && N(!1);
90
- };
91
- E(() => {
92
- var A;
93
- if (t != null && t.current) {
94
- const x = (A = t == null ? void 0 : t.current) == null ? void 0 : A.parentElement;
95
- x && (o || (x.onpointerenter = () => N(!0), x.onpointerleave = () => N(!1)));
96
- }
97
- }, [t, o]);
98
- const y = {
99
- padding: f.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
100
- zIndex: 1
101
- }, T = [
102
- m.tooltip,
103
- m[`tooltip--${d}-theme`],
104
- m[`tooltip--${_}-padding`],
105
- r || ""
106
- ].join(" ").trim(), k = {
107
- ...C.props,
108
- ref: t
109
- };
110
- return /* @__PURE__ */ w(S, { children: [
111
- q(C, k),
112
- /* @__PURE__ */ i(
113
- O,
114
- {
115
- ...s,
116
- open: j,
117
- anchor: t == null ? void 0 : t.current,
118
- disablePortal: !0,
119
- style: y,
120
- role: n,
121
- placement: f,
122
- children: /* @__PURE__ */ i(
123
- g,
124
- {
125
- className: m["tooltip--animation"],
126
- enterClassName: m["tooltip--anim-open"],
127
- exitClassName: m["tooltip--anim-close"],
128
- enterAnimationName: "tooltip--open-animation",
129
- exitAnimationName: "tooltip--close-animation",
130
- children: /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ i(D, { onClickAway: b, children: /* @__PURE__ */ i("div", { children: a }) }) })
131
- }
132
- )
133
- }
134
- )
135
- ] });
136
- };
137
- export {
138
- U as Tooltip
139
- };
@@ -1,33 +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, ...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
- 'data-testid'?: string | undefined;
23
- }>) => import("react/jsx-runtime").JSX.Element)[];
24
- };
25
- export default meta;
26
- type Story = StoryObj<typeof meta>;
27
- export declare const Simple: Story;
28
- export declare const Onclose: Story;
29
- export declare const InitialOpen: Story;
30
- export declare const WhiteTheme: Story;
31
- export declare const DisabledHover: Story;
32
- export declare const NormalPadding: Story;
33
- 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 {};