@dile/ui 2.1.3 → 2.1.5
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/components/button/src/DileButton.js +4 -4
- package/components/chip/chip.js +2 -0
- package/components/chip/index.js +1 -0
- package/components/chip/src/DileChip.js +71 -0
- package/components/select/index.js +2 -1
- package/components/select/src/DileSelect.js +2 -2
- package/package.json +3 -3
- package/styles/colors.css +33 -0
|
@@ -26,20 +26,20 @@ export class DileButton extends LitElement {
|
|
|
26
26
|
padding-left: var(--dile-button-padding-x, 0.8rem);
|
|
27
27
|
border-radius: var(--dile-button-border-radius, 2rem);
|
|
28
28
|
border-width: var(--dile-button-border-width, 3px);
|
|
29
|
-
border-color: var(--dile-
|
|
30
|
-
background-color: var(--dile-
|
|
29
|
+
border-color: var(--dile-primary-dark-color, #07193b);
|
|
30
|
+
background-color: var(--dile-primary-color, #7BB93D);
|
|
31
31
|
transition-property: background-color, color;
|
|
32
32
|
transition-duration: 0.3s;
|
|
33
33
|
transition-timing-function: ease-in-out;
|
|
34
34
|
border-style: solid;
|
|
35
|
-
color: var(--dile-
|
|
35
|
+
color: var(--dile-on-primary-color, #fff);
|
|
36
36
|
font-size: var(--dile-button-font-size, 1rem);
|
|
37
37
|
font-weight: var(--dile-button-font-weight, bold);
|
|
38
38
|
text-transform: var(--dile-button-text-transform, none);
|
|
39
39
|
letter-spacing: var(--dile-button-letter-spacing, 0);
|
|
40
40
|
}
|
|
41
41
|
button:hover {
|
|
42
|
-
background-color: var(--dile-
|
|
42
|
+
background-color: var(--dile-primary-light-color, #f3f3ae);
|
|
43
43
|
color: var(--dile-button-hover-text-color, #303030);
|
|
44
44
|
border-color: var(--dile-button-hover-border-color, #666666);
|
|
45
45
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DileChip } from "./src/DileChip";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
import { clearIcon } from '@dile/icons';
|
|
3
|
+
import '@dile/ui/components/icon/icon.js';
|
|
4
|
+
|
|
5
|
+
export class DileChip extends LitElement {
|
|
6
|
+
|
|
7
|
+
static get styles() {
|
|
8
|
+
return css`
|
|
9
|
+
:host {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
div {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
background-color: var(--dile-chip-background-color, #e5e5e5);
|
|
16
|
+
padding-right: var(--dile-chip-padding-x, 0.5rem);
|
|
17
|
+
padding-left: var(--dile-chip-padding-x, 0.5rem);
|
|
18
|
+
padding-top: var(--dile-chip-padding-y, 0.3rem);
|
|
19
|
+
padding-bottom: var(--dile-chip-padding-y, 0.3rem);
|
|
20
|
+
border-radius: var(--dile-chip-border-radius, 0);
|
|
21
|
+
}
|
|
22
|
+
span {
|
|
23
|
+
font-size: var(--dile-chip-font-size, 1rem);
|
|
24
|
+
font-weight: var(--dile-chip-font-weight, bold);
|
|
25
|
+
color: var(--dile-chip-text-color, #303030);
|
|
26
|
+
display: inline-block;
|
|
27
|
+
margin-right: 20px;
|
|
28
|
+
transition: color 0.3s ease;
|
|
29
|
+
}
|
|
30
|
+
dile-icon {
|
|
31
|
+
--dile-icon-color: var(--dile-chip-icon-color, #303030);
|
|
32
|
+
--dile-icon-size: var(--dile-chip-icon-size, 16px);
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
dile-icon:hover {
|
|
36
|
+
--dile-icon-color: var(--dile-chip-icon-hover-color, #d06060);
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static get properties() {
|
|
42
|
+
return {
|
|
43
|
+
name: { type: String },
|
|
44
|
+
icon: { type: Object },
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
constructor() {
|
|
49
|
+
super();
|
|
50
|
+
this.icon = clearIcon;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
render() {
|
|
54
|
+
return html`
|
|
55
|
+
<div>
|
|
56
|
+
<span><slot></slot></span>
|
|
57
|
+
<dile-icon .icon="${this.icon}" @click="${this.doClick}"></dile-icon>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
doClick() {
|
|
63
|
+
this.dispatchEvent(new CustomEvent('dile-chip-icon-click', {
|
|
64
|
+
bubbles: true,
|
|
65
|
+
composed: true,
|
|
66
|
+
detail: {
|
|
67
|
+
name: this.name,
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { DileSelect } from './src/DileSelect.js';
|
|
1
|
+
export { DileSelect } from './src/DileSelect.js';
|
|
2
|
+
export { DileSelectAjax } from './src/DileSelectAjax.js';
|
|
@@ -97,13 +97,14 @@ export class DileSelect extends DileEmmitChange(LitElement) {
|
|
|
97
97
|
this.quiet = false;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
|
|
101
|
+
|
|
100
102
|
connectedCallback() {
|
|
101
103
|
super.connectedCallback();
|
|
102
104
|
if (!this.elselect) {
|
|
103
105
|
throw new Error('Use dile-select with a select element in the slot "select"');
|
|
104
106
|
} else {
|
|
105
107
|
this.elselect.addEventListener("change", this.changeHandler);
|
|
106
|
-
this.value = this.elselect.value;
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -141,7 +142,6 @@ export class DileSelect extends DileEmmitChange(LitElement) {
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
firstUpdated() {
|
|
144
|
-
super.firstUpdated();
|
|
145
145
|
this.quiet = this.quietOnStart;
|
|
146
146
|
if(this.value) {
|
|
147
147
|
this.elselect.value = this.value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://dile-components.polydile.com/",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dile/icons": "^2.0.
|
|
23
|
+
"@dile/icons": "^2.0.7",
|
|
24
24
|
"lit": "^2.7.0 || ^3.0.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "b7dce885ab28890d29fed46c918ffc2aa02c97b6"
|
|
30
30
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Main colors */
|
|
3
|
+
--dile-background-color: #ffffff;
|
|
4
|
+
--dile-on-background-color: #303030;
|
|
5
|
+
--dile-primary-color: #f3f3ae;
|
|
6
|
+
--dile-on-primary-color: #303030;
|
|
7
|
+
--dile-secondary-color: #27a744;
|
|
8
|
+
--dile-on-secondary-color: #ffffff;
|
|
9
|
+
--dile-terciary-color: #2789a7;
|
|
10
|
+
--dile-on-terciary-color: #ffffff;
|
|
11
|
+
--dile-neutral-color: #f4f4f4;
|
|
12
|
+
--dile-on-neutral-color: #303030;
|
|
13
|
+
--dile-alert-error-color: #cf3535;
|
|
14
|
+
--dile-alert-success-color: #00900f;
|
|
15
|
+
--dile-alert-neutral-color: #2889a7;
|
|
16
|
+
--dile-on-alert-color: #ffffff;
|
|
17
|
+
|
|
18
|
+
/* Color variations */
|
|
19
|
+
--dile-primary-light-color: #fbfbe9;
|
|
20
|
+
--dile-on-primary-light-color: #303030;
|
|
21
|
+
--dile-primary-dark-color: #d7d353;
|
|
22
|
+
--dile-on-primary-dark-color: #303030;
|
|
23
|
+
--dile-secondary-light-color: #beed8e;
|
|
24
|
+
--dile-on-secondary-light-color: #303030;
|
|
25
|
+
--dile-secondary-dark-color: #43842e;
|
|
26
|
+
--dile-on-secondary-dark-color: #ffffff;
|
|
27
|
+
--dile-terciary-light-color: #85d4f0;
|
|
28
|
+
--dile-on-terciary-light-color: #303030;
|
|
29
|
+
--dile-terciary-dark-color: #125462;
|
|
30
|
+
--dile-on-terciary-dark-color: #ffffff;
|
|
31
|
+
--dile-gray-dark-color: #555555;
|
|
32
|
+
--dile-on-gray-dark-color: #ffffff;
|
|
33
|
+
}
|