@spectrum-web-components/asset 1.12.0-testing.20260223092154 → 1.12.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.
@@ -17,6 +17,74 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/Asset.base.js",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "",
27
+ "name": "AssetBase",
28
+ "members": [
29
+ {
30
+ "kind": "field",
31
+ "name": "variant",
32
+ "type": {
33
+ "text": "AssetVariant | undefined"
34
+ },
35
+ "privacy": "public",
36
+ "description": "The variant of the asset. When not provided, slot content is rendered (e.g., an image).",
37
+ "attribute": "variant",
38
+ "reflects": true
39
+ },
40
+ {
41
+ "kind": "field",
42
+ "name": "label",
43
+ "type": {
44
+ "text": "string"
45
+ },
46
+ "privacy": "public",
47
+ "default": "''",
48
+ "description": "Accessible label for the asset's file or folder variant.",
49
+ "attribute": "label"
50
+ }
51
+ ],
52
+ "attributes": [
53
+ {
54
+ "name": "variant",
55
+ "type": {
56
+ "text": "AssetVariant | undefined"
57
+ },
58
+ "description": "The variant of the asset. When not provided, slot content is rendered (e.g., an image).",
59
+ "fieldName": "variant"
60
+ },
61
+ {
62
+ "name": "label",
63
+ "type": {
64
+ "text": "string"
65
+ },
66
+ "default": "''",
67
+ "description": "Accessible label for the asset's file or folder variant.",
68
+ "fieldName": "label"
69
+ }
70
+ ],
71
+ "superclass": {
72
+ "name": "SpectrumElement",
73
+ "package": "@spectrum-web-components/base"
74
+ }
75
+ }
76
+ ],
77
+ "exports": [
78
+ {
79
+ "kind": "js",
80
+ "name": "AssetBase",
81
+ "declaration": {
82
+ "name": "AssetBase",
83
+ "module": "src/Asset.base.js"
84
+ }
85
+ }
86
+ ]
87
+ },
20
88
  {
21
89
  "kind": "javascript-module",
22
90
  "path": "src/Asset.js",
@@ -31,13 +99,71 @@
31
99
  "name": ""
32
100
  }
33
101
  ],
34
- "members": [],
102
+ "members": [
103
+ {
104
+ "kind": "field",
105
+ "name": "variant",
106
+ "type": {
107
+ "text": "AssetVariant | undefined"
108
+ },
109
+ "privacy": "public",
110
+ "description": "The variant of the asset. When not provided, slot content is rendered (e.g., an image).",
111
+ "attribute": "variant",
112
+ "reflects": true,
113
+ "inheritedFrom": {
114
+ "name": "AssetBase",
115
+ "module": "src/Asset.base.js"
116
+ }
117
+ },
118
+ {
119
+ "kind": "field",
120
+ "name": "label",
121
+ "type": {
122
+ "text": "string"
123
+ },
124
+ "privacy": "public",
125
+ "default": "''",
126
+ "description": "Accessible label for the asset's file or folder variant.",
127
+ "attribute": "label",
128
+ "inheritedFrom": {
129
+ "name": "AssetBase",
130
+ "module": "src/Asset.base.js"
131
+ }
132
+ }
133
+ ],
35
134
  "superclass": {
36
135
  "name": "AssetBase",
37
- "package": "@spectrum-web-components/core/components/asset"
136
+ "module": "/src/Asset.base.js"
38
137
  },
39
138
  "tagName": "sp-asset",
40
- "customElement": true
139
+ "customElement": true,
140
+ "attributes": [
141
+ {
142
+ "name": "variant",
143
+ "type": {
144
+ "text": "AssetVariant | undefined"
145
+ },
146
+ "description": "The variant of the asset. When not provided, slot content is rendered (e.g., an image).",
147
+ "fieldName": "variant",
148
+ "inheritedFrom": {
149
+ "name": "AssetBase",
150
+ "module": "src/Asset.base.ts"
151
+ }
152
+ },
153
+ {
154
+ "name": "label",
155
+ "type": {
156
+ "text": "string"
157
+ },
158
+ "default": "''",
159
+ "description": "Accessible label for the asset's file or folder variant.",
160
+ "fieldName": "label",
161
+ "inheritedFrom": {
162
+ "name": "AssetBase",
163
+ "module": "src/Asset.base.ts"
164
+ }
165
+ }
166
+ ]
41
167
  }
