@react-spectrum/button 3.16.3 → 3.16.4

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.
Files changed (55) hide show
  1. package/dist/ActionButton.main.js +17 -17
  2. package/dist/ActionButton.mjs +18 -18
  3. package/dist/ActionButton.module.js +17 -17
  4. package/dist/Button.main.js +31 -31
  5. package/dist/Button.mjs +32 -32
  6. package/dist/Button.module.js +31 -31
  7. package/dist/ClearButton.main.js +7 -7
  8. package/dist/ClearButton.mjs +8 -8
  9. package/dist/ClearButton.module.js +7 -7
  10. package/dist/FieldButton.main.js +10 -10
  11. package/dist/FieldButton.mjs +11 -11
  12. package/dist/FieldButton.module.js +10 -10
  13. package/dist/LogicButton.main.js +6 -6
  14. package/dist/LogicButton.mjs +7 -7
  15. package/dist/LogicButton.module.js +6 -6
  16. package/dist/ToggleButton.main.js +15 -15
  17. package/dist/ToggleButton.mjs +16 -16
  18. package/dist/ToggleButton.module.js +15 -15
  19. package/dist/ar-AE.mjs +1 -1
  20. package/dist/bg-BG.mjs +1 -1
  21. package/dist/button_vars_css.mjs +1 -1
  22. package/dist/cs-CZ.mjs +1 -1
  23. package/dist/da-DK.mjs +1 -1
  24. package/dist/de-DE.mjs +1 -1
  25. package/dist/el-GR.mjs +1 -1
  26. package/dist/en-US.mjs +1 -1
  27. package/dist/es-ES.mjs +1 -1
  28. package/dist/et-EE.mjs +1 -1
  29. package/dist/fi-FI.mjs +1 -1
  30. package/dist/fr-FR.mjs +1 -1
  31. package/dist/he-IL.mjs +1 -1
  32. package/dist/hr-HR.mjs +1 -1
  33. package/dist/hu-HU.mjs +1 -1
  34. package/dist/intlStrings.mjs +1 -1
  35. package/dist/it-IT.mjs +1 -1
  36. package/dist/ja-JP.mjs +1 -1
  37. package/dist/ko-KR.mjs +1 -1
  38. package/dist/lt-LT.mjs +1 -1
  39. package/dist/lv-LV.mjs +1 -1
  40. package/dist/nb-NO.mjs +1 -1
  41. package/dist/nl-NL.mjs +1 -1
  42. package/dist/pl-PL.mjs +1 -1
  43. package/dist/pt-BR.mjs +1 -1
  44. package/dist/pt-PT.mjs +1 -1
  45. package/dist/ro-RO.mjs +1 -1
  46. package/dist/ru-RU.mjs +1 -1
  47. package/dist/sk-SK.mjs +1 -1
  48. package/dist/sl-SI.mjs +1 -1
  49. package/dist/sr-SP.mjs +1 -1
  50. package/dist/sv-SE.mjs +1 -1
  51. package/dist/tr-TR.mjs +1 -1
  52. package/dist/uk-UA.mjs +1 -1
  53. package/dist/zh-CN.mjs +1 -1
  54. package/dist/zh-TW.mjs +1 -1
  55. package/package.json +14 -14
@@ -42,10 +42,10 @@ $parcel$export(module.exports, "ActionButton", () => $65dbde0e8e7aba71$export$cf
42
42
 
43
43
  function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
44
44
  props = (0, $9HF4v$reactspectrumprovider.useProviderProps)(props);
45
- props = (0, $9HF4v$reactspectrumutils.useSlotProps)(props, "actionButton");
45
+ props = (0, $9HF4v$reactspectrumutils.useSlotProps)(props, 'actionButton');
46
46
  let textProps = (0, $9HF4v$reactspectrumutils.useSlotProps)({
47
- UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton-label")
48
- }, "text");
47
+ UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton-label')
48
+ }, 'text');
49
49
  let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
50
50
  holdAffordance, hideButtonText: // @ts-ignore (private)
51
51
  hideButtonText, ...otherProps } = props;
@@ -57,36 +57,36 @@ function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
57
57
  let { styleProps: styleProps } = (0, $9HF4v$reactspectrumutils.useStyleProps)(otherProps);
58
58
  let isTextOnly = (0, ($parcel$interopDefault($9HF4v$react))).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).isValidElement(c));
59
59
  return /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactariafocus.FocusRing), {
60
- focusRingClass: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
60
+ focusRingClass: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'focus-ring'),
61
61
  autoFocus: autoFocus
