@spectrum-web-components/color-handle 0.3.10 → 0.3.11

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.
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-color-handle.ts",
7
+ "path": "sp-color-handle.js",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "src/ColorHandle.ts",
22
+ "path": "src/ColorHandle.js",
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "variable",
@@ -169,7 +169,7 @@
169
169
  "name": "extractHueAndSaturationRegExp",
170
170
  "declaration": {
171
171
  "name": "extractHueAndSaturationRegExp",
172
- "module": "src/ColorHandle.ts"
172
+ "module": "src/ColorHandle.js"
173
173
  }
174
174
  },
175
175
  {
@@ -177,7 +177,7 @@
177
177
  "name": "replaceHueAndSaturationRegExp",
178
178
  "declaration": {
179
179
  "name": "replaceHueAndSaturationRegExp",
180
- "module": "src/ColorHandle.ts"
180
+ "module": "src/ColorHandle.js"
181
181
  }
182
182
  },
183
183
  {
@@ -185,7 +185,7 @@
185
185
  "name": "replaceHueRegExp",
186
186
  "declaration": {
187
187
  "name": "replaceHueRegExp",
188
- "module": "src/ColorHandle.ts"
188
+ "module": "src/ColorHandle.js"
189
189
  }
190
190
  },
191
191
  {
@@ -193,7 +193,7 @@
193
193
  "name": "ColorHandle",
194
194
  "declaration": {
195
195
  "name": "ColorHandle",
196
- "module": "src/ColorHandle.ts"
196
+ "module": "src/ColorHandle.js"
197
197
  }
198
198
  }
199
199
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/color-handle",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,11 +20,24 @@
20
20
  "module": "src/index.js",
21
21
  "type": "module",
22
22
  "exports": {
23
- ".": "./src/index.js",
24
- "./src/*": "./src/*",
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
25
27
  "./package.json": "./package.json",
26
- "./sp-color-handle": "./sp-color-handle.js",
27
- "./sp-color-handle.js": "./sp-color-handle.js"
28
+ "./src/ColorHandle.js": {
29
+ "development": "./src/ColorHandle.dev.js",
30
+ "default": "./src/ColorHandle.js"
31
+ },
32
+ "./src/color-handle.css.js": "./src/color-handle.css.js",
33
+ "./src/index.js": {
34
+ "development": "./src/index.dev.js",
35
+ "default": "./src/index.js"
36
+ },
37
+ "./sp-color-handle.js": {
38
+ "development": "./sp-color-handle.dev.js",
39
+ "default": "./sp-color-handle.js"
40
+ }
28
41
  },
29
42
  "scripts": {
30
43
  "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
@@ -44,8 +57,8 @@
44
57
  "lit-html"
45
58
  ],
46
59
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.8",
48
- "@spectrum-web-components/color-loupe": "^0.3.10",
60
+ "@spectrum-web-components/base": "^0.6.0",
61
+ "@spectrum-web-components/color-loupe": "^0.3.11",
49
62
  "tslib": "^2.0.0"
50
63
  },
51
64
  "devDependencies": {
@@ -56,5 +69,5 @@
56
69
  "sideEffects": [
57
70
  "./sp-*.js"
58
71
  ],
59
- "gitHead": "3be62133721efba844cd7032566a2c49ed6d9875"
72
+ "gitHead": "50cac779bbb0d6735c2061f1eceb86b9daf9b22b"
60
73
  }
