@ark-ui/solid 5.6.0 → 5.7.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/dist/chunk/{4UD3WT4B.js → 4WYA5KR4.js} +1 -1
- package/dist/chunk/AV7SXJRY.js +1057 -0
- package/dist/chunk/{VDDVCRFC.jsx → BXAUWHBZ.jsx} +6 -4
- package/dist/chunk/{N4O7ZKCJ.jsx → BZLIWOGC.jsx} +4 -4
- package/dist/chunk/{EEG3DZXG.jsx → CRWRK56B.jsx} +4 -3
- package/dist/chunk/ETB2BIQZ.jsx +30 -0
- package/dist/chunk/{G2DDCQSJ.jsx → MJEKBIW2.jsx} +83 -50
- package/dist/chunk/{OF3ALDDY.js → NRTYOILY.js} +3 -1
- package/dist/chunk/PKUUD527.js +25 -0
- package/dist/chunk/RU4LLCFH.jsx +1128 -0
- package/dist/chunk/{MM2I4S7S.jsx → SPPHU23S.jsx} +4 -4
- package/dist/chunk/{SSZEXBY3.js → TG7JP4BU.js} +78 -44
- package/dist/components/accordion/index.jsx +3 -3
- package/dist/components/angle-slider/index.jsx +2 -2
- package/dist/components/avatar/index.jsx +2 -2
- package/dist/components/carousel/index.jsx +2 -2
- package/dist/components/checkbox/index.jsx +2 -2
- package/dist/components/clipboard/index.jsx +1 -1
- package/dist/components/collapsible/index.jsx +2 -2
- package/dist/components/collection.d.ts +1 -1
- package/dist/components/color-picker/index.jsx +2 -2
- package/dist/components/combobox/index.jsx +2 -2
- package/dist/components/date-picker/index.jsx +2 -2
- package/dist/components/dialog/index.jsx +2 -2
- package/dist/components/download-trigger/index.jsx +1 -1
- package/dist/components/editable/index.jsx +2 -2
- package/dist/components/file-upload/index.jsx +2 -2
- package/dist/components/floating-panel/index.js +1 -1
- package/dist/components/floating-panel/index.jsx +3 -2
- package/dist/components/format/index.jsx +1 -1
- package/dist/components/frame/index.jsx +1 -1
- package/dist/components/hover-card/index.jsx +2 -2
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +20 -19
- package/dist/components/index.jsx +319 -284
- package/dist/components/listbox/index.d.ts +113 -0
- package/dist/components/listbox/index.js +2 -0
- package/dist/components/listbox/index.jsx +49 -0
- package/dist/components/menu/index.jsx +2 -2
- package/dist/components/number-input/index.jsx +2 -2
- package/dist/components/pagination/index.jsx +2 -2
- package/dist/components/pin-input/index.jsx +2 -2
- package/dist/components/popover/index.jsx +2 -2
- package/dist/components/progress/index.jsx +2 -2
- package/dist/components/qr-code/index.jsx +2 -2
- package/dist/components/radio-group/index.jsx +2 -2
- package/dist/components/rating-group/index.jsx +2 -2
- package/dist/components/segment-group/index.jsx +2 -2
- package/dist/components/select/index.jsx +2 -2
- package/dist/components/signature-pad/index.jsx +2 -2
- package/dist/components/slider/index.jsx +2 -2
- package/dist/components/splitter/index.jsx +2 -2
- package/dist/components/steps/index.jsx +2 -2
- package/dist/components/switch/index.jsx +2 -2
- package/dist/components/tabs/index.jsx +2 -2
- package/dist/components/tags-input/index.jsx +2 -2
- package/dist/components/time-picker/index.jsx +2 -2
- package/dist/components/timer/index.jsx +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +2 -2
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.jsx +2 -2
- package/dist/components/tooltip/index.jsx +2 -2
- package/dist/components/tour/index.jsx +2 -2
- package/dist/components/tree-view/index.jsx +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20 -19
- package/dist/index.jsx +322 -287
- package/dist/providers/index.jsx +4 -4
- package/package.json +61 -60
- package/dist/chunk/{Z254KIAA.jsx → 2ZIPSG6O.jsx} +3 -3
- package/dist/chunk/{MA35L6TV.jsx → 3GZBI3C7.jsx} +3 -3
- package/dist/chunk/{AD2EIGNX.jsx → 3RSBQIQ3.jsx} +3 -3
- package/dist/chunk/{E7EIHMW2.js → 5I3KMKOJ.js} +0 -0
- package/dist/chunk/{O6XGGFFV.jsx → 64OEA2DF.jsx} +3 -3
- package/dist/chunk/{7LCINU3A.jsx → ASFHFF7Y.jsx} +3 -3
- package/dist/chunk/{MSINFF7E.jsx → BWOFNO5N.jsx} +3 -3
- package/dist/chunk/{TM5I6GID.jsx → CLX4TELO.jsx} +3 -3
- package/dist/chunk/{QN2KHWAW.jsx → CMXNP72H.jsx} +3 -3
- package/dist/chunk/{YPH7FBUN.jsx → D4UVDNW5.jsx} +3 -3
- package/dist/chunk/{IKA3JJFV.jsx → ENH3JQLY.jsx} +3 -3
- package/dist/chunk/{AMEMCPNB.jsx → EX2VGSCG.jsx} +3 -3
- package/dist/chunk/{CHLRHJV2.jsx → FHEJON2W.jsx} +3 -3
- package/dist/chunk/{AYESR2LP.jsx → FUGFSIYK.jsx} +3 -3
- package/dist/chunk/{ROFVSOHA.jsx → HNF2QPQ2.jsx} +3 -3
- package/dist/chunk/{XH6HBC54.jsx → IEGQ2BAU.jsx} +0 -0
- package/dist/chunk/{Y3WE2S3D.jsx → IOLALG7A.jsx} +3 -3
- package/dist/chunk/{RY6GW37O.jsx → ISCBIWKW.jsx} +3 -3
- package/dist/chunk/{7TPJ7KWF.jsx → JZVFV4VZ.jsx} +3 -3
- package/dist/chunk/{F4L2MTJA.jsx → KRJNIKO2.jsx} +3 -3
- package/dist/chunk/{ZDKSAOA5.jsx → KWT5RGLQ.jsx} +3 -3
- package/dist/chunk/{JTNTC6FF.jsx → L3SIBBML.jsx} +3 -3
- package/dist/chunk/{DJIEVIL4.jsx → LI7J6F7D.jsx} +3 -3
- package/dist/chunk/{K5AG7O7B.jsx → LKX2UAMN.jsx} +3 -3
- package/dist/chunk/{XZZ6TULR.jsx → MD7PHDJK.jsx} +3 -3
- package/dist/chunk/{JN5MJP56.jsx → MTVAX7XO.jsx} +3 -3
- package/dist/chunk/{WR7AKRSO.jsx → N26ZXGSY.jsx} +3 -3
- package/dist/chunk/{UGS5HMDP.jsx → PDTJBVF6.jsx} +3 -3
- package/dist/chunk/{YIVTZ7BP.jsx → QXPKPCGG.jsx} +3 -3
- package/dist/chunk/{4QD4ZSJK.jsx → ROA4DJEO.jsx} +3 -3
- package/dist/chunk/{CRYRP5LM.jsx → SMZBI5QA.jsx} +3 -3
- package/dist/chunk/{T3IKIVSG.jsx → TKQSSFZN.jsx} +3 -3
- package/dist/chunk/{DXWAFMGQ.jsx → VWUOL2OR.jsx} +3 -3
- package/dist/chunk/{KLURGV6W.jsx → WKJMOIA7.jsx} +3 -3
- package/dist/chunk/{2H2BP2D4.jsx → YIOS67AB.jsx} +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ark
|
|
3
3
|
} from "./UFYZ7HLU.jsx";
|
|
4
|
-
import {
|
|
5
|
-
useEnvironmentContext
|
|
6
|
-
} from "./D2Z5BEON.jsx";
|
|
7
4
|
import {
|
|
8
5
|
useLocaleContext
|
|
9
6
|
} from "./RCXMZN3G.jsx";
|
|
7
|
+
import {
|
|
8
|
+
useEnvironmentContext
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createContext
|
|
12
12
|
} from "./TVCIHLER.jsx";
|
|
@@ -104,10 +104,12 @@ var Toaster = (props) => {
|
|
|
104
104
|
</ark.div>;
|
|
105
105
|
};
|
|
106
106
|
var ToastActor = (props) => {
|
|
107
|
+
const env = useEnvironmentContext();
|
|
107
108
|
const localProps = createMemo(() => ({
|
|
108
109
|
...props.value(),
|
|
109
110
|
parent: props.parent,
|
|
110
|
-
index: props.index()
|
|
111
|
+
index: props.index(),
|
|
112
|
+
getRootNode: env().getRootNode
|
|
111
113
|
}));
|
|
112
114
|
const service = useMachine(toast2.machine, localProps);
|
|
113
115
|
const api = createMemo(() => toast2.connect(service, normalizeProps));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collapsible_exports,
|
|
3
3
|
useCollapsibleContext
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./FUGFSIYK.jsx";
|
|
5
5
|
import {
|
|
6
6
|
RenderStrategyProvider,
|
|
7
7
|
splitRenderStrategyProps,
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
ark
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
|
-
import {
|
|
17
|
-
useEnvironmentContext
|
|
18
|
-
} from "./D2Z5BEON.jsx";
|
|
19
16
|
import {
|
|
20
17
|
useLocaleContext
|
|
21
18
|
} from "./RCXMZN3G.jsx";
|
|
19
|
+
import {
|
|
20
|
+
useEnvironmentContext
|
|
21
|
+
} from "./D2Z5BEON.jsx";
|
|
22
22
|
import {
|
|
23
23
|
createContext
|
|
24
24
|
} from "./TVCIHLER.jsx";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ark
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
|
-
import {
|
|
8
|
-
useEnvironmentContext
|
|
9
|
-
} from "./D2Z5BEON.jsx";
|
|
10
7
|
import {
|
|
11
8
|
useLocaleContext
|
|
12
9
|
} from "./RCXMZN3G.jsx";
|
|
10
|
+
import {
|
|
11
|
+
useEnvironmentContext
|
|
12
|
+
} from "./D2Z5BEON.jsx";
|
|
13
13
|
import {
|
|
14
14
|
createContext
|
|
15
15
|
} from "./TVCIHLER.jsx";
|
|
@@ -63,6 +63,7 @@ var useToggleGroup = (props) => {
|
|
|
63
63
|
var ToggleGroupRoot = (props) => {
|
|
64
64
|
const [useToggleGroupProps, restProps] = createSplitProps()(props, [
|
|
65
65
|
"defaultValue",
|
|
66
|
+
"deselectable",
|
|
66
67
|
"disabled",
|
|
67
68
|
"id",
|
|
68
69
|
"ids",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// ../../node_modules/@zag-js/core/dist/index.mjs
|
|
2
|
+
import { callAll, isEqual, isString } from "@zag-js/utils";
|
|
3
|
+
import { getActiveElement, getDocument } from "@zag-js/dom-query";
|
|
4
|
+
function createGuards() {
|
|
5
|
+
return {
|
|
6
|
+
and: (...guards) => {
|
|
7
|
+
return function andGuard(params) {
|
|
8
|
+
return guards.every((str) => params.guard(str));
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
or: (...guards) => {
|
|
12
|
+
return function orGuard(params) {
|
|
13
|
+
return guards.some((str) => params.guard(str));
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
not: (guard) => {
|
|
17
|
+
return function notGuard(params) {
|
|
18
|
+
return !params.guard(guard);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function createMachine(config) {
|
|
24
|
+
return config;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
createGuards,
|
|
29
|
+
createMachine
|
|
30
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGuards,
|
|
3
|
+
createMachine
|
|
4
|
+
} from "./ETB2BIQZ.jsx";
|
|
1
5
|
import {
|
|
2
6
|
PresenceProvider,
|
|
3
7
|
splitPresenceProps,
|
|
@@ -10,12 +14,12 @@ import {
|
|
|
10
14
|
import {
|
|
11
15
|
ark
|
|
12
16
|
} from "./UFYZ7HLU.jsx";
|
|
13
|
-
import {
|
|
14
|
-
useEnvironmentContext
|
|
15
|
-
} from "./D2Z5BEON.jsx";
|
|
16
17
|
import {
|
|
17
18
|
useLocaleContext
|
|
18
19
|
} from "./RCXMZN3G.jsx";
|
|
20
|
+
import {
|
|
21
|
+
useEnvironmentContext
|
|
22
|
+
} from "./D2Z5BEON.jsx";
|
|
19
23
|
import {
|
|
20
24
|
createContext
|
|
21
25
|
} from "./TVCIHLER.jsx";
|
|
@@ -501,33 +505,7 @@ function transformRect(rect, transform, normalized = true) {
|
|
|
501
505
|
}
|
|
502
506
|
|
|
503
507
|
// ../../node_modules/@zag-js/floating-panel/dist/index.mjs
|
|
504
|
-
import { invariant, match, pick, ensureProps, createSplitProps as createSplitProps2, toPx } from "@zag-js/utils";
|
|
505
|
-
|
|
506
|
-
// ../../node_modules/@zag-js/core/dist/index.mjs
|
|
507
|
-
import { callAll, isEqual, isString } from "@zag-js/utils";
|
|
508
|
-
import { getActiveElement, getDocument } from "@zag-js/dom-query";
|
|
509
|
-
function createGuards() {
|
|
510
|
-
return {
|
|
511
|
-
and: (...guards) => {
|
|
512
|
-
return function andGuard(params) {
|
|
513
|
-
return guards.every((str) => params.guard(str));
|
|
514
|
-
};
|
|
515
|
-
},
|
|
516
|
-
or: (...guards) => {
|
|
517
|
-
return function orGuard(params) {
|
|
518
|
-
return guards.some((str) => params.guard(str));
|
|
519
|
-
};
|
|
520
|
-
},
|
|
521
|
-
not: (guard) => {
|
|
522
|
-
return function notGuard(params) {
|
|
523
|
-
return !params.guard(guard);
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
function createMachine(config) {
|
|
529
|
-
return config;
|
|
530
|
-
}
|
|
508
|
+
import { invariant, match, pick, clampValue, ensureProps, createSplitProps as createSplitProps2, toPx } from "@zag-js/utils";
|
|
531
509
|
|
|
532
510
|
// ../../node_modules/proxy-compare/dist/index.js
|
|
533
511
|
var TRACK_MEMO_SYMBOL = Symbol();
|
|
@@ -931,7 +909,8 @@ function connect(service, normalize) {
|
|
|
931
909
|
onClick(event) {
|
|
932
910
|
if (event.defaultPrevented) return;
|
|
933
911
|
if (prop("disabled")) return;
|
|
934
|
-
|
|
912
|
+
const open2 = state.hasTag("open");
|
|
913
|
+
send({ type: open2 ? "CLOSE" : "OPEN", src: "trigger" });
|
|
935
914
|
}
|
|
936
915
|
});
|
|
937
916
|
},
|
|
@@ -1168,7 +1147,7 @@ var panelStack = proxy({
|
|
|
1168
1147
|
return this.stack.indexOf(id);
|
|
1169
1148
|
}
|
|
1170
1149
|
});
|
|
1171
|
-
var { not } = createGuards();
|
|
1150
|
+
var { not, and } = createGuards();
|
|
1172
1151
|
var defaultTranslations = {
|
|
1173
1152
|
minimize: "Minimize window",
|
|
1174
1153
|
maximize: "Maximize window",
|
|
@@ -1178,7 +1157,7 @@ var machine = createMachine({
|
|
|
1178
1157
|
props({ props: props2 }) {
|
|
1179
1158
|
ensureProps(props2, ["id"], "floating-panel");
|
|
1180
1159
|
return {
|
|
1181
|
-
strategy: "
|
|
1160
|
+
strategy: "fixed",
|
|
1182
1161
|
gridSize: 1,
|
|
1183
1162
|
defaultSize: { width: 320, height: 240 },
|
|
1184
1163
|
defaultPosition: { x: 300, y: 100 },
|
|
@@ -1277,10 +1256,20 @@ var machine = createMachine({
|
|
|
1277
1256
|
closed: {
|
|
1278
1257
|
tags: ["closed"],
|
|
1279
1258
|
on: {
|
|
1280
|
-
OPEN: {
|
|
1259
|
+
"CONTROLLED.OPEN": {
|
|
1281
1260
|
target: "open",
|
|
1282
|
-
actions: ["
|
|
1283
|
-
}
|
|
1261
|
+
actions: ["setAnchorPosition", "setPositionStyle", "setSizeStyle", "focusContentEl"]
|
|
1262
|
+
},
|
|
1263
|
+
OPEN: [
|
|
1264
|
+
{
|
|
1265
|
+
guard: "isOpenControlled",
|
|
1266
|
+
actions: ["invokeOnOpen"]
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
target: "open",
|
|
1270
|
+
actions: ["invokeOnOpen", "setAnchorPosition", "setPositionStyle", "setSizeStyle", "focusContentEl"]
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1284
1273
|
}
|
|
1285
1274
|
},
|
|
1286
1275
|
open: {
|
|
@@ -1298,15 +1287,32 @@ var machine = createMachine({
|
|
|
1298
1287
|
target: "open.resizing",
|
|
1299
1288
|
actions: ["setPrevSize"]
|
|
1300
1289
|
},
|
|
1301
|
-
CLOSE: {
|
|
1290
|
+
"CONTROLLED.CLOSE": {
|
|
1302
1291
|
target: "closed",
|
|
1303
|
-
actions: ["
|
|
1304
|
-
},
|
|
1305
|
-
ESCAPE: {
|
|
1306
|
-
guard: "closeOnEsc",
|
|
1307
|
-
target: "closed",
|
|
1308
|
-
actions: ["invokeOnClose", "resetRect", "focusTriggerEl"]
|
|
1292
|
+
actions: ["resetRect", "focusTriggerEl"]
|
|
1309
1293
|
},
|
|
1294
|
+
CLOSE: [
|
|
1295
|
+
{
|
|
1296
|
+
guard: "isOpenControlled",
|
|
1297
|
+
target: "closed",
|
|
1298
|
+
actions: ["invokeOnClose"]
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
target: "closed",
|
|
1302
|
+
actions: ["invokeOnClose", "resetRect", "focusTriggerEl"]
|
|
1303
|
+
}
|
|
1304
|
+
],
|
|
1305
|
+
ESCAPE: [
|
|
1306
|
+
{
|
|
1307
|
+
guard: and("isOpenControlled", "closeOnEsc"),
|
|
1308
|
+
actions: ["invokeOnClose"]
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
guard: "closeOnEsc",
|
|
1312
|
+
target: "closed",
|
|
1313
|
+
actions: ["invokeOnClose", "resetRect", "focusTriggerEl"]
|
|
1314
|
+
}
|
|
1315
|
+
],
|
|
1310
1316
|
MINIMIZE: {
|
|
1311
1317
|
actions: ["setMinimized"]
|
|
1312
1318
|
},
|
|
@@ -1333,10 +1339,21 @@ var machine = createMachine({
|
|
|
1333
1339
|
target: "open",
|
|
1334
1340
|
actions: ["invokeOnDragEnd"]
|
|
1335
1341
|
},
|
|
1336
|
-
CLOSE: {
|
|
1342
|
+
"CONTROLLED.CLOSE": {
|
|
1337
1343
|
target: "closed",
|
|
1338
|
-
actions: ["
|
|
1344
|
+
actions: ["resetRect"]
|
|
1339
1345
|
},
|
|
1346
|
+
CLOSE: [
|
|
1347
|
+
{
|
|
1348
|
+
guard: "isOpenControlled",
|
|
1349
|
+
target: "closed",
|
|
1350
|
+
actions: ["invokeOnClose"]
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
target: "closed",
|
|
1354
|
+
actions: ["invokeOnClose", "resetRect"]
|
|
1355
|
+
}
|
|
1356
|
+
],
|
|
1340
1357
|
ESCAPE: {
|
|
1341
1358
|
target: "open"
|
|
1342
1359
|
}
|
|
@@ -1354,10 +1371,21 @@ var machine = createMachine({
|
|
|
1354
1371
|
target: "open",
|
|
1355
1372
|
actions: ["invokeOnResizeEnd"]
|
|
1356
1373
|
},
|
|
1357
|
-
CLOSE: {
|
|
1374
|
+
"CONTROLLED.CLOSE": {
|
|
1358
1375
|
target: "closed",
|
|
1359
|
-
actions: ["
|
|
1376
|
+
actions: ["resetRect"]
|
|
1360
1377
|
},
|
|
1378
|
+
CLOSE: [
|
|
1379
|
+
{
|
|
1380
|
+
guard: "isOpenControlled",
|
|
1381
|
+
target: "closed",
|
|
1382
|
+
actions: ["invokeOnClose"]
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
target: "closed",
|
|
1386
|
+
actions: ["invokeOnClose", "resetRect"]
|
|
1387
|
+
}
|
|
1388
|
+
],
|
|
1361
1389
|
ESCAPE: {
|
|
1362
1390
|
target: "open"
|
|
1363
1391
|
}
|
|
@@ -1368,15 +1396,20 @@ var machine = createMachine({
|
|
|
1368
1396
|
guards: {
|
|
1369
1397
|
closeOnEsc: ({ prop }) => !!prop("closeOnEscape"),
|
|
1370
1398
|
isMaximized: ({ context }) => context.get("stage") === "maximized",
|
|
1371
|
-
isMinimized: ({ context }) => context.get("stage") === "minimized"
|
|
1399
|
+
isMinimized: ({ context }) => context.get("stage") === "minimized",
|
|
1400
|
+
isOpenControlled: ({ prop }) => prop("open") != void 0
|
|
1372
1401
|
},
|
|
1373
1402
|
effects: {
|
|
1374
|
-
trackPointerMove({ scope, send, event: evt }) {
|
|
1403
|
+
trackPointerMove({ scope, send, event: evt, prop }) {
|
|
1375
1404
|
const doc = scope.getDoc();
|
|
1405
|
+
const boundaryEl = prop("getBoundaryEl")?.();
|
|
1406
|
+
const boundaryRect = getBoundaryRect(scope, boundaryEl, false);
|
|
1376
1407
|
return trackPointerMove(doc, {
|
|
1377
1408
|
onPointerMove({ point, event }) {
|
|
1378
1409
|
const { altKey, shiftKey } = event;
|
|
1379
|
-
|
|
1410
|
+
let x = clampValue(point.x, boundaryRect.x, boundaryRect.x + boundaryRect.width);
|
|
1411
|
+
let y = clampValue(point.y, boundaryRect.y, boundaryRect.y + boundaryRect.height);
|
|
1412
|
+
send({ type: "DRAG", position: { x, y }, axis: evt.axis, altKey, shiftKey });
|
|
1380
1413
|
},
|
|
1381
1414
|
onPointerUp() {
|
|
1382
1415
|
send({ type: "DRAG_END" });
|
|
@@ -87,10 +87,12 @@ var Toaster = (props) => {
|
|
|
87
87
|
}));
|
|
88
88
|
};
|
|
89
89
|
var ToastActor = (props) => {
|
|
90
|
+
const env = useEnvironmentContext();
|
|
90
91
|
const localProps = createMemo(() => ({
|
|
91
92
|
...props.value(),
|
|
92
93
|
parent: props.parent,
|
|
93
|
-
index: props.index()
|
|
94
|
+
index: props.index(),
|
|
95
|
+
getRootNode: env().getRootNode
|
|
94
96
|
}));
|
|
95
97
|
const service = useMachine(toast2.machine, localProps);
|
|
96
98
|
const api = createMemo(() => toast2.connect(service, normalizeProps));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ../../node_modules/@zag-js/core/dist/index.mjs
|
|
2
|
+
function createGuards() {
|
|
3
|
+
return {
|
|
4
|
+
and: (...guards) => {
|
|
5
|
+
return function andGuard(params) {
|
|
6
|
+
return guards.every((str) => params.guard(str));
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
or: (...guards) => {
|
|
10
|
+
return function orGuard(params) {
|
|
11
|
+
return guards.some((str) => params.guard(str));
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
not: (guard) => {
|
|
15
|
+
return function notGuard(params) {
|
|
16
|
+
return !params.guard(guard);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function createMachine(config) {
|
|
22
|
+
return config;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { createGuards, createMachine };
|