@codefast/ui 0.0.60 → 0.0.62
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/{chunk-FJH7XRCZ.mjs → chunk-3WHWDZWS.mjs} +2 -2
- package/dist/{chunk-FJH7XRCZ.mjs.map → chunk-3WHWDZWS.mjs.map} +1 -1
- package/dist/{chunk-BM5KYF6Y.mjs → chunk-4WTCCXNP.mjs} +2 -2
- package/dist/{chunk-BM5KYF6Y.mjs.map → chunk-4WTCCXNP.mjs.map} +1 -1
- package/dist/{chunk-RHFF4JNH.js → chunk-63XEM5BB.js} +2 -2
- package/dist/{chunk-RHFF4JNH.js.map → chunk-63XEM5BB.js.map} +1 -1
- package/dist/{chunk-I7YJNEPR.js → chunk-ITKVRO7K.js} +2 -2
- package/dist/{chunk-I7YJNEPR.js.map → chunk-ITKVRO7K.js.map} +1 -1
- package/dist/{chunk-QXZKUXR2.mjs → chunk-JRRZS67P.mjs} +2 -2
- package/dist/{chunk-QXZKUXR2.mjs.map → chunk-JRRZS67P.mjs.map} +1 -1
- package/dist/{chunk-P2RMYMNK.js → chunk-ZMF2SRE5.js} +2 -2
- package/dist/chunk-ZMF2SRE5.js.map +1 -0
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.mjs +1 -1
- package/dist/react/alert.js +1 -1
- package/dist/react/alert.js.map +1 -1
- package/dist/react/alert.mjs +1 -1
- package/dist/react/alert.mjs.map +1 -1
- package/dist/react/breadcrumb.js +1 -1
- package/dist/react/breadcrumb.js.map +1 -1
- package/dist/react/breadcrumb.mjs +1 -1
- package/dist/react/breadcrumb.mjs.map +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/button.mjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/calendar.js.map +1 -1
- package/dist/react/calendar.mjs +1 -1
- package/dist/react/calendar.mjs.map +1 -1
- package/dist/react/carousel.d.mts +1 -1
- package/dist/react/carousel.d.ts +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.js.map +1 -1
- package/dist/react/carousel.mjs +1 -1
- package/dist/react/carousel.mjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.mjs +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.mjs +1 -1
- package/dist/react/checkbox-group.primitive.d.mts +9 -9
- package/dist/react/checkbox-group.primitive.d.ts +9 -9
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox-group.primitive.mjs +1 -1
- package/dist/react/context-menu.js +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/context-menu.mjs +1 -1
- package/dist/react/context-menu.mjs.map +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.js.map +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/data-table.mjs.map +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/dropdown-menu.mjs +1 -1
- package/dist/react/form.d.mts +1 -1
- package/dist/react/form.d.ts +1 -1
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/form.mjs +1 -1
- package/dist/react/form.mjs.map +1 -1
- package/dist/react/hover-card.js +1 -1
- package/dist/react/hover-card.js.map +1 -1
- package/dist/react/hover-card.mjs +1 -1
- package/dist/react/hover-card.mjs.map +1 -1
- package/dist/react/input-otp.js +1 -1
- package/dist/react/input-otp.js.map +1 -1
- package/dist/react/input-otp.mjs +1 -1
- package/dist/react/input-otp.mjs.map +1 -1
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/input.mjs +1 -1
- package/dist/react/input.mjs.map +1 -1
- package/dist/react/menubar.js +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/menubar.mjs +1 -1
- package/dist/react/menubar.mjs.map +1 -1
- package/dist/react/navigation-menu.js +1 -1
- package/dist/react/navigation-menu.js.map +1 -1
- package/dist/react/navigation-menu.mjs +1 -1
- package/dist/react/navigation-menu.mjs.map +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.js.map +1 -1
- package/dist/react/pagination.mjs +1 -1
- package/dist/react/pagination.mjs.map +1 -1
- package/dist/react/popover.js +1 -1
- package/dist/react/popover.js.map +1 -1
- package/dist/react/popover.mjs +1 -1
- package/dist/react/popover.mjs.map +1 -1
- package/dist/react/radio.js +1 -1
- package/dist/react/radio.js.map +1 -1
- package/dist/react/radio.mjs +1 -1
- package/dist/react/radio.mjs.map +1 -1
- package/dist/react/scroll-area.js +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/scroll-area.mjs +1 -1
- package/dist/react/scroll-area.mjs.map +1 -1
- package/dist/react/separator.js +1 -1
- package/dist/react/separator.js.map +1 -1
- package/dist/react/separator.mjs +1 -1
- package/dist/react/separator.mjs.map +1 -1
- package/dist/react/sonner.js +1 -1
- package/dist/react/sonner.js.map +1 -1
- package/dist/react/sonner.mjs +1 -1
- package/dist/react/sonner.mjs.map +1 -1
- package/dist/react/textarea.js +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/textarea.mjs +1 -1
- package/dist/react/textarea.mjs.map +1 -1
- package/dist/react/tooltip.js +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/react/tooltip.mjs +1 -1
- package/dist/react/tooltip.mjs.map +1 -1
- package/package.json +9 -9
- package/src/react/alert.tsx +1 -1
- package/src/react/breadcrumb.tsx +4 -4
- package/src/react/button.tsx +1 -1
- package/src/react/calendar.tsx +1 -1
- package/src/react/carousel.tsx +17 -17
- package/src/react/checkbox-group.primitive.tsx +16 -16
- package/src/react/context-menu.tsx +1 -1
- package/src/react/data-table.tsx +13 -13
- package/src/react/dropdown-menu.tsx +2 -2
- package/src/react/form.tsx +4 -4
- package/src/react/hover-card.tsx +1 -1
- package/src/react/input-otp.tsx +1 -1
- package/src/react/input.tsx +1 -1
- package/src/react/menubar.tsx +2 -2
- package/src/react/navigation-menu.tsx +2 -2
- package/src/react/pagination.tsx +3 -3
- package/src/react/popover.tsx +1 -1
- package/src/react/radio.tsx +2 -2
- package/src/react/scroll-area.tsx +1 -1
- package/src/react/separator.tsx +1 -1
- package/src/react/sonner.tsx +1 -1
- package/src/react/textarea.tsx +1 -1
- package/src/react/tooltip.tsx +1 -1
- package/dist/chunk-P2RMYMNK.js.map +0 -1
package/dist/react/tooltip.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{b as p}from"../chunk-LEUB3C3L.mjs";import*as a from"react";import*as t from"@radix-ui/react-tooltip";import{jsx as r}from"react/jsx-runtime";var m=t.Provider,T=t.Root,P=t.Trigger,d=a.forwardRef(({className:o,sideOffset:e=6,...i},l)=>r(t.Portal,{children:r(t.Content,{ref:l,
|
|
1
|
+
"use client";import{b as p}from"../chunk-LEUB3C3L.mjs";import*as a from"react";import*as t from"@radix-ui/react-tooltip";import{jsx as r}from"react/jsx-runtime";var m=t.Provider,T=t.Root,P=t.Trigger,d=a.forwardRef(({className:o,sideOffset:e=6,...i},l)=>r(t.Portal,{children:r(t.Content,{ref:l,className:p("bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs",o),sideOffset:e,...i})}));d.displayName=t.Content.displayName;var s=a.forwardRef(({className:o,...e},i)=>r(t.Arrow,{ref:i,className:p("fill-primary",o),...e}));s.displayName=t.Arrow.displayName;export{T as Tooltip,s as TooltipArrow,d as TooltipContent,m as TooltipProvider,P as TooltipTrigger};
|
|
2
2
|
//# sourceMappingURL=tooltip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n
|
|
1
|
+
{"version":3,"sources":["../../src/react/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </TooltipPrimitive.Portal>\n ),\n);\n\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipArrow\n * -------------------------------------------------------------------------- */\n\ntype TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;\ntype TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;\n\nconst TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn('fill-primary', className)} {...props} />\n));\n\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipArrow,\n type TooltipProviderProps,\n type TooltipProps,\n type TooltipTriggerProps,\n type TooltipContentProps,\n type TooltipArrowProps,\n};\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAkC5B,cAAAC,MAAA,oBA1BN,IAAMC,EAAmC,WAOnCC,EAA2B,OAO3BC,EAAkC,UASlCC,EAAuB,aAC3B,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IACxCR,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKQ,EACL,UAAWC,EACT,qwBACAJ,CACF,EACA,WAAYC,EACX,GAAGC,EACN,EACF,CAEJ,EAEAH,EAAe,YAA+B,UAAQ,YAStD,IAAMM,EAAqB,aAAmD,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACtGR,EAAkB,QAAjB,CAAuB,IAAKQ,EAAK,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CACxF,EAEDG,EAAa,YAA+B,QAAM","names":["React","TooltipPrimitive","jsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","ref","cn","TooltipArrow"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.62",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -384,31 +384,31 @@
|
|
|
384
384
|
"@radix-ui/react-tooltip": "^1.1.2",
|
|
385
385
|
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
386
386
|
"@radix-ui/react-visually-hidden": "^1.1.0",
|
|
387
|
-
"@tanstack/react-table": "^8.
|
|
387
|
+
"@tanstack/react-table": "^8.19.2",
|
|
388
388
|
"cmdk": "^1.0.0",
|
|
389
389
|
"cva": "1.0.0-beta.1",
|
|
390
|
-
"embla-carousel-react": "^8.1.
|
|
390
|
+
"embla-carousel-react": "^8.1.6",
|
|
391
391
|
"input-otp": "^1.2.4",
|
|
392
392
|
"next-themes": "^0.3.0",
|
|
393
393
|
"react-day-picker": "^8.10.1",
|
|
394
|
-
"react-hook-form": "^7.52.
|
|
395
|
-
"react-resizable-panels": "^2.0.
|
|
394
|
+
"react-hook-form": "^7.52.1",
|
|
395
|
+
"react-resizable-panels": "^2.0.20",
|
|
396
396
|
"sonner": "^1.5.0",
|
|
397
397
|
"tailwind-merge": "^2.3.0",
|
|
398
398
|
"vaul": "^0.9.1"
|
|
399
399
|
},
|
|
400
400
|
"devDependencies": {
|
|
401
401
|
"@types/eslint": "^8.56.10",
|
|
402
|
-
"@types/node": "^20.14.
|
|
402
|
+
"@types/node": "^20.14.10",
|
|
403
403
|
"@types/react": "^18.3.3",
|
|
404
404
|
"autoprefixer": "^10.4.19",
|
|
405
405
|
"eslint": "^8.57.0",
|
|
406
|
-
"postcss": "^8.4.
|
|
406
|
+
"postcss": "^8.4.39",
|
|
407
407
|
"react": "^18.3.1",
|
|
408
408
|
"tailwindcss": "^3.4.4",
|
|
409
409
|
"tsup": "^8.1.0",
|
|
410
|
-
"typescript": "^5.5.
|
|
411
|
-
"@codefast/eslint-config": "0.0.
|
|
410
|
+
"typescript": "^5.5.3",
|
|
411
|
+
"@codefast/eslint-config": "0.0.30",
|
|
412
412
|
"@codefast/typescript-config": "0.0.2"
|
|
413
413
|
},
|
|
414
414
|
"peerDependencies": {
|
package/src/react/alert.tsx
CHANGED
|
@@ -29,7 +29,7 @@ type AlertElement = HTMLDivElement;
|
|
|
29
29
|
type AlertProps = React.HTMLAttributes<HTMLDivElement> & AlertVariantsProps;
|
|
30
30
|
|
|
31
31
|
const Alert = React.forwardRef<AlertElement, AlertProps>(({ className, variant, ...props }, ref) => (
|
|
32
|
-
<div ref={ref}
|
|
32
|
+
<div ref={ref} className={alertVariants({ variant, className })} role="alert" {...props} />
|
|
33
33
|
));
|
|
34
34
|
|
|
35
35
|
Alert.displayName = 'Alert';
|
package/src/react/breadcrumb.tsx
CHANGED
|
@@ -82,10 +82,10 @@ type BreadcrumbPageProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
|
82
82
|
const BreadcrumbPage = React.forwardRef<BreadcrumbPageElement, BreadcrumbPageProps>(({ className, ...props }, ref) => (
|
|
83
83
|
<span
|
|
84
84
|
ref={ref}
|
|
85
|
-
role="link"
|
|
86
|
-
aria-disabled="true"
|
|
87
85
|
aria-current="page"
|
|
86
|
+
aria-disabled="true"
|
|
88
87
|
className={cn('text-foreground font-normal', className)}
|
|
88
|
+
role="link"
|
|
89
89
|
{...props}
|
|
90
90
|
/>
|
|
91
91
|
));
|
|
@@ -100,7 +100,7 @@ type BreadcrumbSeparatorProps = React.LiHTMLAttributes<HTMLLIElement>;
|
|
|
100
100
|
|
|
101
101
|
function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): React.JSX.Element {
|
|
102
102
|
return (
|
|
103
|
-
<li
|
|
103
|
+
<li aria-hidden="true" className={cn('[&>svg]:size-3.5', className)} role="presentation" {...props}>
|
|
104
104
|
{children ?? <ChevronRightIcon />}
|
|
105
105
|
</li>
|
|
106
106
|
);
|
|
@@ -115,9 +115,9 @@ type BreadcrumbEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
|
115
115
|
function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): React.JSX.Element {
|
|
116
116
|
return (
|
|
117
117
|
<span
|
|
118
|
-
role="presentation"
|
|
119
118
|
aria-hidden="true"
|
|
120
119
|
className={cn('flex size-4 items-center justify-center', className)}
|
|
120
|
+
role="presentation"
|
|
121
121
|
{...props}
|
|
122
122
|
>
|
|
123
123
|
<DotsHorizontalIcon className="size-4" />
|
package/src/react/button.tsx
CHANGED
|
@@ -64,8 +64,8 @@ const Button = React.forwardRef<ButtonElement, ButtonProps>(
|
|
|
64
64
|
return (
|
|
65
65
|
<Component
|
|
66
66
|
ref={ref}
|
|
67
|
-
type={asChild ? undefined : 'button'}
|
|
68
67
|
className={buttonVariants({ variant, size, loading, className })}
|
|
68
|
+
type={asChild ? undefined : 'button'}
|
|
69
69
|
{...props}
|
|
70
70
|
disabled={disabled}
|
|
71
71
|
>
|
package/src/react/calendar.tsx
CHANGED
|
@@ -23,7 +23,6 @@ type CalendarProps = DayPickerProps;
|
|
|
23
23
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps): React.JSX.Element {
|
|
24
24
|
return (
|
|
25
25
|
<DayPicker
|
|
26
|
-
showOutsideDays={showOutsideDays}
|
|
27
26
|
className={cn('p-3', className)}
|
|
28
27
|
classNames={{
|
|
29
28
|
months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
|
|
@@ -67,6 +66,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
|
|
|
67
66
|
IconLeft: ChevronLeft,
|
|
68
67
|
IconRight: ChevronRight,
|
|
69
68
|
}}
|
|
69
|
+
showOutsideDays={showOutsideDays}
|
|
70
70
|
{...props}
|
|
71
71
|
/>
|
|
72
72
|
);
|
package/src/react/carousel.tsx
CHANGED
|
@@ -24,18 +24,18 @@ type CarouselPlugin = UseCarouselParameters[1];
|
|
|
24
24
|
|
|
25
25
|
interface BaseCarouselProps {
|
|
26
26
|
opts?: CarouselOptions;
|
|
27
|
-
plugins?: CarouselPlugin;
|
|
28
27
|
orientation?: 'horizontal' | 'vertical';
|
|
28
|
+
plugins?: CarouselPlugin;
|
|
29
29
|
setApi?: (api: CarouselApi) => void;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
type CarouselContextValue = {
|
|
33
|
-
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
34
33
|
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
35
|
-
scrollPrev: () => void;
|
|
36
|
-
scrollNext: () => void;
|
|
37
|
-
canScrollPrev: boolean;
|
|
38
34
|
canScrollNext: boolean;
|
|
35
|
+
canScrollPrev: boolean;
|
|
36
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
37
|
+
scrollNext: () => void;
|
|
38
|
+
scrollPrev: () => void;
|
|
39
39
|
} & BaseCarouselProps;
|
|
40
40
|
|
|
41
41
|
const [CarouselProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);
|
|
@@ -117,22 +117,22 @@ const Carousel = React.forwardRef<CarouselElement, CarouselProps>(
|
|
|
117
117
|
|
|
118
118
|
return (
|
|
119
119
|
<CarouselProvider
|
|
120
|
-
scope={__scopeCarousel}
|
|
121
|
-
carouselRef={carouselRef}
|
|
122
120
|
api={api}
|
|
121
|
+
canScrollNext={canScrollNext}
|
|
122
|
+
canScrollPrev={canScrollPrev}
|
|
123
|
+
carouselRef={carouselRef}
|
|
123
124
|
opts={opts}
|
|
124
125
|
orientation={orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal')}
|
|
125
|
-
|
|
126
|
+
scope={__scopeCarousel}
|
|
126
127
|
scrollNext={scrollNext}
|
|
127
|
-
|
|
128
|
-
canScrollNext={canScrollNext}
|
|
128
|
+
scrollPrev={scrollPrev}
|
|
129
129
|
>
|
|
130
130
|
<div
|
|
131
131
|
ref={ref}
|
|
132
|
-
|
|
132
|
+
aria-roledescription="carousel"
|
|
133
133
|
className={cn('relative', className)}
|
|
134
134
|
role="region"
|
|
135
|
-
|
|
135
|
+
onKeyDownCapture={handleKeyDown}
|
|
136
136
|
{...props}
|
|
137
137
|
>
|
|
138
138
|
{children}
|
|
@@ -187,9 +187,9 @@ const CarouselItem = React.forwardRef<CarouselItemElement, CarouselItemProps>(
|
|
|
187
187
|
return (
|
|
188
188
|
<div
|
|
189
189
|
ref={ref}
|
|
190
|
-
role="group"
|
|
191
190
|
aria-roledescription="slide"
|
|
192
191
|
className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}
|
|
192
|
+
role="group"
|
|
193
193
|
{...props}
|
|
194
194
|
/>
|
|
195
195
|
);
|
|
@@ -217,8 +217,6 @@ const CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPrevi
|
|
|
217
217
|
return (
|
|
218
218
|
<Button
|
|
219
219
|
ref={ref}
|
|
220
|
-
variant={variant}
|
|
221
|
-
size={size}
|
|
222
220
|
className={cn(
|
|
223
221
|
'absolute size-8 rounded-full',
|
|
224
222
|
orientation === 'horizontal'
|
|
@@ -227,6 +225,8 @@ const CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPrevi
|
|
|
227
225
|
className,
|
|
228
226
|
)}
|
|
229
227
|
disabled={!canScrollPrev}
|
|
228
|
+
size={size}
|
|
229
|
+
variant={variant}
|
|
230
230
|
onClick={scrollPrev}
|
|
231
231
|
{...props}
|
|
232
232
|
>
|
|
@@ -258,8 +258,6 @@ const CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(
|
|
|
258
258
|
return (
|
|
259
259
|
<Button
|
|
260
260
|
ref={ref}
|
|
261
|
-
variant={variant}
|
|
262
|
-
size={size}
|
|
263
261
|
className={cn(
|
|
264
262
|
'absolute size-8 rounded-full',
|
|
265
263
|
orientation === 'horizontal'
|
|
@@ -268,6 +266,8 @@ const CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(
|
|
|
268
266
|
className,
|
|
269
267
|
)}
|
|
270
268
|
disabled={!canScrollNext}
|
|
269
|
+
size={size}
|
|
270
|
+
variant={variant}
|
|
271
271
|
onClick={scrollNext}
|
|
272
272
|
{...props}
|
|
273
273
|
>
|
|
@@ -25,12 +25,12 @@ const useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
|
25
25
|
const useCheckboxScope = createCheckboxScope();
|
|
26
26
|
|
|
27
27
|
interface CheckboxGroupContextValue {
|
|
28
|
-
name?: string;
|
|
29
|
-
required: boolean;
|
|
30
28
|
disabled: boolean;
|
|
31
|
-
value?: string[];
|
|
32
29
|
onItemCheck: (value: string) => void;
|
|
33
30
|
onItemUncheck: (value: string) => void;
|
|
31
|
+
required: boolean;
|
|
32
|
+
name?: string;
|
|
33
|
+
value?: string[];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const [CheckboxGroupProvider, useCheckboxGroupContext] =
|
|
@@ -39,15 +39,15 @@ const [CheckboxGroupProvider, useCheckboxGroupContext] =
|
|
|
39
39
|
type CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;
|
|
40
40
|
|
|
41
41
|
interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
|
|
42
|
-
|
|
43
|
-
required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];
|
|
44
|
-
disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];
|
|
42
|
+
defaultValue?: string[];
|
|
45
43
|
dir?: RovingFocusGroup.RovingFocusGroupProps['dir'];
|
|
46
|
-
|
|
44
|
+
disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];
|
|
47
45
|
loop?: RovingFocusGroup.RovingFocusGroupProps['loop'];
|
|
48
|
-
|
|
49
|
-
value?: CheckboxGroupContextValue['value'];
|
|
46
|
+
name?: CheckboxGroupContextValue['name'];
|
|
50
47
|
onValueChange?: (value: string[]) => void;
|
|
48
|
+
orientation?: RovingFocusGroup.RovingFocusGroupProps['orientation'];
|
|
49
|
+
required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];
|
|
50
|
+
value?: CheckboxGroupContextValue['value'];
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(
|
|
@@ -91,17 +91,17 @@ const CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<CheckboxGroupProvider
|
|
94
|
-
|
|
94
|
+
disabled={disabled}
|
|
95
95
|
name={name}
|
|
96
96
|
required={required}
|
|
97
|
-
|
|
97
|
+
scope={__scopeCheckboxGroup}
|
|
98
98
|
value={value}
|
|
99
99
|
onItemCheck={handleItemCheck}
|
|
100
100
|
onItemUncheck={handleItemUncheck}
|
|
101
101
|
>
|
|
102
|
-
<RovingFocusGroup.Root asChild {...rovingFocusGroupScope}
|
|
102
|
+
<RovingFocusGroup.Root asChild {...rovingFocusGroupScope} dir={direction} loop={loop} orientation={orientation}>
|
|
103
103
|
{/* eslint-disable-next-line react/jsx-pascal-case -- radix-ui */}
|
|
104
|
-
<Primitive.div ref={ref}
|
|
104
|
+
<Primitive.div ref={ref} data-disabled={disabled ? '' : undefined} dir={direction} role="group" {...props} />
|
|
105
105
|
</RovingFocusGroup.Root>
|
|
106
106
|
</CheckboxGroupProvider>
|
|
107
107
|
);
|
|
@@ -135,13 +135,13 @@ const CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGro
|
|
|
135
135
|
const checked = context.value?.includes(props.value);
|
|
136
136
|
|
|
137
137
|
return (
|
|
138
|
-
<RovingFocusGroup.Item asChild {...rovingFocusGroupScope}
|
|
138
|
+
<RovingFocusGroup.Item asChild {...rovingFocusGroupScope} active={checked} focusable={!isDisabled}>
|
|
139
139
|
<CheckboxPrimitive.Root
|
|
140
140
|
ref={ref}
|
|
141
|
-
|
|
141
|
+
checked={checked}
|
|
142
142
|
disabled={isDisabled}
|
|
143
|
+
name={context.name}
|
|
143
144
|
required={context.required}
|
|
144
|
-
checked={checked}
|
|
145
145
|
{...checkboxScope}
|
|
146
146
|
{...props}
|
|
147
147
|
onCheckedChange={(checkedState) => {
|
|
@@ -154,11 +154,11 @@ const ContextMenuCheckboxItem = React.forwardRef<ContextMenuCheckboxItemElement,
|
|
|
154
154
|
({ children, className, checked, ...props }, ref) => (
|
|
155
155
|
<ContextMenuPrimitive.CheckboxItem
|
|
156
156
|
ref={ref}
|
|
157
|
+
checked={checked}
|
|
157
158
|
className={cn(
|
|
158
159
|
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
159
160
|
className,
|
|
160
161
|
)}
|
|
161
|
-
checked={checked}
|
|
162
162
|
{...props}
|
|
163
163
|
>
|
|
164
164
|
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
package/src/react/data-table.tsx
CHANGED
|
@@ -38,7 +38,7 @@ function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>
|
|
|
38
38
|
return (
|
|
39
39
|
<DropdownMenu>
|
|
40
40
|
<DropdownMenuTrigger asChild>
|
|
41
|
-
<Button
|
|
41
|
+
<Button className="ml-auto hidden h-8 lg:flex" size="sm" variant="outline">
|
|
42
42
|
<MixerHorizontalIcon className="mr-2 size-4" />
|
|
43
43
|
View
|
|
44
44
|
</Button>
|
|
@@ -53,8 +53,8 @@ function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>
|
|
|
53
53
|
return (
|
|
54
54
|
<DropdownMenuCheckboxItem
|
|
55
55
|
key={column.id}
|
|
56
|
-
className="capitalize"
|
|
57
56
|
checked={column.getIsVisible()}
|
|
57
|
+
className="capitalize"
|
|
58
58
|
onCheckedChange={(value) => {
|
|
59
59
|
column.toggleVisibility(Boolean(value));
|
|
60
60
|
}}
|
|
@@ -112,47 +112,47 @@ function DataTablePagination<TData>({
|
|
|
112
112
|
</div>
|
|
113
113
|
<div className="flex items-center space-x-2">
|
|
114
114
|
<Button
|
|
115
|
-
variant="outline"
|
|
116
|
-
size="icon-xs"
|
|
117
115
|
className="hidden lg:flex"
|
|
116
|
+
disabled={!table.getCanPreviousPage()}
|
|
117
|
+
size="icon-xs"
|
|
118
|
+
variant="outline"
|
|
118
119
|
onClick={() => {
|
|
119
120
|
table.setPageIndex(0);
|
|
120
121
|
}}
|
|
121
|
-
disabled={!table.getCanPreviousPage()}
|
|
122
122
|
>
|
|
123
123
|
<span className="sr-only">Go to first page</span>
|
|
124
124
|
<DoubleArrowLeftIcon className="size-4" />
|
|
125
125
|
</Button>
|
|
126
126
|
<Button
|
|
127
|
-
|
|
127
|
+
disabled={!table.getCanPreviousPage()}
|
|
128
128
|
size="icon-xs"
|
|
129
|
+
variant="outline"
|
|
129
130
|
onClick={() => {
|
|
130
131
|
table.previousPage();
|
|
131
132
|
}}
|
|
132
|
-
disabled={!table.getCanPreviousPage()}
|
|
133
133
|
>
|
|
134
134
|
<span className="sr-only">Go to previous page</span>
|
|
135
135
|
<ChevronLeftIcon className="size-4" />
|
|
136
136
|
</Button>
|
|
137
137
|
<Button
|
|
138
|
-
|
|
138
|
+
disabled={!table.getCanNextPage()}
|
|
139
139
|
size="icon-xs"
|
|
140
|
+
variant="outline"
|
|
140
141
|
onClick={() => {
|
|
141
142
|
table.nextPage();
|
|
142
143
|
}}
|
|
143
|
-
disabled={!table.getCanNextPage()}
|
|
144
144
|
>
|
|
145
145
|
<span className="sr-only">Go to next page</span>
|
|
146
146
|
<ChevronRightIcon className="size-4" />
|
|
147
147
|
</Button>
|
|
148
148
|
<Button
|
|
149
|
-
variant="outline"
|
|
150
|
-
size="icon-xs"
|
|
151
149
|
className="hidden lg:flex"
|
|
150
|
+
disabled={!table.getCanNextPage()}
|
|
151
|
+
size="icon-xs"
|
|
152
|
+
variant="outline"
|
|
152
153
|
onClick={() => {
|
|
153
154
|
table.setPageIndex(table.getPageCount() - 1);
|
|
154
155
|
}}
|
|
155
|
-
disabled={!table.getCanNextPage()}
|
|
156
156
|
>
|
|
157
157
|
<span className="sr-only">Go to last page</span>
|
|
158
158
|
<DoubleArrowRightIcon className="size-4" />
|
|
@@ -185,7 +185,7 @@ function DataTableColumnHeader<TData, TValue>({
|
|
|
185
185
|
<div className={cn('flex items-center space-x-2', className)}>
|
|
186
186
|
<DropdownMenu>
|
|
187
187
|
<DropdownMenuTrigger asChild>
|
|
188
|
-
<Button
|
|
188
|
+
<Button className="data-[state=open]:bg-accent -ml-3" size="xs" variant="ghost">
|
|
189
189
|
<span>{title}</span>
|
|
190
190
|
<SortIcon sorted={column.getIsSorted()} />
|
|
191
191
|
</Button>
|
|
@@ -105,11 +105,11 @@ const DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, Dropdow
|
|
|
105
105
|
<DropdownMenuPrimitive.Portal>
|
|
106
106
|
<DropdownMenuPrimitive.Content
|
|
107
107
|
ref={ref}
|
|
108
|
-
sideOffset={sideOffset}
|
|
109
108
|
className={cn(
|
|
110
109
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',
|
|
111
110
|
className,
|
|
112
111
|
)}
|
|
112
|
+
sideOffset={sideOffset}
|
|
113
113
|
{...props}
|
|
114
114
|
/>
|
|
115
115
|
</DropdownMenuPrimitive.Portal>
|
|
@@ -155,11 +155,11 @@ const DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElemen
|
|
|
155
155
|
({ children, className, checked, ...props }, ref) => (
|
|
156
156
|
<DropdownMenuPrimitive.CheckboxItem
|
|
157
157
|
ref={ref}
|
|
158
|
+
checked={checked}
|
|
158
159
|
className={cn(
|
|
159
160
|
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
160
161
|
className,
|
|
161
162
|
)}
|
|
162
|
-
checked={checked}
|
|
163
163
|
{...props}
|
|
164
164
|
>
|
|
165
165
|
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
package/src/react/form.tsx
CHANGED
|
@@ -37,7 +37,6 @@ const FormFieldContext = React.createContext<FormFieldContextValue | null>(null)
|
|
|
37
37
|
const FormItemContext = React.createContext<FormItemContextValue | null>(null);
|
|
38
38
|
|
|
39
39
|
const useFormField = (): {
|
|
40
|
-
error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
|
|
41
40
|
formDescriptionId: string;
|
|
42
41
|
formItemId: string;
|
|
43
42
|
formMessageId: string;
|
|
@@ -47,6 +46,7 @@ const useFormField = (): {
|
|
|
47
46
|
isTouched: boolean;
|
|
48
47
|
isValidating: boolean;
|
|
49
48
|
name: string;
|
|
49
|
+
error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
|
|
50
50
|
} => {
|
|
51
51
|
const fieldContext = React.useContext(FormFieldContext);
|
|
52
52
|
const itemContext = React.useContext(FormItemContext);
|
|
@@ -144,9 +144,9 @@ const FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ..
|
|
|
144
144
|
return (
|
|
145
145
|
<Slot
|
|
146
146
|
ref={ref}
|
|
147
|
-
id={formItemId}
|
|
148
147
|
aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}
|
|
149
148
|
aria-invalid={Boolean(error)}
|
|
149
|
+
id={formItemId}
|
|
150
150
|
{...props}
|
|
151
151
|
/>
|
|
152
152
|
);
|
|
@@ -165,7 +165,7 @@ const FormDescription = React.forwardRef<FormDescriptionElement, FormDescription
|
|
|
165
165
|
({ className, ...props }, ref) => {
|
|
166
166
|
const { formDescriptionId } = useFormField();
|
|
167
167
|
|
|
168
|
-
return <p ref={ref}
|
|
168
|
+
return <p ref={ref} className={cn('text-muted-foreground text-xs', className)} id={formDescriptionId} {...props} />;
|
|
169
169
|
},
|
|
170
170
|
);
|
|
171
171
|
|
|
@@ -187,7 +187,7 @@ const FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ ch
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
return (
|
|
190
|
-
<p ref={ref}
|
|
190
|
+
<p ref={ref} className={cn('text-destructive text-xs font-medium', className)} id={formMessageId} {...props}>
|
|
191
191
|
{body}
|
|
192
192
|
</p>
|
|
193
193
|
);
|
package/src/react/hover-card.tsx
CHANGED
|
@@ -31,11 +31,11 @@ const HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardCont
|
|
|
31
31
|
<HoverCardPrimitive.Content
|
|
32
32
|
ref={ref}
|
|
33
33
|
align={align}
|
|
34
|
-
sideOffset={sideOffset}
|
|
35
34
|
className={cn(
|
|
36
35
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',
|
|
37
36
|
className,
|
|
38
37
|
)}
|
|
38
|
+
sideOffset={sideOffset}
|
|
39
39
|
{...props}
|
|
40
40
|
/>
|
|
41
41
|
</HoverCardPrimitive.Portal>
|
package/src/react/input-otp.tsx
CHANGED
|
@@ -22,8 +22,8 @@ const InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(
|
|
|
22
22
|
({ className, containerClassName, ...props }, ref) => (
|
|
23
23
|
<OTPInput
|
|
24
24
|
ref={ref}
|
|
25
|
-
containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}
|
|
26
25
|
className={cn('disabled:cursor-not-allowed', className)}
|
|
26
|
+
containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
29
|
),
|
package/src/react/input.tsx
CHANGED
|
@@ -31,7 +31,7 @@ type InputElement = HTMLInputElement;
|
|
|
31
31
|
type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
|
|
32
32
|
|
|
33
33
|
const Input = React.forwardRef<InputElement, InputProps>(({ className, inputSize, ...props }, ref) => {
|
|
34
|
-
return <input
|
|
34
|
+
return <input ref={ref} className={inputVariants({ className, inputSize })} type="text" {...props} />;
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
Input.displayName = 'Input';
|
package/src/react/menubar.tsx
CHANGED
|
@@ -137,11 +137,11 @@ const MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentPro
|
|
|
137
137
|
ref={ref}
|
|
138
138
|
align={align}
|
|
139
139
|
alignOffset={alignOffset}
|
|
140
|
-
sideOffset={sideOffset}
|
|
141
140
|
className={cn(
|
|
142
141
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',
|
|
143
142
|
className,
|
|
144
143
|
)}
|
|
144
|
+
sideOffset={sideOffset}
|
|
145
145
|
{...props}
|
|
146
146
|
/>
|
|
147
147
|
</MenubarPrimitive.Portal>
|
|
@@ -185,11 +185,11 @@ const MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, Menubar
|
|
|
185
185
|
({ children, className, checked, ...props }, ref) => (
|
|
186
186
|
<MenubarPrimitive.CheckboxItem
|
|
187
187
|
ref={ref}
|
|
188
|
+
checked={checked}
|
|
188
189
|
className={cn(
|
|
189
190
|
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
190
191
|
className,
|
|
191
192
|
)}
|
|
192
|
-
checked={checked}
|
|
193
193
|
{...props}
|
|
194
194
|
>
|
|
195
195
|
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
|
@@ -83,8 +83,8 @@ const NavigationMenuTrigger = React.forwardRef<NavigationMenuTriggerElement, Nav
|
|
|
83
83
|
>
|
|
84
84
|
{children}
|
|
85
85
|
<ChevronDownIcon
|
|
86
|
-
className="relative top-px ml-1 size-3 transition group-data-[state=open]:rotate-180"
|
|
87
86
|
aria-hidden="true"
|
|
87
|
+
className="relative top-px ml-1 size-3 transition group-data-[state=open]:rotate-180"
|
|
88
88
|
/>
|
|
89
89
|
</NavigationMenuPrimitive.Trigger>
|
|
90
90
|
),
|
|
@@ -133,11 +133,11 @@ const NavigationMenuViewport = React.forwardRef<NavigationMenuViewportElement, N
|
|
|
133
133
|
({ className, ...props }, ref) => (
|
|
134
134
|
<div className="perspective-[125rem] absolute left-0 top-full flex justify-center">
|
|
135
135
|
<NavigationMenuPrimitive.Viewport
|
|
136
|
+
ref={ref}
|
|
136
137
|
className={cn(
|
|
137
138
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden rounded-md border transition-[width,height] sm:w-[var(--radix-navigation-menu-viewport-width)]',
|
|
138
139
|
className,
|
|
139
140
|
)}
|
|
140
|
-
ref={ref}
|
|
141
141
|
{...props}
|
|
142
142
|
/>
|
|
143
143
|
</div>
|
package/src/react/pagination.tsx
CHANGED
|
@@ -12,9 +12,9 @@ type PaginationProps = React.HTMLAttributes<HTMLElement>;
|
|
|
12
12
|
function Pagination({ className, ...props }: PaginationProps): React.JSX.Element {
|
|
13
13
|
return (
|
|
14
14
|
<nav
|
|
15
|
-
role="navigation"
|
|
16
15
|
aria-label="pagination"
|
|
17
16
|
className={cn('mx-auto flex w-full justify-center', className)}
|
|
17
|
+
role="navigation"
|
|
18
18
|
{...props}
|
|
19
19
|
/>
|
|
20
20
|
);
|
|
@@ -88,8 +88,8 @@ function PaginationPrevious({ className, ...props }: PaginationPreviousProps): R
|
|
|
88
88
|
return (
|
|
89
89
|
<PaginationLink
|
|
90
90
|
aria-label="Go to previous page"
|
|
91
|
-
size="default"
|
|
92
91
|
className={cn('gap-1 pl-2.5', className)}
|
|
92
|
+
size="default"
|
|
93
93
|
{...props}
|
|
94
94
|
>
|
|
95
95
|
<ChevronLeftIcon className="size-4" />
|
|
@@ -106,7 +106,7 @@ type PaginationNextProps = PaginationLinkProps;
|
|
|
106
106
|
|
|
107
107
|
function PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {
|
|
108
108
|
return (
|
|
109
|
-
<PaginationLink aria-label="Go to next page"
|
|
109
|
+
<PaginationLink aria-label="Go to next page" className={cn('gap-1 pr-2.5', className)} size="default" {...props}>
|
|
110
110
|
<span>Next</span>
|
|
111
111
|
<ChevronRightIcon className="size-4" />
|
|
112
112
|
</PaginationLink>
|
package/src/react/popover.tsx
CHANGED
|
@@ -38,11 +38,11 @@ const PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentPro
|
|
|
38
38
|
<PopoverPrimitive.Content
|
|
39
39
|
ref={ref}
|
|
40
40
|
align={align}
|
|
41
|
-
sideOffset={sideOffset}
|
|
42
41
|
className={cn(
|
|
43
42
|
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',
|
|
44
43
|
className,
|
|
45
44
|
)}
|
|
45
|
+
sideOffset={sideOffset}
|
|
46
46
|
{...props}
|
|
47
47
|
/>
|
|
48
48
|
</PopoverPrimitive.Portal>
|
package/src/react/radio.tsx
CHANGED
|
@@ -18,12 +18,12 @@ const Radio = React.forwardRef<RadioElement, RadioProps>(({ className, onValueCh
|
|
|
18
18
|
return (
|
|
19
19
|
<input
|
|
20
20
|
ref={ref}
|
|
21
|
-
type="radio"
|
|
22
|
-
onChange={composeEventHandlers(onChange, (event) => onValueChange?.(event.currentTarget.value))}
|
|
23
21
|
className={cn(
|
|
24
22
|
'before:border-input hover:before:border-primary checked:before:border-primary checked:after:bg-primary peer relative flex appearance-none items-center justify-center rounded-full before:size-4 before:rounded-full before:border checked:after:absolute checked:after:size-2.5 checked:after:rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
25
23
|
className,
|
|
26
24
|
)}
|
|
25
|
+
type="radio"
|
|
26
|
+
onChange={composeEventHandlers(onChange, (event) => onValueChange?.(event.currentTarget.value))}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
29
|
);
|