@@ -0,0 +1,3 @@
1
+ import { ColorHandle } from "./src/ColorHandle.dev.js";
2
+ customElements.define("sp-color-handle", ColorHandle);
3
+ //# sourceMappingURL=sp-color-handle.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-color-handle.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 { ColorHandle } from './src/ColorHandle.dev.js'\n\ncustomElements.define('sp-color-handle', ColorHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-color-handle': ColorHandle;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,mBAAmB,WAAW;",
6
+ "names": []
7
+ }
@@ -1,14 +1,3 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { ColorHandle } from './src/ColorHandle.js';
13
- customElements.define('sp-color-handle', ColorHandle);
14
- //# sourceMappingURL=sp-color-handle.js.map
1
+ import { ColorHandle } from "./src/ColorHandle.js";
2
+ customElements.define("sp-color-handle", ColorHandle);
3
+ //# sourceMappingURL=sp-color-handle.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"sp-color-handle.js","sourceRoot":"","sources":["sp-color-handle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC","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 { ColorHandle } from './src/ColorHandle.js';\n\ncustomElements.define('sp-color-handle', ColorHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-color-handle': ColorHandle;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-color-handle.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 { ColorHandle } from './src/ColorHandle.js';\n\ncustomElements.define('sp-color-handle', ColorHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-color-handle': ColorHandle;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,mBAAmB,WAAW;",
6
+ "names": []
7
+ }
@@ -0,0 +1,71 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import "@spectrum-web-components/color-loupe/sp-color-loupe.js";
18
+ import styles from "./color-handle.css.js";
19
+ export const extractHueAndSaturationRegExp = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/;
20
+ export const replaceHueAndSaturationRegExp = /(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/;
21
+ export const replaceHueRegExp = /(^hs[v|l]a?\()\d{1,3}/;
22
+ export class ColorHandle extends SpectrumElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.disabled = false;
26
+ this.focused = false;
27
+ this.open = false;
28
+ this.color = "rgba(255, 0, 0, 0.5)";
29
+ }
30
+ static get styles() {
31
+ return [styles];
32
+ }
33
+ handlePointerdown(event) {
34
+ if (event.pointerType === "touch") {
35
+ this.open = true;
36
+ }
37
+ this.setPointerCapture(event.pointerId);
38
+ }
39
+ handlePointerup(event) {
40
+ this.open = false;
41
+ this.releasePointerCapture(event.pointerId);
42
+ }
43
+ render() {
44
+ return html`
45
+ <div class="color" style="background-color: ${this.color}"></div>
46
+ <sp-color-loupe
47
+ color=${this.color}
48
+ ?open=${this.open && !this.disabled}
49
+ ></sp-color-loupe>
50
+ `;
51
+ }
52
+ firstUpdated(changed) {
53
+ super.firstUpdated(changed);
54
+ this.addEventListener("pointerdown", this.handlePointerdown);
55
+ this.addEventListener("pointerup", this.handlePointerup);
56
+ this.addEventListener("pointercancel", this.handlePointerup);
57
+ }
58
+ }
59
+ __decorateClass([
60
+ property({ type: Boolean, reflect: true })
61
+ ], ColorHandle.prototype, "disabled", 2);
62
+ __decorateClass([
63
+ property({ type: Boolean, reflect: true })
64
+ ], ColorHandle.prototype, "focused", 2);
65
+ __decorateClass([
66
+ property({ type: Boolean, reflect: true })
67
+ ], ColorHandle.prototype, "open", 2);
68
+ __decorateClass([
69
+ property({ type: String })
70
+ ], ColorHandle.prototype, "color", 2);
71
+ //# sourceMappingURL=ColorHandle.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["ColorHandle.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/color-loupe/sp-color-loupe.js';\nimport { HSL, HSLA, HSV, HSVA, RGB, RGBA, TinyColor } from '@ctrl/tinycolor';\nimport styles from './color-handle.css.js';\n\nexport type ColorValue =\n | string\n | number\n | TinyColor\n | HSVA\n | HSV\n | RGB\n | RGBA\n | HSL\n | HSLA;\n\nexport const extractHueAndSaturationRegExp =\n /^hs[v|l]a?\\s?\\((\\d{1,3}\\.?\\d*?),?\\s?(\\d{1,3})/;\nexport const replaceHueAndSaturationRegExp =\n /(^hs[v|l]a?\\s?\\()\\d{1,3}\\.?\\d*?(,?\\s?)\\d{1,3}/;\nexport const replaceHueRegExp = /(^hs[v|l]a?\\()\\d{1,3}/;\n\n/**\n * @element sp-color-handle\n */\nexport class ColorHandle extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n @property({ type: String })\n public color = 'rgba(255, 0, 0, 0.5)';\n\n private handlePointerdown(event: PointerEvent): void {\n if (event.pointerType === 'touch') {\n this.open = true;\n }\n this.setPointerCapture(event.pointerId);\n }\n\n private handlePointerup(event: PointerEvent): void {\n this.open = false;\n this.releasePointerCapture(event.pointerId);\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"color\" style=\"background-color: ${this.color}\"></div>\n <sp-color-loupe\n color=${this.color}\n ?open=${this.open && !this.disabled}\n ></sp-color-loupe>\n `;\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n this.addEventListener('pointerdown', this.handlePointerdown);\n this.addEventListener('pointerup', this.handlePointerup);\n this.addEventListener('pointercancel', this.handlePointerup);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAOA;AAEA;AAEA;AAaO,aAAM,gCACT;AACG,aAAM,gCACT;AACG,aAAM,mBAAmB;AAKzB,aAAM,oBAAoB,gBAAgB;AAAA,EAA1C;AAAA;AAMI,oBAAW;AAGX,mBAAU;AAGV,gBAAO;AAGP,iBAAQ;AAAA;AAAA,aAdY,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAcQ,kBAAkB,OAA2B;AACjD,QAAI,MAAM,gBAAgB,SAAS;AAC/B,WAAK,OAAO;AAAA,IAChB;AACA,SAAK,kBAAkB,MAAM,SAAS;AAAA,EAC1C;AAAA,EAEQ,gBAAgB,OAA2B;AAC/C,SAAK,OAAO;AACZ,SAAK,sBAAsB,MAAM,SAAS;AAAA,EAC9C;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,0DAC2C,KAAK;AAAA;AAAA,wBAEvC,KAAK;AAAA,wBACL,KAAK,QAAQ,CAAC,KAAK;AAAA;AAAA;AAAA,EAGvC;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,SAAK,iBAAiB,eAAe,KAAK,iBAAiB;AAC3D,SAAK,iBAAiB,aAAa,KAAK,eAAe;AACvD,SAAK,iBAAiB,iBAAiB,KAAK,eAAe;AAAA,EAC/D;AACJ;AAvCW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AANJ,YAMI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AATJ,YASI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAZJ,YAYI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAfJ,YAeI;",
6
+ "names": []
7
+ }
@@ -1,72 +1,71 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { __decorate } from "tslib";
13
- import { html, SpectrumElement, } from '@spectrum-web-components/base';
14
- import { property } from '@spectrum-web-components/base/src/decorators.js';
15
- import '@spectrum-web-components/color-loupe/sp-color-loupe.js';
16
- import styles from './color-handle.css.js';
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import "@spectrum-web-components/color-loupe/sp-color-loupe.js";
18
+ import styles from "./color-handle.css.js";
17
19
  export const extractHueAndSaturationRegExp = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/;
