@dile/ui 3.12.2 → 3.12.3
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { html, css, LitElement } from "lit";
|
|
2
2
|
import { DileEmmitChange } from '../../../mixins/form/index.js';
|
|
3
3
|
import { switchLeftIcon } from '@dile/icons/index.js';
|
|
4
|
-
import '../../
|
|
4
|
+
import '../../button/button-icon.js'
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export class DileOrderSwitch extends DileEmmitChange(LitElement) {
|
|
@@ -29,16 +29,23 @@ export class DileOrderSwitch extends DileEmmitChange(LitElement) {
|
|
|
29
29
|
:host {
|
|
30
30
|
display: block;
|
|
31
31
|
margin-bottom: 10px;
|
|
32
|
+
--dile-button-border-radius: 2rem;
|
|
33
|
+
--dile-button-padding-x: 0.15rem;
|
|
34
|
+
--dile-button-padding-y: 0.15rem;
|
|
35
|
+
--dile-button-background-color: transparent;
|
|
36
|
+
--dile-button-icon-color: var(--dile-order-switch-icon-color, var(--dile-link-color, #3399ff));
|
|
37
|
+
--dile-button-icon-size: var(--dile-order-switch-icon-size, 1.5rem);
|
|
38
|
+
--dile-button-border-width: 0;
|
|
32
39
|
}
|
|
33
40
|
div {
|
|
34
41
|
align-items: center;
|
|
35
42
|
display: flex;
|
|
36
43
|
}
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
a {
|
|
45
|
+
color: inherit;
|
|
46
|
+
text-decoration: var(--dile-order-switch-text-decoration, none);
|
|
39
47
|
}
|
|
40
|
-
dile-icon {
|
|
41
|
-
cursor: pointer;
|
|
48
|
+
dile-button-icon {
|
|
42
49
|
transform: rotate(-90deg);
|
|
43
50
|
margin-right: 0.4rem;
|
|
44
51
|
transition: transform 0.3s ease-in-out;
|
|
@@ -46,20 +53,24 @@ export class DileOrderSwitch extends DileEmmitChange(LitElement) {
|
|
|
46
53
|
.desc {
|
|
47
54
|
transform: rotate(90deg);
|
|
48
55
|
}
|
|
56
|
+
|
|
57
|
+
.text-selected {
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
}
|
|
49
60
|
`;
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
render() {
|
|
53
64
|
return html`
|
|
54
65
|
<div>
|
|
55
|
-
<dile-icon
|
|
66
|
+
<dile-button-icon
|
|
56
67
|
.icon="${switchLeftIcon}"
|
|
57
68
|
class="${this.value}"
|
|
58
|
-
|
|
59
|
-
></dile-icon>
|
|
60
|
-
<
|
|
69
|
+
@click=${this.toggle}
|
|
70
|
+
></dile-button-icon>
|
|
71
|
+
<a class="${this.selected ? 'text-selected' : ''}" href="#" @click=${this.onlyChange}>
|
|
61
72
|
${this.label}
|
|
62
|
-
</
|
|
73
|
+
</a>
|
|
63
74
|
</div>
|
|
64
75
|
`;
|
|
65
76
|
}
|
|
@@ -74,7 +85,8 @@ export class DileOrderSwitch extends DileEmmitChange(LitElement) {
|
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
|
|
77
|
-
onlyChange() {
|
|
88
|
+
onlyChange(e) {
|
|
89
|
+
e.preventDefault();
|
|
78
90
|
if (this.selected) {
|
|
79
91
|
this.toggle();
|
|
80
92
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.3",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6ae2b6723c619ec22ce949bcb1bd730a596ef45f"
|
|
32
32
|
}
|