@fxshelf/button-kit 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # @fxshelf/button-kit
2
+
3
+ [English](./README.md) · [中文](./README.zh-CN.md)
4
+
5
+ Animated button shelf for **React** and **Vue** — switch looks with a `variant` string. Zero Framer / GSAP.
6
+
7
+ Part of the [fxshelf](https://github.com/Luzhaotian/fxshelf) effect shelf — install independently.
8
+
9
+ | | |
10
+ |--|--|
11
+ | **Docs / Demo** | [luzhaotian.github.io/fxshelf](https://luzhaotian.github.io/fxshelf/docs/effects/button-kit) |
12
+ | **npm** | [`@fxshelf/button-kit@0.1.0`](https://www.npmjs.com/package/@fxshelf/button-kit) |
13
+ | **CDN** | [unpkg](https://unpkg.com/@fxshelf/button-kit/) · [jsDelivr](https://cdn.jsdelivr.net/npm/@fxshelf/button-kit/) |
14
+
15
+ Supports **npm**, **CDN `<script>`**, and **copy-as-source**. Details: site docs or [docs/使用说明.md](./docs/使用说明.md).
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ npm install @fxshelf/button-kit
21
+ ```
22
+
23
+ Import styles once:
24
+
25
+ ```ts
26
+ import '@fxshelf/button-kit/styles.css'
27
+ ```
28
+
29
+ | Consumer | Peer |
30
+ |----------|------|
31
+ | React | `react` / `react-dom` ≥ 18 |
32
+ | Vue | `vue` ≥ 3.3, with `.vue` compilation (e.g. Vite) |
33
+
34
+ ## Usage — React
35
+
36
+ ```tsx
37
+ import { Button } from '@fxshelf/button-kit'
38
+ import '@fxshelf/button-kit/styles.css'
39
+
40
+ export function Example() {
41
+ return <Button variant="glow">Continue</Button>
42
+ }
43
+ ```
44
+
45
+ ## Usage — Vue
46
+
47
+ Entry is source SFC: `@fxshelf/button-kit/vue`.
48
+
49
+ ```vue
50
+ <script setup lang="ts">
51
+ import { Button } from '@fxshelf/button-kit/vue'
52
+ import '@fxshelf/button-kit/styles.css'
53
+ </script>
54
+
55
+ <template>
56
+ <Button variant="neon">Continue</Button>
57
+ </template>
58
+ ```
59
+
60
+ ## Variants
61
+
62
+ | Value | Effect |
63
+ |-------|--------|
64
+ | `solid` | Solid dark |
65
+ | `outline` | Outline, fill on hover |
66
+ | `soft` | Soft light fill |
67
+ | `glow` | Breathing glow |
68
+ | `neon` | Neon outline |
69
+ | `shimmer` | Sweep light on hover |
70
+ | `chroma` | Chroma shift; edge glow on hover |
71
+ | `liquid` | Liquid rise fill |
72
+ | `wipe` | Diagonal wipe fill |
73
+ | `glass` | Frosted glass |
74
+
75
+ Unknown strings fall back to `solid`.
76
+
77
+ ## Usage — CDN (React 18 UMD)
78
+
79
+ Self-contained build `dist/button-kit.iife.js`, global `ButtonKit`. Full example: [docs/CDN示例.html](./docs/CDN示例.html).
80
+
81
+ ```html
82
+ <link rel="stylesheet" href="https://unpkg.com/@fxshelf/button-kit/dist/index.css" />
83
+
84
+ <script crossorigin src="https://unpkg.com/react@18.3.1/umd/react.production.min.js"></script>
85
+ <script crossorigin src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"></script>
86
+ <script src="https://unpkg.com/@fxshelf/button-kit/dist/button-kit.iife.js"></script>
87
+
88
+ <div id="app"></div>
89
+ <script>
90
+ ReactDOM.createRoot(document.getElementById('app')).render(
91
+ React.createElement(ButtonKit.Button, { variant: 'glow' }, 'Continue'),
92
+ )
93
+ </script>
94
+ ```
95
+
96
+ Pin the version in production, e.g. `@fxshelf/button-kit@0.1.0/...`.
97
+ Do not use jsDelivr GitHub `gh/.../dist` links (`dist/` is not committed).
98
+
99
+ ## Copy as source
100
+
101
+ Skip npm and copy from this package’s `src/` (or `node_modules/@fxshelf/button-kit/`):
102
+
103
+ ```
104
+ core/ # required (includes styles.css)
105
+ react/ # React projects
106
+ vue/ # Vue projects
107
+ ```
108
+
109
+ Keep `core` next to `react` / `vue`, then:
110
+
111
+ ```tsx
112
+ // React
113
+ import { Button } from './components/button-kit/react'
114
+ import './components/button-kit/core/styles.css'
115
+ ```
116
+
117
+ ```ts
118
+ // Vue
119
+ import { Button } from './components/button-kit/vue'
120
+ import './components/button-kit/core/styles.css'
121
+ ```
122
+
123
+ ## License
124
+
125
+ MIT
@@ -0,0 +1,125 @@
1
+ # @fxshelf/button-kit
2
+
3
+ [English](./README.md) · [中文](./README.zh-CN.md)
4
+
5
+ 面向 **React** / **Vue** 的按钮动效书架 —— 用 `variant` 字符串切换样式。零 Framer / GSAP 依赖。
6
+
7
+ 属于 [fxshelf](https://github.com/Luzhaotian/fxshelf) 动效书架中的一个可独立安装包。
8
+
9
+ | | |
10
+ |--|--|
11
+ | **文档 / Demo** | [luzhaotian.github.io/fxshelf](https://luzhaotian.github.io/fxshelf/docs/effects/button-kit) |
12
+ | **npm** | [`@fxshelf/button-kit@0.1.0`](https://www.npmjs.com/package/@fxshelf/button-kit) |
13
+ | **CDN** | [unpkg](https://unpkg.com/@fxshelf/button-kit/) · [jsDelivr](https://cdn.jsdelivr.net/npm/@fxshelf/button-kit/) |
14
+
15
+ 支持 **npm**、**CDN `<script>`**、**复制源码**。详细用法见站点文档或 [docs/使用说明.md](./docs/使用说明.md)。
16
+
17
+ ## 安装
18
+
19
+ ```bash
20
+ npm install @fxshelf/button-kit
21
+ ```
22
+
23
+ 记得引入样式:
24
+
25
+ ```ts
26
+ import '@fxshelf/button-kit/styles.css'
27
+ ```
28
+
29
+ | 使用方 | Peer |
30
+ |--------|------|
31
+ | React | `react` / `react-dom` ≥ 18 |
32
+ | Vue | `vue` ≥ 3.3,且能编译 `.vue`(如 Vite) |
33
+
34
+ ## 用法 — React
35
+
36
+ ```tsx
37
+ import { Button } from '@fxshelf/button-kit'
38
+ import '@fxshelf/button-kit/styles.css'
39
+
40
+ export function Example() {
41
+ return <Button variant="glow">继续</Button>
42
+ }
43
+ ```
44
+
45
+ ## 用法 — Vue
46
+
47
+ 入口为源码 SFC:`@fxshelf/button-kit/vue`。
48
+
49
+ ```vue
50
+ <script setup lang="ts">
51
+ import { Button } from '@fxshelf/button-kit/vue'
52
+ import '@fxshelf/button-kit/styles.css'
53
+ </script>
54
+
55
+ <template>
56
+ <Button variant="neon">继续</Button>
57
+ </template>
58
+ ```
59
+
60
+ ## variant
61
+
62
+ | 值 | 效果 |
63
+ |----|------|
64
+ | `solid` | 实心深色 |
65
+ | `outline` | 描边,悬停填实 |
66
+ | `soft` | 浅色软按钮 |
67
+ | `glow` | 呼吸光晕 |
68
+ | `neon` | 霓虹描边 |
69
+ | `shimmer` | 悬停扫光 |
70
+ | `chroma` | 炫彩流光;hover 贴边高斯光晕 |
71
+ | `liquid` | 底部液体升起填充 |
72
+ | `wipe` | 斜向擦除填充 |
73
+ | `glass` | 毛玻璃半透明 |
74
+
75
+ 未知字符串会回退到 `solid`。
76
+
77
+ ## 用法 — CDN(React 18 UMD)
78
+
79
+ 自包含产物 `dist/button-kit.iife.js`,全局 `ButtonKit`。完整示例:[docs/CDN示例.html](./docs/CDN示例.html)。
80
+
81
+ ```html
82
+ <link rel="stylesheet" href="https://unpkg.com/@fxshelf/button-kit/dist/index.css" />
83
+
84
+ <script crossorigin src="https://unpkg.com/react@18.3.1/umd/react.production.min.js"></script>
85
+ <script crossorigin src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"></script>
86
+ <script src="https://unpkg.com/@fxshelf/button-kit/dist/button-kit.iife.js"></script>
87
+
88
+ <div id="app"></div>
89
+ <script>
90
+ ReactDOM.createRoot(document.getElementById('app')).render(
91
+ React.createElement(ButtonKit.Button, { variant: 'glow' }, '继续'),
92
+ )
93
+ </script>
94
+ ```
95
+
96
+ 生产环境建议锁定版本,如 `@fxshelf/button-kit@0.1.0/...`。
97
+ 不要用 jsDelivr GitHub `gh/.../dist` 直链(`dist/` 不进 Git)。
98
+
99
+ ## 复制源码
100
+
101
+ 不经过 npm 时,从本包 `src/`(或 `node_modules/@fxshelf/button-kit/`)拷贝:
102
+
103
+ ```
104
+ core/ # 必拷(含 styles.css)
105
+ react/ # React 项目
106
+ vue/ # Vue 项目
107
+ ```
108
+
109
+ 保持 `core` 与 `react` / `vue` 同级,然后:
110
+
111
+ ```tsx
112
+ // React
113
+ import { Button } from './components/button-kit/react'
114
+ import './components/button-kit/core/styles.css'
115
+ ```
116
+
117
+ ```ts
118
+ // Vue
119
+ import { Button } from './components/button-kit/vue'
120
+ import './components/button-kit/core/styles.css'
121
+ ```
122
+
123
+ ## License
124
+
125
+ MIT
@@ -0,0 +1,273 @@
1
+ /* src/core/styles.css */
2
+ .fx-btn {
3
+ --fx-btn-fg: #0f0f12;
4
+ --fx-btn-bg: #f4f4f5;
5
+ --fx-btn-accent: #3b82f6;
6
+ --fx-btn-radius: 10px;
7
+ position: relative;
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ gap: 0.5rem;
12
+ padding: 0.7rem 1.25rem;
13
+ border: 1px solid transparent;
14
+ border-radius: var(--fx-btn-radius);
15
+ background: var(--fx-btn-bg);
16
+ color: var(--fx-btn-fg);
17
+ font: inherit;
18
+ font-size: 0.9375rem;
19
+ font-weight: 600;
20
+ line-height: 1.2;
21
+ letter-spacing: 0.01em;
22
+ text-decoration: none;
23
+ cursor: pointer;
24
+ user-select: none;
25
+ -webkit-tap-highlight-color: transparent;
26
+ isolation: isolate;
27
+ overflow: hidden;
28
+ transition:
29
+ transform 160ms ease,
30
+ box-shadow 200ms ease,
31
+ background-color 200ms ease,
32
+ border-color 200ms ease,
33
+ color 200ms ease;
34
+ }
35
+ .fx-btn:focus-visible {
36
+ outline: 2px solid var(--fx-btn-accent);
37
+ outline-offset: 3px;
38
+ }
39
+ .fx-btn:disabled {
40
+ opacity: 0.5;
41
+ cursor: not-allowed;
42
+ pointer-events: none;
43
+ }
44
+ .fx-btn:active:not(:disabled) {
45
+ transform: translateY(1px) scale(0.98);
46
+ }
47
+ .fx-btn--solid {
48
+ --fx-btn-fg: #fafafa;
49
+ --fx-btn-bg: #18181b;
50
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
51
+ }
52
+ .fx-btn--solid:hover:not(:disabled) {
53
+ background: #27272a;
54
+ }
55
+ .fx-btn--outline {
56
+ --fx-btn-fg: #18181b;
57
+ --fx-btn-bg: transparent;
58
+ border-color: #d4d4d8;
59
+ background: transparent;
60
+ }
61
+ .fx-btn--outline:hover:not(:disabled) {
62
+ border-color: #18181b;
63
+ background: #18181b;
64
+ color: #fafafa;
65
+ }
66
+ .fx-btn--soft {
67
+ --fx-btn-fg: #1d4ed8;
68
+ --fx-btn-bg: #dbeafe;
69
+ }
70
+ .fx-btn--soft:hover:not(:disabled) {
71
+ background: #bfdbfe;
72
+ transform: translateY(-1px);
73
+ }
74
+ .fx-btn--soft:active:not(:disabled) {
75
+ transform: translateY(0) scale(0.98);
76
+ }
77
+ .fx-btn--glow {
78
+ --fx-btn-fg: #f8fafc;
79
+ --fx-btn-bg: #2563eb;
80
+ box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45), 0 8px 24px rgba(37, 99, 235, 0.28);
81
+ animation: fx-btn-glow-pulse 2.4s ease-in-out infinite;
82
+ }
83
+ .fx-btn--glow:hover:not(:disabled) {
84
+ background: #1d4ed8;
85
+ box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18), 0 10px 28px rgba(37, 99, 235, 0.4);
86
+ animation: none;
87
+ }
88
+ @keyframes fx-btn-glow-pulse {
89
+ 0%, 100% {
90
+ box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4), 0 8px 24px rgba(37, 99, 235, 0.28);
91
+ }
92
+ 50% {
93
+ box-shadow: 0 0 0 8px rgba(37, 99, 235, 0), 0 10px 28px rgba(37, 99, 235, 0.35);
94
+ }
95
+ }
96
+ .fx-btn--neon {
97
+ --fx-btn-fg: #67e8f9;
98
+ --fx-btn-bg: #0b1220;
99
+ border-color: #22d3ee;
100
+ box-shadow:
101
+ 0 0 0 1px rgba(34, 211, 238, 0.25),
102
+ 0 0 18px rgba(34, 211, 238, 0.35),
103
+ inset 0 0 12px rgba(34, 211, 238, 0.08);
104
+ text-shadow: 0 0 10px rgba(103, 232, 249, 0.55);
105
+ }
106
+ .fx-btn--neon:hover:not(:disabled) {
107
+ color: #ecfeff;
108
+ border-color: #67e8f9;
109
+ box-shadow:
110
+ 0 0 0 1px rgba(103, 232, 249, 0.45),
111
+ 0 0 28px rgba(34, 211, 238, 0.55),
112
+ inset 0 0 16px rgba(34, 211, 238, 0.14);
113
+ }
114
+ .fx-btn--shimmer {
115
+ --fx-btn-fg: #fafafa;
116
+ --fx-btn-bg: #111827;
117
+ }
118
+ .fx-btn--shimmer::before {
119
+ content: "";
120
+ position: absolute;
121
+ inset: 0;
122
+ z-index: -1;
123
+ background:
124
+ linear-gradient(
125
+ 110deg,
126
+ transparent 30%,
127
+ rgba(255, 255, 255, 0.28) 48%,
128
+ transparent 66%);
129
+ transform: translateX(-120%);
130
+ transition: transform 0.55s ease;
131
+ }
132
+ .fx-btn--shimmer:hover:not(:disabled)::before {
133
+ transform: translateX(120%);
134
+ }
135
+ .fx-btn--shimmer:hover:not(:disabled) {
136
+ background: #1f2937;
137
+ }
138
+ .fx-btn--chroma {
139
+ --fx-btn-fg: #fff;
140
+ --fx-btn-radius: 999px;
141
+ z-index: 0;
142
+ overflow: visible;
143
+ isolation: auto;
144
+ border: none;
145
+ background:
146
+ linear-gradient(
147
+ to right,
148
+ #03a9f4,
149
+ #f441a5,
150
+ #ffeb3b,
151
+ #03a9f4);
152
+ background-size: 400%;
153
+ letter-spacing: 0.08em;
154
+ animation: fx-btn-chroma-shift 8s ease infinite;
155
+ }
156
+ .fx-btn--chroma::before {
157
+ content: "";
158
+ position: absolute;
159
+ inset: -4px;
160
+ z-index: -1;
161
+ border-radius: inherit;
162
+ background:
163
+ linear-gradient(
164
+ to right,
165
+ #03a9f4,
166
+ #f441a5,
167
+ #ffeb3b,
168
+ #03a9f4);
169
+ background-size: 400%;
170
+ filter: blur(0);
171
+ opacity: 0;
172
+ pointer-events: none;
173
+ transition: opacity 0.4s ease, filter 0.4s ease;
174
+ animation: fx-btn-chroma-shift 8s ease infinite;
175
+ }
176
+ .fx-btn--chroma:hover:not(:disabled)::before {
177
+ opacity: 1;
178
+ filter: blur(8px);
179
+ }
180
+ .fx-btn--chroma:active:not(:disabled) {
181
+ transform: translateY(1px) scale(0.98);
182
+ }
183
+ @keyframes fx-btn-chroma-shift {
184
+ 0% {
185
+ background-position: 0%;
186
+ }
187
+ 100% {
188
+ background-position: 400%;
189
+ }
190
+ }
191
+ .fx-btn--liquid {
192
+ --fx-btn-fg: #0891b2;
193
+ --fx-btn-bg: transparent;
194
+ z-index: 0;
195
+ border-color: #0891b2;
196
+ background: transparent;
197
+ overflow: hidden;
198
+ }
199
+ .fx-btn--liquid::before {
200
+ content: "";
201
+ position: absolute;
202
+ left: -30%;
203
+ bottom: 0;
204
+ z-index: -1;
205
+ width: 160%;
206
+ height: 220%;
207
+ border-radius: 42% 48% 0 0 / 28% 32% 0 0;
208
+ background:
209
+ linear-gradient(
210
+ 180deg,
211
+ #22d3ee,
212
+ #0891b2);
213
+ transform: translateY(82%);
214
+ transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
215
+ }
216
+ .fx-btn--liquid:hover:not(:disabled) {
217
+ color: #fff;
218
+ }
219
+ .fx-btn--liquid:hover:not(:disabled)::before {
220
+ transform: translateY(12%);
221
+ animation: fx-btn-liquid-wave 2.4s ease-in-out infinite 0.55s;
222
+ }
223
+ @keyframes fx-btn-liquid-wave {
224
+ 0%, 100% {
225
+ border-radius: 42% 48% 0 0 / 28% 32% 0 0;
226
+ }
227
+ 50% {
228
+ border-radius: 48% 42% 0 0 / 34% 26% 0 0;
229
+ }
230
+ }
231
+ .fx-btn--wipe {
232
+ --fx-btn-fg: #f4f4f5;
233
+ --fx-btn-bg: transparent;
234
+ z-index: 0;
235
+ border-color: rgba(244, 244, 245, 0.7);
236
+ background: transparent;
237
+ overflow: hidden;
238
+ }
239
+ .fx-btn--wipe::before {
240
+ content: "";
241
+ position: absolute;
242
+ inset: 0;
243
+ z-index: -1;
244
+ background: #f4f4f5;
245
+ transform: translateX(-105%) skewX(-12deg);
246
+ transform-origin: left center;
247
+ transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
248
+ }
249
+ .fx-btn--wipe:hover:not(:disabled) {
250
+ color: #18181b;
251
+ border-color: #f4f4f5;
252
+ }
253
+ .fx-btn--wipe:hover:not(:disabled)::before {
254
+ transform: translateX(0) skewX(0deg);
255
+ }
256
+ .fx-btn--glass {
257
+ --fx-btn-fg: #f8fafc;
258
+ --fx-btn-bg: rgba(255, 255, 255, 0.1);
259
+ border-color: rgba(255, 255, 255, 0.28);
260
+ background: rgba(255, 255, 255, 0.1);
261
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.18);
262
+ backdrop-filter: blur(14px);
263
+ -webkit-backdrop-filter: blur(14px);
264
+ }
265
+ .fx-btn--glass:hover:not(:disabled) {
266
+ background: rgba(255, 255, 255, 0.18);
267
+ border-color: rgba(255, 255, 255, 0.4);
268
+ transform: translateY(-1px);
269
+ }
270
+ .fx-btn--glass:active:not(:disabled) {
271
+ transform: translateY(0) scale(0.98);
272
+ }
273
+ /*# sourceMappingURL=button-kit.iife.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/styles.css"],"sourcesContent":[".fx-btn {\n --fx-btn-fg: #0f0f12;\n --fx-btn-bg: #f4f4f5;\n --fx-btn-accent: #3b82f6;\n --fx-btn-radius: 10px;\n\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0.7rem 1.25rem;\n border: 1px solid transparent;\n border-radius: var(--fx-btn-radius);\n background: var(--fx-btn-bg);\n color: var(--fx-btn-fg);\n font: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n line-height: 1.2;\n letter-spacing: 0.01em;\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n isolation: isolate;\n overflow: hidden;\n transition:\n transform 160ms ease,\n box-shadow 200ms ease,\n background-color 200ms ease,\n border-color 200ms ease,\n color 200ms ease;\n}\n\n.fx-btn:focus-visible {\n outline: 2px solid var(--fx-btn-accent);\n outline-offset: 3px;\n}\n\n.fx-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.fx-btn:active:not(:disabled) {\n transform: translateY(1px) scale(0.98);\n}\n\n/* —— solid —— */\n.fx-btn--solid {\n --fx-btn-fg: #fafafa;\n --fx-btn-bg: #18181b;\n box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;\n}\n\n.fx-btn--solid:hover:not(:disabled) {\n background: #27272a;\n}\n\n/* —— outline —— */\n.fx-btn--outline {\n --fx-btn-fg: #18181b;\n --fx-btn-bg: transparent;\n border-color: #d4d4d8;\n background: transparent;\n}\n\n.fx-btn--outline:hover:not(:disabled) {\n border-color: #18181b;\n background: #18181b;\n color: #fafafa;\n}\n\n/* —— soft —— */\n.fx-btn--soft {\n --fx-btn-fg: #1d4ed8;\n --fx-btn-bg: #dbeafe;\n}\n\n.fx-btn--soft:hover:not(:disabled) {\n background: #bfdbfe;\n transform: translateY(-1px);\n}\n\n.fx-btn--soft:active:not(:disabled) {\n transform: translateY(0) scale(0.98);\n}\n\n/* —— glow —— */\n.fx-btn--glow {\n --fx-btn-fg: #f8fafc;\n --fx-btn-bg: #2563eb;\n box-shadow:\n 0 0 0 0 rgba(37, 99, 235, 0.45),\n 0 8px 24px rgba(37, 99, 235, 0.28);\n animation: fx-btn-glow-pulse 2.4s ease-in-out infinite;\n}\n\n.fx-btn--glow:hover:not(:disabled) {\n background: #1d4ed8;\n box-shadow:\n 0 0 0 6px rgba(37, 99, 235, 0.18),\n 0 10px 28px rgba(37, 99, 235, 0.4);\n animation: none;\n}\n\n@keyframes fx-btn-glow-pulse {\n 0%,\n 100% {\n box-shadow:\n 0 0 0 0 rgba(37, 99, 235, 0.4),\n 0 8px 24px rgba(37, 99, 235, 0.28);\n }\n 50% {\n box-shadow:\n 0 0 0 8px rgba(37, 99, 235, 0),\n 0 10px 28px rgba(37, 99, 235, 0.35);\n }\n}\n\n/* —— neon —— */\n.fx-btn--neon {\n --fx-btn-fg: #67e8f9;\n --fx-btn-bg: #0b1220;\n border-color: #22d3ee;\n box-shadow:\n 0 0 0 1px rgba(34, 211, 238, 0.25),\n 0 0 18px rgba(34, 211, 238, 0.35),\n inset 0 0 12px rgba(34, 211, 238, 0.08);\n text-shadow: 0 0 10px rgba(103, 232, 249, 0.55);\n}\n\n.fx-btn--neon:hover:not(:disabled) {\n color: #ecfeff;\n border-color: #67e8f9;\n box-shadow:\n 0 0 0 1px rgba(103, 232, 249, 0.45),\n 0 0 28px rgba(34, 211, 238, 0.55),\n inset 0 0 16px rgba(34, 211, 238, 0.14);\n}\n\n/* —— shimmer —— */\n.fx-btn--shimmer {\n --fx-btn-fg: #fafafa;\n --fx-btn-bg: #111827;\n}\n\n.fx-btn--shimmer::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n background: linear-gradient(\n 110deg,\n transparent 30%,\n rgba(255, 255, 255, 0.28) 48%,\n transparent 66%\n );\n transform: translateX(-120%);\n transition: transform 0.55s ease;\n}\n\n.fx-btn--shimmer:hover:not(:disabled)::before {\n transform: translateX(120%);\n}\n\n.fx-btn--shimmer:hover:not(:disabled) {\n background: #1f2937;\n}\n\n/* —— chroma(炫彩流光 + hover 高斯光晕) —— */\n.fx-btn--chroma {\n --fx-btn-fg: #fff;\n --fx-btn-radius: 999px;\n z-index: 0;\n overflow: visible;\n isolation: auto;\n border: none;\n background: linear-gradient(\n to right,\n #03a9f4,\n #f441a5,\n #ffeb3b,\n #03a9f4\n );\n background-size: 400%;\n letter-spacing: 0.08em;\n animation: fx-btn-chroma-shift 8s ease infinite;\n}\n\n.fx-btn--chroma::before {\n content: '';\n position: absolute;\n inset: -4px;\n z-index: -1;\n border-radius: inherit;\n background: linear-gradient(\n to right,\n #03a9f4,\n #f441a5,\n #ffeb3b,\n #03a9f4\n );\n background-size: 400%;\n filter: blur(0);\n opacity: 0;\n pointer-events: none;\n transition:\n opacity 0.4s ease,\n filter 0.4s ease;\n animation: fx-btn-chroma-shift 8s ease infinite;\n}\n\n.fx-btn--chroma:hover:not(:disabled)::before {\n opacity: 1;\n filter: blur(8px);\n}\n\n.fx-btn--chroma:active:not(:disabled) {\n transform: translateY(1px) scale(0.98);\n}\n\n@keyframes fx-btn-chroma-shift {\n 0% {\n background-position: 0%;\n }\n\n 100% {\n background-position: 400%;\n }\n}\n\n/* —— liquid(底部液体升起) —— */\n.fx-btn--liquid {\n --fx-btn-fg: #0891b2;\n --fx-btn-bg: transparent;\n z-index: 0;\n border-color: #0891b2;\n background: transparent;\n overflow: hidden;\n}\n\n.fx-btn--liquid::before {\n content: '';\n position: absolute;\n left: -30%;\n bottom: 0;\n z-index: -1;\n width: 160%;\n height: 220%;\n border-radius: 42% 48% 0 0 / 28% 32% 0 0;\n background: linear-gradient(180deg, #22d3ee, #0891b2);\n transform: translateY(82%);\n transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.fx-btn--liquid:hover:not(:disabled) {\n color: #fff;\n}\n\n.fx-btn--liquid:hover:not(:disabled)::before {\n transform: translateY(12%);\n animation: fx-btn-liquid-wave 2.4s ease-in-out infinite 0.55s;\n}\n\n@keyframes fx-btn-liquid-wave {\n 0%,\n 100% {\n border-radius: 42% 48% 0 0 / 28% 32% 0 0;\n }\n\n 50% {\n border-radius: 48% 42% 0 0 / 34% 26% 0 0;\n }\n}\n\n/* —— wipe(左向右擦除填充) —— */\n.fx-btn--wipe {\n --fx-btn-fg: #f4f4f5;\n --fx-btn-bg: transparent;\n z-index: 0;\n border-color: rgba(244, 244, 245, 0.7);\n background: transparent;\n overflow: hidden;\n}\n\n.fx-btn--wipe::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n background: #f4f4f5;\n transform: translateX(-105%) skewX(-12deg);\n transform-origin: left center;\n transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.fx-btn--wipe:hover:not(:disabled) {\n color: #18181b;\n border-color: #f4f4f5;\n}\n\n.fx-btn--wipe:hover:not(:disabled)::before {\n transform: translateX(0) skewX(0deg);\n}\n\n/* —— glass(毛玻璃) —— */\n.fx-btn--glass {\n --fx-btn-fg: #f8fafc;\n --fx-btn-bg: rgba(255, 255, 255, 0.1);\n border-color: rgba(255, 255, 255, 0.28);\n background: rgba(255, 255, 255, 0.1);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.22),\n 0 8px 24px rgba(0, 0, 0, 0.18);\n backdrop-filter: blur(14px);\n -webkit-backdrop-filter: blur(14px);\n}\n\n.fx-btn--glass:hover:not(:disabled) {\n background: rgba(255, 255, 255, 0.18);\n border-color: rgba(255, 255, 255, 0.4);\n transform: translateY(-1px);\n}\n\n.fx-btn--glass:active:not(:disabled) {\n transform: translateY(0) scale(0.98);\n}\n"],"mappings":";AAAA,CAAC;AACC,eAAa;AACb,eAAa;AACb,mBAAiB;AACjB,mBAAiB;AAEjB,YAAU;AACV,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK;AACL,WAAS,OAAO;AAChB,UAAQ,IAAI,MAAM;AAClB,iBAAe,IAAI;AACnB,cAAY,IAAI;AAChB,SAAO,IAAI;AACX,QAAM;AACN,aAAW;AACX,eAAa;AACb,eAAa;AACb,kBAAgB;AAChB,mBAAiB;AACjB,UAAQ;AACR,eAAa;AACb,+BAA6B;AAC7B,aAAW;AACX,YAAU;AACV;AAAA,IACE,UAAU,MAAM,IAAI;AAAA,IACpB,WAAW,MAAM,IAAI;AAAA,IACrB,iBAAiB,MAAM,IAAI;AAAA,IAC3B,aAAa,MAAM,IAAI;AAAA,IACvB,MAAM,MAAM;AAChB;AAEA,CAnCC,MAmCM;AACL,WAAS,IAAI,MAAM,IAAI;AACvB,kBAAgB;AAClB;AAEA,CAxCC,MAwCM;AACL,WAAS;AACT,UAAQ;AACR,kBAAgB;AAClB;AAEA,CA9CC,MA8CM,OAAO,KAAK;AACjB,aAAW,WAAW,KAAK,MAAM;AACnC;AAGA,CAAC;AACC,eAAa;AACb,eAAa;AACb,cAAY,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM;AAChD;AAEA,CANC,aAMa,MAAM,KAAK;AACvB,cAAY;AACd;AAGA,CAAC;AACC,eAAa;AACb,eAAa;AACb,gBAAc;AACd,cAAY;AACd;AAEA,CAPC,eAOe,MAAM,KAAK;AACzB,gBAAc;AACd,cAAY;AACZ,SAAO;AACT;AAGA,CAAC;AACC,eAAa;AACb,eAAa;AACf;AAEA,CALC,YAKY,MAAM,KAAK;AACtB,cAAY;AACZ,aAAW,WAAW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AM,aAAa,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;AAC1D;AAEA,CApBC,YAoBY,MAAM,KAAK;AACtB,SAAO;AACP,gBAAc;AAChB;AAEA,CAzBC,YAyBY,MAAM,KAAK,UAAU;AAChC,aAAW,WAAW,GAAG,MAAM;AACjC;AAGA,CAAC;AACC,eAAa;AACb,eAAa,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AACjC,gBAAc,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAClC,cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAChC,cACE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EACvC,EAAE,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3B,mBAAiB,KAAK;AACtB,2BAAyB,KAAK;AAChC;AAEA,CAZC,aAYa,MAAM,KAAK;AACvB,cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAChC,gBAAc,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAClC,aAAW,WAAW;AACxB;AAEA,CAlBC,aAkBa,OAAO,KAAK;AACxB,aAAW,WAAW,GAAG,MAAM;AACjC;","names":[]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var ButtonKit = (() => {
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ BUTTON_VARIANTS: () => BUTTON_VARIANTS,
25
+ Button: () => Button
26
+ });
27
+
28
+ // src/browser/react.ts
29
+ var globalReact = globalThis.React;
30
+ if (!globalReact) {
31
+ throw new Error(
32
+ '[button-kit] browser build: global "React" not found. Load a UMD build of React (react@18.3.x) before button-kit.'
33
+ );
34
+ }
35
+ var Fragment = globalReact.Fragment;
36
+ var createElement = globalReact.createElement;
37
+
38
+ // src/core/variants.ts
39
+ var BUTTON_VARIANTS = [
40
+ "solid",
41
+ "outline",
42
+ "soft",
43
+ "glow",
44
+ "neon",
45
+ "shimmer",
46
+ "chroma",
47
+ "liquid",
48
+ "wipe",
49
+ "glass"
50
+ ];
51
+ var DEFAULT_VARIANT = "solid";
52
+ function resolveVariant(variant) {
53
+ if (variant != null && BUTTON_VARIANTS.includes(variant)) {
54
+ return variant;
55
+ }
56
+ return DEFAULT_VARIANT;
57
+ }
58
+ function variantClassName(variant) {
59
+ return `fx-btn fx-btn--${resolveVariant(variant)}`;
60
+ }
61
+
62
+ // src/browser/jsx-runtime.ts
63
+ function jsx(type, props, key) {
64
+ const create = createElement;
65
+ return key === void 0 ? create(type, props) : create(type, { ...props, key });
66
+ }
67
+
68
+ // src/react/Button.tsx
69
+ function Button({
70
+ variant = "solid",
71
+ children,
72
+ className,
73
+ style,
74
+ type = "button",
75
+ ...rest
76
+ }) {
77
+ const classes = [variantClassName(variant), className].filter(Boolean).join(" ");
78
+ return /* @__PURE__ */ jsx("button", { type, className: classes, style, ...rest, children });
79
+ }
80
+ return __toCommonJS(src_exports);
81
+ })();
82
+ //# sourceMappingURL=button-kit.iife.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/browser/react.ts","../src/core/variants.ts","../src/browser/jsx-runtime.ts","../src/react/Button.tsx"],"sourcesContent":["export {\n Button,\n BUTTON_VARIANTS,\n type ButtonProps,\n type ButtonVariant,\n} from './react'\n","// Browser (<script>) build only.\nimport type * as ReactModule from 'react'\n\ntype ReactGlobal = typeof ReactModule\n\nconst globalReact = (globalThis as { React?: ReactGlobal }).React\n\nif (!globalReact) {\n throw new Error(\n '[button-kit] browser build: global \"React\" not found. ' +\n 'Load a UMD build of React (react@18.3.x) before button-kit.',\n )\n}\n\nexport const Fragment = globalReact.Fragment\nexport const createElement = globalReact.createElement\n","/** Built-in button looks. Pass any of these as `variant`. */\nexport const BUTTON_VARIANTS = [\n 'solid',\n 'outline',\n 'soft',\n 'glow',\n 'neon',\n 'shimmer',\n 'chroma',\n 'liquid',\n 'wipe',\n 'glass',\n] as const\n\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number]\n\nexport const DEFAULT_VARIANT: ButtonVariant = 'solid'\n\nexport function resolveVariant(variant?: string): ButtonVariant {\n if (\n variant != null &&\n (BUTTON_VARIANTS as readonly string[]).includes(variant)\n ) {\n return variant as ButtonVariant\n }\n return DEFAULT_VARIANT\n}\n\nexport function variantClassName(variant?: string): string {\n return `fx-btn fx-btn--${resolveVariant(variant)}`\n}\n","import { createElement, Fragment } from './react'\nimport type { ElementType, Key, ReactElement } from 'react'\n\nexport { Fragment }\n\ntype CreateElement = (type: ElementType, props?: unknown) => ReactElement\n\nexport function jsx(\n type: ElementType,\n props: unknown,\n key?: Key,\n): ReactElement {\n const create = createElement as unknown as CreateElement\n return key === undefined\n ? create(type, props)\n : create(type, { ...(props as Record<string, unknown>), key })\n}\n\nexport const jsxs = jsx\n","'use client'\n\nimport {\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactNode,\n} from 'react'\nimport {\n BUTTON_VARIANTS,\n type ButtonVariant,\n variantClassName,\n} from '../core/variants'\nimport '../core/styles.css'\n\nexport type ButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'className' | 'style' | 'children'\n> & {\n /** Switch look by name: solid | outline | soft | glow | neon | shimmer | chroma | liquid | wipe | glass. */\n variant?: ButtonVariant | (string & {})\n children?: ReactNode\n className?: string\n style?: CSSProperties\n}\n\nexport function Button({\n variant = 'solid',\n children,\n className,\n style,\n type = 'button',\n ...rest\n}: ButtonProps) {\n const classes = [variantClassName(variant), className]\n .filter(Boolean)\n .join(' ')\n\n return (\n <button type={type} className={classes} style={style} {...rest}>\n {children}\n </button>\n )\n}\n\nexport { BUTTON_VARIANTS, type ButtonVariant }\nexport default Button\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,MAAM,cAAe,WAAuC;AAE5D,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI;AAAA,MACR;AAAA,IAEF;AAAA,EACF;AAEO,MAAM,WAAW,YAAY;AAC7B,MAAM,gBAAgB,YAAY;;;ACdlC,MAAM,kBAAkB;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAIO,MAAM,kBAAiC;AAEvC,WAAS,eAAe,SAAiC;AAC9D,QACE,WAAW,QACV,gBAAsC,SAAS,OAAO,GACvD;AACA,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEO,WAAS,iBAAiB,SAA0B;AACzD,WAAO,kBAAkB,eAAe,OAAO,CAAC;AAAA,EAClD;;;ACvBO,WAAS,IACd,MACA,OACA,KACc;AACd,UAAM,SAAS;AACf,WAAO,QAAQ,SACX,OAAO,MAAM,KAAK,IAClB,OAAO,MAAM,EAAE,GAAI,OAAmC,IAAI,CAAC;AAAA,EACjE;;;ACSO,WAAS,OAAO;AAAA,IACrB,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,GAAG;AAAA,EACL,GAAgB;AACd,UAAM,UAAU,CAAC,iBAAiB,OAAO,GAAG,SAAS,EAClD,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,WACE,oBAAC,YAAO,MAAY,WAAW,SAAS,OAAe,GAAG,MACvD,UACH;AAAA,EAEJ;","names":[]}