@mbao01/common 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/Alert/constants.d.ts +1 -1
- package/dist/types/components/AlertDialog/AlertDialog.d.ts +7 -5
- package/dist/types/components/Anchor/{constant.d.ts → constants.d.ts} +1 -1
- package/dist/types/components/Anchor/types.d.ts +1 -1
- package/dist/types/components/AspectRatio/AspectRatio.d.ts +6 -0
- package/dist/types/components/AspectRatio/constants.d.ts +3 -0
- package/dist/types/components/AspectRatio/index.d.ts +2 -0
- package/dist/types/components/AspectRatio/types.d.ts +5 -0
- package/dist/types/components/Avatar/constants.d.ts +6 -6
- package/dist/types/components/Badge/constants.d.ts +1 -1
- package/dist/types/components/Banner/Banner.d.ts +11 -0
- package/dist/types/components/Banner/constants.d.ts +4 -0
- package/dist/types/components/Banner/index.d.ts +2 -0
- package/dist/types/components/Banner/types.d.ts +9 -0
- package/dist/types/components/Blockquote/Blockquote.d.ts +6 -0
- package/dist/types/components/Blockquote/constants.d.ts +3 -0
- package/dist/types/components/Blockquote/index.d.ts +2 -0
- package/dist/types/components/Blockquote/types.d.ts +5 -0
- package/dist/types/components/Box/Box.d.ts +6 -0
- package/dist/types/components/Box/constants.d.ts +5 -0
- package/dist/types/components/Box/index.d.ts +2 -0
- package/dist/types/components/Box/types.d.ts +3 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/components/Breadcrumb/types.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/Button/constants.d.ts +2 -1
- package/dist/types/components/Carousel/Carousel.d.ts +6 -4
- package/dist/types/components/Center/Center.d.ts +5 -0
- package/dist/types/components/Center/constants.d.ts +4 -0
- package/dist/types/components/Center/index.d.ts +2 -0
- package/dist/types/components/Center/types.d.ts +3 -0
- package/dist/types/components/Chart/constants.d.ts +2 -2
- package/dist/types/components/Code/Code.d.ts +8 -0
- package/dist/types/components/Code/constants.d.ts +4 -0
- package/dist/types/components/Code/helper.d.ts +2 -0
- package/dist/types/components/Code/index.d.ts +2 -0
- package/dist/types/components/Code/types.d.ts +6 -0
- package/dist/types/components/Combobox/Combobox.d.ts +1 -1
- package/dist/types/components/Combobox/types.d.ts +1 -0
- package/dist/types/components/Container/Container.d.ts +6 -0
- package/dist/types/components/Container/constants.d.ts +5 -0
- package/dist/types/components/Container/index.d.ts +2 -0
- package/dist/types/components/Container/types.d.ts +3 -0
- package/dist/types/components/DatetimePicker/DatetimeGrid.d.ts +2 -2
- package/dist/types/components/DatetimePicker/DatetimePicker.d.ts +2 -2
- package/dist/types/components/DatetimePicker/constants.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/Dialog/constants.d.ts +1 -1
- package/dist/types/components/Dock/constants.d.ts +2 -2
- package/dist/types/components/Empty/Empty.d.ts +8 -0
- package/dist/types/components/Empty/constants.d.ts +6 -0
- package/dist/types/components/Empty/index.d.ts +2 -0
- package/dist/types/components/Empty/types.d.ts +3 -0
- package/dist/types/components/Flex/Flex.d.ts +8 -0
- package/dist/types/components/Flex/constants.d.ts +7 -0
- package/dist/types/components/Flex/index.d.ts +2 -0
- package/dist/types/components/Flex/types.d.ts +3 -0
- package/dist/types/components/Footer/Footer.d.ts +6 -0
- package/dist/types/components/Footer/constants.d.ts +4 -0
- package/dist/types/components/Footer/index.d.ts +2 -0
- package/dist/types/components/Footer/types.d.ts +4 -0
- package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +3 -3
- package/dist/types/components/Form/Input/Input.d.ts +4 -4
- package/dist/types/components/Form/Input/constants.d.ts +2 -2
- package/dist/types/components/Form/NativeSelect/NativeSelect.d.ts +8 -0
- package/dist/types/components/Form/NativeSelect/constants.d.ts +7 -0
- package/dist/types/components/Form/NativeSelect/index.d.ts +2 -0
- package/dist/types/components/Form/NativeSelect/types.d.ts +3 -0
- package/dist/types/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Form/Range/Range.d.ts +1 -1
- package/dist/types/components/Form/Select/Select.d.ts +4 -4
- package/dist/types/components/Form/Select/constants.d.ts +2 -2
- package/dist/types/components/Form/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Form/TagsInput/TagsInput.d.ts +2 -2
- package/dist/types/components/Form/TextField/TextField.d.ts +4 -4
- package/dist/types/components/Form/Textarea/Textarea.d.ts +3 -3
- package/dist/types/components/Form/Textarea/constants.d.ts +1 -1
- package/dist/types/components/Form/components/Field/Field.d.ts +8 -0
- package/dist/types/components/Form/components/Field/FieldContext.d.ts +2 -0
- package/dist/types/components/Form/components/Field/constants.d.ts +6 -0
- package/dist/types/components/Form/components/Field/hooks/index.d.ts +1 -0
- package/dist/types/components/Form/components/Field/hooks/useField/index.d.ts +1 -0
- package/dist/types/components/Form/components/Field/hooks/useField/useField.d.ts +1 -0
- package/dist/types/components/Form/components/Field/index.d.ts +2 -0
- package/dist/types/components/Form/components/Field/types.d.ts +12 -0
- package/dist/types/components/Form/index.d.ts +2 -0
- package/dist/types/components/Grid/Grid.d.ts +11 -0
- package/dist/types/components/Grid/constants.d.ts +10 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Grid/types.d.ts +4 -0
- package/dist/types/components/Header/Header.d.ts +7 -0
- package/dist/types/components/Header/constants.d.ts +3 -0
- package/dist/types/components/Header/index.d.ts +2 -0
- package/dist/types/components/Header/types.d.ts +3 -0
- package/dist/types/components/Heading/Heading.d.ts +7 -0
- package/dist/types/components/Heading/constants.d.ts +4 -0
- package/dist/types/components/Heading/index.d.ts +2 -0
- package/dist/types/components/Heading/types.d.ts +7 -0
- package/dist/types/components/Image/Image.d.ts +7 -0
- package/dist/types/components/Image/constants.d.ts +4 -0
- package/dist/types/components/Image/index.d.ts +2 -0
- package/dist/types/components/Image/types.d.ts +5 -0
- package/dist/types/components/Kbd/constants.d.ts +1 -1
- package/dist/types/components/List/constants.d.ts +1 -1
- package/dist/types/components/Loading/Loading.d.ts +1 -1
- package/dist/types/components/Loading/constants.d.ts +2 -2
- package/dist/types/components/Menu/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/types/components/Menu/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/dist/types/components/Menu/Menubar/Menubar.d.ts +5 -5
- package/dist/types/components/Menu/Menubar/constants.d.ts +5 -5
- package/dist/types/components/Menu/NavigationMenu/NavigationMenu.d.ts +1 -1
- package/dist/types/components/Menu/NavigationMenu/constants.d.ts +1 -1
- package/dist/types/components/Panel/Panel.d.ts +11 -0
- package/dist/types/components/Panel/constants.d.ts +7 -0
- package/dist/types/components/Panel/index.d.ts +2 -0
- package/dist/types/components/Panel/types.d.ts +8 -0
- package/dist/types/components/Paragraph/Paragraph.d.ts +3 -0
- package/dist/types/components/Paragraph/constants.d.ts +3 -0
- package/dist/types/components/Paragraph/index.d.ts +2 -0
- package/dist/types/components/Paragraph/types.d.ts +5 -0
- package/dist/types/components/Progress/Progress.d.ts +1 -1
- package/dist/types/components/Progress/constants.d.ts +2 -2
- package/dist/types/components/Resizable/Resizable.d.ts +1 -1
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/dist/types/components/ScrollArea/constants.d.ts +1 -1
- package/dist/types/components/Sheet/Sheet.d.ts +12 -0
- package/dist/types/components/Sheet/constants.d.ts +7 -0
- package/dist/types/components/Sheet/index.d.ts +2 -0
- package/dist/types/components/Sheet/types.d.ts +5 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +8 -7
- package/dist/types/components/Sidebar/SidebarMenu.d.ts +3 -2
- package/dist/types/components/Sidebar/constants.d.ts +5 -4
- package/dist/types/components/Sidebar/types.d.ts +1 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/components/Skeleton/constants.d.ts +3 -3
- package/dist/types/components/Sonner/constants.d.ts +2 -2
- package/dist/types/components/Spacer/Spacer.d.ts +5 -0
- package/dist/types/components/Spacer/constants.d.ts +4 -0
- package/dist/types/components/Spacer/index.d.ts +2 -0
- package/dist/types/components/Spacer/types.d.ts +3 -0
- package/dist/types/components/Spinner/Spinner.d.ts +5 -0
- package/dist/types/components/Spinner/constants.d.ts +4 -0
- package/dist/types/components/Spinner/index.d.ts +2 -0
- package/dist/types/components/Spinner/types.d.ts +3 -0
- package/dist/types/components/Status/constants.d.ts +1 -1
- package/dist/types/components/Stepper/Stepper.d.ts +9 -0
- package/dist/types/components/Stepper/constants.d.ts +6 -0
- package/dist/types/components/Stepper/index.d.ts +2 -0
- package/dist/types/components/Stepper/types.d.ts +6 -0
- package/dist/types/components/Text/constants.d.ts +1 -1
- package/dist/types/components/Timeline/Timeline.d.ts +5 -5
- package/dist/types/components/Timeline/constants.d.ts +5 -5
- package/dist/types/components/Toggle/Toggle.d.ts +5 -3
- package/dist/types/components/Toggle/constants.d.ts +2 -1
- package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +5 -3
- package/dist/types/index.d.ts +24 -0
- package/dist/types/utilities/createVariants/createVariants.d.ts +2 -0
- package/dist/types/utilities/createVariants/index.d.ts +1 -0
- package/dist/types/utilities/createVariants/type.d.ts +10 -0
- package/dist/types/utilities/index.d.ts +1 -0
- package/package.json +41 -41
- package/src/components/Alert/constants.ts +3 -2
- package/src/components/Anchor/Anchor.tsx +1 -1
- package/src/components/Anchor/{constant.ts → constants.ts} +4 -4
- package/src/components/Anchor/types.ts +1 -1
- package/src/components/AspectRatio/AspectRatio.tsx +23 -0
- package/src/components/AspectRatio/constants.ts +17 -0
- package/src/components/AspectRatio/index.ts +2 -0
- package/src/components/AspectRatio/types.ts +7 -0
- package/src/components/Avatar/constants.ts +17 -22
- package/src/components/Badge/constants.ts +3 -2
- package/src/components/Banner/Banner.tsx +36 -0
- package/src/components/Banner/constants.ts +18 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/Banner/types.ts +11 -0
- package/src/components/Blockquote/Blockquote.tsx +21 -0
- package/src/components/Blockquote/constants.ts +22 -0
- package/src/components/Blockquote/index.ts +2 -0
- package/src/components/Blockquote/types.ts +7 -0
- package/src/components/Box/Box.tsx +20 -0
- package/src/components/Box/constants.ts +34 -0
- package/src/components/Box/index.ts +2 -0
- package/src/components/Box/types.ts +4 -0
- package/src/components/Breadcrumb/types.ts +1 -1
- package/src/components/Button/Button.tsx +3 -4
- package/src/components/Button/constants.ts +6 -3
- package/src/components/Card/constants.ts +3 -2
- package/src/components/Carousel/constants.ts +9 -8
- package/src/components/Center/Center.tsx +16 -0
- package/src/components/Center/constants.ts +20 -0
- package/src/components/Center/index.ts +2 -0
- package/src/components/Center/types.ts +5 -0
- package/src/components/Chart/constants.ts +9 -8
- package/src/components/Code/Code.tsx +51 -0
- package/src/components/Code/constants.ts +28 -0
- package/src/components/Code/helper.ts +10 -0
- package/src/components/Code/index.ts +2 -0
- package/src/components/Code/types.ts +8 -0
- package/src/components/Combobox/Combobox.tsx +2 -3
- package/src/components/Combobox/types.ts +1 -0
- package/src/components/Container/Container.tsx +20 -0
- package/src/components/Container/constants.ts +31 -0
- package/src/components/Container/index.ts +2 -0
- package/src/components/Container/types.ts +5 -0
- package/src/components/DatetimePicker/constants.ts +5 -4
- package/src/components/Dialog/Dialog.tsx +3 -3
- package/src/components/Dialog/constants.ts +5 -4
- package/src/components/Dock/constants.ts +14 -13
- package/src/components/DragAndDrop/Draggable/constants.ts +5 -4
- package/src/components/DragAndDrop/Droppable/constants.ts +3 -2
- package/src/components/DragAndDrop/Sortable/constants.ts +3 -2
- package/src/components/Empty/Empty.tsx +66 -0
- package/src/components/Empty/constants.ts +30 -0
- package/src/components/Empty/index.ts +2 -0
- package/src/components/Empty/types.ts +5 -0
- package/src/components/Flex/Flex.tsx +20 -0
- package/src/components/Flex/constants.ts +51 -0
- package/src/components/Flex/index.ts +2 -0
- package/src/components/Flex/types.ts +4 -0
- package/src/components/Footer/Footer.tsx +26 -0
- package/src/components/Footer/constants.ts +12 -0
- package/src/components/Footer/index.ts +2 -0
- package/src/components/Footer/types.ts +6 -0
- package/src/components/Form/Checkbox/constants.ts +5 -4
- package/src/components/Form/DatetimeInput/constants.ts +9 -8
- package/src/components/Form/Input/constants.ts +7 -6
- package/src/components/Form/MultiSelect/constants.ts +10 -9
- package/src/components/Form/NativeSelect/NativeSelect.tsx +23 -0
- package/src/components/Form/NativeSelect/constants.ts +39 -0
- package/src/components/Form/NativeSelect/index.ts +2 -0
- package/src/components/Form/NativeSelect/types.ts +5 -0
- package/src/components/Form/Radio/constants.ts +3 -2
- package/src/components/Form/Range/constants.ts +3 -2
- package/src/components/Form/Select/constants.ts +14 -13
- package/src/components/Form/Slider/constants.ts +9 -8
- package/src/components/Form/Switch/constants.ts +3 -2
- package/src/components/Form/TagsInput/TagsInput.tsx +1 -1
- package/src/components/Form/TagsInput/constants.ts +7 -6
- package/src/components/Form/Textarea/constants.ts +3 -2
- package/src/components/Form/Validator/constants.ts +3 -2
- package/src/components/Form/components/Field/Field.tsx +81 -0
- package/src/components/Form/components/Field/FieldContext.tsx +4 -0
- package/src/components/Form/components/Field/constants.ts +20 -0
- package/src/components/Form/components/Field/hooks/index.ts +1 -0
- package/src/components/Form/components/Field/hooks/useField/index.ts +1 -0
- package/src/components/Form/components/Field/hooks/useField/useField.ts +10 -0
- package/src/components/Form/components/Field/index.ts +2 -0
- package/src/components/Form/components/Field/types.ts +19 -0
- package/src/components/Form/index.ts +2 -0
- package/src/components/Grid/Grid.tsx +32 -0
- package/src/components/Grid/constants.ts +84 -0
- package/src/components/Grid/index.ts +2 -0
- package/src/components/Grid/types.ts +7 -0
- package/src/components/Header/Header.tsx +49 -0
- package/src/components/Header/constants.ts +18 -0
- package/src/components/Header/index.ts +2 -0
- package/src/components/Header/types.ts +4 -0
- package/src/components/Heading/Heading.tsx +23 -0
- package/src/components/Heading/constants.ts +25 -0
- package/src/components/Heading/index.ts +2 -0
- package/src/components/Heading/types.ts +10 -0
- package/src/components/Image/Image.tsx +30 -0
- package/src/components/Image/constants.ts +25 -0
- package/src/components/Image/index.ts +2 -0
- package/src/components/Image/types.ts +7 -0
- package/src/components/Kbd/constants.ts +3 -2
- package/src/components/List/constants.ts +3 -2
- package/src/components/Loading/Loading.tsx +2 -4
- package/src/components/Loading/constants.ts +5 -4
- package/src/components/Menu/Menubar/constants.ts +16 -14
- package/src/components/Menu/NavigationMenu/constants.ts +5 -3
- package/src/components/Panel/Panel.tsx +58 -0
- package/src/components/Panel/constants.ts +31 -0
- package/src/components/Panel/index.ts +2 -0
- package/src/components/Panel/types.ts +11 -0
- package/src/components/Paragraph/Paragraph.tsx +17 -0
- package/src/components/Paragraph/constants.ts +18 -0
- package/src/components/Paragraph/index.ts +2 -0
- package/src/components/Paragraph/types.ts +8 -0
- package/src/components/Progress/constants.ts +9 -10
- package/src/components/Resizable/constants.ts +3 -2
- package/src/components/ScrollArea/constants.ts +6 -5
- package/src/components/Separator/constants.ts +3 -2
- package/src/components/Sheet/Sheet.tsx +126 -0
- package/src/components/Sheet/constants.ts +45 -0
- package/src/components/Sheet/index.ts +9 -0
- package/src/components/Sheet/types.ts +7 -0
- package/src/components/Sidebar/Sidebar.tsx +5 -5
- package/src/components/Sidebar/SidebarMenu.tsx +3 -3
- package/src/components/Sidebar/constants.ts +32 -25
- package/src/components/Sidebar/types.ts +1 -1
- package/src/components/Skeleton/Skeleton.tsx +2 -2
- package/src/components/Skeleton/constants.ts +4 -3
- package/src/components/Sonner/Toaster.tsx +1 -1
- package/src/components/Sonner/constants.ts +6 -5
- package/src/components/Sonner/helpers.ts +1 -1
- package/src/components/Spacer/Spacer.tsx +19 -0
- package/src/components/Spacer/constants.ts +55 -0
- package/src/components/Spacer/index.ts +2 -0
- package/src/components/Spacer/types.ts +5 -0
- package/src/components/Spinner/Spinner.tsx +24 -0
- package/src/components/Spinner/constants.ts +29 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Spinner/types.ts +5 -0
- package/src/components/Stack/constants.ts +3 -2
- package/src/components/Stat/constants.ts +5 -4
- package/src/components/Status/constants.ts +3 -2
- package/src/components/Stepper/Stepper.tsx +30 -0
- package/src/components/Stepper/constants.ts +29 -0
- package/src/components/Stepper/index.ts +2 -0
- package/src/components/Stepper/types.ts +10 -0
- package/src/components/Table/constants.ts +3 -2
- package/src/components/Text/constants.ts +4 -7
- package/src/components/Timeline/Timeline.example.tsx +1 -1
- package/src/components/Timeline/constants.ts +19 -22
- package/src/components/Toggle/Toggle.tsx +3 -3
- package/src/components/Toggle/constants.ts +6 -3
- package/src/components/ToggleGroup/ToggleGroup.tsx +4 -2
- package/src/components/Tooltip/constants.ts +5 -4
- package/src/index.ts +27 -0
- package/src/utilities/createVariants/createVariants.ts +5 -0
- package/src/utilities/createVariants/index.ts +1 -0
- package/src/utilities/createVariants/type.ts +29 -0
- package/src/utilities/index.ts +1 -0
- package/vitest-setup.ts +4 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getEmptyClasses = cva(
|
|
5
|
+
"flex flex-col items-center justify-center text-center p-8 rounded-lg border-2 border-dashed border-base-content/20 bg-base-100/50",
|
|
6
|
+
{
|
|
7
|
+
variants: createVariants({
|
|
8
|
+
size: {
|
|
9
|
+
sm: "p-4 min-h-sm",
|
|
10
|
+
md: "p-8 min-h-md",
|
|
11
|
+
lg: "p-12 min-h-lg",
|
|
12
|
+
xl: "p-12 min-h-xl",
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
compoundVariants: [
|
|
16
|
+
{
|
|
17
|
+
size: undefined,
|
|
18
|
+
className: "p-8 h-full w-full",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const getEmptyImageClasses = cva(
|
|
25
|
+
"flex items-center justify-center w-20 h-20 rounded-full bg-base-200 mb-4 text-base-content/50"
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const getEmptyTitleClasses = cva("text-xl font-semibold mb-2");
|
|
29
|
+
|
|
30
|
+
export const getEmptyDescriptionClasses = cva("text-base-content/60 max-w-sm mb-6");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import { getFlexClasses } from "./constants";
|
|
4
|
+
import { type FlexProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const Flex = React.forwardRef<HTMLDivElement, FlexProps>(
|
|
7
|
+
({ className, direction, align, justify, wrap, gap, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn(getFlexClasses({ direction, align, justify, wrap, gap }), className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
{children}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
Flex.displayName = "Flex";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getFlexClasses = cva("flex", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
direction: {
|
|
7
|
+
row: "flex-row",
|
|
8
|
+
"row-reverse": "flex-row-reverse",
|
|
9
|
+
col: "flex-col",
|
|
10
|
+
"col-reverse": "flex-col-reverse",
|
|
11
|
+
},
|
|
12
|
+
align: {
|
|
13
|
+
start: "items-start",
|
|
14
|
+
center: "items-center",
|
|
15
|
+
end: "items-end",
|
|
16
|
+
baseline: "items-baseline",
|
|
17
|
+
stretch: "items-stretch",
|
|
18
|
+
},
|
|
19
|
+
justify: {
|
|
20
|
+
start: "justify-start",
|
|
21
|
+
center: "justify-center",
|
|
22
|
+
end: "justify-end",
|
|
23
|
+
between: "justify-between",
|
|
24
|
+
around: "justify-around",
|
|
25
|
+
evenly: "justify-evenly",
|
|
26
|
+
},
|
|
27
|
+
wrap: {
|
|
28
|
+
wrap: "flex-wrap",
|
|
29
|
+
"wrap-reverse": "flex-wrap-reverse",
|
|
30
|
+
nowrap: "flex-nowrap",
|
|
31
|
+
},
|
|
32
|
+
gap: {
|
|
33
|
+
0: "gap-0",
|
|
34
|
+
1: "gap-1",
|
|
35
|
+
2: "gap-2",
|
|
36
|
+
3: "gap-3",
|
|
37
|
+
4: "gap-4",
|
|
38
|
+
5: "gap-5",
|
|
39
|
+
6: "gap-6",
|
|
40
|
+
8: "gap-8",
|
|
41
|
+
10: "gap-10",
|
|
42
|
+
12: "gap-12",
|
|
43
|
+
16: "gap-16",
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
direction: "row",
|
|
48
|
+
align: "stretch",
|
|
49
|
+
justify: "start",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import { getFooterClasses, getFooterTitleClasses } from "./constants";
|
|
4
|
+
import { type FooterProps, type FooterTitleProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const Footer = React.forwardRef<HTMLElement, FooterProps>(
|
|
7
|
+
({ className, center, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<footer ref={ref} className={cn(getFooterClasses({ center }), className)} {...props}>
|
|
10
|
+
{children}
|
|
11
|
+
</footer>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Footer.displayName = "Footer";
|
|
16
|
+
|
|
17
|
+
export const FooterTitle = React.forwardRef<HTMLSpanElement, FooterTitleProps>(
|
|
18
|
+
({ className, children, ...props }, ref) => {
|
|
19
|
+
return (
|
|
20
|
+
<span ref={ref} className={cn(getFooterTitleClasses(), className)} {...props}>
|
|
21
|
+
{children}
|
|
22
|
+
</span>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
FooterTitle.displayName = "FooterTitle";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getFooterClasses = cva("footer p-10 bg-base-200 text-base-content", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
center: {
|
|
7
|
+
true: "footer-center",
|
|
8
|
+
},
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const getFooterTitleClasses = cva("footer-title");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from "../../libs";
|
|
2
|
+
import { getFooterClasses } from "./constants";
|
|
3
|
+
|
|
4
|
+
export type FooterProps = React.HTMLAttributes<HTMLElement> & VariantProps<typeof getFooterClasses>;
|
|
5
|
+
|
|
6
|
+
export type FooterTitleProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getCheckboxClasses = cva(
|
|
4
5
|
"peer flex items-center justify-center h-4 w-4 shrink-0 rounded-xs border focus-visible:border-base-content focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-base-content disabled:cursor-not-allowed disabled:opacity-50",
|
|
5
6
|
{
|
|
6
|
-
variants: {
|
|
7
|
+
variants: createVariants({
|
|
7
8
|
variant: {
|
|
8
9
|
primary:
|
|
9
10
|
"border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-content focus-visible:ring-primary",
|
|
@@ -31,19 +32,19 @@ export const getCheckboxClasses = cva(
|
|
|
31
32
|
md: "rounded-md",
|
|
32
33
|
lg: "rounded-lg",
|
|
33
34
|
},
|
|
34
|
-
},
|
|
35
|
+
}),
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
38
|
|
|
38
39
|
export const getCheckboxIndicatorClasses = cva("flex items-center justify-center text-current");
|
|
39
40
|
|
|
40
41
|
export const getCheckboxIconClasses = cva("h-3.5 w-3.5", {
|
|
41
|
-
variants: {
|
|
42
|
+
variants: createVariants({
|
|
42
43
|
size: {
|
|
43
44
|
xs: "h-2.5 w-2.5",
|
|
44
45
|
sm: "h-3 w-3",
|
|
45
46
|
md: "h-4 w-4",
|
|
46
47
|
lg: "h-6 w-6",
|
|
47
48
|
},
|
|
48
|
-
},
|
|
49
|
+
}),
|
|
49
50
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const DEFAULT_SIZE = 96;
|
|
4
5
|
|
|
@@ -7,26 +8,26 @@ export const getDatetimeCalendarTriggerClasses = cva(
|
|
|
7
8
|
outline-hidden focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-base-content focus-visible:ring-inset
|
|
8
9
|
`,
|
|
9
10
|
{
|
|
10
|
-
variants: {
|
|
11
|
+
variants: createVariants({
|
|
11
12
|
size: {
|
|
12
13
|
xs: "size-4 p-0 rounded-xs",
|
|
13
14
|
sm: "size-6",
|
|
14
15
|
md: "size-9",
|
|
15
16
|
lg: "size-10",
|
|
16
17
|
},
|
|
17
|
-
},
|
|
18
|
+
}),
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
|
|
21
22
|
export const getDatetimeCalendarIconClasses = cva("", {
|
|
22
|
-
variants: {
|
|
23
|
+
variants: createVariants({
|
|
23
24
|
size: {
|
|
24
25
|
xs: "size-3",
|
|
25
26
|
sm: "size-3",
|
|
26
27
|
md: "size-5",
|
|
27
28
|
lg: "size-6",
|
|
28
29
|
},
|
|
29
|
-
},
|
|
30
|
+
}),
|
|
30
31
|
compoundVariants: [
|
|
31
32
|
{
|
|
32
33
|
size: undefined,
|
|
@@ -38,14 +39,14 @@ export const getDatetimeCalendarIconClasses = cva("", {
|
|
|
38
39
|
export const getTimePickerClasses = cva(
|
|
39
40
|
"border border-neutral-content bg-base-100 shadow-xs cursor-pointer ring-0 py-2 h-8 px-3 w-full text-sm outline-0 inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-base-content disabled:pointer-events-none disabled:opacity-50 hover:bg-base-200",
|
|
40
41
|
{
|
|
41
|
-
variants: {
|
|
42
|
+
variants: createVariants({
|
|
42
43
|
selected: {
|
|
43
44
|
true: "bg-primary border-primary text-primary-content hover:border-neutral-content hover:text-base-content",
|
|
44
45
|
},
|
|
45
46
|
suggested: {
|
|
46
47
|
true: "bg-info border-info text-info-content hover:border-neutral-content hover:text-base-content",
|
|
47
48
|
},
|
|
48
|
-
},
|
|
49
|
+
}),
|
|
49
50
|
}
|
|
50
51
|
);
|
|
51
52
|
|
|
@@ -60,14 +61,14 @@ export const getTimePickerScrollAreaClasses = cva(
|
|
|
60
61
|
export const getNaturalLanguageInputClasses = cva(
|
|
61
62
|
"flex-1 border-none bg-transparent outline-hidden ring-0 focus:outline-hidden focus:ring-0 focus-within:outline-hidden focus-within:ring-0 disabled:cursor-not-allowed disabled:opacity-50",
|
|
62
63
|
{
|
|
63
|
-
variants: {
|
|
64
|
+
variants: createVariants({
|
|
64
65
|
size: {
|
|
65
66
|
xs: "h-4 px-1",
|
|
66
67
|
sm: "h-6 px-1",
|
|
67
68
|
md: "h-9 px-2",
|
|
68
69
|
lg: "h-11 px-3",
|
|
69
70
|
},
|
|
70
|
-
},
|
|
71
|
+
}),
|
|
71
72
|
compoundVariants: [
|
|
72
73
|
{
|
|
73
74
|
size: undefined,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getInputClasses = cva("input rounded-md transition-all duration-100", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
default: "bg-transparent",
|
|
7
8
|
accent: "input-accent",
|
|
@@ -32,7 +33,7 @@ export const getInputClasses = cva("input rounded-md transition-all duration-100
|
|
|
32
33
|
readOnly: {
|
|
33
34
|
true: "cursor-not-allowed! bg-base-200!",
|
|
34
35
|
},
|
|
35
|
-
},
|
|
36
|
+
}),
|
|
36
37
|
compoundVariants: [
|
|
37
38
|
{
|
|
38
39
|
size: undefined,
|
|
@@ -49,12 +50,12 @@ export const getInputClasses = cva("input rounded-md transition-all duration-100
|
|
|
49
50
|
export const getFloatingLabelClasses = cva("floating-label");
|
|
50
51
|
|
|
51
52
|
export const getInputLabelClasses = cva("", {
|
|
52
|
-
variants: {
|
|
53
|
+
variants: createVariants({
|
|
53
54
|
floating: {
|
|
54
55
|
true: "",
|
|
55
56
|
false: "label",
|
|
56
57
|
},
|
|
57
|
-
},
|
|
58
|
+
}),
|
|
58
59
|
compoundVariants: [
|
|
59
60
|
{
|
|
60
61
|
floating: undefined,
|
|
@@ -69,7 +70,7 @@ export const getInputCommonClasses = cva(
|
|
|
69
70
|
[&:has(input:focus-within)]:duration-100 [&:has(input:focus-within)]:outline [&:has(input:focus-within)]:outline-2 [&:has(input:focus-within)]:outline-offset-2
|
|
70
71
|
`,
|
|
71
72
|
{
|
|
72
|
-
variants: {
|
|
73
|
+
variants: createVariants({
|
|
73
74
|
variant: {
|
|
74
75
|
default:
|
|
75
76
|
"[&:has(input:focus)]:border-[currentColor] [&:has(input:focus-within)]:border-[currentColor] [&:has(input:focus)]:outline-ghost [&:has(input:focus-within)]:outline-ghost",
|
|
@@ -107,7 +108,7 @@ export const getInputCommonClasses = cva(
|
|
|
107
108
|
readOnly: {
|
|
108
109
|
true: "cursor-not-allowed! bg-base-200!",
|
|
109
110
|
},
|
|
110
|
-
},
|
|
111
|
+
}),
|
|
111
112
|
compoundVariants: [
|
|
112
113
|
{
|
|
113
114
|
size: undefined,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getMultiSelectClasses = cva("overflow-visible bg-transparent flex flex-col h-fit");
|
|
4
5
|
|
|
@@ -7,7 +8,7 @@ export const getMultiSelectTriggerClasses = cva("flex-wrap h-fit w-fit py-2 over
|
|
|
7
8
|
export const getMultiSelectItemClasses = cva(
|
|
8
9
|
"cursor-pointer transition-colors flex justify-between aria-selected:bg-base-300 aria-selected:text-base-content rounded-xs py-1.5 px-2 text-sm outline-hidden",
|
|
9
10
|
{
|
|
10
|
-
variants: {
|
|
11
|
+
variants: createVariants({
|
|
11
12
|
included: {
|
|
12
13
|
true: "opacity-50 cursor-default",
|
|
13
14
|
},
|
|
@@ -30,35 +31,35 @@ export const getMultiSelectItemClasses = cva(
|
|
|
30
31
|
info: "aria-selected:bg-info aria-selected:text-info-content",
|
|
31
32
|
error: "aria-selected:bg-error aria-selected:text-error-content",
|
|
32
33
|
},
|
|
33
|
-
},
|
|
34
|
+
}),
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
37
|
|
|
37
38
|
export const getMultiSelectListClasses = cva(
|
|
38
39
|
"p-1 bg-base-100 flex flex-col gap-2 rounded-md scrollbar-thin scrollbar-track-transparent transition-colors scrollbar-thumb-muted-foreground dark:scrollbar-thumb-muted scrollbar-thumb-rounded-lg w-full absolute shadow-md z-10 border border-muted top-1",
|
|
39
40
|
{
|
|
40
|
-
variants: {
|
|
41
|
+
variants: createVariants({
|
|
41
42
|
size: {
|
|
42
43
|
xs: "p-1",
|
|
43
44
|
sm: "p-1.5",
|
|
44
45
|
md: "p-2",
|
|
45
46
|
lg: "p-3",
|
|
46
47
|
},
|
|
47
|
-
},
|
|
48
|
+
}),
|
|
48
49
|
}
|
|
49
50
|
);
|
|
50
51
|
|
|
51
52
|
export const getMultiSelectTagClasses = cva(
|
|
52
53
|
"relative flex items-center gap-1 [&>span]:truncate [&>span]:max-w-24 aria-disabled:opacity-50 aria-disabled:cursor-not-allowed focus-visible:outline-hidden",
|
|
53
54
|
{
|
|
54
|
-
variants: {
|
|
55
|
+
variants: createVariants({
|
|
55
56
|
size: {
|
|
56
57
|
xs: "px-0.5 [&>span]:max-w-20 rounded-sm",
|
|
57
58
|
sm: "px-1",
|
|
58
59
|
md: "px-1.5 [&>span]:max-w-28",
|
|
59
60
|
lg: "px-2 [&>span]:max-w-32",
|
|
60
61
|
},
|
|
61
|
-
},
|
|
62
|
+
}),
|
|
62
63
|
compoundVariants: [
|
|
63
64
|
{
|
|
64
65
|
size: undefined,
|
|
@@ -69,12 +70,12 @@ export const getMultiSelectTagClasses = cva(
|
|
|
69
70
|
);
|
|
70
71
|
|
|
71
72
|
export const getMultiSelectInputClasses = cva("bg-transparent outline-hidden flex-1 my-px", {
|
|
72
|
-
variants: {
|
|
73
|
+
variants: createVariants({
|
|
73
74
|
size: {
|
|
74
75
|
xs: "text-xs",
|
|
75
76
|
sm: "text-sm",
|
|
76
|
-
md: "text-
|
|
77
|
+
md: "text-base",
|
|
77
78
|
lg: "text-lg",
|
|
78
79
|
},
|
|
79
|
-
},
|
|
80
|
+
}),
|
|
80
81
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../../utilities";
|
|
3
|
+
import { getNativeSelectClasses } from "./constants";
|
|
4
|
+
import { type NativeSelectProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const NativeSelect = React.forwardRef<HTMLSelectElement, NativeSelectProps>(
|
|
7
|
+
({ className, size, variant, outline, wide, nativeOptions, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<select
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn(
|
|
12
|
+
getNativeSelectClasses({ size, variant, outline, wide, nativeOptions }),
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
{children}
|
|
18
|
+
</select>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
NativeSelect.displayName = "NativeSelect";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getNativeSelectClasses = cva("select", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
nativeOptions: {
|
|
7
|
+
true: "appearance-none",
|
|
8
|
+
},
|
|
9
|
+
size: {
|
|
10
|
+
xs: "select-xs",
|
|
11
|
+
sm: "select-sm",
|
|
12
|
+
md: "select-md",
|
|
13
|
+
lg: "select-lg",
|
|
14
|
+
xl: "select-xl",
|
|
15
|
+
},
|
|
16
|
+
wide: {
|
|
17
|
+
true: "w-full",
|
|
18
|
+
},
|
|
19
|
+
outline: {
|
|
20
|
+
true: "select-bordered",
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
default: "",
|
|
24
|
+
primary: "select-primary",
|
|
25
|
+
secondary: "select-secondary",
|
|
26
|
+
accent: "select-accent",
|
|
27
|
+
info: "select-info",
|
|
28
|
+
success: "select-success",
|
|
29
|
+
warning: "select-warning",
|
|
30
|
+
error: "select-error",
|
|
31
|
+
ghost: "select-ghost",
|
|
32
|
+
neutral: "select-neutral",
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "md",
|
|
37
|
+
variant: "default",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getRadioClasses = cva("radio", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
primary: "radio-primary",
|
|
7
8
|
secondary: "radio-secondary",
|
|
@@ -17,5 +18,5 @@ export const getRadioClasses = cva("radio", {
|
|
|
17
18
|
md: "radio-md",
|
|
18
19
|
lg: "radio-lg",
|
|
19
20
|
},
|
|
20
|
-
},
|
|
21
|
+
}),
|
|
21
22
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getRangeClasses = cva("range", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
primary: "range-primary",
|
|
7
8
|
secondary: "range-secondary",
|
|
@@ -24,7 +25,7 @@ export const getRangeClasses = cva("range", {
|
|
|
24
25
|
md: "range-md",
|
|
25
26
|
lg: "range-lg",
|
|
26
27
|
},
|
|
27
|
-
},
|
|
28
|
+
}),
|
|
28
29
|
defaultVariants: {
|
|
29
30
|
variant: "neutral",
|
|
30
31
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { cva } from "../../../libs";
|
|
2
|
+
import { createVariants } from "../../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getSelectTriggerClasses = cva(
|
|
4
5
|
"select flex items-center justify-between rounded-md text-sm text-left disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-100",
|
|
5
6
|
{
|
|
6
|
-
variants: {
|
|
7
|
+
variants: createVariants({
|
|
7
8
|
variant: {
|
|
8
9
|
default:
|
|
9
10
|
"border border-base-content/20 [&:has(input:focus)]:border-[currentColor] [&:has(input:focus-within)]:border-[currentColor] [&:has(input:focus)]:outline-ghost [&:has(input:focus-within)]:outline-ghost",
|
|
@@ -28,7 +29,7 @@ export const getSelectTriggerClasses = cva(
|
|
|
28
29
|
md: "select-md",
|
|
29
30
|
lg: "select-lg",
|
|
30
31
|
},
|
|
31
|
-
},
|
|
32
|
+
}),
|
|
32
33
|
compoundVariants: [
|
|
33
34
|
{
|
|
34
35
|
size: undefined,
|
|
@@ -46,7 +47,7 @@ export const getSelectTriggerClasses = cva(
|
|
|
46
47
|
export const getSelectItemClasses = cva(
|
|
47
48
|
"relative flex w-full cursor-pointer select-none items-center focus:bg-base-300 focus:text-base-content rounded-xs py-1.5 pl-2 pr-8 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
48
49
|
{
|
|
49
|
-
variants: {
|
|
50
|
+
variants: createVariants({
|
|
50
51
|
variant: {
|
|
51
52
|
default: "focus:bg-transparent focus:text-base-content",
|
|
52
53
|
primary: "focus:bg-primary focus:text-primary-content",
|
|
@@ -58,21 +59,21 @@ export const getSelectItemClasses = cva(
|
|
|
58
59
|
error: "focus:bg-error focus:text-error-content",
|
|
59
60
|
ghost: "",
|
|
60
61
|
},
|
|
61
|
-
},
|
|
62
|
+
}),
|
|
62
63
|
}
|
|
63
64
|
);
|
|
64
65
|
|
|
65
66
|
export const getSelectLabelClasses = cva("px-2 py-1.5 text-sm font-semibold");
|
|
66
67
|
|
|
67
68
|
export const getSelectValueClasses = cva("", {
|
|
68
|
-
variants: {
|
|
69
|
+
variants: createVariants({
|
|
69
70
|
size: {
|
|
70
71
|
xs: "text-xs",
|
|
71
72
|
sm: "text-sm",
|
|
72
|
-
md: "text-
|
|
73
|
+
md: "text-base",
|
|
73
74
|
lg: "text-lg",
|
|
74
75
|
},
|
|
75
|
-
},
|
|
76
|
+
}),
|
|
76
77
|
});
|
|
77
78
|
|
|
78
79
|
export const getSelectSeparatorClasses = cva("-mx-1 my-1 h-px bg-muted");
|
|
@@ -80,35 +81,35 @@ export const getSelectSeparatorClasses = cva("-mx-1 my-1 h-px bg-muted");
|
|
|
80
81
|
export const getSelectContentClasses = cva(
|
|
81
82
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-base-100 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
82
83
|
{
|
|
83
|
-
variants: {
|
|
84
|
+
variants: createVariants({
|
|
84
85
|
position: {
|
|
85
86
|
popper:
|
|
86
87
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
87
88
|
"item-aligned": "",
|
|
88
89
|
},
|
|
89
|
-
},
|
|
90
|
+
}),
|
|
90
91
|
}
|
|
91
92
|
);
|
|
92
93
|
|
|
93
94
|
export const getSelectViewportClasses = cva("p-1", {
|
|
94
|
-
variants: {
|
|
95
|
+
variants: createVariants({
|
|
95
96
|
position: {
|
|
96
97
|
popper:
|
|
97
98
|
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
98
99
|
"item-aligned": "",
|
|
99
100
|
},
|
|
100
|
-
},
|
|
101
|
+
}),
|
|
101
102
|
});
|
|
102
103
|
|
|
103
104
|
export const getFloatingLabelClasses = cva("floating-label");
|
|
104
105
|
|
|
105
106
|
export const getLabelForSelectClasses = cva("", {
|
|
106
|
-
variants: {
|
|
107
|
+
variants: createVariants({
|
|
107
108
|
floating: {
|
|
108
109
|
true: "",
|
|
109
110
|
false: "label",
|
|
110
111
|
},
|
|
111
|
-
},
|
|
112
|
+
}),
|
|
112
113
|
compoundVariants: [
|
|
113
114
|
{
|
|
114
115
|
floating: undefined,
|