@reliability-design/web 1.4.10 → 1.4.11
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/CHANGELOG.md +7 -1
- package/custom-elements.json +5 -1
- package/dist/components/rel-pagination/README.md +2 -2
- package/dist/components/rel-select/README.md +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +78 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -29
- package/dist/index.mjs.map +1 -1
- package/dist/styles/ag-grid.css +274 -0
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -5022,7 +5022,7 @@ ${item.supportingText}` : nothing6;
|
|
|
5022
5022
|
size="${this.optionCheckboxSize}"
|
|
5023
5023
|
label="${item.label}"
|
|
5024
5024
|
icon="${item.icon}"
|
|
5025
|
-
|
|
5025
|
+
.supportingText="${item.supportingText ?? ""}"
|
|
5026
5026
|
status="${this.selectedValues.includes(item.value) ? "checked" : "unchecked"}"
|
|
5027
5027
|
></rel-checkbox>
|
|
5028
5028
|
</div>` : html7`
|
|
@@ -17238,13 +17238,14 @@ var RelSelect = class extends RelElement {
|
|
|
17238
17238
|
if (top + c.height > window.innerHeight - 8) {
|
|
17239
17239
|
top = Math.max(8, t.top - c.height - 8);
|
|
17240
17240
|
}
|
|
17241
|
+
this.listboxEl.style.width = `${t.width}px`;
|
|
17242
|
+
const w = Math.max(t.width, this.listboxEl.getBoundingClientRect().width);
|
|
17241
17243
|
let left = t.left;
|
|
17242
|
-
if (left +
|
|
17243
|
-
left = Math.max(8, window.innerWidth -
|
|
17244
|
+
if (left + w > window.innerWidth - 8) {
|
|
17245
|
+
left = Math.max(8, window.innerWidth - w - 8);
|
|
17244
17246
|
}
|
|
17245
17247
|
this.listboxEl.style.top = `${top}px`;
|
|
17246
17248
|
this.listboxEl.style.left = `${left}px`;
|
|
17247
|
-
this.listboxEl.style.width = `${t.width}px`;
|
|
17248
17249
|
const applied = this.listboxEl.getBoundingClientRect();
|
|
17249
17250
|
top -= applied.top - top;
|
|
17250
17251
|
left -= applied.left - left;
|
|
@@ -17928,7 +17929,7 @@ ${option.supportingText}` : nothing19;
|
|
|
17928
17929
|
size="${this.optionCheckboxSize}"
|
|
17929
17930
|
label="${option.label}"
|
|
17930
17931
|
icon="${option.icon}"
|
|
17931
|
-
|
|
17932
|
+
.supportingText="${option.supportingText ?? ""}"
|
|
17932
17933
|
status="${this.selectedValues.includes(option.value) ? "checked" : "unchecked"}"
|
|
17933
17934
|
></rel-checkbox>
|
|
17934
17935
|
</div>
|
|
@@ -18560,6 +18561,8 @@ RelSelect.styles = css27`
|
|
|
18560
18561
|
margin: 0;
|
|
18561
18562
|
padding: 0;
|
|
18562
18563
|
width: auto;
|
|
18564
|
+
/* Opt-in floor under the trigger-width panel (unset: 0, no change). */
|
|
18565
|
+
min-width: var(--rel-select-panel-min-width, 0px);
|
|
18563
18566
|
height: auto;
|
|
18564
18567
|
color: inherit;
|
|
18565
18568
|
box-sizing: border-box;
|
|
@@ -19191,19 +19194,34 @@ var RelPagination = class extends RelElement {
|
|
|
19191
19194
|
const pages = this.generatePageNumbers();
|
|
19192
19195
|
const current = this.activePage;
|
|
19193
19196
|
const total = this.computedTotalPages;
|
|
19197
|
+
const narrowShown = (p) => p !== -1 && (p === 1 || p === total || Math.abs(p - current) <= 1);
|
|
19198
|
+
const narrowGapAt = /* @__PURE__ */ new Set();
|
|
19199
|
+
const narrowKeep = /* @__PURE__ */ new Set();
|
|
19200
|
+
for (let i = 0; i < pages.length; ) {
|
|
19201
|
+
if (narrowShown(pages[i])) {
|
|
19202
|
+
i++;
|
|
19203
|
+
continue;
|
|
19204
|
+
}
|
|
19205
|
+
let end = i;
|
|
19206
|
+
while (end < pages.length && !narrowShown(pages[end])) end++;
|
|
19207
|
+
if (end - i === 1 && pages[i] !== -1) narrowKeep.add(pages[i]);
|
|
19208
|
+
else narrowGapAt.add(i);
|
|
19209
|
+
i = end;
|
|
19210
|
+
}
|
|
19194
19211
|
return html30`
|
|
19195
19212
|
<div part="base" class="pag-root" role="navigation" aria-label="${this.ariaLabel}">
|
|
19196
19213
|
<div class="pag-stack">
|
|
19197
19214
|
${this.renderNavBtn("prev")}
|
|
19198
19215
|
<div class="pag-numbers">
|
|
19199
|
-
${pages.map((p) => {
|
|
19200
|
-
|
|
19216
|
+
${pages.map((p, i) => {
|
|
19217
|
+
const gap = narrowGapAt.has(i) ? html30`<span class="pag-ellipsis pag-ellipsis-narrow">...</span>` : nothing20;
|
|
19218
|
+
if (p === -1) return html30`${gap}<span class="pag-ellipsis">...</span>`;
|
|
19201
19219
|
const isNear = Math.abs(p - current) <= 1;
|
|
19202
19220
|
const isEdge = p === 1 || p === total;
|
|
19203
19221
|
const label = isEdge && !isNear ? this.formatPageLabel(p) : String(p);
|
|
19204
|
-
return html30
|
|
19222
|
+
return html30`${gap}<button
|
|
19205
19223
|
type="button"
|
|
19206
|
-
class="pag-page-btn ${isNear ? "near" : ""} ${p === 1 || p === total ? "edge" : ""}"
|
|
19224
|
+
class="pag-page-btn ${isNear ? "near" : ""} ${p === 1 || p === total ? "edge" : ""} ${narrowKeep.has(p) ? "keep" : ""}"
|
|
19207
19225
|
aria-label="Page ${p}"
|
|
19208
19226
|
title="${label === String(p) ? nothing20 : `Page ${p}`}"
|
|
19209
19227
|
aria-current="${p === current ? "page" : "false"}"
|
|
@@ -19262,6 +19280,13 @@ var RelPagination = class extends RelElement {
|
|
|
19262
19280
|
if (to < total) pages.push(total);
|
|
19263
19281
|
return pages.map(String);
|
|
19264
19282
|
}
|
|
19283
|
+
/** Both dropdowns' panels may be wider than their 72px trigger: the longest
|
|
19284
|
+
value (`largest`), the row's 12px side padding, the 16px gap, the 18px
|
|
19285
|
+
check and 20px kept for a classic scrollbar (the page list scrolls past
|
|
19286
|
+
9 pages). */
|
|
19287
|
+
panelMinWidth(largest) {
|
|
19288
|
+
return `--rel-select-panel-min-width: calc(${String(Math.max(1, largest)).length}ch + 2 * var(--rel-spacing-sm) + var(--rel-spacing-md) + 38px)`;
|
|
19289
|
+
}
|
|
19265
19290
|
/* The inner rel-select fires its own composed `changed` / `rel-change`
|
|
19266
19291
|
({ value }). They must not reach the page as if the pagination had fired
|
|
19267
19292
|
them, so they stop at the select. */
|
|
@@ -19299,7 +19324,8 @@ var RelPagination = class extends RelElement {
|
|
|
19299
19324
|
size="medium"
|
|
19300
19325
|
label-style="none"
|
|
19301
19326
|
field-aria-label="Page (of ${total})"
|
|
19302
|
-
search
|
|
19327
|
+
no-search
|
|
19328
|
+
style=${this.panelMinWidth(total)}
|
|
19303
19329
|
.options=${this.pageOptions(total, current)}
|
|
19304
19330
|
.selected=${live3(String(current))}
|
|
19305
19331
|
.state=${this.disabled ? "disabled" : "default"}
|
|
@@ -19322,6 +19348,7 @@ var RelPagination = class extends RelElement {
|
|
|
19322
19348
|
label-style="none"
|
|
19323
19349
|
field-aria-label="${this.rowsPerPageLabel}"
|
|
19324
19350
|
no-search
|
|
19351
|
+
style=${this.panelMinWidth(Math.max(0, ...values.map(Number)))}
|
|
19325
19352
|
.options=${values}
|
|
19326
19353
|
.selected=${live3(String(this.perPage))}
|
|
19327
19354
|
.state=${this.disabled ? "disabled" : "default"}
|
|
@@ -19649,12 +19676,22 @@ RelPagination.styles = css28`
|
|
|
19649
19676
|
}
|
|
19650
19677
|
}
|
|
19651
19678
|
|
|
19652
|
-
/*
|
|
19679
|
+
/* The ellipsis that marks a gap only the 480–768px window opens. */
|
|
19680
|
+
.pag-ellipsis.pag-ellipsis-narrow {
|
|
19681
|
+
display: none;
|
|
19682
|
+
}
|
|
19683
|
+
|
|
19684
|
+
/* 480–768px: shrink the number window to current ±1 plus first/last, with
|
|
19685
|
+
an ellipsis wherever that hides more than one page */
|
|
19653
19686
|
@container (min-width: 480px) and (max-width: 768px) {
|
|
19654
|
-
.pag-page-btn:not(.near):not(.edge):not([aria-current="page"]),
|
|
19687
|
+
.pag-page-btn:not(.near):not(.edge):not(.keep):not([aria-current="page"]),
|
|
19655
19688
|
.pag-ellipsis {
|
|
19656
19689
|
display: none;
|
|
19657
19690
|
}
|
|
19691
|
+
|
|
19692
|
+
.pag-numbers .pag-ellipsis.pag-ellipsis-narrow {
|
|
19693
|
+
display: inline-flex;
|
|
19694
|
+
}
|
|
19658
19695
|
}
|
|
19659
19696
|
|
|
19660
19697
|
/* <480px: swap to the compact layout automatically */
|
|
@@ -19678,10 +19715,14 @@ RelPagination.styles = css28`
|
|
|
19678
19715
|
}
|
|
19679
19716
|
|
|
19680
19717
|
@media (min-width: 480px) and (max-width: 768px) {
|
|
19681
|
-
.pag-page-btn:not(.near):not(.edge):not([aria-current="page"]),
|
|
19718
|
+
.pag-page-btn:not(.near):not(.edge):not(.keep):not([aria-current="page"]),
|
|
19682
19719
|
.pag-ellipsis {
|
|
19683
19720
|
display: none;
|
|
19684
19721
|
}
|
|
19722
|
+
|
|
19723
|
+
.pag-numbers .pag-ellipsis.pag-ellipsis-narrow {
|
|
19724
|
+
display: inline-flex;
|
|
19725
|
+
}
|
|
19685
19726
|
}
|
|
19686
19727
|
|
|
19687
19728
|
@media (max-width: 479px) {
|
|
@@ -23270,27 +23311,23 @@ RelSignaturePad.styles = css38`
|
|
|
23270
23311
|
border-color: var(--rel-border-strong);
|
|
23271
23312
|
}
|
|
23272
23313
|
|
|
23273
|
-
/* Error: the 2px danger border inside, at rest too, drawn
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
focus stays visible
|
|
23314
|
+
/* Error: the 2px danger border inside, at rest too, drawn as ONE outline
|
|
23315
|
+
pulled 2px in like focus (outlines paint in forced colours). Focused in
|
|
23316
|
+
error, the same outline widens to 4px from 2px inside: a 2px danger
|
|
23317
|
+
ring outside on top of the inside edge, so focus stays visible
|
|
23318
|
+
(WCAG 2.4.7). One layer, so no seams between rings at any zoom (a
|
|
23319
|
+
border plus a pseudo element clipped by the pad's overflow plus an
|
|
23320
|
+
outline drew three bands with light gaps between them). */
|
|
23277
23321
|
.field.error .pad {
|
|
23278
23322
|
border-color: var(--rel-border-danger);
|
|
23279
|
-
|
|
23280
|
-
|
|
23281
|
-
.field.error .pad::after {
|
|
23282
|
-
content: "";
|
|
23283
|
-
position: absolute;
|
|
23284
|
-
inset: -1px;
|
|
23285
|
-
border: 2px solid var(--rel-border-danger);
|
|
23286
|
-
border-radius: inherit;
|
|
23287
|
-
pointer-events: none;
|
|
23323
|
+
outline: 2px solid var(--rel-border-danger);
|
|
23324
|
+
outline-offset: -2px;
|
|
23288
23325
|
}
|
|
23289
23326
|
|
|
23290
23327
|
.field.error .pad:focus,
|
|
23291
23328
|
.field.error.typing .pad:focus-within {
|
|
23292
|
-
outline
|
|
23293
|
-
outline-offset:
|
|
23329
|
+
outline: 4px solid var(--rel-border-danger);
|
|
23330
|
+
outline-offset: -2px;
|
|
23294
23331
|
}
|
|
23295
23332
|
|
|
23296
23333
|
/* Read-only: the edge on the page colour, one step fainter than subtle. */
|
|
@@ -24930,7 +24967,8 @@ RelSplitButton.styles = [RelButton.styles, css41`
|
|
|
24930
24967
|
between the segments, so the pill is action + 1 + trigger wide. The
|
|
24931
24968
|
outlined segments drop their inner borders. Colours:
|
|
24932
24969
|
- secondary: the tone's outline border, and the outline's hover colour
|
|
24933
|
-
while
|
|
24970
|
+
while either segment is hovered or pressed, or the menu is open
|
|
24971
|
+
(decision Combo-G, extended to the chevron 2026-10-27);
|
|
24934
24972
|
- primary: the segment's label colour at full strength (Combo-B);
|
|
24935
24973
|
- static: the static label colour (white);
|
|
24936
24974
|
- ghost (no counterpart in the sandbox): --rel-border-subtle. */
|
|
@@ -24965,6 +25003,17 @@ RelSplitButton.styles = [RelButton.styles, css41`
|
|
|
24965
25003
|
background: var(--rel-action-danger-border-outline-hover);
|
|
24966
25004
|
}
|
|
24967
25005
|
|
|
25006
|
+
/* The same for the chevron (Combo-G extended to the trigger, user
|
|
25007
|
+
2026-10-27): hovered, pressed or open, the divider takes its border
|
|
25008
|
+
colour, so the chevron shows four dark sides like the main action. */
|
|
25009
|
+
:host([variant="secondary"]) .divider:has(+ rel-popover button.toggle:is(:hover, :active, .is-open):not(:disabled)) {
|
|
25010
|
+
background: var(--rel-action-neutral-border-outline-hover);
|
|
25011
|
+
}
|
|
25012
|
+
|
|
25013
|
+
:host([variant="secondary"][tone="destructive"]) .divider:has(+ rel-popover button.toggle:is(:hover, :active, .is-open):not(:disabled)) {
|
|
25014
|
+
background: var(--rel-action-danger-border-outline-hover);
|
|
25015
|
+
}
|
|
25016
|
+
|
|
24968
25017
|
:host([variant="primary"]) .divider {
|
|
24969
25018
|
background: var(--rel-action-neutral-label-icons-fill-inverse);
|
|
24970
25019
|
}
|