@react-aria/tag 3.0.0-alpha.9 → 3.0.0-beta.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/dist/main.js CHANGED
@@ -14,31 +14,47 @@ function $parcel$interopDefault(a) {
14
14
  $parcel$export(module.exports, "TagKeyboardDelegate", () => $d3d7c73f2e3f4edb$export$b00754732e683b92);
15
15
  $parcel$export(module.exports, "useTag", () => $a442534c81d8ad16$export$3f568fff7dff2f03);
16
16
  $parcel$export(module.exports, "useTagGroup", () => $09704b0efefe5140$export$4f8b5cda58b7e8ff);
17
-
18
- class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.GridKeyboardDelegate {
17
+ /*
18
+ * Copyright 2020 Adobe. All rights reserved.
19
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
+ * you may not use this file except in compliance with the License. You may obtain a copy
21
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing, software distributed under
24
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
+ * OF ANY KIND, either express or implied. See the License for the specific language
26
+ * governing permissions and limitations under the License.
27
+ */ /*
28
+ * Copyright 2020 Adobe. All rights reserved.
29
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
30
+ * you may not use this file except in compliance with the License. You may obtain a copy
31
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software distributed under
34
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
35
+ * OF ANY KIND, either express or implied. See the License for the specific language
36
+ * governing permissions and limitations under the License.
37
+ */
38
+ class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends (0, $bSzeT$reactariagrid.GridKeyboardDelegate) {
19
39
  getFirstKey() {
20
40
  let key = this.collection.getFirstKey();
21
41
  let item = this.collection.getItem(key);
22
- let newKey = [
42
+ return [
23
43
  ...item.childNodes
24
44
  ][0].key;
25
- if (this.disabledKeys.has(newKey)) newKey = this.getKeyBelow(newKey);
26
- return newKey;
27
45
  }
28
46
  getLastKey() {
29
47
  let key = this.collection.getLastKey();
30
48
  let item = this.collection.getItem(key);
31
- let newKey = [
49
+ return [
32
50
  ...item.childNodes
33
51
  ][0].key;
34
- if (this.disabledKeys.has(newKey)) newKey = this.getKeyAbove(newKey);
35
- return newKey;
36
52
  }
37
53
  getKeyRightOf(key) {
38
- return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);
54
+ return this.direction === "rtl" ? this.getKeyAbove(key) : this.getKeyBelow(key);
39
55
  }
40
56
  getKeyLeftOf(key) {
41
- return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);
57
+ return this.direction === "rtl" ? this.getKeyBelow(key) : this.getKeyAbove(key);
42
58
  }
43
59
  getKeyBelow(key) {
44
60
  let startItem = this.collection.getItem(key);
@@ -51,15 +67,12 @@ class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.Gri
51
67
  // If focus was on a cell, focus the cell with the same index in the next row.
52
68
  if (this.isCell(startItem)) {
53
69
  let item = this.collection.getItem(key);
54
- let newKey = [
70
+ return [
55
71
  ...item.childNodes
56
72
  ][startItem.index].key;
57
- // Ignore disabled tags
58
- if (this.disabledKeys.has(newKey)) return this.getKeyBelow(newKey);
59
- return newKey;
60
73
  }
61
74
  // Otherwise, focus the next row
62
- if (this.focusMode === 'row') return key;
75
+ if (this.focusMode === "row") return key;
63
76
  } else return this.getFirstKey();
64
77
  }
65
78
  getKeyAbove(key) {
@@ -73,15 +86,12 @@ class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.Gri
73
86
  // If focus was on a cell, focus the cell with the same index in the previous row.
74
87
  if (this.isCell(startItem)) {
75
88
  let item = this.collection.getItem(key);
76
- let newKey = [
89
+ return [
77
90
  ...item.childNodes
78
91
  ][startItem.index].key;
79
- // ignore disabled tags
80
- if (this.disabledKeys.has(newKey)) return this.getKeyAbove(newKey);
81
- return newKey;
82
92
  }
83
93
  // Otherwise, focus the previous row
84
- if (this.focusMode === 'row') return key;
94
+ if (this.focusMode === "row") return key;
85
95
  } else return this.getLastKey();
86
96
  }
87
97
  getKeyPageAbove(key) {
@@ -93,7 +103,17 @@ class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.Gri
93
103
  }
94
104
 
95
105
 
96
-
106
+ /*
107
+ * Copyright 2020 Adobe. All rights reserved.
108
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
109
+ * you may not use this file except in compliance with the License. You may obtain a copy
110
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
111
+ *
112
+ * Unless required by applicable law or agreed to in writing, software distributed under
113
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
114
+ * OF ANY KIND, either express or implied. See the License for the specific language
115
+ * governing permissions and limitations under the License.
116
+ */
97
117
  var $29abb9209b62cd49$exports = {};
98
118
  var $6a4ddf1abe55d42a$exports = {};
99
119
  $6a4ddf1abe55d42a$exports = {
@@ -341,79 +361,80 @@ $29abb9209b62cd49$exports = {
341
361
 
342
362
  function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state) {
343
363
  let { isFocused: isFocused } = props;
344
- const { isDisabled: isDisabled , isRemovable: isRemovable , onRemove: onRemove , children: children , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
345
- const stringFormatter = $bSzeT$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($29abb9209b62cd49$exports)));
346
- const removeString = stringFormatter.format('remove');
347
- const labelId = $bSzeT$reactariautils.useId();
348
- const buttonId = $bSzeT$reactariautils.useId();
349
- let { rowProps: rowProps } = $bSzeT$reactariagrid.useGridRow({
364
+ const { allowsRemoving: allowsRemoving , onRemove: onRemove , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
365
+ const stringFormatter = (0, $bSzeT$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($29abb9209b62cd49$exports))));
366
+ const removeString = stringFormatter.format("remove");
367
+ const labelId = (0, $bSzeT$reactariautils.useId)();
368
+ const buttonId = (0, $bSzeT$reactariautils.useId)();
369
+ let { rowProps: rowProps } = (0, $bSzeT$reactariagrid.useGridRow)({
350
370
  node: item
351
371
  }, state, tagRowRef);
352
372
  // Don't want the row to be focusable or accessible via keyboard
353
373
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
354
374
  let { tabIndex: tabIndex , ...otherRowProps } = rowProps;
355
- let { gridCellProps: gridCellProps } = $bSzeT$reactariagrid.useGridCell({
375
+ let { gridCellProps: gridCellProps } = (0, $bSzeT$reactariagrid.useGridCell)({
356
376
  node: [
357
377
  ...item.childNodes
358
378
  ][0],
359
- focusMode: 'cell'
379
+ focusMode: "cell"
360
380
  }, state, tagRef);
361
381
  function onKeyDown(e) {
362
- if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {
363
- onRemove(children, e);
382
+ if (e.key === "Delete" || e.key === "Backspace" || e.key === " ") {
383
+ onRemove(item.childNodes[0].key);
364
384
  e.preventDefault();
365
385
  }
366
386
  }
367
387
  const pressProps = {
368
- onPress: (e)=>{
369
- return onRemove === null || onRemove === void 0 ? void 0 : onRemove(children, e);
388
+ onPress: ()=>{
389
+ return onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.childNodes[0].key);
370
390
  }
371
391
  };
372
392
  isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;
373
- let domProps = $bSzeT$reactariautils.filterDOMProps(props);
393
+ let domProps = (0, $bSzeT$reactariautils.filterDOMProps)(props);
374
394
  return {
375
- clearButtonProps: $bSzeT$reactariautils.mergeProps(pressProps, {
376
- 'aria-label': removeString,
377
- 'aria-labelledby': `${buttonId} ${labelId}`,
378
- id: buttonId,
379
- isDisabled: isDisabled
395
+ clearButtonProps: (0, $bSzeT$reactariautils.mergeProps)(pressProps, {
396
+ "aria-label": removeString,
397
+ "aria-labelledby": `${buttonId} ${labelId}`,
398
+ id: buttonId
380
399
  }),
381
400
  labelProps: {
382
401
  id: labelId
383
402
  },
384
403
  tagRowProps: otherRowProps,
385
- tagProps: $bSzeT$reactariautils.mergeProps(domProps, gridCellProps, {
386
- 'aria-disabled': isDisabled,
387
- 'aria-errormessage': props['aria-errormessage'],
388
- 'aria-label': props['aria-label'],
389
- onKeyDown: !isDisabled && isRemovable ? onKeyDown : null,
390
- tabIndex: (isFocused || state.selectionManager.focusedKey == null) && !isDisabled ? 0 : -1
404
+ tagProps: (0, $bSzeT$reactariautils.mergeProps)(domProps, gridCellProps, {
405
+ "aria-errormessage": props["aria-errormessage"],
406
+ "aria-label": props["aria-label"],
407
+ onKeyDown: allowsRemoving ? onKeyDown : null,
408
+ tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1
391
409
  })
392
410
  };
393
411
  }
394
412
 
395
413
 
414
+ /*
415
+ * Copyright 2020 Adobe. All rights reserved.
416
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
417
+ * you may not use this file except in compliance with the License. You may obtain a copy
418
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
419
+ *
420
+ * Unless required by applicable law or agreed to in writing, software distributed under
421
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
422
+ * OF ANY KIND, either express or implied. See the License for the specific language
423
+ * governing permissions and limitations under the License.
424
+ */
396
425
 
397
426
 
398
-
399
- function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, listState) {
400
- let { isDisabled: isDisabled } = props;
401
- let [isFocusWithin, setFocusWithin] = $bSzeT$react.useState(false);
402
- let { focusWithinProps: focusWithinProps } = $bSzeT$reactariainteractions.useFocusWithin({
427
+ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props) {
428
+ let [isFocusWithin, setFocusWithin] = (0, $bSzeT$react.useState)(false);
429
+ let { focusWithinProps: focusWithinProps } = (0, $bSzeT$reactariainteractions.useFocusWithin)({
403
430
  onFocusWithinChange: setFocusWithin
404
431
  });
405
- let allKeys = [
406
- ...listState.collection.getKeys()
407
- ];
408
- if (!allKeys.some((key)=>!listState.disabledKeys.has(key)
409
- )) isDisabled = true;
410
- let domProps = $bSzeT$reactariautils.filterDOMProps(props);
432
+ let domProps = (0, $bSzeT$reactariautils.filterDOMProps)(props);
411
433
  return {
412
- tagGroupProps: $bSzeT$reactariautils.mergeProps(domProps, {
413
- 'aria-atomic': false,
414
- 'aria-relevant': 'additions',
415
- 'aria-live': isFocusWithin ? 'polite' : 'off',
416
- 'aria-disabled': isDisabled === true,
434
+ tagGroupProps: (0, $bSzeT$reactariautils.mergeProps)(domProps, {
435
+ "aria-atomic": false,
436
+ "aria-relevant": "additions",
437
+ "aria-live": isFocusWithin ? "polite" : "off",
417
438
  ...focusWithinProps
418
439
  })
419
440
  };
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;MCgBa,yCAAmB,SAAY,yCAAoB;IAC9D,WAAW,GAAG,CAAC;QACb,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;QACrC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG;QACtC,GAAG,CAAC,MAAM,GAAG,CAAC;eAAG,IAAI,CAAC,UAAU;QAAA,CAAC,CAAC,CAAC,EAAE,GAAG;QAExC,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,GAC9B,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM;QAElC,MAAM,CAAC,MAAM;IACf,CAAC;IAED,UAAU,GAAG,CAAC;QACZ,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU;QACpC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,OA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AI;IAEnB,GAAG,CAAC,QAAQ,GAAG,oCAAc,CAAC,KAAK;IACnC,MAAM,CAAC,CAAC;QACN,aAAa,EAAE,gCAAU,CAAC,QAAQ,EAAE,CAAC;YACnC,CAAa,cAAE,KAAK;YACpB,CAAe,gBAAE,CAAW;YAC5B,CAAW,YAAE,aAAa,GAAG,CAAQ,UAAG,CAAK;YAC7C,CAAe,gBAAE,UAAU,KAAK,IAAI;eACjC,gBAAgB;QACrB,CAAC;IACH,CAAC;AACH,CAAC;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridCollection} from '@react-types/grid';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {\n getFirstKey() {\n let key = this.collection.getFirstKey();\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][0].key;\n\n if (this.disabledKeys.has(newKey)) {\n newKey = this.getKeyBelow(newKey);\n }\n return newKey;\n }\n\n getLastKey() {\n let key = this.collection.getLastKey();\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][0].key;\n\n if (this.disabledKeys.has(newKey)) {\n newKey = this.getKeyAbove(newKey);\n }\n return newKey;\n }\n\n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus was on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the next item\n key = this.findNextKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the next row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][startItem.index].key;\n\n // Ignore disabled tags\n if (this.disabledKeys.has(newKey)) {\n return this.getKeyBelow(newKey);\n }\n return newKey;\n }\n\n // Otherwise, focus the next row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus is on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the previous item\n key = this.findPreviousKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the previous row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][startItem.index].key;\n\n // ignore disabled tags\n if (this.disabledKeys.has(newKey)) {\n return this.getKeyAbove(newKey);\n }\n return newKey;\n }\n\n // Otherwise, focus the previous row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonHTMLAttributes, KeyboardEvent} from 'react';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {TagProps} from '@react-types/tag';\nimport {useGridCell, useGridRow} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n labelProps: DOMAttributes,\n tagProps: DOMAttributes,\n tagRowProps: DOMAttributes,\n clearButtonProps: ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {\n let {isFocused} = props;\n const {\n isDisabled,\n isRemovable,\n onRemove,\n children,\n item,\n tagRef,\n tagRowRef\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const removeString = stringFormatter.format('remove');\n const labelId = useId();\n const buttonId = useId();\n\n let {rowProps} = useGridRow({\n node: item\n }, state, tagRowRef);\n // Don't want the row to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherRowProps} = rowProps;\n\n let {gridCellProps} = useGridCell({\n node: [...item.childNodes][0],\n focusMode: 'cell'\n }, state, tagRef);\n\n function onKeyDown(e: KeyboardEvent<Element>) {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(children, e);\n e.preventDefault();\n }\n }\n const pressProps = {\n onPress: e => onRemove?.(children, e)\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: mergeProps(pressProps, {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId,\n isDisabled\n }),\n labelProps: {\n id: labelId\n },\n tagRowProps: otherRowProps,\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-disabled': isDisabled,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label'],\n onKeyDown: !isDisabled && isRemovable ? onKeyDown : null,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) && !isDisabled ? 0 : -1\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"إزالة\"\n}\n","{\n \"remove\": \"Премахване\"\n}\n","{\n \"remove\": \"Odebrat\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Entfernen\"\n}\n","{\n \"remove\": \"Κατάργηση\"\n}\n","{\n \"remove\": \"Remove\"\n}\n","{\n \"remove\": \"Quitar\"\n}\n","{\n \"remove\": \"Eemalda\"\n}\n","{\n \"remove\": \"Poista\"\n}\n","{\n \"remove\": \"Supprimer\"\n}\n","{\n \"remove\": \"הסר\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Eltávolítás\"\n}\n","{\n \"remove\": \"Rimuovi\"\n}\n","{\n \"remove\": \"削除\"\n}\n","{\n \"remove\": \"제거\"\n}\n","{\n \"remove\": \"Pašalinti\"\n}\n","{\n \"remove\": \"Noņemt\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Verwijderen\"\n}\n","{\n \"remove\": \"Usuń\"\n}\n","{\n \"remove\": \"Remover\"\n}\n","{\n \"remove\": \"Eliminar\"\n}\n","{\n \"remove\": \"Îndepărtaţi\"\n}\n","{\n \"remove\": \"Удалить\"\n}\n","{\n \"remove\": \"Odstrániť\"\n}\n","{\n \"remove\": \"Odstrani\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Ta bort\"\n}\n","{\n \"remove\": \"Kaldır\"\n}\n","{\n \"remove\": \"Видалити\"\n}\n","{\n \"remove\": \"删除\"\n}\n","{\n \"remove\": \"移除\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {Key, ReactNode, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface AriaTagGroupProps extends DOMProps {\n children: ReactNode,\n disabledKeys?: Iterable<Key>,\n isDisabled?: boolean,\n isReadOnly?: boolean, // removes close button\n validationState?: 'valid' | 'invalid'\n}\n\nexport interface TagGroupAria {\n tagGroupProps: DOMAttributes\n}\n\nexport function useTagGroup(props: AriaTagGroupProps, listState): TagGroupAria {\n let {isDisabled} = props;\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let allKeys = [...listState.collection.getKeys()];\n if (!allKeys.some(key => !listState.disabledKeys.has(key))) {\n isDisabled = true;\n }\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(domProps, {\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n 'aria-disabled': isDisabled === true,\n ...focusWithinProps\n } as DOMAttributes)\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAIO,MAAM,kDAA+B,CAAA,GAAA,yCAAoB,AAAD;IAC7D,cAAc;QACZ,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW;QACrC,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAEnC,OAAO;eAAI,KAAK,UAAU;SAAC,CAAC,EAAE,CAAC,GAAG;IACpC;IAEA,aAAa;QACX,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU;QACpC,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAEnC,OAAO;eAAI,KAAK,UAAU;SAAC,CAAC,EAAE,CAAC,GAAG;IACpC;IAEA,cAAc,GAAQ,EAAE;QACtB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,aAAa,GAAQ,EAAE;QACrB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,YAAY,GAAG,EAAE;QACf,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,WACH;QAGF,8DAA8D;QAC9D,IAAI,IAAI,CAAC,MAAM,CAAC,YACd,MAAM,UAAU,SAAS;QAG3B,qBAAqB;QACrB,MAAM,IAA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;;AoCrFA;;;;;;;;;;CAUC,GAED;;;AAeO,SAAS,0CAAY,KAAwB,EAAgB;IAClE,IAAI,CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE,KAAK;IACpD,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAc,AAAD,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO;QACL,eAAe,CAAA,GAAA,gCAAU,AAAD,EAAE,UAAU;YAClC,eAAe,KAAK;YACpB,iBAAiB;YACjB,aAAa,gBAAgB,WAAW,KAAK;YAC7C,GAAG,gBAAgB;QACrB;IACF;AACF;;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridCollection} from '@react-types/grid';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {\n getFirstKey() {\n let key = this.collection.getFirstKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getLastKey() {\n let key = this.collection.getLastKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus was on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the next item\n key = this.findNextKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the next row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the next row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus is on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the previous item\n key = this.findPreviousKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the previous row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the previous row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonHTMLAttributes, KeyboardEvent} from 'react';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {TagProps} from '@react-types/tag';\nimport {useGridCell, useGridRow} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n labelProps: DOMAttributes,\n tagProps: DOMAttributes,\n tagRowProps: DOMAttributes,\n clearButtonProps: ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {\n let {isFocused} = props;\n const {\n allowsRemoving,\n onRemove,\n item,\n tagRef,\n tagRowRef\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const removeString = stringFormatter.format('remove');\n const labelId = useId();\n const buttonId = useId();\n\n let {rowProps} = useGridRow({\n node: item\n }, state, tagRowRef);\n // Don't want the row to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherRowProps} = rowProps;\n\n let {gridCellProps} = useGridCell({\n node: [...item.childNodes][0],\n focusMode: 'cell'\n }, state, tagRef);\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(item.childNodes[0].key);\n e.preventDefault();\n }\n }\n const pressProps = {\n onPress: () => onRemove?.(item.childNodes[0].key)\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: mergeProps(pressProps, {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId\n }),\n labelProps: {\n id: labelId\n },\n tagRowProps: otherRowProps,\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label'],\n onKeyDown: allowsRemoving ? onKeyDown : null,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"إزالة\"\n}\n","{\n \"remove\": \"Премахване\"\n}\n","{\n \"remove\": \"Odebrat\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Entfernen\"\n}\n","{\n \"remove\": \"Κατάργηση\"\n}\n","{\n \"remove\": \"Remove\"\n}\n","{\n \"remove\": \"Quitar\"\n}\n","{\n \"remove\": \"Eemalda\"\n}\n","{\n \"remove\": \"Poista\"\n}\n","{\n \"remove\": \"Supprimer\"\n}\n","{\n \"remove\": \"הסר\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Eltávolítás\"\n}\n","{\n \"remove\": \"Rimuovi\"\n}\n","{\n \"remove\": \"削除\"\n}\n","{\n \"remove\": \"제거\"\n}\n","{\n \"remove\": \"Pašalinti\"\n}\n","{\n \"remove\": \"Noņemt\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Verwijderen\"\n}\n","{\n \"remove\": \"Usuń\"\n}\n","{\n \"remove\": \"Remover\"\n}\n","{\n \"remove\": \"Eliminar\"\n}\n","{\n \"remove\": \"Îndepărtaţi\"\n}\n","{\n \"remove\": \"Удалить\"\n}\n","{\n \"remove\": \"Odstrániť\"\n}\n","{\n \"remove\": \"Odstrani\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Ta bort\"\n}\n","{\n \"remove\": \"Kaldır\"\n}\n","{\n \"remove\": \"Видалити\"\n}\n","{\n \"remove\": \"删除\"\n}\n","{\n \"remove\": \"移除\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {ReactNode, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface AriaTagGroupProps extends DOMProps {\n children: ReactNode,\n isReadOnly?: boolean, // removes close button\n validationState?: 'valid' | 'invalid'\n}\n\nexport interface TagGroupAria {\n tagGroupProps: DOMAttributes\n}\n\nexport function useTagGroup(props: AriaTagGroupProps): TagGroupAria {\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(domProps, {\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps\n } as DOMAttributes)\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -7,31 +7,47 @@ import {useFocusWithin as $aIvin$useFocusWithin} from "@react-aria/interactions"
7
7
  function $parcel$interopDefault(a) {
8
8
  return a && a.__esModule ? a.default : a;
9
9
  }
10
-
11
- class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDelegate {
10
+ /*
11
+ * Copyright 2020 Adobe. All rights reserved.
12
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License. You may obtain a copy
14
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software distributed under
17
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
+ * OF ANY KIND, either express or implied. See the License for the specific language
19
+ * governing permissions and limitations under the License.
20
+ */ /*
21
+ * Copyright 2020 Adobe. All rights reserved.
22
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License. You may obtain a copy
24
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software distributed under
27
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
28
+ * OF ANY KIND, either express or implied. See the License for the specific language
29
+ * governing permissions and limitations under the License.
30
+ */
31
+ class $542448901dbd2c36$export$b00754732e683b92 extends (0, $aIvin$GridKeyboardDelegate) {
12
32
  getFirstKey() {
13
33
  let key = this.collection.getFirstKey();
14
34
  let item = this.collection.getItem(key);
15
- let newKey = [
35
+ return [
16
36
  ...item.childNodes
17
37
  ][0].key;
18
- if (this.disabledKeys.has(newKey)) newKey = this.getKeyBelow(newKey);
19
- return newKey;
20
38
  }
21
39
  getLastKey() {
22
40
  let key = this.collection.getLastKey();
23
41
  let item = this.collection.getItem(key);
24
- let newKey = [
42
+ return [
25
43
  ...item.childNodes
26
44
  ][0].key;
27
- if (this.disabledKeys.has(newKey)) newKey = this.getKeyAbove(newKey);
28
- return newKey;
29
45
  }
30
46
  getKeyRightOf(key) {
31
- return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);
47
+ return this.direction === "rtl" ? this.getKeyAbove(key) : this.getKeyBelow(key);
32
48
  }
33
49
  getKeyLeftOf(key) {
34
- return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);
50
+ return this.direction === "rtl" ? this.getKeyBelow(key) : this.getKeyAbove(key);
35
51
  }
36
52
  getKeyBelow(key) {
37
53
  let startItem = this.collection.getItem(key);
@@ -44,15 +60,12 @@ class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDeleg
44
60
  // If focus was on a cell, focus the cell with the same index in the next row.
45
61
  if (this.isCell(startItem)) {
46
62
  let item = this.collection.getItem(key);
47
- let newKey = [
63
+ return [
48
64
  ...item.childNodes
49
65
  ][startItem.index].key;
50
- // Ignore disabled tags
51
- if (this.disabledKeys.has(newKey)) return this.getKeyBelow(newKey);
52
- return newKey;
53
66
  }
54
67
  // Otherwise, focus the next row
55
- if (this.focusMode === 'row') return key;
68
+ if (this.focusMode === "row") return key;
56
69
  } else return this.getFirstKey();
57
70
  }
58
71
  getKeyAbove(key) {
@@ -66,15 +79,12 @@ class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDeleg
66
79
  // If focus was on a cell, focus the cell with the same index in the previous row.
67
80
  if (this.isCell(startItem)) {
68
81
  let item = this.collection.getItem(key);
69
- let newKey = [
82
+ return [
70
83
  ...item.childNodes
71
84
  ][startItem.index].key;
72
- // ignore disabled tags
73
- if (this.disabledKeys.has(newKey)) return this.getKeyAbove(newKey);
74
- return newKey;
75
85
  }
76
86
  // Otherwise, focus the previous row
77
- if (this.focusMode === 'row') return key;
87
+ if (this.focusMode === "row") return key;
78
88
  } else return this.getLastKey();
79
89
  }
80
90
  getKeyPageAbove(key) {
@@ -86,7 +96,17 @@ class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDeleg
86
96
  }
87
97
 
88
98
 
89
-
99
+ /*
100
+ * Copyright 2020 Adobe. All rights reserved.
101
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
102
+ * you may not use this file except in compliance with the License. You may obtain a copy
103
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
104
+ *
105
+ * Unless required by applicable law or agreed to in writing, software distributed under
106
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
107
+ * OF ANY KIND, either express or implied. See the License for the specific language
108
+ * governing permissions and limitations under the License.
109
+ */
90
110
  var $4d1b62e0e67c00a4$exports = {};
91
111
  var $84925f526f90eebd$exports = {};
92
112
  $84925f526f90eebd$exports = {
@@ -334,79 +354,80 @@ $4d1b62e0e67c00a4$exports = {
334
354
 
335
355
  function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state) {
336
356
  let { isFocused: isFocused } = props;
337
- const { isDisabled: isDisabled , isRemovable: isRemovable , onRemove: onRemove , children: children , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
338
- const stringFormatter = $aIvin$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($4d1b62e0e67c00a4$exports)));
339
- const removeString = stringFormatter.format('remove');
340
- const labelId = $aIvin$useId();
341
- const buttonId = $aIvin$useId();
342
- let { rowProps: rowProps } = $aIvin$useGridRow({
357
+ const { allowsRemoving: allowsRemoving , onRemove: onRemove , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
358
+ const stringFormatter = (0, $aIvin$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($4d1b62e0e67c00a4$exports))));
359
+ const removeString = stringFormatter.format("remove");
360
+ const labelId = (0, $aIvin$useId)();
361
+ const buttonId = (0, $aIvin$useId)();
362
+ let { rowProps: rowProps } = (0, $aIvin$useGridRow)({
343
363
  node: item
344
364
  }, state, tagRowRef);
345
365
  // Don't want the row to be focusable or accessible via keyboard
346
366
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
347
367
  let { tabIndex: tabIndex , ...otherRowProps } = rowProps;
348
- let { gridCellProps: gridCellProps } = $aIvin$useGridCell({
368
+ let { gridCellProps: gridCellProps } = (0, $aIvin$useGridCell)({
349
369
  node: [
350
370
  ...item.childNodes
351
371
  ][0],
352
- focusMode: 'cell'
372
+ focusMode: "cell"
353
373
  }, state, tagRef);
354
374
  function onKeyDown(e) {
355
- if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {
356
- onRemove(children, e);
375
+ if (e.key === "Delete" || e.key === "Backspace" || e.key === " ") {
376
+ onRemove(item.childNodes[0].key);
357
377
  e.preventDefault();
358
378
  }
359
379
  }
360
380
  const pressProps = {
361
- onPress: (e)=>{
362
- return onRemove === null || onRemove === void 0 ? void 0 : onRemove(children, e);
381
+ onPress: ()=>{
382
+ return onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.childNodes[0].key);
363
383
  }
364
384
  };
365
385
  isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;
366
- let domProps = $aIvin$filterDOMProps(props);
386
+ let domProps = (0, $aIvin$filterDOMProps)(props);
367
387
  return {
368
- clearButtonProps: $aIvin$mergeProps(pressProps, {
369
- 'aria-label': removeString,
370
- 'aria-labelledby': `${buttonId} ${labelId}`,
371
- id: buttonId,
372
- isDisabled: isDisabled
388
+ clearButtonProps: (0, $aIvin$mergeProps)(pressProps, {
389
+ "aria-label": removeString,
390
+ "aria-labelledby": `${buttonId} ${labelId}`,
391
+ id: buttonId
373
392
  }),
374
393
  labelProps: {
375
394
  id: labelId
376
395
  },
377
396
  tagRowProps: otherRowProps,
378
- tagProps: $aIvin$mergeProps(domProps, gridCellProps, {
379
- 'aria-disabled': isDisabled,
380
- 'aria-errormessage': props['aria-errormessage'],
381
- 'aria-label': props['aria-label'],
382
- onKeyDown: !isDisabled && isRemovable ? onKeyDown : null,
383
- tabIndex: (isFocused || state.selectionManager.focusedKey == null) && !isDisabled ? 0 : -1
397
+ tagProps: (0, $aIvin$mergeProps)(domProps, gridCellProps, {
398
+ "aria-errormessage": props["aria-errormessage"],
399
+ "aria-label": props["aria-label"],
400
+ onKeyDown: allowsRemoving ? onKeyDown : null,
401
+ tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1
384
402
  })
385
403
  };
386
404
  }
387
405
 
388
406
 
407
+ /*
408
+ * Copyright 2020 Adobe. All rights reserved.
409
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
410
+ * you may not use this file except in compliance with the License. You may obtain a copy
411
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
412
+ *
413
+ * Unless required by applicable law or agreed to in writing, software distributed under
414
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
415
+ * OF ANY KIND, either express or implied. See the License for the specific language
416
+ * governing permissions and limitations under the License.
417
+ */
389
418
 
390
419
 
391
-
392
- function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, listState) {
393
- let { isDisabled: isDisabled } = props;
394
- let [isFocusWithin, setFocusWithin] = $aIvin$useState(false);
395
- let { focusWithinProps: focusWithinProps } = $aIvin$useFocusWithin({
420
+ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props) {
421
+ let [isFocusWithin, setFocusWithin] = (0, $aIvin$useState)(false);
422
+ let { focusWithinProps: focusWithinProps } = (0, $aIvin$useFocusWithin)({
396
423
  onFocusWithinChange: setFocusWithin
397
424
  });
398
- let allKeys = [
399
- ...listState.collection.getKeys()
400
- ];
401
- if (!allKeys.some((key)=>!listState.disabledKeys.has(key)
402
- )) isDisabled = true;
403
- let domProps = $aIvin$filterDOMProps(props);
425
+ let domProps = (0, $aIvin$filterDOMProps)(props);
404
426
  return {
405
- tagGroupProps: $aIvin$mergeProps(domProps, {
406
- 'aria-atomic': false,
407
- 'aria-relevant': 'additions',
408
- 'aria-live': isFocusWithin ? 'polite' : 'off',
409
- 'aria-disabled': isDisabled === true,
427
+ tagGroupProps: (0, $aIvin$mergeProps)(domProps, {
428
+ "aria-atomic": false,
429
+ "aria-relevant": "additions",
430
+ "aria-live": isFocusWithin ? "polite" : "off",
410
431
  ...focusWithinProps
411
432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,KAAK,CAAC,gBAAgB,CAAC,UAAU,IAAI,IAAI,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE;QAC5F,CAAC;IACH,CAAC;AACH,CAAC;;;;;;SoC5De,yCAAW,CAAC,KAAwB,EAAE,SAAS,EAAgB,CAAC;IAC9E,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,KAAK;IACxB,GAAG,EAAE,aAAa,EAAE,cAAc,IAAI,eAAQ,CAAC,KAAK;IACpD,GAAG,CAAC,CAAC,mBAAA,gBAAgB,EAAA,CAAC,GAAG,qBAAc,CAAC,CAAC;QACvC,mBAAmB,EAAE,cAAc;IACrC,CAAC;IACD,GAAG,CAAC,OAAO,GAAG,CAAC;WAAG,SAAS,CAAC,UAAU,CAAC,OAAO;IAAE,CAAC;IACjD,EAAE,GAAG,OAAO,CAAC,IAAI,EAAC,GAAG,IAAK,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG;OACtD,UAAU,GAAG,IAAI;IAEnB,GAAG,CAAC,QAAQ,GAAG,qBAAc,CAAC,KAAK;IACnC,MAAM,CAAC,CAAC;QACN,aAAa,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC;YACnC,CAAa,cAAE,KAAK;YACpB,CAAe,gBAAE,CAAW;YAC5B,CAAW,YAAE,aAAa,GAAG,CAAQ,UAAG,CAAK;YAC7C,CAAe,gBAAE,UAAU,KAAK,IAAI;eACjC,gBAAgB;QACrB,CAAC;IACH,CAAC;AACH,CAAC;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridCollection} from '@react-types/grid';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {\n getFirstKey() {\n let key = this.collection.getFirstKey();\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][0].key;\n\n if (this.disabledKeys.has(newKey)) {\n newKey = this.getKeyBelow(newKey);\n }\n return newKey;\n }\n\n getLastKey() {\n let key = this.collection.getLastKey();\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][0].key;\n\n if (this.disabledKeys.has(newKey)) {\n newKey = this.getKeyAbove(newKey);\n }\n return newKey;\n }\n\n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus was on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the next item\n key = this.findNextKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the next row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][startItem.index].key;\n\n // Ignore disabled tags\n if (this.disabledKeys.has(newKey)) {\n return this.getKeyBelow(newKey);\n }\n return newKey;\n }\n\n // Otherwise, focus the next row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus is on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the previous item\n key = this.findPreviousKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the previous row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n let newKey = [...item.childNodes][startItem.index].key;\n\n // ignore disabled tags\n if (this.disabledKeys.has(newKey)) {\n return this.getKeyAbove(newKey);\n }\n return newKey;\n }\n\n // Otherwise, focus the previous row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonHTMLAttributes, KeyboardEvent} from 'react';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {TagProps} from '@react-types/tag';\nimport {useGridCell, useGridRow} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n labelProps: DOMAttributes,\n tagProps: DOMAttributes,\n tagRowProps: DOMAttributes,\n clearButtonProps: ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {\n let {isFocused} = props;\n const {\n isDisabled,\n isRemovable,\n onRemove,\n children,\n item,\n tagRef,\n tagRowRef\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const removeString = stringFormatter.format('remove');\n const labelId = useId();\n const buttonId = useId();\n\n let {rowProps} = useGridRow({\n node: item\n }, state, tagRowRef);\n // Don't want the row to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherRowProps} = rowProps;\n\n let {gridCellProps} = useGridCell({\n node: [...item.childNodes][0],\n focusMode: 'cell'\n }, state, tagRef);\n\n function onKeyDown(e: KeyboardEvent<Element>) {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(children, e);\n e.preventDefault();\n }\n }\n const pressProps = {\n onPress: e => onRemove?.(children, e)\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: mergeProps(pressProps, {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId,\n isDisabled\n }),\n labelProps: {\n id: labelId\n },\n tagRowProps: otherRowProps,\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-disabled': isDisabled,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label'],\n onKeyDown: !isDisabled && isRemovable ? onKeyDown : null,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) && !isDisabled ? 0 : -1\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"إزالة\"\n}\n","{\n \"remove\": \"Премахване\"\n}\n","{\n \"remove\": \"Odebrat\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Entfernen\"\n}\n","{\n \"remove\": \"Κατάργηση\"\n}\n","{\n \"remove\": \"Remove\"\n}\n","{\n \"remove\": \"Quitar\"\n}\n","{\n \"remove\": \"Eemalda\"\n}\n","{\n \"remove\": \"Poista\"\n}\n","{\n \"remove\": \"Supprimer\"\n}\n","{\n \"remove\": \"הסר\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Eltávolítás\"\n}\n","{\n \"remove\": \"Rimuovi\"\n}\n","{\n \"remove\": \"削除\"\n}\n","{\n \"remove\": \"제거\"\n}\n","{\n \"remove\": \"Pašalinti\"\n}\n","{\n \"remove\": \"Noņemt\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Verwijderen\"\n}\n","{\n \"remove\": \"Usuń\"\n}\n","{\n \"remove\": \"Remover\"\n}\n","{\n \"remove\": \"Eliminar\"\n}\n","{\n \"remove\": \"Îndepărtaţi\"\n}\n","{\n \"remove\": \"Удалить\"\n}\n","{\n \"remove\": \"Odstrániť\"\n}\n","{\n \"remove\": \"Odstrani\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Ta bort\"\n}\n","{\n \"remove\": \"Kaldır\"\n}\n","{\n \"remove\": \"Видалити\"\n}\n","{\n \"remove\": \"删除\"\n}\n","{\n \"remove\": \"移除\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {Key, ReactNode, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface AriaTagGroupProps extends DOMProps {\n children: ReactNode,\n disabledKeys?: Iterable<Key>,\n isDisabled?: boolean,\n isReadOnly?: boolean, // removes close button\n validationState?: 'valid' | 'invalid'\n}\n\nexport interface TagGroupAria {\n tagGroupProps: DOMAttributes\n}\n\nexport function useTagGroup(props: AriaTagGroupProps, listState): TagGroupAria {\n let {isDisabled} = props;\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let allKeys = [...listState.collection.getKeys()];\n if (!allKeys.some(key => !listState.disabledKeys.has(key))) {\n isDisabled = true;\n }\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(domProps, {\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n 'aria-disabled': isDisabled === true,\n ...focusWithinProps\n } as DOMAttributes)\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAIO,MAAM,kDAA+B,CAAA,GAAA,2BAAoB,AAAD;IAC7D,cAAc;QACZ,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW;QACrC,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAEnC,OAAO;eAAI,KAAK,UAAU;SAAC,CAAC,EAAE,CAAC,GAAG;IACpC;IAEA,aAAa;QACX,IAAI,MAAM,IAAI,CAAC,UAAU,CAA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,CAAC,EAAE,CAAC,GAAG;;IAClD;IAEA,YAAY,aAAa,MAAM,gBAAgB,CAAC,UAAU,KAAK,KAAK,UAAU,CAAC,EAAE,CAAC,GAAG;IACrF,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO;QACL,kBAAkB,CAAA,GAAA,iBAAU,AAAD,EAAE,YAAY;YACvC,cAAc;YACd,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;YAC3C,IAAI;QACN;QACA,YAAY;YACV,IAAI;QACN;QACA,aAAa;QACb,UAAU,CAAA,GAAA,iBAAU,AAAD,EAAE,UAAU,eAAe;YAC5C,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;YACjC,WAAW,iBAAiB,YAAY,IAAI;YAC5C,UAAU,AAAC,aAAa,MAAM,gBAAgB,CAAC,UAAU,IAAI,IAAI,GAAI,IAAI,EAAE;QAC7E;IACF;AACF;;;AoCrFA;;;;;;;;;;CAUC,GAED;;;AAeO,SAAS,0CAAY,KAAwB,EAAgB;IAClE,IAAI,CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE,KAAK;IACpD,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,qBAAc,AAAD,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO;QACL,eAAe,CAAA,GAAA,iBAAU,AAAD,EAAE,UAAU;YAClC,eAAe,KAAK;YACpB,iBAAiB;YACjB,aAAa,gBAAgB,WAAW,KAAK;YAC7C,GAAG,gBAAgB;QACrB;IACF;AACF;;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridCollection} from '@react-types/grid';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {\n getFirstKey() {\n let key = this.collection.getFirstKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getLastKey() {\n let key = this.collection.getLastKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus was on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the next item\n key = this.findNextKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the next row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the next row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus is on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the previous item\n key = this.findPreviousKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the previous row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the previous row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonHTMLAttributes, KeyboardEvent} from 'react';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {TagProps} from '@react-types/tag';\nimport {useGridCell, useGridRow} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n labelProps: DOMAttributes,\n tagProps: DOMAttributes,\n tagRowProps: DOMAttributes,\n clearButtonProps: ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {\n let {isFocused} = props;\n const {\n allowsRemoving,\n onRemove,\n item,\n tagRef,\n tagRowRef\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const removeString = stringFormatter.format('remove');\n const labelId = useId();\n const buttonId = useId();\n\n let {rowProps} = useGridRow({\n node: item\n }, state, tagRowRef);\n // Don't want the row to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherRowProps} = rowProps;\n\n let {gridCellProps} = useGridCell({\n node: [...item.childNodes][0],\n focusMode: 'cell'\n }, state, tagRef);\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(item.childNodes[0].key);\n e.preventDefault();\n }\n }\n const pressProps = {\n onPress: () => onRemove?.(item.childNodes[0].key)\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: mergeProps(pressProps, {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId\n }),\n labelProps: {\n id: labelId\n },\n tagRowProps: otherRowProps,\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label'],\n onKeyDown: allowsRemoving ? onKeyDown : null,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"إزالة\"\n}\n","{\n \"remove\": \"Премахване\"\n}\n","{\n \"remove\": \"Odebrat\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Entfernen\"\n}\n","{\n \"remove\": \"Κατάργηση\"\n}\n","{\n \"remove\": \"Remove\"\n}\n","{\n \"remove\": \"Quitar\"\n}\n","{\n \"remove\": \"Eemalda\"\n}\n","{\n \"remove\": \"Poista\"\n}\n","{\n \"remove\": \"Supprimer\"\n}\n","{\n \"remove\": \"הסר\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Eltávolítás\"\n}\n","{\n \"remove\": \"Rimuovi\"\n}\n","{\n \"remove\": \"削除\"\n}\n","{\n \"remove\": \"제거\"\n}\n","{\n \"remove\": \"Pašalinti\"\n}\n","{\n \"remove\": \"Noņemt\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Verwijderen\"\n}\n","{\n \"remove\": \"Usuń\"\n}\n","{\n \"remove\": \"Remover\"\n}\n","{\n \"remove\": \"Eliminar\"\n}\n","{\n \"remove\": \"Îndepărtaţi\"\n}\n","{\n \"remove\": \"Удалить\"\n}\n","{\n \"remove\": \"Odstrániť\"\n}\n","{\n \"remove\": \"Odstrani\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Ta bort\"\n}\n","{\n \"remove\": \"Kaldır\"\n}\n","{\n \"remove\": \"Видалити\"\n}\n","{\n \"remove\": \"删除\"\n}\n","{\n \"remove\": \"移除\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {ReactNode, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface AriaTagGroupProps extends DOMProps {\n children: ReactNode,\n isReadOnly?: boolean, // removes close button\n validationState?: 'valid' | 'invalid'\n}\n\nexport interface TagGroupAria {\n tagGroupProps: DOMAttributes\n}\n\nexport function useTagGroup(props: AriaTagGroupProps): TagGroupAria {\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(domProps, {\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps\n } as DOMAttributes)\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -5,8 +5,8 @@ import { DOMAttributes, DOMProps } from "@react-types/shared";
5
5
  import { GridState } from "@react-stately/grid";
6
6
  import { TagProps } from "@react-types/tag";
7
7
  export class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {
8
- getFirstKey(): any;
9
- getLastKey(): any;
8
+ getFirstKey(): Key;
9
+ getLastKey(): Key;
10
10
  getKeyRightOf(key: Key): any;
11
11
  getKeyLeftOf(key: Key): any;
12
12
  getKeyBelow(key: any): any;
@@ -23,15 +23,13 @@ export interface TagAria {
23
23
  export function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria;
24
24
  export interface AriaTagGroupProps extends DOMProps {
25
25
  children: ReactNode;
26
- disabledKeys?: Iterable<Key>;
27
- isDisabled?: boolean;
28
26
  isReadOnly?: boolean;
29
27
  validationState?: 'valid' | 'invalid';
30
28
  }
31
29
  export interface TagGroupAria {
32
30
  tagGroupProps: DOMAttributes;
33
31
  }
34
- export function useTagGroup(props: AriaTagGroupProps, listState: any): TagGroupAria;
32
+ export function useTagGroup(props: AriaTagGroupProps): TagGroupAria;
35
33
  export type { TagProps } from '@react-types/tag';
36
34
 
37
35
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAgBA,iCAAiC,CAAC,CAAE,SAAQ,qBAAqB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IACpF,WAAW;IAWX,UAAU;IAWV,aAAa,CAAC,GAAG,EAAE,GAAG;IAItB,YAAY,CAAC,GAAG,EAAE,GAAG;IAIrB,WAAW,CAAC,GAAG,KAAA;IAmCf,WAAW,CAAC,GAAG,KAAA;IAmCf,eAAe,CAAC,GAAG,KAAA;IAInB,eAAe,CAAC,GAAG,KAAA;CAGpB;ACrGD;IACE,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,gBAAgB,EAAE,qBAAqB,iBAAiB,CAAC,CAAA;CAC1D;AAED,uBAAuB,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CA2DhF;ACxED,kCAAmC,SAAQ,QAAQ;IACjD,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC;AAED;IACE,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,4BAA4B,KAAK,EAAE,iBAAiB,EAAE,SAAS,KAAA,GAAG,YAAY,CAoB7E;ACjCD,YAAY,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC","sources":["packages/@react-aria/tag/src/packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;;;AAgBA,iCAAiC,CAAC,CAAE,SAAQ,qBAAqB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IACpF,WAAW;IAOX,UAAU;IAOV,aAAa,CAAC,GAAG,EAAE,GAAG;IAItB,YAAY,CAAC,GAAG,EAAE,GAAG;IAIrB,WAAW,CAAC,GAAG,KAAA;IA8Bf,WAAW,CAAC,GAAG,KAAA;IA6Bf,eAAe,CAAC,GAAG,KAAA;IAInB,eAAe,CAAC,GAAG,KAAA;CAGpB;AClFD;IACE,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,gBAAgB,EAAE,qBAAqB,iBAAiB,CAAC,CAAA;CAC1D;AAED,uBAAuB,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAuDhF;ACpED,kCAAmC,SAAQ,QAAQ;IACjD,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC;AAED;IACE,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,4BAA4B,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAclE;ACzBD,YAAY,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC","sources":["packages/@react-aria/tag/src/packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/tag",
3
- "version": "3.0.0-alpha.9",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -17,15 +17,15 @@
17
17
  "url": "https://github.com/adobe/react-spectrum"
18
18
  },
19
19
  "dependencies": {
20
- "@babel/runtime": "^7.6.2",
21
- "@react-aria/grid": "^3.4.1",
22
- "@react-aria/i18n": "^3.6.0",
23
- "@react-aria/interactions": "^3.11.0",
24
- "@react-aria/utils": "^3.13.3",
25
- "@react-stately/grid": "^3.3.1",
26
- "@react-types/grid": "^3.1.3",
27
- "@react-types/shared": "^3.14.1",
28
- "@react-types/tag": "3.0.0-alpha.7"
20
+ "@react-aria/grid": "^3.5.2",
21
+ "@react-aria/i18n": "^3.6.3",
22
+ "@react-aria/interactions": "^3.13.1",
23
+ "@react-aria/utils": "^3.14.2",
24
+ "@react-stately/grid": "^3.4.2",
25
+ "@react-types/grid": "^3.1.5",
26
+ "@react-types/shared": "^3.16.0",
27
+ "@react-types/tag": "3.0.0-beta.1",
28
+ "@swc/helpers": "^0.4.14"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
36
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
37
37
  }
@@ -18,23 +18,15 @@ export class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollecti
18
18
  getFirstKey() {
19
19
  let key = this.collection.getFirstKey();
20
20
  let item = this.collection.getItem(key);
21
- let newKey = [...item.childNodes][0].key;
22
21
 
23
- if (this.disabledKeys.has(newKey)) {
24
- newKey = this.getKeyBelow(newKey);
25
- }
26
- return newKey;
22
+ return [...item.childNodes][0].key;
27
23
  }
28
24
 
29
25
  getLastKey() {
30
26
  let key = this.collection.getLastKey();
31
27
  let item = this.collection.getItem(key);
32
- let newKey = [...item.childNodes][0].key;
33
28
 
34
- if (this.disabledKeys.has(newKey)) {
35
- newKey = this.getKeyAbove(newKey);
36
- }
37
- return newKey;
29
+ return [...item.childNodes][0].key;
38
30
  }
39
31
 
40
32
  getKeyRightOf(key: Key) {
@@ -62,13 +54,8 @@ export class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollecti
62
54
  // If focus was on a cell, focus the cell with the same index in the next row.
63
55
  if (this.isCell(startItem)) {
64
56
  let item = this.collection.getItem(key);
65
- let newKey = [...item.childNodes][startItem.index].key;
66
57
 
67
- // Ignore disabled tags
68
- if (this.disabledKeys.has(newKey)) {
69
- return this.getKeyBelow(newKey);
70
- }
71
- return newKey;
58
+ return [...item.childNodes][startItem.index].key;
72
59
  }
73
60
 
74
61
  // Otherwise, focus the next row
@@ -97,13 +84,7 @@ export class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollecti
97
84
  // If focus was on a cell, focus the cell with the same index in the previous row.
98
85
  if (this.isCell(startItem)) {
99
86
  let item = this.collection.getItem(key);
100
- let newKey = [...item.childNodes][startItem.index].key;
101
-
102
- // ignore disabled tags
103
- if (this.disabledKeys.has(newKey)) {
104
- return this.getKeyAbove(newKey);
105
- }
106
- return newKey;
87
+ return [...item.childNodes][startItem.index].key;
107
88
  }
108
89
 
109
90
  // Otherwise, focus the previous row
package/src/useTag.ts CHANGED
@@ -31,10 +31,8 @@ export interface TagAria {
31
31
  export function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {
32
32
  let {isFocused} = props;
33
33
  const {
34
- isDisabled,
35
- isRemovable,
34
+ allowsRemoving,
36
35
  onRemove,
37
- children,
38
36
  item,
39
37
  tagRef,
40
38
  tagRowRef
@@ -56,14 +54,14 @@ export function useTag(props: TagProps<any>, state: GridState<any, any>): TagAri
56
54
  focusMode: 'cell'
57
55
  }, state, tagRef);
58
56
 
59
- function onKeyDown(e: KeyboardEvent<Element>) {
57
+ function onKeyDown(e: KeyboardEvent) {
60
58
  if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {
61
- onRemove(children, e);
59
+ onRemove(item.childNodes[0].key);
62
60
  e.preventDefault();
63
61
  }
64
62
  }
65
63
  const pressProps = {
66
- onPress: e => onRemove?.(children, e)
64
+ onPress: () => onRemove?.(item.childNodes[0].key)
67
65
  };
68
66
 
69
67
  isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;
@@ -72,19 +70,17 @@ export function useTag(props: TagProps<any>, state: GridState<any, any>): TagAri
72
70
  clearButtonProps: mergeProps(pressProps, {
73
71
  'aria-label': removeString,
74
72
  'aria-labelledby': `${buttonId} ${labelId}`,
75
- id: buttonId,
76
- isDisabled
73
+ id: buttonId
77
74
  }),
78
75
  labelProps: {
79
76
  id: labelId
80
77
  },
81
78
  tagRowProps: otherRowProps,
82
79
  tagProps: mergeProps(domProps, gridCellProps, {
83
- 'aria-disabled': isDisabled,
84
80
  'aria-errormessage': props['aria-errormessage'],
85
81
  'aria-label': props['aria-label'],
86
- onKeyDown: !isDisabled && isRemovable ? onKeyDown : null,
87
- tabIndex: (isFocused || state.selectionManager.focusedKey == null) && !isDisabled ? 0 : -1
82
+ onKeyDown: allowsRemoving ? onKeyDown : null,
83
+ tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1
88
84
  })
89
85
  };
90
86
  }
@@ -12,13 +12,11 @@
12
12
 
13
13
  import {DOMAttributes, DOMProps} from '@react-types/shared';
14
14
  import {filterDOMProps, mergeProps} from '@react-aria/utils';
15
- import {Key, ReactNode, useState} from 'react';
15
+ import {ReactNode, useState} from 'react';
16
16
  import {useFocusWithin} from '@react-aria/interactions';
17
17
 
18
18
  export interface AriaTagGroupProps extends DOMProps {
19
19
  children: ReactNode,
20
- disabledKeys?: Iterable<Key>,
21
- isDisabled?: boolean,
22
20
  isReadOnly?: boolean, // removes close button
23
21
  validationState?: 'valid' | 'invalid'
24
22
  }
@@ -27,23 +25,17 @@ export interface TagGroupAria {
27
25
  tagGroupProps: DOMAttributes
28
26
  }
29
27
 
30
- export function useTagGroup(props: AriaTagGroupProps, listState): TagGroupAria {
31
- let {isDisabled} = props;
28
+ export function useTagGroup(props: AriaTagGroupProps): TagGroupAria {
32
29
  let [isFocusWithin, setFocusWithin] = useState(false);
33
30
  let {focusWithinProps} = useFocusWithin({
34
31
  onFocusWithinChange: setFocusWithin
35
32
  });
36
- let allKeys = [...listState.collection.getKeys()];
37
- if (!allKeys.some(key => !listState.disabledKeys.has(key))) {
38
- isDisabled = true;
39
- }
40
33
  let domProps = filterDOMProps(props);
41
34
  return {
42
35
  tagGroupProps: mergeProps(domProps, {
43
36
  'aria-atomic': false,
44
37
  'aria-relevant': 'additions',
45
38
  'aria-live': isFocusWithin ? 'polite' : 'off',
46
- 'aria-disabled': isDisabled === true,
47
39
  ...focusWithinProps
48
40
  } as DOMAttributes)
49
41
  };