@dalexto/lexsys-registry 0.0.2
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/README.md +98 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +2164 -0
- package/dist/install-layer.d.ts +4 -0
- package/dist/items/accordion.d.ts +7 -0
- package/dist/items/alert-dialog.d.ts +7 -0
- package/dist/items/alert.d.ts +7 -0
- package/dist/items/auth-form.d.ts +7 -0
- package/dist/items/autocomplete.d.ts +7 -0
- package/dist/items/avatar.d.ts +7 -0
- package/dist/items/badge.d.ts +7 -0
- package/dist/items/button.d.ts +7 -0
- package/dist/items/card.d.ts +7 -0
- package/dist/items/checkbox-group.d.ts +7 -0
- package/dist/items/checkbox.d.ts +7 -0
- package/dist/items/collapsible.d.ts +7 -0
- package/dist/items/combobox.d.ts +7 -0
- package/dist/items/command-palette.d.ts +7 -0
- package/dist/items/context-menu.d.ts +7 -0
- package/dist/items/dashboard-shell.d.ts +7 -0
- package/dist/items/dialog.d.ts +7 -0
- package/dist/items/drawer.d.ts +7 -0
- package/dist/items/field.d.ts +7 -0
- package/dist/items/fieldset.d.ts +7 -0
- package/dist/items/form-field.d.ts +7 -0
- package/dist/items/form.d.ts +7 -0
- package/dist/items/index.d.ts +49 -0
- package/dist/items/input.d.ts +7 -0
- package/dist/items/menu.d.ts +7 -0
- package/dist/items/menubar.d.ts +7 -0
- package/dist/items/meter.d.ts +7 -0
- package/dist/items/navigation-menu.d.ts +7 -0
- package/dist/items/number-field.d.ts +7 -0
- package/dist/items/otp-field.d.ts +7 -0
- package/dist/items/popover.d.ts +7 -0
- package/dist/items/preview-card.d.ts +7 -0
- package/dist/items/progress.d.ts +7 -0
- package/dist/items/radio-group.d.ts +7 -0
- package/dist/items/scroll-area.d.ts +7 -0
- package/dist/items/select.d.ts +7 -0
- package/dist/items/separator.d.ts +7 -0
- package/dist/items/settings-panel.d.ts +7 -0
- package/dist/items/sidebar.d.ts +7 -0
- package/dist/items/slider.d.ts +7 -0
- package/dist/items/switch.d.ts +7 -0
- package/dist/items/tabs.d.ts +7 -0
- package/dist/items/textarea.d.ts +7 -0
- package/dist/items/toast.d.ts +7 -0
- package/dist/items/toggle-group.d.ts +7 -0
- package/dist/items/toggle.d.ts +7 -0
- package/dist/items/toolbar.d.ts +7 -0
- package/dist/items/tooltip.d.ts +7 -0
- package/dist/registry.types.d.ts +40 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/utilities/cn.d.ts +2 -0
- package/dist/validate-registry-composition.d.ts +2 -0
- package/dist/validate-registry-item.d.ts +2 -0
- package/dist/validate-registry-template-imports.d.ts +4 -0
- package/dist/validate-registry.d.ts +9 -0
- package/package.json +52 -0
- package/templates/blocks/AuthForm/AuthForm.tsx +109 -0
- package/templates/blocks/AuthForm/AuthForm.types.ts +34 -0
- package/templates/blocks/AuthForm/AuthForm.variants.ts +11 -0
- package/templates/blocks/CommandPalette/CommandPalette.tsx +245 -0
- package/templates/blocks/CommandPalette/CommandPalette.types.ts +73 -0
- package/templates/blocks/CommandPalette/CommandPalette.variants.ts +26 -0
- package/templates/blocks/FormField/FormField.tsx +83 -0
- package/templates/blocks/FormField/FormField.types.ts +26 -0
- package/templates/blocks/FormField/FormField.variants.ts +9 -0
- package/templates/blocks/SettingsPanel/SettingsPanel.tsx +104 -0
- package/templates/blocks/SettingsPanel/SettingsPanel.types.ts +31 -0
- package/templates/blocks/SettingsPanel/SettingsPanel.variants.ts +9 -0
- package/templates/blocks/Sidebar/Sidebar.tsx +414 -0
- package/templates/blocks/Sidebar/Sidebar.types.ts +99 -0
- package/templates/blocks/Sidebar/Sidebar.variants.ts +84 -0
- package/templates/primitives/Accordion/Accordion.tsx +102 -0
- package/templates/primitives/Accordion/Accordion.types.ts +20 -0
- package/templates/primitives/Accordion/Accordion.variants.ts +32 -0
- package/templates/primitives/Alert/Alert.tsx +62 -0
- package/templates/primitives/Alert/Alert.types.ts +35 -0
- package/templates/primitives/Alert/Alert.variants.ts +41 -0
- package/templates/primitives/AlertDialog/AlertDialog.tsx +168 -0
- package/templates/primitives/AlertDialog/AlertDialog.types.ts +30 -0
- package/templates/primitives/AlertDialog/AlertDialog.variants.ts +57 -0
- package/templates/primitives/Autocomplete/Autocomplete.tsx +394 -0
- package/templates/primitives/Autocomplete/Autocomplete.types.ts +82 -0
- package/templates/primitives/Autocomplete/Autocomplete.variants.ts +154 -0
- package/templates/primitives/Avatar/Avatar.tsx +56 -0
- package/templates/primitives/Avatar/Avatar.types.ts +31 -0
- package/templates/primitives/Avatar/Avatar.variants.ts +40 -0
- package/templates/primitives/Badge/Badge.tsx +30 -0
- package/templates/primitives/Badge/Badge.types.ts +30 -0
- package/templates/primitives/Badge/Badge.variants.ts +81 -0
- package/templates/primitives/Button/Button.tsx +53 -0
- package/templates/primitives/Button/Button.types.ts +25 -0
- package/templates/primitives/Button/Button.variants.ts +69 -0
- package/templates/primitives/Card/Card.tsx +85 -0
- package/templates/primitives/Card/Card.types.ts +54 -0
- package/templates/primitives/Card/Card.variants.ts +46 -0
- package/templates/primitives/Checkbox/Checkbox.tsx +72 -0
- package/templates/primitives/Checkbox/Checkbox.types.ts +28 -0
- package/templates/primitives/Checkbox/Checkbox.variants.ts +39 -0
- package/templates/primitives/CheckboxGroup/CheckboxGroup.tsx +32 -0
- package/templates/primitives/CheckboxGroup/CheckboxGroup.types.ts +17 -0
- package/templates/primitives/CheckboxGroup/CheckboxGroup.variants.ts +25 -0
- package/templates/primitives/Collapsible/Collapsible.tsx +74 -0
- package/templates/primitives/Collapsible/Collapsible.types.ts +28 -0
- package/templates/primitives/Collapsible/Collapsible.variants.ts +44 -0
- package/templates/primitives/Combobox/Combobox.tsx +450 -0
- package/templates/primitives/Combobox/Combobox.types.ts +99 -0
- package/templates/primitives/Combobox/Combobox.variants.ts +180 -0
- package/templates/primitives/ContextMenu/ContextMenu.tsx +375 -0
- package/templates/primitives/ContextMenu/ContextMenu.types.ts +57 -0
- package/templates/primitives/ContextMenu/ContextMenu.variants.ts +39 -0
- package/templates/primitives/Dialog/Dialog.tsx +148 -0
- package/templates/primitives/Dialog/Dialog.types.ts +29 -0
- package/templates/primitives/Dialog/Dialog.variants.ts +56 -0
- package/templates/primitives/Drawer/Drawer.tsx +266 -0
- package/templates/primitives/Drawer/Drawer.types.ts +77 -0
- package/templates/primitives/Drawer/Drawer.variants.ts +175 -0
- package/templates/primitives/Field/Field.tsx +132 -0
- package/templates/primitives/Field/Field.types.ts +43 -0
- package/templates/primitives/Field/Field.variants.ts +77 -0
- package/templates/primitives/Fieldset/Fieldset.tsx +36 -0
- package/templates/primitives/Fieldset/Fieldset.types.ts +26 -0
- package/templates/primitives/Fieldset/Fieldset.variants.ts +37 -0
- package/templates/primitives/Form/Form.tsx +24 -0
- package/templates/primitives/Form/Form.types.ts +13 -0
- package/templates/primitives/Form/Form.variants.ts +11 -0
- package/templates/primitives/Input/Input.tsx +36 -0
- package/templates/primitives/Input/Input.types.ts +27 -0
- package/templates/primitives/Input/Input.variants.ts +41 -0
- package/templates/primitives/Menu/Menu.tsx +352 -0
- package/templates/primitives/Menu/Menu.types.ts +56 -0
- package/templates/primitives/Menu/Menu.variants.ts +73 -0
- package/templates/primitives/Menubar/Menubar.tsx +25 -0
- package/templates/primitives/Menubar/Menubar.types.ts +12 -0
- package/templates/primitives/Menubar/Menubar.variants.ts +22 -0
- package/templates/primitives/Meter/Meter.tsx +123 -0
- package/templates/primitives/Meter/Meter.types.ts +45 -0
- package/templates/primitives/Meter/Meter.variants.ts +47 -0
- package/templates/primitives/NavigationMenu/NavigationMenu.tsx +256 -0
- package/templates/primitives/NavigationMenu/NavigationMenu.types.ts +58 -0
- package/templates/primitives/NavigationMenu/NavigationMenu.variants.ts +40 -0
- package/templates/primitives/NumberField/NumberField.tsx +168 -0
- package/templates/primitives/NumberField/NumberField.types.ts +51 -0
- package/templates/primitives/NumberField/NumberField.variants.ts +92 -0
- package/templates/primitives/OtpField/OtpField.tsx +65 -0
- package/templates/primitives/OtpField/OtpField.types.ts +29 -0
- package/templates/primitives/OtpField/OtpField.variants.ts +45 -0
- package/templates/primitives/Popover/Popover.tsx +193 -0
- package/templates/primitives/Popover/Popover.types.ts +35 -0
- package/templates/primitives/Popover/Popover.variants.ts +68 -0
- package/templates/primitives/PreviewCard/PreviewCard.tsx +153 -0
- package/templates/primitives/PreviewCard/PreviewCard.types.ts +42 -0
- package/templates/primitives/PreviewCard/PreviewCard.variants.ts +24 -0
- package/templates/primitives/Progress/Progress.tsx +95 -0
- package/templates/primitives/Progress/Progress.types.ts +39 -0
- package/templates/primitives/Progress/Progress.variants.ts +39 -0
- package/templates/primitives/RadioGroup/RadioGroup.tsx +66 -0
- package/templates/primitives/RadioGroup/RadioGroup.types.ts +34 -0
- package/templates/primitives/RadioGroup/RadioGroup.variants.ts +59 -0
- package/templates/primitives/ScrollArea/ScrollArea.tsx +135 -0
- package/templates/primitives/ScrollArea/ScrollArea.types.ts +34 -0
- package/templates/primitives/ScrollArea/ScrollArea.variants.ts +38 -0
- package/templates/primitives/Select/Select.tsx +319 -0
- package/templates/primitives/Select/Select.types.ts +74 -0
- package/templates/primitives/Select/Select.variants.ts +94 -0
- package/templates/primitives/Separator/Separator.tsx +30 -0
- package/templates/primitives/Separator/Separator.types.ts +13 -0
- package/templates/primitives/Separator/Separator.variants.ts +19 -0
- package/templates/primitives/Slider/Slider.tsx +124 -0
- package/templates/primitives/Slider/Slider.types.ts +51 -0
- package/templates/primitives/Slider/Slider.variants.ts +38 -0
- package/templates/primitives/Switch/Switch.tsx +61 -0
- package/templates/primitives/Switch/Switch.types.ts +29 -0
- package/templates/primitives/Switch/Switch.variants.ts +48 -0
- package/templates/primitives/Tabs/Tabs.tsx +70 -0
- package/templates/primitives/Tabs/Tabs.types.ts +23 -0
- package/templates/primitives/Tabs/Tabs.variants.ts +29 -0
- package/templates/primitives/Textarea/Textarea.tsx +42 -0
- package/templates/primitives/Textarea/Textarea.types.ts +31 -0
- package/templates/primitives/Textarea/Textarea.variants.ts +46 -0
- package/templates/primitives/Toast/Toast.tsx +195 -0
- package/templates/primitives/Toast/Toast.types.ts +52 -0
- package/templates/primitives/Toast/Toast.variants.ts +88 -0
- package/templates/primitives/Toggle/Toggle.tsx +24 -0
- package/templates/primitives/Toggle/Toggle.types.ts +19 -0
- package/templates/primitives/Toggle/Toggle.variants.ts +32 -0
- package/templates/primitives/ToggleGroup/ToggleGroup.tsx +34 -0
- package/templates/primitives/ToggleGroup/ToggleGroup.types.ts +19 -0
- package/templates/primitives/ToggleGroup/ToggleGroup.variants.ts +32 -0
- package/templates/primitives/Toolbar/Toolbar.tsx +118 -0
- package/templates/primitives/Toolbar/Toolbar.types.ts +32 -0
- package/templates/primitives/Toolbar/Toolbar.variants.ts +84 -0
- package/templates/primitives/Tooltip/Tooltip.tsx +98 -0
- package/templates/primitives/Tooltip/Tooltip.types.ts +22 -0
- package/templates/primitives/Tooltip/Tooltip.variants.ts +24 -0
- package/templates/shared/utils/cn.ts +46 -0
- package/templates/styles/theme.css +311 -0
- package/templates/styles/tokens.css +1445 -0
- package/templates/templates/DashboardShell/DashboardShell.tsx +124 -0
- package/templates/templates/DashboardShell/DashboardShell.types.ts +37 -0
- package/templates/templates/DashboardShell/DashboardShell.variants.ts +25 -0
- package/templates/tsconfig.json +5 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NumberField.variants.ts
|
|
3
|
+
*
|
|
4
|
+
* Defines visual variants using class composition.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { cva } from "class-variance-authority"
|
|
8
|
+
import { disabledStateClasses } from "@/lib/utils"
|
|
9
|
+
|
|
10
|
+
export const numberFieldVariants = cva(
|
|
11
|
+
"grid gap-(--lsys-number-field-gap) text-(--lsys-number-field-foreground) data-[disabled]:opacity-(--lsys-opacity-disabled)",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
export const numberFieldGroupVariants = cva(
|
|
15
|
+
[
|
|
16
|
+
"inline-flex w-full min-w-0 items-stretch overflow-hidden rounded-(--lsys-number-field-radius)",
|
|
17
|
+
"border border-(--lsys-number-field-border-color) bg-(--lsys-number-field-background)",
|
|
18
|
+
"transition-colors duration-(--lsys-number-field-transition-duration) ease-(--lsys-number-field-transition-easing)",
|
|
19
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lsys-opacity-disabled)",
|
|
20
|
+
].join(" "),
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
sm: "h-(--lsys-number-field-height-sm)",
|
|
25
|
+
md: "h-(--lsys-number-field-height-md)",
|
|
26
|
+
lg: "h-(--lsys-number-field-height-lg)",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
size: "md",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export const numberFieldInputVariants = cva(
|
|
36
|
+
[
|
|
37
|
+
"min-w-0 flex-1 border-0 bg-transparent text-(--lsys-number-field-input-foreground)",
|
|
38
|
+
"font-(family-name:--lsys-number-field-input-font-family) font-(--lsys-number-field-input-font-weight) leading-(--lsys-number-field-input-font-line-height) tracking-(--lsys-number-field-input-font-letter-spacing)",
|
|
39
|
+
"placeholder:text-(--lsys-number-field-input-placeholder-color)",
|
|
40
|
+
"outline-none focus-visible:ring-(length:--lsys-number-field-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lsys-number-field-focus-ring-color)",
|
|
41
|
+
"aria-invalid:ring-(length:--lsys-number-field-invalid-ring-width) aria-invalid:ring-inset aria-invalid:ring-(--lsys-number-field-invalid-ring-color) data-[invalid]:ring-(length:--lsys-number-field-invalid-ring-width) data-[invalid]:ring-inset data-[invalid]:ring-(--lsys-number-field-invalid-ring-color)",
|
|
42
|
+
"disabled:cursor-not-allowed data-[disabled]:cursor-not-allowed",
|
|
43
|
+
].join(" "),
|
|
44
|
+
{
|
|
45
|
+
variants: {
|
|
46
|
+
size: {
|
|
47
|
+
sm: "px-(--lsys-number-field-input-padding-x-sm) text-(length:--lsys-number-field-input-font-size-sm)",
|
|
48
|
+
md: "px-(--lsys-number-field-input-padding-x-md) text-(length:--lsys-number-field-input-font-size-md)",
|
|
49
|
+
lg: "px-(--lsys-number-field-input-padding-x-lg) text-(length:--lsys-number-field-input-font-size-lg)",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
size: "md",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
export const numberFieldButtonVariants = cva(
|
|
59
|
+
[
|
|
60
|
+
"inline-flex shrink-0 select-none items-center justify-center border-(--lsys-number-field-stepper-border-color)",
|
|
61
|
+
"bg-(--lsys-number-field-stepper-background) text-(--lsys-number-field-stepper-foreground)",
|
|
62
|
+
"font-(--lsys-number-field-stepper-font-weight) transition-colors duration-(--lsys-number-field-transition-duration) ease-(--lsys-number-field-transition-easing)",
|
|
63
|
+
"hover:bg-(--lsys-number-field-stepper-hover-background) focus-visible:outline-none focus-visible:ring-(length:--lsys-number-field-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lsys-number-field-focus-ring-color)",
|
|
64
|
+
"disabled:cursor-not-allowed",
|
|
65
|
+
disabledStateClasses,
|
|
66
|
+
].join(" "),
|
|
67
|
+
{
|
|
68
|
+
variants: {
|
|
69
|
+
position: {
|
|
70
|
+
decrement: "border-r",
|
|
71
|
+
increment: "border-l",
|
|
72
|
+
},
|
|
73
|
+
size: {
|
|
74
|
+
sm: "w-(--lsys-number-field-stepper-width-sm) text-(length:--lsys-number-field-stepper-font-size-sm)",
|
|
75
|
+
md: "w-(--lsys-number-field-stepper-width-md) text-(length:--lsys-number-field-stepper-font-size-md)",
|
|
76
|
+
lg: "w-(--lsys-number-field-stepper-width-lg) text-(length:--lsys-number-field-stepper-font-size-lg)",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
position: "increment",
|
|
81
|
+
size: "md",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
export const numberFieldScrubAreaVariants = cva(
|
|
87
|
+
"w-fit cursor-ew-resize text-(length:--lsys-number-field-scrub-font-size) font-(--lsys-number-field-scrub-font-weight) text-(--lsys-number-field-scrub-foreground)",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
export const numberFieldScrubAreaCursorVariants = cva(
|
|
91
|
+
"size-(--lsys-number-field-scrub-cursor-size) rounded-(--lsys-number-field-scrub-cursor-radius) bg-(--lsys-number-field-scrub-cursor-background)",
|
|
92
|
+
)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OtpField.tsx
|
|
3
|
+
*
|
|
4
|
+
* Reference OtpField component implementation.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { OTPFieldPreview as BaseOtpField } from "@base-ui/react/otp-field"
|
|
8
|
+
import type {
|
|
9
|
+
OtpFieldInputProps,
|
|
10
|
+
OtpFieldProps,
|
|
11
|
+
OtpFieldSeparatorProps,
|
|
12
|
+
} from "./OtpField.types"
|
|
13
|
+
import {
|
|
14
|
+
otpFieldInputVariants,
|
|
15
|
+
otpFieldSeparatorVariants,
|
|
16
|
+
otpFieldVariants,
|
|
17
|
+
} from "./OtpField.variants"
|
|
18
|
+
import { mergeClassName } from "@/lib/utils"
|
|
19
|
+
|
|
20
|
+
const OtpField = ({ ref, className, ...props }: OtpFieldProps) => {
|
|
21
|
+
return (
|
|
22
|
+
<BaseOtpField.Root
|
|
23
|
+
ref={ref}
|
|
24
|
+
className={mergeClassName(otpFieldVariants(), className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
OtpField.displayName = "OtpField"
|
|
31
|
+
|
|
32
|
+
const OtpFieldInput = ({
|
|
33
|
+
ref,
|
|
34
|
+
size,
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: OtpFieldInputProps) => {
|
|
38
|
+
return (
|
|
39
|
+
<BaseOtpField.Input
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={mergeClassName(otpFieldInputVariants({ size }), className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
OtpFieldInput.displayName = "OtpFieldInput"
|
|
48
|
+
|
|
49
|
+
const OtpFieldSeparator = ({
|
|
50
|
+
ref,
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: OtpFieldSeparatorProps) => {
|
|
54
|
+
return (
|
|
55
|
+
<BaseOtpField.Separator
|
|
56
|
+
ref={ref}
|
|
57
|
+
className={mergeClassName(otpFieldSeparatorVariants(), className)}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
OtpFieldSeparator.displayName = "OtpFieldSeparator"
|
|
64
|
+
|
|
65
|
+
export { OtpField, OtpFieldInput, OtpFieldSeparator }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Ref } from "react"
|
|
2
|
+
/**
|
|
3
|
+
* OtpField.types.ts
|
|
4
|
+
*
|
|
5
|
+
* Public and internal types for OtpField component.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { OTPFieldPreview as BaseOtpField } from "@base-ui/react/otp-field"
|
|
9
|
+
|
|
10
|
+
export type OtpFieldSize = "sm" | "md" | "lg"
|
|
11
|
+
|
|
12
|
+
export interface OtpFieldProps extends Omit<
|
|
13
|
+
BaseOtpField.Root.Props,
|
|
14
|
+
"className"
|
|
15
|
+
> {
|
|
16
|
+
ref?: Ref<HTMLDivElement>
|
|
17
|
+
className?: BaseOtpField.Root.Props["className"]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface OtpFieldInputProps extends Omit<
|
|
21
|
+
BaseOtpField.Input.Props,
|
|
22
|
+
"className" | "size"
|
|
23
|
+
> {
|
|
24
|
+
ref?: Ref<HTMLInputElement>
|
|
25
|
+
size?: OtpFieldSize
|
|
26
|
+
className?: BaseOtpField.Input.Props["className"]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type OtpFieldSeparatorProps = BaseOtpField.Separator.Props
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OtpField.variants.ts
|
|
3
|
+
*
|
|
4
|
+
* Defines visual variants using class composition.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { cva } from "class-variance-authority"
|
|
8
|
+
import { disabledStateClasses, invalidStateClasses } from "@/lib/utils"
|
|
9
|
+
|
|
10
|
+
export const otpFieldVariants = cva(
|
|
11
|
+
[
|
|
12
|
+
"inline-flex items-center gap-(--lsys-input-padding-x-sm) text-(--lsys-field-foreground)",
|
|
13
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lsys-opacity-disabled)",
|
|
14
|
+
].join(" "),
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
export const otpFieldInputVariants = cva(
|
|
18
|
+
[
|
|
19
|
+
"flex shrink-0 items-center justify-center border bg-(--lsys-input-background) text-center text-(--lsys-input-foreground)",
|
|
20
|
+
"rounded-(--lsys-input-radius) border-(--lsys-input-border-color)",
|
|
21
|
+
"font-(family-name:--lsys-input-font-family) font-(--lsys-input-font-weight) leading-(--lsys-input-font-line-height) tracking-(--lsys-input-font-letter-spacing)",
|
|
22
|
+
"transition-colors duration-(--lsys-input-transition-duration) ease-(--lsys-input-transition-easing)",
|
|
23
|
+
"outline-none focus-visible:border-(--lsys-input-focus-border-color) focus-visible:ring-(length:--lsys-input-focus-ring-width) focus-visible:ring-(--lsys-input-focus-ring-color) focus-visible:ring-offset-(length:--lsys-input-focus-ring-offset) focus-visible:ring-offset-(--lsys-input-focus-ring-offset-color)",
|
|
24
|
+
"data-[filled]:border-(--lsys-input-focus-border-color)",
|
|
25
|
+
"disabled:cursor-not-allowed",
|
|
26
|
+
disabledStateClasses,
|
|
27
|
+
invalidStateClasses,
|
|
28
|
+
].join(" "),
|
|
29
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
size: {
|
|
32
|
+
sm: "size-(--lsys-input-height-sm) text-(length:--lsys-input-font-size-sm)",
|
|
33
|
+
md: "size-(--lsys-input-height-md) text-(length:--lsys-input-font-size-md)",
|
|
34
|
+
lg: "size-(--lsys-input-height-lg) text-(length:--lsys-input-font-size-lg)",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
size: "md",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
export const otpFieldSeparatorVariants = cva(
|
|
44
|
+
"select-none text-(length:--lsys-input-font-size-md) font-(--lsys-input-font-weight) text-(--lsys-input-placeholder-color)",
|
|
45
|
+
)
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popover.tsx
|
|
3
|
+
*
|
|
4
|
+
* Reference Popover component implementation.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { X } from "lucide-react"
|
|
8
|
+
import { Popover as BasePopover } from "@base-ui/react/popover"
|
|
9
|
+
import type {
|
|
10
|
+
PopoverArrowProps,
|
|
11
|
+
PopoverBackdropProps,
|
|
12
|
+
PopoverCloseProps,
|
|
13
|
+
PopoverDescriptionProps,
|
|
14
|
+
PopoverPopupProps,
|
|
15
|
+
PopoverPortalProps,
|
|
16
|
+
PopoverPositionerProps,
|
|
17
|
+
PopoverProps,
|
|
18
|
+
PopoverTitleProps,
|
|
19
|
+
PopoverTriggerProps,
|
|
20
|
+
PopoverViewportProps,
|
|
21
|
+
} from "./Popover.types"
|
|
22
|
+
import {
|
|
23
|
+
popoverArrowVariants,
|
|
24
|
+
popoverBackdropVariants,
|
|
25
|
+
popoverCloseVariants,
|
|
26
|
+
popoverDescriptionVariants,
|
|
27
|
+
popoverPopupVariants,
|
|
28
|
+
popoverPositionerVariants,
|
|
29
|
+
popoverTitleVariants,
|
|
30
|
+
popoverTriggerVariants,
|
|
31
|
+
popoverViewportVariants,
|
|
32
|
+
} from "./Popover.variants"
|
|
33
|
+
import { mergeClassName } from "@/lib/utils"
|
|
34
|
+
import { overlayPositionerSideOffset } from "@/lib/utils"
|
|
35
|
+
|
|
36
|
+
const Popover = <Payload = unknown,>(props: PopoverProps<Payload>) => {
|
|
37
|
+
return <BasePopover.Root {...props} />
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Popover.displayName = "Popover"
|
|
41
|
+
|
|
42
|
+
const PopoverTrigger = ({ ref, className, ...props }: PopoverTriggerProps) => {
|
|
43
|
+
return (
|
|
44
|
+
<BasePopover.Trigger
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={mergeClassName(popoverTriggerVariants(), className)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
PopoverTrigger.displayName = "PopoverTrigger"
|
|
53
|
+
|
|
54
|
+
const PopoverPortal = ({ ref, ...props }: PopoverPortalProps) => {
|
|
55
|
+
return <BasePopover.Portal ref={ref} {...props} />
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
PopoverPortal.displayName = "PopoverPortal"
|
|
59
|
+
|
|
60
|
+
const PopoverBackdrop = ({
|
|
61
|
+
ref,
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}: PopoverBackdropProps) => {
|
|
65
|
+
return (
|
|
66
|
+
<BasePopover.Backdrop
|
|
67
|
+
ref={ref}
|
|
68
|
+
className={mergeClassName(popoverBackdropVariants(), className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
PopoverBackdrop.displayName = "PopoverBackdrop"
|
|
75
|
+
|
|
76
|
+
const PopoverPositioner = ({
|
|
77
|
+
ref,
|
|
78
|
+
className,
|
|
79
|
+
sideOffset = overlayPositionerSideOffset,
|
|
80
|
+
...props
|
|
81
|
+
}: PopoverPositionerProps) => {
|
|
82
|
+
return (
|
|
83
|
+
<BasePopover.Positioner
|
|
84
|
+
ref={ref}
|
|
85
|
+
sideOffset={sideOffset}
|
|
86
|
+
className={mergeClassName(popoverPositionerVariants(), className)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
PopoverPositioner.displayName = "PopoverPositioner"
|
|
93
|
+
|
|
94
|
+
const PopoverPopup = ({ ref, className, ...props }: PopoverPopupProps) => {
|
|
95
|
+
return (
|
|
96
|
+
<BasePopover.Popup
|
|
97
|
+
ref={ref}
|
|
98
|
+
className={mergeClassName(popoverPopupVariants(), className)}
|
|
99
|
+
{...props}
|
|
100
|
+
/>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
PopoverPopup.displayName = "PopoverPopup"
|
|
105
|
+
|
|
106
|
+
const PopoverArrow = ({ ref, className, ...props }: PopoverArrowProps) => {
|
|
107
|
+
return (
|
|
108
|
+
<BasePopover.Arrow
|
|
109
|
+
ref={ref}
|
|
110
|
+
className={mergeClassName(popoverArrowVariants(), className)}
|
|
111
|
+
{...props}
|
|
112
|
+
/>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
PopoverArrow.displayName = "PopoverArrow"
|
|
117
|
+
|
|
118
|
+
const PopoverTitle = ({ ref, className, ...props }: PopoverTitleProps) => {
|
|
119
|
+
return (
|
|
120
|
+
<BasePopover.Title
|
|
121
|
+
ref={ref}
|
|
122
|
+
className={mergeClassName(popoverTitleVariants(), className)}
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
PopoverTitle.displayName = "PopoverTitle"
|
|
129
|
+
|
|
130
|
+
const PopoverDescription = ({
|
|
131
|
+
ref,
|
|
132
|
+
className,
|
|
133
|
+
...props
|
|
134
|
+
}: PopoverDescriptionProps) => {
|
|
135
|
+
return (
|
|
136
|
+
<BasePopover.Description
|
|
137
|
+
ref={ref}
|
|
138
|
+
className={mergeClassName(popoverDescriptionVariants(), className)}
|
|
139
|
+
{...props}
|
|
140
|
+
/>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
PopoverDescription.displayName = "PopoverDescription"
|
|
145
|
+
|
|
146
|
+
const PopoverClose = ({
|
|
147
|
+
ref,
|
|
148
|
+
className,
|
|
149
|
+
children,
|
|
150
|
+
...props
|
|
151
|
+
}: PopoverCloseProps) => {
|
|
152
|
+
return (
|
|
153
|
+
<BasePopover.Close
|
|
154
|
+
ref={ref}
|
|
155
|
+
className={mergeClassName(popoverCloseVariants(), className)}
|
|
156
|
+
{...props}
|
|
157
|
+
>
|
|
158
|
+
{children ?? <X aria-hidden="true" size={16} />}
|
|
159
|
+
</BasePopover.Close>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
PopoverClose.displayName = "PopoverClose"
|
|
164
|
+
|
|
165
|
+
const PopoverViewport = ({
|
|
166
|
+
ref,
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}: PopoverViewportProps) => {
|
|
170
|
+
return (
|
|
171
|
+
<BasePopover.Viewport
|
|
172
|
+
ref={ref}
|
|
173
|
+
className={mergeClassName(popoverViewportVariants(), className)}
|
|
174
|
+
{...props}
|
|
175
|
+
/>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
PopoverViewport.displayName = "PopoverViewport"
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
Popover,
|
|
183
|
+
PopoverTrigger,
|
|
184
|
+
PopoverPortal,
|
|
185
|
+
PopoverBackdrop,
|
|
186
|
+
PopoverPositioner,
|
|
187
|
+
PopoverPopup,
|
|
188
|
+
PopoverArrow,
|
|
189
|
+
PopoverTitle,
|
|
190
|
+
PopoverDescription,
|
|
191
|
+
PopoverClose,
|
|
192
|
+
PopoverViewport,
|
|
193
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Ref } from "react"
|
|
2
|
+
/**
|
|
3
|
+
* Popover.types.ts
|
|
4
|
+
*
|
|
5
|
+
* Public and internal types for Popover component.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { Popover as BasePopover } from "@base-ui/react/popover"
|
|
9
|
+
|
|
10
|
+
export type PopoverProps<Payload = unknown> = BasePopover.Root.Props<Payload>
|
|
11
|
+
|
|
12
|
+
export type PopoverTriggerProps<Payload = unknown> =
|
|
13
|
+
BasePopover.Trigger.Props<Payload> & {
|
|
14
|
+
ref?: Ref<HTMLButtonElement>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type PopoverPortalProps = BasePopover.Portal.Props & {
|
|
18
|
+
ref?: Ref<HTMLDivElement>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type PopoverBackdropProps = BasePopover.Backdrop.Props
|
|
22
|
+
|
|
23
|
+
export type PopoverPositionerProps = BasePopover.Positioner.Props
|
|
24
|
+
|
|
25
|
+
export type PopoverPopupProps = BasePopover.Popup.Props
|
|
26
|
+
|
|
27
|
+
export type PopoverArrowProps = BasePopover.Arrow.Props
|
|
28
|
+
|
|
29
|
+
export type PopoverTitleProps = BasePopover.Title.Props
|
|
30
|
+
|
|
31
|
+
export type PopoverDescriptionProps = BasePopover.Description.Props
|
|
32
|
+
|
|
33
|
+
export type PopoverCloseProps = BasePopover.Close.Props
|
|
34
|
+
|
|
35
|
+
export type PopoverViewportProps = BasePopover.Viewport.Props
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popover.variants.ts
|
|
3
|
+
*
|
|
4
|
+
* Defines visual variants using class composition.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { cva } from "class-variance-authority"
|
|
8
|
+
import { disabledStateClasses } from "@/lib/utils"
|
|
9
|
+
|
|
10
|
+
export const popoverTriggerVariants = cva(
|
|
11
|
+
[
|
|
12
|
+
"inline-flex h-(--lsys-popover-trigger-height) items-center justify-center rounded-(--lsys-popover-trigger-radius)",
|
|
13
|
+
"border border-(--lsys-popover-trigger-border-color) bg-(--lsys-popover-trigger-background) px-(--lsys-popover-trigger-padding-x) text-(--lsys-popover-trigger-foreground)",
|
|
14
|
+
"text-(length:--lsys-popover-trigger-font-size) font-(--lsys-popover-trigger-font-weight) leading-(--lsys-popover-trigger-font-line-height)",
|
|
15
|
+
"transition-colors duration-(--lsys-popover-transition-duration) ease-(--lsys-popover-transition-easing)",
|
|
16
|
+
"outline-none hover:bg-(--lsys-popover-trigger-hover-background) focus-visible:ring-(length:--lsys-popover-focus-ring-width) focus-visible:ring-(--lsys-popover-focus-ring-color) focus-visible:ring-offset-(length:--lsys-popover-focus-ring-offset) focus-visible:ring-offset-(--lsys-popover-focus-ring-offset-color)",
|
|
17
|
+
disabledStateClasses,
|
|
18
|
+
].join(" "),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export const popoverBackdropVariants = cva(
|
|
22
|
+
[
|
|
23
|
+
"fixed inset-0 z-(--lsys-popover-backdrop-z-index) bg-(--lsys-popover-backdrop-background) opacity-(--lsys-popover-backdrop-opacity)",
|
|
24
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
|
|
25
|
+
"transition-opacity duration-(--lsys-popover-transition-duration) ease-(--lsys-popover-transition-easing)",
|
|
26
|
+
].join(" "),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
export const popoverPositionerVariants = cva(
|
|
30
|
+
"z-(--lsys-popover-positioner-z-index) outline-none data-[anchor-hidden]:hidden",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
export const popoverPopupVariants = cva(
|
|
34
|
+
[
|
|
35
|
+
"grid w-[min(calc(100vw-(var(--lsys-popover-popup-inset)*2)),var(--lsys-popover-popup-max-width))] gap-(--lsys-popover-popup-gap) rounded-(--lsys-popover-popup-radius) border",
|
|
36
|
+
"border-(--lsys-popover-popup-border-color) bg-(--lsys-popover-popup-background) p-(--lsys-popover-popup-padding) text-(--lsys-popover-popup-foreground) shadow-(--lsys-popover-popup-shadow)",
|
|
37
|
+
"outline-none data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
38
|
+
"transition-[opacity,transform] duration-(--lsys-popover-transition-duration) ease-(--lsys-popover-transition-easing)",
|
|
39
|
+
].join(" "),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
export const popoverArrowVariants = cva(
|
|
43
|
+
[
|
|
44
|
+
"size-(--lsys-popover-arrow-size) rotate-45 border border-(--lsys-popover-popup-border-color) bg-(--lsys-popover-popup-background)",
|
|
45
|
+
"data-[side=bottom]:-translate-y-1/2 data-[side=left]:translate-x-1/2 data-[side=right]:-translate-x-1/2 data-[side=top]:translate-y-1/2",
|
|
46
|
+
].join(" "),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
export const popoverTitleVariants = cva(
|
|
50
|
+
"pr-(--lsys-popover-title-padding-end) text-(length:--lsys-popover-title-font-size) font-(--lsys-popover-title-font-weight) leading-(--lsys-popover-title-font-line-height) text-(--lsys-popover-title-foreground)",
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
export const popoverDescriptionVariants = cva(
|
|
54
|
+
"text-(length:--lsys-popover-description-font-size) font-(--lsys-popover-description-font-weight) leading-(--lsys-popover-description-font-line-height) text-(--lsys-popover-description-foreground)",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
export const popoverCloseVariants = cva(
|
|
58
|
+
[
|
|
59
|
+
"absolute right-(--lsys-popover-close-inset) top-(--lsys-popover-close-inset) inline-flex size-(--lsys-popover-close-size) items-center justify-center rounded-(--lsys-popover-close-radius)",
|
|
60
|
+
"text-(--lsys-popover-close-foreground) outline-none transition-colors duration-(--lsys-popover-transition-duration) ease-(--lsys-popover-transition-easing)",
|
|
61
|
+
"hover:bg-(--lsys-popover-close-hover-background) focus-visible:ring-(length:--lsys-popover-focus-ring-width) focus-visible:ring-(--lsys-popover-focus-ring-color) focus-visible:ring-offset-(length:--lsys-popover-focus-ring-offset) focus-visible:ring-offset-(--lsys-popover-focus-ring-offset-color)",
|
|
62
|
+
disabledStateClasses,
|
|
63
|
+
].join(" "),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export const popoverViewportVariants = cva(
|
|
67
|
+
"grid gap-(--lsys-popover-popup-gap)",
|
|
68
|
+
)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreviewCard.tsx
|
|
3
|
+
*
|
|
4
|
+
* Reference PreviewCard component implementation.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card"
|
|
8
|
+
import type {
|
|
9
|
+
PreviewCardArrowProps,
|
|
10
|
+
PreviewCardBackdropProps,
|
|
11
|
+
PreviewCardPopupProps,
|
|
12
|
+
PreviewCardPortalProps,
|
|
13
|
+
PreviewCardPositionerProps,
|
|
14
|
+
PreviewCardProps,
|
|
15
|
+
PreviewCardTriggerProps,
|
|
16
|
+
PreviewCardViewportProps,
|
|
17
|
+
} from "./PreviewCard.types"
|
|
18
|
+
import {
|
|
19
|
+
previewCardArrowVariants,
|
|
20
|
+
previewCardBackdropVariants,
|
|
21
|
+
previewCardPopupVariants,
|
|
22
|
+
previewCardPositionerVariants,
|
|
23
|
+
previewCardTriggerVariants,
|
|
24
|
+
previewCardViewportVariants,
|
|
25
|
+
} from "./PreviewCard.variants"
|
|
26
|
+
import { mergeClassName } from "@/lib/utils"
|
|
27
|
+
import { overlayPositionerSideOffset } from "@/lib/utils"
|
|
28
|
+
|
|
29
|
+
const PreviewCard = <Payload = unknown,>(props: PreviewCardProps<Payload>) => {
|
|
30
|
+
return <BasePreviewCard.Root {...props} />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
PreviewCard.displayName = "PreviewCard"
|
|
34
|
+
|
|
35
|
+
const PreviewCardTrigger = <Payload = unknown,>({
|
|
36
|
+
ref,
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: PreviewCardTriggerProps<Payload>) => {
|
|
40
|
+
return (
|
|
41
|
+
<BasePreviewCard.Trigger
|
|
42
|
+
ref={ref}
|
|
43
|
+
className={mergeClassName(previewCardTriggerVariants(), className)}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
PreviewCardTrigger.displayName = "PreviewCardTrigger"
|
|
50
|
+
|
|
51
|
+
const PreviewCardPortal = (props: PreviewCardPortalProps) => {
|
|
52
|
+
return <BasePreviewCard.Portal {...props} />
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
PreviewCardPortal.displayName = "PreviewCardPortal"
|
|
56
|
+
|
|
57
|
+
const PreviewCardPositioner = ({
|
|
58
|
+
ref,
|
|
59
|
+
className,
|
|
60
|
+
sideOffset = overlayPositionerSideOffset,
|
|
61
|
+
...props
|
|
62
|
+
}: PreviewCardPositionerProps) => {
|
|
63
|
+
return (
|
|
64
|
+
<BasePreviewCard.Positioner
|
|
65
|
+
ref={ref}
|
|
66
|
+
sideOffset={sideOffset}
|
|
67
|
+
className={mergeClassName(previewCardPositionerVariants(), className)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
PreviewCardPositioner.displayName = "PreviewCardPositioner"
|
|
74
|
+
|
|
75
|
+
const PreviewCardPopup = ({
|
|
76
|
+
ref,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: PreviewCardPopupProps) => {
|
|
80
|
+
return (
|
|
81
|
+
<BasePreviewCard.Popup
|
|
82
|
+
ref={ref}
|
|
83
|
+
className={mergeClassName(previewCardPopupVariants(), className)}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
PreviewCardPopup.displayName = "PreviewCardPopup"
|
|
90
|
+
|
|
91
|
+
const PreviewCardArrow = ({
|
|
92
|
+
ref,
|
|
93
|
+
className,
|
|
94
|
+
...props
|
|
95
|
+
}: PreviewCardArrowProps) => {
|
|
96
|
+
return (
|
|
97
|
+
<BasePreviewCard.Arrow
|
|
98
|
+
ref={ref}
|
|
99
|
+
className={mergeClassName(previewCardArrowVariants(), className)}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
PreviewCardArrow.displayName = "PreviewCardArrow"
|
|
106
|
+
|
|
107
|
+
const PreviewCardBackdrop = ({
|
|
108
|
+
ref,
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: PreviewCardBackdropProps) => {
|
|
112
|
+
return (
|
|
113
|
+
<BasePreviewCard.Backdrop
|
|
114
|
+
ref={ref}
|
|
115
|
+
className={mergeClassName(previewCardBackdropVariants(), className)}
|
|
116
|
+
{...props}
|
|
117
|
+
/>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
PreviewCardBackdrop.displayName = "PreviewCardBackdrop"
|
|
122
|
+
|
|
123
|
+
const PreviewCardViewport = ({
|
|
124
|
+
ref,
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: PreviewCardViewportProps) => {
|
|
128
|
+
return (
|
|
129
|
+
<BasePreviewCard.Viewport
|
|
130
|
+
ref={ref}
|
|
131
|
+
className={mergeClassName(previewCardViewportVariants(), className)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
PreviewCardViewport.displayName = "PreviewCardViewport"
|
|
138
|
+
|
|
139
|
+
const createPreviewCardHandle = BasePreviewCard.createHandle
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
PreviewCard,
|
|
143
|
+
PreviewCardTrigger,
|
|
144
|
+
PreviewCardPortal,
|
|
145
|
+
PreviewCardPositioner,
|
|
146
|
+
PreviewCardPopup,
|
|
147
|
+
PreviewCardArrow,
|
|
148
|
+
PreviewCardBackdrop,
|
|
149
|
+
PreviewCardViewport,
|
|
150
|
+
createPreviewCardHandle,
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type { PreviewCardHandle } from "./PreviewCard.types"
|