@zentauri-ui/zentauri-components 1.2.1 → 1.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/README.md +66 -38
- package/dist/accordion-base-qVomr7f_.d.mts +66 -0
- package/dist/accordion-base-qVomr7f_.d.ts +66 -0
- package/dist/avatar-base-s4dYg-24.d.mts +49 -0
- package/dist/avatar-base-s4dYg-24.d.ts +49 -0
- package/dist/card-base-CIGac8D_.d.mts +70 -0
- package/dist/card-base-CIGac8D_.d.ts +70 -0
- package/dist/chunk-2P3UU2J3.mjs +510 -0
- package/dist/chunk-2P3UU2J3.mjs.map +1 -0
- package/dist/chunk-2PQEXQVR.js +223 -0
- package/dist/chunk-2PQEXQVR.js.map +1 -0
- package/dist/chunk-3OR47XMY.js +273 -0
- package/dist/chunk-3OR47XMY.js.map +1 -0
- package/dist/chunk-4B7KGBQB.js +206 -0
- package/dist/chunk-4B7KGBQB.js.map +1 -0
- package/dist/chunk-5QB2KNZQ.js +148 -0
- package/dist/chunk-5QB2KNZQ.js.map +1 -0
- package/dist/chunk-6I7X5BF2.js +520 -0
- package/dist/chunk-6I7X5BF2.js.map +1 -0
- package/dist/chunk-7HL3A4YF.mjs +214 -0
- package/dist/chunk-7HL3A4YF.mjs.map +1 -0
- package/dist/chunk-AOEI4V3W.mjs +286 -0
- package/dist/chunk-AOEI4V3W.mjs.map +1 -0
- package/dist/chunk-BVXTOEBI.mjs +259 -0
- package/dist/chunk-BVXTOEBI.mjs.map +1 -0
- package/dist/chunk-C2FCPQTO.js +279 -0
- package/dist/chunk-C2FCPQTO.js.map +1 -0
- package/dist/chunk-E3DZNJAD.js +128 -0
- package/dist/chunk-E3DZNJAD.js.map +1 -0
- package/dist/chunk-FLILFCQE.mjs +197 -0
- package/dist/chunk-FLILFCQE.mjs.map +1 -0
- package/dist/chunk-IXDJ3IPG.mjs +315 -0
- package/dist/chunk-IXDJ3IPG.mjs.map +1 -0
- package/dist/chunk-JQ5TIJ4F.mjs +68 -0
- package/dist/chunk-JQ5TIJ4F.mjs.map +1 -0
- package/dist/chunk-LVUPECBT.mjs +217 -0
- package/dist/chunk-LVUPECBT.mjs.map +1 -0
- package/dist/chunk-N4NO3SYL.js +328 -0
- package/dist/chunk-N4NO3SYL.js.map +1 -0
- package/dist/chunk-OJ67PZ6N.js +175 -0
- package/dist/chunk-OJ67PZ6N.js.map +1 -0
- package/dist/chunk-P5HUBXUX.js +231 -0
- package/dist/chunk-P5HUBXUX.js.map +1 -0
- package/dist/chunk-PCK6LX3K.js +253 -0
- package/dist/chunk-PCK6LX3K.js.map +1 -0
- package/dist/chunk-PGH27VTL.mjs +316 -0
- package/dist/chunk-PGH27VTL.mjs.map +1 -0
- package/dist/chunk-QZKMFSH5.js +288 -0
- package/dist/chunk-QZKMFSH5.js.map +1 -0
- package/dist/chunk-RDSPHBHK.mjs +221 -0
- package/dist/chunk-RDSPHBHK.mjs.map +1 -0
- package/dist/{chunk-P6YRSEOY.js → chunk-U4YQCAXW.js} +2 -23
- package/dist/chunk-U4YQCAXW.js.map +1 -0
- package/dist/chunk-UBFKTC2P.mjs +268 -0
- package/dist/chunk-UBFKTC2P.mjs.map +1 -0
- package/dist/chunk-UOFTZKMM.js +229 -0
- package/dist/chunk-UOFTZKMM.js.map +1 -0
- package/dist/chunk-UXGHUBNJ.mjs +240 -0
- package/dist/chunk-UXGHUBNJ.mjs.map +1 -0
- package/dist/chunk-W6PRMYUC.mjs +169 -0
- package/dist/chunk-W6PRMYUC.mjs.map +1 -0
- package/dist/chunk-WDCIZHXY.mjs +139 -0
- package/dist/chunk-WDCIZHXY.mjs.map +1 -0
- package/dist/chunk-WZKGRU3U.js +182 -0
- package/dist/chunk-WZKGRU3U.js.map +1 -0
- package/dist/chunk-X22LLJL6.js +71 -0
- package/dist/chunk-X22LLJL6.js.map +1 -0
- package/dist/{chunk-UJ3AER3U.mjs → chunk-XIXF7UVM.mjs} +3 -23
- package/dist/chunk-XIXF7UVM.mjs.map +1 -0
- package/dist/chunk-XLAFQ24R.js +328 -0
- package/dist/chunk-XLAFQ24R.js.map +1 -0
- package/dist/chunk-XWM2S6VV.mjs +124 -0
- package/dist/chunk-XWM2S6VV.mjs.map +1 -0
- package/dist/chunk-YNCD6TKE.mjs +175 -0
- package/dist/chunk-YNCD6TKE.mjs.map +1 -0
- package/dist/progress-base-Cm1JODYA.d.mts +66 -0
- package/dist/progress-base-Cm1JODYA.d.ts +66 -0
- package/dist/types-C7N9UvRm.d.mts +38 -0
- package/dist/types-C7N9UvRm.d.ts +38 -0
- package/dist/types-CFpwSbpK.d.mts +27 -0
- package/dist/types-CFpwSbpK.d.ts +27 -0
- package/dist/types-CK_vNRIb.d.mts +63 -0
- package/dist/types-CK_vNRIb.d.ts +63 -0
- package/dist/types-Ca3t5aC_.d.mts +31 -0
- package/dist/types-Ca3t5aC_.d.ts +31 -0
- package/dist/types-Cn7IcgkH.d.mts +32 -0
- package/dist/types-Cn7IcgkH.d.ts +32 -0
- package/dist/{types-BQ2H3yG7.d.mts → types-CtFK7mFE.d.mts} +1 -1
- package/dist/{types-BQ2H3yG7.d.ts → types-CtFK7mFE.d.ts} +1 -1
- package/dist/types-DMkTQsWg.d.mts +46 -0
- package/dist/types-DMkTQsWg.d.ts +46 -0
- package/dist/types-DN400jNg.d.mts +28 -0
- package/dist/types-DN400jNg.d.ts +28 -0
- package/dist/types-vcZcRc6w.d.mts +24 -0
- package/dist/types-vcZcRc6w.d.ts +24 -0
- package/dist/types-zHcMUtKK.d.mts +42 -0
- package/dist/types-zHcMUtKK.d.ts +42 -0
- package/dist/ui/accordion/animated.d.mts +24 -0
- package/dist/ui/accordion/animated.d.ts +24 -0
- package/dist/ui/accordion/animated.js +67 -0
- package/dist/ui/accordion/animated.js.map +1 -0
- package/dist/ui/accordion/animated.mjs +56 -0
- package/dist/ui/accordion/animated.mjs.map +1 -0
- package/dist/ui/accordion.d.mts +9 -65
- package/dist/ui/accordion.d.ts +9 -65
- package/dist/ui/accordion.js +32 -288
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/accordion.mjs +6 -281
- package/dist/ui/accordion.mjs.map +1 -1
- package/dist/ui/alert/animated.d.mts +7 -2
- package/dist/ui/alert/animated.d.ts +7 -2
- package/dist/ui/alert/animated.js +23 -3
- package/dist/ui/alert/animated.js.map +1 -1
- package/dist/ui/alert/animated.mjs +21 -2
- package/dist/ui/alert/animated.mjs.map +1 -1
- package/dist/ui/alert.d.mts +3 -8
- package/dist/ui/alert.d.ts +3 -8
- package/dist/ui/alert.js +10 -14
- package/dist/ui/alert.mjs +2 -2
- package/dist/ui/avatar/animated.d.mts +22 -0
- package/dist/ui/avatar/animated.d.ts +22 -0
- package/dist/ui/avatar/animated.js +51 -0
- package/dist/ui/avatar/animated.js.map +1 -0
- package/dist/ui/avatar/animated.mjs +37 -0
- package/dist/ui/avatar/animated.mjs.map +1 -0
- package/dist/ui/avatar.d.mts +7 -53
- package/dist/ui/avatar.d.ts +7 -53
- package/dist/ui/avatar.js +32 -210
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/avatar.mjs +7 -204
- package/dist/ui/avatar.mjs.map +1 -1
- package/dist/ui/badge/animated.d.mts +22 -0
- package/dist/ui/badge/animated.d.ts +22 -0
- package/dist/ui/badge/animated.js +50 -0
- package/dist/ui/badge/animated.js.map +1 -0
- package/dist/ui/badge/animated.mjs +47 -0
- package/dist/ui/badge/animated.mjs.map +1 -0
- package/dist/ui/badge.d.mts +6 -30
- package/dist/ui/badge.d.ts +6 -30
- package/dist/ui/badge.js +11 -142
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/badge.mjs +6 -141
- package/dist/ui/badge.mjs.map +1 -1
- package/dist/ui/buttons/animated.d.mts +27 -0
- package/dist/ui/buttons/animated.d.ts +27 -0
- package/dist/ui/buttons/animated.js +101 -0
- package/dist/ui/buttons/animated.js.map +1 -0
- package/dist/ui/buttons/animated.mjs +98 -0
- package/dist/ui/buttons/animated.mjs.map +1 -0
- package/dist/ui/buttons.d.mts +5 -13
- package/dist/ui/buttons.d.ts +5 -13
- package/dist/ui/buttons.js +7 -45
- package/dist/ui/buttons.js.map +1 -1
- package/dist/ui/buttons.mjs +8 -45
- package/dist/ui/buttons.mjs.map +1 -1
- package/dist/ui/card/animated.d.mts +23 -0
- package/dist/ui/card/animated.d.ts +23 -0
- package/dist/ui/card/animated.js +72 -0
- package/dist/ui/card/animated.js.map +1 -0
- package/dist/ui/card/animated.mjs +50 -0
- package/dist/ui/card/animated.mjs.map +1 -0
- package/dist/ui/card.d.mts +6 -70
- package/dist/ui/card.d.ts +6 -70
- package/dist/ui/card.js +43 -245
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/card.mjs +5 -235
- package/dist/ui/card.mjs.map +1 -1
- package/dist/ui/divider/animated.d.mts +19 -0
- package/dist/ui/divider/animated.d.ts +19 -0
- package/dist/ui/divider/animated.js +41 -0
- package/dist/ui/divider/animated.js.map +1 -0
- package/dist/ui/divider/animated.mjs +39 -0
- package/dist/ui/divider/animated.mjs.map +1 -0
- package/dist/ui/divider.d.mts +6 -32
- package/dist/ui/divider.d.ts +6 -32
- package/dist/ui/divider.js +19 -186
- package/dist/ui/divider.js.map +1 -1
- package/dist/ui/divider.mjs +6 -183
- package/dist/ui/divider.mjs.map +1 -1
- package/dist/ui/drawer/animated.d.mts +23 -0
- package/dist/ui/drawer/animated.d.ts +23 -0
- package/dist/ui/drawer/animated.js +143 -0
- package/dist/ui/drawer/animated.js.map +1 -0
- package/dist/ui/drawer/animated.mjs +113 -0
- package/dist/ui/drawer/animated.mjs.map +1 -0
- package/dist/ui/drawer.d.mts +10 -11
- package/dist/ui/drawer.d.ts +10 -11
- package/dist/ui/drawer.js +44 -357
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/drawer.mjs +3 -349
- package/dist/ui/drawer.mjs.map +1 -1
- package/dist/ui/empty-state/animated.d.mts +24 -0
- package/dist/ui/empty-state/animated.d.ts +24 -0
- package/dist/ui/empty-state/animated.js +45 -0
- package/dist/ui/empty-state/animated.js.map +1 -0
- package/dist/ui/empty-state/animated.mjs +42 -0
- package/dist/ui/empty-state/animated.mjs.map +1 -0
- package/dist/ui/empty-state.d.mts +11 -32
- package/dist/ui/empty-state.d.ts +11 -32
- package/dist/ui/empty-state.js +35 -160
- package/dist/ui/empty-state.js.map +1 -1
- package/dist/ui/empty-state.mjs +5 -153
- package/dist/ui/empty-state.mjs.map +1 -1
- package/dist/ui/inputs/animated.d.mts +27 -0
- package/dist/ui/inputs/animated.d.ts +27 -0
- package/dist/ui/inputs/animated.js +141 -0
- package/dist/ui/inputs/animated.js.map +1 -0
- package/dist/ui/inputs/animated.mjs +138 -0
- package/dist/ui/inputs/animated.mjs.map +1 -0
- package/dist/ui/inputs.d.mts +7 -21
- package/dist/ui/inputs.d.ts +7 -21
- package/dist/ui/inputs.js +16 -331
- package/dist/ui/inputs.js.map +1 -1
- package/dist/ui/inputs.mjs +13 -329
- package/dist/ui/inputs.mjs.map +1 -1
- package/dist/ui/modal/animated.d.mts +21 -0
- package/dist/ui/modal/animated.d.ts +21 -0
- package/dist/ui/modal/animated.js +120 -0
- package/dist/ui/modal/animated.js.map +1 -0
- package/dist/ui/modal/animated.mjs +117 -0
- package/dist/ui/modal/animated.mjs.map +1 -0
- package/dist/ui/modal.d.mts +10 -48
- package/dist/ui/modal.d.ts +10 -48
- package/dist/ui/modal.js +47 -361
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/modal.mjs +9 -351
- package/dist/ui/modal.mjs.map +1 -1
- package/dist/ui/progress/animated.d.mts +41 -0
- package/dist/ui/progress/animated.d.ts +41 -0
- package/dist/ui/progress/animated.js +123 -0
- package/dist/ui/progress/animated.js.map +1 -0
- package/dist/ui/progress/animated.mjs +112 -0
- package/dist/ui/progress/animated.mjs.map +1 -0
- package/dist/ui/progress.d.mts +10 -58
- package/dist/ui/progress.d.ts +10 -58
- package/dist/ui/progress.js +35 -227
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/progress.mjs +10 -222
- package/dist/ui/progress.mjs.map +1 -1
- package/dist/ui/skeleton/animated.d.mts +56 -0
- package/dist/ui/skeleton/animated.d.ts +56 -0
- package/dist/ui/skeleton/animated.js +126 -0
- package/dist/ui/skeleton/animated.js.map +1 -0
- package/dist/ui/skeleton/animated.mjs +119 -0
- package/dist/ui/skeleton/animated.mjs.map +1 -0
- package/dist/ui/skeleton.d.mts +16 -77
- package/dist/ui/skeleton.d.ts +16 -77
- package/dist/ui/skeleton.js +35 -526
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/skeleton.mjs +2 -520
- package/dist/ui/skeleton.mjs.map +1 -1
- package/dist/ui/{spinner.d.mts → spinner/animated.d.mts} +1 -6
- package/dist/ui/{spinner.d.ts → spinner/animated.d.ts} +1 -6
- package/dist/ui/{spinner.js → spinner/animated.js} +3 -9
- package/dist/ui/spinner/animated.js.map +1 -0
- package/dist/ui/{spinner.mjs → spinner/animated.mjs} +4 -9
- package/dist/ui/spinner/animated.mjs.map +1 -0
- package/dist/ui/table/animated.d.mts +21 -0
- package/dist/ui/table/animated.d.ts +21 -0
- package/dist/ui/table/animated.js +50 -0
- package/dist/ui/table/animated.js.map +1 -0
- package/dist/ui/table/animated.mjs +24 -0
- package/dist/ui/table/animated.mjs.map +1 -0
- package/dist/ui/table.d.mts +17 -11
- package/dist/ui/table.d.ts +17 -11
- package/dist/ui/table.js +55 -278
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/table.mjs +2 -269
- package/dist/ui/table.mjs.map +1 -1
- package/dist/ui/tabs/animated.d.mts +25 -0
- package/dist/ui/tabs/animated.d.ts +25 -0
- package/dist/ui/tabs/animated.js +83 -0
- package/dist/ui/tabs/animated.js.map +1 -0
- package/dist/ui/tabs/animated.mjs +79 -0
- package/dist/ui/tabs/animated.mjs.map +1 -0
- package/dist/ui/tabs.d.mts +7 -41
- package/dist/ui/tabs.d.ts +7 -41
- package/dist/ui/tabs.js +35 -261
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/tabs.mjs +2 -256
- package/dist/ui/tabs.mjs.map +1 -1
- package/dist/ui/toast/animated.d.mts +23 -0
- package/dist/ui/toast/animated.d.ts +23 -0
- package/dist/ui/toast/animated.js +103 -0
- package/dist/ui/toast/animated.js.map +1 -0
- package/dist/ui/toast/animated.mjs +99 -0
- package/dist/ui/toast/animated.mjs.map +1 -0
- package/dist/ui/toast.d.mts +7 -52
- package/dist/ui/toast.d.ts +7 -52
- package/dist/ui/toast.js +47 -268
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toast.mjs +2 -259
- package/dist/ui/toast.mjs.map +1 -1
- package/dist/ui/toggle/animated.d.mts +22 -0
- package/dist/ui/toggle/animated.d.ts +22 -0
- package/dist/ui/toggle/animated.js +88 -0
- package/dist/ui/toggle/animated.js.map +1 -0
- package/dist/ui/toggle/animated.mjs +85 -0
- package/dist/ui/toggle/animated.mjs.map +1 -0
- package/dist/ui/toggle.d.mts +6 -30
- package/dist/ui/toggle.d.ts +6 -30
- package/dist/ui/toggle.js +19 -83
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/toggle.mjs +12 -80
- package/dist/ui/toggle.mjs.map +1 -1
- package/dist/ui/tooltip/animated.d.mts +17 -0
- package/dist/ui/tooltip/animated.d.ts +17 -0
- package/dist/ui/tooltip/animated.js +59 -0
- package/dist/ui/tooltip/animated.js.map +1 -0
- package/dist/ui/tooltip/animated.mjs +56 -0
- package/dist/ui/tooltip/animated.mjs.map +1 -0
- package/dist/ui/tooltip.d.mts +6 -33
- package/dist/ui/tooltip.d.ts +6 -33
- package/dist/ui/tooltip.js +26 -193
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/tooltip.mjs +2 -192
- package/dist/ui/tooltip.mjs.map +1 -1
- package/dist/variants-CYODHI8b.d.mts +10 -0
- package/dist/variants-CYODHI8b.d.ts +10 -0
- package/package.json +1 -3
- package/dist/chunk-P6YRSEOY.js.map +0 -1
- package/dist/chunk-UJ3AER3U.mjs.map +0 -1
- package/dist/ui/spinner.js.map +0 -1
- package/dist/ui/spinner.mjs.map +0 -1
package/dist/ui/badge.js
CHANGED
|
@@ -1,154 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
var hi2 = require('react-icons/hi2');
|
|
7
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
4
|
+
var chunkE3DZNJAD_js = require('../chunk-E3DZNJAD.js');
|
|
5
|
+
require('../chunk-UOZYPWDZ.js');
|
|
8
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
7
|
|
|
10
|
-
// src/ui/badge/animations.ts
|
|
11
|
-
var badgeAnimationPresets = {
|
|
12
|
-
none: {},
|
|
13
|
-
pop: {
|
|
14
|
-
initial: { scale: 0.92, opacity: 0 },
|
|
15
|
-
animate: { scale: 1, opacity: 1 },
|
|
16
|
-
transition: { type: "spring", stiffness: 520, damping: 28 }
|
|
17
|
-
},
|
|
18
|
-
bounce: {
|
|
19
|
-
whileHover: { y: -2, scale: 1.04 },
|
|
20
|
-
whileTap: { scale: 0.96 },
|
|
21
|
-
transition: { type: "spring", bounce: 0.45, stiffness: 420, damping: 18 }
|
|
22
|
-
},
|
|
23
|
-
fade: {
|
|
24
|
-
initial: { opacity: 0 },
|
|
25
|
-
animate: { opacity: 1 },
|
|
26
|
-
transition: { duration: 0.2 }
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var buttonLikeSolidAppearances = {
|
|
30
|
-
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
|
|
31
|
-
secondary: "bg-slate-800 text-slate-50",
|
|
32
|
-
destructive: "bg-rose-600 text-white",
|
|
33
|
-
outline: "border border-white/10 bg-white/5 text-slate-50",
|
|
34
|
-
ghost: "bg-transparent text-slate-200",
|
|
35
|
-
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
|
|
36
|
-
emerald: "bg-emerald-600 text-white",
|
|
37
|
-
indigo: "bg-indigo-600 text-white",
|
|
38
|
-
purple: "bg-purple-600 text-white",
|
|
39
|
-
pink: "bg-pink-600 text-white",
|
|
40
|
-
rose: "bg-rose-600 text-white",
|
|
41
|
-
sky: "bg-sky-600 text-white",
|
|
42
|
-
teal: "bg-teal-600 text-white",
|
|
43
|
-
yellow: "bg-yellow-600 text-white",
|
|
44
|
-
orange: "bg-orange-600 text-white",
|
|
45
|
-
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
|
|
46
|
-
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
|
|
47
|
-
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
|
|
48
|
-
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white",
|
|
49
|
-
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
50
|
-
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
|
|
51
|
-
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
|
|
52
|
-
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
|
|
53
|
-
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
|
|
54
|
-
};
|
|
55
|
-
var badgeAppearances = {
|
|
56
|
-
...buttonLikeSolidAppearances,
|
|
57
|
-
outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
|
|
58
|
-
ghost: "bg-transparent text-slate-300 shadow-none"
|
|
59
|
-
};
|
|
60
|
-
var badgeVariants = classVarianceAuthority.cva(
|
|
61
|
-
[
|
|
62
|
-
"inline-flex max-w-full items-center justify-center gap-1 font-medium",
|
|
63
|
-
"whitespace-nowrap ring-offset-slate-950 transition-colors",
|
|
64
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
65
|
-
"select-none"
|
|
66
|
-
],
|
|
67
|
-
{
|
|
68
|
-
variants: {
|
|
69
|
-
appearance: badgeAppearances,
|
|
70
|
-
size: {
|
|
71
|
-
sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
|
|
72
|
-
md: "h-7 min-h-7 px-2.5 text-xs leading-none",
|
|
73
|
-
lg: "h-8 min-h-8 px-3 text-sm leading-none"
|
|
74
|
-
},
|
|
75
|
-
shape: {
|
|
76
|
-
pill: "rounded-full",
|
|
77
|
-
square: "rounded-md",
|
|
78
|
-
dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
defaultVariants: {
|
|
82
|
-
appearance: "default",
|
|
83
|
-
size: "md",
|
|
84
|
-
shape: "pill"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
var badgeCloseButtonVariants = classVarianceAuthority.cva(
|
|
89
|
-
"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
|
|
90
|
-
{
|
|
91
|
-
variants: {
|
|
92
|
-
size: {
|
|
93
|
-
sm: "size-4",
|
|
94
|
-
md: "size-5",
|
|
95
|
-
lg: "size-6"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
defaultVariants: { size: "md" }
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
8
|
function Badge(props) {
|
|
102
|
-
|
|
103
|
-
className,
|
|
104
|
-
appearance,
|
|
105
|
-
size,
|
|
106
|
-
shape,
|
|
107
|
-
animation = "none",
|
|
108
|
-
closable = false,
|
|
109
|
-
onClose,
|
|
110
|
-
closeLabel = "Remove",
|
|
111
|
-
children,
|
|
112
|
-
ref,
|
|
113
|
-
"aria-label": ariaLabel,
|
|
114
|
-
...rest
|
|
115
|
-
} = props;
|
|
116
|
-
const motionProps = badgeAnimationPresets[animation];
|
|
117
|
-
const isDot = shape === "dot";
|
|
118
|
-
const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
|
|
119
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
120
|
-
framerMotion.motion.span,
|
|
121
|
-
{
|
|
122
|
-
ref,
|
|
123
|
-
role: "status",
|
|
124
|
-
"data-slot": "badge",
|
|
125
|
-
"aria-label": resolvedAriaLabel,
|
|
126
|
-
className: chunkUOZYPWDZ_js.cn(badgeVariants({ appearance, size, shape }), className),
|
|
127
|
-
initial: animation === "none" ? false : void 0,
|
|
128
|
-
...motionProps,
|
|
129
|
-
...rest,
|
|
130
|
-
children: [
|
|
131
|
-
!isDot ? children : null,
|
|
132
|
-
closable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
-
"button",
|
|
134
|
-
{
|
|
135
|
-
type: "button",
|
|
136
|
-
"data-slot": "badge-close",
|
|
137
|
-
"aria-label": closeLabel,
|
|
138
|
-
onClick: onClose,
|
|
139
|
-
className: badgeCloseButtonVariants({ size }),
|
|
140
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiXMark, { className: "size-3.5", "aria-hidden": true })
|
|
141
|
-
}
|
|
142
|
-
) : null
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
);
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkE3DZNJAD_js.BadgeBase, { ...props });
|
|
146
10
|
}
|
|
147
11
|
Badge.displayName = "Badge";
|
|
148
12
|
|
|
13
|
+
Object.defineProperty(exports, "badgeCloseButtonVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkE3DZNJAD_js.badgeCloseButtonVariants; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "badgeVariants", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkE3DZNJAD_js.badgeVariants; }
|
|
20
|
+
});
|
|
149
21
|
exports.Badge = Badge;
|
|
150
|
-
exports.badgeAnimationPresets = badgeAnimationPresets;
|
|
151
|
-
exports.badgeCloseButtonVariants = badgeCloseButtonVariants;
|
|
152
|
-
exports.badgeVariants = badgeVariants;
|
|
153
22
|
//# sourceMappingURL=badge.js.map
|
|
154
23
|
//# sourceMappingURL=badge.js.map
|
package/dist/ui/badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/badge/
|
|
1
|
+
{"version":3,"sources":["../../src/ui/badge/badge.tsx"],"names":["jsx","BadgeBase"],"mappings":";;;;;;AAIO,SAAS,MAAM,KAAA,EAAmB;AACvC,EAAA,uBAAOA,cAAA,CAACC,0BAAA,EAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AAC/B;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"badge.js","sourcesContent":["// badge.tsx — default static entry (no framer-motion)\nimport { BadgeBase } from \"./badge-base\";\nimport type { BadgeProps } from \"./types\";\n\nexport function Badge(props: BadgeProps) {\n return <BadgeBase {...props} />;\n}\n\nBadge.displayName = \"Badge\";\n"]}
|
package/dist/ui/badge.mjs
CHANGED
|
@@ -1,149 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { BadgeBase } from '../chunk-XWM2S6VV.mjs';
|
|
3
|
+
export { badgeCloseButtonVariants, badgeVariants } from '../chunk-XWM2S6VV.mjs';
|
|
4
|
+
import '../chunk-DFEZH7TC.mjs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
|
-
// src/ui/badge/animations.ts
|
|
9
|
-
var badgeAnimationPresets = {
|
|
10
|
-
none: {},
|
|
11
|
-
pop: {
|
|
12
|
-
initial: { scale: 0.92, opacity: 0 },
|
|
13
|
-
animate: { scale: 1, opacity: 1 },
|
|
14
|
-
transition: { type: "spring", stiffness: 520, damping: 28 }
|
|
15
|
-
},
|
|
16
|
-
bounce: {
|
|
17
|
-
whileHover: { y: -2, scale: 1.04 },
|
|
18
|
-
whileTap: { scale: 0.96 },
|
|
19
|
-
transition: { type: "spring", bounce: 0.45, stiffness: 420, damping: 18 }
|
|
20
|
-
},
|
|
21
|
-
fade: {
|
|
22
|
-
initial: { opacity: 0 },
|
|
23
|
-
animate: { opacity: 1 },
|
|
24
|
-
transition: { duration: 0.2 }
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var buttonLikeSolidAppearances = {
|
|
28
|
-
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
|
|
29
|
-
secondary: "bg-slate-800 text-slate-50",
|
|
30
|
-
destructive: "bg-rose-600 text-white",
|
|
31
|
-
outline: "border border-white/10 bg-white/5 text-slate-50",
|
|
32
|
-
ghost: "bg-transparent text-slate-200",
|
|
33
|
-
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
|
|
34
|
-
emerald: "bg-emerald-600 text-white",
|
|
35
|
-
indigo: "bg-indigo-600 text-white",
|
|
36
|
-
purple: "bg-purple-600 text-white",
|
|
37
|
-
pink: "bg-pink-600 text-white",
|
|
38
|
-
rose: "bg-rose-600 text-white",
|
|
39
|
-
sky: "bg-sky-600 text-white",
|
|
40
|
-
teal: "bg-teal-600 text-white",
|
|
41
|
-
yellow: "bg-yellow-600 text-white",
|
|
42
|
-
orange: "bg-orange-600 text-white",
|
|
43
|
-
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
|
|
44
|
-
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
|
|
45
|
-
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
|
|
46
|
-
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white",
|
|
47
|
-
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
48
|
-
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
|
|
49
|
-
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
|
|
50
|
-
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
|
|
51
|
-
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
|
|
52
|
-
};
|
|
53
|
-
var badgeAppearances = {
|
|
54
|
-
...buttonLikeSolidAppearances,
|
|
55
|
-
outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
|
|
56
|
-
ghost: "bg-transparent text-slate-300 shadow-none"
|
|
57
|
-
};
|
|
58
|
-
var badgeVariants = cva(
|
|
59
|
-
[
|
|
60
|
-
"inline-flex max-w-full items-center justify-center gap-1 font-medium",
|
|
61
|
-
"whitespace-nowrap ring-offset-slate-950 transition-colors",
|
|
62
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
63
|
-
"select-none"
|
|
64
|
-
],
|
|
65
|
-
{
|
|
66
|
-
variants: {
|
|
67
|
-
appearance: badgeAppearances,
|
|
68
|
-
size: {
|
|
69
|
-
sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
|
|
70
|
-
md: "h-7 min-h-7 px-2.5 text-xs leading-none",
|
|
71
|
-
lg: "h-8 min-h-8 px-3 text-sm leading-none"
|
|
72
|
-
},
|
|
73
|
-
shape: {
|
|
74
|
-
pill: "rounded-full",
|
|
75
|
-
square: "rounded-md",
|
|
76
|
-
dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
defaultVariants: {
|
|
80
|
-
appearance: "default",
|
|
81
|
-
size: "md",
|
|
82
|
-
shape: "pill"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
var badgeCloseButtonVariants = cva(
|
|
87
|
-
"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
|
|
88
|
-
{
|
|
89
|
-
variants: {
|
|
90
|
-
size: {
|
|
91
|
-
sm: "size-4",
|
|
92
|
-
md: "size-5",
|
|
93
|
-
lg: "size-6"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
defaultVariants: { size: "md" }
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
7
|
function Badge(props) {
|
|
100
|
-
|
|
101
|
-
className,
|
|
102
|
-
appearance,
|
|
103
|
-
size,
|
|
104
|
-
shape,
|
|
105
|
-
animation = "none",
|
|
106
|
-
closable = false,
|
|
107
|
-
onClose,
|
|
108
|
-
closeLabel = "Remove",
|
|
109
|
-
children,
|
|
110
|
-
ref,
|
|
111
|
-
"aria-label": ariaLabel,
|
|
112
|
-
...rest
|
|
113
|
-
} = props;
|
|
114
|
-
const motionProps = badgeAnimationPresets[animation];
|
|
115
|
-
const isDot = shape === "dot";
|
|
116
|
-
const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
|
|
117
|
-
return /* @__PURE__ */ jsxs(
|
|
118
|
-
motion.span,
|
|
119
|
-
{
|
|
120
|
-
ref,
|
|
121
|
-
role: "status",
|
|
122
|
-
"data-slot": "badge",
|
|
123
|
-
"aria-label": resolvedAriaLabel,
|
|
124
|
-
className: cn(badgeVariants({ appearance, size, shape }), className),
|
|
125
|
-
initial: animation === "none" ? false : void 0,
|
|
126
|
-
...motionProps,
|
|
127
|
-
...rest,
|
|
128
|
-
children: [
|
|
129
|
-
!isDot ? children : null,
|
|
130
|
-
closable ? /* @__PURE__ */ jsx(
|
|
131
|
-
"button",
|
|
132
|
-
{
|
|
133
|
-
type: "button",
|
|
134
|
-
"data-slot": "badge-close",
|
|
135
|
-
"aria-label": closeLabel,
|
|
136
|
-
onClick: onClose,
|
|
137
|
-
className: badgeCloseButtonVariants({ size }),
|
|
138
|
-
children: /* @__PURE__ */ jsx(HiXMark, { className: "size-3.5", "aria-hidden": true })
|
|
139
|
-
}
|
|
140
|
-
) : null
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
8
|
+
return /* @__PURE__ */ jsx(BadgeBase, { ...props });
|
|
144
9
|
}
|
|
145
10
|
Badge.displayName = "Badge";
|
|
146
11
|
|
|
147
|
-
export { Badge
|
|
12
|
+
export { Badge };
|
|
148
13
|
//# sourceMappingURL=badge.mjs.map
|
|
149
14
|
//# sourceMappingURL=badge.mjs.map
|
package/dist/ui/badge.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/badge/
|
|
1
|
+
{"version":3,"sources":["../../src/ui/badge/badge.tsx"],"names":[],"mappings":";;;;;AAIO,SAAS,MAAM,KAAA,EAAmB;AACvC,EAAA,uBAAO,GAAA,CAAC,SAAA,EAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AAC/B;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"badge.mjs","sourcesContent":["// badge.tsx — default static entry (no framer-motion)\nimport { BadgeBase } from \"./badge-base\";\nimport type { BadgeProps } from \"./types\";\n\nexport function Badge(props: BadgeProps) {\n return <BadgeBase {...props} />;\n}\n\nBadge.displayName = \"Badge\";\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
4
|
+
import { b as buttonVariants } from '../../variants-Dd9pe-ov.mjs';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
8
|
+
type ButtonSharedAnimated = VariantProps<typeof buttonVariants> & {
|
|
9
|
+
animation?: ButtonAnimation;
|
|
10
|
+
};
|
|
11
|
+
type ButtonAnimatedProps = (ButtonSharedAnimated & HTMLMotionProps<"button"> & {
|
|
12
|
+
as?: "button";
|
|
13
|
+
}) | (ButtonSharedAnimated & HTMLMotionProps<"a"> & {
|
|
14
|
+
as: "link";
|
|
15
|
+
});
|
|
16
|
+
/** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
|
|
17
|
+
type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
|
|
18
|
+
type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
|
|
19
|
+
|
|
20
|
+
declare const ButtonAnimated: {
|
|
21
|
+
(props: ButtonAnimatedProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const buttonAnimationPresets: AnimationPresets;
|
|
26
|
+
|
|
27
|
+
export { type AnimationPresets, ButtonAnimated, type ButtonAnimatedProps, type ButtonAnimation, type ButtonPresetMotionProps, type ButtonSharedAnimated, buttonAnimationPresets };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
4
|
+
import { b as buttonVariants } from '../../variants-Dd9pe-ov.js';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
8
|
+
type ButtonSharedAnimated = VariantProps<typeof buttonVariants> & {
|
|
9
|
+
animation?: ButtonAnimation;
|
|
10
|
+
};
|
|
11
|
+
type ButtonAnimatedProps = (ButtonSharedAnimated & HTMLMotionProps<"button"> & {
|
|
12
|
+
as?: "button";
|
|
13
|
+
}) | (ButtonSharedAnimated & HTMLMotionProps<"a"> & {
|
|
14
|
+
as: "link";
|
|
15
|
+
});
|
|
16
|
+
/** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
|
|
17
|
+
type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
|
|
18
|
+
type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
|
|
19
|
+
|
|
20
|
+
declare const ButtonAnimated: {
|
|
21
|
+
(props: ButtonAnimatedProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const buttonAnimationPresets: AnimationPresets;
|
|
26
|
+
|
|
27
|
+
export { type AnimationPresets, ButtonAnimated, type ButtonAnimatedProps, type ButtonAnimation, type ButtonPresetMotionProps, type ButtonSharedAnimated, buttonAnimationPresets };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkBITDSQMR_js = require('../../chunk-BITDSQMR.js');
|
|
5
|
+
var chunkUOZYPWDZ_js = require('../../chunk-UOZYPWDZ.js');
|
|
6
|
+
var framerMotion = require('framer-motion');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
// src/ui/buttons/animated/animations.ts
|
|
10
|
+
var buttonAnimationPresets = {
|
|
11
|
+
none: {},
|
|
12
|
+
lift: {
|
|
13
|
+
whileHover: { y: -2, scale: 1.02 },
|
|
14
|
+
whileTap: { y: 0, scale: 0.98 },
|
|
15
|
+
transition: { type: "spring", stiffness: 420, damping: 28 }
|
|
16
|
+
},
|
|
17
|
+
press: {
|
|
18
|
+
whileTap: { scale: 0.96 },
|
|
19
|
+
transition: { type: "spring", stiffness: 520, damping: 30 }
|
|
20
|
+
},
|
|
21
|
+
glow: {
|
|
22
|
+
whileHover: {
|
|
23
|
+
boxShadow: "0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)",
|
|
24
|
+
scale: 1.01
|
|
25
|
+
},
|
|
26
|
+
whileTap: { scale: 0.98 },
|
|
27
|
+
transition: { duration: 0.2, ease: "easeOut" }
|
|
28
|
+
},
|
|
29
|
+
tilt: {
|
|
30
|
+
whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },
|
|
31
|
+
whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },
|
|
32
|
+
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
33
|
+
style: { transformStyle: "preserve-3d" }
|
|
34
|
+
},
|
|
35
|
+
bounce: {
|
|
36
|
+
whileHover: { y: -4, scale: 1.03 },
|
|
37
|
+
whileTap: { y: 0, scale: 0.97 },
|
|
38
|
+
transition: { type: "spring", bounce: 0.45, duration: 0.45 }
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var ButtonAnimated = (props) => {
|
|
42
|
+
if (props.as === "link") {
|
|
43
|
+
const {
|
|
44
|
+
className: className2,
|
|
45
|
+
appearance: appearance2,
|
|
46
|
+
size: size2,
|
|
47
|
+
children: children2,
|
|
48
|
+
ref: ref2,
|
|
49
|
+
href,
|
|
50
|
+
target,
|
|
51
|
+
animation: animation2 = "none",
|
|
52
|
+
...rest2
|
|
53
|
+
} = props;
|
|
54
|
+
const motionProps2 = buttonAnimationPresets[animation2];
|
|
55
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
+
framerMotion.motion.a,
|
|
57
|
+
{
|
|
58
|
+
ref: ref2,
|
|
59
|
+
href,
|
|
60
|
+
target,
|
|
61
|
+
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
62
|
+
"data-slot": "button",
|
|
63
|
+
className: chunkUOZYPWDZ_js.cn(chunkBITDSQMR_js.buttonVariants({ appearance: appearance2, size: size2 }), className2),
|
|
64
|
+
initial: false,
|
|
65
|
+
...motionProps2,
|
|
66
|
+
...rest2,
|
|
67
|
+
children: children2
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
const {
|
|
72
|
+
className,
|
|
73
|
+
appearance,
|
|
74
|
+
size,
|
|
75
|
+
type = "button",
|
|
76
|
+
children,
|
|
77
|
+
ref,
|
|
78
|
+
animation = "none",
|
|
79
|
+
...rest
|
|
80
|
+
} = props;
|
|
81
|
+
const motionProps = buttonAnimationPresets[animation];
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
framerMotion.motion.button,
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
type,
|
|
87
|
+
"data-slot": "button",
|
|
88
|
+
className: chunkUOZYPWDZ_js.cn(chunkBITDSQMR_js.buttonVariants({ appearance, size }), className),
|
|
89
|
+
initial: false,
|
|
90
|
+
...motionProps,
|
|
91
|
+
...rest,
|
|
92
|
+
children
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
ButtonAnimated.displayName = "ButtonAnimated";
|
|
97
|
+
|
|
98
|
+
exports.ButtonAnimated = ButtonAnimated;
|
|
99
|
+
exports.buttonAnimationPresets = buttonAnimationPresets;
|
|
100
|
+
//# sourceMappingURL=animated.js.map
|
|
101
|
+
//# sourceMappingURL=animated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/buttons/animated/animations.ts","../../../src/ui/buttons/animated/button-animated.tsx"],"names":["className","appearance","size","children","ref","animation","rest","motionProps","jsx","motion","cn","buttonVariants"],"mappings":";;;;;;;;AAEO,IAAM,sBAAA,GAA2C;AAAA,EACtD,MAAM,EAAC;AAAA,EACP,IAAA,EAAM;AAAA,IACJ,UAAA,EAAY,EAAE,CAAA,EAAG,EAAA,EAAI,OAAO,IAAA,EAAK;AAAA,IACjC,QAAA,EAAU,EAAE,CAAA,EAAG,CAAA,EAAG,OAAO,IAAA,EAAK;AAAA,IAC9B,YAAY,EAAE,IAAA,EAAM,UAAU,SAAA,EAAW,GAAA,EAAK,SAAS,EAAA;AAAG,GAC5D;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,EAAE,KAAA,EAAO,IAAA,EAAK;AAAA,IACxB,YAAY,EAAE,IAA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","file":"animated.js","sourcesContent":["import type { AnimationPresets } from \"./types\";\n\nexport const buttonAnimationPresets: AnimationPresets = {\n none: {},\n lift: {\n whileHover: { y: -2, scale: 1.02 },\n whileTap: { y: 0, scale: 0.98 },\n transition: { type: \"spring\", stiffness: 420, damping: 28 },\n },\n press: {\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", stiffness: 520, damping: 30 },\n },\n glow: {\n whileHover: {\n boxShadow:\n \"0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)\",\n scale: 1.01,\n },\n whileTap: { scale: 0.98 },\n transition: { duration: 0.2, ease: \"easeOut\" },\n },\n tilt: {\n whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },\n whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },\n transition: { type: \"spring\", stiffness: 300, damping: 20 },\n style: { transformStyle: \"preserve-3d\" },\n },\n bounce: {\n whileHover: { y: -4, scale: 1.03 },\n whileTap: { y: 0, scale: 0.97 },\n transition: { type: \"spring\", bounce: 0.45, duration: 0.45 },\n },\n};\n","\"use client\";\n\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../../lib/utils\";\n\nimport { buttonAnimationPresets } from \"./animations\";\nimport type { ButtonAnimatedProps } from \"./types\";\nimport { buttonVariants } from \"../variants\";\n\nexport const ButtonAnimated = (props: ButtonAnimatedProps) => {\n if (props.as === \"link\") {\n const {\n className,\n appearance,\n size,\n children,\n ref,\n href,\n target,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.a\n ref={ref}\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.a>\n );\n }\n\n const {\n className,\n appearance,\n size,\n type = \"button\",\n children,\n ref,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.button\n ref={ref}\n type={type}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.button>\n );\n};\n\nButtonAnimated.displayName = \"ButtonAnimated\";\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonVariants } from '../../chunk-BORK3BJO.mjs';
|
|
3
|
+
import { cn } from '../../chunk-DFEZH7TC.mjs';
|
|
4
|
+
import { motion } from 'framer-motion';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/ui/buttons/animated/animations.ts
|
|
8
|
+
var buttonAnimationPresets = {
|
|
9
|
+
none: {},
|
|
10
|
+
lift: {
|
|
11
|
+
whileHover: { y: -2, scale: 1.02 },
|
|
12
|
+
whileTap: { y: 0, scale: 0.98 },
|
|
13
|
+
transition: { type: "spring", stiffness: 420, damping: 28 }
|
|
14
|
+
},
|
|
15
|
+
press: {
|
|
16
|
+
whileTap: { scale: 0.96 },
|
|
17
|
+
transition: { type: "spring", stiffness: 520, damping: 30 }
|
|
18
|
+
},
|
|
19
|
+
glow: {
|
|
20
|
+
whileHover: {
|
|
21
|
+
boxShadow: "0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)",
|
|
22
|
+
scale: 1.01
|
|
23
|
+
},
|
|
24
|
+
whileTap: { scale: 0.98 },
|
|
25
|
+
transition: { duration: 0.2, ease: "easeOut" }
|
|
26
|
+
},
|
|
27
|
+
tilt: {
|
|
28
|
+
whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },
|
|
29
|
+
whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },
|
|
30
|
+
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
31
|
+
style: { transformStyle: "preserve-3d" }
|
|
32
|
+
},
|
|
33
|
+
bounce: {
|
|
34
|
+
whileHover: { y: -4, scale: 1.03 },
|
|
35
|
+
whileTap: { y: 0, scale: 0.97 },
|
|
36
|
+
transition: { type: "spring", bounce: 0.45, duration: 0.45 }
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var ButtonAnimated = (props) => {
|
|
40
|
+
if (props.as === "link") {
|
|
41
|
+
const {
|
|
42
|
+
className: className2,
|
|
43
|
+
appearance: appearance2,
|
|
44
|
+
size: size2,
|
|
45
|
+
children: children2,
|
|
46
|
+
ref: ref2,
|
|
47
|
+
href,
|
|
48
|
+
target,
|
|
49
|
+
animation: animation2 = "none",
|
|
50
|
+
...rest2
|
|
51
|
+
} = props;
|
|
52
|
+
const motionProps2 = buttonAnimationPresets[animation2];
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
motion.a,
|
|
55
|
+
{
|
|
56
|
+
ref: ref2,
|
|
57
|
+
href,
|
|
58
|
+
target,
|
|
59
|
+
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
60
|
+
"data-slot": "button",
|
|
61
|
+
className: cn(buttonVariants({ appearance: appearance2, size: size2 }), className2),
|
|
62
|
+
initial: false,
|
|
63
|
+
...motionProps2,
|
|
64
|
+
...rest2,
|
|
65
|
+
children: children2
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const {
|
|
70
|
+
className,
|
|
71
|
+
appearance,
|
|
72
|
+
size,
|
|
73
|
+
type = "button",
|
|
74
|
+
children,
|
|
75
|
+
ref,
|
|
76
|
+
animation = "none",
|
|
77
|
+
...rest
|
|
78
|
+
} = props;
|
|
79
|
+
const motionProps = buttonAnimationPresets[animation];
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
motion.button,
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
type,
|
|
85
|
+
"data-slot": "button",
|
|
86
|
+
className: cn(buttonVariants({ appearance, size }), className),
|
|
87
|
+
initial: false,
|
|
88
|
+
...motionProps,
|
|
89
|
+
...rest,
|
|
90
|
+
children
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
ButtonAnimated.displayName = "ButtonAnimated";
|
|
95
|
+
|
|
96
|
+
export { ButtonAnimated, buttonAnimationPresets };
|
|
97
|
+
//# sourceMappingURL=animated.mjs.map
|
|
98
|
+
//# sourceMappingURL=animated.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/buttons/animated/animations.ts","../../../src/ui/buttons/animated/button-animated.tsx"],"names":["className","appearance","size","children","ref","animation","rest","motionProps"],"mappings":";;;;;;AAEO,IAAM,sBAAA,GAA2C;AAAA,EACtD,MAAM,EAAC;AAAA,EACP,IAAA,EAAM;AAAA,IACJ,UAAA,EAAY,EAAE,CAAA,EAAG,EAAA,EAAI,OAAO,IAAA,EAAK;AAAA,IACjC,QAAA,EAAU,EAAE,CAAA,EAAG,CAAA,EAAG,OAAO,IAAA,EAAK;AAAA,IAC9B,YAAY,EAAE,IAAA,EAAM,UAAU,SAAA,EAAW,GAAA,EAAK,SAAS,EAAA;AAAG,GAC5D;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,EAAE,KAAA,EAAO,IAAA,EAAK;AAAA,IACxB,YAAY,EAAE,IAAA,EAAM,UAAU,SAAA,EAAW,GAAA,EAAK,SAAS,EAAA;AAAG,GAC5D;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,UAAA,EAAY;AAAA,MACV,SAAA,EACE,mEAAA;AAAA,MACF,KAAA,EAAO;AAAA,KACT;AAAA,IACA,QAAA,EAAU,EAAE,KAAA,EAAO,IAAA,EAAK;AAAA,IACxB,UAAA,EAAY,EAAE,QAAA,EAAU,GAAA,EAAK,MAAM,SAAA;AAAU,GAC/C;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,YAAY,EAAE,OAAA,EAAS,GAAG,OAAA,EAAS,EAAA,EAAI,OAAO,IAAA,EAAK;AAAA,IACnD,UAAU,EAAE,KAAA,EAAO,MAAM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UAAS,CAAA;AAAA,QAC7D,OAAA,EAAS,KAAA;AAAA,QACR,GAAGO,YAAAA;AAAA,QACH,GAAGD,KAAAA;AAAA,QAEH,QAAA,EAAAH;AAAA;AAAA,KACH;AAAA,EAEJ;AAEA,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA,GAAO,QAAA;AAAA,IACP,QAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA,GAAY,MAAA;AAAA,IACZ,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,WAAA,GAAc,uBAAuB,SAAS,CAAA;AAEpD,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA,CAAO,MAAA;AAAA,IAAP;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,YAAY,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MAC7D,OAAA,EAAS,KAAA;AAAA,MACR,GAAG,WAAA;AAAA,MACH,GAAG,IAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAEA,cAAA,CAAe,WAAA,GAAc,gBAAA","file":"animated.mjs","sourcesContent":["import type { AnimationPresets } from \"./types\";\n\nexport const buttonAnimationPresets: AnimationPresets = {\n none: {},\n lift: {\n whileHover: { y: -2, scale: 1.02 },\n whileTap: { y: 0, scale: 0.98 },\n transition: { type: \"spring\", stiffness: 420, damping: 28 },\n },\n press: {\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", stiffness: 520, damping: 30 },\n },\n glow: {\n whileHover: {\n boxShadow:\n \"0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)\",\n scale: 1.01,\n },\n whileTap: { scale: 0.98 },\n transition: { duration: 0.2, ease: \"easeOut\" },\n },\n tilt: {\n whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },\n whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },\n transition: { type: \"spring\", stiffness: 300, damping: 20 },\n style: { transformStyle: \"preserve-3d\" },\n },\n bounce: {\n whileHover: { y: -4, scale: 1.03 },\n whileTap: { y: 0, scale: 0.97 },\n transition: { type: \"spring\", bounce: 0.45, duration: 0.45 },\n },\n};\n","\"use client\";\n\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../../lib/utils\";\n\nimport { buttonAnimationPresets } from \"./animations\";\nimport type { ButtonAnimatedProps } from \"./types\";\nimport { buttonVariants } from \"../variants\";\n\nexport const ButtonAnimated = (props: ButtonAnimatedProps) => {\n if (props.as === \"link\") {\n const {\n className,\n appearance,\n size,\n children,\n ref,\n href,\n target,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.a\n ref={ref}\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.a>\n );\n }\n\n const {\n className,\n appearance,\n size,\n type = \"button\",\n children,\n ref,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.button\n ref={ref}\n type={type}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.button>\n );\n};\n\nButtonAnimated.displayName = \"ButtonAnimated\";\n"]}
|