@carlonicora/nextjs-jsonapi 1.36.1 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/{BlockNoteEditor-4MDHRUS2.js → BlockNoteEditor-3S2B36O3.js} +15 -15
  2. package/dist/{BlockNoteEditor-4MDHRUS2.js.map → BlockNoteEditor-3S2B36O3.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-SZWO3MDO.mjs → BlockNoteEditor-WQUJTVJL.mjs} +5 -5
  4. package/dist/BlockNoteEditor-WQUJTVJL.mjs.map +1 -0
  5. package/dist/billing/index.d.mts +15 -5
  6. package/dist/billing/index.d.ts +15 -5
  7. package/dist/billing/index.js +750 -520
  8. package/dist/billing/index.js.map +1 -1
  9. package/dist/billing/index.mjs +665 -435
  10. package/dist/billing/index.mjs.map +1 -1
  11. package/dist/{chunk-53IPQJVH.js → chunk-3EZX4G2E.js} +147 -23
  12. package/dist/chunk-3EZX4G2E.js.map +1 -0
  13. package/dist/{chunk-I7DFEJFF.mjs → chunk-4PHADEKA.mjs} +738 -1418
  14. package/dist/chunk-4PHADEKA.mjs.map +1 -0
  15. package/dist/{chunk-E6PQQTWF.js → chunk-T2JCZYWK.js} +999 -1679
  16. package/dist/chunk-T2JCZYWK.js.map +1 -0
  17. package/dist/{chunk-P7R2DPD6.mjs → chunk-TQ5GRRTM.mjs} +125 -1
  18. package/dist/chunk-TQ5GRRTM.mjs.map +1 -0
  19. package/dist/client/index.js +3 -3
  20. package/dist/client/index.mjs +2 -2
  21. package/dist/components/index.d.mts +23 -8
  22. package/dist/components/index.d.ts +23 -8
  23. package/dist/components/index.js +3 -3
  24. package/dist/components/index.mjs +2 -2
  25. package/dist/contexts/index.d.mts +1 -1
  26. package/dist/contexts/index.d.ts +1 -1
  27. package/dist/contexts/index.js +3 -3
  28. package/dist/contexts/index.mjs +2 -2
  29. package/dist/core/index.d.mts +47 -3
  30. package/dist/core/index.d.ts +47 -3
  31. package/dist/core/index.js +8 -2
  32. package/dist/core/index.js.map +1 -1
  33. package/dist/core/index.mjs +7 -1
  34. package/dist/index.d.mts +2 -2
  35. package/dist/index.d.ts +2 -2
  36. package/dist/index.js +8 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +7 -1
  39. package/dist/server/index.js +3 -3
  40. package/dist/server/index.mjs +1 -1
  41. package/dist/{stripe-subscription.interface-DK7BJaNd.d.ts → stripe-promotion-code.interface-BcJty0rv.d.ts} +18 -1
  42. package/dist/{stripe-subscription.interface-C8uhCYIZ.d.mts → stripe-promotion-code.interface-Dnm2DJKQ.d.mts} +18 -1
  43. package/dist/testing/index.js.map +1 -1
  44. package/dist/testing/index.mjs.map +1 -1
  45. package/package.json +2 -2
  46. package/src/billing/index.ts +1 -0
  47. package/src/client/context/JsonApiProvider.tsx +1 -5
  48. package/src/client/hooks/__tests__/useJsonApiGet.test.tsx +9 -9
  49. package/src/client/hooks/__tests__/useJsonApiMutation.test.tsx +11 -11
  50. package/src/client/hooks/__tests__/useRehydration.test.ts +13 -34
  51. package/src/components/editors/BlockNoteEditor.tsx +2 -2
  52. package/src/components/forms/CommonEditorTrigger.tsx +1 -1
  53. package/src/components/forms/FormCheckbox.tsx +2 -12
  54. package/src/components/forms/FormDate.tsx +1 -6
  55. package/src/components/forms/FormInput.tsx +1 -1
  56. package/src/components/forms/FormPassword.tsx +1 -7
  57. package/src/components/forms/FormSelect.tsx +2 -8
  58. package/src/components/forms/FormSlider.tsx +1 -5
  59. package/src/components/forms/FormSwitch.tsx +1 -5
  60. package/src/components/forms/GdprConsentCheckbox.tsx +2 -8
  61. package/src/components/forms/PasswordInput.tsx +28 -26
  62. package/src/components/forms/__tests__/FormCheckbox.test.tsx +16 -18
  63. package/src/components/forms/__tests__/FormDate.test.tsx +14 -30
  64. package/src/components/forms/__tests__/FormInput.test.tsx +21 -37
  65. package/src/components/forms/__tests__/FormSelect.test.tsx +15 -21
  66. package/src/components/tables/ContentListTable.tsx +1 -1
  67. package/src/components/tables/__tests__/ContentListTable.test.tsx +17 -89
  68. package/src/components/tables/cells/cell.component.tsx +1 -1
  69. package/src/contexts/HeaderChildrenContext.tsx +3 -1
  70. package/src/core/endpoint/__tests__/EndpointCreator.test.ts +2 -7
  71. package/src/core/factories/__tests__/JsonApiDataFactory.test.ts +3 -3
  72. package/src/core/factories/__tests__/RehydrationFactory.test.ts +4 -6
  73. package/src/core/index.ts +1 -0
  74. package/src/core/registry/ModuleRegistry.ts +1 -0
  75. package/src/core/registry/__tests__/DataClassRegistry.test.ts +5 -15
  76. package/src/core/registry/__tests__/ModuleRegistrar.test.ts +5 -15
  77. package/src/features/auth/components/GdprConsentSection.tsx +1 -6
  78. package/src/features/auth/components/details/LandingComponent.tsx +6 -1
  79. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  80. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  81. package/src/features/billing/components/cards/PaymentMethodSummaryCard.tsx +13 -18
  82. package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +12 -17
  83. package/src/features/billing/components/modals/BillingDetailModal.tsx +2 -13
  84. package/src/features/billing/stripe-customer/components/details/PaymentMethodCard.tsx +8 -1
  85. package/src/features/billing/stripe-customer/components/forms/PaymentMethodEditor.tsx +2 -13
  86. package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +2 -12
  87. package/src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx +6 -1
  88. package/src/features/billing/stripe-invoice/data/stripe-invoice.interface.ts +1 -0
  89. package/src/features/billing/stripe-price/components/lists/PricesList.tsx +13 -5
  90. package/src/features/billing/stripe-product/components/lists/ProductsList.tsx +5 -5
  91. package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +108 -0
  92. package/src/features/billing/stripe-promotion-code/components/index.ts +1 -0
  93. package/src/features/billing/stripe-promotion-code/data/index.ts +3 -0
  94. package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.interface.ts +14 -0
  95. package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.service.ts +64 -0
  96. package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.ts +66 -0
  97. package/src/features/billing/stripe-promotion-code/index.ts +2 -0
  98. package/src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts +9 -0
  99. package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +1 -3
  100. package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +4 -1
  101. package/src/features/billing/stripe-subscription/components/forms/CancelSubscriptionDialog.tsx +1 -1
  102. package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +24 -4
  103. package/src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx +9 -2
  104. package/src/features/billing/stripe-subscription/components/widgets/SubscriptionStatusBadge.tsx +3 -1
  105. package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +7 -7
  106. package/src/features/billing/stripe-subscription/components/wizards/WizardProgressIndicator.tsx +2 -10
  107. package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +3 -13
  108. package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +134 -23
  109. package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +2 -0
  110. package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +8 -0
  111. package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +93 -7
  112. package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +1 -1
  113. package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +1 -1
  114. package/src/features/company/components/details/CompanyDetails.tsx +2 -2
  115. package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +1 -1
  116. package/src/features/index.ts +1 -0
  117. package/src/features/notification/components/containers/NotificationsListContainer.tsx +1 -1
  118. package/src/features/notification/components/modals/NotificationModal.tsx +6 -2
  119. package/src/features/notification/contexts/NotificationContext.tsx +1 -3
  120. package/src/features/oauth/components/OAuthClientCard.tsx +15 -17
  121. package/src/features/oauth/components/OAuthClientDetail.tsx +7 -19
  122. package/src/features/oauth/components/OAuthClientForm.tsx +4 -13
  123. package/src/features/oauth/components/OAuthClientSecretDisplay.tsx +4 -20
  124. package/src/features/oauth/components/OAuthRedirectUriInput.tsx +5 -12
  125. package/src/features/oauth/components/OAuthScopeSelector.tsx +17 -23
  126. package/src/features/oauth/components/consent/OAuthConsentActions.tsx +3 -16
  127. package/src/features/oauth/components/consent/OAuthConsentHeader.tsx +3 -12
  128. package/src/features/oauth/components/consent/OAuthConsentScreen.tsx +5 -20
  129. package/src/features/oauth/components/consent/OAuthScopeList.tsx +3 -18
  130. package/src/features/onboarding/contexts/OnboardingContext.tsx +3 -3
  131. package/src/features/role/components/forms/FormRoles.tsx +1 -7
  132. package/src/features/user/components/containers/UserContainer.tsx +1 -1
  133. package/src/features/user/components/details/UserDetails.tsx +1 -1
  134. package/src/features/user/components/forms/UserDeleter.tsx +1 -1
  135. package/src/features/user/components/forms/UserEditor.tsx +1 -1
  136. package/src/features/user/components/forms/UserMultiSelect.tsx +7 -7
  137. package/src/features/user/components/lists/UserListInAdd.tsx +2 -2
  138. package/src/features/user/components/lists/UsersList.tsx +7 -1
  139. package/src/features/user/contexts/CurrentUserContext.tsx +36 -33
  140. package/src/hooks/__tests__/useDataListRetriever.test.ts +15 -21
  141. package/src/hooks/__tests__/useDebounce.test.ts +2 -7
  142. package/src/hooks/useCustomD3Graph.tsx +2 -2
  143. package/src/shadcnui/custom/multi-select.tsx +28 -2
  144. package/src/shadcnui/ui/accordion.tsx +21 -23
  145. package/src/shadcnui/ui/alert-dialog.tsx +45 -62
  146. package/src/shadcnui/ui/alert.tsx +25 -41
  147. package/src/shadcnui/ui/avatar.tsx +23 -36
  148. package/src/shadcnui/ui/badge.tsx +13 -11
  149. package/src/shadcnui/ui/breadcrumb.tsx +21 -55
  150. package/src/shadcnui/ui/button.tsx +17 -18
  151. package/src/shadcnui/ui/calendar.tsx +44 -93
  152. package/src/shadcnui/ui/carousel.tsx +72 -100
  153. package/src/shadcnui/ui/chart.tsx +102 -161
  154. package/src/shadcnui/ui/checkbox.tsx +8 -9
  155. package/src/shadcnui/ui/combobox.tsx +52 -83
  156. package/src/shadcnui/ui/command.tsx +43 -77
  157. package/src/shadcnui/ui/context-menu.tsx +47 -86
  158. package/src/shadcnui/ui/dialog.tsx +34 -60
  159. package/src/shadcnui/ui/drawer.tsx +32 -53
  160. package/src/shadcnui/ui/dropdown-menu.tsx +48 -65
  161. package/src/shadcnui/ui/field.tsx +39 -48
  162. package/src/shadcnui/ui/hover-card.tsx +9 -14
  163. package/src/shadcnui/ui/input-group.tsx +44 -55
  164. package/src/shadcnui/ui/input-otp.tsx +22 -26
  165. package/src/shadcnui/ui/input.tsx +6 -6
  166. package/src/shadcnui/ui/label.tsx +6 -6
  167. package/src/shadcnui/ui/navigation-menu.tsx +36 -60
  168. package/src/shadcnui/ui/popover.tsx +15 -38
  169. package/src/shadcnui/ui/progress.tsx +12 -29
  170. package/src/shadcnui/ui/radio-group.tsx +9 -15
  171. package/src/shadcnui/ui/resizable.tsx +14 -24
  172. package/src/shadcnui/ui/scroll-area.tsx +12 -27
  173. package/src/shadcnui/ui/select.tsx +41 -65
  174. package/src/shadcnui/ui/separator.tsx +7 -11
  175. package/src/shadcnui/ui/sheet.tsx +30 -55
  176. package/src/shadcnui/ui/sidebar.tsx +141 -189
  177. package/src/shadcnui/ui/skeleton.tsx +3 -9
  178. package/src/shadcnui/ui/slider.tsx +11 -23
  179. package/src/shadcnui/ui/switch.tsx +8 -8
  180. package/src/shadcnui/ui/tabs.tsx +14 -21
  181. package/src/shadcnui/ui/textarea.tsx +5 -5
  182. package/src/shadcnui/ui/toggle.tsx +8 -14
  183. package/src/shadcnui/ui/tooltip.tsx +11 -23
  184. package/src/testing/providers/MockJsonApiProvider.tsx +1 -5
  185. package/src/testing/utils/renderWithProviders.tsx +6 -10
  186. package/dist/BlockNoteEditor-SZWO3MDO.mjs.map +0 -1
  187. package/dist/chunk-53IPQJVH.js.map +0 -1
  188. package/dist/chunk-E6PQQTWF.js.map +0 -1
  189. package/dist/chunk-I7DFEJFF.mjs.map +0 -1
  190. package/dist/chunk-P7R2DPD6.mjs.map +0 -1