42
168
  ],
43
169
  "exports": [
@@ -50,6 +176,28 @@
50
176
  }
51
177
  }
52
178
  ]
179
+ },
180
+ {
181
+ "kind": "javascript-module",
182
+ "path": "src/Asset.types.js",
183
+ "declarations": [
184
+ {
185
+ "kind": "variable",
186
+ "name": "ASSET_VARIANTS",
187
+ "default": "[ 'file', 'folder', ] as const satisfies readonly string[]",
188
+ "description": "Copyright 2026 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."
189
+ }
190
+ ],
191
+ "exports": [
192
+ {
193
+ "kind": "js",
194
+ "name": "ASSET_VARIANTS",
195
+ "declaration": {
196
+ "name": "ASSET_VARIANTS",
197
+ "module": "src/Asset.types.js"
198
+ }
199
+ }
200
+ ]
53
201
  }
54
202
  ]
55
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/asset",
3
- "version": "1.12.0-testing.20260223092154",
3
+ "version": "1.12.0",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Adobe",
@@ -58,8 +58,7 @@
58
58
  ],
59
59
  "types": "./src/index.d.ts",
60
60
  "dependencies": {
61
- "@spectrum-web-components/base": "1.12.0-testing.20260223092154",
62
- "@spectrum-web-components/core": "0.0.5-testing.20260223092154"
61
+ "@spectrum-web-components/base": "1.12.0"
63
62
  },
64
63
  "keywords": [
65
64
  "design-system",
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright 2026 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 { PropertyValues, SpectrumElement } from '@spectrum-web-components/base';
13
+ import { type AssetVariant } from './Asset.types.js';
14
+ export declare abstract class AssetBase extends SpectrumElement {
15
+ /**
16
+ * @internal
17
+ *
18
+ * A readonly array of all valid variants for the asset.
19
+ */
20
+ static readonly VARIANTS: readonly AssetVariant[];
21
+ /**
22
+ * The variant of the asset. When not provided, slot content is rendered (e.g., an image).
23
+ */
24
+ variant: AssetVariant | undefined;
25
+ /**
26
+ * Accessible label for the asset's file or folder variant.
27
+ */
28
+ label: string;
29
+ protected updated(changes: PropertyValues): void;
30
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __decorateClass = (decorators, target, key, kind) => {
5
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
6
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
7
+ if (decorator = decorators[i])
8
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9
+ if (kind && result) __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import { SpectrumElement } from "@spectrum-web-components/base";
13
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
14
+ import { ASSET_VARIANTS } from "./Asset.types.dev.js";
15
+ export class AssetBase extends SpectrumElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.label = "";
19
+ }
20
+ // ──────────────────────
21
+ // IMPLEMENTATION
22
+ // ──────────────────────
23
+ updated(changes) {
24
+ super.updated(changes);
25
+ if (true) {
26
+ const constructor = this.constructor;
27
+ if (typeof this.variant !== "undefined" && !constructor.VARIANTS.includes(this.variant)) {
28
+ window.__swc.warn(
29
+ this,
30
+ `<${this.localName}> element expects the "variant" attribute to be one of the following:`,
31
+ "https://opensource.adobe.com/spectrum-web-components/components/asset/",
32
+ {
33
+ issues: [...constructor.VARIANTS]
34
+ }
35
+ );
36
+ }
37
+ }
38
+ }
39
+ }
40
+ // ─────────────────────────
41
+ // API TO OVERRIDE
42
+ // ─────────────────────────
43
+ /**
44
+ * @internal
45
+ *
46
+ * A readonly array of all valid variants for the asset.
47
+ */
48
+ AssetBase.VARIANTS = ASSET_VARIANTS;
49
+ __decorateClass([
50
+ property({ type: String, reflect: true })
51
+ ], AssetBase.prototype, "variant", 2);
52
+ __decorateClass([
53
+ property()
54
+ ], AssetBase.prototype, "label", 2);
55
+ //# sourceMappingURL=Asset.base.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["Asset.base.ts"],
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues, SpectrumElement } from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport { ASSET_VARIANTS, type AssetVariant } from './Asset.types.dev.js'\n\nexport abstract class AssetBase extends SpectrumElement {\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // API TO OVERRIDE\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * @internal\n *\n * A readonly array of all valid variants for the asset.\n */\n static readonly VARIANTS: readonly AssetVariant[] = ASSET_VARIANTS;\n\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // SHARED API\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * The variant of the asset. When not provided, slot content is rendered (e.g., an image).\n */\n @property({ type: String, reflect: true })\n public variant: AssetVariant | undefined;\n\n /**\n * Accessible label for the asset's file or folder variant.\n */\n @property()\n public label = '';\n\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // IMPLEMENTATION\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (window.__swc?.DEBUG) {\n const constructor = this.constructor as typeof AssetBase;\n if (\n typeof this.variant !== 'undefined' &&\n !constructor.VARIANTS.includes(this.variant)\n ) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"variant\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/asset/',\n {\n issues: [...constructor.VARIANTS],\n }\n );\n }\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA,SAAyB,uBAAuB;AAChD,SAAS,gBAAgB;AAEzB,SAAS,sBAAyC;AAE3C,aAAe,kBAAkB,gBAAgB;AAAA,EAAjD;AAAA;AA0BL,SAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,QAAQ,SAA+B;AACxD,UAAM,QAAQ,OAAO;AACrB,QAAI,MAAqB;AACvB,YAAM,cAAc,KAAK;AACzB,UACE,OAAO,KAAK,YAAY,eACxB,CAAC,YAAY,SAAS,SAAS,KAAK,OAAO,GAC3C;AACA,eAAO,MAAM;AAAA,UACX;AAAA,UACA,IAAI,KAAK,SAAS;AAAA,UAClB;AAAA,UACA;AAAA,YACE,QAAQ,CAAC,GAAG,YAAY,QAAQ;AAAA,UAClC;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAnDsB,UAUJ,WAAoC;AAU7C;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAnBrB,UAoBb;AAMA;AAAA,EADN,SAAS;AAAA,GAzBU,UA0Bb;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=(s,e,r,o)=>{for(var t=o>1?void 0:o?u(e,r):e,n=s.length-1,a;n>=0;n--)(a=s[n])&&(t=(o?a(e,r,t):a(t))||t);return o&&t&&p(e,r,t),t};import{SpectrumElement as d}from"@spectrum-web-components/base";import{property as c}from"@spectrum-web-components/base/src/decorators.js";import{ASSET_VARIANTS as l}from"./Asset.types.js";export class AssetBase extends d{constructor(){super(...arguments);this.label=""}updated(r){super.updated(r)}}AssetBase.VARIANTS=l,i([c({type:String,reflect:!0})],AssetBase.prototype,"variant",2),i([c()],AssetBase.prototype,"label",2);
2
+ //# sourceMappingURL=Asset.base.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["Asset.base.ts"],
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues, SpectrumElement } from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport { ASSET_VARIANTS, type AssetVariant } from './Asset.types.js';\n\nexport abstract class AssetBase extends SpectrumElement {\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // API TO OVERRIDE\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * @internal\n *\n * A readonly array of all valid variants for the asset.\n */\n static readonly VARIANTS: readonly AssetVariant[] = ASSET_VARIANTS;\n\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // SHARED API\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * The variant of the asset. When not provided, slot content is rendered (e.g., an image).\n */\n @property({ type: String, reflect: true })\n public variant: AssetVariant | undefined;\n\n /**\n * Accessible label for the asset's file or folder variant.\n */\n @property()\n public label = '';\n\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // IMPLEMENTATION\n // \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (window.__swc?.DEBUG) {\n const constructor = this.constructor as typeof AssetBase;\n if (\n typeof this.variant !== 'undefined' &&\n !constructor.VARIANTS.includes(this.variant)\n ) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"variant\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/asset/',\n {\n issues: [...constructor.VARIANTS],\n }\n );\n }\n }\n }\n}\n"],
5
+ "mappings": "qNAYA,OAAyB,mBAAAA,MAAuB,gCAChD,OAAS,YAAAC,MAAgB,kDAEzB,OAAS,kBAAAC,MAAyC,mBAE3C,aAAe,kBAAkBF,CAAgB,CAAjD,kCA0BL,KAAO,MAAQ,GAMI,QAAQG,EAA+B,CACxD,MAAM,QAAQA,CAAO,CAiBvB,CACF,CAnDsB,UAUJ,SAAoCD,EAU7CE,EAAA,CADNH,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAnBrB,UAoBb,uBAMAG,EAAA,CADNH,EAAS,GAzBU,UA0Bb",
6
+ "names": ["SpectrumElement", "property", "ASSET_VARIANTS", "changes", "__decorateClass"]
7
+ }
package/src/Asset.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  import { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';
13
- import { AssetBase } from '@spectrum-web-components/core/components/asset';
13
+ import { AssetBase } from './Asset.base.js';
14
14
  /**
15
15
  * @element sp-asset
16
16
  * @slot - content to be displayed in the asset when an acceptable value for `file` is not present
package/src/Asset.dev.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  html
4
4
  } from "@spectrum-web-components/base";
5
- import { AssetBase } from "@spectrum-web-components/core/components/asset";
5
+ import { AssetBase } from "./Asset.base.dev.js";
6
6
  import styles from "./asset.css.js";
7
7
  const file = (label) => html`
8
8
  <svg
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Asset.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { AssetBase } from '@spectrum-web-components/core/components/asset';\n\nimport styles from './asset.css.js';\n\nconst file = (label: string): TemplateResult => html`\n <svg\n class=\"file\"\n role=\"img\"\n viewBox=\"0 0 128 128\"\n aria-label=${label || 'File'}\n >\n <path\n class=\"fileBackground\"\n d=\"M24,126c-5.5,0-10-4.5-10-10V12c0-5.5,4.5-10,10-10h61.5c2.1,0,4.1,0.8,5.6,2.3l20.5,20.4c1.5,1.5,2.4,3.5,2.4,5.7V116c0,5.5-4.5,10-10,10H24z\"\n ></path>\n <path\n class=\"fileOutline\"\n d=\"M113.1,23.3L92.6,2.9C90.7,1,88.2,0,85.5,0H24c-6.6,0-12,5.4-12,12v104c0,6.6,5.4,12,12,12h80c6.6,0,12-5.4,12-12V30.4C116,27.8,114.9,25.2,113.1,23.3z M90,6l20.1,20H92c-1.1,0-2-0.9-2-2V6z M112,116c0,4.4-3.6,8-8,8H24c-4.4,0-8-3.6-8-8V12c0-4.4,3.6-8,8-8h61.5c0.2,0,0.3,0,0.5,0v20c0,3.3,2.7,6,6,6h20c0,0.1,0,0.3,0,0.4V116z\"\n ></path>\n </svg>\n`;\n\nconst folder = (label: string): TemplateResult => html`\n <svg\n class=\"folder\"\n role=\"img\"\n viewBox=\"0 0 32 32\"\n aria-label=${label || 'Folder'}\n >\n <path\n class=\"folderBackground\"\n d=\"M3,29.5c-1.4,0-2.5-1.1-2.5-2.5V5c0-1.4,1.1-2.5,2.5-2.5h10.1c0.5,0,1,0.2,1.4,0.6l3.1,3.1c0.2,0.2,0.4,0.3,0.7,0.3H29c1.4,0,2.5,1.1,2.5,2.5v18c0,1.4-1.1,2.5-2.5,2.5H3z\"\n ></path>\n <path\n class=\"folderOutline\"\n d=\"M29,6H18.3c-0.1,0-0.2,0-0.4-0.2l-3.1-3.1C14.4,2.3,13.8,2,13.1,2H3C1.3,2,0,3.3,0,5v22c0,1.6,1.3,3,3,3h26c1.7,0,3-1.4,3-3V9C32,7.3,30.7,6,29,6z M31,27c0,1.1-0.9,2-2,2H3c-1.1,0-2-0.9-2-2V7h28c1.1,0,2,0.9,2,2V27z\"\n ></path>\n </svg>\n`;\n\n/**\n * @element sp-asset\n * @slot - content to be displayed in the asset when an acceptable value for `file` is not present\n */\nexport class Asset extends AssetBase {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override render(): TemplateResult {\n if (this.variant === 'file') {\n return file(this.label);\n } else if (this.variant === 'folder') {\n return folder(this.label);\n }\n return html`\n <slot></slot>\n `;\n }\n}\n"],
5
- "mappings": ";AAYA;AAAA,EAEE;AAAA,OAEK;AACP,SAAS,iBAAiB;AAE1B,OAAO,YAAY;AAEnB,MAAM,OAAO,CAAC,UAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAK/B,SAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAahC,MAAM,SAAS,CAAC,UAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKjC,SAAS,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiB3B,aAAM,cAAc,UAAU;AAAA,EACnC,WAA2B,SAAyB;AAClD,WAAO,CAAC,MAAM;AAAA,EAChB;AAAA,EAEmB,SAAyB;AAC1C,QAAI,KAAK,YAAY,QAAQ;AAC3B,aAAO,KAAK,KAAK,KAAK;AAAA,IACxB,WAAW,KAAK,YAAY,UAAU;AACpC,aAAO,OAAO,KAAK,KAAK;AAAA,IAC1B;AACA,WAAO;AAAA;AAAA;AAAA,EAGT;AACF;",
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n TemplateResult,\n} from '@spectrum-web-components/base';\n\nimport { AssetBase } from './Asset.base.dev.js'\nimport styles from './asset.css.js';\n\nconst file = (label: string): TemplateResult => html`\n <svg\n class=\"file\"\n role=\"img\"\n viewBox=\"0 0 128 128\"\n aria-label=${label || 'File'}\n >\n <path\n class=\"fileBackground\"\n d=\"M24,126c-5.5,0-10-4.5-10-10V12c0-5.5,4.5-10,10-10h61.5c2.1,0,4.1,0.8,5.6,2.3l20.5,20.4c1.5,1.5,2.4,3.5,2.4,5.7V116c0,5.5-4.5,10-10,10H24z\"\n ></path>\n <path\n class=\"fileOutline\"\n d=\"M113.1,23.3L92.6,2.9C90.7,1,88.2,0,85.5,0H24c-6.6,0-12,5.4-12,12v104c0,6.6,5.4,12,12,12h80c6.6,0,12-5.4,12-12V30.4C116,27.8,114.9,25.2,113.1,23.3z M90,6l20.1,20H92c-1.1,0-2-0.9-2-2V6z M112,116c0,4.4-3.6,8-8,8H24c-4.4,0-8-3.6-8-8V12c0-4.4,3.6-8,8-8h61.5c0.2,0,0.3,0,0.5,0v20c0,3.3,2.7,6,6,6h20c0,0.1,0,0.3,0,0.4V116z\"\n ></path>\n </svg>\n`;\n\nconst folder = (label: string): TemplateResult => html`\n <svg\n class=\"folder\"\n role=\"img\"\n viewBox=\"0 0 32 32\"\n aria-label=${label || 'Folder'}\n >\n <path\n class=\"folderBackground\"\n d=\"M3,29.5c-1.4,0-2.5-1.1-2.5-2.5V5c0-1.4,1.1-2.5,2.5-2.5h10.1c0.5,0,1,0.2,1.4,0.6l3.1,3.1c0.2,0.2,0.4,0.3,0.7,0.3H29c1.4,0,2.5,1.1,2.5,2.5v18c0,1.4-1.1,2.5-2.5,2.5H3z\"\n ></path>\n <path\n class=\"folderOutline\"\n d=\"M29,6H18.3c-0.1,0-0.2,0-0.4-0.2l-3.1-3.1C14.4,2.3,13.8,2,13.1,2H3C1.3,2,0,3.3,0,5v22c0,1.6,1.3,3,3,3h26c1.7,0,3-1.4,3-3V9C32,7.3,30.7,6,29,6z M31,27c0,1.1-0.9,2-2,2H3c-1.1,0-2-0.9-2-2V7h28c1.1,0,2,0.9,2,2V27z\"\n ></path>\n </svg>\n`;\n\n/**\n * @element sp-asset\n * @slot - content to be displayed in the asset when an acceptable value for `file` is not present\n */\nexport class Asset extends AssetBase {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override render(): TemplateResult {\n if (this.variant === 'file') {\n return file(this.label);\n } else if (this.variant === 'folder') {\n return folder(this.label);\n }\n return html`\n <slot></slot>\n `;\n }\n}\n"],
5
+ "mappings": ";AAYA;AAAA,EAEE;AAAA,OAEK;AAEP,SAAS,iBAAiB;AAC1B,OAAO,YAAY;AAEnB,MAAM,OAAO,CAAC,UAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAK/B,SAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAahC,MAAM,SAAS,CAAC,UAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKjC,SAAS,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiB3B,aAAM,cAAc,UAAU;AAAA,EACnC,WAA2B,SAAyB;AAClD,WAAO,CAAC,MAAM;AAAA,EAChB;AAAA,EAEmB,SAAyB;AAC1C,QAAI,KAAK,YAAY,QAAQ;AAC3B,aAAO,KAAK,KAAK,KAAK;AAAA,IACxB,WAAW,KAAK,YAAY,UAAU;AACpC,aAAO,OAAO,KAAK,KAAK;AAAA,IAC1B;AACA,WAAO;AAAA;AAAA;AAAA,EAGT;AACF;",
6
6
  "names": []
