@react-spectrum/numberfield 3.0.0-nightly.1349 → 3.0.0-nightly.1356

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.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,oCAAiB;AACf,qBAAmB,wBADJ;AAEf,2BAAyB,8BAFV;AAGf,0BAAwB,6BAHT;AAIf,0BAAwB,6BAJT;AAKf,0BAAwB,6BALT;AAMf,6BAA2B,gCANZ;AAOf,gBAAc,mBAPC;AAQf,mBAAiB,sBARF;AASf,uCAAqC,0CATtB;AAUf,wCAAsC,2CAVvB;AAWf,gBAAc,mBAXC;AAYf,2BAAyB,8BAZV;AAaf,iCAA+B,oCAbhB;AAcf,gCAA8B,mCAdf;AAef,kCAAgC,qCAfjB;AAgBf,iBAAe,oBAhBA;AAiBf,aAAW,gBAjBI;AAkBf,iCAA+B,oCAlBhB;AAmBf,0CAAwC,6CAnBzB;AAoBf,iCAA+B,oCApBhB;AAqBf,sBAAoB,yBArBL;AAsBf,gCAA8B,mCAtBf;AAuBf,qCAAmC,wCAvBpB;AAwBf,uCAAqC,0CAxBtB;AAyBf,4BAA0B,+BAzBX;AA0Bf,2BAAyB,8BA1BV;AA2Bf,+BAA6B,kCA3Bd;AA4Bf,mCAAiC,sCA5BlB;AA6Bf,4BAA0B,+BA7BX;AA8Bf,gCAA8B,mCA9Bf;AA+Bf,0CAAwC,6CA/BzB;AAgCf,kCAAgC,qCAhCjB;AAiCf,eAAa,kBAjCE;AAkCf,gBAAc,mBAlCC;AAmCf,gBAAc;AAnCC,CAAjB;;;AC+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ACC,UAAN,CAAiBC,iDAAjB,CAAnB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/stepper/vars.css","./packages/@react-spectrum/numberfield/src/StepButton.tsx","./packages/@react-spectrum/numberfield/src/NumberField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\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 Add from '@spectrum-icons/workflow/Add';\nimport {AriaButtonProps} from '@react-types/button';\nimport ChevronDownSmall from '@spectrum-icons/ui/ChevronDownSmall';\nimport ChevronUpSmall from '@spectrum-icons/ui/ChevronUpSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport Remove from '@spectrum-icons/workflow/Remove';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\ninterface StepButtonProps extends AriaButtonProps {\n isQuiet: boolean,\n direction: 'up' | 'down'\n}\n\nfunction StepButton(props: StepButtonProps, ref: RefObject<HTMLDivElement>) {\n props = useProviderProps(props);\n let {scale} = useProvider();\n let {direction, isDisabled, isQuiet} = props;\n /**\n * Must use div for now because Safari pointer event bugs on disabled form elements.\n * Link https://bugs.webkit.org/show_bug.cgi?id=219188.\n */\n let {buttonProps, isPressed} = useButton({...props, elementType: 'div'}, ref);\n let {hoverProps, isHovered} = useHover(props);\n return (\n <FocusRing focusRingClass={classNames(stepperStyle, 'focus-ring')}>\n <div\n className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-button',\n {\n 'spectrum-Stepper-button--stepUp': direction === 'up',\n 'spectrum-Stepper-button--stepDown': direction === 'down',\n 'spectrum-Stepper-button--isQuiet': isQuiet,\n 'is-hovered': isHovered,\n 'is-active': isPressed,\n 'is-disabled': isDisabled\n }\n )\n }\n {...mergeProps(hoverProps, buttonProps)}\n ref={ref}>\n {direction === 'up' && scale === 'large' &&\n <Add UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} size=\"S\" />\n }\n {direction === 'up' && scale === 'medium' &&\n <ChevronUpSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} />\n }\n {direction === 'down' && scale === 'large' &&\n <Remove UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} size=\"S\" />\n }\n {direction === 'down' && scale === 'medium' &&\n <ChevronDownSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} />\n }\n </div>\n </FocusRing>\n );\n}\n\n/**\n * Buttons for NumberField.\n */\nlet _StepButton = React.forwardRef(StepButton);\nexport {_StepButton as StepButton};\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 {AriaButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {HTMLAttributes, InputHTMLAttributes, RefObject, useRef} from 'react';\nimport {SpectrumNumberFieldProps} from '@react-types/numberfield';\nimport {StepButton} from './StepButton';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useNumberField} from '@react-aria/numberfield';\nimport {useNumberFieldState} from '@react-stately/numberfield';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\nfunction NumberField(props: SpectrumNumberFieldProps, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let provider = useProvider();\n let {\n isQuiet,\n isReadOnly,\n isDisabled,\n hideStepper\n } = props;\n\n let {styleProps: style} = useStyleProps(props);\n\n let {locale} = useLocale();\n let state = useNumberFieldState({...props, locale});\n let inputRef = useRef<HTMLInputElement>();\n let domRef = useFocusableRef<HTMLElement>(ref, inputRef);\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps\n } = useNumberField(props, state, inputRef);\n let isMobile = provider.scale === 'large';\n let showStepper = !hideStepper;\n\n let {isHovered, hoverProps} = useHover({isDisabled});\n\n let className =\n classNames(\n stepperStyle,\n 'spectrum-Stepper',\n {\n 'spectrum-Stepper--isQuiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-Stepper--readonly': isReadOnly,\n 'is-invalid': props.validationState === 'invalid',\n 'spectrum-Stepper--showStepper': showStepper,\n 'spectrum-Stepper--isMobile': isMobile,\n 'is-hovered': isHovered,\n // because FocusRing won't pass along the className from Field, we have to handle that ourselves\n [style.className]: !props.label && style.className\n }\n );\n\n return (\n <Field\n {...props as Omit<SpectrumNumberFieldProps, 'onChange'>}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n labelProps={labelProps}\n ref={domRef}\n wrapperClassName={classNames(\n stepperStyle,\n 'spectrum-Stepper-container',\n {\n 'spectrum-Stepper-container--isMobile': isMobile\n }\n )}>\n <NumberFieldInput\n {...props}\n groupProps={mergeProps(groupProps, hoverProps)}\n inputProps={inputProps}\n inputRef={inputRef}\n incrementProps={incrementButtonProps}\n decrementProps={decrementButtonProps}\n className={className}\n style={style} />\n </Field>\n );\n}\n\n\ninterface NumberFieldInputProps extends SpectrumNumberFieldProps {\n groupProps: HTMLAttributes<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n incrementProps: AriaButtonProps,\n decrementProps: AriaButtonProps,\n className?: string,\n style?: React.CSSProperties\n}\n\nconst NumberFieldInput = React.forwardRef(function NumberFieldInput(props: NumberFieldInputProps, ref: RefObject<HTMLElement>) {\n let {\n groupProps,\n inputProps,\n inputRef,\n incrementProps,\n decrementProps,\n className,\n style,\n autoFocus,\n isQuiet,\n hideStepper,\n validationState\n } = props;\n let showStepper = !hideStepper;\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(stepperStyle, 'is-focused')}\n focusRingClass={classNames(stepperStyle, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...groupProps}\n ref={ref as RefObject<HTMLDivElement>}\n style={style}\n className={className}>\n <TextFieldBase\n UNSAFE_className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-field'\n )\n }\n inputClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-input'\n )\n }\n validationIconClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-icon'\n )\n }\n isQuiet={isQuiet}\n inputRef={inputRef}\n validationState={validationState}\n inputProps={inputProps} />\n {showStepper &&\n <>\n <StepButton direction=\"up\" isQuiet={isQuiet} {...incrementProps} />\n <StepButton direction=\"down\" isQuiet={isQuiet} {...decrementProps} />\n </>\n }\n </div>\n </FocusRing>\n );\n});\n\n/**\n * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nlet _NumberField = React.forwardRef(NumberField);\nexport {_NumberField as NumberField};\n"],"names":["$parcel$interopDefault","a","__esModule","default","StepButton","props","ref","useProviderProps","scale","useProvider","direction","isDisabled","isQuiet","buttonProps","isPressed","useButton","elementType","hoverProps","isHovered","useHover","classNames","mergeProps","_StepButton","React","forwardRef","NumberField","provider","isReadOnly","hideStepper","styleProps","style","useStyleProps","locale","useLocale","state","useNumberFieldState","inputRef","useRef","domRef","useFocusableRef","groupProps","labelProps","inputProps","incrementButtonProps","decrementButtonProps","descriptionProps","errorMessageProps","useNumberField","isMobile","showStepper","className","validationState","label","NumberFieldInput","incrementProps","decrement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G,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,sCAAK,CAAC,UAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/numberfield/src/index.ts","packages/@react-spectrum/numberfield/src/NumberField.tsx","packages/@react-spectrum/numberfield/src/StepButton.tsx","packages/@adobe/spectrum-css-temp/components/stepper/vars.css"],"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/// <reference types=\"intl-types-extension\" />\n\nexport * from './NumberField';\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 {AriaButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {HTMLAttributes, InputHTMLAttributes, RefObject, useRef} from 'react';\nimport {SpectrumNumberFieldProps} from '@react-types/numberfield';\nimport {StepButton} from './StepButton';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useNumberField} from '@react-aria/numberfield';\nimport {useNumberFieldState} from '@react-stately/numberfield';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\nfunction NumberField(props: SpectrumNumberFieldProps, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let provider = useProvider();\n let {\n isQuiet,\n isReadOnly,\n isDisabled,\n hideStepper\n } = props;\n\n let {styleProps: style} = useStyleProps(props);\n\n let {locale} = useLocale();\n let state = useNumberFieldState({...props, locale});\n let inputRef = useRef<HTMLInputElement>();\n let domRef = useFocusableRef<HTMLElement>(ref, inputRef);\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps\n } = useNumberField(props, state, inputRef);\n let isMobile = provider.scale === 'large';\n let showStepper = !hideStepper;\n\n let {isHovered, hoverProps} = useHover({isDisabled});\n\n let className =\n classNames(\n stepperStyle,\n 'spectrum-Stepper',\n {\n 'spectrum-Stepper--isQuiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-Stepper--readonly': isReadOnly,\n 'is-invalid': props.validationState === 'invalid',\n 'spectrum-Stepper--showStepper': showStepper,\n 'spectrum-Stepper--isMobile': isMobile,\n 'is-hovered': isHovered,\n // because FocusRing won't pass along the className from Field, we have to handle that ourselves\n [style.className]: !props.label && style.className\n }\n );\n\n return (\n <Field\n {...props as Omit<SpectrumNumberFieldProps, 'onChange'>}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n labelProps={labelProps}\n ref={domRef}\n wrapperClassName={classNames(\n stepperStyle,\n 'spectrum-Stepper-container',\n {\n 'spectrum-Stepper-container--isMobile': isMobile\n }\n )}>\n <NumberFieldInput\n {...props}\n groupProps={mergeProps(groupProps, hoverProps)}\n inputProps={inputProps}\n inputRef={inputRef}\n incrementProps={incrementButtonProps}\n decrementProps={decrementButtonProps}\n className={className}\n style={style} />\n </Field>\n );\n}\n\n\ninterface NumberFieldInputProps extends SpectrumNumberFieldProps {\n groupProps: HTMLAttributes<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n incrementProps: AriaButtonProps,\n decrementProps: AriaButtonProps,\n className?: string,\n style?: React.CSSProperties\n}\n\nconst NumberFieldInput = React.forwardRef(function NumberFieldInput(props: NumberFieldInputProps, ref: RefObject<HTMLElement>) {\n let {\n groupProps,\n inputProps,\n inputRef,\n incrementProps,\n decrementProps,\n className,\n style,\n autoFocus,\n isQuiet,\n hideStepper,\n validationState\n } = props;\n let showStepper = !hideStepper;\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(stepperStyle, 'is-focused')}\n focusRingClass={classNames(stepperStyle, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...groupProps}\n ref={ref as RefObject<HTMLDivElement>}\n style={style}\n className={className}>\n <TextFieldBase\n UNSAFE_className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-field'\n )\n }\n inputClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-input'\n )\n }\n validationIconClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-icon'\n )\n }\n isQuiet={isQuiet}\n inputRef={inputRef}\n validationState={validationState}\n inputProps={inputProps} />\n {showStepper &&\n <>\n <StepButton direction=\"up\" isQuiet={isQuiet} {...incrementProps} />\n <StepButton direction=\"down\" isQuiet={isQuiet} {...decrementProps} />\n </>\n }\n </div>\n </FocusRing>\n );\n});\n\n/**\n * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nlet _NumberField = React.forwardRef(NumberField);\nexport {_NumberField as NumberField};\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 Add from '@spectrum-icons/workflow/Add';\nimport {AriaButtonProps} from '@react-types/button';\nimport ChevronDownSmall from '@spectrum-icons/ui/ChevronDownSmall';\nimport ChevronUpSmall from '@spectrum-icons/ui/ChevronUpSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport Remove from '@spectrum-icons/workflow/Remove';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\ninterface StepButtonProps extends AriaButtonProps {\n isQuiet: boolean,\n direction: 'up' | 'down'\n}\n\nfunction StepButton(props: StepButtonProps, ref: RefObject<HTMLDivElement>) {\n props = useProviderProps(props);\n let {scale} = useProvider();\n let {direction, isDisabled, isQuiet} = props;\n /**\n * Must use div for now because Safari pointer event bugs on disabled form elements.\n * Link https://bugs.webkit.org/show_bug.cgi?id=219188.\n */\n let {buttonProps, isPressed} = useButton({...props, elementType: 'div'}, ref);\n let {hoverProps, isHovered} = useHover(props);\n return (\n <FocusRing focusRingClass={classNames(stepperStyle, 'focus-ring')}>\n <div\n className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-button',\n {\n 'spectrum-Stepper-button--stepUp': direction === 'up',\n 'spectrum-Stepper-button--stepDown': direction === 'down',\n 'spectrum-Stepper-button--isQuiet': isQuiet,\n 'is-hovered': isHovered,\n 'is-active': isPressed,\n 'is-disabled': isDisabled\n }\n )\n }\n {...mergeProps(hoverProps, buttonProps)}\n ref={ref}>\n {direction === 'up' && scale === 'large' &&\n <Add UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} size=\"S\" />\n }\n {direction === 'up' && scale === 'medium' &&\n <ChevronUpSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} />\n }\n {direction === 'down' && scale === 'large' &&\n <Remove UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} size=\"S\" />\n }\n {direction === 'down' && scale === 'medium' &&\n <ChevronDownSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} />\n }\n </div>\n </FocusRing>\n );\n}\n\n/**\n * Buttons for NumberField.\n */\nlet _StepButton = React.forwardRef(StepButton);\nexport {_StepButton as StepButton};\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"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,236 +1,291 @@
1
- import { useNumberFieldState } from "@react-stately/numberfield";
2
- import { useNumberField } from "@react-aria/numberfield";
3
- import { useLocale } from "@react-aria/i18n";
4
- import { TextFieldBase } from "@react-spectrum/textfield";
5
- import { useProvider, useProviderProps } from "@react-spectrum/provider";
6
- import { useHover } from "@react-aria/interactions";
7
- import { useButton } from "@react-aria/button";
8
- import _spectrumIconsWorkflowRemove from "@spectrum-icons/workflow/Remove";
9
- import _spectrumIconsUiChevronUpSmall from "@spectrum-icons/ui/ChevronUpSmall";
10
- import _spectrumIconsUiChevronDownSmall from "@spectrum-icons/ui/ChevronDownSmall";
11
- import _spectrumIconsWorkflowAdd from "@spectrum-icons/workflow/Add";
12
- import _react, { useRef } from "react";
13
- import { mergeProps } from "@react-aria/utils";
14
- import { FocusRing } from "@react-aria/focus";
15
- import { Field } from "@react-spectrum/label";
16
- import { classNames, useFocusableRef, useStyleProps } from "@react-spectrum/utils";
17
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
18
1
  import "./main.css";