62
62
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement("button", {
63
63
  ...styleProps,
64
64
  ...(0, $9HF4v$reactariautils.mergeProps)(buttonProps, hoverProps),
65
65
  ref: domRef,
66
- className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton", {
67
- "spectrum-ActionButton--quiet": isQuiet,
68
- "spectrum-ActionButton--staticColor": !!staticColor,
69
- "spectrum-ActionButton--staticWhite": staticColor === "white",
70
- "spectrum-ActionButton--staticBlack": staticColor === "black",
71
- "is-active": isPressed,
72
- "is-disabled": isDisabled,
73
- "is-hovered": isHovered
66
+ className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton', {
67
+ 'spectrum-ActionButton--quiet': isQuiet,
68
+ 'spectrum-ActionButton--staticColor': !!staticColor,
69
+ 'spectrum-ActionButton--staticWhite': staticColor === 'white',
70
+ 'spectrum-ActionButton--staticBlack': staticColor === 'black',
71
+ 'is-active': isPressed,
72
+ 'is-disabled': isDisabled,
73
+ 'is-hovered': isHovered
74
74
  }, styleProps.className)
75
75
  }, holdAffordance && /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, ($parcel$interopDefault($9HF4v$spectrumiconsuiCornerTriangle))), {
76
- UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton-hold")
76
+ UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton-hold')
77
77
  }), /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumutils.ClearSlots), null, /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumutils.SlotProvider), {
78
78
  slots: {
79
79
  icon: {
80
- size: "S",
81
- UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon", {
82
- "spectrum-ActionGroup-itemIcon": hideButtonText
80
+ size: 'S',
81
+ UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Icon', {
82
+ 'spectrum-ActionGroup-itemIcon': hideButtonText
83
83
  })
84
84
  },
85
85
  text: {
86
86
  ...textProps
87
87
  }
88
88
  }
89
- }, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumtext.Text), null, children) : children))));
89
+ }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumtext.Text), null, children) : children))));
90
90
  }
91
91
  /**
92
92
  * ActionButtons allow users to perform an action.
@@ -36,10 +36,10 @@ function $parcel$interopDefault(a) {
36
36
 
37
37
  function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
38
38
  props = (0, $kfV1G$useProviderProps)(props);
39
- props = (0, $kfV1G$useSlotProps)(props, "actionButton");
39
+ props = (0, $kfV1G$useSlotProps)(props, 'actionButton');
40
40
  let textProps = (0, $kfV1G$useSlotProps)({
41
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton-label")
42
- }, "text");
41
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-label')
42
+ }, 'text');
43
43
  let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
44
44
  holdAffordance, hideButtonText: // @ts-ignore (private)
45
45
  hideButtonText, ...otherProps } = props;
@@ -51,36 +51,36 @@ function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
51
51
  let { styleProps: styleProps } = (0, $kfV1G$useStyleProps)(otherProps);
52
52
  let isTextOnly = (0, $kfV1G$react).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, $kfV1G$react).isValidElement(c));
53
53
  return /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$FocusRing), {
54
- focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "focus-ring"),
54
+ focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'focus-ring'),
55
55
  autoFocus: autoFocus
56
56
  }, /*#__PURE__*/ (0, $kfV1G$react).createElement("button", {
57
57
  ...styleProps,
58
58
  ...(0, $kfV1G$mergeProps)(buttonProps, hoverProps),
59
59
  ref: domRef,
60
- className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton", {
61
- "spectrum-ActionButton--quiet": isQuiet,
62
- "spectrum-ActionButton--staticColor": !!staticColor,
63
- "spectrum-ActionButton--staticWhite": staticColor === "white",
64
- "spectrum-ActionButton--staticBlack": staticColor === "black",
65
- "is-active": isPressed,
66
- "is-disabled": isDisabled,
67
- "is-hovered": isHovered
60
+ className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton', {
61
+ 'spectrum-ActionButton--quiet': isQuiet,
62
+ 'spectrum-ActionButton--staticColor': !!staticColor,
63
+ 'spectrum-ActionButton--staticWhite': staticColor === 'white',
64
+ 'spectrum-ActionButton--staticBlack': staticColor === 'black',
65
+ 'is-active': isPressed,
66
+ 'is-disabled': isDisabled,
67
+ 'is-hovered': isHovered
68
68
  }, styleProps.className)
69
69
  }, holdAffordance && /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$spectrumiconsuiCornerTriangle), {
70
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton-hold")
70
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-hold')
71
71
  }), /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$ClearSlots), null, /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$SlotProvider), {
72
72
  slots: {
73
73
  icon: {
74
- size: "S",
75
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-Icon", {
76
- "spectrum-ActionGroup-itemIcon": hideButtonText
74
+ size: 'S',
75
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-Icon', {
76
+ 'spectrum-ActionGroup-itemIcon': hideButtonText
77
77
  })
78
78
  },
79
79
  text: {
80
80
  ...textProps
81
81
  }
82
82
  }
83
- }, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
83
+ }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
84
84
  }
