@epoch32/visage 1.1.5 → 1.3.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/{index-b5wc752a.js → index-dvq5f3s8.js} +342 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -1
- package/dist/ui/bottom-bar/action.d.ts +3 -0
- package/dist/ui/bottom-bar/badge.d.ts +3 -0
- package/dist/ui/bottom-bar/context.d.ts +3 -0
- package/dist/ui/bottom-bar/index.d.ts +19 -0
- package/dist/ui/bottom-bar/item.d.ts +3 -0
- package/dist/ui/bottom-bar/root.d.ts +3 -0
- package/dist/ui/bottom-bar/separator.d.ts +3 -0
- package/dist/ui/bottom-bar/types.d.ts +72 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +15 -1
- package/dist/vite/index.js +34 -15
- package/dist/vite/lucide.d.ts +0 -17
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/src/ui/bottom-bar/action.tsx +60 -0
- package/src/ui/bottom-bar/badge.tsx +51 -0
- package/src/ui/bottom-bar/context.ts +8 -0
- package/src/ui/bottom-bar/index.ts +29 -0
- package/src/ui/bottom-bar/item.tsx +119 -0
- package/src/ui/bottom-bar/root.tsx +148 -0
- package/src/ui/bottom-bar/separator.tsx +26 -0
- package/src/ui/bottom-bar/types.ts +79 -0
- package/src/ui/index.ts +16 -0
- package/src/vite/lucide.ts +58 -18
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
computed2,
|
|
2
3
|
onCleanup2,
|
|
3
4
|
createContext2,
|
|
4
5
|
useContext2,
|
|
@@ -198,6 +199,346 @@ var Accordion2 = Object.assign(AccordionRoot, {
|
|
|
198
199
|
Trigger: AccordionTrigger2,
|
|
199
200
|
Content: AccordionContent2
|
|
200
201
|
});
|
|
202
|
+
// src/ui/bottom-bar/action.tsx
|
|
203
|
+
function BottomBarAction2(props) {
|
|
204
|
+
const {
|
|
205
|
+
as: Tag = "button",
|
|
206
|
+
icon,
|
|
207
|
+
label,
|
|
208
|
+
disabled,
|
|
209
|
+
onClick,
|
|
210
|
+
children,
|
|
211
|
+
class: className,
|
|
212
|
+
style,
|
|
213
|
+
...rest
|
|
214
|
+
} = props;
|
|
215
|
+
const defaultActionStyle = {
|
|
216
|
+
display: "inline-flex",
|
|
217
|
+
alignItems: "center",
|
|
218
|
+
justifyContent: "center",
|
|
219
|
+
width: "44px",
|
|
220
|
+
height: "44px",
|
|
221
|
+
minWidth: "44px",
|
|
222
|
+
minHeight: "44px",
|
|
223
|
+
borderRadius: "50%",
|
|
224
|
+
background: "linear-gradient(135deg, #ec4899 0%, #a855f7 100%)",
|
|
225
|
+
color: "#ffffff",
|
|
226
|
+
border: "none",
|
|
227
|
+
boxShadow: "0 4px 14px rgba(236, 72, 153, 0.45)",
|
|
228
|
+
cursor: "pointer",
|
|
229
|
+
outline: "none",
|
|
230
|
+
userSelect: "none",
|
|
231
|
+
WebkitTapHighlightColor: "transparent",
|
|
232
|
+
transition: "transform 0.15s ease, box-shadow 0.15s ease",
|
|
233
|
+
boxSizing: "border-box"
|
|
234
|
+
};
|
|
235
|
+
const combinedStyle = style ? { ...defaultActionStyle, ...style } : defaultActionStyle;
|
|
236
|
+
return /* @__PURE__ */ jsx2(Tag, {
|
|
237
|
+
type: Tag === "button" ? "button" : undefined,
|
|
238
|
+
role: "button",
|
|
239
|
+
"aria-label": label ?? "Primary action",
|
|
240
|
+
disabled,
|
|
241
|
+
class: `visage-bottom-bar-action ${className ?? ""}`.trim(),
|
|
242
|
+
style: combinedStyle,
|
|
243
|
+
onClick,
|
|
244
|
+
...rest,
|
|
245
|
+
children: children !== undefined ? typeof children === "function" ? children() : children : typeof icon === "function" ? icon() : icon
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// src/ui/bottom-bar/badge.tsx
|
|
250
|
+
function BottomBarBadge2(props) {
|
|
251
|
+
const { as: Tag = "span", count, children, class: className, style, ...rest } = props;
|
|
252
|
+
const displayContent = computed2(() => {
|
|
253
|
+
if (children !== undefined) {
|
|
254
|
+
return typeof children === "function" ? children() : children;
|
|
255
|
+
}
|
|
256
|
+
if (count !== undefined) {
|
|
257
|
+
return typeof count === "function" ? count() : count;
|
|
258
|
+
}
|
|
259
|
+
return "";
|
|
260
|
+
});
|
|
261
|
+
const defaultBadgeStyle = {
|
|
262
|
+
position: "absolute",
|
|
263
|
+
top: "3px",
|
|
264
|
+
right: "8px",
|
|
265
|
+
minWidth: "16px",
|
|
266
|
+
height: "16px",
|
|
267
|
+
padding: "0 4px",
|
|
268
|
+
borderRadius: "9999px",
|
|
269
|
+
backgroundColor: "#ef4444",
|
|
270
|
+
color: "#ffffff",
|
|
271
|
+
fontSize: "9px",
|
|
272
|
+
fontWeight: 700,
|
|
273
|
+
lineHeight: "16px",
|
|
274
|
+
textAlign: "center",
|
|
275
|
+
display: "inline-flex",
|
|
276
|
+
alignItems: "center",
|
|
277
|
+
justifyContent: "center",
|
|
278
|
+
boxShadow: "0 0 0 1.5px rgba(18, 18, 24, 0.9)",
|
|
279
|
+
pointerEvents: "none",
|
|
280
|
+
boxSizing: "border-box"
|
|
281
|
+
};
|
|
282
|
+
const combinedStyle = style ? { ...defaultBadgeStyle, ...style } : defaultBadgeStyle;
|
|
283
|
+
return /* @__PURE__ */ jsx2(Tag, {
|
|
284
|
+
class: `visage-bottom-bar-badge ${className ?? ""}`.trim(),
|
|
285
|
+
style: combinedStyle,
|
|
286
|
+
...rest,
|
|
287
|
+
children: displayContent
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// src/ui/bottom-bar/context.ts
|
|
292
|
+
var BottomBarContext = createContext2(null);
|
|
293
|
+
function useBottomBarContext2() {
|
|
294
|
+
return useContext2(BottomBarContext);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// src/ui/bottom-bar/item.tsx
|
|
298
|
+
function BottomBarItem2(props) {
|
|
299
|
+
const ctx = useBottomBarContext2();
|
|
300
|
+
const isSelected = computed2(() => ctx ? ctx.value() === props.value : false);
|
|
301
|
+
const handleClick = (e) => {
|
|
302
|
+
const isDisabled = typeof props.disabled === "function" ? props.disabled() : Boolean(props.disabled);
|
|
303
|
+
if (isDisabled) {
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (ctx) {
|
|
308
|
+
ctx.setValue(props.value);
|
|
309
|
+
}
|
|
310
|
+
if (props.onClick) {
|
|
311
|
+
props.onClick(e);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
const {
|
|
315
|
+
as: Tag = "button",
|
|
316
|
+
value,
|
|
317
|
+
icon,
|
|
318
|
+
label,
|
|
319
|
+
badge,
|
|
320
|
+
disabled,
|
|
321
|
+
onClick: _oc,
|
|
322
|
+
children,
|
|
323
|
+
class: className,
|
|
324
|
+
style,
|
|
325
|
+
...rest
|
|
326
|
+
} = props;
|
|
327
|
+
const defaultItemStyle = {
|
|
328
|
+
position: "relative",
|
|
329
|
+
display: "flex",
|
|
330
|
+
flexDirection: "column",
|
|
331
|
+
alignItems: "center",
|
|
332
|
+
justifyContent: "center",
|
|
333
|
+
minWidth: "52px",
|
|
334
|
+
minHeight: "44px",
|
|
335
|
+
padding: "6px 8px",
|
|
336
|
+
borderRadius: "16px",
|
|
337
|
+
border: "none",
|
|
338
|
+
background: () => isSelected() ? "rgba(255, 255, 255, 0.08)" : "transparent",
|
|
339
|
+
color: () => isSelected() ? "#ec4899" : "rgba(255, 255, 255, 0.65)",
|
|
340
|
+
cursor: "pointer",
|
|
341
|
+
outline: "none",
|
|
342
|
+
userSelect: "none",
|
|
343
|
+
WebkitTapHighlightColor: "transparent",
|
|
344
|
+
transition: "color 0.15s ease, background-color 0.15s ease, transform 0.1s ease",
|
|
345
|
+
boxSizing: "border-box"
|
|
346
|
+
};
|
|
347
|
+
const combinedStyle = style ? { ...defaultItemStyle, ...style } : defaultItemStyle;
|
|
348
|
+
return /* @__PURE__ */ jsxs2(Tag, {
|
|
349
|
+
type: Tag === "button" ? "button" : undefined,
|
|
350
|
+
role: "tab",
|
|
351
|
+
id: ctx ? `${ctx.baseId}-item-${value}` : undefined,
|
|
352
|
+
"aria-selected": () => isSelected(),
|
|
353
|
+
"data-state": () => isSelected() ? "active" : "inactive",
|
|
354
|
+
"data-value": value,
|
|
355
|
+
disabled,
|
|
356
|
+
class: `visage-bottom-bar-item ${className ?? ""}`.trim(),
|
|
357
|
+
style: combinedStyle,
|
|
358
|
+
onClick: handleClick,
|
|
359
|
+
...rest,
|
|
360
|
+
children: [
|
|
361
|
+
badge !== undefined ? typeof badge === "function" || typeof badge === "string" || typeof badge === "number" ? /* @__PURE__ */ jsx2(BottomBarBadge2, {
|
|
362
|
+
count: badge
|
|
363
|
+
}) : badge : null,
|
|
364
|
+
children !== undefined ? typeof children === "function" ? children() : children : null,
|
|
365
|
+
icon ? /* @__PURE__ */ jsx2("span", {
|
|
366
|
+
class: "visage-bottom-bar-icon",
|
|
367
|
+
style: {
|
|
368
|
+
display: "inline-flex",
|
|
369
|
+
alignItems: "center",
|
|
370
|
+
justifyContent: "center",
|
|
371
|
+
fontSize: "18px"
|
|
372
|
+
},
|
|
373
|
+
children: typeof icon === "function" ? icon() : icon
|
|
374
|
+
}) : null,
|
|
375
|
+
label ? /* @__PURE__ */ jsx2("span", {
|
|
376
|
+
class: "visage-bottom-bar-label",
|
|
377
|
+
style: {
|
|
378
|
+
fontSize: "10px",
|
|
379
|
+
fontWeight: 500,
|
|
380
|
+
lineHeight: 1.2,
|
|
381
|
+
marginTop: "3px",
|
|
382
|
+
letterSpacing: "0.01em"
|
|
383
|
+
},
|
|
384
|
+
children: typeof label === "function" ? label() : label
|
|
385
|
+
}) : null
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// src/ui/bottom-bar/root.tsx
|
|
391
|
+
function BottomBarRoot2(props) {
|
|
392
|
+
const [value, setValue] = createControllableSignal2({
|
|
393
|
+
value: props.value,
|
|
394
|
+
defaultValue: props.defaultValue ?? (props.items && props.items.length > 0 ? props.items[0]?.value : ""),
|
|
395
|
+
onChange: props.onValueChange
|
|
396
|
+
});
|
|
397
|
+
const baseId = createId2("bottom-bar");
|
|
398
|
+
const variant = props.variant ?? "floating";
|
|
399
|
+
const hideOnScroll = props.hideOnScroll ?? false;
|
|
400
|
+
const threshold = props.scrollThreshold ?? 20;
|
|
401
|
+
const isVisible = signal2(true);
|
|
402
|
+
if (hideOnScroll && typeof window !== "undefined") {
|
|
403
|
+
let lastScrollY = window.scrollY || 0;
|
|
404
|
+
const onScroll = () => {
|
|
405
|
+
const currentScrollY = window.scrollY || 0;
|
|
406
|
+
const diff = currentScrollY - lastScrollY;
|
|
407
|
+
if (Math.abs(diff) < 5)
|
|
408
|
+
return;
|
|
409
|
+
if (currentScrollY > threshold && diff > 0) {
|
|
410
|
+
if (isVisible())
|
|
411
|
+
isVisible.set(false);
|
|
412
|
+
} else if (diff < 0) {
|
|
413
|
+
if (!isVisible())
|
|
414
|
+
isVisible.set(true);
|
|
415
|
+
}
|
|
416
|
+
lastScrollY = Math.max(0, currentScrollY);
|
|
417
|
+
};
|
|
418
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
419
|
+
}
|
|
420
|
+
const ctx = {
|
|
421
|
+
value,
|
|
422
|
+
setValue,
|
|
423
|
+
baseId,
|
|
424
|
+
variant
|
|
425
|
+
};
|
|
426
|
+
const {
|
|
427
|
+
as: Tag = "nav",
|
|
428
|
+
value: _v,
|
|
429
|
+
defaultValue: _dv,
|
|
430
|
+
onValueChange: _ovc,
|
|
431
|
+
variant: _var,
|
|
432
|
+
hideOnScroll: _hos,
|
|
433
|
+
scrollThreshold: _st,
|
|
434
|
+
items,
|
|
435
|
+
itemClass,
|
|
436
|
+
itemStyle,
|
|
437
|
+
children,
|
|
438
|
+
class: className,
|
|
439
|
+
style,
|
|
440
|
+
...rest
|
|
441
|
+
} = props;
|
|
442
|
+
const defaultFloatingStyle = {
|
|
443
|
+
position: "fixed",
|
|
444
|
+
bottom: "max(16px, env(safe-area-inset-bottom, 16px))",
|
|
445
|
+
left: "50%",
|
|
446
|
+
zIndex: 50,
|
|
447
|
+
display: "inline-flex",
|
|
448
|
+
alignItems: "center",
|
|
449
|
+
gap: "6px",
|
|
450
|
+
padding: "6px 10px",
|
|
451
|
+
borderRadius: "9999px",
|
|
452
|
+
backgroundColor: "rgba(18, 18, 24, 0.88)",
|
|
453
|
+
backdropFilter: "blur(20px)",
|
|
454
|
+
WebkitBackdropFilter: "blur(20px)",
|
|
455
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
456
|
+
boxShadow: "0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05)",
|
|
457
|
+
transform: () => isVisible() ? "translateX(-50%) translateY(0)" : "translateX(-50%) translateY(160%)",
|
|
458
|
+
opacity: () => isVisible() ? 1 : 0,
|
|
459
|
+
pointerEvents: () => isVisible() ? "auto" : "none",
|
|
460
|
+
transition: "transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease",
|
|
461
|
+
maxWidth: "calc(100vw - 32px)",
|
|
462
|
+
boxSizing: "border-box"
|
|
463
|
+
};
|
|
464
|
+
const defaultDockedStyle = {
|
|
465
|
+
position: "fixed",
|
|
466
|
+
bottom: 0,
|
|
467
|
+
left: 0,
|
|
468
|
+
right: 0,
|
|
469
|
+
zIndex: 50,
|
|
470
|
+
display: "flex",
|
|
471
|
+
justifyContent: "space-around",
|
|
472
|
+
alignItems: "center",
|
|
473
|
+
paddingTop: "8px",
|
|
474
|
+
paddingBottom: "max(10px, env(safe-area-inset-bottom, 10px))",
|
|
475
|
+
paddingLeft: "12px",
|
|
476
|
+
paddingRight: "12px",
|
|
477
|
+
backgroundColor: "rgba(18, 18, 24, 0.94)",
|
|
478
|
+
backdropFilter: "blur(20px)",
|
|
479
|
+
WebkitBackdropFilter: "blur(20px)",
|
|
480
|
+
borderTop: "1px solid rgba(255, 255, 255, 0.1)",
|
|
481
|
+
boxShadow: "0 -4px 20px rgba(0, 0, 0, 0.35)",
|
|
482
|
+
transform: () => isVisible() ? "translateY(0)" : "translateY(110%)",
|
|
483
|
+
opacity: () => isVisible() ? 1 : 0,
|
|
484
|
+
pointerEvents: () => isVisible() ? "auto" : "none",
|
|
485
|
+
transition: "transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease",
|
|
486
|
+
boxSizing: "border-box"
|
|
487
|
+
};
|
|
488
|
+
const computedDefaultStyle = variant === "floating" ? defaultFloatingStyle : defaultDockedStyle;
|
|
489
|
+
const combinedStyle = style ? { ...computedDefaultStyle, ...style } : computedDefaultStyle;
|
|
490
|
+
return BottomBarContext.Provider({
|
|
491
|
+
value: ctx,
|
|
492
|
+
children: () => /* @__PURE__ */ jsx2(Tag, {
|
|
493
|
+
role: "toolbar",
|
|
494
|
+
"aria-label": "Mobile toolbar",
|
|
495
|
+
"data-variant": variant,
|
|
496
|
+
"data-state": () => isVisible() ? "visible" : "hidden",
|
|
497
|
+
class: `visage-bottom-bar visage-bottom-bar-${variant} ${className ?? ""}`.trim(),
|
|
498
|
+
style: combinedStyle,
|
|
499
|
+
...rest,
|
|
500
|
+
children: items ? items.map((item) => /* @__PURE__ */ jsx2(BottomBarItem2, {
|
|
501
|
+
value: item.value,
|
|
502
|
+
icon: item.icon,
|
|
503
|
+
label: item.label,
|
|
504
|
+
badge: item.badge,
|
|
505
|
+
disabled: item.disabled,
|
|
506
|
+
onClick: item.onClick,
|
|
507
|
+
class: item.class ?? itemClass,
|
|
508
|
+
style: item.style ?? itemStyle
|
|
509
|
+
})) : typeof children === "function" ? children() : children
|
|
510
|
+
})
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// src/ui/bottom-bar/separator.tsx
|
|
515
|
+
function BottomBarSeparator2(props) {
|
|
516
|
+
const { as: Tag = "div", class: className, style, ...rest } = props;
|
|
517
|
+
const defaultSeparatorStyle = {
|
|
518
|
+
width: "1px",
|
|
519
|
+
height: "22px",
|
|
520
|
+
backgroundColor: "rgba(255, 255, 255, 0.12)",
|
|
521
|
+
margin: "0 2px",
|
|
522
|
+
flexShrink: 0
|
|
523
|
+
};
|
|
524
|
+
const combinedStyle = style ? { ...defaultSeparatorStyle, ...style } : defaultSeparatorStyle;
|
|
525
|
+
return /* @__PURE__ */ jsx2(Tag, {
|
|
526
|
+
role: "separator",
|
|
527
|
+
"aria-orientation": "vertical",
|
|
528
|
+
class: `visage-bottom-bar-separator ${className ?? ""}`.trim(),
|
|
529
|
+
style: combinedStyle,
|
|
530
|
+
...rest
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// src/ui/bottom-bar/index.ts
|
|
535
|
+
var BottomBar2 = Object.assign(BottomBarRoot2, {
|
|
536
|
+
Root: BottomBarRoot2,
|
|
537
|
+
Item: BottomBarItem2,
|
|
538
|
+
Action: BottomBarAction2,
|
|
539
|
+
Badge: BottomBarBadge2,
|
|
540
|
+
Separator: BottomBarSeparator2
|
|
541
|
+
});
|
|
201
542
|
// src/ui/command-dialog.tsx
|
|
202
543
|
function CommandDialog2(props) {
|
|
203
544
|
const [open, setOpen] = createControllableSignal2({
|
|
@@ -1693,4 +2034,4 @@ var Toast2 = Object.assign(ToastRoot, {
|
|
|
1693
2034
|
Description: ToastDescription2,
|
|
1694
2035
|
Close: ToastClose2
|
|
1695
2036
|
});
|
|
1696
|
-
export { useAccordionContext2, useAccordionItemContext2, AccordionItem2, AccordionTrigger2, AccordionContent2, Accordion2, CommandDialog2, useCommandContext2, CommandInput2, CommandList2, CommandEmpty2, CommandGroup2, CommandItem2, Command2, DataTable2, useDialogContext2, DialogTrigger2, DialogPortal2, DialogOverlay2, DialogContent2, DialogTitle2, DialogDescription2, DialogClose2, Dialog2, useDropdownMenuContext2, DropdownMenuTrigger2, DropdownMenuPortal2, DropdownMenuContent2, DropdownMenuItem2, DropdownMenuSeparator2, DropdownMenu2, createIcon2, usePopoverContext2, PopoverTrigger2, PopoverPortal2, PopoverContent2, PopoverClose2, Popover2, createToastManager2, defaultToastManager2, toast2, useToast2, ToastProvider2, ToastViewport2, ToastTitle2, ToastDescription2, ToastClose2, Toast2 };
|
|
2037
|
+
export { useAccordionContext2, useAccordionItemContext2, AccordionItem2, AccordionTrigger2, AccordionContent2, Accordion2, BottomBarAction2, BottomBarBadge2, useBottomBarContext2, BottomBarItem2, BottomBarRoot2, BottomBarSeparator2, BottomBar2, CommandDialog2, useCommandContext2, CommandInput2, CommandList2, CommandEmpty2, CommandGroup2, CommandItem2, Command2, DataTable2, useDialogContext2, DialogTrigger2, DialogPortal2, DialogOverlay2, DialogContent2, DialogTitle2, DialogDescription2, DialogClose2, Dialog2, useDropdownMenuContext2, DropdownMenuTrigger2, DropdownMenuPortal2, DropdownMenuContent2, DropdownMenuItem2, DropdownMenuSeparator2, DropdownMenu2, createIcon2, usePopoverContext2, PopoverTrigger2, PopoverPortal2, PopoverContent2, PopoverClose2, Popover2, createToastManager2, defaultToastManager2, toast2, useToast2, ToastProvider2, ToastViewport2, ToastTitle2, ToastDescription2, ToastClose2, Toast2 };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export { hydrate, renderChildToString, renderToStream, renderToString, type Stre
|
|
|
11
11
|
export { batch, type CleanupFn, Computed, type Context, computed, createContext, createEffect, createMemo, createRoot, createSignal, createStore, type Dependency, Effect, effect, getActiveScope, isSignal, mutateStore, onCleanup, type ReadonlySignal, runInScope, Scope, Signal, type Store, type Subscriber, signal, untrack, unwrapStore, useContext, type WritableSignal } from "./signals";
|
|
12
12
|
export { type BaseLayoutProps, Center, type CenterProps, type ClassValue, createStyle, css, cx, DIMENSION_KEYWORDS, em, extractStyleTags, fluid, formatStyleProp, type GlassOptions, Grid, type GridProps, getScopeId, glass, hashString, hasReactiveClass, normalizeClass, px, type RadiusVariant, Row, type RowProps, radius, rem, type ScopeOptions, type ShadowVariant, Spacer, type SpacerProps, Stack, type StackProps, Style, type StyleClasses, StyleManager, type StyleProps, scopeCSS, scopeSelector, shadow, space, styleManager, UNITLESS_PROPERTIES, useStyle } from "./style";
|
|
13
13
|
export { html, template } from "./template";
|
|
14
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, type ColumnDef, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, type CreateTabsOptions, createControllableSignal, createIcon, createId, createTabs, createToastManager, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuSeparator, DropdownMenuTrigger, defaultToastManager, type IconNode, type IconProps, onClickOutside, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, type SortDirection, type SortState, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, Toast, ToastClose, type ToastData, ToastDescription, type ToastManager, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastVariant, ToastViewport, type ToastViewportProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipTrigger, toast, trapFocus, useAccordionContext, useAccordionItemContext, useCommandContext, useDialogContext, useDropdownMenuContext, usePopoverContext, useTabsContext, useToast, useTooltipContext } from "./ui";
|
|
14
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, BottomBar, BottomBarAction, type BottomBarActionProps, BottomBarBadge, type BottomBarBadgeProps, type BottomBarContextValue, BottomBarItem, type BottomBarItemConfig, type BottomBarItemProps, type BottomBarProps, BottomBarRoot, BottomBarSeparator, type BottomBarSeparatorProps, type ColumnDef, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, type CreateTabsOptions, createControllableSignal, createIcon, createId, createTabs, createToastManager, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuSeparator, DropdownMenuTrigger, defaultToastManager, type IconNode, type IconProps, onClickOutside, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, type SortDirection, type SortState, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, Toast, ToastClose, type ToastData, ToastDescription, type ToastManager, type ToastOptions, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastVariant, ToastViewport, type ToastViewportProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipTrigger, toast, trapFocus, useAccordionContext, useAccordionItemContext, useBottomBarContext, useCommandContext, useDialogContext, useDropdownMenuContext, usePopoverContext, useTabsContext, useToast, useTooltipContext } from "./ui";
|
|
15
15
|
export { createVirtualizer, VirtualGrid, type VirtualGridProps, type VirtualItem, type Virtualizer, type VirtualizerOptions, VirtualList, type VirtualListProps } from "./virtual";
|
package/dist/index.js
CHANGED
|
@@ -103,6 +103,13 @@ import {
|
|
|
103
103
|
AccordionTrigger2,
|
|
104
104
|
AccordionContent2,
|
|
105
105
|
Accordion2,
|
|
106
|
+
BottomBarAction2,
|
|
107
|
+
BottomBarBadge2,
|
|
108
|
+
useBottomBarContext2,
|
|
109
|
+
BottomBarItem2,
|
|
110
|
+
BottomBarRoot2,
|
|
111
|
+
BottomBarSeparator2,
|
|
112
|
+
BottomBar2,
|
|
106
113
|
CommandDialog2,
|
|
107
114
|
useCommandContext2,
|
|
108
115
|
CommandInput2,
|
|
@@ -145,7 +152,7 @@ import {
|
|
|
145
152
|
ToastDescription2,
|
|
146
153
|
ToastClose2,
|
|
147
154
|
Toast2
|
|
148
|
-
} from "./index-
|
|
155
|
+
} from "./index-dvq5f3s8.js";
|
|
149
156
|
import {
|
|
150
157
|
createVirtualizer2,
|
|
151
158
|
VirtualList2,
|
|
@@ -254,6 +261,12 @@ export {
|
|
|
254
261
|
AccordionTrigger2 as AccordionTrigger,
|
|
255
262
|
Area2 as Area,
|
|
256
263
|
Bar2 as Bar,
|
|
264
|
+
BottomBar2 as BottomBar,
|
|
265
|
+
BottomBarAction2 as BottomBarAction,
|
|
266
|
+
BottomBarBadge2 as BottomBarBadge,
|
|
267
|
+
BottomBarItem2 as BottomBarItem,
|
|
268
|
+
BottomBarRoot2 as BottomBarRoot,
|
|
269
|
+
BottomBarSeparator2 as BottomBarSeparator,
|
|
257
270
|
CartesianGrid2 as CartesianGrid,
|
|
258
271
|
Center2 as Center,
|
|
259
272
|
Chart2 as Chart,
|
|
@@ -441,6 +454,7 @@ export {
|
|
|
441
454
|
unwrapStore2 as unwrapStore,
|
|
442
455
|
useAccordionContext2 as useAccordionContext,
|
|
443
456
|
useAccordionItemContext2 as useAccordionItemContext,
|
|
457
|
+
useBottomBarContext2 as useBottomBarContext,
|
|
444
458
|
useChartContext2 as useChartContext,
|
|
445
459
|
useCommandContext2 as useCommandContext,
|
|
446
460
|
useContext2 as useContext,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BottomBarAction } from "./action";
|
|
2
|
+
import { BottomBarBadge } from "./badge";
|
|
3
|
+
import { BottomBarItem } from "./item";
|
|
4
|
+
import { BottomBarRoot } from "./root";
|
|
5
|
+
import { BottomBarSeparator } from "./separator";
|
|
6
|
+
export { BottomBarAction } from "./action";
|
|
7
|
+
export { BottomBarBadge } from "./badge";
|
|
8
|
+
export { BottomBarContext, useBottomBarContext } from "./context";
|
|
9
|
+
export { BottomBarItem } from "./item";
|
|
10
|
+
export { BottomBarRoot } from "./root";
|
|
11
|
+
export { BottomBarSeparator } from "./separator";
|
|
12
|
+
export type { BottomBarActionProps, BottomBarBadgeProps, BottomBarContextValue, BottomBarItemConfig, BottomBarItemProps, BottomBarProps, BottomBarSeparatorProps } from "./types";
|
|
13
|
+
export declare const BottomBar: typeof BottomBarRoot & {
|
|
14
|
+
Root: typeof BottomBarRoot;
|
|
15
|
+
Item: typeof BottomBarItem;
|
|
16
|
+
Action: typeof BottomBarAction;
|
|
17
|
+
Badge: typeof BottomBarBadge;
|
|
18
|
+
Separator: typeof BottomBarSeparator;
|
|
19
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Child } from "../../dom/render";
|
|
2
|
+
import type { ReadonlySignal } from "../../signals";
|
|
3
|
+
export interface BottomBarContextValue {
|
|
4
|
+
value: ReadonlySignal<string>;
|
|
5
|
+
setValue: (value: string) => void;
|
|
6
|
+
baseId: string;
|
|
7
|
+
variant: "floating" | "docked";
|
|
8
|
+
}
|
|
9
|
+
export interface BottomBarItemConfig {
|
|
10
|
+
value: string;
|
|
11
|
+
label?: Child | (() => Child);
|
|
12
|
+
icon?: Child | (() => Child);
|
|
13
|
+
badge?: Child | number | string | (() => Child | number | string | undefined);
|
|
14
|
+
disabled?: boolean | (() => boolean);
|
|
15
|
+
onClick?: (e: MouseEvent) => void;
|
|
16
|
+
class?: any;
|
|
17
|
+
style?: any;
|
|
18
|
+
}
|
|
19
|
+
export interface BottomBarProps {
|
|
20
|
+
value?: () => string | undefined;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onValueChange?: (value: string) => void;
|
|
23
|
+
variant?: "floating" | "docked";
|
|
24
|
+
hideOnScroll?: boolean;
|
|
25
|
+
scrollThreshold?: number;
|
|
26
|
+
items?: BottomBarItemConfig[];
|
|
27
|
+
itemClass?: any;
|
|
28
|
+
itemStyle?: any;
|
|
29
|
+
as?: string;
|
|
30
|
+
class?: any;
|
|
31
|
+
style?: any;
|
|
32
|
+
children?: Child | (() => Child);
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
export interface BottomBarItemProps {
|
|
36
|
+
value: string;
|
|
37
|
+
icon?: Child | (() => Child);
|
|
38
|
+
label?: Child | (() => Child);
|
|
39
|
+
badge?: Child | number | string | (() => Child | number | string | undefined);
|
|
40
|
+
disabled?: boolean | (() => boolean);
|
|
41
|
+
onClick?: (e: MouseEvent) => void;
|
|
42
|
+
as?: string;
|
|
43
|
+
class?: any;
|
|
44
|
+
style?: any;
|
|
45
|
+
children?: Child | (() => Child);
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
export interface BottomBarActionProps {
|
|
49
|
+
icon?: Child | (() => Child);
|
|
50
|
+
label?: string;
|
|
51
|
+
disabled?: boolean | (() => boolean);
|
|
52
|
+
onClick?: (e: MouseEvent) => void;
|
|
53
|
+
as?: string;
|
|
54
|
+
class?: any;
|
|
55
|
+
style?: any;
|
|
56
|
+
children?: Child | (() => Child);
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}
|
|
59
|
+
export interface BottomBarBadgeProps {
|
|
60
|
+
count?: Child | number | string | (() => Child | number | string | undefined);
|
|
61
|
+
as?: string;
|
|
62
|
+
class?: any;
|
|
63
|
+
style?: any;
|
|
64
|
+
children?: Child | (() => Child);
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
}
|
|
67
|
+
export interface BottomBarSeparatorProps {
|
|
68
|
+
as?: string;
|
|
69
|
+
class?: any;
|
|
70
|
+
style?: any;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionProps, type AccordionSingleProps, AccordionTrigger, useAccordionContext, useAccordionItemContext } from "./accordion";
|
|
2
|
+
export { BottomBar, BottomBarAction, type BottomBarActionProps, BottomBarBadge, type BottomBarBadgeProps, type BottomBarContextValue, BottomBarItem, type BottomBarItemConfig, type BottomBarItemProps, type BottomBarProps, BottomBarRoot, BottomBarSeparator, type BottomBarSeparatorProps, useBottomBarContext } from "./bottom-bar";
|
|
2
3
|
export { Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupData, CommandInput, type CommandInputProps, CommandItem, type CommandItemData, type CommandItemProps, CommandList, type CommandProps, useCommandContext } from "./command";
|
|
3
4
|
export { type ColumnDef, DataTable, type DataTableProps, type SortDirection, type SortState } from "./data-table";
|
|
4
5
|
export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, DialogTrigger, useDialogContext } from "./dialog";
|
package/dist/ui/index.js
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
AccordionTrigger2,
|
|
6
6
|
AccordionContent2,
|
|
7
7
|
Accordion2,
|
|
8
|
+
BottomBarAction2,
|
|
9
|
+
BottomBarBadge2,
|
|
10
|
+
useBottomBarContext2,
|
|
11
|
+
BottomBarItem2,
|
|
12
|
+
BottomBarRoot2,
|
|
13
|
+
BottomBarSeparator2,
|
|
14
|
+
BottomBar2,
|
|
8
15
|
CommandDialog2,
|
|
9
16
|
useCommandContext2,
|
|
10
17
|
CommandInput2,
|
|
@@ -47,7 +54,7 @@ import {
|
|
|
47
54
|
ToastDescription2,
|
|
48
55
|
ToastClose2,
|
|
49
56
|
Toast2
|
|
50
|
-
} from "../index-
|
|
57
|
+
} from "../index-dvq5f3s8.js";
|
|
51
58
|
import {
|
|
52
59
|
createId2,
|
|
53
60
|
createControllableSignal2,
|
|
@@ -83,6 +90,12 @@ export {
|
|
|
83
90
|
AccordionContent2 as AccordionContent,
|
|
84
91
|
AccordionItem2 as AccordionItem,
|
|
85
92
|
AccordionTrigger2 as AccordionTrigger,
|
|
93
|
+
BottomBar2 as BottomBar,
|
|
94
|
+
BottomBarAction2 as BottomBarAction,
|
|
95
|
+
BottomBarBadge2 as BottomBarBadge,
|
|
96
|
+
BottomBarItem2 as BottomBarItem,
|
|
97
|
+
BottomBarRoot2 as BottomBarRoot,
|
|
98
|
+
BottomBarSeparator2 as BottomBarSeparator,
|
|
86
99
|
Center2 as Center,
|
|
87
100
|
Command2 as Command,
|
|
88
101
|
CommandDialog2 as CommandDialog,
|
|
@@ -142,6 +155,7 @@ export {
|
|
|
142
155
|
trapFocus2 as trapFocus,
|
|
143
156
|
useAccordionContext2 as useAccordionContext,
|
|
144
157
|
useAccordionItemContext2 as useAccordionItemContext,
|
|
158
|
+
useBottomBarContext2 as useBottomBarContext,
|
|
145
159
|
useCommandContext2 as useCommandContext,
|
|
146
160
|
useDialogContext2 as useDialogContext,
|
|
147
161
|
useDropdownMenuContext2 as useDropdownMenuContext,
|