@spectrum-web-components/divider 1.9.0-nightly.20251013134115 → 1.9.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/custom-elements.json +98 -0
- package/package.json +29 -30
- package/src/Divider.d.ts +17 -3
- package/src/Divider.dev.js +42 -3
- package/src/Divider.dev.js.map +2 -2
- package/src/Divider.js +1 -1
- package/src/Divider.js.map +3 -3
@@ -0,0 +1,98 @@
|
|
1
|
+
{
|
2
|
+
"schemaVersion": "1.0.0",
|
3
|
+
"readme": "",
|
4
|
+
"modules": [
|
5
|
+
{
|
6
|
+
"kind": "javascript-module",
|
7
|
+
"path": "sp-divider.js",
|
8
|
+
"declarations": [],
|
9
|
+
"exports": [
|
10
|
+
{
|
11
|
+
"kind": "custom-element-definition",
|
12
|
+
"name": "sp-divider",
|
13
|
+
"declaration": {
|
14
|
+
"name": "Divider",
|
15
|
+
"module": "/src/Divider.js"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
]
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"kind": "javascript-module",
|
22
|
+
"path": "src/Divider.js",
|
23
|
+
"declarations": [
|
24
|
+
{
|
25
|
+
"kind": "class",
|
26
|
+
"description": "",
|
27
|
+
"name": "Divider",
|
28
|
+
"members": [
|
29
|
+
{
|
30
|
+
"kind": "field",
|
31
|
+
"name": "vertical",
|
32
|
+
"type": {
|
33
|
+
"text": "boolean"
|
34
|
+
},
|
35
|
+
"privacy": "public",
|
36
|
+
"default": "false",
|
37
|
+
"description": "Whether the divider is vertical. If false, the divider is horizontal. The default is false.",
|
38
|
+
"attribute": "vertical",
|
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
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"attributes": [
|
54
|
+
{
|
55
|
+
"name": "vertical",
|
56
|
+
"type": {
|
57
|
+
"text": "boolean"
|
58
|
+
},
|
59
|
+
"default": "false",
|
60
|
+
"description": "Whether the divider is vertical. If false, the divider is horizontal. The default is false.",
|
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"
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"mixins": [
|
73
|
+
{
|
74
|
+
"name": "SizedMixin",
|
75
|
+
"package": "@spectrum-web-components/base"
|
76
|
+
}
|
77
|
+
],
|
78
|
+
"superclass": {
|
79
|
+
"name": "SpectrumElement",
|
80
|
+
"package": "@spectrum-web-components/base"
|
81
|
+
},
|
82
|
+
"tagName": "sp-divider",
|
83
|
+
"customElement": true
|
84
|
+
}
|
85
|
+
],
|
86
|
+
"exports": [
|
87
|
+
{
|
88
|
+
"kind": "js",
|
89
|
+
"name": "Divider",
|
90
|
+
"declaration": {
|
91
|
+
"name": "Divider",
|
92
|
+
"module": "src/Divider.js"
|
93
|
+
}
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}
|
97
|
+
]
|
98
|
+
}
|
package/package.json
CHANGED
@@ -1,45 +1,48 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/divider",
|
3
|
-
"version": "1.9.0
|
3
|
+
"version": "1.9.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
7
7
|
"description": "",
|
8
8
|
"license": "Apache-2.0",
|
9
|
-
"author": "Adobe",
|
10
|
-
"homepage": "https://opensource.adobe.com/spectrum-web-components/components/divider",
|
11
9
|
"repository": {
|
12
10
|
"type": "git",
|
13
11
|
"url": "https://github.com/adobe/spectrum-web-components.git",
|
14
|
-
"directory": "
|
12
|
+
"directory": "packages/divider"
|
15
13
|
},
|
14
|
+
"author": "Adobe",
|
15
|
+
"homepage": "https://opensource.adobe.com/spectrum-web-components/components/divider",
|
16
16
|
"bugs": {
|
17
17
|
"url": "https://github.com/adobe/spectrum-web-components/issues"
|
18
18
|
},
|
19
|
+
"main": "./src/index.js",
|
20
|
+
"module": "./src/index.js",
|
19
21
|
"type": "module",
|
20
22
|
"exports": {
|
21
23
|
".": {
|
22
|
-
"
|
23
|
-
"
|
24
|
+
"development": "./src/index.dev.js",
|
25
|
+
"default": "./src/index.js"
|
24
26
|
},
|
25
27
|
"./package.json": "./package.json",
|
26
|
-
"./sp-divider.js": {
|
27
|
-
"default": "./sp-divider.js",
|
28
|
-
"development": "./sp-divider.dev.js"
|
29
|
-
},
|
30
28
|
"./src/Divider.js": {
|
31
|
-
"
|
32
|
-
"
|
29
|
+
"development": "./src/Divider.dev.js",
|
30
|
+
"default": "./src/Divider.js"
|
33
31
|
},
|
34
32
|
"./src/divider-overrides.css.js": "./src/divider-overrides.css.js",
|
35
33
|
"./src/divider.css.js": "./src/divider.css.js",
|
36
34
|
"./src/index.js": {
|
37
|
-
"
|
38
|
-
"
|
35
|
+
"development": "./src/index.dev.js",
|
36
|
+
"default": "./src/index.js"
|
37
|
+
},
|
38
|
+
"./sp-divider.js": {
|
39
|
+
"development": "./sp-divider.dev.js",
|
40
|
+
"default": "./sp-divider.js"
|
39
41
|
}
|
40
42
|
},
|
41
|
-
"
|
42
|
-
|
43
|
+
"scripts": {
|
44
|
+
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
45
|
+
},
|
43
46
|
"files": [
|
44
47
|
"**/*.d.ts",
|
45
48
|
"**/*.js",
|
@@ -48,19 +51,6 @@
|
|
48
51
|
"!stories/",
|
49
52
|
"!test/"
|
50
53
|
],
|
51
|
-
"scripts": {
|
52
|
-
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
53
|
-
},
|
54
|
-
"sideEffects": [
|
55
|
-
"./sp-*.js",
|
56
|
-
"./**/*.dev.js",
|
57
|
-
"./stories/typography-decorator.js"
|
58
|
-
],
|
59
|
-
"types": "./src/index.d.ts",
|
60
|
-
"dependencies": {
|
61
|
-
"@spectrum-web-components/base": "1.9.0-nightly.20251013134115",
|
62
|
-
"@spectrum-web-components/core-next": "workspace:*"
|
63
|
-
},
|
64
54
|
"keywords": [
|
65
55
|
"design-system",
|
66
56
|
"spectrum",
|
@@ -73,5 +63,14 @@
|
|
73
63
|
"component",
|
74
64
|
"css"
|
75
65
|
],
|
76
|
-
"
|
66
|
+
"dependencies": {
|
67
|
+
"@spectrum-web-components/base": "1.9.0"
|
68
|
+
},
|
69
|
+
"types": "./src/index.d.ts",
|
70
|
+
"customElements": "custom-elements.json",
|
71
|
+
"sideEffects": [
|
72
|
+
"./sp-*.js",
|
73
|
+
"./**/*.dev.js",
|
74
|
+
"./stories/typography-decorator.js"
|
75
|
+
]
|
77
76
|
}
|
package/src/Divider.d.ts
CHANGED
@@ -9,12 +9,26 @@
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
10
10
|
* governing permissions and limitations under the License.
|
11
11
|
*/
|
12
|
-
import { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';
|
13
|
-
|
12
|
+
import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
13
|
+
declare const Divider_base: typeof SpectrumElement & {
|
14
|
+
new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
|
15
|
+
prototype: import("@spectrum-web-components/base").SizedElementInterface;
|
16
|
+
};
|
14
17
|
/**
|
15
18
|
* @element sp-divider
|
16
19
|
*/
|
17
|
-
export declare class Divider extends
|
20
|
+
export declare class Divider extends Divider_base {
|
18
21
|
static styles: CSSResultArray;
|
22
|
+
/**
|
23
|
+
* Whether the divider is vertical. If false, the divider is horizontal. The default is false.
|
24
|
+
*/
|
25
|
+
vertical: boolean;
|
26
|
+
/**
|
27
|
+
* The static color variant to use for the divider.
|
28
|
+
*/
|
29
|
+
staticColor?: 'white' | 'black';
|
19
30
|
protected render(): TemplateResult;
|
31
|
+
protected firstUpdated(changed: PropertyValues<this>): void;
|
32
|
+
protected updated(changed: PropertyValues<this>): void;
|
20
33
|
}
|
34
|
+
export {};
|
package/src/Divider.dev.js
CHANGED
@@ -1,13 +1,52 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
5
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
6
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
7
|
+
if (decorator = decorators[i])
|
8
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
10
|
+
return result;
|
11
|
+
};
|
2
12
|
import {
|
3
|
-
html
|
13
|
+
html,
|
14
|
+
SizedMixin,
|
15
|
+
SpectrumElement
|
4
16
|
} from "@spectrum-web-components/base";
|
5
|
-
import {
|
17
|
+
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
6
18
|
import styles from "./divider.css.js";
|
7
|
-
export class Divider extends
|
19
|
+
export class Divider extends SizedMixin(SpectrumElement, {
|
20
|
+
validSizes: ["s", "m", "l"],
|
21
|
+
noDefaultSize: true
|
22
|
+
}) {
|
23
|
+
constructor() {
|
24
|
+
super(...arguments);
|
25
|
+
this.vertical = false;
|
26
|
+
}
|
8
27
|
render() {
|
9
28
|
return html``;
|
10
29
|
}
|
30
|
+
firstUpdated(changed) {
|
31
|
+
super.firstUpdated(changed);
|
32
|
+
this.setAttribute("role", "separator");
|
33
|
+
}
|
34
|
+
updated(changed) {
|
35
|
+
super.updated(changed);
|
36
|
+
if (changed.has("vertical")) {
|
37
|
+
if (this.vertical) {
|
38
|
+
this.setAttribute("aria-orientation", "vertical");
|
39
|
+
} else {
|
40
|
+
this.removeAttribute("aria-orientation");
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
11
44
|
}
|
12
45
|
Divider.styles = [styles];
|
46
|
+
__decorateClass([
|
47
|
+
property({ type: Boolean, reflect: true })
|
48
|
+
], Divider.prototype, "vertical", 2);
|
49
|
+
__decorateClass([
|
50
|
+
property({ reflect: true, attribute: "static-color" })
|
51
|
+
], Divider.prototype, "staticColor", 2);
|
13
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": ["/**\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 TemplateResult,\n} from '@spectrum-web-components/base';\
|
5
|
-
"mappings": "
|
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";import{html as
|
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": ["/**\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 TemplateResult,\n} from '@spectrum-web-components/base';\
|
5
|
-
"mappings": "
|
6
|
-
"names": ["html", "
|
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
|
+
"names": ["html", "SizedMixin", "SpectrumElement", "property", "styles", "changed", "__decorateClass"]
|
7
7
|
}
|