85
85
  /**
86
86
  * ActionButtons allow users to perform an action.
@@ -89,4 +89,4 @@ function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
89
89
 
90
90
 
91
91
  export {$042ad0b3a4a55b33$export$cfc7921d29ef7b80 as ActionButton};
92
- //# sourceMappingURL=ActionButton.mjs.map
92
+ //# sourceMappingURL=ActionButton.module.js.map
@@ -36,10 +36,10 @@ function $parcel$interopDefault(a) {
36
36
 
37
37
  function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
38
38
  props = (0, $kfV1G$useProviderProps)(props);
39
- props = (0, $kfV1G$useSlotProps)(props, "actionButton");
39
+ props = (0, $kfV1G$useSlotProps)(props, 'actionButton');
40
40
  let textProps = (0, $kfV1G$useSlotProps)({
41
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton-label")
42
- }, "text");
41
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-label')
42
+ }, 'text');
43
43
  let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
44
44
  holdAffordance, hideButtonText: // @ts-ignore (private)
45
45
  hideButtonText, ...otherProps } = props;
@@ -51,36 +51,36 @@ function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
51
51
  let { styleProps: styleProps } = (0, $kfV1G$useStyleProps)(otherProps);
52
52
  let isTextOnly = (0, $kfV1G$react).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, $kfV1G$react).isValidElement(c));
53
53
  return /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$FocusRing), {
54
- focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "focus-ring"),
54
+ focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'focus-ring'),
55
55
  autoFocus: autoFocus
56
56
  }, /*#__PURE__*/ (0, $kfV1G$react).createElement("button", {
57
57
  ...styleProps,
58
58
  ...(0, $kfV1G$mergeProps)(buttonProps, hoverProps),
59
59
  ref: domRef,
60
- className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton", {
61
- "spectrum-ActionButton--quiet": isQuiet,
62
- "spectrum-ActionButton--staticColor": !!staticColor,
63
- "spectrum-ActionButton--staticWhite": staticColor === "white",
64
- "spectrum-ActionButton--staticBlack": staticColor === "black",
65
- "is-active": isPressed,
66
- "is-disabled": isDisabled,
67
- "is-hovered": isHovered
60
+ className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton', {
61
+ 'spectrum-ActionButton--quiet': isQuiet,
62
+ 'spectrum-ActionButton--staticColor': !!staticColor,
63
+ 'spectrum-ActionButton--staticWhite': staticColor === 'white',
64
+ 'spectrum-ActionButton--staticBlack': staticColor === 'black',
65
+ 'is-active': isPressed,
66
+ 'is-disabled': isDisabled,
67
+ 'is-hovered': isHovered
68
68
  }, styleProps.className)
69
69
  }, holdAffordance && /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$spectrumiconsuiCornerTriangle), {
70
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-ActionButton-hold")
70
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-hold')
71
71
  }), /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$ClearSlots), null, /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$SlotProvider), {
72
72
  slots: {
73
73
  icon: {
74
- size: "S",
75
- UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), "spectrum-Icon", {
76
- "spectrum-ActionGroup-itemIcon": hideButtonText
74
+ size: 'S',
75
+ UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-Icon', {
76
+ 'spectrum-ActionGroup-itemIcon': hideButtonText
77
77
  })
78
78
  },
79
79
  text: {
80
80
  ...textProps
81
81
  }
82
82
  }
83
- }, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
83
+ }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
84
84
  }
