@reliability-design/web 1.1.1 → 1.2.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/dist/components/rel-accordion/rel-accordion.ts +17 -32
- package/dist/components/rel-alert/rel-alert.ts +34 -34
- package/dist/components/rel-avatar/rel-avatar.ts +5 -3
- package/dist/components/rel-badge/rel-badge.ts +2 -1
- package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +6 -6
- package/dist/components/rel-button/rel-button.ts +67 -21
- package/dist/components/rel-calendar/rel-calendar.ts +15 -8
- package/dist/components/rel-card/rel-card.ts +9 -17
- package/dist/components/rel-cardmedia/rel-cardmedia.ts +20 -23
- package/dist/components/rel-carousel/rel-carousel.ts +596 -468
- package/dist/components/rel-checkbox/rel-checkbox.ts +68 -16
- package/dist/components/rel-chip/rel-chip.ts +291 -244
- package/dist/components/rel-container/rel-container.ts +2 -2
- package/dist/components/rel-date-picker/rel-date-picker.ts +23 -19
- package/dist/components/rel-divider/rel-divider.ts +3 -3
- package/dist/components/rel-drawer/rel-drawer-footer.ts +0 -2
- package/dist/components/rel-drawer/rel-drawer.ts +41 -88
- package/dist/components/rel-kbd/rel-kbd.ts +94 -118
- package/dist/components/rel-layout/rel-layout.ts +49 -58
- package/dist/components/rel-menu/rel-menu.ts +359 -359
- package/dist/components/rel-menubar/rel-menubar-menu.css +3 -0
- package/dist/components/rel-menubar/rel-menubar-menu.ts +2 -1
- package/dist/components/rel-menubar/rel-menubar.ts +602 -605
- package/dist/components/rel-otp/rel-otp.ts +22 -25
- package/dist/components/rel-pagination/rel-pagination.ts +101 -57
- package/dist/components/rel-popover/rel-popover-content.ts +6 -5
- package/dist/components/rel-popover/rel-popover.ts +26 -7
- package/dist/components/rel-progress/rel-progress.ts +10 -9
- package/dist/components/rel-radio/rel-radio.ts +228 -172
- package/dist/components/rel-range-picker/rel-range-picker.css +349 -0
- package/dist/components/rel-range-picker/rel-range-picker.ts +1079 -0
- package/dist/components/rel-resizable/rel-resizable-handle.ts +8 -7
- package/dist/components/rel-segmented-button/rel-segmented-button.ts +41 -20
- package/dist/components/rel-select/rel-select.ts +103 -32
- package/dist/components/rel-sheet/rel-sheet.ts +362 -684
- package/dist/components/rel-slider/rel-slider.ts +49 -27
- package/dist/components/rel-snackbar/rel-snackbar.ts +28 -28
- package/dist/components/rel-stepper/rel-stepper.ts +11 -10
- package/dist/components/rel-switch/rel-switch.ts +7 -6
- package/dist/components/rel-tab/rel-tab.ts +15 -29
- package/dist/components/rel-textfield/rel-textfield.ts +144 -35
- package/dist/components/rel-toast/rel-toast.ts +25 -12
- package/dist/components/rel-tooltip/rel-tooltip.ts +123 -123
- package/dist/components/rel-topbar/rel-topbar-actions.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-brand.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +32 -2
- package/dist/components/rel-topbar/rel-topbar-dropdown.ts +1 -1
- package/dist/components/rel-topbar/rel-topbar-item.ts +15 -10
- package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-profile.ts +30 -56
- package/dist/components/rel-topbar/rel-topbar-utilities.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar.ts +137 -28
- package/dist/index.d.mts +153 -178
- package/dist/index.d.ts +153 -178
- package/dist/index.js +4711 -3875
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4047 -3202
- package/dist/index.mjs.map +1 -1
- package/dist/rel-menubar-menu-BEEQDAXW.css +3 -0
- package/dist/styles/vars-v2.css +525 -0
- package/dist/styles/vars.css +346 -346
- package/dist/{vars-TBB4BMSD.css → vars-I2PC74XD.css} +346 -346
- package/dist/vars-v2-VMGWTFJZ.css +525 -0
- package/package.json +2 -1
|
@@ -1,26 +1,23 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
-
|
|
4
4
|
@customElement("rel-accordion")
|
|
5
5
|
export class RelAccordion extends LitElement {
|
|
6
6
|
@property({ type: String }) title = "Accordion";
|
|
7
7
|
@property({ type: Boolean, reflect: true }) open = false;
|
|
8
|
-
|
|
9
8
|
static styles = css`
|
|
10
9
|
:host {
|
|
11
10
|
display: block;
|
|
12
11
|
width: 100%;
|
|
13
12
|
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
.accordion {
|
|
17
|
-
background: var(--rel-
|
|
18
|
-
border:
|
|
19
|
-
border-
|
|
20
|
-
|
|
15
|
+
background: var(--rel-color-bg-primary);
|
|
16
|
+
border: none;
|
|
17
|
+
border-bottom: 1px solid var(--rel-gray-text-placeholder);
|
|
18
|
+
border-radius: 0;
|
|
21
19
|
overflow: hidden;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
/* HEADER --------------------------------------------------- */
|
|
25
22
|
.header {
|
|
26
23
|
display: flex;
|
|
@@ -29,28 +26,23 @@ export class RelAccordion extends LitElement {
|
|
|
29
26
|
padding: var(--rel-spacing-space-md, 16px);
|
|
30
27
|
cursor: pointer;
|
|
31
28
|
user-select: none;
|
|
32
|
-
border-radius:
|
|
29
|
+
border-radius: 0;
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
.header:hover {
|
|
36
32
|
background: var(--rel-surface-surface, #f5f5f5);
|
|
37
33
|
}
|
|
38
|
-
|
|
39
34
|
:host([open]) .header:hover {
|
|
40
35
|
background: transparent;
|
|
41
36
|
}
|
|
42
|
-
|
|
43
37
|
.header:focus-visible {
|
|
44
|
-
outline: 2px solid var(--rel-border-
|
|
38
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
45
39
|
outline-offset: -2px;
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
.title {
|
|
49
42
|
font-size: var(--rel-fontSizes-lg, 20px);
|
|
50
43
|
font-weight: var(--rel-fontWeights-medium, 500);
|
|
51
44
|
color: var(--rel-text-heading, #2b2b2b);
|
|
52
45
|
}
|
|
53
|
-
|
|
54
46
|
/* ICON ----------------------------------------------------- */
|
|
55
47
|
.icon {
|
|
56
48
|
width: 20px;
|
|
@@ -60,7 +52,6 @@ export class RelAccordion extends LitElement {
|
|
|
60
52
|
justify-content: center;
|
|
61
53
|
transition: transform 0.25s ease;
|
|
62
54
|
}
|
|
63
|
-
|
|
64
55
|
.icon svg {
|
|
65
56
|
width: 20px;
|
|
66
57
|
height: 20px;
|
|
@@ -70,11 +61,9 @@ export class RelAccordion extends LitElement {
|
|
|
70
61
|
stroke-linecap: round;
|
|
71
62
|
stroke-linejoin: round;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
64
|
.icon.rotated {
|
|
75
65
|
transform: rotate(180deg);
|
|
76
66
|
}
|
|
77
|
-
|
|
78
67
|
/* BODY ------------------------------------------------------ */
|
|
79
68
|
.body {
|
|
80
69
|
overflow: hidden;
|
|
@@ -82,15 +71,15 @@ export class RelAccordion extends LitElement {
|
|
|
82
71
|
padding: 0 var(--rel-spacing-space-md, 16px);
|
|
83
72
|
font-size: var(--rel-fontSizes-md, 14px);
|
|
84
73
|
color: var(--rel-text-primary, #333);
|
|
85
|
-
transition:
|
|
74
|
+
transition:
|
|
75
|
+
max-height 0.25s ease,
|
|
76
|
+
padding 0.2s ease;
|
|
86
77
|
}
|
|
87
|
-
|
|
88
78
|
.body.open {
|
|
89
79
|
max-height: 1000px;
|
|
90
|
-
padding: var(--rel-spacing-space-xl, 24px)
|
|
91
|
-
var(--rel-spacing-space-lg, 20px);
|
|
80
|
+
padding: var(--rel-spacing-space-xl, 24px)
|
|
81
|
+
var(--rel-spacing-space-md, 16px) var(--rel-spacing-space-lg, 20px);
|
|
92
82
|
}
|
|
93
|
-
|
|
94
83
|
@media (prefers-reduced-motion: reduce) {
|
|
95
84
|
.icon,
|
|
96
85
|
.body {
|
|
@@ -98,19 +87,16 @@ export class RelAccordion extends LitElement {
|
|
|
98
87
|
}
|
|
99
88
|
}
|
|
100
89
|
`;
|
|
101
|
-
|
|
102
90
|
private toggle() {
|
|
103
91
|
this.open = !this.open;
|
|
104
|
-
|
|
105
92
|
this.dispatchEvent(
|
|
106
93
|
new CustomEvent<boolean>("open-change", {
|
|
107
94
|
detail: this.open,
|
|
108
95
|
bubbles: true,
|
|
109
96
|
composed: true,
|
|
110
|
-
})
|
|
97
|
+
}),
|
|
111
98
|
);
|
|
112
99
|
}
|
|
113
|
-
|
|
114
100
|
private chevron() {
|
|
115
101
|
return html`
|
|
116
102
|
<svg viewBox="0 0 24 24">
|
|
@@ -118,11 +104,11 @@ export class RelAccordion extends LitElement {
|
|
|
118
104
|
</svg>
|
|
119
105
|
`;
|
|
120
106
|
}
|
|
121
|
-
|
|
122
107
|
render() {
|
|
123
108
|
return html`
|
|
124
109
|
<div class="accordion">
|
|
125
|
-
<div
|
|
110
|
+
<div
|
|
111
|
+
class="header"
|
|
126
112
|
role="button"
|
|
127
113
|
tabindex="0"
|
|
128
114
|
aria-expanded="${this.open}"
|
|
@@ -132,14 +118,13 @@ export class RelAccordion extends LitElement {
|
|
|
132
118
|
e.preventDefault();
|
|
133
119
|
this.toggle();
|
|
134
120
|
}
|
|
135
|
-
}}
|
|
121
|
+
}}
|
|
122
|
+
>
|
|
136
123
|
<div class="title">${this.title}</div>
|
|
137
|
-
|
|
138
124
|
<div class="icon ${this.open ? "rotated" : ""}">
|
|
139
125
|
${this.chevron()}
|
|
140
126
|
</div>
|
|
141
127
|
</div>
|
|
142
|
-
|
|
143
128
|
<!-- IMPORTANT: slot is ALWAYS rendered -->
|
|
144
129
|
<div class="body ${this.open ? "open" : ""}">
|
|
145
130
|
<slot></slot>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
|
|
@@ -89,101 +90,100 @@ export class RelAlert extends LitElement {
|
|
|
89
90
|
opacity: 1;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
/* COLORS — light mode
|
|
93
|
+
/* COLORS — light mode */
|
|
93
94
|
.alert-neutral {
|
|
94
|
-
background:
|
|
95
|
-
color:
|
|
95
|
+
background: var(--rel-color-bg-primary);
|
|
96
|
+
color: var(--rel-color-text-primary);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
.alert-info {
|
|
99
|
-
background:
|
|
100
|
-
color:
|
|
101
|
-
--rel-icon-info:
|
|
100
|
+
background: var(--rel-background-info);
|
|
101
|
+
color: var(--rel-color-text-primary);
|
|
102
|
+
--rel-icon-info: var(--rel-colors-blue-tertiary);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.alert-success {
|
|
105
|
-
background:
|
|
106
|
-
color:
|
|
107
|
-
--rel-icon-success:
|
|
106
|
+
background: var(--rel-background-success);
|
|
107
|
+
color: var(--rel-color-text-primary);
|
|
108
|
+
--rel-icon-success: var(--rel-success-surface-dark);
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
.alert-warning {
|
|
111
|
-
background:
|
|
112
|
-
color:
|
|
113
|
-
--rel-icon-warning:
|
|
112
|
+
background: var(--rel-colors-gold-light);
|
|
113
|
+
color: var(--rel-color-text-primary);
|
|
114
|
+
--rel-icon-warning: var(--rel-warning-surface-dark);
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
.alert-error {
|
|
117
|
-
background:
|
|
118
|
-
color:
|
|
119
|
-
--rel-icon-error:
|
|
118
|
+
background: var(--rel-background-error-light);
|
|
119
|
+
color: var(--rel-error-surface-dark);
|
|
120
|
+
--rel-icon-error: var(--rel-error-surface-dark);
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
.alert-error .rel-close {
|
|
123
|
-
color:
|
|
124
|
+
color: var(--rel-color-text-primary);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
/* COLORS — dark mode
|
|
127
|
+
/* COLORS — dark mode */
|
|
127
128
|
:host-context([data-theme="dark"]) .rel-alert,
|
|
128
129
|
:host-context(.dark) .rel-alert {
|
|
129
|
-
background:
|
|
130
|
-
color:
|
|
130
|
+
background: var(--rel-color-bg-tertiary);
|
|
131
|
+
color: var(--rel-color-text-primary);
|
|
131
132
|
border: none;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
:host-context([data-theme="dark"]) .rel-close,
|
|
135
136
|
:host-context(.dark) .rel-close {
|
|
136
|
-
color:
|
|
137
|
+
color: var(--rel-color-text-primary);
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
:host-context([data-theme="dark"]) .alert-neutral,
|
|
140
141
|
:host-context(.dark) .alert-neutral {
|
|
141
|
-
border: 1px solid
|
|
142
|
-
--rel-colors-black: #ffffff;
|
|
142
|
+
border: 1px solid var(--rel-color-border-strong);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
:host-context([data-theme="dark"]) .alert-info,
|
|
146
146
|
:host-context(.dark) .alert-info {
|
|
147
|
-
border: 1px solid
|
|
148
|
-
--rel-icon-info:
|
|
147
|
+
border: 1px solid var(--rel-colors-blue-tertiary);
|
|
148
|
+
--rel-icon-info: var(--rel-colors-blue-tertiary);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
:host-context([data-theme="dark"]) .alert-info .rel-message2,
|
|
152
152
|
:host-context(.dark) .alert-info .rel-message2 {
|
|
153
|
-
color:
|
|
153
|
+
color: var(--rel-colors-blue-tertiary);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
:host-context([data-theme="dark"]) .alert-warning,
|
|
157
157
|
:host-context(.dark) .alert-warning {
|
|
158
|
-
border: 1px solid
|
|
159
|
-
--rel-icon-warning:
|
|
158
|
+
border: 1px solid var(--rel-warning-surface-dark);
|
|
159
|
+
--rel-icon-warning: var(--rel-warning-surface-dark);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
:host-context([data-theme="dark"]) .alert-warning .rel-message2,
|
|
163
163
|
:host-context(.dark) .alert-warning .rel-message2 {
|
|
164
|
-
color:
|
|
164
|
+
color: var(--rel-warning-surface-dark);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
:host-context([data-theme="dark"]) .alert-success,
|
|
168
168
|
:host-context(.dark) .alert-success {
|
|
169
|
-
border: 1px solid
|
|
170
|
-
--rel-icon-success:
|
|
169
|
+
border: 1px solid var(--rel-success-surface-dark);
|
|
170
|
+
--rel-icon-success: var(--rel-success-surface-dark);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
:host-context([data-theme="dark"]) .alert-success .rel-message2,
|
|
174
174
|
:host-context(.dark) .alert-success .rel-message2 {
|
|
175
|
-
color:
|
|
175
|
+
color: var(--rel-success-surface-dark);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
:host-context([data-theme="dark"]) .alert-error,
|
|
179
179
|
:host-context(.dark) .alert-error {
|
|
180
|
-
border: 1px solid
|
|
181
|
-
--rel-icon-error:
|
|
180
|
+
border: 1px solid var(--rel-error-surface-dark);
|
|
181
|
+
--rel-icon-error: var(--rel-error-surface-dark);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
:host-context([data-theme="dark"]) .alert-error .rel-message2,
|
|
185
185
|
:host-context(.dark) .alert-error .rel-message2 {
|
|
186
|
-
color:
|
|
186
|
+
color: var(--rel-error-surface-dark);
|
|
187
187
|
}
|
|
188
188
|
`;
|
|
189
189
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
|
|
@@ -12,6 +13,7 @@ export class RelAvatar extends LitElement {
|
|
|
12
13
|
@property({ type: String }) src = "";
|
|
13
14
|
@property({ type: String }) text = "";
|
|
14
15
|
@property({ type: String }) alt = "Avatar";
|
|
16
|
+
@property({ type: String }) bg: string = "";
|
|
15
17
|
|
|
16
18
|
static styles = css`
|
|
17
19
|
:host {
|
|
@@ -26,8 +28,8 @@ export class RelAvatar extends LitElement {
|
|
|
26
28
|
border-radius: 50%;
|
|
27
29
|
overflow: hidden;
|
|
28
30
|
|
|
29
|
-
background-color:
|
|
30
|
-
color: #ffffff;
|
|
31
|
+
background-color: var(--rel-colors-gray-disabled-text);
|
|
32
|
+
color: var(--rel-avatar-color, #ffffff);
|
|
31
33
|
font-weight: var(--rel-fontWeights-bold);
|
|
32
34
|
|
|
33
35
|
user-select: none;
|
|
@@ -82,7 +84,7 @@ export class RelAvatar extends LitElement {
|
|
|
82
84
|
|
|
83
85
|
render() {
|
|
84
86
|
return html`
|
|
85
|
-
<div class="avatar avatar-${this.size}">
|
|
87
|
+
<div class="avatar avatar-${this.size}" style=${this.bg ? `background-color: ${this.bg}` : ""}>
|
|
86
88
|
${this.type === "image" && this.src
|
|
87
89
|
? html`<img src=${this.src} alt=${this.alt} />`
|
|
88
90
|
: this.type === "text"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
|
|
@@ -26,7 +27,7 @@ export class RelBadge extends LitElement {
|
|
|
26
27
|
justify-content: center;
|
|
27
28
|
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
28
29
|
font-weight: var(--rel-fontWeights-semibold, 600);
|
|
29
|
-
background-color: var(--rel-
|
|
30
|
+
background-color: var(--rel-error-surface-default);
|
|
30
31
|
color: #ffffff;
|
|
31
32
|
border-radius: 50%;
|
|
32
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
|
|
@@ -38,25 +39,24 @@ export class RelBreadcrumbs extends LitElement {
|
|
|
38
39
|
|
|
39
40
|
a {
|
|
40
41
|
text-decoration: none;
|
|
41
|
-
font-weight: var(--rel-fontWeights-
|
|
42
|
-
color: var(--rel-text-
|
|
43
|
-
transition: color 0.2s ease;
|
|
42
|
+
font-weight: var(--rel-fontWeights-regular);
|
|
43
|
+
color: var(--rel-color-text-primary);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
a:hover {
|
|
47
47
|
text-decoration: underline;
|
|
48
|
-
color: var(--rel-
|
|
48
|
+
color: var(--rel-color-text-primary);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
a:focus-visible {
|
|
52
|
-
outline: 2px solid var(--rel-
|
|
52
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
53
53
|
outline-offset: 2px;
|
|
54
54
|
border-radius: 2px;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.current {
|
|
58
58
|
font-weight: var(--rel-fontWeights-bold);
|
|
59
|
-
color: var(--rel-text-
|
|
59
|
+
color: var(--rel-color-text-primary);
|
|
60
60
|
cursor: default;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../styles/vars-v2.css";
|
|
1
2
|
import { LitElement, html, css } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
@@ -9,7 +10,7 @@ export class RelButton extends LitElement {
|
|
|
9
10
|
"default";
|
|
10
11
|
|
|
11
12
|
@property({ type: String })
|
|
12
|
-
tone: "default" | "critical" | "success" = "default";
|
|
13
|
+
tone: "default" | "primary" | "secondary" | "critical" | "success" = "default";
|
|
13
14
|
|
|
14
15
|
@property({ type: String })
|
|
15
16
|
size: "small" | "medium" | "large" = "medium";
|
|
@@ -81,7 +82,7 @@ export class RelButton extends LitElement {
|
|
|
81
82
|
cursor: not-allowed;
|
|
82
83
|
background-color: var(--rel-color-bg-tertiary) !important;
|
|
83
84
|
color: var(--rel-color-text-disabled) !important;
|
|
84
|
-
border:
|
|
85
|
+
border: none !important;
|
|
85
86
|
pointer-events: none;
|
|
86
87
|
filter: none !important;
|
|
87
88
|
}
|
|
@@ -90,7 +91,6 @@ export class RelButton extends LitElement {
|
|
|
90
91
|
:host([disabled]):host-context(.dark) button {
|
|
91
92
|
background-color: var(--rel-color-bg-tertiary) !important;
|
|
92
93
|
color: var(--rel-color-text-disabled) !important;
|
|
93
|
-
border-color: var(--rel-color-border-default) !important;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/* Variants & tones (unchanged) */
|
|
@@ -99,12 +99,12 @@ export class RelButton extends LitElement {
|
|
|
99
99
|
color: var(--rel-colors-white);
|
|
100
100
|
}
|
|
101
101
|
.btn-default.tone-critical {
|
|
102
|
-
background: var(--rel-
|
|
102
|
+
background: var(--rel-error-surface-default);
|
|
103
103
|
color: #ffffff;
|
|
104
104
|
}
|
|
105
105
|
.btn-default.tone-success {
|
|
106
|
-
background: var(--rel-colors-green-
|
|
107
|
-
color:
|
|
106
|
+
background: var(--rel-colors-green-tertiary);
|
|
107
|
+
color: #ffffff;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.btn-primary.tone-default {
|
|
@@ -112,12 +112,12 @@ export class RelButton extends LitElement {
|
|
|
112
112
|
color: #000000;
|
|
113
113
|
}
|
|
114
114
|
.btn-primary.tone-critical {
|
|
115
|
-
background: var(--rel-
|
|
115
|
+
background: var(--rel-error-surface-default);
|
|
116
116
|
color: #ffffff;
|
|
117
117
|
}
|
|
118
118
|
.btn-primary.tone-success {
|
|
119
|
-
background: var(--rel-colors-green-
|
|
120
|
-
color:
|
|
119
|
+
background: var(--rel-colors-green-tertiary);
|
|
120
|
+
color: #ffffff;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.btn-secondary {
|
|
@@ -142,8 +142,31 @@ export class RelButton extends LitElement {
|
|
|
142
142
|
height: 40px;
|
|
143
143
|
padding: 0;
|
|
144
144
|
border-radius: 50%;
|
|
145
|
+
}
|
|
146
|
+
.btn-icon.tone-default {
|
|
145
147
|
background: var(--rel-colors-gray-light);
|
|
146
148
|
color: var(--rel-colors-black);
|
|
149
|
+
border: none;
|
|
150
|
+
}
|
|
151
|
+
.btn-icon.tone-primary {
|
|
152
|
+
background: var(--rel-colors-green-primary);
|
|
153
|
+
color: #000000;
|
|
154
|
+
border: none;
|
|
155
|
+
}
|
|
156
|
+
.btn-icon.tone-secondary {
|
|
157
|
+
background: var(--rel-colors-white);
|
|
158
|
+
color: var(--rel-colors-black);
|
|
159
|
+
border: 1px solid var(--rel-color-border-strong);
|
|
160
|
+
}
|
|
161
|
+
.btn-icon.tone-success {
|
|
162
|
+
background: var(--rel-colors-green-tertiary);
|
|
163
|
+
color: #ffffff;
|
|
164
|
+
border: none;
|
|
165
|
+
}
|
|
166
|
+
.btn-icon.tone-critical {
|
|
167
|
+
background: var(--rel-error-surface-default);
|
|
168
|
+
color: #ffffff;
|
|
169
|
+
border: none;
|
|
147
170
|
}
|
|
148
171
|
|
|
149
172
|
button.btn-primary.tone-default:hover:not(:disabled) {
|
|
@@ -158,7 +181,8 @@ export class RelButton extends LitElement {
|
|
|
158
181
|
filter: brightness(0.9);
|
|
159
182
|
}
|
|
160
183
|
|
|
161
|
-
|
|
184
|
+
/* Generic hover — excludes icon (handled per-tone below) */
|
|
185
|
+
button:hover:not(:disabled):not(.btn-primary):not(.btn-default):not(.btn-icon) {
|
|
162
186
|
background: var(--rel-color-bg-hover);
|
|
163
187
|
}
|
|
164
188
|
|
|
@@ -166,37 +190,59 @@ export class RelButton extends LitElement {
|
|
|
166
190
|
filter: brightness(0.85);
|
|
167
191
|
}
|
|
168
192
|
|
|
193
|
+
/* Icon hover — each tone matches its corresponding button variant */
|
|
194
|
+
button.btn-icon.tone-default:hover:not(:disabled) {
|
|
195
|
+
filter: brightness(0.9);
|
|
196
|
+
}
|
|
197
|
+
button.btn-icon.tone-primary:hover:not(:disabled) {
|
|
198
|
+
background: var(--rel-color-brand-hover);
|
|
199
|
+
}
|
|
200
|
+
button.btn-icon.tone-secondary:hover:not(:disabled) {
|
|
201
|
+
background: var(--rel-color-bg-hover);
|
|
202
|
+
}
|
|
203
|
+
button.btn-icon.tone-success:hover:not(:disabled) {
|
|
204
|
+
filter: brightness(0.9);
|
|
205
|
+
}
|
|
206
|
+
button.btn-icon.tone-critical:hover:not(:disabled) {
|
|
207
|
+
filter: brightness(0.9);
|
|
208
|
+
}
|
|
209
|
+
|
|
169
210
|
button:active:not(:disabled) {
|
|
170
211
|
transform: scale(0.97);
|
|
171
212
|
}
|
|
172
213
|
|
|
173
214
|
button:focus-visible {
|
|
174
|
-
outline: 2px solid var(--rel-
|
|
215
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
175
216
|
outline-offset: 2px;
|
|
176
217
|
}
|
|
177
218
|
|
|
178
219
|
/* Dark mode overrides */
|
|
220
|
+
:host-context([data-theme="dark"]) button.btn-default.tone-default,
|
|
221
|
+
:host-context(.dark) button.btn-default.tone-default {
|
|
222
|
+
background: var(--rel-gray-text-primary);
|
|
223
|
+
color: #000000;
|
|
224
|
+
}
|
|
225
|
+
|
|
179
226
|
:host-context([data-theme="dark"]) button:focus-visible,
|
|
180
227
|
:host-context(.dark) button:focus-visible {
|
|
181
|
-
outline-color:
|
|
228
|
+
outline-color: var(--rel-color-text-primary);
|
|
182
229
|
}
|
|
183
230
|
|
|
184
231
|
:host-context([data-theme="dark"]) button.btn-secondary,
|
|
185
|
-
:host-context(.dark) button.btn-secondary
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
232
|
+
:host-context(.dark) button.btn-secondary,
|
|
233
|
+
:host-context([data-theme="dark"]) button.btn-icon.tone-secondary,
|
|
234
|
+
:host-context(.dark) button.btn-icon.tone-secondary {
|
|
235
|
+
background: var(--rel-color-bg-primary);
|
|
236
|
+
border-color: var(--rel-color-border-strong);
|
|
237
|
+
color: var(--rel-color-text-primary);
|
|
189
238
|
}
|
|
190
239
|
|
|
191
240
|
:host-context([data-theme="dark"]) button.btn-text,
|
|
192
241
|
:host-context(.dark) button.btn-text {
|
|
193
|
-
color:
|
|
242
|
+
color: var(--rel-color-text-primary);
|
|
194
243
|
}
|
|
195
244
|
|
|
196
|
-
|
|
197
|
-
:host-context(.dark) button.btn-link {
|
|
198
|
-
color: #ffffff;
|
|
199
|
-
}
|
|
245
|
+
/* btn-link: blue in both modes — no dark override */
|
|
200
246
|
`;
|
|
201
247
|
|
|
202
248
|
private get classes() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css, nothing } from "lit";
|
|
2
2
|
import { customElement, property, state } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
interface CalendarDay {
|
|
5
6
|
date: Date;
|
|
@@ -69,16 +70,16 @@ export class RelCalendar extends LitElement {
|
|
|
69
70
|
align-items: center;
|
|
70
71
|
justify-content: center;
|
|
71
72
|
cursor: pointer;
|
|
72
|
-
color: var(--rel-
|
|
73
|
+
color: var(--rel-color-text-primary);
|
|
73
74
|
transition: background-color 0.15s ease;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.nav-button:hover {
|
|
77
|
-
background: var(--rel-
|
|
78
|
+
background: var(--rel-color-bg-secondary);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.nav-button:focus-visible {
|
|
81
|
-
outline: 2px solid var(--rel-
|
|
82
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
82
83
|
outline-offset: 2px;
|
|
83
84
|
}
|
|
84
85
|
|
|
@@ -92,7 +93,7 @@ export class RelCalendar extends LitElement {
|
|
|
92
93
|
text-align: center;
|
|
93
94
|
font-size: var(--rel-fontSizes-xs);
|
|
94
95
|
font-weight: var(--rel-fontWeights-semibold);
|
|
95
|
-
color: var(--rel-
|
|
96
|
+
color: var(--rel-gray-text-placeholder);
|
|
96
97
|
padding: var(--rel-spacing-space-xs);
|
|
97
98
|
text-transform: uppercase;
|
|
98
99
|
}
|
|
@@ -116,23 +117,23 @@ export class RelCalendar extends LitElement {
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
.day-button:focus-visible {
|
|
119
|
-
outline: 2px solid var(--rel-
|
|
120
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
120
121
|
outline-offset: -2px;
|
|
121
122
|
z-index: 1;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
.day-button.today:not(.selected) {
|
|
125
|
-
border: 2px solid var(--rel-color-
|
|
126
|
+
border: 2px solid var(--rel-color-brand);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
.day-button.selected {
|
|
129
130
|
background: var(--rel-color-brand);
|
|
130
|
-
color:
|
|
131
|
+
color: #000000;
|
|
131
132
|
font-weight: var(--rel-fontWeights-semibold);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
.day-button.other-month {
|
|
135
|
-
color: var(--rel-
|
|
136
|
+
color: var(--rel-gray-text-placeholder);
|
|
136
137
|
opacity: 0.5;
|
|
137
138
|
}
|
|
138
139
|
|
|
@@ -145,6 +146,12 @@ export class RelCalendar extends LitElement {
|
|
|
145
146
|
.day-button:disabled:hover {
|
|
146
147
|
background: transparent;
|
|
147
148
|
}
|
|
149
|
+
|
|
150
|
+
:host-context([data-theme="dark"]) :host,
|
|
151
|
+
:host-context(.dark) :host {
|
|
152
|
+
background: var(--rel-color-bg-primary);
|
|
153
|
+
border-color: var(--rel-color-border-default);
|
|
154
|
+
}
|
|
148
155
|
`;
|
|
149
156
|
|
|
150
157
|
connectedCallback() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
@customElement("rel-card")
|
|
5
6
|
export class RelCard extends LitElement {
|
|
@@ -10,26 +11,17 @@ export class RelCard extends LitElement {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.card {
|
|
13
|
-
background-color: var(--rel-
|
|
14
|
-
color: var(--rel-text-primary
|
|
15
|
-
border-radius: var(--rel-borders-radius-border-radius-
|
|
14
|
+
background-color: var(--rel-color-bg-primary);
|
|
15
|
+
color: var(--rel-color-text-primary);
|
|
16
|
+
border-radius: var(--rel-borders-radius-border-radius-200);
|
|
17
|
+
border: 1px solid var(--rel-color-border-default);
|
|
16
18
|
padding: var(--rel-spacing-space-md);
|
|
17
|
-
box-shadow: var(--rel-shadows-shadow-200);
|
|
18
|
-
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.card
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@media (prefers-reduced-motion: reduce) {
|
|
27
|
-
.card {
|
|
28
|
-
transition: none;
|
|
29
|
-
}
|
|
30
|
-
.card:hover {
|
|
31
|
-
transform: none;
|
|
32
|
-
}
|
|
21
|
+
:host-context([data-theme="dark"]) .card,
|
|
22
|
+
:host-context(.dark) .card {
|
|
23
|
+
background-color: var(--rel-color-bg-primary);
|
|
24
|
+
border-color: var(--rel-color-border-default);
|
|
33
25
|
}
|
|
34
26
|
`;
|
|
35
27
|
|