@spectrum-web-components/theme 1.3.0-beta.2 → 1.3.0-testing.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/theme",
3
- "version": "1.3.0-beta.2",
3
+ "version": "1.3.0-testing.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -283,8 +283,8 @@
283
283
  "lit-html"
284
284
  ],
285
285
  "dependencies": {
286
- "@spectrum-web-components/base": "^1.3.0-beta.2",
287
- "@spectrum-web-components/styles": "^1.3.0-beta.2"
286
+ "@spectrum-web-components/base": "^1.3.0-testing.0",
287
+ "@spectrum-web-components/styles": "^1.3.0-testing.0"
288
288
  },
289
289
  "types": "./src/index.d.ts",
290
290
  "customElements": "custom-elements.json",
@@ -310,6 +310,5 @@
310
310
  "./src/spectrum-two/core-*.js",
311
311
  "./src/spectrum-two/themes.js",
312
312
  "./src/spectrum-two/themes-*.js"
313
- ],
314
- "gitHead": "98f10907cae715b337db287dc3e661c0c8385e9b"
313
+ ]
315
314
  }
package/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,258 +0,0 @@
1
- "use strict";
2
- import "@spectrum-web-components/theme/sp-theme.js";
3
- import "@spectrum-web-components/theme/src/themes.js";
4
- import "@spectrum-web-components/button/sp-button.js";
5
- import "@spectrum-web-components/button-group/sp-button-group.js";
6
- import "@spectrum-web-components/switch/sp-switch.js";
7
- import "@spectrum-web-components/slider/sp-slider.js";
8
- import { html } from "@spectrum-web-components/base";
9
- export default {
10
- component: "sp-theme",
11
- title: "Theme",
12
- argTypes: {
13
- colorStop: {
14
- control: {
15
- type: "inline-radio",
16
- options: ["light", "dark"]
17
- }
18
- }
19
- },
20
- args: {
21
- colorStop: "light"
22
- }
23
- };
24
- const storyStyles = html`
25
- <style type="text/css">
26
- #outer,
27
- #example {
28
- width: 500px;
29
- padding: 3em;
30
- background-color: var(--spectrum-gray-100);
31
- color: var(--spectrum-gray-800);
32
- }
33
-
34
- #inner {
35
- margin-top: 2em;
36
- padding: 2em;
37
- background-color: var(--spectrum-gray-100);
38
- color: var(--spectrum-gray-800);
39
- }
40
-
41
- #buttons {
42
- margin-top: 2em;
43
- }
44
- </style>
45
- `;
46
- export const Default = ({
47
- colorStop: color
48
- }) => {
49
- return html`
50
- ${storyStyles}
51
- <sp-theme
52
- color="${color}"
53
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
54
- >
55
- <div id="example">
56
- <div>
57
- <sp-slider
58
- value="5"
59
- step="1"
60
- min="1"
61
- max="11"
62
- label="Volume"
63
- id="volume-slider"
64
- ></sp-slider>
65
- </div>
66
- <div><sp-switch>Overdrive</sp-switch></div>
67
- <sp-button-group id="buttons">
68
- <sp-button variant="primary" treatment="outline">
69
- Cancel
70
- </sp-button>
71
- <sp-button variant="accent">Continue</sp-button>
72
- </sp-button-group>
73
- </div>
74
- </sp-theme>
75
- `;
76
- };
77
- export const displayFlex = () => html`
78
- <style type="text/css">
79
- #flex-theme {
80
- display: flex;
81
- flex-direction: row;
82
- }
83
- #flex-theme sp-button {
84
- flex: 0 0;
85
- }
86
- #flex-theme #middle-button {
87
- flex: 1 0;
88
- }
89
- </style>
90
- <sp-theme
91
- id="flex-theme"
92
- color="dark"
93
- theme=${window.__swc_hack_knobs__.defaultSystemVariant}
94
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
95
- >
96
- <sp-button>Start</sp-button>
97
- <sp-button id="middle-button">Middle</sp-button>
98
- <sp-button>End</sp-button>
99
- </sp-theme>
100
- `;
101
- export const none = () => html`
102
- ${storyStyles}
103
- <div id="example">
104
- <div>
105
- <sp-slider
106
- value="5"
107
- step="1"
108
- min="1"
109
- max="11"
110
- label="Volume"
111
- id="volume-slider"
112
- ></sp-slider>
113
- </div>
114
- <div><sp-switch>Overdrive</sp-switch></div>
115
- <sp-button-group id="buttons">
116
- <sp-button variant="primary" treatment="outline">Cancel</sp-button>
117
- <sp-button variant="accent">Continue</sp-button>
118
- </sp-button-group>
119
- </div>
120
- <sp-theme></sp-theme>
121
- `;
122
- export const nestedTheme = ({
123
- colorStop: outer
124
- }) => {
125
- const inner = outer === "light" ? "dark" : "light";
126
- return html`
127
- ${storyStyles}
128
- <sp-theme
129
- color="${outer}"
130
- theme=${window.__swc_hack_knobs__.defaultSystemVariant}
131
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
132
- >
133
- <div id="outer">
134
- <div>
135
- <sp-slider
136
- value="5"
137
- step="1"
138
- min="1"
139
- max="11"
140
- label="Volume"
141
- id="volume-slider"
142
- ></sp-slider>
143
- </div>
144
- <div><sp-switch>Overdrive</sp-switch></div>
145
- <sp-button-group id="buttons">
146
- <sp-button variant="primary" treatment="outline">
147
- Cancel
148
- </sp-button>
149
- <sp-button variant="accent">Continue</sp-button>
150
- </sp-button-group>
151
- <sp-theme
152
- color="${inner}"
153
- dir="ltr"
154
- theme=${window.__swc_hack_knobs__.defaultSystemVariant}
155
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
156
- >
157
- <div id="inner">
158
- <div>
159
- <sp-slider
160
- value="5"
161
- step="1"
162
- min="1"
163
- max="11"
164
- label="Volume"
165
- id="volume-slider-inner"
166
- ></sp-slider>
167
- </div>
168
- <div><sp-switch>Overdrive</sp-switch></div>
169
- <sp-button-group id="buttons-inner">
170
- <sp-button variant="primary" treatment="outline">
171
- Cancel
172
- </sp-button>
173
- <sp-button variant="accent">Continue</sp-button>
174
- </sp-button-group>
175
- </div>
176
- </sp-theme>
177
- </div>
178
- </sp-theme>
179
- `;
180
- };
181
- export const reverseColorNestedTheme = ({
182
- colorStop: outer
183
- }) => {
184
- const inner = outer === "light" ? "dark" : "light";
185
- return html`
186
- <style type="text/css">
187
- #outer {
188
- width: 500px;
189
- padding: 3em;
190
- background-color: var(--spectrum-gray-100);
191
- color: var(--spectrum-gray-800);
192
- }
193
-
194
- #inner {
195
- margin-top: 2em;
196
- padding: 2em;
197
- background-color: var(--spectrum-gray-100);
198
- color: var(--spectrum-gray-800);
199
- }
200
-
201
- #buttons {
202
- margin-top: 2em;
203
- }
204
- </style>
205
- <sp-theme
206
- color="${inner}"
207
- theme=${window.__swc_hack_knobs__.defaultSystemVariant}
208
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
209
- >
210
- <div id="outer">
211
- <div>
212
- <sp-slider
213
- value="5"
214
- step="1"
215
- min="1"
216
- max="11"
217
- label="Volume"
218
- id="volume-slider"
219
- ></sp-slider>
220
- </div>
221
- <div><sp-switch>Overdrive</sp-switch></div>
222
- <sp-button-group id="buttons">
223
- <sp-button variant="primary" treatment="outline">
224
- Cancel
225
- </sp-button>
226
- <sp-button variant="accent">Continue</sp-button>
227
- </sp-button-group>
228
- <sp-theme
229
- color="${outer}"
230
- dir="rtl"
231
- theme=${window.__swc_hack_knobs__.defaultSystemVariant}
232
- system=${window.__swc_hack_knobs__.defaultSystemVariant}
233
- >
234
- <div id="inner">
235
- <div>
236
- <sp-slider
237
- value="5"
238
- step="1"
239
- min="1"
240
- max="11"
241
- label="Volume"
242
- id="volume-slider-inner"
243
- ></sp-slider>
244
- </div>
245
- <div><sp-switch>Overdrive</sp-switch></div>
246
- <sp-button-group id="buttons-inner">
247
- <sp-button variant="primary" treatment="outline">
248
- Cancel
249
- </sp-button>
250
- <sp-button variant="accent">Continue</sp-button>
251
- </sp-button-group>
252
- </div>
253
- </sp-theme>
254
- </div>
255
- </sp-theme>
256
- `;
257
- };
258
- //# sourceMappingURL=theme.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["theme.stories.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*/\nimport '@spectrum-web-components/theme/sp-theme.js';\nimport '@spectrum-web-components/theme/src/themes.js';\nimport '@spectrum-web-components/button/sp-button.js';\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/switch/sp-switch.js';\nimport '@spectrum-web-components/slider/sp-slider.js';\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { Color } from '../src/index.js';\n\nexport default {\n component: 'sp-theme',\n title: 'Theme',\n argTypes: {\n colorStop: {\n control: {\n type: 'inline-radio',\n options: ['light', 'dark'],\n },\n },\n },\n args: {\n colorStop: 'light',\n },\n};\n\nconst storyStyles = html`\n <style type=\"text/css\">\n #outer,\n #example {\n width: 500px;\n padding: 3em;\n background-color: var(--spectrum-gray-100);\n color: var(--spectrum-gray-800);\n }\n\n #inner {\n margin-top: 2em;\n padding: 2em;\n background-color: var(--spectrum-gray-100);\n color: var(--spectrum-gray-800);\n }\n\n #buttons {\n margin-top: 2em;\n }\n </style>\n`;\n\nexport const Default = ({\n colorStop: color,\n}: {\n colorStop: Color;\n}): TemplateResult => {\n return html`\n ${storyStyles}\n <sp-theme\n color=\"${color}\"\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <div id=\"example\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons\">\n <sp-button variant=\"primary\" treatment=\"outline\">\n Cancel\n </sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n </div>\n </sp-theme>\n `;\n};\n\nexport const displayFlex = (): TemplateResult => html`\n <style type=\"text/css\">\n #flex-theme {\n display: flex;\n flex-direction: row;\n }\n #flex-theme sp-button {\n flex: 0 0;\n }\n #flex-theme #middle-button {\n flex: 1 0;\n }\n </style>\n <sp-theme\n id=\"flex-theme\"\n color=\"dark\"\n theme=${window.__swc_hack_knobs__.defaultSystemVariant}\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <sp-button>Start</sp-button>\n <sp-button id=\"middle-button\">Middle</sp-button>\n <sp-button>End</sp-button>\n </sp-theme>\n`;\n\nexport const none = (): TemplateResult => html`\n ${storyStyles}\n <div id=\"example\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons\">\n <sp-button variant=\"primary\" treatment=\"outline\">Cancel</sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n </div>\n <sp-theme></sp-theme>\n`;\n\nexport const nestedTheme = ({\n colorStop: outer,\n}: {\n colorStop: Color;\n}): TemplateResult => {\n const inner = outer === 'light' ? 'dark' : 'light';\n return html`\n ${storyStyles}\n <sp-theme\n color=\"${outer}\"\n theme=${window.__swc_hack_knobs__.defaultSystemVariant}\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <div id=\"outer\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons\">\n <sp-button variant=\"primary\" treatment=\"outline\">\n Cancel\n </sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n <sp-theme\n color=\"${inner}\"\n dir=\"ltr\"\n theme=${window.__swc_hack_knobs__.defaultSystemVariant}\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <div id=\"inner\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider-inner\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons-inner\">\n <sp-button variant=\"primary\" treatment=\"outline\">\n Cancel\n </sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n </div>\n </sp-theme>\n </div>\n </sp-theme>\n `;\n};\n\nexport const reverseColorNestedTheme = ({\n colorStop: outer,\n}: {\n colorStop: Color;\n}): TemplateResult => {\n const inner = outer === 'light' ? 'dark' : 'light';\n return html`\n <style type=\"text/css\">\n #outer {\n width: 500px;\n padding: 3em;\n background-color: var(--spectrum-gray-100);\n color: var(--spectrum-gray-800);\n }\n\n #inner {\n margin-top: 2em;\n padding: 2em;\n background-color: var(--spectrum-gray-100);\n color: var(--spectrum-gray-800);\n }\n\n #buttons {\n margin-top: 2em;\n }\n </style>\n <sp-theme\n color=\"${inner}\"\n theme=${window.__swc_hack_knobs__.defaultSystemVariant}\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <div id=\"outer\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons\">\n <sp-button variant=\"primary\" treatment=\"outline\">\n Cancel\n </sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n <sp-theme\n color=\"${outer}\"\n dir=\"rtl\"\n theme=${window.__swc_hack_knobs__.defaultSystemVariant}\n system=${window.__swc_hack_knobs__.defaultSystemVariant}\n >\n <div id=\"inner\">\n <div>\n <sp-slider\n value=\"5\"\n step=\"1\"\n min=\"1\"\n max=\"11\"\n label=\"Volume\"\n id=\"volume-slider-inner\"\n ></sp-slider>\n </div>\n <div><sp-switch>Overdrive</sp-switch></div>\n <sp-button-group id=\"buttons-inner\">\n <sp-button variant=\"primary\" treatment=\"outline\">\n Cancel\n </sp-button>\n <sp-button variant=\"accent\">Continue</sp-button>\n </sp-button-group>\n </div>\n </sp-theme>\n </div>\n </sp-theme>\n `;\n};\n"],
5
- "mappings": ";AAWA,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,O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Updated, expect, fixture, html } from "@open-wc/testing";
4
- import { stub } from "sinon";
5
- import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
6
- describe("Theme", () => {
7
- testForLitDevWarnings(
8
- async () => await fixture(html`
9
- <sp-theme></sp-theme>
10
- `)
11
- );
12
- describe("Dev Mode", () => {
13
- let consoleWarnStub;
14
- before(() => {
15
- window.__swc.verbose = true;
16
- consoleWarnStub = stub(console, "warn");
17
- });
18
- afterEach(() => {
19
- consoleWarnStub.resetHistory();
20
- });
21
- after(() => {
22
- window.__swc.verbose = false;
23
- consoleWarnStub.restore();
24
- });
25
- it("warns in Dev Mode when no attributes or fragments", async () => {
26
- const el = await fixture(html`
27
- <sp-theme></sp-theme>
28
- `);
29
- await elementUpdated(el);
30
- expect(consoleWarnStub.called).to.be.true;
31
- const spyCall = consoleWarnStub.getCall(0);
32
- expect(
33
- spyCall.args.at(0).includes("theme delivery"),
34
- 'confirm "theme delivery"-centric message'
35
- ).to.be.true;
36
- expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({
37
- data: {
38
- localName: "sp-theme",
39
- type: "api",
40
- level: "default"
41
- }
42
- });
43
- });
44
- });
45
- });
46
- //# sourceMappingURL=theme-devmode.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["theme-devmode.test.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 '@spectrum-web-components/theme/sp-theme.js';\nimport { Theme } from '@spectrum-web-components/theme';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Theme', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Theme>(html`\n <sp-theme></sp-theme>\n `)\n );\n\n describe('Dev Mode', () => {\n let consoleWarnStub!: ReturnType<typeof stub>;\n\n before(() => {\n window.__swc.verbose = true;\n consoleWarnStub = stub(console, 'warn');\n });\n afterEach(() => {\n consoleWarnStub.resetHistory();\n });\n after(() => {\n window.__swc.verbose = false;\n consoleWarnStub.restore();\n });\n\n it('warns in Dev Mode when no attributes or fragments', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(consoleWarnStub.called).to.be.true;\n const spyCall = consoleWarnStub.getCall(0);\n expect(\n (spyCall.args.at(0) as string).includes('theme delivery'),\n 'confirm \"theme delivery\"-centric message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-theme',\n type: 'api',\n level: 'default',\n },\n });\n });\n });\n});\n"],
5
- "mappings": ";AAYA,OAAO;AAEP,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AACtD,SAAS,YAAY;AACrB,SAAS,6BAA6B;AAEtC,SAAS,SAAS,MAAM;AACpB;AAAA,IACI,YACI,MAAM,QAAe;AAAA;AAAA,aAEpB;AAAA,EACT;AAEA,WAAS,YAAY,MAAM;AACvB,QAAI;AAEJ,WAAO,MAAM;AACT,aAAO,MAAM,UAAU;AACvB,wBAAkB,KAAK,SAAS,MAAM;AAAA,IAC1C,CAAC;AACD,cAAU,MAAM;AACZ,sBAAgB,aAAa;AAAA,IACjC,CAAC;AACD,UAAM,MAAM;AACR,aAAO,MAAM,UAAU;AACvB,sBAAgB,QAAQ;AAAA,IAC5B,CAAC;AAED,OAAG,qDAAqD,YAAY;AAChE,YAAM,KAAK,MAAM,QAAe;AAAA;AAAA,aAE/B;AAED,YAAM,eAAe,EAAE;AAEvB,aAAO,gBAAgB,MAAM,EAAE,GAAG,GAAG;AACrC,YAAM,UAAU,gBAAgB,QAAQ,CAAC;AACzC;AAAA,QACK,QAAQ,KAAK,GAAG,CAAC,EAAa,SAAS,gBAAgB;AAAA,QACxD;AAAA,MACJ,EAAE,GAAG,GAAG;AACR,aAAO,QAAQ,KAAK,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,KAAK,MAAM;AAAA,QAC9D,MAAM;AAAA,UACF,WAAW;AAAA,UACX,MAAM;AAAA,UACN,OAAO;AAAA,QACX;AAAA,MACJ,CAAC;AAAA,IACL,CAAC;AAAA,EACL,CAAC;AACL,CAAC;",
6
- "names": []
7
- }
@@ -1,114 +0,0 @@
1
- "use strict";
2
- import "@spectrum-web-components/theme/sp-theme.js";
3
- import { Theme } from "@spectrum-web-components/theme";
4
- import coreStyles from "@spectrum-web-components/theme/src/theme.css.js";
5
- import lightStyles from "@spectrum-web-components/theme/src/theme-light.css.js";
6
- import lightestStyles from "@spectrum-web-components/theme/src/theme-lightest.css.js";
7
- import darkStyles from "@spectrum-web-components/theme/src/theme-dark.css.js";
8
- import darkestStyles from "@spectrum-web-components/theme/src/theme-darkest.css.js";
9
- import largeStyles from "@spectrum-web-components/theme/src/scale-large.css.js";
10
- import mediumStyles from "@spectrum-web-components/theme/src/scale-medium.css.js";
11
- import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
12
- describe("Themes - lazy", () => {
13
- beforeEach(() => {
14
- Theme.themeFragmentsByKind.clear();
15
- Theme.registerThemeFragment("spectrum", "system", coreStyles);
16
- });
17
- after(() => {
18
- Theme.registerThemeFragment("light", "color", lightStyles);
19
- Theme.registerThemeFragment("lightest", "color", lightestStyles);
20
- Theme.registerThemeFragment("dark", "color", darkStyles);
21
- Theme.registerThemeFragment("darkest", "color", darkestStyles);
22
- Theme.registerThemeFragment("large", "scale", largeStyles);
23
- Theme.registerThemeFragment("medium", "scale", mediumStyles);
24
- });
25
- it("loads w/ no themes and none set", async () => {
26
- const el = await fixture(html`
27
- <sp-theme></sp-theme>
28
- `);
29
- await elementUpdated(el);
30
- if (el.shadowRoot.adoptedStyleSheets) {
31
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);
32
- } else {
33
- expect(
34
- [...el.shadowRoot.querySelectorAll("style")].length
35
- ).to.equal(1);
36
- }
37
- expect(el.color).to.equal("");
38
- expect(el.scale).to.equal("");
39
- });
40
- it("loads w/ themes and none set", async () => {
41
- const el = await fixture(html`
42
- <sp-theme></sp-theme>
43
- `);
44
- await elementUpdated(el);
45
- Theme.registerThemeFragment("light", "color", lightStyles);
46
- Theme.registerThemeFragment("medium", "scale", mediumStyles);
47
- await elementUpdated(el);
48
- if (el.shadowRoot.adoptedStyleSheets) {
49
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);
50
- } else {
51
- expect(
52
- [...el.shadowRoot.querySelectorAll("style")].length
53
- ).to.equal(1);
54
- }
55
- expect(el.color).to.equal("light");
56
- expect(el.scale).to.equal("medium");
57
- });
58
- it("loads w/ no themes", async () => {
59
- const el = await fixture(html`
60
- <sp-theme color="light" scale="large"></sp-theme>
61
- `);
62
- await elementUpdated(el);
63
- if (el.shadowRoot.adoptedStyleSheets) {
64
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);
65
- } else {
66
- expect(
67
- [...el.shadowRoot.querySelectorAll("style")].length
68
- ).to.equal(1);
69
- }
70
- });
71
- it("loads w/ not enough themes", async () => {
72
- const el = await fixture(html`
73
- <sp-theme color="lightest" scale="large"></sp-theme>
74
- `);
75
- await elementUpdated(el);
76
- Theme.registerThemeFragment("light", "color", lightStyles);
77
- Theme.registerThemeFragment("medium", "scale", mediumStyles);
78
- await elementUpdated(el);
79
- if (el.shadowRoot.adoptedStyleSheets) {
80
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);
81
- } else {
82
- expect(
83
- [...el.shadowRoot.querySelectorAll("style")].length
84
- ).to.equal(1);
85
- }
86
- });
87
- it("loads w/ lazy themes", async () => {
88
- const el = await fixture(html`
89
- <sp-theme color="lightest" scale="large"></sp-theme>
90
- `);
91
- await elementUpdated(el);
92
- Theme.registerThemeFragment("light", "color", lightStyles);
93
- Theme.registerThemeFragment("medium", "scale", mediumStyles);
94
- await elementUpdated(el);
95
- if (el.shadowRoot.adoptedStyleSheets) {
96
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);
97
- } else {
98
- expect(
99
- [...el.shadowRoot.querySelectorAll("style")].length
100
- ).to.equal(1);
101
- }
102
- Theme.registerThemeFragment("lightest", "color", lightestStyles);
103
- Theme.registerThemeFragment("large", "scale", largeStyles);
104
- await elementUpdated(el);
105
- if (el.shadowRoot.adoptedStyleSheets) {
106
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(3);
107
- } else {
108
- expect(
109
- [...el.shadowRoot.querySelectorAll("style")].length
110
- ).to.equal(3);
111
- }
112
- });
113
- });
114
- //# sourceMappingURL=theme-lazy.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["theme-lazy.test.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 '@spectrum-web-components/theme/sp-theme.js';\nimport { Theme, ThemeFragmentMap } from '@spectrum-web-components/theme';\nimport coreStyles from '@spectrum-web-components/theme/src/theme.css.js';\nimport lightStyles from '@spectrum-web-components/theme/src/theme-light.css.js';\nimport lightestStyles from '@spectrum-web-components/theme/src/theme-lightest.css.js';\nimport darkStyles from '@spectrum-web-components/theme/src/theme-dark.css.js';\nimport darkestStyles from '@spectrum-web-components/theme/src/theme-darkest.css.js';\nimport largeStyles from '@spectrum-web-components/theme/src/scale-large.css.js';\nimport mediumStyles from '@spectrum-web-components/theme/src/scale-medium.css.js';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\ntype TestableThemeConstructor = {\n instances: Set<Theme>;\n themeFragmentsByKind: ThemeFragmentMap;\n};\n\ndescribe('Themes - lazy', () => {\n beforeEach(() => {\n (\n Theme as unknown as TestableThemeConstructor\n ).themeFragmentsByKind.clear();\n // Core is registered by default in `theme.ts`\n Theme.registerThemeFragment('spectrum', 'system', coreStyles);\n });\n after(() => {\n Theme.registerThemeFragment('light', 'color', lightStyles);\n Theme.registerThemeFragment('lightest', 'color', lightestStyles);\n Theme.registerThemeFragment('dark', 'color', darkStyles);\n Theme.registerThemeFragment('darkest', 'color', darkestStyles);\n Theme.registerThemeFragment('large', 'scale', largeStyles);\n Theme.registerThemeFragment('medium', 'scale', mediumStyles);\n });\n it('loads w/ no themes and none set', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme></sp-theme>\n `);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(1);\n }\n expect(el.color).to.equal('');\n expect(el.scale).to.equal('');\n });\n it('loads w/ themes and none set', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme></sp-theme>\n `);\n\n await elementUpdated(el);\n\n Theme.registerThemeFragment('light', 'color', lightStyles);\n Theme.registerThemeFragment('medium', 'scale', mediumStyles);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(1);\n }\n expect(el.color).to.equal('light');\n expect(el.scale).to.equal('medium');\n });\n it('loads w/ no themes', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"light\" scale=\"large\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(1);\n }\n });\n it('loads w/ not enough themes', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"lightest\" scale=\"large\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n Theme.registerThemeFragment('light', 'color', lightStyles);\n Theme.registerThemeFragment('medium', 'scale', mediumStyles);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(1);\n }\n });\n it('loads w/ lazy themes', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"lightest\" scale=\"large\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n Theme.registerThemeFragment('light', 'color', lightStyles);\n Theme.registerThemeFragment('medium', 'scale', mediumStyles);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(1);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(1);\n }\n\n Theme.registerThemeFragment('lightest', 'color', lightestStyles);\n Theme.registerThemeFragment('large', 'scale', largeStyles);\n\n await elementUpdated(el);\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(3);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(3);\n }\n });\n});\n"],
5
- "mappings": ";AAYA,OAAO;AACP,SAAS,aAA+B;AACxC,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB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AW,oBAAoB;AAClC,aAAO,GAAG,WAAW,mBAAmB,MAAM,EAAE,GAAG,MAAM,CAAC;AAAA,IAC9D,OAAO;AACH;AAAA,QACI,CAAC,GAAG,GAAG,WAAW,iBAAiB,OAAO,CAAC,EAAE;AAAA,MACjD,EAAE,GAAG,MAAM,CAAC;AAAA,IAChB;AAEA,UAAM,sBAAsB,YAAY,SAAS,cAAc;AAC/D,UAAM,sBAAsB,SAAS,SAAS,WAAW;AAEzD,UAAM,eAAe,EAAE;AAEvB,QAAI,GAAG,WAAW,oBAAoB;AAClC,aAAO,GAAG,WAAW,mBAAmB,MAAM,EAAE,GAAG,MAAM,CAAC;AAAA,IAC9D,OAAO;AACH;AAAA,QACI,CAAC,GAAG,GAAG,WAAW,iBAAiB,OAAO,CAAC,EAAE;AAAA,MACjD,EAAE,GAAG,MAAM,CAAC;AAAA,IAChB;AAAA,EACJ,CAAC;AACL,CAAC;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/theme.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ThemeStories", stories);
5
- //# sourceMappingURL=theme.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["theme.test-vrt.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 * as stories from '../stories/theme.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ThemeStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,gBAAgB,OAA+B;",
6
- "names": []
7
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- import { Theme } from "@spectrum-web-components/theme";
3
- import { expect } from "@open-wc/testing";
4
- import { version } from "@spectrum-web-components/base/src/version.js";
5
- class DirElement extends Theme {
6
- }
7
- customElements.define("dir-element", DirElement);
8
- describe("Theme", () => {
9
- it("has a static VERSION property", () => {
10
- expect(DirElement.VERSION).to.equal(version);
11
- });
12
- });
13
- //# sourceMappingURL=theme.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["theme.test.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\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Theme } from '@spectrum-web-components/theme';\nimport { expect } from '@open-wc/testing';\nimport { version } from '@spectrum-web-components/base/src/version.js';\n\nclass DirElement extends Theme {}\n\ncustomElements.define('dir-element', DirElement);\n\ndescribe('Theme', () => {\n it('has a static VERSION property', () => {\n expect(DirElement.VERSION).to.equal(version);\n });\n});\n"],
5
- "mappings": ";AAUA,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,eAAe;AAExB,MAAM,mBAAmB,MAAM;AAAC;AAEhC,eAAe,OAAO,eAAe,UAAU;AAE/C,SAAS,SAAS,MAAM;AACpB,KAAG,iCAAiC,MAAM;AACtC,WAAO,WAAW,OAAO,EAAE,GAAG,MAAM,OAAO;AAAA,EAC/C,CAAC;AACL,CAAC;",
6
- "names": []
7
- }
@@ -1,169 +0,0 @@
1
- "use strict";
2
- import "@spectrum-web-components/theme/sp-theme.js";
3
- import "@spectrum-web-components/theme/src/themes.js";
4
- import { Theme } from "@spectrum-web-components/theme";
5
- import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
6
- import { css } from "@spectrum-web-components/base";
7
- describe("Systems", () => {
8
- it("loads - light", async () => {
9
- const el = await fixture(html`
10
- <sp-theme system="spectrum" color="light"></sp-theme>
11
- `);
12
- await elementUpdated(el);
13
- expect(el).to.exist;
14
- expect(el).shadowDom.to.exist;
15
- });
16
- it("loads - dark", async () => {
17
- const el = await fixture(html`
18
- <sp-theme color="dark"></sp-theme>
19
- `);
20
- await elementUpdated(el);
21
- expect(el).to.exist;
22
- expect(el).shadowDom.to.exist;
23
- });
24
- it("loads - unkown", async () => {
25
- const el = await fixture(html`
26
- <sp-theme color="unknown" scale="unknown"></sp-theme>
27
- `);
28
- await elementUpdated(el);
29
- expect(el).to.exist;
30
- expect(el).shadowDom.to.exist;
31
- });
32
- it("adds an instance only once", async () => {
33
- const el = await fixture(html`
34
- <sp-theme system="express"></sp-theme>
35
- `);
36
- await elementUpdated(el);
37
- const testableTheme = Theme;
38
- expect(testableTheme.instances.has(el), "first").to.be.true;
39
- expect(testableTheme.instances.size).to.equal(1);
40
- el.remove();
41
- expect(testableTheme.instances.has(el), "second").to.be.false;
42
- expect(testableTheme.instances.size).to.equal(0);
43
- document.body.append(el);
44
- expect(testableTheme.instances.has(el), "third").to.be.true;
45
- expect(testableTheme.instances.size).to.equal(1);
46
- });
47
- });
48
- describe("Lightest", () => {
49
- it("loads", async () => {
50
- const el = await fixture(html`
51
- <sp-theme color="lightest"></sp-theme>
52
- `);
53
- await elementUpdated(el);
54
- expect(el).to.exist;
55
- expect(el).shadowDom.to.exist;
56
- });
57
- });
58
- describe("Medium", () => {
59
- it("loads", async () => {
60
- const el = await fixture(html`
61
- <sp-theme scale="medium"></sp-theme>
62
- `);
63
- await elementUpdated(el);
64
- expect(el).to.exist;
65
- expect(el).shadowDom.to.exist;
66
- });
67
- });
68
- describe("App styles", () => {
69
- it("applies app fragments", async () => {
70
- const el = await fixture(html`
71
- <sp-theme color="light">
72
- <style>
73
- div {
74
- padding: var(--app-padding);
75
- }
76
- </style>
77
- <div></div>
78
- </sp-theme>
79
- `);
80
- const div = el.querySelector("div");
81
- await elementUpdated(el);
82
- const preStylesDiv = getComputedStyle(div);
83
- expect(preStylesDiv.paddingBlockStart).to.equal("0px");
84
- Theme.registerThemeFragment(
85
- "app",
86
- "app",
87
- css`
88
- :host {
89
- --app-padding: 10px;
90
- }
91
- `
92
- );
93
- await elementUpdated(el);
94
- const postStylesDiv = getComputedStyle(div);
95
- expect(postStylesDiv.paddingBlockStart).to.equal("10px");
96
- Theme.themeFragmentsByKind.delete("app");
97
- });
98
- });
99
- describe("Setting attributes", () => {
100
- it("loads", async () => {
101
- const el = await fixture(html`
102
- <sp-theme color="light"></sp-theme>
103
- `);
104
- await elementUpdated(el);
105
- expect(el).to.not.be.undefined;
106
- expect(el.hasAttribute("scale")).to.be.false;
107
- if (el.shadowRoot.adoptedStyleSheets) {
108
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(2);
109
- } else {
110
- expect(
111
- [...el.shadowRoot.querySelectorAll("style")].length
112
- ).to.equal(2);
113
- }
114
- await elementUpdated(el);
115
- el.setAttribute("scale", "fish");
116
- expect(el.getAttribute("scale")).to.equal("medium");
117
- if (el.shadowRoot.adoptedStyleSheets) {
118
- expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(2);
119
- } else {
120
- expect(
121
- [...el.shadowRoot.querySelectorAll("style")].length
122
- ).to.equal(2);
123
- }
124
- el.color = "dark";
125
- el.scale = "medium";
126
- await elementUpdated(el);
127
- expect(el.getAttribute("color")).to.equal("dark");
128
- expect(el.getAttribute("scale")).to.equal("medium");
129
- if (el.shadowRoot.adoptedStyleSheets) {
130
- expect(el.shadowRoot.adoptedStyleSheets.length, "all").to.equal(3);
131
- } else {
132
- expect(
133
- [...el.shadowRoot.querySelectorAll("style")].length
134
- ).to.equal(3);
135
- }
136
- el.setAttribute("color", "fish");
137
- await elementUpdated(el);
138
- expect(el.getAttribute("color")).to.equal("dark");
139
- if (el.shadowRoot.adoptedStyleSheets) {
140
- expect(el.shadowRoot.adoptedStyleSheets.length, "last").to.equal(3);
141
- } else {
142
- expect(
143
- [...el.shadowRoot.querySelectorAll("style")].length
144
- ).to.equal(3);
145
- }
146
- });
147
- it("loads and handles system attribute", async () => {
148
- const el = await fixture(html`
149
- <sp-theme system="spectrum"></sp-theme>
150
- `);
151
- await elementUpdated(el);
152
- expect(el).to.not.be.undefined;
153
- expect(el.hasAttribute("system")).to.be.true;
154
- expect(el.getAttribute("system")).to.equal("spectrum");
155
- el.setAttribute("system", "invalid");
156
- await elementUpdated(el);
157
- expect(el.getAttribute("system")).to.equal("spectrum");
158
- el.setAttribute("system", "express");
159
- await elementUpdated(el);
160
- expect(el.getAttribute("system")).to.equal("express");
161
- el.removeAttribute("system");
162
- await elementUpdated(el);
163
- expect(el.getAttribute("system")).to.equal("express");
164
- el.system = "spectrum";
165
- await elementUpdated(el);
166
- expect(el.getAttribute("system")).to.equal("spectrum");
167
- });
168
- });
169
- //# sourceMappingURL=themes.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["themes.test.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 '@spectrum-web-components/theme/sp-theme.js';\nimport '@spectrum-web-components/theme/src/themes.js';\nimport { Theme, ThemeFragmentMap } from '@spectrum-web-components/theme';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { css } from '@spectrum-web-components/base';\n\ntype TestableThemeConstructor = {\n instances: Set<Theme>;\n themeFragmentsByKind: ThemeFragmentMap;\n};\n\ndescribe('Systems', () => {\n it('loads - light', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme system=\"spectrum\" color=\"light\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.exist;\n expect(el).shadowDom.to.exist;\n });\n it('loads - dark', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"dark\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.exist;\n expect(el).shadowDom.to.exist;\n });\n it('loads - unkown', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"unknown\" scale=\"unknown\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.exist;\n expect(el).shadowDom.to.exist;\n });\n it('adds an instance only once', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme system=\"express\"></sp-theme>\n `);\n\n await elementUpdated(el);\n const testableTheme = Theme as unknown as TestableThemeConstructor;\n expect(testableTheme.instances.has(el), 'first').to.be.true;\n expect(testableTheme.instances.size).to.equal(1);\n\n el.remove();\n expect(testableTheme.instances.has(el), 'second').to.be.false;\n expect(testableTheme.instances.size).to.equal(0);\n\n document.body.append(el);\n expect(testableTheme.instances.has(el), 'third').to.be.true;\n expect(testableTheme.instances.size).to.equal(1);\n });\n});\n\ndescribe('Lightest', () => {\n it('loads', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"lightest\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.exist;\n expect(el).shadowDom.to.exist;\n });\n});\n\ndescribe('Medium', () => {\n it('loads', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme scale=\"medium\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.exist;\n expect(el).shadowDom.to.exist;\n });\n});\n\ndescribe('App styles', () => {\n it('applies app fragments', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"light\">\n <style>\n div {\n padding: var(--app-padding);\n }\n </style>\n <div></div>\n </sp-theme>\n `);\n const div = el.querySelector('div') as HTMLDivElement;\n\n await elementUpdated(el);\n\n const preStylesDiv = getComputedStyle(div);\n expect(preStylesDiv.paddingBlockStart).to.equal('0px');\n\n Theme.registerThemeFragment(\n 'app',\n 'app',\n css`\n :host {\n --app-padding: 10px;\n }\n `\n );\n await elementUpdated(el);\n\n const postStylesDiv = getComputedStyle(div);\n expect(postStylesDiv.paddingBlockStart).to.equal('10px');\n\n (\n Theme as unknown as TestableThemeConstructor\n ).themeFragmentsByKind.delete('app');\n });\n});\n\ndescribe('Setting attributes', () => {\n it('loads', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme color=\"light\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.not.be.undefined;\n expect(el.hasAttribute('scale')).to.be.false;\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(2);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(2);\n }\n\n await elementUpdated(el);\n\n // Invalid initial value falls back to default\n el.setAttribute('scale', 'fish');\n expect(el.getAttribute('scale')).to.equal('medium');\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length).to.equal(2);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(2);\n }\n\n el.color = 'dark';\n el.scale = 'medium';\n\n await elementUpdated(el);\n expect(el.getAttribute('color')).to.equal('dark');\n expect(el.getAttribute('scale')).to.equal('medium');\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length, 'all').to.equal(3);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(3);\n }\n\n // Invalid second + value fallsback to previous\n el.setAttribute('color', 'fish');\n\n await elementUpdated(el);\n expect(el.getAttribute('color')).to.equal('dark');\n\n if (el.shadowRoot.adoptedStyleSheets) {\n expect(el.shadowRoot.adoptedStyleSheets.length, 'last').to.equal(3);\n } else {\n expect(\n [...el.shadowRoot.querySelectorAll('style')].length\n ).to.equal(3);\n }\n });\n\n it('loads and handles system attribute', async () => {\n const el = await fixture<Theme>(html`\n <sp-theme system=\"spectrum\"></sp-theme>\n `);\n\n await elementUpdated(el);\n\n expect(el).to.not.be.undefined;\n expect(el.hasAttribute('system')).to.be.true;\n expect(el.getAttribute('system')).to.equal('spectrum');\n\n el.setAttribute('system', 'invalid');\n await elementUpdated(el);\n expect(el.getAttribute('system')).to.equal('spectrum'); // Should fallback to 'spectrum'\n\n el.setAttribute('system', 'express');\n await elementUpdated(el);\n expect(el.getAttribute('system')).to.equal('express');\n\n // Removing attribute should persist the last valid value\n el.removeAttribute('system');\n await elementUpdated(el);\n expect(el.getAttribute('system')).to.equal('express');\n\n el.system = 'spectrum';\n await elementUpdated(el);\n expect(el.getAttribute('system')).to.equal('spectrum');\n });\n});\n"],
5
- "mappings": ";AAYA,OAAO;AACP,OAAO;AACP,SAAS,aAA+B;AACxC,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AACtD,SAAS,WAAW;AAOpB,SAAS,WAAW,MAAM;AACtB,KAAG,iBAAiB,YAAY;AAC5B,UAAM,KAAK,MAAM,QAAe;AAAA;AAAA,SAE/B;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,EAAE,EAAE,GAAG;AACd,WAAO,EAAE,EAAE,UAAU,GAAG;AAAA,EAC5B,CAAC;AACD,KAAG,gBAAgB,YAAY;AAC3B,UAAM,KAAK,MAAM,QAAe;AAAA;AAAA,SAE/B;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,EAAE,EAAE,GAAG;AACd,WAAO,EAAE,EAAE,UAAU,GAAG;AAAA,EAC5B,CAAC;AACD,KAAG,kBAAkB,YAAY;AAC7B,UAAM,KAAK,MAAM,QAAe;AAAA;AAAA,SAE/B;AAED,UAAM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