lecom-ui 5.3.78 → 5.3.80
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/components/Combobox/Combobox.js +5 -5
- package/dist/components/MultiSelect/MultiSelect.js +176 -45
- package/dist/components/NumberControl/NumberControl.js +18 -13
- package/dist/components/TagInput/TagInput.js +75 -77
- package/dist/index.d.ts +10 -7
- package/dist/plugin/extend.js +78 -78
- package/dist/plugin/fontFaces.js +172 -172
- package/dist/plugin/general.js +12 -12
- package/dist/plugin/pluginDev.cjs +5 -5
- package/dist/plugin/pluginNext.cjs +5 -5
- package/dist/plugin/pluginNextTurbo.cjs +5 -5
- package/dist/plugin/pluginVite.cjs +5 -5
- package/dist/plugin/template.js +31 -31
- package/dist/plugin/typographies.js +152 -152
- package/dist/plugin/varsTheme.js +79 -79
- package/dist/style.min.css +1 -1
- package/package.json +1 -1
- package/dist/components/Collapse/Collapse.js +0 -94
|
@@ -13,10 +13,10 @@ function TagItem({ item, onRemove, readOnly }) {
|
|
|
13
13
|
},
|
|
14
14
|
[item.value, onRemove]
|
|
15
15
|
);
|
|
16
|
-
return /* @__PURE__ */ React.createElement(Tag, { "data-tag": "true", color: "blue" }, /* @__PURE__ */ React.createElement(Typography, { variant: "body-small-400", className: "text-blue-600" }, item.label), !readOnly && /* @__PURE__ */ React.createElement(
|
|
16
|
+
return /* @__PURE__ */ React.createElement(Tag, { "data-tag": "true", color: "blue", className: "max-w-[15.625rem] h-6 !px-2 !py-0.5" }, /* @__PURE__ */ React.createElement(Typography, { variant: "body-small-400", className: "text-blue-600 truncate p-0" }, item.label), !readOnly && /* @__PURE__ */ React.createElement(
|
|
17
17
|
X,
|
|
18
18
|
{
|
|
19
|
-
className: "w-4 h-4 cursor-pointer",
|
|
19
|
+
className: "w-4 h-4 cursor-pointer flex-shrink-0",
|
|
20
20
|
onClick: handleRemove,
|
|
21
21
|
"aria-label": `Remover ${item.label}`,
|
|
22
22
|
tabIndex: 0
|
|
@@ -26,95 +26,93 @@ function TagItem({ item, onRemove, readOnly }) {
|
|
|
26
26
|
function HiddenCountTag({ count }) {
|
|
27
27
|
return /* @__PURE__ */ React.createElement(Tag, { color: "blue", "data-tag": "true" }, /* @__PURE__ */ React.createElement(Typography, { variant: "body-small-400", className: "text-blue-600" }, "+", count));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
if (totalTags <= 4) return totalTags;
|
|
33
|
-
return Math.min(5, totalTags);
|
|
34
|
-
}, []);
|
|
35
|
-
const [maxVisibleCount, setMaxVisibleCount] = React.useState(
|
|
36
|
-
() => getInitialEstimate(value.length)
|
|
29
|
+
function useDynamicMaxCount(ref, value, maxDisplayCount) {
|
|
30
|
+
const [dynamicMaxCount, setDynamicMaxCount] = React.useState(
|
|
31
|
+
value.length || 1
|
|
37
32
|
);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
if (maxDisplayCount !== void 0) {
|
|
35
|
+
setDynamicMaxCount(maxDisplayCount);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (value.length === 0) return;
|
|
39
|
+
const calculateMaxCount = () => {
|
|
40
|
+
if (!ref.current) {
|
|
41
|
+
setTimeout(() => calculateMaxCount(), 10);
|
|
42
|
+
return;
|
|
47
43
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
(
|
|
51
|
-
|
|
52
|
-
if (offsetTops.length <= 1) {
|
|
53
|
-
return totalTags > 6 ? { visibleCount: 5, hiddenCount: totalTags - 5 } : { visibleCount: totalTags, hiddenCount: 0 };
|
|
44
|
+
const containerWidth = ref.current.offsetWidth;
|
|
45
|
+
if (containerWidth === 0) {
|
|
46
|
+
setTimeout(() => calculateMaxCount(), 10);
|
|
47
|
+
return;
|
|
54
48
|
}
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
const COUNTER_TAG_WIDTH = 60;
|
|
50
|
+
const TAG_GAP = 4;
|
|
51
|
+
const CONTAINER_PADDING = 12;
|
|
52
|
+
const AVG_CHAR_WIDTH = 8;
|
|
53
|
+
const TAG_PADDING = 24;
|
|
54
|
+
const MAX_LINES = 2;
|
|
55
|
+
const availableWidth = containerWidth - CONTAINER_PADDING * 2;
|
|
56
|
+
if (availableWidth <= 0) {
|
|
57
|
+
setDynamicMaxCount(1);
|
|
58
|
+
return;
|
|
62
59
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
60
|
+
const estimatedWidths = [];
|
|
61
|
+
for (let i = 0; i < value.length; i++) {
|
|
62
|
+
const label = value[i].label;
|
|
63
|
+
const textLength = label.length;
|
|
64
|
+
const calculatedWidth = textLength * AVG_CHAR_WIDTH + TAG_PADDING;
|
|
65
|
+
const estimatedWidth = Math.min(calculatedWidth, 250);
|
|
66
|
+
estimatedWidths.push(estimatedWidth);
|
|
67
|
+
}
|
|
68
|
+
let totalWidth = 0;
|
|
69
|
+
for (let i = 0; i < estimatedWidths.length; i++) {
|
|
70
|
+
totalWidth += estimatedWidths[i] + (i > 0 ? TAG_GAP : 0);
|
|
71
|
+
}
|
|
72
|
+
if (totalWidth <= availableWidth) {
|
|
73
|
+
setDynamicMaxCount(value.length);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const totalAvailableWidth = availableWidth * MAX_LINES;
|
|
77
|
+
if (totalWidth <= totalAvailableWidth) {
|
|
78
|
+
setDynamicMaxCount(value.length);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const availableWithCounter = totalAvailableWidth - COUNTER_TAG_WIDTH - TAG_GAP;
|
|
82
|
+
let count = 0;
|
|
83
|
+
totalWidth = 0;
|
|
84
|
+
for (let i = 0; i < estimatedWidths.length; i++) {
|
|
85
|
+
const tagWidth = estimatedWidths[i] + (i > 0 ? TAG_GAP : 0);
|
|
86
|
+
if (totalWidth + tagWidth <= availableWithCounter) {
|
|
87
|
+
totalWidth += tagWidth;
|
|
88
|
+
count++;
|
|
89
|
+
} else {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
setDynamicMaxCount(Math.max(1, count));
|
|
87
94
|
};
|
|
88
|
-
const
|
|
89
|
-
|
|
95
|
+
const rafId = requestAnimationFrame(() => {
|
|
96
|
+
calculateMaxCount();
|
|
97
|
+
});
|
|
98
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
99
|
+
calculateMaxCount();
|
|
90
100
|
});
|
|
91
|
-
const resizeObserver = new ResizeObserver(calculateMaxVisible);
|
|
92
101
|
if (ref.current) {
|
|
93
|
-
observer.observe(ref.current);
|
|
94
102
|
resizeObserver.observe(ref.current);
|
|
95
|
-
if (ref.current.offsetParent !== null) {
|
|
96
|
-
calculateWhenVisible();
|
|
97
|
-
}
|
|
98
103
|
}
|
|
99
104
|
return () => {
|
|
100
|
-
|
|
105
|
+
cancelAnimationFrame(rafId);
|
|
101
106
|
resizeObserver.disconnect();
|
|
102
107
|
};
|
|
103
|
-
}, [
|
|
104
|
-
|
|
105
|
-
const timeout = setTimeout(calculateMaxVisible, 150);
|
|
106
|
-
return () => clearTimeout(timeout);
|
|
107
|
-
}, [value.length, calculateMaxVisible]);
|
|
108
|
-
React.useLayoutEffect(() => {
|
|
109
|
-
calculateMaxVisible();
|
|
110
|
-
}, [value.length, calculateMaxVisible]);
|
|
111
|
-
return { maxVisibleCount, hiddenCount };
|
|
108
|
+
}, [maxDisplayCount, value, ref]);
|
|
109
|
+
return dynamicMaxCount;
|
|
112
110
|
}
|
|
113
111
|
function TagInput(props) {
|
|
114
112
|
const {
|
|
115
113
|
value,
|
|
116
114
|
onRemove,
|
|
117
|
-
maxDisplayCount
|
|
115
|
+
maxDisplayCount,
|
|
118
116
|
placeholder = "Nenhum item selecionado",
|
|
119
117
|
disabled = false,
|
|
120
118
|
readOnly = false,
|
|
@@ -124,14 +122,14 @@ function TagInput(props) {
|
|
|
124
122
|
...restProps
|
|
125
123
|
} = props;
|
|
126
124
|
const ref = React.useRef(null);
|
|
127
|
-
|
|
128
|
-
const visibleCount = Math.min(
|
|
125
|
+
const dynamicMaxCount = useDynamicMaxCount(ref, value, maxDisplayCount);
|
|
126
|
+
const visibleCount = Math.min(dynamicMaxCount, value.length);
|
|
129
127
|
const displayTags = value.slice(0, visibleCount);
|
|
130
128
|
const actualHiddenCount = Math.max(value.length - visibleCount, 0);
|
|
131
129
|
const textareaRadius = radius === "full" ? "large" : radius;
|
|
132
130
|
const containerClassNames = cn(
|
|
133
131
|
textareaVariants({ variant, radius: textareaRadius }),
|
|
134
|
-
"flex flex-wrap items-start min-h-10 gap-1 py-
|
|
132
|
+
"flex flex-wrap items-start min-h-10 gap-x-1 gap-y-0.5 py-1 px-3",
|
|
135
133
|
disabled && "opacity-50 pointer-events-none",
|
|
136
134
|
className
|
|
137
135
|
);
|
package/dist/index.d.ts
CHANGED
|
@@ -756,9 +756,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
declare const inputVariants: (props?: ({
|
|
759
|
-
variant?: "
|
|
760
|
-
size?: "small" | "
|
|
761
|
-
radius?: "small" | "
|
|
759
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
760
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
761
|
+
radius?: "small" | "default" | "large" | "full" | null | undefined;
|
|
762
762
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
763
763
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
764
764
|
sufix?: React$1.ReactNode;
|
|
@@ -799,6 +799,8 @@ declare const Layout: {
|
|
|
799
799
|
displayName: string;
|
|
800
800
|
};
|
|
801
801
|
|
|
802
|
+
type MultiSelectSize = 'small' | 'medium' | 'large';
|
|
803
|
+
type MultiSelectFont = 'body-small-400' | 'body-medium-400' | 'body-large-400';
|
|
802
804
|
interface MultiSelectProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
803
805
|
options?: {
|
|
804
806
|
label: string;
|
|
@@ -834,6 +836,7 @@ interface MultiSelectProps extends React$1.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
834
836
|
}[];
|
|
835
837
|
};
|
|
836
838
|
classNameContent?: string;
|
|
839
|
+
size?: MultiSelectSize;
|
|
837
840
|
}
|
|
838
841
|
interface MultiSelectTreeOption {
|
|
839
842
|
label: string;
|
|
@@ -1126,9 +1129,9 @@ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
|
|
|
1126
1129
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1127
1130
|
|
|
1128
1131
|
declare const textareaVariants: (props?: ({
|
|
1129
|
-
variant?: "
|
|
1130
|
-
size?: "small" | "
|
|
1131
|
-
radius?: "small" | "
|
|
1132
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
1133
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
1134
|
+
radius?: "small" | "default" | "large" | "full" | null | undefined;
|
|
1132
1135
|
resize?: "default" | "both" | "horizontal" | "vertical" | "vertical-limited" | null | undefined;
|
|
1133
1136
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1134
1137
|
interface TextareaProps extends React$1.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {
|
|
@@ -1289,4 +1292,4 @@ interface DateInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
1289
1292
|
declare const DateInput: React$1.ForwardRefExoticComponent<DateInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1290
1293
|
|
|
1291
1294
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CadastroFacil, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ColorPicker, Combobox, CustomDivider, MemoizedDataTable as DataTable, DateInput, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogScroll, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorEmptyDisplay, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Layout, LogoLecom, LogoLecomBrand, ModoTeste, MultiSelect, Notification, NumberControl, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationIndex, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Rpa, SairModoTeste, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Spin, Steps, Switch, SyntaxHighlighter, TOAST_REMOVE_DELAY, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, Textarea, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, Upload, accordionVariants, buttonVariants, colors, fonts, initializeI18n, inputVariants, notificationVariants, reducer, tagVariants, textareaVariants, toast, typographyVariants, useFormField, useIsMobile, useNotificationToast, usePagination, useSidebar };
|
|
1292
|
-
export type { BgColor, BuildCellSelect, BuildColumns, BuildHeaderSelect, ButtonProps, CadastroFacilProps, CalloutNotificationProps, ChartConfig, CheckboxProps, CheckedCell, CheckedCellChange, CheckedHeader, CheckedHeaderChange, Color, ColorToken, Column, ColumnRender, ColumnSort, ColumnSortClient, ColumnTitle, ComboboxFont, ComboboxGroup, ComboboxOption, ComboboxProps, ComboboxRounded, ComboboxSize, ComboboxStatus, CustomStyles$1 as CustomStyles, DataTableProps, DateInputProps, DatePickerProps, DialogContentProps, ErrorEmptyDisplayProps, File, FillColor, Fonts, Header, HeaderProps, InlineNotificationProps, InputProps, LayoutProps, LogoLecomBrandProps, LogoLecomProps, Meta, ModoTesteProps, MultiSelectTreeOption, NotificationProps, PaginationProps, Row, RpaProps, SideBarProps, SpinProps, StepsProps, SwitchProps, TableProps, TagInputProps, TagItem, TagProps, TextColor, TextareaProps, TimelineStepItem, ToastNotificationProps, ToasterToast, TooltipContentProps, TypographyProps, UploadProps, UsePaginationItem };
|
|
1295
|
+
export type { BgColor, BuildCellSelect, BuildColumns, BuildHeaderSelect, ButtonProps, CadastroFacilProps, CalloutNotificationProps, ChartConfig, CheckboxProps, CheckedCell, CheckedCellChange, CheckedHeader, CheckedHeaderChange, Color, ColorToken, Column, ColumnRender, ColumnSort, ColumnSortClient, ColumnTitle, ComboboxFont, ComboboxGroup, ComboboxOption, ComboboxProps, ComboboxRounded, ComboboxSize, ComboboxStatus, CustomStyles$1 as CustomStyles, DataTableProps, DateInputProps, DatePickerProps, DialogContentProps, ErrorEmptyDisplayProps, File, FillColor, Fonts, Header, HeaderProps, InlineNotificationProps, InputProps, LayoutProps, LogoLecomBrandProps, LogoLecomProps, Meta, ModoTesteProps, MultiSelectFont, MultiSelectSize, MultiSelectTreeOption, NotificationProps, PaginationProps, Row, RpaProps, SideBarProps, SpinProps, StepsProps, SwitchProps, TableProps, TagInputProps, TagItem, TagProps, TextColor, TextareaProps, TimelineStepItem, ToastNotificationProps, ToasterToast, TooltipContentProps, TypographyProps, UploadProps, UsePaginationItem };
|
package/dist/plugin/extend.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
const extend = {
|
|
2
|
-
colors: {
|
|
3
|
-
background: 'hsl(var(--background))',
|
|
4
|
-
foreground: 'hsl(var(--foreground))',
|
|
5
|
-
card: {
|
|
6
|
-
DEFAULT: 'hsl(var(--card))',
|
|
7
|
-
foreground: 'hsl(var(--card-foreground))',
|
|
8
|
-
},
|
|
9
|
-
popover: {
|
|
10
|
-
DEFAULT: 'hsl(var(--popover))',
|
|
11
|
-
foreground: 'hsl(var(--popover-foreground))',
|
|
12
|
-
},
|
|
13
|
-
primary: {
|
|
14
|
-
DEFAULT: 'hsl(var(--primary))',
|
|
15
|
-
foreground: 'hsl(var(--primary-foreground))',
|
|
16
|
-
},
|
|
17
|
-
secondary: {
|
|
18
|
-
DEFAULT: 'hsl(var(--secondary))',
|
|
19
|
-
foreground: 'hsl(var(--secondary-foreground))',
|
|
20
|
-
},
|
|
21
|
-
muted: {
|
|
22
|
-
DEFAULT: 'hsl(var(--muted))',
|
|
23
|
-
foreground: 'hsl(var(--muted-foreground))',
|
|
24
|
-
},
|
|
25
|
-
accent: {
|
|
26
|
-
DEFAULT: 'hsl(var(--accent))',
|
|
27
|
-
foreground: 'hsl(var(--accent-foreground))',
|
|
28
|
-
},
|
|
29
|
-
destructive: {
|
|
30
|
-
DEFAULT: 'hsl(var(--destructive))',
|
|
31
|
-
foreground: 'hsl(var(--destructive-foreground))',
|
|
32
|
-
},
|
|
33
|
-
border: 'hsl(var(--border))',
|
|
34
|
-
input: 'hsl(var(--input))',
|
|
35
|
-
ring: 'hsl(var(--ring))',
|
|
36
|
-
chart: {
|
|
37
|
-
1: 'hsl(var(--chart-1))',
|
|
38
|
-
2: 'hsl(var(--chart-2))',
|
|
39
|
-
3: 'hsl(var(--chart-3))',
|
|
40
|
-
4: 'hsl(var(--chart-4))',
|
|
41
|
-
5: 'hsl(var(--chart-5))',
|
|
42
|
-
6: 'hsl(var(--chart-6))',
|
|
43
|
-
7: 'hsl(var(--chart-7))',
|
|
44
|
-
8: 'hsl(var(--chart-8))',
|
|
45
|
-
},
|
|
46
|
-
sidebar: {
|
|
47
|
-
DEFAULT: 'hsl(var(--sidebar-background))',
|
|
48
|
-
foreground: 'hsl(var(--sidebar-foreground))',
|
|
49
|
-
primary: 'hsl(var(--sidebar-primary))',
|
|
50
|
-
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
|
51
|
-
accent: 'hsl(var(--sidebar-accent))',
|
|
52
|
-
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
|
53
|
-
border: 'hsl(var(--sidebar-border))',
|
|
54
|
-
ring: 'hsl(var(--sidebar-ring))',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
borderRadius: {
|
|
58
|
-
lg: 'var(--radius)',
|
|
59
|
-
md: 'calc(var(--radius) - 2px)',
|
|
60
|
-
sm: 'calc(var(--radius) - 4px)',
|
|
61
|
-
},
|
|
62
|
-
keyframes: {
|
|
63
|
-
'accordion-down': {
|
|
64
|
-
from: { height: '0' },
|
|
65
|
-
to: { height: 'var(--radix-accordion-content-height)' },
|
|
66
|
-
},
|
|
67
|
-
'accordion-up': {
|
|
68
|
-
from: { height: 'var(--radix-accordion-content-height)' },
|
|
69
|
-
to: { height: '0' },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
animation: {
|
|
73
|
-
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
74
|
-
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export { extend };
|
|
1
|
+
const extend = {
|
|
2
|
+
colors: {
|
|
3
|
+
background: 'hsl(var(--background))',
|
|
4
|
+
foreground: 'hsl(var(--foreground))',
|
|
5
|
+
card: {
|
|
6
|
+
DEFAULT: 'hsl(var(--card))',
|
|
7
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
8
|
+
},
|
|
9
|
+
popover: {
|
|
10
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
11
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
12
|
+
},
|
|
13
|
+
primary: {
|
|
14
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
15
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
16
|
+
},
|
|
17
|
+
secondary: {
|
|
18
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
19
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
20
|
+
},
|
|
21
|
+
muted: {
|
|
22
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
23
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
24
|
+
},
|
|
25
|
+
accent: {
|
|
26
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
27
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
28
|
+
},
|
|
29
|
+
destructive: {
|
|
30
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
31
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
32
|
+
},
|
|
33
|
+
border: 'hsl(var(--border))',
|
|
34
|
+
input: 'hsl(var(--input))',
|
|
35
|
+
ring: 'hsl(var(--ring))',
|
|
36
|
+
chart: {
|
|
37
|
+
1: 'hsl(var(--chart-1))',
|
|
38
|
+
2: 'hsl(var(--chart-2))',
|
|
39
|
+
3: 'hsl(var(--chart-3))',
|
|
40
|
+
4: 'hsl(var(--chart-4))',
|
|
41
|
+
5: 'hsl(var(--chart-5))',
|
|
42
|
+
6: 'hsl(var(--chart-6))',
|
|
43
|
+
7: 'hsl(var(--chart-7))',
|
|
44
|
+
8: 'hsl(var(--chart-8))',
|
|
45
|
+
},
|
|
46
|
+
sidebar: {
|
|
47
|
+
DEFAULT: 'hsl(var(--sidebar-background))',
|
|
48
|
+
foreground: 'hsl(var(--sidebar-foreground))',
|
|
49
|
+
primary: 'hsl(var(--sidebar-primary))',
|
|
50
|
+
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
|
51
|
+
accent: 'hsl(var(--sidebar-accent))',
|
|
52
|
+
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
|
53
|
+
border: 'hsl(var(--sidebar-border))',
|
|
54
|
+
ring: 'hsl(var(--sidebar-ring))',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
borderRadius: {
|
|
58
|
+
lg: 'var(--radius)',
|
|
59
|
+
md: 'calc(var(--radius) - 2px)',
|
|
60
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
61
|
+
},
|
|
62
|
+
keyframes: {
|
|
63
|
+
'accordion-down': {
|
|
64
|
+
from: { height: '0' },
|
|
65
|
+
to: { height: 'var(--radix-accordion-content-height)' },
|
|
66
|
+
},
|
|
67
|
+
'accordion-up': {
|
|
68
|
+
from: { height: 'var(--radix-accordion-content-height)' },
|
|
69
|
+
to: { height: '0' },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
animation: {
|
|
73
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
74
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export { extend };
|