2
+ import {useStyleProps as $kyoOw$useStyleProps, useFocusableRef as $kyoOw$useFocusableRef, classNames as $kyoOw$classNames} from "@react-spectrum/utils";
3
+ import {Field as $kyoOw$Field} from "@react-spectrum/label";
4
+ import {FocusRing as $kyoOw$FocusRing} from "@react-aria/focus";
5
+ import {mergeProps as $kyoOw$mergeProps} from "@react-aria/utils";
6
+ import $kyoOw$react, {useRef as $kyoOw$useRef} from "react";
7
+ import {TextFieldBase as $kyoOw$TextFieldBase} from "@react-spectrum/textfield";
8
+ import {useHover as $kyoOw$useHover} from "@react-aria/interactions";
9
+ import {useLocale as $kyoOw$useLocale} from "@react-aria/i18n";
10
+ import {useNumberField as $kyoOw$useNumberField} from "@react-aria/numberfield";
11
+ import {useNumberFieldState as $kyoOw$useNumberFieldState} from "@react-stately/numberfield";
12
+ import {useProviderProps as $kyoOw$useProviderProps, useProvider as $kyoOw$useProvider} from "@react-spectrum/provider";
13
+ import $kyoOw$spectrumiconsworkflowAdd from "@spectrum-icons/workflow/Add";
14
+ import $kyoOw$spectrumiconsuiChevronDownSmall from "@spectrum-icons/ui/ChevronDownSmall";
15
+ import $kyoOw$spectrumiconsuiChevronUpSmall from "@spectrum-icons/ui/ChevronUpSmall";
16
+ import $kyoOw$spectrumiconsworkflowRemove from "@spectrum-icons/workflow/Remove";
17
+ import {useButton as $kyoOw$useButton} from "@react-aria/button";
19
18
 
