@moneydevkit/nextjs 0.2.0 → 0.3.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 (124) hide show
  1. package/dist/components/Checkout.d.ts +4 -6
  2. package/dist/components/Checkout.js +2 -134
  3. package/dist/components/Checkout.js.map +1 -1
  4. package/dist/hooks/useCheckout.d.ts +1 -5
  5. package/dist/hooks/useCheckout.js +1 -25
  6. package/dist/hooks/useCheckout.js.map +1 -1
  7. package/dist/hooks/useCheckoutSuccess.d.ts +1 -5
  8. package/dist/hooks/useCheckoutSuccess.js +1 -63
  9. package/dist/hooks/useCheckoutSuccess.js.map +1 -1
  10. package/dist/index.d.ts +0 -2
  11. package/dist/index.js +0 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/server/route.d.ts +1 -8
  14. package/dist/server/route.js +1 -103
  15. package/dist/server/route.js.map +1 -1
  16. package/package.json +4 -13
  17. package/dist/components/checkout/ExpiredCheckout.d.ts +0 -11
  18. package/dist/components/checkout/ExpiredCheckout.js +0 -25
  19. package/dist/components/checkout/ExpiredCheckout.js.map +0 -1
  20. package/dist/components/checkout/PaymentReceivedCheckout.d.ts +0 -6
  21. package/dist/components/checkout/PaymentReceivedCheckout.js +0 -22
  22. package/dist/components/checkout/PaymentReceivedCheckout.js.map +0 -1
  23. package/dist/components/checkout/PendingPaymentCheckout.d.ts +0 -9
  24. package/dist/components/checkout/PendingPaymentCheckout.js +0 -63
  25. package/dist/components/checkout/PendingPaymentCheckout.js.map +0 -1
  26. package/dist/components/checkout/UnconfirmedCheckout.d.ts +0 -9
  27. package/dist/components/checkout/UnconfirmedCheckout.js +0 -54
  28. package/dist/components/checkout/UnconfirmedCheckout.js.map +0 -1
  29. package/dist/components/ui/button.d.ts +0 -10
  30. package/dist/components/ui/button.js +0 -32
  31. package/dist/components/ui/button.js.map +0 -1
  32. package/dist/components/ui/card.d.ts +0 -9
  33. package/dist/components/ui/card.js +0 -25
  34. package/dist/components/ui/card.js.map +0 -1
  35. package/dist/components/ui/collapsible.d.ts +0 -5
  36. package/dist/components/ui/collapsible.js +0 -14
  37. package/dist/components/ui/collapsible.js.map +0 -1
  38. package/dist/components/ui/dialog.d.ts +0 -15
  39. package/dist/components/ui/dialog.js +0 -37
  40. package/dist/components/ui/dialog.js.map +0 -1
  41. package/dist/components/ui/drawer.d.ts +0 -13
  42. package/dist/components/ui/drawer.js +0 -36
  43. package/dist/components/ui/drawer.js.map +0 -1
  44. package/dist/components/ui/form.d.ts +0 -24
  45. package/dist/components/ui/form.js +0 -60
  46. package/dist/components/ui/form.js.map +0 -1
  47. package/dist/components/ui/input.d.ts +0 -3
  48. package/dist/components/ui/input.js +0 -7
  49. package/dist/components/ui/input.js.map +0 -1
  50. package/dist/components/ui/label.d.ts +0 -4
  51. package/dist/components/ui/label.js +0 -9
  52. package/dist/components/ui/label.js.map +0 -1
  53. package/dist/components/ui/select.d.ts +0 -15
  54. package/dist/components/ui/select.js +0 -39
  55. package/dist/components/ui/select.js.map +0 -1
  56. package/dist/components/ui/textarea.d.ts +0 -3
  57. package/dist/components/ui/textarea.js +0 -7
  58. package/dist/components/ui/textarea.js.map +0 -1
  59. package/dist/constants.d.ts +0 -1
  60. package/dist/constants.js +0 -2
  61. package/dist/constants.js.map +0 -1
  62. package/dist/lib/utils.d.ts +0 -2
  63. package/dist/lib/utils.js +0 -6
  64. package/dist/lib/utils.js.map +0 -1
  65. package/dist/providers.d.ts +0 -7
  66. package/dist/providers.js +0 -17
  67. package/dist/providers.js.map +0 -1
  68. package/dist/server/actions.d.ts +0 -2510
  69. package/dist/server/actions.js +0 -78
  70. package/dist/server/actions.js.map +0 -1
  71. package/dist/server/handlers/balance.d.ts +0 -1
  72. package/dist/server/handlers/balance.js +0 -19
  73. package/dist/server/handlers/balance.js.map +0 -1
  74. package/dist/server/handlers/list_channels.d.ts +0 -1
  75. package/dist/server/handlers/list_channels.js +0 -15
  76. package/dist/server/handlers/list_channels.js.map +0 -1
  77. package/dist/server/handlers/pay_bolt_11.d.ts +0 -1
  78. package/dist/server/handlers/pay_bolt_11.js +0 -19
  79. package/dist/server/handlers/pay_bolt_11.js.map +0 -1
  80. package/dist/server/handlers/pay_bolt_12.d.ts +0 -1
  81. package/dist/server/handlers/pay_bolt_12.js +0 -25
  82. package/dist/server/handlers/pay_bolt_12.js.map +0 -1
  83. package/dist/server/handlers/pay_ln_url.d.ts +0 -1
  84. package/dist/server/handlers/pay_ln_url.js +0 -25
  85. package/dist/server/handlers/pay_ln_url.js.map +0 -1
  86. package/dist/server/handlers/ping.d.ts +0 -1
  87. package/dist/server/handlers/ping.js +0 -13
  88. package/dist/server/handlers/ping.js.map +0 -1
  89. package/dist/server/handlers/webhooks.d.ts +0 -1
  90. package/dist/server/handlers/webhooks.js +0 -46
  91. package/dist/server/handlers/webhooks.js.map +0 -1
  92. package/dist/server/index.d.ts +0 -2501
  93. package/dist/server/index.js +0 -15
  94. package/dist/server/index.js.map +0 -1
  95. package/dist/server/lightning-logs.d.ts +0 -5
  96. package/dist/server/lightning-logs.js +0 -170
  97. package/dist/server/lightning-logs.js.map +0 -1
  98. package/dist/server/lightning-node.d.ts +0 -42
  99. package/dist/server/lightning-node.js +0 -141
  100. package/dist/server/lightning-node.js.map +0 -1
  101. package/dist/server/logging.d.ts +0 -3
  102. package/dist/server/logging.js +0 -17
  103. package/dist/server/logging.js.map +0 -1
  104. package/dist/server/mdk-client.d.ts +0 -3341
  105. package/dist/server/mdk-client.js +0 -39
  106. package/dist/server/mdk-client.js.map +0 -1
  107. package/dist/server/mdk-config.d.ts +0 -18
  108. package/dist/server/mdk-config.js +0 -19
  109. package/dist/server/mdk-config.js.map +0 -1
  110. package/dist/server/mdk.d.ts +0 -6
  111. package/dist/server/mdk.js +0 -69
  112. package/dist/server/mdk.js.map +0 -1
  113. package/dist/server/money-dev-kit.d.ts +0 -11
  114. package/dist/server/money-dev-kit.js +0 -3
  115. package/dist/server/money-dev-kit.js.map +0 -1
  116. package/dist/server/payment-state.d.ts +0 -3
  117. package/dist/server/payment-state.js +0 -32
  118. package/dist/server/payment-state.js.map +0 -1
  119. package/dist/server/runtime.d.ts +0 -3
  120. package/dist/server/runtime.js +0 -4
  121. package/dist/server/runtime.js.map +0 -1
  122. package/dist/server/undici-dispatcher.d.ts +0 -4
  123. package/dist/server/undici-dispatcher.js +0 -13
  124. package/dist/server/undici-dispatcher.js.map +0 -1
