@reliability-design/web 1.0.6 → 1.1.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/components/rel-accordion/rel-accordion.ts +4 -0
- package/dist/components/rel-alert/rel-alert.ts +83 -13
- package/dist/components/rel-avatar/rel-avatar.ts +3 -2
- package/dist/components/rel-badge/rel-badge.ts +6 -2
- package/dist/components/rel-button/rel-button.ts +64 -8
- package/dist/components/rel-calendar/rel-calendar.ts +3 -3
- package/dist/components/rel-carousel/rel-carousel.ts +10 -11
- package/dist/components/rel-checkbox/rel-checkbox.ts +33 -2
- package/dist/components/rel-chip/rel-chip.ts +63 -5
- package/dist/components/rel-divider/rel-divider.ts +9 -0
- package/dist/components/rel-drawer/rel-drawer-footer.ts +29 -0
- package/dist/components/rel-drawer/rel-drawer.ts +17 -26
- package/dist/components/rel-menu/rel-menu.ts +53 -21
- package/dist/components/rel-menubar/rel-menubar.ts +52 -23
- package/dist/components/rel-nav-menu/rel-nav-menu-item.ts +240 -143
- package/dist/components/rel-nav-menu/rel-nav-menu.ts +227 -331
- package/dist/components/rel-navbar/rel-navbar.ts +13 -0
- package/dist/components/rel-pagination/rel-pagination.ts +11 -6
- package/dist/components/rel-popover/rel-popover.ts +16 -13
- package/dist/components/rel-radio/rel-radio.ts +18 -1
- package/dist/components/rel-resizable/rel-resizable-handle.ts +4 -8
- package/dist/components/rel-select/rel-select.ts +14 -0
- package/dist/components/rel-sheet/rel-sheet.ts +7 -6
- package/dist/components/rel-sidebar/rel-sidebar.ts +13 -5
- package/dist/components/rel-slider/rel-slider.ts +25 -2
- package/dist/components/rel-snackbar/rel-snackbar.ts +46 -16
- package/dist/components/rel-stepper/rel-stepper.ts +32 -21
- package/dist/components/rel-switch/rel-switch.ts +19 -6
- package/dist/components/rel-tab/rel-tab.ts +49 -15
- package/dist/components/rel-table/rel-table-body.ts +5 -0
- package/dist/components/rel-table/rel-table-caption.ts +6 -1
- package/dist/components/rel-table/rel-table-cell.ts +42 -49
- package/dist/components/rel-table/rel-table-footer.ts +5 -0
- package/dist/components/rel-table/rel-table-head.ts +13 -1
- package/dist/components/rel-table/rel-table-header.ts +5 -0
- package/dist/components/rel-table/rel-table-row.ts +7 -3
- package/dist/components/rel-table/rel-table.ts +8 -2
- package/dist/components/rel-textfield/rel-textfield.ts +20 -20
- package/dist/components/rel-toast/rel-toast.ts +31 -10
- package/dist/components/rel-tooltip/rel-tooltip.ts +123 -80
- package/dist/components/rel-topbar/rel-topbar-actions.ts +23 -0
- package/dist/components/rel-topbar/rel-topbar-brand.ts +46 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +33 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown.ts +28 -0
- package/dist/components/rel-topbar/rel-topbar-item.ts +315 -0
- package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +23 -0
- package/dist/components/rel-topbar/rel-topbar-profile.ts +248 -0
- package/dist/components/rel-topbar/rel-topbar-utilities.ts +23 -0
- package/dist/components/rel-topbar/rel-topbar.ts +329 -0
- package/dist/index.d.mts +278 -289
- package/dist/index.d.ts +278 -289
- package/dist/index.js +4498 -5727
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4535 -5756
- package/dist/index.mjs.map +1 -1
- package/dist/styles/vars.css +346 -294
- package/dist/{vars-ITL2K3KO.css → vars-TBB4BMSD.css} +346 -294
- package/package.json +2 -1
- package/dist/components/rel-quote-page/README.md +0 -166
- package/dist/components/rel-quote-page/rel-quote-page.ts +0 -816
|
@@ -36,6 +36,10 @@ export class RelAccordion extends LitElement {
|
|
|
36
36
|
background: var(--rel-surface-surface, #f5f5f5);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
:host([open]) .header:hover {
|
|
40
|
+
background: transparent;
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
.header:focus-visible {
|
|
40
44
|
outline: 2px solid var(--rel-border-info, #0091ea);
|
|
41
45
|
outline-offset: -2px;
|
|
@@ -89,31 +89,101 @@ export class RelAlert extends LitElement {
|
|
|
89
89
|
opacity: 1;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
/* COLORS */
|
|
92
|
+
/* COLORS — light mode (pinned Figma hex) */
|
|
93
|
+
.alert-neutral {
|
|
94
|
+
background: #ffffff;
|
|
95
|
+
color: #000000;
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
.alert-info {
|
|
94
|
-
background:
|
|
95
|
-
color:
|
|
99
|
+
background: #E1F2FF;
|
|
100
|
+
color: #000000;
|
|
101
|
+
--rel-icon-info: #0059F4;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
.alert-success {
|
|
99
|
-
background:
|
|
100
|
-
color:
|
|
105
|
+
background: #E2FEEE;
|
|
106
|
+
color: #000000;
|
|
107
|
+
--rel-icon-success: #00A86B;
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
.alert-warning {
|
|
104
|
-
background:
|
|
105
|
-
color:
|
|
111
|
+
background: #F6EFD7;
|
|
112
|
+
color: #000000;
|
|
113
|
+
--rel-icon-warning: #F2915C;
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
.alert-error {
|
|
109
|
-
background:
|
|
110
|
-
color:
|
|
117
|
+
background: #FFDEDE;
|
|
118
|
+
color: #9C1E33;
|
|
119
|
+
--rel-icon-error: #9C1E33;
|
|
111
120
|
}
|
|
112
121
|
|
|
113
|
-
.alert-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
.alert-error .rel-close {
|
|
123
|
+
color: #000000;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* COLORS — dark mode (pinned Figma hex) */
|
|
127
|
+
:host-context([data-theme="dark"]) .rel-alert,
|
|
128
|
+
:host-context(.dark) .rel-alert {
|
|
129
|
+
background: #2B2B2B;
|
|
130
|
+
color: #ffffff;
|
|
131
|
+
border: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host-context([data-theme="dark"]) .rel-close,
|
|
135
|
+
:host-context(.dark) .rel-close {
|
|
136
|
+
color: #ffffff;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host-context([data-theme="dark"]) .alert-neutral,
|
|
140
|
+
:host-context(.dark) .alert-neutral {
|
|
141
|
+
border: 1px solid #ffffff;
|
|
142
|
+
--rel-colors-black: #ffffff;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host-context([data-theme="dark"]) .alert-info,
|
|
146
|
+
:host-context(.dark) .alert-info {
|
|
147
|
+
border: 1px solid #0059F4;
|
|
148
|
+
--rel-icon-info: #0059F4;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host-context([data-theme="dark"]) .alert-info .rel-message2,
|
|
152
|
+
:host-context(.dark) .alert-info .rel-message2 {
|
|
153
|
+
color: #0059F4;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host-context([data-theme="dark"]) .alert-warning,
|
|
157
|
+
:host-context(.dark) .alert-warning {
|
|
158
|
+
border: 1px solid #F2915C;
|
|
159
|
+
--rel-icon-warning: #F2915C;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host-context([data-theme="dark"]) .alert-warning .rel-message2,
|
|
163
|
+
:host-context(.dark) .alert-warning .rel-message2 {
|
|
164
|
+
color: #F2915C;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host-context([data-theme="dark"]) .alert-success,
|
|
168
|
+
:host-context(.dark) .alert-success {
|
|
169
|
+
border: 1px solid #00A86B;
|
|
170
|
+
--rel-icon-success: #00A86B;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:host-context([data-theme="dark"]) .alert-success .rel-message2,
|
|
174
|
+
:host-context(.dark) .alert-success .rel-message2 {
|
|
175
|
+
color: #00A86B;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:host-context([data-theme="dark"]) .alert-error,
|
|
179
|
+
:host-context(.dark) .alert-error {
|
|
180
|
+
border: 1px solid #9C1E33;
|
|
181
|
+
--rel-icon-error: #9C1E33;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host-context([data-theme="dark"]) .alert-error .rel-message2,
|
|
185
|
+
:host-context(.dark) .alert-error .rel-message2 {
|
|
186
|
+
color: #9C1E33;
|
|
117
187
|
}
|
|
118
188
|
`;
|
|
119
189
|
|
|
@@ -26,8 +26,8 @@ export class RelAvatar extends LitElement {
|
|
|
26
26
|
border-radius: 50%;
|
|
27
27
|
overflow: hidden;
|
|
28
28
|
|
|
29
|
-
background-color:
|
|
30
|
-
color:
|
|
29
|
+
background-color: #9E9E9E;
|
|
30
|
+
color: #ffffff;
|
|
31
31
|
font-weight: var(--rel-fontWeights-bold);
|
|
32
32
|
|
|
33
33
|
user-select: none;
|
|
@@ -71,6 +71,7 @@ export class RelAvatar extends LitElement {
|
|
|
71
71
|
display: inline-flex;
|
|
72
72
|
align-items: center;
|
|
73
73
|
justify-content: center;
|
|
74
|
+
color: #ffffff;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.icon-slot ::slotted(svg) {
|
|
@@ -5,6 +5,10 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
5
5
|
export class RelBadge extends LitElement {
|
|
6
6
|
@property({ type: String }) number = "";
|
|
7
7
|
|
|
8
|
+
@property({ type: String }) ariaLabel: string = "";
|
|
9
|
+
|
|
10
|
+
@property({ type: String }) suffix: string = "notifications";
|
|
11
|
+
|
|
8
12
|
@property({ type: String, reflect: true })
|
|
9
13
|
size: "sm" | "md" | "lg" = "md";
|
|
10
14
|
|
|
@@ -23,7 +27,7 @@ export class RelBadge extends LitElement {
|
|
|
23
27
|
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
24
28
|
font-weight: var(--rel-fontWeights-semibold, 600);
|
|
25
29
|
background-color: var(--rel-colors-red-primary);
|
|
26
|
-
color:
|
|
30
|
+
color: #ffffff;
|
|
27
31
|
border-radius: 50%;
|
|
28
32
|
}
|
|
29
33
|
|
|
@@ -69,7 +73,7 @@ export class RelBadge extends LitElement {
|
|
|
69
73
|
|
|
70
74
|
render() {
|
|
71
75
|
return html`
|
|
72
|
-
<span class="${this.classes}">
|
|
76
|
+
<span class="${this.classes}" aria-label=${this.ariaLabel || `${this.number} ${this.suffix}`}>
|
|
73
77
|
${this.variant === "number" ? this.number : null}
|
|
74
78
|
</span>
|
|
75
79
|
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
4
|
|
|
4
5
|
@customElement("rel-button")
|
|
5
6
|
export class RelButton extends LitElement {
|
|
@@ -19,6 +20,8 @@ export class RelButton extends LitElement {
|
|
|
19
20
|
|
|
20
21
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
21
22
|
|
|
23
|
+
@property({ type: String, attribute: "aria-label" }) ariaLabel: string | null = null;
|
|
24
|
+
|
|
22
25
|
static styles = css`
|
|
23
26
|
:host {
|
|
24
27
|
display: inline-flex;
|
|
@@ -70,11 +73,24 @@ export class RelButton extends LitElement {
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
/* Disabled */
|
|
76
|
+
:host([disabled]) {
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
:host([disabled]) button {
|
|
74
81
|
cursor: not-allowed;
|
|
75
|
-
background-color: var(--rel-
|
|
76
|
-
color: var(--rel-
|
|
82
|
+
background-color: var(--rel-color-bg-tertiary) !important;
|
|
83
|
+
color: var(--rel-color-text-disabled) !important;
|
|
84
|
+
border: 1px solid var(--rel-color-border-default) !important;
|
|
77
85
|
pointer-events: none;
|
|
86
|
+
filter: none !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([disabled]):host-context([data-theme="dark"]) button,
|
|
90
|
+
:host([disabled]):host-context(.dark) button {
|
|
91
|
+
background-color: var(--rel-color-bg-tertiary) !important;
|
|
92
|
+
color: var(--rel-color-text-disabled) !important;
|
|
93
|
+
border-color: var(--rel-color-border-default) !important;
|
|
78
94
|
}
|
|
79
95
|
|
|
80
96
|
/* Variants & tones (unchanged) */
|
|
@@ -84,7 +100,7 @@ export class RelButton extends LitElement {
|
|
|
84
100
|
}
|
|
85
101
|
.btn-default.tone-critical {
|
|
86
102
|
background: var(--rel-colors-red-primary);
|
|
87
|
-
color:
|
|
103
|
+
color: #ffffff;
|
|
88
104
|
}
|
|
89
105
|
.btn-default.tone-success {
|
|
90
106
|
background: var(--rel-colors-green-success);
|
|
@@ -93,11 +109,11 @@ export class RelButton extends LitElement {
|
|
|
93
109
|
|
|
94
110
|
.btn-primary.tone-default {
|
|
95
111
|
background: var(--rel-colors-green-primary);
|
|
96
|
-
color:
|
|
112
|
+
color: #000000;
|
|
97
113
|
}
|
|
98
114
|
.btn-primary.tone-critical {
|
|
99
115
|
background: var(--rel-colors-red-primary);
|
|
100
|
-
color:
|
|
116
|
+
color: #ffffff;
|
|
101
117
|
}
|
|
102
118
|
.btn-primary.tone-success {
|
|
103
119
|
background: var(--rel-colors-green-success);
|
|
@@ -106,7 +122,7 @@ export class RelButton extends LitElement {
|
|
|
106
122
|
|
|
107
123
|
.btn-secondary {
|
|
108
124
|
background: var(--rel-colors-white);
|
|
109
|
-
border: 1px solid var(--rel-
|
|
125
|
+
border: 1px solid var(--rel-color-border-strong);
|
|
110
126
|
color: var(--rel-colors-black);
|
|
111
127
|
}
|
|
112
128
|
|
|
@@ -130,8 +146,24 @@ export class RelButton extends LitElement {
|
|
|
130
146
|
color: var(--rel-colors-black);
|
|
131
147
|
}
|
|
132
148
|
|
|
133
|
-
button:hover:not(:disabled) {
|
|
134
|
-
|
|
149
|
+
button.btn-primary.tone-default:hover:not(:disabled) {
|
|
150
|
+
background: var(--rel-color-brand-hover);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
button.btn-primary.tone-critical:hover:not(:disabled) {
|
|
154
|
+
filter: brightness(0.9);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
button.btn-primary.tone-success:hover:not(:disabled) {
|
|
158
|
+
filter: brightness(0.9);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
button:hover:not(:disabled):not(.btn-primary):not(.btn-default) {
|
|
162
|
+
background: var(--rel-color-bg-hover);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
button.btn-default:hover:not(:disabled) {
|
|
166
|
+
filter: brightness(0.85);
|
|
135
167
|
}
|
|
136
168
|
|
|
137
169
|
button:active:not(:disabled) {
|
|
@@ -142,6 +174,29 @@ export class RelButton extends LitElement {
|
|
|
142
174
|
outline: 2px solid var(--rel-colors-blue-primary);
|
|
143
175
|
outline-offset: 2px;
|
|
144
176
|
}
|
|
177
|
+
|
|
178
|
+
/* Dark mode overrides */
|
|
179
|
+
:host-context([data-theme="dark"]) button:focus-visible,
|
|
180
|
+
:host-context(.dark) button:focus-visible {
|
|
181
|
+
outline-color: #ffffff;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host-context([data-theme="dark"]) button.btn-secondary,
|
|
185
|
+
:host-context(.dark) button.btn-secondary {
|
|
186
|
+
background: #000000;
|
|
187
|
+
border-color: #ffffff;
|
|
188
|
+
color: #ffffff;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:host-context([data-theme="dark"]) button.btn-text,
|
|
192
|
+
:host-context(.dark) button.btn-text {
|
|
193
|
+
color: #ffffff;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host-context([data-theme="dark"]) button.btn-link,
|
|
197
|
+
:host-context(.dark) button.btn-link {
|
|
198
|
+
color: #ffffff;
|
|
199
|
+
}
|
|
145
200
|
`;
|
|
146
201
|
|
|
147
202
|
private get classes() {
|
|
@@ -176,6 +231,7 @@ export class RelButton extends LitElement {
|
|
|
176
231
|
?disabled=${this.disabled}
|
|
177
232
|
@click=${this.handleClick}
|
|
178
233
|
aria-disabled=${this.disabled}
|
|
234
|
+
aria-label=${ifDefined(this.ariaLabel ?? undefined)}
|
|
179
235
|
>
|
|
180
236
|
<slot></slot>
|
|
181
237
|
</button>
|
|
@@ -122,12 +122,12 @@ export class RelCalendar extends LitElement {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.day-button.today:not(.selected) {
|
|
125
|
-
border: 2px solid var(--rel-
|
|
125
|
+
border: 2px solid var(--rel-color-border-focus);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.day-button.selected {
|
|
129
|
-
background: var(--rel-
|
|
130
|
-
color: var(--rel-
|
|
129
|
+
background: var(--rel-color-brand);
|
|
130
|
+
color: var(--rel-color-text-inverse);
|
|
131
131
|
font-weight: var(--rel-fontWeights-semibold);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -11,8 +11,7 @@ export class RelCarousel extends LitElement {
|
|
|
11
11
|
@property({ type: Boolean, attribute: "show-buttons" }) showButtons = true;
|
|
12
12
|
@property({ type: Boolean, attribute: "show-dots" }) showDots = true;
|
|
13
13
|
@property({ type: String }) orientation: "horizontal" | "vertical" = "horizontal";
|
|
14
|
-
@property({ type: String })
|
|
15
|
-
@property({ type: Number, attribute: "slides-per-view" }) slidesPerView = 1;
|
|
14
|
+
@property({ type: String }) label: string = "Carousel";
|
|
16
15
|
@property({ type: Number }) gap?: number;
|
|
17
16
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
18
17
|
|
|
@@ -74,11 +73,11 @@ export class RelCarousel extends LitElement {
|
|
|
74
73
|
top: 50%;
|
|
75
74
|
transform: translateY(-50%);
|
|
76
75
|
z-index: 10;
|
|
77
|
-
width: 40px;
|
|
78
|
-
height: 40px;
|
|
76
|
+
width: var(--rel-carousel-nav-size, 40px);
|
|
77
|
+
height: var(--rel-carousel-nav-size, 40px);
|
|
79
78
|
border-radius: 50%;
|
|
80
|
-
border: 1px solid var(--rel-border-default);
|
|
81
|
-
background: var(--rel-
|
|
79
|
+
border: 1px solid var(--rel-color-border-default);
|
|
80
|
+
background: var(--rel-color-bg-primary);
|
|
82
81
|
color: var(--rel-colors-gray-primary);
|
|
83
82
|
cursor: pointer;
|
|
84
83
|
display: flex;
|
|
@@ -124,8 +123,8 @@ export class RelCarousel extends LitElement {
|
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
.dot {
|
|
127
|
-
width: 8px;
|
|
128
|
-
height: 8px;
|
|
126
|
+
width: var(--rel-carousel-dot-size, 8px);
|
|
127
|
+
height: var(--rel-carousel-dot-size, 8px);
|
|
129
128
|
border-radius: 50%;
|
|
130
129
|
border: none;
|
|
131
130
|
background: var(--rel-colors-gray-border);
|
|
@@ -139,8 +138,8 @@ export class RelCarousel extends LitElement {
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
.dot.active {
|
|
142
|
-
background: var(--rel-
|
|
143
|
-
width: 24px;
|
|
141
|
+
background: var(--rel-color-brand);
|
|
142
|
+
width: var(--rel-carousel-dot-size-active, 24px);
|
|
144
143
|
border-radius: 4px;
|
|
145
144
|
}
|
|
146
145
|
|
|
@@ -392,7 +391,7 @@ export class RelCarousel extends LitElement {
|
|
|
392
391
|
part="viewport"
|
|
393
392
|
role="region"
|
|
394
393
|
aria-roledescription="carousel"
|
|
395
|
-
aria-label
|
|
394
|
+
aria-label=${this.label}
|
|
396
395
|
@keydown=${this.handleKeyDown}
|
|
397
396
|
@mouseenter=${this.handleMouseEnter}
|
|
398
397
|
@mouseleave=${this.handleMouseLeave}
|
|
@@ -10,6 +10,17 @@ export class RelCheckbox extends LitElement {
|
|
|
10
10
|
@property({ type: String }) supportingtext = "";
|
|
11
11
|
@property({ type: String }) state: CheckboxState = "default";
|
|
12
12
|
@property({ type: String }) status: CheckboxStatus = "unchecked";
|
|
13
|
+
@property({ type: String }) value = "";
|
|
14
|
+
|
|
15
|
+
get checked(): boolean {
|
|
16
|
+
return this.status === "checked";
|
|
17
|
+
}
|
|
18
|
+
set checked(val: boolean) {
|
|
19
|
+
this.status = val ? "checked" : "unchecked";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private _onChange: (value: boolean) => void = () => {};
|
|
23
|
+
private _onTouched: () => void = () => {};
|
|
13
24
|
|
|
14
25
|
static styles = css`
|
|
15
26
|
:host {
|
|
@@ -84,11 +95,25 @@ export class RelCheckbox extends LitElement {
|
|
|
84
95
|
border-color: var(--rel-colors-red-primary);
|
|
85
96
|
}
|
|
86
97
|
|
|
98
|
+
/* Pin checkmark/dash to white on red background — correct in both themes */
|
|
99
|
+
.error.checked svg,
|
|
100
|
+
.error.indeterminate svg {
|
|
101
|
+
fill: #ffffff;
|
|
102
|
+
}
|
|
103
|
+
|
|
87
104
|
.disabled {
|
|
88
105
|
opacity: 0.55;
|
|
89
106
|
cursor: not-allowed;
|
|
90
107
|
}
|
|
91
108
|
|
|
109
|
+
:host([state="disabled"]) {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host([state="disabled"]) * {
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
92
117
|
.label {
|
|
93
118
|
font-size: var(--rel-fontSizes-md, 14px);
|
|
94
119
|
font-weight: var(--rel-fontWeights-medium, 500);
|
|
@@ -110,17 +135,22 @@ export class RelCheckbox extends LitElement {
|
|
|
110
135
|
else this.status = "unchecked";
|
|
111
136
|
|
|
112
137
|
this.dispatchEvent(
|
|
113
|
-
new CustomEvent("change", {
|
|
138
|
+
new CustomEvent("rel-change", {
|
|
114
139
|
detail: {
|
|
115
140
|
checked: this.status === "checked",
|
|
116
|
-
|
|
141
|
+
value: this.value,
|
|
117
142
|
},
|
|
118
143
|
bubbles: true,
|
|
119
144
|
composed: true,
|
|
120
145
|
})
|
|
121
146
|
);
|
|
147
|
+
this._onChange(this.checked);
|
|
122
148
|
}
|
|
123
149
|
|
|
150
|
+
registerOnChange(fn: (value: boolean) => void): void { this._onChange = fn; }
|
|
151
|
+
registerOnTouched(fn: () => void): void { this._onTouched = fn; }
|
|
152
|
+
writeValue(checked: boolean): void { this.checked = checked; }
|
|
153
|
+
|
|
124
154
|
render() {
|
|
125
155
|
return html`
|
|
126
156
|
<div class="wrapper ${this.state} ${this.status}">
|
|
@@ -128,6 +158,7 @@ export class RelCheckbox extends LitElement {
|
|
|
128
158
|
<input
|
|
129
159
|
type="checkbox"
|
|
130
160
|
@click=${this.toggle}
|
|
161
|
+
@blur=${() => this._onTouched()}
|
|
131
162
|
?disabled=${this.state === "disabled"}
|
|
132
163
|
/>
|
|
133
164
|
|
|
@@ -56,32 +56,57 @@ export class RelChip extends LitElement {
|
|
|
56
56
|
/* TONES */
|
|
57
57
|
.chip-default {
|
|
58
58
|
background: var(--rel-colors-gray-border);
|
|
59
|
-
color:
|
|
59
|
+
color: #000000;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.chip-blue {
|
|
63
63
|
background: var(--rel-colors-blue-tertiary);
|
|
64
|
-
color:
|
|
64
|
+
color: #ffffff;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.chip-yellow {
|
|
68
68
|
background: var(--rel-colors-yellow-pending);
|
|
69
|
-
color:
|
|
69
|
+
color: #000000;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.chip-red {
|
|
73
73
|
background: var(--rel-colors-red-secondary);
|
|
74
|
-
color:
|
|
74
|
+
color: #ffffff;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.chip-green {
|
|
78
78
|
background: var(--rel-colors-green-success);
|
|
79
|
-
color:
|
|
79
|
+
color: #ffffff;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* OUTLINE */
|
|
83
83
|
.chip-outline {
|
|
84
84
|
background: transparent;
|
|
85
|
+
border-color: var(--rel-color-border-default);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.chip-blue.chip-outline {
|
|
89
|
+
color: #000000;
|
|
90
|
+
background: transparent;
|
|
91
|
+
border-color: #0059F4;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.chip-red.chip-outline {
|
|
95
|
+
color: #9C1E33;
|
|
96
|
+
background: transparent;
|
|
97
|
+
border-color: #9C1E33;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.chip-green.chip-outline {
|
|
101
|
+
color: #00A86B;
|
|
102
|
+
background: transparent;
|
|
103
|
+
border-color: #00A86B;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.chip-yellow.chip-outline {
|
|
107
|
+
color: #92400E;
|
|
108
|
+
background: transparent;
|
|
109
|
+
border-color: #F2915C;
|
|
85
110
|
}
|
|
86
111
|
|
|
87
112
|
.chip-avatar {
|
|
@@ -91,6 +116,20 @@ export class RelChip extends LitElement {
|
|
|
91
116
|
object-fit: cover;
|
|
92
117
|
}
|
|
93
118
|
|
|
119
|
+
.chip-icon {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
width: 14px;
|
|
124
|
+
height: 14px;
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.chip-icon * {
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
}
|
|
132
|
+
|
|
94
133
|
.chip-icon ::slotted(svg),
|
|
95
134
|
.chip-icon svg {
|
|
96
135
|
width: 16px;
|
|
@@ -119,6 +158,25 @@ export class RelChip extends LitElement {
|
|
|
119
158
|
outline-offset: 1px;
|
|
120
159
|
border-radius: 2px;
|
|
121
160
|
}
|
|
161
|
+
|
|
162
|
+
/* Dark mode overrides */
|
|
163
|
+
:host-context([data-theme="dark"]) .chip-default,
|
|
164
|
+
:host-context(.dark) .chip-default {
|
|
165
|
+
color: #ffffff;
|
|
166
|
+
background: var(--rel-color-bg-secondary);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host-context([data-theme="dark"]) .chip-default.chip-outline,
|
|
170
|
+
:host-context(.dark) .chip-default.chip-outline {
|
|
171
|
+
color: #ffffff;
|
|
172
|
+
border-color: #ffffff;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host-context([data-theme="dark"]) .chip-outline,
|
|
176
|
+
:host-context(.dark) .chip-outline {
|
|
177
|
+
color: #ffffff;
|
|
178
|
+
border-color: currentColor;
|
|
179
|
+
}
|
|
122
180
|
`;
|
|
123
181
|
|
|
124
182
|
private get classes() {
|
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
|
+
connectedCallback() {
|
|
40
|
+
super.connectedCallback();
|
|
41
|
+
this.setAttribute("role", "separator");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
updated() {
|
|
45
|
+
this.setAttribute("aria-orientation", this.orientation ?? "horizontal");
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
render() {
|
|
40
49
|
return html`
|
|
41
50
|
<div class="rel-divider ${this.orientation}" role="separator"></div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { customElement } from "lit/decorators.js";
|
|
3
|
+
|
|
4
|
+
@customElement("rel-drawer-footer")
|
|
5
|
+
export class RelDrawerFooter extends LitElement {
|
|
6
|
+
static styles = css`
|
|
7
|
+
.drawer-footer {
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: flex-end;
|
|
10
|
+
gap: var(--rel-spacing-space-xs);
|
|
11
|
+
padding-top: var(--rel-spacing-space-md);
|
|
12
|
+
border-top: 1px solid var(--rel-color-border-divider);
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
render() {
|
|
17
|
+
return html`
|
|
18
|
+
<div class="drawer-footer">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
"rel-drawer-footer": RelDrawerFooter;
|
|
28
|
+
}
|
|
29
|
+
}
|