@spectrum-web-components/color-wheel 1.0.2 → 1.0.3

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/LICENSE ADDED
@@ -0,0 +1,201 @@
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/color-wheel",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -63,10 +63,10 @@
63
63
  ],
64
64
  "dependencies": {
65
65
  "@ctrl/tinycolor": "^4.0.3",
66
- "@spectrum-web-components/base": "^1.0.2",
67
- "@spectrum-web-components/color-handle": "^1.0.2",
68
- "@spectrum-web-components/reactive-controllers": "^1.0.2",
69
- "@spectrum-web-components/shared": "^1.0.2"
66
+ "@spectrum-web-components/base": "^1.0.1",
67
+ "@spectrum-web-components/color-handle": "^1.0.1",
68
+ "@spectrum-web-components/reactive-controllers": "^1.0.3",
69
+ "@spectrum-web-components/shared": "^1.0.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@spectrum-css/colorwheel": "^5.0.0-s2-foundations.15"
@@ -76,5 +76,6 @@
76
76
  "sideEffects": [
77
77
  "./sp-*.js",
78
78
  "./**/*.dev.js"
79
- ]
79
+ ],
80
+ "gitHead": "f102bde98b9dca7ef2ad602dc31ce986560891ad"
80
81
  }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ import "@spectrum-web-components/color-wheel/sp-color-wheel.js";
