@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,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { type HTMLMotionProps, type Transition } from "motion/react";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
type FlipDirection = "top" | "bottom" | "left" | "righ";
|
|
4
4
|
interface FlipButtonProps extends HTMLMotionProps<"button"> {
|
|
5
5
|
frontText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flip-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/flip-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"flip-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/flip-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,eAAe,EAAE,KAAK,UAAU,EAAuB,MAAM,cAAc,CAAC;AACzF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,UAAU,eAAgB,SAAQ,eAAe,CAAC,QAAQ,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAID,QAAA,MAAM,UAAU,wGAgEf,CAAC;AAIF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const defaultSpanClassName = "absolute inset-0 flex items-center justify-center rounded-lg";
|
|
7
7
|
const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition = {
|
|
8
8
|
type: "spring",
|
|
@@ -38,7 +38,7 @@ const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition =
|
|
|
38
38
|
whileTap: {
|
|
39
39
|
scale: 0.95
|
|
40
40
|
},
|
|
41
|
-
className: cn("relative inline-block h-10 px-4 py-2 text-sm font-medium
|
|
41
|
+
className: cn("relative inline-block h-10 cursor-pointer px-4 py-2 text-sm font-medium perspective-[1000px] focus:outline-none", className),
|
|
42
42
|
...props,
|
|
43
43
|
children: [
|
|
44
44
|
/*#__PURE__*/ jsx(motion.span, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\flip-button.js","sources":["webpack://@arolariu/components/./src/components/ui/flip-button.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\flip-button.js","sources":["webpack://@arolariu/components/./src/components/ui/flip-button.tsx"],"sourcesContent":["\r\n\r\nimport {type HTMLMotionProps, type Transition, type Variant, motion} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ntype FlipDirection = \"top\" | \"bottom\" | \"left\" | \"righ\";\r\n\r\ninterface FlipButtonProps extends HTMLMotionProps<\"button\"> {\r\n frontText: string;\r\n backText: string;\r\n transition?: Transition;\r\n frontClassName?: string;\r\n backClassName?: string;\r\n from?: FlipDirection;\r\n}\r\n\r\nconst defaultSpanClassName = \"absolute inset-0 flex items-center justify-center rounded-lg\";\r\n\r\nconst FlipButton = React.forwardRef<HTMLButtonElement, FlipButtonProps>(\r\n (\r\n {\r\n frontText,\r\n backText,\r\n transition = {type: \"spring\", stiffness: 280, damping: 20},\r\n className,\r\n frontClassName,\r\n backClassName,\r\n from = \"top\",\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const isVertical = from === \"top\" || from === \"bottom\";\r\n const rotateAxis = isVertical ? \"rotateX\" : \"rotateY\";\r\n\r\n const frontOffset = from === \"top\" || from === \"left\" ? \"50%\" : \"-50%\";\r\n const backOffset = from === \"top\" || from === \"left\" ? \"-50%\" : \"50%\";\r\n\r\n const buildVariant = (opacity: number, rotation: number, offset: string | null = null): Variant => ({\r\n opacity,\r\n [rotateAxis]: rotation,\r\n ...(isVertical && offset !== null ? {y: offset} : {}),\r\n ...(!isVertical && offset !== null ? {x: offset} : {}),\r\n });\r\n\r\n const frontVariants = {\r\n initial: buildVariant(1, 0, \"0%\"),\r\n hover: buildVariant(0, 90, frontOffset),\r\n };\r\n\r\n const backVariants = {\r\n initial: buildVariant(0, 90, backOffset),\r\n hover: buildVariant(1, 0, \"0%\"),\r\n };\r\n\r\n return (\r\n <motion.button\r\n ref={ref}\r\n initial='initial'\r\n whileHover='hover'\r\n whileTap={{scale: 0.95}}\r\n className={cn(\r\n \"relative inline-block h-10 cursor-pointer px-4 py-2 text-sm font-medium perspective-[1000px] focus:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <motion.span\r\n variants={frontVariants}\r\n transition={transition}\r\n className={cn(defaultSpanClassName, \"bg-muted text-black dark:text-white\", frontClassName)}>\r\n {frontText}\r\n </motion.span>\r\n <motion.span\r\n variants={backVariants}\r\n transition={transition}\r\n className={cn(defaultSpanClassName, \"bg-primary text-primary-foreground\", backClassName)}>\r\n {backText}\r\n </motion.span>\r\n <span className='invisible'>{frontText}</span>\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nFlipButton.displayName = \"FlipButton\";\r\n\r\nexport {FlipButton, type FlipButtonProps, type FlipDirection};\r\n"],"names":["defaultSpanClassName","FlipButton","React","frontText","backText","transition","className","frontClassName","backClassName","from","props","ref","isVertical","rotateAxis","frontOffset","backOffset","buildVariant","opacity","rotation","offset","frontVariants","backVariants","motion","cn"],"mappings":";;;;;AAkBA,MAAMA,uBAAuB;AAE7B,MAAMC,aAAa,WAAbA,GAAaC,WACjB,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,aAAa;IAAC,MAAM;IAAU,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1DC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,OAAO,KAAK,EACZ,GAAGC,OACJ,EACDC;IAEA,MAAMC,aAAaH,UAAAA,QAAkBA,aAAAA;IACrC,MAAMI,aAAaD,aAAa,YAAY;IAE5C,MAAME,cAAcL,UAAAA,QAAkBA,WAAAA,OAAkB,QAAQ;IAChE,MAAMM,aAAaN,UAAAA,QAAkBA,WAAAA,OAAkB,SAAS;IAEhE,MAAMO,eAAe,CAACC,SAAiBC,UAAkBC,SAAwB,IAAI,GAAe;YAClGF;YACA,CAACJ,WAAW,EAAEK;YACd,GAAIN,cAAcO,SAAAA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;YACpD,GAAI,CAACP,cAAcO,SAAAA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;QACvD;IAEA,MAAMC,gBAAgB;QACpB,SAASJ,aAAa,GAAG,GAAG;QAC5B,OAAOA,aAAa,GAAG,IAAIF;IAC7B;IAEA,MAAMO,eAAe;QACnB,SAASL,aAAa,GAAG,IAAID;QAC7B,OAAOC,aAAa,GAAG,GAAG;IAC5B;IAEA,OAAO,WAAP,GACE,KAACM,OAAO,MAAM;QACZ,KAAKX;QACL,SAAQ;QACR,YAAW;QACX,UAAU;YAAC,OAAO;QAAI;QACtB,WAAWY,GACT,mHACAjB;QAED,GAAGI,KAAK;;0BACT,IAACY,OAAO,IAAI;gBACV,UAAUF;gBACV,YAAYf;gBACZ,WAAWkB,GAAGvB,sBAAsB,uCAAuCO;0BAC1EJ;;0BAEH,IAACmB,OAAO,IAAI;gBACV,UAAUD;gBACV,YAAYhB;gBACZ,WAAWkB,GAAGvB,sBAAsB,sCAAsCQ;0BACzEJ;;0BAEH,IAAC;gBAAK,WAAU;0BAAaD;;;;AAGnC;AAGFF,WAAW,WAAW,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import
|
|
2
|
+
import * as React from "react";
|
|
4
3
|
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
5
4
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
5
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,10 +15,10 @@ declare const useFormField: () => {
|
|
|
16
15
|
formDescriptionId: string;
|
|
17
16
|
formMessageId: string;
|
|
18
17
|
};
|
|
19
|
-
declare
|
|
20
|
-
declare
|
|
21
|
-
declare
|
|
22
|
-
declare
|
|
23
|
-
declare
|
|
24
|
-
export {
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
25
24
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2C,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAKjI,QAAA,MAAM,IAAI,4MAAe,CAAC;AAW1B,QAAA,MAAM,SAAS,GAAI,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,cAEjI,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAQF,QAAA,MAAM,QAAQ,6GAYZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAYf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAWnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAmBhB,CAAC;AAGF,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext, useId } from "react";
|
|
4
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { createContext, forwardRef, useContext, useId } from "react";
|
|
5
|
+
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
7
6
|
import { Label } from "./label.js";
|
|
7
|
+
import { cn } from "../../lib/utilities.js";
|
|
8
8
|
const Form = FormProvider;
|
|
9
9
|
const FormFieldContext = /*#__PURE__*/ createContext({});
|
|
10
10
|
const FormField = ({ ...props })=>/*#__PURE__*/ jsx(FormFieldContext.Provider, {
|
|
@@ -18,10 +18,7 @@ const FormField = ({ ...props })=>/*#__PURE__*/ jsx(FormFieldContext.Provider, {
|
|
|
18
18
|
const useFormField = ()=>{
|
|
19
19
|
const fieldContext = useContext(FormFieldContext);
|
|
20
20
|
const itemContext = useContext(FormItemContext);
|
|
21
|
-
const { getFieldState } = useFormContext();
|
|
22
|
-
const formState = useFormState({
|
|
23
|
-
name: fieldContext.name
|
|
24
|
-
});
|
|
21
|
+
const { getFieldState, formState } = useFormContext();
|
|
25
22
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
26
23
|
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
27
24
|
const { id } = itemContext;
|
|
@@ -35,60 +32,64 @@ const useFormField = ()=>{
|
|
|
35
32
|
};
|
|
36
33
|
};
|
|
37
34
|
const FormItemContext = /*#__PURE__*/ createContext({});
|
|
38
|
-
|
|
35
|
+
const FormItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
39
36
|
const id = useId();
|
|
40
37
|
return /*#__PURE__*/ jsx(FormItemContext.Provider, {
|
|
41
38
|
value: {
|
|
42
39
|
id
|
|
43
40
|
},
|
|
44
41
|
children: /*#__PURE__*/ jsx("div", {
|
|
45
|
-
|
|
46
|
-
className: cn("
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: cn("space-y-2", className),
|
|
47
44
|
...props
|
|
48
45
|
})
|
|
49
46
|
});
|
|
50
|
-
}
|
|
51
|
-
|
|
47
|
+
});
|
|
48
|
+
FormItem.displayName = "FormItem";
|
|
49
|
+
const FormLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
52
50
|
const { error, formItemId } = useFormField();
|
|
53
51
|
return /*#__PURE__*/ jsx(Label, {
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
className: cn("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900", className),
|
|
52
|
+
ref: ref,
|
|
53
|
+
className: cn(error && "text-red-500 dark:text-red-900", className),
|
|
57
54
|
htmlFor: formItemId,
|
|
58
55
|
...props
|
|
59
56
|
});
|
|
60
|
-
}
|
|
61
|
-
|
|
57
|
+
});
|
|
58
|
+
FormLabel.displayName = "FormLabel";
|
|
59
|
+
const FormControl = /*#__PURE__*/ forwardRef(({ ...props }, ref)=>{
|
|
62
60
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
63
61
|
return /*#__PURE__*/ jsx(Slot, {
|
|
64
|
-
|
|
62
|
+
ref: ref,
|
|
65
63
|
id: formItemId,
|
|
66
64
|
"aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`,
|
|
67
65
|
"aria-invalid": !!error,
|
|
68
66
|
...props
|
|
69
67
|
});
|
|
70
|
-
}
|
|
71
|
-
|
|
68
|
+
});
|
|
69
|
+
FormControl.displayName = "FormControl";
|
|
70
|
+
const FormDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
72
71
|
const { formDescriptionId } = useFormField();
|
|
73
72
|
return /*#__PURE__*/ jsx("p", {
|
|
74
|
-
|
|
73
|
+
ref: ref,
|
|
75
74
|
id: formDescriptionId,
|
|
76
|
-
className: cn("text-neutral-500
|
|
75
|
+
className: cn("text-[0.8rem] text-neutral-500 dark:text-neutral-400", className),
|
|
77
76
|
...props
|
|
78
77
|
});
|
|
79
|
-
}
|
|
80
|
-
|
|
78
|
+
});
|
|
79
|
+
FormDescription.displayName = "FormDescription";
|
|
80
|
+
const FormMessage = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
81
81
|
const { error, formMessageId } = useFormField();
|
|
82
|
-
const body = error ? String(error?.message ?? "") :
|
|
82
|
+
const body = error ? String(error?.message ?? "") : children;
|
|
83
83
|
if (!body) return null;
|
|
84
84
|
return /*#__PURE__*/ jsx("p", {
|
|
85
|
-
|
|
85
|
+
ref: ref,
|
|
86
86
|
id: formMessageId,
|
|
87
|
-
className: cn("text-
|
|
87
|
+
className: cn("text-[0.8rem] font-medium text-red-500 dark:text-red-900", className),
|
|
88
88
|
...props,
|
|
89
89
|
children: body
|
|
90
90
|
});
|
|
91
|
-
}
|
|
91
|
+
});
|
|
92
|
+
FormMessage.displayName = "FormMessage";
|
|
92
93
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
93
94
|
|
|
94
95
|
//# sourceMappingURL=form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\form.js","sources":["webpack://@arolariu/components/./src/components/ui/form.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\form.js","sources":["webpack://@arolariu/components/./src/components/ui/form.tsx"],"sourcesContent":["\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport {Slot} from \"@radix-ui/react-slot\";\r\nimport * as React from \"react\";\r\nimport {Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues} from \"react-hook-form\";\r\n\r\nimport {Label} from \"@/components/ui/label\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Form = FormProvider;\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\r\n> = {\r\n name: TName;\r\n};\r\n\r\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\r\n\r\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\r\n ...props\r\n}: ControllerProps<TFieldValues, TName>) => {\r\n return (\r\n <FormFieldContext.Provider value={{name: props.name}}>\r\n <Controller {...props} />\r\n </FormFieldContext.Provider>\r\n );\r\n};\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext);\r\n const itemContext = React.useContext(FormItemContext);\r\n const {getFieldState, formState} = useFormContext();\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState);\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within <FormField>\");\r\n }\r\n\r\n const {id} = itemContext;\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n };\r\n};\r\n\r\ntype FormItemContextValue = {\r\n id: string;\r\n};\r\n\r\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\r\n\r\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const id = React.useId();\r\n\r\n return (\r\n <FormItemContext.Provider value={{id}}>\r\n <div\r\n ref={ref}\r\n className={cn(\"space-y-2\", className)}\r\n {...props}\r\n />\r\n </FormItemContext.Provider>\r\n );\r\n});\r\nFormItem.displayName = \"FormItem\";\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ElementRef<typeof LabelPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\r\n>(({className, ...props}, ref) => {\r\n const {error, formItemId} = useFormField();\r\n\r\n return (\r\n <Label\r\n ref={ref}\r\n className={cn(error && \"text-red-500 dark:text-red-900\", className)}\r\n htmlFor={formItemId}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormLabel.displayName = \"FormLabel\";\r\n\r\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {\r\n const {error, formItemId, formDescriptionId, formMessageId} = useFormField();\r\n\r\n return (\r\n <Slot\r\n ref={ref}\r\n id={formItemId}\r\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\r\n aria-invalid={!!error}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormControl.displayName = \"FormControl\";\r\n\r\nconst FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({className, ...props}, ref) => {\r\n const {formDescriptionId} = useFormField();\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formDescriptionId}\r\n className={cn(\"text-[0.8rem] text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormDescription.displayName = \"FormDescription\";\r\n\r\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, children, ...props}, ref) => {\r\n const {error, formMessageId} = useFormField();\r\n const body = error ? String(error?.message ?? \"\") : children;\r\n\r\n if (!body) {\r\n return null;\r\n }\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formMessageId}\r\n className={cn(\"text-[0.8rem] font-medium text-red-500 dark:text-red-900\", className)}\r\n {...props}>\r\n {body}\r\n </p>\r\n );\r\n },\r\n);\r\nFormMessage.displayName = \"FormMessage\";\r\n\r\nexport {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField};\r\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","Error","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","String"],"mappings":";;;;;;;AAUA,MAAMA,OAAOC;AASb,MAAMC,mBAAmB,WAAnBA,GAAmBC,cAA2C,CAAC;AAErE,MAAMC,YAAY,CAAkH,EAClI,GAAGC,OACkC,GAC9B,WAAP,GACE,IAACH,iBAAiB,QAAQ;QAAC,OAAO;YAAC,MAAMG,MAAM,IAAI;QAAA;kBACjD,kBAACC,YAAUA;YAAE,GAAGD,KAAK;;;AAK3B,MAAME,eAAe;IACnB,MAAMC,eAAeL,WAAiBD;IACtC,MAAMO,cAAcN,WAAiBO;IACrC,MAAM,EAACC,aAAa,EAAEC,SAAS,EAAC,GAAGC;IAEnC,MAAMC,aAAaH,cAAcH,aAAa,IAAI,EAAEI;IAEpD,IAAI,CAACJ,cACH,MAAM,IAAIO,MAAM;IAGlB,MAAM,EAACC,EAAE,EAAC,GAAGP;IAEb,OAAO;QACLO;QACA,MAAMR,aAAa,IAAI;QACvB,YAAY,GAAGQ,GAAG,UAAU,CAAC;QAC7B,mBAAmB,GAAGA,GAAG,sBAAsB,CAAC;QAChD,eAAe,GAAGA,GAAG,kBAAkB,CAAC;QACxC,GAAGF,UAAU;IACf;AACF;AAMA,MAAMJ,kBAAkB,WAAlBA,GAAkBP,cAA0C,CAAC;AAEnE,MAAMc,WAAW,WAAXA,GAAWd,WAAuE,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IAC9G,MAAMH,KAAKb;IAEX,OAAO,WAAP,GACE,IAACO,gBAAgB,QAAQ;QAAC,OAAO;YAACM;QAAE;kBAClC,kBAAC;YACC,KAAKG;YACL,WAAWC,GAAG,aAAaF;YAC1B,GAAGb,KAAK;;;AAIjB;AACAY,SAAS,WAAW,GAAG;AAEvB,MAAMI,YAAY,WAAZA,GAAYlB,WAGhB,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACxB,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAC,GAAGhB;IAE5B,OAAO,WAAP,GACE,IAACiB,OAAKA;QACJ,KAAKL;QACL,WAAWC,GAAGE,SAAS,kCAAkCJ;QACzD,SAASK;QACR,GAAGlB,KAAK;;AAGf;AACAgB,UAAU,WAAW,GAAG;AAExB,MAAMI,cAAc,WAAdA,GAActB,WAA6F,CAAC,EAAC,GAAGE,OAAM,EAAEc;IAC5H,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAEG,iBAAiB,EAAEC,aAAa,EAAC,GAAGpB;IAE9D,OAAO,WAAP,GACE,IAACqB,MAAIA;QACH,KAAKT;QACL,IAAII;QACJ,oBAAkB,QAAkC,GAAGG,kBAAkB,CAAC,EAAEC,eAAe,GAAhE,GAAGD,mBAAmB;QACjD,gBAAc,CAAC,CAACJ;QACf,GAAGjB,KAAK;;AAGf;AACAoB,YAAY,WAAW,GAAG;AAE1B,MAAMI,kBAAkB,WAAlBA,GAAkB1B,WAAmF,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACjI,MAAM,EAACO,iBAAiB,EAAC,GAAGnB;IAE5B,OAAO,WAAP,GACE,IAAC;QACC,KAAKY;QACL,IAAIO;QACJ,WAAWN,GAAG,wDAAwDF;QACrE,GAAGb,KAAK;;AAGf;AACAwB,gBAAgB,WAAW,GAAG;AAE9B,MAAMC,cAAc,WAAdA,GAAc3B,WAClB,CAAC,EAACe,SAAS,EAAEa,QAAQ,EAAE,GAAG1B,OAAM,EAAEc;IAChC,MAAM,EAACG,KAAK,EAAEK,aAAa,EAAC,GAAGpB;IAC/B,MAAMyB,OAAOV,QAAQW,OAAOX,OAAO,WAAW,MAAMS;IAEpD,IAAI,CAACC,MACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,KAAKb;QACL,IAAIQ;QACJ,WAAWP,GAAG,4DAA4DF;QACzE,GAAGb,KAAK;kBACR2B;;AAGP;AAEFF,YAAY,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAU,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,uBAAwB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,kBAAkB,6GAcvB,CAAC;AAIF,OAAO,EAAC,kBAAkB,EAAE,KAAK,uBAAuB,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const GradientBackground = /*#__PURE__*/ forwardRef(({ className, transition = {
|
|
7
7
|
duration: 15,
|
|
8
8
|
ease: "easeInOut",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\gradient-background.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-background.tsx"],"sourcesContent":["\n\nimport
|
|
1
|
+
{"version":3,"file":"components\\ui\\gradient-background.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-background.tsx"],"sourcesContent":["\r\n\r\nimport {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 GradientBackgroundProps extends HTMLMotionProps<\"div\"> {\r\n transition?: Transition;\r\n}\r\n\r\nconst GradientBackground = React.forwardRef<HTMLDivElement, GradientBackgroundProps>(\r\n ({className, transition = {duration: 15, ease: \"easeInOut\", repeat: Infinity}, ...props}, ref) => {\r\n return (\r\n <motion.div\r\n ref={ref}\r\n className={cn(\"size-full bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500 bg-[length:400%_400%]\", className)}\r\n animate={{\r\n backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"],\r\n }}\r\n transition={transition}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\nGradientBackground.displayName = \"GradientBackground\";\r\n\r\nexport {GradientBackground, type GradientBackgroundProps};\r\n"],"names":["GradientBackground","React","className","transition","Infinity","props","ref","motion","cn"],"mappings":";;;;;AAWA,MAAMA,qBAAqB,WAArBA,GAAqBC,WACzB,CAAC,EAACC,SAAS,EAAEC,aAAa;IAAC,UAAU;IAAI,MAAM;IAAa,QAAQC;AAAQ,CAAC,EAAE,GAAGC,OAAM,EAAEC,MACjF,WAAP,GACE,IAACC,OAAO,GAAG;QACT,KAAKD;QACL,WAAWE,GAAG,8FAA8FN;QAC5G,SAAS;YACP,oBAAoB;gBAAC;gBAAU;gBAAY;aAAS;QACtD;QACA,YAAYC;QACX,GAAGE,KAAK;;AAMjBL,mBAAmB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,2FA2CjB,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 } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)", neon = false, transition = {
|
|
7
7
|
duration: 50,
|
|
8
8
|
repeat: 1 / 0,
|
|
@@ -17,7 +17,7 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
|
|
|
17
17
|
...props,
|
|
18
18
|
children: [
|
|
19
19
|
/*#__PURE__*/ jsx(motion.span, {
|
|
20
|
-
className: "m-0
|
|
20
|
+
className: "m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent",
|
|
21
21
|
style: baseStyle,
|
|
22
22
|
initial: {
|
|
23
23
|
backgroundPosition: "0% 0%"
|
|
@@ -28,8 +28,8 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
|
|
|
28
28
|
transition: transition,
|
|
29
29
|
children: text
|
|
30
30
|
}),
|
|
31
|
-
neon && /*#__PURE__*/ jsx(motion.span, {
|
|
32
|
-
className: "
|
|
31
|
+
Boolean(neon) && /*#__PURE__*/ jsx(motion.span, {
|
|
32
|
+
className: "absolute top-0 left-0 m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent mix-blend-plus-lighter blur-[8px]",
|
|
33
33
|
style: baseStyle,
|
|
34
34
|
initial: {
|
|
35
35
|
backgroundPosition: "0% 0%"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\n\nimport
|
|
1
|
+
{"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n text: string;\r\n gradient?: string;\r\n neon?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst GradientText = React.forwardRef<HTMLSpanElement, GradientTextProps>(\r\n (\r\n {\r\n text,\r\n className,\r\n gradient = \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\",\r\n neon = false,\r\n transition = {duration: 50, repeat: Infinity, ease: \"linear\"},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const baseStyle: React.CSSProperties = {\r\n backgroundImage: gradient,\r\n };\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cn(\"relative inline-block\", className)}\r\n {...props}>\r\n <motion.span\r\n className='m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n\r\n {Boolean(neon) && (\r\n <motion.span\r\n className='absolute top-0 left-0 m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent mix-blend-plus-lighter blur-[8px]'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n )}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nGradientText.displayName = \"GradientText\";\r\n\r\nexport {GradientText, type GradientTextProps};\r\n"],"names":["GradientText","React","text","className","gradient","neon","transition","Infinity","props","ref","baseStyle","cn","motion","Boolean"],"mappings":";;;;;AAcA,MAAMA,eAAe,WAAfA,GAAeC,WACnB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,WAAW,yFAAyF,EACpGC,OAAO,KAAK,EACZC,aAAa;IAAC,UAAU;IAAI,QAAQC;IAAU,MAAM;AAAQ,CAAC,EAC7D,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAiC;QACrC,iBAAiBN;IACnB;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKK;QACL,WAAWE,GAAG,yBAAyBR;QACtC,GAAGK,KAAK;;0BACT,IAACI,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;YAGFW,QAAQR,SAAS,WAATA,GACP,IAACO,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;;;AAKX;AAGFF,aAAa,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,kBAAmB,SAAQ,eAAe,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID,QAAA,MAAM,aAAa,yGAiClB,CAAC;AAGF,OAAO,EAAC,aAAa,EAAE,KAAK,kBAAkB,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
4
3
|
import { motion, useInView } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const animation = {
|
|
7
7
|
backgroundSize: "100% 100%"
|
|
8
8
|
};
|
|
@@ -29,7 +29,7 @@ const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = fals
|
|
|
29
29
|
backgroundPosition: "left center",
|
|
30
30
|
display: "inline"
|
|
31
31
|
},
|
|
32
|
-
className: cn("relative inline-block
|
|
32
|
+
className: cn("relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500", className),
|
|
33
33
|
...props,
|
|
34
34
|
children: text
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, useInView, type HTMLMotionProps, type Transition, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface HighlightTextProps extends HTMLMotionProps<\"span\"> {\r\n text: string;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst animation = {backgroundSize: \"100% 100%\"};\r\n\r\nconst HighlightText = React.forwardRef<HTMLSpanElement, HighlightTextProps>(\r\n ({text, className, inView = false, inViewMargin = \"0px\", transition = {duration: 2, ease: \"easeInOut\"}, ...props}, ref) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const inViewResult = useInView(localRef, {\r\n once: true,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n return (\r\n <motion.span\r\n ref={localRef}\r\n initial={{\r\n backgroundSize: \"0% 100%\",\r\n }}\r\n animate={isInView ? animation : undefined}\r\n transition={transition}\r\n style={{\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundPosition: \"left center\",\r\n display: \"inline\",\r\n }}\r\n className={cn(\r\n `relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500`,\r\n className,\r\n )}\r\n {...props}>\r\n {text}\r\n </motion.span>\r\n );\r\n },\r\n);\r\nHighlightText.displayName = \"HighlightText\";\r\n\r\nexport {HighlightText, type HighlightTextProps};\r\n"],"names":["animation","HighlightText","React","text","className","inView","inViewMargin","transition","props","ref","localRef","inViewResult","useInView","isInView","motion","undefined","cn"],"mappings":";;;;;AAeA,MAAMA,YAAY;IAAC,gBAAgB;AAAW;AAE9C,MAAMC,gBAAgB,WAAhBA,GAAgBC,WACpB,CAAC,EAACC,IAAI,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAEC,eAAe,KAAK,EAAEC,aAAa;IAAC,UAAU;IAAG,MAAM;AAAW,CAAC,EAAE,GAAGC,OAAM,EAAEC;IACjH,MAAMC,WAAWR,OAA8B;IAC/CA,oBAA0BO,KAAK,IAAMC,SAAS,OAAO;IAErD,MAAMC,eAAeC,UAAUF,UAAU;QACvC,MAAM;QACN,QAAQJ;IACV;IACA,MAAMO,WAAW,CAACR,UAAUM;IAE5B,OAAO,WAAP,GACE,IAACG,OAAO,IAAI;QACV,KAAKJ;QACL,SAAS;YACP,gBAAgB;QAClB;QACA,SAASG,WAAWb,YAAYe;QAChC,YAAYR;QACZ,OAAO;YACL,kBAAkB;YAClB,oBAAoB;YACpB,SAAS;QACX;QACA,WAAWS,GACT,iIACAZ;QAED,GAAGI,KAAK;kBACRL;;AAGP;AAEFF,cAAc,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAKD,QAAA,MAAM,cAAc,+FAiTnB,CAAC;AAGF,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const linear = (p)=>p;
|
|
7
|
+
const easeInExpo = (p)=>0 === p ? 0 : 2 ** (10 * (p - 1));
|
|
6
8
|
const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numberOfLines = 50, numberOfDiscs = 50, particleRGBColor = [
|
|
7
9
|
255,
|
|
8
10
|
255,
|
|
@@ -30,8 +32,6 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
30
32
|
particleArea: {},
|
|
31
33
|
linesCanvas: null
|
|
32
34
|
});
|
|
33
|
-
const linear = (p)=>p;
|
|
34
|
-
const easeInExpo = (p)=>0 === p ? 0 : Math.pow(2, 10 * (p - 1));
|
|
35
35
|
const tweenValue = useCallback((start, end, p, ease = null)=>{
|
|
36
36
|
const delta = end - start;
|
|
37
37
|
const easeFn = "inExpo" === ease ? easeInExpo : linear;
|
|
@@ -100,7 +100,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
100
100
|
stateRef.current.discs.push(disc);
|
|
101
101
|
}
|
|
102
102
|
const clipPath = new Path2D();
|
|
103
|
-
const disc = stateRef.current.clip
|
|
103
|
+
const { disc } = stateRef.current.clip;
|
|
104
104
|
clipPath.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, 2 * Math.PI);
|
|
105
105
|
clipPath.rect(disc.x - disc.w, 0, 2 * disc.w, disc.y);
|
|
106
106
|
stateRef.current.clip.path = clipPath;
|
|
@@ -170,7 +170,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
170
170
|
const setParticles = useCallback(()=>{
|
|
171
171
|
const { width, height } = stateRef.current.rect;
|
|
172
172
|
stateRef.current.particles = [];
|
|
173
|
-
const disc = stateRef.current.clip
|
|
173
|
+
const { disc } = stateRef.current.clip;
|
|
174
174
|
stateRef.current.particleArea = {
|
|
175
175
|
sw: 0.5 * disc.w,
|
|
176
176
|
ew: 2 * disc.w,
|
|
@@ -297,16 +297,16 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
297
297
|
setParticles
|
|
298
298
|
]);
|
|
299
299
|
return /*#__PURE__*/ jsxs("div", {
|
|
300
|
-
className: cn("relative size-full overflow-hidden", 'before:
|
|
300
|
+
className: cn("relative size-full overflow-hidden", 'before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] before:[transform:translate3d(-50%,-50%,0)] before:content-[""] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)]', 'after:absolute after:top-1/2 after:left-1/2 after:z-[5] after:block after:size-full after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay after:content-[""] after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)]', className),
|
|
301
301
|
children: [
|
|
302
302
|
children,
|
|
303
303
|
/*#__PURE__*/ jsx("canvas", {
|
|
304
304
|
ref: canvasRef,
|
|
305
|
-
className: "absolute inset-0 block size-full dark:opacity-20
|
|
305
|
+
className: "absolute inset-0 block size-full opacity-10 dark:opacity-20",
|
|
306
306
|
...props
|
|
307
307
|
}),
|
|
308
308
|
/*#__PURE__*/ jsx(motion.div, {
|
|
309
|
-
className: cn("absolute top-[-71.5%] left-1/2 z-[3]
|
|
309
|
+
className: cn("absolute top-[-71.5%] left-1/2 z-[3] h-[140%] w-[30%] [transform:translate3d(-50%,0,0)] rounded-b-full [background-size:100%_200%] [background-position:0%_100%] opacity-75 mix-blend-plus-darker blur-3xl dark:mix-blend-plus-lighter", "[background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]"),
|
|
310
310
|
animate: {
|
|
311
311
|
backgroundPosition: "0% 300%"
|
|
312
312
|
},
|
|
@@ -317,11 +317,12 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
317
317
|
}
|
|
318
318
|
}),
|
|
319
319
|
/*#__PURE__*/ jsx("div", {
|
|
320
|
-
className: "absolute top-0 left-0 z-[7] size-full dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]
|
|
320
|
+
className: "absolute top-0 left-0 z-[7] size-full opacity-50 mix-blend-overlay dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]"
|
|
321
321
|
})
|
|
322
322
|
]
|
|
323
323
|
});
|
|
324
324
|
});
|
|
325
|
+
HoleBackground.displayName = "HoleBackground";
|
|
325
326
|
export { HoleBackground };
|
|
326
327
|
|
|
327
328
|
//# sourceMappingURL=hole-background.js.map
|