18
20
  export const replaceHueAndSaturationRegExp = /(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/;
19
21
  export const replaceHueRegExp = /(^hs[v|l]a?\()\d{1,3}/;
20
- /**
21
- * @element sp-color-handle
22
- */
23
22
  export class ColorHandle extends SpectrumElement {
24
- constructor() {
25
- super(...arguments);
26
- this.disabled = false;
27
- this.focused = false;
28
- this.open = false;
29
- this.color = 'rgba(255, 0, 0, 0.5)';
23
+ constructor() {
24
+ super(...arguments);
25
+ this.disabled = false;
26
+ this.focused = false;
27
+ this.open = false;
28
+ this.color = "rgba(255, 0, 0, 0.5)";
29
+ }
30
+ static get styles() {
31
+ return [styles];
32
+ }
33
+ handlePointerdown(event) {
34
+ if (event.pointerType === "touch") {
35
+ this.open = true;
30
36
  }
31
- static get styles() {
32
- return [styles];
33
- }
34
- handlePointerdown(event) {
35
- if (event.pointerType === 'touch') {
36
- this.open = true;
37
- }
38
- this.setPointerCapture(event.pointerId);
39
- }
40
- handlePointerup(event) {
41
- this.open = false;
42
- this.releasePointerCapture(event.pointerId);
43
- }
44
- render() {
45
- return html `
37
+ this.setPointerCapture(event.pointerId);
38
+ }
39
+ handlePointerup(event) {
40
+ this.open = false;
41
+ this.releasePointerCapture(event.pointerId);
42
+ }
43
+ render() {
44
+ return html`
46
45
  <div class="color" style="background-color: ${this.color}"></div>
47
46
  <sp-color-loupe
48
47
  color=${this.color}
49
48
  ?open=${this.open && !this.disabled}
50
49
  ></sp-color-loupe>
51
50
  `;
52
- }
53
- firstUpdated(changed) {
54
- super.firstUpdated(changed);
55
- this.addEventListener('pointerdown', this.handlePointerdown);
56
- this.addEventListener('pointerup', this.handlePointerup);
57
- this.addEventListener('pointercancel', this.handlePointerup);
58
- }
51
+ }
52
+ firstUpdated(changed) {
53
+ super.firstUpdated(changed);
54
+ this.addEventListener("pointerdown", this.handlePointerdown);
55
+ this.addEventListener("pointerup", this.handlePointerup);
56
+ this.addEventListener("pointercancel", this.handlePointerup);
57
+ }
59
58
  }
60
- __decorate([
61
- property({ type: Boolean, reflect: true })
62
- ], ColorHandle.prototype, "disabled", void 0);
63
- __decorate([
64
- property({ type: Boolean, reflect: true })
65
- ], ColorHandle.prototype, "focused", void 0);
66
- __decorate([
67
- property({ type: Boolean, reflect: true })
68
- ], ColorHandle.prototype, "open", void 0);
69
- __decorate([
70
- property({ type: String })
71
- ], ColorHandle.prototype, "color", void 0);
72
- //# sourceMappingURL=ColorHandle.js.map
59
+ __decorateClass([
60
+ property({ type: Boolean, reflect: true })
61
+ ], ColorHandle.prototype, "disabled", 2);
62
+ __decorateClass([
63
+ property({ type: Boolean, reflect: true })
64
+ ], ColorHandle.prototype, "focused", 2);
65
+ __decorateClass([
66
+ property({ type: Boolean, reflect: true })
67
+ ], ColorHandle.prototype, "open", 2);
68
+ __decorateClass([
69
+ property({ type: String })
70
+ ], ColorHandle.prototype, "color", 2);
71
+ //# sourceMappingURL=ColorHandle.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ColorHandle.js","sourceRoot":"","sources":["ColorHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EAEJ,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAE3E,OAAO,wDAAwD,CAAC;AAEhE,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAa3C,MAAM,CAAC,MAAM,6BAA6B,GACtC,+CAA+C,CAAC;AACpD,MAAM,CAAC,MAAM,6BAA6B,GACtC,+CAA+C,CAAC;AACpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,eAAe;IAAhD;;QAMW,aAAQ,GAAG,KAAK,CAAC;QAGjB,YAAO,GAAG,KAAK,CAAC;QAGhB,SAAI,GAAG,KAAK,CAAC;QAGb,UAAK,GAAG,sBAAsB,CAAC;IA8B1C,CAAC;IA5CU,MAAM,KAAc,MAAM;QAC7B,OAAO,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAcO,iBAAiB,CAAC,KAAmB;QACzC,IAAI,KAAK,CAAC,WAAW,KAAK,OAAO,EAAE;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SACpB;QACD,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAEO,eAAe,CAAC,KAAmB;QACvC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IAEkB,MAAM;QACrB,OAAO,IAAI,CAAA;0DACuC,IAAI,CAAC,KAAK;;wBAE5C,IAAI,CAAC,KAAK;wBACV,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ;;SAE1C,CAAC;IACN,CAAC;IAEkB,YAAY,CAAC,OAAuB;QACnD,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC7D,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACzD,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACjE,CAAC;CACJ;AAvCG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACpB;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACvB;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACW","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/color-loupe/sp-color-loupe.js';\nimport { HSL, HSLA, HSV, HSVA, RGB, RGBA, TinyColor } from '@ctrl/tinycolor';\nimport styles from './color-handle.css.js';\n\nexport type ColorValue =\n | string\n | number\n | TinyColor\n | HSVA\n | HSV\n | RGB\n | RGBA\n | HSL\n | HSLA;\n\nexport const extractHueAndSaturationRegExp =\n /^hs[v|l]a?\\s?\\((\\d{1,3}\\.?\\d*?),?\\s?(\\d{1,3})/;\nexport const replaceHueAndSaturationRegExp =\n /(^hs[v|l]a?\\s?\\()\\d{1,3}\\.?\\d*?(,?\\s?)\\d{1,3}/;\nexport const replaceHueRegExp = /(^hs[v|l]a?\\()\\d{1,3}/;\n\n/**\n * @element sp-color-handle\n */\nexport class ColorHandle extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n @property({ type: String })\n public color = 'rgba(255, 0, 0, 0.5)';\n\n private handlePointerdown(event: PointerEvent): void {\n if (event.pointerType === 'touch') {\n this.open = true;\n }\n this.setPointerCapture(event.pointerId);\n }\n\n private handlePointerup(event: PointerEvent): void {\n this.open = false;\n this.releasePointerCapture(event.pointerId);\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"color\" style=\"background-color: ${this.color}\"></div>\n <sp-color-loupe\n color=${this.color}\n ?open=${this.open && !this.disabled}\n ></sp-color-loupe>\n `;\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n this.addEventListener('pointerdown', this.handlePointerdown);\n this.addEventListener('pointerup', this.handlePointerup);\n this.addEventListener('pointercancel', this.handlePointerup);\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["ColorHandle.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/color-loupe/sp-color-loupe.js';\nimport { HSL, HSLA, HSV, HSVA, RGB, RGBA, TinyColor } from '@ctrl/tinycolor';\nimport styles from './color-handle.css.js';\n\nexport type ColorValue =\n | string\n | number\n | TinyColor\n | HSVA\n | HSV\n | RGB\n | RGBA\n | HSL\n | HSLA;\n\nexport const extractHueAndSaturationRegExp =\n /^hs[v|l]a?\\s?\\((\\d{1,3}\\.?\\d*?),?\\s?(\\d{1,3})/;\nexport const replaceHueAndSaturationRegExp =\n /(^hs[v|l]a?\\s?\\()\\d{1,3}\\.?\\d*?(,?\\s?)\\d{1,3}/;\nexport const replaceHueRegExp = /(^hs[v|l]a?\\()\\d{1,3}/;\n\n/**\n * @element sp-color-handle\n */\nexport class ColorHandle extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n @property({ type: String })\n public color = 'rgba(255, 0, 0, 0.5)';\n\n private handlePointerdown(event: PointerEvent): void {\n if (event.pointerType === 'touch') {\n this.open = true;\n }\n this.setPointerCapture(event.pointerId);\n }\n\n private handlePointerup(event: PointerEvent): void {\n this.open = false;\n this.releasePointerCapture(event.pointerId);\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"color\" style=\"background-color: ${this.color}\"></div>\n <sp-color-loupe\n color=${this.color}\n ?open=${this.open && !this.disabled}\n ></sp-color-loupe>\n `;\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n this.addEventListener('pointerdown', this.handlePointerdown);\n this.addEventListener('pointerup', this.handlePointerup);\n this.addEventListener('pointercancel', this.handlePointerup);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAOA;AAEA;AAEA;AAaO,aAAM,gCACT;AACG,aAAM,gCACT;AACG,aAAM,mBAAmB;AAKzB,aAAM,oBAAoB,gBAAgB;AAAA,EAA1C;AAAA;AAMI,oBAAW;AAGX,mBAAU;AAGV,gBAAO;AAGP,iBAAQ;AAAA;AAAA,aAdY,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAcQ,kBAAkB,OAA2B;AACjD,QAAI,MAAM,gBAAgB,SAAS;AAC/B,WAAK,OAAO;AAAA,IAChB;AACA,SAAK,kBAAkB,MAAM,SAAS;AAAA,EAC1C;AAAA,EAEQ,gBAAgB,OAA2B;AAC/C,SAAK,OAAO;AACZ,SAAK,sBAAsB,MAAM,SAAS;AAAA,EAC9C;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,0DAC2C,KAAK;AAAA;AAAA,wBAEvC,KAAK;AAAA,wBACL,KAAK,QAAQ,CAAC,KAAK;AAAA;AAAA;AAAA,EAGvC;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,SAAK,iBAAiB,eAAe,KAAK,iBAAiB;AAC3D,SAAK,iBAAiB,aAAa,KAAK,eAAe;AACvD,SAAK,iBAAiB,iBAAiB,KAAK,eAAe;AAAA,EAC/D;AACJ;AAvCW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AANJ,YAMI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AATJ,YASI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AAZJ,YAYI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAfJ,YAeI;",
6
+ "names": []
7
+ }
@@ -0,0 +1,88 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{--spectrum-colorhandle-checkerboard-size:var(
4
+ --spectrum-global-dimension-static-size-100,8px
5
+ );--spectrum-colorhandle-animation-duration:var(
6
+ --spectrum-global-animation-duration-100,130ms
7
+ );--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(
8
+ --spectrum-global-dimension-size-300
9
+ )}:host(.focus-visible),:host([focused]){height:calc(var(
10
+ --spectrum-colorhandle-size,
11
+ var(--spectrum-global-dimension-size-200)
12
+ )*2);margin-left:calc(var(
13
+ --spectrum-colorhandle-size,
14
+ var(--spectrum-global-dimension-size-200)
15
+ )*-1);margin-top:calc(var(
16
+ --spectrum-colorhandle-size,
17
+ var(--spectrum-global-dimension-size-200)
18
+ )*-1);width:calc(var(
19
+ --spectrum-colorhandle-size,
20
+ var(--spectrum-global-dimension-size-200)
21
+ )*2)}:host(:focus-visible),:host([focused]){height:calc(var(
22
+ --spectrum-colorhandle-size,
23
+ var(--spectrum-global-dimension-size-200)
24
+ )*2);margin-left:calc(var(
25
+ --spectrum-colorhandle-size,
26
+ var(--spectrum-global-dimension-size-200)
27
+ )*-1);margin-top:calc(var(
28
+ --spectrum-colorhandle-size,
29
+ var(--spectrum-global-dimension-size-200)
30
+ )*-1);width:calc(var(
31
+ --spectrum-colorhandle-size,
32
+ var(--spectrum-global-dimension-size-200)
33
+ )*2)}:host{background-position:var(
34
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
35
+ ) var(
36
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
37
+ ),var(
38
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
39
+ ) calc(var(--spectrum-colorhandle-checkerboard-size) + var(
40
+ --spectrum-colorhandle-background-offset,
41
+ calc(-1 * var(--spectrum-global-dimension-static-size-25))
42
+ )),calc(var(--spectrum-colorhandle-checkerboard-size) + var(
43
+ --spectrum-colorhandle-background-offset,
44
+ calc(-1 * var(--spectrum-global-dimension-static-size-25))
45
+ )) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(
46
+ --spectrum-global-dimension-static-size-25
47
+ )))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(
48
+ --spectrum-global-dimension-static-size-25
49
+ )))) var(
50
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
51
+ );background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(
52
+ --spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)
53
+ );box-sizing:border-box;display:block;height:var(
54
+ --spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)
55
+ );margin-left:calc(var(
56
+ --spectrum-colorhandle-size,
57
+ var(--spectrum-global-dimension-size-200)
58
+ )*-1/2);margin-top:calc(var(
59
+ --spectrum-colorhandle-size,
60
+ var(--spectrum-global-dimension-size-200)
61
+ )*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(
62
+ --spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)
63
+ );z-index:1}:host,:host:after{border-radius:100%}:host:after{content:"";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(
64
+ --spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)
65
+ );background-image:linear-gradient(-45deg,transparent 75.5%,var(
66
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
67
+ ) 75.5%),linear-gradient(45deg,transparent 75.5%,var(
68
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
69
+ ) 75.5%),linear-gradient(-45deg,var(
70
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
71
+ ) 25.5%,transparent 25.5%),linear-gradient(45deg,var(
72
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
73
+ ) 25.5%,transparent 25.5%);border-color:var(
74
+ --spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)
75
+ );box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(
76
+ --spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)
77
+ ) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(
78
+ --spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)
79
+ );border-color:var(
80
+ --spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)
81
+ );box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(
82
+ --spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)
83
+ ) var(
84
+ --spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)
85
+ )}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}:host{touch-action:none}:host(:focus){outline:none}
86
+ `;
87
+ export default styles;
88
+ //# sourceMappingURL=color-handle.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-handle.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}:host{touch-action:none}:host(:focus){outline:none}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,16 +1,5 @@
1
- /*
2
- Copyright 2022 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
14
3
  :host{--spectrum-colorhandle-checkerboard-size:var(
15
4
  --spectrum-global-dimension-static-size-100,8px
16
5
  );--spectrum-colorhandle-animation-duration:var(
@@ -96,4 +85,4 @@ var(--spectrum-global-dimension-size-200)
96
85
  )}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}:host{touch-action:none}:host(:focus){outline:none}
97
86
  `;
