@arolariu/components 0.1.2 → 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.
- package/DEBUGGING.md +396 -396
- package/LICENSE.md +21 -21
- package/changelog.md +120 -118
- package/dist/components/ui/accordion.d.ts +6 -6
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +20 -28
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +19 -13
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +40 -63
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +7 -8
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +18 -21
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -8
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +5 -5
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +17 -20
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +6 -6
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/badge.d.ts +7 -7
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +9 -12
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +17 -9
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +32 -39
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble-background.d.ts +1 -1
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +13 -13
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +47 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +8 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +16 -15
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +22 -22
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +33 -46
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +7 -8
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +30 -21
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +37 -29
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +29 -27
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +11 -13
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +4 -5
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +3 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +79 -17
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +52 -77
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +23 -21
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +60 -104
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/counting-number.d.ts +1 -1
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +4 -3
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +17 -13
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +38 -66
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dot-background.d.ts +10 -17
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +2 -2
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +20 -11
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +37 -62
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +23 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +65 -109
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +3 -3
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +13 -16
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +65 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +135 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +1 -1
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/flip-button.d.ts +1 -1
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +3 -3
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/form.d.ts +7 -8
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +29 -28
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/gradient-background.d.ts +1 -1
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +2 -2
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-text.d.ts +1 -1
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +5 -5
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/highlight-text.d.ts +1 -1
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +3 -3
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +11 -10
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +5 -5
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +12 -26
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +91 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +31 -8
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +24 -27
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +7 -8
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +3 -2
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +9 -8
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +20 -18
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +75 -95
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +11 -13
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +39 -58
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +25 -10
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -41
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +6 -6
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +10 -26
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +2 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +8 -10
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +17 -20
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +21 -6
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +9 -21
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/ripple-button.d.ts +1 -1
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +4 -4
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +7 -5
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +3 -3
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +14 -18
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +11 -13
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +55 -78
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +7 -8
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +24 -12
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +56 -68
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +35 -39
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +115 -124
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +2 -3
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +2 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +12 -31
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +4 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +8 -5
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +8 -10
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +9 -9
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +40 -49
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +6 -6
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +18 -27
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +7 -8
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +9 -4
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +12 -16
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +9 -6
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +6 -6
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +14 -39
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +9 -9
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/hooks/useIsMobile.d.ts +2 -5
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +1 -1
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useWindowSize.d.ts +0 -1
- package/dist/hooks/useWindowSize.d.ts.map +1 -1
- package/dist/hooks/useWindowSize.js +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.css +841 -1128
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +43 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -5
- package/dist/lib/utilities.d.ts +9 -0
- package/dist/lib/utilities.d.ts.map +1 -0
- package/dist/lib/{utils.js → utilities.js} +1 -1
- package/dist/lib/utilities.js.map +1 -0
- package/package.json +121 -90
- package/{README.md → readme.md} +627 -627
- package/src/components/ui/accordion.tsx +55 -66
- package/src/components/ui/alert-dialog.tsx +124 -160
- package/src/components/ui/alert.tsx +56 -69
- package/src/components/ui/aspect-ratio.tsx +7 -12
- package/src/components/ui/avatar.tsx +43 -53
- package/src/components/ui/background-beams.tsx +145 -142
- package/src/components/ui/badge.tsx +39 -48
- package/src/components/ui/breadcrumb.tsx +94 -117
- package/src/components/ui/bubble-background.tsx +170 -189
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +55 -61
- package/src/components/ui/calendar.tsx +175 -216
- package/src/components/ui/card.tsx +64 -97
- package/src/components/ui/carousel.tsx +216 -241
- package/src/components/ui/chart.tsx +293 -385
- package/src/components/ui/checkbox.tsx +27 -32
- package/src/components/ui/collapsible.tsx +11 -34
- package/src/components/ui/command.tsx +138 -184
- package/src/components/ui/context-menu.tsx +186 -255
- package/src/components/ui/counting-number.tsx +92 -108
- package/src/components/ui/dialog.tsx +106 -146
- package/src/components/ui/dot-background.tsx +153 -158
- package/src/components/ui/drawer.tsx +105 -141
- package/src/components/ui/dropdown-menu.tsx +188 -260
- package/src/components/ui/dropdrawer.tsx +865 -973
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +198 -0
- package/src/components/ui/fireworks-background.tsx +325 -378
- package/src/components/ui/flip-button.tsx +89 -110
- package/src/components/ui/form.tsx +144 -174
- package/src/components/ui/gradient-background.tsx +30 -43
- package/src/components/ui/gradient-text.tsx +62 -65
- package/src/components/ui/highlight-text.tsx +54 -71
- package/src/components/ui/hole-background.tsx +326 -361
- package/src/components/ui/hover-card.tsx +29 -44
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +66 -77
- package/src/components/ui/input.tsx +21 -22
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +23 -24
- package/src/components/ui/menubar.tsx +233 -279
- package/src/components/ui/navigation-menu.tsx +120 -171
- package/src/components/ui/pagination.tsx +92 -129
- package/src/components/ui/popover.tsx +33 -48
- package/src/components/ui/progress.tsx +24 -31
- package/src/components/ui/radio-group.tsx +43 -45
- package/src/components/ui/resizable.tsx +38 -56
- package/src/components/ui/ripple-button.tsx +90 -111
- package/src/components/ui/scratcher.tsx +167 -171
- package/src/components/ui/scroll-area.tsx +42 -58
- package/src/components/ui/select.tsx +145 -191
- package/src/components/ui/separator.tsx +26 -28
- package/src/components/ui/sheet.tsx +112 -145
- package/src/components/ui/sidebar.tsx +664 -729
- package/src/components/ui/skeleton.tsx +15 -19
- package/src/components/ui/slider.tsx +23 -63
- package/src/components/ui/sonner.tsx +36 -26
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +28 -31
- package/src/components/ui/table.tsx +93 -119
- package/src/components/ui/tabs.tsx +54 -66
- package/src/components/ui/textarea.tsx +21 -20
- package/src/components/ui/toggle-group.tsx +53 -73
- package/src/components/ui/toggle.tsx +44 -47
- package/src/components/ui/tooltip.tsx +32 -61
- package/src/components/ui/typewriter.tsx +173 -188
- package/src/hooks/useIsMobile.tsx +42 -45
- package/src/hooks/useWindowSize.tsx +66 -72
- package/src/index.css +67 -67
- package/src/index.ts +342 -408
- package/src/lib/utilities.ts +12 -0
- package/dist/lib/utils.d.ts +0 -7
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/src/lib/utils.ts +0 -10
|
@@ -1,37 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Anchor, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
function PopoverTrigger({ ...props }) {
|
|
13
|
-
return /*#__PURE__*/ jsx(Trigger, {
|
|
14
|
-
"data-slot": "popover-trigger",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
19
|
-
return /*#__PURE__*/ jsx(Portal, {
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const Popover = Root;
|
|
7
|
+
const PopoverTrigger = Trigger;
|
|
8
|
+
const PopoverAnchor = Anchor;
|
|
9
|
+
const PopoverContent = /*#__PURE__*/ forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref)=>/*#__PURE__*/ jsx(Portal, {
|
|
20
10
|
children: /*#__PURE__*/ jsx(Content, {
|
|
21
|
-
|
|
11
|
+
ref: ref,
|
|
22
12
|
align: align,
|
|
23
13
|
sideOffset: sideOffset,
|
|
24
|
-
className: cn("
|
|
14
|
+
className: cn("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 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 z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50", className),
|
|
25
15
|
...props
|
|
26
16
|
})
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function PopoverAnchor({ ...props }) {
|
|
30
|
-
return /*#__PURE__*/ jsx(Anchor, {
|
|
31
|
-
"data-slot": "popover-anchor",
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
34
|
-
}
|
|
17
|
+
}));
|
|
18
|
+
PopoverContent.displayName = Content.displayName;
|
|
35
19
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
36
20
|
|
|
37
21
|
//# sourceMappingURL=popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\popover.js","sources":["webpack://@arolariu/components/./src/components/ui/popover.tsx"],"sourcesContent":["\n\nimport * as
|
|
1
|
+
{"version":3,"file":"components\\ui\\popover.js","sources":["webpack://@arolariu/components/./src/components/ui/popover.tsx"],"sourcesContent":["\r\n\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Popover = PopoverPrimitive.Root;\r\n\r\nconst PopoverTrigger = PopoverPrimitive.Trigger;\r\n\r\nconst PopoverAnchor = PopoverPrimitive.Anchor;\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\r\n>(({className, align = \"center\", sideOffset = 4, ...props}, ref) => (\r\n <PopoverPrimitive.Portal>\r\n <PopoverPrimitive.Content\r\n ref={ref}\r\n align={align}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n \"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 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 z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </PopoverPrimitive.Portal>\r\n));\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\r\n\r\nexport {Popover, PopoverAnchor, PopoverContent, PopoverTrigger};\r\n"],"names":["Popover","PopoverPrimitive","PopoverTrigger","PopoverAnchor","PopoverContent","React","className","align","sideOffset","props","ref","cn"],"mappings":";;;;;AAOA,MAAMA,UAAUC;AAEhB,MAAMC,iBAAiBD;AAEvB,MAAME,gBAAgBF;AAEtB,MAAMG,iBAAiB,WAAjBA,GAAiBC,WAGrB,CAAC,EAACC,SAAS,EAAEC,QAAQ,QAAQ,EAAEC,aAAa,CAAC,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC1D,IAACT,QAAuB;kBACtB,kBAACA,SAAwB;YACvB,KAAKS;YACL,OAAOH;YACP,YAAYC;YACZ,WAAWG,GACT,2iBACAL;YAED,GAAGG,KAAK;;;AAIfL,eAAe,WAAW,GAAGH,QAAAA,WAAoC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
-
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { Progress };
|
|
5
5
|
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,QAAQ,2JAaZ,CAAC;AAGH,OAAO,EAAC,QAAQ,EAAC,CAAC"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Indicator, Root } from "@radix-ui/react-progress";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: cn("
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const Progress = /*#__PURE__*/ forwardRef(({ className, value, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-neutral-900/20 dark:bg-neutral-50/20", className),
|
|
10
9
|
...props,
|
|
11
10
|
children: /*#__PURE__*/ jsx(Indicator, {
|
|
12
|
-
|
|
13
|
-
className: "bg-neutral-900 h-full w-full flex-1 transition-all dark:bg-neutral-50",
|
|
11
|
+
className: "h-full w-full flex-1 bg-neutral-900 transition-all dark:bg-neutral-50",
|
|
14
12
|
style: {
|
|
15
13
|
transform: `translateX(-${100 - (value || 0)}%)`
|
|
16
14
|
}
|
|
17
15
|
})
|
|
18
|
-
});
|
|
19
|
-
|
|
16
|
+
}));
|
|
17
|
+
Progress.displayName = Root.displayName;
|
|
20
18
|
export { Progress };
|
|
21
19
|
|
|
22
20
|
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\progress.js","sources":["webpack://@arolariu/components/./src/components/ui/progress.tsx"],"sourcesContent":["\n\nimport * as
|
|
1
|
+
{"version":3,"file":"components\\ui\\progress.js","sources":["webpack://@arolariu/components/./src/components/ui/progress.tsx"],"sourcesContent":["\r\n\r\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Progress = React.forwardRef<\r\n React.ElementRef<typeof ProgressPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\r\n>(({className, value, ...props}, ref) => (\r\n <ProgressPrimitive.Root\r\n ref={ref}\r\n className={cn(\"relative h-2 w-full overflow-hidden rounded-full bg-neutral-900/20 dark:bg-neutral-50/20\", className)}\r\n {...props}>\r\n <ProgressPrimitive.Indicator\r\n className='h-full w-full flex-1 bg-neutral-900 transition-all dark:bg-neutral-50'\r\n style={{transform: `translateX(-${100 - (value || 0)}%)`}}\r\n />\r\n </ProgressPrimitive.Root>\r\n));\r\nProgress.displayName = ProgressPrimitive.Root.displayName;\r\n\r\nexport {Progress};\r\n"],"names":["Progress","React","className","value","props","ref","ProgressPrimitive","cn"],"mappings":";;;;;AAOA,MAAMA,WAAW,WAAXA,GAAWC,WAGf,CAAC,EAACC,SAAS,EAAEC,KAAK,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC/B,IAACC,MAAsB;QACrB,KAAKD;QACL,WAAWE,GAAG,4FAA4FL;QACzG,GAAGE,KAAK;kBACT,kBAACE,WAA2B;YAC1B,WAAU;YACV,OAAO;gBAAC,WAAW,CAAC,YAAY,EAAE,MAAOH,CAAAA,SAAS,GAAG,EAAE,CAAC;YAAA;;;AAI9DH,SAAS,WAAW,GAAGM,KAAAA,WAAkC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
|
|
4
|
-
declare
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
|
6
6
|
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,UAAU,+JAWd,CAAC;AAGH,QAAA,MAAM,cAAc,yKAiBlB,CAAC;AAGH,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,CAAC"}
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Indicator, Item, Root } from "@radix-ui/react-radio-group";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
className: cn("border-neutral-200 text-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-neutral-200/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-neutral-800/30", className),
|
|
4
|
+
import { Circle } from "lucide-react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { cn } from "../../lib/utilities.js";
|
|
7
|
+
const RadioGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
8
|
+
className: cn("grid gap-2", className),
|
|
9
|
+
...props,
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
RadioGroup.displayName = Root.displayName;
|
|
13
|
+
const RadioGroupItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Item, {
|
|
14
|
+
ref: ref,
|
|
15
|
+
className: cn("aspect-square h-4 w-4 rounded-full border border-neutral-200 border-neutral-900 text-neutral-900 shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:ring-neutral-300", className),
|
|
18
16
|
...props,
|
|
19
17
|
children: /*#__PURE__*/ jsx(Indicator, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"
|
|
18
|
+
className: "flex items-center justify-center",
|
|
19
|
+
children: /*#__PURE__*/ jsx(Circle, {
|
|
20
|
+
className: "fill-primary h-3.5 w-3.5"
|
|
24
21
|
})
|
|
25
22
|
})
|
|
26
|
-
});
|
|
27
|
-
|
|
23
|
+
}));
|
|
24
|
+
RadioGroupItem.displayName = Item.displayName;
|
|
28
25
|
export { RadioGroup, RadioGroupItem };
|
|
29
26
|
|
|
30
27
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\radio-group.js","sources":["webpack://@arolariu/components/./src/components/ui/radio-group.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\radio-group.js","sources":["webpack://@arolariu/components/./src/components/ui/radio-group.tsx"],"sourcesContent":["\r\n\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\r\nimport {Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({className, ...props}, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Root\r\n className={cn(\"grid gap-2\", className)}\r\n {...props}\r\n ref={ref}\r\n />\r\n );\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({className, ...props}, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"aspect-square h-4 w-4 rounded-full border border-neutral-200 border-neutral-900 text-neutral-900 shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:ring-neutral-300\",\r\n className,\r\n )}\r\n {...props}>\r\n <RadioGroupPrimitive.Indicator className='flex items-center justify-center'>\r\n <Circle className='fill-primary h-3.5 w-3.5' />\r\n </RadioGroupPrimitive.Indicator>\r\n </RadioGroupPrimitive.Item>\r\n );\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nexport {RadioGroup, RadioGroupItem};\r\n"],"names":["RadioGroup","React","className","props","ref","RadioGroupPrimitive","cn","RadioGroupItem","Circle"],"mappings":";;;;;;AAQA,MAAMA,aAAa,WAAbA,GAAaC,WAGjB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MACjB,WAAP,GACE,IAACC,MAAwB;QACvB,WAAWC,GAAG,cAAcJ;QAC3B,GAAGC,KAAK;QACT,KAAKC;;AAIXJ,WAAW,WAAW,GAAGK,KAAAA,WAAoC;AAE7D,MAAME,iBAAiB,WAAjBA,GAAiBN,WAGrB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MACjB,WAAP,GACE,IAACC,MAAwB;QACvB,KAAKD;QACL,WAAWE,GACT,0UACAJ;QAED,GAAGC,KAAK;kBACT,kBAACE,WAA6B;YAAC,WAAU;sBACvC,kBAACG,QAAMA;gBAAC,WAAU;;;;AAK1BD,eAAe,WAAW,GAAGF,KAAAA,WAAoC"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
-
declare
|
|
4
|
-
declare
|
|
5
|
-
|
|
2
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
collapsedSize?: number | undefined;
|
|
6
|
+
collapsible?: boolean | undefined;
|
|
7
|
+
defaultSize?: number | undefined;
|
|
8
|
+
id?: string;
|
|
9
|
+
maxSize?: number | undefined;
|
|
10
|
+
minSize?: number | undefined;
|
|
11
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
+
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
+
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
+
order?: number;
|
|
15
|
+
style?: object;
|
|
16
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
children?: import("react").ReactNode | undefined;
|
|
19
|
+
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
6
21
|
withHandle?: boolean;
|
|
7
|
-
})
|
|
8
|
-
export {
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
9
24
|
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D,QAAA,MAAM,mBAAmB,GAAI,yBAAuB,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,4CAK7G,CAAC;AAEF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;4EAA2B,CAAC;AAEhD,QAAA,MAAM,eAAe,GAAI,qCAItB,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,GAAG;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,4CAaA,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
|
-
import { GripVerticalIcon } from "lucide-react";
|
|
3
|
+
import { GripVertical } from "lucide-react";
|
|
5
4
|
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
|
|
6
|
-
import { cn } from "../../lib/
|
|
7
|
-
|
|
8
|
-
return /*#__PURE__*/ jsx(PanelGroup, {
|
|
9
|
-
"data-slot": "resizable-panel-group",
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const ResizablePanelGroup = ({ className, ...props })=>/*#__PURE__*/ jsx(PanelGroup, {
|
|
10
7
|
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
11
8
|
...props
|
|
12
9
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"data-slot": "resizable-panel",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function ResizableHandle({ withHandle, className, ...props }) {
|
|
21
|
-
return /*#__PURE__*/ jsx(PanelResizeHandle, {
|
|
22
|
-
"data-slot": "resizable-handle",
|
|
23
|
-
className: cn("bg-neutral-200 focus-visible:ring-neutral-950 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 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300", className),
|
|
10
|
+
const ResizablePanel = Panel;
|
|
11
|
+
const ResizableHandle = ({ withHandle, className, ...props })=>/*#__PURE__*/ jsx(PanelResizeHandle, {
|
|
12
|
+
className: cn("relative flex w-px items-center justify-center bg-neutral-200 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-neutral-950 focus-visible:ring-offset-1 focus-visible:outline-none 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 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300 [&[data-panel-group-direction=vertical]>div]:rotate-90", className),
|
|
24
13
|
...props,
|
|
25
14
|
children: withHandle && /*#__PURE__*/ jsx("div", {
|
|
26
|
-
className: "
|
|
27
|
-
children: /*#__PURE__*/ jsx(
|
|
28
|
-
className: "
|
|
15
|
+
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800",
|
|
16
|
+
children: /*#__PURE__*/ jsx(GripVertical, {
|
|
17
|
+
className: "h-2.5 w-2.5"
|
|
29
18
|
})
|
|
30
19
|
})
|
|
31
20
|
});
|
|
32
|
-
}
|
|
33
21
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
34
22
|
|
|
35
23
|
//# sourceMappingURL=resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\resizable.js","sources":["webpack://@arolariu/components/./src/components/ui/resizable.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\resizable.js","sources":["webpack://@arolariu/components/./src/components/ui/resizable.tsx"],"sourcesContent":["\r\n\r\nimport {GripVertical} from \"lucide-react\";\r\nimport * as ResizablePrimitive from \"react-resizable-panels\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ResizablePanelGroup = ({className, ...props}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (\r\n <ResizablePrimitive.PanelGroup\r\n className={cn(\"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\", className)}\r\n {...props}\r\n />\r\n);\r\n\r\nconst ResizablePanel = ResizablePrimitive.Panel;\r\n\r\nconst ResizableHandle = ({\r\n withHandle,\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\r\n withHandle?: boolean;\r\n}) => (\r\n <ResizablePrimitive.PanelResizeHandle\r\n className={cn(\r\n \"relative flex w-px items-center justify-center bg-neutral-200 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-neutral-950 focus-visible:ring-offset-1 focus-visible:outline-none 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 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\r\n className,\r\n )}\r\n {...props}>\r\n {withHandle && (\r\n <div className='z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800'>\r\n <GripVertical className='h-2.5 w-2.5' />\r\n </div>\r\n )}\r\n </ResizablePrimitive.PanelResizeHandle>\r\n);\r\n\r\nexport {ResizableHandle, ResizablePanel, ResizablePanelGroup};\r\n"],"names":["ResizablePanelGroup","className","props","ResizablePrimitive","cn","ResizablePanel","ResizableHandle","withHandle","GripVertical"],"mappings":";;;;;AAOA,MAAMA,sBAAsB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAkE,iBAC5G,IAACC,YAA6B;QAC5B,WAAWC,GAAG,qEAAqEH;QAClF,GAAGC,KAAK;;AAIb,MAAMG,iBAAiBF;AAEvB,MAAMG,kBAAkB,CAAC,EACvBC,UAAU,EACVN,SAAS,EACT,GAAGC,OAGJ,iBACC,IAACC,mBAAoC;QACnC,WAAWC,GACT,+sBACAH;QAED,GAAGC,KAAK;kBACRK,cAAc,WAAdA,GACC,IAAC;YAAI,WAAU;sBACb,kBAACC,cAAYA;gBAAC,WAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ripple-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"ripple-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ripple-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,eAAe,EAAU,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,iBAAkB,SAAQ,eAAe,CAAC,QAAQ,CAAC;IAC3D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,0GAiEjB,CAAC;AAIF,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, rippleClassName, scale = 10, transition = {
|
|
7
7
|
duration: 0.6,
|
|
8
8
|
ease: "easeOut"
|
|
@@ -45,7 +45,7 @@ const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, r
|
|
|
45
45
|
whileHover: {
|
|
46
46
|
scale: 1.05
|
|
47
47
|
},
|
|
48
|
-
className: cn("relative h-10 px-4 py-2 text-sm font-medium
|
|
48
|
+
className: cn("text-primary-foreground bg-primary relative h-10 cursor-pointer overflow-hidden rounded-lg px-4 py-2 text-sm font-medium focus:outline-none", className),
|
|
49
49
|
...props,
|
|
50
50
|
children: [
|
|
51
51
|
children,
|
|
@@ -59,7 +59,7 @@ const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, r
|
|
|
59
59
|
opacity: 0
|
|
60
60
|
},
|
|
61
61
|
transition: transition,
|
|
62
|
-
className: cn("
|
|
62
|
+
className: cn("bg-primary-foreground pointer-events-none absolute size-5 rounded-full", rippleClassName),
|
|
63
63
|
style: {
|
|
64
64
|
top: ripple.y - 10,
|
|
65
65
|
left: ripple.x - 10
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\ripple-button.js","sources":["webpack://@arolariu/components/./src/components/ui/ripple-button.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\ripple-button.js","sources":["webpack://@arolariu/components/./src/components/ui/ripple-button.tsx"],"sourcesContent":["\r\n\r\nimport {type HTMLMotionProps, motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ninterface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n children: React.ReactNode;\r\n rippleClassName?: string;\r\n scale?: number;\r\n transition?: Transition;\r\n}\r\n\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n const [ripples, setRipples] = React.useState<Ripple[]>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n React.useImperativeHandle(ref, () => buttonRef.current as HTMLButtonElement);\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\r\n const button = buttonRef.current;\r\n if (!button) return;\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((prev) => [...prev, newRipple]);\r\n\r\n setTimeout(() => {\r\n setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));\r\n }, 600);\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>) => {\r\n createRipple(event);\r\n if (onClick) {\r\n onClick(event);\r\n }\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(\r\n \"text-primary-foreground bg-primary relative h-10 cursor-pointer overflow-hidden rounded-lg px-4 py-2 text-sm font-medium focus:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(\"bg-primary-foreground pointer-events-none absolute size-5 rounded-full\", rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton, type RippleButtonProps};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","ripples","setRipples","buttonRef","createRipple","event","button","rect","x","y","newRipple","Date","prev","setTimeout","r","handleClick","motion","cn","ripple"],"mappings":";;;;;AAoBA,MAAMA,eAAe,WAAfA,GAAeC,WACnB,CAAC,EAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,EAAEC,QAAQ,EAAE,EAAEC,aAAa;IAAC,UAAU;IAAK,MAAM;AAAS,CAAC,EAAE,GAAGC,OAAM,EAAEC;IACrH,MAAM,CAACC,SAASC,WAAW,GAAGV,SAAyB,EAAE;IACzD,MAAMW,YAAYX,OAAgC;IAClDA,oBAA0BQ,KAAK,IAAMG,UAAU,OAAO;IAEtD,MAAMC,eAAeZ,YAAkB,CAACa;QACtC,MAAMC,SAASH,UAAU,OAAO;QAChC,IAAI,CAACG,QAAQ;QAEb,MAAMC,OAAOD,OAAO,qBAAqB;QACzC,MAAME,IAAIH,MAAM,OAAO,GAAGE,KAAK,IAAI;QACnC,MAAME,IAAIJ,MAAM,OAAO,GAAGE,KAAK,GAAG;QAElC,MAAMG,YAAoB;YACxB,IAAIC,KAAK,GAAG;YACZH;YACAC;QACF;QAEAP,WAAW,CAACU,OAAS;mBAAIA;gBAAMF;aAAU;QAEzCG,WAAW;YACTX,WAAW,CAACU,OAASA,KAAK,MAAM,CAAC,CAACE,IAAMA,EAAE,EAAE,KAAKJ,UAAU,EAAE;QAC/D,GAAG;IACL,GAAG,EAAE;IAEL,MAAMK,cAAcvB,YAClB,CAACa;QACCD,aAAaC;QACb,IAAIX,SACFA,QAAQW;IAEZ,GACA;QAACD;QAAcV;KAAQ;IAGzB,OAAO,WAAP,GACE,KAACsB,OAAO,MAAM;QACZ,KAAKb;QACL,SAASY;QACT,UAAU;YAAC,OAAO;QAAI;QACtB,YAAY;YAAC,OAAO;QAAI;QACxB,WAAWE,GACT,+IACAtB;QAED,GAAGI,KAAK;;YACRN;YACAQ,QAAQ,GAAG,CAAC,CAACiB,SAAAA,WAAAA,GACZ,IAACF,OAAO,IAAI;oBAEV,SAAS;wBAAC,OAAO;wBAAG,SAAS;oBAAG;oBAChC,SAAS;wBAACnB;wBAAO,SAAS;oBAAC;oBAC3B,YAAYC;oBACZ,WAAWmB,GAAG,0EAA0ErB;oBACxF,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBARKA,OAAO,EAAE;;;AAaxB;AAGF3B,aAAa,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAID,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoJ9C,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../lib/
|
|
3
|
+
import { cn } from "../../lib/utilities.js";
|
|
4
4
|
import { motion, useAnimation } from "motion/react";
|
|
5
5
|
import { useEffect, useRef, useState } from "react";
|
|
6
|
-
const
|
|
6
|
+
const defaultGradientColors = [
|
|
7
7
|
"#A97CF8",
|
|
8
8
|
"#F38CB8",
|
|
9
9
|
"#FDCC92"
|
|
10
|
-
]
|
|
10
|
+
];
|
|
11
|
+
const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors })=>{
|
|
11
12
|
const canvasRef = useRef(null);
|
|
12
13
|
const [isScratching, setIsScratching] = useState(false);
|
|
13
14
|
const [isComplete, setIsComplete] = useState(false);
|
|
@@ -35,7 +36,8 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
|
|
|
35
36
|
};
|
|
36
37
|
const handleDocumentTouchMove = (event)=>{
|
|
37
38
|
if (!isScratching) return;
|
|
38
|
-
const touch = event.touches
|
|
39
|
+
const [touch] = event.touches;
|
|
40
|
+
if (!touch) return;
|
|
39
41
|
scratch(touch.clientX, touch.clientY);
|
|
40
42
|
};
|
|
41
43
|
const handleDocumentMouseUp = ()=>{
|
|
@@ -132,7 +134,7 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
|
|
|
132
134
|
ref: canvasRef,
|
|
133
135
|
width: width,
|
|
134
136
|
height: height,
|
|
135
|
-
className: "absolute
|
|
137
|
+
className: "absolute top-0 left-0",
|
|
136
138
|
onMouseDown: handleMouseDown,
|
|
137
139
|
onTouchStart: handleTouchStart
|
|
138
140
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\scratcher.js","sources":["webpack://@arolariu/components/./src/components/ui/scratcher.tsx"],"sourcesContent":["\n\nimport {
|
|
1
|
+
{"version":3,"file":"components\\ui\\scratcher.js","sources":["webpack://@arolariu/components/./src/components/ui/scratcher.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport {motion, useAnimation} from \"motion/react\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\n\r\ninterface ScratcherProps {\r\n children: React.ReactNode;\r\n width: number;\r\n height: number;\r\n minScratchPercentage?: number;\r\n className?: string;\r\n onComplete?: () => void;\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nconst defaultGradientColors: [string, string, string] = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"];\r\n\r\nexport const Scratcher: React.FC<ScratcherProps> = ({\r\n width,\r\n height,\r\n minScratchPercentage = 50,\r\n onComplete,\r\n children,\r\n className,\r\n gradientColors = defaultGradientColors,\r\n}) => {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n ctx.fillStyle = \"#ccc\";\r\n ctx.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height);\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, canvas.width, canvas.height);\r\n }\r\n }, [gradientColors]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent) => {\r\n if (!isScratching) return;\r\n scratch(event.clientX, event.clientY);\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent) => {\r\n if (!isScratching) return;\r\n const [touch] = event.touches;\r\n if (!touch) return;\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentMouseUp = () => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n const handleDocumentTouchEnd = () => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n document.addEventListener(\"mousedown\", handleDocumentMouseMove);\r\n document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n document.addEventListener(\"touchstart\", handleDocumentTouchMove);\r\n document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n document.addEventListener(\"mouseup\", handleDocumentMouseUp);\r\n document.addEventListener(\"touchend\", handleDocumentTouchEnd);\r\n document.addEventListener(\"touchcancel\", handleDocumentTouchEnd);\r\n\r\n return () => {\r\n document.removeEventListener(\"mousedown\", handleDocumentMouseMove);\r\n document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n document.removeEventListener(\"touchstart\", handleDocumentTouchMove);\r\n document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n document.removeEventListener(\"mouseup\", handleDocumentMouseUp);\r\n document.removeEventListener(\"touchend\", handleDocumentTouchEnd);\r\n document.removeEventListener(\"touchcancel\", handleDocumentTouchEnd);\r\n };\r\n }, [isScratching]);\r\n\r\n const handleMouseDown = () => setIsScratching(true);\r\n\r\n const handleTouchStart = () => setIsScratching(true);\r\n\r\n const scratch = (clientX: number, clientY: number) => {\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n ctx.globalCompositeOperation = \"destination-out\";\r\n ctx.beginPath();\r\n ctx.arc(x, y, 30, 0, Math.PI * 2);\r\n ctx.fill();\r\n }\r\n };\r\n\r\n const startAnimation = async () => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: {duration: 0.5},\r\n });\r\n\r\n // Call onComplete after animation finishes\r\n if (onComplete) {\r\n onComplete();\r\n }\r\n };\r\n\r\n const checkCompletion = () => {\r\n if (isComplete) return;\r\n\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let i = 3; i < pixels.length; i += 4) {\r\n if (pixels[i] === 0) clearPixels++;\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <motion.div\r\n className={cn(\"relative select-none\", className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}>\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className='absolute top-0 left-0'\r\n onMouseDown={handleMouseDown}\r\n onTouchStart={handleTouchStart}></canvas>\r\n {children}\r\n </motion.div>\r\n );\r\n};\r\n"],"names":["defaultGradientColors","Scratcher","width","height","minScratchPercentage","onComplete","children","className","gradientColors","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","ctx","gradient","handleDocumentMouseMove","event","scratch","handleDocumentTouchMove","touch","handleDocumentMouseUp","checkCompletion","handleDocumentTouchEnd","document","handleMouseDown","handleTouchStart","clientX","clientY","rect","x","y","Math","startAnimation","imageData","pixels","totalPixels","clearPixels","i","percentage","motion","cn"],"mappings":";;;;;AAgBA,MAAMA,wBAAkD;IAAC;IAAW;IAAW;CAAU;AAElF,MAAMC,YAAsC,CAAC,EAClDC,KAAK,EACLC,MAAM,EACNC,uBAAuB,EAAE,EACzBC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,iBAAiBR,qBAAqB,EACvC;IACC,MAAMS,YAAYC,OAA0B;IAC5C,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,SAAS;IACjD,MAAM,CAACC,YAAYC,cAAc,GAAGF,SAAS;IAE7C,MAAMG,WAAWC;IAEjBC,UAAU;QACR,MAAMC,SAASV,UAAU,OAAO;QAChC,MAAMW,MAAMD,QAAQ,WAAW;QAC/B,IAAIA,UAAUC,KAAK;YACjBA,IAAI,SAAS,GAAG;YAChBA,IAAI,QAAQ,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;YAC9C,MAAME,WAAWD,IAAI,oBAAoB,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;YAC3EE,SAAS,YAAY,CAAC,GAAGb,cAAc,CAAC,EAAE;YAC1Ca,SAAS,YAAY,CAAC,KAAKb,cAAc,CAAC,EAAE;YAC5Ca,SAAS,YAAY,CAAC,GAAGb,cAAc,CAAC,EAAE;YAC1CY,IAAI,SAAS,GAAGC;YAChBD,IAAI,QAAQ,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;QAChD;IACF,GAAG;QAACX;KAAe;IAEnBU,UAAU;QACR,MAAMI,0BAA0B,CAACC;YAC/B,IAAI,CAACZ,cAAc;YACnBa,QAAQD,MAAM,OAAO,EAAEA,MAAM,OAAO;QACtC;QAEA,MAAME,0BAA0B,CAACF;YAC/B,IAAI,CAACZ,cAAc;YACnB,MAAM,CAACe,MAAM,GAAGH,MAAM,OAAO;YAC7B,IAAI,CAACG,OAAO;YACZF,QAAQE,MAAM,OAAO,EAAEA,MAAM,OAAO;QACtC;QAEA,MAAMC,wBAAwB;YAC5Bf,gBAAgB;YAChBgB;QACF;QAEA,MAAMC,yBAAyB;YAC7BjB,gBAAgB;YAChBgB;QACF;QAEAE,SAAS,gBAAgB,CAAC,aAAaR;QACvCQ,SAAS,gBAAgB,CAAC,aAAaR;QACvCQ,SAAS,gBAAgB,CAAC,cAAcL;QACxCK,SAAS,gBAAgB,CAAC,aAAaL;QACvCK,SAAS,gBAAgB,CAAC,WAAWH;QACrCG,SAAS,gBAAgB,CAAC,YAAYD;QACtCC,SAAS,gBAAgB,CAAC,eAAeD;QAEzC,OAAO;YACLC,SAAS,mBAAmB,CAAC,aAAaR;YAC1CQ,SAAS,mBAAmB,CAAC,aAAaR;YAC1CQ,SAAS,mBAAmB,CAAC,cAAcL;YAC3CK,SAAS,mBAAmB,CAAC,aAAaL;YAC1CK,SAAS,mBAAmB,CAAC,WAAWH;YACxCG,SAAS,mBAAmB,CAAC,YAAYD;YACzCC,SAAS,mBAAmB,CAAC,eAAeD;QAC9C;IACF,GAAG;QAAClB;KAAa;IAEjB,MAAMoB,kBAAkB,IAAMnB,gBAAgB;IAE9C,MAAMoB,mBAAmB,IAAMpB,gBAAgB;IAE/C,MAAMY,UAAU,CAACS,SAAiBC;QAChC,MAAMf,SAASV,UAAU,OAAO;QAChC,MAAMW,MAAMD,QAAQ,WAAW;QAC/B,IAAIA,UAAUC,KAAK;YACjB,MAAMe,OAAOhB,OAAO,qBAAqB;YACzC,MAAMiB,IAAIH,UAAUE,KAAK,IAAI,GAAG;YAChC,MAAME,IAAIH,UAAUC,KAAK,GAAG,GAAG;YAC/Bf,IAAI,wBAAwB,GAAG;YAC/BA,IAAI,SAAS;YACbA,IAAI,GAAG,CAACgB,GAAGC,GAAG,IAAI,GAAGC,IAAAA,KAAK,EAAE;YAC5BlB,IAAI,IAAI;QACV;IACF;IAEA,MAAMmB,iBAAiB;QACrB,MAAMvB,SAAS,KAAK,CAAC;YACnB,OAAO;gBAAC;gBAAG;gBAAK;aAAE;YAClB,QAAQ;gBAAC;gBAAG;gBAAI;gBAAK;gBAAI;gBAAK;aAAE;YAChC,YAAY;gBAAC,UAAU;YAAG;QAC5B;QAGA,IAAIX,YACFA;IAEJ;IAEA,MAAMuB,kBAAkB;QACtB,IAAId,YAAY;QAEhB,MAAMK,SAASV,UAAU,OAAO;QAChC,MAAMW,MAAMD,QAAQ,WAAW;QAC/B,IAAIA,UAAUC,KAAK;YACjB,MAAMoB,YAAYpB,IAAI,YAAY,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;YACpE,MAAMsB,SAASD,UAAU,IAAI;YAC7B,MAAME,cAAcD,OAAO,MAAM,GAAG;YACpC,IAAIE,cAAc;YAElB,IAAK,IAAIC,IAAI,GAAGA,IAAIH,OAAO,MAAM,EAAEG,KAAK,EACtC,IAAIH,MAAAA,MAAM,CAACG,EAAE,EAAQD;YAGvB,MAAME,aAAcF,cAAcD,cAAe;YAEjD,IAAIG,cAAczC,sBAAsB;gBACtCW,cAAc;gBACdK,IAAI,SAAS,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;gBAC/CoB;YACF;QACF;IACF;IAEA,OAAO,WAAP,GACE,KAACO,OAAO,GAAG;QACT,WAAWC,GAAG,wBAAwBxC;QACtC,OAAO;YACLL;YACAC;YACA,QACE;QACJ;QACA,SAASa;;0BACT,IAAC;gBACC,KAAKP;gBACL,OAAOP;gBACP,QAAQC;gBACR,WAAU;gBACV,aAAa4B;gBACb,cAAcC;;YACf1B;;;AAGP"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
-
|
|
4
|
-
declare
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export { ScrollArea, ScrollBar };
|
|
6
6
|
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,UAAU,+JAYd,CAAC;AAGH,QAAA,MAAM,SAAS,wKAgBb,CAAC;AAGH,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,CAAC"}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Corner, Root, ScrollAreaScrollbar, ScrollAreaThumb, Viewport } from "@radix-ui/react-scroll-area";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: cn("relative", className),
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const ScrollArea = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Root, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: cn("relative overflow-hidden", className),
|
|
10
9
|
...props,
|
|
11
10
|
children: [
|
|
12
11
|
/*#__PURE__*/ jsx(Viewport, {
|
|
13
|
-
|
|
14
|
-
className: "focus-visible:ring-neutral-950/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 dark:focus-visible:ring-neutral-300/50",
|
|
12
|
+
className: "h-full w-full rounded-[inherit]",
|
|
15
13
|
children: children
|
|
16
14
|
}),
|
|
17
15
|
/*#__PURE__*/ jsx(ScrollBar, {}),
|
|
18
16
|
/*#__PURE__*/ jsx(Corner, {})
|
|
19
17
|
]
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"data-slot": "scroll-area-scrollbar",
|
|
18
|
+
}));
|
|
19
|
+
ScrollArea.displayName = Root.displayName;
|
|
20
|
+
const ScrollBar = /*#__PURE__*/ forwardRef(({ className, orientation = "vertical", ...props }, ref)=>/*#__PURE__*/ jsx(ScrollAreaScrollbar, {
|
|
21
|
+
ref: ref,
|
|
25
22
|
orientation: orientation,
|
|
26
|
-
className: cn("flex touch-none
|
|
23
|
+
className: cn("flex touch-none transition-colors select-none", "vertical" === orientation && "h-full w-2.5 border-l border-l-transparent p-[1px]", "horizontal" === orientation && "h-2.5 flex-col border-t border-t-transparent p-[1px]", className),
|
|
27
24
|
...props,
|
|
28
25
|
children: /*#__PURE__*/ jsx(ScrollAreaThumb, {
|
|
29
|
-
|
|
30
|
-
className: "bg-neutral-200 relative flex-1 rounded-full dark:bg-neutral-800"
|
|
26
|
+
className: "relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800"
|
|
31
27
|
})
|
|
32
|
-
});
|
|
33
|
-
|
|
28
|
+
}));
|
|
29
|
+
ScrollBar.displayName = ScrollAreaScrollbar.displayName;
|
|
34
30
|
export { ScrollArea, ScrollBar };
|
|
35
31
|
|
|
36
32
|
//# sourceMappingURL=scroll-area.js.map
|