85
85
  /**
86
86
  * ActionButtons allow users to perform an action.
@@ -62,9 +62,9 @@ function $842a195ed1671b15$var$disablePendingProps(props) {
62
62
  function $842a195ed1671b15$var$Button(props, ref) {
63
63
  var _buttonProps_arialabelledby;
64
64
  props = (0, $hN0b7$reactspectrumprovider.useProviderProps)(props);
65
- props = (0, $hN0b7$reactspectrumutils.useSlotProps)(props, "button");
65
+ props = (0, $hN0b7$reactspectrumutils.useSlotProps)(props, 'button');
66
66
  props = $842a195ed1671b15$var$disablePendingProps(props);
67
- let { elementType: Element = "button", children: children, variant: variant, style: style = variant === "accent" || variant === "cta" ? "fill" : "outline", staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
67
+ let { elementType: Element = 'button', children: children, variant: variant, style: style = variant === 'accent' || variant === 'cta' ? 'fill' : 'outline', staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
68
68
  let domRef = (0, $hN0b7$reactspectrumutils.useFocusableRef)(ref);
69
69
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $hN0b7$reactariabutton.useButton)(props, domRef);
70
70
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $hN0b7$reactariainteractions.useHover)({
@@ -75,12 +75,12 @@ function $842a195ed1671b15$var$Button(props, ref) {
75
75
  onFocusChange: onFocusChange,
76
76
  isDisabled: isDisabled
77
77
  });
78
- let stringFormatter = (0, $hN0b7$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b2da92ebd9a2bc00$exports))), "@react-spectrum/button");
78
+ let stringFormatter = (0, $hN0b7$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b2da92ebd9a2bc00$exports))), '@react-spectrum/button');
79
79
  let { styleProps: styleProps } = (0, $hN0b7$reactspectrumutils.useStyleProps)(otherProps);
80
- let hasLabel = (0, $hN0b7$reactspectrumutils.useHasChild)(`.${(0, ($parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Button-label"]}`, domRef);
81
- let hasIcon = (0, $hN0b7$reactspectrumutils.useHasChild)(`.${(0, ($parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Icon"]}`, domRef);
80
+ let hasLabel = (0, $hN0b7$reactspectrumutils.useHasChild)(`.${(0, ($parcel$interopDefault($afc5a4514aca2340$exports)))['spectrum-Button-label']}`, domRef);
81
+ let hasIcon = (0, $hN0b7$reactspectrumutils.useHasChild)(`.${(0, ($parcel$interopDefault($afc5a4514aca2340$exports)))['spectrum-Icon']}`, domRef);
82
82
  // an aria label will block children and their labels from being read, this is undesirable for pending state
83
- let hasAriaLabel = !!buttonProps["aria-label"] || !!buttonProps["aria-labelledby"];
83
+ let hasAriaLabel = !!buttonProps['aria-label'] || !!buttonProps['aria-labelledby'];
84
84
  let [isProgressVisible, setIsProgressVisible] = (0, $hN0b7$react.useState)(false);
85
85
  let backupButtonId = (0, $hN0b7$reactariautils.useId)();
86
86
  let buttonId = buttonProps.id || backupButtonId;
@@ -102,18 +102,18 @@ function $842a195ed1671b15$var$Button(props, ref) {
102
102
  }, [
103
103
  isPending
104
104
  ]);
105
- if (variant === "cta") variant = "accent";
106
- else if (variant === "overBackground") {
107
- variant = "primary";
108
- staticColor = "white";
105
+ if (variant === 'cta') variant = 'accent';
106
+ else if (variant === 'overBackground') {
107
+ variant = 'primary';
108
+ staticColor = 'white';
109
109
  }
110
- const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps["aria-label"] : ""} ${stringFormatter.format("pending")}`.trim();
110
+ const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps['aria-label'] : ''} ${stringFormatter.format('pending')}`.trim();
111
111
  var _buttonProps_arialabelledby_replace;
112
- const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps["aria-labelledby"]) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ""} ${hasLabel ? textId : ""} ${spinnerId}`.trim();
113
- let ariaLive = "polite";
114
- if ((0, $hN0b7$reactariautils.isAppleDevice)() && (!hasAriaLabel || (0, $hN0b7$reactariautils.isFirefox)())) ariaLive = "off";
112
+ const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps['aria-labelledby']) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ''} ${hasLabel ? textId : ''} ${spinnerId}`.trim();
113
+ let ariaLive = 'polite';
114
+ if ((0, $hN0b7$reactariautils.isAppleDevice)() && (!hasAriaLabel || (0, $hN0b7$reactariautils.isFirefox)())) ariaLive = 'off';
115
115
  return /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, $hN0b7$reactariafocus.FocusRing), {
116
- focusRingClass: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
116
+ focusRingClass: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'focus-ring'),
117
117
  autoFocus: autoFocus
118
118
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement(Element, {
119
119
  ...styleProps,
@@ -123,41 +123,41 @@ function $842a195ed1671b15$var$Button(props, ref) {
123
123
  "data-variant": variant,
124
124
  "data-style": style,
125
125
  "data-static-color": staticColor || undefined,
126
- "aria-disabled": isPending ? "true" : undefined,
127
- "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps["aria-label"],
128
- "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps["aria-labelledby"],
129
- className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button", {
130
- "spectrum-Button--iconOnly": hasIcon && !hasLabel,
131
- "is-disabled": isDisabled || isProgressVisible,
132
- "is-active": isPressed,
133
- "is-hovered": isHovered,
134
- "spectrum-Button--pending": isProgressVisible
126
+ "aria-disabled": isPending ? 'true' : undefined,
127
+ "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps['aria-label'],
128
+ "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps['aria-labelledby'],
129
+ className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Button', {
130
+ 'spectrum-Button--iconOnly': hasIcon && !hasLabel,
131
+ 'is-disabled': isDisabled || isProgressVisible,
132
+ 'is-active': isPressed,
133
+ 'is-hovered': isHovered,
134
+ 'spectrum-Button--pending': isProgressVisible
135
135
  }, styleProps.className)
136
136
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, $hN0b7$reactspectrumutils.SlotProvider), {
137
137
  slots: {
138
138
  icon: {
139
139
  id: iconId,
140
- size: "S",
141
- UNSAFE_className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon")
140
+ size: 'S',
141
+ UNSAFE_className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Icon')
142
142
  },
143
143
  text: {
144
144
  id: textId,
145
- UNSAFE_className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button-label")
145
+ UNSAFE_className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Button-label')
146
146
  }
147
147
  }
148
- }, typeof children === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, $hN0b7$reactspectrumtext.Text), null, children) : children, isPending && /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement("div", {
148
+ }, typeof children === 'string' ? /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, $hN0b7$reactspectrumtext.Text), null, children) : children, isPending && /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement("div", {
149
149
  "aria-hidden": "true",
150
150
  style: {
151
- visibility: isProgressVisible ? "visible" : "hidden"
151
+ visibility: isProgressVisible ? 'visible' : 'hidden'
152
152
  },
153
- className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button-circleLoader")
153
+ className: (0, $hN0b7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Button-circleLoader')
154
154
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, $hN0b7$reactspectrumprogress.ProgressCircle), {
155
155
  "aria-label": isPendingAriaLiveLabel,
156
156
  isIndeterminate: true,
157
157
  size: "S",
158
158
  staticColor: staticColor
159
159
  })), isPending && /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement((0, ($parcel$interopDefault($hN0b7$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement("div", {
160
- "aria-live": isFocused ? ariaLive : "off"
160
+ "aria-live": isFocused ? ariaLive : 'off'
161
161
  }, isProgressVisible && /*#__PURE__*/ (0, ($parcel$interopDefault($hN0b7$react))).createElement("div", {
162
162
  role: "img",
163
163
  "aria-labelledby": isPendingAriaLiveLabelledby
package/dist/Button.mjs CHANGED
@@ -56,9 +56,9 @@ function $b865a6f0049e2d66$var$disablePendingProps(props) {
56
56
  function $b865a6f0049e2d66$var$Button(props, ref) {
57
57
  var _buttonProps_arialabelledby;
58
58
  props = (0, $l1zrX$useProviderProps)(props);
59
- props = (0, $l1zrX$useSlotProps)(props, "button");
59
+ props = (0, $l1zrX$useSlotProps)(props, 'button');
60
60
  props = $b865a6f0049e2d66$var$disablePendingProps(props);
61
- let { elementType: Element = "button", children: children, variant: variant, style: style = variant === "accent" || variant === "cta" ? "fill" : "outline", staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
61
+ let { elementType: Element = 'button', children: children, variant: variant, style: style = variant === 'accent' || variant === 'cta' ? 'fill' : 'outline', staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
62
62
  let domRef = (0, $l1zrX$useFocusableRef)(ref);
63
63
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $l1zrX$useButton)(props, domRef);
64
64
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $l1zrX$useHover)({
@@ -69,12 +69,12 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
69
69
  onFocusChange: onFocusChange,
70
70
  isDisabled: isDisabled
71
71
  });
72
- let stringFormatter = (0, $l1zrX$useLocalizedStringFormatter)((0, ($parcel$interopDefault($l1zrX$intlStringsmodulejs))), "@react-spectrum/button");
72
+ let stringFormatter = (0, $l1zrX$useLocalizedStringFormatter)((0, ($parcel$interopDefault($l1zrX$intlStringsmodulejs))), '@react-spectrum/button');
73
73
  let { styleProps: styleProps } = (0, $l1zrX$useStyleProps)(otherProps);
74
- let hasLabel = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))["spectrum-Button-label"]}`, domRef);
75
- let hasIcon = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))["spectrum-Icon"]}`, domRef);
74
+ let hasLabel = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))['spectrum-Button-label']}`, domRef);
75
+ let hasIcon = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))['spectrum-Icon']}`, domRef);
76
76
  // an aria label will block children and their labels from being read, this is undesirable for pending state
77
- let hasAriaLabel = !!buttonProps["aria-label"] || !!buttonProps["aria-labelledby"];
77
+ let hasAriaLabel = !!buttonProps['aria-label'] || !!buttonProps['aria-labelledby'];
78
78
  let [isProgressVisible, setIsProgressVisible] = (0, $l1zrX$useState)(false);
79
79
  let backupButtonId = (0, $l1zrX$useId)();
80
80
  let buttonId = buttonProps.id || backupButtonId;
@@ -96,18 +96,18 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
96
96
  }, [
97
97
  isPending
98
98
  ]);
99
- if (variant === "cta") variant = "accent";
100
- else if (variant === "overBackground") {
101
- variant = "primary";
102
- staticColor = "white";
99
+ if (variant === 'cta') variant = 'accent';
100
+ else if (variant === 'overBackground') {
101
+ variant = 'primary';
102
+ staticColor = 'white';
103
103
  }
104
- const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps["aria-label"] : ""} ${stringFormatter.format("pending")}`.trim();
104
+ const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps['aria-label'] : ''} ${stringFormatter.format('pending')}`.trim();
105
105
  var _buttonProps_arialabelledby_replace;
106
- const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps["aria-labelledby"]) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ""} ${hasLabel ? textId : ""} ${spinnerId}`.trim();
107
- let ariaLive = "polite";
108
- if ((0, $l1zrX$isAppleDevice)() && (!hasAriaLabel || (0, $l1zrX$isFirefox)())) ariaLive = "off";
106
+ const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps['aria-labelledby']) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ''} ${hasLabel ? textId : ''} ${spinnerId}`.trim();
107
+ let ariaLive = 'polite';
108
+ if ((0, $l1zrX$isAppleDevice)() && (!hasAriaLabel || (0, $l1zrX$isFirefox)())) ariaLive = 'off';
109
109
  return /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$FocusRing), {
110
- focusRingClass: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "focus-ring"),
110
+ focusRingClass: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'focus-ring'),
111
111
  autoFocus: autoFocus
112
112
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement(Element, {
113
113
  ...styleProps,
@@ -117,41 +117,41 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
117
117
  "data-variant": variant,
118
118
  "data-style": style,
119
119
  "data-static-color": staticColor || undefined,
120
- "aria-disabled": isPending ? "true" : undefined,
121
- "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps["aria-label"],
122
- "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps["aria-labelledby"],
123
- className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button", {
124
- "spectrum-Button--iconOnly": hasIcon && !hasLabel,
125
- "is-disabled": isDisabled || isProgressVisible,
126
- "is-active": isPressed,
127
- "is-hovered": isHovered,
128
- "spectrum-Button--pending": isProgressVisible
120
+ "aria-disabled": isPending ? 'true' : undefined,
121
+ "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps['aria-label'],
122
+ "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps['aria-labelledby'],
123
+ className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button', {
124
+ 'spectrum-Button--iconOnly': hasIcon && !hasLabel,
125
+ 'is-disabled': isDisabled || isProgressVisible,
126
+ 'is-active': isPressed,
127
+ 'is-hovered': isHovered,
128
+ 'spectrum-Button--pending': isProgressVisible
129
129
  }, styleProps.className)
130
130
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$SlotProvider), {
131
131
  slots: {
132
132
  icon: {
133
133
  id: iconId,
134
- size: "S",
135
- UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Icon")
134
+ size: 'S',
135
+ UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Icon')
136
136
  },
137
137
  text: {
138
138
  id: textId,
139
- UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button-label")
139
+ UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button-label')
140
140
  }
141
141
  }
142
- }, typeof children === "string" ? /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$Text), null, children) : children, isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
142
+ }, typeof children === 'string' ? /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$Text), null, children) : children, isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
143
143
  "aria-hidden": "true",
144
144
  style: {
145
- visibility: isProgressVisible ? "visible" : "hidden"
145
+ visibility: isProgressVisible ? 'visible' : 'hidden'
146
146
  },
147
- className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button-circleLoader")
147
+ className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button-circleLoader')
148
148
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$ProgressCircle), {
149
149
  "aria-label": isPendingAriaLiveLabel,
150
150
  isIndeterminate: true,
151
151
  size: "S",
152
152
  staticColor: staticColor
153
153
  })), isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$react).Fragment, null, /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
154
- "aria-live": isFocused ? ariaLive : "off"
154
+ "aria-live": isFocused ? ariaLive : 'off'
155
155
  }, isProgressVisible && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
156
156
  role: "img",
157
157
  "aria-labelledby": isPendingAriaLiveLabelledby
@@ -169,4 +169,4 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
169
169
 
170
170
 
171
171
  export {$b865a6f0049e2d66$export$353f5b6fc5456de1 as Button};
172
- //# sourceMappingURL=Button.mjs.map
172
+ //# sourceMappingURL=Button.module.js.map
@@ -56,9 +56,9 @@ function $b865a6f0049e2d66$var$disablePendingProps(props) {
56
56
  function $b865a6f0049e2d66$var$Button(props, ref) {
57
57
  var _buttonProps_arialabelledby;
58
58
  props = (0, $l1zrX$useProviderProps)(props);
59
- props = (0, $l1zrX$useSlotProps)(props, "button");
59
+ props = (0, $l1zrX$useSlotProps)(props, 'button');
60
60
  props = $b865a6f0049e2d66$var$disablePendingProps(props);
61
- let { elementType: Element = "button", children: children, variant: variant, style: style = variant === "accent" || variant === "cta" ? "fill" : "outline", staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
61
+ let { elementType: Element = 'button', children: children, variant: variant, style: style = variant === 'accent' || variant === 'cta' ? 'fill' : 'outline', staticColor: staticColor, isDisabled: isDisabled, isPending: isPending, autoFocus: autoFocus, ...otherProps } = props;
62
62
  let domRef = (0, $l1zrX$useFocusableRef)(ref);
63
63
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $l1zrX$useButton)(props, domRef);
64
64
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $l1zrX$useHover)({
@@ -69,12 +69,12 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
69
69
  onFocusChange: onFocusChange,
70
70
  isDisabled: isDisabled
71
71
  });
72
- let stringFormatter = (0, $l1zrX$useLocalizedStringFormatter)((0, ($parcel$interopDefault($l1zrX$intlStringsmodulejs))), "@react-spectrum/button");
72
+ let stringFormatter = (0, $l1zrX$useLocalizedStringFormatter)((0, ($parcel$interopDefault($l1zrX$intlStringsmodulejs))), '@react-spectrum/button');
73
73
  let { styleProps: styleProps } = (0, $l1zrX$useStyleProps)(otherProps);
74
- let hasLabel = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))["spectrum-Button-label"]}`, domRef);
75
- let hasIcon = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))["spectrum-Icon"]}`, domRef);
74
+ let hasLabel = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))['spectrum-Button-label']}`, domRef);
75
+ let hasIcon = (0, $l1zrX$useHasChild)(`.${(0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs)))['spectrum-Icon']}`, domRef);
76
76
  // an aria label will block children and their labels from being read, this is undesirable for pending state
77
- let hasAriaLabel = !!buttonProps["aria-label"] || !!buttonProps["aria-labelledby"];
77
+ let hasAriaLabel = !!buttonProps['aria-label'] || !!buttonProps['aria-labelledby'];
78
78
  let [isProgressVisible, setIsProgressVisible] = (0, $l1zrX$useState)(false);
79
79
  let backupButtonId = (0, $l1zrX$useId)();
80
80
  let buttonId = buttonProps.id || backupButtonId;
@@ -96,18 +96,18 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
96
96
  }, [
97
97
  isPending
98
98
  ]);
99
- if (variant === "cta") variant = "accent";
100
- else if (variant === "overBackground") {
101
- variant = "primary";
102
- staticColor = "white";
99
+ if (variant === 'cta') variant = 'accent';
100
+ else if (variant === 'overBackground') {
101
+ variant = 'primary';
102
+ staticColor = 'white';
103
103
  }
104
- const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps["aria-label"] : ""} ${stringFormatter.format("pending")}`.trim();
104
+ const isPendingAriaLiveLabel = `${hasAriaLabel ? buttonProps['aria-label'] : ''} ${stringFormatter.format('pending')}`.trim();
105
105
  var _buttonProps_arialabelledby_replace;
106
- const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps["aria-labelledby"]) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ""} ${hasLabel ? textId : ""} ${spinnerId}`.trim();
107
- let ariaLive = "polite";
108
- if ((0, $l1zrX$isAppleDevice)() && (!hasAriaLabel || (0, $l1zrX$isFirefox)())) ariaLive = "off";
106
+ const isPendingAriaLiveLabelledby = hasAriaLabel ? (_buttonProps_arialabelledby_replace = (_buttonProps_arialabelledby = buttonProps['aria-labelledby']) === null || _buttonProps_arialabelledby === void 0 ? void 0 : _buttonProps_arialabelledby.replace(buttonId, spinnerId)) !== null && _buttonProps_arialabelledby_replace !== void 0 ? _buttonProps_arialabelledby_replace : spinnerId : `${hasIcon ? iconId : ''} ${hasLabel ? textId : ''} ${spinnerId}`.trim();
107
+ let ariaLive = 'polite';
108
+ if ((0, $l1zrX$isAppleDevice)() && (!hasAriaLabel || (0, $l1zrX$isFirefox)())) ariaLive = 'off';
109
109
  return /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$FocusRing), {
110
- focusRingClass: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "focus-ring"),
110
+ focusRingClass: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'focus-ring'),
111
111
  autoFocus: autoFocus
112
112
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement(Element, {
113
113
  ...styleProps,
@@ -117,41 +117,41 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
117
117
  "data-variant": variant,
118
118
  "data-style": style,
119
119
  "data-static-color": staticColor || undefined,
120
- "aria-disabled": isPending ? "true" : undefined,
121
- "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps["aria-label"],
122
- "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps["aria-labelledby"],
123
- className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button", {
124
- "spectrum-Button--iconOnly": hasIcon && !hasLabel,
125
- "is-disabled": isDisabled || isProgressVisible,
126
- "is-active": isPressed,
127
- "is-hovered": isHovered,
128
- "spectrum-Button--pending": isProgressVisible
120
+ "aria-disabled": isPending ? 'true' : undefined,
121
+ "aria-label": isPending ? isPendingAriaLiveLabel : buttonProps['aria-label'],
122
+ "aria-labelledby": isPending ? isPendingAriaLiveLabelledby : buttonProps['aria-labelledby'],
123
+ className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button', {
124
+ 'spectrum-Button--iconOnly': hasIcon && !hasLabel,
125
+ 'is-disabled': isDisabled || isProgressVisible,
126
+ 'is-active': isPressed,
127
+ 'is-hovered': isHovered,
128
+ 'spectrum-Button--pending': isProgressVisible
129
129
  }, styleProps.className)
130
130
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$SlotProvider), {
131
131
  slots: {
132
132
  icon: {
133
133
  id: iconId,
134
- size: "S",
135
- UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Icon")
134
+ size: 'S',
135
+ UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Icon')
136
136
  },
137
137
  text: {
138
138
  id: textId,
139
- UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button-label")
139
+ UNSAFE_className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button-label')
140
140
  }
141
141
  }
142
- }, typeof children === "string" ? /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$Text), null, children) : children, isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
142
+ }, typeof children === 'string' ? /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$Text), null, children) : children, isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
143
143
  "aria-hidden": "true",
144
144
  style: {
145
- visibility: isProgressVisible ? "visible" : "hidden"
145
+ visibility: isProgressVisible ? 'visible' : 'hidden'
146
146
  },
147
- className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), "spectrum-Button-circleLoader")
147
+ className: (0, $l1zrX$classNames)((0, ($parcel$interopDefault($l1zrX$button_vars_cssmodulejs))), 'spectrum-Button-circleLoader')
148
148
  }, /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$ProgressCircle), {
149
149
  "aria-label": isPendingAriaLiveLabel,
150
150
  isIndeterminate: true,
151
151
  size: "S",
152
152
  staticColor: staticColor
153
153
  })), isPending && /*#__PURE__*/ (0, $l1zrX$react).createElement((0, $l1zrX$react).Fragment, null, /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
154
- "aria-live": isFocused ? ariaLive : "off"
154
+ "aria-live": isFocused ? ariaLive : 'off'
155
155
  }, isProgressVisible && /*#__PURE__*/ (0, $l1zrX$react).createElement("div", {
156
156
  role: "img",
157
157
  "aria-labelledby": isPendingAriaLiveLabelledby
@@ -38,8 +38,8 @@ $parcel$export(module.exports, "ClearButton", () => $9c84a434f1c9da63$export$13e
38
38
 
39
39
  function $9c84a434f1c9da63$var$ClearButton(props, ref) {
40
40
  let { children: children = /*#__PURE__*/ (0, ($parcel$interopDefault($3cv9y$react))).createElement((0, ($parcel$interopDefault($3cv9y$spectrumiconsuiCrossSmall))), {
41
- UNSAFE_className: (0, ($parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Icon"]
42
- }), focusClassName: focusClassName, variant: variant, autoFocus: autoFocus, isDisabled: isDisabled, preventFocus: preventFocus, elementType: elementType = preventFocus ? "div" : "button", ...otherProps } = props;
41
+ UNSAFE_className: (0, ($parcel$interopDefault($afc5a4514aca2340$exports)))['spectrum-Icon']
42
+ }), focusClassName: focusClassName, variant: variant, autoFocus: autoFocus, isDisabled: isDisabled, preventFocus: preventFocus, elementType: elementType = preventFocus ? 'div' : 'button', ...otherProps } = props;
43
43
  let domRef = (0, $3cv9y$reactspectrumutils.useFocusableRef)(ref);
44
44
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $3cv9y$reactariabutton.useButton)({
45
45
  ...props,
@@ -55,17 +55,17 @@ function $9c84a434f1c9da63$var$ClearButton(props, ref) {
55
55
  if (preventFocus) delete buttonProps.tabIndex;
56
56
  let ElementType = elementType;
57
57
  return /*#__PURE__*/ (0, ($parcel$interopDefault($3cv9y$react))).createElement((0, $3cv9y$reactariafocus.FocusRing), {
58
- focusRingClass: (0, $3cv9y$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring", focusClassName),
58
+ focusRingClass: (0, $3cv9y$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'focus-ring', focusClassName),
59
59
  autoFocus: autoFocus
60
60
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($3cv9y$react))).createElement(ElementType, {
61
61
  ...styleProps,
62
62
  ...(0, $3cv9y$reactariautils.mergeProps)(buttonProps, hoverProps),
63
63
  ref: domRef,
64
- className: (0, $3cv9y$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ClearButton", {
64
+ className: (0, $3cv9y$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ClearButton', {
65
65
  [`spectrum-ClearButton--${variant}`]: variant,
66
- "is-disabled": isDisabled,
67
- "is-active": isPressed,
68
- "is-hovered": isHovered
66
+ 'is-disabled': isDisabled,
67
+ 'is-active': isPressed,
68
+ 'is-hovered': isHovered
69
69
  }, styleProps.className)
70
70
  }, children));
71
71
  }