98
87
  export default styles;
99
- //# sourceMappingURL=color-handle.css.js.map
88
+ //# sourceMappingURL=color-handle.css.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"color-handle.css.js","sourceRoot":"","sources":["color-handle.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}:host{touch-action:none}:host(:focus){outline:none}\n`;\nexport default styles;"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-handle.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}:host{touch-action:none}:host(:focus){outline:none}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ColorHandle.dev.js";
2
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ColorHandle.dev.js'\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
package/src/index.js CHANGED
@@ -1,13 +1,2 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- export * from './ColorHandle.js';
13
- //# sourceMappingURL=index.js.map
1
+ export * from "./ColorHandle.js";
2
+ //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,cAAc,kBAAkB,CAAC","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\nexport * from './ColorHandle.js';\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ColorHandle.js';\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,88 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{--spectrum-colorhandle-checkerboard-size:var(
4
+ --spectrum-global-dimension-static-size-100,8px
5
+ );--spectrum-colorhandle-animation-duration:var(
6
+ --spectrum-global-animation-duration-100,130ms
7
+ );--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(
8
+ --spectrum-global-dimension-size-300
9
+ )}:host(.focus-visible),:host([focused]){height:calc(var(
10
+ --spectrum-colorhandle-size,
11
+ var(--spectrum-global-dimension-size-200)
12
+ )*2);margin-left:calc(var(
13
+ --spectrum-colorhandle-size,
14
+ var(--spectrum-global-dimension-size-200)
15
+ )*-1);margin-top:calc(var(
16
+ --spectrum-colorhandle-size,
17
+ var(--spectrum-global-dimension-size-200)
18
+ )*-1);width:calc(var(
19
+ --spectrum-colorhandle-size,
20
+ var(--spectrum-global-dimension-size-200)
21
+ )*2)}:host(:focus-visible),:host([focused]){height:calc(var(
22
+ --spectrum-colorhandle-size,
23
+ var(--spectrum-global-dimension-size-200)
24
+ )*2);margin-left:calc(var(
25
+ --spectrum-colorhandle-size,
26
+ var(--spectrum-global-dimension-size-200)
27
+ )*-1);margin-top:calc(var(
28
+ --spectrum-colorhandle-size,
29
+ var(--spectrum-global-dimension-size-200)
30
+ )*-1);width:calc(var(
31
+ --spectrum-colorhandle-size,
32
+ var(--spectrum-global-dimension-size-200)
33
+ )*2)}:host{background-position:var(
34
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
35
+ ) var(
36
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
37
+ ),var(
38
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
39
+ ) calc(var(--spectrum-colorhandle-checkerboard-size) + var(
40
+ --spectrum-colorhandle-background-offset,
41
+ calc(-1 * var(--spectrum-global-dimension-static-size-25))
42
+ )),calc(var(--spectrum-colorhandle-checkerboard-size) + var(
43
+ --spectrum-colorhandle-background-offset,
44
+ calc(-1 * var(--spectrum-global-dimension-static-size-25))
45
+ )) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(
46
+ --spectrum-global-dimension-static-size-25
47
+ )))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(
48
+ --spectrum-global-dimension-static-size-25
49
+ )))) var(
50
+ --spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))
51
+ );background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(
52
+ --spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)
53
+ );box-sizing:border-box;display:block;height:var(
54
+ --spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)
55
+ );margin-left:calc(var(
56
+ --spectrum-colorhandle-size,
57
+ var(--spectrum-global-dimension-size-200)
58
+ )*-1/2);margin-top:calc(var(
59
+ --spectrum-colorhandle-size,
60
+ var(--spectrum-global-dimension-size-200)
61
+ )*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(
62
+ --spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)
63
+ );z-index:1}:host,:host:after{border-radius:100%}:host:after{content:"";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(
64
+ --spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)
65
+ );background-image:linear-gradient(-45deg,transparent 75.5%,var(
66
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
67
+ ) 75.5%),linear-gradient(45deg,transparent 75.5%,var(
68
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
69
+ ) 75.5%),linear-gradient(-45deg,var(
70
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
71
+ ) 25.5%,transparent 25.5%),linear-gradient(45deg,var(
72
+ --spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)
73
+ ) 25.5%,transparent 25.5%);border-color:var(
74
+ --spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)
75
+ );box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(
76
+ --spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)
77
+ ) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(
78
+ --spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)
79
+ );border-color:var(
80
+ --spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)
81
+ );box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(
82
+ --spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)
83
+ ) var(
84
+ --spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)
85
+ )}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}
86
+ `;
87
+ export default styles;
88
+ //# sourceMappingURL=spectrum-color-handle.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-color-handle.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,16 +1,5 @@
1
- /*
2
- Copyright 2022 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
14
3
  :host{--spectrum-colorhandle-checkerboard-size:var(
15
4
  --spectrum-global-dimension-static-size-100,8px
16
5
  );--spectrum-colorhandle-animation-duration:var(
@@ -96,4 +85,4 @@ var(--spectrum-global-dimension-size-200)
96
85
  )}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}
97
86
  `;