20
19
  function $parcel$interopDefault(a) {
21
20
  return a && a.__esModule ? a.default : a;
22
21
  }
22
+ function $parcel$export(e, n, v, s) {
23
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
24
+ }
25
+ var $0e945f48ce411d88$exports = {};
26
+
27
+ $parcel$export($0e945f48ce411d88$exports, "NumberField", () => $0e945f48ce411d88$export$63c5fa0b2fdccd2e);
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ var $d2f65e6b9eacd894$exports = {};
42
+
43
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Button", () => $d2f65e6b9eacd894$export$1db4cca5b4ade39a, (v) => $d2f65e6b9eacd894$export$1db4cca5b4ade39a = v);
44
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton", () => $d2f65e6b9eacd894$export$53da69f51b770d3, (v) => $d2f65e6b9eacd894$export$53da69f51b770d3 = v);
45
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-LogicButton", () => $d2f65e6b9eacd894$export$36ae67a131730482, (v) => $d2f65e6b9eacd894$export$36ae67a131730482 = v);
46
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-FieldButton", () => $d2f65e6b9eacd894$export$a024c99ecf6b5741, (v) => $d2f65e6b9eacd894$export$a024c99ecf6b5741 = v);
47
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ClearButton", () => $d2f65e6b9eacd894$export$b752ce409e5660c, (v) => $d2f65e6b9eacd894$export$b752ce409e5660c = v);
48
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-button", () => $d2f65e6b9eacd894$export$4e11596482f95f63, (v) => $d2f65e6b9eacd894$export$4e11596482f95f63 = v);
49
+ $parcel$export($d2f65e6b9eacd894$exports, "focus-ring", () => $d2f65e6b9eacd894$export$f39a09f249340e2a, (v) => $d2f65e6b9eacd894$export$f39a09f249340e2a = v);
50
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Icon", () => $d2f65e6b9eacd894$export$d374b04f30360026, (v) => $d2f65e6b9eacd894$export$d374b04f30360026 = v);
51
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton--emphasized", () => $d2f65e6b9eacd894$export$5aabb61a966e266f, (v) => $d2f65e6b9eacd894$export$5aabb61a966e266f = v);
52
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton--staticColor", () => $d2f65e6b9eacd894$export$29b7b5d6a5a497c5, (v) => $d2f65e6b9eacd894$export$29b7b5d6a5a497c5 = v);
53
+ $parcel$export($d2f65e6b9eacd894$exports, "is-hovered", () => $d2f65e6b9eacd894$export$b8813cd5d7824ce7, (v) => $d2f65e6b9eacd894$export$b8813cd5d7824ce7 = v);
54
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Button-label", () => $d2f65e6b9eacd894$export$c081ba562e204942, (v) => $d2f65e6b9eacd894$export$c081ba562e204942 = v);
55
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton-label", () => $d2f65e6b9eacd894$export$ebb4635c66bacdb9, (v) => $d2f65e6b9eacd894$export$ebb4635c66bacdb9 = v);
56
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton-hold", () => $d2f65e6b9eacd894$export$4a4f01c443eff992, (v) => $d2f65e6b9eacd894$export$4a4f01c443eff992 = v);
57
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ActionButton--quiet", () => $d2f65e6b9eacd894$export$40e1f009544bacf3, (v) => $d2f65e6b9eacd894$export$40e1f009544bacf3 = v);
58
+ $parcel$export($d2f65e6b9eacd894$exports, "is-disabled", () => $d2f65e6b9eacd894$export$d35bc1e505d1ebbf, (v) => $d2f65e6b9eacd894$export$d35bc1e505d1ebbf = v);
59
+ $parcel$export($d2f65e6b9eacd894$exports, "is-open", () => $d2f65e6b9eacd894$export$a9781837241c946d, (v) => $d2f65e6b9eacd894$export$a9781837241c946d = v);
60
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-FieldButton--quiet", () => $d2f65e6b9eacd894$export$5ca7b274e4fff9fc, (v) => $d2f65e6b9eacd894$export$5ca7b274e4fff9fc = v);
61
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ClearButton--overBackground", () => $d2f65e6b9eacd894$export$116f2fccf941d34d, (v) => $d2f65e6b9eacd894$export$116f2fccf941d34d = v);
62
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-ClearButton--small", () => $d2f65e6b9eacd894$export$49280ffa5236ba8b, (v) => $d2f65e6b9eacd894$export$49280ffa5236ba8b = v);
63
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper", () => $d2f65e6b9eacd894$export$f49c123746e1fb8, (v) => $d2f65e6b9eacd894$export$f49c123746e1fb8 = v);
64
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper--isMobile", () => $d2f65e6b9eacd894$export$75e6f9c4d1d95421, (v) => $d2f65e6b9eacd894$export$75e6f9c4d1d95421 = v);
65
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-button--stepUp", () => $d2f65e6b9eacd894$export$6c76d609d604c6e5, (v) => $d2f65e6b9eacd894$export$6c76d609d604c6e5 = v);
66
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-button--stepDown", () => $d2f65e6b9eacd894$export$e4ad52f6ba4e317b, (v) => $d2f65e6b9eacd894$export$e4ad52f6ba4e317b = v);
67
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-field", () => $d2f65e6b9eacd894$export$faac6573b15f75d6, (v) => $d2f65e6b9eacd894$export$faac6573b15f75d6 = v);
68
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-icon", () => $d2f65e6b9eacd894$export$639c56ba6082b615, (v) => $d2f65e6b9eacd894$export$639c56ba6082b615 = v);
69
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper--isQuiet", () => $d2f65e6b9eacd894$export$70ed0eb2ba7512f8, (v) => $d2f65e6b9eacd894$export$70ed0eb2ba7512f8 = v);
70
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper--showStepper", () => $d2f65e6b9eacd894$export$a4e366275982a12f, (v) => $d2f65e6b9eacd894$export$a4e366275982a12f = v);
71
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-input", () => $d2f65e6b9eacd894$export$8273fb931edd57d4, (v) => $d2f65e6b9eacd894$export$8273fb931edd57d4 = v);
72
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-container", () => $d2f65e6b9eacd894$export$f49a6eb8460c3f93, (v) => $d2f65e6b9eacd894$export$f49a6eb8460c3f93 = v);
73
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-container--isMobile", () => $d2f65e6b9eacd894$export$3486d98f7bb904b1, (v) => $d2f65e6b9eacd894$export$3486d98f7bb904b1 = v);
74
+ $parcel$export($d2f65e6b9eacd894$exports, "spectrum-Stepper-button-icon", () => $d2f65e6b9eacd894$export$7d7cb0c4055e98ab, (v) => $d2f65e6b9eacd894$export$7d7cb0c4055e98ab = v);
75
+ $parcel$export($d2f65e6b9eacd894$exports, "is-active", () => $d2f65e6b9eacd894$export$20fd0f7cd4e6112f, (v) => $d2f65e6b9eacd894$export$20fd0f7cd4e6112f = v);
76
+ $parcel$export($d2f65e6b9eacd894$exports, "is-focused", () => $d2f65e6b9eacd894$export$e7dc768d35940237, (v) => $d2f65e6b9eacd894$export$e7dc768d35940237 = v);
77
+ $parcel$export($d2f65e6b9eacd894$exports, "is-invalid", () => $d2f65e6b9eacd894$export$14a30de2866685fa, (v) => $d2f65e6b9eacd894$export$14a30de2866685fa = v);
78
+ var $d2f65e6b9eacd894$export$1db4cca5b4ade39a;
79
+ var $d2f65e6b9eacd894$export$53da69f51b770d3;
80
+ var $d2f65e6b9eacd894$export$36ae67a131730482;
81
+ var $d2f65e6b9eacd894$export$a024c99ecf6b5741;
82
+ var $d2f65e6b9eacd894$export$b752ce409e5660c;
83
+ var $d2f65e6b9eacd894$export$4e11596482f95f63;
84
+ var $d2f65e6b9eacd894$export$f39a09f249340e2a;
85
+ var $d2f65e6b9eacd894$export$d374b04f30360026;
86
+ var $d2f65e6b9eacd894$export$5aabb61a966e266f;
87
+ var $d2f65e6b9eacd894$export$29b7b5d6a5a497c5;
88
+ var $d2f65e6b9eacd894$export$b8813cd5d7824ce7;
89
+ var $d2f65e6b9eacd894$export$c081ba562e204942;
90
+ var $d2f65e6b9eacd894$export$ebb4635c66bacdb9;
91
+ var $d2f65e6b9eacd894$export$4a4f01c443eff992;
92
+ var $d2f65e6b9eacd894$export$40e1f009544bacf3;
93
+ var $d2f65e6b9eacd894$export$d35bc1e505d1ebbf;
94
+ var $d2f65e6b9eacd894$export$a9781837241c946d;
95
+ var $d2f65e6b9eacd894$export$5ca7b274e4fff9fc;
96
+ var $d2f65e6b9eacd894$export$116f2fccf941d34d;
97
+ var $d2f65e6b9eacd894$export$49280ffa5236ba8b;
98
+ var $d2f65e6b9eacd894$export$f49c123746e1fb8;
99
+ var $d2f65e6b9eacd894$export$75e6f9c4d1d95421;
100
+ var $d2f65e6b9eacd894$export$6c76d609d604c6e5;
101
+ var $d2f65e6b9eacd894$export$e4ad52f6ba4e317b;
102
+ var $d2f65e6b9eacd894$export$faac6573b15f75d6;
103
+ var $d2f65e6b9eacd894$export$639c56ba6082b615;
104
+ var $d2f65e6b9eacd894$export$70ed0eb2ba7512f8;
105
+ var $d2f65e6b9eacd894$export$a4e366275982a12f;
106
+ var $d2f65e6b9eacd894$export$8273fb931edd57d4;
107
+ var $d2f65e6b9eacd894$export$f49a6eb8460c3f93;
108
+ var $d2f65e6b9eacd894$export$3486d98f7bb904b1;
109
+ var $d2f65e6b9eacd894$export$7d7cb0c4055e98ab;
110
+ var $d2f65e6b9eacd894$export$20fd0f7cd4e6112f;
111
+ var $d2f65e6b9eacd894$export$e7dc768d35940237;
112
+ var $d2f65e6b9eacd894$export$14a30de2866685fa;
113
+ $d2f65e6b9eacd894$export$1db4cca5b4ade39a = "_spectrum-Button_8890ad";
114
+ $d2f65e6b9eacd894$export$53da69f51b770d3 = "_spectrum-ActionButton_8890ad";
115
+ $d2f65e6b9eacd894$export$36ae67a131730482 = "_spectrum-LogicButton_8890ad";
116
+ $d2f65e6b9eacd894$export$a024c99ecf6b5741 = "_spectrum-FieldButton_8890ad";
117
+ $d2f65e6b9eacd894$export$b752ce409e5660c = "_spectrum-ClearButton_8890ad";
118
+ $d2f65e6b9eacd894$export$4e11596482f95f63 = "_spectrum-Stepper-button_8890ad";
119
+ $d2f65e6b9eacd894$export$f39a09f249340e2a = "_focus-ring_8890ad";
120
+ $d2f65e6b9eacd894$export$d374b04f30360026 = "_spectrum-Icon_8890ad";
121
+ $d2f65e6b9eacd894$export$5aabb61a966e266f = "_spectrum-ActionButton--emphasized_8890ad";
122
+ $d2f65e6b9eacd894$export$29b7b5d6a5a497c5 = "_spectrum-ActionButton--staticColor_8890ad";
123
+ $d2f65e6b9eacd894$export$b8813cd5d7824ce7 = "_is-hovered_8890ad";
124
+ $d2f65e6b9eacd894$export$c081ba562e204942 = "_spectrum-Button-label_8890ad";
125
+ $d2f65e6b9eacd894$export$ebb4635c66bacdb9 = "_spectrum-ActionButton-label_8890ad";
126
+ $d2f65e6b9eacd894$export$4a4f01c443eff992 = "_spectrum-ActionButton-hold_8890ad";
127
+ $d2f65e6b9eacd894$export$40e1f009544bacf3 = "_spectrum-ActionButton--quiet_8890ad";
128
+ $d2f65e6b9eacd894$export$d35bc1e505d1ebbf = "_is-disabled_8890ad";
129
+ $d2f65e6b9eacd894$export$a9781837241c946d = "_is-open_8890ad";
130
+ $d2f65e6b9eacd894$export$5ca7b274e4fff9fc = "_spectrum-FieldButton--quiet_8890ad";
131
+ $d2f65e6b9eacd894$export$116f2fccf941d34d = "_spectrum-ClearButton--overBackground_8890ad";
132
+ $d2f65e6b9eacd894$export$49280ffa5236ba8b = "_spectrum-ClearButton--small_8890ad";
133
+ $d2f65e6b9eacd894$export$f49c123746e1fb8 = "_spectrum-Stepper_8890ad";
134
+ $d2f65e6b9eacd894$export$75e6f9c4d1d95421 = "_spectrum-Stepper--isMobile_8890ad";
135
+ $d2f65e6b9eacd894$export$6c76d609d604c6e5 = "_spectrum-Stepper-button--stepUp_8890ad";
136
+ $d2f65e6b9eacd894$export$e4ad52f6ba4e317b = "_spectrum-Stepper-button--stepDown_8890ad";
137
+ $d2f65e6b9eacd894$export$faac6573b15f75d6 = "_spectrum-Stepper-field_8890ad";
138
+ $d2f65e6b9eacd894$export$639c56ba6082b615 = "_spectrum-Stepper-icon_8890ad";
139
+ $d2f65e6b9eacd894$export$70ed0eb2ba7512f8 = "_spectrum-Stepper--isQuiet_8890ad";
140
+ $d2f65e6b9eacd894$export$a4e366275982a12f = "_spectrum-Stepper--showStepper_8890ad";
141
+ $d2f65e6b9eacd894$export$8273fb931edd57d4 = "_spectrum-Stepper-input_8890ad";
142
+ $d2f65e6b9eacd894$export$f49a6eb8460c3f93 = "_spectrum-Stepper-container_8890ad";
143
+ $d2f65e6b9eacd894$export$3486d98f7bb904b1 = "_spectrum-Stepper-container--isMobile_8890ad";
144
+ $d2f65e6b9eacd894$export$7d7cb0c4055e98ab = "_spectrum-Stepper-button-icon_8890ad";
145
+ $d2f65e6b9eacd894$export$20fd0f7cd4e6112f = "_is-active_8890ad";
146
+ $d2f65e6b9eacd894$export$e7dc768d35940237 = "_is-focused_8890ad";
147
+ $d2f65e6b9eacd894$export$14a30de2866685fa = "_is-invalid_8890ad";
23
148
 
