create-nextjs-cms 0.9.15 → 0.9.17

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.
Files changed (26) hide show
  1. package/package.json +3 -3
  2. package/templates/default/components/ItemEditPage.tsx +25 -25
  3. package/templates/default/components/LocaleSwitcher.tsx +32 -23
  4. package/templates/default/components/SectionPage.tsx +1 -0
  5. package/templates/default/components/form/helpers/_section-hot-reload.js +1 -1
  6. package/templates/default/components/ui/alert-dialog.tsx +84 -128
  7. package/templates/default/components/ui/alert.tsx +1 -1
  8. package/templates/default/components/ui/button.tsx +64 -62
  9. package/templates/default/components/ui/calendar.tsx +220 -166
  10. package/templates/default/components/ui/checkbox.tsx +29 -29
  11. package/templates/default/components/ui/command.tsx +1 -1
  12. package/templates/default/components/ui/custom-alert-dialog.tsx +2 -2
  13. package/templates/default/components/ui/custom-dialog.tsx +3 -3
  14. package/templates/default/components/ui/dialog.tsx +3 -3
  15. package/templates/default/components/ui/dropdown-menu.tsx +9 -9
  16. package/templates/default/components/ui/input-group.tsx +1 -1
  17. package/templates/default/components/ui/scroll-area.tsx +1 -1
  18. package/templates/default/components/ui/select.tsx +3 -3
  19. package/templates/default/components/ui/sheet.tsx +3 -3
  20. package/templates/default/components/ui/switch.tsx +1 -1
  21. package/templates/default/components/ui/table.tsx +2 -2
  22. package/templates/default/components/ui/toast.tsx +3 -3
  23. package/templates/default/components/ui/use-toast.ts +0 -1
  24. package/templates/default/components.json +25 -21
  25. package/templates/default/dynamic-schemas/schema.ts +1 -1
  26. package/templates/default/package.json +3 -2
