@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,12 +1,12 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import * as React from "react";
4
+ import { cva, type VariantProps } from "class-variance-authority";
5
5
 
6
- import { cn } from "../../utils/cn"
7
- import { Button } from "./button"
8
- import { Input } from "./input"
9
- import { Textarea } from "./textarea"
6
+ import { cn } from "../../utils/cn";
7
+ import { Button } from "./button";
8
+ import { Input } from "./input";
9
+ import { Textarea } from "./textarea";
10
10
 
11
11
  function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
12
  return (
@@ -15,11 +15,11 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
15
15
  role="group"
16
16
  className={cn(
17
17
  "border-input bg-input/20 dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-7 rounded-md border transition-colors has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:ring-[2px] has-[[data-slot][aria-invalid=true]]:ring-[2px] has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",
18
- className
18
+ className,
19
19
  )}
20
20
  {...props}
21
21
  />
22
- )
22
+ );
23
23
  }
24
24
 
25
25
  const inputGroupAddonVariants = cva(
@@ -31,15 +31,14 @@ const inputGroupAddonVariants = cva(
31
31
  "inline-end": "pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem] order-last",
32
32
  "block-start":
33
33
  "px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
34
- "block-end":
35
- "px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
34
+ "block-end": "px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
36
35
  },
37
36
  },
38
37
  defaultVariants: {
39
38
  align: "inline-start",
40
39
  },
41
- }
42
- )
40
+ },
41
+ );
43
42
 
44
43
  function InputGroupAddon({
45
44
  className,
@@ -54,31 +53,28 @@ function InputGroupAddon({
54
53
  className={cn(inputGroupAddonVariants({ align }), className)}
55
54
  onClick={(e) => {
56
55
  if ((e.target as HTMLElement).closest("button")) {
57
- return
56
+ return;
58
57
  }
59
- e.currentTarget.parentElement?.querySelector("input")?.focus()
58
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
60
59
  }}
61
60
  {...props}
62
61
  />
63
- )
62
+ );
64
63
  }
65
64
 
66
- const inputGroupButtonVariants = cva(
67
- "gap-2 rounded-md text-xs/relaxed shadow-none flex items-center",
68
- {
69
- variants: {
70
- size: {
71
- xs: "h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",
72
- sm: "",
73
- "icon-xs": "size-6 p-0 has-[>svg]:p-0",
74
- "icon-sm": "size-8 p-0 has-[>svg]:p-0",
75
- },
65
+ const inputGroupButtonVariants = cva("gap-2 rounded-md text-xs/relaxed shadow-none flex items-center", {
66
+ variants: {
67
+ size: {
68
+ xs: "h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",
69
+ sm: "",
70
+ "icon-xs": "size-6 p-0 has-[>svg]:p-0",
71
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0",
76
72
  },
77
- defaultVariants: {
78
- size: "xs",
79
- },
80
- }
81
- )
73
+ },
74
+ defaultVariants: {
75
+ size: "xs",
76
+ },
77
+ });
82
78
 
83
79
  function InputGroupButton({
84
80
  className,
@@ -88,7 +84,7 @@ function InputGroupButton({
88
84
  ...props
89
85
  }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
90
86
  VariantProps<typeof inputGroupButtonVariants> & {
91
- type?: "button" | "submit" | "reset"
87
+ type?: "button" | "submit" | "reset";
92
88
  }) {
93
89
  return (
94
90
  <Button
@@ -98,7 +94,7 @@ function InputGroupButton({
98
94
  className={cn(inputGroupButtonVariants({ size }), className)}
99
95
  {...props}
100
96
  />
101
- )
97
+ );
102
98
  }
103
99
 
104
100
  function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
@@ -106,44 +102,37 @@ function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
106
102
  <span
107
103
  className={cn(
108
104
  "text-muted-foreground gap-2 text-xs/relaxed [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none",
109
- className
105
+ className,
110
106
  )}
111
107
  {...props}
112
108
  />
113
- )
109
+ );
114
110
  }
115
111
 
116
- function InputGroupInput({
117
- className,
118
- ...props
119
- }: React.ComponentProps<"input">) {
112
+ function InputGroupInput({ className, ...props }: React.ComponentProps<"input">) {
120
113
  return (
121
114
  <Input
122
115
  data-slot="input-group-control"
123
- className={cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1", className)}
116
+ className={cn(
117
+ "rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1",
118
+ className,
119
+ )}
124
120
  {...props}
125
121
  />
126
- )
122
+ );
127
123
  }
128
124
 
129
- function InputGroupTextarea({
130
- className,
131
- ...props
132
- }: React.ComponentProps<"textarea">) {
125
+ function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">) {
133
126
  return (
134
127
  <Textarea
135
128
  data-slot="input-group-control"
136
- className={cn("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none", className)}
129
+ className={cn(
130
+ "rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none",
131
+ className,
132
+ )}
137
133
  {...props}
138
134
  />
139
- )
135
+ );
140
136
  }
141
137
 
142
- export {
143
- InputGroup,
144
- InputGroupAddon,
145
- InputGroupButton,
146
- InputGroupText,
147
- InputGroupInput,
148
- InputGroupTextarea,
149
- }
138
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea };
@@ -1,43 +1,40 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { OTPInput, OTPInputContext } from "input-otp"
3
+ import * as React from "react";
4
+ import { OTPInput, OTPInputContext } from "input-otp";
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { MinusIcon } from "lucide-react"
6
+ import { cn } from "@/lib/utils";
7
+ import { MinusIcon } from "lucide-react";
8
8
 
9
9
  function InputOTP({
10
10
  className,
11
11
  containerClassName,
12
12
  ...props
13
13
  }: React.ComponentProps<typeof OTPInput> & {
14
- containerClassName?: string
14
+ containerClassName?: string;
15
15
  }) {
16
16
  return (
17
17
  <OTPInput
18
18
  data-slot="input-otp"
19
- containerClassName={cn(
20
- "cn-input-otp flex items-center has-disabled:opacity-50",
21
- containerClassName
22
- )}
19
+ containerClassName={cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName)}
23
20
  spellCheck={false}
24
- className={cn(
25
- "disabled:cursor-not-allowed",
26
- className
27
- )}
21
+ className={cn("disabled:cursor-not-allowed", className)}
28
22
  {...props}
29
23
  />
30
- )
24
+ );
31
25
  }
