@spectrum-web-components/theme 0.42.2 → 0.42.4
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/core.dev.js +1 -1
- package/core.dev.js.map +2 -2
- package/core.js +1 -1
- package/core.js.map +2 -2
- package/custom-elements.json +24 -14
- package/package.json +39 -5
- package/spectrum-two/scale-large-core-tokens.d.ts +1 -0
- package/spectrum-two/scale-large-core-tokens.dev.js +6 -0
- package/spectrum-two/scale-large-core-tokens.dev.js.map +7 -0
- package/spectrum-two/scale-large-core-tokens.js +2 -0
- package/spectrum-two/scale-large-core-tokens.js.map +7 -0
- package/spectrum-two/scale-medium-core-tokens.d.ts +1 -0
- package/spectrum-two/scale-medium-core-tokens.dev.js +6 -0
- package/spectrum-two/scale-medium-core-tokens.dev.js.map +7 -0
- package/spectrum-two/scale-medium-core-tokens.js +2 -0
- package/spectrum-two/scale-medium-core-tokens.js.map +7 -0
- package/spectrum-two/theme-dark-core-tokens.d.ts +1 -0
- package/spectrum-two/theme-dark-core-tokens.dev.js +6 -0
- package/spectrum-two/theme-dark-core-tokens.dev.js.map +7 -0
- package/spectrum-two/theme-dark-core-tokens.js +2 -0
- package/spectrum-two/theme-dark-core-tokens.js.map +7 -0
- package/spectrum-two/theme-light-core-tokens.d.ts +1 -0
- package/spectrum-two/theme-light-core-tokens.dev.js +6 -0
- package/spectrum-two/theme-light-core-tokens.dev.js.map +7 -0
- package/spectrum-two/theme-light-core-tokens.js +2 -0
- package/spectrum-two/theme-light-core-tokens.js.map +7 -0
- package/src/Theme.d.ts +21 -17
- package/src/Theme.dev.js +96 -34
- package/src/Theme.dev.js.map +2 -2
- package/src/Theme.js +1 -1
- package/src/Theme.js.map +3 -3
- package/src/express/core.dev.js +1 -1
- package/src/express/core.dev.js.map +2 -2
- package/src/express/core.js +1 -1
- package/src/express/core.js.map +2 -2
- package/src/express/scale-large-core-tokens.css.dev.js +1 -1
- package/src/express/scale-large-core-tokens.css.dev.js.map +1 -1
- package/src/express/scale-large-core-tokens.css.js +1 -1
- package/src/express/scale-large-core-tokens.css.js.map +1 -1
- package/src/express/scale-large.css.dev.js +1 -1
- package/src/express/scale-large.css.dev.js.map +1 -1
- package/src/express/scale-large.css.js +1 -1
- package/src/express/scale-large.css.js.map +1 -1
- package/src/express/scale-medium-core-tokens.css.dev.js +1 -1
- package/src/express/scale-medium-core-tokens.css.dev.js.map +1 -1
- package/src/express/scale-medium-core-tokens.css.js +1 -1
- package/src/express/scale-medium-core-tokens.css.js.map +1 -1
- package/src/express/scale-medium.css.dev.js +1 -1
- package/src/express/scale-medium.css.dev.js.map +1 -1
- package/src/express/scale-medium.css.js +3 -3
- package/src/express/scale-medium.css.js.map +1 -1
- package/src/express/theme-core-tokens.css.dev.js +1 -1
- package/src/express/theme-core-tokens.css.dev.js.map +1 -1
- package/src/express/theme-core-tokens.css.js +1 -1
- package/src/express/theme-core-tokens.css.js.map +1 -1
- package/src/express/theme.css.dev.js +1 -1
- package/src/express/theme.css.dev.js.map +1 -1
- package/src/express/theme.css.js +1 -1
- package/src/express/theme.css.js.map +1 -1
- package/src/scale-large-core-tokens.css.dev.js +1 -1
- package/src/scale-large-core-tokens.css.dev.js.map +1 -1
- package/src/scale-large-core-tokens.css.js +1 -1
- package/src/scale-large-core-tokens.css.js.map +1 -1
- package/src/scale-large.css.dev.js +1 -1
- package/src/scale-large.css.dev.js.map +1 -1
- package/src/scale-large.css.js +1 -1
- package/src/scale-large.css.js.map +1 -1
- package/src/scale-medium-core-tokens.css.dev.js +1 -1
- package/src/scale-medium-core-tokens.css.dev.js.map +1 -1
- package/src/scale-medium-core-tokens.css.js +1 -1
- package/src/scale-medium-core-tokens.css.js.map +1 -1
- package/src/scale-medium.css.dev.js +1 -1
- package/src/scale-medium.css.dev.js.map +1 -1
- package/src/scale-medium.css.js +3 -3
- package/src/scale-medium.css.js.map +1 -1
- package/src/spectrum-two/core-tokens.d.ts +1 -0
- package/src/spectrum-two/core-tokens.dev.js +5 -0
- package/src/spectrum-two/core-tokens.dev.js.map +7 -0
- package/src/spectrum-two/core-tokens.js +2 -0
- package/src/spectrum-two/core-tokens.js.map +7 -0
- package/src/spectrum-two/core.d.ts +1 -0
- package/src/spectrum-two/core.dev.js +5 -0
- package/src/spectrum-two/core.dev.js.map +7 -0
- package/src/spectrum-two/core.js +2 -0
- package/src/spectrum-two/core.js.map +7 -0
- package/src/spectrum-two/scale-large-core-tokens.css.d.ts +2 -0
- package/src/spectrum-two/scale-large-core-tokens.css.dev.js +7 -0
- package/src/spectrum-two/scale-large-core-tokens.css.dev.js.map +7 -0
- package/src/spectrum-two/scale-large-core-tokens.css.js +4 -0
- package/src/spectrum-two/scale-large-core-tokens.css.js.map +7 -0
- package/src/spectrum-two/scale-medium-core-tokens.css.d.ts +2 -0
- package/src/spectrum-two/scale-medium-core-tokens.css.dev.js +7 -0
- package/src/spectrum-two/scale-medium-core-tokens.css.dev.js.map +7 -0
- package/src/spectrum-two/scale-medium-core-tokens.css.js +4 -0
- package/src/spectrum-two/scale-medium-core-tokens.css.js.map +7 -0
- package/src/spectrum-two/theme-core-tokens.css.d.ts +2 -0
- package/src/spectrum-two/theme-core-tokens.css.dev.js +18 -0
- package/src/spectrum-two/theme-core-tokens.css.dev.js.map +7 -0
- package/src/spectrum-two/theme-core-tokens.css.js +15 -0
- package/src/spectrum-two/theme-core-tokens.css.js.map +7 -0
- package/src/spectrum-two/theme-dark-core-tokens.css.d.ts +2 -0
- package/src/spectrum-two/theme-dark-core-tokens.css.dev.js +7 -0
- package/src/spectrum-two/theme-dark-core-tokens.css.dev.js.map +7 -0
- package/src/spectrum-two/theme-dark-core-tokens.css.js +4 -0
- package/src/spectrum-two/theme-dark-core-tokens.css.js.map +7 -0
- package/src/spectrum-two/theme-light-core-tokens.css.d.ts +2 -0
- package/src/spectrum-two/theme-light-core-tokens.css.dev.js +7 -0
- package/src/spectrum-two/theme-light-core-tokens.css.dev.js.map +7 -0
- package/src/spectrum-two/theme-light-core-tokens.css.js +4 -0
- package/src/spectrum-two/theme-light-core-tokens.css.js.map +7 -0
- package/src/spectrum-two/theme.css.d.ts +2 -0
- package/src/spectrum-two/theme.css.dev.js +18 -0
- package/src/spectrum-two/theme.css.dev.js.map +7 -0
- package/src/spectrum-two/theme.css.js +15 -0
- package/src/spectrum-two/theme.css.js.map +7 -0
- package/src/spectrum-two/themes-core-tokens.d.ts +4 -0
- package/src/spectrum-two/themes-core-tokens.dev.js +6 -0
- package/src/spectrum-two/themes-core-tokens.dev.js.map +7 -0
- package/src/spectrum-two/themes-core-tokens.js +2 -0
- package/src/spectrum-two/themes-core-tokens.js.map +7 -0
- package/src/theme-core-tokens.css.dev.js +1 -1
- package/src/theme-core-tokens.css.dev.js.map +1 -1
- package/src/theme-core-tokens.css.js +1 -1
- package/src/theme-core-tokens.css.js.map +1 -1
- package/src/theme.css.dev.js +1 -1
- package/src/theme.css.dev.js.map +1 -1
- package/src/theme.css.js +1 -1
- package/src/theme.css.js.map +1 -1
- package/src/typography.css.dev.js +1 -1
- package/src/typography.css.dev.js.map +1 -1
- package/src/typography.css.js +1 -1
- package/src/typography.css.js.map +1 -1
- package/stories/theme.stories.js +11 -6
- package/stories/theme.stories.js.map +2 -2
- package/test/theme-devmode.test.js +57 -8
- package/test/theme-devmode.test.js.map +2 -2
- package/test/themes.test.js +45 -3
- package/test/themes.test.js.map +2 -2
package/core.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { Theme } from "./src/Theme.dev.js";
|
|
3
3
|
import coreStyles from "./src/theme.css.js";
|
|
4
|
-
Theme.registerThemeFragment("spectrum", "
|
|
4
|
+
Theme.registerThemeFragment("spectrum", "system", coreStyles);
|
|
5
5
|
//# sourceMappingURL=core.dev.js.map
|
package/core.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["core.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 { Theme } from './src/Theme.dev.js'\n\nimport coreStyles from './src/theme.css.js';\n\nTheme.registerThemeFragment('spectrum', '
|
|
5
|
-
"mappings": ";AAYA,SAAS,aAAa;AAEtB,OAAO,gBAAgB;AAEvB,MAAM,sBAAsB,YAAY,
|
|
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 { Theme } from './src/Theme.dev.js'\n\nimport coreStyles from './src/theme.css.js';\n\nTheme.registerThemeFragment('spectrum', 'system', coreStyles);\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,aAAa;AAEtB,OAAO,gBAAgB;AAEvB,MAAM,sBAAsB,YAAY,UAAU,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{Theme as e}from"./src/Theme.js";import m from"./src/theme.css.js";e.registerThemeFragment("spectrum","
|
|
1
|
+
"use strict";import{Theme as e}from"./src/Theme.js";import m from"./src/theme.css.js";e.registerThemeFragment("spectrum","system",m);
|
|
2
2
|
//# sourceMappingURL=core.js.map
|
package/core.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["core.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 { Theme } from './src/Theme.js';\n\nimport coreStyles from './src/theme.css.js';\n\nTheme.registerThemeFragment('spectrum', '
|
|
5
|
-
"mappings": "aAYA,OAAS,SAAAA,MAAa,iBAEtB,OAAOC,MAAgB,qBAEvBD,EAAM,sBAAsB,WAAY,
|
|
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 { Theme } from './src/Theme.js';\n\nimport coreStyles from './src/theme.css.js';\n\nTheme.registerThemeFragment('spectrum', 'system', coreStyles);\n"],
|
|
5
|
+
"mappings": "aAYA,OAAS,SAAAA,MAAa,iBAEtB,OAAOC,MAAgB,qBAEvBD,EAAM,sBAAsB,WAAY,SAAUC,CAAU",
|
|
6
6
|
"names": ["Theme", "coreStyles"]
|
|
7
7
|
}
|
package/custom-elements.json
CHANGED
|
@@ -104,21 +104,28 @@
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"kind": "field",
|
|
107
|
-
"name": "
|
|
107
|
+
"name": "_system",
|
|
108
108
|
"type": {
|
|
109
|
-
"text": "
|
|
109
|
+
"text": "SystemVariant | ''"
|
|
110
110
|
},
|
|
111
111
|
"privacy": "private",
|
|
112
112
|
"default": "'spectrum'"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"kind": "field",
|
|
116
|
-
"name": "
|
|
116
|
+
"name": "system",
|
|
117
117
|
"type": {
|
|
118
|
-
"text": "\"spectrum\" | \"express\"
|
|
118
|
+
"text": "\"spectrum\" | \"express\""
|
|
119
119
|
},
|
|
120
|
-
"description": "The Spectrum
|
|
121
|
-
"attribute": "
|
|
120
|
+
"description": "The Spectrum system that is applied to the content scoped to this `sp-theme` element.\n\nA value is requried.",
|
|
121
|
+
"attribute": "system"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"kind": "field",
|
|
125
|
+
"name": "theme",
|
|
126
|
+
"type": {
|
|
127
|
+
"text": "SystemVariant | ''"
|
|
128
|
+
}
|
|
122
129
|
},
|
|
123
130
|
{
|
|
124
131
|
"kind": "field",
|
|
@@ -366,14 +373,6 @@
|
|
|
366
373
|
"description": "The Spectrum platform scale to apply to content scoped by this `sp-theme` element.\n\nA value is requried.",
|
|
367
374
|
"fieldName": "scale"
|
|
368
375
|
},
|
|
369
|
-
{
|
|
370
|
-
"name": "theme",
|
|
371
|
-
"type": {
|
|
372
|
-
"text": "\"spectrum\" | \"express\" | \"\""
|
|
373
|
-
},
|
|
374
|
-
"description": "The Spectrum theme that is applied to the content scoped to this `sp-theme` element.\n\nA value is requried.",
|
|
375
|
-
"fieldName": "theme"
|
|
376
|
-
},
|
|
377
376
|
{
|
|
378
377
|
"name": "lang",
|
|
379
378
|
"type": {
|
|
@@ -389,6 +388,17 @@
|
|
|
389
388
|
},
|
|
390
389
|
"description": "Reading direction of the content scoped to this `sp-theme` element.",
|
|
391
390
|
"fieldName": "dir"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "system",
|
|
394
|
+
"type": {
|
|
395
|
+
"text": "\"spectrum\" | \"express\""
|
|
396
|
+
},
|
|
397
|
+
"description": "The Spectrum system that is applied to the content scoped to this `sp-theme` element.\n\nA value is requried.",
|
|
398
|
+
"fieldName": "system"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "theme"
|
|
392
402
|
}
|
|
393
403
|
],
|
|
394
404
|
"superclass": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/theme",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -104,6 +104,22 @@
|
|
|
104
104
|
"development": "./express/theme-lightest.dev.js",
|
|
105
105
|
"default": "./express/theme-lightest.js"
|
|
106
106
|
},
|
|
107
|
+
"./spectrum-two/scale-large-core-tokens.js": {
|
|
108
|
+
"development": "./spectrum-two/scale-large-core-tokens.dev.js",
|
|
109
|
+
"default": "./spectrum-two/scale-large-core-tokens.js"
|
|
110
|
+
},
|
|
111
|
+
"./spectrum-two/scale-medium-core-tokens.js": {
|
|
112
|
+
"development": "./spectrum-two/scale-medium-core-tokens.dev.js",
|
|
113
|
+
"default": "./spectrum-two/scale-medium-core-tokens.js"
|
|
114
|
+
},
|
|
115
|
+
"./spectrum-two/theme-dark-core-tokens.js": {
|
|
116
|
+
"development": "./spectrum-two/theme-dark-core-tokens.dev.js",
|
|
117
|
+
"default": "./spectrum-two/theme-dark-core-tokens.js"
|
|
118
|
+
},
|
|
119
|
+
"./spectrum-two/theme-light-core-tokens.js": {
|
|
120
|
+
"development": "./spectrum-two/theme-light-core-tokens.dev.js",
|
|
121
|
+
"default": "./spectrum-two/theme-light-core-tokens.js"
|
|
122
|
+
},
|
|
107
123
|
"./src/express/core-tokens.js": {
|
|
108
124
|
"development": "./src/express/core-tokens.dev.js",
|
|
109
125
|
"default": "./src/express/core-tokens.js"
|
|
@@ -130,6 +146,18 @@
|
|
|
130
146
|
"development": "./src/express/themes.dev.js",
|
|
131
147
|
"default": "./src/express/themes.js"
|
|
132
148
|
},
|
|
149
|
+
"./src/spectrum-two/core-tokens.js": {
|
|
150
|
+
"development": "./src/spectrum-two/core-tokens.dev.js",
|
|
151
|
+
"default": "./src/spectrum-two/core-tokens.js"
|
|
152
|
+
},
|
|
153
|
+
"./src/spectrum-two/core.js": {
|
|
154
|
+
"development": "./src/spectrum-two/core.dev.js",
|
|
155
|
+
"default": "./src/spectrum-two/core.js"
|
|
156
|
+
},
|
|
157
|
+
"./src/spectrum-two/themes-core-tokens.js": {
|
|
158
|
+
"development": "./src/spectrum-two/themes-core-tokens.dev.js",
|
|
159
|
+
"default": "./src/spectrum-two/themes-core-tokens.js"
|
|
160
|
+
},
|
|
133
161
|
"./core.js": {
|
|
134
162
|
"development": "./core.dev.js",
|
|
135
163
|
"default": "./core.js"
|
|
@@ -205,8 +233,8 @@
|
|
|
205
233
|
"lit-html"
|
|
206
234
|
],
|
|
207
235
|
"dependencies": {
|
|
208
|
-
"@spectrum-web-components/base": "^0.42.
|
|
209
|
-
"@spectrum-web-components/styles": "^0.42.
|
|
236
|
+
"@spectrum-web-components/base": "^0.42.4",
|
|
237
|
+
"@spectrum-web-components/styles": "^0.42.4"
|
|
210
238
|
},
|
|
211
239
|
"types": "./src/index.d.ts",
|
|
212
240
|
"customElements": "custom-elements.json",
|
|
@@ -218,6 +246,8 @@
|
|
|
218
246
|
"./core-*.js",
|
|
219
247
|
"./theme-*.js",
|
|
220
248
|
"./scale-*.js",
|
|
249
|
+
"./spectrum-two/theme-*.js",
|
|
250
|
+
"./spectrum-two/scale-*.js",
|
|
221
251
|
"./express/theme-*.js",
|
|
222
252
|
"./express/scale-*.js",
|
|
223
253
|
"./src/themes.js",
|
|
@@ -225,7 +255,11 @@
|
|
|
225
255
|
"./src/express/core.js",
|
|
226
256
|
"./src/express/core-*.js",
|
|
227
257
|
"./src/express/themes.js",
|
|
228
|
-
"./src/express/themes-*.js"
|
|
258
|
+
"./src/express/themes-*.js",
|
|
259
|
+
"./src/spectrum-two/core.js",
|
|
260
|
+
"./src/spectrum-two/core-*.js",
|
|
261
|
+
"./src/spectrum-two/themes.js",
|
|
262
|
+
"./src/spectrum-two/themes-*.js"
|
|
229
263
|
],
|
|
230
|
-
"gitHead": "
|
|
264
|
+
"gitHead": "4924ffd06681ced537edaed873a9ce8b42cf155c"
|
|
231
265
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/spectrum-two/core-tokens.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import largeStyles from "../src/spectrum-two/scale-large-core-tokens.css.js";
|
|
3
|
+
import { Theme } from "../src/Theme.dev.js";
|
|
4
|
+
import "../src/spectrum-two/core-tokens.dev.js";
|
|
5
|
+
Theme.registerThemeFragment("large-spectrum-two", "scale", largeStyles);
|
|
6
|
+
//# sourceMappingURL=scale-large-core-tokens.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scale-large-core-tokens.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 largeStyles from '../src/spectrum-two/scale-large-core-tokens.css.js';\nimport { Theme } from '../src/Theme.dev.js'\nimport '../src/spectrum-two/core-tokens.dev.js'\n\nTheme.registerThemeFragment('large-spectrum-two', 'scale', largeStyles);\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO,iBAAiB;AACxB,SAAS,aAAa;AACtB,OAAO;AAEP,MAAM,sBAAsB,sBAAsB,SAAS,WAAW;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scale-large-core-tokens.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 largeStyles from '../src/spectrum-two/scale-large-core-tokens.css.js';\nimport { Theme } from '../src/Theme.js';\nimport '../src/spectrum-two/core-tokens.js';\n\nTheme.registerThemeFragment('large-spectrum-two', 'scale', largeStyles);\n"],
|
|
5
|
+
"mappings": "aAYA,OAAOA,MAAiB,qDACxB,OAAS,SAAAC,MAAa,kBACtB,MAAO,qCAEPA,EAAM,sBAAsB,qBAAsB,QAASD,CAAW",
|
|
6
|
+
"names": ["largeStyles", "Theme"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/spectrum-two/core-tokens.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import mediumStyles from "../src/spectrum-two/scale-medium-core-tokens.css.js";
|
|
3
|
+
import { Theme } from "../src/Theme.dev.js";
|
|
4
|
+
import "../src/spectrum-two/core-tokens.dev.js";
|
|
5
|
+
Theme.registerThemeFragment("medium-spectrum-two", "scale", mediumStyles);
|
|
6
|
+
//# sourceMappingURL=scale-medium-core-tokens.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scale-medium-core-tokens.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 mediumStyles from '../src/spectrum-two/scale-medium-core-tokens.css.js';\nimport { Theme } from '../src/Theme.dev.js'\nimport '../src/spectrum-two/core-tokens.dev.js'\n\nTheme.registerThemeFragment('medium-spectrum-two', 'scale', mediumStyles);\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO,kBAAkB;AACzB,SAAS,aAAa;AACtB,OAAO;AAEP,MAAM,sBAAsB,uBAAuB,SAAS,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scale-medium-core-tokens.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 mediumStyles from '../src/spectrum-two/scale-medium-core-tokens.css.js';\nimport { Theme } from '../src/Theme.js';\nimport '../src/spectrum-two/core-tokens.js';\n\nTheme.registerThemeFragment('medium-spectrum-two', 'scale', mediumStyles);\n"],
|
|
5
|
+
"mappings": "aAYA,OAAOA,MAAkB,sDACzB,OAAS,SAAAC,MAAa,kBACtB,MAAO,qCAEPA,EAAM,sBAAsB,sBAAuB,QAASD,CAAY",
|
|
6
|
+
"names": ["mediumStyles", "Theme"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/spectrum-two/core-tokens.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import darkStyles from "../src/spectrum-two/theme-dark-core-tokens.css.js";
|
|
3
|
+
import { Theme } from "../src/Theme.dev.js";
|
|
4
|
+
import "../src/spectrum-two/core-tokens.dev.js";
|
|
5
|
+
Theme.registerThemeFragment("dark-spectrum-two", "color", darkStyles);
|
|
6
|
+
//# sourceMappingURL=theme-dark-core-tokens.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["theme-dark-core-tokens.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 darkStyles from '../src/spectrum-two/theme-dark-core-tokens.css.js';\nimport { Theme } from '../src/Theme.dev.js'\nimport '../src/spectrum-two/core-tokens.dev.js'\n\nTheme.registerThemeFragment('dark-spectrum-two', 'color', darkStyles);\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO,gBAAgB;AACvB,SAAS,aAAa;AACtB,OAAO;AAEP,MAAM,sBAAsB,qBAAqB,SAAS,UAAU;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["theme-dark-core-tokens.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 darkStyles from '../src/spectrum-two/theme-dark-core-tokens.css.js';\nimport { Theme } from '../src/Theme.js';\nimport '../src/spectrum-two/core-tokens.js';\n\nTheme.registerThemeFragment('dark-spectrum-two', 'color', darkStyles);\n"],
|
|
5
|
+
"mappings": "aAYA,OAAOA,MAAgB,oDACvB,OAAS,SAAAC,MAAa,kBACtB,MAAO,qCAEPA,EAAM,sBAAsB,oBAAqB,QAASD,CAAU",
|
|
6
|
+
"names": ["darkStyles", "Theme"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/spectrum-two/core-tokens.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import lightStyles from "../src/spectrum-two/theme-light-core-tokens.css.js";
|
|
3
|
+
import { Theme } from "../src/Theme.dev.js";
|
|
4
|
+
import "../src/spectrum-two/core-tokens.dev.js";
|
|
5
|
+
Theme.registerThemeFragment("light-spectrum-two", "color", lightStyles);
|
|
6
|
+
//# sourceMappingURL=theme-light-core-tokens.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["theme-light-core-tokens.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 lightStyles from '../src/spectrum-two/theme-light-core-tokens.css.js';\nimport { Theme } from '../src/Theme.dev.js'\nimport '../src/spectrum-two/core-tokens.dev.js'\n\nTheme.registerThemeFragment('light-spectrum-two', 'color', lightStyles);\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO,iBAAiB;AACxB,SAAS,aAAa;AACtB,OAAO;AAEP,MAAM,sBAAsB,sBAAsB,SAAS,WAAW;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["theme-light-core-tokens.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 lightStyles from '../src/spectrum-two/theme-light-core-tokens.css.js';\nimport { Theme } from '../src/Theme.js';\nimport '../src/spectrum-two/core-tokens.js';\n\nTheme.registerThemeFragment('light-spectrum-two', 'color', lightStyles);\n"],
|
|
5
|
+
"mappings": "aAYA,OAAOA,MAAiB,qDACxB,OAAS,SAAAC,MAAa,kBACtB,MAAO,qCAEPA,EAAM,sBAAsB,qBAAsB,QAASD,CAAW",
|
|
6
|
+
"names": ["lightStyles", "Theme"]
|
|
7
|
+
}
|
package/src/Theme.d.ts
CHANGED
|
@@ -11,28 +11,30 @@ declare global {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type ShadowRootWithAdoptedStyleSheets = HTMLElement['shadowRoot'] & {
|
|
15
15
|
adoptedStyleSheets?: CSSStyleSheet[];
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
type FragmentType = 'color' | 'scale' | 'system' | 'theme' | 'core' | 'app';
|
|
18
|
+
type SettableFragmentTypes = 'color' | 'scale' | 'system' | 'theme';
|
|
19
|
+
type FragmentMap = Map<string, {
|
|
20
20
|
name: string;
|
|
21
21
|
styles: CSSResultGroup;
|
|
22
22
|
}>;
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
|
|
23
|
+
export type ThemeFragmentMap = Map<FragmentType, FragmentMap>;
|
|
24
|
+
export type Color = 'light' | 'lightest' | 'dark' | 'darkest' | 'light-express' | 'lightest-express' | 'dark-express' | 'darkest-express' | 'light-spectrum-two' | 'dark-spectrum-two';
|
|
25
|
+
export type ThemeVariant = 'spectrum' | 'express' | 'spectrum-two';
|
|
26
|
+
export type SystemVariant = 'spectrum' | 'express' | 'spectrum-two';
|
|
27
|
+
export type Scale = 'medium' | 'large' | 'medium-express' | 'large-express' | 'medium-spectrum-two' | 'large-spectrum-two';
|
|
28
|
+
type FragmentName = Color | Scale | ThemeVariant | SystemVariant | 'core' | 'app';
|
|
28
29
|
export interface ThemeData {
|
|
29
30
|
color?: Color;
|
|
30
31
|
scale?: Scale;
|
|
31
32
|
lang?: string;
|
|
32
|
-
theme?:
|
|
33
|
+
theme?: SystemVariant;
|
|
34
|
+
system?: SystemVariant;
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
[P in SettableFragmentTypes]: ThemeVariant | Color | Scale | '';
|
|
36
|
+
type ThemeKindProvider = {
|
|
37
|
+
[P in SettableFragmentTypes]: ThemeVariant | SystemVariant | Color | Scale | '';
|
|
36
38
|
};
|
|
37
39
|
export interface ProvideLang {
|
|
38
40
|
callback: (lang: string, unsubscribe: () => void) => void;
|
|
@@ -61,16 +63,18 @@ export declare class Theme extends HTMLElement implements ThemeKindProvider {
|
|
|
61
63
|
protected attributeChangedCallback(attrName: SettableFragmentTypes | 'lang' | 'dir', old: string | null, value: string | null): void;
|
|
62
64
|
private requestUpdate;
|
|
63
65
|
shadowRoot: ShadowRootWithAdoptedStyleSheets;
|
|
64
|
-
private
|
|
66
|
+
private _system;
|
|
65
67
|
/**
|
|
66
|
-
* The Spectrum
|
|
68
|
+
* The Spectrum system that is applied to the content scoped to this `sp-theme` element.
|
|
67
69
|
*
|
|
68
70
|
* A value is requried.
|
|
69
|
-
* @type {"spectrum" | "express"
|
|
71
|
+
* @type {"spectrum" | "express" }
|
|
70
72
|
* @attr
|
|
71
73
|
*/
|
|
72
|
-
get
|
|
73
|
-
set
|
|
74
|
+
get system(): SystemVariant | '';
|
|
75
|
+
set system(newValue: SystemVariant | '');
|
|
76
|
+
get theme(): SystemVariant | '';
|
|
77
|
+
set theme(newValue: SystemVariant | '');
|
|
74
78
|
private _color;
|
|
75
79
|
/**
|
|
76
80
|
* The Spectrum color stops to apply to content scoped by this `sp-theme` element.
|