24
- // ASSET: /home/circleci/react-spectrum/node_modules/@adobe/spectrum-css-temp/components/stepper/vars.css
25
- var $f59dc5c86d09fd6e5e0bfdeb14adb76$exports = {};
26
- $f59dc5c86d09fd6e5e0bfdeb14adb76$exports = {
27
- "spectrum-Button": "_spectrum-Button_8b355",
28
- "spectrum-ActionButton": "_spectrum-ActionButton_8b355",
29
- "spectrum-LogicButton": "_spectrum-LogicButton_8b355",
30
- "spectrum-FieldButton": "_spectrum-FieldButton_8b355",
31
- "spectrum-ClearButton": "_spectrum-ClearButton_8b355",
32
- "spectrum-Stepper-button": "_spectrum-Stepper-button_8b355",
33
- "focus-ring": "_focus-ring_8b355",
34
- "spectrum-Icon": "_spectrum-Icon_8b355",
35
- "spectrum-ActionButton--emphasized": "_spectrum-ActionButton--emphasized_8b355",
36
- "spectrum-ActionButton--staticColor": "_spectrum-ActionButton--staticColor_8b355",
37
- "is-hovered": "_is-hovered_8b355",
38
- "spectrum-Button-label": "_spectrum-Button-label_8b355",
39
- "spectrum-ActionButton-label": "_spectrum-ActionButton-label_8b355",
40
- "spectrum-ActionButton-hold": "_spectrum-ActionButton-hold_8b355",
41
- "spectrum-ActionButton--quiet": "_spectrum-ActionButton--quiet_8b355",
42
- "is-disabled": "_is-disabled_8b355",
43
- "is-open": "_is-open_8b355",
44
- "spectrum-FieldButton--quiet": "_spectrum-FieldButton--quiet_8b355",
45
- "spectrum-ClearButton--overBackground": "_spectrum-ClearButton--overBackground_8b355",
46
- "spectrum-ClearButton--small": "_spectrum-ClearButton--small_8b355",
47
- "spectrum-Stepper": "_spectrum-Stepper_8b355",
48
- "spectrum-Stepper--isMobile": "_spectrum-Stepper--isMobile_8b355",
49
- "spectrum-Stepper-button--stepUp": "_spectrum-Stepper-button--stepUp_8b355",
50
- "spectrum-Stepper-button--stepDown": "_spectrum-Stepper-button--stepDown_8b355",
51
- "spectrum-Stepper-field": "_spectrum-Stepper-field_8b355",
52
- "spectrum-Stepper-icon": "_spectrum-Stepper-icon_8b355",
53
- "spectrum-Stepper--isQuiet": "_spectrum-Stepper--isQuiet_8b355",
54
- "spectrum-Stepper--showStepper": "_spectrum-Stepper--showStepper_8b355",
55
- "spectrum-Stepper-input": "_spectrum-Stepper-input_8b355",
56
- "spectrum-Stepper-container": "_spectrum-Stepper-container_8b355",
57
- "spectrum-Stepper-container--isMobile": "_spectrum-Stepper-container--isMobile_8b355",
58
- "spectrum-Stepper-button-icon": "_spectrum-Stepper-button-icon_8b355",
59
- "is-active": "_is-active_8b355",
60
- "is-focused": "_is-focused_8b355",
61
- "is-invalid": "_is-invalid_8b355"
62
- };
63
- var $f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default = $parcel$interopDefault($f59dc5c86d09fd6e5e0bfdeb14adb76$exports);
64
-
65
- function $e8890c86611923a54f7b8663bc47c34$var$StepButton(props, ref) {
66
- props = useProviderProps(props);
67
- let {
68
- scale
69
- } = useProvider();
70
- let {
71
- direction,
72
- isDisabled,
73
- isQuiet
74
- } = props;
75
- /**
149
+
150
+
151
+
152
+
153
+ function $984816e77920a288$var$StepButton(props, ref) {
154
+ props = $kyoOw$useProviderProps(props);
155
+ let { scale: scale } = $kyoOw$useProvider();
156
+ let { direction: direction , isDisabled: isDisabled , isQuiet: isQuiet } = props;
157
+ /**
76
158
  * Must use div for now because Safari pointer event bugs on disabled form elements.
77
159
  * Link https://bugs.webkit.org/show_bug.cgi?id=219188.
78
- */
79
-
80
- let {
81
- buttonProps,
82
- isPressed
83
- } = useButton(_babelRuntimeHelpersEsmExtends({}, props, {
84
- elementType: 'div'
85
- }), ref);
86
- let {
87
- hoverProps,
88
- isHovered
89
- } = useHover(props);
90
- return /*#__PURE__*/_react.createElement(FocusRing, {
91
- focusRingClass: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'focus-ring')
92
- }, /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({
93
- className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-button', {
94
- 'spectrum-Stepper-button--stepUp': direction === 'up',
95
- 'spectrum-Stepper-button--stepDown': direction === 'down',
96
- 'spectrum-Stepper-button--isQuiet': isQuiet,
97
- 'is-hovered': isHovered,
98
- 'is-active': isPressed,
99
- 'is-disabled': isDisabled
100
- })
101
- }, mergeProps(hoverProps, buttonProps), {
102
- ref: ref
103
- }), direction === 'up' && scale === 'large' && /*#__PURE__*/_react.createElement(_spectrumIconsWorkflowAdd, {
104
- UNSAFE_className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon'),
105
- size: "S"
106
- }), direction === 'up' && scale === 'medium' && /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronUpSmall, {
107
- UNSAFE_className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')
108
- }), direction === 'down' && scale === 'large' && /*#__PURE__*/_react.createElement(_spectrumIconsWorkflowRemove, {
109
- UNSAFE_className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon'),
110
- size: "S"
111
- }), direction === 'down' && scale === 'medium' && /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronDownSmall, {
112
- UNSAFE_className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')
113
- })));
160
+ */ let { buttonProps: buttonProps , isPressed: isPressed } = $kyoOw$useButton({
161
+ ...props,
162
+ elementType: 'div'
163
+ }, ref);
164
+ let { hoverProps: hoverProps , isHovered: isHovered } = $kyoOw$useHover(props);
165
+ return(/*#__PURE__*/ $kyoOw$react.createElement($kyoOw$FocusRing, {
166
+ focusRingClass: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'focus-ring')
167
+ }, /*#__PURE__*/ $kyoOw$react.createElement("div", {
168
+ className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-button', {
169
+ 'spectrum-Stepper-button--stepUp': direction === 'up',
170
+ 'spectrum-Stepper-button--stepDown': direction === 'down',
171
+ 'spectrum-Stepper-button--isQuiet': isQuiet,
172
+ 'is-hovered': isHovered,
173
+ 'is-active': isPressed,
174
+ 'is-disabled': isDisabled
175
+ }),
176
+ ...$kyoOw$mergeProps(hoverProps, buttonProps),
177
+ ref: ref
178
+ }, direction === 'up' && scale === 'large' && /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$spectrumiconsworkflowAdd, {
179
+ UNSAFE_className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon'),
180
+ size: "S"
181
+ }), direction === 'up' && scale === 'medium' && /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$spectrumiconsuiChevronUpSmall, {
182
+ UNSAFE_className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')
183
+ }), direction === 'down' && scale === 'large' && /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$spectrumiconsworkflowRemove, {
184
+ UNSAFE_className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon'),
185
+ size: "S"
186
+ }), direction === 'down' && scale === 'medium' && /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$spectrumiconsuiChevronDownSmall, {
187
+ UNSAFE_className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')
188
+ }))));
114
189
  }
