@spectrum-web-components/tags 0.35.1-rc.41 → 0.36.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/README.md CHANGED
@@ -86,7 +86,7 @@ import {
86
86
 
87
87
  ### Deletable
88
88
 
89
- Use the `deletable` attribute to signify `sp-tags` elements that can be removed. The tags will only be focusable when they have the `deletable` attribute.
89
+ Use the `deletable` attribute to signify `sp-tags` elements that can be removed. The tags will only be focusable and deletable when they have the `deletable` and non-disabled attribute.
90
90
 
91
91
  ```html-live
92
92
  <sp-tags>
@@ -0,0 +1,293 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "sp-tag.js",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "sp-tag",
13
+ "declaration": {
14
+ "name": "Tag",
15
+ "module": "/src/Tag.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "sp-tags.js",
23
+ "declarations": [],
24
+ "exports": [
25
+ {
26
+ "kind": "custom-element-definition",
27
+ "name": "sp-tags",
28
+ "declaration": {
29
+ "name": "Tags",
30
+ "module": "/src/Tags.js"
31
+ }
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "kind": "javascript-module",
37
+ "path": "src/Tag.js",
38
+ "declarations": [
39
+ {
40
+ "kind": "class",
41
+ "description": "",
42
+ "name": "Tag",
43
+ "slots": [
44
+ {
45
+ "description": "text content for labeling the tag",
46
+ "name": ""
47
+ },
48
+ {
49
+ "description": "an avatar element to display within the Tag",
50
+ "name": "avatar"
51
+ },
52
+ {
53
+ "description": "an icon element to display within the Tag",
54
+ "name": "icon"
55
+ }
56
+ ],
57
+ "members": [
58
+ {
59
+ "kind": "field",
60
+ "name": "deletable",
61
+ "type": {
62
+ "text": "boolean"
63
+ },
64
+ "privacy": "public",
65
+ "default": "false",
66
+ "attribute": "deletable",
67
+ "reflects": true
68
+ },
69
+ {
70
+ "kind": "field",
71
+ "name": "disabled",
72
+ "type": {
73
+ "text": "boolean"
74
+ },
75
+ "privacy": "public",
76
+ "default": "false",
77
+ "attribute": "disabled",
78
+ "reflects": true
79
+ },
80
+ {
81
+ "kind": "field",
82
+ "name": "readonly",
83
+ "type": {
84
+ "text": "boolean"
85
+ },
86
+ "privacy": "public",
87
+ "default": "false",
88
+ "attribute": "readonly",
89
+ "reflects": true
90
+ },
91
+ {
92
+ "kind": "field",
93
+ "name": "hasIcon",
94
+ "type": {
95
+ "text": "boolean"
96
+ },
97
+ "privacy": "private",
98
+ "readonly": true
99
+ },
100
+ {
101
+ "kind": "field",
102
+ "name": "hasAvatar",
103
+ "type": {
104
+ "text": "boolean"
105
+ },
106
+ "privacy": "private",
107
+ "readonly": true
108
+ },
109
+ {
110
+ "kind": "field",
111
+ "name": "handleFocusin",
112
+ "privacy": "private"
113
+ },
114
+ {
115
+ "kind": "field",
116
+ "name": "handleFocusout",
117
+ "privacy": "private"
118
+ },
119
+ {
120
+ "kind": "field",
121
+ "name": "handleKeydown",
122
+ "privacy": "private"
123
+ },
124
+ {
125
+ "kind": "method",
126
+ "name": "delete",
127
+ "privacy": "private",
128
+ "return": {
129
+ "type": {
130
+ "text": "void"
131
+ }
132
+ }
133
+ }
134
+ ],
135
+ "events": [
136
+ {
137
+ "name": "delete",
138
+ "type": {
139
+ "text": "Event"
140
+ }
141
+ }
142
+ ],
143
+ "attributes": [
144
+ {
145
+ "name": "deletable",
146
+ "type": {
147
+ "text": "boolean"
148
+ },
149
+ "default": "false",
150
+ "fieldName": "deletable"
151
+ },
152
+ {
153
+ "name": "disabled",
154
+ "type": {
155
+ "text": "boolean"
156
+ },
157
+ "default": "false",
158
+ "fieldName": "disabled"
159
+ },
160
+ {
161
+ "name": "readonly",
162
+ "type": {
163
+ "text": "boolean"
164
+ },
165
+ "default": "false",
166
+ "fieldName": "readonly"
167
+ }
168
+ ],
169
+ "mixins": [
170
+ {
171
+ "name": "SizedMixin",
172
+ "package": "@spectrum-web-components/base"
173
+ }
174
+ ],
175
+ "superclass": {
176
+ "name": "SpectrumElement",
177
+ "package": "@spectrum-web-components/base"
178
+ },
179
+ "tagName": "sp-tag",
180
+ "customElement": true
181
+ }
182
+ ],
183
+ "exports": [
184
+ {
185
+ "kind": "js",
186
+ "name": "Tag",
187
+ "declaration": {
188
+ "name": "Tag",
189
+ "module": "src/Tag.js"
190
+ }
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "kind": "javascript-module",
196
+ "path": "src/Tags.js",
197
+ "declarations": [
198
+ {
199
+ "kind": "class",
200
+ "description": "",
201
+ "name": "Tags",
202
+ "slots": [
203
+ {
204
+ "description": "Tag elements to manage as a group",
205
+ "name": ""
206
+ }
207
+ ],
208
+ "members": [
209
+ {
210
+ "kind": "field",
211
+ "name": "defaultNodes",
212
+ "type": {
213
+ "text": "Node[]"
214
+ },
215
+ "privacy": "public"
216
+ },
217
+ {
218
+ "kind": "field",
219
+ "name": "tags",
220
+ "type": {
221
+ "text": "Tag[]"
222
+ },
223
+ "privacy": "public",
224
+ "readonly": true
225
+ },
226
+ {
227
+ "kind": "field",
228
+ "name": "rovingTabindexController",
229
+ "default": "new RovingTabindexController<Tag>(this, {\n focusInIndex: (elements: Tag[]) => {\n return elements.findIndex((el) => {\n return !el.disabled && el.deletable;\n });\n },\n elements: () => this.tags,\n isFocusableElement: (el: Tag) => !el.disabled && el.deletable,\n })"
230
+ },
231
+ {
232
+ "kind": "method",
233
+ "name": "focus",
234
+ "privacy": "public",
235
+ "return": {
236
+ "type": {
237
+ "text": "void"
238
+ }
239
+ }
240
+ },
241
+ {
242
+ "kind": "field",
243
+ "name": "handleFocusin",
244
+ "privacy": "private"
245
+ },
246
+ {
247
+ "kind": "field",
248
+ "name": "handleKeydown",
249
+ "privacy": "private"
250
+ },
251
+ {
252
+ "kind": "field",
253
+ "name": "handleFocusout",
254
+ "privacy": "private"
255
+ },
256
+ {
257
+ "kind": "method",
258
+ "name": "handleSlotchange",
259
+ "privacy": "private",
260
+ "return": {
261
+ "type": {
262
+ "text": "void"
263
+ }
264
+ }
265
+ }
266
+ ],
267
+ "mixins": [
268
+ {
269
+ "name": "FocusVisiblePolyfillMixin",
270
+ "package": "@spectrum-web-components/shared/src/focus-visible.js"
271
+ }
272
+ ],
273
+ "superclass": {
274
+ "name": "SpectrumElement",
275
+ "package": "@spectrum-web-components/base"
276
+ },
277
+ "tagName": "sp-tags",
278
+ "customElement": true
279
+ }
280
+ ],
281
+ "exports": [
282
+ {
283
+ "kind": "js",
284
+ "name": "Tags",
285
+ "declaration": {
286
+ "name": "Tags",
287
+ "module": "src/Tags.js"
288
+ }
289
+ }
290
+ ]
291
+ }
292
+ ]
293
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/tags",
3
- "version": "0.35.1-rc.41+6ac4e82f0",
3
+ "version": "0.36.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -66,14 +66,14 @@
66
66
  "lit-html"
67
67
  ],
68
68
  "dependencies": {
69
- "@spectrum-web-components/base": "^0.35.1-rc.41+6ac4e82f0",
70
- "@spectrum-web-components/button": "^0.35.1-rc.41+6ac4e82f0",
71
- "@spectrum-web-components/reactive-controllers": "^0.35.1-rc.41+6ac4e82f0",
72
- "@spectrum-web-components/shared": "^0.35.1-rc.41+6ac4e82f0"
69
+ "@spectrum-web-components/base": "^0.36.0",
70
+ "@spectrum-web-components/button": "^0.36.0",
71
+ "@spectrum-web-components/reactive-controllers": "^0.36.0",
72
+ "@spectrum-web-components/shared": "^0.36.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@spectrum-css/tag": "^5.0.42",
76
- "@spectrum-css/taggroup": "^3.3.55"
75
+ "@spectrum-css/tag": "^5.0.46",
76
+ "@spectrum-css/taggroup": "^3.3.60"
77
77
  },
78
78
  "types": "./src/index.d.ts",
79
79
  "customElements": "custom-elements.json",
@@ -81,5 +81,5 @@
81
81
  "./sp-*.js",
82
82
  "./**/*.dev.js"
83
83
  ],
84
- "gitHead": "6ac4e82f0a4a68eb50b5dd4b96a562060162ac6f"
84
+ "gitHead": "a532ff8a410abeefb54d9638a2316ae82570566e"
85
85
  }
package/src/Tag.dev.js CHANGED
@@ -35,7 +35,7 @@ export class Tag extends SizedMixin(SpectrumElement, {
35
35
  this.removeEventListener("focusout", this.handleFocusout);
36
36
  };
37
37
  this.handleKeydown = (event) => {
38
- if (!this.deletable) {
38
+ if (!this.deletable || this.disabled) {
39
39
  return;
40
40
  }
41
41
  const { code } = event;
@@ -44,7 +44,6 @@ export class Tag extends SizedMixin(SpectrumElement, {
44
44
  case "Space":
45
45
  case "Delete":
46
46
  this.delete();
47
- return;
48
47
  default:
49
48
  return;
50
49
  }
@@ -64,11 +63,16 @@ export class Tag extends SizedMixin(SpectrumElement, {
64
63
  if (this.readonly) {
65
64
  return;
66
65
  }
67
- this.dispatchEvent(
66
+ const applyDefault = this.dispatchEvent(
68
67
  new Event("delete", {
69
- bubbles: true
68
+ bubbles: true,
69
+ composed: true
70
70
  })
71
71
  );
72
+ if (!applyDefault) {
73
+ return;
74
+ }
75
+ this.remove();
72
76
  }
73
77
  render() {
74
78
  const slots = [];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Tag.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 {\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';\n\nimport '@spectrum-web-components/button/sp-clear-button.js';\n\nimport styles from './tag.css.js';\n\n/**\n * @element sp-tag\n *\n * @slot - text content for labeling the tag\n * @slot avatar - an avatar element to display within the Tag\n * @slot icon - an icon element to display within the Tag\n */\nexport class Tag extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public deletable = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n private get hasIcon(): boolean {\n return !!this.querySelector('[slot=\"icon\"]');\n }\n\n private get hasAvatar(): boolean {\n return !!this.querySelector('[slot=\"avatar\"]');\n }\n\n constructor() {\n super();\n this.addEventListener('focusin', this.handleFocusin);\n }\n\n private handleFocusin = (): void => {\n this.addEventListener('focusout', this.handleFocusout);\n this.addEventListener('keydown', this.handleKeydown);\n };\n\n private handleFocusout = (): void => {\n this.removeEventListener('keydown', this.handleKeydown);\n this.removeEventListener('focusout', this.handleFocusout);\n };\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (!this.deletable) {\n return;\n }\n const { code } = event;\n switch (code) {\n case 'Backspace':\n case 'Space':\n case 'Delete':\n this.delete();\n return;\n default:\n return;\n }\n };\n\n private delete(): void {\n if (this.readonly) {\n return;\n }\n this.dispatchEvent(\n new Event('delete', {\n bubbles: true,\n })\n );\n }\n\n protected override render(): TemplateResult {\n const slots: TemplateResult[] = [];\n if (this.hasAvatar) {\n slots.push(\n html`\n <slot name=\"avatar\"></slot>\n `\n );\n }\n if (this.hasIcon) {\n slots.push(\n html`\n <slot name=\"icon\"></slot>\n `\n );\n }\n return html`\n ${slots}\n <span class=\"label\"><slot></slot></span>\n ${this.deletable\n ? html`\n <sp-clear-button\n class=\"clear-button\"\n ?disabled=${this.disabled}\n label=\"Remove\"\n size=\"s\"\n tabindex=\"-1\"\n @click=${this.delete}\n ></sp-clear-button>\n `\n : html``}\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n if (this.deletable) {\n this.setAttribute('tabindex', '0');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\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
- "mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO;AAEP,OAAO,YAAY;AASZ,aAAM,YAAY,WAAW,iBAAiB;AAAA,EACjD,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAsBC,cAAc;AACV,UAAM;AAjBV,SAAO,YAAY;AAGnB,SAAO,WAAW;AAGlB,SAAO,WAAW;AAelB,SAAQ,gBAAgB,MAAY;AAChC,WAAK,iBAAiB,YAAY,KAAK,cAAc;AACrD,WAAK,iBAAiB,WAAW,KAAK,aAAa;AAAA,IACvD;AAEA,SAAQ,iBAAiB,MAAY;AACjC,WAAK,oBAAoB,WAAW,KAAK,aAAa;AACtD,WAAK,oBAAoB,YAAY,KAAK,cAAc;AAAA,IAC5D;AAEA,SAAQ,gBAAgB,CAAC,UAA+B;AACpD,UAAI,CAAC,KAAK,WAAW;AACjB;AAAA,MACJ;AACA,YAAM,EAAE,KAAK,IAAI;AACjB,cAAQ,MAAM;AAAA,QACV,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AACD,eAAK,OAAO;AACZ;AAAA,QACJ;AACI;AAAA,MACR;AAAA,IACJ;AA3BI,SAAK,iBAAiB,WAAW,KAAK,aAAa;AAAA,EACvD;AAAA,EAxBA,WAA2B,SAAyB;AAChD,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AAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAPjC,IAQF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAVjC,IAWF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAbjC,IAcF;",
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 {\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';\n\nimport '@spectrum-web-components/button/sp-clear-button.js';\n\nimport styles from './tag.css.js';\n\n/**\n * @element sp-tag\n *\n * @slot - text content for labeling the tag\n * @slot avatar - an avatar element to display within the Tag\n * @slot icon - an icon element to display within the Tag\n */\nexport class Tag extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public deletable = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n private get hasIcon(): boolean {\n return !!this.querySelector('[slot=\"icon\"]');\n }\n\n private get hasAvatar(): boolean {\n return !!this.querySelector('[slot=\"avatar\"]');\n }\n\n constructor() {\n super();\n this.addEventListener('focusin', this.handleFocusin);\n }\n\n private handleFocusin = (): void => {\n this.addEventListener('focusout', this.handleFocusout);\n this.addEventListener('keydown', this.handleKeydown);\n };\n\n private handleFocusout = (): void => {\n this.removeEventListener('keydown', this.handleKeydown);\n this.removeEventListener('focusout', this.handleFocusout);\n };\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (!this.deletable || this.disabled) {\n return;\n }\n const { code } = event;\n\n switch (code) {\n case 'Backspace':\n case 'Space':\n case 'Delete':\n this.delete();\n default:\n return;\n }\n };\n\n private delete(): void {\n if (this.readonly) {\n return;\n }\n const applyDefault = this.dispatchEvent(\n new Event('delete', {\n bubbles: true,\n composed: true,\n })\n );\n if (!applyDefault) {\n return;\n }\n this.remove();\n }\n\n protected override render(): TemplateResult {\n const slots: TemplateResult[] = [];\n if (this.hasAvatar) {\n slots.push(\n html`\n <slot name=\"avatar\"></slot>\n `\n );\n }\n if (this.hasIcon) {\n slots.push(\n html`\n <slot name=\"icon\"></slot>\n `\n );\n }\n return html`\n ${slots}\n <span class=\"label\"><slot></slot></span>\n ${this.deletable\n ? html`\n <sp-clear-button\n class=\"clear-button\"\n ?disabled=${this.disabled}\n label=\"Remove\"\n size=\"s\"\n tabindex=\"-1\"\n @click=${this.delete}\n ></sp-clear-button>\n `\n : html``}\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n if (this.deletable) {\n this.setAttribute('tabindex', '0');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\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
+ "mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO;AAEP,OAAO,YAAY;AASZ,aAAM,YAAY,WAAW,iBAAiB;AAAA,EACjD,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAsBC,cAAc;AACV,UAAM;AAjB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A,QACF;AAAA;AAAA;AAAA,MAGJ;AAAA,IACJ;AACA,WAAO;AAAA,cACD,KAAK;AAAA;AAAA,cAEL,KAAK,YACD;AAAA;AAAA;AAAA,sCAGoB,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,mCAIhB,KAAK,MAAM;AAAA;AAAA,sBAG5B,MAAM;AAAA;AAAA,EAEpB;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa,MAAM,GAAG;AAC5B,WAAK,aAAa,QAAQ,UAAU;AAAA,IACxC;AACA,QAAI,KAAK,WAAW;AAChB,WAAK,aAAa,YAAY,GAAG;AAAA,IACrC;AAAA,EACJ;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,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;AArHW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAPjC,IAQF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAVjC,IAWF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAbjC,IAcF;",
6
6
  "names": []
7
7
  }
package/src/Tag.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=(l,r,e,s)=>{for(var t=s>1?void 0:s?c(r,e):r,o=l.length-1,d;o>=0;o--)(d=l[o])&&(t=(s?d(r,e,t):d(t))||t);return s&&t&&u(r,e,t),t};import{html as i,SizedMixin as h,SpectrumElement as p}from"@spectrum-web-components/base";import{property as n}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/button/sp-clear-button.js";import b from"./tag.css.js";export class Tag extends h(p,{validSizes:["s","m","l"]}){constructor(){super();this.deletable=!1;this.disabled=!1;this.readonly=!1;this.handleFocusin=()=>{this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown)};this.handleFocusout=()=>{this.removeEventListener("keydown",this.handleKeydown),this.removeEventListener("focusout",this.handleFocusout)};this.handleKeydown=e=>{if(!this.deletable)return;const{code:s}=e;switch(s){case"Backspace":case"Space":case"Delete":this.delete();return;default:return}};this.addEventListener("focusin",this.handleFocusin)}static get styles(){return[b]}get hasIcon(){return!!this.querySelector('[slot="icon"]')}get hasAvatar(){return!!this.querySelector('[slot="avatar"]')}delete(){this.readonly||this.dispatchEvent(new Event("delete",{bubbles:!0}))}render(){const e=[];return this.hasAvatar&&e.push(i`
1
+ "use strict";var u=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=(l,i,e,s)=>{for(var t=s>1?void 0:s?p(i,e):i,o=l.length-1,d;o>=0;o--)(d=l[o])&&(t=(s?d(i,e,t):d(t))||t);return s&&t&&u(i,e,t),t};import{html as r,SizedMixin as c,SpectrumElement as h}from"@spectrum-web-components/base";import{property as n}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/button/sp-clear-button.js";import b from"./tag.css.js";export class Tag extends c(h,{validSizes:["s","m","l"]}){constructor(){super();this.deletable=!1;this.disabled=!1;this.readonly=!1;this.handleFocusin=()=>{this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown)};this.handleFocusout=()=>{this.removeEventListener("keydown",this.handleKeydown),this.removeEventListener("focusout",this.handleFocusout)};this.handleKeydown=e=>{if(!this.deletable||this.disabled)return;const{code:s}=e;switch(s){case"Backspace":case"Space":case"Delete":this.delete();default:return}};this.addEventListener("focusin",this.handleFocusin)}static get styles(){return[b]}get hasIcon(){return!!this.querySelector('[slot="icon"]')}get hasAvatar(){return!!this.querySelector('[slot="avatar"]')}delete(){this.readonly||!this.dispatchEvent(new Event("delete",{bubbles:!0,composed:!0}))||this.remove()}render(){const e=[];return this.hasAvatar&&e.push(r`
2
2
  <slot name="avatar"></slot>
3
- `),this.hasIcon&&e.push(i`
3
+ `),this.hasIcon&&e.push(r`
4
4
  <slot name="icon"></slot>
5
- `),i`
5
+ `),r`
6
6
  ${e}
7
7
  <span class="label"><slot></slot></span>
8
- ${this.deletable?i`
8
+ ${this.deletable?r`
9
9
  <sp-clear-button
10
10
  class="clear-button"
11
11
  ?disabled=${this.disabled}
@@ -14,6 +14,6 @@
14
14
  tabindex="-1"
15
15
  @click=${this.delete}
16
16
  ></sp-clear-button>
17
- `:i``}
17
+ `:r``}
18
18
  `}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","listitem"),this.deletable&&this.setAttribute("tabindex","0")}updated(e){super.updated(e),e.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}a([n({type:Boolean,reflect:!0})],Tag.prototype,"deletable",2),a([n({type:Boolean,reflect:!0})],Tag.prototype,"disabled",2),a([n({type:Boolean,reflect:!0})],Tag.prototype,"readonly",2);
19
19
  //# sourceMappingURL=Tag.js.map
package/src/Tag.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Tag.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 {\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';\n\nimport '@spectrum-web-components/button/sp-clear-button.js';\n\nimport styles from './tag.css.js';\n\n/**\n * @element sp-tag\n *\n * @slot - text content for labeling the tag\n * @slot avatar - an avatar element to display within the Tag\n * @slot icon - an icon element to display within the Tag\n */\nexport class Tag extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public deletable = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n private get hasIcon(): boolean {\n return !!this.querySelector('[slot=\"icon\"]');\n }\n\n private get hasAvatar(): boolean {\n return !!this.querySelector('[slot=\"avatar\"]');\n }\n\n constructor() {\n super();\n this.addEventListener('focusin', this.handleFocusin);\n }\n\n private handleFocusin = (): void => {\n this.addEventListener('focusout', this.handleFocusout);\n this.addEventListener('keydown', this.handleKeydown);\n };\n\n private handleFocusout = (): void => {\n this.removeEventListener('keydown', this.handleKeydown);\n this.removeEventListener('focusout', this.handleFocusout);\n };\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (!this.deletable) {\n return;\n }\n const { code } = event;\n switch (code) {\n case 'Backspace':\n case 'Space':\n case 'Delete':\n this.delete();\n return;\n default:\n return;\n }\n };\n\n private delete(): void {\n if (this.readonly) {\n return;\n }\n this.dispatchEvent(\n new Event('delete', {\n bubbles: true,\n })\n );\n }\n\n protected override render(): TemplateResult {\n const slots: TemplateResult[] = [];\n if (this.hasAvatar) {\n slots.push(\n html`\n <slot name=\"avatar\"></slot>\n `\n );\n }\n if (this.hasIcon) {\n slots.push(\n html`\n <slot name=\"icon\"></slot>\n `\n );\n }\n return html`\n ${slots}\n <span class=\"label\"><slot></slot></span>\n ${this.deletable\n ? html`\n <sp-clear-button\n class=\"clear-button\"\n ?disabled=${this.disabled}\n label=\"Remove\"\n size=\"s\"\n tabindex=\"-1\"\n @click=${this.delete}\n ></sp-clear-button>\n `\n : html``}\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n if (this.deletable) {\n this.setAttribute('tabindex', '0');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\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
- "mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,MAAO,qDAEP,OAAOC,MAAY,eASZ,aAAM,YAAYH,EAAWC,EAAiB,CACjD,WAAY,CAAC,IAAK,IAAK,GAAG,CAC9B,CAAC,CAAE,CAsBC,aAAc,CACV,MAAM,EAjBV,KAAO,UAAY,GAGnB,KAAO,SAAW,GAGlB,KAAO,SAAW,GAelB,KAAQ,cAAgB,IAAY,CAChC,KAAK,iBAAiB,WAAY,KAAK,cAAc,EACrD,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACvD,EAEA,KAAQ,eAAiB,IAAY,CACjC,KAAK,oBAAoB,UAAW,KAAK,aAAa,EACtD,KAAK,oBAAoB,WAAY,KAAK,cAAc,CAC5D,EAEA,KAAQ,cAAiBG,GAA+B,CACpD,GAAI,CAAC,KAAK,UACN,OAEJ,KAAM,CAAE,KAAAC,CAAK,EAAID,EACjB,OAAQC,EAAM,CACV,IAAK,YACL,IAAK,QACL,IAAK,SACD,KAAK,OAAO,EACZ,OACJ,QACI,MACR,CACJ,EA3BI,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACvD,CAxBA,WAA2B,QAAyB,CAChD,MAAO,CAACF,CAAM,CAClB,CAWA,IAAY,SAAmB,CAC3B,MAAO,CAAC,CAAC,KAAK,cAAc,eAAe,CAC/C,CAEA,IAAY,WAAqB,CAC7B,MAAO,CAAC,CAAC,KAAK,cAAc,iBAAiB,CACjD,CAiCQ,QAAe,CACf,KAAK,UAGT,KAAK,cACD,IAAI,MAAM,SAAU,CAChB,QAAS,EACb,CAAC,CACL,CACJ,CAEmB,QAAyB,CACxC,MAAMG,EAA0B,CAAC,EACjC,OAAI,KAAK,WACLA,EAAM,KACFP;AAAA;AAAA,iBAGJ,EAEA,KAAK,SACLO,EAAM,KACFP;AAAA;AAAA,iBAGJ,EAEGA;AAAA,cACDO,CAAK;AAAA;AAAA,cAEL,KAAK,UACDP;AAAA;AAAA;AAAA,sCAGoB,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,mCAIhB,KAAK,MAAM;AAAA;AAAA,oBAG5BA,GAAM;AAAA,SAEpB,CAEmB,aAAaQ,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EACrB,KAAK,aAAa,MAAM,GACzB,KAAK,aAAa,OAAQ,UAAU,EAEpC,KAAK,WACL,KAAK,aAAa,WAAY,GAAG,CAEzC,CAEmB,QAAQA,EAA+B,CACtD,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,UAAU,IAClB,KAAK,SACL,KAAK,aAAa,gBAAiB,MAAM,EAEzC,KAAK,gBAAgB,eAAe,EAGhD,CACJ,CAhHWC,EAAA,CADNN,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAPjC,IAQF,yBAGAM,EAAA,CADNN,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAVjC,IAWF,wBAGAM,EAAA,CADNN,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAbjC,IAcF",
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 {\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';\n\nimport '@spectrum-web-components/button/sp-clear-button.js';\n\nimport styles from './tag.css.js';\n\n/**\n * @element sp-tag\n *\n * @slot - text content for labeling the tag\n * @slot avatar - an avatar element to display within the Tag\n * @slot icon - an icon element to display within the Tag\n */\nexport class Tag extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public deletable = false;\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n private get hasIcon(): boolean {\n return !!this.querySelector('[slot=\"icon\"]');\n }\n\n private get hasAvatar(): boolean {\n return !!this.querySelector('[slot=\"avatar\"]');\n }\n\n constructor() {\n super();\n this.addEventListener('focusin', this.handleFocusin);\n }\n\n private handleFocusin = (): void => {\n this.addEventListener('focusout', this.handleFocusout);\n this.addEventListener('keydown', this.handleKeydown);\n };\n\n private handleFocusout = (): void => {\n this.removeEventListener('keydown', this.handleKeydown);\n this.removeEventListener('focusout', this.handleFocusout);\n };\n\n private handleKeydown = (event: KeyboardEvent): void => {\n if (!this.deletable || this.disabled) {\n return;\n }\n const { code } = event;\n\n switch (code) {\n case 'Backspace':\n case 'Space':\n case 'Delete':\n this.delete();\n default:\n return;\n }\n };\n\n private delete(): void {\n if (this.readonly) {\n return;\n }\n const applyDefault = this.dispatchEvent(\n new Event('delete', {\n bubbles: true,\n composed: true,\n })\n );\n if (!applyDefault) {\n return;\n }\n this.remove();\n }\n\n protected override render(): TemplateResult {\n const slots: TemplateResult[] = [];\n if (this.hasAvatar) {\n slots.push(\n html`\n <slot name=\"avatar\"></slot>\n `\n );\n }\n if (this.hasIcon) {\n slots.push(\n html`\n <slot name=\"icon\"></slot>\n `\n );\n }\n return html`\n ${slots}\n <span class=\"label\"><slot></slot></span>\n ${this.deletable\n ? html`\n <sp-clear-button\n class=\"clear-button\"\n ?disabled=${this.disabled}\n label=\"Remove\"\n size=\"s\"\n tabindex=\"-1\"\n @click=${this.delete}\n ></sp-clear-button>\n `\n : html``}\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n if (this.deletable) {\n this.setAttribute('tabindex', '0');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\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
+ "mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,MAAO,qDAEP,OAAOC,MAAY,eASZ,aAAM,YAAYH,EAAWC,EAAiB,CACjD,WAAY,CAAC,IAAK,IAAK,GAAG,CAC9B,CAAC,CAAE,CAsBC,aAAc,CACV,MAAM,EAjBV,KAAO,UAAY,GAGnB,KAAO,SAAW,GAGlB,KAAO,SAAW,GAelB,KAAQ,cAAgB,IAAY,CAChC,KAAK,iBAAiB,WAAY,KAAK,cAAc,EACrD,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACvD,EAEA,KAAQ,eAAiB,IAAY,CACjC,KAAK,oBAAoB,UAAW,KAAK,aAAa,EACtD,KAAK,oBAAoB,WAAY,KAAK,cAAc,CAC5D,EAEA,KAAQ,cAAiBG,GAA+B,CACpD,GAAI,CAAC,KAAK,WAAa,KAAK,SACxB,OAEJ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAQC,EAAM,CACV,IAAK,YACL,IAAK,QACL,IAAK,SACD,KAAK,OAAO,EAChB,QACI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GAbjC,IAcF",
6
6
  "names": ["html", "SizedMixin", "SpectrumElement", "property", "styles", "event", "code", "slots", "changes", "__decorateClass"]
7
7
  }
@@ -523,7 +523,7 @@ var(--spectrum-tag-focus-ring-thickness)
523
523
  )
524
524
  );pointer-events:none}:host([disabled]) ::slotted([slot=avatar]){opacity:var(
525
525
  --mod-avatar-opacity-disabled,var(--spectrum-avatar-opacity-disabled)
526
- )}@media (forced-colors:active){:host{--highcontrast-tag-border-color:ButtonText;--highcontrast-tag-border-color-hover:ButtonText;--highcontrast-tag-border-color-active:ButtonText;--highcontrast-tag-border-color-focus:ButtonText;--highcontrast-tag-background-color:ButtonFace;--highcontrast-tag-background-color-hover:ButtonFace;--highcontrast-tag-background-color-active:ButtonFace;--highcontrast-tag-background-color-focus:ButtonFace;--highcontrast-tag-content-color:ButtonText;--highcontrast-tag-content-color-hover:ButtonText;--highcontrast-tag-content-color-active:ButtonText;--highcontrast-tag-content-color-focus:ButtonText;forced-color-adjust:none}:host([selected]){--highcontrast-tag-border-color-selected:Highlight;--highcontrast-tag-border-color-selected-hover:Highlight;--highcontrast-tag-border-color-selected-active:Highlight;--highcontrast-tag-border-color-selected-focus:Highlight;--highcontrast-tag-background-color-selected:Highlight;--highcontrast-tag-background-color-selected-hover:Highlight;--highcontrast-tag-background-color-selected-active:Highlight;--highcontrast-tag-background-color-selected-focus:Highlight;--highcontrast-tag-content-color-selected:HighlightText}:host([disabled]){--highcontrast-tag-border-color-disabled:GrayText;--highcontrast-tag-background-color-disabled:ButtonFace;--highcontrast-tag-content-color-disabled:GrayText}:host([invalid]){--highcontrast-tag-border-color-invalid:Highlight;--highcontrast-tag-border-color-invalid-hover:Highlight;--highcontrast-tag-border-color-invalid-active:Highlight;--highcontrast-tag-border-color-invalid-focus:Highlight;--highcontrast-tag-content-color-invalid:CanvasText;--highcontrast-tag-content-color-invalid-hover:CanvasText;--highcontrast-tag-content-color-invalid-active:CanvasText;--highcontrast-tag-content-color-invalid-focus:CanvasText}:host([invalid][selected]){--highcontrast-tag-border-color-invalid-selected:Highlight;--highcontrast-tag-border-color-invalid-selected-hover:Highlight;--highcontrast-tag-border-color-invalid-selected-focus:Highlight;--highcontrast-tag-border-color-invalid-selected-active:Highlight;--highcontrast-tag-background-color-invalid-selected:Highlight;--highcontrast-tag-background-color-invalid-selected-hover:Highlight;--highcontrast-tag-background-color-invalid-selected-active:Highlight;--highcontrast-tag-background-color-invalid-selected-focus:Highlight;--highcontrast-tag-content-color-invalid-selected:HighlightText}:host([emphasized]){--highcontrast-tag-border-color-emphasized:Highlight;--highcontrast-tag-border-color-emphasized-hover:Highlight;--highcontrast-tag-border-color-emphasized-active:Highlight;--highcontrast-tag-border-color-emphasized-focus:Highlight;--highcontrast-tag-background-color-emphasized:ButtonFace;--highcontrast-tag-background-color-emphasized-hover:ButtonFace;--highcontrast-tag-background-color-emphasized-active:ButtonFace;--highcontrast-tag-background-color-emphasized-focus:ButtonFace;--highcontrast-tag-content-color-emphasized:CanvasText}}:host{--spectrum-tag-border-color:var(--system-spectrum-tag-border-color);--spectrum-tag-border-color-hover:var(
526
+ )}@media (forced-colors:active){:host{--highcontrast-tag-border-color:ButtonText;--highcontrast-tag-border-color-hover:ButtonText;--highcontrast-tag-border-color-active:ButtonText;--highcontrast-tag-border-color-focus:Highlight;--highcontrast-tag-background-color:ButtonFace;--highcontrast-tag-background-color-hover:ButtonFace;--highcontrast-tag-background-color-active:ButtonFace;--highcontrast-tag-background-color-focus:ButtonFace;--highcontrast-tag-content-color:ButtonText;--highcontrast-tag-content-color-hover:ButtonText;--highcontrast-tag-content-color-active:ButtonText;--highcontrast-tag-content-color-focus:ButtonText;--highcontrast-tag-focus-ring-color:Highlight;forced-color-adjust:none}:host([selected]){--highcontrast-tag-border-color-selected:Highlight;--highcontrast-tag-border-color-selected-hover:Highlight;--highcontrast-tag-border-color-selected-active:Highlight;--highcontrast-tag-border-color-selected-focus:Highlight;--highcontrast-tag-background-color-selected:Highlight;--highcontrast-tag-background-color-selected-hover:Highlight;--highcontrast-tag-background-color-selected-active:Highlight;--highcontrast-tag-background-color-selected-focus:Highlight;--highcontrast-tag-content-color-selected:HighlightText}:host([disabled]){--highcontrast-tag-border-color-disabled:GrayText;--highcontrast-tag-background-color-disabled:ButtonFace;--highcontrast-tag-content-color-disabled:GrayText}:host([invalid]){--highcontrast-tag-border-color-invalid:Highlight;--highcontrast-tag-border-color-invalid-hover:Highlight;--highcontrast-tag-border-color-invalid-active:Highlight;--highcontrast-tag-border-color-invalid-focus:Highlight;--highcontrast-tag-content-color-invalid:CanvasText;--highcontrast-tag-content-color-invalid-hover:CanvasText;--highcontrast-tag-content-color-invalid-active:CanvasText;--highcontrast-tag-content-color-invalid-focus:CanvasText}:host([invalid][selected]){--highcontrast-tag-border-color-invalid-selected:Highlight;--highcontrast-tag-border-color-invalid-selected-hover:Highlight;--highcontrast-tag-border-color-invalid-selected-focus:Highlight;--highcontrast-tag-border-color-invalid-selected-active:Highlight;--highcontrast-tag-background-color-invalid-selected:Highlight;--highcontrast-tag-background-color-invalid-selected-hover:Highlight;--highcontrast-tag-background-color-invalid-selected-active:Highlight;--highcontrast-tag-background-color-invalid-selected-focus:Highlight;--highcontrast-tag-content-color-invalid-selected:HighlightText}:host([emphasized]){--highcontrast-tag-border-color-emphasized:Highlight;--highcontrast-tag-border-color-emphasized-hover:Highlight;--highcontrast-tag-border-color-emphasized-active:Highlight;--highcontrast-tag-border-color-emphasized-focus:Highlight;--highcontrast-tag-background-color-emphasized:ButtonFace;--highcontrast-tag-background-color-emphasized-hover:ButtonFace;--highcontrast-tag-background-color-emphasized-active:ButtonFace;--highcontrast-tag-background-color-emphasized-focus:ButtonFace;--highcontrast-tag-content-color-emphasized:CanvasText}}:host{--spectrum-tag-border-color:var(--system-spectrum-tag-border-color);--spectrum-tag-border-color-hover:var(
527
527
  --system-spectrum-tag-border-color-hover
528
528
  );--spectrum-tag-border-color-active:var(
529
529
  --system-spectrum-tag-border-color-active