@react-stately/radio 3.8.0 → 3.8.2
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 +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +6 -6
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;AAwCD,IAAI,iCAAW,KAAK,MAAM,KAAK,WAAW;AAC1C,IAAI,0BAAI;AAMD,SAAS,0CAAmB,KAAsB;IACvD,mGAAmG;IACnG,IAAI,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAM,MAAM,QAAQ,CAAC,YAAY,EAAE,+BAAS,CAAC,EAAE,EAAE,wBAAE,CAAC,EAAE;QAAC,MAAM;KAAK;IACrF,IAAI,CAAC,eAAe,YAAY,GAAG,CAAA,GAAA,2CAAiB,EAAE,MAAM,OAAO,MAAM,cAAc,MAAM;IAC7F,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,qBAAO,EAAE;IAEvD,IAAI,mBAAmB,CAAC;QACtB,IAAI,CAAC,MAAM,cAAc,CAAC,MAAM,YAC9B,YAAY;IAEhB;IAEA,OAAO;cACL;uBACA;0BACA;0BACA;6BACA;QACA,YAAY,MAAM,cAAc;QAChC,YAAY,MAAM,cAAc;QAChC,YAAY,MAAM,cAAc;QAChC,iBAAiB,MAAM,mBAAmB;IAC5C;AACF;;CDtEC","sources":["packages/@react-stately/radio/src/index.ts","packages/@react-stately/radio/src/useRadioGroupState.ts"],"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\nexport {useRadioGroupState} from './useRadioGroupState';\n\nexport type {RadioGroupProps} from '@react-types/radio';\nexport type {RadioGroupState} from './useRadioGroupState';\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 {RadioGroupProps} from '@react-types/radio';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface RadioGroupState {\n /**\n * The name for the group, used for native form submission.\n * @deprecated\n * @private\n */\n readonly name: string,\n\n /** Whether the radio group is disabled. */\n readonly isDisabled: boolean,\n\n /** Whether the radio group is read only. */\n readonly isReadOnly: boolean,\n\n /** Whether the radio group is required. */\n readonly isRequired: boolean,\n\n /** Whether the radio group is valid or invalid. */\n readonly validationState: ValidationState | null,\n\n /** The currently selected value. */\n readonly selectedValue: string | null,\n\n /** Sets the selected value. */\n setSelectedValue(value: string): void,\n\n /** The value of the last focused radio. */\n readonly lastFocusedValue: string | null,\n\n /** Sets the last focused value. */\n setLastFocusedValue(value: string): void\n}\n\nlet instance = Math.round(Math.random() * 10000000000);\nlet i = 0;\n\n/**\n * Provides state management for a radio group component. Provides a name for the group,\n * and manages selection and focus state.\n */\nexport function useRadioGroupState(props: RadioGroupProps): RadioGroupState {\n // Preserved here for backward compatibility. React Aria now generates the name instead of stately.\n let name = useMemo(() => props.name || `radio-group-${instance}-${++i}`, [props.name]);\n let [selectedValue, setSelected] = useControlledState(props.value, props.defaultValue, props.onChange);\n let [lastFocusedValue, setLastFocusedValue] = useState(null);\n\n let setSelectedValue = (value) => {\n if (!props.isReadOnly && !props.isDisabled) {\n setSelected(value);\n }\n };\n\n return {\n name,\n selectedValue,\n setSelectedValue,\n lastFocusedValue,\n setLastFocusedValue,\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false,\n validationState: props.validationState || null\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;AAwCD,IAAI,iCAAW,KAAK,MAAM,KAAK,WAAW;AAC1C,IAAI,0BAAI;AAMD,SAAS,0CAAmB,KAAsB;IACvD,mGAAmG;IACnG,IAAI,OAAO,CAAA,GAAA,cAAM,EAAE,IAAM,MAAM,QAAQ,CAAC,YAAY,EAAE,+BAAS,CAAC,EAAE,EAAE,wBAAE,CAAC,EAAE;QAAC,MAAM;KAAK;IACrF,IAAI,CAAC,eAAe,YAAY,GAAG,CAAA,GAAA,yBAAiB,EAAE,MAAM,OAAO,MAAM,cAAc,MAAM;IAC7F,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvD,IAAI,mBAAmB,CAAC;QACtB,IAAI,CAAC,MAAM,cAAc,CAAC,MAAM,YAC9B,YAAY;IAEhB;IAEA,OAAO;cACL;uBACA;0BACA;0BACA;6BACA;QACA,YAAY,MAAM,cAAc;QAChC,YAAY,MAAM,cAAc;QAChC,YAAY,MAAM,cAAc;QAChC,iBAAiB,MAAM,mBAAmB;IAC5C;AACF;;CDtEC","sources":["packages/@react-stately/radio/src/index.ts","packages/@react-stately/radio/src/useRadioGroupState.ts"],"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\nexport {useRadioGroupState} from './useRadioGroupState';\n\nexport type {RadioGroupProps} from '@react-types/radio';\nexport type {RadioGroupState} from './useRadioGroupState';\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 {RadioGroupProps} from '@react-types/radio';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface RadioGroupState {\n /**\n * The name for the group, used for native form submission.\n * @deprecated\n * @private\n */\n readonly name: string,\n\n /** Whether the radio group is disabled. */\n readonly isDisabled: boolean,\n\n /** Whether the radio group is read only. */\n readonly isReadOnly: boolean,\n\n /** Whether the radio group is required. */\n readonly isRequired: boolean,\n\n /** Whether the radio group is valid or invalid. */\n readonly validationState: ValidationState | null,\n\n /** The currently selected value. */\n readonly selectedValue: string | null,\n\n /** Sets the selected value. */\n setSelectedValue(value: string): void,\n\n /** The value of the last focused radio. */\n readonly lastFocusedValue: string | null,\n\n /** Sets the last focused value. */\n setLastFocusedValue(value: string): void\n}\n\nlet instance = Math.round(Math.random() * 10000000000);\nlet i = 0;\n\n/**\n * Provides state management for a radio group component. Provides a name for the group,\n * and manages selection and focus state.\n */\nexport function useRadioGroupState(props: RadioGroupProps): RadioGroupState {\n // Preserved here for backward compatibility. React Aria now generates the name instead of stately.\n let name = useMemo(() => props.name || `radio-group-${instance}-${++i}`, [props.name]);\n let [selectedValue, setSelected] = useControlledState(props.value, props.defaultValue, props.onChange);\n let [lastFocusedValue, setLastFocusedValue] = useState(null);\n\n let setSelectedValue = (value) => {\n if (!props.isReadOnly && !props.isDisabled) {\n setSelected(value);\n }\n };\n\n return {\n name,\n selectedValue,\n setSelectedValue,\n lastFocusedValue,\n setLastFocusedValue,\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false,\n validationState: props.validationState || null\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/radio",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-stately/utils": "^3.
|
|
26
|
-
"@react-types/radio": "^3.4.
|
|
27
|
-
"@react-types/shared": "^3.18.
|
|
28
|
-
"@swc/helpers": "^0.
|
|
25
|
+
"@react-stately/utils": "^3.7.0",
|
|
26
|
+
"@react-types/radio": "^3.4.2",
|
|
27
|
+
"@react-types/shared": "^3.18.1",
|
|
28
|
+
"@swc/helpers": "^0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "504e40e0a50c1b20ed0fb3ba9561a263b6d5565e"
|
|
37
37
|
}
|