@aurodesignsystem-dev/auro-background 0.0.0-pr60.0 → 0.0.0-pr60.1
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/dist/index.d.ts +7 -68
- package/package.json +4 -59
package/dist/index.d.ts
CHANGED
|
@@ -1,71 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { css, LitElement, html } from 'lit';
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
bgSm: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
};
|
|
13
|
-
bgMd: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
};
|
|
16
|
-
bgLg: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
};
|
|
19
|
-
height: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
};
|
|
22
|
-
heightSm: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
};
|
|
25
|
-
heightMd: {
|
|
26
|
-
type: StringConstructor;
|
|
27
|
-
};
|
|
28
|
-
heightLg: {
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
};
|
|
31
|
-
width: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
};
|
|
34
|
-
widthSm: {
|
|
35
|
-
type: StringConstructor;
|
|
36
|
-
};
|
|
37
|
-
widthMd: {
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
};
|
|
40
|
-
widthLg: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
};
|
|
43
|
-
inset: {
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
};
|
|
46
|
-
insetSm: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
};
|
|
49
|
-
insetMd: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
};
|
|
52
|
-
insetLg: {
|
|
53
|
-
type: StringConstructor;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
static get styles(): lit.CSSResult[];
|
|
57
|
-
static register(t?: string): void;
|
|
58
|
-
runtimeUtils: n;
|
|
59
|
-
firstUpdated(): void;
|
|
60
|
-
getInsetValues(t: any): any;
|
|
61
|
-
render(): lit_html.TemplateResult<1>;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
declare class n {
|
|
65
|
-
registerComponent(t: any, e: any): void;
|
|
66
|
-
closestElement(t: any, e?: this, i?: (e: any, r?: any) => any): any;
|
|
67
|
-
handleComponentTagRename(t: any, e: any): void;
|
|
68
|
-
elementMatch(t: any, e: any): any;
|
|
69
|
-
}
|
|
4
|
+
class n{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,i=(e,r=e&&e.closest(t))=>e&&e!==document&&e!==window?r||i(e.getRootNode().host):null){return i(e)}handleComponentTagRename(t,e){const i=e.toLowerCase();t.tagName.toLowerCase()!==i&&t.setAttribute(i,true);}elementMatch(t,e){const i=e.toLowerCase();return t.tagName.toLowerCase()===i||t.hasAttribute(i)}}var s=css`:focus:not(:focus-visible){outline:3px solid transparent}.background{width:auto;width:var(--width);height:inherit;height:var(--height);padding:var(--inset);background:var(--background)}@media screen and (min-width: 576px){.background{width:var(--widthSm);height:var(--heightSm);padding:var(--insetSm);background:var(--backgroundSm)}}@media screen and (min-width: 768px){.background{width:var(--widthMd);height:var(--heightMd);padding:var(--insetMd);background:var(--backgroundMd)}}@media screen and (min-width: 1024px){.background{width:var(--widthLg);height:var(--heightLg);padding:var(--insetMd);background:var(--backgroundLg)}}
|
|
5
|
+
`,a=css`:host{--ds-auro-background-container-color: transparent}
|
|
6
|
+
`;class g extends LitElement{constructor(){super(),this.runtimeUtils=new n;}static get properties(){return {bg:{type:String},bgSm:{type:String},bgMd:{type:String},bgLg:{type:String},height:{type:String},heightSm:{type:String},heightMd:{type:String},heightLg:{type:String},width:{type:String},widthSm:{type:String},widthMd:{type:String},widthLg:{type:String},inset:{type:String},insetSm:{type:String},insetMd:{type:String},insetLg:{type:String}}}static get styles(){return [s,a]}static register(t="auro-background"){n.prototype.registerComponent(t,g);}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-background");}getInsetValues(t){const e={none:"0",xxxs:"25",xxs:"50",xs:"100",sm:"150",md:"200",lg:"300",xl:"400",xxl:"600",xxxl:"800"};return e[t]?`var(--ds-size-${e[t]})`:t}render(){const t={"--background":this.bg||"var(--ds-auro-background-container-color)","--backgroundSm":this.bgSm||"var(--background)","--backgroundMd":this.bgMd||"var(--backgroundSm)","--backgroundLg":this.bgLg||"var(--backgroundMd)","--width":this.width||"auto","--widthSm":this.widthSm||"var(--width)","--widthMd":this.widthMd||"var(--widthSm)","--widthLg":this.widthLg||"var(--widthMd)","--height":this.height||"auto","--heightSm":this.heightSm||"var(--height)","--heightMd":this.heightMd||"var(--heightSm)","--heightLg":this.heightLg||"var(--heightMd)","--inset":this.getInsetValues(this.inset)||"0","--insetSm":this.getInsetValues(this.insetSm)||"var(--inset)","--insetMd":this.getInsetValues(this.insetMd)||"var(--insetSm)","--insetLg":this.getInsetValues(this.insetLg)||"var(--insetMd)"};return html`
|
|
7
|
+
<div class="background" style=${styleMap(t)}><slot></slot></div>
|
|
8
|
+
`}}
|
|
70
9
|
|
|
71
10
|
export { g as AuroBackground };
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-background",
|
|
10
|
-
"version": "0.0.0-pr60.
|
|
10
|
+
"version": "0.0.0-pr60.1",
|
|
11
11
|
"description": "auro-background HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -24,59 +24,12 @@
|
|
|
24
24
|
"lit": "^3.3.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@aurodesignsystem/auro-cli": "^3.0.
|
|
28
|
-
"@aurodesignsystem/auro-config": "^1.
|
|
27
|
+
"@aurodesignsystem/auro-cli": "^3.0.2",
|
|
28
|
+
"@aurodesignsystem/auro-config": "^1.3.0",
|
|
29
29
|
"@aurodesignsystem/auro-library": "^5.5.3",
|
|
30
30
|
"@aurodesignsystem/design-tokens": "^8.4.3",
|
|
31
|
-
"@aurodesignsystem/eslint-config": "^1.3.5",
|
|
32
31
|
"@aurodesignsystem/webcorestylesheets": "^10.0.4",
|
|
33
|
-
"
|
|
34
|
-
"@commitlint/cli": "^19.8.0",
|
|
35
|
-
"@commitlint/config-conventional": "^19.8.0",
|
|
36
|
-
"@open-wc/testing": "^4.0.0",
|
|
37
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
38
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
39
|
-
"@semantic-release/git": "^10.0.1",
|
|
40
|
-
"@semantic-release/npm": "^12.0.1",
|
|
41
|
-
"@web/dev-server": "^0.4.6",
|
|
42
|
-
"@web/test-runner": "^0.20.1",
|
|
43
|
-
"autoprefixer": "^10.4.21",
|
|
44
|
-
"compression": "^1.8.0",
|
|
45
|
-
"concat": "^1.0.3",
|
|
46
|
-
"concurrently": "^9.1.2",
|
|
47
|
-
"copyfiles": "^2.4.1",
|
|
48
|
-
"core-js": "^3.41.0",
|
|
49
|
-
"eslint": "^9.24.0",
|
|
50
|
-
"eslint-plugin-jsdoc": "^50.6.9",
|
|
51
|
-
"husky": "^9.1.7",
|
|
52
|
-
"lint-staged": "^16.2.0",
|
|
53
|
-
"lodash": "^4.17.21",
|
|
54
|
-
"markdown-magic": "^3.4.2",
|
|
55
|
-
"nodemon": "^3.1.9",
|
|
56
|
-
"npm-run-all": "^4.1.5",
|
|
57
|
-
"postcss": "^8.5.3",
|
|
58
|
-
"postcss-discard-comments": "^7.0.3",
|
|
59
|
-
"postcss-selector-replace": "^1.0.2",
|
|
60
|
-
"rollup": "^4.40.0",
|
|
61
|
-
"rollup-plugin-serve": "^3.0.0",
|
|
62
|
-
"sass": "^1.86.3",
|
|
63
|
-
"semantic-release": "^24.2.3",
|
|
64
|
-
"stylelint": "^16.18.0",
|
|
65
|
-
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
66
|
-
"stylelint-config-standard": "^38.0.0",
|
|
67
|
-
"stylelint-config-standard-scss": "^14.0.0",
|
|
68
|
-
"stylelint-order": "^6.0.4",
|
|
69
|
-
"stylelint-scss": "^6.11.1",
|
|
70
|
-
"typescript": "^5.8.3",
|
|
71
|
-
"wc-sass-render": "^1.4.0",
|
|
72
|
-
"web-component-analyzer": "^2.0.0",
|
|
73
|
-
"whatwg-fetch": "^3.6.20",
|
|
74
|
-
"yaml-lint": "^1.7.0"
|
|
75
|
-
},
|
|
76
|
-
"overrides": {
|
|
77
|
-
"wc-sass-render": {
|
|
78
|
-
"sass": "$sass"
|
|
79
|
-
}
|
|
32
|
+
"husky": "^9.1.7"
|
|
80
33
|
},
|
|
81
34
|
"browserslist": [
|
|
82
35
|
"last 2 Chrome versions",
|
|
@@ -104,14 +57,6 @@
|
|
|
104
57
|
"test:watch": "auro test --watch",
|
|
105
58
|
"prepare": "husky"
|
|
106
59
|
},
|
|
107
|
-
"lint-staged": {
|
|
108
|
-
"*": [
|
|
109
|
-
"biome check --fix --no-errors-on-unmatched"
|
|
110
|
-
],
|
|
111
|
-
"*.{scss,css}": [
|
|
112
|
-
"stylelint --fix"
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
60
|
"exports": {
|
|
116
61
|
"./package.json": "./package.json",
|
|
117
62
|
"./readme.md": "./README.md",
|