lecom-ui 5.3.93 → 5.3.94

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 CHANGED
@@ -1 +1 @@
1
- lecom-ui
1
+ lecom-ui
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { cva } from 'class-variance-authority';
3
4
  import { ChevronUpIcon, ChevronDownIcon, Check } from 'lucide-react';
5
+ import { initializeI18n } from '../../i18n/index.js';
4
6
  import { cn } from '../../lib/utils.js';
5
7
  import { Button } from '../Button/Button.js';
6
8
  import { CommandGroup, CommandItem, Command, CommandInput, CommandList, CommandEmpty } from '../Command/Command.js';
7
9
  import { Popover, PopoverTrigger, PopoverContent } from '../Popover/Popover.js';
8
10
  import { Typography } from '../Typography/Typography.js';
9
11
 
10
- const DEFAULT_PLACEHOLDER = "Selecione...";
11
- const DEFAULT_NOT_FOUND_CONTENT = "Nenhuma op\xE7\xE3o encontrada.";
12
- const DEFAULT_SEARCH_TERM = "Pesquisar...";
12
+ initializeI18n();
13
13
  const ICON_SIZE = 20;
14
14
  const CHECK_ICON_SIZES = {
15
15
  small: 12,
@@ -181,7 +181,7 @@ const comboboxTriggerVariants = cva(
181
181
  large: "h-12"
182
182
  },
183
183
  rounded: {
184
- default: "rounded-md",
184
+ default: "rounded-sm",
185
185
  full: "rounded-full"
186
186
  },
187
187
  status: {
@@ -264,11 +264,11 @@ function Combobox({
264
264
  options,
265
265
  value,
266
266
  onChange,
267
- placeholder = DEFAULT_PLACEHOLDER,
267
+ placeholder,
268
268
  disabled = false,
269
- notFoundContent = DEFAULT_NOT_FOUND_CONTENT,
269
+ notFoundContent,
270
270
  status = "default",
271
- searchTerm = DEFAULT_SEARCH_TERM,
271
+ searchTerm,
272
272
  triggerClassName,
273
273
  contentClassName,
274
274
  itemsClassName,
@@ -276,6 +276,7 @@ function Combobox({
276
276
  showSearch = true,
277
277
  size = "medium"
278
278
  }) {
279
+ const { t } = useTranslation();
279
280
  const [open, setOpen] = React.useState(false);
280
281
  const [search, setSearch] = React.useState("");
281
282
  const commandListRef = React.useRef(null);
@@ -287,7 +288,7 @@ function Combobox({
287
288
  () => getSelectedOption(options, value),
288
289
  [options, value]
289
290
  );
290
- const selectedLabel = selectedOption?.label || placeholder;
291
+ const selectedLabel = selectedOption?.label || placeholder || t("multiSelect.placeholder");
291
292
  const selectedPrefix = selectedOption?.prefix;
292
293
  const handleClose = React.useCallback(() => {
293
294
  setOpen(false);
@@ -334,7 +335,7 @@ function Combobox({
334
335
  /* @__PURE__ */ React.createElement(Command, { shouldFilter: false, className: SEARCH_INPUT_CLASSES[size] }, showSearch && /* @__PURE__ */ React.createElement(
335
336
  CommandInput,
336
337
  {
337
- placeholder: searchTerm,
338
+ placeholder: searchTerm || t("multiSelect.search"),
338
339
  value: search,
339
340
  onValueChange: setSearch
340
341
  }
@@ -353,7 +354,7 @@ function Combobox({
353
354
  contentClassName
354
355
  )
355
356
  },
356
- /* @__PURE__ */ React.createElement(CommandList, { className: "overflow-visible" }, /* @__PURE__ */ React.createElement(CommandEmpty, null, notFoundContent), /* @__PURE__ */ React.createElement(
357
+ /* @__PURE__ */ React.createElement(CommandList, { className: "overflow-visible" }, /* @__PURE__ */ React.createElement(CommandEmpty, null, notFoundContent || t("multiSelect.empty")), /* @__PURE__ */ React.createElement(
357
358
  ComboboxOptionsList,
358
359
  {
359
360
  items: filteredOptions,
@@ -1,16 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '../Button/Button.js';
3
- import { Input } from '../Input/Input.js';
4
3
  import { Popover, PopoverTrigger, PopoverContent } from '../Popover/Popover.js';
5
4
  import { cn } from '../../lib/utils.js';
6
- import { format, parse } from 'date-fns';
5
+ import { format } from 'date-fns';
7
6
  import { CalendarIcon } from 'lucide-react';
8
7
  import { Calendar } from '../Calendar/Calendar.js';
9
8
 
10
9
  function DatePicker({
11
10
  className,
12
11
  locale,
13
- placeholder,
12
+ placeholder = "Pick a date",
14
13
  value,
15
14
  onChange,
16
15
  variant = "outlined",
@@ -20,123 +19,19 @@ function DatePicker({
20
19
  calendarVariant,
21
20
  calendarColor,
22
21
  format: format$1 = "PPP",
23
- status,
24
- closeOnSelect = true,
25
- allowManualInput = false
22
+ status
26
23
  }) {
27
24
  const [internalDate, setInternalDate] = React.useState();
28
- const [isOpen, setIsOpen] = React.useState(false);
29
- const [inputValue, setInputValue] = React.useState("");
30
- const isControlled = onChange !== void 0;
25
+ const isControlled = value !== void 0 && onChange !== void 0;
31
26
  const date = isControlled ? value : internalDate;
32
- React.useEffect(() => {
33
- if (date) {
34
- setInputValue(format(date, "dd/MM/yyyy", { locale }));
35
- } else {
36
- setInputValue("");
37
- }
38
- }, [date, locale]);
39
27
  const handleSelect = (selected) => {
40
28
  if (isControlled && onChange) {
41
29
  onChange(selected);
42
30
  } else {
43
31
  setInternalDate(selected);
44
32
  }
45
- if (closeOnSelect && selected) {
46
- setIsOpen(false);
47
- }
48
- };
49
- const applyDateMask = (value2) => {
50
- const numbers = value2.replace(/\D/g, "");
51
- if (numbers.length <= 2) {
52
- return numbers;
53
- } else if (numbers.length <= 4) {
54
- return `${numbers.slice(0, 2)}/${numbers.slice(2)}`;
55
- } else {
56
- return `${numbers.slice(0, 2)}/${numbers.slice(2, 4)}/${numbers.slice(
57
- 4,
58
- 8
59
- )}`;
60
- }
61
- };
62
- const handleInputChange = (e) => {
63
- const rawValue = e.target.value;
64
- const maskedValue = applyDateMask(rawValue);
65
- setInputValue(maskedValue);
66
- if (maskedValue.length === 10) {
67
- try {
68
- const parsedDate = parse(maskedValue, "dd/MM/yyyy", /* @__PURE__ */ new Date(), {
69
- locale
70
- });
71
- if (!isNaN(parsedDate.getTime())) {
72
- if (isControlled && onChange) {
73
- onChange(parsedDate);
74
- } else {
75
- setInternalDate(parsedDate);
76
- }
77
- }
78
- } catch {
79
- }
80
- }
81
- };
82
- const handleInputBlur = () => {
83
- if (date) {
84
- setInputValue(format(date, "dd/MM/yyyy", { locale }));
85
- } else {
86
- setInputValue("");
87
- }
88
33
  };
89
- const resolvedCalendarVariant = calendarVariant === "datepicker" ? variant : calendarVariant ?? variant;
90
- if (allowManualInput) {
91
- const inputVariant = variant === "outlined" ? "default" : variant === "filled" ? "filled" : "default";
92
- return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, /* @__PURE__ */ React.createElement(
93
- "div",
94
- {
95
- style: {
96
- borderRadius: 4,
97
- borderColor: "bg-grey-500",
98
- borderWidth: 1
99
- },
100
- className: "relative w-auto"
101
- },
102
- /* @__PURE__ */ React.createElement(
103
- Input,
104
- {
105
- value: inputValue,
106
- onChange: handleInputChange,
107
- onBlur: handleInputBlur,
108
- onFocus: () => setIsOpen(false),
109
- placeholder,
110
- variant: inputVariant,
111
- className: cn(
112
- "w-auto pl-10 border-none focus:border-none focus:ring-0",
113
- status === "error" && "border-red-600 focus:border-red-600 focus:ring-red-600",
114
- className
115
- )
116
- }
117
- ),
118
- /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
119
- "button",
120
- {
121
- type: "button",
122
- className: "absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 flex items-center justify-center hover:bg-grey-100 rounded transition-colors z-10"
123
- },
124
- /* @__PURE__ */ React.createElement(CalendarIcon, { className: "h-4 w-4 text-grey-600" })
125
- ))
126
- ), /* @__PURE__ */ React.createElement(PopoverContent, { className: "w-auto p-0", align: "start" }, /* @__PURE__ */ React.createElement(
127
- Calendar,
128
- {
129
- mode: "single",
130
- selected: date,
131
- onSelect: handleSelect,
132
- autoFocus: true,
133
- locale,
134
- variant: resolvedCalendarVariant,
135
- color: calendarColor ?? color ?? void 0
136
- }
137
- )));
138
- }
139
- return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
34
+ return /* @__PURE__ */ React.createElement(Popover, null, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
140
35
  Button,
141
36
  {
142
37
  variant: buttonVariant || variant,
@@ -158,7 +53,7 @@ function DatePicker({
158
53
  onSelect: handleSelect,
159
54
  autoFocus: true,
160
55
  locale,
161
- variant: resolvedCalendarVariant,
56
+ variant: calendarVariant || variant,
162
57
  color: calendarColor ?? color ?? void 0
163
58
  }
164
59
  )));
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../Command/Command.js';
3
+ import { Command, CommandInput, CommandList, CommandGroup, CommandEmpty, CommandItem } from '../Command/Command.js';
4
4
  import { Popover, PopoverTrigger, PopoverContent } from '../Popover/Popover.js';
5
5
  import { Separator } from '../Separator/Separator.js';
6
6
  import { Tag } from '../Tag/Tag.js';
@@ -561,7 +561,7 @@ const MultiSelect = React.forwardRef(
561
561
  value: query,
562
562
  onValueChange: (v) => setQuery(v)
563
563
  }
564
- ), /* @__PURE__ */ React.createElement(CommandList, null, (!filteredOptions || filteredOptions.length === 0) && /* @__PURE__ */ React.createElement(CommandEmpty, { className: cn("p-4 text-center text-grey-800", getFontVariant(size)) }, t("multiSelect.empty")), /* @__PURE__ */ React.createElement(CommandGroup, null, !query && /* @__PURE__ */ React.createElement(
564
+ ), /* @__PURE__ */ React.createElement(CommandList, null, /* @__PURE__ */ React.createElement(CommandGroup, null, (effectiveOptions.length === 0 || query && filteredOptions.length === 0) && /* @__PURE__ */ React.createElement(CommandEmpty, { className: cn("p-4 text-center text-grey-800", getFontVariant(size)) }, t("multiSelect.empty")), !query && effectiveOptions.length > 0 && /* @__PURE__ */ React.createElement(
565
565
  CommandItem,
566
566
  {
567
567
  key: "all",
@@ -691,7 +691,7 @@ const MultiSelect = React.forwardRef(
691
691
  SEARCH_INPUT_HEIGHT_CLASSES[size]
692
692
  )
693
693
  }
694
- ))), /* @__PURE__ */ React.createElement("div", { className: "px-2 pb-1 overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-grey-300 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb:hover]:bg-grey-400" }, !treeQuery && /* @__PURE__ */ React.createElement(
694
+ ))), /* @__PURE__ */ React.createElement("div", { className: "px-2 pb-1 overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-grey-300 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb:hover]:bg-grey-400" }, !treeQuery && treeOptions && treeOptions.length > 0 && /* @__PURE__ */ React.createElement(
695
695
  "div",
696
696
  {
697
697
  className: "flex items-center gap-2 px-2 py-1 cursor-pointer rounded-sm hover:bg-accent",
@@ -725,7 +725,7 @@ const MultiSelect = React.forwardRef(
725
725
  },
726
726
  selectAllLabel ?? t("multiSelect.selectAll")
727
727
  )
728
- ), treeOptions && renderTree(displayedTree)))
728
+ ), !treeOptions || treeOptions.length === 0 || treeQuery && displayedTree.length === 0 ? /* @__PURE__ */ React.createElement("div", { className: cn("p-4 text-center text-grey-800", getFontVariant(size)) }, t("multiSelect.empty")) : renderTree(displayedTree)))
729
729
  )
730
730
  );
731
731
  }
@@ -19,7 +19,8 @@ const language = {
19
19
  multiSelect: {
20
20
  search: "Type to search",
21
21
  empty: "No results found",
22
- selectAll: "Select all"
22
+ selectAll: "Select all",
23
+ placeholder: "Select"
23
24
  }
24
25
  }
25
26
  };
@@ -19,7 +19,8 @@ const language = {
19
19
  multiSelect: {
20
20
  search: "Tipo a buscar",
21
21
  empty: "No se han encontrado resultados",
22
- selectAll: "Seleccionar todo"
22
+ selectAll: "Seleccionar todo",
23
+ placeholder: "Seleccionar"
23
24
  }
24
25
  }
25
26
  };
@@ -19,7 +19,8 @@ const language = {
19
19
  multiSelect: {
20
20
  search: "Digite para pesquisar",
21
21
  empty: "Nenhum resultado encontrado",
22
- selectAll: "Selecionar tudo"
22
+ selectAll: "Selecionar tudo",
23
+ placeholder: "Selecione"
23
24
  }
24
25
  }
25
26
  };
package/dist/index.d.ts CHANGED
@@ -757,8 +757,8 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
757
757
 
758
758
  declare const inputVariants: (props?: ({
759
759
  variant?: "default" | "filled" | "borderless" | null | undefined;
760
- size?: "small" | "default" | "large" | null | undefined;
761
- radius?: "small" | "default" | "large" | "full" | null | undefined;
760
+ size?: "default" | "small" | "large" | null | undefined;
761
+ radius?: "default" | "small" | "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;
@@ -962,7 +962,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
962
962
  declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
963
963
 
964
964
  declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
965
- declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLDivElement | HTMLButtonElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLInputElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
965
+ declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLSpanElement | HTMLLabelElement | HTMLParagraphElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLHeadingElement | HTMLUListElement | HTMLInputElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
966
966
  className?: string;
967
967
  collapsedSize?: number | undefined;
968
968
  collapsible?: boolean | undefined;
@@ -1129,8 +1129,8 @@ declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
1129
1129
 
1130
1130
  declare const textareaVariants: (props?: ({
1131
1131
  variant?: "default" | "filled" | "borderless" | null | undefined;
1132
- size?: "small" | "default" | "large" | null | undefined;
1133
- radius?: "small" | "default" | "large" | "full" | null | undefined;
1132
+ size?: "default" | "small" | "large" | null | undefined;
1133
+ radius?: "default" | "small" | "large" | "full" | null | undefined;
1134
1134
  resize?: "default" | "both" | "horizontal" | "vertical" | "vertical-limited" | null | undefined;
1135
1135
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1136
1136
  interface TextareaProps extends React$1.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {
@@ -1256,10 +1256,8 @@ interface DatePickerProps {
1256
1256
  onChange?: (date: Date | undefined) => void;
1257
1257
  format?: string;
1258
1258
  status?: string;
1259
- closeOnSelect?: boolean;
1260
- allowManualInput?: boolean;
1261
1259
  }
1262
- declare function DatePicker({ className, locale, placeholder, value, onChange, variant, color, buttonVariant, buttonColor, calendarVariant, calendarColor, format, status, closeOnSelect, allowManualInput, }: DatePickerProps): React$1.JSX.Element;
1260
+ declare function DatePicker({ className, locale, placeholder, value, onChange, variant, color, buttonVariant, buttonColor, calendarVariant, calendarColor, format, status, }: DatePickerProps): React$1.JSX.Element;
1263
1261
  declare namespace DatePicker {
1264
1262
  var displayName: string;
1265
1263
  }
@@ -1,79 +1,79 @@
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
- 'spin-slow': 'spin 2s linear infinite',
76
- },
77
- };
78
-
79
- 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
+ 'spin-slow': 'spin 2s linear infinite',
76
+ },
77
+ };
78
+
79
+ export { extend };