115
190
  /**
116
191
  * Buttons for NumberField.
117
- */
118
-
119
-
120
- let $e8890c86611923a54f7b8663bc47c34$export$StepButton = /*#__PURE__*/_react.forwardRef($e8890c86611923a54f7b8663bc47c34$var$StepButton);
121
-
122
- function $ee8e20060759cc50b79d382e771e4d9e$var$NumberField(props, ref) {
123
- props = useProviderProps(props);
124
- let provider = useProvider();
125
- let {
126
- isQuiet,
127
- isReadOnly,
128
- isDisabled,
129
- hideStepper
130
- } = props;
131
- let {
132
- styleProps: style
133
- } = useStyleProps(props);
134
- let {
135
- locale
136
- } = useLocale();
137
- let state = useNumberFieldState(_babelRuntimeHelpersEsmExtends({}, props, {
138
- locale
139
- }));
140
- let inputRef = useRef();
141
- let domRef = useFocusableRef(ref, inputRef);
142
- let {
143
- groupProps,
144
- labelProps,
145
- inputProps,
146
- incrementButtonProps,
147
- decrementButtonProps,
148
- descriptionProps,
149
- errorMessageProps
150
- } = useNumberField(props, state, inputRef);
151
- let isMobile = provider.scale === 'large';
152
- let showStepper = !hideStepper;
153
- let {
154
- isHovered,
155
- hoverProps
156
- } = useHover({
157
- isDisabled
158
- });
159
- let className = classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper', {
160
- 'spectrum-Stepper--isQuiet': isQuiet,
161
- 'is-disabled': isDisabled,
162
- 'spectrum-Stepper--readonly': isReadOnly,
163
- 'is-invalid': props.validationState === 'invalid',
164
- 'spectrum-Stepper--showStepper': showStepper,
165
- 'spectrum-Stepper--isMobile': isMobile,
166
- 'is-hovered': isHovered,
167
- // because FocusRing won't pass along the className from Field, we have to handle that ourselves
168
- [style.className]: !props.label && style.className
169
- });
170
- return /*#__PURE__*/_react.createElement(Field, _babelRuntimeHelpersEsmExtends({}, props, {
171
- descriptionProps: descriptionProps,
172
- errorMessageProps: errorMessageProps,
173
- labelProps: labelProps,
174
- ref: domRef,
175
- wrapperClassName: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-container', {
176
- 'spectrum-Stepper-container--isMobile': isMobile
177
- })
178
- }), /*#__PURE__*/_react.createElement($ee8e20060759cc50b79d382e771e4d9e$var$NumberFieldInput, _babelRuntimeHelpersEsmExtends({}, props, {
179
- groupProps: mergeProps(groupProps, hoverProps),
180
- inputProps: inputProps,
181
- inputRef: inputRef,
182
- incrementProps: incrementButtonProps,
183
- decrementProps: decrementButtonProps,
184
- className: className,
185
- style: style
186
- })));
187
- }
192
+ */ let $984816e77920a288$export$b2f6b60c1d32d6aa = /*#__PURE__*/ $kyoOw$react.forwardRef($984816e77920a288$var$StepButton);
193
+
194
+
195
+
188
196
 