@@ -1,32 +1,27 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
3
+ import * as React from "react";
4
+ import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { ChevronRightIcon, CheckIcon } from "lucide-react"
6
+ import { cn } from "@/lib/utils";
7
+ import { ChevronRightIcon, CheckIcon } from "lucide-react";
8
8
 
9
9
  function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
10
- return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
10
+ return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
11
11
  }
12
12
 
13
13
  function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
14
- return (
15
- <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
16
- )
14
+ return <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />;
17
15
  }
18
16
 
19
- function ContextMenuTrigger({
20
- className,
21
- ...props
22
- }: ContextMenuPrimitive.Trigger.Props) {
17
+ function ContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props) {
23
18
  return (
24
19
  <ContextMenuPrimitive.Trigger
25
20
  data-slot="context-menu-trigger"
26
21
  className={cn("select-none", className)}
27
22
  {...props}
28
23
  />
29
- )
24
+ );
30
25
  }
31
26
 
32
27
  function ContextMenuContent({
@@ -37,10 +32,7 @@ function ContextMenuContent({
37
32
  sideOffset = 0,
38
33
  ...props
39
34
  }: ContextMenuPrimitive.Popup.Props &
40
- Pick<
41
- ContextMenuPrimitive.Positioner.Props,
42
- "align" | "alignOffset" | "side" | "sideOffset"
43
- >) {
35
+ Pick<ContextMenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
44
36
  return (
45
37
  <ContextMenuPrimitive.Portal>
46
38
  <ContextMenuPrimitive.Positioner
@@ -52,18 +44,19 @@ function ContextMenuContent({
52
44
  >
53
45
  <ContextMenuPrimitive.Popup
54
46
  data-slot="context-menu-content"
55
- className={cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none", className )}
47
+ className={cn(
48
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",
49
+ className,
50
+ )}
56
51
  {...props}
57
52
  />
58
53
  </ContextMenuPrimitive.Positioner>
59
54
  </ContextMenuPrimitive.Portal>
60
- )
55
+ );
61
56
  }
62
57
 
63
58
  function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
64
- return (
65
- <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
66
- )
59
+ return <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />;
67
60
  }
68
61
 
69
62
  function ContextMenuLabel({
@@ -71,7 +64,7 @@ function ContextMenuLabel({
71
64
  inset,
72
65
  ...props
73
66
  }: ContextMenuPrimitive.GroupLabel.Props & {
74
- inset?: boolean
67
+ inset?: boolean;
75
68
  }) {
76
69
  return (
77
70
  <ContextMenuPrimitive.GroupLabel
@@ -80,7 +73,7 @@ function ContextMenuLabel({
80
73
  className={cn("text-muted-foreground px-2 py-1.5 text-xs data-[inset]:pl-8", className)}
81
74
  {...props}
82
75
  />
83
- )
76
+ );
84
77
  }
85
78
 
86
79
  function ContextMenuItem({
@@ -89,8 +82,8 @@ function ContextMenuItem({
89
82
  variant = "default",
90
83
  ...props
91
84
  }: ContextMenuPrimitive.Item.Props & {
92
- inset?: boolean
93
- variant?: "default" | "destructive"
85
+ inset?: boolean;
86
+ variant?: "default" | "destructive";
94
87
  }) {
95
88
  return (
96
89
  <ContextMenuPrimitive.Item
@@ -99,17 +92,15 @@ function ContextMenuItem({
99
92
  data-variant={variant}
100
93
  className={cn(
101
94
  "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
102
- className
95
+ className,
103
96
  )}
104
97
  {...props}
105
98
  />
106
- )
99
+ );
107
100
  }
108
101
 
109
102
  function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
110
- return (
111
- <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
112
- )
103
+ return <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />;
113
104
  }
114
105
 
115
106
  function ContextMenuSubTrigger({
@@ -118,7 +109,7 @@ function ContextMenuSubTrigger({
118
109
  children,
119
110
  ...props
120
111
  }: ContextMenuPrimitive.SubmenuTrigger.Props & {
121
- inset?: boolean
112
+ inset?: boolean;
122
113
  }) {
123
114
  return (
124
115
  <ContextMenuPrimitive.SubmenuTrigger
@@ -126,116 +117,86 @@ function ContextMenuSubTrigger({
126
117
  data-inset={inset}
127
118
  className={cn(
128
119
  "focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
129
- className
120
+ className,
130
121
  )}
131
122
  {...props}
132
123
  >
133
124
  {children}
134
125
  <ChevronRightIcon className="ml-auto" />
135
126
  </ContextMenuPrimitive.SubmenuTrigger>
136
- )
127
+ );
137
128
  }
138
129
 
139
- function ContextMenuSubContent({
140
- ...props
141
- }: React.ComponentProps<typeof ContextMenuContent>) {
142
- return (
143
- <ContextMenuContent
144
- data-slot="context-menu-sub-content"
145
- className="shadow-lg"
146
- side="right"
147
- {...props}
148
- />
149
- )
130
+ function ContextMenuSubContent({ ...props }: React.ComponentProps<typeof ContextMenuContent>) {
131
+ return <ContextMenuContent data-slot="context-menu-sub-content" className="shadow-lg" side="right" {...props} />;
150
132
  }
151
133
 
152
- function ContextMenuCheckboxItem({
153
- className,
154
- children,
155
- checked,
156
- ...props
157
- }: ContextMenuPrimitive.CheckboxItem.Props) {
134
+ function ContextMenuCheckboxItem({ className, children, checked, ...props }: ContextMenuPrimitive.CheckboxItem.Props) {
158
135
  return (
159
136
  <ContextMenuPrimitive.CheckboxItem
160
137
  data-slot="context-menu-checkbox-item"
161
138
  className={cn(
162
139
  "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
163
- className
140
+ className,
164
141
  )}
165
142
  checked={checked}
166
143
  {...props}
167
144
  >
168
145
  <span className="pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none">
169
146
  <ContextMenuPrimitive.CheckboxItemIndicator>
170
- <CheckIcon
171
- />
147
+ <CheckIcon />
172
148
  </ContextMenuPrimitive.CheckboxItemIndicator>
173
149
  </span>
174
150
  {children}
175
151
  </ContextMenuPrimitive.CheckboxItem>
176
- )
152
+ );
177
153
  }
178
154
 
179
- function ContextMenuRadioGroup({
180
- ...props
181
- }: ContextMenuPrimitive.RadioGroup.Props) {
182
- return (
183
- <ContextMenuPrimitive.RadioGroup
184
- data-slot="context-menu-radio-group"
185
- {...props}
186
- />
187
- )
155
+ function ContextMenuRadioGroup({ ...props }: ContextMenuPrimitive.RadioGroup.Props) {
156
+ return <ContextMenuPrimitive.RadioGroup data-slot="context-menu-radio-group" {...props} />;
188
157
  }
189
158
 
190
- function ContextMenuRadioItem({
191
- className,
192
- children,
193
- ...props
194
- }: ContextMenuPrimitive.RadioItem.Props) {
159
+ function ContextMenuRadioItem({ className, children, ...props }: ContextMenuPrimitive.RadioItem.Props) {
195
160
  return (
196
161
  <ContextMenuPrimitive.RadioItem
197
162
  data-slot="context-menu-radio-item"
198
163
  className={cn(
199
164
  "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
200
- className
165
+ className,
201
166
  )}
202
167
  {...props}
203
168
  >
204
169
  <span className="pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none">
205
170
  <ContextMenuPrimitive.RadioItemIndicator>
206
- <CheckIcon
207
- />
171
+ <CheckIcon />
208
172
  </ContextMenuPrimitive.RadioItemIndicator>
209
173
  </span>
210
174
  {children}
211
175
  </ContextMenuPrimitive.RadioItem>
212
- )
176
+ );
213
177
  }
214
178
 
215
- function ContextMenuSeparator({
216
- className,
217
- ...props
218
- }: ContextMenuPrimitive.Separator.Props) {
179
+ function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.Separator.Props) {
219
180
  return (
220
181
  <ContextMenuPrimitive.Separator
221
182
  data-slot="context-menu-separator"
222
183
  className={cn("bg-border/50 -mx-1 my-1 h-px", className)}
223
184
  {...props}
224
185
  />
225
- )
186
+ );
226
187
  }
227
188
 
228
- function ContextMenuShortcut({
229
- className,
230
- ...props
231
- }: React.ComponentProps<"span">) {
189
+ function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
232
190
  return (
233
191
  <span
234
192
  data-slot="context-menu-shortcut"
235
- className={cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-[0.625rem] tracking-widest", className)}
193
+ className={cn(
194
+ "text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-[0.625rem] tracking-widest",
195
+ className,
196
+ )}
236
197
  {...props}
237
198
  />
238
- )
199
+ );
239
200
  }
240
201
 
241
202
  export {
@@ -254,4 +215,4 @@ export {
254
215
  ContextMenuSubContent,
255
216
  ContextMenuSubTrigger,
256
217
  ContextMenuRadioGroup,
257
- }
218
+ };
@@ -1,39 +1,39 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
3
+ import * as React from "react";
4
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
8
- import { XIcon } from "lucide-react"
6
+ import { cn } from "@/lib/utils";
7
+ import { Button } from "@/components/ui/button";
8
+ import { XIcon } from "lucide-react";
9
9
 
10
10
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
11
- return <DialogPrimitive.Root data-slot="dialog" {...props} />
11
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;
12
12
  }
13
13
 
14
14
  function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
15
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
15
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
16
16
  }
17
17
 
18
18
  function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
19
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
19
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
20
20
  }
21
21
 
22
22
  function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
23
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
23
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
24
24
  }
25
25
 
26
- function DialogOverlay({
27
- className,
28
- ...props
29
- }: DialogPrimitive.Backdrop.Props) {
26
+ function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {
30
27
  return (
31
28
  <DialogPrimitive.Backdrop
32
29
  data-slot="dialog-overlay"
33
- className={cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50", className)}
30
+ className={cn(
31
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",
32
+ className,
33
+ )}
34
34
  {...props}
35
35
  />
36
- )
36
+ );
37
37
  }
38
38
 
39
39
  function DialogContent({
@@ -42,7 +42,7 @@ function DialogContent({
42
42
  showCloseButton = true,
43
43
  ...props
44
44
  }: DialogPrimitive.Popup.Props & {
45
- showCloseButton?: boolean
45
+ showCloseButton?: boolean;
46
46
  }) {
47
47
  return (
48
48
  <DialogPortal>
@@ -51,7 +51,7 @@ function DialogContent({
51
51
  data-slot="dialog-content"
52
52
  className={cn(
53
53
  "bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid gap-4 rounded-xl p-4 text-xs/relaxed ring-1 duration-100 fixed top-1/2 left-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 outline-none",
54
- className
54
+ className,
55
55
  )}
56
56
  {...props}
57
57
  >
@@ -59,32 +59,19 @@ function DialogContent({
59
59
  {showCloseButton && (
60
60
  <DialogPrimitive.Close
61
61
  data-slot="dialog-close"
62
- render={
63
- <Button
64
- variant="ghost"
65
- className="absolute top-2 right-2"
66
- size="icon-sm"
67
- />
68
- }
62
+ render={<Button variant="ghost" className="absolute top-2 right-2" size="icon-sm" />}
69
63
  >
70
- <XIcon
71
- />
64
+ <XIcon />
72
65
  <span className="sr-only">Close</span>
73
66
  </DialogPrimitive.Close>
74
67
  )}
75
68
  </DialogPrimitive.Popup>
76
69
  </DialogPortal>
77
- )
70
+ );
78
71
  }
79
72
 
80
73
  function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
81
- return (
82
- <div
83
- data-slot="dialog-header"
84
- className={cn("gap-1 flex flex-col", className)}
85
- {...props}
86
- />
87
- )
74
+ return <div data-slot="dialog-header" className={cn("gap-1 flex flex-col", className)} {...props} />;
88
75
  }
89
76
 
90
77
  function DialogFooter({
@@ -93,48 +80,35 @@ function DialogFooter({
93
80
  children,
94
81
  ...props
95
82
  }: React.ComponentProps<"div"> & {
96
- showCloseButton?: boolean
83
+ showCloseButton?: boolean;
97
84
  }) {
98
85
  return (
99
86
  <div
100
87
  data-slot="dialog-footer"
101
- className={cn(
102
- "gap-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
103
- className
104
- )}
88
+ className={cn("gap-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)}
105
89
  {...props}
106
90
  >
107
91
  {children}
108
- {showCloseButton && (
109
- <DialogPrimitive.Close render={<Button variant="outline" />}>
110
- Close
111
- </DialogPrimitive.Close>
112
- )}
92
+ {showCloseButton && <DialogPrimitive.Close render={<Button variant="outline" />}>Close</DialogPrimitive.Close>}
113
93
  </div>
114
- )
94
+ );
115
95
  }
116
96
 
117
97
  function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
118
- return (
119
- <DialogPrimitive.Title
120
- data-slot="dialog-title"
121
- className={cn("text-sm font-medium", className)}
122
- {...props}
123
- />
124
- )
98
+ return <DialogPrimitive.Title data-slot="dialog-title" className={cn("text-sm font-medium", className)} {...props} />;
125
99
  }
126
100
 
127
- function DialogDescription({
128
- className,
129
- ...props
130
- }: DialogPrimitive.Description.Props) {
101
+ function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {
131
102
  return (
132
103
  <DialogPrimitive.Description
133
104
  data-slot="dialog-description"
134
- className={cn("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3", className)}
105
+ className={cn(
106
+ "text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3",
107
+ className,
108
+ )}
135
109
  {...props}
136
110
  />
137
- )
111
+ );
138
112
  }
139
113
 
140
114
  export {
@@ -148,4 +122,4 @@ export {
148
122
  DialogPortal,
149
123
  DialogTitle,
150
124
  DialogTrigger,
151
- }
125
+ };
@@ -1,52 +1,40 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { Drawer as DrawerPrimitive } from "vaul"
3
+ import * as React from "react";
4
+ import { Drawer as DrawerPrimitive } from "vaul";
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@/lib/utils";
7
7
 
8
- function Drawer({
9
- ...props
10
- }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
11
- return <DrawerPrimitive.Root data-slot="drawer" {...props} />
8
+ function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
9
+ return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
12
10
  }
13
11
 
14
- function DrawerTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
17
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
12
+ function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
13
+ return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
18
14
  }
19
15
 
20
- function DrawerPortal({
21
- ...props
22
- }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
23
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
16
+ function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
17
+ return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
24
18
  }
25
19
 
26
- function DrawerClose({
27
- ...props
28
- }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
29
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
20
+ function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
21
+ return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
30
22
  }
31
23
 
32
- function DrawerOverlay({
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
24
+ function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
36
25
  return (
37
26
  <DrawerPrimitive.Overlay
38
27
  data-slot="drawer-overlay"
39
- className={cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className)}
28
+ className={cn(
29
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",
30
+ className,
31
+ )}
40
32
  {...props}
41
33
  />
42
- )
34
+ );
43
35
  }
44
36
 
45
- function DrawerContent({
46
- className,
47
- children,
48
- ...props
49
- }: React.ComponentProps<typeof DrawerPrimitive.Content>) {
37
+ function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {
50
38
  return (
51
39
  <DrawerPortal data-slot="drawer-portal">
52
40
  <DrawerOverlay />
@@ -54,7 +42,7 @@ function DrawerContent({
54
42
  data-slot="drawer-content"
55
43
  className={cn(
56
44
  "before:bg-background relative flex h-auto flex-col bg-transparent p-2 text-xs/relaxed before:absolute before:inset-2 before:-z-10 before:rounded-xl 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=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 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=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm group/drawer-content fixed z-50",
57
- className
45
+ className,
58
46
  )}
59
47
  {...props}
60
48
  >
@@ -62,53 +50,44 @@ function DrawerContent({
62
50
  {children}
63
51
  </DrawerPrimitive.Content>
64
52
  </DrawerPortal>
65
- )
53
+ );
66
54
  }
67
55
 
68
56
  function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
69
57
  return (
70
58
  <div
71
59
  data-slot="drawer-header"
72
- className={cn("gap-1 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left flex flex-col", className)}
60
+ className={cn(
61
+ "gap-1 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left flex flex-col",
62
+ className,
63
+ )}
73
64
  {...props}
74
65
  />
75
- )
66
+ );
76
67
  }
77
68
 
78
69
  function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
79
- return (
80
- <div
81
- data-slot="drawer-footer"
82
- className={cn("gap-2 p-4 mt-auto flex flex-col", className)}
83
- {...props}
84
- />
85
- )
70
+ return <div data-slot="drawer-footer" className={cn("gap-2 p-4 mt-auto flex flex-col", className)} {...props} />;
86
71
  }
87
72
 
88
- function DrawerTitle({
89
- className,
90
- ...props
91
- }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
73
+ function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
92
74
  return (
93
75
  <DrawerPrimitive.Title
94
76
  data-slot="drawer-title"
95
77
  className={cn("text-foreground text-sm font-medium", className)}
96
78
  {...props}
97
79
  />
98
- )
80
+ );
99
81
  }
100
82
 
101
- function DrawerDescription({
102
- className,
103
- ...props
104
- }: React.ComponentProps<typeof DrawerPrimitive.Description>) {
83
+ function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {
105
84
  return (
106
85
  <DrawerPrimitive.Description
107
86
  data-slot="drawer-description"
108
87
  className={cn("text-muted-foreground text-xs/relaxed", className)}
109
88
  {...props}
110
89
  />
111
- )
90
+ );
112
91
  }
113
92
 
114
93
  export {
@@ -122,4 +101,4 @@ export {
122
101
  DrawerFooter,
123
102
  DrawerTitle,
124
103
  DrawerDescription,
125
- }
104
+ };