@tac-ui/web 0.1.0 → 1.0.1
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/LICENSE +21 -0
- package/dist/index.d.mts +134 -9
- package/dist/index.d.ts +134 -9
- package/dist/index.js +2260 -1227
- package/dist/index.mjs +2253 -1229
- package/dist/tailwind/preset.js +123 -14
- package/dist/tailwind/preset.mjs +123 -14
- package/package.json +18 -16
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jeonhui Lee
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { ThemeMode, UseTacThemeReturn } from '@tac-ui/shared';
|
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
|
+
export { tacSpring } from '@tac-ui/tokens';
|
|
8
9
|
|
|
9
10
|
interface TacProviderProps {
|
|
10
11
|
children: React__default.ReactNode;
|
|
@@ -35,8 +36,12 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
35
36
|
}
|
|
36
37
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
37
38
|
|
|
39
|
+
/** Size variant of the Input component. */
|
|
40
|
+
type InputSize = 'sm' | 'md' | 'lg';
|
|
38
41
|
/** Props for the Input component, a styled text input with optional label, icons, and error state. */
|
|
39
42
|
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
43
|
+
/** Controls the height and font size of the input element. */
|
|
44
|
+
inputSize?: InputSize;
|
|
40
45
|
/** Label text displayed above the input. */
|
|
41
46
|
label?: string;
|
|
42
47
|
/** Helper text displayed below the input when there is no error. */
|
|
@@ -54,8 +59,12 @@ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement
|
|
|
54
59
|
}
|
|
55
60
|
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
56
61
|
|
|
62
|
+
/** Size variant of the Textarea component. */
|
|
63
|
+
type TextareaSize = 'sm' | 'md' | 'lg';
|
|
57
64
|
/** Props for the Textarea component, a styled multi-line text input with optional label and error state. */
|
|
58
65
|
interface TextareaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
66
|
+
/** Controls the padding and font size of the textarea element. */
|
|
67
|
+
textareaSize?: TextareaSize;
|
|
59
68
|
/** Label text displayed above the textarea. */
|
|
60
69
|
label?: string;
|
|
61
70
|
/** Helper text displayed below the textarea when there is no error. */
|
|
@@ -218,6 +227,8 @@ interface RadioProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
|
|
|
218
227
|
label?: string;
|
|
219
228
|
/** The value this radio represents; compared against the RadioGroup's selected value. */
|
|
220
229
|
radioValue: string;
|
|
230
|
+
/** When true, wraps the radio in a tinted background container for emphasis. */
|
|
231
|
+
filled?: boolean;
|
|
221
232
|
}
|
|
222
233
|
declare const Radio: React__default.ForwardRefExoticComponent<RadioProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
223
234
|
|
|
@@ -234,8 +245,8 @@ interface SwitchProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButto
|
|
|
234
245
|
}
|
|
235
246
|
declare const Switch: React__default.ForwardRefExoticComponent<SwitchProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
247
|
|
|
237
|
-
/** Props for the
|
|
238
|
-
interface
|
|
248
|
+
/** Props for the Toggle component, a button that swaps icons with a rotation animation on toggle. */
|
|
249
|
+
interface ToggleProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
239
250
|
/** The controlled checked state. */
|
|
240
251
|
checked?: boolean;
|
|
241
252
|
/** Callback fired when the toggle is clicked, receives the new checked value. */
|
|
@@ -245,7 +256,11 @@ interface AnimatedToggleProps extends Omit<React__default.ButtonHTMLAttributes<H
|
|
|
245
256
|
/** Icon rendered when `checked` is false. */
|
|
246
257
|
iconOff?: React__default.ReactNode;
|
|
247
258
|
}
|
|
248
|
-
declare const
|
|
259
|
+
declare const Toggle: React__default.ForwardRefExoticComponent<ToggleProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
260
|
+
/** @deprecated Use Toggle instead. */
|
|
261
|
+
declare const AnimatedToggle: React__default.ForwardRefExoticComponent<ToggleProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
262
|
+
/** @deprecated Use ToggleProps instead. */
|
|
263
|
+
type AnimatedToggleProps = ToggleProps;
|
|
249
264
|
|
|
250
265
|
/** Visual style variant for the Tabs component. */
|
|
251
266
|
type TabVariant = 'underline' | 'pill' | 'outline' | 'icon';
|
|
@@ -519,13 +534,13 @@ interface AvatarProps extends React__default.HTMLAttributes<HTMLSpanElement>, Va
|
|
|
519
534
|
initials?: string;
|
|
520
535
|
/** Icon node shown when no image or initials are available. */
|
|
521
536
|
icon?: React__default.ReactNode;
|
|
522
|
-
/** When true, renders a
|
|
537
|
+
/** When true, renders a status dot in the bottom-right corner. */
|
|
523
538
|
showStatus?: boolean;
|
|
524
539
|
/** Custom content inside status badge (icon or image). */
|
|
525
540
|
statusContent?: React__default.ReactNode;
|
|
526
541
|
/** Custom background color for status badge. @default 'var(--success)' */
|
|
527
542
|
statusColor?: string;
|
|
528
|
-
/** When true, enables hover animation. @default
|
|
543
|
+
/** When true, enables hover animation. @default false */
|
|
529
544
|
animated?: boolean;
|
|
530
545
|
}
|
|
531
546
|
declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
@@ -541,8 +556,8 @@ interface ChipProps extends React__default.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
541
556
|
variant?: ChipVariant;
|
|
542
557
|
/** Icon rendered to the left of the chip label. */
|
|
543
558
|
leftIcon?: React__default.ReactNode;
|
|
544
|
-
/** Callback fired when the
|
|
545
|
-
|
|
559
|
+
/** Callback fired when the dismiss (×) button is clicked. Renders the dismiss button when provided. */
|
|
560
|
+
onDismiss?: () => void;
|
|
546
561
|
}
|
|
547
562
|
declare const Chip: React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
548
563
|
|
|
@@ -1095,7 +1110,6 @@ interface ToastProviderProps {
|
|
|
1095
1110
|
/** Maximum number of toasts visible at once. @default 5 */
|
|
1096
1111
|
maxToasts?: number;
|
|
1097
1112
|
}
|
|
1098
|
-
|
|
1099
1113
|
declare const toastVariants: (props?: ({
|
|
1100
1114
|
variant?: "default" | "error" | "success" | "warning" | "info" | null | undefined;
|
|
1101
1115
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1498,6 +1512,117 @@ declare function useSpotlight(): {
|
|
|
1498
1512
|
isHovered: boolean;
|
|
1499
1513
|
};
|
|
1500
1514
|
|
|
1515
|
+
/** Shared dropdown panel motion variants for Select, Combobox, Dropdown, DatePicker, ColorPicker. */
|
|
1516
|
+
declare const dropdownMotionVariants: {
|
|
1517
|
+
hidden: {
|
|
1518
|
+
opacity: number;
|
|
1519
|
+
scale: number;
|
|
1520
|
+
y: number;
|
|
1521
|
+
transition: {
|
|
1522
|
+
readonly type: "spring";
|
|
1523
|
+
readonly stiffness: 400;
|
|
1524
|
+
readonly damping: 40;
|
|
1525
|
+
readonly mass: 0.8;
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
visible: {
|
|
1529
|
+
opacity: number;
|
|
1530
|
+
scale: number;
|
|
1531
|
+
y: number;
|
|
1532
|
+
transition: {
|
|
1533
|
+
readonly type: "spring";
|
|
1534
|
+
readonly stiffness: 400;
|
|
1535
|
+
readonly damping: 40;
|
|
1536
|
+
readonly mass: 0.8;
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
/** Overlay panel entrance for Modal/Dialog/Popover. */
|
|
1541
|
+
declare const panelVariants: {
|
|
1542
|
+
hidden: {
|
|
1543
|
+
opacity: number;
|
|
1544
|
+
scale: number;
|
|
1545
|
+
filter: string;
|
|
1546
|
+
};
|
|
1547
|
+
visible: {
|
|
1548
|
+
opacity: number;
|
|
1549
|
+
scale: number;
|
|
1550
|
+
filter: string;
|
|
1551
|
+
transition: {
|
|
1552
|
+
readonly type: "spring";
|
|
1553
|
+
readonly stiffness: 250;
|
|
1554
|
+
readonly damping: 38;
|
|
1555
|
+
readonly mass: 1.5;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
exit: {
|
|
1559
|
+
opacity: number;
|
|
1560
|
+
scale: number;
|
|
1561
|
+
filter: string;
|
|
1562
|
+
transition: {
|
|
1563
|
+
duration: number;
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
/** Blur-fade entrance/exit for feedback & status components (Alert, EmptyState, Toast, Snackbar). */
|
|
1568
|
+
declare const fadeVariants: {
|
|
1569
|
+
hidden: {
|
|
1570
|
+
opacity: number;
|
|
1571
|
+
filter: string;
|
|
1572
|
+
y: number;
|
|
1573
|
+
};
|
|
1574
|
+
visible: {
|
|
1575
|
+
opacity: number;
|
|
1576
|
+
filter: string;
|
|
1577
|
+
y: number;
|
|
1578
|
+
transition: {
|
|
1579
|
+
readonly type: "spring";
|
|
1580
|
+
readonly stiffness: 220;
|
|
1581
|
+
readonly damping: 32;
|
|
1582
|
+
readonly mass: 1.2;
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
exit: {
|
|
1586
|
+
opacity: number;
|
|
1587
|
+
y: number;
|
|
1588
|
+
filter: string;
|
|
1589
|
+
transition: {
|
|
1590
|
+
duration: number;
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
/** Element removal exit — scale down + fade (Chip, Badge, Skeleton). */
|
|
1595
|
+
declare const exitVariants: {
|
|
1596
|
+
initial: {
|
|
1597
|
+
scale: number;
|
|
1598
|
+
opacity: number;
|
|
1599
|
+
};
|
|
1600
|
+
exit: {
|
|
1601
|
+
scale: number;
|
|
1602
|
+
opacity: number;
|
|
1603
|
+
transition: {
|
|
1604
|
+
duration: number;
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
};
|
|
1608
|
+
/** Entrance fade for page-level content. */
|
|
1609
|
+
declare const pageEntrance: {
|
|
1610
|
+
initial: {
|
|
1611
|
+
opacity: number;
|
|
1612
|
+
y: number;
|
|
1613
|
+
};
|
|
1614
|
+
animate: {
|
|
1615
|
+
opacity: number;
|
|
1616
|
+
y: number;
|
|
1617
|
+
transition: {
|
|
1618
|
+
readonly type: "spring";
|
|
1619
|
+
readonly stiffness: 220;
|
|
1620
|
+
readonly damping: 32;
|
|
1621
|
+
readonly mass: 1.2;
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
};
|
|
1625
|
+
|
|
1501
1626
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1502
1627
|
|
|
1503
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, Alert, AlertDescription, type AlertProps, AlertTitle, type AlertVariant, AnimatedToggle, type AnimatedToggleProps, AppPage, type AppPageProps, type AppPageWidth, AsymmetricPage, type AsymmetricPageProps, type AsymmetricRatio, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BarChart, type BarChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbProps, BreadcrumbSeparator, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariant, type ChartDataPoint, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipVariant, CodeBlock, type CodeBlockProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerProps, DashboardPage, type DashboardPageProps, DatePicker, type DatePickerMode, type DatePickerProps, Dialog, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Divider, type DividerProps, type DividerVariant, DonutChart, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, Dropdown, type DropdownAlign, DropdownDivider, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownSearch, type DropdownSearchProps, DropdownTitle, DualSidebarPage, type DualSidebarPageProps, EmptyState, type EmptyStateProps, FloatingMenuBar, type FloatingMenuBarPosition, type FloatingMenuBarProps, FloatingMenuItem, type FloatingMenuItemProps, Footer, type FooterProps, type GridColumns, GridPage, type GridPageProps, HStack, Header, type HeaderProps, HolyGrailPage, type HolyGrailPageProps, Indicator, type IndicatorProps, type IndicatorVariant, Input, type InputProps, LineChart, type LineChartProps, Main, type MainProps, type MaxWidth, Modal, ModalDescription, ModalFooter, ModalHeader, ModalIcon, type ModalProps, type ModalSize, ModalTitle, MorphingCard, type MorphingCardProps, PageLayout, type PageLayoutProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, type PaginationItemProps, PaginationNext, type PaginationPrevNextProps, PaginationPrevious, type PaginationProps, PieChart, type PieChartDataPoint, type PieChartProps, type PieChartVariant, Popover, type PopoverAlign, PopoverBody, PopoverFooter, PopoverHeader, type PopoverProps, type PopoverSide, Progress, type ProgressBarSize, type ProgressProps, type ProgressVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentController, type SegmentControllerMode, type SegmentControllerProps, type SegmentControllerSize, type SegmentOption, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemProps, type SidebarItemVariant, SidebarPage, type SidebarPageProps, type SidebarPosition, type SidebarProps, SingleColumnPage, type SingleColumnPageProps, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, SlidingSelect, type SlidingSelectOption, type SlidingSelectProps, type SlidingSelectSize, Snackbar, type SnackbarProps, type SnackbarVariant, type Spacing, SplitPage, type SplitPageProps, type StackAlign, type StackJustify, type StackProps, StackedPage, type StackedPageProps, Step, type StepProps, Stepper, type StepperAlignLabels, type StepperOrientation, type StepperProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabTrigger, type TabTriggerProps, type TabVariant, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsList, type TabsProps, TacProvider, type TacProviderProps, Textarea, type TextareaProps, ToastContainer, ToastItem, type ToastItemProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, VStack, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chipVariants, cn, containerVariants, dividerVariants, footerVariants, headerVariants, mainVariants, sidebarVariants, snackbarVariants, toastVariants, useFocusRestore, useFocusTrap, useRovingIndex, useSidebarContext, useSpotlight, useTacTheme, useToast };
|
|
1628
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, Alert, AlertDescription, type AlertProps, AlertTitle, type AlertVariant, AnimatedToggle, type AnimatedToggleProps, AppPage, type AppPageProps, type AppPageWidth, AsymmetricPage, type AsymmetricPageProps, type AsymmetricRatio, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BarChart, type BarChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbProps, BreadcrumbSeparator, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariant, type ChartDataPoint, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipVariant, CodeBlock, type CodeBlockProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerProps, DashboardPage, type DashboardPageProps, DatePicker, type DatePickerMode, type DatePickerProps, Dialog, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Divider, type DividerProps, type DividerVariant, DonutChart, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, Dropdown, type DropdownAlign, DropdownDivider, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownSearch, type DropdownSearchProps, DropdownTitle, DualSidebarPage, type DualSidebarPageProps, EmptyState, type EmptyStateProps, FloatingMenuBar, type FloatingMenuBarPosition, type FloatingMenuBarProps, FloatingMenuItem, type FloatingMenuItemProps, Footer, type FooterProps, type GridColumns, GridPage, type GridPageProps, HStack, Header, type HeaderProps, HolyGrailPage, type HolyGrailPageProps, Indicator, type IndicatorProps, type IndicatorVariant, Input, type InputProps, LineChart, type LineChartProps, Main, type MainProps, type MaxWidth, Modal, ModalDescription, ModalFooter, ModalHeader, ModalIcon, type ModalProps, type ModalSize, ModalTitle, MorphingCard, type MorphingCardProps, PageLayout, type PageLayoutProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, type PaginationItemProps, PaginationNext, type PaginationPrevNextProps, PaginationPrevious, type PaginationProps, PieChart, type PieChartDataPoint, type PieChartProps, type PieChartVariant, Popover, type PopoverAlign, PopoverBody, PopoverFooter, PopoverHeader, type PopoverProps, type PopoverSide, Progress, type ProgressBarSize, type ProgressProps, type ProgressVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentController, type SegmentControllerMode, type SegmentControllerProps, type SegmentControllerSize, type SegmentOption, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemProps, type SidebarItemVariant, SidebarPage, type SidebarPageProps, type SidebarPosition, type SidebarProps, SingleColumnPage, type SingleColumnPageProps, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, SlidingSelect, type SlidingSelectOption, type SlidingSelectProps, type SlidingSelectSize, Snackbar, type SnackbarProps, type SnackbarVariant, type Spacing, SplitPage, type SplitPageProps, type StackAlign, type StackJustify, type StackProps, StackedPage, type StackedPageProps, Step, type StepProps, Stepper, type StepperAlignLabels, type StepperOrientation, type StepperProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabTrigger, type TabTriggerProps, type TabVariant, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsList, type TabsProps, TacProvider, type TacProviderProps, Textarea, type TextareaProps, ToastContainer, ToastItem, type ToastItemProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, VStack, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chipVariants, cn, containerVariants, dividerVariants, dropdownMotionVariants, exitVariants, fadeVariants, footerVariants, headerVariants, mainVariants, pageEntrance, panelVariants, sidebarVariants, snackbarVariants, toastVariants, useFocusRestore, useFocusTrap, useRovingIndex, useSidebarContext, useSpotlight, useTacTheme, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ThemeMode, UseTacThemeReturn } from '@tac-ui/shared';
|
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
|
+
export { tacSpring } from '@tac-ui/tokens';
|
|
8
9
|
|
|
9
10
|
interface TacProviderProps {
|
|
10
11
|
children: React__default.ReactNode;
|
|
@@ -35,8 +36,12 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
35
36
|
}
|
|
36
37
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
37
38
|
|
|
39
|
+
/** Size variant of the Input component. */
|
|
40
|
+
type InputSize = 'sm' | 'md' | 'lg';
|
|
38
41
|
/** Props for the Input component, a styled text input with optional label, icons, and error state. */
|
|
39
42
|
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
43
|
+
/** Controls the height and font size of the input element. */
|
|
44
|
+
inputSize?: InputSize;
|
|
40
45
|
/** Label text displayed above the input. */
|
|
41
46
|
label?: string;
|
|
42
47
|
/** Helper text displayed below the input when there is no error. */
|
|
@@ -54,8 +59,12 @@ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement
|
|
|
54
59
|
}
|
|
55
60
|
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
56
61
|
|
|
62
|
+
/** Size variant of the Textarea component. */
|
|
63
|
+
type TextareaSize = 'sm' | 'md' | 'lg';
|
|
57
64
|
/** Props for the Textarea component, a styled multi-line text input with optional label and error state. */
|
|
58
65
|
interface TextareaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
66
|
+
/** Controls the padding and font size of the textarea element. */
|
|
67
|
+
textareaSize?: TextareaSize;
|
|
59
68
|
/** Label text displayed above the textarea. */
|
|
60
69
|
label?: string;
|
|
61
70
|
/** Helper text displayed below the textarea when there is no error. */
|
|
@@ -218,6 +227,8 @@ interface RadioProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
|
|
|
218
227
|
label?: string;
|
|
219
228
|
/** The value this radio represents; compared against the RadioGroup's selected value. */
|
|
220
229
|
radioValue: string;
|
|
230
|
+
/** When true, wraps the radio in a tinted background container for emphasis. */
|
|
231
|
+
filled?: boolean;
|
|
221
232
|
}
|
|
222
233
|
declare const Radio: React__default.ForwardRefExoticComponent<RadioProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
223
234
|
|
|
@@ -234,8 +245,8 @@ interface SwitchProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButto
|
|
|
234
245
|
}
|
|
235
246
|
declare const Switch: React__default.ForwardRefExoticComponent<SwitchProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
247
|
|
|
237
|
-
/** Props for the
|
|
238
|
-
interface
|
|
248
|
+
/** Props for the Toggle component, a button that swaps icons with a rotation animation on toggle. */
|
|
249
|
+
interface ToggleProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
239
250
|
/** The controlled checked state. */
|
|
240
251
|
checked?: boolean;
|
|
241
252
|
/** Callback fired when the toggle is clicked, receives the new checked value. */
|
|
@@ -245,7 +256,11 @@ interface AnimatedToggleProps extends Omit<React__default.ButtonHTMLAttributes<H
|
|
|
245
256
|
/** Icon rendered when `checked` is false. */
|
|
246
257
|
iconOff?: React__default.ReactNode;
|
|
247
258
|
}
|
|
248
|
-
declare const
|
|
259
|
+
declare const Toggle: React__default.ForwardRefExoticComponent<ToggleProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
260
|
+
/** @deprecated Use Toggle instead. */
|
|
261
|
+
declare const AnimatedToggle: React__default.ForwardRefExoticComponent<ToggleProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
262
|
+
/** @deprecated Use ToggleProps instead. */
|
|
263
|
+
type AnimatedToggleProps = ToggleProps;
|
|
249
264
|
|
|
250
265
|
/** Visual style variant for the Tabs component. */
|
|
251
266
|
type TabVariant = 'underline' | 'pill' | 'outline' | 'icon';
|
|
@@ -519,13 +534,13 @@ interface AvatarProps extends React__default.HTMLAttributes<HTMLSpanElement>, Va
|
|
|
519
534
|
initials?: string;
|
|
520
535
|
/** Icon node shown when no image or initials are available. */
|
|
521
536
|
icon?: React__default.ReactNode;
|
|
522
|
-
/** When true, renders a
|
|
537
|
+
/** When true, renders a status dot in the bottom-right corner. */
|
|
523
538
|
showStatus?: boolean;
|
|
524
539
|
/** Custom content inside status badge (icon or image). */
|
|
525
540
|
statusContent?: React__default.ReactNode;
|
|
526
541
|
/** Custom background color for status badge. @default 'var(--success)' */
|
|
527
542
|
statusColor?: string;
|
|
528
|
-
/** When true, enables hover animation. @default
|
|
543
|
+
/** When true, enables hover animation. @default false */
|
|
529
544
|
animated?: boolean;
|
|
530
545
|
}
|
|
531
546
|
declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
@@ -541,8 +556,8 @@ interface ChipProps extends React__default.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
541
556
|
variant?: ChipVariant;
|
|
542
557
|
/** Icon rendered to the left of the chip label. */
|
|
543
558
|
leftIcon?: React__default.ReactNode;
|
|
544
|
-
/** Callback fired when the
|
|
545
|
-
|
|
559
|
+
/** Callback fired when the dismiss (×) button is clicked. Renders the dismiss button when provided. */
|
|
560
|
+
onDismiss?: () => void;
|
|
546
561
|
}
|
|
547
562
|
declare const Chip: React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
548
563
|
|
|
@@ -1095,7 +1110,6 @@ interface ToastProviderProps {
|
|
|
1095
1110
|
/** Maximum number of toasts visible at once. @default 5 */
|
|
1096
1111
|
maxToasts?: number;
|
|
1097
1112
|
}
|
|
1098
|
-
|
|
1099
1113
|
declare const toastVariants: (props?: ({
|
|
1100
1114
|
variant?: "default" | "error" | "success" | "warning" | "info" | null | undefined;
|
|
1101
1115
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1498,6 +1512,117 @@ declare function useSpotlight(): {
|
|
|
1498
1512
|
isHovered: boolean;
|
|
1499
1513
|
};
|
|
1500
1514
|
|
|
1515
|
+
/** Shared dropdown panel motion variants for Select, Combobox, Dropdown, DatePicker, ColorPicker. */
|
|
1516
|
+
declare const dropdownMotionVariants: {
|
|
1517
|
+
hidden: {
|
|
1518
|
+
opacity: number;
|
|
1519
|
+
scale: number;
|
|
1520
|
+
y: number;
|
|
1521
|
+
transition: {
|
|
1522
|
+
readonly type: "spring";
|
|
1523
|
+
readonly stiffness: 400;
|
|
1524
|
+
readonly damping: 40;
|
|
1525
|
+
readonly mass: 0.8;
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
visible: {
|
|
1529
|
+
opacity: number;
|
|
1530
|
+
scale: number;
|
|
1531
|
+
y: number;
|
|
1532
|
+
transition: {
|
|
1533
|
+
readonly type: "spring";
|
|
1534
|
+
readonly stiffness: 400;
|
|
1535
|
+
readonly damping: 40;
|
|
1536
|
+
readonly mass: 0.8;
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
/** Overlay panel entrance for Modal/Dialog/Popover. */
|
|
1541
|
+
declare const panelVariants: {
|
|
1542
|
+
hidden: {
|
|
1543
|
+
opacity: number;
|
|
1544
|
+
scale: number;
|
|
1545
|
+
filter: string;
|
|
1546
|
+
};
|
|
1547
|
+
visible: {
|
|
1548
|
+
opacity: number;
|
|
1549
|
+
scale: number;
|
|
1550
|
+
filter: string;
|
|
1551
|
+
transition: {
|
|
1552
|
+
readonly type: "spring";
|
|
1553
|
+
readonly stiffness: 250;
|
|
1554
|
+
readonly damping: 38;
|
|
1555
|
+
readonly mass: 1.5;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
exit: {
|
|
1559
|
+
opacity: number;
|
|
1560
|
+
scale: number;
|
|
1561
|
+
filter: string;
|
|
1562
|
+
transition: {
|
|
1563
|
+
duration: number;
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
/** Blur-fade entrance/exit for feedback & status components (Alert, EmptyState, Toast, Snackbar). */
|
|
1568
|
+
declare const fadeVariants: {
|
|
1569
|
+
hidden: {
|
|
1570
|
+
opacity: number;
|
|
1571
|
+
filter: string;
|
|
1572
|
+
y: number;
|
|
1573
|
+
};
|
|
1574
|
+
visible: {
|
|
1575
|
+
opacity: number;
|
|
1576
|
+
filter: string;
|
|
1577
|
+
y: number;
|
|
1578
|
+
transition: {
|
|
1579
|
+
readonly type: "spring";
|
|
1580
|
+
readonly stiffness: 220;
|
|
1581
|
+
readonly damping: 32;
|
|
1582
|
+
readonly mass: 1.2;
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
exit: {
|
|
1586
|
+
opacity: number;
|
|
1587
|
+
y: number;
|
|
1588
|
+
filter: string;
|
|
1589
|
+
transition: {
|
|
1590
|
+
duration: number;
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
/** Element removal exit — scale down + fade (Chip, Badge, Skeleton). */
|
|
1595
|
+
declare const exitVariants: {
|
|
1596
|
+
initial: {
|
|
1597
|
+
scale: number;
|
|
1598
|
+
opacity: number;
|
|
1599
|
+
};
|
|
1600
|
+
exit: {
|
|
1601
|
+
scale: number;
|
|
1602
|
+
opacity: number;
|
|
1603
|
+
transition: {
|
|
1604
|
+
duration: number;
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
};
|
|
1608
|
+
/** Entrance fade for page-level content. */
|
|
1609
|
+
declare const pageEntrance: {
|
|
1610
|
+
initial: {
|
|
1611
|
+
opacity: number;
|
|
1612
|
+
y: number;
|
|
1613
|
+
};
|
|
1614
|
+
animate: {
|
|
1615
|
+
opacity: number;
|
|
1616
|
+
y: number;
|
|
1617
|
+
transition: {
|
|
1618
|
+
readonly type: "spring";
|
|
1619
|
+
readonly stiffness: 220;
|
|
1620
|
+
readonly damping: 32;
|
|
1621
|
+
readonly mass: 1.2;
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
};
|
|
1625
|
+
|
|
1501
1626
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1502
1627
|
|
|
1503
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, Alert, AlertDescription, type AlertProps, AlertTitle, type AlertVariant, AnimatedToggle, type AnimatedToggleProps, AppPage, type AppPageProps, type AppPageWidth, AsymmetricPage, type AsymmetricPageProps, type AsymmetricRatio, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BarChart, type BarChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbProps, BreadcrumbSeparator, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariant, type ChartDataPoint, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipVariant, CodeBlock, type CodeBlockProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerProps, DashboardPage, type DashboardPageProps, DatePicker, type DatePickerMode, type DatePickerProps, Dialog, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Divider, type DividerProps, type DividerVariant, DonutChart, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, Dropdown, type DropdownAlign, DropdownDivider, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownSearch, type DropdownSearchProps, DropdownTitle, DualSidebarPage, type DualSidebarPageProps, EmptyState, type EmptyStateProps, FloatingMenuBar, type FloatingMenuBarPosition, type FloatingMenuBarProps, FloatingMenuItem, type FloatingMenuItemProps, Footer, type FooterProps, type GridColumns, GridPage, type GridPageProps, HStack, Header, type HeaderProps, HolyGrailPage, type HolyGrailPageProps, Indicator, type IndicatorProps, type IndicatorVariant, Input, type InputProps, LineChart, type LineChartProps, Main, type MainProps, type MaxWidth, Modal, ModalDescription, ModalFooter, ModalHeader, ModalIcon, type ModalProps, type ModalSize, ModalTitle, MorphingCard, type MorphingCardProps, PageLayout, type PageLayoutProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, type PaginationItemProps, PaginationNext, type PaginationPrevNextProps, PaginationPrevious, type PaginationProps, PieChart, type PieChartDataPoint, type PieChartProps, type PieChartVariant, Popover, type PopoverAlign, PopoverBody, PopoverFooter, PopoverHeader, type PopoverProps, type PopoverSide, Progress, type ProgressBarSize, type ProgressProps, type ProgressVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentController, type SegmentControllerMode, type SegmentControllerProps, type SegmentControllerSize, type SegmentOption, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemProps, type SidebarItemVariant, SidebarPage, type SidebarPageProps, type SidebarPosition, type SidebarProps, SingleColumnPage, type SingleColumnPageProps, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, SlidingSelect, type SlidingSelectOption, type SlidingSelectProps, type SlidingSelectSize, Snackbar, type SnackbarProps, type SnackbarVariant, type Spacing, SplitPage, type SplitPageProps, type StackAlign, type StackJustify, type StackProps, StackedPage, type StackedPageProps, Step, type StepProps, Stepper, type StepperAlignLabels, type StepperOrientation, type StepperProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabTrigger, type TabTriggerProps, type TabVariant, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsList, type TabsProps, TacProvider, type TacProviderProps, Textarea, type TextareaProps, ToastContainer, ToastItem, type ToastItemProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, VStack, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chipVariants, cn, containerVariants, dividerVariants, footerVariants, headerVariants, mainVariants, sidebarVariants, snackbarVariants, toastVariants, useFocusRestore, useFocusTrap, useRovingIndex, useSidebarContext, useSpotlight, useTacTheme, useToast };
|
|
1628
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, Alert, AlertDescription, type AlertProps, AlertTitle, type AlertVariant, AnimatedToggle, type AnimatedToggleProps, AppPage, type AppPageProps, type AppPageWidth, AsymmetricPage, type AsymmetricPageProps, type AsymmetricRatio, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BarChart, type BarChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbProps, BreadcrumbSeparator, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariant, type ChartDataPoint, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipVariant, CodeBlock, type CodeBlockProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerProps, DashboardPage, type DashboardPageProps, DatePicker, type DatePickerMode, type DatePickerProps, Dialog, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Divider, type DividerProps, type DividerVariant, DonutChart, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, Dropdown, type DropdownAlign, DropdownDivider, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownSearch, type DropdownSearchProps, DropdownTitle, DualSidebarPage, type DualSidebarPageProps, EmptyState, type EmptyStateProps, FloatingMenuBar, type FloatingMenuBarPosition, type FloatingMenuBarProps, FloatingMenuItem, type FloatingMenuItemProps, Footer, type FooterProps, type GridColumns, GridPage, type GridPageProps, HStack, Header, type HeaderProps, HolyGrailPage, type HolyGrailPageProps, Indicator, type IndicatorProps, type IndicatorVariant, Input, type InputProps, LineChart, type LineChartProps, Main, type MainProps, type MaxWidth, Modal, ModalDescription, ModalFooter, ModalHeader, ModalIcon, type ModalProps, type ModalSize, ModalTitle, MorphingCard, type MorphingCardProps, PageLayout, type PageLayoutProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, type PaginationItemProps, PaginationNext, type PaginationPrevNextProps, PaginationPrevious, type PaginationProps, PieChart, type PieChartDataPoint, type PieChartProps, type PieChartVariant, Popover, type PopoverAlign, PopoverBody, PopoverFooter, PopoverHeader, type PopoverProps, type PopoverSide, Progress, type ProgressBarSize, type ProgressProps, type ProgressVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentController, type SegmentControllerMode, type SegmentControllerProps, type SegmentControllerSize, type SegmentOption, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemProps, type SidebarItemVariant, SidebarPage, type SidebarPageProps, type SidebarPosition, type SidebarProps, SingleColumnPage, type SingleColumnPageProps, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, SlidingSelect, type SlidingSelectOption, type SlidingSelectProps, type SlidingSelectSize, Snackbar, type SnackbarProps, type SnackbarVariant, type Spacing, SplitPage, type SplitPageProps, type StackAlign, type StackJustify, type StackProps, StackedPage, type StackedPageProps, Step, type StepProps, Stepper, type StepperAlignLabels, type StepperOrientation, type StepperProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabTrigger, type TabTriggerProps, type TabVariant, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsList, type TabsProps, TacProvider, type TacProviderProps, Textarea, type TextareaProps, ToastContainer, ToastItem, type ToastItemProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, VStack, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chipVariants, cn, containerVariants, dividerVariants, dropdownMotionVariants, exitVariants, fadeVariants, footerVariants, headerVariants, mainVariants, pageEntrance, panelVariants, sidebarVariants, snackbarVariants, toastVariants, useFocusRestore, useFocusTrap, useRovingIndex, useSidebarContext, useSpotlight, useTacTheme, useToast };
|