189
- const $ee8e20060759cc50b79d382e771e4d9e$var$NumberFieldInput = /*#__PURE__*/_react.forwardRef(function NumberFieldInput(props, ref) {
190
- let {
191
- groupProps,
192
- inputProps,
193
- inputRef,
194
- incrementProps,
195
- decrementProps,
196
- className,
197
- style,
198
- autoFocus,
199
- isQuiet,
200
- hideStepper,
201
- validationState
202
- } = props;
203
- let showStepper = !hideStepper;
204
- return /*#__PURE__*/_react.createElement(FocusRing, {
205
- within: true,
206
- isTextInput: true,
207
- focusClass: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'is-focused'),
208
- focusRingClass: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'focus-ring'),
209
- autoFocus: autoFocus
210
- }, /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, groupProps, {
211
- ref: ref,
212
- style: style,
213
- className: className
214
- }), /*#__PURE__*/_react.createElement(TextFieldBase, {
215
- UNSAFE_className: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-field'),
216
- inputClassName: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-input'),
217
- validationIconClassName: classNames($f59dc5c86d09fd6e5e0bfdeb14adb76$$interop$default, 'spectrum-Stepper-icon'),
218
- isQuiet: isQuiet,
219
- inputRef: inputRef,
220
- validationState: validationState,
221
- inputProps: inputProps
222
- }), showStepper && /*#__PURE__*/_react.createElement(_react.Fragment, null, /*#__PURE__*/_react.createElement($e8890c86611923a54f7b8663bc47c34$export$StepButton, _babelRuntimeHelpersEsmExtends({
223
- direction: "up",
224
- isQuiet: isQuiet
225
- }, incrementProps)), /*#__PURE__*/_react.createElement($e8890c86611923a54f7b8663bc47c34$export$StepButton, _babelRuntimeHelpersEsmExtends({
226
- direction: "down",
227
- isQuiet: isQuiet
228
- }, decrementProps)))));
197
+
198
+
199
+
200
+
201
+
202
+ function $0e945f48ce411d88$var$NumberField(props, ref) {
203
+ props = $kyoOw$useProviderProps(props);
204
+ let provider = $kyoOw$useProvider();
205
+ let { isQuiet: isQuiet , isReadOnly: isReadOnly , isDisabled: isDisabled , hideStepper: hideStepper } = props;
206
+ let { styleProps: style } = $kyoOw$useStyleProps(props);
207
+ let { locale: locale } = $kyoOw$useLocale();
208
+ let state = $kyoOw$useNumberFieldState({
209
+ ...props,
210
+ locale: locale
211
+ });
212
+ let inputRef = $kyoOw$useRef();
213
+ let domRef = $kyoOw$useFocusableRef(ref, inputRef);
214
+ let { groupProps: groupProps , labelProps: labelProps , inputProps: inputProps , incrementButtonProps: incrementButtonProps , decrementButtonProps: decrementButtonProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $kyoOw$useNumberField(props, state, inputRef);
215
+ let isMobile = provider.scale === 'large';
216
+ let showStepper = !hideStepper;
217
+ let { isHovered: isHovered , hoverProps: hoverProps } = $kyoOw$useHover({
218
+ isDisabled: isDisabled
219
+ });
220
+ let className = $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper', {
221
+ 'spectrum-Stepper--isQuiet': isQuiet,
222
+ 'is-disabled': isDisabled,
223
+ 'spectrum-Stepper--readonly': isReadOnly,
224
+ 'is-invalid': props.validationState === 'invalid',
225
+ 'spectrum-Stepper--showStepper': showStepper,
226
+ 'spectrum-Stepper--isMobile': isMobile,
227
+ 'is-hovered': isHovered,
228
+ // because FocusRing won't pass along the className from Field, we have to handle that ourselves
229
+ [style.className]: !props.label && style.className
230
+ });
231
+ return(/*#__PURE__*/ $kyoOw$react.createElement($kyoOw$Field, {
232
+ ...props,
233
+ descriptionProps: descriptionProps,
234
+ errorMessageProps: errorMessageProps,
235
+ labelProps: labelProps,
236
+ ref: domRef,
237
+ wrapperClassName: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-container', {
238
+ 'spectrum-Stepper-container--isMobile': isMobile
239
+ })
240
+ }, /*#__PURE__*/ $kyoOw$react.createElement($0e945f48ce411d88$var$NumberFieldInput, {
241
+ ...props,
242
+ groupProps: $kyoOw$mergeProps(groupProps, hoverProps),
243
+ inputProps: inputProps,
244
+ inputRef: inputRef,
245
+ incrementProps: incrementButtonProps,
246
+ decrementProps: decrementButtonProps,
247
+ className: className,
248
+ style: style
249
+ })));
250
+ }
251
+ const $0e945f48ce411d88$var$NumberFieldInput = /*#__PURE__*/ $kyoOw$react.forwardRef(function NumberFieldInput(props, ref) {
252
+ let { groupProps: groupProps , inputProps: inputProps , inputRef: inputRef , incrementProps: incrementProps , decrementProps: decrementProps , className: className , style: style , autoFocus: autoFocus , isQuiet: isQuiet , hideStepper: hideStepper , validationState: validationState } = props;
253
+ let showStepper = !hideStepper;
254
+ return(/*#__PURE__*/ $kyoOw$react.createElement($kyoOw$FocusRing, {
255
+ within: true,
256
+ isTextInput: true,
257
+ focusClass: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'is-focused'),
258
+ focusRingClass: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'focus-ring'),
259
+ autoFocus: autoFocus
260
+ }, /*#__PURE__*/ $kyoOw$react.createElement("div", {
261
+ ...groupProps,
262
+ ref: ref,
263
+ style: style,
264
+ className: className
265
+ }, /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$TextFieldBase, {
266
+ UNSAFE_className: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-field'),
267
+ inputClassName: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-input'),
268
+ validationIconClassName: $kyoOw$classNames((/*@__PURE__*/$parcel$interopDefault($d2f65e6b9eacd894$exports)), 'spectrum-Stepper-icon'),
269
+ isQuiet: isQuiet,
270
+ inputRef: inputRef,
271
+ validationState: validationState,
272
+ inputProps: inputProps
273
+ }), showStepper && /*#__PURE__*/ $kyoOw$react.createElement($kyoOw$react.Fragment, null, /*#__PURE__*/ $kyoOw$react.createElement($984816e77920a288$export$b2f6b60c1d32d6aa, {
274
+ direction: "up",
275
+ isQuiet: isQuiet,
276
+ ...incrementProps
277
+ }), /*#__PURE__*/ $kyoOw$react.createElement($984816e77920a288$export$b2f6b60c1d32d6aa, {
278
+ direction: "down",
279
+ isQuiet: isQuiet,
280
+ ...decrementProps
281
+ })))));
229
282
  });
230
283
  /**
231
284
  * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.
232
- */
285
+ */ let $0e945f48ce411d88$export$63c5fa0b2fdccd2e = /*#__PURE__*/ $kyoOw$react.forwardRef($0e945f48ce411d88$var$NumberField);
286
+
287
+
233
288
 
234
289
 
235
- export let NumberField = /*#__PURE__*/_react.forwardRef($ee8e20060759cc50b79d382e771e4d9e$var$NumberField);
290
+ export {$0e945f48ce411d88$export$63c5fa0b2fdccd2e as NumberField};
236
291
  //# sourceMappingURL=module.js.map