32
26
 
33
27
  function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
34
28
  return (
35
29
  <div
36
30
  data-slot="input-otp-group"
37
- className={cn("has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-[2px] flex items-center", className)}
31
+ className={cn(
32
+ "has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-[2px] flex items-center",
33
+ className,
34
+ )}
38
35
  {...props}
39
36
  />
40
- )
37
+ );
41
38
  }
42
39
 
43
40
  function InputOTPSlot({
@@ -45,10 +42,10 @@ function InputOTPSlot({
45
42
  className,
46
43
  ...props
47
44
  }: React.ComponentProps<"div"> & {
48
- index: number
45
+ index: number;
49
46
  }) {
50
- const inputOTPContext = React.useContext(OTPInputContext)
51
- const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}
47
+ const inputOTPContext = React.useContext(OTPInputContext);
48
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
52
49
 
53
50
  return (
54
51
  <div
@@ -56,7 +53,7 @@ function InputOTPSlot({
56
53
  data-active={isActive}
57
54
  className={cn(
58
55
  "bg-input/20 dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-7 border-y border-r text-xs/relaxed transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:ring-[2px] relative flex items-center justify-center data-[active=true]:z-10",
59
- className
56
+ className,
60
57
  )}
61
58
  {...props}
62
59
  >
@@ -67,7 +64,7 @@ function InputOTPSlot({
67
64
  </div>
68
65
  )}
69
66
  </div>
70
- )
67
+ );
71
68
  }
72
69
 
73
70
  function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
@@ -78,10 +75,9 @@ function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
78
75
  role="separator"
79
76
  {...props}
80
77
  >
81
- <MinusIcon
82
- />
78
+ <MinusIcon />
83
79
  </div>
84
- )
80
+ );
85
81
  }
