@react-aria/tag 3.0.0-nightly.2912 → 3.0.0-nightly.2925

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.
@@ -33,7 +33,7 @@ $parcel$export(module.exports, "useTag", () => $a442534c81d8ad16$export$3f568fff
33
33
 
34
34
  function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
35
35
  let { item: item } = props;
36
- let stringFormatter = (0, $8p8DL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b6a2538ff098a9ff$exports))), "@react-aria/tag");
36
+ let stringFormatter = (0, $8p8DL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b6a2538ff098a9ff$exports))), '@react-aria/tag');
37
37
  let buttonId = (0, $8p8DL$reactariautils.useId)();
38
38
  let { onRemove: onRemove } = (0, $09704b0efefe5140$exports.hookData).get(state) || {};
39
39
  let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $8p8DL$reactariagridlist.useGridListItem)({
@@ -44,7 +44,7 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
44
44
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
45
45
  let { descriptionProps: _, ...stateWithoutDescription } = states;
46
46
  let onKeyDown = (e)=>{
47
- if (e.key === "Delete" || e.key === "Backspace") {
47
+ if (e.key === 'Delete' || e.key === 'Backspace') {
48
48
  e.preventDefault();
49
49
  if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
50
50
  else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
@@ -53,8 +53,8 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
53
53
  }
54
54
  };
55
55
  let modality = (0, $8p8DL$reactariainteractions.useInteractionModality)();
56
- if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
57
- let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
56
+ if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
57
+ let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
58
58
  let descProps = (0, $8p8DL$reactariautils.useDescription)(description);
59
59
  let isFocused = item.key === state.selectionManager.focusedKey;
60
60
  // @ts-ignore - data attributes are ok but TS doesn't know about them.
@@ -62,8 +62,8 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
62
62
  let linkProps = (0, $8p8DL$reactariautils.getSyntheticLinkProps)(item.props);
63
63
  return {
64
64
  removeButtonProps: {
65
- "aria-label": stringFormatter.format("removeButtonLabel"),
66
- "aria-labelledby": `${buttonId} ${rowProps.id}`,
65
+ 'aria-label': stringFormatter.format('removeButtonLabel'),
66
+ 'aria-labelledby': `${buttonId} ${rowProps.id}`,
67
67
  id: buttonId,
68
68
  onPress: ()=>onRemove ? onRemove(new Set([
69
69
  item.key
@@ -73,11 +73,11 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
73
73
  rowProps: (0, $8p8DL$reactariautils.mergeProps)(rowProps, domProps, linkProps, {
74
74
  tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
75
75
  onKeyDown: onRemove ? onKeyDown : undefined,
76
- "aria-describedby": descProps["aria-describedby"]
76
+ 'aria-describedby': descProps['aria-describedby']
77
77
  }),
78
78
  gridCellProps: (0, $8p8DL$reactariautils.mergeProps)(gridCellProps, {
79
- "aria-errormessage": props["aria-errormessage"],
80
- "aria-label": props["aria-label"]
79
+ 'aria-errormessage': props['aria-errormessage'],
80
+ 'aria-label': props['aria-label']
81
81
  }),
82
82
  ...stateWithoutDescription,
83
83
  allowsRemoving: !!onRemove
package/dist/useTag.mjs CHANGED
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
27
27
 
28
28
  function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
29
29
  let { item: item } = props;
30
- let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), "@react-aria/tag");
30
+ let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), '@react-aria/tag');
31
31
  let buttonId = (0, $ioKwR$useId)();
32
32
  let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
33
33
  let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $ioKwR$useGridListItem)({
@@ -38,7 +38,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
38
38
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
39
  let { descriptionProps: _, ...stateWithoutDescription } = states;
40
40
  let onKeyDown = (e)=>{
41
- if (e.key === "Delete" || e.key === "Backspace") {
41
+ if (e.key === 'Delete' || e.key === 'Backspace') {
42
42
  e.preventDefault();
43
43
  if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
44
44
  else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
@@ -47,8 +47,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
47
47
  }
48
48
  };
49
49
  let modality = (0, $ioKwR$useInteractionModality)();
50
- if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
51
- let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
50
+ if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
51
+ let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
52
52
  let descProps = (0, $ioKwR$useDescription)(description);
53
53
  let isFocused = item.key === state.selectionManager.focusedKey;
54
54
  // @ts-ignore - data attributes are ok but TS doesn't know about them.
@@ -56,8 +56,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
56
56
  let linkProps = (0, $ioKwR$getSyntheticLinkProps)(item.props);
57
57
  return {
58
58
  removeButtonProps: {
59
- "aria-label": stringFormatter.format("removeButtonLabel"),
60
- "aria-labelledby": `${buttonId} ${rowProps.id}`,
59
+ 'aria-label': stringFormatter.format('removeButtonLabel'),
60
+ 'aria-labelledby': `${buttonId} ${rowProps.id}`,
61
61
  id: buttonId,
62
62
  onPress: ()=>onRemove ? onRemove(new Set([
63
63
  item.key
@@ -67,11 +67,11 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
67
67
  rowProps: (0, $ioKwR$mergeProps)(rowProps, domProps, linkProps, {
68
68
  tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
69
69
  onKeyDown: onRemove ? onKeyDown : undefined,
70
- "aria-describedby": descProps["aria-describedby"]
70
+ 'aria-describedby': descProps['aria-describedby']
71
71
  }),
72
72
  gridCellProps: (0, $ioKwR$mergeProps)(gridCellProps, {
73
- "aria-errormessage": props["aria-errormessage"],
74
- "aria-label": props["aria-label"]
73
+ 'aria-errormessage': props['aria-errormessage'],
74
+ 'aria-label': props['aria-label']
75
75
  }),
76
76
  ...stateWithoutDescription,
77
77
  allowsRemoving: !!onRemove
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
27
27
 
28
28
  function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
29
29
  let { item: item } = props;
30
- let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), "@react-aria/tag");
30
+ let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), '@react-aria/tag');
31
31
  let buttonId = (0, $ioKwR$useId)();
32
32
  let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
33
33
  let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $ioKwR$useGridListItem)({
@@ -38,7 +38,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
38
38
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
39
  let { descriptionProps: _, ...stateWithoutDescription } = states;
40
40
  let onKeyDown = (e)=>{
41
- if (e.key === "Delete" || e.key === "Backspace") {
41
+ if (e.key === 'Delete' || e.key === 'Backspace') {
42
42
  e.preventDefault();
43
43
  if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
44
44
  else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
@@ -47,8 +47,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
47
47
  }
48
48
  };
49
49
  let modality = (0, $ioKwR$useInteractionModality)();
50
- if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
51
- let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
50
+ if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
51
+ let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
52
52
  let descProps = (0, $ioKwR$useDescription)(description);
53
53
  let isFocused = item.key === state.selectionManager.focusedKey;
54
54
  // @ts-ignore - data attributes are ok but TS doesn't know about them.
@@ -56,8 +56,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
56
56
  let linkProps = (0, $ioKwR$getSyntheticLinkProps)(item.props);
57
57
  return {
58
58
  removeButtonProps: {
59
- "aria-label": stringFormatter.format("removeButtonLabel"),
60
- "aria-labelledby": `${buttonId} ${rowProps.id}`,
59
+ 'aria-label': stringFormatter.format('removeButtonLabel'),
60
+ 'aria-labelledby': `${buttonId} ${rowProps.id}`,
61
61
  id: buttonId,
62
62
  onPress: ()=>onRemove ? onRemove(new Set([
63
63
  item.key
@@ -67,11 +67,11 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
67
67
  rowProps: (0, $ioKwR$mergeProps)(rowProps, domProps, linkProps, {
68
68
  tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
69
69
  onKeyDown: onRemove ? onKeyDown : undefined,
70
- "aria-describedby": descProps["aria-describedby"]
70
+ 'aria-describedby': descProps['aria-describedby']
71
71
  }),
72
72
  gridCellProps: (0, $ioKwR$mergeProps)(gridCellProps, {
73
- "aria-errormessage": props["aria-errormessage"],
74
- "aria-label": props["aria-label"]
73
+ 'aria-errormessage': props['aria-errormessage'],
74
+ 'aria-label': props['aria-label']
75
75
  }),
76
76
  ...stateWithoutDescription,
77
77
  allowsRemoving: !!onRemove
@@ -36,21 +36,21 @@ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
36
36
  let keyboardDelegate = props.keyboardDelegate || new (0, $jLhmn$reactariaselection.ListKeyboardDelegate)({
37
37
  collection: state.collection,
38
38
  ref: ref,
39
- orientation: "horizontal",
39
+ orientation: 'horizontal',
40
40
  direction: direction,
41
41
  disabledKeys: state.disabledKeys,
42
42
  disabledBehavior: state.selectionManager.disabledBehavior
43
43
  });
44
44
  let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $jLhmn$reactarialabel.useField)({
45
45
  ...props,
46
- labelElementType: "span"
46
+ labelElementType: 'span'
47
47
  });
48
48
  let { gridProps: gridProps } = (0, $jLhmn$reactariagridlist.useGridList)({
49
49
  ...props,
50
50
  ...fieldProps,
51
51
  keyboardDelegate: keyboardDelegate,
52
52
  shouldFocusWrap: true,
53
- linkBehavior: "override"
53
+ linkBehavior: 'override'
54
54
  }, state, ref);
55
55
  let [isFocusWithin, setFocusWithin] = (0, $jLhmn$react.useState)(false);
56
56
  let { focusWithinProps: focusWithinProps } = (0, $jLhmn$reactariainteractions.useFocusWithin)({
@@ -72,10 +72,10 @@ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
72
72
  });
73
73
  return {
74
74
  gridProps: (0, $jLhmn$reactariautils.mergeProps)(gridProps, domProps, {
75
- role: state.collection.size ? "grid" : null,
76
- "aria-atomic": false,
77
- "aria-relevant": "additions",
78
- "aria-live": isFocusWithin ? "polite" : "off",
75
+ role: state.collection.size ? 'grid' : null,
76
+ 'aria-atomic': false,
77
+ 'aria-relevant': 'additions',
78
+ 'aria-live': isFocusWithin ? 'polite' : 'off',
79
79
  ...focusWithinProps,
80
80
  ...fieldProps
81
81
  }),
@@ -29,21 +29,21 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
29
29
  let keyboardDelegate = props.keyboardDelegate || new (0, $eUtJD$ListKeyboardDelegate)({
30
30
  collection: state.collection,
31
31
  ref: ref,
32
- orientation: "horizontal",
32
+ orientation: 'horizontal',
33
33
  direction: direction,
34
34
  disabledKeys: state.disabledKeys,
35
35
  disabledBehavior: state.selectionManager.disabledBehavior
36
36
  });
37
37
  let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $eUtJD$useField)({
38
38
  ...props,
39
- labelElementType: "span"
39
+ labelElementType: 'span'
40
40
  });
41
41
  let { gridProps: gridProps } = (0, $eUtJD$useGridList)({
42
42
  ...props,
43
43
  ...fieldProps,
44
44
  keyboardDelegate: keyboardDelegate,
45
45
  shouldFocusWrap: true,
46
- linkBehavior: "override"
46
+ linkBehavior: 'override'
47
47
  }, state, ref);
48
48
  let [isFocusWithin, setFocusWithin] = (0, $eUtJD$useState)(false);
49
49
  let { focusWithinProps: focusWithinProps } = (0, $eUtJD$useFocusWithin)({
@@ -65,10 +65,10 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
65
65
  });
66
66
  return {
67
67
  gridProps: (0, $eUtJD$mergeProps)(gridProps, domProps, {
68
- role: state.collection.size ? "grid" : null,
69
- "aria-atomic": false,
70
- "aria-relevant": "additions",
71
- "aria-live": isFocusWithin ? "polite" : "off",
68
+ role: state.collection.size ? 'grid' : null,
69
+ 'aria-atomic': false,
70
+ 'aria-relevant': 'additions',
71
+ 'aria-live': isFocusWithin ? 'polite' : 'off',
72
72
  ...focusWithinProps,
73
73
  ...fieldProps
74
74
  }),
@@ -29,21 +29,21 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
29
29
  let keyboardDelegate = props.keyboardDelegate || new (0, $eUtJD$ListKeyboardDelegate)({
30
30
  collection: state.collection,
31
31
  ref: ref,
32
- orientation: "horizontal",
32
+ orientation: 'horizontal',
33
33
  direction: direction,
34
34
  disabledKeys: state.disabledKeys,
35
35
  disabledBehavior: state.selectionManager.disabledBehavior
36
36
  });
37
37
  let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $eUtJD$useField)({
38
38
  ...props,
39
- labelElementType: "span"
39
+ labelElementType: 'span'
40
40
  });
41
41
  let { gridProps: gridProps } = (0, $eUtJD$useGridList)({
42
42
  ...props,
43
43
  ...fieldProps,
44
44
  keyboardDelegate: keyboardDelegate,
45
45
  shouldFocusWrap: true,
46
- linkBehavior: "override"
46
+ linkBehavior: 'override'
47
47
  }, state, ref);
48
48
  let [isFocusWithin, setFocusWithin] = (0, $eUtJD$useState)(false);
49
49
  let { focusWithinProps: focusWithinProps } = (0, $eUtJD$useFocusWithin)({
@@ -65,10 +65,10 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
65
65
  });
66
66
  return {
67
67
  gridProps: (0, $eUtJD$mergeProps)(gridProps, domProps, {
68
- role: state.collection.size ? "grid" : null,
69
- "aria-atomic": false,
70
- "aria-relevant": "additions",
71
- "aria-live": isFocusWithin ? "polite" : "off",
68
+ role: state.collection.size ? 'grid' : null,
69
+ 'aria-atomic': false,
70
+ 'aria-relevant': 'additions',
71
+ 'aria-live': isFocusWithin ? 'polite' : 'off',
72
72
  ...focusWithinProps,
73
73
  ...fieldProps
74
74
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/tag",
3
- "version": "3.0.0-nightly.2912+d80999e89",
3
+ "version": "3.0.0-nightly.2925+c57671e7f",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,15 +22,15 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/gridlist": "3.8.1-nightly.4624+d80999e89",
26
- "@react-aria/i18n": "3.0.0-nightly.2912+d80999e89",
27
- "@react-aria/interactions": "3.0.0-nightly.2912+d80999e89",
28
- "@react-aria/label": "3.0.0-nightly.2912+d80999e89",
29
- "@react-aria/selection": "3.0.0-nightly.2912+d80999e89",
30
- "@react-aria/utils": "3.0.0-nightly.2912+d80999e89",
31
- "@react-stately/list": "3.10.5-nightly.4624+d80999e89",
32
- "@react-types/button": "3.9.4-nightly.4624+d80999e89",
33
- "@react-types/shared": "3.0.0-nightly.2912+d80999e89",
25
+ "@react-aria/gridlist": "3.8.2-nightly.4637+c57671e7f",
26
+ "@react-aria/i18n": "3.0.0-nightly.2925+c57671e7f",
27
+ "@react-aria/interactions": "3.0.0-nightly.2925+c57671e7f",
28
+ "@react-aria/label": "3.0.0-nightly.2925+c57671e7f",
29
+ "@react-aria/selection": "3.0.0-nightly.2925+c57671e7f",
30
+ "@react-aria/utils": "3.0.0-nightly.2925+c57671e7f",
31
+ "@react-stately/list": "3.10.6-nightly.4637+c57671e7f",
32
+ "@react-types/button": "3.9.5-nightly.4637+c57671e7f",
33
+ "@react-types/shared": "3.0.0-nightly.2925+c57671e7f",
34
34
  "@swc/helpers": "^0.5.0"
35
35
  },
36
36
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882"
43
+ "gitHead": "c57671e7f57c4ffe59640a174f084cf660968913"
44
44
  }