@spectrum-web-components/color-handle 1.7.0 → 1.9.0-nightly.20251013134115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -9
- package/package.json +5 -5
- package/sp-color-handle.d.ts +11 -0
- package/sp-color-handle.dev.js.map +1 -1
- package/sp-color-handle.js.map +1 -1
- package/src/ColorHandle.d.ts +11 -0
- package/src/ColorHandle.dev.js.map +1 -1
- package/src/ColorHandle.js.map +1 -1
- package/src/color-handle-overrides.css.dev.js.map +1 -1
- package/src/color-handle-overrides.css.js.map +1 -1
- package/src/color-handle.css.dev.js +1 -1
- package/src/color-handle.css.dev.js.map +1 -1
- package/src/color-handle.css.js +1 -1
- package/src/color-handle.css.js.map +1 -1
- package/src/index.d.ts +11 -0
- package/src/index.dev.js.map +1 -1
- package/src/index.js.map +1 -1
- package/src/spectrum-color-handle.css.dev.js +1 -1
- package/src/spectrum-color-handle.css.dev.js.map +1 -1
- package/src/spectrum-color-handle.css.js +1 -1
- package/src/spectrum-color-handle.css.js.map +1 -1
- package/custom-elements.json +0 -163
package/README.md
CHANGED
|
@@ -1,45 +1,164 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Overview
|
|
2
2
|
|
|
3
|
-
The `<sp-color-handle>` is used to select a
|
|
3
|
+
The `<sp-color-handle>` is used to select a color on an `<sp-color-area>`, `<sp-color-slider>`, or `<sp-color-wheel>`. It provides a draggable control point for precise color selection within color components.
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@spectrum-web-components/color-handle)
|
|
8
8
|
[](https://bundlephobia.com/result?p=@spectrum-web-components/color-handle)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Note**: `<sp-color-handle>` is a primitive component designed to be used within other color selection components. It's not typically used directly in applications, but rather as part of higher-level color components like `<sp-color-area>`, `<sp-color-slider>`, or `<sp-color-wheel>`.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
11
13
|
yarn add @spectrum-web-components/color-handle
|
|
12
14
|
```
|
|
13
15
|
|
|
14
16
|
Import the side effectful registration of `<sp-color-handle>` via:
|
|
15
17
|
|
|
16
|
-
```
|
|
18
|
+
```javascript
|
|
17
19
|
import '@spectrum-web-components/color-handle/sp-color-handle.js';
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
When looking to leverage the `ColorHandle` base class as a type and/or for extension purposes, do so via:
|
|
21
23
|
|
|
22
|
-
```
|
|
24
|
+
```javascript
|
|
23
25
|
import { ColorHandle } from '@spectrum-web-components/color-handle';
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
### Anatomy
|
|
29
|
+
|
|
30
|
+
The color handle consists of several key parts:
|
|
31
|
+
|
|
32
|
+
- A visual handle element that indicates the current position
|
|
33
|
+
- Touch-responsive interaction areas
|
|
34
|
+
- Color display showing the current selected color
|
|
35
|
+
- Opacity checkerboard pattern for transparent colors
|
|
36
|
+
- An optional `sp-color-loupe` that appears above the handle when the properties `open = true` and `disabled = false`
|
|
27
37
|
|
|
28
38
|
```html
|
|
29
39
|
<sp-color-handle></sp-color-handle>
|
|
30
40
|
```
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
### Options
|
|
43
|
+
|
|
44
|
+
#### Color
|
|
45
|
+
|
|
46
|
+
The `color` property sets the visual color displayed within the handle. This accepts any valid CSS color format. The default color is `rgba(255, 0, 0, 0.5)` (semi-transparent red).
|
|
47
|
+
|
|
48
|
+
For a complete list of supported color formats, see the [ColorController documentation](/tools/color-controller#supported-color-formats).
|
|
49
|
+
|
|
50
|
+
**Transparency Support**: When using transparent colors, the handle displays an opacity checkerboard pattern background to clearly show the transparency level.
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<div style="display: flex; gap: 16px; align-items: center; margin: 16px 0;">
|
|
54
|
+
<!-- Hex color -->
|
|
55
|
+
<div style="position: relative; height: 20px; margin: 20px;">
|
|
56
|
+
<sp-color-handle color="#ff0000"></sp-color-handle>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- RGB format -->
|
|
60
|
+
<div style="position: relative; height: 20px; margin: 20px;">
|
|
61
|
+
<sp-color-handle color="rgb(255, 0, 0)"></sp-color-handle>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<!-- RGBA format with transparency -->
|
|
65
|
+
<div style="position: relative; height: 20px; margin: 20px;">
|
|
66
|
+
<sp-color-handle color="rgba(255, 0, 0, 0.5)"></sp-color-handle>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- HSL format -->
|
|
70
|
+
<div style="position: relative; height: 20px; margin: 20px;">
|
|
71
|
+
<sp-color-handle color="hsl(0, 100%, 50%)"></sp-color-handle>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- Named colors -->
|
|
75
|
+
<div style="position: relative; height: 20px; margin: 20px;">
|
|
76
|
+
<sp-color-handle color="red"></sp-color-handle>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### States
|
|
82
|
+
|
|
83
|
+
#### Standard
|
|
84
|
+
|
|
85
|
+
The default state of the color handle, ready for interaction:
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<sp-color-handle></sp-color-handle>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Disabled
|
|
92
|
+
|
|
93
|
+
A disabled color handle shows that the control exists but is not available for interaction. This maintains layout continuity and communicates that the handle may become available later:
|
|
33
94
|
|
|
34
95
|
```html
|
|
35
96
|
<sp-color-handle disabled></sp-color-handle>
|
|
36
97
|
```
|
|
37
98
|
|
|
38
|
-
|
|
99
|
+
#### Open
|
|
39
100
|
|
|
40
|
-
When the
|
|
101
|
+
When the `open` property is set, the `<sp-color-loupe>` component appears above the handle to show the selected color that would otherwise be covered by a mouse, stylus, or finger on the down/touch state. The loupe automatically appears for touch input (`pointerType === 'touch'`).
|
|
41
102
|
|
|
42
103
|
```html
|
|
43
104
|
<div style="height: 72px"></div>
|
|
44
105
|
<sp-color-handle open></sp-color-handle>
|
|
45
106
|
```
|
|
107
|
+
|
|
108
|
+
**Automatic Behavior**: The loupe automatically opens when touched and closes when the touch interaction ends. For mouse and stylus input, the loupe remains hidden by default unless explicitly set to `open="true"`.
|
|
109
|
+
|
|
110
|
+
#### Focused
|
|
111
|
+
|
|
112
|
+
The color handle can receive keyboard focus when used within interactive color components. The focused state is managed automatically by the parent component and is indicated visually:
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<sp-color-handle focused></sp-color-handle>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Behaviors
|
|
119
|
+
|
|
120
|
+
#### Pointer Interactions
|
|
121
|
+
|
|
122
|
+
The color handle automatically manages pointer events to provide the optimal user experience:
|
|
123
|
+
|
|
124
|
+
- **Touch Input**: When touched (`pointerType === 'touch'`), the color loupe automatically appears to prevent the finger from obscuring the selected color
|
|
125
|
+
- **Mouse/Stylus Input**: The loupe remains hidden by default for precision pointing devices
|
|
126
|
+
- **Pointer Capture**: The handle captures pointer events during interaction to ensure smooth dragging even when the pointer moves outside the handle area
|
|
127
|
+
- **Event Handling**: The component listens for `pointerdown`, `pointerup`, and `pointercancel` events to manage the interaction lifecycle
|
|
128
|
+
|
|
129
|
+
#### Color Display
|
|
130
|
+
|
|
131
|
+
The handle displays the current color with proper support for transparency:
|
|
132
|
+
|
|
133
|
+
- Transparent colors are shown with an opacity checkerboard pattern background
|
|
134
|
+
- The color updates in real-time as the user interacts with the parent color component
|
|
135
|
+
- Supports all standard CSS color formats
|
|
136
|
+
|
|
137
|
+
For a complete list of supported color formats, see the [ColorController documentation](/tools/color-controller#supported-color-formats).
|
|
138
|
+
|
|
139
|
+
### Accessibility
|
|
140
|
+
|
|
141
|
+
The `<sp-color-handle>` is designed to work as part of accessible color selection components:
|
|
142
|
+
|
|
143
|
+
#### Keyboard Support
|
|
144
|
+
|
|
145
|
+
While the color handle itself is not directly keyboard accessible, it works in conjunction with its parent components ([`<sp-color-area>`](/components/color-area), [`<sp-color-slider>`](/components/color-slider), [`<sp-color-wheel>`](/components/color-wheel)) which provide comprehensive keyboard navigation.
|
|
146
|
+
Example: Keyboard accessibility with `sp-color-area` as parent component
|
|
147
|
+
|
|
148
|
+
```html
|
|
149
|
+
<sp-color-area></sp-color-area>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### Screen Reader Support
|
|
153
|
+
|
|
154
|
+
The color handle is rendered as a visual indicator and does not directly interface with screen readers. Accessibility is provided through the parent color component's ARIA implementation.
|
|
155
|
+
|
|
156
|
+
#### Touch Accessibility
|
|
157
|
+
|
|
158
|
+
- **Color Loupe**: Automatically appears for touch input to ensure the selected color remains visible
|
|
159
|
+
- **Large Touch Target**: The handle provides an appropriately sized touch target for mobile interaction
|
|
160
|
+
- **Pointer Capture**: Ensures reliable dragging behavior across different touch devices
|
|
161
|
+
|
|
162
|
+
#### Focus Management
|
|
163
|
+
|
|
164
|
+
Focus is managed by the parent color component, with the handle reflecting the focused state visually when its parent component has keyboard focus.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/color-handle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-nightly.20251013134115",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/adobe/spectrum-web-components.git",
|
|
12
|
-
"directory": "packages/color-handle"
|
|
12
|
+
"directory": "first-gen/packages/color-handle"
|
|
13
13
|
},
|
|
14
14
|
"author": "Adobe",
|
|
15
15
|
"homepage": "https://opensource.adobe.com/spectrum-web-components/components/color-handle",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"css"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@spectrum-web-components/base": "1.
|
|
68
|
-
"@spectrum-web-components/color-loupe": "1.
|
|
69
|
-
"@spectrum-web-components/opacity-checkerboard": "1.
|
|
67
|
+
"@spectrum-web-components/base": "1.9.0-nightly.20251013134115",
|
|
68
|
+
"@spectrum-web-components/color-loupe": "1.9.0-nightly.20251013134115",
|
|
69
|
+
"@spectrum-web-components/opacity-checkerboard": "1.9.0-nightly.20251013134115"
|
|
70
70
|
},
|
|
71
71
|
"types": "./src/index.d.ts",
|
|
72
72
|
"customElements": "custom-elements.json",
|
package/sp-color-handle.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 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
|
+
*/
|
|
1
12
|
import { ColorHandle } from './src/ColorHandle.js';
|
|
2
13
|
declare global {
|
|
3
14
|
interface HTMLElementTagNameMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-color-handle.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ColorHandle } from './src/ColorHandle.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-color-handle', ColorHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-color-handle': ColorHandle;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAYA,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,cAAc,mBAAmB,WAAW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-color-handle.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-color-handle.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ColorHandle } from './src/ColorHandle.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-color-handle', ColorHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-color-handle': ColorHandle;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAYA,OAAS,eAAAA,MAAmB,uBAC5B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,kBAAmBD,CAAW",
|
|
6
6
|
"names": ["ColorHandle", "defineElement"]
|
|
7
7
|
}
|
package/src/ColorHandle.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 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
|
+
*/
|
|
1
12
|
import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
13
|
import '@spectrum-web-components/color-loupe/sp-color-loupe.js';
|
|
3
14
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ColorHandle.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n 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 opacityCheckerboardStyles from '@spectrum-web-components/opacity-checkerboard/src/is-opacity-checkerboard.css.js';\nimport styles from './color-handle.css.js';\n\n/**\n * @element sp-color-handle\n */\nexport class ColorHandle extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [opacityCheckerboardStyles, 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=\"inner\" 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
5
|
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO;AACP,OAAO,+BAA+B;AACtC,OAAO,YAAY;AAKZ,aAAM,oBAAoB,gBAAgB;AAAA,EAA1C;AAAA;AAMH,SAAO,WAAW;AAGlB,SAAO,UAAU;AAGjB,SAAO,OAAO;AAGd,SAAO,QAAQ;AAAA;AAAA,EAdf,WAA2B,SAAyB;AAChD,WAAO,CAAC,2BAA2B,MAAM;AAAA,EAC7C;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,KAAK;AAAA;AAAA,wBAE5C,KAAK,KAAK;AAAA,wBACV,KAAK,QAAQ,CAAC,KAAK,QAAQ;AAAA;AAAA;AAAA,EAG/C;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,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GALjC,YAMF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GARjC,YASF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAXjC,YAYF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAdjB,YAeF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ColorHandle.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ColorHandle.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n 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 opacityCheckerboardStyles from '@spectrum-web-components/opacity-checkerboard/src/is-opacity-checkerboard.css.js';\nimport styles from './color-handle.css.js';\n\n/**\n * @element sp-color-handle\n */\nexport class ColorHandle extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [opacityCheckerboardStyles, 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=\"inner\" 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
5
|
"mappings": "qNAYA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,MAAO,yDACP,OAAOC,MAA+B,mFACtC,OAAOC,MAAY,wBAKZ,aAAM,oBAAoBH,CAAgB,CAA1C,kCAMH,KAAO,SAAW,GAGlB,KAAO,QAAU,GAGjB,KAAO,KAAO,GAGd,KAAO,MAAQ,uBAdf,WAA2B,QAAyB,CAChD,MAAO,CAACE,EAA2BC,CAAM,CAC7C,CAcQ,kBAAkBC,EAA2B,CAC7CA,EAAM,cAAgB,UACtB,KAAK,KAAO,IAEhB,KAAK,kBAAkBA,EAAM,SAAS,CAC1C,CAEQ,gBAAgBA,EAA2B,CAC/C,KAAK,KAAO,GACZ,KAAK,sBAAsBA,EAAM,SAAS,CAC9C,CAEmB,QAAyB,CACxC,OAAOL;AAAA,0DAC2C,KAAK,KAAK;AAAA;AAAA,wBAE5C,KAAK,KAAK;AAAA,wBACV,KAAK,MAAQ,CAAC,KAAK,QAAQ;AAAA;AAAA,SAG/C,CAEmB,aAAaM,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EAC1B,KAAK,iBAAiB,cAAe,KAAK,iBAAiB,EAC3D,KAAK,iBAAiB,YAAa,KAAK,eAAe,EACvD,KAAK,iBAAiB,gBAAiB,KAAK,eAAe,CAC/D,CACJ,CAvCWC,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GALjC,YAMF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,YASF,uBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAXjC,YAYF,oBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,MAAO,CAAC,GAdjB,YAeF",
|
|
6
6
|
"names": ["html", "SpectrumElement", "property", "opacityCheckerboardStyles", "styles", "event", "changed", "__decorateClass"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["color-handle-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n \n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["color-handle-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n \n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{
|
|
4
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}:host{touch-action:none;transition:inline-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),block-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),border-width var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-inline var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-block var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing))}:host(:focus){outline:none}
|
|
5
5
|
`;
|
|
6
6
|
export default styles;
|
|
7
7
|
//# sourceMappingURL=color-handle.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["color-handle.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:\"\";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}:host{touch-action:none;transition:inline-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),block-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),border-width var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-inline var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-block var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing))}:host(:focus){outline:none}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/color-handle.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";import{css as o}from"@spectrum-web-components/base";const r=o`
|
|
2
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{
|
|
2
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}:host{touch-action:none;transition:inline-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),block-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),border-width var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-inline var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-block var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing))}:host(:focus){outline:none}
|
|
3
3
|
`;export default r;
|
|
4
4
|
//# sourceMappingURL=color-handle.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["color-handle.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:\"\";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}:host{touch-action:none;transition:inline-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),block-size var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),border-width var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-inline var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing)),margin-block var(--mod-colorhandle-animation-duration,var(--spectrum-colorhandle-animation-duration))var(--mod-colorhandle-animation-easing,var(--spectrum-colorhandle-animation-easing))}:host(:focus){outline:none}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 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
|
+
*/
|
|
1
12
|
export * from './ColorHandle.js';
|
package/src/index.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './ColorHandle.dev.js'\n"],
|
|
5
5
|
"mappings": ";AAYA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './ColorHandle.js';\n"],
|
|
5
5
|
"mappings": "aAYA,WAAc",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{
|
|
4
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}
|
|
5
5
|
`;
|
|
6
6
|
export default styles;
|
|
7
7
|
//# sourceMappingURL=spectrum-color-handle.css.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-color-handle.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:\"\";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";import{css as o}from"@spectrum-web-components/base";const r=o`
|
|
2
|
-
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{
|
|
2
|
+
@media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}
|
|
3
3
|
`;export default r;
|
|
4
4
|
//# sourceMappingURL=spectrum-color-handle.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-color-handle.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n @media (forced-colors:active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-colorhandle-border-color-disabled:GrayText;--highcontrast-colorhandle-fill-color-disabled:Canvas}}:host{--spectrum-colorhandle-outer-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-outer-border-opacity));--spectrum-colorhandle-outer-border-width:var(--spectrum-color-handle-outer-border-width);--spectrum-colorhandle-inner-border-color:rgba(var(--spectrum-black-rgb),var(--spectrum-color-handle-inner-border-opacity));--mod-opacity-checkerboard-position:50%;z-index:1;box-sizing:border-box;inline-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));block-size:var(--mod-colorhandle-size,var(--spectrum-color-handle-size));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))/2*-1);border-width:var(--mod-colorhandle-border-width,var(--spectrum-color-handle-border-width));border-color:var(--mod-colorhandle-border-color,var(--spectrum-white));box-shadow:0 0 0 var(--mod-colorhandle-outer-border-width,var(--spectrum-colorhandle-outer-border-width))var(--mod-colorhandle-outer-border-color,var(--spectrum-colorhandle-outer-border-color));transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))ease-in-out;transition:all var(--mod-colorhandle-animation-duration,var(--spectrum-animation-duration-100))var(--mod-colorhandle-animation-easing,ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:\"\";inset-inline:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inset-block:calc(50% - var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width))/2);inline-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));block-size:var(--mod-colorhandle-hitarea-size,var(--spectrum-color-control-track-width));border-radius:var(--mod-colorhandle-hitarea-border-radius,100%)}:host([focused]),:host(:focus-visible){inline-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));block-size:var(--mod-colorhandle-focused-size,var(--spectrum-color-handle-size-key-focus));margin-inline:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);margin-block:calc(var(--mod-colorhandle-size,var(--spectrum-color-handle-size))*-1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-colorhandle-border-color-disabled,var(--mod-colorhandle-border-color-disabled,var(--spectrum-disabled-content-color)));background:var(--highcontrast-colorhandle-fill-color-disabled,var(--mod-colorhandle-fill-color-disabled,var(--spectrum-disabled-background-color)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{block-size:100%;inline-size:100%;box-shadow:inset 0 0 0 var(--mod-colorhandle-inner-border-width,var(--spectrum-color-handle-inner-border-width))var(--mod-colorhandle-inner-border-color,var(--spectrum-colorhandle-inner-border-color));background-color:var(--spectrum-picked-color);border-radius:100%}\n`;\nexport default styles;"],
|
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/custom-elements.json
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-color-handle.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "custom-element-definition",
|
|
12
|
-
"name": "sp-color-handle",
|
|
13
|
-
"declaration": {
|
|
14
|
-
"name": "ColorHandle",
|
|
15
|
-
"module": "/src/ColorHandle.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "src/ColorHandle.js",
|
|
23
|
-
"declarations": [
|
|
24
|
-
{
|
|
25
|
-
"kind": "class",
|
|
26
|
-
"description": "",
|
|
27
|
-
"name": "ColorHandle",
|
|
28
|
-
"members": [
|
|
29
|
-
{
|
|
30
|
-
"kind": "field",
|
|
31
|
-
"name": "disabled",
|
|
32
|
-
"type": {
|
|
33
|
-
"text": "boolean"
|
|
34
|
-
},
|
|
35
|
-
"privacy": "public",
|
|
36
|
-
"default": "false",
|
|
37
|
-
"attribute": "disabled",
|
|
38
|
-
"reflects": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"kind": "field",
|
|
42
|
-
"name": "focused",
|
|
43
|
-
"type": {
|
|
44
|
-
"text": "boolean"
|
|
45
|
-
},
|
|
46
|
-
"privacy": "public",
|
|
47
|
-
"default": "false",
|
|
48
|
-
"attribute": "focused",
|
|
49
|
-
"reflects": true
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"kind": "field",
|
|
53
|
-
"name": "open",
|
|
54
|
-
"type": {
|
|
55
|
-
"text": "boolean"
|
|
56
|
-
},
|
|
57
|
-
"privacy": "public",
|
|
58
|
-
"default": "false",
|
|
59
|
-
"attribute": "open",
|
|
60
|
-
"reflects": true
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"kind": "field",
|
|
64
|
-
"name": "color",
|
|
65
|
-
"type": {
|
|
66
|
-
"text": "string"
|
|
67
|
-
},
|
|
68
|
-
"privacy": "public",
|
|
69
|
-
"default": "'rgba(255, 0, 0, 0.5)'",
|
|
70
|
-
"attribute": "color"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"kind": "method",
|
|
74
|
-
"name": "handlePointerdown",
|
|
75
|
-
"privacy": "private",
|
|
76
|
-
"return": {
|
|
77
|
-
"type": {
|
|
78
|
-
"text": "void"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"parameters": [
|
|
82
|
-
{
|
|
83
|
-
"name": "event",
|
|
84
|
-
"type": {
|
|
85
|
-
"text": "PointerEvent"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"kind": "method",
|
|
92
|
-
"name": "handlePointerup",
|
|
93
|
-
"privacy": "private",
|
|
94
|
-
"return": {
|
|
95
|
-
"type": {
|
|
96
|
-
"text": "void"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"parameters": [
|
|
100
|
-
{
|
|
101
|
-
"name": "event",
|
|
102
|
-
"type": {
|
|
103
|
-
"text": "PointerEvent"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"attributes": [
|
|
110
|
-
{
|
|
111
|
-
"name": "disabled",
|
|
112
|
-
"type": {
|
|
113
|
-
"text": "boolean"
|
|
114
|
-
},
|
|
115
|
-
"default": "false",
|
|
116
|
-
"fieldName": "disabled"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"name": "focused",
|
|
120
|
-
"type": {
|
|
121
|
-
"text": "boolean"
|
|
122
|
-
},
|
|
123
|
-
"default": "false",
|
|
124
|
-
"fieldName": "focused"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "open",
|
|
128
|
-
"type": {
|
|
129
|
-
"text": "boolean"
|
|
130
|
-
},
|
|
131
|
-
"default": "false",
|
|
132
|
-
"fieldName": "open"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"name": "color",
|
|
136
|
-
"type": {
|
|
137
|
-
"text": "string"
|
|
138
|
-
},
|
|
139
|
-
"default": "'rgba(255, 0, 0, 0.5)'",
|
|
140
|
-
"fieldName": "color"
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
"superclass": {
|
|
144
|
-
"name": "SpectrumElement",
|
|
145
|
-
"package": "@spectrum-web-components/base"
|
|
146
|
-
},
|
|
147
|
-
"tagName": "sp-color-handle",
|
|
148
|
-
"customElement": true
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
"exports": [
|
|
152
|
-
{
|
|
153
|
-
"kind": "js",
|
|
154
|
-
"name": "ColorHandle",
|
|
155
|
-
"declaration": {
|
|
156
|
-
"name": "ColorHandle",
|
|
157
|
-
"module": "src/ColorHandle.js"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}
|