motile-ui 1.0.3 → 1.1.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.
- package/dist/components/Drawer/Drawer.js +56 -54
- package/dist/components/Modal/Modal.js +41 -37
- package/dist/components/Sheet/Sheet.js +67 -60
- package/dist/components/Sheet/useSheetNavigation.d.ts +1 -0
- package/dist/components/Sheet/useSheetNavigation.js +4 -0
- package/dist/components/Textarea/Textarea.js +48 -44
- package/dist/components/Toast/Toast.js +26 -20
- package/dist/components/Tooltip/Tooltip.js +97 -95
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +0 -5
- package/dist/index.js +34 -40
- package/package.json +6 -14
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as tt, jsx as
|
|
2
|
-
import et, { useState as
|
|
1
|
+
import { jsxs as tt, jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import et, { useState as S, useEffect as P, useCallback as T, useId as ot, useRef as A, useLayoutEffect as nt, createContext as rt, useContext as it } from "react";
|
|
3
3
|
import { createPortal as st } from "react-dom";
|
|
4
4
|
import { Slot as at } from "../../utils/Slot.js";
|
|
5
5
|
import { FloatingArrow as lt } from "../../utils/FloatingArrow.js";
|
|
6
6
|
import './Tooltip.css';/* empty css */
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const t = it(
|
|
7
|
+
const Z = rt(null);
|
|
8
|
+
function J() {
|
|
9
|
+
const t = it(Z);
|
|
10
10
|
if (!t)
|
|
11
11
|
throw new Error("Tooltip components must be used within Tooltip.Root");
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
14
|
const s = 8;
|
|
15
|
-
function
|
|
15
|
+
function X(t, e, r, i, a, f, u) {
|
|
16
16
|
switch (t) {
|
|
17
17
|
case "top":
|
|
18
18
|
return e.top - a.top - i >= s;
|
|
@@ -21,7 +21,7 @@ function D(t, e, r, i, a, m, u) {
|
|
|
21
21
|
case "left":
|
|
22
22
|
return e.left - a.left - r >= s;
|
|
23
23
|
case "right":
|
|
24
|
-
return e.right + a.right + r <=
|
|
24
|
+
return e.right + a.right + r <= f - s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function ct(t) {
|
|
@@ -45,10 +45,10 @@ function pt(t, e, r, i) {
|
|
|
45
45
|
left: t.left - e.left - s,
|
|
46
46
|
right: r - t.right - e.right - s
|
|
47
47
|
};
|
|
48
|
-
let
|
|
48
|
+
let f = "bottom", u = a.bottom;
|
|
49
49
|
for (const [n, l] of Object.entries(a))
|
|
50
|
-
l > u && (u = l,
|
|
51
|
-
return
|
|
50
|
+
l > u && (u = l, f = n);
|
|
51
|
+
return f;
|
|
52
52
|
}
|
|
53
53
|
function ft({
|
|
54
54
|
children: t,
|
|
@@ -56,7 +56,7 @@ function ft({
|
|
|
56
56
|
align: r = "center",
|
|
57
57
|
variant: i = "filled",
|
|
58
58
|
color: a,
|
|
59
|
-
showArrow:
|
|
59
|
+
showArrow: f = !1,
|
|
60
60
|
keepOpen: u = !1,
|
|
61
61
|
offset: n
|
|
62
62
|
}) {
|
|
@@ -65,52 +65,52 @@ function ft({
|
|
|
65
65
|
bottom: n.bottom ?? 6,
|
|
66
66
|
left: n.left ?? 6,
|
|
67
67
|
right: n.right ?? 6
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
() =>
|
|
68
|
+
}, M = ot().replace(/:/g, ""), w = A(null), x = A(null), m = A(), [b, L] = S(!1), [B, z] = S(e), [H, K] = S({}), F = A(null), W = T((k, E = 0) => {
|
|
69
|
+
m.current && (clearTimeout(m.current), m.current = void 0), !k && E > 0 ? m.current = window.setTimeout(
|
|
70
|
+
() => L(!1),
|
|
71
71
|
E
|
|
72
|
-
) :
|
|
72
|
+
) : L(k);
|
|
73
73
|
}, []);
|
|
74
74
|
nt(() => {
|
|
75
75
|
if (!b || !w.current || !x.current) return;
|
|
76
|
-
const
|
|
76
|
+
const k = () => {
|
|
77
77
|
if (!w.current || !x.current) return;
|
|
78
78
|
const o = w.current.getBoundingClientRect(), y = x.current;
|
|
79
79
|
y.classList.add("measuring"), y.offsetHeight;
|
|
80
|
-
const
|
|
81
|
-
let c =
|
|
80
|
+
const Y = window.getComputedStyle(y), _ = parseFloat(Y.width), q = parseFloat(Y.height);
|
|
81
|
+
let c = _, d = q;
|
|
82
82
|
y.classList.remove("measuring");
|
|
83
83
|
const R = window.innerWidth, O = window.innerHeight;
|
|
84
84
|
(isNaN(c) || c <= 0) && (c = 100), (isNaN(d) || d <= 0) && (d = 50);
|
|
85
|
-
const
|
|
86
|
-
c >
|
|
85
|
+
const U = R - s * 2, j = O - s * 2;
|
|
86
|
+
c > U && (c = U), d > j && (d = j);
|
|
87
87
|
let v = e;
|
|
88
|
-
if (o.width === 0 && o.height === 0 ||
|
|
88
|
+
if (o.width === 0 && o.height === 0 || X(e, o, c, d, l, R, O))
|
|
89
89
|
v = e;
|
|
90
90
|
else {
|
|
91
|
-
const
|
|
92
|
-
let
|
|
93
|
-
for (const
|
|
94
|
-
if (
|
|
95
|
-
v =
|
|
91
|
+
const N = ut(e, o, R, O);
|
|
92
|
+
let D = !1;
|
|
93
|
+
for (const G of N)
|
|
94
|
+
if (X(G, o, c, d, l, R, O)) {
|
|
95
|
+
v = G, D = !0;
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
D || (v = pt(o, l, R, O));
|
|
99
99
|
}
|
|
100
|
-
let
|
|
100
|
+
let p = 0, g = 0;
|
|
101
101
|
if (v === "top" || v === "bottom") {
|
|
102
102
|
switch (r) {
|
|
103
103
|
case "start":
|
|
104
|
-
|
|
104
|
+
p = o.left;
|
|
105
105
|
break;
|
|
106
106
|
case "center":
|
|
107
|
-
|
|
107
|
+
p = o.left + o.width / 2 - c / 2;
|
|
108
108
|
break;
|
|
109
109
|
case "end":
|
|
110
|
-
|
|
110
|
+
p = o.right - c;
|
|
111
111
|
break;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
p = Math.max(s, Math.min(p, R - s - c)), g = v === "top" ? o.top - l.top - d : o.bottom + l.bottom, g = Math.max(s, Math.min(g, O - s - d));
|
|
114
114
|
} else {
|
|
115
115
|
switch (r) {
|
|
116
116
|
case "start":
|
|
@@ -123,134 +123,134 @@ function ft({
|
|
|
123
123
|
g = o.bottom - d;
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
|
-
g = Math.max(s, Math.min(g, O - s - d)), v === "left" ? (
|
|
126
|
+
g = Math.max(s, Math.min(g, O - s - d)), v === "left" ? (p = o.left - l.left - c, p < s && (c = o.left - l.left - s, p = s)) : (p = o.right + l.right, p + c > R - s && (c = R - s - p));
|
|
127
127
|
}
|
|
128
128
|
let h = 0;
|
|
129
|
-
const
|
|
129
|
+
const I = 12, C = 16;
|
|
130
130
|
if (v === "left" || v === "right") {
|
|
131
131
|
switch (r) {
|
|
132
132
|
case "start":
|
|
133
|
-
h = o.top - g +
|
|
133
|
+
h = o.top - g + I;
|
|
134
134
|
break;
|
|
135
135
|
case "center":
|
|
136
136
|
h = o.top + o.height / 2 - g;
|
|
137
137
|
break;
|
|
138
138
|
case "end":
|
|
139
|
-
h = o.bottom - g -
|
|
139
|
+
h = o.bottom - g - I;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const N = Math.max(C, d - C);
|
|
143
143
|
h = Math.max(
|
|
144
144
|
C,
|
|
145
|
-
Math.min(h,
|
|
145
|
+
Math.min(h, N)
|
|
146
146
|
);
|
|
147
147
|
} else {
|
|
148
148
|
switch (r) {
|
|
149
149
|
case "start":
|
|
150
|
-
h = o.left -
|
|
150
|
+
h = o.left - p + I;
|
|
151
151
|
break;
|
|
152
152
|
case "center":
|
|
153
|
-
h = o.left + o.width / 2 -
|
|
153
|
+
h = o.left + o.width / 2 - p;
|
|
154
154
|
break;
|
|
155
155
|
case "end":
|
|
156
|
-
h = o.right -
|
|
156
|
+
h = o.right - p - I;
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const N = Math.max(C, c - C);
|
|
160
160
|
h = Math.max(
|
|
161
161
|
C,
|
|
162
|
-
Math.min(h,
|
|
162
|
+
Math.min(h, N)
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
isNaN(h) && (h = C),
|
|
166
|
-
left: Math.round(
|
|
165
|
+
isNaN(h) && (h = C), z(v), K({
|
|
166
|
+
left: Math.round(p),
|
|
167
167
|
top: Math.round(g),
|
|
168
|
-
...c !==
|
|
169
|
-
...d !==
|
|
168
|
+
...c !== _ && { maxWidth: c },
|
|
169
|
+
...d !== q && { maxHeight: j },
|
|
170
170
|
"--arrow-offset": `${Math.round(h)}px`,
|
|
171
171
|
...a && { "--motile-tooltip-color": a }
|
|
172
172
|
});
|
|
173
173
|
}, E = () => {
|
|
174
174
|
F.current === null && (F.current = requestAnimationFrame(() => {
|
|
175
|
-
|
|
175
|
+
k(), F.current = null;
|
|
176
176
|
}));
|
|
177
177
|
};
|
|
178
|
-
|
|
178
|
+
k(), window.addEventListener("scroll", E, {
|
|
179
179
|
passive: !0,
|
|
180
180
|
capture: !0
|
|
181
181
|
}), window.addEventListener("resize", E, { passive: !0 });
|
|
182
|
-
const
|
|
183
|
-
return w.current &&
|
|
184
|
-
F.current !== null && (cancelAnimationFrame(F.current), F.current = null), window.removeEventListener("scroll", E, { capture: !0 }), window.removeEventListener("resize", E),
|
|
182
|
+
const V = new ResizeObserver(E);
|
|
183
|
+
return w.current && V.observe(w.current), () => {
|
|
184
|
+
F.current !== null && (cancelAnimationFrame(F.current), F.current = null), window.removeEventListener("scroll", E, { capture: !0 }), window.removeEventListener("resize", E), V.disconnect();
|
|
185
185
|
};
|
|
186
|
-
}, [b, e, r, a, n]),
|
|
186
|
+
}, [b, e, r, a, n]), P(() => {
|
|
187
187
|
if (!b) return;
|
|
188
|
-
const
|
|
189
|
-
|
|
188
|
+
const k = () => {
|
|
189
|
+
W(!1, 0);
|
|
190
190
|
};
|
|
191
|
-
return window.addEventListener("scroll",
|
|
192
|
-
window.removeEventListener("scroll",
|
|
191
|
+
return window.addEventListener("scroll", k, { capture: !0 }), () => {
|
|
192
|
+
window.removeEventListener("scroll", k, { capture: !0 });
|
|
193
193
|
};
|
|
194
|
-
}, [b,
|
|
195
|
-
|
|
194
|
+
}, [b, W]), P(() => () => {
|
|
195
|
+
m.current && clearTimeout(m.current);
|
|
196
196
|
}, []);
|
|
197
197
|
const Q = {
|
|
198
198
|
open: b,
|
|
199
|
-
setOpen:
|
|
199
|
+
setOpen: W,
|
|
200
200
|
position: e,
|
|
201
201
|
align: r,
|
|
202
202
|
variant: i,
|
|
203
|
-
showArrow:
|
|
203
|
+
showArrow: f,
|
|
204
204
|
color: a,
|
|
205
205
|
keepOpen: u,
|
|
206
|
-
tooltipId: `${
|
|
206
|
+
tooltipId: `${M}-tooltip`,
|
|
207
207
|
triggerRef: w,
|
|
208
208
|
contentRef: x,
|
|
209
|
-
style:
|
|
210
|
-
placement:
|
|
209
|
+
style: H,
|
|
210
|
+
placement: B
|
|
211
211
|
};
|
|
212
|
-
return /* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ $(Z.Provider, { value: Q, children: t });
|
|
213
213
|
}
|
|
214
214
|
function mt({ children: t, asChild: e = !1 }) {
|
|
215
|
-
const { open: r, setOpen: i, tooltipId: a, triggerRef:
|
|
215
|
+
const { open: r, setOpen: i, tooltipId: a, triggerRef: f, keepOpen: u } = J(), n = T(() => {
|
|
216
216
|
i(!0, 0);
|
|
217
217
|
}, [i]), l = T(() => {
|
|
218
218
|
u ? i(!1, 100) : i(!1, 0);
|
|
219
|
-
}, [i, u]),
|
|
219
|
+
}, [i, u]), M = T(() => {
|
|
220
220
|
i(!0, 0);
|
|
221
221
|
}, [i]), w = T(() => {
|
|
222
222
|
i(!1, 0);
|
|
223
223
|
}, [i]), x = T(() => {
|
|
224
224
|
i(!r, 0);
|
|
225
225
|
}, [i, r]);
|
|
226
|
-
return e ? /* @__PURE__ */
|
|
226
|
+
return e ? /* @__PURE__ */ $(
|
|
227
227
|
at,
|
|
228
228
|
{
|
|
229
|
-
ref: (
|
|
230
|
-
|
|
229
|
+
ref: (m) => {
|
|
230
|
+
f.current = m;
|
|
231
231
|
},
|
|
232
232
|
className: "motile-tooltip-trigger",
|
|
233
233
|
"aria-describedby": r ? a : void 0,
|
|
234
234
|
tabIndex: 0,
|
|
235
235
|
onMouseEnter: n,
|
|
236
236
|
onMouseLeave: l,
|
|
237
|
-
onFocus:
|
|
237
|
+
onFocus: M,
|
|
238
238
|
onBlur: w,
|
|
239
239
|
onClick: x,
|
|
240
240
|
children: t
|
|
241
241
|
}
|
|
242
242
|
) : et.cloneElement(t, {
|
|
243
|
-
ref: (
|
|
244
|
-
|
|
243
|
+
ref: (m) => {
|
|
244
|
+
f.current = m;
|
|
245
245
|
const b = t.props.ref || t.ref;
|
|
246
|
-
b && (typeof b == "function" ? b(
|
|
246
|
+
b && (typeof b == "function" ? b(m) : typeof b == "object" && b !== null && (b.current = m));
|
|
247
247
|
},
|
|
248
248
|
className: `motile-tooltip-trigger ${t.props.className || ""}`.trim(),
|
|
249
249
|
"aria-describedby": r ? a : void 0,
|
|
250
250
|
tabIndex: t.props.tabIndex ?? 0,
|
|
251
251
|
onMouseEnter: n,
|
|
252
252
|
onMouseLeave: l,
|
|
253
|
-
onFocus:
|
|
253
|
+
onFocus: M,
|
|
254
254
|
onBlur: w,
|
|
255
255
|
onClick: x
|
|
256
256
|
});
|
|
@@ -261,48 +261,50 @@ function bt({ children: t }) {
|
|
|
261
261
|
setOpen: r,
|
|
262
262
|
tooltipId: i,
|
|
263
263
|
contentRef: a,
|
|
264
|
-
variant:
|
|
264
|
+
variant: f,
|
|
265
265
|
showArrow: u,
|
|
266
266
|
keepOpen: n,
|
|
267
267
|
align: l,
|
|
268
|
-
style:
|
|
268
|
+
style: M,
|
|
269
269
|
placement: w
|
|
270
|
-
} =
|
|
271
|
-
|
|
270
|
+
} = J(), [x, m] = S(!1), [b, L] = S(!1);
|
|
271
|
+
P(() => {
|
|
272
|
+
m(!0);
|
|
273
|
+
}, []), P(() => {
|
|
272
274
|
e ? requestAnimationFrame(() => {
|
|
273
|
-
|
|
274
|
-
}) :
|
|
275
|
+
L(!0);
|
|
276
|
+
}) : L(!1);
|
|
275
277
|
}, [e]);
|
|
276
|
-
const
|
|
278
|
+
const B = T(() => {
|
|
277
279
|
n && r(!0, 0);
|
|
278
|
-
}, [n, r]),
|
|
280
|
+
}, [n, r]), z = T(() => {
|
|
279
281
|
n && r(!1, 0);
|
|
280
|
-
}, [n, r]),
|
|
281
|
-
return !
|
|
282
|
+
}, [n, r]), H = M["--motile-tooltip-color"] || (f === "filled" ? "var(--motile-ui-tooltip, rgba(0, 0, 0, 0.9))" : "var(--motile-ui-tooltip, #3b82f6)");
|
|
283
|
+
return !x || !e ? null : st(
|
|
282
284
|
/* @__PURE__ */ tt(
|
|
283
285
|
"div",
|
|
284
286
|
{
|
|
285
287
|
ref: a,
|
|
286
288
|
id: i,
|
|
287
289
|
role: "tooltip",
|
|
288
|
-
className: `motile-tooltip-bubble motile-tooltip-bubble--${
|
|
289
|
-
"data-open":
|
|
290
|
+
className: `motile-tooltip-bubble motile-tooltip-bubble--${f}`,
|
|
291
|
+
"data-open": b || void 0,
|
|
290
292
|
"data-placement": w,
|
|
291
293
|
"data-align": l,
|
|
292
294
|
"data-show-arrow": u || void 0,
|
|
293
295
|
"data-keep-open": n || void 0,
|
|
294
|
-
style:
|
|
296
|
+
style: M,
|
|
295
297
|
"aria-hidden": !e,
|
|
296
|
-
onMouseEnter:
|
|
297
|
-
onMouseLeave:
|
|
298
|
+
onMouseEnter: B,
|
|
299
|
+
onMouseLeave: z,
|
|
298
300
|
children: [
|
|
299
301
|
t,
|
|
300
|
-
u && /* @__PURE__ */
|
|
302
|
+
u && /* @__PURE__ */ $(
|
|
301
303
|
lt,
|
|
302
304
|
{
|
|
303
305
|
className: "motile-tooltip-arrow",
|
|
304
|
-
variant:
|
|
305
|
-
color:
|
|
306
|
+
variant: f,
|
|
307
|
+
color: H
|
|
306
308
|
}
|
|
307
309
|
)
|
|
308
310
|
]
|
|
@@ -311,11 +313,11 @@ function bt({ children: t }) {
|
|
|
311
313
|
document.body
|
|
312
314
|
);
|
|
313
315
|
}
|
|
314
|
-
const
|
|
316
|
+
const kt = {
|
|
315
317
|
Root: ft,
|
|
316
318
|
Trigger: mt,
|
|
317
319
|
Content: bt
|
|
318
320
|
};
|
|
319
321
|
export {
|
|
320
|
-
|
|
322
|
+
kt as Tooltip
|
|
321
323
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useScrollLock } from './useScrollLock';
|
|
2
|
+
export { useClickOutside } from './useClickOutside';
|
|
3
|
+
export type { UseClickOutsideOptions } from './useClickOutside';
|
|
4
|
+
export { useEscapeKey } from './useEscapeKey';
|
|
5
|
+
export type { UseEscapeKeyOptions } from './useEscapeKey';
|
package/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,3 @@ export { Dock } from './components/Dock';
|
|
|
30
30
|
export type { DockRootProps, DockItemProps, DockSeparatorProps, DockPosition, } from './components/Dock';
|
|
31
31
|
export { SpeedDial } from './components/SpeedDial';
|
|
32
32
|
export type { SpeedDialDirection, SpeedDialRootProps, SpeedDialTriggerProps, SpeedDialActionsProps, SpeedDialActionProps, } from './components/SpeedDial';
|
|
33
|
-
export { useScrollLock } from './hooks/useScrollLock';
|
|
34
|
-
export { useClickOutside } from './hooks/useClickOutside';
|
|
35
|
-
export type { UseClickOutsideOptions } from './hooks/useClickOutside';
|
|
36
|
-
export { useEscapeKey } from './hooks/useEscapeKey';
|
|
37
|
-
export type { UseEscapeKeyOptions } from './hooks/useEscapeKey';
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { useToast as j } from "./components/Toast/useToast.js";
|
|
19
|
-
import { Dock as z } from "./components/Dock/Dock.js";
|
|
20
|
-
import { SpeedDial as G } from "./components/SpeedDial/SpeedDial.js";
|
|
1
|
+
import { Button as e } from "./components/Button/Button.js";
|
|
2
|
+
import { Input as p } from "./components/Input/Input.js";
|
|
3
|
+
import { Textarea as f } from "./components/Textarea/Textarea.js";
|
|
4
|
+
import { Checkbox as a } from "./components/Checkbox/Checkbox.js";
|
|
5
|
+
import { Switch as d } from "./components/Switch/Switch.js";
|
|
6
|
+
import { Accordion as l } from "./components/Accordion/Accordion.js";
|
|
7
|
+
import { Skeleton as S } from "./components/Skeleton/Skeleton.js";
|
|
8
|
+
import { Badge as h } from "./components/Badge/Badge.js";
|
|
9
|
+
import { Tooltip as s } from "./components/Tooltip/Tooltip.js";
|
|
10
|
+
import { Popover as D } from "./components/Popover/Popover.js";
|
|
11
|
+
import { Drawer as w } from "./components/Drawer/Drawer.js";
|
|
12
|
+
import { Sheet as P } from "./components/Sheet/Sheet.js";
|
|
13
|
+
import { Modal as g } from "./components/Modal/Modal.js";
|
|
14
|
+
import { ToastProvider as C } from "./components/Toast/Toast.js";
|
|
15
|
+
import { useToast as M } from "./components/Toast/useToast.js";
|
|
16
|
+
import { Dock as q } from "./components/Dock/Dock.js";
|
|
17
|
+
import { SpeedDial as z } from "./components/SpeedDial/SpeedDial.js";
|
|
21
18
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
f as useEscapeKey,
|
|
40
|
-
e as useScrollLock,
|
|
41
|
-
j as useToast
|
|
19
|
+
l as Accordion,
|
|
20
|
+
h as Badge,
|
|
21
|
+
e as Button,
|
|
22
|
+
a as Checkbox,
|
|
23
|
+
q as Dock,
|
|
24
|
+
w as Drawer,
|
|
25
|
+
p as Input,
|
|
26
|
+
g as Modal,
|
|
27
|
+
D as Popover,
|
|
28
|
+
P as Sheet,
|
|
29
|
+
S as Skeleton,
|
|
30
|
+
z as SpeedDial,
|
|
31
|
+
d as Switch,
|
|
32
|
+
f as Textarea,
|
|
33
|
+
C as ToastProvider,
|
|
34
|
+
s as Tooltip,
|
|
35
|
+
M as useToast
|
|
42
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motile-ui",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A modern React component library for webview applications",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"import": "./dist/components/Popover/Popover.js"
|
|
49
49
|
},
|
|
50
50
|
"./Sheet": {
|
|
51
|
-
"types": "./dist/components/Sheet/
|
|
52
|
-
"import": "./dist/components/Sheet/
|
|
51
|
+
"types": "./dist/components/Sheet/useSheetNavigation.d.ts",
|
|
52
|
+
"import": "./dist/components/Sheet/useSheetNavigation.js"
|
|
53
53
|
},
|
|
54
54
|
"./Skeleton": {
|
|
55
55
|
"types": "./dist/components/Skeleton/Skeleton.d.ts",
|
|
@@ -83,17 +83,9 @@
|
|
|
83
83
|
"types": "./dist/components/Toast/useToast.d.ts",
|
|
84
84
|
"import": "./dist/components/Toast/useToast.js"
|
|
85
85
|
},
|
|
86
|
-
"./
|
|
87
|
-
"types": "./dist/hooks/
|
|
88
|
-
"import": "./dist/hooks/
|
|
89
|
-
},
|
|
90
|
-
"./useClickOutside": {
|
|
91
|
-
"types": "./dist/hooks/useClickOutside.d.ts",
|
|
92
|
-
"import": "./dist/hooks/useClickOutside.js"
|
|
93
|
-
},
|
|
94
|
-
"./useEscapeKey": {
|
|
95
|
-
"types": "./dist/hooks/useEscapeKey.d.ts",
|
|
96
|
-
"import": "./dist/hooks/useEscapeKey.js"
|
|
86
|
+
"./hooks": {
|
|
87
|
+
"types": "./dist/hooks/index.d.ts",
|
|
88
|
+
"import": "./dist/hooks/index.js"
|
|
97
89
|
}
|
|
98
90
|
},
|
|
99
91
|
"files": [
|