@manti-ui/folds 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 +21 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/swipe/index.d.ts +3 -0
- package/dist/swipe/index.d.ts.map +1 -0
- package/dist/swipe/swipe.core.d.ts +27 -0
- package/dist/swipe/swipe.core.d.ts.map +1 -0
- package/dist/swipe/swipe.types.d.ts +48 -0
- package/dist/swipe/swipe.types.d.ts.map +1 -0
- package/package.json +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Manti UI
|
|
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/dist/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export * as toggle from '@zag-js/toggle';
|
|
2
|
+
export * as switchMachine from '@zag-js/switch';
|
|
3
|
+
export * as checkbox from '@zag-js/checkbox';
|
|
4
|
+
export * as radioGroup from '@zag-js/radio-group';
|
|
5
|
+
export * as collapsible from '@zag-js/collapsible';
|
|
6
|
+
export * as accordion from '@zag-js/accordion';
|
|
7
|
+
export * as tabs from '@zag-js/tabs';
|
|
8
|
+
export * as tooltip from '@zag-js/tooltip';
|
|
9
|
+
export * as dialog from '@zag-js/dialog';
|
|
10
|
+
export * as popover from '@zag-js/popover';
|
|
11
|
+
export * as hoverCard from '@zag-js/hover-card';
|
|
12
|
+
export * as menu from '@zag-js/menu';
|
|
13
|
+
export * as toast from '@zag-js/toast';
|
|
14
|
+
export * as numberInput from '@zag-js/number-input';
|
|
15
|
+
export * as pinInput from '@zag-js/pin-input';
|
|
16
|
+
export * as slider from '@zag-js/slider';
|
|
17
|
+
export * as tagsInput from '@zag-js/tags-input';
|
|
18
|
+
export * as editable from '@zag-js/editable';
|
|
19
|
+
export * as toggleGroup from '@zag-js/toggle-group';
|
|
20
|
+
export * as select from '@zag-js/select';
|
|
21
|
+
export * as combobox from '@zag-js/combobox';
|
|
22
|
+
export * as listbox from '@zag-js/listbox';
|
|
23
|
+
export * as treeView from '@zag-js/tree-view';
|
|
24
|
+
export * as pagination from '@zag-js/pagination';
|
|
25
|
+
export * as avatar from '@zag-js/avatar';
|
|
26
|
+
export * as progress from '@zag-js/progress';
|
|
27
|
+
export * as ratingGroup from '@zag-js/rating-group';
|
|
28
|
+
export * as carousel from '@zag-js/carousel';
|
|
29
|
+
export * as qrCode from '@zag-js/qr-code';
|
|
30
|
+
export * as clipboard from '@zag-js/clipboard';
|
|
31
|
+
export * as fileUpload from '@zag-js/file-upload';
|
|
32
|
+
export * as signaturePad from '@zag-js/signature-pad';
|
|
33
|
+
export * as datePicker from '@zag-js/date-picker';
|
|
34
|
+
export * as timePicker from '@zag-js/time-picker';
|
|
35
|
+
export * as timer from '@zag-js/timer';
|
|
36
|
+
export * as steps from '@zag-js/steps';
|
|
37
|
+
export * as tour from '@zag-js/tour';
|
|
38
|
+
export * as splitter from '@zag-js/splitter';
|
|
39
|
+
export * as colorPicker from '@zag-js/color-picker';
|
|
40
|
+
export * as navigationMenu from '@zag-js/navigation-menu';
|
|
41
|
+
export * as floatingPanel from '@zag-js/floating-panel';
|
|
42
|
+
/**
|
|
43
|
+
* Manti-original behaviors. Not from Zag.js — these are framework-agnostic
|
|
44
|
+
* primitives Manti UI authors directly to fill gaps in the Zag catalog.
|
|
45
|
+
*/
|
|
46
|
+
export * as swipe from './swipe';
|
|
47
|
+
export declare const mantiBehaviorContract: {
|
|
48
|
+
readonly packageName: "@manti-ui/folds";
|
|
49
|
+
readonly engine: "Zag.js";
|
|
50
|
+
readonly status: "design-system";
|
|
51
|
+
};
|
|
52
|
+
export type MantiBehaviorContract = typeof mantiBehaviorContract;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAC;AAExD;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as e from "@zag-js/toggle";
|
|
2
|
+
import * as t from "@zag-js/switch";
|
|
3
|
+
import * as n from "@zag-js/checkbox";
|
|
4
|
+
import * as r from "@zag-js/radio-group";
|
|
5
|
+
import * as i from "@zag-js/collapsible";
|
|
6
|
+
import * as a from "@zag-js/accordion";
|
|
7
|
+
import * as o from "@zag-js/tabs";
|
|
8
|
+
import * as s from "@zag-js/tooltip";
|
|
9
|
+
import * as c from "@zag-js/dialog";
|
|
10
|
+
import * as l from "@zag-js/popover";
|
|
11
|
+
import * as u from "@zag-js/hover-card";
|
|
12
|
+
import * as d from "@zag-js/menu";
|
|
13
|
+
import * as f from "@zag-js/toast";
|
|
14
|
+
import * as p from "@zag-js/number-input";
|
|
15
|
+
import * as m from "@zag-js/pin-input";
|
|
16
|
+
import * as h from "@zag-js/slider";
|
|
17
|
+
import * as g from "@zag-js/tags-input";
|
|
18
|
+
import * as _ from "@zag-js/editable";
|
|
19
|
+
import * as v from "@zag-js/toggle-group";
|
|
20
|
+
import * as y from "@zag-js/select";
|
|
21
|
+
import * as b from "@zag-js/combobox";
|
|
22
|
+
import * as x from "@zag-js/listbox";
|
|
23
|
+
import * as S from "@zag-js/tree-view";
|
|
24
|
+
import * as C from "@zag-js/pagination";
|
|
25
|
+
import * as w from "@zag-js/avatar";
|
|
26
|
+
import * as T from "@zag-js/progress";
|
|
27
|
+
import * as E from "@zag-js/rating-group";
|
|
28
|
+
import * as D from "@zag-js/carousel";
|
|
29
|
+
import * as O from "@zag-js/qr-code";
|
|
30
|
+
import * as k from "@zag-js/clipboard";
|
|
31
|
+
import * as A from "@zag-js/file-upload";
|
|
32
|
+
import * as j from "@zag-js/signature-pad";
|
|
33
|
+
import * as M from "@zag-js/date-picker";
|
|
34
|
+
import * as N from "@zag-js/time-picker";
|
|
35
|
+
import * as P from "@zag-js/timer";
|
|
36
|
+
import * as F from "@zag-js/steps";
|
|
37
|
+
import * as I from "@zag-js/tour";
|
|
38
|
+
import * as L from "@zag-js/splitter";
|
|
39
|
+
import * as R from "@zag-js/color-picker";
|
|
40
|
+
import * as z from "@zag-js/navigation-menu";
|
|
41
|
+
import * as B from "@zag-js/floating-panel";
|
|
42
|
+
//#region \0rolldown/runtime.js
|
|
43
|
+
var V = Object.defineProperty, H = (e, t) => {
|
|
44
|
+
let n = {};
|
|
45
|
+
for (var r in e) V(n, r, {
|
|
46
|
+
get: e[r],
|
|
47
|
+
enumerable: !0
|
|
48
|
+
});
|
|
49
|
+
return t || V(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
50
|
+
}, U = {
|
|
51
|
+
axis: "both",
|
|
52
|
+
threshold: 48,
|
|
53
|
+
velocityThreshold: .5,
|
|
54
|
+
disabled: !1
|
|
55
|
+
}, W = (e) => e === "horizontal" || e === "both", G = (e) => e === "vertical" || e === "both";
|
|
56
|
+
function K(e) {
|
|
57
|
+
return e === "horizontal" ? "pan-y" : e === "vertical" ? "pan-x" : "none";
|
|
58
|
+
}
|
|
59
|
+
function q(e = {}) {
|
|
60
|
+
let t = {
|
|
61
|
+
...U,
|
|
62
|
+
...e
|
|
63
|
+
}, n = !1, r = -1, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0, u = 0, d = null, f = (e, n) => ({
|
|
64
|
+
x: W(t.axis) ? e : 0,
|
|
65
|
+
y: G(t.axis) ? n : 0
|
|
66
|
+
}), p = (e) => {
|
|
67
|
+
if (!n || e.pointerId !== r) return;
|
|
68
|
+
let d = e.timeStamp - c || 16;
|
|
69
|
+
l = (e.clientX - o) / d, u = (e.clientY - s) / d, o = e.clientX, s = e.clientY, c = e.timeStamp, t.onSwipeMove?.(f(e.clientX - i, e.clientY - a));
|
|
70
|
+
}, m = (e) => {
|
|
71
|
+
if (!n || e.pointerId !== r) return;
|
|
72
|
+
let o = f(e.clientX - i, e.clientY - a), s = W(t.axis) ? l : 0, c = G(t.axis) ? u : 0, d = Math.abs(o.x) >= Math.abs(o.y), p = d ? o.x : o.y, m = d ? s : c, g = (Math.abs(p) >= t.threshold || Math.abs(m) >= t.velocityThreshold) && (p !== 0 || m !== 0);
|
|
73
|
+
if (g) {
|
|
74
|
+
let e = p === 0 ? m : p, n = d ? e < 0 ? "left" : "right" : e < 0 ? "up" : "down";
|
|
75
|
+
t.onSwipe?.({
|
|
76
|
+
direction: n,
|
|
77
|
+
offset: o,
|
|
78
|
+
velocity: {
|
|
79
|
+
x: s,
|
|
80
|
+
y: c
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
h(), t.onSwipeEnd?.({ swiped: g });
|
|
85
|
+
}, h = () => {
|
|
86
|
+
d && (d.removeEventListener("pointermove", p), d.removeEventListener("pointerup", m), d.removeEventListener("pointercancel", m)), n = !1, r = -1, d = null;
|
|
87
|
+
};
|
|
88
|
+
return {
|
|
89
|
+
pointerDown: (e) => {
|
|
90
|
+
if (!(t.disabled || n) && !(e.button != null && e.button !== 0)) {
|
|
91
|
+
if (n = !0, r = e.pointerId, i = o = e.clientX, a = s = e.clientY, c = e.timeStamp, l = u = 0, d = e.target?.ownerDocument?.defaultView ?? globalThis.window ?? null, !d) {
|
|
92
|
+
n = !1;
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
d.addEventListener("pointermove", p), d.addEventListener("pointerup", m), d.addEventListener("pointercancel", m), t.onSwipeStart?.();
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
update: (e) => {
|
|
99
|
+
t = {
|
|
100
|
+
...U,
|
|
101
|
+
...e
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
touchAction: () => K(t.axis),
|
|
105
|
+
destroy: h
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/swipe/index.ts
|
|
110
|
+
var J = /* @__PURE__ */ H({
|
|
111
|
+
createSwipe: () => q,
|
|
112
|
+
touchActionFor: () => K
|
|
113
|
+
}), Y = {
|
|
114
|
+
packageName: "@manti-ui/folds",
|
|
115
|
+
engine: "Zag.js",
|
|
116
|
+
status: "design-system"
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
export { a as accordion, w as avatar, D as carousel, n as checkbox, k as clipboard, i as collapsible, R as colorPicker, b as combobox, M as datePicker, c as dialog, _ as editable, A as fileUpload, B as floatingPanel, u as hoverCard, x as listbox, Y as mantiBehaviorContract, d as menu, z as navigationMenu, p as numberInput, C as pagination, m as pinInput, l as popover, T as progress, O as qrCode, r as radioGroup, E as ratingGroup, y as select, j as signaturePad, h as slider, L as splitter, F as steps, J as swipe, t as switchMachine, o as tabs, g as tagsInput, N as timePicker, P as timer, f as toast, e as toggle, v as toggleGroup, s as tooltip, I as tour, S as treeView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/swipe/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SwipeAxis, SwipeOptions } from './swipe.types';
|
|
2
|
+
/**
|
|
3
|
+
* The `touch-action` value that lets the browser keep handling scroll on the
|
|
4
|
+
* free axis while the gesture owns the swipe axis. Apply it to the swipe root.
|
|
5
|
+
*/
|
|
6
|
+
export declare function touchActionFor(axis: SwipeAxis): string;
|
|
7
|
+
/** A bound swipe controller. Drive it from a renderer's pointer handler. */
|
|
8
|
+
export interface SwipeControl {
|
|
9
|
+
/** Begin tracking a gesture. Wire to the root's `pointerdown`. */
|
|
10
|
+
pointerDown(event: PointerEvent): void;
|
|
11
|
+
/** Replace the live options (config + callbacks) without losing an in-flight drag. */
|
|
12
|
+
update(options: SwipeOptions): void;
|
|
13
|
+
/** The current `touch-action` for the root, derived from the axis. */
|
|
14
|
+
touchAction(): string;
|
|
15
|
+
/** Detach any in-flight window listeners. Idempotent; safe to call on unmount. */
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a framework-agnostic swipe controller. It owns only gesture math and
|
|
20
|
+
* pointer bookkeeping — it never touches layout or styles, so a renderer is free
|
|
21
|
+
* to translate the element, dismiss it, or ignore the motion entirely.
|
|
22
|
+
*
|
|
23
|
+
* Window-level move/up listeners are attached for the duration of a drag so the
|
|
24
|
+
* gesture survives the pointer leaving the element.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createSwipe(initial?: SwipeOptions): SwipeControl;
|
|
27
|
+
//# sourceMappingURL=swipe.core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipe.core.d.ts","sourceRoot":"","sources":["../../src/swipe/swipe.core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAET,YAAY,EAEb,MAAM,eAAe,CAAC;AAYvB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAItD;AAED,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACvC,sFAAsF;IACtF,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,sEAAsE;IACtE,WAAW,IAAI,MAAM,CAAC;IACtB,kFAAkF;IAClF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,YAAiB,GAAG,YAAY,CA2GpE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swipe — a Manti-original, framework-agnostic gesture primitive. Unlike the
|
|
3
|
+
* rest of `@manti-ui/folds`, it is not backed by a Zag.js machine (Zag has no
|
|
4
|
+
* swipe component); it is plain DOM + TypeScript so any renderer can consume it.
|
|
5
|
+
*/
|
|
6
|
+
/** Axes a swipe is allowed to travel along. */
|
|
7
|
+
export type SwipeAxis = 'horizontal' | 'vertical' | 'both';
|
|
8
|
+
/** Resolved swipe direction, reported once a gesture crosses the threshold. */
|
|
9
|
+
export type SwipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
10
|
+
/** A 2D vector in CSS pixels. */
|
|
11
|
+
export interface SwipeVector {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}
|
|
15
|
+
/** Payload emitted when a gesture is recognized as a swipe. */
|
|
16
|
+
export interface SwipeDetails {
|
|
17
|
+
/** The dominant direction of travel. */
|
|
18
|
+
direction: SwipeDirection;
|
|
19
|
+
/** Total axis-constrained offset, in pixels, at release. */
|
|
20
|
+
offset: SwipeVector;
|
|
21
|
+
/** Pointer velocity at release, in pixels per millisecond. */
|
|
22
|
+
velocity: SwipeVector;
|
|
23
|
+
}
|
|
24
|
+
/** Lifecycle callbacks fired across a gesture. */
|
|
25
|
+
export interface SwipeHandlers {
|
|
26
|
+
/** Pointer pressed and a gesture began tracking. */
|
|
27
|
+
onSwipeStart?: () => void;
|
|
28
|
+
/** Pointer moved; receives the current axis-constrained offset. */
|
|
29
|
+
onSwipeMove?: (offset: SwipeVector) => void;
|
|
30
|
+
/** Released past the distance or velocity threshold. */
|
|
31
|
+
onSwipe?: (details: SwipeDetails) => void;
|
|
32
|
+
/** Gesture finished; `swiped` is true when {@link SwipeHandlers.onSwipe} fired. */
|
|
33
|
+
onSwipeEnd?: (details: {
|
|
34
|
+
swiped: boolean;
|
|
35
|
+
}) => void;
|
|
36
|
+
}
|
|
37
|
+
/** Configuration for {@link createSwipe}. */
|
|
38
|
+
export interface SwipeOptions extends SwipeHandlers {
|
|
39
|
+
/** Axis the gesture may travel along. @default 'both' */
|
|
40
|
+
axis?: SwipeAxis;
|
|
41
|
+
/** Distance in pixels the pointer must travel to recognize a swipe. @default 48 */
|
|
42
|
+
threshold?: number;
|
|
43
|
+
/** Flick velocity (px/ms) that recognizes a swipe regardless of distance. @default 0.5 */
|
|
44
|
+
velocityThreshold?: number;
|
|
45
|
+
/** When true the gesture is inert. @default false */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=swipe.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipe.types.d.ts","sourceRoot":"","sources":["../../src/swipe/swipe.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAE3D,+EAA+E;AAC/E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;AAE9D,iCAAiC;AACjC,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,SAAS,EAAE,cAAc,CAAC;IAC1B,4DAA4D;IAC5D,MAAM,EAAE,WAAW,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,mEAAmE;IACnE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,mFAAmF;IACnF,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD;AAED,6CAA6C;AAC7C,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@manti-ui/folds",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-agnostic Zag.js behavior contracts for Manti UI.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://manti.design",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/manti-ui/ui.git",
|
|
10
|
+
"directory": "packages/folds"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"design-system",
|
|
14
|
+
"zag-js",
|
|
15
|
+
"state-machine",
|
|
16
|
+
"headless",
|
|
17
|
+
"ui"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"module": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@zag-js/accordion": "^1.41.2",
|
|
38
|
+
"@zag-js/avatar": "^1.41.2",
|
|
39
|
+
"@zag-js/carousel": "^1.41.2",
|
|
40
|
+
"@zag-js/checkbox": "^1.41.2",
|
|
41
|
+
"@zag-js/clipboard": "^1.41.2",
|
|
42
|
+
"@zag-js/collapsible": "^1.41.2",
|
|
43
|
+
"@zag-js/color-picker": "^1.41.2",
|
|
44
|
+
"@zag-js/combobox": "^1.41.2",
|
|
45
|
+
"@zag-js/date-picker": "^1.41.2",
|
|
46
|
+
"@zag-js/dialog": "^1.41.2",
|
|
47
|
+
"@zag-js/editable": "^1.41.2",
|
|
48
|
+
"@zag-js/file-upload": "^1.41.2",
|
|
49
|
+
"@zag-js/floating-panel": "^1.41.2",
|
|
50
|
+
"@zag-js/hover-card": "^1.41.2",
|
|
51
|
+
"@zag-js/listbox": "^1.41.2",
|
|
52
|
+
"@zag-js/menu": "^1.41.2",
|
|
53
|
+
"@zag-js/navigation-menu": "^1.41.2",
|
|
54
|
+
"@zag-js/number-input": "^1.41.2",
|
|
55
|
+
"@zag-js/pagination": "^1.41.2",
|
|
56
|
+
"@zag-js/pin-input": "^1.41.2",
|
|
57
|
+
"@zag-js/popover": "^1.41.2",
|
|
58
|
+
"@zag-js/progress": "^1.41.2",
|
|
59
|
+
"@zag-js/qr-code": "^1.41.2",
|
|
60
|
+
"@zag-js/radio-group": "^1.41.2",
|
|
61
|
+
"@zag-js/rating-group": "^1.41.2",
|
|
62
|
+
"@zag-js/select": "^1.41.2",
|
|
63
|
+
"@zag-js/signature-pad": "^1.41.2",
|
|
64
|
+
"@zag-js/slider": "^1.41.2",
|
|
65
|
+
"@zag-js/splitter": "^1.41.2",
|
|
66
|
+
"@zag-js/steps": "^1.41.2",
|
|
67
|
+
"@zag-js/switch": "^1.41.2",
|
|
68
|
+
"@zag-js/tabs": "^1.41.2",
|
|
69
|
+
"@zag-js/tags-input": "^1.41.2",
|
|
70
|
+
"@zag-js/time-picker": "^1.22.1",
|
|
71
|
+
"@zag-js/timer": "^1.41.2",
|
|
72
|
+
"@zag-js/toast": "^1.41.2",
|
|
73
|
+
"@zag-js/toggle": "^1.41.2",
|
|
74
|
+
"@zag-js/toggle-group": "^1.41.2",
|
|
75
|
+
"@zag-js/tooltip": "^1.41.2",
|
|
76
|
+
"@zag-js/tour": "^1.41.2",
|
|
77
|
+
"@zag-js/tree-view": "^1.41.2"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
81
|
+
"typecheck": "tsc --noEmit"
|
|
82
|
+
}
|
|
83
|
+
}
|