4
+ export default {
5
+ title: "Color/Wheel",
6
+ component: "sp-color-wheel"
7
+ };
8
+ export const Default = () => {
9
+ return html`
10
+ <sp-color-wheel></sp-color-wheel>
11
+ `;
12
+ };
13
+ export const sized = () => {
14
+ return html`
15
+ <sp-color-wheel style="width: 300px; height: 300px;"></sp-color-wheel>
16
+ `;
17
+ };
18
+ export const wheelDisabled = () => {
19
+ return html`
20
+ <sp-color-wheel disabled></sp-color-wheel>
21
+ `;
22
+ };
23
+ export const canvas = () => {
24
+ return html`
25
+ <sp-color-wheel>
26
+ <canvas slot="gradient"></canvas>
27
+ </sp-color-wheel>
28
+ `;
29
+ };
30
+ class CanvasWriter extends HTMLElement {
31
+ constructor() {
32
+ super();
33
+ this.writeStatePromise = Promise.resolve(false);
34
+ this.writeStatePromise = new Promise((res) => {
35
+ requestAnimationFrame(() => {
36
+ this.writeToCanvas();
37
+ res(true);
38
+ });
39
+ });
40
+ }
41
+ writeToCanvas() {
42
+ const { previousElementSibling } = this;
43
+ if (previousElementSibling) {
44
+ const canvas2 = previousElementSibling.querySelector(
45
+ 'canvas[slot="gradient"]'
46
+ );
47
+ if (canvas2) {
48
+ canvas2.width = canvas2.offsetWidth;
49
+ canvas2.height = canvas2.offsetHeight;
50
+ const context = canvas2.getContext("2d");
51
+ if (context) {
52
+ context.rect(0, 0, canvas2.width, canvas2.height);
53
+ const width = canvas2.width;
54
+ const height = canvas2.height;
55
+ const centerX = width / 2;
56
+ const centerY = height / 2;
57
+ const ringSize = centerX - 18;
58
+ for (let i = 0; i < 360; i += Math.PI / 8) {
59
+ const rad = i * (2 * Math.PI) / 360;
60
+ context.strokeStyle = `hsla(${i}, 100%, 50%, 1.0)`;
61
+ context.beginPath();
62
+ context.moveTo(
63
+ centerX + ringSize * Math.cos(rad),
64
+ centerY + ringSize * Math.sin(rad)
65
+ );
66
+ context.lineTo(
67
+ centerX + centerX * Math.cos(rad),
68
+ centerY + centerY * Math.sin(rad)
69
+ );
70
+ context.stroke();
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ get updateComplete() {
77
+ return this.writeStatePromise;
78
+ }
79
+ }
80
+ customElements.define("wheel-canvas-writer", CanvasWriter);
81
+ canvas.decorators = [
82
+ (story) => {
83
+ return html`
84
+ ${story()}
85
+ <wheel-canvas-writer></wheel-canvas-writer>
86
+ `;
87
+ }
88
+ ];
89
+ //# sourceMappingURL=color-wheel.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-wheel.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*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/color-wheel/sp-color-wheel.js';\n\nexport default {\n title: 'Color/Wheel',\n component: 'sp-color-wheel',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-color-wheel></sp-color-wheel>\n `;\n};\n\nexport const sized = (): TemplateResult => {\n return html`\n <sp-color-wheel style=\"width: 300px; height: 300px;\"></sp-color-wheel>\n `;\n};\n\nexport const wheelDisabled = (): TemplateResult => {\n return html`\n <sp-color-wheel disabled></sp-color-wheel>\n `;\n};\n\nexport const canvas = (): TemplateResult => {\n return html`\n <sp-color-wheel>\n <canvas slot=\"gradient\"></canvas>\n </sp-color-wheel>\n `;\n};\n\nclass CanvasWriter extends HTMLElement {\n writeToCanvas(): void {\n const { previousElementSibling } = this;\n if (previousElementSibling) {\n const canvas = previousElementSibling.querySelector(\n 'canvas[slot=\"gradient\"]'\n ) as HTMLCanvasElement;\n\n if (canvas) {\n canvas.width = canvas.offsetWidth;\n canvas.height = canvas.offsetHeight;\n const context = canvas.getContext('2d');\n if (context) {\n context.rect(0, 0, canvas.width, canvas.height);\n\n const width = canvas.width;\n const height = canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const ringSize = centerX - 18;\n\n for (let i = 0; i < 360; i += Math.PI / 8) {\n const rad = (i * (2 * Math.PI)) / 360;\n context.strokeStyle = `hsla(${i}, 100%, 50%, 1.0)`;\n context.beginPath();\n context.moveTo(\n centerX + ringSize * Math.cos(rad),\n centerY + ringSize * Math.sin(rad)\n );\n context.lineTo(\n centerX + centerX * Math.cos(rad),\n centerY + centerY * Math.sin(rad)\n );\n context.stroke();\n }\n }\n }\n }\n }\n\n constructor() {\n super();\n this.writeStatePromise = new Promise((res) => {\n requestAnimationFrame(() => {\n this.writeToCanvas();\n res(true);\n });\n });\n }\n\n private writeStatePromise: Promise<boolean> = Promise.resolve(false);\n\n get updateComplete(): Promise<boolean> {\n return this.writeStatePromise;\n }\n}\n\ncustomElements.define('wheel-canvas-writer', CanvasWriter);\n\ncanvas.decorators = [\n (story: () => TemplateResult): TemplateResult => {\n return html`\n ${story()}\n <wheel-canvas-writer></wheel-canvas-writer>\n `;\n },\n];\n"],
5
+ "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,SAAS,MAAsB;AACxC,SAAO;AAAA;AAAA;AAAA;AAAA;AAKX;AAEA,MAAM,qBAAqB,YAAY;AAAA,EAwCnC,cAAc;AACV,UAAM;AASV,SAAQ,oBAAsC,QAAQ,QAAQ,KAAK;AAR/D,SAAK,oBAAoB,IAAI,QAAQ,CAAC,QAAQ;AAC1C,4BAAsB,MAAM;AACxB,aAAK,cAAc;AACnB,YAAI,IAAI;AAAA,MACZ,CAAC;AAAA,IACL,CAAC;AAAA,EACL;AAAA,EA/CA,gBAAsB;AAClB,UAAM,EAAE,uBAAuB,IAAI;AACnC,QAAI,wBAAwB;AACxB,YAAMA,UAAS,uBAAuB;AAAA,QAClC;AAAA,MACJ;AAEA,UAAIA,SAAQ;AACR,QAAAA,QAAO,QAAQA,QAAO;AACtB,QAAAA,QAAO,SAASA,QAAO;AACvB,cAAM,UAAUA,QAAO,WAAW,IAAI;AACtC,YAAI,SAAS;AACT,kBAAQ,KAAK,GAAG,GAAGA,QAAO,OAAOA,QAAO,MAAM;AAE9C,gBAAM,QAAQA,QAAO;AACrB,gBAAM,SAASA,QAAO;AACtB,gBAAM,UAAU,QAAQ;AACxB,gBAAM,UAAU,SAAS;AACzB,gBAAM,WAAW,UAAU;AAE3B,mBAAS,IAAI,GAAG,IAAI,KAAK,KAAK,KAAK,KAAK,GAAG;AACvC,kBAAM,MAAO,KAAK,IAAI,KAAK,MAAO;AAClC,oBAAQ,cAAc,QAAQ,CAAC;AAC/B,oBAAQ,UAAU;AAClB,oBAAQ;AAAA,cACJ,UAAU,WAAW,KAAK,IAAI,GAAG;AAAA,cACjC,UAAU,WAAW,KAAK,IAAI,GAAG;AAAA,YACrC;AACA,oBAAQ;AAAA,cACJ,UAAU,UAAU,KAAK,IAAI,GAAG;AAAA,cAChC,UAAU,UAAU,KAAK,IAAI,GAAG;AAAA,YACpC;AACA,oBAAQ,OAAO;AAAA,UACnB;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EAcA,IAAI,iBAAmC;AACnC,WAAO,KAAK;AAAA,EAChB;AACJ;AAEA,eAAe,OAAO,uBAAuB,YAAY;AAEzD,OAAO,aAAa;AAAA,EAChB,CAAC,UAAgD;AAC7C,WAAO;AAAA,cACD,MAAM,CAAC;AAAA;AAAA;AAAA,EAGjB;AACJ;",
6
+ "names": ["canvas"]
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ import "@spectrum-web-components/color-wheel/sp-color-wheel.js";
3
+ import { html } from "lit";
4
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
5
+ measureFixtureCreation(html`
6
+ <sp-color-wheel></sp-color-wheel>
7
+ `);
8
+ //# sourceMappingURL=basic-test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["basic-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/color-wheel/sp-color-wheel.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-color-wheel></sp-color-wheel>\n`);\n"],
5
+ "mappings": ";AAYA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA,CAEtB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ import { html } from "@open-wc/testing";
3
+ import "@spectrum-web-components/color-wheel/sp-color-wheel.js";
4
+ import { testForMemoryLeaks } from "../../../test/testing-helpers.js";
5
+ testForMemoryLeaks(html`
6
+ <sp-color-wheel></sp-color-wheel>
7
+ `);
8
+ //# sourceMappingURL=color-wheel-memory.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-wheel-memory.test.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2023 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*/\n\nimport { html } from '@open-wc/testing';\nimport '@spectrum-web-components/color-wheel/sp-color-wheel.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(html`\n <sp-color-wheel></sp-color-wheel>\n`);\n"],
5
+ "mappings": ";AAWA,SAAS,YAAY;AACrB,OAAO;AACP,SAAS,0BAA0B;AAEnC,mBAAmB;AAAA;AAAA,CAElB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import * as stories from "../stories/color-wheel.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("ColorWheelStories", stories);
5
+ //# sourceMappingURL=color-wheel.test-vrt.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-wheel.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/color-wheel.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ColorWheelStories', stories as unknown as TestsType);\n"],
5
+ "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,qBAAqB,OAA+B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,514 @@
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import {
4
+ arrowDownEvent,
5
+ arrowDownKeyupEvent,
6
+ arrowLeftEvent,
7
+ arrowLeftKeyupEvent,
8
+ arrowRightEvent,
9
+ arrowRightKeyupEvent,
10
+ arrowUpEvent,
11
+ arrowUpKeyupEvent,
12
+ ignoreResizeObserverLoopError,
13
+ testForLitDevWarnings
14
+ } from "../../../test/testing-helpers.js";
15
+ import "@spectrum-web-components/color-wheel/sp-color-wheel.js";
16
+ import { TinyColor } from "@ctrl/tinycolor";
17
+ import { sendKeys } from "@web/test-runner-commands";
18
+ import { sendMouse } from "../../../test/plugins/browser.js";
19
+ import { spy } from "sinon";
20
+ ignoreResizeObserverLoopError(before, after);
21
+ describe("ColorWheel", () => {
22
+ testForLitDevWarnings(
23
+ async () => await fixture(
24
+ html`
25
+ <sp-color-wheel></sp-color-wheel>
26
+ `
27
+ )
28
+ );
29
+ it("loads default color-wheel accessibly", async () => {
30
+ const el = await fixture(
31
+ html`
32
+ <sp-color-wheel></sp-color-wheel>
33
+ `
34
+ );
35
+ await elementUpdated(el);
36
+ await expect(el).to.be.accessible();
37
+ });
38
+ it("manages a single tab stop", async () => {
39
+ const test = await fixture(
40
+ html`
41
+ <div>
42
+ <input type="text" id="test-input-1" />
43
+ <sp-color-wheel></sp-color-wheel>
44
+ <input type="text" id="test-input-2" />
45
+ </div>
46
+ `
47
+ );
48
+ const el = test.querySelector("sp-color-wheel");
49
+ const input1 = test.querySelector(
50
+ "input:nth-of-type(1)"
51
+ );
52
+ const input2 = test.querySelector(
53
+ "input:nth-of-type(2)"
54
+ );
55
+ await elementUpdated(el);
56
+ input1.focus();
57
+ expect(document.activeElement).to.equal(input1);
58
+ await sendKeys({
59
+ press: "Tab"
60
+ });
61
+ expect(document.activeElement).to.equal(el);
62
+ let value = el.value;
63
+ await sendKeys({
64
+ press: "ArrowRight"
65
+ });
66
+ expect(el.value).to.not.equal(value);
67
+ await sendKeys({
68
+ press: "Tab"
69
+ });
70
+ expect(document.activeElement).to.equal(input2);
71
+ await sendKeys({
72
+ press: "Shift+Tab"
73
+ });
74
+ expect(document.activeElement).to.equal(el);
75
+ value = el.value;
76
+ await sendKeys({
77
+ press: "ArrowDown"
78
+ });
79
+ expect(el.value).to.not.equal(value);
80
+ await sendKeys({
81
+ press: "Shift+Tab"
82
+ });
83
+ expect(document.activeElement).to.equal(input1);
84
+ });
85
+ it("manages [focused]", async () => {
86
+ const el = await fixture(
87
+ html`
88
+ <sp-color-wheel></sp-color-wheel>
89
+ `
90
+ );
91
+ await elementUpdated(el);
92
+ expect(el.focused).to.be.false;
93
+ await sendKeys({ press: "Tab" });
94
+ await elementUpdated(el);
95
+ expect(el.focused).to.be.true;
96
+ el.blur();
97
+ await elementUpdated(el);
98
+ expect(el.focused).to.be.false;
99
+ el.dispatchEvent(new FocusEvent("focus"));
100
+ await elementUpdated(el);
101
+ expect(el.focused).to.be.true;
102
+ el.dispatchEvent(new FocusEvent("blur"));
103
+ await elementUpdated(el);
104
+ expect(el.focused).to.be.false;
105
+ });
106
+ it('dispatches input and change events in response to "Arrow*" keypresses', async () => {
107
+ const inputSpy = spy();
108
+ const changeSpy = spy();
109
+ const el = await fixture(
110
+ html`
111
+ <sp-color-wheel
112
+ @change=${() => changeSpy()}
113
+ @input=${() => inputSpy()}
114
+ ></sp-color-wheel>
115
+ `
116
+ );
117
+ await elementUpdated(el);
118
+ el.focus();
119
+ await sendKeys({ press: "ArrowRight" });
120
+ expect(inputSpy.callCount).to.equal(1);
121
+ expect(changeSpy.callCount).to.equal(1);
122
+ await sendKeys({ press: "ArrowLeft" });
123
+ expect(inputSpy.callCount).to.equal(2);
124
+ expect(changeSpy.callCount).to.equal(2);
125
+ await sendKeys({ press: "ArrowUp" });
126
+ expect(inputSpy.callCount).to.equal(3);
127
+ expect(changeSpy.callCount).to.equal(3);
128
+ await sendKeys({ press: "ArrowDown" });
129
+ expect(inputSpy.callCount).to.equal(4);
130
+ expect(changeSpy.callCount).to.equal(4);
131
+ });
132
+ it("responds to events on the internal input element", async () => {
133
+ const inputSpy = spy();
134
+ const changeSpy = spy();
135
+ const el = await fixture(
136
+ html`
137
+ <sp-color-wheel
138
+ @change=${() => changeSpy()}
139
+ @input=${() => inputSpy()}
140
+ ></sp-color-wheel>
141
+ `
142
+ );
143
+ await elementUpdated(el);
144
+ const input = el.focusElement;
145
+ el.focus();
146
+ input.dispatchEvent(
147
+ new Event("input", {
148
+ bubbles: true,
149
+ composed: true
150
+ })
151
+ );
152
+ input.dispatchEvent(
153
+ new Event("change", {
154
+ bubbles: true,
155
+ composed: false
156
+ // native change events do not compose themselves by default
157
+ })
158
+ );
159
+ expect(inputSpy.callCount).to.equal(1);
160
+ expect(changeSpy.callCount).to.equal(1);
161
+ });
162
+ it('accepts "Arrow*" keypresses', async () => {
163
+ const el = await fixture(
164
+ html`
165
+ <sp-color-wheel></sp-color-wheel>
166
+ `
167
+ );
168
+ await elementUpdated(el);
169
+ expect(el.value).to.equal(0);
170
+ const input = el.focusElement;
171
+ input.dispatchEvent(arrowUpEvent());
172
+ input.dispatchEvent(arrowUpKeyupEvent());
173
+ input.dispatchEvent(arrowUpEvent());
174
+ input.dispatchEvent(arrowUpKeyupEvent());
175
+ await elementUpdated(el);
176
+ expect(el.value).to.equal(2);
177
+ input.dispatchEvent(arrowRightEvent());
178
+ input.dispatchEvent(arrowRightKeyupEvent());
179
+ input.dispatchEvent(arrowRightEvent());
180
+ input.dispatchEvent(arrowRightKeyupEvent());
181
+ await elementUpdated(el);
182
+ expect(el.value).to.equal(4);
183
+ input.dispatchEvent(arrowDownEvent());
184
+ input.dispatchEvent(arrowDownKeyupEvent());
185
+ input.dispatchEvent(arrowDownEvent());
186
+ input.dispatchEvent(arrowDownKeyupEvent());
187
+ await elementUpdated(el);
188
+ expect(el.value).to.equal(2);
189
+ input.dispatchEvent(arrowLeftEvent());
190
+ input.dispatchEvent(arrowLeftKeyupEvent());
191
+ input.dispatchEvent(arrowLeftEvent());
192
+ input.dispatchEvent(arrowLeftKeyupEvent());
193
+ await elementUpdated(el);
194
+ expect(el.value).to.equal(0);
195
+ });
196
+ it('accepts "Arrow*" keypresses in dir="rtl"', async () => {
197
+ const el = await fixture(
198
+ html`
199
+ <sp-color-wheel dir="rtl"></sp-color-wheel>
200
+ `
201
+ );
202
+ await elementUpdated(el);
203
+ expect(el.value).to.equal(0);
204
+ const input = el.focusElement;
205
+ input.dispatchEvent(arrowUpEvent());
206
+ input.dispatchEvent(arrowUpKeyupEvent());
207
+ input.dispatchEvent(arrowUpEvent());
208
+ input.dispatchEvent(arrowUpKeyupEvent());
209
+ await elementUpdated(el);
210
+ expect(el.value).to.equal(2);
211
+ input.dispatchEvent(arrowRightEvent());
212
+ input.dispatchEvent(arrowRightKeyupEvent());
213
+ input.dispatchEvent(arrowRightEvent());
214
+ input.dispatchEvent(arrowRightKeyupEvent());
215
+ await elementUpdated(el);
216
+ expect(el.value).to.equal(0);
217
+ input.dispatchEvent(arrowLeftEvent());
218
+ input.dispatchEvent(arrowLeftKeyupEvent());
219
+ input.dispatchEvent(arrowLeftEvent());
220
+ input.dispatchEvent(arrowLeftKeyupEvent());
221
+ await elementUpdated(el);
222
+ expect(el.value).to.equal(2);
223
+ input.dispatchEvent(arrowDownEvent());
224
+ input.dispatchEvent(arrowDownKeyupEvent());
225
+ input.dispatchEvent(arrowDownEvent());
226
+ input.dispatchEvent(arrowDownKeyupEvent());
227
+ await elementUpdated(el);
228
+ expect(el.value).to.equal(0);
229
+ });
230
+ it('accepts "Arrow*" keypresses with alteration', async () => {
231
+ const el = await fixture(
232
+ html`
233
+ <sp-color-wheel></sp-color-wheel>
234
+ `
235
+ );
236
+ await elementUpdated(el);
237
+ el.focus();
238
+ expect(el.value).to.equal(0);
239
+ await sendKeys({
240
+ down: "Shift"
241
+ });
242
+ await sendKeys({
243
+ press: "ArrowUp"
244
+ });
245
+ await sendKeys({
246
+ press: "ArrowUp"
247
+ });
248
+ await elementUpdated(el);
249
+ expect(el.value).to.equal(20);
250
+ await sendKeys({
251
+ press: "ArrowRight"
252
+ });
253
+ await sendKeys({
254
+ press: "ArrowRight"
255
+ });
256
+ await elementUpdated(el);
257
+ expect(el.value).to.equal(40);
258
+ await sendKeys({
259
+ press: "ArrowDown"
260
+ });
261
+ await sendKeys({
262
+ press: "ArrowDown"
263
+ });
264
+ await elementUpdated(el);
265
+ expect(el.value).to.equal(20);
266
+ await sendKeys({
267
+ press: "ArrowLeft"
268
+ });
269
+ await sendKeys({
270
+ press: "ArrowLeft"
271
+ });
272
+ await sendKeys({
273
+ up: "Shift"
274
+ });
275
+ await elementUpdated(el);
276
+ expect(el.value).to.equal(0);
277
+ });
278
+ it("accepts pointer events", async () => {
279
+ const color = new TinyColor({ h: "0", s: "20%", l: "70%" });
280
+ const el = await fixture(
281
+ html`
282
+ <sp-color-wheel
283
+ .color=${color}
284
+ style="--mod-colorwheel-width: 160px; --mod-colorwheel-height: 160px;"
285
+ ></sp-color-wheel>
286
+ `
287
+ );
288
+ await elementUpdated(el);
289
+ const { handle } = el;
290
+ handle.setPointerCapture = () => {
291
+ return;
292
+ };
293
+ handle.releasePointerCapture = () => {
294
+ return;
295
+ };
296
+ expect(el.value).to.equal(0);
297
+ expect(el.color.s).to.be.within(0.19, 0.21);
298
+ expect(el.color.l).to.be.within(0.69, 0.71);
299
+ handle.dispatchEvent(
300
+ new PointerEvent("pointerdown", {
301
+ button: 1,
302
+ pointerId: 1,
303
+ clientX: 80,
304
+ clientY: 15,
305
+ bubbles: true,
306
+ composed: true,
307
+ cancelable: true
308
+ })
309
+ );
310
+ await elementUpdated(el);
311
+ expect(el.value).to.equal(0);
312
+ expect(el.color.s).to.be.within(0.19, 0.21);
313
+ expect(el.color.l).to.be.within(0.69, 0.71);
314
+ const root = el.shadowRoot ? el.shadowRoot : el;
315
+ const gradient = root.querySelector('[name="gradient"]');
316
+ gradient.dispatchEvent(
317
+ new PointerEvent("pointerdown", {
318
+ button: 1,
319
+ pointerId: 1,
320
+ clientX: 80,
321
+ clientY: 15,
322
+ bubbles: true,
323
+ composed: true,
324
+ cancelable: true
325
+ })
326
+ );
327
+ await elementUpdated(el);
328
+ expect(el.value).to.equal(0);
329
+ expect(el.color.s).to.be.within(0.19, 0.21);
330
+ expect(el.color.l).to.be.within(0.69, 0.71);
331
+ gradient.dispatchEvent(
332
+ new PointerEvent("pointerdown", {
333
+ pointerId: 1,
334
+ clientX: 80,
335
+ clientY: 15,
336
+ bubbles: true,
337
+ composed: true,
338
+ cancelable: true
339
+ })
340
+ );
341
+ await elementUpdated(el);
342
+ expect(el.value).to.equal(263.74596725608353);
343
+ expect(el.color.s).to.be.within(0.19, 0.21);
344
+ expect(el.color.l).to.be.within(0.69, 0.71);
345
+ handle.dispatchEvent(
346
+ new PointerEvent("pointermove", {
347
+ pointerId: 1,
348
+ clientX: 80,
349
+ clientY: 160,
350
+ bubbles: true,
351
+ composed: true,
352
+ cancelable: true
353
+ })
354
+ );
355
+ handle.dispatchEvent(
356
+ new PointerEvent("pointerup", {
357
+ pointerId: 1,
358
+ clientX: 80,
359
+ clientY: 160,
360
+ bubbles: true,
361
+ composed: true,
362
+ cancelable: true
363
+ })
364
+ );
365
+ await elementUpdated(el);
366
+ expect(el.value).to.equal(96.34019174590992);
367
+ expect(el.color.s).to.be.within(0.19, 0.21);
368
+ expect(el.color.l).to.be.within(0.69, 0.71);
369
+ });
370
+ it("can have `change` events prevented", async () => {
371
+ const color = new TinyColor({ h: "0", s: "20%", l: "70%" });
372
+ const el = await fixture(
373
+ html`
374
+ <sp-color-wheel
375
+ .color=${color}
376
+ @change=${(event) => {
377
+ event == null ? void 0 : event.preventDefault();
378
+ }}
379
+ style="--spectrum-global-dimension-size-125: 10px;"
380
+ ></sp-color-wheel>
381
+ `
382
+ );
383
+ await elementUpdated(el);
384
+ expect(el.value).to.equal(0);
385
+ await sendMouse({
386
+ steps: [
387
+ {
388
+ type: "move",
389
+ position: [80, 15]
390
+ },
391
+ {
392
+ type: "down"
393
+ },
394
+ {
395
+ type: "move",
396
+ position: [80, 160]
397
+ }
398
+ ]
399
+ });
400
+ await elementUpdated(el);
401
+ await sendMouse({
402
+ steps: [
403
+ {
404
+ type: "up"
405
+ }
406
+ ]
407
+ });
408
+ await elementUpdated(el);
409
+ expect(el.value).to.equal(0);
410
+ });
411
+ const colorFormats = [
412
+ //rgb
413
+ { name: "RGB String", color: "rgb(204, 51, 204)" },
414
+ { name: "RGB", color: { r: 204, g: 51, b: 204, a: 1 } },
415
+ //prgb
416
+ { name: "PRGB String", color: "rgb(80%, 20%, 80%)" },
417
+ { name: "PRGB", color: { r: "80%", g: "20%", b: "80%", a: 1 } },
418
+ // hex
419
+ { name: "Hex", color: "cc33cc" },
420
+ { name: "Hex String", color: "#cc33cc" },
421
+ // hex8
422
+ { name: "Hex8", color: "cc33ccff" },
423
+ { name: "Hex8 String", color: "#cc33ccff" },
424
+ // name
425
+ { name: "string", color: "red" },
426
+ // hsl
427
+ { name: "HSL String", color: "hsl(300, 60%, 50%)" },
428
+ { name: "HSL", color: { h: 300, s: 0.6000000000000001, l: 0.5, a: 1 } },
429
+ // hsv
430
+ { name: "HSV String", color: "hsv(300, 75%, 100%)" },
431
+ { name: "HSV", color: { h: 300, s: 0.75, v: 1, a: 1 } }
432
+ ];
433
+ colorFormats.map((format) => {
434
+ it(`maintains \`color\` format as ${format.name}`, async () => {
435
+ const el = await fixture(
436
+ html`
437
+ <sp-color-wheel></sp-color-wheel>
438
+ `
439
+ );
440
+ el.color = format.color;
441
+ if (format.name.startsWith("Hex")) {
442
+ expect(el.color).to.equal(format.color);
443
+ } else expect(el.color).to.deep.equal(format.color);
444
+ });
445
+ });
446
+ it(`maintains \`color\` format as TinyColor`, async () => {
447
+ const el = await fixture(
448
+ html`
449
+ <sp-color-wheel></sp-color-wheel>
450
+ `
451
+ );
452
+ const color = new TinyColor("rgb(204, 51, 204)");
453
+ el.color = color;
454
+ expect(color.equals(el.color));
455
+ });
456
+ it(`maintains hue value`, async () => {
457
+ const el = await fixture(
458
+ html`
459
+ <sp-color-wheel></sp-color-wheel>
460
+ `
461
+ );
462
+ const hue = 300;
463
+ const hsl = `hsl(${hue}, 60%, 100%)`;
464
+ el.color = hsl;
465
+ expect(el.value).to.equal(hue);
466
+ expect(el.color).to.equal(hsl);
467
+ const hsla = `hsla(${hue}, 60%, 100%, 0.9)`;
468
+ el.color = hsla;
469
+ expect(el.value).to.equal(hue);
470
+ expect(el.color).to.equal(hsla);
471
+ const hsv = `hsv(${hue}, 60%, 100%)`;
472
+ el.color = hsv;
473
+ expect(el.value).to.equal(hue);
474
+ expect(el.color).to.equal(hsv);
475
+ const hsva = `hsva(${hue}, 60%, 100%, 0.9)`;
476
+ el.color = hsva;
477
+ expect(el.value).to.equal(hue);
478
+ expect(el.color).to.equal(hsva);
479
+ const tinyHSV = new TinyColor({ h: hue, s: 60, v: 100 });
480
+ el.color = tinyHSV;
481
+ expect(el.value).to.equal(hue);
482
+ expect(tinyHSV.equals(el.color)).to.be.true;
483
+ const tinyHSVA = new TinyColor({ h: hue, s: 60, v: 100, a: 1 });
484
+ el.color = tinyHSVA;
485
+ expect(el.value).to.equal(hue);
486
+ expect(tinyHSVA.equals(el.color)).to.be.true;
487
+ const tinyHSL = new TinyColor({ h: hue, s: 60, l: 100 });
488
+ el.color = tinyHSL;
489
+ expect(el.value).to.equal(hue);
490
+ expect(tinyHSL.equals(el.color)).to.be.true;
491
+ const tinyHSLA = new TinyColor({ h: hue, s: 60, l: 100, a: 1 });
492
+ el.color = tinyHSLA;
493
+ expect(el.value).to.equal(hue);
494
+ expect(tinyHSLA.equals(el.color)).to.be.true;
495
+ });
496
+ it('should flip orientation with dir="rtl"', async () => {
497
+ const el = await fixture(
498
+ html`
499
+ <sp-color-wheel></sp-color-wheel>
500
+ `
501
+ );
502
+ await elementUpdated(el);
503
+ const root = el.shadowRoot ? el.shadowRoot : el;
504
+ expect(
505
+ getComputedStyle(root.querySelector(".wheel")).transform
506
+ ).to.equal("none");
507
+ el.setAttribute("dir", "rtl");
508
+ await elementUpdated(el);
509
+ expect(
510
+ getComputedStyle(root.querySelector(".wheel")).transform
511
+ ).to.equal("matrix(-1, 0, 0, 1, 0, 0)");
512
+ });
513
+ });
514
+ //# sourceMappingURL=color-wheel.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-wheel.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 { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport {\n arrowDownEvent,\n arrowDownKeyupEvent,\n arrowLeftEvent,\n arrowLeftKeyupEvent,\n arrowRightEvent,\n arrowRightKeyupEvent,\n arrowUpEvent,\n arrowUpKeyupEvent,\n ignoreResizeObserverLoopError,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\n\nimport '@spectrum-web-components/color-wheel/sp-color-wheel.js';\nimport { ColorWheel } from '@spectrum-web-components/color-wheel';\nimport { HSL, HSLA, HSV, HSVA, RGB, RGBA, TinyColor } from '@ctrl/tinycolor';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { sendMouse } from '../../../test/plugins/browser.js';\nimport { spy } from 'sinon';\n\nignoreResizeObserverLoopError(before, after);\n\ndescribe('ColorWheel', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n )\n );\n it('loads default color-wheel accessibly', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n\n it('manages a single tab stop', async () => {\n const test = await fixture<HTMLDivElement>(\n html`\n <div>\n <input type=\"text\" id=\"test-input-1\" />\n <sp-color-wheel></sp-color-wheel>\n <input type=\"text\" id=\"test-input-2\" />\n </div>\n `\n );\n const el = test.querySelector('sp-color-wheel') as ColorWheel;\n const input1 = test.querySelector(\n 'input:nth-of-type(1)'\n ) as HTMLInputElement;\n const input2 = test.querySelector(\n 'input:nth-of-type(2)'\n ) as HTMLInputElement;\n\n await elementUpdated(el);\n\n input1.focus();\n\n expect(document.activeElement).to.equal(input1);\n\n await sendKeys({\n press: 'Tab',\n });\n\n expect(document.activeElement).to.equal(el);\n\n let value = el.value;\n await sendKeys({\n press: 'ArrowRight',\n });\n expect(el.value).to.not.equal(value);\n await sendKeys({\n press: 'Tab',\n });\n\n expect(document.activeElement).to.equal(input2);\n\n await sendKeys({\n press: 'Shift+Tab',\n });\n\n expect(document.activeElement).to.equal(el);\n\n value = el.value;\n await sendKeys({\n press: 'ArrowDown',\n });\n expect(el.value).to.not.equal(value);\n await sendKeys({\n press: 'Shift+Tab',\n });\n\n expect(document.activeElement).to.equal(input1);\n });\n it('manages [focused]', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.focused).to.be.false;\n\n await sendKeys({ press: 'Tab' });\n await elementUpdated(el);\n\n expect(el.focused).to.be.true;\n\n el.blur();\n await elementUpdated(el);\n\n expect(el.focused).to.be.false;\n\n el.dispatchEvent(new FocusEvent('focus'));\n await elementUpdated(el);\n\n expect(el.focused).to.be.true;\n\n el.dispatchEvent(new FocusEvent('blur'));\n await elementUpdated(el);\n\n expect(el.focused).to.be.false;\n });\n it('dispatches input and change events in response to \"Arrow*\" keypresses', async () => {\n const inputSpy = spy();\n const changeSpy = spy();\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel\n @change=${() => changeSpy()}\n @input=${() => inputSpy()}\n ></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n el.focus();\n\n await sendKeys({ press: 'ArrowRight' });\n expect(inputSpy.callCount).to.equal(1);\n expect(changeSpy.callCount).to.equal(1);\n\n await sendKeys({ press: 'ArrowLeft' });\n expect(inputSpy.callCount).to.equal(2);\n expect(changeSpy.callCount).to.equal(2);\n\n await sendKeys({ press: 'ArrowUp' });\n expect(inputSpy.callCount).to.equal(3);\n expect(changeSpy.callCount).to.equal(3);\n\n await sendKeys({ press: 'ArrowDown' });\n expect(inputSpy.callCount).to.equal(4);\n expect(changeSpy.callCount).to.equal(4);\n });\n it('responds to events on the internal input element', async () => {\n // screen reader interactions dispatch events as found in the following test\n const inputSpy = spy();\n const changeSpy = spy();\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel\n @change=${() => changeSpy()}\n @input=${() => inputSpy()}\n ></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n const input = el.focusElement;\n\n el.focus();\n\n input.dispatchEvent(\n new Event('input', {\n bubbles: true,\n composed: true,\n })\n );\n input.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: false, // native change events do not compose themselves by default\n })\n );\n\n expect(inputSpy.callCount).to.equal(1);\n expect(changeSpy.callCount).to.equal(1);\n });\n it('accepts \"Arrow*\" keypresses', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n\n const input = el.focusElement;\n\n input.dispatchEvent(arrowUpEvent());\n input.dispatchEvent(arrowUpKeyupEvent());\n input.dispatchEvent(arrowUpEvent());\n input.dispatchEvent(arrowUpKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(2);\n\n input.dispatchEvent(arrowRightEvent());\n input.dispatchEvent(arrowRightKeyupEvent());\n input.dispatchEvent(arrowRightEvent());\n input.dispatchEvent(arrowRightKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(4);\n\n input.dispatchEvent(arrowDownEvent());\n input.dispatchEvent(arrowDownKeyupEvent());\n input.dispatchEvent(arrowDownEvent());\n input.dispatchEvent(arrowDownKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(2);\n\n input.dispatchEvent(arrowLeftEvent());\n input.dispatchEvent(arrowLeftKeyupEvent());\n input.dispatchEvent(arrowLeftEvent());\n input.dispatchEvent(arrowLeftKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n });\n it('accepts \"Arrow*\" keypresses in dir=\"rtl\"', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel dir=\"rtl\"></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n\n const input = el.focusElement;\n\n input.dispatchEvent(arrowUpEvent());\n input.dispatchEvent(arrowUpKeyupEvent());\n input.dispatchEvent(arrowUpEvent());\n input.dispatchEvent(arrowUpKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(2);\n\n input.dispatchEvent(arrowRightEvent());\n input.dispatchEvent(arrowRightKeyupEvent());\n input.dispatchEvent(arrowRightEvent());\n input.dispatchEvent(arrowRightKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n\n input.dispatchEvent(arrowLeftEvent());\n input.dispatchEvent(arrowLeftKeyupEvent());\n input.dispatchEvent(arrowLeftEvent());\n input.dispatchEvent(arrowLeftKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(2);\n\n input.dispatchEvent(arrowDownEvent());\n input.dispatchEvent(arrowDownKeyupEvent());\n input.dispatchEvent(arrowDownEvent());\n input.dispatchEvent(arrowDownKeyupEvent());\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n });\n it('accepts \"Arrow*\" keypresses with alteration', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n el.focus();\n expect(el.value).to.equal(0);\n\n await sendKeys({\n down: 'Shift',\n });\n await sendKeys({\n press: 'ArrowUp',\n });\n await sendKeys({\n press: 'ArrowUp',\n });\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(20);\n\n await sendKeys({\n press: 'ArrowRight',\n });\n await sendKeys({\n press: 'ArrowRight',\n });\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(40);\n\n await sendKeys({\n press: 'ArrowDown',\n });\n await sendKeys({\n press: 'ArrowDown',\n });\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(20);\n\n await sendKeys({\n press: 'ArrowLeft',\n });\n await sendKeys({\n press: 'ArrowLeft',\n });\n await sendKeys({\n up: 'Shift',\n });\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n });\n it('accepts pointer events', async () => {\n const color = new TinyColor({ h: '0', s: '20%', l: '70%' });\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel\n .color=${color}\n style=\"--mod-colorwheel-width: 160px; --mod-colorwheel-height: 160px;\"\n ></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n const { handle } = el as unknown as { handle: HTMLElement };\n\n handle.setPointerCapture = () => {\n return;\n };\n handle.releasePointerCapture = () => {\n return;\n };\n\n expect(el.value).to.equal(0);\n expect((el.color as HSLA).s).to.be.within(0.19, 0.21);\n expect((el.color as HSLA).l).to.be.within(0.69, 0.71);\n\n handle.dispatchEvent(\n new PointerEvent('pointerdown', {\n button: 1,\n pointerId: 1,\n clientX: 80,\n clientY: 15,\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n expect((el.color as HSLA).s).to.be.within(0.19, 0.21);\n expect((el.color as HSLA).l).to.be.within(0.69, 0.71);\n\n const root = el.shadowRoot ? el.shadowRoot : el;\n const gradient = root.querySelector('[name=\"gradient\"]') as HTMLElement;\n gradient.dispatchEvent(\n new PointerEvent('pointerdown', {\n button: 1,\n pointerId: 1,\n clientX: 80,\n clientY: 15,\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n expect((el.color as HSLA).s).to.be.within(0.19, 0.21);\n expect((el.color as HSLA).l).to.be.within(0.69, 0.71);\n\n gradient.dispatchEvent(\n new PointerEvent('pointerdown', {\n pointerId: 1,\n clientX: 80,\n clientY: 15,\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(263.74596725608353);\n expect((el.color as HSLA).s).to.be.within(0.19, 0.21);\n expect((el.color as HSLA).l).to.be.within(0.69, 0.71);\n\n handle.dispatchEvent(\n new PointerEvent('pointermove', {\n pointerId: 1,\n clientX: 80,\n clientY: 160,\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n handle.dispatchEvent(\n new PointerEvent('pointerup', {\n pointerId: 1,\n clientX: 80,\n clientY: 160,\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(96.34019174590992);\n expect((el.color as HSLA).s).to.be.within(0.19, 0.21);\n expect((el.color as HSLA).l).to.be.within(0.69, 0.71);\n });\n it('can have `change` events prevented', async () => {\n const color = new TinyColor({ h: '0', s: '20%', l: '70%' });\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel\n .color=${color}\n @change=${(event: Event) => {\n event?.preventDefault();\n }}\n style=\"--spectrum-global-dimension-size-125: 10px;\"\n ></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal(0);\n\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [80, 15],\n },\n {\n type: 'down',\n },\n {\n type: 'move',\n position: [80, 160],\n },\n ],\n });\n\n await elementUpdated(el);\n\n await sendMouse({\n steps: [\n {\n type: 'up',\n },\n ],\n });\n\n await elementUpdated(el);\n expect(el.value).to.equal(0);\n });\n const colorFormats: {\n name: string;\n color:\n | string\n | number\n | TinyColor\n | HSVA\n | HSV\n | RGB\n | RGBA\n | HSL\n | HSLA;\n }[] = [\n //rgb\n { name: 'RGB String', color: 'rgb(204, 51, 204)' },\n { name: 'RGB', color: { r: 204, g: 51, b: 204, a: 1 } },\n //prgb\n { name: 'PRGB String', color: 'rgb(80%, 20%, 80%)' },\n { name: 'PRGB', color: { r: '80%', g: '20%', b: '80%', a: 1 } },\n // hex\n { name: 'Hex', color: 'cc33cc' },\n { name: 'Hex String', color: '#cc33cc' },\n // hex8\n { name: 'Hex8', color: 'cc33ccff' },\n { name: 'Hex8 String', color: '#cc33ccff' },\n // name\n { name: 'string', color: 'red' },\n // hsl\n { name: 'HSL String', color: 'hsl(300, 60%, 50%)' },\n { name: 'HSL', color: { h: 300, s: 0.6000000000000001, l: 0.5, a: 1 } },\n // hsv\n { name: 'HSV String', color: 'hsv(300, 75%, 100%)' },\n { name: 'HSV', color: { h: 300, s: 0.75, v: 1, a: 1 } },\n ];\n colorFormats.map((format) => {\n it(`maintains \\`color\\` format as ${format.name}`, async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n el.color = format.color;\n if (format.name.startsWith('Hex')) {\n expect(el.color).to.equal(format.color);\n } else expect(el.color).to.deep.equal(format.color);\n });\n });\n it(`maintains \\`color\\` format as TinyColor`, async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n const color = new TinyColor('rgb(204, 51, 204)');\n el.color = color;\n expect(color.equals(el.color));\n });\n it(`maintains hue value`, async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n const hue = 300;\n const hsl = `hsl(${hue}, 60%, 100%)`;\n el.color = hsl;\n expect(el.value).to.equal(hue);\n expect(el.color).to.equal(hsl);\n\n const hsla = `hsla(${hue}, 60%, 100%, 0.9)`;\n el.color = hsla;\n expect(el.value).to.equal(hue);\n expect(el.color).to.equal(hsla);\n\n const hsv = `hsv(${hue}, 60%, 100%)`;\n el.color = hsv;\n expect(el.value).to.equal(hue);\n expect(el.color).to.equal(hsv);\n\n const hsva = `hsva(${hue}, 60%, 100%, 0.9)`;\n el.color = hsva;\n expect(el.value).to.equal(hue);\n expect(el.color).to.equal(hsva);\n\n const tinyHSV = new TinyColor({ h: hue, s: 60, v: 100 });\n el.color = tinyHSV;\n expect(el.value).to.equal(hue);\n expect(tinyHSV.equals(el.color)).to.be.true;\n\n const tinyHSVA = new TinyColor({ h: hue, s: 60, v: 100, a: 1 });\n el.color = tinyHSVA;\n expect(el.value).to.equal(hue);\n expect(tinyHSVA.equals(el.color)).to.be.true;\n\n const tinyHSL = new TinyColor({ h: hue, s: 60, l: 100 });\n el.color = tinyHSL;\n expect(el.value).to.equal(hue);\n expect(tinyHSL.equals(el.color)).to.be.true;\n\n const tinyHSLA = new TinyColor({ h: hue, s: 60, l: 100, a: 1 });\n el.color = tinyHSLA;\n expect(el.value).to.equal(hue);\n expect(tinyHSLA.equals(el.color)).to.be.true;\n });\n it('should flip orientation with dir=\"rtl\"', async () => {\n const el = await fixture<ColorWheel>(\n html`\n <sp-color-wheel></sp-color-wheel>\n `\n );\n\n await elementUpdated(el);\n\n const root = el.shadowRoot ? el.shadowRoot : el;\n expect(\n getComputedStyle(root.querySelector('.wheel') as HTMLElement)\n .transform\n ).to.equal('none');\n\n el.setAttribute('dir', 'rtl');\n\n await elementUpdated(el);\n expect(\n getComputedStyle(root.querySelector('.wheel') as HTMLElement)\n .transform\n ).to.equal('matrix(-1, 0, 0, 1, 0, 0)');\n });\n});\n"],
5
+ "mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AACtD;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAEP,OAAO;AAEP,SAA0C,iBAAiB;AAC3D,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,WAAW;AAEpB,8BAA8B,QAAQ,KAAK;AAE3C,SAAS,cAAc,MAAM;AACzB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA,IAGJ;AAAA,EACR;AACA,KAAG,wCAA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