@spectrum-web-components/divider 1.7.0-snapshot.20250609112703 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -17
- package/custom-elements.json +21 -0
- package/package.json +2 -2
- package/sp-divider.d.ts +11 -0
- package/sp-divider.dev.js.map +1 -1
- package/sp-divider.js.map +1 -1
- package/src/Divider.d.ts +18 -0
- package/src/Divider.dev.js +3 -0
- package/src/Divider.dev.js.map +2 -2
- package/src/Divider.js +1 -1
- package/src/Divider.js.map +2 -2
- package/src/divider-overrides.css.dev.js.map +1 -1
- package/src/divider-overrides.css.js.map +1 -1
- package/src/divider.css.dev.js.map +1 -1
- package/src/divider.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-divider.css.dev.js.map +1 -1
- package/src/spectrum-divider.css.js.map +1 -1
package/README.md
CHANGED
@@ -1,40 +1,45 @@
|
|
1
|
-
##
|
1
|
+
## Overview
|
2
2
|
|
3
3
|
`sp-divider` brings clarity to a layout by grouping and dividing content that exists in close proximity. It can also be used to establish rhythm and hierarchy.
|
4
4
|
|
5
|
+
[View the design documentation for this component.](https://spectrum.adobe.com/page/divider/)
|
6
|
+
|
5
7
|
### Usage
|
6
8
|
|
7
9
|
[](https://www.npmjs.com/package/@spectrum-web-components/divider)
|
8
10
|
[](https://bundlephobia.com/result?p=@spectrum-web-components/divider)
|
9
11
|
[](https://stackblitz.com/edit/vitejs-vite-rqfjtpgz)
|
10
12
|
|
11
|
-
```
|
13
|
+
```zsh
|
12
14
|
yarn add @spectrum-web-components/divider
|
13
15
|
```
|
14
16
|
|
15
17
|
Import the side effectful registration of `<sp-divider>` via:
|
16
18
|
|
17
|
-
```
|
19
|
+
```js
|
18
20
|
import '@spectrum-web-components/divider/sp-divider.js';
|
19
21
|
```
|
20
22
|
|
21
23
|
When looking to leverage the `Divider` base class as a type and/or for extension purposes, do so via:
|
22
24
|
|
23
|
-
```
|
25
|
+
```js
|
24
26
|
import { Divider } from '@spectrum-web-components/divider';
|
25
27
|
```
|
26
28
|
|
27
|
-
|
29
|
+
### Options
|
30
|
+
|
31
|
+
Horizontal dividers are used to separate content stacked vertically.
|
28
32
|
|
29
33
|
<sp-tabs selected="m" auto label="Horizontal Size Attribute Options">
|
30
34
|
<sp-tab value="s">Small</sp-tab>
|
31
35
|
<sp-tab-panel value="s">
|
32
36
|
|
33
|
-
```html
|
37
|
+
```html
|
34
38
|
<h2 class="spectrum-Heading spectrum-Heading--sizeXS">Small</h2>
|
35
39
|
<sp-divider size="s"></sp-divider>
|
36
40
|
<p class="spectrum-Body">
|
37
|
-
|
41
|
+
The small divider is used to divide similar components such as table rows,
|
42
|
+
action button groups, and components within a panel.
|
38
43
|
</p>
|
39
44
|
```
|
40
45
|
|
@@ -42,12 +47,12 @@ import { Divider } from '@spectrum-web-components/divider';
|
|
42
47
|
<sp-tab value="m">Medium</sp-tab>
|
43
48
|
<sp-tab-panel value="m">
|
44
49
|
|
45
|
-
```html
|
50
|
+
```html
|
46
51
|
<h2 class="spectrum-Heading spectrum-Heading--sizeS">Medium</h2>
|
47
52
|
<sp-divider size="m"></sp-divider>
|
48
53
|
<p class="spectrum-Body">
|
49
|
-
|
50
|
-
rails, etc.
|
54
|
+
The medium divider is used to divide subsections on a page, or to separate
|
55
|
+
different groups of components such as panels, rails, etc.
|
51
56
|
</p>
|
52
57
|
```
|
53
58
|
|
@@ -55,24 +60,28 @@ import { Divider } from '@spectrum-web-components/divider';
|
|
55
60
|
<sp-tab value="l">Large</sp-tab>
|
56
61
|
<sp-tab-panel value="l">
|
57
62
|
|
58
|
-
```html
|
63
|
+
```html
|
59
64
|
<h2 class="spectrum-Heading spectrum-Heading--sizeM">Large</h2>
|
60
65
|
<sp-divider size="l"></sp-divider>
|
61
|
-
<p class="spectrum-Body">
|
66
|
+
<p class="spectrum-Body">
|
67
|
+
The large divider should be used only for page titles or section titles.
|
68
|
+
</p>
|
62
69
|
```
|
63
70
|
|
64
71
|
</sp-tab-panel>
|
65
72
|
</sp-tabs>
|
66
73
|
|
67
|
-
|
74
|
+
#### Vertical
|
75
|
+
|
76
|
+
Vertical dividers are used to separate content horizontally.
|
68
77
|
|
69
|
-
When a vertical
|
78
|
+
When a vertical divider is used inside of a flex container, use `align-self: stretch; height: auto;` on the divider.
|
70
79
|
|
71
80
|
<sp-tabs selected="m" auto label="Vertical Size Attribute Options">
|
72
81
|
<sp-tab value="s">Small</sp-tab>
|
73
82
|
<sp-tab-panel value="s">
|
74
83
|
|
75
|
-
```html
|
84
|
+
```html
|
76
85
|
<div style="height: 32px; display: flex;">
|
77
86
|
<sp-action-button quiet label="Zoom in">
|
78
87
|
<sp-icon-magnify slot="icon"></sp-icon-magnify>
|
@@ -92,7 +101,7 @@ When a vertical Divider is used inside of a flex container, use `align-self: str
|
|
92
101
|
<sp-tab value="m">Medium</sp-tab>
|
93
102
|
<sp-tab-panel value="m">
|
94
103
|
|
95
|
-
```html
|
104
|
+
```html
|
96
105
|
<div style="height: 32px; display: flex;">
|
97
106
|
<sp-action-button quiet label="Zoom in">
|
98
107
|
<sp-icon-magnify slot="icon"></sp-icon-magnify>
|
@@ -112,7 +121,7 @@ When a vertical Divider is used inside of a flex container, use `align-self: str
|
|
112
121
|
<sp-tab value="l">Large</sp-tab>
|
113
122
|
<sp-tab-panel value="l">
|
114
123
|
|
115
|
-
```html
|
124
|
+
```html
|
116
125
|
<div style="height: 32px; display: flex;">
|
117
126
|
<sp-action-button quiet label="Zoom in">
|
118
127
|
<sp-icon-magnify slot="icon"></sp-icon-magnify>
|
@@ -130,3 +139,60 @@ When a vertical Divider is used inside of a flex container, use `align-self: str
|
|
130
139
|
|
131
140
|
</sp-tab-panel>
|
132
141
|
</sp-tabs>
|
142
|
+
|
143
|
+
#### Static color
|
144
|
+
|
145
|
+
Use the static color option when a divider needs to be placed on top of a color background or visual. Static color dividers are available in black or white regardless of color theme.
|
146
|
+
|
147
|
+
<sp-tabs selected="black" auto label="Static color options">
|
148
|
+
<sp-tab value="black">Static black</sp-tab>
|
149
|
+
<sp-tab-panel value="black">
|
150
|
+
|
151
|
+
```html
|
152
|
+
<div
|
153
|
+
style="background-color: var(--spectrum-docs-static-black-background-color); color: var(--spectrum-black); padding: 20px"
|
154
|
+
>
|
155
|
+
<h2 class="spectrum-Heading spectrum-Heading--sizeS">
|
156
|
+
Static black on light background
|
157
|
+
</h2>
|
158
|
+
<sp-divider static-color="black" size="m"></sp-divider>
|
159
|
+
<p class="spectrum-Body">
|
160
|
+
Use static black on light color or image backgrounds.
|
161
|
+
</p>
|
162
|
+
</div>
|
163
|
+
```
|
164
|
+
|
165
|
+
</sp-tab-panel>
|
166
|
+
<sp-tab value="white">Static white</sp-tab>
|
167
|
+
<sp-tab-panel value="white">
|
168
|
+
|
169
|
+
```html
|
170
|
+
<div
|
171
|
+
style="background-color: var(--spectrum-docs-static-white-background-color); color: var(--spectrum-white); padding: 20px;"
|
172
|
+
>
|
173
|
+
<h2 class="spectrum-Heading spectrum-Heading--sizeS">
|
174
|
+
Static white on dark background
|
175
|
+
</h2>
|
176
|
+
<sp-divider static-color="white" size="m"></sp-divider>
|
177
|
+
<p class="spectrum-Body">
|
178
|
+
Use static white on dark color or image backgrounds.
|
179
|
+
</p>
|
180
|
+
</div>
|
181
|
+
```
|
182
|
+
|
183
|
+
</sp-tab-panel>
|
184
|
+
</sp-tabs>
|
185
|
+
|
186
|
+
### Accessibility
|
187
|
+
|
188
|
+
The `<sp-divider>` element implements the following accessibility features:
|
189
|
+
|
190
|
+
- **ARIA role**: Automatically sets `role="separator"` to ensure proper semantic meaning for assistive technologies
|
191
|
+
- **Orientation support**: When `vertical` is true, automatically sets `aria-orientation="vertical"` to indicate the divider's orientation
|
192
|
+
|
193
|
+
#### Best practices
|
194
|
+
|
195
|
+
- Medium or large dividers can be used with header text to visually create a section or page title. Place the divider below the header for best results.
|
196
|
+
- Ensure sufficient color contrast when using `static-color` variants on colored backgrounds.
|
197
|
+
- Use dividers to create meaningful visual separation, not just decorative lines.
|
198
|
+
- Use dividers sparingly; excessive use can diminish their visual impact.
|
package/custom-elements.json
CHANGED
@@ -34,8 +34,20 @@
|
|
34
34
|
},
|
35
35
|
"privacy": "public",
|
36
36
|
"default": "false",
|
37
|
+
"description": "Whether the divider is vertical. If false, the divider is horizontal. The default is false.",
|
37
38
|
"attribute": "vertical",
|
38
39
|
"reflects": true
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"kind": "field",
|
43
|
+
"name": "staticColor",
|
44
|
+
"type": {
|
45
|
+
"text": "'white' | 'black' | undefined"
|
46
|
+
},
|
47
|
+
"privacy": "public",
|
48
|
+
"description": "The static color variant to use for the divider.",
|
49
|
+
"attribute": "static-color",
|
50
|
+
"reflects": true
|
39
51
|
}
|
40
52
|
],
|
41
53
|
"attributes": [
|
@@ -45,7 +57,16 @@
|
|
45
57
|
"text": "boolean"
|
46
58
|
},
|
47
59
|
"default": "false",
|
60
|
+
"description": "Whether the divider is vertical. If false, the divider is horizontal. The default is false.",
|
48
61
|
"fieldName": "vertical"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"name": "static-color",
|
65
|
+
"type": {
|
66
|
+
"text": "'white' | 'black' | undefined"
|
67
|
+
},
|
68
|
+
"description": "The static color variant to use for the divider.",
|
69
|
+
"fieldName": "staticColor"
|
49
70
|
}
|
50
71
|
],
|
51
72
|
"mixins": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/divider",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.8.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -64,7 +64,7 @@
|
|
64
64
|
"css"
|
65
65
|
],
|
66
66
|
"dependencies": {
|
67
|
-
"@spectrum-web-components/base": "1.
|
67
|
+
"@spectrum-web-components/base": "1.8.0"
|
68
68
|
},
|
69
69
|
"types": "./src/index.d.ts",
|
70
70
|
"customElements": "custom-elements.json",
|
package/sp-divider.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 { Divider } from './src/Divider.js';
|
2
13
|
declare global {
|
3
14
|
interface HTMLElementTagNameMap {
|
package/sp-divider.dev.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["sp-divider.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 { Divider } from './src/Divider.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-divider', Divider);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-divider': Divider;\n }\n}\n"],
|
5
5
|
"mappings": ";AAYA,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,cAAc,cAAc,OAAO;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/sp-divider.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["sp-divider.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 { Divider } from './src/Divider.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-divider', Divider);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-divider': Divider;\n }\n}\n"],
|
5
5
|
"mappings": "aAYA,OAAS,WAAAA,MAAe,mBACxB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,aAAcD,CAAO",
|
6
6
|
"names": ["Divider", "defineElement"]
|
7
7
|
}
|
package/src/Divider.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
|
declare const Divider_base: typeof SpectrumElement & {
|
3
14
|
new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
|
@@ -8,7 +19,14 @@ declare const Divider_base: typeof SpectrumElement & {
|
|
8
19
|
*/
|
9
20
|
export declare class Divider extends Divider_base {
|
10
21
|
static styles: CSSResultArray;
|
22
|
+
/**
|
23
|
+
* Whether the divider is vertical. If false, the divider is horizontal. The default is false.
|
24
|
+
*/
|
11
25
|
vertical: boolean;
|
26
|
+
/**
|
27
|
+
* The static color variant to use for the divider.
|
28
|
+
*/
|
29
|
+
staticColor?: 'white' | 'black';
|
12
30
|
protected render(): TemplateResult;
|
13
31
|
protected firstUpdated(changed: PropertyValues<this>): void;
|
14
32
|
protected updated(changed: PropertyValues<this>): void;
|
package/src/Divider.dev.js
CHANGED
@@ -46,4 +46,7 @@ Divider.styles = [styles];
|
|
46
46
|
__decorateClass([
|
47
47
|
property({ type: Boolean, reflect: true })
|
48
48
|
], Divider.prototype, "vertical", 2);
|
49
|
+
__decorateClass([
|
50
|
+
property({ reflect: true, attribute: "static-color" })
|
51
|
+
], Divider.prototype, "staticColor", 2);
|
49
52
|
//# sourceMappingURL=Divider.dev.js.map
|
package/src/Divider.dev.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["Divider.ts"],
|
4
|
-
"sourcesContent": ["
|
5
|
-
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO,YAAY;AAKZ,aAAM,gBAAgB,WAAW,iBAAiB;AAAA,EACrD,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,eAAe;AACnB,CAAC,EAAE;AAAA,EAHI;AAAA;
|
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 SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport styles from './divider.css.js';\n\n/**\n * @element sp-divider\n */\nexport class Divider extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n noDefaultSize: true,\n}) {\n public static override styles: CSSResultArray = [styles];\n\n /**\n * Whether the divider is vertical. If false, the divider is horizontal. The default is false.\n */\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n /**\n * The static color variant to use for the divider.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white' | 'black';\n\n protected override render(): TemplateResult {\n return html``;\n }\n\n protected override firstUpdated(changed: PropertyValues<this>): void {\n super.firstUpdated(changed);\n this.setAttribute('role', 'separator');\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (changed.has('vertical')) {\n if (this.vertical) {\n this.setAttribute('aria-orientation', 'vertical');\n } else {\n this.removeAttribute('aria-orientation');\n }\n }\n }\n}\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO,YAAY;AAKZ,aAAM,gBAAgB,WAAW,iBAAiB;AAAA,EACrD,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,eAAe;AACnB,CAAC,EAAE;AAAA,EAHI;AAAA;AAUH,SAAO,WAAW;AAAA;AAAA,EAQC,SAAyB;AACxC,WAAO;AAAA,EACX;AAAA,EAEmB,aAAa,SAAqC;AACjE,UAAM,aAAa,OAAO;AAC1B,SAAK,aAAa,QAAQ,WAAW;AAAA,EACzC;AAAA,EAEmB,QAAQ,SAAqC;AAC5D,UAAM,QAAQ,OAAO;AACrB,QAAI,QAAQ,IAAI,UAAU,GAAG;AACzB,UAAI,KAAK,UAAU;AACf,aAAK,aAAa,oBAAoB,UAAU;AAAA,MACpD,OAAO;AACH,aAAK,gBAAgB,kBAAkB;AAAA,MAC3C;AAAA,IACJ;AAAA,EACJ;AACJ;AArCa,QAIc,SAAyB,CAAC,MAAM;AAMhD;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GATjC,QAUF;AAMA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAf7C,QAgBF;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/Divider.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";var
|
1
|
+
"use strict";var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=(s,r,e,i)=>{for(var t=i>1?void 0:i?c(r,e):r,o=s.length-1,a;o>=0;o--)(a=s[o])&&(t=(i?a(r,e,t):a(t))||t);return i&&t&&u(r,e,t),t};import{html as d,SizedMixin as m,SpectrumElement as f}from"@spectrum-web-components/base";import{property as p}from"@spectrum-web-components/base/src/decorators.js";import n from"./divider.css.js";export class Divider extends m(f,{validSizes:["s","m","l"],noDefaultSize:!0}){constructor(){super(...arguments);this.vertical=!1}render(){return d``}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","separator")}updated(e){super.updated(e),e.has("vertical")&&(this.vertical?this.setAttribute("aria-orientation","vertical"):this.removeAttribute("aria-orientation"))}}Divider.styles=[n],l([p({type:Boolean,reflect:!0})],Divider.prototype,"vertical",2),l([p({reflect:!0,attribute:"static-color"})],Divider.prototype,"staticColor",2);
|
2
2
|
//# sourceMappingURL=Divider.js.map
|
package/src/Divider.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["Divider.ts"],
|
4
|
-
"sourcesContent": ["
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,OAAOC,MAAY,mBAKZ,aAAM,gBAAgBH,EAAWC,EAAiB,CACrD,WAAY,CAAC,IAAK,IAAK,GAAG,EAC1B,cAAe,EACnB,CAAC,CAAE,CAHI,
|
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 SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport styles from './divider.css.js';\n\n/**\n * @element sp-divider\n */\nexport class Divider extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n noDefaultSize: true,\n}) {\n public static override styles: CSSResultArray = [styles];\n\n /**\n * Whether the divider is vertical. If false, the divider is horizontal. The default is false.\n */\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n /**\n * The static color variant to use for the divider.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white' | 'black';\n\n protected override render(): TemplateResult {\n return html``;\n }\n\n protected override firstUpdated(changed: PropertyValues<this>): void {\n super.firstUpdated(changed);\n this.setAttribute('role', 'separator');\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (changed.has('vertical')) {\n if (this.vertical) {\n this.setAttribute('aria-orientation', 'vertical');\n } else {\n this.removeAttribute('aria-orientation');\n }\n }\n }\n}\n"],
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,OAAOC,MAAY,mBAKZ,aAAM,gBAAgBH,EAAWC,EAAiB,CACrD,WAAY,CAAC,IAAK,IAAK,GAAG,EAC1B,cAAe,EACnB,CAAC,CAAE,CAHI,kCAUH,KAAO,SAAW,GAQC,QAAyB,CACxC,OAAOF,GACX,CAEmB,aAAaK,EAAqC,CACjE,MAAM,aAAaA,CAAO,EAC1B,KAAK,aAAa,OAAQ,WAAW,CACzC,CAEmB,QAAQA,EAAqC,CAC5D,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,UAAU,IAClB,KAAK,SACL,KAAK,aAAa,mBAAoB,UAAU,EAEhD,KAAK,gBAAgB,kBAAkB,EAGnD,CACJ,CArCa,QAIc,OAAyB,CAACD,CAAM,EAMhDE,EAAA,CADNH,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GATjC,QAUF,wBAMAG,EAAA,CADNH,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAf7C,QAgBF",
|
6
6
|
"names": ["html", "SizedMixin", "SpectrumElement", "property", "styles", "changed", "__decorateClass"]
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["divider-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 :host{--spectrum-divider-background-color:var(--system-divider-background-color);--spectrum-divider-background-color-static-white:var(--system-divider-background-color-static-white);--spectrum-divider-background-color-static-black:var(--system-divider-background-color-static-black)}\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": ["divider-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 :host{--spectrum-divider-background-color:var(--system-divider-background-color);--spectrum-divider-background-color-static-white:var(--system-divider-background-color-static-white);--spectrum-divider-background-color-static-black:var(--system-divider-background-color-static-black)}\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
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["divider.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{--highcontrast-divider-background-color:CanvasText}}:host{--spectrum-divider-thickness:var(--spectrum-divider-thickness-medium)}:host([size=s]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-small)}:host([size=l]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-large);--spectrum-divider-background-color:var(--spectrum-gray-800)}:host([static-color=white]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-white,var(--spectrum-transparent-white-800))}:host([static-color=black]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-black,var(--spectrum-transparent-black-800))}:host{block-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));inline-size:100%;border:none;border-width:var(--mod-divider-thickness,var(--spectrum-divider-thickness));border-radius:var(--mod-divider-thickness,var(--spectrum-divider-thickness));background-color:var(--highcontrast-divider-background-color,var(--mod-divider-background-color,var(--spectrum-divider-background-color)));overflow:visible}:host([vertical]){inline-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));block-size:100%;block-size:var(--mod-divider-vertical-height,100%);margin-block:var(--mod-divider-vertical-margin);align-self:var(--mod-divider-vertical-align)}:host{--spectrum-divider-background-color:var(--system-divider-background-color);--spectrum-divider-background-color-static-white:var(--system-divider-background-color-static-white);--spectrum-divider-background-color-static-black:var(--system-divider-background-color-static-black)}:host{display:block}hr{border:none;margin:0}\n`;\nexport default styles;"],
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/divider.css.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["divider.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{--highcontrast-divider-background-color:CanvasText}}:host{--spectrum-divider-thickness:var(--spectrum-divider-thickness-medium)}:host([size=s]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-small)}:host([size=l]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-large);--spectrum-divider-background-color:var(--spectrum-gray-800)}:host([static-color=white]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-white,var(--spectrum-transparent-white-800))}:host([static-color=black]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-black,var(--spectrum-transparent-black-800))}:host{block-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));inline-size:100%;border:none;border-width:var(--mod-divider-thickness,var(--spectrum-divider-thickness));border-radius:var(--mod-divider-thickness,var(--spectrum-divider-thickness));background-color:var(--highcontrast-divider-background-color,var(--mod-divider-background-color,var(--spectrum-divider-background-color)));overflow:visible}:host([vertical]){inline-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));block-size:100%;block-size:var(--mod-divider-vertical-height,100%);margin-block:var(--mod-divider-vertical-margin);align-self:var(--mod-divider-vertical-align)}:host{--spectrum-divider-background-color:var(--system-divider-background-color);--spectrum-divider-background-color-static-white:var(--system-divider-background-color-static-white);--spectrum-divider-background-color-static-black:var(--system-divider-background-color-static-black)}:host{display:block}hr{border:none;margin:0}\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 './Divider.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 './Divider.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 './Divider.js';\n"],
|
5
5
|
"mappings": "aAYA,WAAc",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["spectrum-divider.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{--highcontrast-divider-background-color:CanvasText}}:host{--spectrum-divider-thickness:var(--spectrum-divider-thickness-medium)}:host([size=s]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-small)}:host([size=l]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-large);--spectrum-divider-background-color:var(--spectrum-gray-800)}:host([static-color=white]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-white,var(--spectrum-transparent-white-800))}:host([static-color=black]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-black,var(--spectrum-transparent-black-800))}:host{block-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));inline-size:100%;border:none;border-width:var(--mod-divider-thickness,var(--spectrum-divider-thickness));border-radius:var(--mod-divider-thickness,var(--spectrum-divider-thickness));background-color:var(--highcontrast-divider-background-color,var(--mod-divider-background-color,var(--spectrum-divider-background-color)));overflow:visible}:host([vertical]){inline-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));block-size:100%;block-size:var(--mod-divider-vertical-height,100%);margin-block:var(--mod-divider-vertical-margin);align-self:var(--mod-divider-vertical-align)}\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": ["spectrum-divider.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{--highcontrast-divider-background-color:CanvasText}}:host{--spectrum-divider-thickness:var(--spectrum-divider-thickness-medium)}:host([size=s]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-small)}:host([size=l]){--spectrum-divider-thickness:var(--spectrum-divider-thickness-large);--spectrum-divider-background-color:var(--spectrum-gray-800)}:host([static-color=white]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-white,var(--spectrum-divider-background-color-static-white))}:host([static-color=white][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-white,var(--spectrum-transparent-white-800))}:host([static-color=black]){--mod-divider-background-color:var(--mod-divider-background-color-medium-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=s]){--mod-divider-background-color:var(--mod-divider-background-color-small-static-black,var(--spectrum-divider-background-color-static-black))}:host([static-color=black][size=l]){--mod-divider-background-color:var(--mod-divider-background-color-large-static-black,var(--spectrum-transparent-black-800))}:host{block-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));inline-size:100%;border:none;border-width:var(--mod-divider-thickness,var(--spectrum-divider-thickness));border-radius:var(--mod-divider-thickness,var(--spectrum-divider-thickness));background-color:var(--highcontrast-divider-background-color,var(--mod-divider-background-color,var(--spectrum-divider-background-color)));overflow:visible}:host([vertical]){inline-size:var(--mod-divider-thickness,var(--spectrum-divider-thickness));block-size:100%;block-size:var(--mod-divider-vertical-height,100%);margin-block:var(--mod-divider-vertical-margin);align-self:var(--mod-divider-vertical-align)}\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
|
}
|