@sebgroup/green-core 3.23.0 → 3.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/regular/satellite.svg +6 -0
- package/assets/icons/solid/satellite.svg +5 -0
- package/components/button/button.component.js +6 -1
- package/components/calendar/calendar.component.js +2 -1
- package/components/context-menu/context-menu.component.js +3 -0
- package/components/datepicker/datepicker.component.js +57 -13
- package/components/icon/icons/index.d.ts +1 -0
- package/components/icon/icons/index.js +1 -0
- package/components/icon/icons/pure.d.ts +1 -0
- package/components/icon/icons/pure.js +1 -0
- package/components/icon/icons/satellite.component.d.ts +18 -0
- package/components/icon/icons/satellite.component.js +25 -0
- package/components/icon/icons/satellite.d.ts +2 -0
- package/components/icon/icons/satellite.js +6 -0
- package/components/link/link.styles.js +23 -3
- package/components/popover/popover.component.js +3 -2
- package/components/table/table.stories.data.js +186 -182
- package/custom-elements.json +27017 -26394
- package/gds-element.js +1 -1
- package/generated/mcp/alert/index.json +0 -1
- package/generated/mcp/avatar/index.json +0 -1
- package/generated/mcp/badge/index.json +0 -1
- package/generated/mcp/blur/index.json +0 -1
- package/generated/mcp/breadcrumbs/index.json +0 -1
- package/generated/mcp/button/index.json +0 -1
- package/generated/mcp/calendar/index.json +0 -1
- package/generated/mcp/card/index.json +0 -1
- package/generated/mcp/card-pattern-01/index.json +0 -1
- package/generated/mcp/checkbox/index.json +0 -1
- package/generated/mcp/coachmark/index.json +0 -1
- package/generated/mcp/components.json +1 -44
- package/generated/mcp/context-menu/index.json +0 -1
- package/generated/mcp/datepicker/index.json +0 -1
- package/generated/mcp/details/index.json +0 -1
- package/generated/mcp/dialog/index.json +0 -1
- package/generated/mcp/div/index.json +0 -1
- package/generated/mcp/divider/index.json +0 -1
- package/generated/mcp/dropdown/index.json +0 -1
- package/generated/mcp/fab/index.json +0 -1
- package/generated/mcp/filter-chips/index.json +0 -1
- package/generated/mcp/flex/index.json +0 -1
- package/generated/mcp/form-summary/index.json +0 -1
- package/generated/mcp/grid/index.json +0 -1
- package/generated/mcp/icon-satellite/angular.md +15 -0
- package/generated/mcp/icon-satellite/api.md +31 -0
- package/generated/mcp/icon-satellite/index.json +8 -0
- package/generated/mcp/icon-satellite/react.md +15 -0
- package/generated/mcp/icons.json +13 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/input/index.json +0 -1
- package/generated/mcp/link/index.json +0 -1
- package/generated/mcp/list/index.json +0 -1
- package/generated/mcp/list-item-pattern-01/index.json +0 -1
- package/generated/mcp/menu-button/index.json +0 -1
- package/generated/mcp/pagination/index.json +0 -1
- package/generated/mcp/popover/index.json +0 -1
- package/generated/mcp/radio/index.json +0 -1
- package/generated/mcp/rich-text/index.json +0 -1
- package/generated/mcp/segmented-control/index.json +0 -1
- package/generated/mcp/select/index.json +0 -1
- package/generated/mcp/signal/index.json +0 -1
- package/generated/mcp/spinner/index.json +0 -1
- package/generated/mcp/switch/index.json +0 -1
- package/generated/mcp/table/index.json +0 -1
- package/generated/mcp/tabs/index.json +0 -1
- package/generated/mcp/text/index.json +0 -1
- package/generated/mcp/textarea/index.json +0 -1
- package/generated/mcp/theme/index.json +0 -1
- package/generated/mcp/tokens.json +1 -1
- package/generated/mcp/video/index.json +0 -1
- package/generated/react/icons/icon-satellite/index.d.ts +691 -0
- package/generated/react/icons/icon-satellite/index.js +14 -0
- package/generated/react/index.d.ts +2 -1
- package/generated/react/index.js +2 -1
- package/package.json +2 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/helpers/has-changed.d.ts +8 -0
- package/utils/helpers/has-changed.js +10 -0
- package/generated/mcp/alert/guidelines.md +0 -105
- package/generated/mcp/avatar/guidelines.md +0 -40
- package/generated/mcp/badge/guidelines.md +0 -56
- package/generated/mcp/blur/guidelines.md +0 -3
- package/generated/mcp/breadcrumbs/guidelines.md +0 -35
- package/generated/mcp/button/guidelines.md +0 -83
- package/generated/mcp/calendar/guidelines.md +0 -3
- package/generated/mcp/card/guidelines.md +0 -78
- package/generated/mcp/card-pattern-01/guidelines.md +0 -52
- package/generated/mcp/checkbox/guidelines.md +0 -91
- package/generated/mcp/coachmark/guidelines.md +0 -8
- package/generated/mcp/context-menu/guidelines.md +0 -33
- package/generated/mcp/datepicker/guidelines.md +0 -44
- package/generated/mcp/details/guidelines.md +0 -24
- package/generated/mcp/dialog/guidelines.md +0 -35
- package/generated/mcp/div/guidelines.md +0 -3
- package/generated/mcp/divider/guidelines.md +0 -24
- package/generated/mcp/dropdown/guidelines.md +0 -96
- package/generated/mcp/fab/guidelines.md +0 -27
- package/generated/mcp/filter-chips/guidelines.md +0 -47
- package/generated/mcp/flex/guidelines.md +0 -1
- package/generated/mcp/form-summary/guidelines.md +0 -39
- package/generated/mcp/grid/guidelines.md +0 -3
- package/generated/mcp/input/guidelines.md +0 -127
- package/generated/mcp/link/guidelines.md +0 -43
- package/generated/mcp/list/guidelines.md +0 -16
- package/generated/mcp/list-item-pattern-01/guidelines.md +0 -49
- package/generated/mcp/menu-button/guidelines.md +0 -39
- package/generated/mcp/pagination/guidelines.md +0 -24
- package/generated/mcp/popover/guidelines.md +0 -3
- package/generated/mcp/radio/guidelines.md +0 -74
- package/generated/mcp/rich-text/guidelines.md +0 -3
- package/generated/mcp/segmented-control/guidelines.md +0 -31
- package/generated/mcp/select/guidelines.md +0 -29
- package/generated/mcp/signal/guidelines.md +0 -14
- package/generated/mcp/spinner/guidelines.md +0 -6
- package/generated/mcp/switch/guidelines.md +0 -41
- package/generated/mcp/table/guidelines.md +0 -169
- package/generated/mcp/tabs/guidelines.md +0 -64
- package/generated/mcp/text/guidelines.md +0 -3
- package/generated/mcp/textarea/guidelines.md +0 -73
- package/generated/mcp/theme/guidelines.md +0 -3
- package/generated/mcp/video/guidelines.md +0 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C14.2998 21.25 16.4036 20.4107 18.0217 19.0217L4.97828 5.97827C3.58929 7.59643 2.75 9.7002 2.75 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M12 12L13 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M21.25 12C21.25 6.89137 17.1086 2.75 12 2.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M18 12C18 8.68629 15.3137 6 12 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 2C11.5858 2 11.25 2.33579 11.25 2.75C11.25 3.16421 11.5858 3.5 12 3.5C16.6944 3.5 20.5 7.30558 20.5 12C20.5 12.4142 20.8358 12.75 21.25 12.75C21.6642 12.75 22 12.4142 22 12C22 6.47715 17.5228 2 12 2Z" fill="currentColor"/>
|
|
3
|
+
<path d="M5.50861 5.44794C5.36096 5.30029 5.15843 5.22087 4.94977 5.22881C4.7411 5.23675 4.5452 5.33132 4.40919 5.48977C2.90789 7.23877 2 9.5143 2 12C2 17.5228 6.47715 22 12 22C14.4857 22 16.7612 21.0921 18.5102 19.5908C18.6687 19.4548 18.7632 19.2589 18.7712 19.0502C18.7791 18.8416 18.6997 18.639 18.552 18.4914L12.5607 12.5L13.5303 11.5303C13.8232 11.2374 13.8232 10.7626 13.5303 10.4697C13.2374 10.1768 12.7626 10.1768 12.4697 10.4697L11.5 11.4393L5.50861 5.44794Z" fill="currentColor"/>
|
|
4
|
+
<path d="M12 5.25C11.5858 5.25 11.25 5.58579 11.25 6C11.25 6.41421 11.5858 6.75 12 6.75C14.8995 6.75 17.25 9.10051 17.25 12C17.25 12.4142 17.5858 12.75 18 12.75C18.4142 12.75 18.75 12.4142 18.75 12C18.75 8.27208 15.7279 5.25 12 5.25Z" fill="currentColor"/>
|
|
5
|
+
</svg>
|
|
@@ -28,7 +28,12 @@ import {
|
|
|
28
28
|
import { GdsFormControlElement } from "../form/form-control.js";
|
|
29
29
|
import ButtonStyles from "./button.styles.js";
|
|
30
30
|
const ariaForwards = ["aria-label", "aria-haspopup", "aria-expanded"];
|
|
31
|
-
const attributeForwards = [
|
|
31
|
+
const attributeForwards = [
|
|
32
|
+
...ariaForwards,
|
|
33
|
+
"gds-tabindex",
|
|
34
|
+
"gds-aria-selected",
|
|
35
|
+
"gds-aria-expanded"
|
|
36
|
+
];
|
|
32
37
|
const html = stripWhitespace(customElementHtml);
|
|
33
38
|
let Button = class extends GdsFormControlElement {
|
|
34
39
|
constructor() {
|
|
@@ -26,6 +26,7 @@ import { tokens } from "../../tokens.style.js";
|
|
|
26
26
|
import { TransitionalStyles } from "../../transitional-styles.js";
|
|
27
27
|
import { ariaForwarding } from "../../utils/decorators/aria-forwarding.js";
|
|
28
28
|
import { watch } from "../../utils/decorators/watch.js";
|
|
29
|
+
import { dateHasChanged } from "../../utils/helpers/has-changed.js";
|
|
29
30
|
import CalendarStyles from "./calendar.styles.js";
|
|
30
31
|
import { renderMonthGridView } from "./functions.js";
|
|
31
32
|
let GdsCalendar = class extends GdsElement {
|
|
@@ -268,7 +269,7 @@ GdsCalendar.shadowRootOptions = {
|
|
|
268
269
|
delegatesFocus: true
|
|
269
270
|
};
|
|
270
271
|
__decorateClass([
|
|
271
|
-
property()
|
|
272
|
+
property({ hasChanged: dateHasChanged })
|
|
272
273
|
], GdsCalendar.prototype, "value", 2);
|
|
273
274
|
__decorateClass([
|
|
274
275
|
property({ type: Date })
|
|
@@ -132,6 +132,9 @@ let GdsContextMenu = class extends withMarginProps(
|
|
|
132
132
|
${when(this.open, __privateGet(this, _renderPopover))}`;
|
|
133
133
|
}
|
|
134
134
|
_handleOpenChange() {
|
|
135
|
+
if (__privateGet(this, _elTriggerBtn)) {
|
|
136
|
+
applyTriggerAriaAttributes(__privateGet(this, _elTriggerBtn), this.open, "menu");
|
|
137
|
+
}
|
|
135
138
|
if (!this.open) {
|
|
136
139
|
requestAnimationFrame(() => __privateGet(this, _elTriggerBtn)?.focus());
|
|
137
140
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
__privateMethod,
|
|
6
6
|
__privateSet
|
|
7
7
|
} from "../../chunks/chunk.CAV4X6PU.js";
|
|
8
|
-
var _utcHours, _valueOnOpen, _shouldShowFooter, shouldShowFooter_fn, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn, _updateOutOfRangeAction, updateOutOfRangeAction_fn, _normalizeDate, normalizeDate_fn, _focusDate, focusDate_fn, _shouldShowTodayButton, shouldShowTodayButton_fn, _getSpinnerLabel, getSpinnerLabel_fn, _getMinSpinnerValue, getMinSpinnerValue_fn, _getMaxSpinnerValue, getMaxSpinnerValue_fn, _getLocalizedPlaceholder, getLocalizedPlaceholder_fn, _getSpinnerValue, getSpinnerValue_fn, _dispatchChangeEvent, dispatchChangeEvent_fn, _dispatchInputEvent, dispatchInputEvent_fn, _handleSpinnerFocus, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, _handlePopoverStateChange, _handleSpinnerKeydown, _parseDateFormat, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, _years, years_get, _isValueOutsideRange, isValueOutsideRange_get;
|
|
8
|
+
var _utcHours, _valueOnOpen, _shouldShowFooter, shouldShowFooter_fn, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn, _updateOutOfRangeAction, updateOutOfRangeAction_fn, _normalizeDate, normalizeDate_fn, _focusDate, focusDate_fn, _isDateSelectable, isDateSelectable_fn, _nearestSelectableDate, nearestSelectableDate_fn, _shouldShowTodayButton, shouldShowTodayButton_fn, _getSpinnerLabel, getSpinnerLabel_fn, _getMinSpinnerValue, getMinSpinnerValue_fn, _getMaxSpinnerValue, getMaxSpinnerValue_fn, _getLocalizedPlaceholder, getLocalizedPlaceholder_fn, _getSpinnerValue, getSpinnerValue_fn, _dispatchChangeEvent, dispatchChangeEvent_fn, _dispatchInputEvent, dispatchInputEvent_fn, _handleSpinnerFocus, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, _handlePopoverStateChange, _handleSpinnerKeydown, _parseDateFormat, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, _years, years_get, _isValueOutsideRange, isValueOutsideRange_get;
|
|
9
9
|
import { localized, msg } from "@lit/localize";
|
|
10
10
|
import { nothing } from "lit";
|
|
11
11
|
import { property, query, queryAll, queryAsync, state } from "lit/decorators.js";
|
|
@@ -13,7 +13,7 @@ import { join } from "lit/directives/join.js";
|
|
|
13
13
|
import { map } from "lit/directives/map.js";
|
|
14
14
|
import { repeat } from "lit/directives/repeat.js";
|
|
15
15
|
import { when } from "lit/directives/when.js";
|
|
16
|
-
import { isSameDay, lastDayOfMonth, setHours } from "date-fns";
|
|
16
|
+
import { addDays, isSameDay, lastDayOfMonth, setHours } from "date-fns";
|
|
17
17
|
import { GdsButton } from "../../components/button/button.component.js";
|
|
18
18
|
import { GdsDropdown } from "../../components/dropdown/dropdown.component.js";
|
|
19
19
|
import { GdsFlex } from "../../components/flex/flex.component.js";
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
dateArrayConverter,
|
|
28
28
|
dateConverter
|
|
29
29
|
} from "../../utils/helpers/attribute-converters.js";
|
|
30
|
+
import { dateHasChanged } from "../../utils/helpers/has-changed.js";
|
|
30
31
|
import {
|
|
31
32
|
withLayoutChildProps,
|
|
32
33
|
withMarginProps,
|
|
@@ -52,7 +53,24 @@ let Datepicker = class extends GdsFormControlElement {
|
|
|
52
53
|
* the local calendar day is preserved, then to the configured UTC hour.
|
|
53
54
|
*/
|
|
54
55
|
__privateAdd(this, _normalizeDate);
|
|
56
|
+
/**
|
|
57
|
+
* Focuses (and selects) a date in the calendar. The month/year state and value are derived
|
|
58
|
+
* directly from `d` rather than read back from the calendar element asynchronously, so that a
|
|
59
|
+
* concurrent update (e.g. the host re-assigning an equivalent `value`) cannot race with, and
|
|
60
|
+
* overwrite, the requested focus change.
|
|
61
|
+
*/
|
|
55
62
|
__privateAdd(this, _focusDate);
|
|
63
|
+
/**
|
|
64
|
+
* Whether the given date can be selected, taking `min`/`max`, `disabledWeekends` and
|
|
65
|
+
* `disabledDates` into account.
|
|
66
|
+
*/
|
|
67
|
+
__privateAdd(this, _isDateSelectable);
|
|
68
|
+
/**
|
|
69
|
+
* Finds the nearest selectable date starting from `from` (inclusive), stepping a day at a time in
|
|
70
|
+
* `direction` (`1` towards `max`, `-1` towards `min`). Falls back to `from` if the min/max range is
|
|
71
|
+
* exhausted without finding a selectable date.
|
|
72
|
+
*/
|
|
73
|
+
__privateAdd(this, _nearestSelectableDate);
|
|
56
74
|
__privateAdd(this, _shouldShowTodayButton);
|
|
57
75
|
__privateAdd(this, _getSpinnerLabel);
|
|
58
76
|
__privateAdd(this, _getMinSpinnerValue);
|
|
@@ -254,6 +272,8 @@ let Datepicker = class extends GdsFormControlElement {
|
|
|
254
272
|
return super.value;
|
|
255
273
|
}
|
|
256
274
|
set value(value) {
|
|
275
|
+
if (!dateHasChanged(value, super.value))
|
|
276
|
+
return;
|
|
257
277
|
super.value = value;
|
|
258
278
|
}
|
|
259
279
|
get utcHours() {
|
|
@@ -606,13 +626,14 @@ renderBackToValidRangeButton_fn = function() {
|
|
|
606
626
|
if (!this._outOfRangeAction)
|
|
607
627
|
return nothing;
|
|
608
628
|
const isAfterMax = this._outOfRangeAction === "max";
|
|
629
|
+
const target = isAfterMax ? __privateMethod(this, _nearestSelectableDate, nearestSelectableDate_fn).call(this, this.max, -1) : __privateMethod(this, _nearestSelectableDate, nearestSelectableDate_fn).call(this, this.min, 1);
|
|
609
630
|
return html`<gds-button
|
|
610
631
|
id="back-to-valid-range-button"
|
|
611
632
|
rank="tertiary"
|
|
612
633
|
size="small"
|
|
613
634
|
@click=${(e) => {
|
|
614
635
|
e.stopPropagation();
|
|
615
|
-
__privateMethod(this, _focusDate, focusDate_fn).call(this,
|
|
636
|
+
__privateMethod(this, _focusDate, focusDate_fn).call(this, target);
|
|
616
637
|
}}
|
|
617
638
|
>
|
|
618
639
|
${isAfterMax ? msg("Last available date") : msg("First available date")}
|
|
@@ -639,20 +660,43 @@ normalizeDate_fn = function(d) {
|
|
|
639
660
|
_focusDate = new WeakSet();
|
|
640
661
|
focusDate_fn = function(d) {
|
|
641
662
|
const focusDate = __privateMethod(this, _normalizeDate, normalizeDate_fn).call(this, d);
|
|
642
|
-
this.
|
|
663
|
+
this._focusedMonth = focusDate.getMonth();
|
|
664
|
+
this._focusedYear = focusDate.getFullYear();
|
|
665
|
+
this.value = new Date(focusDate);
|
|
666
|
+
this.requestUpdate();
|
|
667
|
+
__privateMethod(this, _dispatchInputEvent, dispatchInputEvent_fn).call(this);
|
|
668
|
+
this._elCalendar.then((el) => {
|
|
669
|
+
el.focusedDate = focusDate;
|
|
670
|
+
el.updateComplete.then(() => el.focus());
|
|
671
|
+
});
|
|
643
672
|
};
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return false;
|
|
648
|
-
const today = __privateMethod(this, _normalizeDate, normalizeDate_fn).call(this, /* @__PURE__ */ new Date());
|
|
649
|
-
const isOutsideMinMax = (today < this.min || today > this.max) && !isSameDay(today, this.min) && !isSameDay(today, this.max);
|
|
673
|
+
_isDateSelectable = new WeakSet();
|
|
674
|
+
isDateSelectable_fn = function(date) {
|
|
675
|
+
const isOutsideMinMax = (date < this.min || date > this.max) && !isSameDay(date, this.min) && !isSameDay(date, this.max);
|
|
650
676
|
if (isOutsideMinMax)
|
|
651
677
|
return false;
|
|
652
|
-
const isWeekend =
|
|
678
|
+
const isWeekend = date.getDay() === 0 || date.getDay() === 6;
|
|
653
679
|
if (this.disabledWeekends && isWeekend)
|
|
654
680
|
return false;
|
|
655
|
-
return !this.disabledDates?.some((d) => isSameDay(d,
|
|
681
|
+
return !this.disabledDates?.some((d) => isSameDay(d, date));
|
|
682
|
+
};
|
|
683
|
+
_nearestSelectableDate = new WeakSet();
|
|
684
|
+
nearestSelectableDate_fn = function(from, direction) {
|
|
685
|
+
let candidate = new Date(from);
|
|
686
|
+
while (!__privateMethod(this, _isDateSelectable, isDateSelectable_fn).call(this, candidate)) {
|
|
687
|
+
const next = addDays(candidate, direction);
|
|
688
|
+
const passedBoundary = direction === 1 ? next > this.max : next < this.min;
|
|
689
|
+
if (passedBoundary)
|
|
690
|
+
return from;
|
|
691
|
+
candidate = next;
|
|
692
|
+
}
|
|
693
|
+
return candidate;
|
|
694
|
+
};
|
|
695
|
+
_shouldShowTodayButton = new WeakSet();
|
|
696
|
+
shouldShowTodayButton_fn = function() {
|
|
697
|
+
if (this.hideTodayButton)
|
|
698
|
+
return false;
|
|
699
|
+
return __privateMethod(this, _isDateSelectable, isDateSelectable_fn).call(this, __privateMethod(this, _normalizeDate, normalizeDate_fn).call(this, /* @__PURE__ */ new Date()));
|
|
656
700
|
};
|
|
657
701
|
_getSpinnerLabel = new WeakSet();
|
|
658
702
|
getSpinnerLabel_fn = function(name) {
|
|
@@ -768,7 +812,7 @@ isValueOutsideRange_get = function() {
|
|
|
768
812
|
};
|
|
769
813
|
Datepicker.styles = [tokens, formControlHostStyle, DatepickerStyles];
|
|
770
814
|
__decorateClass([
|
|
771
|
-
property({ converter: dateConverter })
|
|
815
|
+
property({ converter: dateConverter, hasChanged: dateHasChanged })
|
|
772
816
|
], Datepicker.prototype, "value", 1);
|
|
773
817
|
__decorateClass([
|
|
774
818
|
property({ converter: dateConverter })
|
|
@@ -250,6 +250,7 @@ export * from "./robot.js";
|
|
|
250
250
|
export * from "./rocket.js";
|
|
251
251
|
export * from "./run-shortcut.js";
|
|
252
252
|
export * from "./safari.js";
|
|
253
|
+
export * from "./satellite.js";
|
|
253
254
|
export * from "./school.js";
|
|
254
255
|
export * from "./scissors.js";
|
|
255
256
|
export * from "./search-menu.js";
|
|
@@ -250,6 +250,7 @@ export * from './robot.component';
|
|
|
250
250
|
export * from './rocket.component';
|
|
251
251
|
export * from './run-shortcut.component';
|
|
252
252
|
export * from './safari.component';
|
|
253
|
+
export * from './satellite.component';
|
|
253
254
|
export * from './school.component';
|
|
254
255
|
export * from './scissors.component';
|
|
255
256
|
export * from './search-menu.component';
|
|
@@ -250,6 +250,7 @@ export * from "./robot.component.js";
|
|
|
250
250
|
export * from "./rocket.component.js";
|
|
251
251
|
export * from "./run-shortcut.component.js";
|
|
252
252
|
export * from "./safari.component.js";
|
|
253
|
+
export * from "./satellite.component.js";
|
|
253
254
|
export * from "./school.component.js";
|
|
254
255
|
export * from "./scissors.component.js";
|
|
255
256
|
export * from "./search-menu.component.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GdsIcon } from '../icon';
|
|
2
|
+
/**
|
|
3
|
+
* @element gds-icon-satellite
|
|
4
|
+
*/
|
|
5
|
+
export declare class IconSatellite extends GdsIcon {
|
|
6
|
+
/** @private */
|
|
7
|
+
static _regularSVG: string;
|
|
8
|
+
/** @private */
|
|
9
|
+
static _solidSVG: string;
|
|
10
|
+
/** @private */
|
|
11
|
+
static _name: string;
|
|
12
|
+
/** @private */
|
|
13
|
+
static _width: number;
|
|
14
|
+
/** @private */
|
|
15
|
+
static _height: number;
|
|
16
|
+
/** @private */
|
|
17
|
+
static _viewBox: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass
|
|
3
|
+
} from "../../../chunks/chunk.CAV4X6PU.js";
|
|
4
|
+
import { gdsCustomElement } from "../../../scoping.js";
|
|
5
|
+
import { GdsIcon } from "../icon.js";
|
|
6
|
+
let IconSatellite = class extends GdsIcon {
|
|
7
|
+
};
|
|
8
|
+
/** @private */
|
|
9
|
+
IconSatellite._regularSVG = `<path d="M2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C14.2998 21.25 16.4036 20.4107 18.0217 19.0217L4.97828 5.97827C3.58929 7.59643 2.75 9.7002 2.75 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 12L13 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M21.25 12C21.25 6.89137 17.1086 2.75 12 2.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 12C18 8.68629 15.3137 6 12 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`;
|
|
10
|
+
/** @private */
|
|
11
|
+
IconSatellite._solidSVG = `<path d="M12 2C11.5858 2 11.25 2.33579 11.25 2.75C11.25 3.16421 11.5858 3.5 12 3.5C16.6944 3.5 20.5 7.30558 20.5 12C20.5 12.4142 20.8358 12.75 21.25 12.75C21.6642 12.75 22 12.4142 22 12C22 6.47715 17.5228 2 12 2Z" fill="currentColor"/><path d="M5.50861 5.44794C5.36096 5.30029 5.15843 5.22087 4.94977 5.22881C4.7411 5.23675 4.5452 5.33132 4.40919 5.48977C2.90789 7.23877 2 9.5143 2 12C2 17.5228 6.47715 22 12 22C14.4857 22 16.7612 21.0921 18.5102 19.5908C18.6687 19.4548 18.7632 19.2589 18.7712 19.0502C18.7791 18.8416 18.6997 18.639 18.552 18.4914L12.5607 12.5L13.5303 11.5303C13.8232 11.2374 13.8232 10.7626 13.5303 10.4697C13.2374 10.1768 12.7626 10.1768 12.4697 10.4697L11.5 11.4393L5.50861 5.44794Z" fill="currentColor"/><path d="M12 5.25C11.5858 5.25 11.25 5.58579 11.25 6C11.25 6.41421 11.5858 6.75 12 6.75C14.8995 6.75 17.25 9.10051 17.25 12C17.25 12.4142 17.5858 12.75 18 12.75C18.4142 12.75 18.75 12.4142 18.75 12C18.75 8.27208 15.7279 5.25 12 5.25Z" fill="currentColor"/>`;
|
|
12
|
+
/** @private */
|
|
13
|
+
IconSatellite._name = "satellite";
|
|
14
|
+
/** @private */
|
|
15
|
+
IconSatellite._width = 24;
|
|
16
|
+
/** @private */
|
|
17
|
+
IconSatellite._height = 24;
|
|
18
|
+
/** @private */
|
|
19
|
+
IconSatellite._viewBox = "0 0 24 24";
|
|
20
|
+
IconSatellite = __decorateClass([
|
|
21
|
+
gdsCustomElement("gds-icon-satellite")
|
|
22
|
+
], IconSatellite);
|
|
23
|
+
export {
|
|
24
|
+
IconSatellite
|
|
25
|
+
};
|
|
@@ -12,9 +12,16 @@ const style = css`
|
|
|
12
12
|
|
|
13
13
|
@layer link {
|
|
14
14
|
a {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
/*
|
|
16
|
+
* Intentionally not display: flex. A flex row only wraps onto a new
|
|
17
|
+
* flex line if the container wraps, but text wrapping inside a flex
|
|
18
|
+
* item happens within a single flex line. That caused lead/trail
|
|
19
|
+
* icons to center against the full height of multi-line wrapped text
|
|
20
|
+
* instead of following the specific line they're adjacent to.
|
|
21
|
+
* display: inline lets icons flow and wrap together with the text
|
|
22
|
+
* like any other inline content.
|
|
23
|
+
*/
|
|
24
|
+
display: inline;
|
|
18
25
|
text-decoration: none;
|
|
19
26
|
text-underline-offset: 0.2lh;
|
|
20
27
|
color: currentColor;
|
|
@@ -39,6 +46,19 @@ const style = css`
|
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
}
|
|
49
|
+
|
|
50
|
+
::slotted(*) {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
slot[name='lead']::slotted(*) {
|
|
56
|
+
margin-inline-end: 1ch;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
slot[name='trail']::slotted(*) {
|
|
60
|
+
margin-inline-start: 1ch;
|
|
61
|
+
}
|
|
42
62
|
}
|
|
43
63
|
`;
|
|
44
64
|
var link_styles_default = style;
|
|
@@ -27,7 +27,8 @@ function roundByDPR(value) {
|
|
|
27
27
|
return Math.round(value * dpr) / dpr;
|
|
28
28
|
}
|
|
29
29
|
function applyTriggerAriaAttributes(trigger, open, popupRole) {
|
|
30
|
-
trigger.
|
|
30
|
+
const ariaExpandedAttr = trigger.nodeName.startsWith("GDS-") ? "gds-aria-expanded" : "aria-expanded";
|
|
31
|
+
trigger.setAttribute(ariaExpandedAttr, String(open));
|
|
31
32
|
const focusableNodeNames = ["A", "BUTTON", "INPUT", "TEXTAREA"];
|
|
32
33
|
const isProbablyFocusable = trigger.nodeName.startsWith("GDS-") || focusableNodeNames.includes(trigger.nodeName);
|
|
33
34
|
if (!isProbablyFocusable) {
|
|
@@ -222,7 +223,7 @@ let GdsPopover = class extends GdsElement {
|
|
|
222
223
|
}
|
|
223
224
|
_handleOpenChange() {
|
|
224
225
|
this.updateComplete.then(() => {
|
|
225
|
-
this
|
|
226
|
+
__privateMethod(this, _setupTriggerAttributes, setupTriggerAttributes_fn).call(this);
|
|
226
227
|
if (this.open) {
|
|
227
228
|
!this.nonmodal ? this._elDialog?.showModal() : this._elDialog?.setAttribute("open", "true");
|
|
228
229
|
if (this.autofocus) {
|