@@ -1,166 +1,220 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
5
- import { DayPicker, getDefaultClassNames, type DayButton } from 'react-day-picker'
6
-
7
- import { cn } from '@/lib/utils'
8
- import { Button, buttonVariants } from '@/components/ui/button'
9
-
10
- function Calendar({
11
- className,
12
- classNames,
13
- showOutsideDays = true,
14
- captionLayout = 'label',
15
- buttonVariant = 'ghost',
16
- formatters,
17
- components,
18
- ...props
19
- }: React.ComponentProps<typeof DayPicker> & {
20
- buttonVariant?: React.ComponentProps<typeof Button>['variant']
21
- }) {
22
- const defaultClassNames = getDefaultClassNames()
23
-
24
- return (
25
- <DayPicker
26
- showOutsideDays={showOutsideDays}
27
- className={cn(
28
- 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',
29
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
30
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
31
- className,
32
- )}
33
- captionLayout={captionLayout}
34
- formatters={{
35
- formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
36
- ...formatters,
37
- }}
38
- classNames={{
39
- root: cn('w-fit', defaultClassNames.root),
40
- months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
41
- month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
42
- nav: cn(
43
- 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',
44
- defaultClassNames.nav,
45
- ),
46
- button_previous: cn(
47
- buttonVariants({ variant: buttonVariant }),
48
- 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',
49
- defaultClassNames.button_previous,
50
- ),
51
- button_next: cn(
52
- buttonVariants({ variant: buttonVariant }),
53
- 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',
54
- defaultClassNames.button_next,
55
- ),
56
- month_caption: cn(
57
- 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',
58
- defaultClassNames.month_caption,
59
- ),
60
- dropdowns: cn(
61
- 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',
62
- defaultClassNames.dropdowns,
63
- ),
64
- dropdown_root: cn(
65
- 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',
66
- defaultClassNames.dropdown_root,
67
- ),
68
- dropdown: cn('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
69
- caption_label: cn(
70
- 'select-none font-medium',
71
- captionLayout === 'label'
72
- ? 'text-sm'
73
- : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5',
74
- defaultClassNames.caption_label,
75
- ),
76
- table: 'w-full border-collapse',
77
- weekdays: cn('flex', defaultClassNames.weekdays),
78
- weekday: cn(
79
- 'text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none',
80
- defaultClassNames.weekday,
81
- ),
82
- week: cn('flex w-full mt-2', defaultClassNames.week),
83
- week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
84
- week_number: cn('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
85
- day: cn(
86
- 'relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',
87
- props.showWeekNumber
88
- ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-md'
89
- : '[&:first-child[data-selected=true]_button]:rounded-l-md',
90
- defaultClassNames.day,
91
- ),
92
- range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),
93
- range_middle: cn('rounded-none', defaultClassNames.range_middle),
94
- range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),
95
- today: cn(
96
- 'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',
97
- defaultClassNames.today,
98
- ),
99
- outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
100
- disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
101
- hidden: cn('invisible', defaultClassNames.hidden),
102
- ...classNames,
103
- }}
104
- components={{
105
- Root: ({ className, rootRef, ...props }) => {
106
- return <div data-slot='calendar' ref={rootRef} className={cn(className)} {...props} />
107
- },
108
- Chevron: ({ className, orientation, ...props }) => {
109
- if (orientation === 'left') {
110
- return <ChevronLeftIcon className={cn('size-4', className)} {...props} />
111
- }
112
-
113
- if (orientation === 'right') {
114
- return <ChevronRightIcon className={cn('size-4', className)} {...props} />
115
- }
116
-
117
- return <ChevronDownIcon className={cn('size-4', className)} {...props} />
118
- },
119
- DayButton: CalendarDayButton,
120
- WeekNumber: ({ children, ...props }) => {
121
- return (
122
- <td {...props}>
123
- <div className='flex size-(--cell-size) items-center justify-center text-center'>
124
- {children}
125
- </div>
126
- </td>
127
- )
128
- },
129
- ...components,
130
- }}
131
- {...props}
132
- />
133
- )
134
- }
135
-
136
- function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>) {
137
- const defaultClassNames = getDefaultClassNames()
138
-
139
- const ref = React.useRef<HTMLButtonElement>(null)
140
- React.useEffect(() => {
141
- if (modifiers.focused) ref.current?.focus()
142
- }, [modifiers.focused])
143
-
144
- return (
145
- <Button
146
- ref={ref}
147
- variant='ghost'
148
- size='icon'
149
- data-day={day.date.toLocaleDateString()}
150
- data-selected-single={
151
- modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle
152
- }
153
- data-range-start={modifiers.range_start}
154
- data-range-end={modifiers.range_end}
155
- data-range-middle={modifiers.range_middle}
156
- className={cn(
157
- 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',
158
- defaultClassNames.day,
159
- className,
160
- )}
161
- {...props}
162
- />
163
- )
164
- }
165
-
166
- export { Calendar, CalendarDayButton }
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import {
5
+ ChevronDownIcon,
6
+ ChevronLeftIcon,
7
+ ChevronRightIcon,
8
+ } from "lucide-react"
9
+ import {
10
+ DayPicker,
11
+ getDefaultClassNames,
12
+ type DayButton,
13
+ } from "react-day-picker"
14
+
15
+ import { cn } from "@/lib/utils"
16
+ import { Button, buttonVariants } from "@/components/ui/button"
17
+
18
+ function Calendar({
19
+ className,
20
+ classNames,
21
+ showOutsideDays = true,
22
+ captionLayout = "label",
23
+ buttonVariant = "ghost",
24
+ formatters,
25
+ components,
26
+ ...props
27
+ }: React.ComponentProps<typeof DayPicker> & {
28
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"]
29
+ }) {
30
+ const defaultClassNames = getDefaultClassNames()
31
+
32
+ return (
33
+ <DayPicker
34
+ showOutsideDays={showOutsideDays}
35
+ className={cn(
36
+ "group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
37
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
38
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
39
+ className
40
+ )}
41
+ captionLayout={captionLayout}
42
+ formatters={{
43
+ formatMonthDropdown: (date) =>
44
+ date.toLocaleString("default", { month: "short" }),
45
+ ...formatters,
46
+ }}
47
+ classNames={{
48
+ root: cn("w-fit", defaultClassNames.root),
49
+ months: cn(
50
+ "relative flex flex-col gap-4 md:flex-row",
51
+ defaultClassNames.months
52
+ ),
53
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
54
+ nav: cn(
55
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
56
+ defaultClassNames.nav
57
+ ),
58
+ button_previous: cn(
59
+ buttonVariants({ variant: buttonVariant }),
60
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
61
+ defaultClassNames.button_previous
62
+ ),
63
+ button_next: cn(
64
+ buttonVariants({ variant: buttonVariant }),
65
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
66
+ defaultClassNames.button_next
67
+ ),
68
+ month_caption: cn(
69
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
70
+ defaultClassNames.month_caption
71
+ ),
72
+ dropdowns: cn(
73
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
74
+ defaultClassNames.dropdowns
75
+ ),
76
+ dropdown_root: cn(
77
+ "relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
78
+ defaultClassNames.dropdown_root
79
+ ),
80
+ dropdown: cn(
81
+ "absolute inset-0 bg-popover opacity-0",
82
+ defaultClassNames.dropdown
83
+ ),
84
+ caption_label: cn(
85
+ "font-medium select-none",
86
+ captionLayout === "label"
87
+ ? "text-sm"
88
+ : "flex h-8 items-center gap-1 rounded-md pe-1 ps-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
89
+ defaultClassNames.caption_label
90
+ ),
91
+ table: "w-full border-collapse",
92
+ weekdays: cn("flex", defaultClassNames.weekdays),
93
+ weekday: cn(
94
+ "flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
95
+ defaultClassNames.weekday
96
+ ),
97
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
98
+ week_number_header: cn(
99
+ "w-(--cell-size) select-none",
100
+ defaultClassNames.week_number_header
101
+ ),
102
+ week_number: cn(
103
+ "text-[0.8rem] text-muted-foreground select-none",
104
+ defaultClassNames.week_number
105
+ ),
106
+ day: cn(
107
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-md",
108
+ props.showWeekNumber
109
+ ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-md"
110
+ : "[&:first-child[data-selected=true]_button]:rounded-s-md",
111
+ defaultClassNames.day
112
+ ),
113
+ range_start: cn(
114
+ "rounded-s-md bg-accent",
115
+ defaultClassNames.range_start
116
+ ),
117
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
118
+ range_end: cn("rounded-e-md bg-accent", defaultClassNames.range_end),
119
+ today: cn(
120
+ "rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
121
+ defaultClassNames.today
122
+ ),
123
+ outside: cn(
124
+ "text-muted-foreground aria-selected:text-muted-foreground",
125
+ defaultClassNames.outside
126
+ ),
127
+ disabled: cn(
128
+ "text-muted-foreground opacity-50",
129
+ defaultClassNames.disabled
130
+ ),
131
+ hidden: cn("invisible", defaultClassNames.hidden),
132
+ ...classNames,
133
+ }}
134
+ components={{
135
+ Root: ({ className, rootRef, ...props }) => {
136
+ return (
137
+ <div
138
+ data-slot="calendar"
139
+ ref={rootRef}
140
+ className={cn(className)}
141
+ {...props}
142
+ />
143
+ )
144
+ },
145
+ Chevron: ({ className, orientation, ...props }) => {
146
+ if (orientation === "left") {
147
+ return (
148
+ <ChevronLeftIcon className={cn("size-4", className)} {...props} />
149
+ )
150
+ }
151
+
152
+ if (orientation === "right") {
153
+ return (
154
+ <ChevronRightIcon
155
+ className={cn("size-4", className)}
156
+ {...props}
157
+ />
158
+ )
159
+ }
160
+
161
+ return (
162
+ <ChevronDownIcon className={cn("size-4", className)} {...props} />
163
+ )
164
+ },
165
+ DayButton: CalendarDayButton,
166
+ WeekNumber: ({ children, ...props }) => {
167
+ return (
168
+ <td {...props}>
169
+ <div className="flex size-(--cell-size) items-center justify-center text-center">
170
+ {children}
171
+ </div>
172
+ </td>
173
+ )
174
+ },
175
+ ...components,
176
+ }}
177
+ {...props}
178
+ />
179
+ )
180
+ }
181
+
182
+ function CalendarDayButton({
183
+ className,
184
+ day,
185
+ modifiers,
186
+ ...props
187
+ }: React.ComponentProps<typeof DayButton>) {
188
+ const defaultClassNames = getDefaultClassNames()
189
+
190
+ const ref = React.useRef<HTMLButtonElement>(null)
191
+ React.useEffect(() => {
192
+ if (modifiers.focused) ref.current?.focus()
193
+ }, [modifiers.focused])
194
+
195
+ return (
196
+ <Button
197
+ ref={ref}
198
+ variant="ghost"
199
+ size="icon"
200
+ data-day={day.date.toLocaleDateString()}
201
+ data-selected-single={
202
+ modifiers.selected &&
203
+ !modifiers.range_start &&
204
+ !modifiers.range_end &&
205
+ !modifiers.range_middle
206
+ }
207
+ data-range-start={modifiers.range_start}
208
+ data-range-end={modifiers.range_end}
209
+ data-range-middle={modifiers.range_middle}
210
+ className={cn(
211
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-e-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-s-md 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-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
212
+ defaultClassNames.day,
213
+ className
214
+ )}
215
+ {...props}
216
+ />
217
+ )
218
+ }
219
+
220
+ export { Calendar, CalendarDayButton }
@@ -1,29 +1,29 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox'
5
- import { CheckIcon, DividerHorizontalIcon } from '@radix-ui/react-icons'
6
-
7
- import { cn } from '@/lib/utils'
8
-
9
- const Checkbox = React.forwardRef<
10
- React.ElementRef<typeof CheckboxPrimitive.Root>,
11
- React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
12
- >(({ className, ...props }, ref) => (
13
- <CheckboxPrimitive.Root
14
- ref={ref}
15
- className={cn(
16
- 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground h-4 w-4 shrink-0 rounded-sm border shadow-sm focus-visible:ring-1 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state="indeterminate"]:bg-gray-300 dark:data-[state="indeterminate"]:bg-gray-500',
17
- className,
18
- )}
19
- {...props}
20
- >
21
- <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
22
- {props.checked === 'indeterminate' && <DividerHorizontalIcon />}
23
- {props.checked === true && <CheckIcon />}
24
- </CheckboxPrimitive.Indicator>
25
- </CheckboxPrimitive.Root>
26
- ))
27
- Checkbox.displayName = CheckboxPrimitive.Root.displayName
28
-
29
- export { Checkbox }
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+ import { CheckIcon } from 'lucide-react'
5
+ import { Checkbox as CheckboxPrimitive } from 'radix-ui'
6
+
7
+ import { cn } from '@/lib/utils'
8
+
9
+ function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
10
+ return (
11
+ <CheckboxPrimitive.Root
12
+ data-slot='checkbox'
13
+ className={cn(
14
+ 'peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
15
+ className,
16
+ )}
17
+ {...props}
18
+ >
19
+ <CheckboxPrimitive.Indicator
20
+ data-slot='checkbox-indicator'
21
+ className='grid place-content-center text-current transition-none'
22
+ >
23
+ <CheckIcon className='size-3.5' />
24
+ </CheckboxPrimitive.Indicator>
25
+ </CheckboxPrimitive.Root>
26
+ )
27
+ }
28
+
29
+ export { Checkbox }
@@ -118,7 +118,7 @@ function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>)
118
118
  return (
119
119
  <span
120
120
  data-slot='command-shortcut'
121
- className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}
121
+ className={cn('text-muted-foreground ms-auto text-xs tracking-widest', className)}
122
122
  {...props}
