@spectrum-web-components/radio 1.7.0 → 1.8.0
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/package.json +6 -6
- package/sp-radio-group.d.ts +11 -0
- package/sp-radio-group.dev.js.map +1 -1
- package/sp-radio-group.js.map +1 -1
- package/sp-radio.d.ts +11 -0
- package/sp-radio.dev.js.map +1 -1
- package/sp-radio.js.map +1 -1
- package/src/Radio.d.ts +11 -0
- package/src/Radio.dev.js.map +1 -1
- package/src/Radio.js.map +1 -1
- package/src/RadioGroup.d.ts +11 -0
- package/src/RadioGroup.dev.js.map +1 -1
- package/src/RadioGroup.js.map +1 -1
- package/src/index.d.ts +11 -0
- package/src/index.dev.js.map +1 -1
- package/src/index.js.map +1 -1
- package/src/radio-overrides.css.dev.js.map +1 -1
- package/src/radio-overrides.css.js.map +1 -1
- package/src/radio.css.dev.js.map +1 -1
- package/src/radio.css.js.map +1 -1
- package/src/spectrum-radio.css.dev.js.map +1 -1
- package/src/spectrum-radio.css.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/radio",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
"css"
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@spectrum-web-components/base": "1.
|
|
76
|
-
"@spectrum-web-components/field-group": "1.
|
|
77
|
-
"@spectrum-web-components/help-text": "1.
|
|
78
|
-
"@spectrum-web-components/reactive-controllers": "1.
|
|
79
|
-
"@spectrum-web-components/shared": "1.
|
|
75
|
+
"@spectrum-web-components/base": "1.8.0",
|
|
76
|
+
"@spectrum-web-components/field-group": "1.8.0",
|
|
77
|
+
"@spectrum-web-components/help-text": "1.8.0",
|
|
78
|
+
"@spectrum-web-components/reactive-controllers": "1.8.0",
|
|
79
|
+
"@spectrum-web-components/shared": "1.8.0"
|
|
80
80
|
},
|
|
81
81
|
"types": "./src/index.d.ts",
|
|
82
82
|
"customElements": "custom-elements.json",
|
package/sp-radio-group.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
1
12
|
import { RadioGroup } from './src/RadioGroup.js';
|
|
2
13
|
declare global {
|
|
3
14
|
interface HTMLElementTagNameMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-radio-group.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { RadioGroup } from './src/RadioGroup.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-radio-group', RadioGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-radio-group': RadioGroup;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,cAAc,kBAAkB,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-radio-group.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-radio-group.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { RadioGroup } from './src/RadioGroup.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-radio-group', RadioGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-radio-group': RadioGroup;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAWA,OAAS,cAAAA,MAAkB,sBAC3B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,iBAAkBD,CAAU",
|
|
6
6
|
"names": ["RadioGroup", "defineElement"]
|
|
7
7
|
}
|
package/sp-radio.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
1
12
|
import { Radio } from './src/Radio.js';
|
|
2
13
|
declare global {
|
|
3
14
|
interface HTMLElementTagNameMap {
|
package/sp-radio.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-radio.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { Radio } from './src/Radio.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-radio', Radio);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-radio': Radio;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,cAAc,YAAY,KAAK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-radio.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-radio.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { Radio } from './src/Radio.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-radio', Radio);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-radio': Radio;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAWA,OAAS,SAAAA,MAAa,iBACtB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,WAAYD,CAAK",
|
|
6
6
|
"names": ["Radio", "defineElement"]
|
|
7
7
|
}
|
package/src/Radio.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
1
12
|
import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
13
|
declare const Radio_base: typeof SpectrumElement & {
|
|
3
14
|
new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
|
package/src/Radio.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Radio.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.js';\n\nimport radioStyles from './radio.css.js';\n\n/**\n * @element sp-radio\n *\n * @slot - text label of the Radio button\n * @attr invalid - Uses the invalid style\n * @attr disabled - Uses the disabled style\n * @attr checked - Represents when the input is checked\n * @attr value - Identifies this radio button within its radio group\n *\n * @fires change - When the input is interacted with and its state is changed\n */\nexport class Radio extends SizedMixin(\n FocusVisiblePolyfillMixin(SpectrumElement),\n { noDefaultSize: true }\n) {\n public static override get styles(): CSSResultArray {\n return [radioStyles];\n }\n\n /**\n * When this control is rendered, focus it automatically\n * @private\n */\n @property({ type: Boolean })\n public override autofocus = false;\n\n @property({ type: String, reflect: true })\n public value = '';\n\n @property({ type: Boolean, reflect: true })\n public checked = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n public override click(): void {\n if (this.disabled) {\n return;\n }\n this.activate();\n }\n\n protected manageAutoFocus(): void {\n if (this.autofocus) {\n /**\n * Trick :focus-visible polyfill into thinking keyboard based focus\n *\n * @private\n **/\n this.dispatchEvent(\n new KeyboardEvent('keydown', {\n code: 'Tab',\n })\n );\n this.focus();\n }\n }\n\n protected activate(): void {\n if (this.checked) {\n return;\n }\n this.checked = true;\n this.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n if (event.code === 'Space') {\n this.activate();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n <div id=\"input\"></div>\n <span id=\"button\"></span>\n <span id=\"label\" role=\"presentation\"><slot></slot></span>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'radio');\n if (!this.hasAttribute('tabindex')) {\n this.tabIndex = 0;\n }\n this.manageAutoFocus();\n this.addEventListener('click', this.activate);\n this.addEventListener('keyup', this.handleKeyup);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('invalid')) {\n if (this.invalid) {\n this.setAttribute('aria-invalid', 'true');\n } else {\n this.removeAttribute('aria-invalid');\n }\n }\n if (changes.has('checked')) {\n if (this.checked) {\n this.setAttribute('aria-checked', 'true');\n } else {\n this.setAttribute('aria-checked', 'false');\n }\n }\n if (changes.has('disabled')) {\n if (this.disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,iCAAiC;AAE1C,OAAO,iBAAiB;AAajB,aAAM,cAAc;AAAA,EACvB,0BAA0B,eAAe;AAAA,EACzC,EAAE,eAAe,KAAK;AAC1B,EAAE;AAAA,EAHK;AAAA;AAaH,SAAgB,YAAY;AAG5B,SAAO,QAAQ;AAGf,SAAO,UAAU;AAGjB,SAAO,WAAW;AAGlB,SAAO,aAAa;AAGpB,SAAO,UAAU;AAGjB,SAAO,WAAW;AAAA;AAAA,EA3BlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,WAAW;AAAA,EACvB;AAAA,EA2BgB,QAAc;AAC1B,QAAI,KAAK,UAAU;AACf;AAAA,IACJ;AACA,SAAK,SAAS;AAAA,EAClB;AAAA,EAEU,kBAAwB;AAC9B,QAAI,KAAK,WAAW;AAMhB,WAAK;AAAA,QACD,IAAI,cAAc,WAAW;AAAA,UACzB,MAAM;AAAA,QACV,CAAC;AAAA,MACL;AACA,WAAK,MAAM;AAAA,IACf;AAAA,EACJ;AAAA,EAEU,WAAiB;AACvB,QAAI,KAAK,SAAS;AACd;AAAA,IACJ;AACA,SAAK,UAAU;AACf,SAAK;AAAA,MACD,IAAI,MAAM,UAAU;AAAA,QAChB,SAAS;AAAA,QACT,UAAU;AAAA,MACd,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEU,YAAY,OAA4B;AAC9C,QAAI,MAAM,SAAS,SAAS;AACxB,WAAK,SAAS;AAAA,IAClB;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,SAAK,aAAa,QAAQ,OAAO;AACjC,QAAI,CAAC,KAAK,aAAa,UAAU,GAAG;AAChC,WAAK,WAAW;AAAA,IACpB;AACA,SAAK,gBAAgB;AACrB,SAAK,iBAAiB,SAAS,KAAK,QAAQ;AAC5C,SAAK,iBAAiB,SAAS,KAAK,WAAW;AAAA,EACnD;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,QAAI,QAAQ,IAAI,SAAS,GAAG;AACxB,UAAI,KAAK,SAAS;AACd,aAAK,aAAa,gBAAgB,MAAM;AAAA,MAC5C,OAAO;AACH,aAAK,gBAAgB,cAAc;AAAA,MACvC;AAAA,IACJ;AACA,QAAI,QAAQ,IAAI,SAAS,GAAG;AACxB,UAAI,KAAK,SAAS;AACd,aAAK,aAAa,gBAAgB,MAAM;AAAA,MAC5C,OAAO;AACH,aAAK,aAAa,gBAAgB,OAAO;AAAA,MAC7C;AAAA,IACJ;AACA,QAAI,QAAQ,IAAI,UAAU,GAAG;AACzB,UAAI,KAAK,UAAU;AACf,aAAK,aAAa,iBAAiB,MAAM;AAAA,MAC7C,OAAO;AACH,aAAK,gBAAgB,eAAe;AAAA,MACxC;AAAA,IACJ;AAAA,EACJ;AACJ;AAzGoB;AAAA,EADf,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAZlB,MAaO;AAGT;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAfhC,MAgBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAlBjC,MAmBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GArBjC,MAsBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAxBjC,MAyBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA3BjC,MA4BF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA9BjC,MA+BF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/Radio.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Radio.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.js';\n\nimport radioStyles from './radio.css.js';\n\n/**\n * @element sp-radio\n *\n * @slot - text label of the Radio button\n * @attr invalid - Uses the invalid style\n * @attr disabled - Uses the disabled style\n * @attr checked - Represents when the input is checked\n * @attr value - Identifies this radio button within its radio group\n *\n * @fires change - When the input is interacted with and its state is changed\n */\nexport class Radio extends SizedMixin(\n FocusVisiblePolyfillMixin(SpectrumElement),\n { noDefaultSize: true }\n) {\n public static override get styles(): CSSResultArray {\n return [radioStyles];\n }\n\n /**\n * When this control is rendered, focus it automatically\n * @private\n */\n @property({ type: Boolean })\n public override autofocus = false;\n\n @property({ type: String, reflect: true })\n public value = '';\n\n @property({ type: Boolean, reflect: true })\n public checked = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n public override click(): void {\n if (this.disabled) {\n return;\n }\n this.activate();\n }\n\n protected manageAutoFocus(): void {\n if (this.autofocus) {\n /**\n * Trick :focus-visible polyfill into thinking keyboard based focus\n *\n * @private\n **/\n this.dispatchEvent(\n new KeyboardEvent('keydown', {\n code: 'Tab',\n })\n );\n this.focus();\n }\n }\n\n protected activate(): void {\n if (this.checked) {\n return;\n }\n this.checked = true;\n this.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n if (event.code === 'Space') {\n this.activate();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n <div id=\"input\"></div>\n <span id=\"button\"></span>\n <span id=\"label\" role=\"presentation\"><slot></slot></span>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'radio');\n if (!this.hasAttribute('tabindex')) {\n this.tabIndex = 0;\n }\n this.manageAutoFocus();\n this.addEventListener('click', this.activate);\n this.addEventListener('keyup', this.handleKeyup);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('invalid')) {\n if (this.invalid) {\n this.setAttribute('aria-invalid', 'true');\n } else {\n this.removeAttribute('aria-invalid');\n }\n }\n if (changes.has('checked')) {\n if (this.checked) {\n this.setAttribute('aria-checked', 'true');\n } else {\n this.setAttribute('aria-checked', 'false');\n }\n }\n if (changes.has('disabled')) {\n if (this.disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n }\n}\n"],
|
|
5
5
|
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,6BAAAC,MAAiC,uDAE1C,OAAOC,MAAiB,iBAajB,aAAM,cAAcJ,EACvBG,EAA0BF,CAAe,EACzC,CAAE,cAAe,EAAK,CAC1B,CAAE,CAHK,kCAaH,KAAgB,UAAY,GAG5B,KAAO,MAAQ,GAGf,KAAO,QAAU,GAGjB,KAAO,SAAW,GAGlB,KAAO,WAAa,GAGpB,KAAO,QAAU,GAGjB,KAAO,SAAW,GA3BlB,WAA2B,QAAyB,CAChD,MAAO,CAACG,CAAW,CACvB,CA2BgB,OAAc,CACtB,KAAK,UAGT,KAAK,SAAS,CAClB,CAEU,iBAAwB,CAC1B,KAAK,YAML,KAAK,cACD,IAAI,cAAc,UAAW,CACzB,KAAM,KACV,CAAC,CACL,EACA,KAAK,MAAM,EAEnB,CAEU,UAAiB,CACnB,KAAK,UAGT,KAAK,QAAU,GACf,KAAK,cACD,IAAI,MAAM,SAAU,CAChB,QAAS,GACT,SAAU,EACd,CAAC,CACL,EACJ,CAEU,YAAYC,EAA4B,CAC1CA,EAAM,OAAS,SACf,KAAK,SAAS,CAEtB,CAEmB,QAAyB,CACxC,OAAON;AAAA;AAAA;AAAA;AAAA,SAKX,CAEmB,aAAaO,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EAC1B,KAAK,aAAa,OAAQ,OAAO,EAC5B,KAAK,aAAa,UAAU,IAC7B,KAAK,SAAW,GAEpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,QAAS,KAAK,QAAQ,EAC5C,KAAK,iBAAiB,QAAS,KAAK,WAAW,CACnD,CAEmB,QAAQA,EAA+B,CACtD,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,SAAS,IACjB,KAAK,QACL,KAAK,aAAa,eAAgB,MAAM,EAExC,KAAK,gBAAgB,cAAc,GAGvCA,EAAQ,IAAI,SAAS,IACjB,KAAK,QACL,KAAK,aAAa,eAAgB,MAAM,EAExC,KAAK,aAAa,eAAgB,OAAO,GAG7CA,EAAQ,IAAI,UAAU,IAClB,KAAK,SACL,KAAK,aAAa,gBAAiB,MAAM,EAEzC,KAAK,gBAAgB,eAAe,EAGhD,CACJ,CAzGoBC,EAAA,CADfL,EAAS,CAAE,KAAM,OAAQ,CAAC,GAZlB,MAaO,yBAGTK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAfhC,MAgBF,qBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAlBjC,MAmBF,uBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArBjC,MAsBF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAxBjC,MAyBF,0BAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA3BjC,MA4BF,uBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA9BjC,MA+BF",
|
|
6
6
|
"names": ["html", "SizedMixin", "SpectrumElement", "property", "FocusVisiblePolyfillMixin", "radioStyles", "event", "changes", "__decorateClass"]
|
|
7
7
|
}
|
package/src/RadioGroup.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
1
12
|
import { PropertyValues } from '@spectrum-web-components/base';
|
|
2
13
|
import { FieldGroup } from '@spectrum-web-components/field-group';
|
|
3
14
|
import { Radio } from './Radio.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["RadioGroup.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 { PropertyValues } from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedNodes,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.js';\nimport { FieldGroup } from '@spectrum-web-components/field-group';\n\nimport { Radio } from './Radio.dev.js'\nimport { RovingTabindexController } from '@spectrum-web-components/reactive-controllers/src/RovingTabindex.js';\n\n/**\n * @element sp-radio-group\n *\n * @slot - The `sp-radio` elements to display/manage in the group.\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n *\n * @fires change - An alteration to the value of the element has been committed by the user.\n */\nexport class RadioGroup extends FocusVisiblePolyfillMixin(FieldGroup) {\n @property({ type: String })\n public name = '';\n\n @queryAssignedNodes()\n public defaultNodes!: Node[];\n\n public get buttons(): Radio[] {\n return this.defaultNodes.filter(\n (node) => (node as HTMLElement) instanceof Radio\n ) as Radio[];\n }\n\n rovingTabindexController = new RovingTabindexController<Radio>(this, {\n focusInIndex: (elements: Radio[]) => {\n return elements.findIndex((el) => {\n return this.selected\n ? !el.disabled && el.value === this.selected\n : !el.disabled;\n });\n },\n elementEnterAction: (el: Radio) => {\n this._setSelected(el.value);\n },\n elements: () => this.buttons,\n isFocusableElement: (el: Radio) => !el.disabled,\n });\n\n public override focus(): void {\n this.rovingTabindexController.focus();\n }\n\n private _setSelected(value: string): void {\n if (value === this.selected) {\n return;\n }\n const oldValue = this.selected;\n const radio = value\n ? (this.querySelector(`sp-radio[value=\"${value}\"]`) as Radio)\n : undefined;\n\n // If no matching radio, selected is reset to empty string\n this.selected = radio ? value : '';\n const applyDefault = this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n bubbles: true,\n composed: true,\n })\n );\n if (!applyDefault) {\n this.selected = oldValue;\n return;\n }\n this.validateRadios();\n }\n\n @property({ reflect: true })\n public selected = '';\n\n protected override willUpdate(changes: PropertyValues<this>): void {\n if (!this.hasUpdated) {\n this.setAttribute('role', 'radiogroup');\n const checkedRadio = this.querySelector(\n 'sp-radio[checked]'\n ) as Radio;\n const checkedRadioValue = checkedRadio ? checkedRadio.value : '';\n // Prefer the checked item over the selected value\n this.selected = checkedRadioValue || this.selected;\n // Validate the selected value is actual a radio option\n if (this.selected && this.selected !== checkedRadioValue) {\n const selectedRadio = this.querySelector(\n `sp-radio[value=\"${this.selected}\"]`\n ) as Radio;\n if (selectedRadio) {\n selectedRadio.checked = true;\n }\n }\n\n this.shadowRoot.addEventListener('change', (event: Event) => {\n event.stopPropagation();\n const target = event.target as Radio;\n this._setSelected(target.value);\n });\n }\n\n if (changes.has('selected')) {\n this.validateRadios();\n }\n }\n\n private async validateRadios(): Promise<void> {\n let validSelection = false;\n if (!this.hasUpdated) {\n // Initial validation has to happen after the initial render to allow\n // the buttons to be queries from the rendered <slot> element\n await this.updateComplete;\n }\n this.buttons.map((button) => {\n button.checked = this.selected === button.value;\n validSelection = validSelection || button.checked;\n });\n if (!validSelection) {\n this.selected = '';\n }\n }\n\n protected override handleSlotchange(): void {\n this.rovingTabindexController.clearElementCache();\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;AAaA;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAE3B,SAAS,aAAa;AACtB,SAAS,gCAAgC;AAWlC,aAAM,mBAAmB,0BAA0B,UAAU,EAAE;AAAA,EAA/D;AAAA;AAEH,SAAO,OAAO;AAWd,oCAA2B,IAAI,yBAAgC,MAAM;AAAA,MACjE,cAAc,CAAC,aAAsB;AACjC,eAAO,SAAS,UAAU,CAAC,OAAO;AAC9B,iBAAO,KAAK,WACN,CAAC,GAAG,YAAY,GAAG,UAAU,KAAK,WAClC,CAAC,GAAG;AAAA,QACd,CAAC;AAAA,MACL;AAAA,MACA,oBAAoB,CAAC,OAAc;AAC/B,aAAK,aAAa,GAAG,KAAK;AAAA,MAC9B;AAAA,MACA,UAAU,MAAM,KAAK;AAAA,MACrB,oBAAoB,CAAC,OAAc,CAAC,GAAG;AAAA,IAC3C,CAAC;AAgCD,SAAO,WAAW;AAAA;AAAA,EAnDlB,IAAW,UAAmB;AAC1B,WAAO,KAAK,aAAa;AAAA,MACrB,CAAC,SAAU,gBAAgC;AAAA,IAC/C;AAAA,EACJ;AAAA,EAiBgB,QAAc;AAC1B,SAAK,yBAAyB,MAAM;AAAA,EACxC;AAAA,EAEQ,aAAa,OAAqB;AACtC,QAAI,UAAU,KAAK,UAAU;AACzB;AAAA,IACJ;AACA,UAAM,WAAW,KAAK;AACtB,UAAM,QAAQ,QACP,KAAK,cAAc,mBAAmB,KAAK,IAAI,IAChD;AAGN,SAAK,WAAW,QAAQ,QAAQ;AAChC,UAAM,eAAe,KAAK;AAAA,MACtB,IAAI,MAAM,UAAU;AAAA,QAChB,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACd,CAAC;AAAA,IACL;AACA,QAAI,CAAC,cAAc;AACf,WAAK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,eAAe;AAAA,EACxB;AAAA,EAKmB,WAAW,SAAqC;AAC/D,QAAI,CAAC,KAAK,YAAY;AAClB,WAAK,aAAa,QAAQ,YAAY;AACtC,YAAM,eAAe,KAAK;AAAA,QACtB;AAAA,MACJ;AACA,YAAM,oBAAoB,eAAe,aAAa,QAAQ;AAE9D,WAAK,WAAW,qBAAqB,KAAK;AAE1C,UAAI,KAAK,YAAY,KAAK,aAAa,mBAAmB;AACtD,cAAM,gBAAgB,KAAK;AAAA,UACvB,mBAAmB,KAAK,QAAQ;AAAA,QACpC;AACA,YAAI,eAAe;AACf,wBAAc,UAAU;AAAA,QAC5B;AAAA,MACJ;AAEA,WAAK,WAAW,iBAAiB,UAAU,CAAC,UAAiB;AACzD,cAAM,gBAAgB;AACtB,cAAM,SAAS,MAAM;AACrB,aAAK,aAAa,OAAO,KAAK;AAAA,MAClC,CAAC;AAAA,IACL;AAEA,QAAI,QAAQ,IAAI,UAAU,GAAG;AACzB,WAAK,eAAe;AAAA,IACxB;AAAA,EACJ;AAAA,EAEA,MAAc,iBAAgC;AAC1C,QAAI,iBAAiB;AACrB,QAAI,CAAC,KAAK,YAAY;AAGlB,YAAM,KAAK;AAAA,IACf;AACA,SAAK,QAAQ,IAAI,CAAC,WAAW;AACzB,aAAO,UAAU,KAAK,aAAa,OAAO;AAC1C,uBAAiB,kBAAkB,OAAO;AAAA,IAC9C,CAAC;AACD,QAAI,CAAC,gBAAgB;AACjB,WAAK,WAAW;AAAA,IACpB;AAAA,EACJ;AAAA,EAEmB,mBAAyB;AACxC,SAAK,yBAAyB,kBAAkB;AAAA,EACpD;AACJ;AA5GW;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADjB,WAEF;AAGA;AAAA,EADN,mBAAmB;AAAA,GAJX,WAKF;AAqDA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAzDlB,WA0DF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/RadioGroup.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["RadioGroup.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 { PropertyValues } from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedNodes,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.js';\nimport { FieldGroup } from '@spectrum-web-components/field-group';\n\nimport { Radio } from './Radio.js';\nimport { RovingTabindexController } from '@spectrum-web-components/reactive-controllers/src/RovingTabindex.js';\n\n/**\n * @element sp-radio-group\n *\n * @slot - The `sp-radio` elements to display/manage in the group.\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n *\n * @fires change - An alteration to the value of the element has been committed by the user.\n */\nexport class RadioGroup extends FocusVisiblePolyfillMixin(FieldGroup) {\n @property({ type: String })\n public name = '';\n\n @queryAssignedNodes()\n public defaultNodes!: Node[];\n\n public get buttons(): Radio[] {\n return this.defaultNodes.filter(\n (node) => (node as HTMLElement) instanceof Radio\n ) as Radio[];\n }\n\n rovingTabindexController = new RovingTabindexController<Radio>(this, {\n focusInIndex: (elements: Radio[]) => {\n return elements.findIndex((el) => {\n return this.selected\n ? !el.disabled && el.value === this.selected\n : !el.disabled;\n });\n },\n elementEnterAction: (el: Radio) => {\n this._setSelected(el.value);\n },\n elements: () => this.buttons,\n isFocusableElement: (el: Radio) => !el.disabled,\n });\n\n public override focus(): void {\n this.rovingTabindexController.focus();\n }\n\n private _setSelected(value: string): void {\n if (value === this.selected) {\n return;\n }\n const oldValue = this.selected;\n const radio = value\n ? (this.querySelector(`sp-radio[value=\"${value}\"]`) as Radio)\n : undefined;\n\n // If no matching radio, selected is reset to empty string\n this.selected = radio ? value : '';\n const applyDefault = this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n bubbles: true,\n composed: true,\n })\n );\n if (!applyDefault) {\n this.selected = oldValue;\n return;\n }\n this.validateRadios();\n }\n\n @property({ reflect: true })\n public selected = '';\n\n protected override willUpdate(changes: PropertyValues<this>): void {\n if (!this.hasUpdated) {\n this.setAttribute('role', 'radiogroup');\n const checkedRadio = this.querySelector(\n 'sp-radio[checked]'\n ) as Radio;\n const checkedRadioValue = checkedRadio ? checkedRadio.value : '';\n // Prefer the checked item over the selected value\n this.selected = checkedRadioValue || this.selected;\n // Validate the selected value is actual a radio option\n if (this.selected && this.selected !== checkedRadioValue) {\n const selectedRadio = this.querySelector(\n `sp-radio[value=\"${this.selected}\"]`\n ) as Radio;\n if (selectedRadio) {\n selectedRadio.checked = true;\n }\n }\n\n this.shadowRoot.addEventListener('change', (event: Event) => {\n event.stopPropagation();\n const target = event.target as Radio;\n this._setSelected(target.value);\n });\n }\n\n if (changes.has('selected')) {\n this.validateRadios();\n }\n }\n\n private async validateRadios(): Promise<void> {\n let validSelection = false;\n if (!this.hasUpdated) {\n // Initial validation has to happen after the initial render to allow\n // the buttons to be queries from the rendered <slot> element\n await this.updateComplete;\n }\n this.buttons.map((button) => {\n button.checked = this.selected === button.value;\n validSelection = validSelection || button.checked;\n });\n if (!validSelection) {\n this.selected = '';\n }\n }\n\n protected override handleSlotchange(): void {\n this.rovingTabindexController.clearElementCache();\n }\n}\n"],
|
|
5
5
|
"mappings": "qNAaA,OACI,YAAAA,EACA,sBAAAC,MACG,kDACP,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,cAAAC,MAAkB,uCAE3B,OAAS,SAAAC,MAAa,aACtB,OAAS,4BAAAC,MAAgC,sEAWlC,aAAM,mBAAmBH,EAA0BC,CAAU,CAAE,CAA/D,kCAEH,KAAO,KAAO,GAWd,8BAA2B,IAAIE,EAAgC,KAAM,CACjE,aAAeC,GACJA,EAAS,UAAWC,GAChB,KAAK,SACN,CAACA,EAAG,UAAYA,EAAG,QAAU,KAAK,SAClC,CAACA,EAAG,QACb,EAEL,mBAAqBA,GAAc,CAC/B,KAAK,aAAaA,EAAG,KAAK,CAC9B,EACA,SAAU,IAAM,KAAK,QACrB,mBAAqBA,GAAc,CAACA,EAAG,QAC3C,CAAC,EAgCD,KAAO,SAAW,GAnDlB,IAAW,SAAmB,CAC1B,OAAO,KAAK,aAAa,OACpBC,GAAUA,aAAgCJ,CAC/C,CACJ,CAiBgB,OAAc,CAC1B,KAAK,yBAAyB,MAAM,CACxC,CAEQ,aAAaK,EAAqB,CACtC,GAAIA,IAAU,KAAK,SACf,OAEJ,MAAMC,EAAW,KAAK,SAChBC,EAAQF,EACP,KAAK,cAAc,mBAAmBA,CAAK,IAAI,EAChD,OAWN,GARA,KAAK,SAAWE,EAAQF,EAAQ,GAQ5B,CAPiB,KAAK,cACtB,IAAI,MAAM,SAAU,CAChB,WAAY,GACZ,QAAS,GACT,SAAU,EACd,CAAC,CACL,EACmB,CACf,KAAK,SAAWC,EAChB,MACJ,CACA,KAAK,eAAe,CACxB,CAKmB,WAAWE,EAAqC,CAC/D,GAAI,CAAC,KAAK,WAAY,CAClB,KAAK,aAAa,OAAQ,YAAY,EACtC,MAAMC,EAAe,KAAK,cACtB,mBACJ,EACMC,EAAoBD,EAAeA,EAAa,MAAQ,GAI9D,GAFA,KAAK,SAAWC,GAAqB,KAAK,SAEtC,KAAK,UAAY,KAAK,WAAaA,EAAmB,CACtD,MAAMC,EAAgB,KAAK,cACvB,mBAAmB,KAAK,QAAQ,IACpC,EACIA,IACAA,EAAc,QAAU,GAEhC,CAEA,KAAK,WAAW,iBAAiB,SAAWC,GAAiB,CACzDA,EAAM,gBAAgB,EACtB,MAAMC,EAASD,EAAM,OACrB,KAAK,aAAaC,EAAO,KAAK,CAClC,CAAC,CACL,CAEIL,EAAQ,IAAI,UAAU,GACtB,KAAK,eAAe,CAE5B,CAEA,MAAc,gBAAgC,CAC1C,IAAIM,EAAiB,GAChB,KAAK,YAGN,MAAM,KAAK,eAEf,KAAK,QAAQ,IAAKC,GAAW,CACzBA,EAAO,QAAU,KAAK,WAAaA,EAAO,MAC1CD,EAAiBA,GAAkBC,EAAO,OAC9C,CAAC,EACID,IACD,KAAK,SAAW,GAExB,CAEmB,kBAAyB,CACxC,KAAK,yBAAyB,kBAAkB,CACpD,CACJ,CA5GWE,EAAA,CADNpB,EAAS,CAAE,KAAM,MAAO,CAAC,GADjB,WAEF,oBAGAoB,EAAA,CADNnB,EAAmB,GAJX,WAKF,4BAqDAmB,EAAA,CADNpB,EAAS,CAAE,QAAS,EAAK,CAAC,GAzDlB,WA0DF",
|
|
6
6
|
"names": ["property", "queryAssignedNodes", "FocusVisiblePolyfillMixin", "FieldGroup", "Radio", "RovingTabindexController", "elements", "el", "node", "value", "oldValue", "radio", "changes", "checkedRadio", "checkedRadioValue", "selectedRadio", "event", "target", "validSelection", "button", "__decorateClass"]
|
|
7
7
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
1
12
|
export * from './Radio.js';
|
|
2
13
|
export * from './RadioGroup.js';
|
package/src/index.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nexport * from './Radio.dev.js'\nexport * from './RadioGroup.dev.js'\n"],
|
|
5
5
|
"mappings": ";AAWA,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nexport * from './Radio.js';\nexport * from './RadioGroup.js';\n"],
|
|
5
5
|
"mappings": "aAWA,WAAc,aACd,WAAc",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["radio-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["radio-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/src/radio.css.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["radio.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2025 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}:host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}:host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/radio.css.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["radio.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2025 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}:host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}:host{--spectrum-radio-button-border-color-default:var(--system-radio-button-border-color-default);--spectrum-radio-button-border-color-hover:var(--system-radio-button-border-color-hover);--spectrum-radio-button-border-color-down:var(--system-radio-button-border-color-down);--spectrum-radio-button-border-color-focus:var(--system-radio-button-border-color-focus);--spectrum-radio-neutral-content-color:var(--system-radio-neutral-content-color);--spectrum-radio-neutral-content-color-hover:var(--system-radio-neutral-content-color-hover);--spectrum-radio-neutral-content-color-down:var(--system-radio-neutral-content-color-down);--spectrum-radio-neutral-content-color-focus:var(--system-radio-neutral-content-color-focus);--spectrum-radio-focus-indicator-thickness:var(--system-radio-focus-indicator-thickness);--spectrum-radio-focus-indicator-gap:var(--system-radio-focus-indicator-gap);--spectrum-radio-focus-indicator-color:var(--system-radio-focus-indicator-color);--spectrum-radio-disabled-content-color:var(--system-radio-disabled-content-color);--spectrum-radio-disabled-border-color:var(--system-radio-disabled-border-color);--spectrum-radio-emphasized-accent-color:var(--system-radio-emphasized-accent-color);--spectrum-radio-emphasized-accent-color-hover:var(--system-radio-emphasized-accent-color-hover);--spectrum-radio-emphasized-accent-color-down:var(--system-radio-emphasized-accent-color-down);--spectrum-radio-emphasized-accent-color-focus:var(--system-radio-emphasized-accent-color-focus);--spectrum-radio-border-width:var(--system-radio-border-width);--spectrum-radio-button-background-color:var(--system-radio-button-background-color);--spectrum-radio-button-checked-border-color-default:var(--system-radio-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-button-checked-border-color-focus);--spectrum-radio-line-height:var(--system-radio-line-height);--spectrum-radio-animation-duration:var(--system-radio-animation-duration);--spectrum-radio-height:var(--system-radio-height);--spectrum-radio-button-control-size:var(--system-radio-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-font-size)}:host(:lang(ja)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ja-line-height-cjk)}:host(:lang(zh)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-zh-line-height-cjk)}:host(:lang(ko)){--spectrum-radio-line-height-cjk:var(--system-radio-lang-ko-line-height-cjk)}:host{--spectrum-radio-height:var(--system-radio-size-m-height);--spectrum-radio-button-control-size:var(--system-radio-size-m-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-m-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-m-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-m-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-m-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-m-font-size)}:host([size=s]){--spectrum-radio-height:var(--system-radio-size-s-height);--spectrum-radio-button-control-size:var(--system-radio-size-s-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-s-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-s-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-s-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-s-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-s-font-size)}:host([size=l]){--spectrum-radio-height:var(--system-radio-size-l-height);--spectrum-radio-button-control-size:var(--system-radio-size-l-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-l-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-l-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-l-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-l-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-l-font-size)}:host([size=xl]){--spectrum-radio-height:var(--system-radio-size-xl-height);--spectrum-radio-button-control-size:var(--system-radio-size-xl-button-control-size);--spectrum-radio-text-to-control:var(--system-radio-size-xl-text-to-control);--spectrum-radio-label-top-to-text:var(--system-radio-size-xl-label-top-to-text);--spectrum-radio-label-bottom-to-text:var(--system-radio-size-xl-label-bottom-to-text);--spectrum-radio-button-top-to-control:var(--system-radio-size-xl-button-top-to-control);--spectrum-radio-font-size:var(--system-radio-size-xl-font-size)}:host([emphasized]){--spectrum-radio-button-checked-border-color-default:var(--system-radio-emphasized-button-checked-border-color-default);--spectrum-radio-button-checked-border-color-hover:var(--system-radio-emphasized-button-checked-border-color-hover);--spectrum-radio-button-checked-border-color-down:var(--system-radio-emphasized-button-checked-border-color-down);--spectrum-radio-button-checked-border-color-focus:var(--system-radio-emphasized-button-checked-border-color-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-radio.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-radio.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 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 */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{--highcontrast-radio-neutral-content-color:CanvasText;--highcontrast-radio-neutral-content-color-hover:CanvasText;--highcontrast-radio-neutral-content-color-down:CanvasText;--highcontrast-radio-neutral-content-color-focus:CanvasText;--highcontrast-radio-button-border-color-default:ButtonText;--highcontrast-radio-button-border-color-hover:Highlight;--highcontrast-radio-button-border-color-down:ButtonText;--highcontrast-radio-button-border-color-focus:Highlight;--highcontrast-radio-emphasized-accent-color:ButtonText;--highcontrast-radio-emphasized-accent-color-hover:Highlight;--highcontrast-radio-emphasized-accent-color-down:ButtonText;--highcontrast-radio-emphasized-accent-color-focus:Highlight;--highcontrast-radio-button-checked-border-color-default:Highlight;--highcontrast-radio-button-checked-border-color-hover:Highlight;--highcontrast-radio-button-checked-border-color-down:Highlight;--highcontrast-radio-button-checked-border-color-focus:Highlight;--highcontrast-radio-disabled-content-color:GrayText;--highcontrast-radio-disabled-border-color:GrayText;--highcontrast-radio-focus-indicator-color:CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--mod-radio-height,var(--spectrum-radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down,var(--mod-radio-button-border-color-down,var(--spectrum-radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down,var(--mod-radio-button-checked-border-color-down,var(--spectrum-radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down,var(--mod-radio-neutral-content-color-down,var(--spectrum-radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus,var(--mod-radio-button-border-color-focus,var(--spectrum-radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus,var(--mod-radio-button-checked-border-color-focus,var(--spectrum-radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus,var(--mod-radio-neutral-content-color-focus,var(--spectrum-radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color,var(--mod-radio-emphasized-accent-color,var(--spectrum-radio-emphasized-accent-color)))}@media (hover:hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover,var(--mod-radio-button-border-color-hover,var(--spectrum-radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover,var(--mod-radio-button-checked-border-color-hover,var(--spectrum-radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover,var(--mod-radio-neutral-content-color-hover,var(--spectrum-radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover,var(--mod-radio-emphasized-accent-color-hover,var(--spectrum-radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down,var(--mod-radio-emphasized-accent-color-down,var(--spectrum-radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus,var(--mod-radio-emphasized-accent-color-focus,var(--spectrum-radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color,var(--mod-radio-disabled-border-color,var(--spectrum-radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color,var(--mod-radio-disabled-content-color,var(--spectrum-radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--spectrum-radio-button-control-size)/2 - var(--spectrum-radio-button-selection-indicator)/2);border-color:var(--highcontrast-radio-button-checked-border-color-default,var(--mod-radio-button-checked-border-color-default,var(--spectrum-radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--mod-radio-focus-indicator-thickness,var(--spectrum-radio-focus-indicator-thickness));border-color:var(--highcontrast-radio-focus-indicator-color,var(--mod-radio-focus-indicator-color,var(--spectrum-radio-focus-indicator-color)));inline-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);block-size:calc(var(--spectrum-radio-button-control-size) + var(--spectrum-radio-focus-indicator-gap)*2);border-style:solid}#label{text-align:start;font-size:var(--mod-radio-font-size,var(--spectrum-radio-font-size));color:var(--highcontrast-radio-neutral-content-color,var(--mod-radio-neutral-content-color,var(--spectrum-radio-neutral-content-color)));line-height:var(--mod-radio-line-height,var(--spectrum-radio-line-height));transition:color var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;margin-block-start:var(--spectrum-radio-label-top-to-text);margin-block-end:var(--spectrum-radio-label-bottom-to-text);margin-inline-start:var(--mod-radio-text-to-control,var(--spectrum-radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--mod-radio-line-height-cjk,var(--spectrum-radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-radio-button-top-to-control,var(--spectrum-radio-button-top-to-control));position:relative}#button:before{z-index:0;content:\"\";box-sizing:border-box;inline-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));block-size:var(--mod-radio-button-control-size,var(--spectrum-radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color,var(--mod-radio-button-background-color,var(--spectrum-radio-button-background-color)));border-width:var(--mod-radio-border-width,var(--spectrum-radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default,var(--mod-radio-button-border-color-default,var(--spectrum-radio-button-border-color-default)));transition:border var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out,box-shadow var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:\"\";transition:opacity var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out,margin var(--mod-radio-animation-duration,var(--spectrum-radio-animation-duration))ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%)translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%)translateY(-50%)}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|