86
82
 
87
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }
83
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -1,7 +1,7 @@
1
- import * as React from "react"
2
- import { Input as InputPrimitive } from "@base-ui/react/input"
1
+ import * as React from "react";
2
+ import { Input as InputPrimitive } from "@base-ui/react/input";
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@/lib/utils";
5
5
 
6
6
  function Input({ className, type, ...props }: React.ComponentProps<"input">) {
7
7
  return (
@@ -10,11 +10,11 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
10
10
  data-slot="input"
11
11
  className={cn(
12
12
  "bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 rounded-md border px-2 py-0.5 text-sm transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
13
- className
13
+ className,
14
14
  )}
15
15
  {...props}
16
16
  />
17
- )
17
+ );
18
18
  }
19
19
 
20
- export { Input }
20
+ export { Input };
@@ -1,8 +1,8 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
3
+ import * as React from "react";
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@/lib/utils";
6
6
 
7
7
  function Label({ className, ...props }: React.ComponentProps<"label">) {
8
8
  return (
@@ -10,11 +10,11 @@ function Label({ className, ...props }: React.ComponentProps<"label">) {
10
10
  data-slot="label"
11
11
  className={cn(
12
12
  "gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
13
- className
13
+ className,
14
14
  )}
15
15
  {...props}
16
16
  />
17
- )
17
+ );
18
18
  }
19
19
 
20
- export { Label }
20
+ export { Label };
@@ -1,67 +1,46 @@
1
- import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
2
- import { cva } from "class-variance-authority"
1
+ import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
2
+ import { cva } from "class-variance-authority";
3
3
 
4
- import { cn } from "@/lib/utils"
5
- import { ChevronDownIcon } from "lucide-react"
4
+ import { cn } from "@/lib/utils";
5
+ import { ChevronDownIcon } from "lucide-react";
6
6
 
7
- function NavigationMenu({
8
- className,
9
- children,
10
- ...props
11
- }: NavigationMenuPrimitive.Root.Props) {
7
+ function NavigationMenu({ className, children, ...props }: NavigationMenuPrimitive.Root.Props) {
12
8
  return (
13
9
  <NavigationMenuPrimitive.Root
14
10
  data-slot="navigation-menu"
15
11
  className={cn(
16
12
  "max-w-max group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
17
- className
13
+ className,
18
14
  )}
19
15
  {...props}
20
16
  >
21
17
  {children}
22
18
  <NavigationMenuPositioner />
23
19
  </NavigationMenuPrimitive.Root>
24
- )
20
+ );
25
21
  }
26
22
 
27
- function NavigationMenuList({
28
- className,
29
- ...props
30
- }: NavigationMenuPrimitive.List.Props) {
23
+ function NavigationMenuList({ className, ...props }: NavigationMenuPrimitive.List.Props) {
31
24
  return (
32
25
  <NavigationMenuPrimitive.List
33
26
  data-slot="navigation-menu-list"
34
- className={cn(
35
- "gap-0 group flex flex-1 list-none items-center justify-center",
36
- className
37
- )}
27
+ className={cn("gap-0 group flex flex-1 list-none items-center justify-center", className)}
38
28
  {...props}
39
29
  />
40
- )
30
+ );
41
31
  }
42
32
 
43
- function NavigationMenuItem({
44
- className,
45
- ...props
46
- }: NavigationMenuPrimitive.Item.Props) {
33
+ function NavigationMenuItem({ className, ...props }: NavigationMenuPrimitive.Item.Props) {
47
34
  return (
48
- <NavigationMenuPrimitive.Item
49
- data-slot="navigation-menu-item"
50
- className={cn("relative", className)}
51
- {...props}
52
- />
53
- )
35
+ <NavigationMenuPrimitive.Item data-slot="navigation-menu-item" className={cn("relative", className)} {...props} />
36
+ );
54
37
  }