@@ -1,63 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ChevronDown } from 'lucide-react';
4
- import { QRCodeSVG } from 'qrcode.react';
5
- import { useEffect, useState } from 'react';
6
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
7
- export default function PendingPaymentCheckout({ checkout }) {
8
- const [timeRemaining, setTimeRemaining] = useState('');
9
- const [copySuccess, setCopySuccess] = useState(false);
10
- const [detailsOpen, setDetailsOpen] = useState(false);
11
- useEffect(() => {
12
- const updateTimer = () => {
13
- if (!checkout.invoice?.expiresAt)
14
- return;
15
- const now = new Date().getTime();
16
- const expiry = new Date(checkout.invoice.expiresAt).getTime();
17
- const diff = expiry - now;
18
- if (diff <= 0) {
19
- setTimeRemaining('Expired');
20
- return;
21
- }
22
- const minutes = Math.floor(diff / (1000 * 60));
23
- const seconds = Math.floor((diff % (1000 * 60)) / 1000);
24
- setTimeRemaining(`${minutes}:${seconds.toString().padStart(2, '0')}`);
25
- };
26
- updateTimer();
27
- const interval = setInterval(updateTimer, 1000);
28
- return () => clearInterval(interval);
29
- }, [checkout.invoice?.expiresAt]);
30
- const formatCurrency = (amount, currency) => {
31
- return new Intl.NumberFormat('en-US', {
32
- style: 'currency',
33
- currency,
34
- }).format(amount / 100);
35
- };
36
- const formatSats = (sats) => {
37
- return new Intl.NumberFormat('en-US').format(sats);
38
- };
39
- const copyToClipboard = async () => {
40
- if (checkout.invoice?.invoice) {
41
- try {
42
- await navigator.clipboard.writeText(checkout.invoice.invoice);
43
- setCopySuccess(true);
44
- setTimeout(() => setCopySuccess(false), 2000);
45
- }
46
- catch (error) {
47
- console.error('Failed to copy invoice:', error);
48
- }
49
- }
50
- };
51
- const truncateInvoice = (invoice, maxLength = 40) => {
52
- if (invoice.length <= maxLength)
53
- return invoice;
54
- const start = Math.floor((maxLength - 3) / 2);
55
- const end = Math.ceil((maxLength - 3) / 2);
56
- return `${invoice.slice(0, start)}...${invoice.slice(-end)}`;
57
- };
58
- const CopyIcon = () => (_jsx("svg", { className: "w-4 h-4 text-gray-400 hover:text-white cursor-pointer transition-colors", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" }) }));
59
- const CheckmarkIcon = () => (_jsx("svg", { className: "w-4 h-4 text-green-500 cursor-pointer transition-colors", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }));
60
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-center mb-6 w-full", children: [_jsx("div", { className: "mb-4 w-full", children: _jsx("div", { className: "text-2xl font-semibold mb-2 font-sans tracking-tight", children: checkout.invoice?.amountSats && `${formatSats(checkout.invoice.amountSats)} sats` }) }), _jsx("div", { className: "w-full", children: _jsxs(Collapsible, { open: detailsOpen, onOpenChange: setDetailsOpen, children: [_jsxs(CollapsibleTrigger, { className: "flex items-center justify-center gap-2 text-gray-400 hover:text-white transition-colors text-sm w-full font-medium", children: ["View Details", _jsx(ChevronDown, { className: `w-4 h-4 transition-transform duration-300 ease-in-out ${detailsOpen ? 'rotate-180' : ''}` })] }), _jsx(CollapsibleContent, { className: "w-full overflow-hidden transition-all duration-300 ease-in-out data-[state=closed]:animate-[collapsible-up_300ms_ease-in-out] data-[state=open]:animate-[collapsible-down_300ms_ease-in-out]", children: _jsxs("div", { className: "mt-4 space-y-3 text-sm w-full", children: [_jsxs("div", { className: "flex justify-between w-full", children: [_jsx("span", { className: "text-gray-400", children: "Total Fiat" }), _jsx("span", { className: "text-white", children: checkout.invoice?.fiatAmount && checkout.currency &&
61
- formatCurrency(checkout.invoice.fiatAmount, checkout.currency) })] }), _jsxs("div", { className: "flex justify-between w-full", children: [_jsx("span", { className: "text-gray-400", children: "Exchange Rate" }), _jsx("span", { className: "text-white", children: checkout.invoice?.btcPrice && `$${new Intl.NumberFormat('en-US').format(checkout.invoice.btcPrice)}` })] }), timeRemaining && (_jsxs("div", { className: "flex justify-between w-full", children: [_jsx("span", { className: "text-gray-400", children: "Expires in" }), _jsx("span", { className: "text-white", children: timeRemaining })] }))] }) })] }) })] }), _jsx("div", { className: "flex justify-center mb-4 w-full", children: _jsx("div", { className: "bg-white p-3 rounded-lg shadow cursor-pointer hover:shadow-lg transition-shadow", onClick: copyToClipboard, title: "Click to copy invoice", children: _jsx(QRCodeSVG, { value: checkout.invoice?.invoice ?? '', size: 320, bgColor: "#ffffff", fgColor: "#000000", level: "Q" }) }) }), checkout.invoice?.invoice && (_jsxs("div", { className: "flex items-center gap-2 mb-6 bg-gray-700 p-3 rounded-lg w-full", children: [_jsx("code", { className: "text-xs text-gray-300 font-mono flex-1 text-center min-w-0", children: truncateInvoice(checkout.invoice.invoice) }), _jsx("div", { onClick: copyToClipboard, title: "Copy invoice", className: "flex-shrink-0", children: copySuccess ? _jsx(CheckmarkIcon, {}) : _jsx(CopyIcon, {}) })] }))] }));
62
- }
63
- //# sourceMappingURL=PendingPaymentCheckout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PendingPaymentCheckout.js","sourceRoot":"","sources":["../../../src/components/checkout/PendingPaymentCheckout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OA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,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,EACtC,IAAI,EAAE,GAAG,EACT,OAAO,EAAC,SAAS,EACjB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,GAAG,GACT,GACE,GACF,EAEL,QAAQ,CAAC,OAAO,EAAE,OAAO,IAAI,CAC5B,eAAK,SAAS,EAAC,gEAAgE,aAC7E,eAAM,SAAS,EAAC,4DAA4D,YACzE,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,GACrC,EACP,cAAK,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,cAAc,EAAC,SAAS,EAAC,eAAe,YAC1E,WAAW,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,QAAQ,KAAG,GAC3C,IACF,CACP,IACA,CACJ,CAAA;AACH,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { Checkout } from '@moneydevkit/api-contract';
2
- type UnconfirmedCheckoutType = Extract<Checkout, {
3
- status: 'UNCONFIRMED';
4
- }>;
5
- export interface UnconfirmedCheckoutProps {
6
- checkout: UnconfirmedCheckoutType;
7
- }
8
- export default function UnconfirmedCheckout({ checkout }: UnconfirmedCheckoutProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,54 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { zodResolver } from '@hookform/resolvers/zod';
4
- import { useMutation, useQueryClient } from '@tanstack/react-query';
5
- import { useForm } from 'react-hook-form';
6
- import { z } from 'zod';
7
- import { confirmCheckout } from '../../server/actions';
8
- import { Button } from '../ui/button';
9
- import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, } from '../ui/form';
10
- import { Input } from '../ui/input';
11
- const CustomerFormSchema = z.object({
12
- customerEmail: z.string().email('Please enter a valid email address').optional(),
13
- customerName: z.string().optional(),
14
- });
15
- export default function UnconfirmedCheckout({ checkout }) {
16
- const queryClient = useQueryClient();
17
- const needsEmail = checkout.requireCustomerFields?.customerEmail && !checkout.customerEmail;
18
- const needsName = checkout.requireCustomerFields?.customerName && !checkout.customerName;
19
- const form = useForm({
20
- resolver: zodResolver(CustomerFormSchema),
21
- defaultValues: {
22
- customerEmail: checkout.customerEmail || '',
23
- customerName: checkout.customerName || '',
24
- },
25
- });
26
- const confirmMutation = useMutation({
27
- mutationFn: async (data) => {
28
- return await confirmCheckout({
29
- checkoutId: checkout.id,
30
- customerEmail: data.customerEmail || undefined,
31
- customerName: data.customerName || undefined,
32
- });
33
- },
34
- onSuccess: () => {
35
- queryClient.invalidateQueries({ queryKey: ['mdk-checkout', checkout.id] });
36
- },
37
- onError: (error) => {
38
- form.setError('root', {
39
- message: error instanceof Error ? error.message : 'Something went wrong',
40
- });
41
- },
42
- });
43
- const onSubmit = (data) => {
44
- confirmMutation.mutate(data);
45
- };
46
- const formatCurrency = (amount, currency) => {
47
- return new Intl.NumberFormat('en-US', {
48
- style: 'currency',
49
- currency,
50
- }).format(amount / 100);
51
- };
52
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-center mb-6", children: [checkout.type === 'PRODUCTS' && checkout.products && (_jsx("div", { className: "space-y-2", children: checkout.products.map((product) => (_jsxs("div", { className: "text-left", children: [_jsx("h3", { className: "font-medium text-white", children: product.name }), product.description && _jsx("p", { className: "text-sm text-gray-400", children: product.description }), product.prices.map((price) => (_jsxs("div", { className: "text-sm text-gray-300", children: [price.amountType === 'FIXED' && price.priceAmount && (_jsx("span", { children: formatCurrency(price.priceAmount, checkout.currency) })), product.recurringInterval && (_jsxs("span", { className: "text-gray-400", children: ["/", product.recurringInterval.toLowerCase()] }))] }, price.id)))] }, product.id))) })), checkout.type === 'AMOUNT' && checkout.providedAmount && (_jsx("div", { className: "text-sm font-medium text-white" })), checkout.type === 'TOP_UP' && _jsx("div", { className: "text-lg text-white", children: "Account Top-up" })] }), _jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [needsEmail && (_jsx(FormField, { control: form.control, name: "customerEmail", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { className: "text-gray-300", children: "Email Address *" }), _jsx(FormControl, { children: _jsx(Input, { ...field, type: "email", placeholder: "Enter your email", className: "bg-gray-700 border-gray-600 focus:ring-purple-500 focus:border-purple-500 text-white placeholder-gray-400" }) }), _jsx(FormMessage, {})] })) })), needsName && (_jsx(FormField, { control: form.control, name: "customerName", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { className: "text-gray-300", children: "Full Name *" }), _jsx(FormControl, { children: _jsx(Input, { ...field, type: "text", placeholder: "Enter your full name", className: "bg-gray-700 border-gray-600 focus:ring-purple-500 focus:border-purple-500 text-white placeholder-gray-400" }) }), _jsx(FormMessage, {})] })) })), form.formState.errors.root && (_jsxs("div", { className: "text-red-400 text-sm", children: ["Error: ", form.formState.errors.root.message] })), _jsx(Button, { type: "submit", disabled: form.formState.isSubmitting || confirmMutation.isPending, className: "w-full bg-white hover:bg-gray-100 text-black font-medium py-3 px-4 rounded-lg transition-colors border border-gray-200", children: form.formState.isSubmitting || confirmMutation.isPending ? (_jsxs("div", { className: "flex items-center justify-center", children: [_jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" }), "Generating invoice..."] })) : ('Proceed to Payment') })] }) })] }));
53
- }
54
- //# sourceMappingURL=UnconfirmedCheckout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnconfirmedCheckout.js","sourceRoot":"","sources":["../../../src/components/checkout/UnconfirmedCheckout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAA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,IAAI,EAAC,cAAc,EACnB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,MAAC,QAAQ,eACP,KAAC,SAAS,IAAC,SAAS,EAAC,eAAe,4BAAwB,EAC5D,KAAC,WAAW,cACV,KAAC,KAAK,OACA,KAAK,EACT,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,sBAAsB,EAClC,SAAS,EAAC,2GAA2G,GACrH,GACU,EACd,KAAC,WAAW,KAAG,IACN,CACZ,GACD,CACH,EAEA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAC7B,eAAK,SAAS,EAAC,sBAAsB,wBAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAO,CACxF,EAED,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,IAAI,eAAe,CAAC,SAAS,EAClE,SAAS,EAAC,wHAAwH,YAEjI,IAAI,CAAC,SAAS,CAAC,YAAY,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAC1D,eAAK,SAAS,EAAC,kCAAkC,aAC/C,cAAK,SAAS,EAAC,gEAAgE,GAAG,6BAE9E,CACP,CAAC,CAAC,CAAC,CACF,oBAAoB,CACrB,GACM,IACJ,GACF,IACN,CACJ,CAAA;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
- asChild?: boolean;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export { Button, buttonVariants };
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Slot } from "@radix-ui/react-slot";
3
- import { cva } from "class-variance-authority";
4
- import { cn } from "../../lib/utils";
5
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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", {
6
- variants: {
7
- variant: {
8
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
9
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
10
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
11
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
12
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
13
- link: "text-primary underline-offset-4 hover:underline",
14
- },
15
- size: {
16
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
18
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
19
- icon: "size-9",
20
- },
21
- },
22
- defaultVariants: {
23
- variant: "default",
24
- size: "default",
25
- },
26
- });
27
- function Button({ className, variant, size, asChild = false, ...props }) {
28
- const Comp = asChild ? Slot : "button";
29
- return (_jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
30
- }
31
- export { Button, buttonVariants };
32
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,MAAM,cAAc,GAAG,GAAG,CACxB,6bAA6b,EAC7b;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,kEAAkE;YACpE,WAAW,EACT,6JAA6J;YAC/J,OAAO,EACL,uIAAuI;YACzI,SAAS,EACP,wEAAwE;YAC1E,KAAK,EACH,sEAAsE;YACxE,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,+BAA+B;YACxC,EAAE,EAAE,+CAA+C;YACnD,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,QAAQ;SACf;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAED,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAIP;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAA;IAEtC,OAAO,CACL,KAAC,IAAI,iBACO,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
- declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
- declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
- declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
- declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
- declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
- declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../../lib/utils";
3
- function Card({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className), ...props }));
5
- }
6
- function CardHeader({ className, ...props }) {
7
- return (_jsx("div", { "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className), ...props }));
8
- }
9
- function CardTitle({ className, ...props }) {
10
- return (_jsx("div", { "data-slot": "card-title", className: cn("leading-none font-semibold", className), ...props }));
11
- }
12
- function CardDescription({ className, ...props }) {
13
- return (_jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props }));
14
- }
15
- function CardAction({ className, ...props }) {
16
- return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
17
- }
18
- function CardContent({ className, ...props }) {
19
- return (_jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props }));
20
- }
21
- function CardFooter({ className, ...props }) {
22
- return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props }));
23
- }
24
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
25
- //# sourceMappingURL=card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAChE,OAAO,CACL,2BACY,MAAM,EAChB,SAAS,EAAE,EAAE,CACX,mFAAmF,EACnF,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,4JAA4J,EAC5J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACrE,OAAO,CACL,2BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC3E,OAAO,CACL,2BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,gEAAgE,EAChE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,KAC5B,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
@@ -1,5 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
- declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
- declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
- declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,14 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
4
- function Collapsible({ ...props }) {
5
- return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
6
- }
7
- function CollapsibleTrigger({ ...props }) {
8
- return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
9
- }
10
- function CollapsibleContent({ ...props }) {
11
- return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
12
- }
13
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
14
- //# sourceMappingURL=collapsible.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAA;AAEnE,SAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EAC+C;IACvD,OAAO,KAAC,oBAAoB,CAAC,IAAI,iBAAW,aAAa,KAAK,KAAK,GAAI,CAAA;AACzE,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EAC6D;IACrE,OAAO,CACL,KAAC,oBAAoB,CAAC,kBAAkB,iBAC5B,qBAAqB,KAC3B,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EAC6D;IACrE,OAAO,CACL,KAAC,oBAAoB,CAAC,kBAAkB,iBAC5B,qBAAqB,KAC3B,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
- declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
- declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
- declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
- showCloseButton?: boolean;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -1,37 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as DialogPrimitive from "@radix-ui/react-dialog";
4
- import { XIcon } from "lucide-react";
5
- import { cn } from "../../lib/utils";
6
- function Dialog({ ...props }) {
7
- return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
8
- }
9
- function DialogTrigger({ ...props }) {
10
- return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
11
- }
12
- function DialogPortal({ ...props }) {
13
- return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
14
- }
15
- function DialogClose({ ...props }) {
16
- return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
17
- }
18
- function DialogOverlay({ className, ...props }) {
19
- return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
20
- }
21
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
22
- return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
23
- }
24
- function DialogHeader({ className, ...props }) {
25
- return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
26
- }
27
- function DialogFooter({ className, ...props }) {
28
- return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
29
- }
30
- function DialogTitle({ className, ...props }) {
31
- return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
32
- }
33
- function DialogDescription({ className, ...props }) {
34
- return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
35
- }
36
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
37
- //# sourceMappingURL=dialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,MAAM,CAAC,EACd,G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EAAE,GAAG,KAAK,EAA+B;IACxE,OAAO,CACL,2BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,KACpE,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACxE,OAAO,CACL,2BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAC1D,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACiD;IACzD,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,iBAChB,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { Drawer as DrawerPrimitive } from "vaul";
3
- declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
- declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
- declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
- declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
9
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
- declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
- declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1,36 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Drawer as DrawerPrimitive } from "vaul";
4
- import { cn } from "../../lib/utils";
5
- function Drawer({ ...props }) {
6
- return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
7
- }
8
- function DrawerTrigger({ ...props }) {
9
- return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
10
- }
11
- function DrawerPortal({ ...props }) {
12
- return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
13
- }
14
- function DrawerClose({ ...props }) {
15
- return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
16
- }
17
- function DrawerOverlay({ className, ...props }) {
18
- return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
19
- }
20
- function DrawerContent({ className, children, ...props }) {
21
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), ...props, children: [_jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
22
- }
23
- function DrawerHeader({ className, ...props }) {
24
- return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props }));
25
- }
26
- function DrawerFooter({ className, ...props }) {
27
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
28
- }
29
- function DrawerTitle({ className, ...props }) {
30
- return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-foreground font-semibold", className), ...props }));
31
- }
32
- function DrawerDescription({ className, ...props }) {
33
- return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-muted-foreground text-sm", className), ...props }));
34
- }
35
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
36
- //# sourceMappingURL=drawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/components/ui/drawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAA;AAEhD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,MAAM,CAAC,EACd,GAAG,KAAK,EAC0C;IAClD,OAAO,KAAC,eAAe,CAAC,IAAI,iBAAW,QAAQ,KAAK,KAAK,GAAI,CAAA;AAC/D,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EAC6C;IACrD,OAAO,KAAC,eAAe,CAAC,OAAO,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAA;AAC1E,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EAC4C;IACpD,OAAO,KAAC,eAAe,CAAC,MAAM,iBAAW,eAAe,KAAK,KAAK,GAAI,CAAA;AACxE,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EAC2C;IACnD,OAAO,KAAC,eAAe,CAAC,KAAK,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAA;AACtE,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EAC6C;IACrD,OAAO,CACL,KAAC,eAAe,CAAC,OAAO,iBACZ,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CACX,wJAAwJ,EACxJ,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;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aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
5
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
7
- declare const useFormField: () => {
8
- invalid: boolean;
9
- isDirty: boolean;
10
- isTouched: boolean;
11
- isValidating: boolean;
12
- error?: import("react-hook-form").FieldError;
13
- id: string;
14
- name: string;
15
- formItemId: string;
16
- formDescriptionId: string;
17
- formMessageId: string;
18
- };
19
- declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
20
- declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
- declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
22
- declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
23
- declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
24
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -1,60 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { Slot } from "@radix-ui/react-slot";
5
- import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
6
- import { cn } from "../../lib/utils";
7
- import { Label } from "./label";
8
- const Form = FormProvider;
9
- const FormFieldContext = React.createContext({});
10
- const FormField = ({ ...props }) => {
11
- return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
12
- };
13
- const useFormField = () => {
14
- const fieldContext = React.useContext(FormFieldContext);
15
- const itemContext = React.useContext(FormItemContext);
16
- const { getFieldState } = useFormContext();
17
- const formState = useFormState({ name: fieldContext.name });
18
- const fieldState = getFieldState(fieldContext.name, formState);
19
- if (!fieldContext) {
20
- throw new Error("useFormField should be used within <FormField>");
21
- }
22
- const { id } = itemContext;
23
- return {
24
- id,
25
- name: fieldContext.name,
26
- formItemId: `${id}-form-item`,
27
- formDescriptionId: `${id}-form-item-description`,
28
- formMessageId: `${id}-form-item-message`,
29
- ...fieldState,
30
- };
31
- };
32
- const FormItemContext = React.createContext({});
33
- function FormItem({ className, ...props }) {
34
- const id = React.useId();
35
- return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) }));
36
- }
37
- function FormLabel({ className, ...props }) {
38
- const { error, formItemId } = useFormField();
39
- return (_jsx(Label, { "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId, ...props }));
40
- }
41
- function FormControl({ ...props }) {
42
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
43
- return (_jsx(Slot, { "data-slot": "form-control", id: formItemId, "aria-describedby": !error
44
- ? `${formDescriptionId}`
45
- : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
46
- }
47
- function FormDescription({ className, ...props }) {
48
- const { formDescriptionId } = useFormField();
49
- return (_jsx("p", { "data-slot": "form-description", id: formDescriptionId, className: cn("text-muted-foreground text-sm", className), ...props }));
50
- }
51
- function FormMessage({ className, ...props }) {
52
- const { error, formMessageId } = useFormField();
53
- const body = error ? String(error?.message ?? "") : props.children;
54
- if (!body) {
55
- return null;
56
- }
57
- return (_jsx("p", { "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-sm", className), ...props, children: body }));
58
- }
59
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
60
- //# sourceMappingURL=form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,GAIb,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,IAAI,GAAG,YAAY,CAAA;AASzB,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAC1C,EAA2B,CAC5B,CAAA;AAED,MAAM,SAAS,GAAG,CAGhB,EACA,GAAG,KAAK,EAC6B,EAAE,EAAE;IACzC,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,YACpD,KAAC,UAAU,OAAK,KAAK,GAAI,GACC,CAC7B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;IACvD,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IACrD,MAAM,EAAE,aAAa,EAAE,GAAG,cAAc,EAAE,CAAA;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3D,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAA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IAE9E,OAAO,CACL,KAAC,IAAI,iBACO,cAAc,EACxB,EAAE,EAAE,UAAU,sBAEZ,CAAC,KAAK;YACJ,CAAC,CAAC,GAAG,iBAAiB,EAAE;YACxB,CAAC,CAAC,GAAG,iBAAiB,IAAI,aAAa,EAAE,kBAE/B,CAAC,CAAC,KAAK,KACjB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IACzE,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAAA;IAE5C,OAAO,CACL,yBACY,kBAAkB,EAC5B,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IACrE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,CAAA;IAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAA;IAElE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CACL,yBACY,cAAc,EACxB,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,YAER,IAAI,GACH,CACL,CAAA;AACH,CAAC;AAED,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAA"}
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
- export { Input };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../../lib/utils";
3
- function Input({ className, type, ...props }) {
4
- return (_jsx("input", { type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "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", className), ...props }));
5
- }
6
- export { Input };
7
- //# sourceMappingURL=input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,icAAic,EACjc,+EAA+E,EAC/E,wGAAwG,EACxG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export { Label };
@@ -1,9 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as LabelPrimitive from "@radix-ui/react-label";
4
- import { cn } from "../../lib/utils";
5
- function Label({ className, ...props }) {
6
- return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
7
- }
8
- export { Label };
9
- //# sourceMappingURL=label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,KAAK,CAAC,EACb,SAAS,EACT,GAAG,KAAK,EACyC;IACjD,OAAO,CACL,KAAC,cAAc,CAAC,IAAI,iBACR,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,qNAAqN,EACrN,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
- declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
- declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
- size?: "sm" | "default";
8
- }): import("react/jsx-runtime").JSX.Element;
9
- declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
- declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
- declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
- declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
- declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
- declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };