@react-spectrum/button 3.0.0-nightly.1662 → 3.0.0-nightly.1663
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 +8 -41
- package/dist/main.js.map +1 -1
- package/dist/module.js +0 -18
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/index.ts +6 -8
package/dist/main.js
CHANGED
@@ -11,31 +11,19 @@ var $IPaYO$spectrumiconsuiCornerTriangle = require("@spectrum-icons/ui/CornerTri
|
|
11
11
|
var $IPaYO$spectrumiconsuiCrossSmall = require("@spectrum-icons/ui/CrossSmall");
|
12
12
|
var $IPaYO$reactstatelytoggle = require("@react-stately/toggle");
|
13
13
|
|
14
|
-
function $parcel$
|
15
|
-
Object.
|
16
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
17
|
-
return;
|
18
|
-
}
|
19
|
-
|
20
|
-
Object.defineProperty(dest, key, {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return source[key];
|
24
|
-
}
|
25
|
-
});
|
26
|
-
});
|
27
|
-
|
28
|
-
return dest;
|
14
|
+
function $parcel$export(e, n, v, s) {
|
15
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
29
16
|
}
|
30
17
|
function $parcel$interopDefault(a) {
|
31
18
|
return a && a.__esModule ? a.default : a;
|
32
19
|
}
|
33
|
-
function $parcel$export(e, n, v, s) {
|
34
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
35
|
-
}
|
36
|
-
var $842a195ed1671b15$exports = {};
|
37
20
|
|
38
|
-
$parcel$export(
|
21
|
+
$parcel$export(module.exports, "Button", () => $842a195ed1671b15$export$353f5b6fc5456de1);
|
22
|
+
$parcel$export(module.exports, "ActionButton", () => $65dbde0e8e7aba71$export$cfc7921d29ef7b80);
|
23
|
+
$parcel$export(module.exports, "FieldButton", () => $5931ec1ea1ec1b0d$export$47dc48f595b075da);
|
24
|
+
$parcel$export(module.exports, "LogicButton", () => $3bd294eda342b0c4$export$9b0b80fed00ba8b1);
|
25
|
+
$parcel$export(module.exports, "ClearButton", () => $9c84a434f1c9da63$export$13ec83e50bf04290);
|
26
|
+
$parcel$export(module.exports, "ToggleButton", () => $b5c927da7d8f1be6$export$d2b052e7b4be1756);
|
39
27
|
|
40
28
|
|
41
29
|
|
@@ -198,9 +186,6 @@ function $842a195ed1671b15$var$Button(props, ref) {
|
|
198
186
|
*/ let $842a195ed1671b15$export$353f5b6fc5456de1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($842a195ed1671b15$var$Button);
|
199
187
|
|
200
188
|
|
201
|
-
var $65dbde0e8e7aba71$exports = {};
|
202
|
-
|
203
|
-
$parcel$export($65dbde0e8e7aba71$exports, "ActionButton", () => $65dbde0e8e7aba71$export$cfc7921d29ef7b80);
|
204
189
|
|
205
190
|
|
206
191
|
|
@@ -260,9 +245,6 @@ function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
|
|
260
245
|
*/ let $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($65dbde0e8e7aba71$var$ActionButton);
|
261
246
|
|
262
247
|
|
263
|
-
var $5931ec1ea1ec1b0d$exports = {};
|
264
|
-
|
265
|
-
$parcel$export($5931ec1ea1ec1b0d$exports, "FieldButton", () => $5931ec1ea1ec1b0d$export$47dc48f595b075da);
|
266
248
|
|
267
249
|
|
268
250
|
|
@@ -305,9 +287,6 @@ function $5931ec1ea1ec1b0d$var$FieldButton(props, ref) {
|
|
305
287
|
let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($5931ec1ea1ec1b0d$var$FieldButton);
|
306
288
|
|
307
289
|
|
308
|
-
var $3bd294eda342b0c4$exports = {};
|
309
|
-
|
310
|
-
$parcel$export($3bd294eda342b0c4$exports, "LogicButton", () => $3bd294eda342b0c4$export$9b0b80fed00ba8b1);
|
311
290
|
|
312
291
|
|
313
292
|
|
@@ -347,9 +326,6 @@ function $3bd294eda342b0c4$var$LogicButton(props, ref) {
|
|
347
326
|
*/ let $3bd294eda342b0c4$export$9b0b80fed00ba8b1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($3bd294eda342b0c4$var$LogicButton);
|
348
327
|
|
349
328
|
|
350
|
-
var $9c84a434f1c9da63$exports = {};
|
351
|
-
|
352
|
-
$parcel$export($9c84a434f1c9da63$exports, "ClearButton", () => $9c84a434f1c9da63$export$13ec83e50bf04290);
|
353
329
|
|
354
330
|
|
355
331
|
|
@@ -394,9 +370,6 @@ function $9c84a434f1c9da63$var$ClearButton(props, ref) {
|
|
394
370
|
let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($9c84a434f1c9da63$var$ClearButton);
|
395
371
|
|
396
372
|
|
397
|
-
var $b5c927da7d8f1be6$exports = {};
|
398
|
-
|
399
|
-
$parcel$export($b5c927da7d8f1be6$exports, "ToggleButton", () => $b5c927da7d8f1be6$export$d2b052e7b4be1756);
|
400
373
|
|
401
374
|
|
402
375
|
|
@@ -455,12 +428,6 @@ function $b5c927da7d8f1be6$var$ToggleButton(props, ref) {
|
|
455
428
|
*/ let $b5c927da7d8f1be6$export$d2b052e7b4be1756 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($b5c927da7d8f1be6$var$ToggleButton);
|
456
429
|
|
457
430
|
|
458
|
-
$parcel$exportWildcard(module.exports, $842a195ed1671b15$exports);
|
459
|
-
$parcel$exportWildcard(module.exports, $65dbde0e8e7aba71$exports);
|
460
|
-
$parcel$exportWildcard(module.exports, $5931ec1ea1ec1b0d$exports);
|
461
|
-
$parcel$exportWildcard(module.exports, $3bd294eda342b0c4$exports);
|
462
|
-
$parcel$exportWildcard(module.exports, $9c84a434f1c9da63$exports);
|
463
|
-
$parcel$exportWildcard(module.exports, $b5c927da7d8f1be6$exports);
|
464
431
|
|
465
432
|
|
466
433
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAyB;AACzB,GAA6C;AAC7C,GAAsD;AACtD,GAA6C;AAC7C,GAA4B;AAC5B,GAA2B;AAC3B,GAAsC;AACtC,GAA0C;AAC1C,GAA4C;AAC5C,GAA0C;AAC1C,GAAiD;AACjD,GAAwC;AACxC,GAA6B;AAC7B,GAAoD;AACpD,GAAoD;AACpD,GAA2C;AAC3C,GAA0C;AAC1C,GAAgC;AAChC,GAA+C;AAjC/C,yCAAiC,GAAG,CAAwB;AAC5D,wCAAuC,GAAG,CAA8B;AACxE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,wCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA+B,GAAG,CAAsB;AACxD,yCAAmD,GAAG,CAA0C;AAChG,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,yCAA6C,GAAG,CAAoC;AACpF,yCAA4C,GAAG,CAAmC;AAClF,yCAA8C,GAAG,CAAqC;AACtF,yCAA6B,GAAG,CAAoB;AACpD,yCAAyB,GAAG,CAAgB;AAC5C,yCAA6C,GAAG,CAAoC;AACp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AM,EAAE,CAAY;QAAG,SAAS,EAAE,SAAS;0EAC9E,CAAM;WACD,UAAU;WACV,gCAAU,CAAC,WAAW,EAAE,UAAU;QACtC,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,+BAAE,OAAO;YACvC,CAAmC,oCAAE,YAAY;YACjD,CAAoC,uCAAI,WAAW;YACnD,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAW,YAAE,SAAS;YACtB,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;YACvB,CAAa,cAAE,KAAK,CAAC,UAAU;QACjC,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,sCAAY;QACX,KAAK,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;gBACL,IAAI,EAAE,CAAG;gBACT,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAe;YACtD,CAAC;YACD,IAAI,EAAE,CAAC;gBACL,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;OACA,MAAM,CAAC,QAAQ,KAAK,CAAQ,WAAI,UAAU,sEACtC,6BAAI,QAAE,QAAQ,IACf,QAAQ;AAKtB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAa,iBAAG,sCAAK,CAAC,UAAU,CAAC,kCAAY;;","sources":["packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/Button.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/ToggleButton.tsx"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Button';\nexport * from './ActionButton';\nexport * from './FieldButton';\nexport * from './LogicButton';\nexport * from './ClearButton';\nexport * from './ToggleButton';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType, ReactElement} from 'react';\nimport {SpectrumButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// todo: CSS hasn't caught up yet, map\nlet VARIANT_MAPPING = {\n negative: 'warning'\n};\n\nfunction Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'button');\n let {\n elementType: ElementType = 'button',\n children,\n variant,\n isQuiet,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n let buttonVariant = variant;\n if (VARIANT_MAPPING[variant]) {\n buttonVariant = VARIANT_MAPPING[variant];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Button',\n `spectrum-Button--${buttonVariant}`,\n {\n 'spectrum-Button--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Button-label')\n }\n }}>\n {typeof children === 'string'\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ElementType>\n </FocusRing>\n );\n}\n\n/**\n * Buttons allow users to perform an action or to navigate to another page.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nlet _Button = React.forwardRef(Button) as <T extends ElementType = 'button'>(props: SpectrumButtonProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Button as Button};\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\n@import './index.css';\n@import './skin.css';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nlet _ActionButton = React.forwardRef(ActionButton);\nexport {_ActionButton as ActionButton};\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 {ButtonProps} from '@react-types/button';\nimport {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface FieldButtonProps extends ButtonProps, DOMProps, StyleProps {\n isQuiet?: boolean,\n isActive?: boolean,\n validationState?: 'valid' | 'invalid',\n focusRingClass?: string\n}\n\n// @private\nfunction FieldButton(props: FieldButtonProps, ref: FocusableRef) {\n props = useSlotProps(props, 'button');\n let {\n isQuiet,\n isDisabled,\n validationState,\n children,\n autoFocus,\n isActive,\n focusRingClass,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref) as RefObject<HTMLButtonElement>;\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusRingClass)} autoFocus={autoFocus}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isActive || isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid',\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n }\n }}>\n {children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\nlet _FieldButton = React.forwardRef(FieldButton);\nexport {_FieldButton as FieldButton};\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 {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumLogicButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction LogicButton(props: SpectrumLogicButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n variant,\n children,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-LogicButton',\n {\n [`spectrum-LogicButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <span className={classNames(styles, 'spectrum-Button-label')}>{children}</span>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * A LogicButton displays an operator within a boolean logic sequence.\n */\nlet _LogicButton = React.forwardRef(LogicButton);\nexport {_LogicButton as LogicButton};\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 {AriaButtonElementTypeProps, ButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossSmall from '@spectrum-icons/ui/CrossSmall';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface ClearButtonProps<T extends ElementType = 'button'> extends ButtonProps, AriaButtonElementTypeProps<T>, DOMProps, StyleProps {\n focusClassName?: string,\n variant?: 'overBackground',\n excludeFromTabOrder?: boolean,\n preventFocus?: boolean\n}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {\n children = <CrossSmall UNSAFE_className={styles['spectrum-Icon']} />,\n focusClassName,\n variant,\n autoFocus,\n isDisabled,\n preventFocus,\n elementType = preventFocus ? 'div' : 'button' as ElementType,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton({...props, elementType}, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n // For cases like the clear button in a search field, remove the tabIndex so\n // iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when\n // moving the cursor over the clear button.\n if (preventFocus) {\n delete buttonProps.tabIndex;\n }\n\n let ElementType = elementType;\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusClassName)} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ClearButton',\n {\n [`spectrum-ClearButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n );\n}\n\nlet _ClearButton = React.forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\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 {classNames, SlotProvider, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumToggleButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleButton} from '@react-aria/button';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction ToggleButton(props: SpectrumToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n isDisabled,\n isEmphasized,\n staticColor,\n children,\n autoFocus,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let state = useToggleState(props);\n let {buttonProps, isPressed} = useToggleButton(props, state, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-selected': state.isSelected\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nlet _ToggleButton = React.forwardRef(ToggleButton);\nexport {_ToggleButton as ToggleButton};\n"],"names":[],"version":3,"file":"main.js.map"}
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAyB;AACzB,GAA6C;AAC7C,GAAsD;AACtD,GAA6C;AAC7C,GAA4B;AAC5B,GAA2B;AAC3B,GAAsC;AACtC,GAA0C;AAC1C,GAA4C;AAC5C,GAA0C;AAC1C,GAAiD;AACjD,GAAwC;AACxC,GAA6B;AAC7B,GAAoD;AACpD,GAAoD;AACpD,GAA2C;AAC3C,GAA0C;AAC1C,GAAgC;AAChC,GAA+C;AAjC/C,yCAAiC,GAAG,CAAwB;AAC5D,wCAAuC,GAAG,CAA8B;AACxE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,wCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA+B,GAAG,CAAsB;AACxD,yCAAmD,GAAG,CAA0C;AAChG,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,yC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KAAK,CAAC,QAAQ,EAAE,KAAK,EAAC,CAAC,kBAAK,sCAAK,CAAC,cAAc,CAAC,CAAC;;IAE1F,MAAM,oEACH,+BAAS;QAAC,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAY;QAAG,SAAS,EAAE,SAAS;0EAC9E,CAAM;WACD,UAAU;WACV,gCAAU,CAAC,WAAW,EAAE,UAAU;QACtC,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,+BAAE,OAAO;YACvC,CAAmC,oCAAE,YAAY;YACjD,CAAoC,uCAAI,WAAW;YACnD,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAW,YAAE,SAAS;YACtB,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;YACvB,CAAa,cAAE,KAAK,CAAC,UAAU;QACjC,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,sCAAY;QACX,KAAK,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;gBACL,IAAI,EAAE,CAAG;gBACT,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAe;YACtD,CAAC;YACD,IAAI,EAAE,CAAC;gBACL,gBAAgB,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;OACA,MAAM,CAAC,QAAQ,KAAK,CAAQ,WAAI,UAAU,sEACtC,6BAAI,QAAE,QAAQ,IACf,QAAQ;AAKtB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAa,iBAAG,sCAAK,CAAC,UAAU,CAAC,kCAAY;;","sources":["packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/Button.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/ToggleButton.tsx"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from './Button';\nexport {ActionButton} from './ActionButton';\nexport {FieldButton} from './FieldButton';\nexport {LogicButton} from './LogicButton';\nexport {ClearButton} from './ClearButton';\nexport {ToggleButton} from './ToggleButton';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType, ReactElement} from 'react';\nimport {SpectrumButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// todo: CSS hasn't caught up yet, map\nlet VARIANT_MAPPING = {\n negative: 'warning'\n};\n\nfunction Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'button');\n let {\n elementType: ElementType = 'button',\n children,\n variant,\n isQuiet,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n let buttonVariant = variant;\n if (VARIANT_MAPPING[variant]) {\n buttonVariant = VARIANT_MAPPING[variant];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Button',\n `spectrum-Button--${buttonVariant}`,\n {\n 'spectrum-Button--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Button-label')\n }\n }}>\n {typeof children === 'string'\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ElementType>\n </FocusRing>\n );\n}\n\n/**\n * Buttons allow users to perform an action or to navigate to another page.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nlet _Button = React.forwardRef(Button) as <T extends ElementType = 'button'>(props: SpectrumButtonProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Button as Button};\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\n@import './index.css';\n@import './skin.css';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nlet _ActionButton = React.forwardRef(ActionButton);\nexport {_ActionButton as ActionButton};\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 {ButtonProps} from '@react-types/button';\nimport {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface FieldButtonProps extends ButtonProps, DOMProps, StyleProps {\n isQuiet?: boolean,\n isActive?: boolean,\n validationState?: 'valid' | 'invalid',\n focusRingClass?: string\n}\n\n// @private\nfunction FieldButton(props: FieldButtonProps, ref: FocusableRef) {\n props = useSlotProps(props, 'button');\n let {\n isQuiet,\n isDisabled,\n validationState,\n children,\n autoFocus,\n isActive,\n focusRingClass,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref) as RefObject<HTMLButtonElement>;\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusRingClass)} autoFocus={autoFocus}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isActive || isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid',\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n }\n }}>\n {children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\nlet _FieldButton = React.forwardRef(FieldButton);\nexport {_FieldButton as FieldButton};\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 {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumLogicButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction LogicButton(props: SpectrumLogicButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n variant,\n children,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-LogicButton',\n {\n [`spectrum-LogicButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <span className={classNames(styles, 'spectrum-Button-label')}>{children}</span>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * A LogicButton displays an operator within a boolean logic sequence.\n */\nlet _LogicButton = React.forwardRef(LogicButton);\nexport {_LogicButton as LogicButton};\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 {AriaButtonElementTypeProps, ButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossSmall from '@spectrum-icons/ui/CrossSmall';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface ClearButtonProps<T extends ElementType = 'button'> extends ButtonProps, AriaButtonElementTypeProps<T>, DOMProps, StyleProps {\n focusClassName?: string,\n variant?: 'overBackground',\n excludeFromTabOrder?: boolean,\n preventFocus?: boolean\n}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {\n children = <CrossSmall UNSAFE_className={styles['spectrum-Icon']} />,\n focusClassName,\n variant,\n autoFocus,\n isDisabled,\n preventFocus,\n elementType = preventFocus ? 'div' : 'button' as ElementType,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton({...props, elementType}, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n // For cases like the clear button in a search field, remove the tabIndex so\n // iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when\n // moving the cursor over the clear button.\n if (preventFocus) {\n delete buttonProps.tabIndex;\n }\n\n let ElementType = elementType;\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusClassName)} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ClearButton',\n {\n [`spectrum-ClearButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n );\n}\n\nlet _ClearButton = React.forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\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 {classNames, SlotProvider, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumToggleButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleButton} from '@react-aria/button';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction ToggleButton(props: SpectrumToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n isDisabled,\n isEmphasized,\n staticColor,\n children,\n autoFocus,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let state = useToggleState(props);\n let {buttonProps, isPressed} = useToggleButton(props, state, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-selected': state.isSelected\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nlet _ToggleButton = React.forwardRef(ToggleButton);\nexport {_ToggleButton as ToggleButton};\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
@@ -17,9 +17,6 @@ function $parcel$interopDefault(a) {
|
|
17
17
|
function $parcel$export(e, n, v, s) {
|
18
18
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
19
19
|
}
|
20
|
-
var $b865a6f0049e2d66$exports = {};
|
21
|
-
|
22
|
-
$parcel$export($b865a6f0049e2d66$exports, "Button", () => $b865a6f0049e2d66$export$353f5b6fc5456de1);
|
23
20
|
|
24
21
|
|
25
22
|
|
@@ -182,9 +179,6 @@ function $b865a6f0049e2d66$var$Button(props, ref) {
|
|
182
179
|
*/ let $b865a6f0049e2d66$export$353f5b6fc5456de1 = /*#__PURE__*/ $d7FTw$react.forwardRef($b865a6f0049e2d66$var$Button);
|
183
180
|
|
184
181
|
|
185
|
-
var $042ad0b3a4a55b33$exports = {};
|
186
|
-
|
187
|
-
$parcel$export($042ad0b3a4a55b33$exports, "ActionButton", () => $042ad0b3a4a55b33$export$cfc7921d29ef7b80);
|
188
182
|
|
189
183
|
|
190
184
|
|
@@ -244,9 +238,6 @@ function $042ad0b3a4a55b33$var$ActionButton(props, ref) {
|
|
244
238
|
*/ let $042ad0b3a4a55b33$export$cfc7921d29ef7b80 = /*#__PURE__*/ $d7FTw$react.forwardRef($042ad0b3a4a55b33$var$ActionButton);
|
245
239
|
|
246
240
|
|
247
|
-
var $b43bd559b476d0c4$exports = {};
|
248
|
-
|
249
|
-
$parcel$export($b43bd559b476d0c4$exports, "FieldButton", () => $b43bd559b476d0c4$export$47dc48f595b075da);
|
250
241
|
|
251
242
|
|
252
243
|
|
@@ -289,9 +280,6 @@ function $b43bd559b476d0c4$var$FieldButton(props, ref) {
|
|
289
280
|
let $b43bd559b476d0c4$export$47dc48f595b075da = /*#__PURE__*/ $d7FTw$react.forwardRef($b43bd559b476d0c4$var$FieldButton);
|
290
281
|
|
291
282
|
|
292
|
-
var $45108e3c482ee88b$exports = {};
|
293
|
-
|
294
|
-
$parcel$export($45108e3c482ee88b$exports, "LogicButton", () => $45108e3c482ee88b$export$9b0b80fed00ba8b1);
|
295
283
|
|
296
284
|
|
297
285
|
|
@@ -331,9 +319,6 @@ function $45108e3c482ee88b$var$LogicButton(props, ref) {
|
|
331
319
|
*/ let $45108e3c482ee88b$export$9b0b80fed00ba8b1 = /*#__PURE__*/ $d7FTw$react.forwardRef($45108e3c482ee88b$var$LogicButton);
|
332
320
|
|
333
321
|
|
334
|
-
var $dd24e555a16de2ae$exports = {};
|
335
|
-
|
336
|
-
$parcel$export($dd24e555a16de2ae$exports, "ClearButton", () => $dd24e555a16de2ae$export$13ec83e50bf04290);
|
337
322
|
|
338
323
|
|
339
324
|
|
@@ -378,9 +363,6 @@ function $dd24e555a16de2ae$var$ClearButton(props, ref) {
|
|
378
363
|
let $dd24e555a16de2ae$export$13ec83e50bf04290 = /*#__PURE__*/ $d7FTw$react.forwardRef($dd24e555a16de2ae$var$ClearButton);
|
379
364
|
|
380
365
|
|
381
|
-
var $3979c7c23b0bd270$exports = {};
|
382
|
-
|
383
|
-
$parcel$export($3979c7c23b0bd270$exports, "ToggleButton", () => $3979c7c23b0bd270$export$d2b052e7b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EACP,iBAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,+BAAE,OAAO;YACvC,CAAmC,oCAAE,YAAY;YACjD,CAAoC,uCAAI,WAAW;YACnD,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAW,YAAE,SAAS;YACtB,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;YACvB,CAAa,cAAE,KAAK,CAAC,UAAU;QACjC,CAAC,EACD,UAAU,CAAC,SAAS;gDAGvB,mBAAY;QACX,KAAK,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;gBACL,IAAI,EAAE,CAAG;gBACT,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAe;YACtD,CAAC;YACD,IAAI,EAAE,CAAC;gBACL,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;OACA,MAAM,CAAC,QAAQ,KAAK,CAAQ,WAAI,UAAU,4CACtC,WAAI,QAAE,QAAQ,IACf,QAAQ;AAKtB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAa,iBAAG,YAAK,CAAC,UAAU,CAAC,kCAAY;;","sources":["packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/Button.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/ToggleButton.tsx"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Button';\nexport * from './ActionButton';\nexport * from './FieldButton';\nexport * from './LogicButton';\nexport * from './ClearButton';\nexport * from './ToggleButton';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType, ReactElement} from 'react';\nimport {SpectrumButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// todo: CSS hasn't caught up yet, map\nlet VARIANT_MAPPING = {\n negative: 'warning'\n};\n\nfunction Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'button');\n let {\n elementType: ElementType = 'button',\n children,\n variant,\n isQuiet,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n let buttonVariant = variant;\n if (VARIANT_MAPPING[variant]) {\n buttonVariant = VARIANT_MAPPING[variant];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Button',\n `spectrum-Button--${buttonVariant}`,\n {\n 'spectrum-Button--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Button-label')\n }\n }}>\n {typeof children === 'string'\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ElementType>\n </FocusRing>\n );\n}\n\n/**\n * Buttons allow users to perform an action or to navigate to another page.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nlet _Button = React.forwardRef(Button) as <T extends ElementType = 'button'>(props: SpectrumButtonProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Button as Button};\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\n@import './index.css';\n@import './skin.css';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nlet _ActionButton = React.forwardRef(ActionButton);\nexport {_ActionButton as ActionButton};\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 {ButtonProps} from '@react-types/button';\nimport {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface FieldButtonProps extends ButtonProps, DOMProps, StyleProps {\n isQuiet?: boolean,\n isActive?: boolean,\n validationState?: 'valid' | 'invalid',\n focusRingClass?: string\n}\n\n// @private\nfunction FieldButton(props: FieldButtonProps, ref: FocusableRef) {\n props = useSlotProps(props, 'button');\n let {\n isQuiet,\n isDisabled,\n validationState,\n children,\n autoFocus,\n isActive,\n focusRingClass,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref) as RefObject<HTMLButtonElement>;\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusRingClass)} autoFocus={autoFocus}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isActive || isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid',\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n }\n }}>\n {children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\nlet _FieldButton = React.forwardRef(FieldButton);\nexport {_FieldButton as FieldButton};\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 {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumLogicButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction LogicButton(props: SpectrumLogicButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n variant,\n children,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-LogicButton',\n {\n [`spectrum-LogicButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <span className={classNames(styles, 'spectrum-Button-label')}>{children}</span>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * A LogicButton displays an operator within a boolean logic sequence.\n */\nlet _LogicButton = React.forwardRef(LogicButton);\nexport {_LogicButton as LogicButton};\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 {AriaButtonElementTypeProps, ButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossSmall from '@spectrum-icons/ui/CrossSmall';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface ClearButtonProps<T extends ElementType = 'button'> extends ButtonProps, AriaButtonElementTypeProps<T>, DOMProps, StyleProps {\n focusClassName?: string,\n variant?: 'overBackground',\n excludeFromTabOrder?: boolean,\n preventFocus?: boolean\n}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {\n children = <CrossSmall UNSAFE_className={styles['spectrum-Icon']} />,\n focusClassName,\n variant,\n autoFocus,\n isDisabled,\n preventFocus,\n elementType = preventFocus ? 'div' : 'button' as ElementType,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton({...props, elementType}, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n // For cases like the clear button in a search field, remove the tabIndex so\n // iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when\n // moving the cursor over the clear button.\n if (preventFocus) {\n delete buttonProps.tabIndex;\n }\n\n let ElementType = elementType;\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusClassName)} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ClearButton',\n {\n [`spectrum-ClearButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n );\n}\n\nlet _ClearButton = React.forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\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 {classNames, SlotProvider, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumToggleButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleButton} from '@react-aria/button';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction ToggleButton(props: SpectrumToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n isDisabled,\n isEmphasized,\n staticColor,\n children,\n autoFocus,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let state = useToggleState(props);\n let {buttonProps, isPressed} = useToggleButton(props, state, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-selected': state.isSelected\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nlet _ToggleButton = React.forwardRef(ToggleButton);\nexport {_ToggleButton as ToggleButton};\n"],"names":[],"version":3,"file":"module.js.map"}
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAyB;AACzB,GAA6C;AAC7C,GAAsD;AACtD,GAA6C;AAC7C,GAA4B;AAC5B,GAA2B;AAC3B,GAAsC;AACtC,GAA0C;AAC1C,GAA4C;AAC5C,GAA0C;AAC1C,GAAiD;AACjD,GAAwC;AACxC,GAA6B;AAC7B,GAAoD;AACpD,GAAoD;AACpD,GAA2C;AAC3C,GAA0C;AAC1C,GAAgC;AAChC,GAA+C;AAjC/C,yCAAiC,GAAG,CAAwB;AAC5D,wCAAuC,GAAG,CAA8B;AACxE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,wCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA+B,GAAG,CAAsB;AACxD,yCAAmD,GAAG,CAA0C;AAChG,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,yCAA6C,GAAG,CAAoC;AACpF,yCAA4C,GAAG,CAAmC;AAClF,yCAA8C,GAAG,CAAqC;AACtF,yCAA6B,GAAG,CAAoB;AACpD,yCAAyB,GAAG,CAAgB;AAC5C,yCAA6C,G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AAS,EAAE,SAAS;gDAC9E,CAAM;WACD,UAAU;WACV,iBAAU,CAAC,WAAW,EAAE,UAAU;QACtC,GAAG,EAAE,MAAM;QACX,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAuB,wBACvB,CAAC;YACC,CAA8B,+BAAE,OAAO;YACvC,CAAmC,oCAAE,YAAY;YACjD,CAAoC,uCAAI,WAAW;YACnD,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAoC,qCAAE,WAAW,KAAK,CAAO;YAC7D,CAAW,YAAE,SAAS;YACtB,CAAa,cAAE,UAAU;YACzB,CAAY,aAAE,SAAS;YACvB,CAAa,cAAE,KAAK,CAAC,UAAU;QACjC,CAAC,EACD,UAAU,CAAC,SAAS;gDAGvB,mBAAY;QACX,KAAK,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;gBACL,IAAI,EAAE,CAAG;gBACT,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAe;YACtD,CAAC;YACD,IAAI,EAAE,CAAC;gBACL,gBAAgB,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAA6B;YACpE,CAAC;QACH,CAAC;OACA,MAAM,CAAC,QAAQ,KAAK,CAAQ,WAAI,UAAU,4CACtC,WAAI,QAAE,QAAQ,IACf,QAAQ;AAKtB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAa,iBAAG,YAAK,CAAC,UAAU,CAAC,kCAAY;;","sources":["packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/Button.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/ToggleButton.tsx"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from './Button';\nexport {ActionButton} from './ActionButton';\nexport {FieldButton} from './FieldButton';\nexport {LogicButton} from './LogicButton';\nexport {ClearButton} from './ClearButton';\nexport {ToggleButton} from './ToggleButton';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType, ReactElement} from 'react';\nimport {SpectrumButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// todo: CSS hasn't caught up yet, map\nlet VARIANT_MAPPING = {\n negative: 'warning'\n};\n\nfunction Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'button');\n let {\n elementType: ElementType = 'button',\n children,\n variant,\n isQuiet,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n let buttonVariant = variant;\n if (VARIANT_MAPPING[variant]) {\n buttonVariant = VARIANT_MAPPING[variant];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Button',\n `spectrum-Button--${buttonVariant}`,\n {\n 'spectrum-Button--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Button-label')\n }\n }}>\n {typeof children === 'string'\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ElementType>\n </FocusRing>\n );\n}\n\n/**\n * Buttons allow users to perform an action or to navigate to another page.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nlet _Button = React.forwardRef(Button) as <T extends ElementType = 'button'>(props: SpectrumButtonProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Button as Button};\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\n@import './index.css';\n@import './skin.css';\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 {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nlet _ActionButton = React.forwardRef(ActionButton);\nexport {_ActionButton as ActionButton};\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 {ButtonProps} from '@react-types/button';\nimport {classNames, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface FieldButtonProps extends ButtonProps, DOMProps, StyleProps {\n isQuiet?: boolean,\n isActive?: boolean,\n validationState?: 'valid' | 'invalid',\n focusRingClass?: string\n}\n\n// @private\nfunction FieldButton(props: FieldButtonProps, ref: FocusableRef) {\n props = useSlotProps(props, 'button');\n let {\n isQuiet,\n isDisabled,\n validationState,\n children,\n autoFocus,\n isActive,\n focusRingClass,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref) as RefObject<HTMLButtonElement>;\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusRingClass)} autoFocus={autoFocus}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isActive || isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid',\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n }\n }}>\n {children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\nlet _FieldButton = React.forwardRef(FieldButton);\nexport {_FieldButton as FieldButton};\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 {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumLogicButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction LogicButton(props: SpectrumLogicButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n variant,\n children,\n isDisabled,\n autoFocus,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-LogicButton',\n {\n [`spectrum-LogicButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <span className={classNames(styles, 'spectrum-Button-label')}>{children}</span>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * A LogicButton displays an operator within a boolean logic sequence.\n */\nlet _LogicButton = React.forwardRef(LogicButton);\nexport {_LogicButton as LogicButton};\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 {AriaButtonElementTypeProps, ButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossSmall from '@spectrum-icons/ui/CrossSmall';\nimport {DOMProps, FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ElementType} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\n\ninterface ClearButtonProps<T extends ElementType = 'button'> extends ButtonProps, AriaButtonElementTypeProps<T>, DOMProps, StyleProps {\n focusClassName?: string,\n variant?: 'overBackground',\n excludeFromTabOrder?: boolean,\n preventFocus?: boolean\n}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {\n children = <CrossSmall UNSAFE_className={styles['spectrum-Icon']} />,\n focusClassName,\n variant,\n autoFocus,\n isDisabled,\n preventFocus,\n elementType = preventFocus ? 'div' : 'button' as ElementType,\n ...otherProps\n } = props;\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton({...props, elementType}, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n\n // For cases like the clear button in a search field, remove the tabIndex so\n // iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when\n // moving the cursor over the clear button.\n if (preventFocus) {\n delete buttonProps.tabIndex;\n }\n\n let ElementType = elementType;\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusClassName)} autoFocus={autoFocus}>\n <ElementType\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ClearButton',\n {\n [`spectrum-ClearButton--${variant}`]: variant,\n 'is-disabled': isDisabled,\n 'is-active': isPressed,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n );\n}\n\nlet _ClearButton = React.forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\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 {classNames, SlotProvider, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumToggleButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleButton} from '@react-aria/button';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction ToggleButton(props: SpectrumToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n isDisabled,\n isEmphasized,\n staticColor,\n children,\n autoFocus,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let state = useToggleState(props);\n let {buttonProps, isPressed} = useToggleButton(props, state, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-selected': state.isSelected\n },\n styleProps.className\n )\n }>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </button>\n </FocusRing>\n );\n}\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nlet _ToggleButton = React.forwardRef(ToggleButton);\nexport {_ToggleButton as ToggleButton};\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;AA0FA;;;;GAIG;AACH,OAAA,IAAI;UAAgH,aAAa,WAAW,CAAC;MAAM,YAAY,CAAC;ACNhK;;;GAGG;AACH,OAAA,IAAI,qLAA8C,CAAC;ACvEnD,0BAA2B,SAAQ,WAAW,EAAE,QAAQ,EAAE,UAAU;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAqDD,OAAA,IAAI,+JAA4C,CAAC;AClBjD;;GAEG;AACH,OAAA,IAAI,mLAA4C,CAAC;AC1CjD,2BAA2B,CAAC,SAAS,WAAW,GAAG,QAAQ,CAAE,SAAQ,WAAW,EAAE,2BAA2B,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU;IACnI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAmDD,OAAA,IAAI,qLAA4C,CAAC;ACQjD;;;GAGG;AACH,OAAA,IAAI,qLAA8C,CAAC","sources":["packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/Button.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ToggleButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/index.ts"],"sourcesContent":[null,null,null,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
|
1
|
+
{"mappings":";;;AA0FA;;;;GAIG;AACH,OAAA,IAAI;UAAgH,aAAa,WAAW,CAAC;MAAM,YAAY,CAAC;ACNhK;;;GAGG;AACH,OAAA,IAAI,qLAA8C,CAAC;ACvEnD,0BAA2B,SAAQ,WAAW,EAAE,QAAQ,EAAE,UAAU;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAqDD,OAAA,IAAI,+JAA4C,CAAC;AClBjD;;GAEG;AACH,OAAA,IAAI,mLAA4C,CAAC;AC1CjD,2BAA2B,CAAC,SAAS,WAAW,GAAG,QAAQ,CAAE,SAAQ,WAAW,EAAE,2BAA2B,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU;IACnI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAmDD,OAAA,IAAI,qLAA4C,CAAC;ACQjD;;;GAGG;AACH,OAAA,IAAI,qLAA8C,CAAC","sources":["packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/Button.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ActionButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/FieldButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/LogicButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ClearButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/ToggleButton.tsx","packages/@react-spectrum/button/src/packages/@react-spectrum/button/src/index.ts","packages/@react-spectrum/button/src/index.ts"],"sourcesContent":[null,null,null,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/// <reference types=\"css-module-types\" />\nexport {Button} from './Button';\nexport {ActionButton} from './ActionButton';\nexport {FieldButton} from './FieldButton';\nexport {LogicButton} from './LogicButton';\nexport {ClearButton} from './ClearButton';\nexport {ToggleButton} from './ToggleButton';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/button",
|
3
|
-
"version": "3.0.0-nightly.
|
3
|
+
"version": "3.0.0-nightly.1663+2a6c48eb0",
|
4
4
|
"description": "Spectrum UI components in React",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "dist/main.js",
|
@@ -32,20 +32,20 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@babel/runtime": "^7.6.2",
|
35
|
-
"@react-aria/button": "3.0.0-nightly.
|
36
|
-
"@react-aria/focus": "3.0.0-nightly.
|
37
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
38
|
-
"@react-aria/utils": "3.0.0-nightly.
|
39
|
-
"@react-spectrum/text": "3.2.2-nightly.
|
40
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
41
|
-
"@react-stately/toggle": "3.0.0-nightly.
|
42
|
-
"@react-types/button": "3.5.2-nightly.
|
43
|
-
"@react-types/shared": "3.0.0-nightly.
|
44
|
-
"@spectrum-icons/ui": "3.0.0-nightly.
|
35
|
+
"@react-aria/button": "3.0.0-nightly.1663+2a6c48eb0",
|
36
|
+
"@react-aria/focus": "3.0.0-nightly.1663+2a6c48eb0",
|
37
|
+
"@react-aria/interactions": "3.0.0-nightly.1663+2a6c48eb0",
|
38
|
+
"@react-aria/utils": "3.0.0-nightly.1663+2a6c48eb0",
|
39
|
+
"@react-spectrum/text": "3.2.2-nightly.3363+2a6c48eb0",
|
40
|
+
"@react-spectrum/utils": "3.0.0-nightly.1663+2a6c48eb0",
|
41
|
+
"@react-stately/toggle": "3.0.0-nightly.1663+2a6c48eb0",
|
42
|
+
"@react-types/button": "3.5.2-nightly.3363+2a6c48eb0",
|
43
|
+
"@react-types/shared": "3.0.0-nightly.1663+2a6c48eb0",
|
44
|
+
"@spectrum-icons/ui": "3.0.0-nightly.1663+2a6c48eb0"
|
45
45
|
},
|
46
46
|
"devDependencies": {
|
47
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
48
|
-
"@react-spectrum/test-utils": "3.0.0-nightly.
|
47
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1663+2a6c48eb0",
|
48
|
+
"@react-spectrum/test-utils": "3.0.0-nightly.1663+2a6c48eb0"
|
49
49
|
},
|
50
50
|
"peerDependencies": {
|
51
51
|
"@react-spectrum/provider": "^3.0.0",
|
@@ -54,5 +54,5 @@
|
|
54
54
|
"publishConfig": {
|
55
55
|
"access": "public"
|
56
56
|
},
|
57
|
-
"gitHead": "
|
57
|
+
"gitHead": "2a6c48eb0099671cf9b530ec3d75882c549e9cb5"
|
58
58
|
}
|
package/src/index.ts
CHANGED
@@ -9,12 +9,10 @@
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
10
10
|
* governing permissions and limitations under the License.
|
11
11
|
*/
|
12
|
-
|
13
12
|
/// <reference types="css-module-types" />
|
14
|
-
|
15
|
-
export
|
16
|
-
export
|
17
|
-
export
|
18
|
-
export
|
19
|
-
export
|
20
|
-
export * from './ToggleButton';
|
13
|
+
export {Button} from './Button';
|
14
|
+
export {ActionButton} from './ActionButton';
|
15
|
+
export {FieldButton} from './FieldButton';
|
16
|
+
export {LogicButton} from './LogicButton';
|
17
|
+
export {ClearButton} from './ClearButton';
|
18
|
+
export {ToggleButton} from './ToggleButton';
|