55
38
 
56
39
  const navigationMenuTriggerStyle = cva(
57
- "bg-background hover:bg-muted focus:bg-muted data-open:hover:bg-muted data-open:focus:bg-muted data-open:bg-muted/50 focus-visible:ring-ring/30 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted rounded-md px-2.5 py-1.5 text-xs/relaxed font-medium transition-all focus-visible:ring-[2px] focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center disabled:pointer-events-none outline-none"
58
- )
40
+ "bg-background hover:bg-muted focus:bg-muted data-open:hover:bg-muted data-open:focus:bg-muted data-open:bg-muted/50 focus-visible:ring-ring/30 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted rounded-md px-2.5 py-1.5 text-xs/relaxed font-medium transition-all focus-visible:ring-[2px] focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center disabled:pointer-events-none outline-none",
41
+ );
59
42
 
60
- function NavigationMenuTrigger({
61
- className,
62
- children,
63
- ...props
64
- }: NavigationMenuPrimitive.Trigger.Props) {
43
+ function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuPrimitive.Trigger.Props) {
65
44
  return (
66
45
  <NavigationMenuPrimitive.Trigger
67
46
  data-slot="navigation-menu-trigger"
@@ -69,25 +48,25 @@ function NavigationMenuTrigger({
69
48
  {...props}
70
49
  >
71
50
  {children}{" "}
72
- <ChevronDownIcon className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180" aria-hidden="true" />
51
+ <ChevronDownIcon
52
+ className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180"
53
+ aria-hidden="true"
54
+ />
73
55
  </NavigationMenuPrimitive.Trigger>
74
- )
56
+ );
75
57
  }
76
58
 
77
- function NavigationMenuContent({
78
- className,
79
- ...props
80
- }: NavigationMenuPrimitive.Content.Props) {
59
+ function NavigationMenuContent({ className, ...props }: NavigationMenuPrimitive.Content.Props) {
81
60
  return (
82
61
  <NavigationMenuPrimitive.Content
83
62
  data-slot="navigation-menu-content"
84
63
  className={cn(
85
64
  "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-xl group-data-[viewport=false]/navigation-menu:shadow-md group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
86
- className
65
+ className,
87
66
  )}
88
67
  {...props}
89
68
  />
90
- )
69
+ );
91
70
  }
92
71
 
93
72
  function NavigationMenuPositioner({
@@ -107,7 +86,7 @@ function NavigationMenuPositioner({
107
86
  alignOffset={alignOffset}
108
87
  className={cn(
109
88
  "transition-[top,left,right,bottom] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 isolate z-50 h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)] data-[instant]:transition-none",
110
- className
89
+ className,
111
90
  )}
112
91
  {...props}
113
92
  >
@@ -116,38 +95,35 @@ function NavigationMenuPositioner({
116
95
  </NavigationMenuPrimitive.Popup>
117
96
  </NavigationMenuPrimitive.Positioner>
118
97
  </NavigationMenuPrimitive.Portal>
119
- )
98
+ );
120
99
  }
121
100
 
122
- function NavigationMenuLink({
123
- className,
124
- ...props
125
- }: NavigationMenuPrimitive.Link.Props) {
101
+ function NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props) {
126
102
  return (
127
103
  <NavigationMenuPrimitive.Link
128
104
  data-slot="navigation-menu-link"
129
- className={cn("data-[active=true]:focus:bg-muted data-[active=true]:hover:bg-muted data-[active=true]:bg-muted/50 focus-visible:ring-ring/30 hover:bg-muted focus:bg-muted flex items-center gap-1.5 rounded-lg p-2 text-xs/relaxed transition-all outline-none focus-visible:ring-[2px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", className)}
105
+ className={cn(
106
+ "data-[active=true]:focus:bg-muted data-[active=true]:hover:bg-muted data-[active=true]:bg-muted/50 focus-visible:ring-ring/30 hover:bg-muted focus:bg-muted flex items-center gap-1.5 rounded-lg p-2 text-xs/relaxed transition-all outline-none focus-visible:ring-[2px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
107
+ className,
108
+ )}
130
109
  {...props}
131
110
  />
132
- )
111
+ );
133
112
  }
134
113
 
135
- function NavigationMenuIndicator({
136
- className,
137
- ...props
138
- }: NavigationMenuPrimitive.Icon.Props) {
114
+ function NavigationMenuIndicator({ className, ...props }: NavigationMenuPrimitive.Icon.Props) {
139
115
  return (
140
116
  <NavigationMenuPrimitive.Icon
141
117
  data-slot="navigation-menu-indicator"
142
118
  className={cn(
143
119
  "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
144
- className
120
+ className,
145
121
  )}
146
122
  {...props}
147
123
  >
148
124
  <div className="bg-border rounded-tl-sm shadow-md relative top-[60%] h-2 w-2 rotate-45" />
149
125
  </NavigationMenuPrimitive.Icon>
150
- )
126
+ );
151
127
  }
152
128
 
153
129
  export {
@@ -160,4 +136,4 @@ export {
160
136
  NavigationMenuTrigger,
161
137
  navigationMenuTriggerStyle,
162
138
  NavigationMenuPositioner,
163
- }
139
+ };
@@ -1,16 +1,16 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
3
+ import * as React from "react";
4
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@/lib/utils";
7
7
 
8
8
  function Popover({ ...props }: PopoverPrimitive.Root.Props) {
9
- return <PopoverPrimitive.Root data-slot="popover" {...props} />
9
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />;
10
10
  }
11
11
 
12
12
  function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
13
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
13
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
14
14
  }
15
15
 
16
16
  function PopoverContent({
@@ -21,10 +21,7 @@ function PopoverContent({
21
21
  sideOffset = 4,
22
22
  ...props
23
23
  }: PopoverPrimitive.Popup.Props &
24
- Pick<
25
- PopoverPrimitive.Positioner.Props,
26
- "align" | "alignOffset" | "side" | "sideOffset"
27
- >) {
24
+ Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
28
25
  return (
29
26
  <PopoverPrimitive.Portal>
30
27
  <PopoverPrimitive.Positioner
@@ -38,53 +35,33 @@ function PopoverContent({
38
35
  data-slot="popover-content"
39
36
  className={cn(
40
37
  "bg-popover text-popover-foreground 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 flex flex-col gap-4 rounded-lg p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",
41
- className
38
+ className,
42
39
  )}
43
40
  {...props}
44
41
  />
45
42
  </PopoverPrimitive.Positioner>
46
43
  </PopoverPrimitive.Portal>
47
- )
44
+ );
48
45
  }
49
46
 
50
47
  function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
51
- return (
52
- <div
53
- data-slot="popover-header"
54
- className={cn("flex flex-col gap-1 text-xs", className)}
55
- {...props}
56
- />
57
- )
48
+ return <div data-slot="popover-header" className={cn("flex flex-col gap-1 text-xs", className)} {...props} />;
58
49
  }
59
50
 
60
51
  function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
61
52
  return (
62
- <PopoverPrimitive.Title
63
- data-slot="popover-title"
64
- className={cn("text-sm font-medium", className)}
65
- {...props}
66
- />
67
- )
53
+ <PopoverPrimitive.Title data-slot="popover-title" className={cn("text-sm font-medium", className)} {...props} />
54
+ );
68
55
  }
69
56
 
70
- function PopoverDescription({
71
- className,
72
- ...props
73
- }: PopoverPrimitive.Description.Props) {
57
+ function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {
74
58
  return (
75
59
  <PopoverPrimitive.Description
76
60
  data-slot="popover-description"
77
61
  className={cn("text-muted-foreground", className)}
78
62
  {...props}
79
63
  />
80
- )
64
+ );
81
65
  }
82
66
 
83
- export {
84
- Popover,
85
- PopoverContent,
86
- PopoverDescription,
87
- PopoverHeader,
88
- PopoverTitle,
89
- PopoverTrigger,
90
- }
67
+ export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };