@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,33 +1,26 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@/lib/utils";
5
5
 
6
- const alertVariants = cva("grid gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5 w-full relative group/alert", {
7
- variants: {
8
- variant: {
9
- default: "bg-card text-card-foreground",
10
- destructive: "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
6
+ const alertVariants = cva(
7
+ "grid gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5 w-full relative group/alert",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-card text-card-foreground",
12
+ destructive:
13
+ "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
11
18
  },
12
19
  },
13
- defaultVariants: {
14
- variant: "default",
15
- },
16
- })
20
+ );
17
21
 
18
- function Alert({
19
- className,
20
- variant,
21
- ...props
22
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
23
- return (
24
- <div
25
- data-slot="alert"
26
- role="alert"
27
- className={cn(alertVariants({ variant }), className)}
28
- {...props}
29
- />
30
- )
22
+ function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
23
+ return <div data-slot="alert" role="alert" className={cn(alertVariants({ variant }), className)} {...props} />;
31
24
  }
32
25
 
33
26
  function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
@@ -36,37 +29,28 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
36
29
  data-slot="alert-title"
37
30
  className={cn(
38
31
  "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
39
- className
32
+ className,
40
33
  )}
41
34
  {...props}
42
35
  />
43
- )
36
+ );
44
37
  }
45
38
 
46
- function AlertDescription({
47
- className,
48
- ...props
49
- }: React.ComponentProps<"div">) {
39
+ function AlertDescription({ className, ...props }: React.ComponentProps<"div">) {
50
40
  return (
51
41
  <div
52
42
  data-slot="alert-description"
53
43
  className={cn(
54
44
  "text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
55
- className
45
+ className,
56
46
  )}
57
47
  {...props}
58
48
  />
59
- )
49
+ );
60
50
  }
61
51
 
62
52
  function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
63
- return (
64
- <div
65
- data-slot="alert-action"
66
- className={cn("absolute top-1.5 right-2", className)}
67
- {...props}
68
- />
69
- )
53
+ return <div data-slot="alert-action" className={cn("absolute top-1.5 right-2", className)} {...props} />;
70
54
  }
71
55
 
72
- export { Alert, AlertTitle, AlertDescription, AlertAction }
56
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -1,16 +1,16 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
3
+ import * as React from "react";
4
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@/lib/utils";
7
7
 
8
8
  function Avatar({
9
9
  className,
10
10
  size = "default",
11
11
  ...props
12
12
  }: AvatarPrimitive.Root.Props & {
13
- size?: "default" | "sm" | "lg"
13
+ size?: "default" | "sm" | "lg";
14
14
  }) {
15
15
  return (
16
16
  <AvatarPrimitive.Root
@@ -18,40 +18,34 @@ function Avatar({
18
18
  data-size={size}
19
19
  className={cn(
20
20
  "size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 after:border-border group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten",
21
- className
21
+ className,
22
22
  )}
23
23
  {...props}
24
24
  />
25
- )
25
+ );
26
26
  }
27
27
 
28
28
  function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
29
29
  return (
30
30
  <AvatarPrimitive.Image
31
31
  data-slot="avatar-image"
32
- className={cn(
33
- "rounded-full aspect-square size-full object-cover",
34
- className
35
- )}
32
+ className={cn("rounded-full aspect-square size-full object-cover", className)}
36
33
  {...props}
37
34
  />
38
- )
35
+ );
39
36
  }
40
37
 
41
- function AvatarFallback({
42
- className,
43
- ...props
44
- }: AvatarPrimitive.Fallback.Props) {
38
+ function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props) {
45
39
  return (
46
40
  <AvatarPrimitive.Fallback
47
41
  data-slot="avatar-fallback"
48
42
  className={cn(
49
43
  "bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs",
50
- className
44
+ className,
51
45
  )}
52
46
  {...props}
53
47
  />
54
- )
48
+ );
55
49
  }
56
50
 
57
51
  function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
@@ -63,11 +57,11 @@ function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
63
57
  "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
64
58
  "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
65
59
  "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
66
- className
60
+ className,
67
61
  )}
68
62
  {...props}
69
63
  />
70
- )
64
+ );
71
65
  }
72
66
 
73
67
  function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
@@ -76,31 +70,24 @@ function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
76
70
  data-slot="avatar-group"
77
71
  className={cn(
78
72
  "*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2",
79
- className
73
+ className,
80
74
  )}
81
75
  {...props}
82
76
  />
83
- )
77
+ );
84
78
  }
85
79
 
86
- function AvatarGroupCount({
87
- className,
88
- ...props
89
- }: React.ComponentProps<"div">) {
80
+ function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">) {
90
81
  return (
91
82
  <div
92
83
  data-slot="avatar-group-count"
93
- className={cn("bg-muted text-muted-foreground size-8 rounded-full text-xs/relaxed group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 ring-background relative flex shrink-0 items-center justify-center ring-2", className)}
84
+ className={cn(
85
+ "bg-muted text-muted-foreground size-8 rounded-full text-xs/relaxed group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 ring-background relative flex shrink-0 items-center justify-center ring-2",
86
+ className,
87
+ )}
94
88
  {...props}
95
89
  />
96
- )
90
+ );
97
91
  }
98
92
 
99
- export {
100
- Avatar,
101
- AvatarImage,
102
- AvatarFallback,
103
- AvatarGroup,
104
- AvatarGroupCount,
105
- AvatarBadge,
106
- }
93
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge };
@@ -1,8 +1,8 @@
1
- import { mergeProps } from "@base-ui/react/merge-props"
2
- import { useRender } from "@base-ui/react/use-render"
3
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { mergeProps } from "@base-ui/react/merge-props";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@/lib/utils";
6
6
 
7
7
  const badgeVariants = cva(
8
8
  "h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-colors overflow-hidden group/badge",
@@ -11,8 +11,10 @@ const badgeVariants = cva(
11
11
  variant: {
12
12
  default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
13
13
  secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
- destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
15
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",
14
+ destructive:
15
+ "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
16
+ outline:
17
+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",
16
18
  ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
17
19
  link: "text-primary underline-offset-4 hover:underline",
18
20
  },
@@ -20,8 +22,8 @@ const badgeVariants = cva(
20
22
  defaultVariants: {
21
23
  variant: "default",
22
24
  },
23
- }
24
- )
25
+ },
26
+ );
25
27
 
26
28
  function Badge({
27
29
  className,
@@ -35,14 +37,14 @@ function Badge({
35
37
  {
36
38
  className: cn(badgeVariants({ className, variant })),
37
39
  },
38
- props
40
+ props,
39
41
  ),
40
42
  render,
41
43
  state: {
42
44
  slot: "badge",
43
45
  variant,
44
46
  },
45
- })
47
+ });
46
48
  }
47
49
 
48
- export { Badge, badgeVariants }
50
+ export { Badge, badgeVariants };
@@ -1,62 +1,42 @@
1
- import * as React from "react"
2
- import { mergeProps } from "@base-ui/react/merge-props"
3
- import { useRender } from "@base-ui/react/use-render"
1
+ import * as React from "react";
2
+ import { mergeProps } from "@base-ui/react/merge-props";
3
+ import { useRender } from "@base-ui/react/use-render";
4
4
 
5
- import { cn } from "@/lib/utils"
6
- import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
5
+ import { cn } from "@/lib/utils";
6
+ import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
7
7
 
8
8
  function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
9
- return (
10
- <nav
11
- aria-label="breadcrumb"
12
- data-slot="breadcrumb"
13
- className={cn(className)}
14
- {...props}
15
- />
16
- )
9
+ return <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />;
17
10
  }
18
11
 
19
12
  function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
20
13
  return (
21
14
  <ol
22
15
  data-slot="breadcrumb-list"
23
- className={cn(
24
- "text-muted-foreground gap-1.5 text-xs/relaxed flex flex-wrap items-center break-words",
25
- className
26
- )}
16
+ className={cn("text-muted-foreground gap-1.5 text-xs/relaxed flex flex-wrap items-center break-words", className)}
27
17
  {...props}
28
18
  />
29
- )
19
+ );
30
20
  }
31
21
 
32
22
  function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
33
- return (
34
- <li
35
- data-slot="breadcrumb-item"
36
- className={cn("gap-1 inline-flex items-center", className)}
37
- {...props}
38
- />
39
- )
23
+ return <li data-slot="breadcrumb-item" className={cn("gap-1 inline-flex items-center", className)} {...props} />;
40
24
  }
