@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.
- package/dist/{BlockNoteEditor-4MDHRUS2.js → BlockNoteEditor-3S2B36O3.js} +15 -15
- package/dist/{BlockNoteEditor-4MDHRUS2.js.map → BlockNoteEditor-3S2B36O3.js.map} +1 -1
- package/dist/{BlockNoteEditor-SZWO3MDO.mjs → BlockNoteEditor-WQUJTVJL.mjs} +5 -5
- package/dist/BlockNoteEditor-WQUJTVJL.mjs.map +1 -0
- package/dist/billing/index.d.mts +15 -5
- package/dist/billing/index.d.ts +15 -5
- package/dist/billing/index.js +750 -520
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +665 -435
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-53IPQJVH.js → chunk-3EZX4G2E.js} +147 -23
- package/dist/chunk-3EZX4G2E.js.map +1 -0
- package/dist/{chunk-I7DFEJFF.mjs → chunk-4PHADEKA.mjs} +738 -1418
- package/dist/chunk-4PHADEKA.mjs.map +1 -0
- package/dist/{chunk-E6PQQTWF.js → chunk-T2JCZYWK.js} +999 -1679
- package/dist/chunk-T2JCZYWK.js.map +1 -0
- package/dist/{chunk-P7R2DPD6.mjs → chunk-TQ5GRRTM.mjs} +125 -1
- package/dist/chunk-TQ5GRRTM.mjs.map +1 -0
- package/dist/client/index.js +3 -3
- package/dist/client/index.mjs +2 -2
- package/dist/components/index.d.mts +23 -8
- package/dist/components/index.d.ts +23 -8
- package/dist/components/index.js +3 -3
- package/dist/components/index.mjs +2 -2
- package/dist/contexts/index.d.mts +1 -1
- package/dist/contexts/index.d.ts +1 -1
- package/dist/contexts/index.js +3 -3
- package/dist/contexts/index.mjs +2 -2
- package/dist/core/index.d.mts +47 -3
- package/dist/core/index.d.ts +47 -3
- package/dist/core/index.js +8 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +7 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{stripe-subscription.interface-DK7BJaNd.d.ts → stripe-promotion-code.interface-BcJty0rv.d.ts} +18 -1
- package/dist/{stripe-subscription.interface-C8uhCYIZ.d.mts → stripe-promotion-code.interface-Dnm2DJKQ.d.mts} +18 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/billing/index.ts +1 -0
- package/src/client/context/JsonApiProvider.tsx +1 -5
- package/src/client/hooks/__tests__/useJsonApiGet.test.tsx +9 -9
- package/src/client/hooks/__tests__/useJsonApiMutation.test.tsx +11 -11
- package/src/client/hooks/__tests__/useRehydration.test.ts +13 -34
- package/src/components/editors/BlockNoteEditor.tsx +2 -2
- package/src/components/forms/CommonEditorTrigger.tsx +1 -1
- package/src/components/forms/FormCheckbox.tsx +2 -12
- package/src/components/forms/FormDate.tsx +1 -6
- package/src/components/forms/FormInput.tsx +1 -1
- package/src/components/forms/FormPassword.tsx +1 -7
- package/src/components/forms/FormSelect.tsx +2 -8
- package/src/components/forms/FormSlider.tsx +1 -5
- package/src/components/forms/FormSwitch.tsx +1 -5
- package/src/components/forms/GdprConsentCheckbox.tsx +2 -8
- package/src/components/forms/PasswordInput.tsx +28 -26
- package/src/components/forms/__tests__/FormCheckbox.test.tsx +16 -18
- package/src/components/forms/__tests__/FormDate.test.tsx +14 -30
- package/src/components/forms/__tests__/FormInput.test.tsx +21 -37
- package/src/components/forms/__tests__/FormSelect.test.tsx +15 -21
- package/src/components/tables/ContentListTable.tsx +1 -1
- package/src/components/tables/__tests__/ContentListTable.test.tsx +17 -89
- package/src/components/tables/cells/cell.component.tsx +1 -1
- package/src/contexts/HeaderChildrenContext.tsx +3 -1
- package/src/core/endpoint/__tests__/EndpointCreator.test.ts +2 -7
- package/src/core/factories/__tests__/JsonApiDataFactory.test.ts +3 -3
- package/src/core/factories/__tests__/RehydrationFactory.test.ts +4 -6
- package/src/core/index.ts +1 -0
- package/src/core/registry/ModuleRegistry.ts +1 -0
- package/src/core/registry/__tests__/DataClassRegistry.test.ts +5 -15
- package/src/core/registry/__tests__/ModuleRegistrar.test.ts +5 -15
- package/src/features/auth/components/GdprConsentSection.tsx +1 -6
- package/src/features/auth/components/details/LandingComponent.tsx +6 -1
- package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
- package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
- package/src/features/billing/components/cards/PaymentMethodSummaryCard.tsx +13 -18
- package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +12 -17
- package/src/features/billing/components/modals/BillingDetailModal.tsx +2 -13
- package/src/features/billing/stripe-customer/components/details/PaymentMethodCard.tsx +8 -1
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodEditor.tsx +2 -13
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +2 -12
- package/src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx +6 -1
- package/src/features/billing/stripe-invoice/data/stripe-invoice.interface.ts +1 -0
- package/src/features/billing/stripe-price/components/lists/PricesList.tsx +13 -5
- package/src/features/billing/stripe-product/components/lists/ProductsList.tsx +5 -5
- package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +108 -0
- package/src/features/billing/stripe-promotion-code/components/index.ts +1 -0
- package/src/features/billing/stripe-promotion-code/data/index.ts +3 -0
- package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.interface.ts +14 -0
- package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.service.ts +64 -0
- package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.ts +66 -0
- package/src/features/billing/stripe-promotion-code/index.ts +2 -0
- package/src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts +9 -0
- package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +1 -3
- package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +4 -1
- package/src/features/billing/stripe-subscription/components/forms/CancelSubscriptionDialog.tsx +1 -1
- package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +24 -4
- package/src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx +9 -2
- package/src/features/billing/stripe-subscription/components/widgets/SubscriptionStatusBadge.tsx +3 -1
- package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +7 -7
- package/src/features/billing/stripe-subscription/components/wizards/WizardProgressIndicator.tsx +2 -10
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +3 -13
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +134 -23
- package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +2 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +8 -0
- package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +93 -7
- package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +1 -1
- package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +1 -1
- package/src/features/company/components/details/CompanyDetails.tsx +2 -2
- package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +1 -1
- package/src/features/index.ts +1 -0
- package/src/features/notification/components/containers/NotificationsListContainer.tsx +1 -1
- package/src/features/notification/components/modals/NotificationModal.tsx +6 -2
- package/src/features/notification/contexts/NotificationContext.tsx +1 -3
- package/src/features/oauth/components/OAuthClientCard.tsx +15 -17
- package/src/features/oauth/components/OAuthClientDetail.tsx +7 -19
- package/src/features/oauth/components/OAuthClientForm.tsx +4 -13
- package/src/features/oauth/components/OAuthClientSecretDisplay.tsx +4 -20
- package/src/features/oauth/components/OAuthRedirectUriInput.tsx +5 -12
- package/src/features/oauth/components/OAuthScopeSelector.tsx +17 -23
- package/src/features/oauth/components/consent/OAuthConsentActions.tsx +3 -16
- package/src/features/oauth/components/consent/OAuthConsentHeader.tsx +3 -12
- package/src/features/oauth/components/consent/OAuthConsentScreen.tsx +5 -20
- package/src/features/oauth/components/consent/OAuthScopeList.tsx +3 -18
- package/src/features/onboarding/contexts/OnboardingContext.tsx +3 -3
- package/src/features/role/components/forms/FormRoles.tsx +1 -7
- package/src/features/user/components/containers/UserContainer.tsx +1 -1
- package/src/features/user/components/details/UserDetails.tsx +1 -1
- package/src/features/user/components/forms/UserDeleter.tsx +1 -1
- package/src/features/user/components/forms/UserEditor.tsx +1 -1
- package/src/features/user/components/forms/UserMultiSelect.tsx +7 -7
- package/src/features/user/components/lists/UserListInAdd.tsx +2 -2
- package/src/features/user/components/lists/UsersList.tsx +7 -1
- package/src/features/user/contexts/CurrentUserContext.tsx +36 -33
- package/src/hooks/__tests__/useDataListRetriever.test.ts +15 -21
- package/src/hooks/__tests__/useDebounce.test.ts +2 -7
- package/src/hooks/useCustomD3Graph.tsx +2 -2
- package/src/shadcnui/custom/multi-select.tsx +28 -2
- package/src/shadcnui/ui/accordion.tsx +21 -23
- package/src/shadcnui/ui/alert-dialog.tsx +45 -62
- package/src/shadcnui/ui/alert.tsx +25 -41
- package/src/shadcnui/ui/avatar.tsx +23 -36
- package/src/shadcnui/ui/badge.tsx +13 -11
- package/src/shadcnui/ui/breadcrumb.tsx +21 -55
- package/src/shadcnui/ui/button.tsx +17 -18
- package/src/shadcnui/ui/calendar.tsx +44 -93
- package/src/shadcnui/ui/carousel.tsx +72 -100
- package/src/shadcnui/ui/chart.tsx +102 -161
- package/src/shadcnui/ui/checkbox.tsx +8 -9
- package/src/shadcnui/ui/combobox.tsx +52 -83
- package/src/shadcnui/ui/command.tsx +43 -77
- package/src/shadcnui/ui/context-menu.tsx +47 -86
- package/src/shadcnui/ui/dialog.tsx +34 -60
- package/src/shadcnui/ui/drawer.tsx +32 -53
- package/src/shadcnui/ui/dropdown-menu.tsx +48 -65
- package/src/shadcnui/ui/field.tsx +39 -48
- package/src/shadcnui/ui/hover-card.tsx +9 -14
- package/src/shadcnui/ui/input-group.tsx +44 -55
- package/src/shadcnui/ui/input-otp.tsx +22 -26
- package/src/shadcnui/ui/input.tsx +6 -6
- package/src/shadcnui/ui/label.tsx +6 -6
- package/src/shadcnui/ui/navigation-menu.tsx +36 -60
- package/src/shadcnui/ui/popover.tsx +15 -38
- package/src/shadcnui/ui/progress.tsx +12 -29
- package/src/shadcnui/ui/radio-group.tsx +9 -15
- package/src/shadcnui/ui/resizable.tsx +14 -24
- package/src/shadcnui/ui/scroll-area.tsx +12 -27
- package/src/shadcnui/ui/select.tsx +41 -65
- package/src/shadcnui/ui/separator.tsx +7 -11
- package/src/shadcnui/ui/sheet.tsx +30 -55
- package/src/shadcnui/ui/sidebar.tsx +141 -189
- package/src/shadcnui/ui/skeleton.tsx +3 -9
- package/src/shadcnui/ui/slider.tsx +11 -23
- package/src/shadcnui/ui/switch.tsx +8 -8
- package/src/shadcnui/ui/tabs.tsx +14 -21
- package/src/shadcnui/ui/textarea.tsx +5 -5
- package/src/shadcnui/ui/toggle.tsx +8 -14
- package/src/shadcnui/ui/tooltip.tsx +11 -23
- package/src/testing/providers/MockJsonApiProvider.tsx +1 -5
- package/src/testing/utils/renderWithProviders.tsx +6 -10
- package/dist/BlockNoteEditor-SZWO3MDO.mjs.map +0 -1
- package/dist/chunk-53IPQJVH.js.map +0 -1
- package/dist/chunk-E6PQQTWF.js.map +0 -1
- package/dist/chunk-I7DFEJFF.mjs.map +0 -1
- package/dist/chunk-P7R2DPD6.mjs.map +0 -1
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
|
-
function Progress({
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
value,
|
|
11
|
-
...props
|
|
12
|
-
}: ProgressPrimitive.Root.Props) {
|
|
7
|
+
function Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props) {
|
|
13
8
|
return (
|
|
14
9
|
<ProgressPrimitive.Root
|
|
15
10
|
value={value}
|
|
@@ -22,33 +17,27 @@ function Progress({
|
|
|
22
17
|
<ProgressIndicator />
|
|
23
18
|
</ProgressTrack>
|
|
24
19
|
</ProgressPrimitive.Root>
|
|
25
|
-
)
|
|
20
|
+
);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
23
|
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
29
24
|
return (
|
|
30
25
|
<ProgressPrimitive.Track
|
|
31
|
-
className={cn(
|
|
32
|
-
"bg-muted h-1 rounded-md relative flex w-full items-center overflow-x-hidden",
|
|
33
|
-
className
|
|
34
|
-
)}
|
|
26
|
+
className={cn("bg-muted h-1 rounded-md relative flex w-full items-center overflow-x-hidden", className)}
|
|
35
27
|
data-slot="progress-track"
|
|
36
28
|
{...props}
|
|
37
29
|
/>
|
|
38
|
-
)
|
|
30
|
+
);
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
function ProgressIndicator({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}: ProgressPrimitive.Indicator.Props) {
|
|
33
|
+
function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {
|
|
45
34
|
return (
|
|
46
35
|
<ProgressPrimitive.Indicator
|
|
47
36
|
data-slot="progress-indicator"
|
|
48
37
|
className={cn("bg-primary h-full transition-all", className)}
|
|
49
38
|
{...props}
|
|
50
39
|
/>
|
|
51
|
-
)
|
|
40
|
+
);
|
|
52
41
|
}
|
|
53
42
|
|
|
54
43
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
@@ -58,7 +47,7 @@ function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
|
58
47
|
data-slot="progress-label"
|
|
59
48
|
{...props}
|
|
60
49
|
/>
|
|
61
|
-
)
|
|
50
|
+
);
|
|
62
51
|
}
|
|
63
52
|
|
|
64
53
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
@@ -68,13 +57,7 @@ function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
|
68
57
|
data-slot="progress-value"
|
|
69
58
|
{...props}
|
|
70
59
|
/>
|
|
71
|
-
)
|
|
60
|
+
);
|
|
72
61
|
}
|
|
73
62
|
|
|
74
|
-
export {
|
|
75
|
-
Progress,
|
|
76
|
-
ProgressTrack,
|
|
77
|
-
ProgressIndicator,
|
|
78
|
-
ProgressLabel,
|
|
79
|
-
ProgressValue,
|
|
80
|
-
}
|
|
63
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue };
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { Radio as RadioPrimitive } from "@base-ui/react/radio"
|
|
4
|
-
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
|
|
3
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { CircleIcon } from "lucide-react"
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { CircleIcon } from "lucide-react";
|
|
8
8
|
|
|
9
9
|
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
10
|
-
return (
|
|
11
|
-
<RadioGroupPrimitive
|
|
12
|
-
data-slot="radio-group"
|
|
13
|
-
className={cn("grid gap-3 w-full", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
)
|
|
10
|
+
return <RadioGroupPrimitive data-slot="radio-group" className={cn("grid gap-3 w-full", className)} {...props} />;
|
|
17
11
|
}
|
|
18
12
|
|
|
19
13
|
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
@@ -22,7 +16,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
22
16
|
data-slot="radio-group-item"
|
|
23
17
|
className={cn(
|
|
24
18
|
"border-input text-primary dark:bg-input/30 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 data-checked:bg-primary data-checked:border-primary flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
25
|
-
className
|
|
19
|
+
className,
|
|
26
20
|
)}
|
|
27
21
|
{...props}
|
|
28
22
|
>
|
|
@@ -33,7 +27,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
33
27
|
<CircleIcon className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current" />
|
|
34
28
|
</RadioPrimitive.Indicator>
|
|
35
29
|
</RadioPrimitive.Root>
|
|
36
|
-
)
|
|
30
|
+
);
|
|
37
31
|
}
|
|
38
32
|
|
|
39
|
-
export { RadioGroup, RadioGroupItem }
|
|
33
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as ResizablePrimitive from "react-resizable-panels"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
7
|
|
|
8
|
-
function ResizablePanelGroup({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
|
|
8
|
+
function ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
|
|
12
9
|
return (
|
|
13
10
|
<ResizablePrimitive.PanelGroup
|
|
14
11
|
data-slot="resizable-panel-group"
|
|
15
|
-
className={cn(
|
|
16
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
12
|
+
className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)}
|
|
19
13
|
{...props}
|
|
20
14
|
/>
|
|
21
|
-
)
|
|
15
|
+
);
|
|
22
16
|
}
|
|
23
17
|
|
|
24
|
-
function ResizablePanel({
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
|
|
27
|
-
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
18
|
+
function ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
|
|
19
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
|
|
28
20
|
}
|
|
29
21
|
|
|
30
22
|
function ResizableHandle({
|
|
@@ -32,22 +24,20 @@ function ResizableHandle({
|
|
|
32
24
|
className,
|
|
33
25
|
...props
|
|
34
26
|
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
35
|
-
withHandle?: boolean
|
|
27
|
+
withHandle?: boolean;
|
|
36
28
|
}) {
|
|
37
29
|
return (
|
|
38
30
|
<ResizablePrimitive.PanelResizeHandle
|
|
39
31
|
data-slot="resizable-handle"
|
|
40
32
|
className={cn(
|
|
41
33
|
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
42
|
-
className
|
|
34
|
+
className,
|
|
43
35
|
)}
|
|
44
36
|
{...props}
|
|
45
37
|
>
|
|
46
|
-
{withHandle &&
|
|
47
|
-
<div className="bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg" />
|
|
48
|
-
)}
|
|
38
|
+
{withHandle && <div className="bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg" />}
|
|
49
39
|
</ResizablePrimitive.PanelResizeHandle>
|
|
50
|
-
)
|
|
40
|
+
);
|
|
51
41
|
}
|
|
52
42
|
|
|
53
|
-
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
|
43
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
7
|
|
|
8
|
-
function ScrollArea({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: ScrollAreaPrimitive.Root.Props) {
|
|
8
|
+
function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props) {
|
|
13
9
|
return (
|
|
14
|
-
<ScrollAreaPrimitive.Root
|
|
15
|
-
data-slot="scroll-area"
|
|
16
|
-
className={cn("relative", className)}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
10
|
+
<ScrollAreaPrimitive.Root data-slot="scroll-area" className={cn("relative", className)} {...props}>
|
|
19
11
|
<ScrollAreaPrimitive.Viewport
|
|
20
12
|
data-slot="scroll-area-viewport"
|
|
21
13
|
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
@@ -25,14 +17,10 @@ function ScrollArea({
|
|
|
25
17
|
<ScrollBar />
|
|
26
18
|
<ScrollAreaPrimitive.Corner />
|
|
27
19
|
</ScrollAreaPrimitive.Root>
|
|
28
|
-
)
|
|
20
|
+
);
|
|
29
21
|
}
|
|
30
22
|
|
|
31
|
-
function ScrollBar({
|
|
32
|
-
className,
|
|
33
|
-
orientation = "vertical",
|
|
34
|
-
...props
|
|
35
|
-
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
23
|
+
function ScrollBar({ className, orientation = "vertical", ...props }: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
36
24
|
return (
|
|
37
25
|
<ScrollAreaPrimitive.Scrollbar
|
|
38
26
|
data-slot="scroll-area-scrollbar"
|
|
@@ -40,16 +28,13 @@ function ScrollBar({
|
|
|
40
28
|
orientation={orientation}
|
|
41
29
|
className={cn(
|
|
42
30
|
"data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none",
|
|
43
|
-
className
|
|
31
|
+
className,
|
|
44
32
|
)}
|
|
45
33
|
{...props}
|
|
46
34
|
>
|
|
47
|
-
<ScrollAreaPrimitive.Thumb
|
|
48
|
-
data-slot="scroll-area-thumb"
|
|
49
|
-
className="rounded-full bg-border relative flex-1"
|
|
50
|
-
/>
|
|
35
|
+
<ScrollAreaPrimitive.Thumb data-slot="scroll-area-thumb" className="rounded-full bg-border relative flex-1" />
|
|
51
36
|
</ScrollAreaPrimitive.Scrollbar>
|
|
52
|
-
)
|
|
37
|
+
);
|
|
53
38
|
}
|
|
54
39
|
|
|
55
|
-
export { ScrollArea, ScrollBar }
|
|
40
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Select as SelectPrimitive } from "@base-ui/react/select"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
8
8
|
|
|
9
|
-
const Select = SelectPrimitive.Root
|
|
9
|
+
const Select = SelectPrimitive.Root;
|
|
10
10
|
|
|
11
11
|
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
12
|
-
return (
|
|
13
|
-
<SelectPrimitive.Group
|
|
14
|
-
data-slot="select-group"
|
|
15
|
-
className={cn("scroll-my-1 p-1", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
12
|
+
return <SelectPrimitive.Group data-slot="select-group" className={cn("scroll-my-1 p-1", className)} {...props} />;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
22
16
|
return (
|
|
23
|
-
<SelectPrimitive.Value
|
|
24
|
-
|
|
25
|
-
className={cn("flex flex-1 text-left", className)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
)
|
|
17
|
+
<SelectPrimitive.Value data-slot="select-value" className={cn("flex flex-1 text-left", className)} {...props} />
|
|
18
|
+
);
|
|
29
19
|
}
|
|
30
20
|
|
|
31
21
|
function SelectTrigger({
|
|
@@ -34,7 +24,7 @@ function SelectTrigger({
|
|
|
34
24
|
children,
|
|
35
25
|
...props
|
|
36
26
|
}: SelectPrimitive.Trigger.Props & {
|
|
37
|
-
size?: "sm" | "default"
|
|
27
|
+
size?: "sm" | "default";
|
|
38
28
|
}) {
|
|
39
29
|
return (
|
|
40
30
|
<SelectPrimitive.Trigger
|
|
@@ -42,18 +32,16 @@ function SelectTrigger({
|
|
|
42
32
|
data-size={size}
|
|
43
33
|
className={cn(
|
|
44
34
|
"border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 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 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
45
|
-
className
|
|
35
|
+
className,
|
|
46
36
|
)}
|
|
47
37
|
{...props}
|
|
48
38
|
>
|
|
49
39
|
{children}
|
|
50
40
|
<SelectPrimitive.Icon
|
|
51
|
-
render={
|
|
52
|
-
<ChevronDownIcon className="text-muted-foreground size-3.5 pointer-events-none" />
|
|
53
|
-
}
|
|
41
|
+
render={<ChevronDownIcon className="text-muted-foreground size-3.5 pointer-events-none" />}
|
|
54
42
|
/>
|
|
55
43
|
</SelectPrimitive.Trigger>
|
|
56
|
-
)
|
|
44
|
+
);
|
|
57
45
|
}
|
|
58
46
|
|
|
59
47
|
function SelectContent({
|
|
@@ -66,10 +54,7 @@ function SelectContent({
|
|
|
66
54
|
alignItemWithTrigger = true,
|
|
67
55
|
...props
|
|
68
56
|
}: SelectPrimitive.Popup.Props &
|
|
69
|
-
Pick<
|
|
70
|
-
SelectPrimitive.Positioner.Props,
|
|
71
|
-
"align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
|
|
72
|
-
>) {
|
|
57
|
+
Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">) {
|
|
73
58
|
return (
|
|
74
59
|
<SelectPrimitive.Portal>
|
|
75
60
|
<SelectPrimitive.Positioner
|
|
@@ -82,7 +67,10 @@ function SelectContent({
|
|
|
82
67
|
>
|
|
83
68
|
<SelectPrimitive.Popup
|
|
84
69
|
data-slot="select-content"
|
|
85
|
-
className={cn(
|
|
70
|
+
className={cn(
|
|
71
|
+
"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 min-w-32 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",
|
|
72
|
+
className,
|
|
73
|
+
)}
|
|
86
74
|
{...props}
|
|
87
75
|
>
|
|
88
76
|
<SelectScrollUpButton />
|
|
@@ -91,33 +79,26 @@ function SelectContent({
|
|
|
91
79
|
</SelectPrimitive.Popup>
|
|
92
80
|
</SelectPrimitive.Positioner>
|
|
93
81
|
</SelectPrimitive.Portal>
|
|
94
|
-
)
|
|
82
|
+
);
|
|
95
83
|
}
|
|
96
84
|
|
|
97
|
-
function SelectLabel({
|
|
98
|
-
className,
|
|
99
|
-
...props
|
|
100
|
-
}: SelectPrimitive.GroupLabel.Props) {
|
|
85
|
+
function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {
|
|
101
86
|
return (
|
|
102
87
|
<SelectPrimitive.GroupLabel
|
|
103
88
|
data-slot="select-label"
|
|
104
89
|
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
105
90
|
{...props}
|
|
106
91
|
/>
|
|
107
|
-
)
|
|
92
|
+
);
|
|
108
93
|
}
|
|
109
94
|
|
|
110
|
-
function SelectItem({
|
|
111
|
-
className,
|
|
112
|
-
children,
|
|
113
|
-
...props
|
|
114
|
-
}: SelectPrimitive.Item.Props) {
|
|
95
|
+
function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {
|
|
115
96
|
return (
|
|
116
97
|
<SelectPrimitive.Item
|
|
117
98
|
data-slot="select-item"
|
|
118
99
|
className={cn(
|
|
119
100
|
"focus:bg-accent focus:text-accent-foreground 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
120
|
-
className
|
|
101
|
+
className,
|
|
121
102
|
)}
|
|
122
103
|
{...props}
|
|
123
104
|
>
|
|
@@ -130,52 +111,47 @@ function SelectItem({
|
|
|
130
111
|
<CheckIcon className="pointer-events-none" />
|
|
131
112
|
</SelectPrimitive.ItemIndicator>
|
|
132
113
|
</SelectPrimitive.Item>
|
|
133
|
-
)
|
|
114
|
+
);
|
|
134
115
|
}
|
|
135
116
|
|
|
136
|
-
function SelectSeparator({
|
|
137
|
-
className,
|
|
138
|
-
...props
|
|
139
|
-
}: SelectPrimitive.Separator.Props) {
|
|
117
|
+
function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {
|
|
140
118
|
return (
|
|
141
119
|
<SelectPrimitive.Separator
|
|
142
120
|
data-slot="select-separator"
|
|
143
121
|
className={cn("bg-border/50 -mx-1 my-1 h-px pointer-events-none", className)}
|
|
144
122
|
{...props}
|
|
145
123
|
/>
|
|
146
|
-
)
|
|
124
|
+
);
|
|
147
125
|
}
|
|
148
126
|
|
|
149
|
-
function SelectScrollUpButton({
|
|
150
|
-
className,
|
|
151
|
-
...props
|
|
152
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
127
|
+
function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
153
128
|
return (
|
|
154
129
|
<SelectPrimitive.ScrollUpArrow
|
|
155
130
|
data-slot="select-scroll-up-button"
|
|
156
|
-
className={cn(
|
|
131
|
+
className={cn(
|
|
132
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 top-0 w-full",
|
|
133
|
+
className,
|
|
134
|
+
)}
|
|
157
135
|
{...props}
|
|
158
136
|
>
|
|
159
|
-
<ChevronUpIcon
|
|
160
|
-
/>
|
|
137
|
+
<ChevronUpIcon />
|
|
161
138
|
</SelectPrimitive.ScrollUpArrow>
|
|
162
|
-
)
|
|
139
|
+
);
|
|
163
140
|
}
|
|
164
141
|
|
|
165
|
-
function SelectScrollDownButton({
|
|
166
|
-
className,
|
|
167
|
-
...props
|
|
168
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
142
|
+
function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
169
143
|
return (
|
|
170
144
|
<SelectPrimitive.ScrollDownArrow
|
|
171
145
|
data-slot="select-scroll-down-button"
|
|
172
|
-
className={cn(
|
|
146
|
+
className={cn(
|
|
147
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 bottom-0 w-full",
|
|
148
|
+
className,
|
|
149
|
+
)}
|
|
173
150
|
{...props}
|
|
174
151
|
>
|
|
175
|
-
<ChevronDownIcon
|
|
176
|
-
/>
|
|
152
|
+
<ChevronDownIcon />
|
|
177
153
|
</SelectPrimitive.ScrollDownArrow>
|
|
178
|
-
)
|
|
154
|
+
);
|
|
179
155
|
}
|
|
180
156
|
|
|
181
157
|
export {
|
|
@@ -189,4 +165,4 @@ export {
|
|
|
189
165
|
SelectSeparator,
|
|
190
166
|
SelectTrigger,
|
|
191
167
|
SelectValue,
|
|
192
|
-
}
|
|
168
|
+
};
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
|
3
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
|
-
function Separator({
|
|
8
|
-
className,
|
|
9
|
-
orientation = "horizontal",
|
|
10
|
-
...props
|
|
11
|
-
}: SeparatorPrimitive.Props) {
|
|
7
|
+
function Separator({ className, orientation = "horizontal", ...props }: SeparatorPrimitive.Props) {
|
|
12
8
|
return (
|
|
13
9
|
<SeparatorPrimitive
|
|
14
10
|
data-slot="separator"
|
|
15
11
|
orientation={orientation}
|
|
16
12
|
className={cn(
|
|
17
13
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch",
|
|
18
|
-
className
|
|
14
|
+
className,
|
|
19
15
|
)}
|
|
20
16
|
{...props}
|
|
21
17
|
/>
|
|
22
|
-
)
|
|
18
|
+
);
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
export { Separator }
|
|
21
|
+
export { Separator };
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Dialog as SheetPrimitive } 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 Sheet({ ...props }: SheetPrimitive.Root.Props) {
|
|
11
|
-
return <SheetPrimitive.Root data-slot="sheet" {...props}
|
|
11
|
+
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
|
|
15
|
-
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props}
|
|
15
|
+
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
|
|
19
|
-
return <SheetPrimitive.Close data-slot="sheet-close" {...props}
|
|
19
|
+
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
|
|
23
|
-
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props}
|
|
23
|
+
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
|
|
27
27
|
return (
|
|
28
28
|
<SheetPrimitive.Backdrop
|
|
29
29
|
data-slot="sheet-overlay"
|
|
30
|
-
className={cn(
|
|
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 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
31
34
|
{...props}
|
|
32
35
|
/>
|
|
33
|
-
)
|
|
36
|
+
);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
function SheetContent({
|
|
@@ -40,8 +43,8 @@ function SheetContent({
|
|
|
40
43
|
showCloseButton = true,
|
|
41
44
|
...props
|
|
42
45
|
}: SheetPrimitive.Popup.Props & {
|
|
43
|
-
side?: "top" | "right" | "bottom" | "left"
|
|
44
|
-
showCloseButton?: boolean
|
|
46
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
47
|
+
showCloseButton?: boolean;
|
|
45
48
|
}) {
|
|
46
49
|
return (
|
|
47
50
|
<SheetPortal>
|
|
@@ -49,49 +52,33 @@ function SheetContent({
|
|
|
49
52
|
<SheetPrimitive.Popup
|
|
50
53
|
data-slot="sheet-content"
|
|
51
54
|
data-side={side}
|
|
52
|
-
className={cn(
|
|
55
|
+
className={cn(
|
|
56
|
+
"bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
57
|
+
className,
|
|
58
|
+
)}
|
|
53
59
|
{...props}
|
|
54
60
|
>
|
|
55
61
|
{children}
|
|
56
62
|
{showCloseButton && (
|
|
57
63
|
<SheetPrimitive.Close
|
|
58
64
|
data-slot="sheet-close"
|
|
59
|
-
render={
|
|
60
|
-
<Button
|
|
61
|
-
variant="ghost"
|
|
62
|
-
className="absolute top-4 right-4"
|
|
63
|
-
size="icon-sm"
|
|
64
|
-
/>
|
|
65
|
-
}
|
|
65
|
+
render={<Button variant="ghost" className="absolute top-4 right-4" size="icon-sm" />}
|
|
66
66
|
>
|
|
67
|
-
<XIcon
|
|
68
|
-
/>
|
|
67
|
+
<XIcon />
|
|
69
68
|
<span className="sr-only">Close</span>
|
|
70
69
|
</SheetPrimitive.Close>
|
|
71
70
|
)}
|
|
72
71
|
</SheetPrimitive.Popup>
|
|
73
72
|
</SheetPortal>
|
|
74
|
-
)
|
|
73
|
+
);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
78
|
-
return (
|
|
79
|
-
<div
|
|
80
|
-
data-slot="sheet-header"
|
|
81
|
-
className={cn("gap-1.5 p-6 flex flex-col", className)}
|
|
82
|
-
{...props}
|
|
83
|
-
/>
|
|
84
|
-
)
|
|
77
|
+
return <div data-slot="sheet-header" className={cn("gap-1.5 p-6 flex flex-col", className)} {...props} />;
|
|
85
78
|
}
|
|
86
79
|
|
|
87
80
|
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
88
|
-
return (
|
|
89
|
-
<div
|
|
90
|
-
data-slot="sheet-footer"
|
|
91
|
-
className={cn("gap-2 p-6 mt-auto flex flex-col", className)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
)
|
|
81
|
+
return <div data-slot="sheet-footer" className={cn("gap-2 p-6 mt-auto flex flex-col", className)} {...props} />;
|
|
95
82
|
}
|
|
96
83
|
|
|
97
84
|
function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
|
|
@@ -101,29 +88,17 @@ function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
|
|
|
101
88
|
className={cn("text-foreground text-sm font-medium", className)}
|
|
102
89
|
{...props}
|
|
103
90
|
/>
|
|
104
|
-
)
|
|
91
|
+
);
|
|
105
92
|
}
|
|
106
93
|
|
|
107
|
-
function SheetDescription({
|
|
108
|
-
className,
|
|
109
|
-
...props
|
|
110
|
-
}: SheetPrimitive.Description.Props) {
|
|
94
|
+
function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props) {
|
|
111
95
|
return (
|
|
112
96
|
<SheetPrimitive.Description
|
|
113
97
|
data-slot="sheet-description"
|
|
114
98
|
className={cn("text-muted-foreground text-xs/relaxed", className)}
|
|
115
99
|
{...props}
|
|
116
100
|
/>
|
|
117
|
-
)
|
|
101
|
+
);
|
|
118
102
|
}
|
|
119
103
|
|
|
120
|
-
export {
|
|
121
|
-
Sheet,
|
|
122
|
-
SheetTrigger,
|
|
123
|
-
SheetClose,
|
|
124
|
-
SheetContent,
|
|
125
|
-
SheetHeader,
|
|
126
|
-
SheetFooter,
|
|
127
|
-
SheetTitle,
|
|
128
|
-
SheetDescription,
|
|
129
|
-
}
|
|
104
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };
|