@reliability-design/web 1.0.6 → 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 +20 -31
- package/dist/components/rel-alert/rel-alert.ts +81 -11
- package/dist/components/rel-avatar/rel-avatar.ts +6 -3
- package/dist/components/rel-badge/rel-badge.ts +8 -3
- package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +6 -6
- package/dist/components/rel-button/rel-button.ts +118 -16
- package/dist/components/rel-calendar/rel-calendar.ts +16 -9
- 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 -469
- package/dist/components/rel-checkbox/rel-checkbox.ts +98 -15
- package/dist/components/rel-chip/rel-chip.ts +291 -186
- 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 +12 -3
- package/dist/components/rel-drawer/rel-drawer-footer.ts +27 -0
- package/dist/components/rel-drawer/rel-drawer.ts +57 -113
- 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 -327
- 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 -576
- 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-otp/rel-otp.ts +22 -25
- package/dist/components/rel-pagination/rel-pagination.ts +112 -63
- package/dist/components/rel-popover/rel-popover-content.ts +6 -5
- package/dist/components/rel-popover/rel-popover.ts +42 -20
- package/dist/components/rel-progress/rel-progress.ts +10 -9
- package/dist/components/rel-radio/rel-radio.ts +228 -155
- 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 +12 -15
- package/dist/components/rel-segmented-button/rel-segmented-button.ts +41 -20
- package/dist/components/rel-select/rel-select.ts +112 -27
- package/dist/components/rel-sheet/rel-sheet.ts +362 -683
- package/dist/components/rel-sidebar/rel-sidebar.ts +13 -5
- package/dist/components/rel-slider/rel-slider.ts +74 -29
- package/dist/components/rel-snackbar/rel-snackbar.ts +67 -37
- package/dist/components/rel-stepper/rel-stepper.ts +43 -31
- package/dist/components/rel-switch/rel-switch.ts +26 -12
- package/dist/components/rel-tab/rel-tab.ts +57 -37
- 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 +153 -44
- package/dist/components/rel-toast/rel-toast.ts +56 -22
- package/dist/components/rel-tooltip/rel-tooltip.ts +52 -9
- package/dist/components/rel-topbar/rel-topbar-actions.ts +24 -0
- package/dist/components/rel-topbar/rel-topbar-brand.ts +47 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +63 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown.ts +28 -0
- package/dist/components/rel-topbar/rel-topbar-item.ts +320 -0
- package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +24 -0
- package/dist/components/rel-topbar/rel-topbar-profile.ts +222 -0
- package/dist/components/rel-topbar/rel-topbar-utilities.ts +24 -0
- package/dist/components/rel-topbar/rel-topbar.ts +438 -0
- package/dist/index.d.mts +375 -411
- package/dist/index.d.ts +375 -411
- package/dist/index.js +7587 -7980
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7647 -8023
- 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 +79 -27
- package/dist/{vars-ITL2K3KO.css → vars-I2PC74XD.css} +79 -27
- package/dist/vars-v2-VMGWTFJZ.css +525 -0
- package/package.json +3 -1
- package/dist/components/rel-quote-page/README.md +0 -166
- package/dist/components/rel-quote-page/rel-quote-page.ts +0 -816
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
@customElement("rel-resizable-handle")
|
|
5
6
|
export class RelResizableHandle extends LitElement {
|
|
@@ -15,7 +16,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
15
16
|
|
|
16
17
|
/** Index of this handle in the parent group */
|
|
17
18
|
public handleIndex = -1;
|
|
18
|
-
|
|
19
|
+
|
|
19
20
|
/** Current split value (0-100) for aria-valuenow */
|
|
20
21
|
public splitValue = 50;
|
|
21
22
|
|
|
@@ -31,29 +32,25 @@ export class RelResizableHandle extends LitElement {
|
|
|
31
32
|
flex-shrink: 0;
|
|
32
33
|
position: relative;
|
|
33
34
|
outline: none;
|
|
34
|
-
background: var(--rel-
|
|
35
|
+
background: var(--rel-color-border-default);
|
|
35
36
|
transition: background 0.15s ease;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
:host([orientation="horizontal"]) {
|
|
39
|
-
width:
|
|
40
|
-
min-width:
|
|
40
|
+
width: 8px;
|
|
41
|
+
min-width: 8px;
|
|
41
42
|
cursor: col-resize;
|
|
42
|
-
padding: 0 var(--rel-spacing-space-xs);
|
|
43
|
-
margin: 0 calc(var(--rel-spacing-space-xs) * -1);
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
:host([orientation="vertical"]) {
|
|
47
|
-
height:
|
|
48
|
-
min-height:
|
|
46
|
+
height: 8px;
|
|
47
|
+
min-height: 8px;
|
|
49
48
|
cursor: row-resize;
|
|
50
|
-
padding: var(--rel-spacing-space-xs) 0;
|
|
51
|
-
margin: calc(var(--rel-spacing-space-xs) * -1) 0;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
:host(:hover),
|
|
55
52
|
:host(:focus-visible) {
|
|
56
|
-
background: var(--rel-
|
|
53
|
+
background: var(--rel-color-bg-selected);
|
|
57
54
|
}
|
|
58
55
|
|
|
59
56
|
:host(:focus-visible) {
|
|
@@ -62,7 +59,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
.grabber {
|
|
65
|
-
background: var(--rel-
|
|
62
|
+
background: var(--rel-color-icon-primary);
|
|
66
63
|
border-radius: var(--rel-borders-radius-border-radius-500);
|
|
67
64
|
transition: background 0.15s ease;
|
|
68
65
|
}
|
|
@@ -79,15 +76,15 @@ export class RelResizableHandle extends LitElement {
|
|
|
79
76
|
|
|
80
77
|
:host(:hover) .grabber,
|
|
81
78
|
:host(:focus-visible) .grabber {
|
|
82
|
-
background: var(--rel-
|
|
79
|
+
background: var(--rel-color-bg-primary);
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
:host([data-dragging]) {
|
|
86
|
-
background: var(--rel-
|
|
83
|
+
background: var(--rel-color-bg-selected);
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
:host([data-dragging]) .grabber {
|
|
90
|
-
background: var(--rel-
|
|
87
|
+
background: var(--rel-color-text-primary);
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
export type SegmentSize = "small" | "medium";
|
|
5
6
|
export type SegmentAlign = "left" | "middle" | "right";
|
|
@@ -28,8 +29,8 @@ export class RelSegmentedButton extends LitElement {
|
|
|
28
29
|
|
|
29
30
|
.segmented-buttons {
|
|
30
31
|
display: inline-flex;
|
|
31
|
-
border:
|
|
32
|
-
border-radius: var(--rel-borders-radius-border-radius-
|
|
32
|
+
border: 1px solid var(--rel-color-border-default);
|
|
33
|
+
border-radius: var(--rel-borders-radius-border-radius-100);
|
|
33
34
|
overflow: hidden;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -48,50 +49,70 @@ export class RelSegmentedButton extends LitElement {
|
|
|
48
49
|
|
|
49
50
|
/* Base segment styling */
|
|
50
51
|
.segment {
|
|
51
|
-
background: var(--rel-
|
|
52
|
+
background: var(--rel-color-bg-primary);
|
|
52
53
|
border: none;
|
|
54
|
+
border-radius: 0;
|
|
53
55
|
cursor: pointer;
|
|
54
|
-
font-weight: var(--rel-fontWeights-medium
|
|
55
|
-
border-right:
|
|
56
|
-
transition:
|
|
57
|
-
color: var(--rel-text-heading
|
|
58
|
-
font-family: var(--rel-fontFamilies-primary
|
|
56
|
+
font-weight: var(--rel-fontWeights-medium);
|
|
57
|
+
border-right: 1px solid var(--rel-color-border-default);
|
|
58
|
+
transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
59
|
+
color: var(--rel-color-text-heading);
|
|
60
|
+
font-family: var(--rel-fontFamilies-primary);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
.segment:
|
|
62
|
-
|
|
63
|
-
outline-offset: -2px;
|
|
64
|
-
z-index: 1;
|
|
63
|
+
.segment:first-child {
|
|
64
|
+
border-radius: var(--rel-borders-radius-border-radius-100) 0 0 var(--rel-borders-radius-border-radius-100);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.segment:last-child {
|
|
68
|
+
border-radius: 0 var(--rel-borders-radius-border-radius-100) var(--rel-borders-radius-border-radius-100) 0;
|
|
68
69
|
border-right: none;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
.segment:focus-visible {
|
|
73
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
74
|
+
outline-offset: -2px;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
/* Hover */
|
|
72
79
|
.segment:hover:not(.disabled):not(.active) {
|
|
73
|
-
background: var(--rel-
|
|
80
|
+
background: var(--rel-color-bg-hover);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
/* Active */
|
|
77
84
|
.segment.active {
|
|
78
|
-
background:
|
|
79
|
-
color:
|
|
85
|
+
background: #2B2B2B;
|
|
86
|
+
color: #FFFFFF;
|
|
87
|
+
border-radius: var(--rel-borders-radius-border-radius-100) !important;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
.segment.active:hover:not(.disabled) {
|
|
83
|
-
background:
|
|
84
|
-
color:
|
|
91
|
+
background: #333333;
|
|
92
|
+
color: #FFFFFF;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Dark mode active override */
|
|
96
|
+
:host-context([data-theme="dark"]) .segment.active,
|
|
97
|
+
:host-context(.dark) .segment.active {
|
|
98
|
+
background: #F5F5F5;
|
|
99
|
+
color: #1A1A1A;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host-context([data-theme="dark"]) .segment.active:hover,
|
|
103
|
+
:host-context(.dark) .segment.active:hover {
|
|
104
|
+
background: #D4D4D4;
|
|
105
|
+
color: #1A1A1A;
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
/* Disabled */
|
|
88
109
|
.segment.disabled,
|
|
89
110
|
.segment:disabled {
|
|
90
111
|
cursor: not-allowed;
|
|
112
|
+
pointer-events: auto;
|
|
91
113
|
opacity: 0.5;
|
|
92
|
-
background: var(--rel-
|
|
93
|
-
color: var(--rel-text-disabled
|
|
94
|
-
pointer-events: none;
|
|
114
|
+
background: var(--rel-color-bg-tertiary);
|
|
115
|
+
color: var(--rel-color-text-disabled);
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
/* Sizes */
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
4
|
+
import "@reliability-design/icons/rel-icon";
|
|
3
5
|
|
|
4
6
|
export type SelectState = "default" | "error" | "disabled";
|
|
5
7
|
export type SelectSize = "small" | "medium" | "large";
|
|
@@ -28,7 +30,7 @@ export class RelSelect extends LitElement {
|
|
|
28
30
|
static styles = css`
|
|
29
31
|
:host {
|
|
30
32
|
display: block;
|
|
31
|
-
font-family: var(--rel-fontFamilies-primary
|
|
33
|
+
font-family: var(--rel-fontFamilies-primary);
|
|
32
34
|
width: 100%;
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -42,7 +44,7 @@ export class RelSelect extends LitElement {
|
|
|
42
44
|
font-size: var(--rel-fontSizes-sm);
|
|
43
45
|
margin-bottom: var(--rel-spacing-space-3xs);
|
|
44
46
|
font-weight: var(--rel-fontWeights-medium);
|
|
45
|
-
color: var(--rel-
|
|
47
|
+
color: var(--rel-color-text-heading);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
.select-container {
|
|
@@ -60,55 +62,74 @@ export class RelSelect extends LitElement {
|
|
|
60
62
|
top: 50%;
|
|
61
63
|
transform: translateY(-50%);
|
|
62
64
|
font-size: 16px;
|
|
63
|
-
color: var(--rel-
|
|
65
|
+
color: var(--rel-color-text-primary);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
.icon.left {
|
|
67
|
-
left:
|
|
69
|
+
left: 10px;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: 50%;
|
|
73
|
+
transform: translateY(-50%);
|
|
68
74
|
}
|
|
69
75
|
|
|
70
76
|
.icon.right {
|
|
71
77
|
right: 36px;
|
|
72
78
|
}
|
|
73
79
|
|
|
80
|
+
.icon.chevron {
|
|
81
|
+
right: 12px;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 50%;
|
|
85
|
+
transform: translateY(-50%);
|
|
86
|
+
color: var(--rel-color-text-primary);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.select-error .icon.chevron {
|
|
90
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.select-disabled .icon.chevron {
|
|
94
|
+
color: var(--rel-color-text-disabled);
|
|
95
|
+
}
|
|
96
|
+
|
|
74
97
|
select {
|
|
75
98
|
flex: 1;
|
|
76
99
|
appearance: none;
|
|
77
|
-
border: 1px solid var(--rel-
|
|
78
|
-
background-color: var(--rel-
|
|
79
|
-
|
|
80
|
-
background-repeat: no-repeat;
|
|
81
|
-
background-position: right 12px center;
|
|
82
|
-
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
100
|
+
border: 1px solid var(--rel-color-border-default);
|
|
101
|
+
background-color: var(--rel-color-bg-primary);
|
|
102
|
+
font-family: var(--rel-fontFamilies-primary);
|
|
83
103
|
cursor: pointer;
|
|
84
|
-
transition:
|
|
85
|
-
color: var(--rel-text-heading
|
|
104
|
+
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
|
|
105
|
+
color: var(--rel-color-text-heading);
|
|
86
106
|
width: 100%;
|
|
87
107
|
outline: none;
|
|
88
108
|
}
|
|
89
109
|
|
|
90
110
|
select:hover:not(:disabled) {
|
|
91
|
-
border-color: var(--rel-
|
|
111
|
+
border-color: var(--rel-color-text-primary);
|
|
92
112
|
}
|
|
93
113
|
|
|
94
114
|
select:focus-visible:not(:disabled) {
|
|
95
|
-
border-color: var(--rel-
|
|
96
|
-
box-shadow: 0 0 0 2px var(--rel-
|
|
115
|
+
border-color: var(--rel-color-border-focus);
|
|
116
|
+
box-shadow: 0 0 0 2px var(--rel-color-border-focus);
|
|
97
117
|
}
|
|
98
118
|
|
|
99
119
|
/* States */
|
|
100
120
|
select.error {
|
|
101
|
-
border-color: var(--rel-
|
|
121
|
+
border-color: var(--rel-error-surface-default, #D50000);
|
|
122
|
+
border-width: 2px;
|
|
102
123
|
}
|
|
103
124
|
|
|
104
125
|
select.error:focus {
|
|
105
|
-
box-shadow: 0 0 0 3px var(--rel-
|
|
126
|
+
box-shadow: 0 0 0 3px var(--rel-error-surface-light);
|
|
106
127
|
}
|
|
107
128
|
|
|
108
129
|
select:disabled {
|
|
109
|
-
background-color: var(--rel-
|
|
110
|
-
border-color: var(--rel-
|
|
111
|
-
color: var(--rel-text-disabled
|
|
130
|
+
background-color: var(--rel-color-bg-tertiary);
|
|
131
|
+
border-color: var(--rel-color-border-default);
|
|
132
|
+
color: var(--rel-color-text-disabled);
|
|
112
133
|
cursor: not-allowed;
|
|
113
134
|
opacity: 0.6;
|
|
114
135
|
}
|
|
@@ -116,19 +137,19 @@ export class RelSelect extends LitElement {
|
|
|
116
137
|
/* Sizes */
|
|
117
138
|
.select-small select {
|
|
118
139
|
font-size: var(--rel-fontSizes-xs);
|
|
119
|
-
padding: var(--rel-spacing-space-3xs)
|
|
140
|
+
padding: var(--rel-spacing-space-3xs) 36px
|
|
120
141
|
var(--rel-spacing-space-3xs) var(--rel-spacing-space-2xs);
|
|
121
142
|
}
|
|
122
143
|
|
|
123
144
|
.select-medium select {
|
|
124
145
|
font-size: var(--rel-fontSizes-sm);
|
|
125
|
-
padding: var(--rel-spacing-space-2xs)
|
|
146
|
+
padding: var(--rel-spacing-space-2xs) 40px
|
|
126
147
|
var(--rel-spacing-space-2xs) var(--rel-spacing-space-xs);
|
|
127
148
|
}
|
|
128
149
|
|
|
129
150
|
.select-large select {
|
|
130
151
|
font-size: var(--rel-fontSizes-md);
|
|
131
|
-
padding: var(--rel-spacing-space-xs)
|
|
152
|
+
padding: var(--rel-spacing-space-xs) 44px
|
|
132
153
|
var(--rel-spacing-space-xs) var(--rel-spacing-space-sm);
|
|
133
154
|
}
|
|
134
155
|
|
|
@@ -159,7 +180,7 @@ export class RelSelect extends LitElement {
|
|
|
159
180
|
|
|
160
181
|
/* Border */
|
|
161
182
|
.border-rounded select {
|
|
162
|
-
border-radius: var(--rel-borders-radius-border-radius-
|
|
183
|
+
border-radius: var(--rel-borders-radius-border-radius-100);
|
|
163
184
|
}
|
|
164
185
|
|
|
165
186
|
.border-sharp select {
|
|
@@ -170,14 +191,76 @@ export class RelSelect extends LitElement {
|
|
|
170
191
|
.supporting-text {
|
|
171
192
|
font-size: var(--rel-fontSizes-xs);
|
|
172
193
|
margin-top: var(--rel-spacing-space-3xs);
|
|
173
|
-
color: var(--rel-
|
|
194
|
+
color: var(--rel-color-text-placeholder);
|
|
174
195
|
}
|
|
175
196
|
|
|
176
197
|
.error-text {
|
|
177
|
-
color: var(--rel-
|
|
198
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
178
199
|
}
|
|
200
|
+
|
|
201
|
+
.select-error .select-label {
|
|
202
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Dark mode — flip select background, text, border */
|
|
206
|
+
:host-context([data-theme="dark"]) select,
|
|
207
|
+
:host-context(.dark) select {
|
|
208
|
+
background-color: var(--rel-color-bg-secondary);
|
|
209
|
+
color: #ffffff;
|
|
210
|
+
border-color: var(--rel-color-border-default);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:host-context([data-theme="dark"]) select.error,
|
|
214
|
+
:host-context(.dark) select.error {
|
|
215
|
+
border-color: var(--rel-error-surface-default, #FF5252);
|
|
216
|
+
border-width: 2px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Error — placeholder text red */
|
|
220
|
+
select.error::placeholder {
|
|
221
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Error — selected/placeholder option text red */
|
|
225
|
+
.select-error select {
|
|
226
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Error — icon red */
|
|
230
|
+
.select-error .icon,
|
|
231
|
+
.select-error rel-icon {
|
|
232
|
+
color: var(--rel-error-surface-default, #D50000);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:host-context([data-theme="dark"]) .select-error select,
|
|
236
|
+
:host-context(.dark) .select-error select {
|
|
237
|
+
color: var(--rel-error-surface-default, #FF5252);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:host-context([data-theme="dark"]) .select-error .icon,
|
|
241
|
+
:host-context([data-theme="dark"]) .select-error rel-icon,
|
|
242
|
+
:host-context(.dark) .select-error .icon,
|
|
243
|
+
:host-context(.dark) .select-error rel-icon {
|
|
244
|
+
color: var(--rel-error-surface-default, #FF5252);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Disabled label */
|
|
248
|
+
.select-disabled .select-label {
|
|
249
|
+
color: var(--rel-color-text-disabled);
|
|
250
|
+
cursor: not-allowed;
|
|
251
|
+
user-select: none;
|
|
252
|
+
}
|
|
253
|
+
|
|
179
254
|
`;
|
|
180
255
|
|
|
256
|
+
connectedCallback() {
|
|
257
|
+
super.connectedCallback();
|
|
258
|
+
const leftIcon = this.getAttribute('left-icon');
|
|
259
|
+
if (leftIcon) this.leftIcon = leftIcon;
|
|
260
|
+
const rightIcon = this.getAttribute('right-icon');
|
|
261
|
+
if (rightIcon) this.rightIcon = rightIcon;
|
|
262
|
+
}
|
|
263
|
+
|
|
181
264
|
private onChange(event: Event) {
|
|
182
265
|
const value = (event.target as HTMLSelectElement).value;
|
|
183
266
|
this.selected = value;
|
|
@@ -220,7 +303,7 @@ export class RelSelect extends LitElement {
|
|
|
220
303
|
|
|
221
304
|
<div class="${containerClasses}">
|
|
222
305
|
${this.leftIcon
|
|
223
|
-
? html`<
|
|
306
|
+
? html`<rel-icon name="${this.leftIcon}" size="sm" class="icon left"></rel-icon>`
|
|
224
307
|
: ""}
|
|
225
308
|
|
|
226
309
|
<select
|
|
@@ -243,6 +326,8 @@ export class RelSelect extends LitElement {
|
|
|
243
326
|
${this.rightIcon
|
|
244
327
|
? html`<span class="icon right">${this.rightIcon}</span>`
|
|
245
328
|
: ""}
|
|
329
|
+
|
|
330
|
+
<rel-icon name="chevron-down" size="sm" class="icon chevron"></rel-icon>
|
|
246
331
|
</div>
|
|
247
332
|
|
|
248
333
|
${this.supportingText
|