@reliability-design/web 1.2.0 → 1.3.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 +289 -135
- package/dist/components/rel-avatar/README.md +15 -4
- package/dist/components/rel-avatar/rel-avatar.ts +138 -96
- package/dist/components/rel-badge/README.md +7 -0
- package/dist/components/rel-badge/rel-badge.ts +38 -2
- package/dist/components/rel-button/rel-button.ts +29 -7
- package/dist/components/rel-chip/README.md +7 -0
- package/dist/components/rel-chip/rel-chip.ts +250 -130
- package/dist/components/rel-drawer/rel-drawer.ts +5 -2
- package/dist/components/rel-menubar/rel-menubar.ts +1 -0
- package/dist/components/rel-pagination/rel-pagination.ts +442 -425
- package/dist/components/rel-radio/rel-radio.ts +16 -16
- package/dist/components/rel-range-picker/rel-range-picker.css +349 -349
- package/dist/components/rel-range-picker/rel-range-picker.ts +1080 -1079
- package/dist/components/rel-select/README.md +34 -28
- package/dist/components/rel-select/rel-select.ts +1015 -346
- package/dist/components/rel-sheet/rel-sheet.ts +6 -3
- package/dist/components/rel-skeleton/rel-skeleton.ts +139 -0
- package/dist/components/rel-textfield/rel-textfield.ts +49 -1
- package/dist/components/rel-toast/rel-toast.ts +1 -6
- package/dist/index.d.mts +164 -22
- package/dist/index.d.ts +164 -22
- package/dist/index.js +2127 -927
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2139 -940
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,6 +66,7 @@ __export(index_exports, {
|
|
|
66
66
|
RelResizablePanel: () => RelResizablePanel,
|
|
67
67
|
RelSegmentedButton: () => RelSegmentedButton,
|
|
68
68
|
RelSelect: () => RelSelect,
|
|
69
|
+
RelSkeleton: () => RelSkeleton,
|
|
69
70
|
RelSlider: () => RelSlider,
|
|
70
71
|
RelSnackbar: () => RelSnackbar,
|
|
71
72
|
RelStepper: () => RelStepper,
|
|
@@ -90,6 +91,7 @@ var import_vars = require("./vars-I2PC74XD.css");
|
|
|
90
91
|
|
|
91
92
|
// src/components/rel-accordion/rel-accordion.ts
|
|
92
93
|
var import_vars_v2 = require("./vars-v2-VMGWTFJZ.css");
|
|
94
|
+
var import_rel_icon = require("@reliability-design/icons/rel-icon");
|
|
93
95
|
var import_lit = require("lit");
|
|
94
96
|
var import_decorators = require("lit/decorators.js");
|
|
95
97
|
var RelAccordion = class extends import_lit.LitElement {
|
|
@@ -97,6 +99,8 @@ var RelAccordion = class extends import_lit.LitElement {
|
|
|
97
99
|
super(...arguments);
|
|
98
100
|
this.title = "Accordion";
|
|
99
101
|
this.open = false;
|
|
102
|
+
this.size = "md";
|
|
103
|
+
this.type = "default";
|
|
100
104
|
}
|
|
101
105
|
toggle() {
|
|
102
106
|
this.open = !this.open;
|
|
@@ -108,13 +112,6 @@ var RelAccordion = class extends import_lit.LitElement {
|
|
|
108
112
|
})
|
|
109
113
|
);
|
|
110
114
|
}
|
|
111
|
-
chevron() {
|
|
112
|
-
return import_lit.html`
|
|
113
|
-
<svg viewBox="0 0 24 24">
|
|
114
|
-
<polyline points="6 9 12 15 18 9"></polyline>
|
|
115
|
-
</svg>
|
|
116
|
-
`;
|
|
117
|
-
}
|
|
118
115
|
render() {
|
|
119
116
|
return import_lit.html`
|
|
120
117
|
<div class="accordion">
|
|
@@ -131,12 +128,20 @@ var RelAccordion = class extends import_lit.LitElement {
|
|
|
131
128
|
}
|
|
132
129
|
}}
|
|
133
130
|
>
|
|
134
|
-
<div class="title"
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
<div class="title-row">
|
|
132
|
+
${this.type === "action" ? import_lit.html`<span class="leading-icon">
|
|
133
|
+
<slot name="icon">
|
|
134
|
+
<span class="icon-rotate-on-open"><rel-icon name="chevron-right"></rel-icon></span>
|
|
135
|
+
</slot>
|
|
136
|
+
</span>` : ""}
|
|
137
|
+
<span class="title">${this.title}</span>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="chevron">
|
|
140
|
+
<slot name="trailing-icon">
|
|
141
|
+
${this.type === "default" ? import_lit.html`<span class="chevron-rotate"><rel-icon name="chevron-down"></rel-icon></span>` : import_lit.html`<rel-icon name="arrow-expansion"></rel-icon>`}
|
|
142
|
+
</slot>
|
|
137
143
|
</div>
|
|
138
144
|
</div>
|
|
139
|
-
<!-- IMPORTANT: slot is ALWAYS rendered -->
|
|
140
145
|
<div class="body ${this.open ? "open" : ""}">
|
|
141
146
|
<slot></slot>
|
|
142
147
|
</div>
|
|
@@ -150,77 +155,219 @@ RelAccordion.styles = import_lit.css`
|
|
|
150
155
|
width: 100%;
|
|
151
156
|
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
152
157
|
}
|
|
158
|
+
|
|
153
159
|
.accordion {
|
|
154
|
-
background: var(--rel-color-bg-primary);
|
|
155
|
-
border:
|
|
156
|
-
border-bottom: 1px solid var(--rel-gray-text-placeholder);
|
|
157
|
-
border-radius: 0;
|
|
160
|
+
background: var(--rel-color-bg-primary, #ffffff);
|
|
161
|
+
border-radius: 8px;
|
|
158
162
|
overflow: hidden;
|
|
163
|
+
box-shadow: 0 2px 4px rgba(11, 11, 11, 0.1);
|
|
159
164
|
}
|
|
160
|
-
|
|
165
|
+
|
|
166
|
+
/* ── Header ───────────────────────────────────────────────── */
|
|
167
|
+
|
|
161
168
|
.header {
|
|
162
169
|
display: flex;
|
|
163
170
|
justify-content: space-between;
|
|
164
171
|
align-items: center;
|
|
165
|
-
padding: var(--rel-spacing-space-md, 16px);
|
|
166
172
|
cursor: pointer;
|
|
167
173
|
user-select: none;
|
|
168
|
-
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
/* matches .accordion's radius so the focus-visible outline isn't clipped square at the corners by the parent's overflow:hidden */
|
|
176
|
+
border-radius: 8px;
|
|
169
177
|
}
|
|
170
|
-
|
|
171
|
-
|
|
178
|
+
|
|
179
|
+
:host([size="md"]) .header {
|
|
180
|
+
padding: 8px 8px 8px 16px;
|
|
181
|
+
min-height: 56px;
|
|
172
182
|
}
|
|
173
|
-
|
|
174
|
-
|
|
183
|
+
|
|
184
|
+
:host([size="sm"]) .header {
|
|
185
|
+
padding: 8px 8px 8px 12px;
|
|
186
|
+
min-height: 48px;
|
|
175
187
|
}
|
|
188
|
+
|
|
189
|
+
.header:hover {
|
|
190
|
+
background: var(--rel-color-bg-secondary, #f5f5f5);
|
|
191
|
+
}
|
|
192
|
+
|
|
176
193
|
.header:focus-visible {
|
|
177
194
|
outline: 2px solid var(--rel-color-border-focus);
|
|
178
195
|
outline-offset: -2px;
|
|
179
196
|
}
|
|
197
|
+
|
|
198
|
+
/* ── Title row ────────────────────────────────────────────── */
|
|
199
|
+
|
|
200
|
+
.title-row {
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
gap: 8px;
|
|
204
|
+
flex: 1;
|
|
205
|
+
}
|
|
206
|
+
|
|
180
207
|
.title {
|
|
208
|
+
font-weight: var(--rel-fontWeights-semibold, 600);
|
|
209
|
+
color: var(--rel-color-text-default, #0b0b0b);
|
|
210
|
+
letter-spacing: -0.3px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:host([size="md"]) .title {
|
|
181
214
|
font-size: var(--rel-fontSizes-lg, 20px);
|
|
182
|
-
|
|
183
|
-
color: var(--rel-text-heading, #2b2b2b);
|
|
215
|
+
line-height: 28px;
|
|
184
216
|
}
|
|
185
|
-
|
|
186
|
-
.
|
|
217
|
+
|
|
218
|
+
:host([size="sm"]) .title {
|
|
219
|
+
font-size: 16px;
|
|
220
|
+
line-height: 24px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* ── Leading icon (action type) ───────────────────────────── */
|
|
224
|
+
|
|
225
|
+
.leading-icon {
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
flex-shrink: 0;
|
|
230
|
+
color: var(--rel-color-text-default, #0b0b0b);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.leading-icon ::slotted(svg) {
|
|
234
|
+
width: 24px;
|
|
235
|
+
height: 24px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.leading-icon rel-icon,
|
|
239
|
+
.leading-icon ::slotted(rel-icon) {
|
|
240
|
+
--rel-icon-size: 24px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:host([size="sm"]) .leading-icon ::slotted(svg) {
|
|
187
244
|
width: 20px;
|
|
188
245
|
height: 20px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:host([size="sm"]) .leading-icon rel-icon,
|
|
249
|
+
:host([size="sm"]) .leading-icon ::slotted(rel-icon) {
|
|
250
|
+
--rel-icon-size: 20px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* ── Chevron ──────────────────────────────────────────────── */
|
|
254
|
+
|
|
255
|
+
.chevron {
|
|
189
256
|
display: flex;
|
|
190
257
|
align-items: center;
|
|
191
258
|
justify-content: center;
|
|
192
|
-
|
|
259
|
+
flex-shrink: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host([size="md"]) .chevron {
|
|
263
|
+
width: 40px;
|
|
264
|
+
height: 40px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
:host([size="sm"]) .chevron {
|
|
268
|
+
width: 32px;
|
|
269
|
+
height: 32px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.chevron ::slotted(svg) {
|
|
273
|
+
width: 24px;
|
|
274
|
+
height: 24px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.chevron rel-icon,
|
|
278
|
+
.chevron ::slotted(rel-icon) {
|
|
279
|
+
--rel-icon-size: 24px;
|
|
280
|
+
color: var(--rel-color-text-default, #0b0b0b);
|
|
193
281
|
}
|
|
194
|
-
|
|
282
|
+
|
|
283
|
+
:host([size="sm"]) .chevron ::slotted(svg) {
|
|
195
284
|
width: 20px;
|
|
196
285
|
height: 20px;
|
|
197
|
-
stroke: var(--rel-text-primary, #333);
|
|
198
|
-
stroke-width: 2;
|
|
199
|
-
fill: none;
|
|
200
|
-
stroke-linecap: round;
|
|
201
|
-
stroke-linejoin: round;
|
|
202
286
|
}
|
|
203
|
-
|
|
287
|
+
|
|
288
|
+
:host([size="sm"]) .chevron rel-icon,
|
|
289
|
+
:host([size="sm"]) .chevron ::slotted(rel-icon) {
|
|
290
|
+
--rel-icon-size: 20px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* ── Icon rotation ────────────────────────────────────────── */
|
|
294
|
+
/* Only the shadow-DOM fallback wrappers rotate on open.
|
|
295
|
+
Slotted (light-DOM) icons are never targeted, so they stay static. */
|
|
296
|
+
|
|
297
|
+
.icon-rotate-on-open,
|
|
298
|
+
.chevron-rotate {
|
|
299
|
+
display: inline-flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
transition: transform 0.25s ease;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* Leading fallback chevron: 90° (points right when open) */
|
|
305
|
+
:host([open]) .icon-rotate-on-open {
|
|
306
|
+
transform: rotate(90deg);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Trailing fallback chevron (type="default" only): 180° flip */
|
|
310
|
+
:host([open]) .chevron-rotate {
|
|
204
311
|
transform: rotate(180deg);
|
|
205
312
|
}
|
|
206
|
-
|
|
313
|
+
|
|
314
|
+
/* ── Body ─────────────────────────────────────────────────── */
|
|
315
|
+
|
|
207
316
|
.body {
|
|
208
317
|
overflow: hidden;
|
|
209
318
|
max-height: 0;
|
|
210
|
-
padding: 0
|
|
319
|
+
padding: 0 16px;
|
|
211
320
|
font-size: var(--rel-fontSizes-md, 14px);
|
|
212
|
-
|
|
321
|
+
line-height: 22px;
|
|
322
|
+
/* Figma spec value — --rel-color-text-secondary resolves to #9e9e9e (gray-disabled-text), not this */
|
|
323
|
+
color: var(--rel-accordion-body-color, #525252);
|
|
213
324
|
transition:
|
|
214
325
|
max-height 0.25s ease,
|
|
215
326
|
padding 0.2s ease;
|
|
216
327
|
}
|
|
328
|
+
|
|
329
|
+
:host([size="sm"]) .body {
|
|
330
|
+
font-size: var(--rel-fontSizes-sm, 12px);
|
|
331
|
+
line-height: 20px;
|
|
332
|
+
}
|
|
333
|
+
|
|
217
334
|
.body.open {
|
|
218
335
|
max-height: 1000px;
|
|
219
|
-
padding:
|
|
220
|
-
var(--rel-spacing-space-md, 16px) var(--rel-spacing-space-lg, 20px);
|
|
336
|
+
padding: 4px 16px 16px;
|
|
221
337
|
}
|
|
338
|
+
|
|
339
|
+
/* ── Dark mode ────────────────────────────────────────────── */
|
|
340
|
+
|
|
341
|
+
:host-context([data-theme="dark"]) .accordion,
|
|
342
|
+
[data-theme="dark"] .accordion {
|
|
343
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
:host-context([data-theme="dark"]) .title,
|
|
347
|
+
[data-theme="dark"] .title {
|
|
348
|
+
color: var(--rel-color-text-default-dark, #f5f5f5);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
:host-context([data-theme="dark"]) .chevron rel-icon,
|
|
352
|
+
[data-theme="dark"] .chevron rel-icon,
|
|
353
|
+
:host-context([data-theme="dark"]) .chevron ::slotted(rel-icon),
|
|
354
|
+
[data-theme="dark"] .chevron ::slotted(rel-icon) {
|
|
355
|
+
color: var(--rel-color-text-default-dark, #f5f5f5);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:host-context([data-theme="dark"]) .leading-icon,
|
|
359
|
+
[data-theme="dark"] .leading-icon {
|
|
360
|
+
color: var(--rel-color-text-default-dark, #f5f5f5);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
:host-context([data-theme="dark"]) .body,
|
|
364
|
+
[data-theme="dark"] .body {
|
|
365
|
+
color: var(--rel-accordion-body-color-dark, #a3a3a3);
|
|
366
|
+
}
|
|
367
|
+
|
|
222
368
|
@media (prefers-reduced-motion: reduce) {
|
|
223
|
-
.icon,
|
|
369
|
+
.icon-rotate-on-open,
|
|
370
|
+
.chevron-rotate,
|
|
224
371
|
.body {
|
|
225
372
|
transition: none;
|
|
226
373
|
}
|
|
@@ -232,6 +379,12 @@ __decorateClass([
|
|
|
232
379
|
__decorateClass([
|
|
233
380
|
(0, import_decorators.property)({ type: Boolean, reflect: true })
|
|
234
381
|
], RelAccordion.prototype, "open", 2);
|
|
382
|
+
__decorateClass([
|
|
383
|
+
(0, import_decorators.property)({ type: String, reflect: true })
|
|
384
|
+
], RelAccordion.prototype, "size", 2);
|
|
385
|
+
__decorateClass([
|
|
386
|
+
(0, import_decorators.property)({ type: String, reflect: true })
|
|
387
|
+
], RelAccordion.prototype, "type", 2);
|
|
235
388
|
RelAccordion = __decorateClass([
|
|
236
389
|
(0, import_decorators.customElement)("rel-accordion")
|
|
237
390
|
], RelAccordion);
|
|
@@ -561,14 +714,16 @@ var RelAvatar = class extends import_lit3.LitElement {
|
|
|
561
714
|
super(...arguments);
|
|
562
715
|
this.size = "md";
|
|
563
716
|
this.type = "image";
|
|
717
|
+
this.variant = "fill";
|
|
564
718
|
this.src = "";
|
|
565
719
|
this.text = "";
|
|
566
720
|
this.alt = "Avatar";
|
|
567
721
|
this.bg = "";
|
|
722
|
+
this.color = "";
|
|
568
723
|
}
|
|
569
724
|
render() {
|
|
570
725
|
return import_lit3.html`
|
|
571
|
-
<div class="avatar avatar-${this.size}" style=${this.bg ? `background-color:
|
|
726
|
+
<div class="avatar avatar-${this.size}" style=${[this.bg ? `background-color:${this.bg}` : "", this.color ? `color:${this.color}` : ""].filter(Boolean).join(";")}>
|
|
572
727
|
${this.type === "image" && this.src ? import_lit3.html`<img src=${this.src} alt=${this.alt} />` : this.type === "text" ? import_lit3.html`<span>${this.text}</span>` : import_lit3.html`<span class="icon-slot"><slot></slot></span>`}
|
|
573
728
|
</div>
|
|
574
729
|
`;
|
|
@@ -586,59 +741,97 @@ RelAvatar.styles = import_lit3.css`
|
|
|
586
741
|
justify-content: center;
|
|
587
742
|
border-radius: 50%;
|
|
588
743
|
overflow: hidden;
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
font-weight: var(--rel-fontWeights-bold);
|
|
593
|
-
|
|
744
|
+
box-sizing: border-box;
|
|
745
|
+
border: var(--rel-borders-width-stroke-100, 1px) solid transparent;
|
|
746
|
+
font-weight: var(--rel-fontWeights-semibold);
|
|
594
747
|
user-select: none;
|
|
595
748
|
text-transform: uppercase;
|
|
596
749
|
}
|
|
597
750
|
|
|
598
|
-
/*
|
|
751
|
+
/* ── Variants ─────────────────────────────────────────────── */
|
|
752
|
+
|
|
753
|
+
:host([variant="fill"]) .avatar {
|
|
754
|
+
background-color: var(--rel-avatar-bg-fill, #0b0b0b);
|
|
755
|
+
color: var(--rel-avatar-color-fill, #ffffff);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
:host([variant="subtle"]) .avatar {
|
|
759
|
+
background-color: var(--rel-avatar-bg-subtle, #f5f5f5);
|
|
760
|
+
color: var(--rel-avatar-color-subtle, #0b0b0b);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
:host([variant="outline"]) .avatar {
|
|
764
|
+
background-color: transparent;
|
|
765
|
+
border-color: var(--rel-avatar-border-outline, var(--rel-color-border-default));
|
|
766
|
+
color: var(--rel-avatar-color-outline, #0b0b0b);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/* ── Sizes ────────────────────────────────────────────────── */
|
|
770
|
+
|
|
599
771
|
.avatar-lg {
|
|
600
772
|
width: 40px;
|
|
601
773
|
height: 40px;
|
|
602
|
-
font-size: var(--rel-fontSizes-
|
|
774
|
+
font-size: var(--rel-fontSizes-lg); /* 20px */
|
|
603
775
|
}
|
|
604
776
|
|
|
605
777
|
.avatar-md {
|
|
606
778
|
width: 32px;
|
|
607
779
|
height: 32px;
|
|
608
|
-
font-size:
|
|
780
|
+
font-size: 16px;
|
|
609
781
|
}
|
|
610
782
|
|
|
611
783
|
.avatar-sm {
|
|
612
784
|
width: 24px;
|
|
613
785
|
height: 24px;
|
|
614
|
-
font-size: var(--rel-fontSizes-
|
|
786
|
+
font-size: var(--rel-fontSizes-sm); /* 12px */
|
|
615
787
|
}
|
|
616
788
|
|
|
617
789
|
.avatar-xs {
|
|
618
|
-
width:
|
|
619
|
-
height:
|
|
620
|
-
font-size: var(--rel-fontSizes-xs);
|
|
790
|
+
width: 20px;
|
|
791
|
+
height: 20px;
|
|
792
|
+
font-size: var(--rel-fontSizes-xs); /* 10px */
|
|
621
793
|
}
|
|
622
794
|
|
|
795
|
+
/* ── Image ────────────────────────────────────────────────── */
|
|
796
|
+
|
|
623
797
|
img {
|
|
624
798
|
width: 100%;
|
|
625
799
|
height: 100%;
|
|
626
800
|
object-fit: cover;
|
|
627
801
|
}
|
|
628
802
|
|
|
803
|
+
/* ── Icon slot ────────────────────────────────────────────── */
|
|
804
|
+
|
|
629
805
|
.icon-slot {
|
|
630
806
|
width: 100%;
|
|
631
807
|
height: 100%;
|
|
632
808
|
display: inline-flex;
|
|
633
809
|
align-items: center;
|
|
634
810
|
justify-content: center;
|
|
635
|
-
color:
|
|
811
|
+
color: inherit;
|
|
636
812
|
}
|
|
637
813
|
|
|
638
814
|
.icon-slot ::slotted(svg) {
|
|
639
815
|
width: 50%;
|
|
640
816
|
height: 50%;
|
|
641
817
|
}
|
|
818
|
+
|
|
819
|
+
/* ── Dark mode ────────────────────────────────────────────────
|
|
820
|
+
:host() can never be preceded by a combinator inside a shadow-tree
|
|
821
|
+
stylesheet, so ":host-context(dark) :host([variant=...]) .avatar"
|
|
822
|
+
(the previous approach) is invalid and silently matches nothing.
|
|
823
|
+
Instead, redefine the same custom properties the variant rules
|
|
824
|
+
above already read via var(--token, fallback) — a plain
|
|
825
|
+
:host-context() selector with no compounding, guaranteed valid. ── */
|
|
826
|
+
|
|
827
|
+
:host-context([data-theme="dark"]) {
|
|
828
|
+
--rel-avatar-bg-fill: #ffffff;
|
|
829
|
+
--rel-avatar-color-fill: #0b0b0b;
|
|
830
|
+
--rel-avatar-bg-subtle: #2b2b2b;
|
|
831
|
+
--rel-avatar-color-subtle: #f5f5f5;
|
|
832
|
+
--rel-avatar-border-outline: #525252;
|
|
833
|
+
--rel-avatar-color-outline: #f5f5f5;
|
|
834
|
+
}
|
|
642
835
|
`;
|
|
643
836
|
__decorateClass([
|
|
644
837
|
(0, import_decorators3.property)({ type: String, reflect: true })
|
|
@@ -646,6 +839,9 @@ __decorateClass([
|
|
|
646
839
|
__decorateClass([
|
|
647
840
|
(0, import_decorators3.property)({ type: String, reflect: true })
|
|
648
841
|
], RelAvatar.prototype, "type", 2);
|
|
842
|
+
__decorateClass([
|
|
843
|
+
(0, import_decorators3.property)({ type: String, reflect: true })
|
|
844
|
+
], RelAvatar.prototype, "variant", 2);
|
|
649
845
|
__decorateClass([
|
|
650
846
|
(0, import_decorators3.property)({ type: String })
|
|
651
847
|
], RelAvatar.prototype, "src", 2);
|
|
@@ -658,6 +854,9 @@ __decorateClass([
|
|
|
658
854
|
__decorateClass([
|
|
659
855
|
(0, import_decorators3.property)({ type: String })
|
|
660
856
|
], RelAvatar.prototype, "bg", 2);
|
|
857
|
+
__decorateClass([
|
|
858
|
+
(0, import_decorators3.property)({ type: String })
|
|
859
|
+
], RelAvatar.prototype, "color", 2);
|
|
661
860
|
RelAvatar = __decorateClass([
|
|
662
861
|
(0, import_decorators3.customElement)("rel-avatar")
|
|
663
862
|
], RelAvatar);
|
|
@@ -674,10 +873,28 @@ var RelBadge = class extends import_lit4.LitElement {
|
|
|
674
873
|
this.suffix = "notifications";
|
|
675
874
|
this.size = "md";
|
|
676
875
|
this.variant = "number";
|
|
876
|
+
this.color = "";
|
|
877
|
+
this.textColor = "";
|
|
677
878
|
}
|
|
678
879
|
get classes() {
|
|
679
880
|
return ["badge", `badge-${this.size}`, `badge-${this.variant}`].join(" ");
|
|
680
881
|
}
|
|
882
|
+
updated(changedProperties) {
|
|
883
|
+
if (changedProperties.has("color")) {
|
|
884
|
+
if (this.color) {
|
|
885
|
+
this.style.setProperty("--rel-badge-bg", this.color);
|
|
886
|
+
} else {
|
|
887
|
+
this.style.removeProperty("--rel-badge-bg");
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (changedProperties.has("textColor")) {
|
|
891
|
+
if (this.textColor) {
|
|
892
|
+
this.style.setProperty("--rel-badge-color", this.textColor);
|
|
893
|
+
} else {
|
|
894
|
+
this.style.removeProperty("--rel-badge-color");
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
681
898
|
render() {
|
|
682
899
|
return import_lit4.html`
|
|
683
900
|
<span class="${this.classes}" aria-label=${this.ariaLabel || `${this.number} ${this.suffix}`}>
|
|
@@ -697,8 +914,8 @@ RelBadge.styles = import_lit4.css`
|
|
|
697
914
|
justify-content: center;
|
|
698
915
|
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
699
916
|
font-weight: var(--rel-fontWeights-semibold, 600);
|
|
700
|
-
background-color: var(--rel-error-surface-default);
|
|
701
|
-
color: #ffffff;
|
|
917
|
+
background-color: var(--rel-badge-bg, var(--rel-error-surface-default));
|
|
918
|
+
color: var(--rel-badge-color, #ffffff);
|
|
702
919
|
border-radius: 50%;
|
|
703
920
|
}
|
|
704
921
|
|
|
@@ -752,6 +969,12 @@ __decorateClass([
|
|
|
752
969
|
__decorateClass([
|
|
753
970
|
(0, import_decorators4.property)({ type: String, reflect: true })
|
|
754
971
|
], RelBadge.prototype, "variant", 2);
|
|
972
|
+
__decorateClass([
|
|
973
|
+
(0, import_decorators4.property)({ type: String, reflect: true })
|
|
974
|
+
], RelBadge.prototype, "color", 2);
|
|
975
|
+
__decorateClass([
|
|
976
|
+
(0, import_decorators4.property)({ type: String, reflect: true, attribute: "text-color" })
|
|
977
|
+
], RelBadge.prototype, "textColor", 2);
|
|
755
978
|
RelBadge = __decorateClass([
|
|
756
979
|
(0, import_decorators4.customElement)("rel-badge")
|
|
757
980
|
], RelBadge);
|
|
@@ -869,6 +1092,20 @@ var RelButton = class extends import_lit6.LitElement {
|
|
|
869
1092
|
this.border = "corner-radius";
|
|
870
1093
|
this.disabled = false;
|
|
871
1094
|
this.ariaLabel = null;
|
|
1095
|
+
this.handleHostClick = (e) => {
|
|
1096
|
+
if (this.disabled) {
|
|
1097
|
+
e.preventDefault();
|
|
1098
|
+
e.stopImmediatePropagation();
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
connectedCallback() {
|
|
1103
|
+
super.connectedCallback();
|
|
1104
|
+
this.addEventListener("click", this.handleHostClick, { capture: true });
|
|
1105
|
+
}
|
|
1106
|
+
disconnectedCallback() {
|
|
1107
|
+
this.removeEventListener("click", this.handleHostClick, { capture: true });
|
|
1108
|
+
super.disconnectedCallback();
|
|
872
1109
|
}
|
|
873
1110
|
get classes() {
|
|
874
1111
|
return [
|
|
@@ -884,12 +1121,6 @@ var RelButton = class extends import_lit6.LitElement {
|
|
|
884
1121
|
e.stopImmediatePropagation();
|
|
885
1122
|
return;
|
|
886
1123
|
}
|
|
887
|
-
this.dispatchEvent(
|
|
888
|
-
new MouseEvent("click", {
|
|
889
|
-
bubbles: true,
|
|
890
|
-
composed: true
|
|
891
|
-
})
|
|
892
|
-
);
|
|
893
1124
|
}
|
|
894
1125
|
render() {
|
|
895
1126
|
return import_lit6.html`
|
|
@@ -958,6 +1189,10 @@ RelButton.styles = import_lit6.css`
|
|
|
958
1189
|
/* Disabled */
|
|
959
1190
|
:host([disabled]) {
|
|
960
1191
|
cursor: not-allowed;
|
|
1192
|
+
/* Without this, clicks on a disabled button hit-test fall through the
|
|
1193
|
+
inner button's pointer-events:none straight onto the host, which still
|
|
1194
|
+
dispatches a normal click to any externally-attached listener. */
|
|
1195
|
+
pointer-events: none;
|
|
961
1196
|
}
|
|
962
1197
|
|
|
963
1198
|
:host([disabled]) button {
|
|
@@ -3474,7 +3709,7 @@ RelDatePicker = __decorateClass([
|
|
|
3474
3709
|
// src/components/rel-range-picker/rel-range-picker.ts
|
|
3475
3710
|
var import_lit13 = require("lit");
|
|
3476
3711
|
var import_decorators13 = require("lit/decorators.js");
|
|
3477
|
-
var
|
|
3712
|
+
var import_rel_icon2 = require("@reliability-design/icons/rel-icon");
|
|
3478
3713
|
var import_vars_v211 = require("./vars-v2-VMGWTFJZ.css");
|
|
3479
3714
|
var RelRangePicker = class extends import_lit13.LitElement {
|
|
3480
3715
|
constructor() {
|
|
@@ -3488,6 +3723,14 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3488
3723
|
this.disabled = false;
|
|
3489
3724
|
this.open = false;
|
|
3490
3725
|
this.mode = "popover";
|
|
3726
|
+
this.width = "";
|
|
3727
|
+
this.minWidth = "";
|
|
3728
|
+
this.maxWidth = "";
|
|
3729
|
+
this.height = "";
|
|
3730
|
+
this.minHeight = "";
|
|
3731
|
+
this.maxHeight = "";
|
|
3732
|
+
this.placeholder = "Select date range";
|
|
3733
|
+
this.triggerVariant = "default";
|
|
3491
3734
|
this.draftFrom = "";
|
|
3492
3735
|
this.draftTo = "";
|
|
3493
3736
|
this.draftActivePreset = null;
|
|
@@ -3538,6 +3781,14 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3538
3781
|
document.removeEventListener("click", this.handleClickOutside);
|
|
3539
3782
|
document.removeEventListener("keydown", this.handleGlobalKeydown);
|
|
3540
3783
|
}
|
|
3784
|
+
updated() {
|
|
3785
|
+
this.style.width = this.width;
|
|
3786
|
+
this.style.minWidth = this.minWidth;
|
|
3787
|
+
this.style.maxWidth = this.maxWidth;
|
|
3788
|
+
this.style.height = this.height;
|
|
3789
|
+
this.style.minHeight = this.minHeight;
|
|
3790
|
+
this.style.maxHeight = this.maxHeight;
|
|
3791
|
+
}
|
|
3541
3792
|
toggleOpen() {
|
|
3542
3793
|
if (this.disabled) return;
|
|
3543
3794
|
if (this.open) {
|
|
@@ -3594,7 +3845,7 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3594
3845
|
this.to = this.draftTo;
|
|
3595
3846
|
this.dispatchEvent(
|
|
3596
3847
|
new CustomEvent("rel-change", {
|
|
3597
|
-
detail: { from: this.from, to: this.to },
|
|
3848
|
+
detail: { from: this.from, to: this.to, label: this.displayLabel },
|
|
3598
3849
|
bubbles: true,
|
|
3599
3850
|
composed: true
|
|
3600
3851
|
})
|
|
@@ -3627,6 +3878,10 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3627
3878
|
if (from) return from;
|
|
3628
3879
|
return "";
|
|
3629
3880
|
}
|
|
3881
|
+
/** Formatted "MM/DD/YYYY → MM/DD/YYYY" (or single date / "") for the current committed `from`/`to`. */
|
|
3882
|
+
get displayLabel() {
|
|
3883
|
+
return this.getTriggerLabel();
|
|
3884
|
+
}
|
|
3630
3885
|
// ── Date utilities ──
|
|
3631
3886
|
parseISODate(iso) {
|
|
3632
3887
|
const m = iso.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
@@ -3854,22 +4109,36 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3854
4109
|
const isDraftEmpty = !this.draftFrom && !this.draftTo;
|
|
3855
4110
|
const isPopup = this.mode === "popup";
|
|
3856
4111
|
return import_lit13.html`
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
4112
|
+
${this.triggerVariant === "icon" ? import_lit13.html`
|
|
4113
|
+
<rel-button
|
|
4114
|
+
variant="icon"
|
|
4115
|
+
tone="secondary"
|
|
4116
|
+
?disabled=${this.disabled}
|
|
4117
|
+
aria-haspopup="dialog"
|
|
4118
|
+
aria-expanded=${this.open}
|
|
4119
|
+
aria-label=${triggerLabel || this.placeholder}
|
|
4120
|
+
@click=${() => this.toggleOpen()}
|
|
4121
|
+
>
|
|
4122
|
+
<rel-icon name="calendar-range"></rel-icon>
|
|
4123
|
+
</rel-button>
|
|
4124
|
+
` : import_lit13.html`
|
|
4125
|
+
<button
|
|
4126
|
+
class="trigger-button"
|
|
4127
|
+
type="button"
|
|
4128
|
+
?disabled=${this.disabled}
|
|
4129
|
+
aria-haspopup="dialog"
|
|
4130
|
+
aria-expanded=${this.open}
|
|
4131
|
+
aria-label=${triggerLabel || this.placeholder}
|
|
4132
|
+
@click=${this.toggleOpen}
|
|
4133
|
+
>
|
|
4134
|
+
<span class="trigger-content ${triggerLabel ? "" : "placeholder"}">
|
|
4135
|
+
${triggerLabel || this.placeholder}
|
|
4136
|
+
</span>
|
|
4137
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
|
|
4138
|
+
<path d="M4 2h1V1h2v1h2V1h2v1h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8 3H4v7h8V5z"/>
|
|
4139
|
+
</svg>
|
|
4140
|
+
</button>
|
|
4141
|
+
`}
|
|
3873
4142
|
|
|
3874
4143
|
${isPopup && this.open ? import_lit13.html`<div class="backdrop" @click=${this.cancelPopover}></div>` : import_lit13.nothing}
|
|
3875
4144
|
|
|
@@ -3987,30 +4256,34 @@ var RelRangePicker = class extends import_lit13.LitElement {
|
|
|
3987
4256
|
</div>
|
|
3988
4257
|
|
|
3989
4258
|
<div class="calendar-footer">
|
|
3990
|
-
<button
|
|
3991
|
-
|
|
3992
|
-
|
|
4259
|
+
<rel-button
|
|
4260
|
+
variant="secondary"
|
|
4261
|
+
size="small"
|
|
4262
|
+
border="corner-radius"
|
|
3993
4263
|
?disabled=${isDraftEmpty}
|
|
3994
|
-
@click=${this.resetDraft}
|
|
4264
|
+
@click=${() => this.resetDraft()}
|
|
3995
4265
|
>
|
|
3996
4266
|
Reset
|
|
3997
|
-
</button>
|
|
4267
|
+
</rel-button>
|
|
3998
4268
|
<div class="footer-right">
|
|
3999
|
-
<button
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4269
|
+
<rel-button
|
|
4270
|
+
variant="secondary"
|
|
4271
|
+
size="small"
|
|
4272
|
+
border="corner-radius"
|
|
4273
|
+
@click=${() => this.cancelPopover()}
|
|
4003
4274
|
>
|
|
4004
4275
|
Cancel
|
|
4005
|
-
</button>
|
|
4006
|
-
<button
|
|
4007
|
-
|
|
4008
|
-
|
|
4276
|
+
</rel-button>
|
|
4277
|
+
<rel-button
|
|
4278
|
+
variant="primary"
|
|
4279
|
+
tone="default"
|
|
4280
|
+
size="small"
|
|
4281
|
+
border="corner-radius"
|
|
4009
4282
|
?disabled=${isDraftEmpty}
|
|
4010
|
-
@click=${this.applySelection}
|
|
4283
|
+
@click=${() => this.applySelection()}
|
|
4011
4284
|
>
|
|
4012
4285
|
Apply
|
|
4013
|
-
</button>
|
|
4286
|
+
</rel-button>
|
|
4014
4287
|
</div>
|
|
4015
4288
|
</div>
|
|
4016
4289
|
|
|
@@ -4030,6 +4303,10 @@ RelRangePicker.styles = import_lit13.css`
|
|
|
4030
4303
|
:host([disabled]) {
|
|
4031
4304
|
opacity: 0.6;
|
|
4032
4305
|
cursor: not-allowed;
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4308
|
+
:host([disabled]) .trigger-button,
|
|
4309
|
+
:host([disabled]) rel-button {
|
|
4033
4310
|
pointer-events: none;
|
|
4034
4311
|
}
|
|
4035
4312
|
|
|
@@ -4047,7 +4324,6 @@ RelRangePicker.styles = import_lit13.css`
|
|
|
4047
4324
|
font-size: var(--rel-fontSizes-md, 14px);
|
|
4048
4325
|
color: var(--rel-color-text-primary, #333);
|
|
4049
4326
|
cursor: pointer;
|
|
4050
|
-
min-width: 260px;
|
|
4051
4327
|
width: 100%;
|
|
4052
4328
|
text-align: left;
|
|
4053
4329
|
transition: border-color 0.15s ease;
|
|
@@ -4076,7 +4352,7 @@ RelRangePicker.styles = import_lit13.css`
|
|
|
4076
4352
|
position: absolute;
|
|
4077
4353
|
top: calc(100% + 4px);
|
|
4078
4354
|
left: 0;
|
|
4079
|
-
z-index:
|
|
4355
|
+
z-index: 2147483647;
|
|
4080
4356
|
border: 1px solid var(--rel-color-border-default, #ddd);
|
|
4081
4357
|
border-radius: var(--rel-borders-radius-border-radius-200, 8px);
|
|
4082
4358
|
background: var(--rel-color-bg-primary, #fff);
|
|
@@ -4097,7 +4373,7 @@ RelRangePicker.styles = import_lit13.css`
|
|
|
4097
4373
|
.backdrop {
|
|
4098
4374
|
position: fixed;
|
|
4099
4375
|
inset: 0;
|
|
4100
|
-
z-index:
|
|
4376
|
+
z-index: 2147483646;
|
|
4101
4377
|
background: rgba(0,0,0,0.4);
|
|
4102
4378
|
}
|
|
4103
4379
|
|
|
@@ -4389,58 +4665,13 @@ RelRangePicker.styles = import_lit13.css`
|
|
|
4389
4665
|
gap: 8px;
|
|
4390
4666
|
}
|
|
4391
4667
|
|
|
4392
|
-
.btn-reset,
|
|
4393
|
-
.btn-cancel,
|
|
4394
|
-
.btn-apply {
|
|
4395
|
-
font-family: var(--rel-fontFamilies-primary, Poppins, sans-serif);
|
|
4396
|
-
font-size: var(--rel-fontSizes-md, 14px);
|
|
4397
|
-
font-weight: var(--rel-fontWeights-medium, 500);
|
|
4398
|
-
border-radius: var(--rel-borders-radius-border-radius-500, 1000px);
|
|
4399
|
-
padding: 8px 20px;
|
|
4400
|
-
cursor: pointer;
|
|
4401
|
-
transition: background 0.15s ease, border-color 0.15s ease;
|
|
4402
|
-
white-space: nowrap;
|
|
4403
|
-
}
|
|
4404
|
-
|
|
4405
|
-
.btn-reset,
|
|
4406
|
-
.btn-cancel {
|
|
4407
|
-
background: transparent;
|
|
4408
|
-
border: 1px solid var(--rel-color-border-default, #ddd);
|
|
4409
|
-
color: var(--rel-color-text-primary, #333);
|
|
4410
|
-
}
|
|
4411
|
-
|
|
4412
|
-
.btn-reset:hover:not(:disabled),
|
|
4413
|
-
.btn-cancel:hover {
|
|
4414
|
-
background: var(--rel-color-bg-hover, #f5f5f5);
|
|
4415
|
-
}
|
|
4416
|
-
|
|
4417
|
-
.btn-reset:disabled {
|
|
4418
|
-
opacity: 0.4;
|
|
4419
|
-
cursor: not-allowed;
|
|
4420
|
-
}
|
|
4421
|
-
|
|
4422
|
-
.btn-apply {
|
|
4423
|
-
background: var(--rel-colors-green-primary, #00f49c);
|
|
4424
|
-
border: none;
|
|
4425
|
-
color: #000000;
|
|
4426
|
-
}
|
|
4427
|
-
|
|
4428
|
-
.btn-apply:hover:not(:disabled) {
|
|
4429
|
-
background: var(--rel-colors-green-secondary, #06d98c);
|
|
4430
|
-
}
|
|
4431
|
-
|
|
4432
|
-
.btn-apply:disabled {
|
|
4433
|
-
opacity: 0.4;
|
|
4434
|
-
cursor: not-allowed;
|
|
4435
|
-
}
|
|
4436
|
-
|
|
4437
4668
|
.footer-right {
|
|
4438
4669
|
display: flex;
|
|
4439
4670
|
gap: 8px;
|
|
4440
4671
|
}
|
|
4441
4672
|
|
|
4442
4673
|
@media (prefers-reduced-motion: reduce) {
|
|
4443
|
-
.preset-item, .nav-btn, .day-inner
|
|
4674
|
+
.preset-item, .nav-btn, .day-inner {
|
|
4444
4675
|
transition: none;
|
|
4445
4676
|
}
|
|
4446
4677
|
}
|
|
@@ -4472,6 +4703,30 @@ __decorateClass([
|
|
|
4472
4703
|
__decorateClass([
|
|
4473
4704
|
(0, import_decorators13.property)({ type: String })
|
|
4474
4705
|
], RelRangePicker.prototype, "mode", 2);
|
|
4706
|
+
__decorateClass([
|
|
4707
|
+
(0, import_decorators13.property)({ type: String })
|
|
4708
|
+
], RelRangePicker.prototype, "width", 2);
|
|
4709
|
+
__decorateClass([
|
|
4710
|
+
(0, import_decorators13.property)({ type: String, attribute: "min-width" })
|
|
4711
|
+
], RelRangePicker.prototype, "minWidth", 2);
|
|
4712
|
+
__decorateClass([
|
|
4713
|
+
(0, import_decorators13.property)({ type: String, attribute: "max-width" })
|
|
4714
|
+
], RelRangePicker.prototype, "maxWidth", 2);
|
|
4715
|
+
__decorateClass([
|
|
4716
|
+
(0, import_decorators13.property)({ type: String })
|
|
4717
|
+
], RelRangePicker.prototype, "height", 2);
|
|
4718
|
+
__decorateClass([
|
|
4719
|
+
(0, import_decorators13.property)({ type: String, attribute: "min-height" })
|
|
4720
|
+
], RelRangePicker.prototype, "minHeight", 2);
|
|
4721
|
+
__decorateClass([
|
|
4722
|
+
(0, import_decorators13.property)({ type: String, attribute: "max-height" })
|
|
4723
|
+
], RelRangePicker.prototype, "maxHeight", 2);
|
|
4724
|
+
__decorateClass([
|
|
4725
|
+
(0, import_decorators13.property)({ type: String })
|
|
4726
|
+
], RelRangePicker.prototype, "placeholder", 2);
|
|
4727
|
+
__decorateClass([
|
|
4728
|
+
(0, import_decorators13.property)({ type: String, attribute: "trigger-variant" })
|
|
4729
|
+
], RelRangePicker.prototype, "triggerVariant", 2);
|
|
4475
4730
|
__decorateClass([
|
|
4476
4731
|
(0, import_decorators13.state)()
|
|
4477
4732
|
], RelRangePicker.prototype, "draftFrom", 2);
|
|
@@ -4503,16 +4758,30 @@ RelRangePicker = __decorateClass([
|
|
|
4503
4758
|
// src/components/rel-chip/rel-chip.ts
|
|
4504
4759
|
var import_lit14 = require("lit");
|
|
4505
4760
|
var import_decorators14 = require("lit/decorators.js");
|
|
4761
|
+
var import_rel_icon3 = require("@reliability-design/icons/rel-icon");
|
|
4506
4762
|
var RelChip = class extends import_lit14.LitElement {
|
|
4507
4763
|
constructor() {
|
|
4508
4764
|
super(...arguments);
|
|
4509
4765
|
this.label = "Label";
|
|
4510
|
-
this.tone = "
|
|
4766
|
+
this.tone = "neutral";
|
|
4767
|
+
this.variant = "fill";
|
|
4768
|
+
this.size = "md";
|
|
4769
|
+
this.border = "default";
|
|
4511
4770
|
this.removable = false;
|
|
4512
4771
|
this.removed = false;
|
|
4772
|
+
this.draggableChip = false;
|
|
4773
|
+
this.dragging = false;
|
|
4774
|
+
this.onDragStart = (e) => {
|
|
4775
|
+
if (!this.draggableChip) return;
|
|
4776
|
+
this.dragging = true;
|
|
4777
|
+
e.dataTransfer?.setData("text/plain", this.label);
|
|
4778
|
+
};
|
|
4779
|
+
this.onDragEnd = () => {
|
|
4780
|
+
this.dragging = false;
|
|
4781
|
+
};
|
|
4513
4782
|
}
|
|
4514
4783
|
get classes() {
|
|
4515
|
-
return
|
|
4784
|
+
return "chip";
|
|
4516
4785
|
}
|
|
4517
4786
|
handleRemove(event) {
|
|
4518
4787
|
event.stopPropagation();
|
|
@@ -4524,11 +4793,28 @@ var RelChip = class extends import_lit14.LitElement {
|
|
|
4524
4793
|
})
|
|
4525
4794
|
);
|
|
4526
4795
|
}
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4796
|
+
updated(changed) {
|
|
4797
|
+
if (changed.has("draggableChip")) {
|
|
4798
|
+
if (this.draggableChip) {
|
|
4799
|
+
this.setAttribute("draggable", "true");
|
|
4800
|
+
this.addEventListener("dragstart", this.onDragStart);
|
|
4801
|
+
this.addEventListener("dragend", this.onDragEnd);
|
|
4802
|
+
} else {
|
|
4803
|
+
this.removeAttribute("draggable");
|
|
4804
|
+
this.removeEventListener("dragstart", this.onDragStart);
|
|
4805
|
+
this.removeEventListener("dragend", this.onDragEnd);
|
|
4806
|
+
this.dragging = false;
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4809
|
+
if (changed.has("dragging")) {
|
|
4810
|
+
this.toggleAttribute("dragging", this.dragging);
|
|
4811
|
+
}
|
|
4812
|
+
}
|
|
4813
|
+
render() {
|
|
4814
|
+
const showAvatar = !!this.avatar;
|
|
4815
|
+
const showLeadingIcon = !showAvatar && !!this.leadingIcon;
|
|
4816
|
+
if (this.avatar && this.leadingIcon) {
|
|
4817
|
+
console.warn(
|
|
4532
4818
|
"[rel-chip] leadingIcon and avatar are mutually exclusive. avatar takes precedence."
|
|
4533
4819
|
);
|
|
4534
4820
|
}
|
|
@@ -4540,30 +4826,30 @@ var RelChip = class extends import_lit14.LitElement {
|
|
|
4540
4826
|
aria-label="${this.label}"
|
|
4541
4827
|
>
|
|
4542
4828
|
${showAvatar ? import_lit14.html`<rel-avatar type="text" text=${this.avatar} size="xs"></rel-avatar>` : null}
|
|
4543
|
-
${showLeadingIcon ? import_lit14.html`<
|
|
4544
|
-
${this.renderIcon(this.leadingIcon)}
|
|
4545
|
-
</span>` : null}
|
|
4829
|
+
${showLeadingIcon ? import_lit14.html`<rel-icon class="chip-icon" name="${this.leadingIcon}"></rel-icon>` : null}
|
|
4546
4830
|
|
|
4547
4831
|
<span class="chip-label">${this.label}</span>
|
|
4548
4832
|
|
|
4549
|
-
${this.trailingIcon ? import_lit14.html`<
|
|
4550
|
-
${this.renderIcon(this.trailingIcon)}
|
|
4551
|
-
</span>` : null}
|
|
4833
|
+
${this.trailingIcon ? import_lit14.html`<rel-icon class="chip-icon" name="${this.trailingIcon}"></rel-icon>` : null}
|
|
4552
4834
|
${this.removable ? import_lit14.html`<button
|
|
4553
4835
|
class="chip-remove"
|
|
4554
4836
|
aria-label="Remove ${this.label}"
|
|
4555
4837
|
@click=${this.handleRemove}
|
|
4556
4838
|
>
|
|
4557
|
-
|
|
4839
|
+
<rel-icon name="close"></rel-icon>
|
|
4558
4840
|
</button>` : null}
|
|
4559
4841
|
</span>
|
|
4560
4842
|
`;
|
|
4561
4843
|
}
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4844
|
+
};
|
|
4845
|
+
// The actually-focusable element is the inner <span tabindex="0">, not the
|
|
4846
|
+
// host. Without delegatesFocus, calling host.focus() (e.g. from a parent
|
|
4847
|
+
// component, or a "focus this" demo button) is a no-op since the host
|
|
4848
|
+
// itself carries no tabindex — only real Tab-key traversal would still
|
|
4849
|
+
// reach the inner span, because that walks the flattened DOM regardless.
|
|
4850
|
+
RelChip.shadowRootOptions = {
|
|
4851
|
+
...import_lit14.LitElement.shadowRootOptions,
|
|
4852
|
+
delegatesFocus: true
|
|
4567
4853
|
};
|
|
4568
4854
|
RelChip.styles = import_lit14.css`
|
|
4569
4855
|
:host {
|
|
@@ -4579,108 +4865,184 @@ RelChip.styles = import_lit14.css`
|
|
|
4579
4865
|
.chip {
|
|
4580
4866
|
display: inline-flex;
|
|
4581
4867
|
align-items: center;
|
|
4868
|
+
box-sizing: border-box;
|
|
4582
4869
|
font-family: var(--rel-fontFamilies-primary);
|
|
4583
|
-
font-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
padding: var(--rel-spacing-space-2xs) var(--rel-spacing-space-xs);
|
|
4587
|
-
gap: var(--rel-spacing-space-2xs);
|
|
4870
|
+
font-weight: 500;
|
|
4871
|
+
letter-spacing: -0.6px;
|
|
4872
|
+
gap: 8px;
|
|
4588
4873
|
cursor: pointer;
|
|
4589
|
-
border: var(--rel-borders-width-stroke-100) solid transparent;
|
|
4590
4874
|
user-select: none;
|
|
4591
4875
|
white-space: nowrap;
|
|
4876
|
+
outline: none;
|
|
4592
4877
|
background: transparent;
|
|
4878
|
+
transition: background-color 0.15s ease;
|
|
4593
4879
|
}
|
|
4594
4880
|
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4881
|
+
/* ── Size ── */
|
|
4882
|
+
:host([size="lg"]) .chip {
|
|
4883
|
+
height: 32px;
|
|
4884
|
+
padding: 4px 8px;
|
|
4885
|
+
font-size: 16px;
|
|
4886
|
+
line-height: 24px;
|
|
4598
4887
|
}
|
|
4599
4888
|
|
|
4600
|
-
.chip
|
|
4601
|
-
|
|
4602
|
-
|
|
4889
|
+
:host([size="md"]) .chip {
|
|
4890
|
+
height: 28px;
|
|
4891
|
+
padding: 4px 8px;
|
|
4892
|
+
font-size: 14px;
|
|
4893
|
+
line-height: 22px;
|
|
4603
4894
|
}
|
|
4604
4895
|
|
|
4605
|
-
.chip
|
|
4606
|
-
|
|
4607
|
-
|
|
4896
|
+
:host([size="sm"]) .chip {
|
|
4897
|
+
height: 24px;
|
|
4898
|
+
padding: 4px 8px;
|
|
4899
|
+
font-size: 12px;
|
|
4900
|
+
line-height: 20px;
|
|
4608
4901
|
}
|
|
4609
4902
|
|
|
4610
|
-
/*
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
background: #717171;
|
|
4615
|
-
color: var(--rel-colors-white);
|
|
4903
|
+
/* ── Border / shape — "Rounded" also widens horizontal padding to 12px,
|
|
4904
|
+
consistent across all three sizes per the Figma spec. ── */
|
|
4905
|
+
:host([border="default"]) .chip {
|
|
4906
|
+
border-radius: 4px;
|
|
4616
4907
|
}
|
|
4617
4908
|
|
|
4618
|
-
.chip
|
|
4619
|
-
|
|
4620
|
-
|
|
4909
|
+
:host([border="rounded"]) .chip {
|
|
4910
|
+
border-radius: 1000px;
|
|
4911
|
+
padding-left: 12px;
|
|
4912
|
+
padding-right: 12px;
|
|
4621
4913
|
}
|
|
4622
4914
|
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4915
|
+
/* ── Tone x Variant — Default/Default state colors ── */
|
|
4916
|
+
:host([tone="neutral"][variant="fill"]) .chip {
|
|
4917
|
+
background: #0b0b0b;
|
|
4918
|
+
color: #ffffff;
|
|
4919
|
+
}
|
|
4920
|
+
:host([tone="neutral"][variant="subtle"]) .chip {
|
|
4921
|
+
background: #f5f5f5;
|
|
4922
|
+
color: #0b0b0b;
|
|
4923
|
+
}
|
|
4924
|
+
:host([tone="danger"][variant="fill"]) .chip {
|
|
4925
|
+
background: #f83b3b;
|
|
4926
|
+
color: #ffffff;
|
|
4927
|
+
}
|
|
4928
|
+
:host([tone="danger"][variant="subtle"]) .chip {
|
|
4929
|
+
background: #fff1f1;
|
|
4930
|
+
color: #ce3131;
|
|
4931
|
+
}
|
|
4932
|
+
:host([tone="warning"][variant="fill"]) .chip {
|
|
4933
|
+
background: #ffcb66;
|
|
4934
|
+
color: #0b0b0b;
|
|
4935
|
+
}
|
|
4936
|
+
:host([tone="warning"][variant="subtle"]) .chip {
|
|
4937
|
+
background: #ffefd1;
|
|
4938
|
+
color: #713f12;
|
|
4939
|
+
}
|
|
4940
|
+
:host([tone="success"][variant="fill"]) .chip {
|
|
4941
|
+
background: #00a86b;
|
|
4942
|
+
color: #ffffff;
|
|
4943
|
+
}
|
|
4944
|
+
:host([tone="success"][variant="subtle"]) .chip {
|
|
4945
|
+
background: #edf8f4;
|
|
4946
|
+
color: #008655;
|
|
4947
|
+
}
|
|
4948
|
+
:host([tone="info"][variant="fill"]) .chip {
|
|
4949
|
+
background: #0091ea;
|
|
4950
|
+
color: #ffffff;
|
|
4951
|
+
}
|
|
4952
|
+
:host([tone="info"][variant="subtle"]) .chip {
|
|
4953
|
+
background: #eff7ff;
|
|
4954
|
+
color: #00528d;
|
|
4626
4955
|
}
|
|
4627
4956
|
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4957
|
+
/* ── Hover / Dragged — Figma only specs explicit color shifts for the
|
|
4958
|
+
"neutral" tone; the other four tones have no hover/dragged sample to
|
|
4959
|
+
match, so a generic brightness dim covers them instead of leaving
|
|
4960
|
+
hover completely inert. Flagged in the handoff notes. ── */
|
|
4961
|
+
:host([tone="neutral"][variant="fill"]) .chip:hover {
|
|
4962
|
+
background: #363636;
|
|
4963
|
+
}
|
|
4964
|
+
:host([tone="neutral"][variant="fill"]) .chip:active,
|
|
4965
|
+
:host([tone="neutral"][variant="fill"][dragging]) .chip {
|
|
4966
|
+
background: #404040;
|
|
4967
|
+
}
|
|
4968
|
+
:host([tone="neutral"][variant="subtle"]) .chip:active,
|
|
4969
|
+
:host([tone="neutral"][variant="subtle"][dragging]) .chip {
|
|
4970
|
+
background: #e5e5e5;
|
|
4631
4971
|
}
|
|
4632
4972
|
|
|
4633
|
-
.chip
|
|
4634
|
-
|
|
4635
|
-
|
|
4973
|
+
:host(:not([tone="neutral"])) .chip:hover {
|
|
4974
|
+
filter: brightness(0.96);
|
|
4975
|
+
}
|
|
4976
|
+
:host(:not([tone="neutral"])) .chip:active,
|
|
4977
|
+
:host(:not([tone="neutral"])[dragging]) .chip {
|
|
4978
|
+
filter: brightness(0.92);
|
|
4636
4979
|
}
|
|
4637
4980
|
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
Overriding that custom property here pins avatar bg to white across all tones.
|
|
4641
|
-
NOTE: rel-avatar hardcodes color: #ffffff — text color (#000000) cannot be
|
|
4642
|
-
overridden from outside the shadow DOM without ::part() or a custom property
|
|
4643
|
-
in rel-avatar itself. */
|
|
4644
|
-
.chip rel-avatar {
|
|
4645
|
-
display: inline-flex;
|
|
4646
|
-
width: 20px !important;
|
|
4647
|
-
height: 20px !important;
|
|
4648
|
-
flex-shrink: 0;
|
|
4649
|
-
font-size: 10px;
|
|
4981
|
+
:host([dragging]) .chip {
|
|
4982
|
+
cursor: grabbing;
|
|
4650
4983
|
}
|
|
4651
4984
|
|
|
4652
|
-
.
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4985
|
+
/* ── Focused — 1.5px outline, drawn outside (matches Figma's
|
|
4986
|
+
strokeAlign:OUTSIDE) so it never affects layout. Same color
|
|
4987
|
+
regardless of tone, per spec. OUTSIDE alignment means the stroke
|
|
4988
|
+
sits flush against the shape's edge with zero gap, extending
|
|
4989
|
+
outward by strokeWeight — outline-offset must be 0, not a positive
|
|
4990
|
+
gap (a positive offset was the bug: it drew a visible gap that
|
|
4991
|
+
doesn't exist in Figma). ── */
|
|
4992
|
+
.chip:focus-visible {
|
|
4993
|
+
outline: 1.5px solid var(--rel-chip-focus-ring, #0b0b0b);
|
|
4994
|
+
outline-offset: 0;
|
|
4659
4995
|
}
|
|
4660
4996
|
|
|
4997
|
+
/* ── Icons ── */
|
|
4998
|
+
/* rel-icon renders its SVG inside its own shadow root, so sizing has to
|
|
4999
|
+
go through --rel-icon-size (a custom property — pierces shadow
|
|
5000
|
+
boundaries) rather than a ".chip-icon svg" selector, which can never
|
|
5001
|
+
reach across shadow DOM. */
|
|
4661
5002
|
.chip-icon {
|
|
5003
|
+
flex-shrink: 0;
|
|
5004
|
+
}
|
|
5005
|
+
|
|
5006
|
+
:host([size="lg"]) .chip-icon {
|
|
5007
|
+
--rel-icon-size: 16px;
|
|
5008
|
+
}
|
|
5009
|
+
|
|
5010
|
+
:host([size="md"]) .chip-icon {
|
|
5011
|
+
--rel-icon-size: 14px;
|
|
5012
|
+
}
|
|
5013
|
+
|
|
5014
|
+
:host([size="sm"]) .chip-icon {
|
|
5015
|
+
--rel-icon-size: 12px;
|
|
5016
|
+
}
|
|
5017
|
+
|
|
5018
|
+
/* ── Avatar — not shown in the Figma sample. rel-avatar sizes its inner
|
|
5019
|
+
.avatar div directly from its own "size" prop (fixed presets only —
|
|
5020
|
+
no --rel-avatar-size custom property escape hatch like rel-icon has),
|
|
5021
|
+
so a host-level width/height override here would only resize the
|
|
5022
|
+
empty outer wrapper, not the actual painted circle. "xs" (20px) is
|
|
5023
|
+
rel-avatar's smallest preset; used uniformly across all three chip
|
|
5024
|
+
sizes since there's nothing smaller to ask for. ── */
|
|
5025
|
+
.chip rel-avatar {
|
|
4662
5026
|
display: inline-flex;
|
|
4663
|
-
align-items: center;
|
|
4664
|
-
justify-content: center;
|
|
4665
|
-
width: 16px;
|
|
4666
|
-
height: 16px;
|
|
4667
5027
|
flex-shrink: 0;
|
|
4668
5028
|
}
|
|
4669
5029
|
|
|
4670
|
-
.chip-
|
|
4671
|
-
|
|
4672
|
-
|
|
5030
|
+
:host([variant="fill"]) .chip rel-avatar {
|
|
5031
|
+
--rel-avatar-bg-fill: rgba(255, 255, 255, 0.25);
|
|
5032
|
+
--rel-avatar-color-fill: #ffffff;
|
|
4673
5033
|
}
|
|
4674
5034
|
|
|
4675
|
-
.chip-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
height: 16px;
|
|
4679
|
-
fill: currentColor;
|
|
5035
|
+
:host([variant="subtle"]) .chip rel-avatar {
|
|
5036
|
+
--rel-avatar-bg-fill: rgba(11, 11, 11, 0.12);
|
|
5037
|
+
--rel-avatar-color-fill: currentColor;
|
|
4680
5038
|
}
|
|
4681
5039
|
|
|
5040
|
+
/* ── Remove (close) button ── */
|
|
4682
5041
|
.chip-remove {
|
|
4683
|
-
|
|
5042
|
+
display: inline-flex;
|
|
5043
|
+
align-items: center;
|
|
5044
|
+
justify-content: center;
|
|
5045
|
+
flex-shrink: 0;
|
|
4684
5046
|
cursor: pointer;
|
|
4685
5047
|
opacity: 0.7;
|
|
4686
5048
|
background: none;
|
|
@@ -4696,86 +5058,85 @@ RelChip.styles = import_lit14.css`
|
|
|
4696
5058
|
}
|
|
4697
5059
|
|
|
4698
5060
|
.chip-remove:focus-visible {
|
|
4699
|
-
outline:
|
|
5061
|
+
outline: 1.5px solid currentColor;
|
|
4700
5062
|
outline-offset: 1px;
|
|
4701
5063
|
border-radius: 2px;
|
|
4702
5064
|
}
|
|
4703
5065
|
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
/* NOTE: #FFFBF5 (chip-orange dark bg) has no exact vars-v2 token;
|
|
4707
|
-
nearest is --rel-colors-gray-light (#FAFAFA) */
|
|
4708
|
-
|
|
4709
|
-
/* Reinforce layout — external dark-mode stylesheets can override display/width on the host */
|
|
4710
|
-
:host-context([data-theme="dark"]) .chip {
|
|
4711
|
-
display: inline-flex;
|
|
4712
|
-
width: auto;
|
|
4713
|
-
}
|
|
4714
|
-
|
|
4715
|
-
:host-context([data-theme="dark"]) .chip-default {
|
|
4716
|
-
/* --rel-colors-gray-screen-bg flips to #262626 in dark — hardcoded to preserve #EEEEEE */
|
|
4717
|
-
background: #EEEEEE;
|
|
4718
|
-
color: #717171;
|
|
5066
|
+
:host([size="lg"]) .chip-remove {
|
|
5067
|
+
--rel-icon-size: 16px;
|
|
4719
5068
|
}
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
/* --rel-colors-blue-bg flips to #0f1e2c in dark mode — hardcoded to preserve #E1F2FF */
|
|
4723
|
-
background: #E1F2FF;
|
|
4724
|
-
color: var(--rel-colors-blue-tertiary);
|
|
5069
|
+
:host([size="md"]) .chip-remove {
|
|
5070
|
+
--rel-icon-size: 14px;
|
|
4725
5071
|
}
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
background: #FFFBF5;
|
|
4729
|
-
color: var(--rel-colors-yellow-pending);
|
|
5072
|
+
:host([size="sm"]) .chip-remove {
|
|
5073
|
+
--rel-icon-size: 12px;
|
|
4730
5074
|
}
|
|
4731
5075
|
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
5076
|
+
/* ── Dark mode — Figma had no dark-mode sample for this new component
|
|
5077
|
+
set. Fill stays unchanged (the saturated tones already read fine on
|
|
5078
|
+
dark surfaces); Subtle gets a dark-tinted background, following the
|
|
5079
|
+
same invert pattern used elsewhere in this design system. Flagged in
|
|
5080
|
+
the handoff notes — adjust if exact values exist.
|
|
5081
|
+
No [data-theme="dark"] :host(...) fallback here — :host() can never
|
|
5082
|
+
be preceded by a combinator, so that form is invalid and silently
|
|
5083
|
+
matches nothing (the exact bug hit and fixed multiple times in
|
|
5084
|
+
rel-avatar/rel-select earlier this session). :host-context() alone
|
|
5085
|
+
has universal modern browser support, so no fallback is needed. ── */
|
|
5086
|
+
:host-context([data-theme="dark"])[tone="neutral"][variant="subtle"] .chip {
|
|
5087
|
+
background: #333333;
|
|
5088
|
+
color: #f5f5f5;
|
|
4735
5089
|
}
|
|
4736
5090
|
|
|
4737
|
-
:host-context([data-theme="dark"]) .chip
|
|
4738
|
-
background:
|
|
4739
|
-
color:
|
|
5091
|
+
:host-context([data-theme="dark"])[tone="danger"][variant="subtle"] .chip {
|
|
5092
|
+
background: #3d1414;
|
|
5093
|
+
color: #ff8080;
|
|
4740
5094
|
}
|
|
4741
5095
|
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
--rel-avatar-color: #ffffff;
|
|
5096
|
+
:host-context([data-theme="dark"])[tone="warning"][variant="subtle"] .chip {
|
|
5097
|
+
background: #3d2e0a;
|
|
5098
|
+
color: #ffd980;
|
|
4746
5099
|
}
|
|
4747
5100
|
|
|
4748
|
-
:host-context([data-theme="dark"]) .chip
|
|
4749
|
-
|
|
4750
|
-
|
|
5101
|
+
:host-context([data-theme="dark"])[tone="success"][variant="subtle"] .chip {
|
|
5102
|
+
background: #0d2e22;
|
|
5103
|
+
color: #4ddba3;
|
|
4751
5104
|
}
|
|
4752
5105
|
|
|
4753
|
-
:host-context([data-theme="dark"]) .chip
|
|
4754
|
-
|
|
4755
|
-
|
|
5106
|
+
:host-context([data-theme="dark"])[tone="info"][variant="subtle"] .chip {
|
|
5107
|
+
background: #0a2e45;
|
|
5108
|
+
color: #66c2ff;
|
|
4756
5109
|
}
|
|
4757
5110
|
|
|
4758
|
-
:host-context([data-theme="dark"]) .chip
|
|
4759
|
-
|
|
4760
|
-
|
|
5111
|
+
:host-context([data-theme="dark"])[tone="neutral"][variant="fill"] .chip {
|
|
5112
|
+
background: #f5f5f5;
|
|
5113
|
+
color: #0b0b0b;
|
|
4761
5114
|
}
|
|
4762
5115
|
|
|
4763
|
-
:host-context([data-theme="dark"]) .chip-
|
|
4764
|
-
|
|
4765
|
-
--rel-avatar-color: #ffffff;
|
|
5116
|
+
:host-context([data-theme="dark"]) .chip-remove:focus-visible {
|
|
5117
|
+
outline-color: currentColor;
|
|
4766
5118
|
}
|
|
4767
5119
|
`;
|
|
4768
5120
|
__decorateClass([
|
|
4769
5121
|
(0, import_decorators14.property)({ type: String })
|
|
4770
5122
|
], RelChip.prototype, "label", 2);
|
|
4771
5123
|
__decorateClass([
|
|
4772
|
-
(0, import_decorators14.property)({ type: String })
|
|
5124
|
+
(0, import_decorators14.property)({ type: String, reflect: true })
|
|
4773
5125
|
], RelChip.prototype, "tone", 2);
|
|
4774
5126
|
__decorateClass([
|
|
4775
|
-
(0, import_decorators14.property)({ type: String })
|
|
5127
|
+
(0, import_decorators14.property)({ type: String, reflect: true })
|
|
5128
|
+
], RelChip.prototype, "variant", 2);
|
|
5129
|
+
__decorateClass([
|
|
5130
|
+
(0, import_decorators14.property)({ type: String, reflect: true })
|
|
5131
|
+
], RelChip.prototype, "size", 2);
|
|
5132
|
+
__decorateClass([
|
|
5133
|
+
(0, import_decorators14.property)({ type: String, reflect: true })
|
|
5134
|
+
], RelChip.prototype, "border", 2);
|
|
5135
|
+
__decorateClass([
|
|
5136
|
+
(0, import_decorators14.property)({ type: String, attribute: "leading-icon" })
|
|
4776
5137
|
], RelChip.prototype, "leadingIcon", 2);
|
|
4777
5138
|
__decorateClass([
|
|
4778
|
-
(0, import_decorators14.property)({ type: String })
|
|
5139
|
+
(0, import_decorators14.property)({ type: String, attribute: "trailing-icon" })
|
|
4779
5140
|
], RelChip.prototype, "trailingIcon", 2);
|
|
4780
5141
|
__decorateClass([
|
|
4781
5142
|
(0, import_decorators14.property)({ type: String })
|
|
@@ -4786,6 +5147,12 @@ __decorateClass([
|
|
|
4786
5147
|
__decorateClass([
|
|
4787
5148
|
(0, import_decorators14.property)({ type: Boolean, reflect: true })
|
|
4788
5149
|
], RelChip.prototype, "removed", 2);
|
|
5150
|
+
__decorateClass([
|
|
5151
|
+
(0, import_decorators14.property)({ type: Boolean, attribute: "draggable-chip" })
|
|
5152
|
+
], RelChip.prototype, "draggableChip", 2);
|
|
5153
|
+
__decorateClass([
|
|
5154
|
+
(0, import_decorators14.state)()
|
|
5155
|
+
], RelChip.prototype, "dragging", 2);
|
|
4789
5156
|
RelChip = __decorateClass([
|
|
4790
5157
|
(0, import_decorators14.customElement)("rel-chip")
|
|
4791
5158
|
], RelChip);
|
|
@@ -4932,7 +5299,7 @@ RelDivider = __decorateClass([
|
|
|
4932
5299
|
// src/components/rel-drawer/rel-drawer.ts
|
|
4933
5300
|
var import_lit18 = require("lit");
|
|
4934
5301
|
var import_decorators18 = require("lit/decorators.js");
|
|
4935
|
-
var
|
|
5302
|
+
var import_rel_icon4 = require("@reliability-design/icons/rel-icon");
|
|
4936
5303
|
|
|
4937
5304
|
// src/components/rel-drawer/rel-drawer-footer.ts
|
|
4938
5305
|
var import_lit17 = require("lit");
|
|
@@ -4996,7 +5363,7 @@ var RelDrawer = class extends import_lit18.LitElement {
|
|
|
4996
5363
|
}
|
|
4997
5364
|
const firstFocusable = focusable[0];
|
|
4998
5365
|
const lastFocusable = focusable[focusable.length - 1];
|
|
4999
|
-
const activeElement =
|
|
5366
|
+
const activeElement = document.activeElement;
|
|
5000
5367
|
if (e.shiftKey) {
|
|
5001
5368
|
if (activeElement === firstFocusable) {
|
|
5002
5369
|
e.preventDefault();
|
|
@@ -5070,7 +5437,7 @@ var RelDrawer = class extends import_lit18.LitElement {
|
|
|
5070
5437
|
this.lockScroll();
|
|
5071
5438
|
if (this.modal) {
|
|
5072
5439
|
this.updateComplete.then(() => {
|
|
5073
|
-
const focusTarget = this.
|
|
5440
|
+
const focusTarget = this.querySelector("[autofocus]") ?? this.querySelector(".close-button") ?? this.querySelector(".panel");
|
|
5074
5441
|
focusTarget?.focus();
|
|
5075
5442
|
});
|
|
5076
5443
|
}
|
|
@@ -6010,7 +6377,7 @@ RelMenu = __decorateClass([
|
|
|
6010
6377
|
// src/components/rel-menubar/rel-menubar.ts
|
|
6011
6378
|
var import_lit23 = require("lit");
|
|
6012
6379
|
var import_decorators23 = require("lit/decorators.js");
|
|
6013
|
-
var
|
|
6380
|
+
var import_rel_icon5 = require("@reliability-design/icons/rel-icon");
|
|
6014
6381
|
|
|
6015
6382
|
// src/components/rel-radio/rel-radio.ts
|
|
6016
6383
|
var import_lit22 = require("lit");
|
|
@@ -6053,10 +6420,13 @@ var RelRadio = class extends import_lit22.LitElement {
|
|
|
6053
6420
|
writeValue(value) {
|
|
6054
6421
|
this.checked = value === this.value;
|
|
6055
6422
|
}
|
|
6423
|
+
get hasSelection() {
|
|
6424
|
+
return this.selectedValue !== null && this.selectedValue !== "";
|
|
6425
|
+
}
|
|
6056
6426
|
renderOption(option) {
|
|
6057
6427
|
const isChecked = this.selectedValue === option.value;
|
|
6058
6428
|
const isDisabled = this.disabled || option.disabled;
|
|
6059
|
-
const isErrorActive = this.error && !
|
|
6429
|
+
const isErrorActive = this.error && !this.hasSelection;
|
|
6060
6430
|
const classes = [
|
|
6061
6431
|
"rel-radio-option",
|
|
6062
6432
|
isDisabled ? "disabled" : "",
|
|
@@ -6086,7 +6456,7 @@ var RelRadio = class extends import_lit22.LitElement {
|
|
|
6086
6456
|
<div class="rel-radio-group">
|
|
6087
6457
|
${this.options.map((o) => this.renderOption(o))}
|
|
6088
6458
|
</div>
|
|
6089
|
-
${this.error && this.errorMessage ? import_lit22.html`<div class="error-message">${this.errorMessage}</div>` : ""}
|
|
6459
|
+
${this.error && this.errorMessage && !this.hasSelection ? import_lit22.html`<div class="error-message">${this.errorMessage}</div>` : ""}
|
|
6090
6460
|
`;
|
|
6091
6461
|
}
|
|
6092
6462
|
};
|
|
@@ -6099,16 +6469,15 @@ RelRadio.styles = import_lit22.css`
|
|
|
6099
6469
|
.rel-radio-group {
|
|
6100
6470
|
display: flex;
|
|
6101
6471
|
flex-direction: column;
|
|
6472
|
+
align-items: flex-start;
|
|
6102
6473
|
gap: var(--rel-spacing-space-xs);
|
|
6103
6474
|
}
|
|
6104
6475
|
|
|
6105
6476
|
.rel-radio-option {
|
|
6106
|
-
display: flex;
|
|
6477
|
+
display: inline-flex;
|
|
6107
6478
|
flex-direction: column;
|
|
6108
6479
|
gap: var(--rel-spacing-space-3xs);
|
|
6109
6480
|
cursor: pointer;
|
|
6110
|
-
padding: 4px 6px;
|
|
6111
|
-
margin: -4px -6px;
|
|
6112
6481
|
}
|
|
6113
6482
|
|
|
6114
6483
|
.rel-radio-option.disabled {
|
|
@@ -6116,10 +6485,6 @@ RelRadio.styles = import_lit22.css`
|
|
|
6116
6485
|
cursor: not-allowed !important;
|
|
6117
6486
|
}
|
|
6118
6487
|
|
|
6119
|
-
.rel-radio-option:not(.disabled):hover {
|
|
6120
|
-
background: var(--rel-color-bg-hover, #f5f5f5);
|
|
6121
|
-
}
|
|
6122
|
-
|
|
6123
6488
|
.rel-radio-option:not(.disabled):hover .radio-custom {
|
|
6124
6489
|
border-color: #525252;
|
|
6125
6490
|
}
|
|
@@ -6133,8 +6498,8 @@ RelRadio.styles = import_lit22.css`
|
|
|
6133
6498
|
}
|
|
6134
6499
|
|
|
6135
6500
|
.rel-radio-option:focus-within:has(input:focus-visible) {
|
|
6136
|
-
outline:
|
|
6137
|
-
outline-offset:
|
|
6501
|
+
outline: 1.5px solid #000000;
|
|
6502
|
+
outline-offset: 1px;
|
|
6138
6503
|
}
|
|
6139
6504
|
|
|
6140
6505
|
.radio-main {
|
|
@@ -6167,15 +6532,15 @@ RelRadio.styles = import_lit22.css`
|
|
|
6167
6532
|
}
|
|
6168
6533
|
|
|
6169
6534
|
.radio-label {
|
|
6170
|
-
font-size: var(--rel-fontSizes-
|
|
6535
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
6171
6536
|
font-weight: var(--rel-fontWeights-medium);
|
|
6172
6537
|
color: var(--rel-color-text-primary);
|
|
6173
6538
|
}
|
|
6174
6539
|
|
|
6175
6540
|
.radio-supporting {
|
|
6176
|
-
font-size: var(--rel-fontSizes-
|
|
6541
|
+
font-size: var(--rel-fontSizes-sm, 12px);
|
|
6177
6542
|
margin-left: 28px;
|
|
6178
|
-
color:
|
|
6543
|
+
color: #7D7D7D;
|
|
6179
6544
|
}
|
|
6180
6545
|
|
|
6181
6546
|
/* Error state — unchecked only */
|
|
@@ -6193,7 +6558,7 @@ RelRadio.styles = import_lit22.css`
|
|
|
6193
6558
|
|
|
6194
6559
|
/* Error message below group */
|
|
6195
6560
|
.error-message {
|
|
6196
|
-
font-size: var(--rel-fontSizes-
|
|
6561
|
+
font-size: var(--rel-fontSizes-sm, 12px);
|
|
6197
6562
|
color: #CE3131;
|
|
6198
6563
|
margin-top: var(--rel-spacing-space-2xs, 4px);
|
|
6199
6564
|
}
|
|
@@ -6216,7 +6581,8 @@ RelRadio.styles = import_lit22.css`
|
|
|
6216
6581
|
|
|
6217
6582
|
:host-context([data-theme="dark"]) .rel-radio-option:focus-within:has(input:focus-visible),
|
|
6218
6583
|
:host-context(.dark) .rel-radio-option:focus-within:has(input:focus-visible) {
|
|
6219
|
-
outline
|
|
6584
|
+
outline: 1.5px solid var(--rel-color-text-primary, #F5F5F5);
|
|
6585
|
+
outline-offset: 1px;
|
|
6220
6586
|
}
|
|
6221
6587
|
`;
|
|
6222
6588
|
__decorateClass([
|
|
@@ -6643,6 +7009,7 @@ RelMenubar._css = `
|
|
|
6643
7009
|
font-family: var(--rel-fontFamilies-primary);
|
|
6644
7010
|
font-size: var(--rel-fontSizes-sm);
|
|
6645
7011
|
height: 40px;
|
|
7012
|
+
width: fit-content;
|
|
6646
7013
|
}
|
|
6647
7014
|
|
|
6648
7015
|
.menubar-trigger {
|
|
@@ -6915,7 +7282,7 @@ RelNavbar = __decorateClass([
|
|
|
6915
7282
|
var import_lit32 = require("lit");
|
|
6916
7283
|
var import_decorators32 = require("lit/decorators.js");
|
|
6917
7284
|
var import_vars_v223 = require("./vars-v2-VMGWTFJZ.css");
|
|
6918
|
-
var
|
|
7285
|
+
var import_rel_icon6 = require("@reliability-design/icons/rel-icon");
|
|
6919
7286
|
|
|
6920
7287
|
// src/components/rel-topbar/rel-topbar-brand.ts
|
|
6921
7288
|
var import_lit26 = require("lit");
|
|
@@ -7526,7 +7893,7 @@ RelTopbar = __decorateClass([
|
|
|
7526
7893
|
var import_lit33 = require("lit");
|
|
7527
7894
|
var import_decorators33 = require("lit/decorators.js");
|
|
7528
7895
|
var import_vars_v224 = require("./vars-v2-VMGWTFJZ.css");
|
|
7529
|
-
var
|
|
7896
|
+
var import_rel_icon7 = require("@reliability-design/icons/rel-icon");
|
|
7530
7897
|
var RelTopbarItem = class extends import_lit33.LitElement {
|
|
7531
7898
|
constructor() {
|
|
7532
7899
|
super(...arguments);
|
|
@@ -8512,13 +8879,13 @@ var import_vars_v226 = require("./vars-v2-VMGWTFJZ.css");
|
|
|
8512
8879
|
var RelPagination = class extends import_lit36.LitElement {
|
|
8513
8880
|
constructor() {
|
|
8514
8881
|
super(...arguments);
|
|
8882
|
+
this.type = "extended";
|
|
8515
8883
|
this.defaultPage = 1;
|
|
8516
8884
|
this.totalPages = 0;
|
|
8517
|
-
this.
|
|
8518
|
-
this.
|
|
8885
|
+
this.totalItems = 0;
|
|
8886
|
+
this.perPage = 10;
|
|
8887
|
+
this.showLabel = false;
|
|
8519
8888
|
this.disabled = false;
|
|
8520
|
-
this.density = "comfortable";
|
|
8521
|
-
this.variant = "default";
|
|
8522
8889
|
this.hrefTemplate = "";
|
|
8523
8890
|
this.ariaLabel = "Pagination";
|
|
8524
8891
|
this.currentPage = 1;
|
|
@@ -8526,17 +8893,15 @@ var RelPagination = class extends import_lit36.LitElement {
|
|
|
8526
8893
|
connectedCallback() {
|
|
8527
8894
|
super.connectedCallback();
|
|
8528
8895
|
const totalPagesAttr = this.getAttribute("total-pages");
|
|
8529
|
-
if (totalPagesAttr)
|
|
8530
|
-
this.totalPages = Number(totalPagesAttr);
|
|
8531
|
-
}
|
|
8896
|
+
if (totalPagesAttr) this.totalPages = Number(totalPagesAttr);
|
|
8532
8897
|
const pageAttr = this.getAttribute("page");
|
|
8533
|
-
if (pageAttr)
|
|
8534
|
-
this.page = Number(pageAttr);
|
|
8535
|
-
}
|
|
8898
|
+
if (pageAttr) this.page = Number(pageAttr);
|
|
8536
8899
|
const defaultPageAttr = this.getAttribute("default-page");
|
|
8537
|
-
if (defaultPageAttr)
|
|
8538
|
-
|
|
8539
|
-
|
|
8900
|
+
if (defaultPageAttr) this.defaultPage = Number(defaultPageAttr);
|
|
8901
|
+
const totalItemsAttr = this.getAttribute("total-items");
|
|
8902
|
+
if (totalItemsAttr) this.totalItems = Number(totalItemsAttr);
|
|
8903
|
+
const perPageAttr = this.getAttribute("per-page");
|
|
8904
|
+
if (perPageAttr) this.perPage = Number(perPageAttr);
|
|
8540
8905
|
this.currentPage = this.page ?? this.defaultPage;
|
|
8541
8906
|
}
|
|
8542
8907
|
updated(changedProperties) {
|
|
@@ -8547,47 +8912,43 @@ var RelPagination = class extends import_lit36.LitElement {
|
|
|
8547
8912
|
get activePage() {
|
|
8548
8913
|
return this.page ?? this.currentPage;
|
|
8549
8914
|
}
|
|
8550
|
-
|
|
8551
|
-
|
|
8915
|
+
get computedTotalPages() {
|
|
8916
|
+
if (this.totalPages > 0) return this.totalPages;
|
|
8917
|
+
if (this.totalItems > 0 && this.perPage > 0) {
|
|
8918
|
+
return Math.ceil(this.totalItems / this.perPage);
|
|
8919
|
+
}
|
|
8920
|
+
return 0;
|
|
8921
|
+
}
|
|
8922
|
+
generatePageNumbers() {
|
|
8923
|
+
const pages = [];
|
|
8552
8924
|
const current = this.activePage;
|
|
8553
|
-
const total = this.
|
|
8554
|
-
if (total <= 0) return
|
|
8555
|
-
items.push({ type: "prev" });
|
|
8925
|
+
const total = this.computedTotalPages;
|
|
8926
|
+
if (total <= 0) return pages;
|
|
8556
8927
|
if (total <= 7) {
|
|
8557
|
-
for (let i = 1; i <= total; i++)
|
|
8558
|
-
items.push({ type: "page", value: i });
|
|
8559
|
-
}
|
|
8928
|
+
for (let i = 1; i <= total; i++) pages.push(i);
|
|
8560
8929
|
} else if (current <= 4) {
|
|
8561
|
-
for (let i = 1; i <= 5; i++)
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
items.push({ type: "ellipsis" });
|
|
8565
|
-
items.push({ type: "page", value: total });
|
|
8930
|
+
for (let i = 1; i <= 5; i++) pages.push(i);
|
|
8931
|
+
pages.push(-1);
|
|
8932
|
+
pages.push(total);
|
|
8566
8933
|
} else if (current >= total - 3) {
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
for (let i = total - 4; i <= total; i++)
|
|
8570
|
-
items.push({ type: "page", value: i });
|
|
8571
|
-
}
|
|
8934
|
+
pages.push(1);
|
|
8935
|
+
pages.push(-1);
|
|
8936
|
+
for (let i = total - 4; i <= total; i++) pages.push(i);
|
|
8572
8937
|
} else {
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8938
|
+
pages.push(1);
|
|
8939
|
+
pages.push(-1);
|
|
8940
|
+
pages.push(current - 1);
|
|
8941
|
+
pages.push(current);
|
|
8942
|
+
pages.push(current + 1);
|
|
8943
|
+
pages.push(-1);
|
|
8944
|
+
pages.push(total);
|
|
8580
8945
|
}
|
|
8581
|
-
|
|
8582
|
-
return items;
|
|
8946
|
+
return pages;
|
|
8583
8947
|
}
|
|
8584
8948
|
handlePageChange(newPage) {
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
if (this.page === void 0) {
|
|
8589
|
-
this.currentPage = newPage;
|
|
8590
|
-
}
|
|
8949
|
+
const total = this.computedTotalPages;
|
|
8950
|
+
if (this.disabled || newPage < 1 || newPage > total || newPage === this.activePage) return;
|
|
8951
|
+
if (this.page === void 0) this.currentPage = newPage;
|
|
8591
8952
|
this.dispatchEvent(
|
|
8592
8953
|
new CustomEvent("rel-change", {
|
|
8593
8954
|
detail: { page: newPage },
|
|
@@ -8596,292 +8957,335 @@ var RelPagination = class extends import_lit36.LitElement {
|
|
|
8596
8957
|
})
|
|
8597
8958
|
);
|
|
8598
8959
|
}
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
return this.hrefTemplate.replace(/\{page\}/, String(page));
|
|
8960
|
+
renderChevronLeft() {
|
|
8961
|
+
return import_lit36.html`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 18l-6-6 6-6"/></svg>`;
|
|
8602
8962
|
}
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
event.preventDefault();
|
|
8606
|
-
callback();
|
|
8607
|
-
}
|
|
8963
|
+
renderChevronRight() {
|
|
8964
|
+
return import_lit36.html`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg>`;
|
|
8608
8965
|
}
|
|
8609
|
-
|
|
8966
|
+
renderNavBtn(dir) {
|
|
8967
|
+
const current = this.activePage;
|
|
8968
|
+
const total = this.computedTotalPages;
|
|
8969
|
+
const isPrev = dir === "prev";
|
|
8970
|
+
const isDisabled = isPrev ? current <= 1 : current >= total;
|
|
8971
|
+
const targetPage = isPrev ? current - 1 : current + 1;
|
|
8610
8972
|
return import_lit36.html`
|
|
8611
|
-
<
|
|
8612
|
-
|
|
8613
|
-
|
|
8973
|
+
<button
|
|
8974
|
+
type="button"
|
|
8975
|
+
class="pag-nav-btn"
|
|
8976
|
+
aria-label="${isPrev ? "Previous page" : "Next page"}"
|
|
8977
|
+
?disabled="${isDisabled}"
|
|
8978
|
+
@click="${() => this.handlePageChange(targetPage)}"
|
|
8979
|
+
>
|
|
8980
|
+
${isPrev ? this.renderChevronLeft() : this.renderChevronRight()}
|
|
8981
|
+
</button>
|
|
8614
8982
|
`;
|
|
8615
8983
|
}
|
|
8616
|
-
|
|
8984
|
+
renderExtended() {
|
|
8985
|
+
const pages = this.generatePageNumbers();
|
|
8986
|
+
const current = this.activePage;
|
|
8987
|
+
const total = this.computedTotalPages;
|
|
8617
8988
|
return import_lit36.html`
|
|
8618
|
-
<
|
|
8619
|
-
<
|
|
8620
|
-
|
|
8989
|
+
<div class="pag-root" role="navigation" aria-label="${this.ariaLabel}">
|
|
8990
|
+
<div class="pag-stack">
|
|
8991
|
+
${this.renderNavBtn("prev")}
|
|
8992
|
+
<div class="pag-numbers">
|
|
8993
|
+
${pages.map(
|
|
8994
|
+
(p) => p === -1 ? import_lit36.html`<span class="pag-ellipsis">...</span>` : import_lit36.html`<button
|
|
8995
|
+
type="button"
|
|
8996
|
+
class="pag-page-btn"
|
|
8997
|
+
aria-label="Page ${p}"
|
|
8998
|
+
aria-current="${p === current ? "page" : "false"}"
|
|
8999
|
+
@click="${() => this.handlePageChange(p)}"
|
|
9000
|
+
>${p}</button>`
|
|
9001
|
+
)}
|
|
9002
|
+
</div>
|
|
9003
|
+
${this.renderNavBtn("next")}
|
|
9004
|
+
</div>
|
|
9005
|
+
${this.showLabel ? import_lit36.html`<span class="pag-label">Viewing page ${current} of ${total}</span>` : null}
|
|
9006
|
+
</div>
|
|
8621
9007
|
`;
|
|
8622
9008
|
}
|
|
8623
|
-
|
|
9009
|
+
renderCompact() {
|
|
8624
9010
|
const current = this.activePage;
|
|
8625
|
-
const
|
|
8626
|
-
if (item.type === "spacer") {
|
|
8627
|
-
return import_lit36.html`<span class="pagination-spacer"></span>`;
|
|
8628
|
-
}
|
|
8629
|
-
if (item.type === "ellipsis") {
|
|
8630
|
-
return import_lit36.html`<span class="ellipsis">…</span>`;
|
|
8631
|
-
}
|
|
8632
|
-
if (item.type === "prev") {
|
|
8633
|
-
const disabled = current === 1 || this.disabled;
|
|
8634
|
-
const targetPage = current - 1;
|
|
8635
|
-
if (useLinks) {
|
|
8636
|
-
const href = disabled ? "#" : this.getHref(targetPage);
|
|
8637
|
-
return import_lit36.html`
|
|
8638
|
-
<a
|
|
8639
|
-
href="${href}"
|
|
8640
|
-
class="prev-btn"
|
|
8641
|
-
aria-label="Go to previous page"
|
|
8642
|
-
aria-disabled="${disabled}"
|
|
8643
|
-
@click="${(e) => {
|
|
8644
|
-
if (disabled) {
|
|
8645
|
-
e.preventDefault();
|
|
8646
|
-
return;
|
|
8647
|
-
}
|
|
8648
|
-
e.preventDefault();
|
|
8649
|
-
this.handlePageChange(targetPage);
|
|
8650
|
-
}}"
|
|
8651
|
-
>
|
|
8652
|
-
${this.variant === "icons" ? this.renderPrevIcon() : "Previous"}
|
|
8653
|
-
</a>
|
|
8654
|
-
`;
|
|
8655
|
-
}
|
|
8656
|
-
return import_lit36.html`
|
|
8657
|
-
<button
|
|
8658
|
-
type="button"
|
|
8659
|
-
class="prev-btn"
|
|
8660
|
-
aria-label="Go to previous page"
|
|
8661
|
-
?disabled="${disabled}"
|
|
8662
|
-
@click="${() => this.handlePageChange(targetPage)}"
|
|
8663
|
-
>
|
|
8664
|
-
${this.variant === "icons" ? this.renderPrevIcon() : "Previous"}
|
|
8665
|
-
</button>
|
|
8666
|
-
`;
|
|
8667
|
-
}
|
|
8668
|
-
if (item.type === "next") {
|
|
8669
|
-
const disabled = current === this.totalPages || this.disabled;
|
|
8670
|
-
const targetPage = current + 1;
|
|
8671
|
-
if (useLinks) {
|
|
8672
|
-
const href = disabled ? "#" : this.getHref(targetPage);
|
|
8673
|
-
return import_lit36.html`
|
|
8674
|
-
<a
|
|
8675
|
-
href="${href}"
|
|
8676
|
-
class="next-btn"
|
|
8677
|
-
aria-label="Go to next page"
|
|
8678
|
-
aria-disabled="${disabled}"
|
|
8679
|
-
@click="${(e) => {
|
|
8680
|
-
if (disabled) {
|
|
8681
|
-
e.preventDefault();
|
|
8682
|
-
return;
|
|
8683
|
-
}
|
|
8684
|
-
e.preventDefault();
|
|
8685
|
-
this.handlePageChange(targetPage);
|
|
8686
|
-
}}"
|
|
8687
|
-
>
|
|
8688
|
-
${this.variant === "icons" ? this.renderNextIcon() : "Next"}
|
|
8689
|
-
</a>
|
|
8690
|
-
`;
|
|
8691
|
-
}
|
|
8692
|
-
return import_lit36.html`
|
|
8693
|
-
<button
|
|
8694
|
-
type="button"
|
|
8695
|
-
class="next-btn"
|
|
8696
|
-
aria-label="Go to next page"
|
|
8697
|
-
?disabled="${disabled}"
|
|
8698
|
-
@click="${() => this.handlePageChange(targetPage)}"
|
|
8699
|
-
>
|
|
8700
|
-
${this.variant === "icons" ? this.renderNextIcon() : "Next"}
|
|
8701
|
-
</button>
|
|
8702
|
-
`;
|
|
8703
|
-
}
|
|
8704
|
-
const pageNum = item.value;
|
|
8705
|
-
const isCurrent = pageNum === current;
|
|
8706
|
-
if (useLinks) {
|
|
8707
|
-
const href = this.getHref(pageNum);
|
|
8708
|
-
return import_lit36.html`
|
|
8709
|
-
<a
|
|
8710
|
-
href="${href}"
|
|
8711
|
-
aria-label="Go to page ${pageNum}"
|
|
8712
|
-
aria-current="${isCurrent ? "page" : "false"}"
|
|
8713
|
-
@click="${(e) => {
|
|
8714
|
-
e.preventDefault();
|
|
8715
|
-
this.handlePageChange(pageNum);
|
|
8716
|
-
}}"
|
|
8717
|
-
>
|
|
8718
|
-
${pageNum}
|
|
8719
|
-
</a>
|
|
8720
|
-
`;
|
|
8721
|
-
}
|
|
9011
|
+
const total = this.computedTotalPages;
|
|
8722
9012
|
return import_lit36.html`
|
|
8723
|
-
<
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
>
|
|
8729
|
-
${pageNum}
|
|
8730
|
-
</button>
|
|
9013
|
+
<div class="pag-stack" role="navigation" aria-label="${this.ariaLabel}">
|
|
9014
|
+
${this.renderNavBtn("prev")}
|
|
9015
|
+
<span class="pag-page-text">Page ${current} of ${total}</span>
|
|
9016
|
+
${this.renderNavBtn("next")}
|
|
9017
|
+
</div>
|
|
8731
9018
|
`;
|
|
8732
9019
|
}
|
|
8733
|
-
|
|
8734
|
-
const
|
|
9020
|
+
renderCountText() {
|
|
9021
|
+
const current = this.activePage;
|
|
9022
|
+
const total = this.computedTotalPages;
|
|
9023
|
+
const effectiveTotalItems = this.totalItems > 0 ? this.totalItems : total * this.perPage;
|
|
9024
|
+
const start = (current - 1) * this.perPage + 1;
|
|
9025
|
+
const end = Math.min(current * this.perPage, effectiveTotalItems);
|
|
8735
9026
|
return import_lit36.html`
|
|
8736
|
-
<
|
|
8737
|
-
class="
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
9027
|
+
<div class="pag-count" role="navigation" aria-label="${this.ariaLabel}">
|
|
9028
|
+
<span class="pag-count-text">${start}–${end} of ${effectiveTotalItems}</span>
|
|
9029
|
+
<div class="pag-count-nav">
|
|
9030
|
+
${this.renderNavBtn("prev")}
|
|
9031
|
+
<span class="pag-current-num">${current}</span>
|
|
9032
|
+
${this.renderNavBtn("next")}
|
|
9033
|
+
</div>
|
|
9034
|
+
</div>
|
|
8743
9035
|
`;
|
|
8744
9036
|
}
|
|
9037
|
+
render() {
|
|
9038
|
+
if (this.type === "compact") return this.renderCompact();
|
|
9039
|
+
if (this.type === "count-text") return this.renderCountText();
|
|
9040
|
+
return this.renderExtended();
|
|
9041
|
+
}
|
|
8745
9042
|
};
|
|
8746
9043
|
RelPagination.styles = import_lit36.css`
|
|
8747
9044
|
:host {
|
|
8748
9045
|
display: inline-block;
|
|
8749
|
-
font-family: var(--rel-fontFamilies-primary);
|
|
9046
|
+
font-family: var(--rel-fontFamilies-primary, 'Poppins', sans-serif);
|
|
8750
9047
|
}
|
|
8751
9048
|
|
|
8752
|
-
|
|
9049
|
+
:host([type="count-text"]) {
|
|
9050
|
+
display: block;
|
|
9051
|
+
width: 100%;
|
|
9052
|
+
}
|
|
9053
|
+
|
|
9054
|
+
:host([disabled]) {
|
|
9055
|
+
opacity: 0.5;
|
|
9056
|
+
cursor: not-allowed;
|
|
9057
|
+
}
|
|
9058
|
+
|
|
9059
|
+
:host([disabled]) button {
|
|
9060
|
+
pointer-events: none;
|
|
9061
|
+
}
|
|
9062
|
+
|
|
9063
|
+
/* ── Root / Stack containers ──────────────────────────────── */
|
|
9064
|
+
|
|
9065
|
+
.pag-root {
|
|
8753
9066
|
display: flex;
|
|
9067
|
+
flex-direction: column;
|
|
8754
9068
|
align-items: center;
|
|
8755
|
-
gap:
|
|
8756
|
-
min-width: max-content;
|
|
9069
|
+
gap: 16px;
|
|
8757
9070
|
}
|
|
8758
9071
|
|
|
8759
|
-
|
|
8760
|
-
|
|
9072
|
+
.pag-stack {
|
|
9073
|
+
display: inline-flex;
|
|
9074
|
+
align-items: center;
|
|
9075
|
+
gap: 12px;
|
|
8761
9076
|
}
|
|
8762
9077
|
|
|
8763
|
-
|
|
8764
|
-
|
|
9078
|
+
.pag-count {
|
|
9079
|
+
display: flex;
|
|
9080
|
+
align-items: center;
|
|
9081
|
+
justify-content: space-between;
|
|
9082
|
+
gap: 16px;
|
|
9083
|
+
width: 100%;
|
|
9084
|
+
}
|
|
9085
|
+
|
|
9086
|
+
/* count-text right-side nav: no gap (40+24+40 = 104px, matches Figma) */
|
|
9087
|
+
.pag-count-nav {
|
|
9088
|
+
display: inline-flex;
|
|
9089
|
+
align-items: center;
|
|
9090
|
+
}
|
|
9091
|
+
|
|
9092
|
+
/* ── Page number list (tighter 4px gap) ──────────────────── */
|
|
9093
|
+
|
|
9094
|
+
.pag-numbers {
|
|
9095
|
+
display: inline-flex;
|
|
9096
|
+
align-items: center;
|
|
9097
|
+
gap: 4px;
|
|
9098
|
+
}
|
|
9099
|
+
|
|
9100
|
+
/* ── Prev / Next — circular buttons ──────────────────────── */
|
|
9101
|
+
|
|
9102
|
+
.pag-nav-btn {
|
|
8765
9103
|
display: inline-flex;
|
|
8766
9104
|
align-items: center;
|
|
8767
9105
|
justify-content: center;
|
|
8768
9106
|
width: 40px;
|
|
8769
9107
|
height: 40px;
|
|
8770
9108
|
padding: 0;
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
color: var(--rel-color-text-heading);
|
|
8775
|
-
background: var(--rel-color-bg-primary);
|
|
8776
|
-
border: var(--rel-borders-width-stroke-100) solid var(--rel-color-border-default);
|
|
8777
|
-
border-radius: var(--rel-borders-radius-border-radius-200);
|
|
9109
|
+
border-radius: 1000px;
|
|
9110
|
+
border: 1px solid #e5e5e5;
|
|
9111
|
+
background: #ffffff;
|
|
8778
9112
|
cursor: pointer;
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
9113
|
+
color: #0b0b0b;
|
|
9114
|
+
box-sizing: border-box;
|
|
9115
|
+
transition: background 0.15s ease;
|
|
9116
|
+
flex-shrink: 0;
|
|
8783
9117
|
}
|
|
8784
9118
|
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
width: auto;
|
|
8788
|
-
padding: 0 var(--rel-spacing-space-sm);
|
|
9119
|
+
.pag-nav-btn:hover:not(:disabled) {
|
|
9120
|
+
background: #f5f5f5;
|
|
8789
9121
|
}
|
|
8790
9122
|
|
|
8791
|
-
nav
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
height: 32px;
|
|
8795
|
-
padding: 0;
|
|
8796
|
-
font-size: var(--rel-fontSizes-xs);
|
|
9123
|
+
.pag-nav-btn:focus-visible {
|
|
9124
|
+
outline: 2px solid var(--rel-color-border-focus, #0059f4);
|
|
9125
|
+
outline-offset: 2px;
|
|
8797
9126
|
}
|
|
8798
9127
|
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
padding: 0 var(--rel-spacing-space-xs);
|
|
9128
|
+
.pag-nav-btn:disabled {
|
|
9129
|
+
opacity: 0.35;
|
|
9130
|
+
cursor: not-allowed;
|
|
8803
9131
|
}
|
|
8804
9132
|
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
border-color: var(--rel-color-text-primary);
|
|
9133
|
+
.pag-nav-btn svg {
|
|
9134
|
+
width: 20px;
|
|
9135
|
+
height: 20px;
|
|
8809
9136
|
}
|
|
8810
9137
|
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
9138
|
+
/* ── Page number buttons — square with 8px radius ─────────── */
|
|
9139
|
+
|
|
9140
|
+
.pag-page-btn {
|
|
9141
|
+
display: inline-flex;
|
|
9142
|
+
align-items: center;
|
|
9143
|
+
justify-content: center;
|
|
9144
|
+
width: 40px;
|
|
9145
|
+
height: 40px;
|
|
9146
|
+
padding: 8px;
|
|
9147
|
+
border-radius: 8px;
|
|
9148
|
+
border: 1px solid #e5e5e5;
|
|
9149
|
+
background: #ffffff;
|
|
9150
|
+
cursor: pointer;
|
|
9151
|
+
font-family: inherit;
|
|
9152
|
+
font-size: 14px;
|
|
9153
|
+
font-weight: 500;
|
|
9154
|
+
letter-spacing: -0.3px;
|
|
9155
|
+
color: #0b0b0b;
|
|
9156
|
+
line-height: 22px;
|
|
9157
|
+
box-sizing: border-box;
|
|
9158
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
8815
9159
|
}
|
|
8816
9160
|
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
opacity: 0.5;
|
|
8820
|
-
cursor: not-allowed;
|
|
9161
|
+
.pag-page-btn:hover {
|
|
9162
|
+
background: #f5f5f5;
|
|
8821
9163
|
}
|
|
8822
9164
|
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
color: var(--rel-color-text-primary);
|
|
8827
|
-
border-color: var(--rel-color-text-heading);
|
|
8828
|
-
font-weight: var(--rel-fontWeights-semibold);
|
|
9165
|
+
.pag-page-btn:focus-visible {
|
|
9166
|
+
outline: 2px solid var(--rel-color-border-focus, #0059f4);
|
|
9167
|
+
outline-offset: 2px;
|
|
8829
9168
|
}
|
|
8830
9169
|
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
border-color: var(--rel-color-text-heading);
|
|
9170
|
+
.pag-page-btn[aria-current="page"] {
|
|
9171
|
+
background: #e5e5e5;
|
|
9172
|
+
border-color: #0b0b0b;
|
|
8835
9173
|
}
|
|
8836
9174
|
|
|
8837
|
-
|
|
9175
|
+
/* ── Ellipsis ─────────────────────────────────────────────── */
|
|
9176
|
+
|
|
9177
|
+
.pag-ellipsis {
|
|
8838
9178
|
display: inline-flex;
|
|
8839
9179
|
align-items: center;
|
|
8840
9180
|
justify-content: center;
|
|
8841
9181
|
width: 40px;
|
|
8842
9182
|
height: 40px;
|
|
8843
|
-
|
|
8844
|
-
font-
|
|
9183
|
+
font-size: 14px;
|
|
9184
|
+
font-weight: 500;
|
|
9185
|
+
letter-spacing: -0.3px;
|
|
9186
|
+
color: #0b0b0b;
|
|
8845
9187
|
user-select: none;
|
|
8846
9188
|
}
|
|
8847
9189
|
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
font-size:
|
|
9190
|
+
/* ── Compact: "Page X of Y" ───────────────────────────────── */
|
|
9191
|
+
|
|
9192
|
+
.pag-page-text {
|
|
9193
|
+
font-size: 14px;
|
|
9194
|
+
font-weight: 500;
|
|
9195
|
+
letter-spacing: -0.3px;
|
|
9196
|
+
color: #0b0b0b;
|
|
9197
|
+
line-height: 22px;
|
|
9198
|
+
white-space: nowrap;
|
|
8852
9199
|
}
|
|
8853
9200
|
|
|
8854
|
-
|
|
9201
|
+
/* ── Count-text: "1-5 of 50" ─────────────────────────────── */
|
|
9202
|
+
|
|
9203
|
+
.pag-count-text {
|
|
9204
|
+
font-size: 14px;
|
|
9205
|
+
font-weight: 500;
|
|
9206
|
+
letter-spacing: -0.3px;
|
|
9207
|
+
color: #0b0b0b;
|
|
9208
|
+
line-height: 22px;
|
|
9209
|
+
white-space: nowrap;
|
|
9210
|
+
}
|
|
9211
|
+
|
|
9212
|
+
/* ── Count-text: inline current page number ───────────────── */
|
|
9213
|
+
|
|
9214
|
+
.pag-current-num {
|
|
8855
9215
|
display: inline-flex;
|
|
8856
|
-
|
|
9216
|
+
align-items: center;
|
|
9217
|
+
justify-content: center;
|
|
9218
|
+
width: 24px;
|
|
8857
9219
|
height: 40px;
|
|
9220
|
+
font-size: 14px;
|
|
9221
|
+
font-weight: 500;
|
|
9222
|
+
letter-spacing: -0.3px;
|
|
9223
|
+
color: #0b0b0b;
|
|
9224
|
+
line-height: 22px;
|
|
8858
9225
|
}
|
|
8859
9226
|
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
9227
|
+
/* ── Extended sub-label ───────────────────────────────────── */
|
|
9228
|
+
|
|
9229
|
+
.pag-label {
|
|
9230
|
+
font-size: 14px;
|
|
9231
|
+
font-weight: 400;
|
|
9232
|
+
letter-spacing: -0.3px;
|
|
9233
|
+
color: #7d7d7d;
|
|
9234
|
+
line-height: 22px;
|
|
9235
|
+
text-align: center;
|
|
8863
9236
|
}
|
|
8864
9237
|
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
9238
|
+
/* ── Dark mode ───────────────────────────────────────────── */
|
|
9239
|
+
|
|
9240
|
+
:host-context([data-theme="dark"]) .pag-nav-btn,
|
|
9241
|
+
[data-theme="dark"] .pag-nav-btn {
|
|
9242
|
+
background: #1a1a1a;
|
|
9243
|
+
border-color: #333333;
|
|
9244
|
+
color: #f5f5f5;
|
|
8869
9245
|
}
|
|
8870
9246
|
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
9247
|
+
:host-context([data-theme="dark"]) .pag-nav-btn:hover:not(:disabled),
|
|
9248
|
+
[data-theme="dark"] .pag-nav-btn:hover:not(:disabled) {
|
|
9249
|
+
background: #2b2b2b;
|
|
8874
9250
|
}
|
|
8875
9251
|
|
|
8876
|
-
:host([
|
|
8877
|
-
|
|
9252
|
+
:host-context([data-theme="dark"]) .pag-page-btn,
|
|
9253
|
+
[data-theme="dark"] .pag-page-btn {
|
|
9254
|
+
background: #1a1a1a;
|
|
9255
|
+
border-color: #333333;
|
|
9256
|
+
color: #f5f5f5;
|
|
8878
9257
|
}
|
|
8879
9258
|
|
|
8880
|
-
:host([
|
|
8881
|
-
|
|
8882
|
-
|
|
9259
|
+
:host-context([data-theme="dark"]) .pag-page-btn:hover,
|
|
9260
|
+
[data-theme="dark"] .pag-page-btn:hover {
|
|
9261
|
+
background: #2b2b2b;
|
|
9262
|
+
}
|
|
9263
|
+
|
|
9264
|
+
:host-context([data-theme="dark"]) .pag-page-btn[aria-current="page"],
|
|
9265
|
+
[data-theme="dark"] .pag-page-btn[aria-current="page"] {
|
|
9266
|
+
background: #333333;
|
|
9267
|
+
border-color: #f5f5f5;
|
|
9268
|
+
}
|
|
9269
|
+
|
|
9270
|
+
:host-context([data-theme="dark"]) .pag-ellipsis,
|
|
9271
|
+
:host-context([data-theme="dark"]) .pag-page-text,
|
|
9272
|
+
:host-context([data-theme="dark"]) .pag-count-text,
|
|
9273
|
+
:host-context([data-theme="dark"]) .pag-current-num,
|
|
9274
|
+
[data-theme="dark"] .pag-ellipsis,
|
|
9275
|
+
[data-theme="dark"] .pag-page-text,
|
|
9276
|
+
[data-theme="dark"] .pag-count-text,
|
|
9277
|
+
[data-theme="dark"] .pag-current-num {
|
|
9278
|
+
color: #f5f5f5;
|
|
9279
|
+
}
|
|
9280
|
+
|
|
9281
|
+
:host-context([data-theme="dark"]) .pag-label,
|
|
9282
|
+
[data-theme="dark"] .pag-label {
|
|
9283
|
+
color: #a3a3a3;
|
|
8883
9284
|
}
|
|
8884
9285
|
`;
|
|
9286
|
+
__decorateClass([
|
|
9287
|
+
(0, import_decorators36.property)({ type: String, reflect: true })
|
|
9288
|
+
], RelPagination.prototype, "type", 2);
|
|
8885
9289
|
__decorateClass([
|
|
8886
9290
|
(0, import_decorators36.property)({ type: Number })
|
|
8887
9291
|
], RelPagination.prototype, "page", 2);
|
|
@@ -8893,19 +9297,16 @@ __decorateClass([
|
|
|
8893
9297
|
], RelPagination.prototype, "totalPages", 2);
|
|
8894
9298
|
__decorateClass([
|
|
8895
9299
|
(0, import_decorators36.property)({ type: Number })
|
|
8896
|
-
], RelPagination.prototype, "
|
|
9300
|
+
], RelPagination.prototype, "totalItems", 2);
|
|
8897
9301
|
__decorateClass([
|
|
8898
9302
|
(0, import_decorators36.property)({ type: Number })
|
|
8899
|
-
], RelPagination.prototype, "
|
|
9303
|
+
], RelPagination.prototype, "perPage", 2);
|
|
9304
|
+
__decorateClass([
|
|
9305
|
+
(0, import_decorators36.property)({ type: Boolean })
|
|
9306
|
+
], RelPagination.prototype, "showLabel", 2);
|
|
8900
9307
|
__decorateClass([
|
|
8901
9308
|
(0, import_decorators36.property)({ type: Boolean, reflect: true })
|
|
8902
9309
|
], RelPagination.prototype, "disabled", 2);
|
|
8903
|
-
__decorateClass([
|
|
8904
|
-
(0, import_decorators36.property)({ type: String })
|
|
8905
|
-
], RelPagination.prototype, "density", 2);
|
|
8906
|
-
__decorateClass([
|
|
8907
|
-
(0, import_decorators36.property)({ type: String })
|
|
8908
|
-
], RelPagination.prototype, "variant", 2);
|
|
8909
9310
|
__decorateClass([
|
|
8910
9311
|
(0, import_decorators36.property)({ type: String })
|
|
8911
9312
|
], RelPagination.prototype, "hrefTemplate", 2);
|
|
@@ -10134,88 +10535,410 @@ RelSegmentedButton = __decorateClass([
|
|
|
10134
10535
|
// src/components/rel-select/rel-select.ts
|
|
10135
10536
|
var import_lit44 = require("lit");
|
|
10136
10537
|
var import_decorators44 = require("lit/decorators.js");
|
|
10538
|
+
var import_repeat = require("lit/directives/repeat.js");
|
|
10137
10539
|
var import_vars_v232 = require("./vars-v2-VMGWTFJZ.css");
|
|
10138
|
-
var
|
|
10540
|
+
var import_rel_icon8 = require("@reliability-design/icons/rel-icon");
|
|
10541
|
+
function normalizeOption(o) {
|
|
10542
|
+
if (typeof o === "string") return { value: o, label: o, supportingText: "" };
|
|
10543
|
+
return { value: o.value, label: o.label ?? o.value, supportingText: o.supportingText ?? "" };
|
|
10544
|
+
}
|
|
10139
10545
|
var RelSelect = class extends import_lit44.LitElement {
|
|
10140
10546
|
constructor() {
|
|
10141
10547
|
super(...arguments);
|
|
10142
10548
|
this.label = "";
|
|
10549
|
+
this.labelStyle = "default";
|
|
10143
10550
|
this.options = [];
|
|
10551
|
+
this.multiple = false;
|
|
10144
10552
|
this.selected = "";
|
|
10553
|
+
this.selectedValues = [];
|
|
10145
10554
|
this.state = "default";
|
|
10146
10555
|
this.supportingText = "";
|
|
10147
10556
|
this.size = "medium";
|
|
10148
10557
|
this.border = "rounded";
|
|
10149
10558
|
this.leftIcon = "";
|
|
10150
10559
|
this.rightIcon = "";
|
|
10560
|
+
this.placeholder = "Select option";
|
|
10561
|
+
this.searchPlaceholder = "Search option";
|
|
10562
|
+
this.selectAllLabel = "Select all";
|
|
10563
|
+
this.maxVisibleChips = 3;
|
|
10564
|
+
this.noSearch = false;
|
|
10565
|
+
this.open = false;
|
|
10566
|
+
this.highlightedIndex = -1;
|
|
10567
|
+
this.panelStyle = "";
|
|
10568
|
+
this.searchValue = "";
|
|
10569
|
+
this.internalState = "default";
|
|
10570
|
+
this.uniqueId = `select-${Math.random().toString(36).slice(2)}`;
|
|
10571
|
+
this.onOutsidePointerDown = (e) => {
|
|
10572
|
+
if (!this.open) return;
|
|
10573
|
+
const path = e.composedPath();
|
|
10574
|
+
if (path.includes(this)) return;
|
|
10575
|
+
this.closeListbox();
|
|
10576
|
+
};
|
|
10577
|
+
// Continuously re-deriving a fixed-position panel's coordinates from
|
|
10578
|
+
// every page scroll event is fragile (it's what was causing the panel to
|
|
10579
|
+
// jump to the top of the viewport). Instead, close the panel on any
|
|
10580
|
+
// *outside* scroll, same as clicking outside — scrolling the option list
|
|
10581
|
+
// itself (target is the listbox) is the one case that should NOT close it.
|
|
10582
|
+
this.onPageScroll = (e) => {
|
|
10583
|
+
if (!this.open) return;
|
|
10584
|
+
if (e.composedPath()[0] === this.listboxEl) return;
|
|
10585
|
+
this.closeListbox();
|
|
10586
|
+
};
|
|
10587
|
+
this.updatePosition = () => {
|
|
10588
|
+
if (!this.triggerEl || !this.listboxEl) return;
|
|
10589
|
+
this.listboxEl.setAttribute("data-open", "");
|
|
10590
|
+
const t = this.triggerEl.getBoundingClientRect();
|
|
10591
|
+
const c = this.listboxEl.getBoundingClientRect();
|
|
10592
|
+
let top = t.bottom + 4;
|
|
10593
|
+
if (top + c.height > window.innerHeight - 8) {
|
|
10594
|
+
top = Math.max(8, t.top - c.height - 4);
|
|
10595
|
+
}
|
|
10596
|
+
let left = t.left;
|
|
10597
|
+
if (left + t.width > window.innerWidth - 8) {
|
|
10598
|
+
left = Math.max(8, window.innerWidth - t.width - 8);
|
|
10599
|
+
}
|
|
10600
|
+
this.panelStyle = `top:${top}px;left:${left}px;width:${t.width}px;`;
|
|
10601
|
+
};
|
|
10602
|
+
this.onSearchInput = (e) => {
|
|
10603
|
+
this.searchValue = e.target.value;
|
|
10604
|
+
this.highlightedIndex = this.filteredOptions.length > 0 ? 0 : -1;
|
|
10605
|
+
requestAnimationFrame(() => this.updatePosition());
|
|
10606
|
+
};
|
|
10151
10607
|
}
|
|
10152
|
-
|
|
10153
|
-
super.
|
|
10154
|
-
|
|
10155
|
-
if (leftIcon) this.leftIcon = leftIcon;
|
|
10156
|
-
const rightIcon = this.getAttribute("right-icon");
|
|
10157
|
-
if (rightIcon) this.rightIcon = rightIcon;
|
|
10608
|
+
disconnectedCallback() {
|
|
10609
|
+
super.disconnectedCallback();
|
|
10610
|
+
this.removeGlobalListeners();
|
|
10158
10611
|
}
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10612
|
+
willUpdate(changed) {
|
|
10613
|
+
if (changed.has("multiple") && this.multiple === false) {
|
|
10614
|
+
this.selectedValues = [];
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
get normalizedOptions() {
|
|
10618
|
+
return this.options.map(normalizeOption);
|
|
10619
|
+
}
|
|
10620
|
+
/** Options matching the current search text (substring match, case-insensitive). */
|
|
10621
|
+
get filteredOptions() {
|
|
10622
|
+
const opts = this.normalizedOptions;
|
|
10623
|
+
if (!this.searchValue) return opts;
|
|
10624
|
+
const v = this.searchValue.toLowerCase();
|
|
10625
|
+
return opts.filter((o) => o.label.toLowerCase().includes(v));
|
|
10626
|
+
}
|
|
10627
|
+
get hasValue() {
|
|
10628
|
+
return this.multiple ? this.selectedValues.length > 0 : !!this.selected;
|
|
10629
|
+
}
|
|
10630
|
+
/** Icon size scales with the select's own size, matching the trigger. */
|
|
10631
|
+
get iconSize() {
|
|
10632
|
+
return this.size === "small" ? "xs" : this.size === "large" ? "md" : "sm";
|
|
10633
|
+
}
|
|
10634
|
+
/** The search field uses "small" sizing for both small and medium select — only "large" select bumps it to "medium". */
|
|
10635
|
+
get searchIconSize() {
|
|
10636
|
+
return this.size === "large" ? "md" : "sm";
|
|
10637
|
+
}
|
|
10638
|
+
get selectAllStatus() {
|
|
10639
|
+
const filtered = this.filteredOptions;
|
|
10640
|
+
if (filtered.length === 0) return "unchecked";
|
|
10641
|
+
const selectedCount = filtered.filter((o) => this.selectedValues.includes(o.value)).length;
|
|
10642
|
+
if (selectedCount === 0) return "unchecked";
|
|
10643
|
+
if (selectedCount === filtered.length) return "checked";
|
|
10644
|
+
return "indeterminate";
|
|
10645
|
+
}
|
|
10646
|
+
addGlobalListeners() {
|
|
10647
|
+
document.addEventListener("pointerdown", this.onOutsidePointerDown);
|
|
10648
|
+
window.addEventListener("resize", this.updatePosition);
|
|
10649
|
+
window.addEventListener("scroll", this.onPageScroll, true);
|
|
10650
|
+
}
|
|
10651
|
+
removeGlobalListeners() {
|
|
10652
|
+
document.removeEventListener("pointerdown", this.onOutsidePointerDown);
|
|
10653
|
+
window.removeEventListener("resize", this.updatePosition);
|
|
10654
|
+
window.removeEventListener("scroll", this.onPageScroll, true);
|
|
10655
|
+
}
|
|
10656
|
+
emitChange() {
|
|
10162
10657
|
this.dispatchEvent(
|
|
10163
10658
|
new CustomEvent("changed", {
|
|
10164
|
-
detail: { value },
|
|
10659
|
+
detail: { value: this.multiple ? this.selectedValues : this.selected },
|
|
10165
10660
|
bubbles: true,
|
|
10166
10661
|
composed: true
|
|
10167
10662
|
})
|
|
10168
10663
|
);
|
|
10169
10664
|
}
|
|
10665
|
+
openListbox() {
|
|
10666
|
+
if (this.state === "disabled" || this.open) return;
|
|
10667
|
+
this.open = true;
|
|
10668
|
+
this.searchValue = "";
|
|
10669
|
+
this.highlightedIndex = -1;
|
|
10670
|
+
this.addGlobalListeners();
|
|
10671
|
+
requestAnimationFrame(() => {
|
|
10672
|
+
this.updatePosition();
|
|
10673
|
+
if (!this.noSearch) {
|
|
10674
|
+
this.searchInputEl?.focus({ preventScroll: true });
|
|
10675
|
+
}
|
|
10676
|
+
});
|
|
10677
|
+
}
|
|
10678
|
+
closeListbox() {
|
|
10679
|
+
if (!this.open) return;
|
|
10680
|
+
this.open = false;
|
|
10681
|
+
this.removeGlobalListeners();
|
|
10682
|
+
this.triggerEl?.focus();
|
|
10683
|
+
}
|
|
10684
|
+
selectSingleOption(option) {
|
|
10685
|
+
this.selected = option.value;
|
|
10686
|
+
if (this.state === "error") this.state = "default";
|
|
10687
|
+
this.closeListbox();
|
|
10688
|
+
this.emitChange();
|
|
10689
|
+
}
|
|
10690
|
+
toggleMultiOption(option) {
|
|
10691
|
+
const idx = this.selectedValues.indexOf(option.value);
|
|
10692
|
+
this.selectedValues = idx >= 0 ? this.selectedValues.filter((v) => v !== option.value) : [...this.selectedValues, option.value];
|
|
10693
|
+
if (this.state === "error") this.state = "default";
|
|
10694
|
+
this.emitChange();
|
|
10695
|
+
}
|
|
10696
|
+
toggleSelectAll() {
|
|
10697
|
+
const filtered = this.filteredOptions;
|
|
10698
|
+
const status = this.selectAllStatus;
|
|
10699
|
+
if (status === "checked") {
|
|
10700
|
+
const filteredValues = new Set(filtered.map((o) => o.value));
|
|
10701
|
+
this.selectedValues = this.selectedValues.filter((v) => !filteredValues.has(v));
|
|
10702
|
+
} else {
|
|
10703
|
+
const toAdd = filtered.map((o) => o.value).filter((v) => !this.selectedValues.includes(v));
|
|
10704
|
+
this.selectedValues = [...this.selectedValues, ...toAdd];
|
|
10705
|
+
}
|
|
10706
|
+
if (this.state === "error") this.state = "default";
|
|
10707
|
+
this.emitChange();
|
|
10708
|
+
}
|
|
10709
|
+
removeChip(value) {
|
|
10710
|
+
if (this.state === "disabled") return;
|
|
10711
|
+
this.selectedValues = this.selectedValues.filter((v) => v !== value);
|
|
10712
|
+
this.emitChange();
|
|
10713
|
+
}
|
|
10714
|
+
onTriggerClick() {
|
|
10715
|
+
if (this.open) this.closeListbox();
|
|
10716
|
+
else this.openListbox();
|
|
10717
|
+
}
|
|
10718
|
+
onTriggerKeyDown(e) {
|
|
10719
|
+
if (this.state === "disabled") return;
|
|
10720
|
+
if (!this.open) {
|
|
10721
|
+
if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key)) {
|
|
10722
|
+
e.preventDefault();
|
|
10723
|
+
this.openListbox();
|
|
10724
|
+
}
|
|
10725
|
+
return;
|
|
10726
|
+
}
|
|
10727
|
+
if (this.noSearch) this.handleListNavigation(e);
|
|
10728
|
+
}
|
|
10729
|
+
onSearchKeyDown(e) {
|
|
10730
|
+
this.handleListNavigation(e);
|
|
10731
|
+
}
|
|
10732
|
+
handleListNavigation(e) {
|
|
10733
|
+
const filtered = this.filteredOptions;
|
|
10734
|
+
switch (e.key) {
|
|
10735
|
+
case "ArrowDown":
|
|
10736
|
+
e.preventDefault();
|
|
10737
|
+
this.highlightedIndex = Math.min(filtered.length - 1, this.highlightedIndex + 1);
|
|
10738
|
+
break;
|
|
10739
|
+
case "ArrowUp":
|
|
10740
|
+
e.preventDefault();
|
|
10741
|
+
this.highlightedIndex = Math.max(0, this.highlightedIndex - 1);
|
|
10742
|
+
break;
|
|
10743
|
+
case "Enter":
|
|
10744
|
+
e.preventDefault();
|
|
10745
|
+
if (this.highlightedIndex >= 0 && filtered[this.highlightedIndex]) {
|
|
10746
|
+
const opt = filtered[this.highlightedIndex];
|
|
10747
|
+
if (this.multiple) this.toggleMultiOption(opt);
|
|
10748
|
+
else this.selectSingleOption(opt);
|
|
10749
|
+
}
|
|
10750
|
+
break;
|
|
10751
|
+
case "Escape":
|
|
10752
|
+
e.preventDefault();
|
|
10753
|
+
this.closeListbox();
|
|
10754
|
+
break;
|
|
10755
|
+
case "Tab":
|
|
10756
|
+
this.closeListbox();
|
|
10757
|
+
break;
|
|
10758
|
+
}
|
|
10759
|
+
}
|
|
10760
|
+
renderChips() {
|
|
10761
|
+
const values = this.selectedValues;
|
|
10762
|
+
const visible = values.slice(0, this.maxVisibleChips);
|
|
10763
|
+
const overflow = values.length - visible.length;
|
|
10764
|
+
const opts = this.normalizedOptions;
|
|
10765
|
+
return import_lit44.html`
|
|
10766
|
+
<span class="select-chips">
|
|
10767
|
+
${(0, import_repeat.repeat)(
|
|
10768
|
+
visible,
|
|
10769
|
+
(v) => v,
|
|
10770
|
+
(v) => {
|
|
10771
|
+
const opt = opts.find((o) => o.value === v);
|
|
10772
|
+
return import_lit44.html`
|
|
10773
|
+
<rel-chip
|
|
10774
|
+
label="${opt?.label ?? v}"
|
|
10775
|
+
size="sm"
|
|
10776
|
+
variant="subtle"
|
|
10777
|
+
border="default"
|
|
10778
|
+
?removable=${this.state !== "disabled"}
|
|
10779
|
+
@click=${(e) => e.stopPropagation()}
|
|
10780
|
+
@removed=${(e) => {
|
|
10781
|
+
e.stopPropagation();
|
|
10782
|
+
this.removeChip(v);
|
|
10783
|
+
}}
|
|
10784
|
+
></rel-chip>
|
|
10785
|
+
`;
|
|
10786
|
+
}
|
|
10787
|
+
)}
|
|
10788
|
+
${overflow > 0 ? import_lit44.html`<rel-chip label="+${overflow}" size="sm" variant="fill" border="default"></rel-chip>` : import_lit44.nothing}
|
|
10789
|
+
</span>
|
|
10790
|
+
`;
|
|
10791
|
+
}
|
|
10170
10792
|
render() {
|
|
10171
|
-
const
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
`select-${this.size}`
|
|
10176
|
-
].filter(Boolean).join(" ");
|
|
10793
|
+
const opts = this.normalizedOptions;
|
|
10794
|
+
const filtered = this.filteredOptions;
|
|
10795
|
+
const isDisabled = this.state === "disabled";
|
|
10796
|
+
const showFloatingChrome = this.labelStyle === "floating" && !!this.label;
|
|
10177
10797
|
const wrapperClasses = [
|
|
10178
10798
|
"select-wrapper",
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10799
|
+
this.size,
|
|
10800
|
+
this.state,
|
|
10801
|
+
`border-${this.border}`,
|
|
10802
|
+
showFloatingChrome ? "floating" : "",
|
|
10803
|
+
this.internalState === "focused" ? "focused" : "",
|
|
10804
|
+
this.hasValue ? "has-value" : "",
|
|
10805
|
+
this.open ? "open" : ""
|
|
10806
|
+
].filter(Boolean).join(" ");
|
|
10807
|
+
const listboxId = `${this.uniqueId}-listbox`;
|
|
10808
|
+
const activeOptionId = this.open && this.highlightedIndex >= 0 ? `${this.uniqueId}-option-${this.highlightedIndex}` : "";
|
|
10809
|
+
const selectedSingle = opts.find((o) => o.value === this.selected);
|
|
10184
10810
|
return import_lit44.html`
|
|
10185
10811
|
<div class="${wrapperClasses}">
|
|
10186
|
-
${this.label ? import_lit44.html`<label class="select-label">${this.label}</label>` : ""}
|
|
10812
|
+
${!showFloatingChrome && this.label ? import_lit44.html`<label class="select-label" for="${this.uniqueId}">${this.label}</label>` : ""}
|
|
10187
10813
|
|
|
10188
|
-
<div class="
|
|
10189
|
-
${
|
|
10814
|
+
<div class="select-container">
|
|
10815
|
+
${showFloatingChrome ? import_lit44.html`<span class="floating-label${this.leftIcon ? " has-left-icon" : ""}"
|
|
10816
|
+
>${this.label}</span
|
|
10817
|
+
>` : ""}
|
|
10190
10818
|
|
|
10191
|
-
<
|
|
10192
|
-
|
|
10819
|
+
<button
|
|
10820
|
+
id="${this.uniqueId}"
|
|
10821
|
+
type="button"
|
|
10822
|
+
class="select-trigger"
|
|
10823
|
+
role="combobox"
|
|
10824
|
+
aria-haspopup="listbox"
|
|
10825
|
+
aria-expanded="${this.open}"
|
|
10826
|
+
aria-controls="${listboxId}"
|
|
10827
|
+
aria-activedescendant="${activeOptionId}"
|
|
10828
|
+
aria-invalid="${this.state === "error"}"
|
|
10829
|
+
aria-label="${this.label || this.placeholder}"
|
|
10193
10830
|
?disabled="${isDisabled}"
|
|
10194
|
-
@
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
${this.
|
|
10200
|
-
(option) => import_lit44.html`
|
|
10201
|
-
<option value="${option}" ?selected="${option === this.selected}">
|
|
10202
|
-
${option}
|
|
10203
|
-
</option>
|
|
10204
|
-
`
|
|
10205
|
-
)}
|
|
10206
|
-
</select>
|
|
10831
|
+
@click="${this.onTriggerClick}"
|
|
10832
|
+
@keydown="${this.onTriggerKeyDown}"
|
|
10833
|
+
@focus="${() => this.internalState = "focused"}"
|
|
10834
|
+
@blur="${() => this.internalState = "default"}"
|
|
10835
|
+
>
|
|
10836
|
+
${this.leftIcon ? import_lit44.html`<rel-icon name="${this.leftIcon}" size="${this.iconSize}" class="icon left"></rel-icon>` : ""}
|
|
10207
10837
|
|
|
10208
|
-
|
|
10838
|
+
${this.multiple ? this.selectedValues.length > 0 ? import_lit44.html`<span class="select-value">${this.renderChips()}</span>` : import_lit44.html`<span class="select-value placeholder">
|
|
10839
|
+
<span class="select-value-text">${this.placeholder}</span>
|
|
10840
|
+
</span>` : import_lit44.html`<span class="select-value ${selectedSingle ? "" : "placeholder"}">
|
|
10841
|
+
<span class="select-value-text"
|
|
10842
|
+
>${selectedSingle ? selectedSingle.label : this.placeholder}</span
|
|
10843
|
+
>
|
|
10844
|
+
</span>`}
|
|
10209
10845
|
|
|
10210
|
-
|
|
10846
|
+
<rel-icon
|
|
10847
|
+
name="${this.rightIcon || "chevron-down"}"
|
|
10848
|
+
size="${this.iconSize}"
|
|
10849
|
+
class="icon ${this.rightIcon ? "" : "chevron"}"
|
|
10850
|
+
></rel-icon>
|
|
10851
|
+
</button>
|
|
10211
10852
|
</div>
|
|
10212
10853
|
|
|
10213
|
-
${this.supportingText ? import_lit44.html
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10854
|
+
${this.supportingText ? import_lit44.html`<span class="select-support ${this.state === "error" ? "error" : ""}">
|
|
10855
|
+
${this.supportingText}
|
|
10856
|
+
</span>` : ""}
|
|
10857
|
+
</div>
|
|
10858
|
+
|
|
10859
|
+
<div
|
|
10860
|
+
id="${listboxId}"
|
|
10861
|
+
class="select-listbox"
|
|
10862
|
+
role="listbox"
|
|
10863
|
+
aria-multiselectable="${this.multiple}"
|
|
10864
|
+
aria-label="${this.label || "Options"}"
|
|
10865
|
+
style="${this.panelStyle}"
|
|
10866
|
+
?data-open="${this.open}"
|
|
10867
|
+
>
|
|
10868
|
+
${!this.noSearch ? import_lit44.html`<div class="select-search">
|
|
10869
|
+
<div class="search-input-wrap">
|
|
10870
|
+
<rel-icon name="search" size="${this.searchIconSize}" class="icon"></rel-icon>
|
|
10871
|
+
<input
|
|
10872
|
+
class="search-input"
|
|
10873
|
+
type="text"
|
|
10874
|
+
placeholder="${this.searchPlaceholder}"
|
|
10875
|
+
.value="${this.searchValue}"
|
|
10876
|
+
@input="${this.onSearchInput}"
|
|
10877
|
+
@keydown="${(e) => this.onSearchKeyDown(e)}"
|
|
10878
|
+
/>
|
|
10879
|
+
</div>
|
|
10880
|
+
</div>` : ""}
|
|
10881
|
+
|
|
10882
|
+
${filtered.length === 0 ? import_lit44.html`<div class="select-empty">
|
|
10883
|
+
${opts.length === 0 ? "No options available" : "No matches found"}
|
|
10884
|
+
</div>` : this.multiple ? import_lit44.html`
|
|
10885
|
+
<div class="select-all-row">
|
|
10886
|
+
<rel-checkbox
|
|
10887
|
+
label="${this.selectAllLabel}"
|
|
10888
|
+
status="${this.selectAllStatus}"
|
|
10889
|
+
@rel-change=${(e) => {
|
|
10890
|
+
e.stopPropagation();
|
|
10891
|
+
this.toggleSelectAll();
|
|
10892
|
+
}}
|
|
10893
|
+
></rel-checkbox>
|
|
10894
|
+
</div>
|
|
10895
|
+
<div class="select-options">
|
|
10896
|
+
${(0, import_repeat.repeat)(
|
|
10897
|
+
filtered,
|
|
10898
|
+
(option) => option.value,
|
|
10899
|
+
(option, index) => import_lit44.html`
|
|
10900
|
+
<div
|
|
10901
|
+
id="${this.uniqueId}-option-${index}"
|
|
10902
|
+
class="checkbox-option ${index === this.highlightedIndex ? "highlighted" : ""}"
|
|
10903
|
+
role="option"
|
|
10904
|
+
aria-selected="${this.selectedValues.includes(option.value)}"
|
|
10905
|
+
@pointerenter="${() => this.highlightedIndex = index}"
|
|
10906
|
+
>
|
|
10907
|
+
<rel-checkbox
|
|
10908
|
+
label="${option.label}"
|
|
10909
|
+
supportingtext="${option.supportingText}"
|
|
10910
|
+
status="${this.selectedValues.includes(option.value) ? "checked" : "unchecked"}"
|
|
10911
|
+
@rel-change=${(e) => {
|
|
10912
|
+
e.stopPropagation();
|
|
10913
|
+
this.toggleMultiOption(option);
|
|
10914
|
+
}}
|
|
10915
|
+
></rel-checkbox>
|
|
10916
|
+
</div>
|
|
10917
|
+
`
|
|
10918
|
+
)}
|
|
10919
|
+
</div>
|
|
10920
|
+
` : import_lit44.html`
|
|
10921
|
+
<div class="select-options">
|
|
10922
|
+
${(0, import_repeat.repeat)(
|
|
10923
|
+
filtered,
|
|
10924
|
+
(option) => option.value,
|
|
10925
|
+
(option, index) => import_lit44.html`
|
|
10926
|
+
<div
|
|
10927
|
+
id="${this.uniqueId}-option-${index}"
|
|
10928
|
+
class="select-option ${index === this.highlightedIndex ? "highlighted" : ""}"
|
|
10929
|
+
role="option"
|
|
10930
|
+
aria-selected="${option.value === this.selected}"
|
|
10931
|
+
@mousedown="${(e) => e.preventDefault()}"
|
|
10932
|
+
@click="${() => this.selectSingleOption(option)}"
|
|
10933
|
+
@pointerenter="${() => this.highlightedIndex = index}"
|
|
10934
|
+
>
|
|
10935
|
+
<span class="select-option-label">${option.label}</span>
|
|
10936
|
+
${option.value === this.selected ? import_lit44.html`<rel-icon name="check" size="sm" class="select-option-check"></rel-icon>` : ""}
|
|
10937
|
+
</div>
|
|
10938
|
+
`
|
|
10939
|
+
)}
|
|
10940
|
+
</div>
|
|
10941
|
+
`}
|
|
10219
10942
|
</div>
|
|
10220
10943
|
`;
|
|
10221
10944
|
}
|
|
@@ -10230,258 +10953,686 @@ RelSelect.styles = import_lit44.css`
|
|
|
10230
10953
|
.select-wrapper {
|
|
10231
10954
|
display: flex;
|
|
10232
10955
|
flex-direction: column;
|
|
10956
|
+
gap: var(--rel-spacing-space-2xs);
|
|
10233
10957
|
width: 100%;
|
|
10234
10958
|
}
|
|
10235
10959
|
|
|
10960
|
+
/* Dims everything inside uniformly (label, trigger, icons, value text,
|
|
10961
|
+
supporting text) — matches rel-button's :host([disabled]) opacity
|
|
10962
|
+
approach instead of relying on one barely-different background tint. */
|
|
10963
|
+
.select-wrapper.disabled {
|
|
10964
|
+
opacity: 0.5;
|
|
10965
|
+
}
|
|
10966
|
+
|
|
10236
10967
|
.select-label {
|
|
10237
|
-
font-size: var(--rel-fontSizes-sm);
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
color: var(--rel-color-text-heading);
|
|
10968
|
+
font-size: var(--rel-fontSizes-sm, 14px);
|
|
10969
|
+
font-weight: var(--rel-fontWeights-regular, 400);
|
|
10970
|
+
color: var(--rel-select-label-color, #363636);
|
|
10241
10971
|
}
|
|
10242
10972
|
|
|
10973
|
+
/* Error only colors the border/focus ring and the supporting text below
|
|
10974
|
+
the field — label, floating label, placeholder, and icons stay normal. */
|
|
10975
|
+
|
|
10976
|
+
/* Container */
|
|
10243
10977
|
.select-container {
|
|
10244
10978
|
position: relative;
|
|
10979
|
+
}
|
|
10980
|
+
|
|
10981
|
+
/* Trigger button — visually a text field, semantically a combobox button */
|
|
10982
|
+
.select-trigger {
|
|
10245
10983
|
display: flex;
|
|
10246
10984
|
align-items: center;
|
|
10985
|
+
width: 100%;
|
|
10986
|
+
box-sizing: border-box;
|
|
10987
|
+
gap: 8px;
|
|
10988
|
+
background: var(--rel-select-bg, #ffffff);
|
|
10989
|
+
border: 1px solid var(--rel-select-border-default, #e5e5e5);
|
|
10990
|
+
cursor: pointer;
|
|
10991
|
+
font-family: inherit;
|
|
10992
|
+
transition: border-color 0.15s ease;
|
|
10993
|
+
text-align: left;
|
|
10247
10994
|
}
|
|
10248
10995
|
|
|
10249
|
-
.
|
|
10250
|
-
|
|
10996
|
+
.border-rounded .select-trigger {
|
|
10997
|
+
border-radius: var(--rel-select-radius, 4px);
|
|
10998
|
+
}
|
|
10999
|
+
|
|
11000
|
+
.border-sharp .select-trigger {
|
|
11001
|
+
border-radius: 0;
|
|
11002
|
+
}
|
|
11003
|
+
|
|
11004
|
+
.select-trigger:focus-visible,
|
|
11005
|
+
.select-wrapper.open .select-trigger {
|
|
11006
|
+
outline: none;
|
|
11007
|
+
border-color: var(--rel-select-border-focus, #0b0b0b);
|
|
11008
|
+
}
|
|
11009
|
+
|
|
11010
|
+
.select-wrapper.error .select-trigger {
|
|
11011
|
+
border-color: var(--rel-select-border-error, #ce3131);
|
|
11012
|
+
}
|
|
11013
|
+
|
|
11014
|
+
.select-wrapper.disabled .select-trigger {
|
|
11015
|
+
cursor: not-allowed;
|
|
11016
|
+
background: var(--rel-select-bg-disabled, #fafafa);
|
|
11017
|
+
border-color: var(--rel-select-border-default, #e5e5e5);
|
|
11018
|
+
}
|
|
11019
|
+
|
|
11020
|
+
/* Sizes */
|
|
11021
|
+
.select-wrapper.small .select-trigger {
|
|
11022
|
+
padding: var(--rel-spacing-space-xs) var(--rel-spacing-space-sm);
|
|
11023
|
+
min-height: 40px;
|
|
11024
|
+
font-size: var(--rel-fontSizes-sm, 14px);
|
|
11025
|
+
}
|
|
11026
|
+
|
|
11027
|
+
.select-wrapper.medium .select-trigger {
|
|
11028
|
+
padding: 12px;
|
|
11029
|
+
min-height: 48px;
|
|
11030
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
11031
|
+
}
|
|
11032
|
+
|
|
11033
|
+
.select-wrapper.large .select-trigger {
|
|
11034
|
+
padding: var(--rel-spacing-space-md);
|
|
11035
|
+
min-height: 56px;
|
|
11036
|
+
font-size: var(--rel-fontSizes-lg, 18px);
|
|
11037
|
+
}
|
|
11038
|
+
|
|
11039
|
+
/* Icons */
|
|
11040
|
+
.select-trigger .icon {
|
|
10251
11041
|
display: flex;
|
|
10252
11042
|
align-items: center;
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
top: 50%;
|
|
10256
|
-
transform: translateY(-50%);
|
|
10257
|
-
font-size: 16px;
|
|
10258
|
-
color: var(--rel-color-text-primary);
|
|
11043
|
+
flex-shrink: 0;
|
|
11044
|
+
color: var(--rel-select-icon-color, #0b0b0b);
|
|
10259
11045
|
}
|
|
10260
11046
|
|
|
10261
|
-
.icon.
|
|
10262
|
-
|
|
10263
|
-
pointer-events: none;
|
|
10264
|
-
position: absolute;
|
|
10265
|
-
top: 50%;
|
|
10266
|
-
transform: translateY(-50%);
|
|
11047
|
+
.select-trigger .icon.chevron {
|
|
11048
|
+
transition: transform 0.15s ease;
|
|
10267
11049
|
}
|
|
10268
11050
|
|
|
10269
|
-
.icon.
|
|
10270
|
-
|
|
11051
|
+
.select-wrapper.open .icon.chevron {
|
|
11052
|
+
transform: rotate(180deg);
|
|
10271
11053
|
}
|
|
10272
11054
|
|
|
10273
|
-
.
|
|
10274
|
-
|
|
11055
|
+
.select-wrapper.disabled .icon {
|
|
11056
|
+
color: var(--rel-color-text-disabled, #a3a3a3);
|
|
11057
|
+
}
|
|
11058
|
+
|
|
11059
|
+
/* Value area */
|
|
11060
|
+
.select-value {
|
|
11061
|
+
flex: 1;
|
|
11062
|
+
min-width: 0;
|
|
11063
|
+
display: flex;
|
|
11064
|
+
align-items: center;
|
|
11065
|
+
gap: 6px;
|
|
11066
|
+
flex-wrap: wrap;
|
|
11067
|
+
color: var(--rel-select-value-color, #0b0b0b);
|
|
11068
|
+
overflow: hidden;
|
|
11069
|
+
}
|
|
11070
|
+
|
|
11071
|
+
.select-value.placeholder {
|
|
11072
|
+
color: var(--rel-select-placeholder-color, #757575);
|
|
11073
|
+
}
|
|
11074
|
+
|
|
11075
|
+
.select-wrapper.disabled .select-value.placeholder {
|
|
11076
|
+
color: var(--rel-select-placeholder-disabled-color, #7d7d7d);
|
|
11077
|
+
}
|
|
11078
|
+
|
|
11079
|
+
.select-value-text {
|
|
11080
|
+
overflow: hidden;
|
|
11081
|
+
text-overflow: ellipsis;
|
|
11082
|
+
white-space: nowrap;
|
|
11083
|
+
}
|
|
11084
|
+
|
|
11085
|
+
.select-chips {
|
|
11086
|
+
display: flex;
|
|
11087
|
+
align-items: center;
|
|
11088
|
+
gap: 6px;
|
|
11089
|
+
flex-wrap: wrap;
|
|
11090
|
+
}
|
|
11091
|
+
|
|
11092
|
+
/* rel-chip's outer element is a tabindex="0" span, not a native button —
|
|
11093
|
+
a disabled native <button> ancestor doesn't suppress clicks on that
|
|
11094
|
+
automatically the way it would for a nested native form control, so
|
|
11095
|
+
this has to be switched off explicitly. The cursor still correctly
|
|
11096
|
+
falls through to the disabled trigger underneath. */
|
|
11097
|
+
.select-wrapper.disabled .select-chips {
|
|
10275
11098
|
pointer-events: none;
|
|
11099
|
+
}
|
|
11100
|
+
|
|
11101
|
+
/* Floating label — single element that animates between resting (inside,
|
|
11102
|
+
at the value position) and floated (small, on the border line), same
|
|
11103
|
+
mechanism as rel-textfield's [floatinglabel]. */
|
|
11104
|
+
.floating-label {
|
|
10276
11105
|
position: absolute;
|
|
11106
|
+
left: 12px;
|
|
10277
11107
|
top: 50%;
|
|
10278
11108
|
transform: translateY(-50%);
|
|
10279
|
-
|
|
11109
|
+
background: var(--rel-select-bg, #ffffff);
|
|
11110
|
+
padding: 0 4px;
|
|
11111
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
11112
|
+
font-weight: 400;
|
|
11113
|
+
line-height: 1;
|
|
11114
|
+
color: var(--rel-select-placeholder-color, #757575);
|
|
11115
|
+
pointer-events: none;
|
|
11116
|
+
z-index: 1;
|
|
11117
|
+
white-space: nowrap;
|
|
11118
|
+
transition: top 0.15s ease, left 0.15s ease, font-size 0.15s ease, color 0.15s ease;
|
|
10280
11119
|
}
|
|
10281
11120
|
|
|
10282
|
-
.
|
|
10283
|
-
|
|
11121
|
+
.floating-label.has-left-icon {
|
|
11122
|
+
left: 40px;
|
|
10284
11123
|
}
|
|
10285
11124
|
|
|
10286
|
-
.select-
|
|
10287
|
-
|
|
11125
|
+
.select-wrapper.focused .floating-label,
|
|
11126
|
+
.select-wrapper.has-value .floating-label,
|
|
11127
|
+
.select-wrapper.open .floating-label {
|
|
11128
|
+
top: 0;
|
|
11129
|
+
left: 12px;
|
|
11130
|
+
font-size: 12px;
|
|
11131
|
+
color: var(--rel-select-label-color, #363636);
|
|
10288
11132
|
}
|
|
10289
11133
|
|
|
10290
|
-
|
|
11134
|
+
/* The real placeholder hides while the float-label rests in its spot,
|
|
11135
|
+
and fades in once the label has moved up to the border. */
|
|
11136
|
+
.select-wrapper.floating .select-value.placeholder {
|
|
11137
|
+
opacity: 0;
|
|
11138
|
+
transition: opacity 0.1s ease;
|
|
11139
|
+
}
|
|
11140
|
+
|
|
11141
|
+
.select-wrapper.floating.focused .select-value.placeholder,
|
|
11142
|
+
.select-wrapper.floating.open .select-value.placeholder {
|
|
11143
|
+
opacity: 1;
|
|
11144
|
+
}
|
|
11145
|
+
|
|
11146
|
+
/* Supporting text */
|
|
11147
|
+
.select-support {
|
|
11148
|
+
font-size: 13px;
|
|
11149
|
+
color: var(--rel-select-supporting-color, #404040);
|
|
11150
|
+
}
|
|
11151
|
+
|
|
11152
|
+
.select-support.error {
|
|
11153
|
+
color: var(--rel-select-border-error, #ce3131);
|
|
11154
|
+
}
|
|
11155
|
+
|
|
11156
|
+
/* ── Dropdown listbox ── */
|
|
11157
|
+
.select-listbox {
|
|
11158
|
+
position: fixed;
|
|
11159
|
+
z-index: 1001;
|
|
11160
|
+
display: none;
|
|
11161
|
+
box-sizing: border-box;
|
|
11162
|
+
background: var(--rel-select-bg, #ffffff);
|
|
11163
|
+
border: 1px solid var(--rel-select-menu-border, #d4d4d4);
|
|
11164
|
+
border-radius: var(--rel-select-menu-radius, 8px);
|
|
11165
|
+
/* A border alone doesn't read clearly against a similarly-light page,
|
|
11166
|
+
and a shadow alone barely shows on a dark background — together
|
|
11167
|
+
they hold up in both themes. */
|
|
11168
|
+
box-shadow: var(--rel-select-menu-shadow, 0 8px 24px rgba(11, 11, 11, 0.18));
|
|
11169
|
+
max-height: 360px;
|
|
11170
|
+
overflow-y: auto;
|
|
11171
|
+
}
|
|
11172
|
+
|
|
11173
|
+
.select-listbox[data-open] {
|
|
11174
|
+
display: block;
|
|
11175
|
+
}
|
|
11176
|
+
|
|
11177
|
+
.select-search {
|
|
11178
|
+
position: sticky;
|
|
11179
|
+
top: 0;
|
|
11180
|
+
background: var(--rel-select-bg, #ffffff);
|
|
11181
|
+
padding: var(--rel-spacing-space-xs);
|
|
11182
|
+
border-bottom: 1px solid var(--rel-select-divider, #f5f5f5);
|
|
11183
|
+
}
|
|
11184
|
+
|
|
11185
|
+
/* Base = "small" textfield sizing, shared by both small AND medium
|
|
11186
|
+
select — only "large" select bumps the search field up to "medium". */
|
|
11187
|
+
.search-input-wrap {
|
|
11188
|
+
display: flex;
|
|
11189
|
+
align-items: center;
|
|
11190
|
+
gap: 8px;
|
|
11191
|
+
border: 1px solid var(--rel-select-search-border, #e5e5e5);
|
|
11192
|
+
border-radius: 4px;
|
|
11193
|
+
padding: var(--rel-spacing-space-xs) var(--rel-spacing-space-sm);
|
|
11194
|
+
}
|
|
11195
|
+
|
|
11196
|
+
.search-input-wrap .icon {
|
|
11197
|
+
display: flex;
|
|
11198
|
+
align-items: center;
|
|
11199
|
+
flex-shrink: 0;
|
|
11200
|
+
color: var(--rel-select-icon-color, #0b0b0b);
|
|
11201
|
+
}
|
|
11202
|
+
|
|
11203
|
+
.search-input {
|
|
10291
11204
|
flex: 1;
|
|
10292
|
-
|
|
10293
|
-
border:
|
|
10294
|
-
background-color: var(--rel-color-bg-primary);
|
|
10295
|
-
font-family: var(--rel-fontFamilies-primary);
|
|
10296
|
-
cursor: pointer;
|
|
10297
|
-
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
|
|
10298
|
-
color: var(--rel-color-text-heading);
|
|
10299
|
-
width: 100%;
|
|
11205
|
+
min-width: 0;
|
|
11206
|
+
border: none;
|
|
10300
11207
|
outline: none;
|
|
11208
|
+
background: transparent;
|
|
11209
|
+
font-family: inherit;
|
|
11210
|
+
font-size: var(--rel-fontSizes-sm, 14px);
|
|
11211
|
+
color: var(--rel-select-value-color, #0b0b0b);
|
|
10301
11212
|
}
|
|
10302
11213
|
|
|
10303
|
-
|
|
10304
|
-
|
|
11214
|
+
.search-input::placeholder {
|
|
11215
|
+
color: var(--rel-select-placeholder-color, #757575);
|
|
10305
11216
|
}
|
|
10306
11217
|
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
box-shadow: 0 0 0 2px var(--rel-color-border-focus);
|
|
11218
|
+
:host([size="large"]) .search-input-wrap {
|
|
11219
|
+
padding: 12px;
|
|
10310
11220
|
}
|
|
10311
11221
|
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
border-color: var(--rel-error-surface-default, #D50000);
|
|
10315
|
-
border-width: 2px;
|
|
11222
|
+
:host([size="large"]) .search-input {
|
|
11223
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
10316
11224
|
}
|
|
10317
11225
|
|
|
10318
|
-
select
|
|
10319
|
-
|
|
11226
|
+
.select-options {
|
|
11227
|
+
padding: 4px 0;
|
|
10320
11228
|
}
|
|
10321
11229
|
|
|
10322
|
-
select
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
11230
|
+
.select-option {
|
|
11231
|
+
display: flex;
|
|
11232
|
+
align-items: center;
|
|
11233
|
+
justify-content: space-between;
|
|
11234
|
+
gap: 12px;
|
|
11235
|
+
padding: var(--rel-spacing-space-xs) 12px;
|
|
11236
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
11237
|
+
font-family: var(--rel-fontFamilies-primary);
|
|
11238
|
+
color: var(--rel-select-value-color, #0b0b0b);
|
|
11239
|
+
cursor: pointer;
|
|
10328
11240
|
}
|
|
10329
11241
|
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
var(--rel-spacing-space-3xs) var(--rel-spacing-space-2xs);
|
|
11242
|
+
.select-option-label {
|
|
11243
|
+
overflow: hidden;
|
|
11244
|
+
text-overflow: ellipsis;
|
|
11245
|
+
white-space: nowrap;
|
|
10335
11246
|
}
|
|
10336
11247
|
|
|
10337
|
-
.select-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
var(--rel-spacing-space-2xs) var(--rel-spacing-space-xs);
|
|
11248
|
+
.select-option-check {
|
|
11249
|
+
flex-shrink: 0;
|
|
11250
|
+
color: var(--rel-select-value-color, #0b0b0b);
|
|
10341
11251
|
}
|
|
10342
11252
|
|
|
10343
|
-
.select-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
var(--rel-spacing-space-xs) var(--rel-spacing-space-sm);
|
|
11253
|
+
.select-option:hover,
|
|
11254
|
+
.select-option.highlighted {
|
|
11255
|
+
background: var(--rel-select-option-hover, #ececec);
|
|
10347
11256
|
}
|
|
10348
11257
|
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
padding-left: var(--rel-spacing-space-xl);
|
|
11258
|
+
.select-option[aria-selected="true"] {
|
|
11259
|
+
font-weight: var(--rel-fontWeights-medium);
|
|
10352
11260
|
}
|
|
10353
11261
|
|
|
10354
|
-
.
|
|
10355
|
-
padding
|
|
11262
|
+
.checkbox-option {
|
|
11263
|
+
padding: 12px;
|
|
11264
|
+
}
|
|
11265
|
+
|
|
11266
|
+
.checkbox-option:hover,
|
|
11267
|
+
.checkbox-option.highlighted {
|
|
11268
|
+
background: var(--rel-select-option-hover, #ececec);
|
|
10356
11269
|
}
|
|
10357
11270
|
|
|
10358
|
-
.
|
|
10359
|
-
|
|
11271
|
+
.select-all-row {
|
|
11272
|
+
border-bottom: 1px solid var(--rel-select-divider, #f5f5f5);
|
|
11273
|
+
padding: 12px;
|
|
11274
|
+
}
|
|
11275
|
+
|
|
11276
|
+
.select-empty {
|
|
11277
|
+
padding: var(--rel-spacing-space-xs) 12px;
|
|
11278
|
+
font-size: var(--rel-fontSizes-sm, 14px);
|
|
11279
|
+
color: var(--rel-select-placeholder-color, #757575);
|
|
11280
|
+
}
|
|
11281
|
+
|
|
11282
|
+
/* Dark mode */
|
|
11283
|
+
/* No :not(.error) needed here — error no longer recolors label/floating
|
|
11284
|
+
label, so there's nothing left for these to compete with. */
|
|
11285
|
+
:host-context([data-theme="dark"]) .select-label,
|
|
11286
|
+
[data-theme="dark"] .select-label {
|
|
11287
|
+
color: var(--rel-select-label-color-dark, #f5f5f5);
|
|
11288
|
+
}
|
|
11289
|
+
|
|
11290
|
+
/* :not(.error) — supporting text IS still red on error, and this rule's
|
|
11291
|
+
extra :host-context specificity would otherwise outrank the
|
|
11292
|
+
theme-agnostic .select-support.error rule. */
|
|
11293
|
+
:host-context([data-theme="dark"]) .select-wrapper:not(.error) .select-support,
|
|
11294
|
+
[data-theme="dark"] .select-wrapper:not(.error) .select-support {
|
|
11295
|
+
color: var(--rel-select-supporting-color-dark, #b3b3b3);
|
|
11296
|
+
}
|
|
11297
|
+
|
|
11298
|
+
:host-context([data-theme="dark"]) .select-wrapper.focused .floating-label,
|
|
11299
|
+
[data-theme="dark"] .select-wrapper.focused .floating-label,
|
|
11300
|
+
:host-context([data-theme="dark"]) .select-wrapper.has-value .floating-label,
|
|
11301
|
+
[data-theme="dark"] .select-wrapper.has-value .floating-label,
|
|
11302
|
+
:host-context([data-theme="dark"]) .select-wrapper.open .floating-label,
|
|
11303
|
+
[data-theme="dark"] .select-wrapper.open .floating-label {
|
|
11304
|
+
color: var(--rel-select-label-color-dark, #f5f5f5);
|
|
11305
|
+
}
|
|
11306
|
+
|
|
11307
|
+
/* Background only here — kept unconditional so error-state triggers
|
|
11308
|
+
still get the right dark background. border-color is split into its
|
|
11309
|
+
own :not(.error) rule below: this rule's specificity (with the extra
|
|
11310
|
+
:host-context) ties or beats the theme-agnostic error-border rule, and
|
|
11311
|
+
since it's declared later in the file, an unconditional border-color
|
|
11312
|
+
here would win the tie and show the default dark border instead of red
|
|
11313
|
+
— regardless of open/focus state, i.e. even at rest. */
|
|
11314
|
+
:host-context([data-theme="dark"]) .select-trigger,
|
|
11315
|
+
[data-theme="dark"] .select-trigger,
|
|
11316
|
+
:host-context([data-theme="dark"]) .floating-label,
|
|
11317
|
+
[data-theme="dark"] .floating-label {
|
|
11318
|
+
background: var(--rel-select-bg-dark, #1a1a1a);
|
|
11319
|
+
}
|
|
11320
|
+
|
|
11321
|
+
:host-context([data-theme="dark"]) .select-wrapper:not(.error) .select-trigger,
|
|
11322
|
+
[data-theme="dark"] .select-wrapper:not(.error) .select-trigger {
|
|
11323
|
+
border-color: var(--rel-select-border-default-dark, #333333);
|
|
11324
|
+
}
|
|
11325
|
+
|
|
11326
|
+
/* Own border token, a touch lighter than the trigger's — a shadow alone
|
|
11327
|
+
barely registers on a dark background, so the panel leans more on this
|
|
11328
|
+
border to separate itself from the page behind it. */
|
|
11329
|
+
:host-context([data-theme="dark"]) .select-listbox,
|
|
11330
|
+
[data-theme="dark"] .select-listbox {
|
|
11331
|
+
background: var(--rel-select-bg-dark, #1a1a1a);
|
|
11332
|
+
border-color: var(--rel-select-menu-border-dark, #454545);
|
|
11333
|
+
}
|
|
11334
|
+
|
|
11335
|
+
:host-context([data-theme="dark"]) .select-wrapper.disabled .select-trigger,
|
|
11336
|
+
[data-theme="dark"] .select-wrapper.disabled .select-trigger {
|
|
11337
|
+
background: var(--rel-select-bg-disabled-dark, #141414);
|
|
11338
|
+
}
|
|
11339
|
+
|
|
11340
|
+
/* :not(.error): same trap as the label rules — this rule's extra
|
|
11341
|
+
:host-context specificity would otherwise outrank the theme-agnostic
|
|
11342
|
+
.select-wrapper.error .select-trigger rule and show the focus-white
|
|
11343
|
+
border instead of error-red the moment an error field is opened. */
|
|
11344
|
+
:host-context([data-theme="dark"]) .select-wrapper:not(.error).open .select-trigger,
|
|
11345
|
+
[data-theme="dark"] .select-wrapper:not(.error).open .select-trigger,
|
|
11346
|
+
:host-context([data-theme="dark"]) .select-wrapper:not(.error) .select-trigger:focus-visible,
|
|
11347
|
+
[data-theme="dark"] .select-wrapper:not(.error) .select-trigger:focus-visible {
|
|
11348
|
+
border-color: var(--rel-select-border-focus-dark, #f5f5f5);
|
|
11349
|
+
}
|
|
11350
|
+
|
|
11351
|
+
:host-context([data-theme="dark"]) .select-value,
|
|
11352
|
+
[data-theme="dark"] .select-value,
|
|
11353
|
+
:host-context([data-theme="dark"]) .search-input,
|
|
11354
|
+
[data-theme="dark"] .search-input,
|
|
11355
|
+
:host-context([data-theme="dark"]) .select-option,
|
|
11356
|
+
[data-theme="dark"] .select-option,
|
|
11357
|
+
:host-context([data-theme="dark"]) .select-option-check,
|
|
11358
|
+
[data-theme="dark"] .select-option-check,
|
|
11359
|
+
:host-context([data-theme="dark"]) .icon,
|
|
11360
|
+
[data-theme="dark"] .icon {
|
|
11361
|
+
color: var(--rel-select-value-color-dark, #f5f5f5);
|
|
11362
|
+
}
|
|
11363
|
+
|
|
11364
|
+
:host-context([data-theme="dark"]) .select-option:hover,
|
|
11365
|
+
[data-theme="dark"] .select-option:hover,
|
|
11366
|
+
:host-context([data-theme="dark"]) .select-option.highlighted,
|
|
11367
|
+
[data-theme="dark"] .select-option.highlighted,
|
|
11368
|
+
:host-context([data-theme="dark"]) .checkbox-option:hover,
|
|
11369
|
+
[data-theme="dark"] .checkbox-option:hover,
|
|
11370
|
+
:host-context([data-theme="dark"]) .checkbox-option.highlighted,
|
|
11371
|
+
[data-theme="dark"] .checkbox-option.highlighted {
|
|
11372
|
+
background: var(--rel-select-option-hover-dark, #333333);
|
|
11373
|
+
}
|
|
11374
|
+
|
|
11375
|
+
:host-context([data-theme="dark"]) .select-search,
|
|
11376
|
+
[data-theme="dark"] .select-search {
|
|
11377
|
+
background: var(--rel-select-bg-dark, #1a1a1a);
|
|
11378
|
+
border-color: var(--rel-select-divider-dark, #333333);
|
|
11379
|
+
}
|
|
11380
|
+
|
|
11381
|
+
:host-context([data-theme="dark"]) .select-all-row,
|
|
11382
|
+
[data-theme="dark"] .select-all-row {
|
|
11383
|
+
border-color: var(--rel-select-divider-dark, #333333);
|
|
11384
|
+
}
|
|
11385
|
+
|
|
11386
|
+
:host-context([data-theme="dark"]) .select-value.placeholder,
|
|
11387
|
+
[data-theme="dark"] .select-value.placeholder,
|
|
11388
|
+
:host-context([data-theme="dark"]) .floating-label,
|
|
11389
|
+
[data-theme="dark"] .floating-label,
|
|
11390
|
+
:host-context([data-theme="dark"]) .search-input::placeholder,
|
|
11391
|
+
[data-theme="dark"] .search-input::placeholder,
|
|
11392
|
+
:host-context([data-theme="dark"]) .select-empty,
|
|
11393
|
+
[data-theme="dark"] .select-empty {
|
|
11394
|
+
color: var(--rel-select-placeholder-color-dark, #a3a3a3);
|
|
11395
|
+
}
|
|
11396
|
+
|
|
11397
|
+
:host-context([data-theme="dark"]) .search-input-wrap,
|
|
11398
|
+
[data-theme="dark"] .search-input-wrap {
|
|
11399
|
+
border-color: var(--rel-select-search-border-dark, #333333);
|
|
10360
11400
|
}
|
|
11401
|
+
`;
|
|
11402
|
+
__decorateClass([
|
|
11403
|
+
(0, import_decorators44.property)({ type: String })
|
|
11404
|
+
], RelSelect.prototype, "label", 2);
|
|
11405
|
+
__decorateClass([
|
|
11406
|
+
(0, import_decorators44.property)({ type: String, attribute: "label-style" })
|
|
11407
|
+
], RelSelect.prototype, "labelStyle", 2);
|
|
11408
|
+
__decorateClass([
|
|
11409
|
+
(0, import_decorators44.property)({ type: Array })
|
|
11410
|
+
], RelSelect.prototype, "options", 2);
|
|
11411
|
+
__decorateClass([
|
|
11412
|
+
(0, import_decorators44.property)({ type: Boolean })
|
|
11413
|
+
], RelSelect.prototype, "multiple", 2);
|
|
11414
|
+
__decorateClass([
|
|
11415
|
+
(0, import_decorators44.property)({ type: String })
|
|
11416
|
+
], RelSelect.prototype, "selected", 2);
|
|
11417
|
+
__decorateClass([
|
|
11418
|
+
(0, import_decorators44.property)({ type: Array, attribute: "selected-values" })
|
|
11419
|
+
], RelSelect.prototype, "selectedValues", 2);
|
|
11420
|
+
__decorateClass([
|
|
11421
|
+
(0, import_decorators44.property)({ type: String })
|
|
11422
|
+
], RelSelect.prototype, "state", 2);
|
|
11423
|
+
__decorateClass([
|
|
11424
|
+
(0, import_decorators44.property)({ type: String, attribute: "supporting-text" })
|
|
11425
|
+
], RelSelect.prototype, "supportingText", 2);
|
|
11426
|
+
__decorateClass([
|
|
11427
|
+
(0, import_decorators44.property)({ type: String, reflect: true })
|
|
11428
|
+
], RelSelect.prototype, "size", 2);
|
|
11429
|
+
__decorateClass([
|
|
11430
|
+
(0, import_decorators44.property)({ type: String })
|
|
11431
|
+
], RelSelect.prototype, "border", 2);
|
|
11432
|
+
__decorateClass([
|
|
11433
|
+
(0, import_decorators44.property)({ type: String, attribute: "left-icon" })
|
|
11434
|
+
], RelSelect.prototype, "leftIcon", 2);
|
|
11435
|
+
__decorateClass([
|
|
11436
|
+
(0, import_decorators44.property)({ type: String, attribute: "right-icon" })
|
|
11437
|
+
], RelSelect.prototype, "rightIcon", 2);
|
|
11438
|
+
__decorateClass([
|
|
11439
|
+
(0, import_decorators44.property)({ type: String })
|
|
11440
|
+
], RelSelect.prototype, "placeholder", 2);
|
|
11441
|
+
__decorateClass([
|
|
11442
|
+
(0, import_decorators44.property)({ type: String, attribute: "search-placeholder" })
|
|
11443
|
+
], RelSelect.prototype, "searchPlaceholder", 2);
|
|
11444
|
+
__decorateClass([
|
|
11445
|
+
(0, import_decorators44.property)({ type: String, attribute: "select-all-label" })
|
|
11446
|
+
], RelSelect.prototype, "selectAllLabel", 2);
|
|
11447
|
+
__decorateClass([
|
|
11448
|
+
(0, import_decorators44.property)({ type: Number, attribute: "max-visible-chips" })
|
|
11449
|
+
], RelSelect.prototype, "maxVisibleChips", 2);
|
|
11450
|
+
__decorateClass([
|
|
11451
|
+
(0, import_decorators44.property)({ type: Boolean, attribute: "no-search" })
|
|
11452
|
+
], RelSelect.prototype, "noSearch", 2);
|
|
11453
|
+
__decorateClass([
|
|
11454
|
+
(0, import_decorators44.state)()
|
|
11455
|
+
], RelSelect.prototype, "open", 2);
|
|
11456
|
+
__decorateClass([
|
|
11457
|
+
(0, import_decorators44.state)()
|
|
11458
|
+
], RelSelect.prototype, "highlightedIndex", 2);
|
|
11459
|
+
__decorateClass([
|
|
11460
|
+
(0, import_decorators44.state)()
|
|
11461
|
+
], RelSelect.prototype, "panelStyle", 2);
|
|
11462
|
+
__decorateClass([
|
|
11463
|
+
(0, import_decorators44.state)()
|
|
11464
|
+
], RelSelect.prototype, "searchValue", 2);
|
|
11465
|
+
__decorateClass([
|
|
11466
|
+
(0, import_decorators44.state)()
|
|
11467
|
+
], RelSelect.prototype, "internalState", 2);
|
|
11468
|
+
__decorateClass([
|
|
11469
|
+
(0, import_decorators44.query)(".select-trigger")
|
|
11470
|
+
], RelSelect.prototype, "triggerEl", 2);
|
|
11471
|
+
__decorateClass([
|
|
11472
|
+
(0, import_decorators44.query)(".search-input")
|
|
11473
|
+
], RelSelect.prototype, "searchInputEl", 2);
|
|
11474
|
+
__decorateClass([
|
|
11475
|
+
(0, import_decorators44.query)(".select-listbox")
|
|
11476
|
+
], RelSelect.prototype, "listboxEl", 2);
|
|
11477
|
+
RelSelect = __decorateClass([
|
|
11478
|
+
(0, import_decorators44.customElement)("rel-select")
|
|
11479
|
+
], RelSelect);
|
|
10361
11480
|
|
|
10362
|
-
|
|
10363
|
-
|
|
11481
|
+
// src/components/rel-skeleton/rel-skeleton.ts
|
|
11482
|
+
var import_lit45 = require("lit");
|
|
11483
|
+
var import_decorators45 = require("lit/decorators.js");
|
|
11484
|
+
var RelSkeleton = class extends import_lit45.LitElement {
|
|
11485
|
+
constructor() {
|
|
11486
|
+
super(...arguments);
|
|
11487
|
+
this.shape = "block";
|
|
11488
|
+
this.lines = 1;
|
|
11489
|
+
this.width = "";
|
|
11490
|
+
this.height = "";
|
|
11491
|
+
this.animation = "pulse";
|
|
11492
|
+
this.loaded = false;
|
|
11493
|
+
}
|
|
11494
|
+
updated(changed) {
|
|
11495
|
+
if (changed.has("width") && this.width) this.style.width = this.width;
|
|
11496
|
+
if (changed.has("height") && this.height) this.style.height = this.height;
|
|
11497
|
+
}
|
|
11498
|
+
render() {
|
|
11499
|
+
if (this.loaded) return import_lit45.html``;
|
|
11500
|
+
if (this.shape === "line") {
|
|
11501
|
+
const count = Math.max(1, this.lines);
|
|
11502
|
+
return import_lit45.html`
|
|
11503
|
+
<div class="skeleton-lines">
|
|
11504
|
+
${Array.from({ length: count }, (_, i) => import_lit45.html`
|
|
11505
|
+
<div class="skeleton-bar ${i === count - 1 && count > 1 ? "is-last" : ""}"></div>
|
|
11506
|
+
`)}
|
|
11507
|
+
</div>
|
|
11508
|
+
`;
|
|
10364
11509
|
}
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
11510
|
+
return import_lit45.html`<div class="skeleton-shape"></div>`;
|
|
11511
|
+
}
|
|
11512
|
+
};
|
|
11513
|
+
RelSkeleton.styles = import_lit45.css`
|
|
11514
|
+
:host {
|
|
11515
|
+
display: block;
|
|
10368
11516
|
}
|
|
10369
11517
|
|
|
10370
|
-
|
|
10371
|
-
|
|
11518
|
+
:host([loaded]) {
|
|
11519
|
+
display: none;
|
|
10372
11520
|
}
|
|
10373
11521
|
|
|
10374
|
-
/*
|
|
10375
|
-
|
|
10376
|
-
|
|
11522
|
+
/* ── Circle: aspect-ratio keeps it square without requiring explicit height ── */
|
|
11523
|
+
:host([shape="circle"]) {
|
|
11524
|
+
aspect-ratio: 1 / 1;
|
|
10377
11525
|
}
|
|
10378
11526
|
|
|
10379
|
-
|
|
10380
|
-
|
|
11527
|
+
/* ── Base skeleton surface ── */
|
|
11528
|
+
.skeleton-shape,
|
|
11529
|
+
.skeleton-bar {
|
|
11530
|
+
background: var(--rel-skeleton-color, #c8c8c8);
|
|
11531
|
+
border-radius: 4px;
|
|
10381
11532
|
}
|
|
10382
11533
|
|
|
10383
|
-
/*
|
|
10384
|
-
.
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
11534
|
+
/* ── Lines layout ── */
|
|
11535
|
+
.skeleton-lines {
|
|
11536
|
+
display: flex;
|
|
11537
|
+
flex-direction: column;
|
|
11538
|
+
gap: 8px;
|
|
11539
|
+
width: 100%;
|
|
10388
11540
|
}
|
|
10389
11541
|
|
|
10390
|
-
.
|
|
10391
|
-
|
|
11542
|
+
.skeleton-bar {
|
|
11543
|
+
height: 14px;
|
|
11544
|
+
width: 100%;
|
|
10392
11545
|
}
|
|
10393
11546
|
|
|
10394
|
-
|
|
10395
|
-
|
|
11547
|
+
/* Last line shortens to 65% — mimics real paragraph text that doesn't reach the edge */
|
|
11548
|
+
.skeleton-bar.is-last {
|
|
11549
|
+
width: 65%;
|
|
10396
11550
|
}
|
|
10397
11551
|
|
|
10398
|
-
/*
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
border-color: var(--rel-color-border-default);
|
|
11552
|
+
/* ── Shape (circle / block) ── */
|
|
11553
|
+
.skeleton-shape {
|
|
11554
|
+
width: 100%;
|
|
11555
|
+
height: 100%;
|
|
11556
|
+
min-height: 16px;
|
|
10404
11557
|
}
|
|
10405
11558
|
|
|
10406
|
-
:host
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
11559
|
+
:host([shape="circle"]) .skeleton-shape {
|
|
11560
|
+
border-radius: 50%;
|
|
11561
|
+
/* No min-height — circle is sized entirely by host width + aspect-ratio */
|
|
11562
|
+
min-height: unset;
|
|
10410
11563
|
}
|
|
10411
11564
|
|
|
10412
|
-
/*
|
|
10413
|
-
|
|
10414
|
-
|
|
11565
|
+
/* ── Pulse animation ── */
|
|
11566
|
+
@keyframes rel-skeleton-pulse {
|
|
11567
|
+
0%, 100% { opacity: 1; }
|
|
11568
|
+
50% { opacity: 0.4; }
|
|
10415
11569
|
}
|
|
10416
11570
|
|
|
10417
|
-
|
|
10418
|
-
.
|
|
10419
|
-
|
|
11571
|
+
:host([animation="pulse"]) .skeleton-shape,
|
|
11572
|
+
:host([animation="pulse"]) .skeleton-bar {
|
|
11573
|
+
animation: rel-skeleton-pulse 1.5s ease-in-out infinite;
|
|
10420
11574
|
}
|
|
10421
11575
|
|
|
10422
|
-
/*
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
11576
|
+
/* ── Shimmer animation ── */
|
|
11577
|
+
@keyframes rel-skeleton-shimmer {
|
|
11578
|
+
0% { background-position: 200% center; }
|
|
11579
|
+
100% { background-position: -200% center; }
|
|
10426
11580
|
}
|
|
10427
11581
|
|
|
10428
|
-
:host
|
|
10429
|
-
:host
|
|
10430
|
-
|
|
11582
|
+
:host([animation="shimmer"]) .skeleton-shape,
|
|
11583
|
+
:host([animation="shimmer"]) .skeleton-bar {
|
|
11584
|
+
background: linear-gradient(
|
|
11585
|
+
90deg,
|
|
11586
|
+
var(--rel-skeleton-color, #c8c8c8) 25%,
|
|
11587
|
+
var(--rel-skeleton-highlight, #e2e2e2) 50%,
|
|
11588
|
+
var(--rel-skeleton-color, #c8c8c8) 75%
|
|
11589
|
+
);
|
|
11590
|
+
background-size: 200% 100%;
|
|
11591
|
+
animation: rel-skeleton-shimmer 1.5s linear infinite;
|
|
10431
11592
|
}
|
|
10432
11593
|
|
|
10433
|
-
|
|
10434
|
-
:host-context([data-theme="dark"])
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
color: var(--rel-error-surface-default, #FF5252);
|
|
11594
|
+
/* ── Dark mode ── */
|
|
11595
|
+
:host-context([data-theme="dark"]) {
|
|
11596
|
+
--rel-skeleton-color: #2a2a2a;
|
|
11597
|
+
--rel-skeleton-highlight: #3d3d3d;
|
|
10438
11598
|
}
|
|
10439
11599
|
|
|
10440
|
-
/*
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
11600
|
+
/* ── Respect reduced-motion preference ── */
|
|
11601
|
+
@media (prefers-reduced-motion: reduce) {
|
|
11602
|
+
.skeleton-shape,
|
|
11603
|
+
.skeleton-bar {
|
|
11604
|
+
animation: none !important;
|
|
11605
|
+
}
|
|
10445
11606
|
}
|
|
10446
|
-
|
|
10447
11607
|
`;
|
|
10448
11608
|
__decorateClass([
|
|
10449
|
-
(0,
|
|
10450
|
-
],
|
|
10451
|
-
__decorateClass([
|
|
10452
|
-
(0, import_decorators44.property)({ type: Array })
|
|
10453
|
-
], RelSelect.prototype, "options", 2);
|
|
10454
|
-
__decorateClass([
|
|
10455
|
-
(0, import_decorators44.property)({ type: String })
|
|
10456
|
-
], RelSelect.prototype, "selected", 2);
|
|
10457
|
-
__decorateClass([
|
|
10458
|
-
(0, import_decorators44.property)({ type: String })
|
|
10459
|
-
], RelSelect.prototype, "state", 2);
|
|
11609
|
+
(0, import_decorators45.property)({ type: String, reflect: true })
|
|
11610
|
+
], RelSkeleton.prototype, "shape", 2);
|
|
10460
11611
|
__decorateClass([
|
|
10461
|
-
(0,
|
|
10462
|
-
],
|
|
11612
|
+
(0, import_decorators45.property)({ type: Number })
|
|
11613
|
+
], RelSkeleton.prototype, "lines", 2);
|
|
10463
11614
|
__decorateClass([
|
|
10464
|
-
(0,
|
|
10465
|
-
],
|
|
11615
|
+
(0, import_decorators45.property)({ type: String })
|
|
11616
|
+
], RelSkeleton.prototype, "width", 2);
|
|
10466
11617
|
__decorateClass([
|
|
10467
|
-
(0,
|
|
10468
|
-
],
|
|
11618
|
+
(0, import_decorators45.property)({ type: String })
|
|
11619
|
+
], RelSkeleton.prototype, "height", 2);
|
|
10469
11620
|
__decorateClass([
|
|
10470
|
-
(0,
|
|
10471
|
-
],
|
|
11621
|
+
(0, import_decorators45.property)({ type: String, reflect: true })
|
|
11622
|
+
], RelSkeleton.prototype, "animation", 2);
|
|
10472
11623
|
__decorateClass([
|
|
10473
|
-
(0,
|
|
10474
|
-
],
|
|
10475
|
-
|
|
10476
|
-
(0,
|
|
10477
|
-
],
|
|
11624
|
+
(0, import_decorators45.property)({ type: Boolean, reflect: true })
|
|
11625
|
+
], RelSkeleton.prototype, "loaded", 2);
|
|
11626
|
+
RelSkeleton = __decorateClass([
|
|
11627
|
+
(0, import_decorators45.customElement)("rel-skeleton")
|
|
11628
|
+
], RelSkeleton);
|
|
10478
11629
|
|
|
10479
11630
|
// src/components/rel-sheet/rel-sheet.ts
|
|
10480
|
-
var
|
|
10481
|
-
var
|
|
11631
|
+
var import_lit46 = require("lit");
|
|
11632
|
+
var import_decorators46 = require("lit/decorators.js");
|
|
10482
11633
|
var import_vars_v233 = require("./vars-v2-VMGWTFJZ.css");
|
|
10483
|
-
var
|
|
10484
|
-
var RelModal = class extends
|
|
11634
|
+
var import_rel_icon9 = require("@reliability-design/icons/rel-icon");
|
|
11635
|
+
var RelModal = class extends import_lit46.LitElement {
|
|
10485
11636
|
constructor() {
|
|
10486
11637
|
super(...arguments);
|
|
10487
11638
|
this.open = false;
|
|
@@ -10591,7 +11742,7 @@ var RelModal = class extends import_lit45.LitElement {
|
|
|
10591
11742
|
const hasTitle = !!this.title;
|
|
10592
11743
|
const hasDescription = !!this.description;
|
|
10593
11744
|
const showHeader = hasTitle || hasDescription || this.dismissible;
|
|
10594
|
-
return
|
|
11745
|
+
return import_lit46.html`
|
|
10595
11746
|
<div class="modal-container ${this.open ? "open" : ""}">
|
|
10596
11747
|
<div
|
|
10597
11748
|
part="overlay"
|
|
@@ -10608,10 +11759,10 @@ var RelModal = class extends import_lit45.LitElement {
|
|
|
10608
11759
|
|
|
10609
11760
|
<div part="header" class="header ${!showHeader ? "empty" : ""}">
|
|
10610
11761
|
<div class="header-text">
|
|
10611
|
-
${hasTitle ?
|
|
10612
|
-
${hasDescription ?
|
|
11762
|
+
${hasTitle ? import_lit46.html`<h2 class="title">${this.title}</h2>` : ""}
|
|
11763
|
+
${hasDescription ? import_lit46.html`<p class="description">${this.description}</p>` : ""}
|
|
10613
11764
|
</div>
|
|
10614
|
-
${this.dismissible ?
|
|
11765
|
+
${this.dismissible ? import_lit46.html`<button
|
|
10615
11766
|
part="close-button"
|
|
10616
11767
|
class="close-button"
|
|
10617
11768
|
@click="${this.handleCloseButtonClick}"
|
|
@@ -10632,7 +11783,7 @@ var RelModal = class extends import_lit45.LitElement {
|
|
|
10632
11783
|
`;
|
|
10633
11784
|
}
|
|
10634
11785
|
};
|
|
10635
|
-
RelModal.styles =
|
|
11786
|
+
RelModal.styles = import_lit46.css`
|
|
10636
11787
|
:host {
|
|
10637
11788
|
--modal-transition-duration: 0.3s;
|
|
10638
11789
|
--modal-transition-timing: cubic-bezier(0.32, 0.72, 0, 1);
|
|
@@ -10682,7 +11833,8 @@ RelModal.styles = import_lit45.css`
|
|
|
10682
11833
|
font-family: var(--rel-fontFamilies-primary);
|
|
10683
11834
|
width: clamp(360px, 49vw, 708px);
|
|
10684
11835
|
left: 50%;
|
|
10685
|
-
transition: transform var(--modal-transition-duration) var(--modal-transition-timing)
|
|
11836
|
+
transition: transform var(--modal-transition-duration) var(--modal-transition-timing),
|
|
11837
|
+
opacity var(--modal-transition-duration) var(--modal-transition-timing);
|
|
10686
11838
|
}
|
|
10687
11839
|
|
|
10688
11840
|
.panel[data-side="bottom"] {
|
|
@@ -10717,11 +11869,13 @@ RelModal.styles = import_lit45.css`
|
|
|
10717
11869
|
width: clamp(360px, 49vw, 708px);
|
|
10718
11870
|
max-height: calc(100vh - 96px);
|
|
10719
11871
|
border-radius: var(--rel-borders-radius-border-radius-200);
|
|
10720
|
-
transform: translate(-50%, -50%);
|
|
11872
|
+
transform: translate(-50%, -50%) scale(0.96);
|
|
11873
|
+
opacity: 0;
|
|
10721
11874
|
}
|
|
10722
11875
|
|
|
10723
11876
|
.modal-container.open .panel[data-side="center"] {
|
|
10724
|
-
transform: translate(-50%, -50%);
|
|
11877
|
+
transform: translate(-50%, -50%) scale(1);
|
|
11878
|
+
opacity: 1;
|
|
10725
11879
|
}
|
|
10726
11880
|
|
|
10727
11881
|
.header {
|
|
@@ -10815,35 +11969,35 @@ RelModal.styles = import_lit45.css`
|
|
|
10815
11969
|
}
|
|
10816
11970
|
`;
|
|
10817
11971
|
__decorateClass([
|
|
10818
|
-
(0,
|
|
11972
|
+
(0, import_decorators46.property)({ type: Boolean, reflect: true })
|
|
10819
11973
|
], RelModal.prototype, "open", 2);
|
|
10820
11974
|
__decorateClass([
|
|
10821
|
-
(0,
|
|
11975
|
+
(0, import_decorators46.property)({ type: String })
|
|
10822
11976
|
], RelModal.prototype, "side", 2);
|
|
10823
11977
|
__decorateClass([
|
|
10824
|
-
(0,
|
|
11978
|
+
(0, import_decorators46.property)({ type: String })
|
|
10825
11979
|
], RelModal.prototype, "title", 2);
|
|
10826
11980
|
__decorateClass([
|
|
10827
|
-
(0,
|
|
11981
|
+
(0, import_decorators46.property)({ type: String })
|
|
10828
11982
|
], RelModal.prototype, "description", 2);
|
|
10829
11983
|
__decorateClass([
|
|
10830
|
-
(0,
|
|
11984
|
+
(0, import_decorators46.property)({ type: Boolean })
|
|
10831
11985
|
], RelModal.prototype, "dismissible", 2);
|
|
10832
11986
|
__decorateClass([
|
|
10833
|
-
(0,
|
|
11987
|
+
(0, import_decorators46.property)({ type: Boolean })
|
|
10834
11988
|
], RelModal.prototype, "modal", 2);
|
|
10835
11989
|
__decorateClass([
|
|
10836
|
-
(0,
|
|
11990
|
+
(0, import_decorators46.query)(".overlay")
|
|
10837
11991
|
], RelModal.prototype, "overlayElement", 2);
|
|
10838
11992
|
RelModal = __decorateClass([
|
|
10839
|
-
(0,
|
|
11993
|
+
(0, import_decorators46.customElement)("rel-modal")
|
|
10840
11994
|
], RelModal);
|
|
10841
11995
|
|
|
10842
11996
|
// src/components/rel-slider/rel-slider.ts
|
|
10843
|
-
var
|
|
10844
|
-
var
|
|
11997
|
+
var import_lit47 = require("lit");
|
|
11998
|
+
var import_decorators47 = require("lit/decorators.js");
|
|
10845
11999
|
var import_vars_v234 = require("./vars-v2-VMGWTFJZ.css");
|
|
10846
|
-
var RelSlider = class extends
|
|
12000
|
+
var RelSlider = class extends import_lit47.LitElement {
|
|
10847
12001
|
constructor() {
|
|
10848
12002
|
super(...arguments);
|
|
10849
12003
|
this.type = "continuous";
|
|
@@ -10940,9 +12094,9 @@ var RelSlider = class extends import_lit46.LitElement {
|
|
|
10940
12094
|
}
|
|
10941
12095
|
}
|
|
10942
12096
|
renderThumbContainer() {
|
|
10943
|
-
return
|
|
12097
|
+
return import_lit47.html`
|
|
10944
12098
|
<div class="thumb-container" style="left: ${this.percentage}%">
|
|
10945
|
-
${this.showBubble ?
|
|
12099
|
+
${this.showBubble ? import_lit47.html`
|
|
10946
12100
|
<div class="value-marker">
|
|
10947
12101
|
<svg viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg">
|
|
10948
12102
|
<path
|
|
@@ -10967,10 +12121,10 @@ var RelSlider = class extends import_lit46.LitElement {
|
|
|
10967
12121
|
}
|
|
10968
12122
|
renderTicks() {
|
|
10969
12123
|
if (this.type !== "discrete") return "";
|
|
10970
|
-
return
|
|
12124
|
+
return import_lit47.html`
|
|
10971
12125
|
<div class="ticks">
|
|
10972
12126
|
${this.ticks.map(
|
|
10973
|
-
(tick) =>
|
|
12127
|
+
(tick) => import_lit47.html`
|
|
10974
12128
|
<div
|
|
10975
12129
|
class="tick ${this.isTickActive(tick) ? "active" : ""}"
|
|
10976
12130
|
style="left: ${this.getTickLeftPct(tick)}%"></div>
|
|
@@ -10981,10 +12135,10 @@ var RelSlider = class extends import_lit46.LitElement {
|
|
|
10981
12135
|
}
|
|
10982
12136
|
renderTickLabels() {
|
|
10983
12137
|
if (this.type !== "discrete" || !this.showTickLabels) return "";
|
|
10984
|
-
return
|
|
12138
|
+
return import_lit47.html`
|
|
10985
12139
|
<div class="tick-labels">
|
|
10986
12140
|
${this.ticks.map(
|
|
10987
|
-
(tick) =>
|
|
12141
|
+
(tick) => import_lit47.html`
|
|
10988
12142
|
<div
|
|
10989
12143
|
class="tick-label"
|
|
10990
12144
|
style="left: ${this.getTickLeftPct(tick)}%">
|
|
@@ -11005,7 +12159,7 @@ var RelSlider = class extends import_lit46.LitElement {
|
|
|
11005
12159
|
"track-active",
|
|
11006
12160
|
this.track === "dotted" ? "dotted" : ""
|
|
11007
12161
|
].filter(Boolean).join(" ");
|
|
11008
|
-
return
|
|
12162
|
+
return import_lit47.html`
|
|
11009
12163
|
<div class="${sliderClasses}">
|
|
11010
12164
|
<div class="track"></div>
|
|
11011
12165
|
<div class="${trackActiveClasses}"></div>
|
|
@@ -11028,7 +12182,7 @@ var RelSlider = class extends import_lit46.LitElement {
|
|
|
11028
12182
|
`;
|
|
11029
12183
|
}
|
|
11030
12184
|
};
|
|
11031
|
-
RelSlider.styles =
|
|
12185
|
+
RelSlider.styles = import_lit47.css`
|
|
11032
12186
|
:host {
|
|
11033
12187
|
--track-height: 5px;
|
|
11034
12188
|
--thumb-size: 10px;
|
|
@@ -11303,45 +12457,45 @@ RelSlider.styles = import_lit46.css`
|
|
|
11303
12457
|
}
|
|
11304
12458
|
`;
|
|
11305
12459
|
__decorateClass([
|
|
11306
|
-
(0,
|
|
12460
|
+
(0, import_decorators47.property)({ type: String })
|
|
11307
12461
|
], RelSlider.prototype, "type", 2);
|
|
11308
12462
|
__decorateClass([
|
|
11309
|
-
(0,
|
|
12463
|
+
(0, import_decorators47.property)({ type: Number })
|
|
11310
12464
|
], RelSlider.prototype, "min", 2);
|
|
11311
12465
|
__decorateClass([
|
|
11312
|
-
(0,
|
|
12466
|
+
(0, import_decorators47.property)({ type: Number })
|
|
11313
12467
|
], RelSlider.prototype, "max", 2);
|
|
11314
12468
|
__decorateClass([
|
|
11315
|
-
(0,
|
|
12469
|
+
(0, import_decorators47.property)({ type: Number })
|
|
11316
12470
|
], RelSlider.prototype, "step", 2);
|
|
11317
12471
|
__decorateClass([
|
|
11318
|
-
(0,
|
|
12472
|
+
(0, import_decorators47.property)({ type: Boolean })
|
|
11319
12473
|
], RelSlider.prototype, "disabled", 2);
|
|
11320
12474
|
__decorateClass([
|
|
11321
|
-
(0,
|
|
12475
|
+
(0, import_decorators47.property)({ type: String })
|
|
11322
12476
|
], RelSlider.prototype, "track", 2);
|
|
11323
12477
|
__decorateClass([
|
|
11324
|
-
(0,
|
|
12478
|
+
(0, import_decorators47.property)({ type: Boolean })
|
|
11325
12479
|
], RelSlider.prototype, "showTickLabels", 2);
|
|
11326
12480
|
__decorateClass([
|
|
11327
|
-
(0,
|
|
12481
|
+
(0, import_decorators47.property)({ type: Boolean })
|
|
11328
12482
|
], RelSlider.prototype, "showBubble", 2);
|
|
11329
12483
|
__decorateClass([
|
|
11330
|
-
(0,
|
|
12484
|
+
(0, import_decorators47.property)({ type: Number })
|
|
11331
12485
|
], RelSlider.prototype, "value", 2);
|
|
11332
12486
|
__decorateClass([
|
|
11333
|
-
(0,
|
|
12487
|
+
(0, import_decorators47.state)()
|
|
11334
12488
|
], RelSlider.prototype, "ticks", 2);
|
|
11335
12489
|
RelSlider = __decorateClass([
|
|
11336
|
-
(0,
|
|
12490
|
+
(0, import_decorators47.customElement)("rel-slider")
|
|
11337
12491
|
], RelSlider);
|
|
11338
12492
|
|
|
11339
12493
|
// src/components/rel-snackbar/rel-snackbar.ts
|
|
11340
|
-
var
|
|
11341
|
-
var
|
|
12494
|
+
var import_lit48 = require("lit");
|
|
12495
|
+
var import_decorators48 = require("lit/decorators.js");
|
|
11342
12496
|
var import_vars_v235 = require("./vars-v2-VMGWTFJZ.css");
|
|
11343
|
-
var
|
|
11344
|
-
var RelSnackbar = class extends
|
|
12497
|
+
var import_rel_icon10 = require("@reliability-design/icons/rel-icon");
|
|
12498
|
+
var RelSnackbar = class extends import_lit48.LitElement {
|
|
11345
12499
|
constructor() {
|
|
11346
12500
|
super(...arguments);
|
|
11347
12501
|
this.message = "This is a snackbar message";
|
|
@@ -11415,8 +12569,8 @@ var RelSnackbar = class extends import_lit47.LitElement {
|
|
|
11415
12569
|
warning: "warning"
|
|
11416
12570
|
};
|
|
11417
12571
|
const name = iconMap[this.type];
|
|
11418
|
-
if (!name) return
|
|
11419
|
-
return
|
|
12572
|
+
if (!name) return import_lit48.html``;
|
|
12573
|
+
return import_lit48.html`<rel-icon name="${name}" size="lg" class="snackbar-icon"></rel-icon>`;
|
|
11420
12574
|
}
|
|
11421
12575
|
render() {
|
|
11422
12576
|
const snackbarClasses = [
|
|
@@ -11425,7 +12579,7 @@ var RelSnackbar = class extends import_lit47.LitElement {
|
|
|
11425
12579
|
!this.visible ? "hidden" : "",
|
|
11426
12580
|
this.type !== "default" ? `type-${this.type}` : ""
|
|
11427
12581
|
].filter(Boolean).join(" ");
|
|
11428
|
-
return
|
|
12582
|
+
return import_lit48.html`
|
|
11429
12583
|
<div class="${snackbarClasses}">
|
|
11430
12584
|
<div class="snackbar-body">
|
|
11431
12585
|
${this.type !== "default" ? this.renderIcon() : ""}
|
|
@@ -11433,12 +12587,12 @@ var RelSnackbar = class extends import_lit47.LitElement {
|
|
|
11433
12587
|
</div>
|
|
11434
12588
|
|
|
11435
12589
|
<div class="snackbar-actions">
|
|
11436
|
-
${this.action ?
|
|
12590
|
+
${this.action ? import_lit48.html`
|
|
11437
12591
|
<button class="snackbar-action" @click="${this.onActionClick}">
|
|
11438
12592
|
${this.action}
|
|
11439
12593
|
</button>
|
|
11440
12594
|
` : ""}
|
|
11441
|
-
${this.iconClose ?
|
|
12595
|
+
${this.iconClose ? import_lit48.html`
|
|
11442
12596
|
<button class="snackbar-close" @click="${this.dismiss}">
|
|
11443
12597
|
<rel-icon name="close" size="md"></rel-icon>
|
|
11444
12598
|
</button>
|
|
@@ -11448,7 +12602,7 @@ var RelSnackbar = class extends import_lit47.LitElement {
|
|
|
11448
12602
|
`;
|
|
11449
12603
|
}
|
|
11450
12604
|
};
|
|
11451
|
-
RelSnackbar.styles =
|
|
12605
|
+
RelSnackbar.styles = import_lit48.css`
|
|
11452
12606
|
:host {
|
|
11453
12607
|
display: block;
|
|
11454
12608
|
font-family: var(--rel-fontFamilies-primary);
|
|
@@ -11622,41 +12776,41 @@ RelSnackbar.styles = import_lit47.css`
|
|
|
11622
12776
|
}
|
|
11623
12777
|
`;
|
|
11624
12778
|
__decorateClass([
|
|
11625
|
-
(0,
|
|
12779
|
+
(0, import_decorators48.property)({ type: String })
|
|
11626
12780
|
], RelSnackbar.prototype, "message", 2);
|
|
11627
12781
|
__decorateClass([
|
|
11628
|
-
(0,
|
|
12782
|
+
(0, import_decorators48.property)({ type: String })
|
|
11629
12783
|
], RelSnackbar.prototype, "action", 2);
|
|
11630
12784
|
__decorateClass([
|
|
11631
|
-
(0,
|
|
12785
|
+
(0, import_decorators48.property)({ type: Boolean })
|
|
11632
12786
|
], RelSnackbar.prototype, "longerAction", 2);
|
|
11633
12787
|
__decorateClass([
|
|
11634
|
-
(0,
|
|
12788
|
+
(0, import_decorators48.property)({ type: Boolean })
|
|
11635
12789
|
], RelSnackbar.prototype, "iconClose", 2);
|
|
11636
12790
|
__decorateClass([
|
|
11637
|
-
(0,
|
|
12791
|
+
(0, import_decorators48.property)({ type: String })
|
|
11638
12792
|
], RelSnackbar.prototype, "lines", 2);
|
|
11639
12793
|
__decorateClass([
|
|
11640
|
-
(0,
|
|
12794
|
+
(0, import_decorators48.property)({ type: Number })
|
|
11641
12795
|
], RelSnackbar.prototype, "duration", 2);
|
|
11642
12796
|
__decorateClass([
|
|
11643
|
-
(0,
|
|
12797
|
+
(0, import_decorators48.property)({ type: String })
|
|
11644
12798
|
], RelSnackbar.prototype, "type", 2);
|
|
11645
12799
|
__decorateClass([
|
|
11646
|
-
(0,
|
|
12800
|
+
(0, import_decorators48.property)({ type: Boolean, reflect: true })
|
|
11647
12801
|
], RelSnackbar.prototype, "show", 2);
|
|
11648
12802
|
__decorateClass([
|
|
11649
|
-
(0,
|
|
12803
|
+
(0, import_decorators48.state)()
|
|
11650
12804
|
], RelSnackbar.prototype, "visible", 2);
|
|
11651
12805
|
RelSnackbar = __decorateClass([
|
|
11652
|
-
(0,
|
|
12806
|
+
(0, import_decorators48.customElement)("rel-snackbar")
|
|
11653
12807
|
], RelSnackbar);
|
|
11654
12808
|
|
|
11655
12809
|
// src/components/rel-stepper/rel-stepper.ts
|
|
11656
|
-
var
|
|
11657
|
-
var
|
|
12810
|
+
var import_lit49 = require("lit");
|
|
12811
|
+
var import_decorators49 = require("lit/decorators.js");
|
|
11658
12812
|
var import_vars_v236 = require("./vars-v2-VMGWTFJZ.css");
|
|
11659
|
-
var RelStepper = class extends
|
|
12813
|
+
var RelStepper = class extends import_lit49.LitElement {
|
|
11660
12814
|
constructor() {
|
|
11661
12815
|
super(...arguments);
|
|
11662
12816
|
this.steps = [];
|
|
@@ -11695,7 +12849,7 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11695
12849
|
}
|
|
11696
12850
|
renderIndicator(step, index) {
|
|
11697
12851
|
if (step.status === "done") {
|
|
11698
|
-
return
|
|
12852
|
+
return import_lit49.html`
|
|
11699
12853
|
<svg
|
|
11700
12854
|
xmlns="http://www.w3.org/2000/svg"
|
|
11701
12855
|
width="14"
|
|
@@ -11711,7 +12865,7 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11711
12865
|
</svg>
|
|
11712
12866
|
`;
|
|
11713
12867
|
}
|
|
11714
|
-
return
|
|
12868
|
+
return import_lit49.html`<span>${index + 1}</span>`;
|
|
11715
12869
|
}
|
|
11716
12870
|
render() {
|
|
11717
12871
|
const stepperClasses = [
|
|
@@ -11722,26 +12876,26 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11722
12876
|
].filter(Boolean).join(" ");
|
|
11723
12877
|
const isVertical = this.orientation === "vertical";
|
|
11724
12878
|
const isTextRight = this.textAlign === "right";
|
|
11725
|
-
return
|
|
12879
|
+
return import_lit49.html`
|
|
11726
12880
|
<div class="${stepperClasses}">
|
|
11727
12881
|
${this.steps.map(
|
|
11728
|
-
(step, idx) =>
|
|
12882
|
+
(step, idx) => import_lit49.html`
|
|
11729
12883
|
<div
|
|
11730
12884
|
class="${this.getStepClasses(step)}"
|
|
11731
12885
|
@click="${() => this.onStepClick(step, idx)}"
|
|
11732
12886
|
>
|
|
11733
|
-
${isVertical && isTextRight ?
|
|
12887
|
+
${isVertical && isTextRight ? import_lit49.html`
|
|
11734
12888
|
<!-- Indicator with connector below -->
|
|
11735
12889
|
<div class="indicator-wrapper">
|
|
11736
12890
|
<div class="indicator">
|
|
11737
12891
|
${this.renderIndicator(step, idx)}
|
|
11738
12892
|
</div>
|
|
11739
|
-
${idx < this.steps.length - 1 ?
|
|
12893
|
+
${idx < this.steps.length - 1 ? import_lit49.html`<div class="connector"></div>` : ""}
|
|
11740
12894
|
</div>
|
|
11741
12895
|
|
|
11742
12896
|
<!-- Step Label to the right -->
|
|
11743
12897
|
<div class="step-label">${step.title}</div>
|
|
11744
|
-
` : isVertical ?
|
|
12898
|
+
` : isVertical ? import_lit49.html`
|
|
11745
12899
|
<div class="step-content text-below-content">
|
|
11746
12900
|
<!-- Step Indicator -->
|
|
11747
12901
|
<div class="indicator">
|
|
@@ -11753,8 +12907,8 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11753
12907
|
</div>
|
|
11754
12908
|
|
|
11755
12909
|
<!-- Connector -->
|
|
11756
|
-
${idx < this.steps.length - 1 ?
|
|
11757
|
-
` :
|
|
12910
|
+
${idx < this.steps.length - 1 ? import_lit49.html`<div class="connector"></div>` : ""}
|
|
12911
|
+
` : import_lit49.html`
|
|
11758
12912
|
<!-- Step Indicator -->
|
|
11759
12913
|
<div class="indicator">
|
|
11760
12914
|
${this.renderIndicator(step, idx)}
|
|
@@ -11764,7 +12918,7 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11764
12918
|
<div class="step-label">${step.title}</div>
|
|
11765
12919
|
|
|
11766
12920
|
<!-- Connector (for horizontal only) -->
|
|
11767
|
-
${!isVertical && idx < this.steps.length - 1 ?
|
|
12921
|
+
${!isVertical && idx < this.steps.length - 1 ? import_lit49.html`<div class="connector"></div>` : ""}
|
|
11768
12922
|
`}
|
|
11769
12923
|
</div>
|
|
11770
12924
|
`
|
|
@@ -11773,7 +12927,7 @@ var RelStepper = class extends import_lit48.LitElement {
|
|
|
11773
12927
|
`;
|
|
11774
12928
|
}
|
|
11775
12929
|
};
|
|
11776
|
-
RelStepper.styles =
|
|
12930
|
+
RelStepper.styles = import_lit49.css`
|
|
11777
12931
|
:host {
|
|
11778
12932
|
display: block;
|
|
11779
12933
|
font-family: var(--rel-fontFamilies-primary);
|
|
@@ -12077,26 +13231,26 @@ RelStepper.styles = import_lit48.css`
|
|
|
12077
13231
|
}
|
|
12078
13232
|
`;
|
|
12079
13233
|
__decorateClass([
|
|
12080
|
-
(0,
|
|
13234
|
+
(0, import_decorators49.property)({ type: Array })
|
|
12081
13235
|
], RelStepper.prototype, "steps", 2);
|
|
12082
13236
|
__decorateClass([
|
|
12083
|
-
(0,
|
|
13237
|
+
(0, import_decorators49.property)({ type: String })
|
|
12084
13238
|
], RelStepper.prototype, "textAlign", 2);
|
|
12085
13239
|
__decorateClass([
|
|
12086
|
-
(0,
|
|
13240
|
+
(0, import_decorators49.property)({ type: String })
|
|
12087
13241
|
], RelStepper.prototype, "orientation", 2);
|
|
12088
13242
|
__decorateClass([
|
|
12089
|
-
(0,
|
|
13243
|
+
(0, import_decorators49.property)({ type: String })
|
|
12090
13244
|
], RelStepper.prototype, "size", 2);
|
|
12091
13245
|
RelStepper = __decorateClass([
|
|
12092
|
-
(0,
|
|
13246
|
+
(0, import_decorators49.customElement)("rel-stepper")
|
|
12093
13247
|
], RelStepper);
|
|
12094
13248
|
|
|
12095
13249
|
// src/components/rel-switch/rel-switch.ts
|
|
12096
|
-
var
|
|
12097
|
-
var
|
|
13250
|
+
var import_lit50 = require("lit");
|
|
13251
|
+
var import_decorators50 = require("lit/decorators.js");
|
|
12098
13252
|
var import_vars_v237 = require("./vars-v2-VMGWTFJZ.css");
|
|
12099
|
-
var RelSwitch = class extends
|
|
13253
|
+
var RelSwitch = class extends import_lit50.LitElement {
|
|
12100
13254
|
constructor() {
|
|
12101
13255
|
super(...arguments);
|
|
12102
13256
|
this.checked = false;
|
|
@@ -12155,7 +13309,7 @@ var RelSwitch = class extends import_lit49.LitElement {
|
|
|
12155
13309
|
this.isFocused && "switch-focused",
|
|
12156
13310
|
this.isPressed && "switch-pressed"
|
|
12157
13311
|
].filter(Boolean).join(" ");
|
|
12158
|
-
return
|
|
13312
|
+
return import_lit50.html`
|
|
12159
13313
|
<label class="${wrapperClasses}">
|
|
12160
13314
|
<input
|
|
12161
13315
|
type="checkbox"
|
|
@@ -12174,7 +13328,7 @@ var RelSwitch = class extends import_lit49.LitElement {
|
|
|
12174
13328
|
`;
|
|
12175
13329
|
}
|
|
12176
13330
|
};
|
|
12177
|
-
RelSwitch.styles =
|
|
13331
|
+
RelSwitch.styles = import_lit50.css`
|
|
12178
13332
|
:host {
|
|
12179
13333
|
--switch-track: var(--rel-color-text-placeholder);
|
|
12180
13334
|
--switch-knob-on: var(--rel-color-text-primary);
|
|
@@ -12274,29 +13428,29 @@ RelSwitch.styles = import_lit49.css`
|
|
|
12274
13428
|
}
|
|
12275
13429
|
`;
|
|
12276
13430
|
__decorateClass([
|
|
12277
|
-
(0,
|
|
13431
|
+
(0, import_decorators50.property)({ type: Boolean })
|
|
12278
13432
|
], RelSwitch.prototype, "checked", 2);
|
|
12279
13433
|
__decorateClass([
|
|
12280
|
-
(0,
|
|
13434
|
+
(0, import_decorators50.property)({ type: Boolean })
|
|
12281
13435
|
], RelSwitch.prototype, "disabled", 2);
|
|
12282
13436
|
__decorateClass([
|
|
12283
|
-
(0,
|
|
13437
|
+
(0, import_decorators50.property)({ type: String })
|
|
12284
13438
|
], RelSwitch.prototype, "value", 2);
|
|
12285
13439
|
__decorateClass([
|
|
12286
|
-
(0,
|
|
13440
|
+
(0, import_decorators50.state)()
|
|
12287
13441
|
], RelSwitch.prototype, "isFocused", 2);
|
|
12288
13442
|
__decorateClass([
|
|
12289
|
-
(0,
|
|
13443
|
+
(0, import_decorators50.state)()
|
|
12290
13444
|
], RelSwitch.prototype, "isPressed", 2);
|
|
12291
13445
|
RelSwitch = __decorateClass([
|
|
12292
|
-
(0,
|
|
13446
|
+
(0, import_decorators50.customElement)("rel-switch")
|
|
12293
13447
|
], RelSwitch);
|
|
12294
13448
|
|
|
12295
13449
|
// src/components/rel-tab/rel-tab.ts
|
|
12296
|
-
var
|
|
12297
|
-
var
|
|
13450
|
+
var import_lit51 = require("lit");
|
|
13451
|
+
var import_decorators51 = require("lit/decorators.js");
|
|
12298
13452
|
var import_vars_v238 = require("./vars-v2-VMGWTFJZ.css");
|
|
12299
|
-
var RelTabItem = class extends
|
|
13453
|
+
var RelTabItem = class extends import_lit51.LitElement {
|
|
12300
13454
|
constructor() {
|
|
12301
13455
|
super(...arguments);
|
|
12302
13456
|
this.label = "";
|
|
@@ -12305,25 +13459,25 @@ var RelTabItem = class extends import_lit50.LitElement {
|
|
|
12305
13459
|
this.disabled = false;
|
|
12306
13460
|
}
|
|
12307
13461
|
render() {
|
|
12308
|
-
return
|
|
13462
|
+
return import_lit51.html``;
|
|
12309
13463
|
}
|
|
12310
13464
|
};
|
|
12311
13465
|
__decorateClass([
|
|
12312
|
-
(0,
|
|
13466
|
+
(0, import_decorators51.property)({ type: String })
|
|
12313
13467
|
], RelTabItem.prototype, "label", 2);
|
|
12314
13468
|
__decorateClass([
|
|
12315
|
-
(0,
|
|
13469
|
+
(0, import_decorators51.property)({ type: String })
|
|
12316
13470
|
], RelTabItem.prototype, "value", 2);
|
|
12317
13471
|
__decorateClass([
|
|
12318
|
-
(0,
|
|
13472
|
+
(0, import_decorators51.property)({ type: Number })
|
|
12319
13473
|
], RelTabItem.prototype, "badge", 2);
|
|
12320
13474
|
__decorateClass([
|
|
12321
|
-
(0,
|
|
13475
|
+
(0, import_decorators51.property)({ type: Boolean })
|
|
12322
13476
|
], RelTabItem.prototype, "disabled", 2);
|
|
12323
13477
|
RelTabItem = __decorateClass([
|
|
12324
|
-
(0,
|
|
13478
|
+
(0, import_decorators51.customElement)("rel-tab-item")
|
|
12325
13479
|
], RelTabItem);
|
|
12326
|
-
var RelTab = class extends
|
|
13480
|
+
var RelTab = class extends import_lit51.LitElement {
|
|
12327
13481
|
constructor() {
|
|
12328
13482
|
super(...arguments);
|
|
12329
13483
|
this.tabs = [];
|
|
@@ -12380,11 +13534,11 @@ var RelTab = class extends import_lit50.LitElement {
|
|
|
12380
13534
|
}
|
|
12381
13535
|
render() {
|
|
12382
13536
|
const tabs = this._effectiveTabs;
|
|
12383
|
-
return
|
|
13537
|
+
return import_lit51.html`
|
|
12384
13538
|
<slot name="items" style="display:none;" @slotchange="${this._onSlotChange}"></slot>
|
|
12385
13539
|
<div class="tabs-wrapper" role="tablist">
|
|
12386
13540
|
${tabs.map(
|
|
12387
|
-
(tab, i) =>
|
|
13541
|
+
(tab, i) => import_lit51.html`
|
|
12388
13542
|
<div
|
|
12389
13543
|
class="tab ${i === this.activeIndex ? "active" : ""} ${tab.disabled ? "disabled" : ""}"
|
|
12390
13544
|
role="tab"
|
|
@@ -12395,7 +13549,7 @@ var RelTab = class extends import_lit50.LitElement {
|
|
|
12395
13549
|
@keydown="${(e) => this.onKeyDown(e, i)}"
|
|
12396
13550
|
>
|
|
12397
13551
|
<span class="tab-label">${tab.label}</span>
|
|
12398
|
-
${tab.badge ?
|
|
13552
|
+
${tab.badge ? import_lit51.html`<rel-badge number="${tab.badge}" variant="number" size="sm"></rel-badge>` : ""}
|
|
12399
13553
|
<span class="tab-underline"></span>
|
|
12400
13554
|
</div>
|
|
12401
13555
|
`
|
|
@@ -12407,7 +13561,7 @@ var RelTab = class extends import_lit50.LitElement {
|
|
|
12407
13561
|
`;
|
|
12408
13562
|
}
|
|
12409
13563
|
};
|
|
12410
|
-
RelTab.styles =
|
|
13564
|
+
RelTab.styles = import_lit51.css`
|
|
12411
13565
|
:host {
|
|
12412
13566
|
--tab-active-color: var(--rel-colors-green-primary);
|
|
12413
13567
|
--tab-text-default: var(--rel-color-text-primary);
|
|
@@ -12479,24 +13633,24 @@ RelTab.styles = import_lit50.css`
|
|
|
12479
13633
|
}
|
|
12480
13634
|
`;
|
|
12481
13635
|
__decorateClass([
|
|
12482
|
-
(0,
|
|
13636
|
+
(0, import_decorators51.property)({ type: Array })
|
|
12483
13637
|
], RelTab.prototype, "tabs", 2);
|
|
12484
13638
|
__decorateClass([
|
|
12485
|
-
(0,
|
|
13639
|
+
(0, import_decorators51.property)({ type: Number, reflect: true })
|
|
12486
13640
|
], RelTab.prototype, "activeIndex", 2);
|
|
12487
13641
|
__decorateClass([
|
|
12488
|
-
(0,
|
|
13642
|
+
(0, import_decorators51.state)()
|
|
12489
13643
|
], RelTab.prototype, "_tabItems", 2);
|
|
12490
13644
|
RelTab = __decorateClass([
|
|
12491
|
-
(0,
|
|
13645
|
+
(0, import_decorators51.customElement)("rel-tab")
|
|
12492
13646
|
], RelTab);
|
|
12493
13647
|
|
|
12494
13648
|
// src/components/rel-textfield/rel-textfield.ts
|
|
12495
|
-
var
|
|
12496
|
-
var
|
|
13649
|
+
var import_lit52 = require("lit");
|
|
13650
|
+
var import_decorators52 = require("lit/decorators.js");
|
|
12497
13651
|
var import_vars_v239 = require("./vars-v2-VMGWTFJZ.css");
|
|
12498
|
-
var
|
|
12499
|
-
var RelTextfield = class extends
|
|
13652
|
+
var import_rel_icon11 = require("@reliability-design/icons/rel-icon");
|
|
13653
|
+
var RelTextfield = class extends import_lit52.LitElement {
|
|
12500
13654
|
constructor() {
|
|
12501
13655
|
super(...arguments);
|
|
12502
13656
|
this.placeholder = "";
|
|
@@ -12505,6 +13659,7 @@ var RelTextfield = class extends import_lit51.LitElement {
|
|
|
12505
13659
|
this.state = "default";
|
|
12506
13660
|
this.size = "medium";
|
|
12507
13661
|
this.floatingLabel = false;
|
|
13662
|
+
this.variant = "default";
|
|
12508
13663
|
this.internalState = "default";
|
|
12509
13664
|
this._wasError = false;
|
|
12510
13665
|
this.uniqueId = `textfield-${Math.random().toString(36).slice(2)}`;
|
|
@@ -12557,17 +13712,17 @@ var RelTextfield = class extends import_lit51.LitElement {
|
|
|
12557
13712
|
this.leftIcon ? "has-left-icon" : "",
|
|
12558
13713
|
this.rightIcon ? "has-right-icon" : ""
|
|
12559
13714
|
].filter(Boolean).join(" ");
|
|
12560
|
-
return
|
|
13715
|
+
return import_lit52.html`
|
|
12561
13716
|
<div class="${wrapperClasses}">
|
|
12562
|
-
${!this.floatingLabel && this.label ?
|
|
13717
|
+
${!this.floatingLabel && this.label ? import_lit52.html`<label class="textfield-label" for="${this.uniqueId}">${this.label}</label>` : ""}
|
|
12563
13718
|
|
|
12564
13719
|
<div
|
|
12565
13720
|
class="textfield-container ${this.state === "disabled" ? "disabled" : ""}"
|
|
12566
13721
|
>
|
|
12567
|
-
${this.floatingLabel && this.label ?
|
|
13722
|
+
${this.floatingLabel && this.label ? import_lit52.html`<label
|
|
12568
13723
|
class="textfield-label${this.leftIcon ? " has-left-icon" : ""}"
|
|
12569
13724
|
for="${this.uniqueId}">${this.label}</label>` : ""}
|
|
12570
|
-
${this.leftIcon ?
|
|
13725
|
+
${this.leftIcon ? import_lit52.html`<rel-icon name="${this.leftIcon}" size="sm" class="icon left"></rel-icon>` : ""}
|
|
12571
13726
|
|
|
12572
13727
|
<input
|
|
12573
13728
|
type="${this.type}"
|
|
@@ -12582,10 +13737,10 @@ var RelTextfield = class extends import_lit51.LitElement {
|
|
|
12582
13737
|
@input="${this.handleInput}"
|
|
12583
13738
|
/>
|
|
12584
13739
|
|
|
12585
|
-
${this.rightIcon ?
|
|
13740
|
+
${this.rightIcon ? import_lit52.html`<rel-icon name="${this.rightIcon}" size="sm" class="icon right"></rel-icon>` : ""}
|
|
12586
13741
|
</div>
|
|
12587
13742
|
|
|
12588
|
-
${this.supportingText ?
|
|
13743
|
+
${this.supportingText ? import_lit52.html`<div
|
|
12589
13744
|
class="textfield-support ${this.state === "error" ? "error" : ""}"
|
|
12590
13745
|
>
|
|
12591
13746
|
${this.supportingText}
|
|
@@ -12594,7 +13749,7 @@ var RelTextfield = class extends import_lit51.LitElement {
|
|
|
12594
13749
|
`;
|
|
12595
13750
|
}
|
|
12596
13751
|
};
|
|
12597
|
-
RelTextfield.styles =
|
|
13752
|
+
RelTextfield.styles = import_lit52.css`
|
|
12598
13753
|
:host {
|
|
12599
13754
|
display: block;
|
|
12600
13755
|
font-family: var(--rel-fontFamilies-primary);
|
|
@@ -12793,7 +13948,7 @@ RelTextfield.styles = import_lit51.css`
|
|
|
12793
13948
|
}
|
|
12794
13949
|
|
|
12795
13950
|
.textfield-support.error {
|
|
12796
|
-
color: var(--rel-error-
|
|
13951
|
+
color: var(--rel-error-surface-default, #CC0000);
|
|
12797
13952
|
}
|
|
12798
13953
|
|
|
12799
13954
|
/* Placeholder */
|
|
@@ -12801,6 +13956,14 @@ RelTextfield.styles = import_lit51.css`
|
|
|
12801
13956
|
color: var(--rel-color-text-placeholder);
|
|
12802
13957
|
}
|
|
12803
13958
|
|
|
13959
|
+
:host([floatinglabel]) .textfield-input::placeholder {
|
|
13960
|
+
opacity: 0;
|
|
13961
|
+
}
|
|
13962
|
+
|
|
13963
|
+
:host([floatinglabel]) .textfield-wrapper.focused .textfield-input::placeholder {
|
|
13964
|
+
opacity: 1;
|
|
13965
|
+
}
|
|
13966
|
+
|
|
12804
13967
|
/* Suppress Chrome autofill blue background */
|
|
12805
13968
|
.textfield-input:-webkit-autofill,
|
|
12806
13969
|
.textfield-input:-webkit-autofill:hover,
|
|
@@ -12808,49 +13971,90 @@ RelTextfield.styles = import_lit51.css`
|
|
|
12808
13971
|
-webkit-box-shadow: 0 0 0px 1000px var(--rel-color-bg-primary) inset;
|
|
12809
13972
|
-webkit-text-fill-color: var(--rel-color-text-primary);
|
|
12810
13973
|
}
|
|
13974
|
+
|
|
13975
|
+
/* ── Underline variant ── */
|
|
13976
|
+
:host([variant="underline"]) .textfield-container {
|
|
13977
|
+
border: none;
|
|
13978
|
+
border-bottom: 2px solid var(--rel-color-border-default);
|
|
13979
|
+
border-radius: 0;
|
|
13980
|
+
background: var(--rel-color-bg-tertiary, #f5f5f5);
|
|
13981
|
+
box-shadow: none;
|
|
13982
|
+
overflow: visible;
|
|
13983
|
+
}
|
|
13984
|
+
|
|
13985
|
+
:host([variant="underline"]) .textfield-wrapper.focused .textfield-container,
|
|
13986
|
+
:host([variant="underline"]) .textfield-container:focus-within {
|
|
13987
|
+
border-bottom: 2px solid var(--rel-color-text-primary);
|
|
13988
|
+
box-shadow: none;
|
|
13989
|
+
}
|
|
13990
|
+
|
|
13991
|
+
:host([variant="underline"]) .textfield-wrapper.error .textfield-container {
|
|
13992
|
+
border-bottom: 2px solid var(--rel-error-surface-default, #CC0000);
|
|
13993
|
+
box-shadow: none;
|
|
13994
|
+
}
|
|
13995
|
+
|
|
13996
|
+
:host([variant="underline"]) .textfield-wrapper.disabled .textfield-container {
|
|
13997
|
+
border-bottom: 2px solid var(--rel-color-border-default);
|
|
13998
|
+
background: var(--rel-color-bg-tertiary);
|
|
13999
|
+
}
|
|
14000
|
+
|
|
14001
|
+
/* Remove border radius on input for underline variant */
|
|
14002
|
+
:host([variant="underline"]) .textfield-input {
|
|
14003
|
+
background: transparent;
|
|
14004
|
+
}
|
|
14005
|
+
|
|
14006
|
+
/* Dark mode — underline variant uses same border colors as default */
|
|
14007
|
+
:host-context([data-theme="dark"]) :host([variant="underline"]) .textfield-container,
|
|
14008
|
+
:host-context(.dark) :host([variant="underline"]) .textfield-container {
|
|
14009
|
+
background: var(--rel-color-bg-tertiary);
|
|
14010
|
+
border-bottom-color: var(--rel-color-border-default);
|
|
14011
|
+
}
|
|
12811
14012
|
`;
|
|
12812
14013
|
__decorateClass([
|
|
12813
|
-
(0,
|
|
14014
|
+
(0, import_decorators52.property)({ type: String })
|
|
12814
14015
|
], RelTextfield.prototype, "label", 2);
|
|
12815
14016
|
__decorateClass([
|
|
12816
|
-
(0,
|
|
14017
|
+
(0, import_decorators52.property)({ type: String })
|
|
12817
14018
|
], RelTextfield.prototype, "placeholder", 2);
|
|
12818
14019
|
__decorateClass([
|
|
12819
|
-
(0,
|
|
14020
|
+
(0, import_decorators52.property)({ type: String })
|
|
12820
14021
|
], RelTextfield.prototype, "type", 2);
|
|
12821
14022
|
__decorateClass([
|
|
12822
|
-
(0,
|
|
14023
|
+
(0, import_decorators52.property)({ type: String })
|
|
12823
14024
|
], RelTextfield.prototype, "value", 2);
|
|
12824
14025
|
__decorateClass([
|
|
12825
|
-
(0,
|
|
14026
|
+
(0, import_decorators52.property)({ type: String })
|
|
12826
14027
|
], RelTextfield.prototype, "leftIcon", 2);
|
|
12827
14028
|
__decorateClass([
|
|
12828
|
-
(0,
|
|
14029
|
+
(0, import_decorators52.property)({ type: String })
|
|
12829
14030
|
], RelTextfield.prototype, "rightIcon", 2);
|
|
12830
14031
|
__decorateClass([
|
|
12831
|
-
(0,
|
|
14032
|
+
(0, import_decorators52.property)({ type: String })
|
|
12832
14033
|
], RelTextfield.prototype, "supportingText", 2);
|
|
12833
14034
|
__decorateClass([
|
|
12834
|
-
(0,
|
|
14035
|
+
(0, import_decorators52.property)({ type: String })
|
|
12835
14036
|
], RelTextfield.prototype, "state", 2);
|
|
12836
14037
|
__decorateClass([
|
|
12837
|
-
(0,
|
|
14038
|
+
(0, import_decorators52.property)({ type: String })
|
|
12838
14039
|
], RelTextfield.prototype, "size", 2);
|
|
12839
14040
|
__decorateClass([
|
|
12840
|
-
(0,
|
|
14041
|
+
(0, import_decorators52.property)({ type: Boolean, reflect: true })
|
|
12841
14042
|
], RelTextfield.prototype, "floatingLabel", 2);
|
|
12842
14043
|
__decorateClass([
|
|
12843
|
-
(0,
|
|
14044
|
+
(0, import_decorators52.property)({ type: String, reflect: true })
|
|
14045
|
+
], RelTextfield.prototype, "variant", 2);
|
|
14046
|
+
__decorateClass([
|
|
14047
|
+
(0, import_decorators52.state)()
|
|
12844
14048
|
], RelTextfield.prototype, "internalState", 2);
|
|
12845
14049
|
RelTextfield = __decorateClass([
|
|
12846
|
-
(0,
|
|
14050
|
+
(0, import_decorators52.customElement)("rel-textfield")
|
|
12847
14051
|
], RelTextfield);
|
|
12848
14052
|
|
|
12849
14053
|
// src/components/rel-toast/rel-toast.ts
|
|
12850
|
-
var
|
|
12851
|
-
var
|
|
14054
|
+
var import_lit53 = require("lit");
|
|
14055
|
+
var import_decorators53 = require("lit/decorators.js");
|
|
12852
14056
|
var import_vars_v240 = require("./vars-v2-VMGWTFJZ.css");
|
|
12853
|
-
var RelToast = class extends
|
|
14057
|
+
var RelToast = class extends import_lit53.LitElement {
|
|
12854
14058
|
constructor() {
|
|
12855
14059
|
super(...arguments);
|
|
12856
14060
|
this.message = "";
|
|
@@ -12908,11 +14112,11 @@ var RelToast = class extends import_lit52.LitElement {
|
|
|
12908
14112
|
this.close();
|
|
12909
14113
|
}
|
|
12910
14114
|
render() {
|
|
12911
|
-
return
|
|
14115
|
+
return import_lit53.html`
|
|
12912
14116
|
<div class="toast ${this.type} ${this.visible ? "" : "hidden"}" role="status" aria-live="polite">
|
|
12913
14117
|
<span class="toast-message">${this.message}</span>
|
|
12914
14118
|
|
|
12915
|
-
${this.actionLabel ?
|
|
14119
|
+
${this.actionLabel ? import_lit53.html`<button
|
|
12916
14120
|
class="toast-action"
|
|
12917
14121
|
@click="${this.handleActionClick}"
|
|
12918
14122
|
>
|
|
@@ -12924,7 +14128,7 @@ var RelToast = class extends import_lit52.LitElement {
|
|
|
12924
14128
|
`;
|
|
12925
14129
|
}
|
|
12926
14130
|
};
|
|
12927
|
-
RelToast.styles =
|
|
14131
|
+
RelToast.styles = import_lit53.css`
|
|
12928
14132
|
:host {
|
|
12929
14133
|
position: fixed;
|
|
12930
14134
|
bottom: 24px;
|
|
@@ -12971,7 +14175,7 @@ RelToast.styles = import_lit52.css`
|
|
|
12971
14175
|
.toast-action {
|
|
12972
14176
|
background: transparent;
|
|
12973
14177
|
border: none;
|
|
12974
|
-
color:
|
|
14178
|
+
color: inherit;
|
|
12975
14179
|
font-weight: 600;
|
|
12976
14180
|
font-size: 0.85rem;
|
|
12977
14181
|
cursor: pointer;
|
|
@@ -13012,11 +14216,6 @@ RelToast.styles = import_lit52.css`
|
|
|
13012
14216
|
}
|
|
13013
14217
|
|
|
13014
14218
|
/* Dark mode overrides */
|
|
13015
|
-
:host-context([data-theme="dark"]) .toast-action,
|
|
13016
|
-
:host-context(.dark) .toast-action {
|
|
13017
|
-
color: var(--rel-colors-green-tertiary);
|
|
13018
|
-
}
|
|
13019
|
-
|
|
13020
14219
|
:host-context([data-theme="dark"]) .toast.error,
|
|
13021
14220
|
:host-context(.dark) .toast.error {
|
|
13022
14221
|
background-color: var(--rel-error-surface-default);
|
|
@@ -13042,31 +14241,31 @@ RelToast.styles = import_lit52.css`
|
|
|
13042
14241
|
}
|
|
13043
14242
|
`;
|
|
13044
14243
|
__decorateClass([
|
|
13045
|
-
(0,
|
|
14244
|
+
(0, import_decorators53.property)({ type: String })
|
|
13046
14245
|
], RelToast.prototype, "message", 2);
|
|
13047
14246
|
__decorateClass([
|
|
13048
|
-
(0,
|
|
14247
|
+
(0, import_decorators53.property)({ type: String })
|
|
13049
14248
|
], RelToast.prototype, "type", 2);
|
|
13050
14249
|
__decorateClass([
|
|
13051
|
-
(0,
|
|
14250
|
+
(0, import_decorators53.property)({ type: String })
|
|
13052
14251
|
], RelToast.prototype, "actionLabel", 2);
|
|
13053
14252
|
__decorateClass([
|
|
13054
|
-
(0,
|
|
14253
|
+
(0, import_decorators53.property)({ type: Number })
|
|
13055
14254
|
], RelToast.prototype, "duration", 2);
|
|
13056
14255
|
__decorateClass([
|
|
13057
|
-
(0,
|
|
14256
|
+
(0, import_decorators53.property)({ type: Boolean, reflect: true })
|
|
13058
14257
|
], RelToast.prototype, "show", 2);
|
|
13059
14258
|
__decorateClass([
|
|
13060
|
-
(0,
|
|
14259
|
+
(0, import_decorators53.state)()
|
|
13061
14260
|
], RelToast.prototype, "visible", 2);
|
|
13062
14261
|
RelToast = __decorateClass([
|
|
13063
|
-
(0,
|
|
14262
|
+
(0, import_decorators53.customElement)("rel-toast")
|
|
13064
14263
|
], RelToast);
|
|
13065
14264
|
|
|
13066
14265
|
// src/components/rel-tooltip/rel-tooltip.ts
|
|
13067
|
-
var
|
|
13068
|
-
var
|
|
13069
|
-
var RelTooltip = class extends
|
|
14266
|
+
var import_lit54 = require("lit");
|
|
14267
|
+
var import_decorators54 = require("lit/decorators.js");
|
|
14268
|
+
var RelTooltip = class extends import_lit54.LitElement {
|
|
13070
14269
|
constructor() {
|
|
13071
14270
|
super(...arguments);
|
|
13072
14271
|
this.text = "";
|
|
@@ -13087,7 +14286,7 @@ var RelTooltip = class extends import_lit53.LitElement {
|
|
|
13087
14286
|
}
|
|
13088
14287
|
}
|
|
13089
14288
|
render() {
|
|
13090
|
-
return
|
|
14289
|
+
return import_lit54.html`
|
|
13091
14290
|
<slot @slotchange="${this.linkTrigger}"></slot>
|
|
13092
14291
|
<div
|
|
13093
14292
|
class="tooltip-bubble ${this.position}"
|
|
@@ -13095,12 +14294,12 @@ var RelTooltip = class extends import_lit53.LitElement {
|
|
|
13095
14294
|
role="tooltip"
|
|
13096
14295
|
>
|
|
13097
14296
|
${this.text}
|
|
13098
|
-
${this.showTail ?
|
|
14297
|
+
${this.showTail ? import_lit54.html`<span class="tooltip-tail"></span>` : ""}
|
|
13099
14298
|
</div>
|
|
13100
14299
|
`;
|
|
13101
14300
|
}
|
|
13102
14301
|
};
|
|
13103
|
-
RelTooltip.styles =
|
|
14302
|
+
RelTooltip.styles = import_lit54.css`
|
|
13104
14303
|
:host {
|
|
13105
14304
|
display: inline-block;
|
|
13106
14305
|
position: relative;
|
|
@@ -13181,16 +14380,16 @@ RelTooltip.styles = import_lit53.css`
|
|
|
13181
14380
|
}
|
|
13182
14381
|
`;
|
|
13183
14382
|
__decorateClass([
|
|
13184
|
-
(0,
|
|
14383
|
+
(0, import_decorators54.property)({ type: String })
|
|
13185
14384
|
], RelTooltip.prototype, "text", 2);
|
|
13186
14385
|
__decorateClass([
|
|
13187
|
-
(0,
|
|
14386
|
+
(0, import_decorators54.property)({ type: String })
|
|
13188
14387
|
], RelTooltip.prototype, "position", 2);
|
|
13189
14388
|
__decorateClass([
|
|
13190
|
-
(0,
|
|
14389
|
+
(0, import_decorators54.property)({ type: Boolean, attribute: "show-tail" })
|
|
13191
14390
|
], RelTooltip.prototype, "showTail", 2);
|
|
13192
14391
|
RelTooltip = __decorateClass([
|
|
13193
|
-
(0,
|
|
14392
|
+
(0, import_decorators54.customElement)("rel-tooltip")
|
|
13194
14393
|
], RelTooltip);
|
|
13195
14394
|
|
|
13196
14395
|
// src/index.ts
|
|
@@ -13234,6 +14433,7 @@ __reExport(index_exports, require("@reliability-design/icons"), module.exports);
|
|
|
13234
14433
|
RelResizablePanel,
|
|
13235
14434
|
RelSegmentedButton,
|
|
13236
14435
|
RelSelect,
|
|
14436
|
+
RelSkeleton,
|
|
13237
14437
|
RelSlider,
|
|
13238
14438
|
RelSnackbar,
|
|
13239
14439
|
RelStepper,
|