@pago-sh/ui 1.0.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/.turbo/turbo-build.log +195 -0
- package/CHANGELOG.md +47 -0
- package/README.md +22 -0
- package/components.json +17 -0
- package/dist/chunk-2RCGDEGJ.mjs +1 -0
- package/dist/chunk-3GDNSYGJ.mjs +1 -0
- package/dist/chunk-4TCUGB6E.mjs +1 -0
- package/dist/chunk-6XCXQA5L.mjs +1 -0
- package/dist/chunk-BBYR3CIF.mjs +1 -0
- package/dist/chunk-CFBUY7KY.mjs +1 -0
- package/dist/chunk-CHG2VB73.mjs +1 -0
- package/dist/chunk-GCVBVZU7.mjs +1 -0
- package/dist/chunk-HRGUR4R2.mjs +1 -0
- package/dist/chunk-IVU4SSCD.mjs +1 -0
- package/dist/chunk-N6WI5TGM.mjs +1 -0
- package/dist/chunk-OTKGECM3.mjs +1 -0
- package/dist/chunk-SRZFZUN4.mjs +1 -0
- package/dist/chunk-VPECET7P.mjs +1 -0
- package/dist/chunk-WQPSZXQS.mjs +1 -0
- package/dist/chunk-YXNT3UEO.mjs +1 -0
- package/dist/components/atoms/Accordion.d.mts +20 -0
- package/dist/components/atoms/Accordion.d.ts +20 -0
- package/dist/components/atoms/Accordion.js +1 -0
- package/dist/components/atoms/Accordion.mjs +1 -0
- package/dist/components/atoms/Card.d.mts +18 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Card.js +1 -0
- package/dist/components/atoms/Card.mjs +1 -0
- package/dist/components/atoms/Combobox.d.mts +24 -0
- package/dist/components/atoms/Combobox.d.ts +24 -0
- package/dist/components/atoms/Combobox.js +1 -0
- package/dist/components/atoms/Combobox.mjs +1 -0
- package/dist/components/atoms/CopyToClipboardInput.d.mts +12 -0
- package/dist/components/atoms/CopyToClipboardInput.d.ts +12 -0
- package/dist/components/atoms/CopyToClipboardInput.js +1 -0
- package/dist/components/atoms/CopyToClipboardInput.mjs +1 -0
- package/dist/components/atoms/CountryPicker.d.mts +16 -0
- package/dist/components/atoms/CountryPicker.d.ts +16 -0
- package/dist/components/atoms/CountryPicker.js +1 -0
- package/dist/components/atoms/CountryPicker.mjs +1 -0
- package/dist/components/atoms/CountryStatePicker.d.mts +18 -0
- package/dist/components/atoms/CountryStatePicker.d.ts +18 -0
- package/dist/components/atoms/CountryStatePicker.js +1 -0
- package/dist/components/atoms/CountryStatePicker.mjs +1 -0
- package/dist/components/atoms/DateTimePicker.d.mts +10 -0
- package/dist/components/atoms/DateTimePicker.d.ts +10 -0
- package/dist/components/atoms/DateTimePicker.js +1 -0
- package/dist/components/atoms/DateTimePicker.mjs +1 -0
- package/dist/components/atoms/DropdownMenu.d.mts +22 -0
- package/dist/components/atoms/DropdownMenu.d.ts +22 -0
- package/dist/components/atoms/DropdownMenu.js +1 -0
- package/dist/components/atoms/DropdownMenu.mjs +1 -0
- package/dist/components/atoms/FormattedDateTime.d.mts +10 -0
- package/dist/components/atoms/FormattedDateTime.d.ts +10 -0
- package/dist/components/atoms/FormattedDateTime.js +1 -0
- package/dist/components/atoms/FormattedDateTime.mjs +1 -0
- package/dist/components/atoms/FormattedInterval.d.mts +9 -0
- package/dist/components/atoms/FormattedInterval.d.ts +9 -0
- package/dist/components/atoms/FormattedInterval.js +1 -0
- package/dist/components/atoms/FormattedInterval.mjs +1 -0
- package/dist/components/atoms/InputOTP.d.mts +4 -0
- package/dist/components/atoms/InputOTP.d.ts +4 -0
- package/dist/components/atoms/InputOTP.js +1 -0
- package/dist/components/atoms/InputOTP.mjs +1 -0
- package/dist/components/atoms/MoneyInput.d.mts +21 -0
- package/dist/components/atoms/MoneyInput.d.ts +21 -0
- package/dist/components/atoms/MoneyInput.js +1 -0
- package/dist/components/atoms/MoneyInput.mjs +1 -0
- package/dist/components/atoms/Paginator.d.mts +21 -0
- package/dist/components/atoms/Paginator.d.ts +21 -0
- package/dist/components/atoms/Paginator.js +1 -0
- package/dist/components/atoms/Paginator.mjs +1 -0
- package/dist/components/atoms/PagoTimeAgo.d.mts +8 -0
- package/dist/components/atoms/PagoTimeAgo.d.ts +8 -0
- package/dist/components/atoms/PagoTimeAgo.js +1 -0
- package/dist/components/atoms/PagoTimeAgo.mjs +1 -0
- package/dist/components/atoms/PercentageInput.d.mts +19 -0
- package/dist/components/atoms/PercentageInput.d.ts +19 -0
- package/dist/components/atoms/PercentageInput.js +1 -0
- package/dist/components/atoms/PercentageInput.mjs +1 -0
- package/dist/components/atoms/ShadowBox.d.mts +14 -0
- package/dist/components/atoms/ShadowBox.d.ts +14 -0
- package/dist/components/atoms/ShadowBox.js +1 -0
- package/dist/components/atoms/ShadowBox.mjs +1 -0
- package/dist/components/atoms/ShadowBoxOnMd.d.mts +6 -0
- package/dist/components/atoms/ShadowBoxOnMd.d.ts +6 -0
- package/dist/components/atoms/ShadowBoxOnMd.js +1 -0
- package/dist/components/atoms/ShadowBoxOnMd.mjs +1 -0
- package/dist/components/atoms/Sidebar.d.mts +11 -0
- package/dist/components/atoms/Sidebar.d.ts +11 -0
- package/dist/components/atoms/Sidebar.js +1 -0
- package/dist/components/atoms/Sidebar.mjs +1 -0
- package/dist/components/molecules/Banner.d.mts +11 -0
- package/dist/components/molecules/Banner.d.ts +11 -0
- package/dist/components/molecules/Banner.js +1 -0
- package/dist/components/molecules/Banner.mjs +1 -0
- package/dist/components/ui/accordion.d.mts +19 -0
- package/dist/components/ui/accordion.d.ts +19 -0
- package/dist/components/ui/accordion.js +1 -0
- package/dist/components/ui/accordion.mjs +1 -0
- package/dist/components/ui/alert-dialog.d.mts +41 -0
- package/dist/components/ui/alert-dialog.d.ts +41 -0
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert-dialog.mjs +1 -0
- package/dist/components/ui/calendar.d.mts +12 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +1 -0
- package/dist/components/ui/calendar.mjs +1 -0
- package/dist/components/ui/card.d.mts +23 -0
- package/dist/components/ui/card.d.ts +23 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/card.mjs +1 -0
- package/dist/components/ui/chart.d.mts +55 -0
- package/dist/components/ui/chart.d.ts +55 -0
- package/dist/components/ui/chart.js +7 -0
- package/dist/components/ui/chart.mjs +7 -0
- package/dist/components/ui/checkbox.d.mts +2 -0
- package/dist/components/ui/checkbox.d.ts +2 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/checkbox.mjs +1 -0
- package/dist/components/ui/command.d.mts +36 -0
- package/dist/components/ui/command.d.ts +36 -0
- package/dist/components/ui/command.js +1 -0
- package/dist/components/ui/command.mjs +1 -0
- package/dist/components/ui/dialog.d.mts +34 -0
- package/dist/components/ui/dialog.d.ts +34 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/dialog.mjs +1 -0
- package/dist/components/ui/dropdown-menu.d.mts +23 -0
- package/dist/components/ui/dropdown-menu.d.ts +23 -0
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/dropdown-menu.mjs +1 -0
- package/dist/components/ui/form.d.mts +43 -0
- package/dist/components/ui/form.d.ts +43 -0
- package/dist/components/ui/form.js +1 -0
- package/dist/components/ui/form.mjs +1 -0
- package/dist/components/ui/input-otp.d.mts +21 -0
- package/dist/components/ui/input-otp.d.ts +21 -0
- package/dist/components/ui/input-otp.js +1 -0
- package/dist/components/ui/input-otp.mjs +1 -0
- package/dist/components/ui/label.d.mts +9 -0
- package/dist/components/ui/label.d.ts +9 -0
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/label.mjs +1 -0
- package/dist/components/ui/popover.d.mts +12 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/popover.js +1 -0
- package/dist/components/ui/popover.mjs +1 -0
- package/dist/components/ui/radio-group.d.mts +14 -0
- package/dist/components/ui/radio-group.d.ts +14 -0
- package/dist/components/ui/radio-group.js +1 -0
- package/dist/components/ui/radio-group.mjs +1 -0
- package/dist/components/ui/separator.d.mts +10 -0
- package/dist/components/ui/separator.d.ts +10 -0
- package/dist/components/ui/separator.js +1 -0
- package/dist/components/ui/separator.mjs +1 -0
- package/dist/components/ui/sheet.d.mts +43 -0
- package/dist/components/ui/sheet.d.ts +43 -0
- package/dist/components/ui/sheet.js +1 -0
- package/dist/components/ui/sheet.mjs +1 -0
- package/dist/components/ui/sidebar.d.mts +149 -0
- package/dist/components/ui/sidebar.d.ts +149 -0
- package/dist/components/ui/sidebar.js +1 -0
- package/dist/components/ui/sidebar.mjs +1 -0
- package/dist/components/ui/tooltip.d.mts +1 -0
- package/dist/components/ui/tooltip.d.ts +1 -0
- package/dist/components/ui/tooltip.js +1 -0
- package/dist/components/ui/tooltip.mjs +1 -0
- package/dist/hooks/theming.d.mts +76 -0
- package/dist/hooks/theming.d.ts +76 -0
- package/dist/hooks/theming.js +1 -0
- package/dist/hooks/theming.mjs +1 -0
- package/dist/hooks/use-mobile.d.mts +3 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +1 -0
- package/dist/hooks/use-mobile.mjs +1 -0
- package/dist/lib/meterUnit.d.mts +34 -0
- package/dist/lib/meterUnit.d.ts +34 -0
- package/dist/lib/meterUnit.js +1 -0
- package/dist/lib/meterUnit.mjs +1 -0
- package/dist/lib/utils.d.mts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +1 -0
- package/dist/lib/utils.mjs +1 -0
- package/eslint.config.mjs +18 -0
- package/package.json +74 -0
- package/src/components/atoms/Accordion.tsx +56 -0
- package/src/components/atoms/Card.tsx +52 -0
- package/src/components/atoms/Combobox.tsx +166 -0
- package/src/components/atoms/CopyToClipboardInput.tsx +72 -0
- package/src/components/atoms/CountryPicker.tsx +81 -0
- package/src/components/atoms/CountryStatePicker.tsx +155 -0
- package/src/components/atoms/DateTimePicker.tsx +69 -0
- package/src/components/atoms/DropdownMenu.tsx +68 -0
- package/src/components/atoms/FormattedDateTime.tsx +58 -0
- package/src/components/atoms/FormattedInterval.tsx +81 -0
- package/src/components/atoms/InputOTP.tsx +7 -0
- package/src/components/atoms/MoneyInput.tsx +297 -0
- package/src/components/atoms/Paginator.tsx +227 -0
- package/src/components/atoms/PagoTimeAgo.tsx +19 -0
- package/src/components/atoms/PercentageInput.tsx +97 -0
- package/src/components/atoms/ShadowBox.tsx +26 -0
- package/src/components/atoms/ShadowBoxOnMd.tsx +20 -0
- package/src/components/atoms/Sidebar.tsx +1 -0
- package/src/components/molecules/Banner.tsx +42 -0
- package/src/components/ui/accordion.tsx +63 -0
- package/src/components/ui/alert-dialog.tsx +147 -0
- package/src/components/ui/calendar.tsx +81 -0
- package/src/components/ui/card.tsx +47 -0
- package/src/components/ui/chart.tsx +372 -0
- package/src/components/ui/checkbox.tsx +3 -0
- package/src/components/ui/command.tsx +133 -0
- package/src/components/ui/dialog.tsx +127 -0
- package/src/components/ui/dropdown-menu.tsx +74 -0
- package/src/components/ui/form.tsx +180 -0
- package/src/components/ui/input-otp.tsx +68 -0
- package/src/components/ui/label.tsx +25 -0
- package/src/components/ui/popover.tsx +34 -0
- package/src/components/ui/radio-group.tsx +46 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +149 -0
- package/src/components/ui/sidebar.tsx +742 -0
- package/src/components/ui/tooltip.tsx +8 -0
- package/src/hooks/theming.ts +87 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/lib/meterUnit.ts +52 -0
- package/src/lib/utils.ts +6 -0
- package/tsconfig.json +15 -0
- package/tsup.config.ts +11 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog'
|
|
4
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
5
|
+
import { X } from 'lucide-react'
|
|
6
|
+
import * as React from 'react'
|
|
7
|
+
|
|
8
|
+
import { cn } from '@/lib/utils'
|
|
9
|
+
|
|
10
|
+
const Sheet = SheetPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const SheetTrigger = SheetPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
const SheetClose = SheetPrimitive.Close
|
|
15
|
+
|
|
16
|
+
const SheetPortal = SheetPrimitive.Portal
|
|
17
|
+
|
|
18
|
+
const SheetOverlay = ({
|
|
19
|
+
ref,
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof SheetPrimitive.Overlay>) => (
|
|
23
|
+
<SheetPrimitive.Overlay
|
|
24
|
+
className={cn(
|
|
25
|
+
'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/80',
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
{...props}
|
|
29
|
+
ref={ref}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
32
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
|
|
33
|
+
|
|
34
|
+
const sheetVariants = cva(
|
|
35
|
+
'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
side: {
|
|
39
|
+
top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
|
|
40
|
+
bottom:
|
|
41
|
+
'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
42
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
|
|
43
|
+
right:
|
|
44
|
+
'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
side: 'right',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
interface SheetContentProps
|
|
54
|
+
extends
|
|
55
|
+
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
|
56
|
+
VariantProps<typeof sheetVariants> {}
|
|
57
|
+
|
|
58
|
+
const SheetContent = ({
|
|
59
|
+
ref,
|
|
60
|
+
side = 'right',
|
|
61
|
+
className,
|
|
62
|
+
children,
|
|
63
|
+
...props
|
|
64
|
+
}: SheetContentProps & {
|
|
65
|
+
ref?: React.Ref<React.ComponentRef<typeof SheetPrimitive.Content>>
|
|
66
|
+
}) => (
|
|
67
|
+
<SheetPortal>
|
|
68
|
+
<SheetOverlay />
|
|
69
|
+
<SheetPrimitive.Content
|
|
70
|
+
ref={ref}
|
|
71
|
+
className={cn(sheetVariants({ side }), className)}
|
|
72
|
+
{...props}
|
|
73
|
+
>
|
|
74
|
+
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none">
|
|
75
|
+
<X className="h-4 w-4" />
|
|
76
|
+
<span className="sr-only">Close</span>
|
|
77
|
+
</SheetPrimitive.Close>
|
|
78
|
+
{children}
|
|
79
|
+
</SheetPrimitive.Content>
|
|
80
|
+
</SheetPortal>
|
|
81
|
+
)
|
|
82
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
83
|
+
|
|
84
|
+
const SheetHeader = ({
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
88
|
+
<div
|
|
89
|
+
className={cn(
|
|
90
|
+
'flex flex-col space-y-2 text-center sm:text-left',
|
|
91
|
+
className,
|
|
92
|
+
)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
)
|
|
96
|
+
SheetHeader.displayName = 'SheetHeader'
|
|
97
|
+
|
|
98
|
+
const SheetFooter = ({
|
|
99
|
+
className,
|
|
100
|
+
...props
|
|
101
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
102
|
+
<div
|
|
103
|
+
className={cn(
|
|
104
|
+
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
|
|
105
|
+
className,
|
|
106
|
+
)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
)
|
|
110
|
+
SheetFooter.displayName = 'SheetFooter'
|
|
111
|
+
|
|
112
|
+
const SheetTitle = ({
|
|
113
|
+
ref,
|
|
114
|
+
className,
|
|
115
|
+
...props
|
|
116
|
+
}: React.ComponentProps<typeof SheetPrimitive.Title>) => (
|
|
117
|
+
<SheetPrimitive.Title
|
|
118
|
+
ref={ref}
|
|
119
|
+
className={cn('text-foreground text-lg font-semibold', className)}
|
|
120
|
+
{...props}
|
|
121
|
+
/>
|
|
122
|
+
)
|
|
123
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
124
|
+
|
|
125
|
+
const SheetDescription = ({
|
|
126
|
+
ref,
|
|
127
|
+
className,
|
|
128
|
+
...props
|
|
129
|
+
}: React.ComponentProps<typeof SheetPrimitive.Description>) => (
|
|
130
|
+
<SheetPrimitive.Description
|
|
131
|
+
ref={ref}
|
|
132
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
133
|
+
{...props}
|
|
134
|
+
/>
|
|
135
|
+
)
|
|
136
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
Sheet,
|
|
140
|
+
SheetClose,
|
|
141
|
+
SheetContent,
|
|
142
|
+
SheetDescription,
|
|
143
|
+
SheetFooter,
|
|
144
|
+
SheetHeader,
|
|
145
|
+
SheetOverlay,
|
|
146
|
+
SheetPortal,
|
|
147
|
+
SheetTitle,
|
|
148
|
+
SheetTrigger,
|
|
149
|
+
}
|