98
87
  export default styles;
99
- //# sourceMappingURL=spectrum-color-handle.css.js.map
88
+ //# sourceMappingURL=spectrum-color-handle.css.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"spectrum-color-handle.css.js","sourceRoot":"","sources":["spectrum-color-handle.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}\n`;\nexport default styles;"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-color-handle.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-colorhandle-checkerboard-size:var(\n--spectrum-global-dimension-static-size-100,8px\n);--spectrum-colorhandle-animation-duration:var(\n--spectrum-global-animation-duration-100,130ms\n);--spectrum-colorhandle-animation-easing:ease-in-out;--spectrum-colorhandle-hitarea-size:var(\n--spectrum-global-dimension-size-300\n)}:host(.focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host(:focus-visible),:host([focused]){height:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1);width:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*2)}:host{background-position:var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n),var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n) calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)),calc(var(--spectrum-colorhandle-checkerboard-size) + var(\n--spectrum-colorhandle-background-offset,\ncalc(-1 * var(--spectrum-global-dimension-static-size-25))\n)) calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))),calc(-1 * var(--spectrum-colorhandle-checkerboard-size) + var(--spectrum-colorhandle-background-offset, calc(-1 * var(\n--spectrum-global-dimension-static-size-25\n)))) var(\n--spectrum-colorhandle-background-offset,calc(-1 * var(--spectrum-global-dimension-static-size-25))\n);background-size:var(--spectrum-global-dimension-static-size-200,16px) var(--spectrum-global-dimension-static-size-200,16px);border-style:solid;border-width:var(\n--spectrum-colorhandle-inner-border-size,var(--spectrum-global-dimension-static-size-25)\n);box-sizing:border-box;display:block;height:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);margin-left:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);margin-top:calc(var(\n--spectrum-colorhandle-size,\nvar(--spectrum-global-dimension-size-200)\n)*-1/2);position:absolute;transition:width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),height var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),border-width var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-left var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing),margin-top var(--spectrum-colorhandle-animation-duration) var(--spectrum-colorhandle-animation-easing);width:var(\n--spectrum-colorhandle-size,var(--spectrum-global-dimension-size-200)\n);z-index:1}:host,:host:after{border-radius:100%}:host:after{content:\"\";display:block;height:var(--spectrum-colorhandle-hitarea-size);left:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);position:absolute;top:calc(50% - var(--spectrum-colorhandle-hitarea-size)/2);width:var(--spectrum-colorhandle-hitarea-size)}:host([disabled]){pointer-events:none}.color{border-radius:100%;height:100%;width:100%}:host{background-color:var(\n--spectrum-colorcontrol-checkerboard-light-color,var(--spectrum-global-color-static-white)\n);background-image:linear-gradient(-45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(45deg,transparent 75.5%,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 75.5%),linear-gradient(-45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%),linear-gradient(45deg,var(\n--spectrum-colorcontrol-checkerboard-dark-color,var(--spectrum-global-color-static-gray-300)\n) 25.5%,transparent 25.5%);border-color:var(\n--spectrum-colorhandle-inner-border-color,var(--spectrum-global-color-static-white)\n);box-shadow:0 0 var(--spectrum-colorhandle-outer-shadow-blur,0) var(\n--spectrum-colorhandle-outer-shadow-spread,var(--spectrum-alias-border-size-thin)\n) var(--spectrum-colorhandle-outer-shadow-color,rgba(0,0,0,.42))}:host([disabled]){background:var(\n--spectrum-colorhandle-fill-color-disabled,var(--spectrum-alias-track-color-disabled)\n);border-color:var(\n--spectrum-colorhandle-inner-border-color-disabled,var(--spectrum-global-color-gray-400)\n);box-shadow:none}:host([disabled]) .color{display:none}.color{background-color:var(--spectrum-picked-color);box-shadow:inset 0 0 0 var(\n--spectrum-colorhandle-outer-border-size,var(--spectrum-alias-border-size-thin)\n) var(\n--spectrum-colorhandle-inner-shadow-color,var(--spectrum-colorhandle-outer-shadow-color)\n)}@media (forced-colors:active){:host{--spectrum-colorhandle-inner-border-color-disabled:GrayText;--spectrum-colorhandle-fill-color-disabled:Canvas;--spectrum-colorhandle-inner-border-color:CanvasText}:host([disabled]){forced-color-adjust:none}}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFf,eAAe;",
6
+ "names": []
7
+ }
@@ -1,29 +1,18 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import '../sp-color-handle.js';
1
+ import { html } from "@spectrum-web-components/base";
2
+ import "@spectrum-web-components/color-handle/sp-color-handle.js";
14
3
  export default {
15
- title: 'Color/Handle',
16
- component: 'sp-color-handle',
4
+ title: "Color/Handle",
5
+ component: "sp-color-handle"
17
6
  };
18
7
  export const Default = () => {
19
- return html `
8
+ return html`
20
9
  <sp-color-handle
21
10
  style="left: 50%; top: 50%; transform: translate(-50%, -50%);"
22
11
  ></sp-color-handle>
23
12
  `;
24
13
  };
25
14
  export const disabled = () => {
26
- return html `
15
+ return html`
27
16
  <sp-color-handle
28
17
  disabled
29
18
  style="left: 50%; top: 50%; transform: translate(-50%, -50%);"
@@ -31,11 +20,11 @@ export const disabled = () => {
31
20
  `;
32
21
  };
33
22
  export const open = () => {
34
- return html `
23
+ return html`
35
24
  <sp-color-handle
36
25
  open
37
26
  style="left: 50%; top: 50%; transform: translate(-50%, -50%);"
38
27
  ></sp-color-handle>
39
28
  `;
40
29
  };
41
- //# sourceMappingURL=color-handle.stories.js.map
30
+ //# sourceMappingURL=color-handle.stories.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"color-handle.stories.js","sourceRoot":"","sources":["color-handle.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,uBAAuB,CAAC;AAE/B,eAAe;IACX,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,iBAAiB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAmB,EAAE;IACxC,OAAO,IAAI,CAAA;;;;KAIV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAmB,EAAE;IACzC,OAAO,IAAI,CAAA;;;;;KAKV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,GAAmB,EAAE;IACrC,OAAO,IAAI,CAAA;;;;;KAKV,CAAC;AACN,CAAC,CAAC","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 '../sp-color-handle.js';\n\nexport default {\n title: 'Color/Handle',\n component: 'sp-color-handle',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-color-handle\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n\nexport const disabled = (): TemplateResult => {\n return html`\n <sp-color-handle\n disabled\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n\nexport const open = (): TemplateResult => {\n return html`\n <sp-color-handle\n open\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-handle.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-handle/sp-color-handle.js';\n\nexport default {\n title: 'Color/Handle',\n component: 'sp-color-handle',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-color-handle\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n\nexport const disabled = (): TemplateResult => {\n return html`\n <sp-color-handle\n disabled\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n\nexport const open = (): TemplateResult => {\n return html`\n <sp-color-handle\n open\n style=\"left: 50%; top: 50%; transform: translate(-50%, -50%);\"\n ></sp-color-handle>\n `;\n};\n"],
5
+ "mappings": "AAYA;AAEA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA;AAAA;AAAA;AAKX;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMX;AAEO,aAAM,OAAO,MAAsB;AACtC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMX;",
6
+ "names": []
7
+ }
@@ -1,18 +1,7 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import '@spectrum-web-components/color-handle/sp-color-handle.js';
13
- import { html } from 'lit';
14
- import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
15
- measureFixtureCreation(html `
1
+ import "@spectrum-web-components/color-handle/sp-color-handle.js";
2
+ import { html } from "lit";
3
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
4
+ measureFixtureCreation(html`
16
5
  <sp-color-handle open></sp-color-handle>
17
6
  `);
18
- //# sourceMappingURL=basic-test.js.map
7
+ //# sourceMappingURL=basic-test.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"basic-test.js","sourceRoot":"","sources":["basic-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,0DAA0D,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,sBAAsB,CAAC,IAAI,CAAA;;CAE1B,CAAC,CAAC","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-handle/sp-color-handle.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-color-handle open></sp-color-handle>\n`);\n"]}
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-handle/sp-color-handle.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-color-handle open></sp-color-handle>\n`);\n"],
5
+ "mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
6
+ "names": []
7
+ }
@@ -1,15 +1,4 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import * as stories from '../stories/color-handle.stories.js';
13
- import { regressVisuals } from '../../../test/visual/test.js';
14
- regressVisuals('ColorHandleStories', stories);
15
- //# sourceMappingURL=color-handle.test-vrt.js.map
1
+ import * as stories from "../stories/color-handle.stories.js";
2
+ import { regressVisuals } from "../../../test/visual/test.js";
3
+ regressVisuals("ColorHandleStories", stories);
4
+ //# sourceMappingURL=color-handle.test-vrt.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"color-handle.test-vrt.js","sourceRoot":"","sources":["color-handle.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC","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-handle.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ColorHandleStories', stories);\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-handle.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-handle.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ColorHandleStories', stories);\n"],
5
+ "mappings": "AAYA;AACA;AAEA,eAAe,sBAAsB,OAAO;",
6
+ "names": []
7
+ }
@@ -1,66 +1,59 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { elementUpdated, expect, fixture, html } from '@open-wc/testing';
13
- import '../sp-color-handle.js';
14
- describe('ColorHandle', () => {
15
- it('loads default color-handle accessibly', async () => {
16
- const el = await fixture(html `
1
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
2
+ import "@spectrum-web-components/color-handle/sp-color-handle.js";
3
+ import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
4
+ describe("ColorHandle", () => {
5
+ testForLitDevWarnings(async () => await fixture(html`
6
+ <sp-color-handle></sp-color-handle>
7
+ `));
8
+ it("loads default color-handle accessibly", async () => {
9
+ const el = await fixture(html`
17
10
  <sp-color-handle></sp-color-handle>
18
11
  `);
19
- await elementUpdated(el);
20
- await expect(el).to.be.accessible();
21
- });
22
- it('loads [open] color-handle accessibly', async () => {
23
- const el = await fixture(html `
12
+ await elementUpdated(el);
13
+ await expect(el).to.be.accessible();
14
+ });
15
+ it("loads [open] color-handle accessibly", async () => {
16
+ const el = await fixture(html`
24
17
  <sp-color-handle open></sp-color-handle>
25
18
  `);
26
- await elementUpdated(el);
27
- await expect(el).to.be.accessible();
28
- });
29
- it('opens/closes on pointerdown/up/cancel', async () => {
30
- const el = await fixture(html `
19
+ await elementUpdated(el);
20
+ await expect(el).to.be.accessible();
21
+ });
22
+ it("opens/closes on pointerdown/up/cancel", async () => {
23
+ const el = await fixture(html`
31
24
  <sp-color-handle></sp-color-handle>
32
25
  `);
33
- await elementUpdated(el);
34
- el.setPointerCapture = () => {
35
- return;
36
- };
37
- el.releasePointerCapture = () => {
38
- return;
39
- };
40
- el.dispatchEvent(new PointerEvent('pointerdown', {
41
- pointerId: 1,
42
- pointerType: 'touch',
43
- }));
44
- await elementUpdated(el);
45
- expect(el.open).to.be.true;
46
- el.dispatchEvent(new PointerEvent('pointerup', {
47
- pointerId: 1,
48
- pointerType: 'touch',
49
- }));
50
- await elementUpdated(el);
51
- expect(el.open).to.be.false;
52
- el.dispatchEvent(new PointerEvent('pointerdown', {
53
- pointerId: 1,
54
- pointerType: 'touch',
55
- }));
56
- await elementUpdated(el);
57
- expect(el.open).to.be.true;
58
- el.dispatchEvent(new PointerEvent('pointercancel', {
59
- pointerId: 1,
60
- pointerType: 'touch',
61
- }));
62
- await elementUpdated(el);
63
- expect(el.open).to.be.false;
64
- });
26
+ await elementUpdated(el);
27
+ el.setPointerCapture = () => {
28
+ return;
29
+ };
30
+ el.releasePointerCapture = () => {
31
+ return;
32
+ };
33
+ el.dispatchEvent(new PointerEvent("pointerdown", {
34
+ pointerId: 1,
35
+ pointerType: "touch"
36
+ }));
37
+ await elementUpdated(el);
38
+ expect(el.open).to.be.true;
39
+ el.dispatchEvent(new PointerEvent("pointerup", {
40
+ pointerId: 1,
41
+ pointerType: "touch"
42
+ }));
43
+ await elementUpdated(el);
44
+ expect(el.open).to.be.false;
45
+ el.dispatchEvent(new PointerEvent("pointerdown", {
46
+ pointerId: 1,
47
+ pointerType: "touch"
48
+ }));
49
+ await elementUpdated(el);
50
+ expect(el.open).to.be.true;
51
+ el.dispatchEvent(new PointerEvent("pointercancel", {
52
+ pointerId: 1,
53
+ pointerType: "touch"
54
+ }));
55
+ await elementUpdated(el);
56
+ expect(el.open).to.be.false;
57
+ });
65
58
  });