41
25
 
42
- function BreadcrumbLink({
43
- className,
44
- render,
45
- ...props
46
- }: useRender.ComponentProps<"a">) {
26
+ function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">) {
47
27
  return useRender({
48
28
  defaultTagName: "a",
49
29
  props: mergeProps<"a">(
50
30
  {
51
31
  className: cn("hover:text-foreground transition-colors", className),
52
32
  },
53
- props
33
+ props,
54
34
  ),
55
35
  render,
56
36
  state: {
57
37
  slot: "breadcrumb-link",
58
38
  },
59
- })
39
+ });
60
40
  }
61
41
 
62
42
  function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
@@ -69,14 +49,10 @@ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
69
49
  className={cn("text-foreground font-normal", className)}
70
50
  {...props}
71
51
  />
72
- )
52
+ );
73
53
  }
74
54
 
75
- function BreadcrumbSeparator({
76
- children,
77
- className,
78
- ...props
79
- }: React.ComponentProps<"li">) {
55
+ function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">) {
80
56
  return (
81
57
  <li
82
58
  data-slot="breadcrumb-separator"
@@ -85,34 +61,24 @@ function BreadcrumbSeparator({
85
61
  className={cn("[&>svg]:size-3.5", className)}
86
62
  {...props}
87
63
  >
88
- {children ?? (
89
- <ChevronRightIcon
90
- />
91
- )}
64
+ {children ?? <ChevronRightIcon />}
92
65
  </li>
93
- )
66
+ );
94
67
  }
95
68
 
96
- function BreadcrumbEllipsis({
97
- className,
98
- ...props
99
- }: React.ComponentProps<"span">) {
69
+ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">) {
100
70
  return (
101
71
  <span
102
72
  data-slot="breadcrumb-ellipsis"
103
73
  role="presentation"
104
74
  aria-hidden="true"
105
- className={cn(
106
- "size-4 [&>svg]:size-3.5 flex items-center justify-center",
107
- className
108
- )}
75
+ className={cn("size-4 [&>svg]:size-3.5 flex items-center justify-center", className)}
109
76
  {...props}
110
77
  >
111
- <MoreHorizontalIcon
112
- />
78
+ <MoreHorizontalIcon />
113
79
  <span className="sr-only">More</span>
114
80
  </span>
115
- )
81
+ );
116
82
  }
117
83
 
118
84
  export {
@@ -123,4 +89,4 @@ export {
123
89
  BreadcrumbPage,
124
90
  BreadcrumbSeparator,
125
91
  BreadcrumbEllipsis,
126
- }
92
+ };
@@ -1,7 +1,7 @@
1
- import { Button as ButtonPrimitive } from "@base-ui/react/button"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@/lib/utils";
5
5
 
6
6
  const buttonVariants = cva(
7
7
  "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 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
@@ -9,14 +9,19 @@ const buttonVariants = cva(
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/80",
12
- outline: "border-border dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
13
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
14
- ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
15
- destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
12
+ outline:
13
+ "border-border dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
14
+ secondary:
15
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
16
+ ghost:
17
+ "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
18
+ destructive:
19
+ "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
16
20
  link: "text-primary underline-offset-4 hover:underline",
17
21
  },
18
22
  size: {
19
- default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
23
+ default:
24
+ "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
20
25
  xs: "h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",
21
26
  sm: "h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
22
27
  lg: "h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",
@@ -30,8 +35,8 @@ const buttonVariants = cva(
30
35
  variant: "default",
31
36
  size: "default",
32
37
  },
33
- }
34
- )
38
+ },
39
+ );
35
40
 
36
41
  function Button({
37
42
  className,
@@ -39,13 +44,7 @@ function Button({
39
44
  size = "default",
40
45
  ...props
41
46
  }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
42
- return (
43
- <ButtonPrimitive
44
- data-slot="button"
45
- className={cn(buttonVariants({ variant, size, className }))}
46
- {...props}
47
- />
48
- )
47
+ return <ButtonPrimitive data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} />;
49
48
  }
50
49
 
51
- export { Button, buttonVariants }
50
+ export { Button, buttonVariants };