123
123
  />
124
124
  )
@@ -38,7 +38,7 @@ function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof
38
38
  <AlertDialogPrimitive.Content
39
39
  data-slot='alert-dialog-content'
40
40
  className={cn(
41
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200',
41
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 rtl:-translate-x-[-50%]',
42
42
  className,
43
43
  )}
44
44
  {...props}
@@ -51,7 +51,7 @@ function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>)
51
51
  return (
52
52
  <div
53
53
  data-slot='alert-dialog-header'
54
- className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
54
+ className={cn('flex flex-col gap-2 text-center sm:text-start', className)}
55
55
  {...props}
56
56
  />
57
57
  )
@@ -49,7 +49,7 @@ function DialogContent({
49
49
  <DialogPrimitive.Content
50
50
  data-slot='dialog-content'
51
51
  className={cn(
52
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] border p-6 shadow-lg duration-200 outline-none',
52
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] border p-6 shadow-lg duration-200 outline-none rtl:-translate-x-[-50%]',
53
53
  className,
54
54
  )}
55
55
  {...props}
@@ -58,7 +58,7 @@ function DialogContent({
58
58
  {showCloseButton && (
59
59
  <DialogPrimitive.Close
60
60
  data-slot='dialog-close'
61
- className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
61
+ className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
62
62
  >
63
63
  <XIcon />
64
64
  <span className='sr-only'>Close</span>
@@ -73,7 +73,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
73
73
  return (
74
74
  <div
75
75
  data-slot='dialog-header'
76
- className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
76
+ className={cn('flex flex-col gap-2 text-center sm:text-start', className)}
77
77
  {...props}
78
78
  />
79
79
  )
@@ -49,7 +49,7 @@ function DialogContent({
49
49
  <DialogPrimitive.Content
50
50
  data-slot='dialog-content'
51
51
  className={cn(
52
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg',
52
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg rtl:-translate-x-[-50%]',
53
53
  className,
54
54
  )}
55
55
  {...props}
@@ -58,7 +58,7 @@ function DialogContent({
58
58
  {showCloseButton && (
59
59
  <DialogPrimitive.Close
60
60
  data-slot='dialog-close'
61
- className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
61
+ className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
62
62
  >
63
63
  <XIcon />
64
64
  <span className='sr-only'>Close</span>
@@ -73,7 +73,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
73
73
  return (
74
74
  <div
75
75
  data-slot='dialog-header'
76
- className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
76
+ className={cn('flex flex-col gap-2 text-center sm:text-start', className)}
77
77
  {...props}
78
78
  />
79
79
  )
@@ -28,13 +28,13 @@ const DropdownMenuSubTrigger = React.forwardRef<
28
28
  ref={ref}
29
29
  className={cn(
30
30
  'focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',
31
- inset && 'pl-8',
31
+ inset && 'ps-8',
32
32
  className,
33
33
  )}
34
34
  {...props}
35
35
  >
36
36
  {children}
37
- <ChevronRightIcon className='ml-auto h-4 w-4' />
37
+ <ChevronRightIcon className='ms-auto h-4 w-4' />
38
38
  </DropdownMenuPrimitive.SubTrigger>
39
39
  ))
40
40
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName
@@ -83,7 +83,7 @@ const DropdownMenuItem = React.forwardRef<
83
83
  ref={ref}
84
84
  className={cn(
85
85
  'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
86
- inset && 'pl-8',
86
+ inset && 'ps-8',
87
87
  className,
88
88
  )}
89
89
  {...props}
@@ -98,13 +98,13 @@ const DropdownMenuCheckboxItem = React.forwardRef<
98
98
  <DropdownMenuPrimitive.CheckboxItem
99
99
  ref={ref}
100
100
  className={cn(
101
- 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
101
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
102
102
  className,
103
103
  )}
104
104
  checked={checked}
105
105
  {...props}
106
106
  >
107
- <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
107
+ <span className='absolute start-2 flex h-3.5 w-3.5 items-center justify-center'>
108
108
  <DropdownMenuPrimitive.ItemIndicator>
109
109
  <CheckIcon className='h-4 w-4' />
110
110
  </DropdownMenuPrimitive.ItemIndicator>
@@ -121,12 +121,12 @@ const DropdownMenuRadioItem = React.forwardRef<
121
121
  <DropdownMenuPrimitive.RadioItem
122
122
  ref={ref}
123
123
  className={cn(
124
- 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
124
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
125
125
  className,
126
126
  )}
127
127
  {...props}
128
128
  >
129
- <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
129
+ <span className='absolute start-2 flex h-3.5 w-3.5 items-center justify-center'>
130
130
  <DropdownMenuPrimitive.ItemIndicator>
131
131
  <DotFilledIcon className='h-4 w-4 fill-current' />
132
132
  </DropdownMenuPrimitive.ItemIndicator>
@@ -144,7 +144,7 @@ const DropdownMenuLabel = React.forwardRef<
144
144
  >(({ className, inset, ...props }, ref) => (
145
145
  <DropdownMenuPrimitive.Label
146
146
  ref={ref}
147
- className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
147
+ className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'ps-8', className)}
148
148
  {...props}
149
149
  />
150
150
  ))
@@ -159,7 +159,7 @@ const DropdownMenuSeparator = React.forwardRef<
159
159
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
160
160
 
161
161
  const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
162
- return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />
162
+ return <span className={cn('ms-auto text-xs tracking-widest opacity-60', className)} {...props} />
163
163
  }
164
164
  DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'
165
165
 
@@ -8,7 +8,7 @@ const InputGroup = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDiv
8
8
  <div
9
9
  ref={ref}
10
10
  className={cn(
11
- 'flex items-stretch overflow-hidden rounded shadow-xs ring-2 ring-gray-300 outline-0 hover:ring-gray-400 focus-within:ring-blue-500 hover:focus-within:ring-blue-500',
11
+ 'flex items-stretch overflow-hidden rounded shadow-xs ring-2 ring-gray-300 outline-0 focus-within:ring-blue-500 hover:ring-gray-400 hover:focus-within:ring-blue-500',
12
12
  className,
13
13
  )}
14
14
  {...props}
@@ -28,7 +28,7 @@ const ScrollBar = React.forwardRef<
28
28
  orientation={orientation}
29
29
  className={cn(
30
30
  'flex touch-none transition-colors select-none',
31
- orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-px',
31
+ orientation === 'vertical' && 'h-full w-2.5 border-s border-s-transparent p-px',
32
32
  orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-px',
33
33
  className,
34
34
  )}