@yuhuanowo/yunui 0.2.6 → 0.2.8
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/README.md +1 -1
- package/dist/{chunk-D2KGK2LY.js → chunk-EROX7LXU.js} +241 -4
- package/dist/chunk-EROX7LXU.js.map +1 -0
- package/dist/index.d.ts +68 -1
- package/dist/index.js +1 -1
- package/dist/patterns.js +1 -1
- package/package.json +1 -1
- package/styles/yunui.css +20 -0
- package/dist/chunk-D2KGK2LY.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -476,6 +476,23 @@ interface NumberInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
|
|
|
476
476
|
declare const NumberInput: React$1.ForwardRefExoticComponent<NumberInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
477
477
|
/** Inline keyboard-key / shortcut display, e.g. `<Kbd>⌘</Kbd><Kbd>K</Kbd>`. */
|
|
478
478
|
declare function Kbd({ className, ...props }: React$1.HTMLAttributes<HTMLElement>): React$1.JSX.Element;
|
|
479
|
+
interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "type"> {
|
|
480
|
+
/** Current query (controlled). */
|
|
481
|
+
value?: string;
|
|
482
|
+
/** Called with the new query string — also called with `""` when cleared. */
|
|
483
|
+
onChange?: (value: string) => void;
|
|
484
|
+
/** Show a clear (×) button while there's a value. @defaultValue true */
|
|
485
|
+
clearable?: boolean;
|
|
486
|
+
/** Accessible label for the clear button (English default). */
|
|
487
|
+
clearLabel?: string;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Canonical search field: a leading magnifier with the right padding so typed
|
|
491
|
+
* text never sits under the icon, plus an optional clear (×) button. `onChange`
|
|
492
|
+
* receives the string directly (ergonomic for filtering), and the clear button
|
|
493
|
+
* fires `onChange("")`. Use this instead of hand-rolling `<input> + absolute icon`.
|
|
494
|
+
*/
|
|
495
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
479
496
|
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
480
497
|
/** Add a hover lift (border + shadow transition). */
|
|
481
498
|
hover?: boolean;
|
|
@@ -488,6 +505,50 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
|
488
505
|
}
|
|
489
506
|
/** Small inline pill for status/labels, with semantic color variants. */
|
|
490
507
|
declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JSX.Element;
|
|
508
|
+
interface SeparatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
509
|
+
orientation?: "horizontal" | "vertical";
|
|
510
|
+
/** Purely decorative — no semantic role announced to assistive tech. */
|
|
511
|
+
decorative?: boolean;
|
|
512
|
+
}
|
|
513
|
+
/** A thin divider line. Horizontal by default; set `orientation="vertical"` inside a flex row. */
|
|
514
|
+
declare function Separator({ className, orientation, decorative, ...props }: SeparatorProps): React$1.JSX.Element;
|
|
515
|
+
interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
516
|
+
variant?: "info" | "success" | "warning" | "error";
|
|
517
|
+
/** Optional bold title above the body. */
|
|
518
|
+
title?: React$1.ReactNode;
|
|
519
|
+
/** Leading icon. Defaults to a variant-appropriate icon; pass `null` to hide. */
|
|
520
|
+
icon?: React$1.ReactNode;
|
|
521
|
+
}
|
|
522
|
+
/** Inline callout for info / success / warning / error messages. */
|
|
523
|
+
declare function Alert({ className, variant, title, icon, children, ...props }: AlertProps): React$1.JSX.Element;
|
|
524
|
+
interface TagProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
525
|
+
/** Show a remove (×) button and call this when it's pressed. */
|
|
526
|
+
onRemove?: () => void;
|
|
527
|
+
/** Accessible label for the remove button (English default). */
|
|
528
|
+
removeLabel?: string;
|
|
529
|
+
}
|
|
530
|
+
/** A small label, optionally removable. Use `Badge` for non-interactive status text. */
|
|
531
|
+
declare function Tag({ className, children, onRemove, removeLabel, ...props }: TagProps): React$1.JSX.Element;
|
|
532
|
+
interface StatusIndicatorProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
533
|
+
status?: "online" | "offline" | "busy" | "away" | "neutral";
|
|
534
|
+
/** Add a pulsing halo to signal "live". */
|
|
535
|
+
pulse?: boolean;
|
|
536
|
+
}
|
|
537
|
+
/** A small colored status dot with an optional label (e.g. provider online/offline). */
|
|
538
|
+
declare function StatusIndicator({ status, pulse, className, children, ...props }: StatusIndicatorProps): React$1.JSX.Element;
|
|
539
|
+
/** Inline `<code>` styling for code spans in prose or chat. Use `Kbd` for keys. */
|
|
540
|
+
declare function InlineCode({ className, ...props }: React$1.HTMLAttributes<HTMLElement>): React$1.JSX.Element;
|
|
541
|
+
interface Step {
|
|
542
|
+
title: React$1.ReactNode;
|
|
543
|
+
description?: React$1.ReactNode;
|
|
544
|
+
}
|
|
545
|
+
interface StepsProps extends Omit<React$1.HTMLAttributes<HTMLOListElement>, "children"> {
|
|
546
|
+
steps: Step[];
|
|
547
|
+
/** Zero-based index of the active step; earlier steps render as completed. */
|
|
548
|
+
current?: number;
|
|
549
|
+
}
|
|
550
|
+
/** Vertical progress stepper: completed / active / upcoming states with a connector. */
|
|
551
|
+
declare function Steps({ steps, current, className, ...props }: StepsProps): React$1.JSX.Element;
|
|
491
552
|
/**
|
|
492
553
|
* Radix Dialog root — controls open state for a modal dialog. Compose with Dialog* parts.
|
|
493
554
|
*
|
|
@@ -560,6 +621,12 @@ declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.Ava
|
|
|
560
621
|
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
561
622
|
/** Placeholder (e.g. initials) shown when the avatar image is missing or loading. */
|
|
562
623
|
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
624
|
+
interface AvatarGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
625
|
+
/** Cap how many avatars render; the remainder collapse into a "+N" chip. */
|
|
626
|
+
max?: number;
|
|
627
|
+
}
|
|
628
|
+
/** Overlapping row of `Avatar`s with an optional "+N" overflow chip. */
|
|
629
|
+
declare function AvatarGroup({ className, max, children, ...props }: AvatarGroupProps): React$1.JSX.Element;
|
|
563
630
|
/** Wraps tooltips to share open/close timing; place once near the app root. */
|
|
564
631
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
565
632
|
/** Radix Tooltip root — pairs a trigger with its content. */
|
|
@@ -984,4 +1051,4 @@ declare function readTheme(el?: HTMLElement | null): YunUITheme;
|
|
|
984
1051
|
*/
|
|
985
1052
|
declare function useYunUITheme(defaults?: YunUITheme): [YunUITheme, (patch: YunUITheme) => void];
|
|
986
1053
|
|
|
987
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AnimatedNumber, type AnimatedNumberProps, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Column, Combobox, type ComboboxOption, ConfirmModal, type ConfirmModalVariant, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, type FlexProps, Grid, type GridCount, type GridProps, IconButton, Input, Kbd, Label, Marquee, Modal, MotionDiv, MotionSpan, type NavTab, NavTabs, NumberInput, PageLoader, Pagination, type PaginationProps, PasswordInput, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, type SegmentedOption, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, type SelectOption, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, type SpacingScale, Spinner, Stack, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TableBody as Tbody, TableCell as Td, Textarea, TableFooter as Tfoot, TableHead as Th, TableHeader as Thead, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TableRow as Tr, YUNUI_PALETTES, type YunUIAccentSource, type YunUIColorScheme, type YunUIPalette, type YunUISolid, type YunUISurface, type YunUITheme, applyTheme, cn, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme };
|
|
1054
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AnimatedNumber, type AnimatedNumberProps, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Column, Combobox, type ComboboxOption, ConfirmModal, type ConfirmModalVariant, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, type FlexProps, Grid, type GridCount, type GridProps, IconButton, InlineCode, Input, Kbd, Label, Marquee, Modal, MotionDiv, MotionSpan, type NavTab, NavTabs, NumberInput, PageLoader, Pagination, type PaginationProps, PasswordInput, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, type SegmentedOption, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, type SelectOption, SelectTrigger, SelectValue, Separator, Sheet, ShinyButton, Skeleton, Slider, type SpacingScale, Spinner, Stack, StatusIndicator, Steps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TableBody as Tbody, TableCell as Td, Textarea, TableFooter as Tfoot, TableHead as Th, TableHeader as Thead, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TableRow as Tr, YUNUI_PALETTES, type YunUIAccentSource, type YunUIColorScheme, type YunUIPalette, type YunUISolid, type YunUISurface, type YunUITheme, applyTheme, cn, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AnimatedNumber, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, Input, Kbd, Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, NumberInput, PageLoader, Pagination, PasswordInput, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, Spinner, Stack, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TableBody as Tbody, TableCell as Td, Textarea, TableFooter as Tfoot, TableHead as Th, TableHeader as Thead, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TableRow as Tr, YUNUI_PALETTES, applyTheme, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme } from './chunk-
|
|
2
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AnimatedNumber, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, InlineCode, Input, Kbd, Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, NumberInput, PageLoader, Pagination, PasswordInput, Popover, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, ShinyButton, Skeleton, Slider, Spinner, Stack, StatusIndicator, Steps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TableBody as Tbody, TableCell as Td, Textarea, TableFooter as Tfoot, TableHead as Th, TableHeader as Thead, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TableRow as Tr, YUNUI_PALETTES, applyTheme, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme } from './chunk-EROX7LXU.js';
|
|
3
3
|
export { ThemeToggle, cn } from './chunk-TFZKMJGF.js';
|
|
4
4
|
import './chunk-U2LNRVMI.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/patterns.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-
|
|
2
|
+
import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-EROX7LXU.js';
|
|
3
3
|
import { copyToClipboard } from './chunk-BO6CDGJS.js';
|
|
4
4
|
export { Footer } from './chunk-BO6CDGJS.js';
|
|
5
5
|
import { cn } from './chunk-TFZKMJGF.js';
|
package/package.json
CHANGED
package/styles/yunui.css
CHANGED
|
@@ -528,6 +528,26 @@ body {
|
|
|
528
528
|
box-shadow: var(--shadow-md);
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
+
/* Lay a card out as a column so its footer can pin to the bottom. In a grid the
|
|
532
|
+
cards are already stretched to equal height (align-items: stretch, the default),
|
|
533
|
+
so every footer lines up no matter how much body content each card has — fixes
|
|
534
|
+
the "footer floats in a short card" problem once, here, instead of per call site.
|
|
535
|
+
NOTE: deliberately NO `height: 100%` — an explicit height overrides the grid's
|
|
536
|
+
stretch and, when the grid's own height is indefinite, collapses the card back
|
|
537
|
+
to content height (re-introducing the bug). Stretch alone is the robust path. */
|
|
538
|
+
.card-col {
|
|
539
|
+
display: flex;
|
|
540
|
+
flex-direction: column;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/* Footer pinned to the bottom of a `.card-col`, with the standard hairline rule.
|
|
544
|
+
Add your own flex/justify utilities for the footer's inner layout. */
|
|
545
|
+
.card-footer {
|
|
546
|
+
margin-top: auto;
|
|
547
|
+
padding-top: 1rem;
|
|
548
|
+
border-top: 1px solid var(--border-hairline);
|
|
549
|
+
}
|
|
550
|
+
|
|
531
551
|
.stat-card {
|
|
532
552
|
background: var(--bg-card);
|
|
533
553
|
backdrop-filter: blur(12px);
|