@react-aria/numberfield 3.1.3 → 3.1.6

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.
@@ -1 +1 @@
1
- {"mappings":";;;;AAqCA;IACE,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,wEAAwE;IACxE,UAAU,EAAE,eAAe,WAAW,CAAC,CAAC;IACxC,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,gEAAgE;IAChE,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,kEAAkE;IAClE,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,gBAAgB,CAAC,GAAG,eAAe,CA2O3I","sources":["packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/index.ts"],"sourcesContent":[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\n/// <reference types=\"intl-types-extension\" />\n\nexport * from './useNumberField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;AAqCA;IACE,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,wEAAwE;IACxE,UAAU,EAAE,eAAe,WAAW,CAAC,CAAC;IACxC,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,mFAAmF;IACnF,oBAAoB,EAAE,eAAe,CAAC;IACtC,gEAAgE;IAChE,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,kEAAkE;IAClE,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,gBAAgB,CAAC,GAAG,eAAe,CA8O3I","sources":["packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/useNumberField.ts","packages/@react-aria/numberfield/src/packages/@react-aria/numberfield/src/index.ts","packages/@react-aria/numberfield/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './useNumberField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/numberfield",
3
- "version": "3.1.3",
3
+ "version": "3.1.6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,17 +18,17 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-aria/i18n": "^3.3.6",
22
- "@react-aria/interactions": "^3.8.1",
23
- "@react-aria/live-announcer": "^3.0.3",
24
- "@react-aria/spinbutton": "^3.0.3",
25
- "@react-aria/textfield": "^3.5.2",
26
- "@react-aria/utils": "^3.11.2",
27
- "@react-stately/numberfield": "^3.0.4",
28
- "@react-types/button": "^3.4.3",
29
- "@react-types/numberfield": "^3.1.2",
30
- "@react-types/shared": "^3.11.1",
31
- "@react-types/textfield": "^3.3.2"
21
+ "@react-aria/i18n": "^3.3.9",
22
+ "@react-aria/interactions": "^3.8.4",
23
+ "@react-aria/live-announcer": "^3.0.6",
24
+ "@react-aria/spinbutton": "^3.0.6",
25
+ "@react-aria/textfield": "^3.5.5",
26
+ "@react-aria/utils": "^3.12.0",
27
+ "@react-stately/numberfield": "^3.0.7",
28
+ "@react-types/button": "^3.4.5",
29
+ "@react-types/numberfield": "^3.2.0",
30
+ "@react-types/shared": "^3.12.0",
31
+ "@react-types/textfield": "^3.4.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^16.8.0 || ^17.0.0-rc.1",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
40
+ "gitHead": "6a503b715e0dbbf92038cd7f08b1bcdde4c78e82"
41
41
  }
package/src/index.ts CHANGED
@@ -10,6 +10,4 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- /// <reference types="intl-types-extension" />
14
-
15
13
  export * from './useNumberField';
@@ -76,7 +76,8 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
76
76
  onKeyDown,
77
77
  onKeyUp,
78
78
  description,
79
- errorMessage
79
+ errorMessage,
80
+ ...otherProps
80
81
  } = props;
81
82
 
82
83
  let {
@@ -175,6 +176,7 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
175
176
  let domProps = filterDOMProps(props);
176
177
 
177
178
  let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({
179
+ ...otherProps,
178
180
  ...domProps,
179
181
  label,
180
182
  autoFocus,
@@ -183,6 +185,7 @@ export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldSt
183
185
  isRequired,
184
186
  validationState,
185
187
  value: state.inputValue,
188
+ defaultValue: undefined, // defaultValue already used to populate state.inputValue, unneeded here
186
189
  autoComplete: 'off',
187
190
  'aria-label': props['aria-label'] || null,
188
191
  'aria-labelledby': props['aria-labelledby'] || null,