@codefast/ui 0.4.0-canary.4 → 0.4.0-canary.5
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/CHANGELOG.md +52 -0
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.mjs +2 -2
- package/dist/components/alert.mjs +1 -1
- package/dist/components/avatar.mjs +1 -1
- package/dist/components/calendar.mjs +5 -5
- package/dist/components/carousel.mjs +4 -4
- package/dist/components/checkbox-cards.mjs +6 -6
- package/dist/components/checkbox-group.mjs +6 -6
- package/dist/components/checkbox.mjs +6 -6
- package/dist/components/command.mjs +3 -3
- package/dist/components/context-menu.mjs +9 -9
- package/dist/components/dialog.mjs +2 -2
- package/dist/components/drawer.mjs +2 -2
- package/dist/components/dropdown-menu.mjs +9 -9
- package/dist/components/field.mjs +2 -2
- package/dist/components/input-otp.mjs +1 -1
- package/dist/components/item.mjs +1 -1
- package/dist/components/menubar.mjs +9 -9
- package/dist/components/native-select.mjs +2 -2
- package/dist/components/navigation-menu.mjs +4 -4
- package/dist/components/pagination.mjs +2 -2
- package/dist/components/radio-cards.mjs +1 -1
- package/dist/components/radio-group.mjs +1 -1
- package/dist/components/radio.mjs +1 -1
- package/dist/components/resizable.mjs +1 -1
- package/dist/components/select.mjs +4 -4
- package/dist/components/sheet.mjs +1 -1
- package/dist/components/sidebar.mjs +7 -7
- package/dist/components/switch.mjs +2 -2
- package/dist/components/table.mjs +2 -2
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/toggle-group.mjs +1 -1
- package/dist/components/tooltip.mjs +1 -1
- package/dist/variants/alert.mjs +1 -1
- package/dist/variants/badge.mjs +1 -1
- package/dist/variants/button-group.mjs +2 -2
- package/dist/variants/button.mjs +4 -4
- package/dist/variants/input-group.mjs +3 -3
- package/dist/variants/input-number.mjs +3 -3
- package/dist/variants/scroll-area.mjs +1 -1
- package/dist/variants/sheet.mjs +2 -2
- package/dist/variants/sidebar.mjs +1 -1
- package/dist/variants/toggle.mjs +3 -3
- package/package.json +5 -5
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +1 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/calendar.tsx +7 -7
- package/src/components/carousel.tsx +6 -6
- package/src/components/checkbox-cards.tsx +6 -5
- package/src/components/checkbox-group.tsx +5 -4
- package/src/components/checkbox.tsx +5 -4
- package/src/components/command.tsx +3 -3
- package/src/components/context-menu.tsx +9 -9
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -2
- package/src/components/dropdown-menu.tsx +9 -9
- package/src/components/field.tsx +2 -2
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +1 -1
- package/src/components/menubar.tsx +9 -9
- package/src/components/native-select.tsx +2 -2
- package/src/components/navigation-menu.tsx +4 -4
- package/src/components/pagination.tsx +2 -2
- package/src/components/radio-cards.tsx +1 -1
- package/src/components/radio-group.tsx +1 -1
- package/src/components/radio.tsx +1 -1
- package/src/components/resizable.tsx +1 -1
- package/src/components/select.tsx +4 -4
- package/src/components/sheet.tsx +1 -1
- package/src/components/sidebar.tsx +7 -7
- package/src/components/switch.tsx +2 -2
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +2 -2
- package/src/components/toggle-group.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/css/foundation/base.css +24 -0
- package/src/css/foundation/motion.css +48 -15
- package/src/css/foundation/source.css +7 -0
- package/src/css/foundation/tokens.css +36 -0
- package/src/css/foundation/variants.css +13 -5
- package/src/css/preset.css +8 -0
- package/src/css/style.css +8 -0
- package/src/css/themes/amber.css +29 -0
- package/src/css/themes/blue.css +29 -0
- package/src/css/themes/cyan.css +29 -0
- package/src/css/themes/emerald.css +29 -0
- package/src/css/themes/fuchsia.css +29 -0
- package/src/css/themes/gray.css +29 -0
- package/src/css/themes/green.css +29 -0
- package/src/css/themes/indigo.css +29 -0
- package/src/css/themes/lime.css +29 -0
- package/src/css/themes/neutral.css +29 -0
- package/src/css/themes/orange.css +29 -0
- package/src/css/themes/pink.css +29 -0
- package/src/css/themes/purple.css +29 -0
- package/src/css/themes/red.css +29 -0
- package/src/css/themes/rose.css +29 -0
- package/src/css/themes/sky.css +29 -0
- package/src/css/themes/slate.css +29 -0
- package/src/css/themes/stone.css +29 -0
- package/src/css/themes/teal.css +29 -0
- package/src/css/themes/violet.css +29 -0
- package/src/css/themes/yellow.css +29 -0
- package/src/css/themes/zinc.css +29 -0
- package/src/variants/alert.ts +1 -1
- package/src/variants/badge.ts +1 -1
- package/src/variants/button-group.ts +2 -2
- package/src/variants/button.ts +4 -4
- package/src/variants/input-group.ts +3 -3
- package/src/variants/input-number.ts +3 -3
- package/src/variants/scroll-area.ts +1 -1
- package/src/variants/sheet.ts +2 -2
- package/src/variants/sidebar.ts +1 -1
- package/src/variants/toggle.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/ui",
|
|
3
|
-
"version": "0.4.0-canary.
|
|
3
|
+
"version": "0.4.0-canary.5",
|
|
4
4
|
"description": "Core UI components library built with React and Tailwind CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
"sonner": "^2.0.7",
|
|
536
536
|
"tw-animate-css": "^1.4.0",
|
|
537
537
|
"vaul": "^1.1.2",
|
|
538
|
-
"@codefast/tailwind-variants": "0.4.0-canary.
|
|
538
|
+
"@codefast/tailwind-variants": "0.4.0-canary.5"
|
|
539
539
|
},
|
|
540
540
|
"devDependencies": {
|
|
541
541
|
"@tailwindcss/postcss": "^4.3.0",
|
|
@@ -544,8 +544,8 @@
|
|
|
544
544
|
"@testing-library/react": "^16.3.2",
|
|
545
545
|
"@testing-library/user-event": "^14.6.1",
|
|
546
546
|
"@types/jest-axe": "^3.5.9",
|
|
547
|
-
"@types/node": "^25.9.
|
|
548
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
547
|
+
"@types/node": "^25.9.3",
|
|
548
|
+
"@typescript/native-preview": "7.0.0-dev.20260611.2",
|
|
549
549
|
"@vitejs/plugin-react": "^6.0.2",
|
|
550
550
|
"@vitest/coverage-v8": "^4.1.8",
|
|
551
551
|
"jest-axe": "^10.0.0",
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
"tsdown": "^0.22.2",
|
|
556
556
|
"typescript": "^6.0.3",
|
|
557
557
|
"vitest": "^4.1.8",
|
|
558
|
-
"@codefast/typescript-config": "0.4.0-canary.
|
|
558
|
+
"@codefast/typescript-config": "0.4.0-canary.5"
|
|
559
559
|
},
|
|
560
560
|
"peerDependencies": {
|
|
561
561
|
"@types/react": ">=19.0.0",
|
|
@@ -55,7 +55,7 @@ function AccordionTrigger({ children, className, ...props }: AccordionTriggerPro
|
|
|
55
55
|
<AccordionPrimitive.Header className="flex">
|
|
56
56
|
<AccordionPrimitive.Trigger
|
|
57
57
|
className={cn(
|
|
58
|
-
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-
|
|
58
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
59
59
|
className,
|
|
60
60
|
)}
|
|
61
61
|
data-slot="accordion-trigger"
|
|
@@ -62,7 +62,7 @@ function AlertDialogContent({ className, size = "default", ...props }: AlertDial
|
|
|
62
62
|
/>
|
|
63
63
|
<AlertDialogPrimitive.Content
|
|
64
64
|
className={cn(
|
|
65
|
-
"group/alert-dialog-content fixed
|
|
65
|
+
"group/alert-dialog-content fixed start-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full -translate-x-1/2 -translate-y-1/2 flex-col gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 ease-ui outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg rtl:translate-x-1/2 data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
66
66
|
className,
|
|
67
67
|
)}
|
|
68
68
|
data-size={size}
|
|
@@ -89,7 +89,7 @@ function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): JSX
|
|
|
89
89
|
return (
|
|
90
90
|
<div
|
|
91
91
|
className={cn(
|
|
92
|
-
"grid shrink-0 grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-
|
|
92
|
+
"grid shrink-0 grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
93
93
|
className,
|
|
94
94
|
)}
|
|
95
95
|
data-slot="alert-dialog-header"
|
package/src/components/alert.tsx
CHANGED
|
@@ -83,7 +83,7 @@ type AlertActionProps = ComponentProps<"div">;
|
|
|
83
83
|
* @since 0.3.16-canary.0
|
|
84
84
|
*/
|
|
85
85
|
function AlertAction({ className, ...props }: AlertActionProps): JSX.Element {
|
|
86
|
-
return <div className={cn("absolute top-2.5
|
|
86
|
+
return <div className={cn("absolute end-3 top-2.5", className)} data-slot="alert-action" {...props} />;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/* -----------------------------------------------------------------------------
|
|
@@ -94,7 +94,7 @@ function AvatarBadge({ className, ...props }: AvatarBadgeProps): JSX.Element {
|
|
|
94
94
|
return (
|
|
95
95
|
<span
|
|
96
96
|
className={cn(
|
|
97
|
-
"absolute
|
|
97
|
+
"absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
98
98
|
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
99
99
|
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
100
100
|
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
@@ -76,7 +76,7 @@ function Calendar({
|
|
|
76
76
|
"font-medium select-none",
|
|
77
77
|
captionLayout === "label"
|
|
78
78
|
? "text-sm"
|
|
79
|
-
: "flex h-8 items-center gap-1 rounded-(--cell-radius)
|
|
79
|
+
: "flex h-8 items-center gap-1 rounded-(--cell-radius) ps-2 pe-1 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
80
80
|
defaultClassNames.caption_label,
|
|
81
81
|
),
|
|
82
82
|
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
@@ -89,19 +89,19 @@ function Calendar({
|
|
|
89
89
|
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
90
90
|
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
91
91
|
day: cn(
|
|
92
|
-
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-
|
|
92
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)",
|
|
93
93
|
props.showWeekNumber
|
|
94
|
-
? "[&:nth-child(2)[data-selected=true]_button]:rounded-
|
|
95
|
-
: "[&:first-child[data-selected=true]_button]:rounded-
|
|
94
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)"
|
|
95
|
+
: "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)",
|
|
96
96
|
defaultClassNames.day,
|
|
97
97
|
),
|
|
98
98
|
range_start: cn(
|
|
99
|
-
"relative isolate z-0 rounded-
|
|
99
|
+
"relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted",
|
|
100
100
|
defaultClassNames.range_start,
|
|
101
101
|
),
|
|
102
102
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
103
103
|
range_end: cn(
|
|
104
|
-
"relative isolate z-0 rounded-
|
|
104
|
+
"relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted",
|
|
105
105
|
defaultClassNames.range_end,
|
|
106
106
|
),
|
|
107
107
|
today: cn(
|
|
@@ -196,7 +196,7 @@ function CalendarDayButton({ className, day, locale, modifiers, ...props }: Cale
|
|
|
196
196
|
<Button
|
|
197
197
|
ref={ref}
|
|
198
198
|
className={cn(
|
|
199
|
-
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-
|
|
199
|
+
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
200
200
|
defaultClassNames.day,
|
|
201
201
|
className,
|
|
202
202
|
)}
|
|
@@ -204,7 +204,7 @@ function CarouselContent({
|
|
|
204
204
|
<div
|
|
205
205
|
className={cn(
|
|
206
206
|
"flex",
|
|
207
|
-
orientation === "horizontal" ? "-
|
|
207
|
+
orientation === "horizontal" ? "-ms-4" : "-mt-4 h-full flex-col",
|
|
208
208
|
classNames?.content,
|
|
209
209
|
className,
|
|
210
210
|
)}
|
|
@@ -234,7 +234,7 @@ function CarouselItem({ __scopeCarousel, className, ...props }: ScopedProps<Caro
|
|
|
234
234
|
return (
|
|
235
235
|
<div
|
|
236
236
|
aria-roledescription="slide"
|
|
237
|
-
className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "
|
|
237
|
+
className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "ps-4" : "pt-4", className)}
|
|
238
238
|
data-slot="carousel-item"
|
|
239
239
|
role="group"
|
|
240
240
|
{...props}
|
|
@@ -271,8 +271,8 @@ function CarouselPrevious({
|
|
|
271
271
|
className={cn(
|
|
272
272
|
"absolute touch-manipulation rounded-full",
|
|
273
273
|
orientation === "horizontal"
|
|
274
|
-
? "top-1/2 -
|
|
275
|
-
: "-top-12
|
|
274
|
+
? "-start-12 top-1/2 -translate-y-1/2 active:not-aria-[haspopup]:translate-y-[calc(-50%+1px)]"
|
|
275
|
+
: "start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2",
|
|
276
276
|
className,
|
|
277
277
|
)}
|
|
278
278
|
data-slot="carousel-previous"
|
|
@@ -317,8 +317,8 @@ function CarouselNext({
|
|
|
317
317
|
className={cn(
|
|
318
318
|
"absolute touch-manipulation rounded-full",
|
|
319
319
|
orientation === "horizontal"
|
|
320
|
-
? "top-1/2 -
|
|
321
|
-
: "-bottom-12
|
|
320
|
+
? "-end-12 top-1/2 -translate-y-1/2 active:not-aria-[haspopup]:translate-y-[calc(-50%+1px)]"
|
|
321
|
+
: "start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2",
|
|
322
322
|
className,
|
|
323
323
|
)}
|
|
324
324
|
data-slot="carousel-next"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckIcon } from "lucide-react";
|
|
1
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
2
2
|
import type { ComponentProps, JSX } from "react";
|
|
3
3
|
|
|
4
4
|
import { Label } from "#/components/label";
|
|
@@ -39,24 +39,25 @@ function CheckboxCardsItem({ checkboxClassName, children, className, ...props }:
|
|
|
39
39
|
return (
|
|
40
40
|
<Label
|
|
41
41
|
className={cn(
|
|
42
|
-
"flex items-start gap-3 rounded-md border border-input p-3 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5",
|
|
42
|
+
"flex items-start gap-3 rounded-md border border-input p-3 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-data-indeterminate:border-primary/30 has-data-indeterminate:bg-primary/5",
|
|
43
43
|
className,
|
|
44
44
|
)}
|
|
45
45
|
data-slot="checkbox-card"
|
|
46
46
|
>
|
|
47
47
|
<CheckboxGroupPrimitive.Item
|
|
48
48
|
className={cn(
|
|
49
|
-
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
49
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary",
|
|
50
50
|
checkboxClassName,
|
|
51
51
|
)}
|
|
52
52
|
data-slot="checkbox-card-item"
|
|
53
53
|
{...props}
|
|
54
54
|
>
|
|
55
55
|
<CheckboxGroupPrimitive.CheckboxGroupIndicator
|
|
56
|
-
className="grid place-content-center text-current
|
|
56
|
+
className="group/checkbox-card-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5"
|
|
57
57
|
data-slot="checkbox-card-indicator"
|
|
58
58
|
>
|
|
59
|
-
<CheckIcon />
|
|
59
|
+
<CheckIcon className="group-data-indeterminate/checkbox-card-indicator:hidden" />
|
|
60
|
+
<MinusIcon className="hidden group-data-indeterminate/checkbox-card-indicator:block" />
|
|
60
61
|
</CheckboxGroupPrimitive.CheckboxGroupIndicator>
|
|
61
62
|
</CheckboxGroupPrimitive.Item>
|
|
62
63
|
{children}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckIcon } from "lucide-react";
|
|
1
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
2
2
|
import type { ComponentProps, JSX } from "react";
|
|
3
3
|
|
|
4
4
|
import { cn } from "#/lib/utils";
|
|
@@ -36,17 +36,18 @@ function CheckboxGroupItem({ className, ...props }: CheckboxGroupItemProps): JSX
|
|
|
36
36
|
return (
|
|
37
37
|
<CheckboxGroupPrimitive.Item
|
|
38
38
|
className={cn(
|
|
39
|
-
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
39
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary",
|
|
40
40
|
className,
|
|
41
41
|
)}
|
|
42
42
|
data-slot="checkbox-group-item"
|
|
43
43
|
{...props}
|
|
44
44
|
>
|
|
45
45
|
<CheckboxGroupPrimitive.CheckboxGroupIndicator
|
|
46
|
-
className="grid place-content-center text-current
|
|
46
|
+
className="group/checkbox-group-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5"
|
|
47
47
|
data-slot="checkbox-group-indicator"
|
|
48
48
|
>
|
|
49
|
-
<CheckIcon />
|
|
49
|
+
<CheckIcon className="group-data-indeterminate/checkbox-group-indicator:hidden" />
|
|
50
|
+
<MinusIcon className="hidden group-data-indeterminate/checkbox-group-indicator:block" />
|
|
50
51
|
</CheckboxGroupPrimitive.CheckboxGroupIndicator>
|
|
51
52
|
</CheckboxGroupPrimitive.Item>
|
|
52
53
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckIcon } from "lucide-react";
|
|
1
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
2
2
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
3
|
import type { ComponentProps, JSX } from "react";
|
|
4
4
|
|
|
@@ -20,17 +20,18 @@ function Checkbox({ className, ...props }: CheckboxProps): JSX.Element {
|
|
|
20
20
|
return (
|
|
21
21
|
<CheckboxPrimitive.Root
|
|
22
22
|
className={cn(
|
|
23
|
-
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
23
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary",
|
|
24
24
|
className,
|
|
25
25
|
)}
|
|
26
26
|
data-slot="checkbox"
|
|
27
27
|
{...props}
|
|
28
28
|
>
|
|
29
29
|
<CheckboxPrimitive.Indicator
|
|
30
|
-
className="grid place-content-center text-current
|
|
30
|
+
className="group/checkbox-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5"
|
|
31
31
|
data-slot="checkbox-indicator"
|
|
32
32
|
>
|
|
33
|
-
<CheckIcon />
|
|
33
|
+
<CheckIcon className="group-data-indeterminate/checkbox-indicator:hidden" />
|
|
34
|
+
<MinusIcon className="hidden group-data-indeterminate/checkbox-indicator:block" />
|
|
34
35
|
</CheckboxPrimitive.Indicator>
|
|
35
36
|
</CheckboxPrimitive.Root>
|
|
36
37
|
);
|
|
@@ -88,7 +88,7 @@ type CommandInputProps = ComponentProps<typeof CommandPrimitive.Input>;
|
|
|
88
88
|
function CommandInput({ className, ...props }: CommandInputProps): JSX.Element {
|
|
89
89
|
return (
|
|
90
90
|
<div className="p-1 pb-0" data-slot="command-input-wrapper">
|
|
91
|
-
<InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:
|
|
91
|
+
<InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:ps-2!">
|
|
92
92
|
<CommandPrimitive.Input
|
|
93
93
|
className={cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className)}
|
|
94
94
|
data-slot="command-input"
|
|
@@ -216,7 +216,7 @@ function CommandItem({ children, className, ...props }: CommandItemProps): JSX.E
|
|
|
216
216
|
{...props}
|
|
217
217
|
>
|
|
218
218
|
{children}
|
|
219
|
-
<CheckIcon className="
|
|
219
|
+
<CheckIcon className="ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-checked/command-item:opacity-100" />
|
|
220
220
|
</CommandPrimitive.Item>
|
|
221
221
|
);
|
|
222
222
|
}
|
|
@@ -259,7 +259,7 @@ function CommandShortcut({ className, ...props }: CommandShortcutProps): JSX.Ele
|
|
|
259
259
|
return (
|
|
260
260
|
<span
|
|
261
261
|
className={cn(
|
|
262
|
-
"
|
|
262
|
+
"ms-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
263
263
|
className,
|
|
264
264
|
)}
|
|
265
265
|
data-slot="command-shortcut"
|
|
@@ -108,7 +108,7 @@ function ContextMenuSubTrigger({ children, className, inset, ...props }: Context
|
|
|
108
108
|
return (
|
|
109
109
|
<ContextMenuPrimitive.SubTrigger
|
|
110
110
|
className={cn(
|
|
111
|
-
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:
|
|
111
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
112
112
|
className,
|
|
113
113
|
)}
|
|
114
114
|
data-inset={inset}
|
|
@@ -116,7 +116,7 @@ function ContextMenuSubTrigger({ children, className, inset, ...props }: Context
|
|
|
116
116
|
{...props}
|
|
117
117
|
>
|
|
118
118
|
{children}
|
|
119
|
-
<ChevronRightIcon className="
|
|
119
|
+
<ChevronRightIcon className="ms-auto rtl:rotate-180" />
|
|
120
120
|
</ContextMenuPrimitive.SubTrigger>
|
|
121
121
|
);
|
|
122
122
|
}
|
|
@@ -192,7 +192,7 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }: Co
|
|
|
192
192
|
return (
|
|
193
193
|
<ContextMenuPrimitive.Item
|
|
194
194
|
className={cn(
|
|
195
|
-
"group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:
|
|
195
|
+
"group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
196
196
|
className,
|
|
197
197
|
)}
|
|
198
198
|
data-inset={inset}
|
|
@@ -228,14 +228,14 @@ function ContextMenuCheckboxItem({
|
|
|
228
228
|
<ContextMenuPrimitive.CheckboxItem
|
|
229
229
|
checked={checked}
|
|
230
230
|
className={cn(
|
|
231
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
231
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
232
232
|
className,
|
|
233
233
|
)}
|
|
234
234
|
data-inset={inset}
|
|
235
235
|
data-slot="context-menu-checkbox-item"
|
|
236
236
|
{...props}
|
|
237
237
|
>
|
|
238
|
-
<span className="pointer-events-none absolute
|
|
238
|
+
<span className="pointer-events-none absolute end-2">
|
|
239
239
|
<ContextMenuPrimitive.ItemIndicator>
|
|
240
240
|
<CheckIcon />
|
|
241
241
|
</ContextMenuPrimitive.ItemIndicator>
|
|
@@ -263,14 +263,14 @@ function ContextMenuRadioItem({ children, className, inset, ...props }: ContextM
|
|
|
263
263
|
return (
|
|
264
264
|
<ContextMenuPrimitive.RadioItem
|
|
265
265
|
className={cn(
|
|
266
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
266
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
267
267
|
className,
|
|
268
268
|
)}
|
|
269
269
|
data-inset={inset}
|
|
270
270
|
data-slot="context-menu-radio-item"
|
|
271
271
|
{...props}
|
|
272
272
|
>
|
|
273
|
-
<span className="pointer-events-none absolute
|
|
273
|
+
<span className="pointer-events-none absolute end-2">
|
|
274
274
|
<ContextMenuPrimitive.ItemIndicator>
|
|
275
275
|
<CheckIcon />
|
|
276
276
|
</ContextMenuPrimitive.ItemIndicator>
|
|
@@ -297,7 +297,7 @@ interface ContextMenuLabelProps extends ComponentProps<typeof ContextMenuPrimiti
|
|
|
297
297
|
function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): JSX.Element {
|
|
298
298
|
return (
|
|
299
299
|
<ContextMenuPrimitive.Label
|
|
300
|
-
className={cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:
|
|
300
|
+
className={cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8", className)}
|
|
301
301
|
data-inset={inset}
|
|
302
302
|
data-slot="context-menu-label"
|
|
303
303
|
{...props}
|
|
@@ -343,7 +343,7 @@ function ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps):
|
|
|
343
343
|
return (
|
|
344
344
|
<span
|
|
345
345
|
className={cn(
|
|
346
|
-
"
|
|
346
|
+
"ms-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
347
347
|
className,
|
|
348
348
|
)}
|
|
349
349
|
data-slot="context-menu-shortcut"
|
|
@@ -62,7 +62,7 @@ function DialogContent({ children, className, showCloseButton = true, ...props }
|
|
|
62
62
|
/>
|
|
63
63
|
<DialogPrimitive.Content
|
|
64
64
|
className={cn(
|
|
65
|
-
"fixed
|
|
65
|
+
"fixed start-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 ease-ui outline-none sm:max-w-md rtl:translate-x-1/2 data-open:animate-in data-open:animation-duration-overlay-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-overlay-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
66
66
|
className,
|
|
67
67
|
)}
|
|
68
68
|
data-slot="dialog-content"
|
|
@@ -71,7 +71,7 @@ function DialogContent({ children, className, showCloseButton = true, ...props }
|
|
|
71
71
|
{children}
|
|
72
72
|
{showCloseButton ? (
|
|
73
73
|
<DialogPrimitive.Close asChild data-slot="dialog-close">
|
|
74
|
-
<Button className="absolute
|
|
74
|
+
<Button className="absolute end-4 top-4" size="icon-sm" variant="ghost">
|
|
75
75
|
<XIcon />
|
|
76
76
|
<span className="sr-only">Close</span>
|
|
77
77
|
</Button>
|
|
@@ -60,7 +60,7 @@ function DrawerContent({ children, className, ...props }: DrawerContentProps): J
|
|
|
60
60
|
/>
|
|
61
61
|
<DrawerPrimitive.Content
|
|
62
62
|
className={cn(
|
|
63
|
-
"group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:
|
|
63
|
+
"group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
64
64
|
className,
|
|
65
65
|
)}
|
|
66
66
|
data-slot="drawer-content"
|
|
@@ -89,7 +89,7 @@ function DrawerHeader({ className, ...props }: DrawerHeaderProps): JSX.Element {
|
|
|
89
89
|
return (
|
|
90
90
|
<div
|
|
91
91
|
className={cn(
|
|
92
|
-
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-
|
|
92
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-start",
|
|
93
93
|
className,
|
|
94
94
|
)}
|
|
95
95
|
data-slot="drawer-header"
|
|
@@ -102,7 +102,7 @@ function DropdownMenuSubTrigger({ children, className, inset, ...props }: Dropdo
|
|
|
102
102
|
return (
|
|
103
103
|
<DropdownMenuPrimitive.SubTrigger
|
|
104
104
|
className={cn(
|
|
105
|
-
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:
|
|
105
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
106
106
|
className,
|
|
107
107
|
)}
|
|
108
108
|
data-inset={inset}
|
|
@@ -110,7 +110,7 @@ function DropdownMenuSubTrigger({ children, className, inset, ...props }: Dropdo
|
|
|
110
110
|
{...props}
|
|
111
111
|
>
|
|
112
112
|
{children}
|
|
113
|
-
<ChevronRightIcon className="
|
|
113
|
+
<ChevronRightIcon className="ms-auto rtl:rotate-180" />
|
|
114
114
|
</DropdownMenuPrimitive.SubTrigger>
|
|
115
115
|
);
|
|
116
116
|
}
|
|
@@ -195,7 +195,7 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }: D
|
|
|
195
195
|
return (
|
|
196
196
|
<DropdownMenuPrimitive.Item
|
|
197
197
|
className={cn(
|
|
198
|
-
"group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:
|
|
198
|
+
"group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
199
199
|
className,
|
|
200
200
|
)}
|
|
201
201
|
data-inset={inset}
|
|
@@ -231,7 +231,7 @@ function DropdownMenuCheckboxItem({
|
|
|
231
231
|
<DropdownMenuPrimitive.CheckboxItem
|
|
232
232
|
checked={checked}
|
|
233
233
|
className={cn(
|
|
234
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
234
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
235
235
|
className,
|
|
236
236
|
)}
|
|
237
237
|
data-inset={inset}
|
|
@@ -239,7 +239,7 @@ function DropdownMenuCheckboxItem({
|
|
|
239
239
|
{...props}
|
|
240
240
|
>
|
|
241
241
|
<span
|
|
242
|
-
className="pointer-events-none absolute
|
|
242
|
+
className="pointer-events-none absolute end-2 flex items-center justify-center"
|
|
243
243
|
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
244
244
|
>
|
|
245
245
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -269,7 +269,7 @@ function DropdownMenuRadioItem({ children, className, inset, ...props }: Dropdow
|
|
|
269
269
|
return (
|
|
270
270
|
<DropdownMenuPrimitive.RadioItem
|
|
271
271
|
className={cn(
|
|
272
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
272
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
273
273
|
className,
|
|
274
274
|
)}
|
|
275
275
|
data-inset={inset}
|
|
@@ -277,7 +277,7 @@ function DropdownMenuRadioItem({ children, className, inset, ...props }: Dropdow
|
|
|
277
277
|
{...props}
|
|
278
278
|
>
|
|
279
279
|
<span
|
|
280
|
-
className="pointer-events-none absolute
|
|
280
|
+
className="pointer-events-none absolute end-2 flex items-center justify-center"
|
|
281
281
|
data-slot="dropdown-menu-radio-item-indicator"
|
|
282
282
|
>
|
|
283
283
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -306,7 +306,7 @@ interface DropdownMenuLabelProps extends ComponentProps<typeof DropdownMenuPrimi
|
|
|
306
306
|
function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): JSX.Element {
|
|
307
307
|
return (
|
|
308
308
|
<DropdownMenuPrimitive.Label
|
|
309
|
-
className={cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:
|
|
309
|
+
className={cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8", className)}
|
|
310
310
|
data-inset={inset}
|
|
311
311
|
data-slot="dropdown-menu-label"
|
|
312
312
|
{...props}
|
|
@@ -352,7 +352,7 @@ function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps
|
|
|
352
352
|
return (
|
|
353
353
|
<span
|
|
354
354
|
className={cn(
|
|
355
|
-
"
|
|
355
|
+
"ms-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
356
356
|
className,
|
|
357
357
|
)}
|
|
358
358
|
data-slot="dropdown-menu-shortcut"
|
package/src/components/field.tsx
CHANGED
|
@@ -195,7 +195,7 @@ function FieldDescription({ className, ...props }: FieldDescriptionProps): JSX.E
|
|
|
195
195
|
return (
|
|
196
196
|
<p
|
|
197
197
|
className={cn(
|
|
198
|
-
"text-
|
|
198
|
+
"text-start text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
199
199
|
"last:mt-0 nth-last-2:-mt-1",
|
|
200
200
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
201
201
|
className,
|
|
@@ -274,7 +274,7 @@ function FieldError({ children, className, errors, ...props }: FieldErrorProps):
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
return (
|
|
277
|
-
<ul className="
|
|
277
|
+
<ul className="ms-4 flex list-disc flex-col gap-1">
|
|
278
278
|
{uniqueErrors.map((error) => (error?.message ? <li key={error.message}>{error.message}</li> : null))}
|
|
279
279
|
</ul>
|
|
280
280
|
);
|
|
@@ -81,7 +81,7 @@ function InputOTPSlot({ className, index, ...props }: InputOTPSlotProps): JSX.El
|
|
|
81
81
|
return (
|
|
82
82
|
<div
|
|
83
83
|
className={cn(
|
|
84
|
-
"relative flex size-9 items-center justify-center border-y border-
|
|
84
|
+
"relative flex size-9 items-center justify-center border-y border-e border-input text-sm shadow-xs transition-all outline-none first:rounded-s-md first:border-s last:rounded-e-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
|
|
85
85
|
className,
|
|
86
86
|
)}
|
|
87
87
|
data-active={isActive}
|
package/src/components/item.tsx
CHANGED
|
@@ -166,7 +166,7 @@ function ItemDescription({ className, ...props }: ItemDescriptionProps): JSX.Ele
|
|
|
166
166
|
return (
|
|
167
167
|
<p
|
|
168
168
|
className={cn(
|
|
169
|
-
"line-clamp-2 text-
|
|
169
|
+
"line-clamp-2 text-start text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
170
170
|
className,
|
|
171
171
|
)}
|
|
172
172
|
data-slot="item-description"
|