7
7
  }
package/src/Asset.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";import{html as l}from"@spectrum-web-components/base";import{AssetBase as t}from"@spectrum-web-components/core/components/asset";import s from"./asset.css.js";const r=e=>l`
1
+ "use strict";import{html as l}from"@spectrum-web-components/base";import{AssetBase as t}from"./Asset.base.js";import s from"./asset.css.js";const r=e=>l`
2
2
  <svg
3
3
  class="file"
4
4
  role="img"
package/src/Asset.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Asset.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { AssetBase } from '@spectrum-web-components/core/components/asset';\n\nimport styles from './asset.css.js';\n\nconst file = (label: string): TemplateResult => html`\n <svg\n class=\"file\"\n role=\"img\"\n viewBox=\"0 0 128 128\"\n aria-label=${label || 'File'}\n >\n <path\n class=\"fileBackground\"\n d=\"M24,126c-5.5,0-10-4.5-10-10V12c0-5.5,4.5-10,10-10h61.5c2.1,0,4.1,0.8,5.6,2.3l20.5,20.4c1.5,1.5,2.4,3.5,2.4,5.7V116c0,5.5-4.5,10-10,10H24z\"\n ></path>\n <path\n class=\"fileOutline\"\n d=\"M113.1,23.3L92.6,2.9C90.7,1,88.2,0,85.5,0H24c-6.6,0-12,5.4-12,12v104c0,6.6,5.4,12,12,12h80c6.6,0,12-5.4,12-12V30.4C116,27.8,114.9,25.2,113.1,23.3z M90,6l20.1,20H92c-1.1,0-2-0.9-2-2V6z M112,116c0,4.4-3.6,8-8,8H24c-4.4,0-8-3.6-8-8V12c0-4.4,3.6-8,8-8h61.5c0.2,0,0.3,0,0.5,0v20c0,3.3,2.7,6,6,6h20c0,0.1,0,0.3,0,0.4V116z\"\n ></path>\n </svg>\n`;\n\nconst folder = (label: string): TemplateResult => html`\n <svg\n class=\"folder\"\n role=\"img\"\n viewBox=\"0 0 32 32\"\n aria-label=${label || 'Folder'}\n >\n <path\n class=\"folderBackground\"\n d=\"M3,29.5c-1.4,0-2.5-1.1-2.5-2.5V5c0-1.4,1.1-2.5,2.5-2.5h10.1c0.5,0,1,0.2,1.4,0.6l3.1,3.1c0.2,0.2,0.4,0.3,0.7,0.3H29c1.4,0,2.5,1.1,2.5,2.5v18c0,1.4-1.1,2.5-2.5,2.5H3z\"\n ></path>\n <path\n class=\"folderOutline\"\n d=\"M29,6H18.3c-0.1,0-0.2,0-0.4-0.2l-3.1-3.1C14.4,2.3,13.8,2,13.1,2H3C1.3,2,0,3.3,0,5v22c0,1.6,1.3,3,3,3h26c1.7,0,3-1.4,3-3V9C32,7.3,30.7,6,29,6z M31,27c0,1.1-0.9,2-2,2H3c-1.1,0-2-0.9-2-2V7h28c1.1,0,2,0.9,2,2V27z\"\n ></path>\n </svg>\n`;\n\n/**\n * @element sp-asset\n * @slot - content to be displayed in the asset when an acceptable value for `file` is not present\n */\nexport class Asset extends AssetBase {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override render(): TemplateResult {\n if (this.variant === 'file') {\n return file(this.label);\n } else if (this.variant === 'folder') {\n return folder(this.label);\n }\n return html`\n <slot></slot>\n `;\n }\n}\n"],
5
- "mappings": "aAYA,OAEE,QAAAA,MAEK,gCACP,OAAS,aAAAC,MAAiB,iDAE1B,OAAOC,MAAY,iBAEnB,MAAMC,EAAQC,GAAkCJ;AAAA;AAAA;AAAA;AAAA;AAAA,iBAK/BI,GAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa1BC,EAAUD,GAAkCJ;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKjCI,GAAS,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiB3B,aAAM,cAAcH,CAAU,CACnC,WAA2B,QAAyB,CAClD,MAAO,CAACC,CAAM,CAChB,CAEmB,QAAyB,CAC1C,OAAI,KAAK,UAAY,OACZC,EAAK,KAAK,KAAK,EACb,KAAK,UAAY,SACnBE,EAAO,KAAK,KAAK,EAEnBL;AAAA;AAAA,KAGT,CACF",
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n TemplateResult,\n} from '@spectrum-web-components/base';\n\nimport { AssetBase } from './Asset.base.js';\nimport styles from './asset.css.js';\n\nconst file = (label: string): TemplateResult => html`\n <svg\n class=\"file\"\n role=\"img\"\n viewBox=\"0 0 128 128\"\n aria-label=${label || 'File'}\n >\n <path\n class=\"fileBackground\"\n d=\"M24,126c-5.5,0-10-4.5-10-10V12c0-5.5,4.5-10,10-10h61.5c2.1,0,4.1,0.8,5.6,2.3l20.5,20.4c1.5,1.5,2.4,3.5,2.4,5.7V116c0,5.5-4.5,10-10,10H24z\"\n ></path>\n <path\n class=\"fileOutline\"\n d=\"M113.1,23.3L92.6,2.9C90.7,1,88.2,0,85.5,0H24c-6.6,0-12,5.4-12,12v104c0,6.6,5.4,12,12,12h80c6.6,0,12-5.4,12-12V30.4C116,27.8,114.9,25.2,113.1,23.3z M90,6l20.1,20H92c-1.1,0-2-0.9-2-2V6z M112,116c0,4.4-3.6,8-8,8H24c-4.4,0-8-3.6-8-8V12c0-4.4,3.6-8,8-8h61.5c0.2,0,0.3,0,0.5,0v20c0,3.3,2.7,6,6,6h20c0,0.1,0,0.3,0,0.4V116z\"\n ></path>\n </svg>\n`;\n\nconst folder = (label: string): TemplateResult => html`\n <svg\n class=\"folder\"\n role=\"img\"\n viewBox=\"0 0 32 32\"\n aria-label=${label || 'Folder'}\n >\n <path\n class=\"folderBackground\"\n d=\"M3,29.5c-1.4,0-2.5-1.1-2.5-2.5V5c0-1.4,1.1-2.5,2.5-2.5h10.1c0.5,0,1,0.2,1.4,0.6l3.1,3.1c0.2,0.2,0.4,0.3,0.7,0.3H29c1.4,0,2.5,1.1,2.5,2.5v18c0,1.4-1.1,2.5-2.5,2.5H3z\"\n ></path>\n <path\n class=\"folderOutline\"\n d=\"M29,6H18.3c-0.1,0-0.2,0-0.4-0.2l-3.1-3.1C14.4,2.3,13.8,2,13.1,2H3C1.3,2,0,3.3,0,5v22c0,1.6,1.3,3,3,3h26c1.7,0,3-1.4,3-3V9C32,7.3,30.7,6,29,6z M31,27c0,1.1-0.9,2-2,2H3c-1.1,0-2-0.9-2-2V7h28c1.1,0,2,0.9,2,2V27z\"\n ></path>\n </svg>\n`;\n\n/**\n * @element sp-asset\n * @slot - content to be displayed in the asset when an acceptable value for `file` is not present\n */\nexport class Asset extends AssetBase {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override render(): TemplateResult {\n if (this.variant === 'file') {\n return file(this.label);\n } else if (this.variant === 'folder') {\n return folder(this.label);\n }\n return html`\n <slot></slot>\n `;\n }\n}\n"],
5
+ "mappings": "aAYA,OAEE,QAAAA,MAEK,gCAEP,OAAS,aAAAC,MAAiB,kBAC1B,OAAOC,MAAY,iBAEnB,MAAMC,EAAQC,GAAkCJ;AAAA;AAAA;AAAA;AAAA;AAAA,iBAK/BI,GAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa1BC,EAAUD,GAAkCJ;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKjCI,GAAS,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiB3B,aAAM,cAAcH,CAAU,CACnC,WAA2B,QAAyB,CAClD,MAAO,CAACC,CAAM,CAChB,CAEmB,QAAyB,CAC1C,OAAI,KAAK,UAAY,OACZC,EAAK,KAAK,KAAK,EACb,KAAK,UAAY,SACnBE,EAAO,KAAK,KAAK,EAEnBL;AAAA;AAAA,KAGT,CACF",
6
6
  "names": ["html", "AssetBase", "styles", "file", "label", "folder"]
7
7
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright 2026 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 declare const ASSET_VARIANTS: readonly ["file", "folder"];
13
+ export type AssetVariant = (typeof ASSET_VARIANTS)[number];
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ export const ASSET_VARIANTS = [
3
+ "file",
4
+ "folder"
5
+ ];
6
+ //# sourceMappingURL=Asset.types.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["Asset.types.ts"],
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const ASSET_VARIANTS = [\n 'file',\n 'folder',\n] as const satisfies readonly string[];\n\nexport type AssetVariant = (typeof ASSET_VARIANTS)[number];\n"],
5
+ "mappings": ";AAYO,aAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";export const ASSET_VARIANTS=["file","folder"];
2
+ //# sourceMappingURL=Asset.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["Asset.types.ts"],
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const ASSET_VARIANTS = [\n 'file',\n 'folder',\n] as const satisfies readonly string[];\n\nexport type AssetVariant = (typeof ASSET_VARIANTS)[number];\n"],
5
+ "mappings": "aAYO,aAAM,eAAiB,CAC5B,OACA,QACF",
6
+ "names": []
7
+ }