@react-stately/list 3.4.3 → 3.4.4-nightly.3113

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/main.js CHANGED
@@ -1,7 +1,7 @@
1
- var $dX2VC$react = require("react");
2
- var $dX2VC$reactstatelyselection = require("@react-stately/selection");
3
- var $dX2VC$reactstatelycollections = require("@react-stately/collections");
4
- var $dX2VC$reactstatelyutils = require("@react-stately/utils");
1
+ var $jitug$react = require("react");
2
+ var $jitug$reactstatelyselection = require("@react-stately/selection");
3
+ var $jitug$reactstatelycollections = require("@react-stately/collections");
4
+ var $jitug$reactstatelyutils = require("@react-stately/utils");
5
5
 
6
6
  function $parcel$exportWildcard(dest, source) {
7
7
  Object.keys(source).forEach(function(key) {
@@ -22,15 +22,15 @@ function $parcel$exportWildcard(dest, source) {
22
22
  function $parcel$export(e, n, v, s) {
23
23
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
24
24
  }
25
- var $bc93d2fc549b8670$exports = {};
25
+ var $5450691d3629f6ea$exports = {};
26
26
 
27
- $parcel$export($bc93d2fc549b8670$exports, "useListState", () => $bc93d2fc549b8670$export$2f645645f7bca764);
27
+ $parcel$export($5450691d3629f6ea$exports, "useListState", () => $5450691d3629f6ea$export$2f645645f7bca764);
28
28
 
29
- var $e57e1b595464cc8b$exports = {};
29
+ var $c9aa5a224613c979$exports = {};
30
30
 
31
- $parcel$export($e57e1b595464cc8b$exports, "ListCollection", () => $e57e1b595464cc8b$export$d085fb9e920b5ca7);
31
+ $parcel$export($c9aa5a224613c979$exports, "ListCollection", () => $c9aa5a224613c979$export$d085fb9e920b5ca7);
32
32
  var tmp = Symbol.iterator;
33
- class $e57e1b595464cc8b$export$d085fb9e920b5ca7 {
33
+ class $c9aa5a224613c979$export$d085fb9e920b5ca7 {
34
34
  *[tmp]() {
35
35
  yield* this.iterable;
36
36
  }
@@ -94,26 +94,26 @@ class $e57e1b595464cc8b$export$d085fb9e920b5ca7 {
94
94
 
95
95
 
96
96
 
97
- function $bc93d2fc549b8670$export$2f645645f7bca764(props) {
97
+ function $5450691d3629f6ea$export$2f645645f7bca764(props) {
98
98
  let { filter: filter } = props;
99
- let selectionState = $dX2VC$reactstatelyselection.useMultipleSelectionState(props);
100
- let disabledKeys = $dX2VC$react.useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
99
+ let selectionState = $jitug$reactstatelyselection.useMultipleSelectionState(props);
100
+ let disabledKeys = $jitug$react.useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
101
101
  , [
102
102
  props.disabledKeys
103
103
  ]);
104
- let factory = (nodes)=>filter ? new $e57e1b595464cc8b$export$d085fb9e920b5ca7(filter(nodes)) : new $e57e1b595464cc8b$export$d085fb9e920b5ca7(nodes)
104
+ let factory = (nodes)=>filter ? new $c9aa5a224613c979$export$d085fb9e920b5ca7(filter(nodes)) : new $c9aa5a224613c979$export$d085fb9e920b5ca7(nodes)
105
105
  ;
106
- let context = $dX2VC$react.useMemo(()=>({
106
+ let context = $jitug$react.useMemo(()=>({
107
107
  suppressTextValueWarning: props.suppressTextValueWarning
108
108
  })
109
109
  , [
110
110
  props.suppressTextValueWarning
111
111
  ]);
112
- let collection = $dX2VC$reactstatelycollections.useCollection(props, factory, context, [
112
+ let collection = $jitug$reactstatelycollections.useCollection(props, factory, context, [
113
113
  filter
114
114
  ]);
115
115
  // Reset focused key if that item is deleted from the collection.
116
- $dX2VC$react.useEffect(()=>{
116
+ $jitug$react.useEffect(()=>{
117
117
  if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
118
118
  }, [
119
119
  collection,
@@ -122,27 +122,27 @@ function $bc93d2fc549b8670$export$2f645645f7bca764(props) {
122
122
  return {
123
123
  collection: collection,
124
124
  disabledKeys: disabledKeys,
125
- selectionManager: new $dX2VC$reactstatelyselection.SelectionManager(collection, selectionState)
125
+ selectionManager: new $jitug$reactstatelyselection.SelectionManager(collection, selectionState)
126
126
  };
127
127
  }
128
128
 
129
129
 
130
- var $6a9c04de034f6349$exports = {};
130
+ var $b9e99587a092d199$exports = {};
131
131
 
132
- $parcel$export($6a9c04de034f6349$exports, "useSingleSelectListState", () => $6a9c04de034f6349$export$e7f05e985daf4b5f);
132
+ $parcel$export($b9e99587a092d199$exports, "useSingleSelectListState", () => $b9e99587a092d199$export$e7f05e985daf4b5f);
133
133
 
134
134
 
135
135
 
136
- function $6a9c04de034f6349$export$e7f05e985daf4b5f(props) {
136
+ function $b9e99587a092d199$export$e7f05e985daf4b5f(props) {
137
137
  var _defaultSelectedKey;
138
- let [selectedKey, setSelectedKey] = $dX2VC$reactstatelyutils.useControlledState(props.selectedKey, (_defaultSelectedKey = props.defaultSelectedKey) !== null && _defaultSelectedKey !== void 0 ? _defaultSelectedKey : null, props.onSelectionChange);
139
- let selectedKeys = $dX2VC$react.useMemo(()=>selectedKey != null ? [
138
+ let [selectedKey, setSelectedKey] = $jitug$reactstatelyutils.useControlledState(props.selectedKey, (_defaultSelectedKey = props.defaultSelectedKey) !== null && _defaultSelectedKey !== void 0 ? _defaultSelectedKey : null, props.onSelectionChange);
139
+ let selectedKeys = $jitug$react.useMemo(()=>selectedKey != null ? [
140
140
  selectedKey
141
141
  ] : []
142
142
  , [
143
143
  selectedKey
144
144
  ]);
145
- let { collection: collection , disabledKeys: disabledKeys , selectionManager: selectionManager } = $bc93d2fc549b8670$export$2f645645f7bca764({
145
+ let { collection: collection , disabledKeys: disabledKeys , selectionManager: selectionManager } = $5450691d3629f6ea$export$2f645645f7bca764({
146
146
  ...props,
147
147
  selectionMode: 'single',
148
148
  disallowEmptySelection: true,
@@ -169,9 +169,9 @@ function $6a9c04de034f6349$export$e7f05e985daf4b5f(props) {
169
169
 
170
170
 
171
171
 
172
- $parcel$exportWildcard(module.exports, $bc93d2fc549b8670$exports);
173
- $parcel$exportWildcard(module.exports, $6a9c04de034f6349$exports);
174
- $parcel$exportWildcard(module.exports, $e57e1b595464cc8b$exports);
172
+ $parcel$exportWildcard(module.exports, $5450691d3629f6ea$exports);
173
+ $parcel$exportWildcard(module.exports, $b9e99587a092d199$exports);
174
+ $parcel$exportWildcard(module.exports, $c9aa5a224613c979$exports);
175
175
 
176
176
 
177
177
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,20 +1,20 @@
1
- import {useMemo as $jmOdw$useMemo, useEffect as $jmOdw$useEffect} from "react";
2
- import {useMultipleSelectionState as $jmOdw$useMultipleSelectionState, SelectionManager as $jmOdw$SelectionManager} from "@react-stately/selection";
3
- import {useCollection as $jmOdw$useCollection} from "@react-stately/collections";
4
- import {useControlledState as $jmOdw$useControlledState} from "@react-stately/utils";
1
+ import {useMemo as $58Phs$useMemo, useEffect as $58Phs$useEffect} from "react";
2
+ import {useMultipleSelectionState as $58Phs$useMultipleSelectionState, SelectionManager as $58Phs$SelectionManager} from "@react-stately/selection";
3
+ import {useCollection as $58Phs$useCollection} from "@react-stately/collections";
4
+ import {useControlledState as $58Phs$useControlledState} from "@react-stately/utils";
5
5
 
6
6
  function $parcel$export(e, n, v, s) {
7
7
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
8
  }
9
- var $4b9a49966c91856a$exports = {};
9
+ var $e72dd72e1c76a225$exports = {};
10
10
 
11
- $parcel$export($4b9a49966c91856a$exports, "useListState", () => $4b9a49966c91856a$export$2f645645f7bca764);
11
+ $parcel$export($e72dd72e1c76a225$exports, "useListState", () => $e72dd72e1c76a225$export$2f645645f7bca764);
12
12
 
13
- var $80be09205507c5ec$exports = {};
13
+ var $a02d57049d202695$exports = {};
14
14
 
15
- $parcel$export($80be09205507c5ec$exports, "ListCollection", () => $80be09205507c5ec$export$d085fb9e920b5ca7);
15
+ $parcel$export($a02d57049d202695$exports, "ListCollection", () => $a02d57049d202695$export$d085fb9e920b5ca7);
16
16
  var tmp = Symbol.iterator;
17
- class $80be09205507c5ec$export$d085fb9e920b5ca7 {
17
+ class $a02d57049d202695$export$d085fb9e920b5ca7 {
18
18
  *[tmp]() {
19
19
  yield* this.iterable;
20
20
  }
@@ -78,26 +78,26 @@ class $80be09205507c5ec$export$d085fb9e920b5ca7 {
78
78
 
79
79
 
80
80
 
81
- function $4b9a49966c91856a$export$2f645645f7bca764(props) {
81
+ function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
82
82
  let { filter: filter } = props;
83
- let selectionState = $jmOdw$useMultipleSelectionState(props);
84
- let disabledKeys = $jmOdw$useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
83
+ let selectionState = $58Phs$useMultipleSelectionState(props);
84
+ let disabledKeys = $58Phs$useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
85
85
  , [
86
86
  props.disabledKeys
87
87
  ]);
88
- let factory = (nodes)=>filter ? new $80be09205507c5ec$export$d085fb9e920b5ca7(filter(nodes)) : new $80be09205507c5ec$export$d085fb9e920b5ca7(nodes)
88
+ let factory = (nodes)=>filter ? new $a02d57049d202695$export$d085fb9e920b5ca7(filter(nodes)) : new $a02d57049d202695$export$d085fb9e920b5ca7(nodes)
89
89
  ;
90
- let context = $jmOdw$useMemo(()=>({
90
+ let context = $58Phs$useMemo(()=>({
91
91
  suppressTextValueWarning: props.suppressTextValueWarning
92
92
  })
93
93
  , [
94
94
  props.suppressTextValueWarning
95
95
  ]);
96
- let collection = $jmOdw$useCollection(props, factory, context, [
96
+ let collection = $58Phs$useCollection(props, factory, context, [
97
97
  filter
98
98
  ]);
99
99
  // Reset focused key if that item is deleted from the collection.
100
- $jmOdw$useEffect(()=>{
100
+ $58Phs$useEffect(()=>{
101
101
  if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
102
102
  }, [
103
103
  collection,
@@ -106,27 +106,27 @@ function $4b9a49966c91856a$export$2f645645f7bca764(props) {
106
106
  return {
107
107
  collection: collection,
108
108
  disabledKeys: disabledKeys,
109
- selectionManager: new $jmOdw$SelectionManager(collection, selectionState)
109
+ selectionManager: new $58Phs$SelectionManager(collection, selectionState)
110
110
  };
111
111
  }
112
112
 
113
113
 
114
- var $e08e0e9da1306088$exports = {};
114
+ var $a0d645289fe9b86b$exports = {};
115
115
 
116
- $parcel$export($e08e0e9da1306088$exports, "useSingleSelectListState", () => $e08e0e9da1306088$export$e7f05e985daf4b5f);
116
+ $parcel$export($a0d645289fe9b86b$exports, "useSingleSelectListState", () => $a0d645289fe9b86b$export$e7f05e985daf4b5f);
117
117
 
118
118
 
119
119
 
120
- function $e08e0e9da1306088$export$e7f05e985daf4b5f(props) {
120
+ function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
121
121
  var _defaultSelectedKey;
122
- let [selectedKey, setSelectedKey] = $jmOdw$useControlledState(props.selectedKey, (_defaultSelectedKey = props.defaultSelectedKey) !== null && _defaultSelectedKey !== void 0 ? _defaultSelectedKey : null, props.onSelectionChange);
123
- let selectedKeys = $jmOdw$useMemo(()=>selectedKey != null ? [
122
+ let [selectedKey, setSelectedKey] = $58Phs$useControlledState(props.selectedKey, (_defaultSelectedKey = props.defaultSelectedKey) !== null && _defaultSelectedKey !== void 0 ? _defaultSelectedKey : null, props.onSelectionChange);
123
+ let selectedKeys = $58Phs$useMemo(()=>selectedKey != null ? [
124
124
  selectedKey
125
125
  ] : []
126
126
  , [
127
127
  selectedKey
128
128
  ]);
129
- let { collection: collection , disabledKeys: disabledKeys , selectionManager: selectionManager } = $4b9a49966c91856a$export$2f645645f7bca764({
129
+ let { collection: collection , disabledKeys: disabledKeys , selectionManager: selectionManager } = $e72dd72e1c76a225$export$2f645645f7bca764({
130
130
  ...props,
131
131
  selectionMode: 'single',
132
132
  disallowEmptySelection: true,
@@ -155,5 +155,5 @@ function $e08e0e9da1306088$export$e7f05e985daf4b5f(props) {
155
155
 
156
156
 
157
157
 
158
- export {$4b9a49966c91856a$export$2f645645f7bca764 as useListState, $e08e0e9da1306088$export$e7f05e985daf4b5f as useSingleSelectListState, $80be09205507c5ec$export$d085fb9e920b5ca7 as ListCollection};
158
+ export {$e72dd72e1c76a225$export$2f645645f7bca764 as useListState, $a0d645289fe9b86b$export$e7f05e985daf4b5f as useSingleSelectListState, $a02d57049d202695$export$d085fb9e920b5ca7 as ListCollection};
159
159
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/list",
3
- "version": "3.4.3",
3
+ "version": "3.4.4-nightly.3113+404d41859",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,10 +18,10 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-stately/collections": "^3.3.6",
22
- "@react-stately/selection": "^3.9.2",
23
- "@react-stately/utils": "^3.4.1",
24
- "@react-types/shared": "^3.11.1"
21
+ "@react-stately/collections": "3.0.0-nightly.1417+404d41859",
22
+ "@react-stately/selection": "3.0.0-nightly.1417+404d41859",
23
+ "@react-stately/utils": "3.0.0-nightly.1417+404d41859",
24
+ "@react-types/shared": "3.0.0-nightly.1417+404d41859"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^16.8.0 || ^17.0.0-rc.1"