@sprawlify/primitives 0.1.10 → 0.1.12
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/{collection-BBgC8xCb.cjs → collection-D0Abtxc0.cjs} +68 -0
- package/dist/{collection-DgzidRvr.mjs → collection-GSpaYJ2f.mjs} +45 -1
- package/dist/collection.cjs +5 -1
- package/dist/collection.d.cts +49 -3
- package/dist/collection.d.mts +49 -3
- package/dist/collection.mjs +2 -2
- package/dist/{focus-trap-BewqTQFt.cjs → focus-trap-BbU9QXMe.cjs} +1 -1
- package/dist/{focus-trap-Do8IUXYh.mjs → focus-trap-CzhQ01j4.mjs} +1 -1
- package/dist/focus-trap.cjs +1 -1
- package/dist/focus-trap.mjs +1 -1
- package/dist/{list-collection-B_8BN0XB.d.cts → list-collection-Cjgbx_9l.d.cts} +1 -1
- package/dist/{list-collection-DkRA5LOq.d.mts → list-collection-IF510iNl.d.mts} +1 -1
- package/dist/machines/accordion/index.d.cts +1 -1
- package/dist/machines/accordion/index.d.mts +1 -1
- package/dist/machines/angle-slider/index.d.cts +1 -1
- package/dist/machines/angle-slider/index.d.mts +1 -1
- package/dist/machines/cascade-select/index.cjs +1 -1
- package/dist/machines/cascade-select/index.d.cts +2 -2
- package/dist/machines/cascade-select/index.d.mts +2 -2
- package/dist/machines/cascade-select/index.mjs +1 -1
- package/dist/machines/clipboard/index.d.cts +1 -1
- package/dist/machines/clipboard/index.d.mts +1 -1
- package/dist/machines/collapsible/index.d.cts +1 -1
- package/dist/machines/collapsible/index.d.mts +1 -1
- package/dist/machines/color-picker/index.d.cts +1 -1
- package/dist/machines/color-picker/index.d.mts +1 -1
- package/dist/machines/combobox/index.cjs +279 -355
- package/dist/machines/combobox/index.d.cts +5 -4
- package/dist/machines/combobox/index.d.mts +5 -4
- package/dist/machines/combobox/index.mjs +279 -355
- package/dist/machines/date-input/index.cjs +1830 -0
- package/dist/machines/date-input/index.d.cts +223 -0
- package/dist/machines/date-input/index.d.mts +223 -0
- package/dist/machines/date-input/index.mjs +1813 -0
- package/dist/machines/date-picker/index.d.cts +1 -1
- package/dist/machines/date-picker/index.d.mts +1 -1
- package/dist/machines/dialog/index.cjs +1 -1
- package/dist/machines/dialog/index.d.cts +1 -1
- package/dist/machines/dialog/index.d.mts +1 -1
- package/dist/machines/dialog/index.mjs +1 -1
- package/dist/machines/drawer/index.cjs +1 -1
- package/dist/machines/drawer/index.d.cts +1 -1
- package/dist/machines/drawer/index.d.mts +1 -1
- package/dist/machines/drawer/index.mjs +1 -1
- package/dist/machines/dropdown-menu/index.d.cts +1 -1
- package/dist/machines/dropdown-menu/index.d.mts +1 -1
- package/dist/machines/editable/index.d.cts +1 -1
- package/dist/machines/editable/index.d.mts +1 -1
- package/dist/machines/file-upload/index.d.cts +1 -1
- package/dist/machines/file-upload/index.d.mts +1 -1
- package/dist/machines/floating-panel/index.d.cts +1 -1
- package/dist/machines/floating-panel/index.d.mts +1 -1
- package/dist/machines/hover-card/index.d.cts +1 -1
- package/dist/machines/hover-card/index.d.mts +1 -1
- package/dist/machines/listbox/index.cjs +41 -16
- package/dist/machines/listbox/index.d.cts +5 -4
- package/dist/machines/listbox/index.d.mts +5 -4
- package/dist/machines/listbox/index.mjs +42 -17
- package/dist/machines/marquee/index.d.cts +2 -2
- package/dist/machines/marquee/index.d.mts +2 -2
- package/dist/machines/navigation-menu/index.d.cts +1 -1
- package/dist/machines/navigation-menu/index.d.mts +1 -1
- package/dist/machines/number-input/index.d.cts +1 -1
- package/dist/machines/number-input/index.d.mts +1 -1
- package/dist/machines/password-input/index.d.cts +1 -1
- package/dist/machines/password-input/index.d.mts +1 -1
- package/dist/machines/pin-input/index.d.cts +1 -1
- package/dist/machines/pin-input/index.d.mts +1 -1
- package/dist/machines/popover/index.cjs +1 -1
- package/dist/machines/popover/index.d.cts +1 -1
- package/dist/machines/popover/index.d.mts +1 -1
- package/dist/machines/popover/index.mjs +1 -1
- package/dist/machines/progress/index.d.cts +1 -1
- package/dist/machines/progress/index.d.mts +1 -1
- package/dist/machines/select/index.cjs +47 -18
- package/dist/machines/select/index.d.cts +4 -3
- package/dist/machines/select/index.d.mts +4 -3
- package/dist/machines/select/index.mjs +48 -19
- package/dist/machines/signature-pad/index.d.cts +1 -1
- package/dist/machines/signature-pad/index.d.mts +1 -1
- package/dist/machines/slider/index.d.cts +1 -1
- package/dist/machines/slider/index.d.mts +1 -1
- package/dist/machines/steps/index.d.cts +1 -1
- package/dist/machines/steps/index.d.mts +1 -1
- package/dist/machines/switch/index.d.cts +1 -1
- package/dist/machines/switch/index.d.mts +1 -1
- package/dist/machines/tabs/index.d.cts +1 -1
- package/dist/machines/tabs/index.d.mts +1 -1
- package/dist/machines/tags-input/index.d.cts +1 -1
- package/dist/machines/tags-input/index.d.mts +1 -1
- package/dist/machines/timer/index.d.cts +1 -1
- package/dist/machines/timer/index.d.mts +1 -1
- package/dist/machines/toast/index.d.cts +1 -1
- package/dist/machines/toast/index.d.mts +1 -1
- package/dist/machines/tooltip/index.d.cts +1 -1
- package/dist/machines/tooltip/index.d.mts +1 -1
- package/dist/machines/tour/index.cjs +1 -1
- package/dist/machines/tour/index.d.cts +1 -1
- package/dist/machines/tour/index.d.mts +1 -1
- package/dist/machines/tour/index.mjs +1 -1
- package/dist/machines/tree-view/index.cjs +1 -1
- package/dist/machines/tree-view/index.d.cts +1 -1
- package/dist/machines/tree-view/index.d.mts +1 -1
- package/dist/machines/tree-view/index.mjs +1 -1
- package/dist/{selection-DdNvrKbj.d.mts → selection-6urf-c8j.d.mts} +1 -1
- package/dist/{selection-Bb_ZSVxe.d.cts → selection-BmS2RDMq.d.cts} +1 -1
- package/package.json +13 -1
|
@@ -441,6 +441,50 @@ function isGridCollection(v) {
|
|
|
441
441
|
return require_utils.hasProp(v, "columnCount") && require_utils.hasProp(v, "getRows");
|
|
442
442
|
}
|
|
443
443
|
//#endregion
|
|
444
|
+
//#region src/shared/collection/selection-map.ts
|
|
445
|
+
function resolveSelectedItems({ values, collection, selectedItemMap }) {
|
|
446
|
+
const result = [];
|
|
447
|
+
for (const value of values) {
|
|
448
|
+
const item = collection.find(value) ?? selectedItemMap.get(value);
|
|
449
|
+
if (item != null) result.push(item);
|
|
450
|
+
}
|
|
451
|
+
return result;
|
|
452
|
+
}
|
|
453
|
+
function updateSelectedItemMap({ selectedItemMap, values, selectedItems, collection }) {
|
|
454
|
+
const nextMap = new Map(selectedItemMap);
|
|
455
|
+
for (const item of selectedItems) {
|
|
456
|
+
const value = collection.getItemValue(item);
|
|
457
|
+
if (value != null) nextMap.set(value, item);
|
|
458
|
+
}
|
|
459
|
+
const allowedValues = new Set(values);
|
|
460
|
+
for (const value of nextMap.keys()) if (!allowedValues.has(value)) nextMap.delete(value);
|
|
461
|
+
return nextMap;
|
|
462
|
+
}
|
|
463
|
+
function deriveSelectionState({ values, collection, selectedItemMap }) {
|
|
464
|
+
const selectedItems = resolveSelectedItems({
|
|
465
|
+
values,
|
|
466
|
+
collection,
|
|
467
|
+
selectedItemMap
|
|
468
|
+
});
|
|
469
|
+
return {
|
|
470
|
+
selectedItems,
|
|
471
|
+
nextSelectedItemMap: updateSelectedItemMap({
|
|
472
|
+
selectedItemMap,
|
|
473
|
+
values,
|
|
474
|
+
selectedItems,
|
|
475
|
+
collection
|
|
476
|
+
})
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function createSelectedItemMap({ selectedItems, collection }) {
|
|
480
|
+
return updateSelectedItemMap({
|
|
481
|
+
selectedItemMap: /* @__PURE__ */ new Map(),
|
|
482
|
+
values: selectedItems.map((item) => collection.getItemValue(item)).filter(Boolean),
|
|
483
|
+
selectedItems,
|
|
484
|
+
collection
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
444
488
|
//#region src/shared/collection/selection.ts
|
|
445
489
|
var Selection = class Selection extends Set {
|
|
446
490
|
constructor(values = []) {
|
|
@@ -1315,6 +1359,18 @@ Object.defineProperty(exports, "TreeCollection", {
|
|
|
1315
1359
|
return TreeCollection;
|
|
1316
1360
|
}
|
|
1317
1361
|
});
|
|
1362
|
+
Object.defineProperty(exports, "createSelectedItemMap", {
|
|
1363
|
+
enumerable: true,
|
|
1364
|
+
get: function() {
|
|
1365
|
+
return createSelectedItemMap;
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
Object.defineProperty(exports, "deriveSelectionState", {
|
|
1369
|
+
enumerable: true,
|
|
1370
|
+
get: function() {
|
|
1371
|
+
return deriveSelectionState;
|
|
1372
|
+
}
|
|
1373
|
+
});
|
|
1318
1374
|
Object.defineProperty(exports, "filePathToTree", {
|
|
1319
1375
|
enumerable: true,
|
|
1320
1376
|
get: function() {
|
|
@@ -1339,3 +1395,15 @@ Object.defineProperty(exports, "isListCollection", {
|
|
|
1339
1395
|
return isListCollection;
|
|
1340
1396
|
}
|
|
1341
1397
|
});
|
|
1398
|
+
Object.defineProperty(exports, "resolveSelectedItems", {
|
|
1399
|
+
enumerable: true,
|
|
1400
|
+
get: function() {
|
|
1401
|
+
return resolveSelectedItems;
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1404
|
+
Object.defineProperty(exports, "updateSelectedItemMap", {
|
|
1405
|
+
enumerable: true,
|
|
1406
|
+
get: function() {
|
|
1407
|
+
return updateSelectedItemMap;
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
@@ -441,6 +441,50 @@ function isGridCollection(v) {
|
|
|
441
441
|
return hasProp(v, "columnCount") && hasProp(v, "getRows");
|
|
442
442
|
}
|
|
443
443
|
//#endregion
|
|
444
|
+
//#region src/shared/collection/selection-map.ts
|
|
445
|
+
function resolveSelectedItems({ values, collection, selectedItemMap }) {
|
|
446
|
+
const result = [];
|
|
447
|
+
for (const value of values) {
|
|
448
|
+
const item = collection.find(value) ?? selectedItemMap.get(value);
|
|
449
|
+
if (item != null) result.push(item);
|
|
450
|
+
}
|
|
451
|
+
return result;
|
|
452
|
+
}
|
|
453
|
+
function updateSelectedItemMap({ selectedItemMap, values, selectedItems, collection }) {
|
|
454
|
+
const nextMap = new Map(selectedItemMap);
|
|
455
|
+
for (const item of selectedItems) {
|
|
456
|
+
const value = collection.getItemValue(item);
|
|
457
|
+
if (value != null) nextMap.set(value, item);
|
|
458
|
+
}
|
|
459
|
+
const allowedValues = new Set(values);
|
|
460
|
+
for (const value of nextMap.keys()) if (!allowedValues.has(value)) nextMap.delete(value);
|
|
461
|
+
return nextMap;
|
|
462
|
+
}
|
|
463
|
+
function deriveSelectionState({ values, collection, selectedItemMap }) {
|
|
464
|
+
const selectedItems = resolveSelectedItems({
|
|
465
|
+
values,
|
|
466
|
+
collection,
|
|
467
|
+
selectedItemMap
|
|
468
|
+
});
|
|
469
|
+
return {
|
|
470
|
+
selectedItems,
|
|
471
|
+
nextSelectedItemMap: updateSelectedItemMap({
|
|
472
|
+
selectedItemMap,
|
|
473
|
+
values,
|
|
474
|
+
selectedItems,
|
|
475
|
+
collection
|
|
476
|
+
})
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function createSelectedItemMap({ selectedItems, collection }) {
|
|
480
|
+
return updateSelectedItemMap({
|
|
481
|
+
selectedItemMap: /* @__PURE__ */ new Map(),
|
|
482
|
+
values: selectedItems.map((item) => collection.getItemValue(item)).filter(Boolean),
|
|
483
|
+
selectedItems,
|
|
484
|
+
collection
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
444
488
|
//#region src/shared/collection/selection.ts
|
|
445
489
|
var Selection = class Selection extends Set {
|
|
446
490
|
constructor(values = []) {
|
|
@@ -1291,4 +1335,4 @@ const fallbackMethods = {
|
|
|
1291
1335
|
}
|
|
1292
1336
|
};
|
|
1293
1337
|
//#endregion
|
|
1294
|
-
export {
|
|
1338
|
+
export { createSelectedItemMap as a, updateSelectedItemMap as c, ListCollection as d, isListCollection as f, Selection as i, GridCollection as l, filePathToTree as n, deriveSelectionState as o, flattenedToTree as r, resolveSelectedItems as s, TreeCollection as t, isGridCollection as u };
|
package/dist/collection.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./utils-ByNiZU8f.cjs");
|
|
3
|
-
const require_collection = require("./collection-
|
|
3
|
+
const require_collection = require("./collection-D0Abtxc0.cjs");
|
|
4
4
|
exports.GridCollection = require_collection.GridCollection;
|
|
5
5
|
exports.ListCollection = require_collection.ListCollection;
|
|
6
6
|
exports.Selection = require_collection.Selection;
|
|
7
7
|
exports.TreeCollection = require_collection.TreeCollection;
|
|
8
|
+
exports.createSelectedItemMap = require_collection.createSelectedItemMap;
|
|
9
|
+
exports.deriveSelectionState = require_collection.deriveSelectionState;
|
|
8
10
|
exports.filePathToTree = require_collection.filePathToTree;
|
|
9
11
|
exports.flattenedToTree = require_collection.flattenedToTree;
|
|
10
12
|
exports.isGridCollection = require_collection.isGridCollection;
|
|
11
13
|
exports.isListCollection = require_collection.isListCollection;
|
|
14
|
+
exports.resolveSelectedItems = require_collection.resolveSelectedItems;
|
|
15
|
+
exports.updateSelectedItemMap = require_collection.updateSelectedItemMap;
|
package/dist/collection.d.cts
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-D-7AMgSE.cjs";
|
|
2
|
-
import { n as isListCollection, t as ListCollection } from "./list-collection-
|
|
3
|
-
import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-
|
|
2
|
+
import { n as isListCollection, t as ListCollection } from "./list-collection-Cjgbx_9l.cjs";
|
|
3
|
+
import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-BmS2RDMq.cjs";
|
|
4
4
|
import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-DlqV5kYO.cjs";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
//#region src/shared/collection/selection-map.d.ts
|
|
7
|
+
interface SelectionMapCollection<T extends CollectionItem = CollectionItem> {
|
|
8
|
+
find: (value: string | null | undefined) => T | null;
|
|
9
|
+
getItemValue: (item: T | null | undefined) => string | null;
|
|
10
|
+
}
|
|
11
|
+
declare function resolveSelectedItems<T extends CollectionItem>({
|
|
12
|
+
values,
|
|
13
|
+
collection,
|
|
14
|
+
selectedItemMap
|
|
15
|
+
}: {
|
|
16
|
+
values: string[];
|
|
17
|
+
collection: SelectionMapCollection<T>;
|
|
18
|
+
selectedItemMap: Map<string, T>;
|
|
19
|
+
}): T[];
|
|
20
|
+
declare function updateSelectedItemMap<T extends CollectionItem>({
|
|
21
|
+
selectedItemMap,
|
|
22
|
+
values,
|
|
23
|
+
selectedItems,
|
|
24
|
+
collection
|
|
25
|
+
}: {
|
|
26
|
+
selectedItemMap: Map<string, T>;
|
|
27
|
+
values: string[];
|
|
28
|
+
selectedItems: T[];
|
|
29
|
+
collection: SelectionMapCollection<T>;
|
|
30
|
+
}): Map<string, T>;
|
|
31
|
+
declare function deriveSelectionState<T extends CollectionItem>({
|
|
32
|
+
values,
|
|
33
|
+
collection,
|
|
34
|
+
selectedItemMap
|
|
35
|
+
}: {
|
|
36
|
+
values: string[];
|
|
37
|
+
collection: SelectionMapCollection<T>;
|
|
38
|
+
selectedItemMap: Map<string, T>;
|
|
39
|
+
}): {
|
|
40
|
+
selectedItems: T[];
|
|
41
|
+
nextSelectedItemMap: Map<string, T>;
|
|
42
|
+
};
|
|
43
|
+
declare function createSelectedItemMap<T extends CollectionItem>({
|
|
44
|
+
selectedItems,
|
|
45
|
+
collection
|
|
46
|
+
}: {
|
|
47
|
+
selectedItems: T[];
|
|
48
|
+
collection: SelectionMapCollection<T>;
|
|
49
|
+
}): Map<string, T>;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMapCollection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, createSelectedItemMap, deriveSelectionState, filePathToTree, flattenedToTree, isGridCollection, isListCollection, resolveSelectedItems, updateSelectedItemMap };
|
package/dist/collection.d.mts
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-9uw8LHpE.mjs";
|
|
2
|
-
import { n as isListCollection, t as ListCollection } from "./list-collection-
|
|
3
|
-
import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-
|
|
2
|
+
import { n as isListCollection, t as ListCollection } from "./list-collection-IF510iNl.mjs";
|
|
3
|
+
import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-6urf-c8j.mjs";
|
|
4
4
|
import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-Dlf9EUrT.mjs";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
//#region src/shared/collection/selection-map.d.ts
|
|
7
|
+
interface SelectionMapCollection<T extends CollectionItem = CollectionItem> {
|
|
8
|
+
find: (value: string | null | undefined) => T | null;
|
|
9
|
+
getItemValue: (item: T | null | undefined) => string | null;
|
|
10
|
+
}
|
|
11
|
+
declare function resolveSelectedItems<T extends CollectionItem>({
|
|
12
|
+
values,
|
|
13
|
+
collection,
|
|
14
|
+
selectedItemMap
|
|
15
|
+
}: {
|
|
16
|
+
values: string[];
|
|
17
|
+
collection: SelectionMapCollection<T>;
|
|
18
|
+
selectedItemMap: Map<string, T>;
|
|
19
|
+
}): T[];
|
|
20
|
+
declare function updateSelectedItemMap<T extends CollectionItem>({
|
|
21
|
+
selectedItemMap,
|
|
22
|
+
values,
|
|
23
|
+
selectedItems,
|
|
24
|
+
collection
|
|
25
|
+
}: {
|
|
26
|
+
selectedItemMap: Map<string, T>;
|
|
27
|
+
values: string[];
|
|
28
|
+
selectedItems: T[];
|
|
29
|
+
collection: SelectionMapCollection<T>;
|
|
30
|
+
}): Map<string, T>;
|
|
31
|
+
declare function deriveSelectionState<T extends CollectionItem>({
|
|
32
|
+
values,
|
|
33
|
+
collection,
|
|
34
|
+
selectedItemMap
|
|
35
|
+
}: {
|
|
36
|
+
values: string[];
|
|
37
|
+
collection: SelectionMapCollection<T>;
|
|
38
|
+
selectedItemMap: Map<string, T>;
|
|
39
|
+
}): {
|
|
40
|
+
selectedItems: T[];
|
|
41
|
+
nextSelectedItemMap: Map<string, T>;
|
|
42
|
+
};
|
|
43
|
+
declare function createSelectedItemMap<T extends CollectionItem>({
|
|
44
|
+
selectedItems,
|
|
45
|
+
collection
|
|
46
|
+
}: {
|
|
47
|
+
selectedItems: T[];
|
|
48
|
+
collection: SelectionMapCollection<T>;
|
|
49
|
+
}): Map<string, T>;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMapCollection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, createSelectedItemMap, deriveSelectionState, filePathToTree, flattenedToTree, isGridCollection, isListCollection, resolveSelectedItems, updateSelectedItemMap };
|
package/dist/collection.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./utils-VVoZ_v29.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { GridCollection, ListCollection, Selection, TreeCollection, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
|
|
2
|
+
import { a as createSelectedItemMap, c as updateSelectedItemMap, d as ListCollection, f as isListCollection, i as Selection, l as GridCollection, n as filePathToTree, o as deriveSelectionState, r as flattenedToTree, s as resolveSelectedItems, t as TreeCollection, u as isGridCollection } from "./collection-GSpaYJ2f.mjs";
|
|
3
|
+
export { GridCollection, ListCollection, Selection, TreeCollection, createSelectedItemMap, deriveSelectionState, filePathToTree, flattenedToTree, isGridCollection, isListCollection, resolveSelectedItems, updateSelectedItemMap };
|
|
@@ -443,7 +443,7 @@ var FocusTrap = class {
|
|
|
443
443
|
return this;
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
const isKeyboardEvent = (event) => event
|
|
446
|
+
const isKeyboardEvent = (event) => event?.type === "keydown";
|
|
447
447
|
const isTabEvent = (event) => isKeyboardEvent(event) && event?.key === "Tab";
|
|
448
448
|
const isKeyForward = (e) => isKeyboardEvent(e) && e.key === "Tab" && !e?.shiftKey;
|
|
449
449
|
const isKeyBackward = (e) => isKeyboardEvent(e) && e.key === "Tab" && e?.shiftKey;
|
|
@@ -443,7 +443,7 @@ var FocusTrap = class {
|
|
|
443
443
|
return this;
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
const isKeyboardEvent = (event) => event
|
|
446
|
+
const isKeyboardEvent = (event) => event?.type === "keydown";
|
|
447
447
|
const isTabEvent = (event) => isKeyboardEvent(event) && event?.key === "Tab";
|
|
448
448
|
const isKeyForward = (e) => isKeyboardEvent(e) && e.key === "Tab" && !e?.shiftKey;
|
|
449
449
|
const isKeyBackward = (e) => isKeyboardEvent(e) && e.key === "Tab" && e?.shiftKey;
|
package/dist/focus-trap.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./dom-query-BUO7rGsg.cjs");
|
|
3
|
-
const require_focus_trap = require("./focus-trap-
|
|
3
|
+
const require_focus_trap = require("./focus-trap-BbU9QXMe.cjs");
|
|
4
4
|
exports.FocusTrap = require_focus_trap.FocusTrap;
|
|
5
5
|
exports.trapFocus = require_focus_trap.trapFocus;
|
package/dist/focus-trap.mjs
CHANGED
|
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
|
|
|
46
46
|
moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
|
|
47
47
|
moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
|
|
48
48
|
reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
|
|
49
|
-
compareValue: (a: string, b: string) =>
|
|
49
|
+
compareValue: (a: string, b: string) => 1 | 0 | -1;
|
|
50
50
|
private range;
|
|
51
51
|
getValueRange: (from: string | null, to: string | null) => string[];
|
|
52
52
|
toString: () => string;
|
|
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
|
|
|
46
46
|
moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
|
|
47
47
|
moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
|
|
48
48
|
reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
|
|
49
|
-
compareValue: (a: string, b: string) =>
|
|
49
|
+
compareValue: (a: string, b: string) => 1 | 0 | -1;
|
|
50
50
|
private range;
|
|
51
51
|
getValueRange: (from: string | null, to: string | null) => string[];
|
|
52
52
|
toString: () => string;
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCS
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/accordion/accordion.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "item" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "item" | "itemContent" | "itemTrigger" | "itemIndicator">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/accordion/accordion.types.d.ts
|
|
9
9
|
interface ValueChangeDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCW
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/accordion/accordion.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "item" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "item" | "itemContent" | "itemTrigger" | "itemIndicator">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/accordion/accordion.types.d.ts
|
|
9
9
|
interface ValueChangeDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCS
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/angle-slider/angle-slider.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "label" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "label" | "thumb" | "valueText" | "control" | "track" | "markerGroup" | "marker">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/angle-slider/angle-slider.types.d.ts
|
|
9
9
|
interface ValueChangeDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCW
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/angle-slider/angle-slider.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "label" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "label" | "thumb" | "valueText" | "control" | "track" | "markerGroup" | "marker">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/angle-slider/angle-slider.types.d.ts
|
|
9
9
|
interface ValueChangeDetails {
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
|
-
const require_collection = require("../../collection-
|
|
5
|
+
const require_collection = require("../../collection-D0Abtxc0.cjs");
|
|
6
6
|
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
7
7
|
require("../../interact-outside-Bg-QSXqp.cjs");
|
|
8
8
|
const require_dismissable = require("../../dismissable-DxjbwsOf.cjs");
|
|
@@ -8,8 +8,8 @@ import { c as Placement, d as PositioningOptions } from "../../types-CZAtqGqH.cj
|
|
|
8
8
|
import { a as Point } from "../../types-CLXYEgfm.cjs";
|
|
9
9
|
|
|
10
10
|
//#region src/machines/cascade-select/cascade-select.anatomy.d.ts
|
|
11
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
12
|
-
declare const parts: Record<"root" | "
|
|
11
|
+
declare const anatomy: AnatomyInstance<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "indicator" | "item" | "itemIndicator" | "itemText" | "list" | "positioner" | "clearTrigger">;
|
|
12
|
+
declare const parts: Record<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "indicator" | "item" | "itemIndicator" | "itemText" | "list" | "positioner" | "clearTrigger", AnatomyPart>;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/machines/cascade-select/cascade-select.collection.d.ts
|
|
15
15
|
declare const collection: {
|
|
@@ -8,8 +8,8 @@ import { p as PositioningOptions, u as Placement } from "../../index-fMh0VDkR.mj
|
|
|
8
8
|
import { a as Point } from "../../types-DU764tY_.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/machines/cascade-select/cascade-select.anatomy.d.ts
|
|
11
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
12
|
-
declare const parts: Record<"root" | "
|
|
11
|
+
declare const anatomy: AnatomyInstance<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "indicator" | "item" | "itemIndicator" | "itemText" | "list" | "positioner" | "clearTrigger">;
|
|
12
|
+
declare const parts: Record<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "indicator" | "item" | "itemIndicator" | "itemText" | "list" | "positioner" | "clearTrigger", AnatomyPart>;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/machines/cascade-select/cascade-select.collection.d.ts
|
|
15
15
|
declare const collection: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
2
2
|
import { C as queryAll, Et as isSelfTarget, I as scrollIntoView, K as isValidTabEvent, W as raf, bn as ariaAttr, ct as setElementValue, ft as getEventKey, it as dispatchInputValueEvent, lt as trackFormControl, p as createScope, un as isEditableElement, xn as dataAttr, z as observeAttributes } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { Ct as isEmpty, ft as isEqual, u as createSplitProps, wt as last } from "../../utils-VVoZ_v29.mjs";
|
|
4
|
-
import { t as TreeCollection } from "../../collection-
|
|
4
|
+
import { t as TreeCollection } from "../../collection-GSpaYJ2f.mjs";
|
|
5
5
|
import { a as createMachine, i as createGuards } from "../../core-CTtbW9qh.mjs";
|
|
6
6
|
import "../../interact-outside-Ba50N1a5.mjs";
|
|
7
7
|
import { n as trackDismissableElement } from "../../dismissable-B9k5K6f9.mjs";
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine } from "../../types-u-LWCSDE.cjs";
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/clipboard/clipboard.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "trigger" | "indicator" | "input">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/clipboard/clipboard.types.d.ts
|
|
9
9
|
interface CopyStatusDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine } from "../../types-DvUmCWsb.mjs";
|
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/clipboard/clipboard.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "trigger" | "indicator" | "input">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/clipboard/clipboard.types.d.ts
|
|
9
9
|
interface CopyStatusDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine } from "../../types-u-LWCSDE.cjs";
|
|
|
3
3
|
import { b as NormalizeProps, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/collapsible/collapsible.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "content" | "trigger" | "indicator">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/collapsible/collapsible.types.d.ts
|
|
9
9
|
interface OpenChangeDetails {
|
|
@@ -3,7 +3,7 @@ import { b as Service, p as Machine } from "../../types-DvUmCWsb.mjs";
|
|
|
3
3
|
import { b as NormalizeProps, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/collapsible/collapsible.anatomy.d.ts
|
|
6
|
-
declare const anatomy: AnatomyInstance<"root" | "
|
|
6
|
+
declare const anatomy: AnatomyInstance<"root" | "content" | "trigger" | "indicator">;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/machines/collapsible/collapsible.types.d.ts
|
|
9
9
|
interface OpenChangeDetails {
|
|
@@ -6,7 +6,7 @@ import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusO
|
|
|
6
6
|
import { d as PositioningOptions } from "../../types-CZAtqGqH.cjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/color-picker/color-picker.anatomy.d.ts
|
|
9
|
-
declare const anatomy: Anatomy<"root" | "
|
|
9
|
+
declare const anatomy: Anatomy<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "area" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/color-picker/color-picker.types.d.ts
|
|
12
12
|
type ExtendedColorChannel = ColorChannel | "hex" | "css";
|
|
@@ -6,7 +6,7 @@ import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusO
|
|
|
6
6
|
import { p as PositioningOptions } from "../../index-fMh0VDkR.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/color-picker/color-picker.anatomy.d.ts
|
|
9
|
-
declare const anatomy: Anatomy<"root" | "
|
|
9
|
+
declare const anatomy: Anatomy<"root" | "content" | "label" | "valueText" | "control" | "trigger" | "area" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/color-picker/color-picker.types.d.ts
|
|
12
12
|
type ExtendedColorChannel = ColorChannel | "hex" | "css";
|