@spectrum-web-components/radio 0.9.13 → 0.9.15-devmode.7

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.
@@ -0,0 +1,112 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ property,
14
+ queryAssignedNodes
15
+ } from "@spectrum-web-components/base/src/decorators.js";
16
+ import { FocusVisiblePolyfillMixin } from "@spectrum-web-components/shared/src/focus-visible.js";
17
+ import { FieldGroup } from "@spectrum-web-components/field-group";
18
+ import { Radio } from "./Radio.dev.js";
19
+ import { RovingTabindexController } from "@spectrum-web-components/reactive-controllers/src/RovingTabindex.js";
20
+ export class RadioGroup extends FocusVisiblePolyfillMixin(FieldGroup) {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.name = "";
24
+ this.rovingTabindexController = new RovingTabindexController(this, {
25
+ focusInIndex: (elements) => {
26
+ return elements.findIndex((el) => {
27
+ return this.selected ? !el.disabled && el.value === this.selected : !el.disabled;
28
+ });
29
+ },
30
+ elementEnterAction: (el) => {
31
+ this.selected = el.value;
32
+ },
33
+ elements: () => this.buttons,
34
+ isFocusableElement: (el) => !el.disabled
35
+ });
36
+ this.selected = "";
37
+ }
38
+ get buttons() {
39
+ return this.defaultNodes.filter((node) => node instanceof Radio);
40
+ }
41
+ focus() {
42
+ this.rovingTabindexController.focus();
43
+ }
44
+ _setSelected(value) {
45
+ if (value === this.selected) {
46
+ return;
47
+ }
48
+ const oldValue = this.selected;
49
+ const radio = value ? this.querySelector(`sp-radio[value="${value}"]`) : void 0;
50
+ this.selected = radio ? value : "";
51
+ const applyDefault = this.dispatchEvent(new Event("change", {
52
+ cancelable: true,
53
+ bubbles: true,
54
+ composed: true
55
+ }));
56
+ if (!applyDefault) {
57
+ this.selected = oldValue;
58
+ return;
59
+ }
60
+ this.validateRadios();
61
+ }
62
+ willUpdate(changes) {
63
+ if (!this.hasUpdated) {
64
+ this.setAttribute("role", "radiogroup");
65
+ const checkedRadio = this.querySelector("sp-radio[checked]");
66
+ const checkedRadioValue = checkedRadio ? checkedRadio.value : "";
67
+ this.selected = checkedRadioValue || this.selected;
68
+ if (this.selected && this.selected !== checkedRadioValue) {
69
+ const selectedRadio = this.querySelector(`sp-radio[value="${this.selected}"]`);
70
+ if (!selectedRadio) {
71
+ this.selected = "";
72
+ } else {
73
+ selectedRadio.checked = true;
74
+ }
75
+ }
76
+ this.shadowRoot.addEventListener("change", (event) => {
77
+ event.stopPropagation();
78
+ const target = event.target;
79
+ this._setSelected(target.value);
80
+ });
81
+ }
82
+ if (changes.has("selected")) {
83
+ this.validateRadios();
84
+ }
85
+ }
86
+ async validateRadios() {
87
+ let validSelection = false;
88
+ if (!this.hasUpdated) {
89
+ await this.updateComplete;
90
+ }
91
+ this.buttons.map((button) => {
92
+ button.checked = this.selected === button.value;
93
+ validSelection = validSelection || button.checked;
94
+ });
95
+ if (!validSelection) {
96
+ this.selected = "";
97
+ }
98
+ }
99
+ handleSlotchange() {
100
+ this.rovingTabindexController.clearElementCache();
101
+ }
102
+ }
103
+ __decorateClass([
104
+ property({ type: String })
105
+ ], RadioGroup.prototype, "name", 2);
106
+ __decorateClass([
107
+ queryAssignedNodes("")
108
+ ], RadioGroup.prototype, "defaultNodes", 2);
109
+ __decorateClass([
110
+ property({ reflect: true })
111
+ ], RadioGroup.prototype, "selected", 2);
112
+ //# sourceMappingURL=RadioGroup.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["RadioGroup.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 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*/\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.selected = 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 this.selected = '';\n } else {\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
+ "mappings": ";;;;;;;;;;;AAaA;AAAA;AAAA;AAAA;AAIA;AACA;AAEA;AACA;AAWO,aAAM,mBAAmB,0BAA0B,UAAU,EAAE;AAAA,EAA/D;AAAA;AAEI,gBAAO;AAWd,oCAA2B,IAAI,yBAAgC,MAAM;AAAA,MACjE,cAAc,CAAC,aAAsB;AACjC,eAAO,SAAS,UAAU,CAAC,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AAA,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,QAEc,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;AA9GW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAFJ,WAEI;AAGA;AAAA,EADP,AAAC,mBAAmB,EAAE;AAAA,GACf,AALJ,WAKI;AAqDA;AAAA,EADP,AAAC,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GACpB,AA1DJ,WA0DI;",
6
+ "names": []
7
+ }
package/src/RadioGroup.js CHANGED
@@ -1,129 +1,112 @@
1
- /*
2
- Copyright 2020 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
- */
12
- import { __decorate } from "tslib";
13
- import { property, queryAssignedNodes, } from '@spectrum-web-components/base/src/decorators.js';
14
- import { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.js';
15
- import { FieldGroup } from '@spectrum-web-components/field-group';
16
- import { Radio } from './Radio.js';
17
- import { RovingTabindexController } from '@spectrum-web-components/reactive-controllers/src/RovingTabindex.js';
18
- /**
19
- * @element sp-radio-group
20
- *
21
- * @slot - The `sp-radio` elements to display/manage in the group.
22
- * @slot help-text - default or non-negative help text to associate to your form element
23
- * @slot negative-help-text - negative help text to associate to your form element when `invalid`
24
- *
25
- * @fires change - An alteration to the value of the element has been committed by the user.
26
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ property,
14
+ queryAssignedNodes
15
+ } from "@spectrum-web-components/base/src/decorators.js";
16
+ import { FocusVisiblePolyfillMixin } from "@spectrum-web-components/shared/src/focus-visible.js";
17
+ import { FieldGroup } from "@spectrum-web-components/field-group";
18
+ import { Radio } from "./Radio.js";
19
+ import { RovingTabindexController } from "@spectrum-web-components/reactive-controllers/src/RovingTabindex.js";
27
20
  export class RadioGroup extends FocusVisiblePolyfillMixin(FieldGroup) {
28
- constructor() {
29
- super(...arguments);
30
- this.name = '';
31
- this.rovingTabindexController = new RovingTabindexController(this, {
32
- focusInIndex: (elements) => {
33
- return elements.findIndex((el) => {
34
- return this.selected
35
- ? !el.disabled && el.value === this.selected
36
- : !el.disabled;
37
- });
38
- },
39
- elementEnterAction: (el) => {
40
- this.selected = el.value;
41
- },
42
- elements: () => this.buttons,
43
- isFocusableElement: (el) => !el.disabled,
21
+ constructor() {
22
+ super(...arguments);
23
+ this.name = "";
24
+ this.rovingTabindexController = new RovingTabindexController(this, {
25
+ focusInIndex: (elements) => {
26
+ return elements.findIndex((el) => {
27
+ return this.selected ? !el.disabled && el.value === this.selected : !el.disabled;
44
28
  });
45
- this.selected = '';
29
+ },
30
+ elementEnterAction: (el) => {
31
+ this.selected = el.value;
32
+ },
33
+ elements: () => this.buttons,
34
+ isFocusableElement: (el) => !el.disabled
35
+ });
36
+ this.selected = "";
37
+ }
38
+ get buttons() {
39
+ return this.defaultNodes.filter((node) => node instanceof Radio);
40
+ }
41
+ focus() {
42
+ this.rovingTabindexController.focus();
43
+ }
44
+ _setSelected(value) {
45
+ if (value === this.selected) {
46
+ return;
46
47
  }
47
- get buttons() {
48
- return this.defaultNodes.filter((node) => node instanceof Radio);
48
+ const oldValue = this.selected;
49
+ const radio = value ? this.querySelector(`sp-radio[value="${value}"]`) : void 0;
50
+ this.selected = radio ? value : "";
51
+ const applyDefault = this.dispatchEvent(new Event("change", {
52
+ cancelable: true,
53
+ bubbles: true,
54
+ composed: true
55
+ }));
56
+ if (!applyDefault) {
57
+ this.selected = oldValue;
58
+ return;
49
59
  }
50
- focus() {
51
- this.rovingTabindexController.focus();
52
- }
53
- _setSelected(value) {
54
- if (value === this.selected) {
55
- return;
56
- }
57
- const oldValue = this.selected;
58
- const radio = value
59
- ? this.querySelector(`sp-radio[value="${value}"]`)
60
- : undefined;
61
- // If no matching radio, selected is reset to empty string
62
- this.selected = radio ? value : '';
63
- const applyDefault = this.dispatchEvent(new Event('change', {
64
- cancelable: true,
65
- bubbles: true,
66
- composed: true,
67
- }));
68
- if (!applyDefault) {
69
- this.selected = oldValue;
70
- return;
60
+ this.validateRadios();
61
+ }
62
+ willUpdate(changes) {
63
+ if (!this.hasUpdated) {
64
+ this.setAttribute("role", "radiogroup");
65
+ const checkedRadio = this.querySelector("sp-radio[checked]");
66
+ const checkedRadioValue = checkedRadio ? checkedRadio.value : "";
67
+ this.selected = checkedRadioValue || this.selected;
68
+ if (this.selected && this.selected !== checkedRadioValue) {
69
+ const selectedRadio = this.querySelector(`sp-radio[value="${this.selected}"]`);
70
+ if (!selectedRadio) {
71
+ this.selected = "";
72
+ } else {
73
+ selectedRadio.checked = true;
71
74
  }
72
- this.validateRadios();
75
+ }
76
+ this.shadowRoot.addEventListener("change", (event) => {
77
+ event.stopPropagation();
78
+ const target = event.target;
79
+ this._setSelected(target.value);
80
+ });
73
81
  }
74
- willUpdate(changes) {
75
- if (!this.hasUpdated) {
76
- this.setAttribute('role', 'radiogroup');
77
- const checkedRadio = this.querySelector('sp-radio[checked]');
78
- const checkedRadioValue = checkedRadio ? checkedRadio.value : '';
79
- // Prefer the checked item over the selected value
80
- this.selected = checkedRadioValue || this.selected;
81
- // Validate the selected value is actual a radio option
82
- if (this.selected && this.selected !== checkedRadioValue) {
83
- const selectedRadio = this.querySelector(`sp-radio[value="${this.selected}"]`);
84
- if (!selectedRadio) {
85
- this.selected = '';
86
- }
87
- else {
88
- selectedRadio.checked = true;
89
- }
90
- }
91
- this.shadowRoot.addEventListener('change', (event) => {
92
- event.stopPropagation();
93
- const target = event.target;
94
- this._setSelected(target.value);
95
- });
96
- }
97
- if (changes.has('selected')) {
98
- this.validateRadios();
99
- }
82
+ if (changes.has("selected")) {
83
+ this.validateRadios();
100
84
  }
101
- async validateRadios() {
102
- let validSelection = false;
103
- if (!this.hasUpdated) {
104
- // Initial validation has to happen after the initial render to allow
105
- // the buttons to be queries from the rendered <slot> element
106
- await this.updateComplete;
107
- }
108
- this.buttons.map((button) => {
109
- button.checked = this.selected === button.value;
110
- validSelection = validSelection || button.checked;
111
- });
112
- if (!validSelection) {
113
- this.selected = '';
114
- }
85
+ }
86
+ async validateRadios() {
87
+ let validSelection = false;
88
+ if (!this.hasUpdated) {
89
+ await this.updateComplete;
115
90
  }
116
- handleSlotchange() {
117
- this.rovingTabindexController.clearElementCache();
91
+ this.buttons.map((button) => {
92
+ button.checked = this.selected === button.value;
93
+ validSelection = validSelection || button.checked;
94
+ });
95
+ if (!validSelection) {
96
+ this.selected = "";
118
97
  }
98
+ }
99
+ handleSlotchange() {
100
+ this.rovingTabindexController.clearElementCache();
101
+ }
119
102
  }
120
- __decorate([
121
- property({ type: String })
122
- ], RadioGroup.prototype, "name", void 0);
123
- __decorate([
124
- queryAssignedNodes('')
125
- ], RadioGroup.prototype, "defaultNodes", void 0);
126
- __decorate([
127
- property({ reflect: true })
128
- ], RadioGroup.prototype, "selected", void 0);
129
- //# sourceMappingURL=RadioGroup.js.map
103
+ __decorateClass([
104
+ property({ type: String })
105
+ ], RadioGroup.prototype, "name", 2);
106
+ __decorateClass([
107
+ queryAssignedNodes("")
108
+ ], RadioGroup.prototype, "defaultNodes", 2);
109
+ __decorateClass([
110
+ property({ reflect: true })
111
+ ], RadioGroup.prototype, "selected", 2);
112
+ //# sourceMappingURL=RadioGroup.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["RadioGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAGF,OAAO,EACH,QAAQ,EACR,kBAAkB,GACrB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qEAAqE,CAAC;AAE/G;;;;;;;;GAQG;AACH,MAAM,OAAO,UAAW,SAAQ,yBAAyB,CAAC,UAAU,CAAC;IAArE;;QAEW,SAAI,GAAG,EAAE,CAAC;QAWjB,6BAAwB,GAAG,IAAI,wBAAwB,CAAQ,IAAI,EAAE;YACjE,YAAY,EAAE,CAAC,QAAiB,EAAE,EAAE;gBAChC,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE;oBAC7B,OAAO,IAAI,CAAC,QAAQ;w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ACL,CAAC;IAEO,KAAK,CAAC,cAAc;QACxB,IAAI,cAAc,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,qEAAqE;YACrE,6DAA6D;YAC7D,MAAM,IAAI,CAAC,cAAc,CAAC;SAC7B;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACxB,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,KAAK,CAAC;YAChD,cAAc,GAAG,cAAc,IAAI,MAAM,CAAC,OAAO,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,cAAc,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;SACtB;IACL,CAAC;IAEkB,gBAAgB;QAC/B,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,EAAE,CAAC;IACtD,CAAC;CACJ;AA9GG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACV;AAGjB;IADC,kBAAkB,CAAC,EAAE,CAAC;gDACM;AAqD7B;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACP","sourcesContent":["/*\nCopyright 2020 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*/\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.selected = 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 this.selected = '';\n } else {\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"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["RadioGroup.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 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*/\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.selected = 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 this.selected = '';\n } else {\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
+ "mappings": ";;;;;;;;;;;AAaA;AAAA;AAAA;AAAA;AAIA;AACA;AAEA;AACA;AAWO,aAAM,mBAAmB,0BAA0B,UAAU,EAAE;AAAA,EAA/D;AAAA;AAEI,gBAAO;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,WAAW,GAAG;AAAA,MACvB;AAAA,MACA,UAAU,MAAM,KAAK;AAAA,MACrB,oBAAoB,CAAC,OAAc,CAAC,GAAG;AAAA,IAC3C,CAAC;AAgCM,oBAAW;AAAA;AAAA,MAnDP,UAAmB;AAC1B,WAAO,KAAK,aAAa,OACrB,CAAC,SAAU,gBAAgC,KAC/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,SAAS,IAChD;AAGN,SAAK,WAAW,QAAQ,QAAQ;AAChC,UA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OAAO,CAAC;AAAA,GACnB,AAFJ,WAEI;AAGA;AAAA,EADP,AAAC,mBAAmB,EAAE;AAAA,GACf,AALJ,WAKI;AAqDA;AAAA,EADP,AAAC,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GACpB,AA1DJ,WA0DI;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./Radio.dev.js";
2
+ export * from "./RadioGroup.dev.js";
3
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 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*/\nexport * from './Radio.dev.js'\nexport * from './RadioGroup.dev.js'\n"],
5
+ "mappings": "AAWA;AACA;",
6
+ "names": []
7
+ }
package/src/index.js CHANGED
@@ -1,14 +1,3 @@
1
- /*
2
- Copyright 2020 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
- */
12
- export * from './Radio.js';
13
- export * from './RadioGroup.js';
14
- //# sourceMappingURL=index.js.map
1
+ export * from "./Radio.js";
2
+ export * from "./RadioGroup.js";
3
+ //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC","sourcesContent":["/*\nCopyright 2020 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*/\nexport * from './Radio.js';\nexport * from './RadioGroup.js';\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 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*/\nexport * from './Radio.js';\nexport * from './RadioGroup.js';\n"],
5
+ "mappings": "AAWA;AACA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,118 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{--spectrum-radio-circle-dot-size:var(
4
+ --spectrum-radio-m-circle-dot-size,var(--spectrum-global-dimension-static-size-50)
5
+ );--spectrum-radio-circle-diameter:var(
6
+ --spectrum-radio-m-circle-diameter,var(--spectrum-alias-control-two-size-m)
7
+ );--spectrum-radio-circle-border-size:var(
8
+ --spectrum-radio-m-circle-border-size,var(--spectrum-alias-border-size-thick)
9
+ );--spectrum-radio-text-size:var(
10
+ --spectrum-radio-m-text-size,var(--spectrum-global-dimension-font-size-100)
11
+ );--spectrum-radio-text-gap:var(
12
+ --spectrum-radio-m-text-gap,var(--spectrum-global-dimension-size-125)
13
+ );--spectrum-radio-text-font-style:var(
14
+ --spectrum-radio-m-text-font-style,var(--spectrum-global-font-style-regular)
15
+ );--spectrum-radio-text-font-weight:var(
16
+ --spectrum-radio-m-text-font-weight,var(--spectrum-alias-body-text-font-weight)
17
+ );--spectrum-radio-text-line-height:var(
18
+ --spectrum-radio-m-text-line-height,var(--spectrum-alias-component-text-line-height)
19
+ );--spectrum-radio-height:var(
20
+ --spectrum-radio-m-height,var(--spectrum-global-dimension-size-400)
21
+ );--spectrum-radio-radius:calc(var(--spectrum-radio-circle-diameter)/2);--spectrum-radio-border-width-checked:calc(var(--spectrum-radio-circle-diameter)/2 - var(--spectrum-radio-circle-dot-size)/2);--spectrum-radio-labelbelow-label-margin:var(
22
+ --spectrum-global-dimension-size-50
23
+ ) 0 0 0;--spectrum-radio-labelbelow-height:auto;--spectrum-radio-label-margin-top:var(--spectrum-global-dimension-size-75)}:host{align-items:flex-start;display:inline-flex;max-width:100%;min-height:var(--spectrum-radio-height);position:relative;vertical-align:top}#input{box-sizing:border-box;cursor:pointer;font-family:inherit;font-size:100%;height:100%;line-height:1.15;margin:0;opacity:0;overflow:visible;padding:0;position:absolute;width:100%;z-index:1}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:var(
24
+ --spectrum-radio-border-width-checked
25
+ )}:host(.focus-visible) #input+#button:after{margin:calc(var(
26
+ --spectrum-alias-focus-ring-gap,
27
+ var(--spectrum-global-dimension-static-size-25)
28
+ )*-1)}:host(:focus-visible) #input+#button:after{margin:calc(var(
29
+ --spectrum-alias-focus-ring-gap,
30
+ var(--spectrum-global-dimension-static-size-25)
31
+ )*-1)}:host([dir=ltr]) #label{text-align:left}:host([dir=rtl]) #label{text-align:right}:host([dir=ltr]) #label{margin-left:var(
32
+ --spectrum-radio-text-gap
33
+ )}:host([dir=rtl]) #label{margin-right:var(
34
+ --spectrum-radio-text-gap
35
+ )}#label{font-size:var(--spectrum-radio-text-size);font-style:var(--spectrum-radio-text-font-style);font-weight:var(--spectrum-radio-text-font-weight);line-height:var(--spectrum-radio-text-line-height);margin-top:var(
36
+ --spectrum-radio-label-margin-top
37
+ );transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}#button{box-sizing:border-box;flex-grow:0;flex-shrink:0;height:var(--spectrum-radio-circle-diameter);margin:calc((var(--spectrum-radio-height) - var(--spectrum-radio-circle-diameter))/2) 0;position:relative;width:var(--spectrum-radio-circle-diameter)}#button:before{border-radius:var(--spectrum-radio-radius);border-style:solid;border-width:var(--spectrum-radio-circle-border-size);box-sizing:border-box;content:"";display:block;height:var(--spectrum-radio-circle-diameter);position:absolute;transition:border var(--spectrum-global-animation-duration-100,.13s) ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s) ease-in-out;width:var(--spectrum-radio-circle-diameter);z-index:0}#button:after{border-radius:100%;bottom:0;content:"";display:block;left:0;margin:var(
38
+ --spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)
39
+ );position:absolute;right:0;top:0;transition:opacity var(--spectrum-global-animation-duration-100,.13s) ease-out,margin var(--spectrum-global-animation-duration-100,.13s) ease-out}:host([label-below]){align-items:center;display:inline-flex;flex-direction:column;height:var(--spectrum-radio-labelbelow-height)}:host([label-below]) #button{flex-shrink:0;margin:0}:host([label-below]) #label{margin:var(
40
+ --spectrum-radio-labelbelow-label-margin
41
+ )}:host{--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus:var(
42
+ --spectrum-radio-m-emphasized-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-emphasized-selected-hover)
43
+ )}:host([checked]) #input+#button:before{border-color:var(
44
+ --spectrum-radio-m-circle-border-color-selected,var(--spectrum-alias-toggle-background-color-default)
45
+ )}#label{color:var(
46
+ --spectrum-radio-m-text-color,var(--spectrum-alias-component-text-color-default)
47
+ )}#button:before{background-color:var(
48
+ --spectrum-radio-m-circle-background-color,var(--spectrum-global-color-gray-75)
49
+ );border-color:var(
50
+ --spectrum-radio-m-circle-border-color,var(--spectrum-alias-toggle-border-color-default)
51
+ );forced-color-adjust:none}:host(:hover) #button:before{border-color:var(
52
+ --spectrum-radio-m-circle-border-color-hover,var(--spectrum-alias-toggle-border-color-hover)
53
+ );box-shadow:none}:host(:hover[checked]) #input+#button:before{border-color:var(
54
+ --spectrum-radio-m-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-hover)
55
+ )}:host(:hover) #label{color:var(
56
+ --spectrum-radio-m-text-color-hover,var(--spectrum-alias-component-text-color-hover)
57
+ )}:host(:active) #button:before{border-color:var(
58
+ --spectrum-radio-m-circle-border-color-down,var(--spectrum-alias-toggle-border-color-down)
59
+ )}:host(:active[checked]) #input+#button:before{border-color:var(
60
+ --spectrum-radio-m-circle-border-color-selected-down,var(--spectrum-alias-toggle-background-color-down)
61
+ )}:host(:active) #label{color:var(
62
+ --spectrum-radio-m-text-color-down,var(--spectrum-alias-component-text-color-down)
63
+ )}:host([emphasized][checked]) #input+#button:before{border-color:var(
64
+ --spectrum-radio-m-emphasized-circle-border-color-selected,var(
65
+ --spectrum-alias-toggle-background-color-emphasized-selected-default
66
+ )
67
+ )}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(
68
+ --spectrum-radio-m-emphasized-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-emphasized-selected-hover)
69
+ )}:host([emphasized][checked]:active) #input+#button:before{border-color:var(
70
+ --spectrum-radio-m-emphasized-circle-border-color-selected-down,var(--spectrum-alias-toggle-background-color-emphasized-selected-down)
71
+ )}:host([emphasized][invalid]:hover) #input+#button:before,:host([invalid]:hover) #input+#button:before{border-color:var(
72
+ --spectrum-radio-m-emphasized-circle-border-color-error-hover,var(--spectrum-global-color-red-600)
73
+ )}:host([emphasized][invalid]:hover) #label,:host([invalid]:hover) #label{color:var(
74
+ --spectrum-radio-m-emphasized-text-color-error-hover,var(--spectrum-alias-component-text-color-error-hover)
75
+ )}:host([emphasized][invalid]:active) #input+#button:before,:host([invalid]:active) #input+#button:before{border-color:var(
76
+ --spectrum-radio-m-emphasized-text-color-error-hover,var(--spectrum-alias-component-text-color-error-hover)
77
+ )}:host([emphasized][invalid]:active) #label,:host([invalid]:active) #label{color:var(
78
+ --spectrum-radio-m-emphasized-text-color-error-down,var(--spectrum-alias-component-text-color-error-down)
79
+ )}:host([emphasized][invalid]) #button:before,:host([emphasized][invalid][checked]) #input+#button:before,:host([invalid]) #button:before,:host([invalid][checked]) #input+#button:before{border-color:var(
80
+ --spectrum-radio-m-emphasized-circle-border-color-error,var(--spectrum-global-color-red-500)
81
+ )}:host([emphasized][invalid]) #label,:host([invalid]) #label{color:var(
82
+ --spectrum-radio-m-emphasized-text-color-error,var(--spectrum-alias-component-text-color-error-default)
83
+ )}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(
84
+ --spectrum-radio-m-circle-border-color-disabled,var(--spectrum-global-color-gray-400)
85
+ )}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(
86
+ --spectrum-radio-m-text-color-disabled,var(--spectrum-alias-component-text-color-disabled)
87
+ )}:host(.focus-visible) #input+#button:before,:host(:hover.focus-visible) #input+#button:before{border-color:var(
88
+ --spectrum-radio-m-circle-border-color-key-focus,var(--spectrum-alias-toggle-border-color-key-focus)
89
+ )}:host(:focus-visible) #input+#button:before,:host(:hover:focus-visible) #input+#button:before{border-color:var(
90
+ --spectrum-radio-m-circle-border-color-key-focus,var(--spectrum-alias-toggle-border-color-key-focus)
91
+ )}:host(.focus-visible) #input+#button:after,:host(:hover.focus-visible) #input+#button:after{box-shadow:0 0 0 var(
92
+ --spectrum-radio-m-focus-ring-size,var(--spectrum-alias-focus-ring-size)
93
+ ) var(
94
+ --spectrum-radio-m-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color)
95
+ );forced-color-adjust:none}:host(:focus-visible) #input+#button:after,:host(:hover:focus-visible) #input+#button:after{box-shadow:0 0 0 var(
96
+ --spectrum-radio-m-focus-ring-size,var(--spectrum-alias-focus-ring-size)
97
+ ) var(
98
+ --spectrum-radio-m-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color)
99
+ );forced-color-adjust:none}:host(.focus-visible[checked]) #input+#button:before,:host(:hover.focus-visible[checked]) #input+#button:before{border-color:var(
100
+ --spectrum-radio-m-circle-border-color-selected-key-focus,var(--spectrum-alias-toggle-background-color-key-focus)
101
+ )}:host(:focus-visible[checked]) #input+#button:before,:host(:hover:focus-visible[checked]) #input+#button:before{border-color:var(
102
+ --spectrum-radio-m-circle-border-color-selected-key-focus,var(--spectrum-alias-toggle-background-color-key-focus)
103
+ )}:host([emphasized][checked].focus-visible) #input+#button:before,:host([emphasized][checked]:hover.focus-visible) #input+#button:before{border-color:var(
104
+ --spectrum-radio-m-emphasized-circle-border-color-selected-key-focus,var(
105
+ --spectrum-alias-toggle-background-color-emphasized-selected-key-focus
106
+ )
107
+ )}:host([emphasized][checked]:focus-visible) #input+#button:before,:host([emphasized][checked]:hover:focus-visible) #input+#button:before{border-color:var(
108
+ --spectrum-radio-m-emphasized-circle-border-color-selected-key-focus,var(
109
+ --spectrum-alias-toggle-background-color-emphasized-selected-key-focus
110
+ )
111
+ )}@media (forced-colors:active){:host{--spectrum-radio-m-circle-background-color:ButtonFace;--spectrum-radio-m-circle-border-color-down:Highlight;--spectrum-radio-m-circle-border-color-disabled:GrayText;--spectrum-radio-m-circle-border-color-hover:Highlight;--spectrum-radio-m-circle-border-color-key-focus:Highlight;--spectrum-radio-m-circle-border-color-selected-down:Highlight;--spectrum-radio-m-circle-border-color-selected-hover:Highlight;--spectrum-radio-m-circle-border-color-selected-key-focus:Highlight;--spectrum-radio-m-circle-border-color-selected:Highlight;--spectrum-radio-m-circle-border-color:ButtonText;--spectrum-radio-m-emphasized-circle-border-color-error-hover:Highlight;--spectrum-radio-m-emphasized-circle-border-color-error:ButtonText;--spectrum-radio-m-emphasized-circle-border-color-selected-down:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected-hover:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected:Highlight;--spectrum-radio-m-emphasized-text-color-error-down:CanvasText;--spectrum-radio-m-emphasized-text-color-error-hover:CanvasText;--spectrum-radio-m-emphasized-text-color-error:CanvasText;--spectrum-radio-m-focus-ring-color-key-focus:CanvasText;--spectrum-radio-m-text-color-down:CanvasText;--spectrum-radio-m-text-color-hover:CanvasText;--spectrum-radio-m-text-color:CanvasText;--spectrum-radio-m-text-color-disabled:GrayText}:host([invalid][checked]) #input+#button:before{border-color:var(
112
+ --spectrum-radio-m-circle-border-color-selected,var(--spectrum-alias-toggle-background-color-default)
113
+ )}}:host{--spectrum-radio-label-margin-top:var(
114
+ --spectrum-global-dimension-size-75,6px
115
+ )}:host(:focus){outline:none}:host([disabled]){pointer-events:none}
116
+ `;
117
+ export default styles;
118
+ //# sourceMappingURL=radio.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["radio.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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:host{--spectrum-radio-circle-dot-size:var(\n--spectrum-radio-m-circle-dot-size,var(--spectrum-global-dimension-static-size-50)\n);--spectrum-radio-circle-diameter:var(\n--spectrum-radio-m-circle-diameter,var(--spectrum-alias-control-two-size-m)\n);--spectrum-radio-circle-border-size:var(\n--spectrum-radio-m-circle-border-size,var(--spectrum-alias-border-size-thick)\n);--spectrum-radio-text-size:var(\n--spectrum-radio-m-text-size,var(--spectrum-global-dimension-font-size-100)\n);--spectrum-radio-text-gap:var(\n--spectrum-radio-m-text-gap,var(--spectrum-global-dimension-size-125)\n);--spectrum-radio-text-font-style:var(\n--spectrum-radio-m-text-font-style,var(--spectrum-global-font-style-regular)\n);--spectrum-radio-text-font-weight:var(\n--spectrum-radio-m-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);--spectrum-radio-text-line-height:var(\n--spectrum-radio-m-text-line-height,var(--spectrum-alias-component-text-line-height)\n);--spectrum-radio-height:var(\n--spectrum-radio-m-height,var(--spectrum-global-dimension-size-400)\n);--spectrum-radio-radius:calc(var(--spectrum-radio-circle-diameter)/2);--spectrum-radio-border-width-checked:calc(var(--spectrum-radio-circle-diameter)/2 - var(--spectrum-radio-circle-dot-size)/2);--spectrum-radio-labelbelow-label-margin:var(\n--spectrum-global-dimension-size-50\n) 0 0 0;--spectrum-radio-labelbelow-height:auto;--spectrum-radio-label-margin-top:var(--spectrum-global-dimension-size-75)}:host{align-items:flex-start;display:inline-flex;max-width:100%;min-height:var(--spectrum-radio-height);position:relative;vertical-align:top}#input{box-sizing:border-box;cursor:pointer;font-family:inherit;font-size:100%;height:100%;line-height:1.15;margin:0;opacity:0;overflow:visible;padding:0;position:absolute;width:100%;z-index:1}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:var(\n--spectrum-radio-border-width-checked\n)}:host(.focus-visible) #input+#button:after{margin:calc(var(\n--spectrum-alias-focus-ring-gap,\nvar(--spectrum-global-dimension-static-size-25)\n)*-1)}:host(:focus-visible) #input+#button:after{margin:calc(var(\n--spectrum-alias-focus-ring-gap,\nvar(--spectrum-global-dimension-static-size-25)\n)*-1)}:host([dir=ltr]) #label{text-align:left}:host([dir=rtl]) #label{text-align:right}:host([dir=ltr]) #label{margin-left:var(\n--spectrum-radio-text-gap\n)}:host([dir=rtl]) #label{margin-right:var(\n--spectrum-radio-text-gap\n)}#label{font-size:var(--spectrum-radio-text-size);font-style:var(--spectrum-radio-text-font-style);font-weight:var(--spectrum-radio-text-font-weight);line-height:var(--spectrum-radio-text-line-height);margin-top:var(\n--spectrum-radio-label-margin-top\n);transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}#button{box-sizing:border-box;flex-grow:0;flex-shrink:0;height:var(--spectrum-radio-circle-diameter);margin:calc((var(--spectrum-radio-height) - var(--spectrum-radio-circle-diameter))/2) 0;position:relative;width:var(--spectrum-radio-circle-diameter)}#button:before{border-radius:var(--spectrum-radio-radius);border-style:solid;border-width:var(--spectrum-radio-circle-border-size);box-sizing:border-box;content:\"\";display:block;height:var(--spectrum-radio-circle-diameter);position:absolute;transition:border var(--spectrum-global-animation-duration-100,.13s) ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s) ease-in-out;width:var(--spectrum-radio-circle-diameter);z-index:0}#button:after{border-radius:100%;bottom:0;content:\"\";display:block;left:0;margin:var(\n--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)\n);position:absolute;right:0;top:0;transition:opacity var(--spectrum-global-animation-duration-100,.13s) ease-out,margin var(--spectrum-global-animation-duration-100,.13s) ease-out}:host([label-below]){align-items:center;display:inline-flex;flex-direction:column;height:var(--spectrum-radio-labelbelow-height)}:host([label-below]) #button{flex-shrink:0;margin:0}:host([label-below]) #label{margin:var(\n--spectrum-radio-labelbelow-label-margin\n)}:host{--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-emphasized-selected-hover)\n)}:host([checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected,var(--spectrum-alias-toggle-background-color-default)\n)}#label{color:var(\n--spectrum-radio-m-text-color,var(--spectrum-alias-component-text-color-default)\n)}#button:before{background-color:var(\n--spectrum-radio-m-circle-background-color,var(--spectrum-global-color-gray-75)\n);border-color:var(\n--spectrum-radio-m-circle-border-color,var(--spectrum-alias-toggle-border-color-default)\n);forced-color-adjust:none}:host(:hover) #button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-hover,var(--spectrum-alias-toggle-border-color-hover)\n);box-shadow:none}:host(:hover[checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-hover)\n)}:host(:hover) #label{color:var(\n--spectrum-radio-m-text-color-hover,var(--spectrum-alias-component-text-color-hover)\n)}:host(:active) #button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-down,var(--spectrum-alias-toggle-border-color-down)\n)}:host(:active[checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected-down,var(--spectrum-alias-toggle-background-color-down)\n)}:host(:active) #label{color:var(\n--spectrum-radio-m-text-color-down,var(--spectrum-alias-component-text-color-down)\n)}:host([emphasized][checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected,var(\n--spectrum-alias-toggle-background-color-emphasized-selected-default\n)\n)}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected-hover,var(--spectrum-alias-toggle-background-color-emphasized-selected-hover)\n)}:host([emphasized][checked]:active) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected-down,var(--spectrum-alias-toggle-background-color-emphasized-selected-down)\n)}:host([emphasized][invalid]:hover) #input+#button:before,:host([invalid]:hover) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-error-hover,var(--spectrum-global-color-red-600)\n)}:host([emphasized][invalid]:hover) #label,:host([invalid]:hover) #label{color:var(\n--spectrum-radio-m-emphasized-text-color-error-hover,var(--spectrum-alias-component-text-color-error-hover)\n)}:host([emphasized][invalid]:active) #input+#button:before,:host([invalid]:active) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-text-color-error-hover,var(--spectrum-alias-component-text-color-error-hover)\n)}:host([emphasized][invalid]:active) #label,:host([invalid]:active) #label{color:var(\n--spectrum-radio-m-emphasized-text-color-error-down,var(--spectrum-alias-component-text-color-error-down)\n)}:host([emphasized][invalid]) #button:before,:host([emphasized][invalid][checked]) #input+#button:before,:host([invalid]) #button:before,:host([invalid][checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-error,var(--spectrum-global-color-red-500)\n)}:host([emphasized][invalid]) #label,:host([invalid]) #label{color:var(\n--spectrum-radio-m-emphasized-text-color-error,var(--spectrum-alias-component-text-color-error-default)\n)}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-disabled,var(--spectrum-global-color-gray-400)\n)}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(\n--spectrum-radio-m-text-color-disabled,var(--spectrum-alias-component-text-color-disabled)\n)}:host(.focus-visible) #input+#button:before,:host(:hover.focus-visible) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-key-focus,var(--spectrum-alias-toggle-border-color-key-focus)\n)}:host(:focus-visible) #input+#button:before,:host(:hover:focus-visible) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-key-focus,var(--spectrum-alias-toggle-border-color-key-focus)\n)}:host(.focus-visible) #input+#button:after,:host(:hover.focus-visible) #input+#button:after{box-shadow:0 0 0 var(\n--spectrum-radio-m-focus-ring-size,var(--spectrum-alias-focus-ring-size)\n) var(\n--spectrum-radio-m-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color)\n);forced-color-adjust:none}:host(:focus-visible) #input+#button:after,:host(:hover:focus-visible) #input+#button:after{box-shadow:0 0 0 var(\n--spectrum-radio-m-focus-ring-size,var(--spectrum-alias-focus-ring-size)\n) var(\n--spectrum-radio-m-focus-ring-color-key-focus,var(--spectrum-alias-focus-ring-color)\n);forced-color-adjust:none}:host(.focus-visible[checked]) #input+#button:before,:host(:hover.focus-visible[checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected-key-focus,var(--spectrum-alias-toggle-background-color-key-focus)\n)}:host(:focus-visible[checked]) #input+#button:before,:host(:hover:focus-visible[checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected-key-focus,var(--spectrum-alias-toggle-background-color-key-focus)\n)}:host([emphasized][checked].focus-visible) #input+#button:before,:host([emphasized][checked]:hover.focus-visible) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus,var(\n--spectrum-alias-toggle-background-color-emphasized-selected-key-focus\n)\n)}:host([emphasized][checked]:focus-visible) #input+#button:before,:host([emphasized][checked]:hover:focus-visible) #input+#button:before{border-color:var(\n--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus,var(\n--spectrum-alias-toggle-background-color-emphasized-selected-key-focus\n)\n)}@media (forced-colors:active){:host{--spectrum-radio-m-circle-background-color:ButtonFace;--spectrum-radio-m-circle-border-color-down:Highlight;--spectrum-radio-m-circle-border-color-disabled:GrayText;--spectrum-radio-m-circle-border-color-hover:Highlight;--spectrum-radio-m-circle-border-color-key-focus:Highlight;--spectrum-radio-m-circle-border-color-selected-down:Highlight;--spectrum-radio-m-circle-border-color-selected-hover:Highlight;--spectrum-radio-m-circle-border-color-selected-key-focus:Highlight;--spectrum-radio-m-circle-border-color-selected:Highlight;--spectrum-radio-m-circle-border-color:ButtonText;--spectrum-radio-m-emphasized-circle-border-color-error-hover:Highlight;--spectrum-radio-m-emphasized-circle-border-color-error:ButtonText;--spectrum-radio-m-emphasized-circle-border-color-selected-down:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected-hover:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected-key-focus:Highlight;--spectrum-radio-m-emphasized-circle-border-color-selected:Highlight;--spectrum-radio-m-emphasized-text-color-error-down:CanvasText;--spectrum-radio-m-emphasized-text-color-error-hover:CanvasText;--spectrum-radio-m-emphasized-text-color-error:CanvasText;--spectrum-radio-m-focus-ring-color-key-focus:CanvasText;--spectrum-radio-m-text-color-down:CanvasText;--spectrum-radio-m-text-color-hover:CanvasText;--spectrum-radio-m-text-color:CanvasText;--spectrum-radio-m-text-color-disabled:GrayText}:host([invalid][checked]) #input+#button:before{border-color:var(\n--spectrum-radio-m-circle-border-color-selected,var(--spectrum-alias-toggle-background-color-default)\n)}}:host{--spectrum-radio-label-margin-top:var(\n--spectrum-global-dimension-size-75,6px\n)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmHf,eAAe;",
6
+ "names": []
7
+ }