@yewdiel21/motion-kit 0.18.0 → 0.19.1
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 +245 -222
- package/bin/motion-kit.mjs +0 -0
- package/dist/auto/index.d.ts +4 -3
- package/dist/auto/index.js +5 -3
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-QFBOHPWZ.js → chunk-CQP66AZK.js} +2 -2
- package/dist/{chunk-QP4QJOEN.js → chunk-H4STLMCM.js} +2 -2
- package/dist/{chunk-AWDEKDEJ.js → chunk-LIXSOGS2.js} +8 -22
- package/dist/chunk-LIXSOGS2.js.map +1 -0
- package/dist/{chunk-Q7IW4FV3.js → chunk-NCGNIPJE.js} +1430 -968
- package/dist/chunk-NCGNIPJE.js.map +1 -0
- package/dist/{chunk-DOOMULVV.js → chunk-OLT3CWDJ.js} +4 -2
- package/dist/chunk-OLT3CWDJ.js.map +1 -0
- package/dist/{chunk-EDMXWUW3.js → chunk-PVN7YVKV.js} +3 -3
- package/dist/css/components/code-block.css +267 -0
- package/dist/css/components/command-search.css +274 -2
- package/dist/css/components/dialog.css +264 -0
- package/dist/css/components/heatmap-chart.css +267 -1
- package/dist/css/components/pill-button.css +7 -5
- package/dist/css/components/scroll-area.css +261 -0
- package/dist/css/components/scroll-island.css +6 -0
- package/dist/css/components/select.css +284 -4
- package/dist/elements/index.d.ts +15 -4
- package/dist/elements/index.js +36 -6
- package/dist/elements/index.js.map +1 -1
- package/dist/{engine-t8d7brjn.d.ts → engine-D6XV-WNt.d.ts} +50 -1
- package/dist/gl/index.js +2 -2
- package/dist/index.css +321 -12
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +20 -7
- package/dist/react/index.js +56 -7
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-dPsZYqtI.d.ts → reduced-4croIXl-.d.ts} +1 -1
- package/dist/{store-6hZNKiee.d.ts → store-CAHWkurn.d.ts} +1 -1
- package/package.json +117 -110
- package/registry.json +1357 -1340
- package/src/auto/auto-init.ts +341 -339
- package/src/components/code-block/README.md +1 -1
- package/src/components/code-block/code-block.css +5 -0
- package/src/components/code-block/engine.ts +5 -0
- package/src/components/command-search/README.md +1 -1
- package/src/components/command-search/command-search.css +12 -2
- package/src/components/command-search/engine.ts +6 -0
- package/src/components/dialog/README.md +104 -103
- package/src/components/dialog/dialog.css +2 -0
- package/src/components/dialog/engine.ts +465 -449
- package/src/components/heatmap-chart/README.md +48 -48
- package/src/components/heatmap-chart/engine.ts +6 -1
- package/src/components/heatmap-chart/heatmap-chart.css +5 -1
- package/src/components/icons.ts +1 -0
- package/src/components/pill-button/engine.ts +1 -1
- package/src/components/pill-button/pill-button.css +7 -5
- package/src/components/scroll-area/README.md +89 -0
- package/src/components/scroll-area/element.ts +35 -0
- package/src/components/scroll-area/engine.ts +528 -0
- package/src/components/scroll-area/react.tsx +67 -0
- package/src/components/scroll-area/scroll-area.css +260 -0
- package/src/components/scroll-island/engine.ts +10 -1
- package/src/components/scroll-island/scroll-island.css +6 -0
- package/src/components/select/README.md +1 -1
- package/src/components/select/engine.ts +16 -4
- package/src/components/select/select.css +22 -4
- package/src/core/timing.ts +2 -0
- package/src/elements/index.ts +321 -318
- package/src/index.ts +1 -0
- package/src/motion/morph.ts +5 -2
- package/src/react/index.ts +2 -1
- package/dist/chunk-AWDEKDEJ.js.map +0 -1
- package/dist/chunk-DOOMULVV.js.map +0 -1
- package/dist/chunk-Q7IW4FV3.js.map +0 -1
- /package/dist/{chunk-QFBOHPWZ.js.map → chunk-CQP66AZK.js.map} +0 -0
- /package/dist/{chunk-QP4QJOEN.js.map → chunk-H4STLMCM.js.map} +0 -0
- /package/dist/{chunk-EDMXWUW3.js.map → chunk-PVN7YVKV.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,222 +1,245 @@
|
|
|
1
|
-
# @yewdiel21/motion-kit
|
|
2
|
-
|
|
3
|
-
Motion toolkit for vanilla JavaScript, Astro and React/Next.js. GSAP recipes, accessible UI components, 19 Material 3 themes, CSS controls and optional WebGL effects.
|
|
4
|
-
|
|
5
|
-
[Live playground](https://motion-kit-playground.vercel.app) — vanilla and React examples for every component.
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## New in 0.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
| --- | --- |
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
import
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- `
|
|
160
|
-
- `
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
- `
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
- `
|
|
183
|
-
- `
|
|
184
|
-
- `
|
|
185
|
-
- `
|
|
186
|
-
- `
|
|
187
|
-
- `
|
|
188
|
-
|
|
189
|
-
`
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
- `
|
|
204
|
-
- `
|
|
205
|
-
- `
|
|
206
|
-
- `
|
|
207
|
-
- `
|
|
208
|
-
- `
|
|
209
|
-
- `
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
1
|
+
# @yewdiel21/motion-kit
|
|
2
|
+
|
|
3
|
+
Motion toolkit for vanilla JavaScript, Astro and React/Next.js. GSAP recipes, accessible UI components, 19 Material 3 themes, CSS controls and optional WebGL effects.
|
|
4
|
+
|
|
5
|
+
[Live playground](https://motion-kit-playground.vercel.app) — vanilla and React examples for every component.
|
|
6
|
+
|
|
7
|
+
## Fixed in 0.19.1
|
|
8
|
+
|
|
9
|
+
- `pill-button` keeps SVG and `.mk-icon` icons within the 18 px slot and centred during hover.
|
|
10
|
+
- `scroll-island` measures section titles before constraining the capsule, so long titles remain readable with ellipsis when needed. Percentage-only mode remains available with `sections: false`.
|
|
11
|
+
|
|
12
|
+
## New in 0.19.0
|
|
13
|
+
|
|
14
|
+
`scroll-area` replaces the system scrollbar with the kit's own, while scrolling stays native (keyboard, touch, momentum, scroll snap, find in page).
|
|
15
|
+
|
|
16
|
+
- **At rest:** a 6 px pill that shows on hover or while scrolling and fades 0.9 s later.
|
|
17
|
+
- **Over the bar:** a tonal rail appears and the pill swells to 10 px on the swing curve.
|
|
18
|
+
- **Dragging:** the pill presses, takes the accent and follows the pointer with no delay.
|
|
19
|
+
- **Clicking the rail:** glides there, interrupted by the wheel, a touch or a key.
|
|
20
|
+
- **Extras:** edges with hidden content fade out, there is a horizontal bar, and an optional "back to top" pill pops in.
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { ScrollArea } from '@yewdiel21/motion-kit/react';
|
|
24
|
+
|
|
25
|
+
<ScrollArea style={{ height: 320 }} label="Release notes" backToTop>…</ScrollArea>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Select, Dialog, Command Search, Code Block and Heatmap Chart now scroll under this bar instead of the grey system one. Reduced motion keeps every action. No new runtime dependencies.
|
|
29
|
+
|
|
30
|
+
## New in 0.18.0
|
|
31
|
+
|
|
32
|
+
Fifteen components join the Melonmind/Stepbro visual language: tonal surfaces, restrained accent, elastic press feedback, moving selections, short blur transitions and rolling values. Every entry includes a vanilla factory, React adapter, custom element, individual CSS and working examples.
|
|
33
|
+
|
|
34
|
+
| Family | Components |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Forms | `stepper` (horizontal, vertical, compact, dots), `radio-group` (pill, card, list), `equalizer-slider`, `temperature-slider`, `rating-scale` (numbered, sentiment) |
|
|
37
|
+
| Surfaces | `notification-stack`, `bento-grid`, `scroll-preview-dock`, `sticky-header` |
|
|
38
|
+
| Motion and actions | `handwriting-text`, `particle-button`, `magnetize-button`, `badge-button`, `morphing-page-dots`, `not-found` |
|
|
39
|
+
|
|
40
|
+
The five 0.17 components were redesigned: Wheel Picker now projects rows around a 3D cylinder with real Y/Z depth and native touch inertia; Signature Pad, Drilldown Menu and the audio components share the kit's press, highlight and transition vocabulary. Waveform progress follows the actual media time; it does not fabricate audio analysis. No new runtime dependencies.
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { Stepper, RadioGroup, TemperatureSlider } from '@yewdiel21/motion-kit/react';
|
|
44
|
+
import '@yewdiel21/motion-kit/css';
|
|
45
|
+
|
|
46
|
+
<Stepper items={[{ label: 'Details' }, { label: 'Review' }]} variant="compact" />
|
|
47
|
+
<RadioGroup name="plan" items={[{ value: 'solo', label: 'Personal' }, { value: 'team', label: 'Team' }]} />
|
|
48
|
+
<TemperatureSlider name="temperature" defaultValue={22} min={16} max={30} />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Explore the [playground](https://motion-kit-playground.vercel.app), or copy an implementation with `npx @yewdiel21/motion-kit add stepper --react --elements`. Keep `destroy()`/React cleanup when replacing a component. Reduced motion retains every action; native form inputs provide keyboard, validation and submission.
|
|
52
|
+
|
|
53
|
+
## New in 0.17.0
|
|
54
|
+
|
|
55
|
+
Five reusable components with vanilla factories, React wrappers, custom elements, individual stylesheets and live examples:
|
|
56
|
+
|
|
57
|
+
| Component | Behavior |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| [Signature Pad](https://motion-kit-playground.vercel.app/signature-pad/) | Mouse, pen and touch input; undo/redo; normalized stroke data; transparent SVG/PNG export. |
|
|
60
|
+
| [Waveform Player](https://motion-kit-playground.vercel.app/waveform-player/) | Real audio playback, seek, playback speed and loading/error states. Supply your own waveform peaks. |
|
|
61
|
+
| [Voice Message Bubble](https://motion-kit-playground.vercel.app/voice-message-bubble/) | Incoming/outgoing audio messages with author, timestamp and delivery status. |
|
|
62
|
+
| [Drilldown Menu](https://motion-kit-playground.vercel.app/drilldown-menu/) | Nested actions, animated level changes, breadcrumbs and keyboard navigation. |
|
|
63
|
+
| [Wheel Picker](https://motion-kit-playground.vercel.app/wheel-picker/) | Native touch scrolling, mouse drag, keyboard selection, disabled options and form values. |
|
|
64
|
+
|
|
65
|
+
The components follow the active theme and respect reduced motion. No new runtime dependencies. Audio demos use an original synthesized test sound; the player does not request microphone access or analyze audio automatically.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { WheelPicker } from '@yewdiel21/motion-kit/react';
|
|
69
|
+
import '@yewdiel21/motion-kit/css';
|
|
70
|
+
|
|
71
|
+
<WheelPicker items={['15 min', '25 min', '50 min']} name="duration" />
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Install
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
npm install @yewdiel21/motion-kit gsap
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
For React components, install React 18 or newer. The theme generator additionally requires `@material/material-color-utilities@^0.3.0`.
|
|
81
|
+
|
|
82
|
+
## Vanilla / Astro
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import '@yewdiel21/motion-kit/css';
|
|
86
|
+
import { autoInit } from '@yewdiel21/motion-kit/auto';
|
|
87
|
+
|
|
88
|
+
const destroy = autoInit(document);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<div class="mk-segmented" data-mk="tabs">
|
|
93
|
+
<button data-mk-tab aria-selected="true">Today</button>
|
|
94
|
+
<button data-mk-tab>Week</button>
|
|
95
|
+
<span data-mk-indicator></span>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Call `destroy()` before replacing the DOM. Add `MK_HEAD_SCRIPT` from `/auto` inline to `<head>` when using entrance recipes, and `defineElements()` from `/elements` to register the `mk-*` custom elements.
|
|
100
|
+
|
|
101
|
+
## React / Next.js
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
'use client';
|
|
105
|
+
|
|
106
|
+
import '@yewdiel21/motion-kit/css';
|
|
107
|
+
import { useRef } from 'react';
|
|
108
|
+
import { useTabs } from '@yewdiel21/motion-kit/react';
|
|
109
|
+
|
|
110
|
+
export function Tabs() {
|
|
111
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
112
|
+
useTabs(ref);
|
|
113
|
+
return (
|
|
114
|
+
<div ref={ref} className="mk-segmented">
|
|
115
|
+
<button data-mk-tab aria-selected="true">Today</button>
|
|
116
|
+
<button data-mk-tab>Week</button>
|
|
117
|
+
<span data-mk-indicator="" />
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Hooks create the engine after mount and destroy it on unmount. Import themes separately from `/css/themes`, fonts from `/css/fonts`, and theme utilities from `/theme`.
|
|
124
|
+
|
|
125
|
+
## Copy source with the CLI
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
npx @yewdiel21/motion-kit list
|
|
129
|
+
npx @yewdiel21/motion-kit add tabs island drag-ruler --react --elements --dir src/motion-kit
|
|
130
|
+
npx @yewdiel21/motion-kit skill
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The CLI copies the selected components, their dependencies and CSS. Each copied folder includes its README. It does not overwrite files without `--force`.
|
|
134
|
+
|
|
135
|
+
## Entry points
|
|
136
|
+
|
|
137
|
+
| Import | Contents |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `@yewdiel21/motion-kit` | Factories, motion functions, easings and timing constants |
|
|
140
|
+
| `/auto` | Declarative `data-mk` initialization and head script |
|
|
141
|
+
| `/react` | Hooks and React components |
|
|
142
|
+
| `/elements` | Custom elements |
|
|
143
|
+
| `/theme` | Theme runtime and head script |
|
|
144
|
+
| `/theme/generate` | Optional Material 3 palette generator |
|
|
145
|
+
| `/gl` | Particle hero, liquid blend, matcap, shader grain and blur |
|
|
146
|
+
| `/css`, `/css/themes`, `/css/fonts` | Styles, theme palettes and font imports |
|
|
147
|
+
|
|
148
|
+
WebGL is optional. Keep accessible text and images in HTML; effects provide a fallback when graphics support is unavailable. Motion recipes respect reduced-motion preferences and return an idempotent `destroy()`.
|
|
149
|
+
|
|
150
|
+
Full component documentation and the playground source are in the [repository](https://github.com/YewdielMartinez/motion-kit). Each component README documents its markup, options and controls. License notices: `NOTICE`. License: `UNLICENSED`; all rights reserved.
|
|
151
|
+
|
|
152
|
+
## New in 0.14.0
|
|
153
|
+
|
|
154
|
+
Twenty-two application components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet, a Spanish README and vanilla/React demos:
|
|
155
|
+
|
|
156
|
+
- Overlays and feedback: `tooltip` (automatic placement, an arrow that tracks its anchor), `popover` (an anchored, interactive panel that grows out of its trigger), `loading-button` (loading, success and error with a width glide), `empty-state` (drawn illustrations with an idle loop), `breadcrumb` (folds its middle into "…", glides when the path changes).
|
|
157
|
+
- Data at a glance: `stat-card` (a counted figure, trend badge, sparkline and target), `chart-tooltip` (a rich tooltip linked to `chart` or standalone).
|
|
158
|
+
- Inputs: `multi-select` (chips and search), `tag-input` (autocomplete and validation), `date-time-picker` (date and time in one field), `filter-builder` (conditions and nested AND/OR groups).
|
|
159
|
+
- Structures: `timeline`, `activity-feed` (live entries behind a "novedades" pill), `tree-view` (three-state checks, search, lazy children), `file-explorer` (tree, breadcrumb, list/grid, drag-and-drop), `json-viewer` (typed values, copy, flashes on new data), `virtual-list` (thousands of rows, measured heights, a position pill).
|
|
160
|
+
- Layout and data: `resizable-panel` (draggable separators with a rubber band and snap-to-collapse), `split-view`, `data-table` (sorting, search, filters, selection with bulk actions, pagination, row menus, columns), `editable-table` (in-place editing, validation and saving), `rich-text-editor` (toolbar, Markdown shortcuts, safe paste, links, counter).
|
|
161
|
+
|
|
162
|
+
New helpers: `place`, `matchesFilter`, `describeFilter`, `relativeTime`, `dayLabel`, `findNode`, `toggleCheck`, `searchTree`, `formatSize`, `sortEntries`, `createSizes`, `jsonPath`, `normaliseSizes`, `sanitizeHtml`, `toDateTimeValue`. `chart` gains an optional built-in tooltip and richer `mk:select` details; `breadcrumb` keeps a crumb that turns into a link in place.
|
|
163
|
+
|
|
164
|
+
## New in 0.13.0
|
|
165
|
+
|
|
166
|
+
Seven input components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos:
|
|
167
|
+
|
|
168
|
+
- `color-slider`: one channel (hue, saturation, brightness, lightness, red, green, blue, alpha) on a native range; gradient track, round thumb that grows when grabbed and a colour loupe.
|
|
169
|
+
- `color-area`: saturation × brightness square with drag, keyboard (two labelled ranges) and the same loupe.
|
|
170
|
+
- `color-field`: hex / rgb() / hsl() text with a live swatch; invalid input shakes and reverts.
|
|
171
|
+
- `color-picker`: a swatch button that grows into a panel (area, hue, alpha, field, presets, eyedropper), or the panel inline.
|
|
172
|
+
- `time-field`: segmented time (24 h or a.m./p.m.); digits roll, a focus pill glides, min/max validation.
|
|
173
|
+
- `range-calendar`: one or two months; two-click range with hover preview, a band that wipes in, unavailable days, full keyboard.
|
|
174
|
+
- `date-range-picker`: two segmented dates and a calendar popover that grows out of its button; presets and inline errors.
|
|
175
|
+
|
|
176
|
+
`command-search` now grows out of the button that opened it and folds back into it. New helpers: `parseColor`, `formatColor`, `toHex`, `toHsva`, `luminance`, `parseTime`, `formatTime`, `toRange`, `rangeKeys`.
|
|
177
|
+
|
|
178
|
+
## New in 0.12.0
|
|
179
|
+
|
|
180
|
+
Ten microinteraction components on the Melon Mind design line (neutral surfaces, sparse accent, glass and GSAP curves), each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos. All of them respect reduced motion.
|
|
181
|
+
|
|
182
|
+
- `credit-card`: the card fills in as you type (characters roll in, a frame follows the active field), detects the brand, checks Luhn and expiry, and turns over in 3D for the CVC.
|
|
183
|
+
- `command-search`: Ctrl/⌘ K palette with fuzzy matching, marked matches, groups, arrows and Enter; an `href` navigates unless `mk:select` is cancelled.
|
|
184
|
+
- `hold-confirm`: the button itself fills while held (pointer or Space/Enter); releasing early cancels, completion pops a check.
|
|
185
|
+
- `image-preview`: thumbnails open into a dialog that grows from the picture; arrows, swipe, double-click zoom, drag down or Escape to close.
|
|
186
|
+
- `like-button`: heart that squashes and pops with particles; the count rolls.
|
|
187
|
+
- `notification-bell`: the bell swings, the badge pops and a message rises beside it on the side with room.
|
|
188
|
+
- `password-strength`: four-segment meter, live rule checklist and show/hide toggle; can require a score through native validity.
|
|
189
|
+
- `scratch-card`: metallic canvas cover scratched with a finger or mouse; reveals at a threshold with confetti, plus a keyboard Reveal button.
|
|
190
|
+
- `star-rating`: native radios with hover preview, pop and sparkles; half stars when read-only.
|
|
191
|
+
- `swipe-actions`: rows slide to show actions on both sides; a long swipe runs the primary action, keyboard reaches every action.
|
|
192
|
+
|
|
193
|
+
Shared motion helpers are exported: `press`, `blurIn`, `blurOut`, `collapse`, `shake`, `ringPulse`, `burst` and `rollDigits`, plus the `click`, `playful`, `pop`, `wipe` and `shake` curves in `EASE`.
|
|
194
|
+
|
|
195
|
+
The 0.11 entries follow the same line: `code-block` is a dark editor with built-in syntax highlighting (ts/js/jsx, json, css, html/xml, shell) and `highlightLines`; `link-preview` adds a `row` variant; `progress` and `range-slider` glide between values; `chart` defaults to a monochrome single series with an end-value pill (`axis` and `endLabel` options) and animates its first draw and data updates; `hover-card`, `attachment`, `skeleton` and `questionnaire` adopt the glass and surfaces with tighter radii. Counts and ratings format numbers in the page language.
|
|
196
|
+
|
|
197
|
+
## New in 0.11.0
|
|
198
|
+
|
|
199
|
+
Ten everyday components, each with a factory, a React component, a custom element, its own stylesheet (`/css/components/<name>.css`) and vanilla/React demos in the playground. Data, uploads and persistence stay in your app.
|
|
200
|
+
|
|
201
|
+
- `attachment`: file chooser and drop zone with accept/size/count validation, cards with progress and status, image previews revoked on removal.
|
|
202
|
+
- `skeleton`: text, avatar, image or card placeholders with pulse or shimmer; the region reports `aria-busy` and keeps real content hidden until loaded.
|
|
203
|
+
- `questionnaire`: native-form steps (text, single and multiple choice) with per-step validation, focus on the first invalid field and a single completion; built on `steps`.
|
|
204
|
+
- `code-block`: title, language, line numbers and copy with success/error feedback; code is always text.
|
|
205
|
+
- `context-menu`: right click, Menu key, Shift+F10 or long press; placed inside the viewport, built on `menu`, focus returns to the opener.
|
|
206
|
+
- `drawer`: left/right side panel or bottom sheet on the dialog engine, with focus, Escape and scroll locking.
|
|
207
|
+
- `link-preview`: resource card or hover preview from app-supplied metadata; only http(s)/relative links.
|
|
208
|
+
- `progress`: bar or ring, determinate or indeterminate.
|
|
209
|
+
- `range-slider`: single value or interval on native range inputs.
|
|
210
|
+
- `chart`: SVG line, area and grouped/stacked bars with pointer/touch/keyboard tooltip and an accessible table, no chart runtime.
|
|
211
|
+
|
|
212
|
+
`hover-card` now flips and shifts to stay inside the viewport and repositions on scroll and resize; its API is unchanged (plus `reposition()`). `Dialog` gains an optional `anchor` box and a `drawer` variant used by the new surfaces.
|
|
213
|
+
|
|
214
|
+
## New in 0.10.0
|
|
215
|
+
|
|
216
|
+
Nineteen entries, each with vanilla and React demos in the playground:
|
|
217
|
+
|
|
218
|
+
- **Components** (factory, React and custom element): `quantity`, `pagination`, `hover-card`, `input-otp`, `studio-dock`, `trailer`, `calendar` (month and week views with events, ARIA grid) and `slot-picker` (day and time slots for bookings; accepts lists, maps or promises and submits through a hidden input).
|
|
219
|
+
- **Recipes** (factory, hook and `autoInit()`): `joined-cta`, `image-zoom`, `font-cycle`, `thumbnail-nav`, `action-button`, `film-hero`, `editorial-reveal`, `weight-hover` (requires a variable font), `sticker`, `scroll-dock` and `local-clock`.
|
|
220
|
+
- **CSS control**: `.mk-status`, an availability pill with a pulsing dot.
|
|
221
|
+
|
|
222
|
+
All new entries return an idempotent `destroy()`, support the keyboard and respect reduced motion. No original assets from the reference sites are included.
|
|
223
|
+
|
|
224
|
+
## Controles y gráficos · 0.15.0
|
|
225
|
+
|
|
226
|
+
- `pill-button`: el fondo de la píldora se reúne junto al icono; también tiene una variante inversa.
|
|
227
|
+
- `toolbar`: selector elástico tipo slime, orientación vertical u horizontal y etiquetas que siguen la selección.
|
|
228
|
+
- `bidirectional-slider`: volumen, balance o ajustes alrededor de un origen, con teclado y burbuja de valor.
|
|
229
|
+
- `orbit-menu`: acciones alrededor de un botón central, con entrada escalonada, foco y Escape.
|
|
230
|
+
- `voice-dots`: espera, escucha, pensamiento y habla; sigue un `MediaStream`, audio/video o niveles de tu aplicación.
|
|
231
|
+
- `chart`: línea, área, barras, combinación por serie y áreas por rangos con `lowerValues`.
|
|
232
|
+
- `pie-chart`, `radar-chart`, `radial-chart`, `sankey-chart` y `heatmap-chart`: datos animados, tooltips, selección por teclado y tablas accesibles.
|
|
233
|
+
|
|
234
|
+
Cada pieza incluye factory vanilla, custom element, componente React, estilos individuales, documentación y demos interactivas. Los gráficos nuevos comparten los tokens de color y actualizan sus datos sin desmontarse. Las animaciones respetan `prefers-reduced-motion`.
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
import '@yewdiel21/motion-kit/css';
|
|
238
|
+
import { PillButton, Toolbar, VoiceDots, Chart, PieChart } from '@yewdiel21/motion-kit/react';
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Los cambios de 0.15 también incluyen `select`, `add-to-cart` y `scroll-island`, que ya estaban implementados antes de esta continuación.
|
|
242
|
+
|
|
243
|
+
## New in 0.16.0
|
|
244
|
+
|
|
245
|
+
Pill bars, capacity tracks, spotlight/gradient fills, stacked capsules and smooth range curves extend Chart. RadialChart gains segmented gauges and percentage centers. AddToCart and ScrollIsland now have complete, interactive Vanilla/React playground demos; ScrollIsland also supports a persistent rail and AddToCart synchronizes controlled counts.
|
package/bin/motion-kit.mjs
CHANGED
|
File without changes
|
package/dist/auto/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createJoinedCta, a as createImageZoom, b as createFontCycle, d as createThumbnailNav, e as createActionButton, f as createFilmHero, g as createEditorialReveal, h as createDrawer, i as createWeightHover, j as createSticker, k as createScrollDock, l as createLocalClock, m as createSpringCards, C as CurvedCarouselInstance, n as createPile, o as createWords, p as createFlow, q as createPop, r as createFitText, s as createStretchFooter, t as createRadialMenu, u as createTabs, v as createCounter, w as createReveal, x as createReflow, y as createSlotText, z as createSortable, A as createMaskText, B as createCascade, D as createTextRoll, E as createLetters, F as createParallax, G as createDepthGrid, H as createFrameZoom, I as createContrast, J as createMarquee, K as createCardDock, L as createSnapStrip, M as createFillText, T as TicketMenuOptions, N as TicketMenuInstance, O as createInfiniteReel, P as createRepelBento, Q as createRotator, R as createDragRuler, S as createDockPill } from '../reduced-
|
|
2
|
-
export { U as MK_HEAD_SCRIPT } from '../reduced-
|
|
3
|
-
import { c as createStepper, a as createRadioGroup, b as createEqualizerSlider, d as createTemperatureSlider, e as createRatingScale, f as createNotificationStack, g as createBentoGrid, h as createScrollPreviewDock, i as createStickyHeader, j as createHandwritingText, k as createParticleButton, l as createMagnetizeButton, m as createBadgeButton, n as createMorphingPageDots, o as createNotFound, p as createWheelPicker, q as createDrilldownMenu, r as createVoiceMessageBubble, s as createWaveformPlayer, t as createSignaturePad, u as createStudioDock, v as createTrailer, w as createQuantity, x as createPagination, y as createHoverCard, z as createInputOtp, A as createCalendar, B as createSlotPicker, C as createCreditCard, D as createCommandSearch, E as createHoldConfirm, F as createImagePreview, G as createNotificationBell, H as createPasswordStrength, I as createScratchCard, J as createStarRating, K as createAttachment, L as createSkeleton, M as createQuestionnaire, N as createCodeBlock, O as createContextMenu, P as createLinkPreview, Q as createProgress, R as createRangeSlider, S as createChart, T as createColorSlider, U as createColorArea, V as createColorField, W as createColorPicker, X as createTimeField, Y as createRangeCalendar, Z as createDateRangePicker, _ as createTooltip, $ as createPopover, a0 as createLoadingButton, a1 as createBreadcrumb, a2 as createEmptyState, a3 as createStatCard, a4 as createChartTooltip, a5 as createMultiSelect, a6 as createTagInput, a7 as createDateTimePicker, a8 as createFilterBuilder, a9 as createTimeline, aa as createActivityFeed, ab as createTreeView, ac as createFileExplorer, ad as createJsonViewer, ae as createVirtualList, af as createResizablePanel, ag as createSplitView, ah as createDataTable, ai as createEditableTable, aj as createRichTextEditor, ak as createSelect, al as createAddToCart, am as createScrollIsland } from '../engine-
|
|
1
|
+
import { c as createJoinedCta, a as createImageZoom, b as createFontCycle, d as createThumbnailNav, e as createActionButton, f as createFilmHero, g as createEditorialReveal, h as createDrawer, i as createWeightHover, j as createSticker, k as createScrollDock, l as createLocalClock, m as createSpringCards, C as CurvedCarouselInstance, n as createPile, o as createWords, p as createFlow, q as createPop, r as createFitText, s as createStretchFooter, t as createRadialMenu, u as createTabs, v as createCounter, w as createReveal, x as createReflow, y as createSlotText, z as createSortable, A as createMaskText, B as createCascade, D as createTextRoll, E as createLetters, F as createParallax, G as createDepthGrid, H as createFrameZoom, I as createContrast, J as createMarquee, K as createCardDock, L as createSnapStrip, M as createFillText, T as TicketMenuOptions, N as TicketMenuInstance, O as createInfiniteReel, P as createRepelBento, Q as createRotator, R as createDragRuler, S as createDockPill } from '../reduced-4croIXl-.js';
|
|
2
|
+
export { U as MK_HEAD_SCRIPT } from '../reduced-4croIXl-.js';
|
|
3
|
+
import { c as createStepper, a as createRadioGroup, b as createEqualizerSlider, d as createTemperatureSlider, e as createRatingScale, f as createNotificationStack, g as createBentoGrid, h as createScrollPreviewDock, i as createStickyHeader, j as createHandwritingText, k as createParticleButton, l as createMagnetizeButton, m as createBadgeButton, n as createMorphingPageDots, o as createNotFound, p as createWheelPicker, q as createDrilldownMenu, r as createVoiceMessageBubble, s as createWaveformPlayer, t as createSignaturePad, u as createStudioDock, v as createTrailer, w as createQuantity, x as createPagination, y as createHoverCard, z as createInputOtp, A as createCalendar, B as createSlotPicker, C as createCreditCard, D as createCommandSearch, E as createHoldConfirm, F as createImagePreview, G as createNotificationBell, H as createPasswordStrength, I as createScratchCard, J as createStarRating, K as createAttachment, L as createSkeleton, M as createQuestionnaire, N as createCodeBlock, O as createContextMenu, P as createLinkPreview, Q as createProgress, R as createRangeSlider, S as createChart, T as createColorSlider, U as createColorArea, V as createColorField, W as createColorPicker, X as createTimeField, Y as createRangeCalendar, Z as createDateRangePicker, _ as createTooltip, $ as createPopover, a0 as createLoadingButton, a1 as createBreadcrumb, a2 as createEmptyState, a3 as createStatCard, a4 as createChartTooltip, a5 as createMultiSelect, a6 as createTagInput, a7 as createDateTimePicker, a8 as createFilterBuilder, a9 as createTimeline, aa as createActivityFeed, ab as createTreeView, ac as createFileExplorer, ad as createJsonViewer, ae as createVirtualList, af as createResizablePanel, ag as createSplitView, ah as createDataTable, ai as createEditableTable, aj as createRichTextEditor, ak as createSelect, al as createAddToCart, am as createScrollIsland, an as createScrollArea } from '../engine-D6XV-WNt.js';
|
|
4
4
|
import { c as createLikeButton, a as createSwipeActions } from '../engine-QECQnGz1.js';
|
|
5
5
|
import { I as Instance } from '../types-BkS_raL8.js';
|
|
6
6
|
import 'gsap/SplitText';
|
|
@@ -93,6 +93,7 @@ declare const factories: {
|
|
|
93
93
|
select: typeof createSelect;
|
|
94
94
|
'add-to-cart': typeof createAddToCart;
|
|
95
95
|
'scroll-island': typeof createScrollIsland;
|
|
96
|
+
'scroll-area': typeof createScrollArea;
|
|
96
97
|
'weight-hover': typeof createWeightHover;
|
|
97
98
|
sticker: typeof createSticker;
|
|
98
99
|
'scroll-dock': typeof createScrollDock;
|
package/dist/auto/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
createTicketMenu,
|
|
45
45
|
createWeightHover,
|
|
46
46
|
createWords
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-PVN7YVKV.js";
|
|
48
48
|
import {
|
|
49
49
|
ScrollTrigger,
|
|
50
50
|
createActivityFeed,
|
|
@@ -103,6 +103,7 @@ import {
|
|
|
103
103
|
createResizablePanel,
|
|
104
104
|
createRichTextEditor,
|
|
105
105
|
createScratchCard,
|
|
106
|
+
createScrollArea,
|
|
106
107
|
createScrollIsland,
|
|
107
108
|
createScrollPreviewDock,
|
|
108
109
|
createSelect,
|
|
@@ -127,11 +128,11 @@ import {
|
|
|
127
128
|
createVoiceMessageBubble,
|
|
128
129
|
createWaveformPlayer,
|
|
129
130
|
createWheelPicker
|
|
130
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-NCGNIPJE.js";
|
|
131
132
|
import "../chunk-34EZ7DF4.js";
|
|
132
133
|
import {
|
|
133
134
|
MK_HEAD_SCRIPT
|
|
134
|
-
} from "../chunk-
|
|
135
|
+
} from "../chunk-OLT3CWDJ.js";
|
|
135
136
|
import {
|
|
136
137
|
warnOnce
|
|
137
138
|
} from "../chunk-TGV27ZWM.js";
|
|
@@ -288,6 +289,7 @@ var factories = {
|
|
|
288
289
|
"select": createSelect,
|
|
289
290
|
"add-to-cart": createAddToCart,
|
|
290
291
|
"scroll-island": createScrollIsland,
|
|
292
|
+
"scroll-area": createScrollArea,
|
|
291
293
|
"weight-hover": createWeightHover,
|
|
292
294
|
"sticker": createSticker,
|
|
293
295
|
"scroll-dock": createScrollDock,
|