@sebgroup/green-core 2.28.1 → 2.28.2
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/components/calendar/calendar.component.js +3 -2
- package/components/calendar/calendar.styles.js +4 -0
- package/components/dropdown/dropdown.component.js +1 -0
- package/components/table/table.component.js +7 -2
- package/components/table/table.stories.data.js +1 -0
- package/components/table/table.styles.js +15 -8
- package/custom-elements.json +11989 -11989
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/react/index.d.ts +7 -7
- package/generated/react/index.js +7 -7
- package/package.json +1 -1
- package/shared-styles/rbcb-toggle.style.js +5 -0
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -148,7 +148,7 @@ let GdsCalendar = class extends GdsElement {
|
|
|
148
148
|
);
|
|
149
149
|
const isOutsideMinMax = (day < this.min || day > this.max) && !isSameDay(day, this.min) && !isSameDay(day, this.max);
|
|
150
150
|
const isWeekend = day.getDay() === 0 || day.getDay() === 6;
|
|
151
|
-
const isDisabled = displayOptions.disabled ||
|
|
151
|
+
const isDisabled = displayOptions.disabled || isOutsideMinMax || this.disabledWeekends && isWeekend;
|
|
152
152
|
const shouldRenderBlank = this.hideExtraneousDays && isOutsideCurrentMonth;
|
|
153
153
|
return shouldRenderBlank ? html`<td inert></td>` : html`
|
|
154
154
|
<td
|
|
@@ -159,7 +159,8 @@ let GdsCalendar = class extends GdsElement {
|
|
|
159
159
|
small: Boolean(this.size === "small"),
|
|
160
160
|
"custom-date": Boolean(customization),
|
|
161
161
|
disabled: Boolean(isDisabled),
|
|
162
|
-
today: isSameDay(currentDate, day)
|
|
162
|
+
today: isSameDay(currentDate, day),
|
|
163
|
+
"outside-month": isOutsideCurrentMonth
|
|
163
164
|
})}"
|
|
164
165
|
?disabled=${isDisabled}
|
|
165
166
|
tabindex="${isSameDay(this.focusedDate, day) ? 0 : -1}"
|
|
@@ -446,6 +446,7 @@ let Dropdown = class extends GdsFormControlElement {
|
|
|
446
446
|
this.options[0] && (this.options[0].selected = true);
|
|
447
447
|
this.value = this.options[0]?.value;
|
|
448
448
|
}
|
|
449
|
+
this._handleValueChange();
|
|
449
450
|
}
|
|
450
451
|
_handleValueChange() {
|
|
451
452
|
this._elListbox.then((listbox) => {
|
|
@@ -498,11 +498,16 @@ renderColumnHeader_fn = function(column) {
|
|
|
498
498
|
"sort-asc": isSorted && sortDirection === "asc",
|
|
499
499
|
"sort-desc": isSorted && sortDirection === "desc",
|
|
500
500
|
[`align-${column.align}`]: !!column.align,
|
|
501
|
-
[`justify-${column.justify}`]: !!column.justify
|
|
501
|
+
[`justify-${column.justify}`]: !!column.justify,
|
|
502
|
+
wrap: Boolean(column.width)
|
|
503
|
+
});
|
|
504
|
+
const style = styleMap({
|
|
505
|
+
"--cell-width": column.width
|
|
502
506
|
});
|
|
503
507
|
return html`
|
|
504
508
|
<th
|
|
505
509
|
class=${classes}
|
|
510
|
+
style=${style}
|
|
506
511
|
aria-sort="${isSorted ? sortDirection === "asc" ? "ascending" : "descending" : "none"}"
|
|
507
512
|
@click=${column.sortable ? () => __privateMethod(this, _GdsTable_instances, handleSort_fn).call(this, column.key) : null}
|
|
508
513
|
>
|
|
@@ -740,7 +745,7 @@ renderTable_fn = function() {
|
|
|
740
745
|
loading: this._loading,
|
|
741
746
|
loaded: !this._loading && !this._loaded
|
|
742
747
|
});
|
|
743
|
-
const caption = `${this.summary
|
|
748
|
+
const caption = `${this.summary ? this.summary + ", " : ""}${msg("Data table with")} ${this._total} ${msg("rows")}`;
|
|
744
749
|
return html`
|
|
745
750
|
<gds-card
|
|
746
751
|
variant="${this.variant}"
|
|
@@ -316,8 +316,9 @@ const TableStyles = css`
|
|
|
316
316
|
overflow-wrap: break-word;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
td.wrap
|
|
320
|
-
|
|
319
|
+
td.wrap,
|
|
320
|
+
th.wrap {
|
|
321
|
+
width: var(--cell-width);
|
|
321
322
|
}
|
|
322
323
|
|
|
323
324
|
/* Justify utilities */
|
|
@@ -342,6 +343,11 @@ const TableStyles = css`
|
|
|
342
343
|
justify-content: flex-end;
|
|
343
344
|
}
|
|
344
345
|
|
|
346
|
+
.justify-end:not(.sortable) .column-header {
|
|
347
|
+
text-align: right;
|
|
348
|
+
justify-content: flex-end;
|
|
349
|
+
}
|
|
350
|
+
|
|
345
351
|
.sortable.justify-end .column-header {
|
|
346
352
|
flex-direction: row-reverse;
|
|
347
353
|
}
|
|
@@ -591,13 +597,14 @@ const TableStyles = css`
|
|
|
591
597
|
width: 60%;
|
|
592
598
|
}
|
|
593
599
|
|
|
594
|
-
/* Visually hidden */
|
|
600
|
+
/* Visually hidden - screen reader only without layout impact */
|
|
595
601
|
.visually-hidden {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
602
|
+
clip: rect(0 0 0 0);
|
|
603
|
+
clip-path: inset(50%);
|
|
604
|
+
overflow: hidden;
|
|
605
|
+
white-space: nowrap;
|
|
606
|
+
height: 0px;
|
|
607
|
+
width: 0px;
|
|
601
608
|
}
|
|
602
609
|
|
|
603
610
|
/* Scroll driven animation */
|