66
- //# sourceMappingURL=color-handle.test.js.map
59
+ //# sourceMappingURL=color-handle.test.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"color-handle.test.js","sourceRoot":"","sources":["color-handle.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,uBAAuB,CAAC;AAG/B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACnD,MAAM,EAAE,GAAG,MAAM,OAAO,CACpB,IAAI,CAAA;;aAEH,CACJ,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,EAAE,GAAG,MAAM,OAAO,CACpB,IAAI,CAAA;;aAEH,CACJ,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACnD,MAAM,EAAE,GAAG,MAAM,OAAO,CACpB,IAAI,CAAA;;aAEH,CACJ,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QACzB,EAAE,CAAC,iBAAiB,GAAG,GAAG,EAAE;YACxB,OAAO;QACX,CAAC,CAAC;QACF,EAAE,CAAC,qBAAqB,GAAG,GAAG,EAAE;YAC5B,OAAO;QACX,CAAC,CAAC;QAEF,EAAE,CAAC,aAAa,CACZ,IAAI,YAAY,CAAC,aAAa,EAAE;YAC5B,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,OAAO;SACvB,CAAC,CACL,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAE3B,EAAE,CAAC,aAAa,CACZ,IAAI,YAAY,CAAC,WAAW,EAAE;YAC1B,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,OAAO;SACvB,CAAC,CACL,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAE5B,EAAE,CAAC,aAAa,CACZ,IAAI,YAAY,CAAC,aAAa,EAAE;YAC5B,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,OAAO;SACvB,CAAC,CACL,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAE3B,EAAE,CAAC,aAAa,CACZ,IAAI,YAAY,CAAC,eAAe,EAAE;YAC9B,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,OAAO;SACvB,CAAC,CACL,CAAC;QAEF,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","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';\n\nimport '../sp-color-handle.js';\nimport { ColorHandle } from '..';\n\ndescribe('ColorHandle', () => {\n it('loads default color-handle accessibly', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads [open] color-handle accessibly', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle open></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('opens/closes on pointerdown/up/cancel', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n el.setPointerCapture = () => {\n return;\n };\n el.releasePointerCapture = () => {\n return;\n };\n\n el.dispatchEvent(\n new PointerEvent('pointerdown', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n el.dispatchEvent(\n new PointerEvent('pointerup', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n\n el.dispatchEvent(\n new PointerEvent('pointerdown', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n el.dispatchEvent(\n new PointerEvent('pointercancel', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n});\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["color-handle.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';\n\nimport '@spectrum-web-components/color-handle/sp-color-handle.js';\nimport { ColorHandle } from '@spectrum-web-components/color-handle';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ColorHandle', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ColorHandle>(\n html`\n <sp-color-handle></sp-color-handle>\n `\n )\n );\n it('loads default color-handle accessibly', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads [open] color-handle accessibly', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle open></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('opens/closes on pointerdown/up/cancel', async () => {\n const el = await fixture<ColorHandle>(\n html`\n <sp-color-handle></sp-color-handle>\n `\n );\n\n await elementUpdated(el);\n el.setPointerCapture = () => {\n return;\n };\n el.releasePointerCapture = () => {\n return;\n };\n\n el.dispatchEvent(\n new PointerEvent('pointerdown', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n el.dispatchEvent(\n new PointerEvent('pointerup', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n\n el.dispatchEvent(\n new PointerEvent('pointerdown', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n el.dispatchEvent(\n new PointerEvent('pointercancel', {\n pointerId: 1,\n pointerType: 'touch',\n })\n );\n\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n});\n"],
5
+ "mappings": "AAYA;AAEA;AAEA;AAEA,SAAS,eAAe,MAAM;AAC1B,wBACI,YACI,MAAM,QACF;AAAA;AAAA,iBAGJ,CACR;AACA,KAAG,yCAAyC,YAAY;AACpD,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,wCAAwC,YAAY;AACnD,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,yCAAyC,YAAY;AACpD,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,OAAG,oBAAoB,MAAM;AACzB;AAAA,IACJ;AACA,OAAG,wBAAwB,MAAM;AAC7B;AAAA,IACJ;AAEA,OAAG,cACC,IAAI,aAAa,eAAe;AAAA,MAC5B,WAAW;AAAA,MACX,aAAa;AAAA,IACjB,CAAC,CACL;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,OAAG,cACC,IAAI,aAAa,aAAa;AAAA,MAC1B,WAAW;AAAA,MACX,aAAa;AAAA,IACjB,CAAC,CACL;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,OAAG,cACC,IAAI,aAAa,eAAe;AAAA,MAC5B,WAAW;AAAA,MACX,aAAa;AAAA,IACjB,CAAC,CACL;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,OAAG,cACC,IAAI,aAAa,iBAAiB;AAAA,MAC9B,WAAW;AAAA,MACX,aAAa;AAAA,IACjB,CAAC,CACL;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAAA,EAC1B,CAAC;AACL,CAAC;",
6
+ "names": []
7
+ }