@sebgroup/green-core 1.4.6 → 1.5.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.
|
@@ -25,6 +25,10 @@ export declare class GdsContextMenu extends GdsElement {
|
|
|
25
25
|
* The label for the trigger button.
|
|
26
26
|
*/
|
|
27
27
|
buttonLabel: string;
|
|
28
|
+
/**
|
|
29
|
+
* The label for the trigger button.
|
|
30
|
+
*/
|
|
31
|
+
showLabel: boolean;
|
|
28
32
|
/**
|
|
29
33
|
* The label for the popover and menu. Should describe the context of the menu.
|
|
30
34
|
*/
|
|
@@ -58,6 +58,10 @@ export declare class GdsDatepicker extends GdsFormControlElement<Date> {
|
|
|
58
58
|
* is closed, the value will be undefined.
|
|
59
59
|
*/
|
|
60
60
|
getFocusedDate(): Promise<Date | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Get a string representation of the currently displayed value in the input field. The formatting will match the dateformat attribute.
|
|
63
|
+
*/
|
|
64
|
+
get displayValue(): string;
|
|
61
65
|
/**
|
|
62
66
|
* A reference to the calendar button element inside the shadow root.
|
|
63
67
|
* Inteded for use in integration tests.
|
|
@@ -74,6 +78,7 @@ export declare class GdsDatepicker extends GdsFormControlElement<Date> {
|
|
|
74
78
|
private _elCalendar;
|
|
75
79
|
private _elTrigger;
|
|
76
80
|
private _elSpinners;
|
|
81
|
+
private _elInput;
|
|
77
82
|
private _tStyles?;
|
|
78
83
|
connectedCallback(): void;
|
|
79
84
|
render(): any;
|
package/index.js
CHANGED
|
@@ -143,7 +143,7 @@ function watchMediaQuery(q) {
|
|
|
143
143
|
// libs/core/src/utils/helpers/custom-element-scoping.ts
|
|
144
144
|
import { html as litHtml } from "lit";
|
|
145
145
|
import { customElement } from "lit/decorators.js";
|
|
146
|
-
var VER_SUFFIX = "-
|
|
146
|
+
var VER_SUFFIX = "-eaa4d5";
|
|
147
147
|
var elementLookupTable = /* @__PURE__ */ new Map();
|
|
148
148
|
var gdsCustomElement = (tagName) => {
|
|
149
149
|
if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
|
|
@@ -877,10 +877,10 @@ var GdsPopover = class extends GdsElement {
|
|
|
877
877
|
// A function that removes the Floating UI auto positioning. This gets called when we switch to mobile view layout.
|
|
878
878
|
__privateAdd(this, _autoPositionCleanupFn, void 0);
|
|
879
879
|
__privateAdd(this, _isMobileViewport, false);
|
|
880
|
-
__privateAdd(this, _dispatchUiStateEvent, () => {
|
|
880
|
+
__privateAdd(this, _dispatchUiStateEvent, (reason) => {
|
|
881
881
|
this.dispatchEvent(
|
|
882
882
|
new CustomEvent("gds-ui-state", {
|
|
883
|
-
detail: { open: this.open },
|
|
883
|
+
detail: { open: this.open, reason },
|
|
884
884
|
bubbles: false,
|
|
885
885
|
composed: false
|
|
886
886
|
})
|
|
@@ -890,7 +890,7 @@ var GdsPopover = class extends GdsElement {
|
|
|
890
890
|
e.stopPropagation();
|
|
891
891
|
e.preventDefault();
|
|
892
892
|
this.open = false;
|
|
893
|
-
__privateGet(this, _dispatchUiStateEvent).call(this);
|
|
893
|
+
__privateGet(this, _dispatchUiStateEvent).call(this, "close");
|
|
894
894
|
setTimeout(() => this._trigger?.focus(), 250);
|
|
895
895
|
});
|
|
896
896
|
/**
|
|
@@ -900,11 +900,11 @@ var GdsPopover = class extends GdsElement {
|
|
|
900
900
|
if (e.key === "ArrowDown") {
|
|
901
901
|
e.preventDefault();
|
|
902
902
|
this.open = true;
|
|
903
|
-
__privateGet(this, _dispatchUiStateEvent).call(this);
|
|
903
|
+
__privateGet(this, _dispatchUiStateEvent).call(this, "show");
|
|
904
904
|
}
|
|
905
905
|
if (e.key === "Escape") {
|
|
906
906
|
this.open = false;
|
|
907
|
-
__privateGet(this, _dispatchUiStateEvent).call(this);
|
|
907
|
+
__privateGet(this, _dispatchUiStateEvent).call(this, "cancel");
|
|
908
908
|
}
|
|
909
909
|
});
|
|
910
910
|
/**
|
|
@@ -926,7 +926,7 @@ var GdsPopover = class extends GdsElement {
|
|
|
926
926
|
if (!isInDialog) {
|
|
927
927
|
e.stopPropagation();
|
|
928
928
|
this.open = false;
|
|
929
|
-
__privateGet(this, _dispatchUiStateEvent).call(this);
|
|
929
|
+
__privateGet(this, _dispatchUiStateEvent).call(this, "close");
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
});
|
|
@@ -949,7 +949,7 @@ var GdsPopover = class extends GdsElement {
|
|
|
949
949
|
this.addEventListener("keydown", (e) => {
|
|
950
950
|
if (e.key === "Escape") {
|
|
951
951
|
this.open = false;
|
|
952
|
-
__privateGet(this, _dispatchUiStateEvent).call(this);
|
|
952
|
+
__privateGet(this, _dispatchUiStateEvent).call(this, "cancel");
|
|
953
953
|
e.stopPropagation();
|
|
954
954
|
e.preventDefault();
|
|
955
955
|
}
|
|
@@ -1592,6 +1592,7 @@ GdsDropdown = __decorateClass([
|
|
|
1592
1592
|
], GdsDropdown);
|
|
1593
1593
|
|
|
1594
1594
|
// libs/core/src/components/context-menu/context-menu.ts
|
|
1595
|
+
import { nothing } from "lit";
|
|
1595
1596
|
import { msg as msg3 } from "@lit/localize";
|
|
1596
1597
|
import { classMap as classMap3 } from "lit-html/directives/class-map.js";
|
|
1597
1598
|
import { property as property6, queryAsync as queryAsync2, state as state6 } from "lit/decorators.js";
|
|
@@ -1643,6 +1644,7 @@ var GdsContextMenu = class extends GdsElement {
|
|
|
1643
1644
|
__privateAdd(this, _handleItemClick);
|
|
1644
1645
|
this.open = false;
|
|
1645
1646
|
this.buttonLabel = msg3("Open context menu");
|
|
1647
|
+
this.showLabel = false;
|
|
1646
1648
|
this.label = "";
|
|
1647
1649
|
this.placement = "bottom-start";
|
|
1648
1650
|
constrainSlots(this);
|
|
@@ -1662,14 +1664,15 @@ var GdsContextMenu = class extends GdsElement {
|
|
|
1662
1664
|
return html`${this._tStyles}
|
|
1663
1665
|
<button
|
|
1664
1666
|
id="trigger"
|
|
1665
|
-
class="
|
|
1666
|
-
aria-label
|
|
1667
|
+
class="icon border-0 small ${classMap3({ highlighted: this.open })}"
|
|
1668
|
+
aria-label=${this.buttonLabel ?? this.label}
|
|
1667
1669
|
aria-haspopup="menu"
|
|
1668
1670
|
aria-controls="menu"
|
|
1669
1671
|
aria-expanded=${this.open}
|
|
1670
1672
|
@click=${() => this.open = !this.open}
|
|
1671
1673
|
>
|
|
1672
1674
|
<slot name="trigger">
|
|
1675
|
+
${this.showLabel ? this.buttonLabel ?? this.label : nothing}
|
|
1673
1676
|
<i class="sg-icon sg-icon-ellipsis"></i>
|
|
1674
1677
|
</slot>
|
|
1675
1678
|
</button>
|
|
@@ -1682,7 +1685,7 @@ var GdsContextMenu = class extends GdsElement {
|
|
|
1682
1685
|
@gds-ui-state=${(e) => this.open = e.detail.open}
|
|
1683
1686
|
>
|
|
1684
1687
|
<gds-menu
|
|
1685
|
-
aria-label=${this.label}
|
|
1688
|
+
aria-label=${this.label ?? this.buttonLabel}
|
|
1686
1689
|
@gds-menu-item-click=${__privateMethod(this, _handleItemClick, handleItemClick_fn)}
|
|
1687
1690
|
>
|
|
1688
1691
|
<slot allow="gds-menu-item"></slot>
|
|
@@ -1702,8 +1705,15 @@ __decorateClass([
|
|
|
1702
1705
|
property6({ type: Boolean, reflect: true })
|
|
1703
1706
|
], GdsContextMenu.prototype, "open", 2);
|
|
1704
1707
|
__decorateClass([
|
|
1705
|
-
property6(
|
|
1708
|
+
property6({
|
|
1709
|
+
attribute: "button-label"
|
|
1710
|
+
})
|
|
1706
1711
|
], GdsContextMenu.prototype, "buttonLabel", 2);
|
|
1712
|
+
__decorateClass([
|
|
1713
|
+
property6({
|
|
1714
|
+
attribute: "show-label"
|
|
1715
|
+
})
|
|
1716
|
+
], GdsContextMenu.prototype, "showLabel", 2);
|
|
1707
1717
|
__decorateClass([
|
|
1708
1718
|
property6()
|
|
1709
1719
|
], GdsContextMenu.prototype, "label", 2);
|
|
@@ -1759,13 +1769,13 @@ GdsMenuItem = __decorateClass([
|
|
|
1759
1769
|
], GdsMenuItem);
|
|
1760
1770
|
|
|
1761
1771
|
// libs/core/src/components/datepicker/datepicker.ts
|
|
1762
|
-
import { property as property9, queryAll, queryAsync as queryAsync3, state as state10 } from "lit/decorators.js";
|
|
1772
|
+
import { property as property9, query as query3, queryAll, queryAsync as queryAsync3, state as state10 } from "lit/decorators.js";
|
|
1763
1773
|
import { join } from "lit/directives/join.js";
|
|
1764
1774
|
import { when as when4 } from "lit/directives/when.js";
|
|
1765
1775
|
import { until } from "lit/directives/until.js";
|
|
1766
1776
|
import { map } from "lit/directives/map.js";
|
|
1767
1777
|
import { repeat } from "lit/directives/repeat.js";
|
|
1768
|
-
import { nothing } from "lit";
|
|
1778
|
+
import { nothing as nothing2 } from "lit";
|
|
1769
1779
|
import { msg as msg5 } from "@lit/localize";
|
|
1770
1780
|
|
|
1771
1781
|
// libs/core/src/primitives/calendar/calendar.ts
|
|
@@ -1922,6 +1932,8 @@ var GdsCalendar = class extends GdsElement {
|
|
|
1922
1932
|
</table>`;
|
|
1923
1933
|
}
|
|
1924
1934
|
_valueChanged() {
|
|
1935
|
+
if (!this.value)
|
|
1936
|
+
return;
|
|
1925
1937
|
this.focusedDate = this.value;
|
|
1926
1938
|
}
|
|
1927
1939
|
};
|
|
@@ -2028,10 +2040,10 @@ GdsCalendar = __decorateClass([
|
|
|
2028
2040
|
], GdsCalendar);
|
|
2029
2041
|
|
|
2030
2042
|
// libs/core/src/components/datepicker/date-part-spinner.ts
|
|
2031
|
-
import { LitElement as
|
|
2043
|
+
import { LitElement as LitElement7 } from "lit";
|
|
2032
2044
|
import { property as property8, state as state9 } from "lit/decorators.js";
|
|
2033
2045
|
var _inputBuffer, _increment, _decrement, _handleClick, _handleFocus, _handleBlur, _handleWheel, _handleKeyDown2, _focusNextSpinner, focusNextSpinner_fn, _dispatchChangeEvent, dispatchChangeEvent_fn, _formatNumber, formatNumber_fn, _clamp, clamp_fn, _clearInputBuffer, clearInputBuffer_fn;
|
|
2034
|
-
var GdsDatePartSpinner = class extends
|
|
2046
|
+
var GdsDatePartSpinner = class extends LitElement7 {
|
|
2035
2047
|
constructor() {
|
|
2036
2048
|
super(...arguments);
|
|
2037
2049
|
__privateAdd(this, _focusNextSpinner);
|
|
@@ -2223,7 +2235,7 @@ var dateConverter = {
|
|
|
2223
2235
|
return value.toISOString();
|
|
2224
2236
|
}
|
|
2225
2237
|
};
|
|
2226
|
-
var _renderBackToValidRangeButton, renderBackToValidRangeButton_fn, _focusDate, focusDate_fn, _getSpinnerLabel, getSpinnerLabel_fn, _getMinSpinnerValue, getMinSpinnerValue_fn, _getMaxSpinnerValue, getMaxSpinnerValue_fn, _dispatchChangeEvent2, dispatchChangeEvent_fn2, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth,
|
|
2238
|
+
var _valueOnOpen, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn, _focusDate, focusDate_fn, _getSpinnerLabel, getSpinnerLabel_fn, _getMinSpinnerValue, getMinSpinnerValue_fn, _getMaxSpinnerValue, getMaxSpinnerValue_fn, _dispatchChangeEvent2, dispatchChangeEvent_fn2, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, _handlePopoverStateChange, _handleSpinnerKeydown, _parseDateFormat, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, _years, years_get, _isValueOutsideRange, isValueOutsideRange_get;
|
|
2227
2239
|
var GdsDatepicker = class extends GdsFormControlElement {
|
|
2228
2240
|
constructor() {
|
|
2229
2241
|
super(...arguments);
|
|
@@ -2250,8 +2262,25 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2250
2262
|
this._focusedMonth = (/* @__PURE__ */ new Date()).getMonth();
|
|
2251
2263
|
this._focusedYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2252
2264
|
this._dateFormatLayout = __privateMethod(this, _parseDateFormat, parseDateFormat_fn).call(this, "y-m-d");
|
|
2265
|
+
__privateAdd(this, _valueOnOpen, void 0);
|
|
2266
|
+
__privateAdd(this, _handleClipboardCopy, (e) => {
|
|
2267
|
+
e.preventDefault();
|
|
2268
|
+
e.clipboardData?.setData("text/plain", this.displayValue);
|
|
2269
|
+
});
|
|
2270
|
+
__privateAdd(this, _handleClipboardPaste, (e) => {
|
|
2271
|
+
e.preventDefault();
|
|
2272
|
+
const pasted = e.clipboardData?.getData("text/plain");
|
|
2273
|
+
if (!pasted)
|
|
2274
|
+
return;
|
|
2275
|
+
const pastedDate = new Date(pasted);
|
|
2276
|
+
if (pastedDate.toString() === "Invalid Date")
|
|
2277
|
+
return;
|
|
2278
|
+
this.value = pastedDate;
|
|
2279
|
+
__privateMethod(this, _dispatchChangeEvent2, dispatchChangeEvent_fn2).call(this);
|
|
2280
|
+
});
|
|
2253
2281
|
__privateAdd(this, _handleFieldClick, (e) => {
|
|
2254
2282
|
this._elSpinners[0].focus();
|
|
2283
|
+
window.getSelection()?.selectAllChildren(this._elSpinners[0]);
|
|
2255
2284
|
});
|
|
2256
2285
|
__privateAdd(this, _handleCalendarChange, (e) => {
|
|
2257
2286
|
e.stopPropagation();
|
|
@@ -2281,15 +2310,21 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2281
2310
|
this._focusedYear--;
|
|
2282
2311
|
}
|
|
2283
2312
|
});
|
|
2284
|
-
__privateAdd(this,
|
|
2313
|
+
__privateAdd(this, _handleCalendarFocusChange, async () => {
|
|
2285
2314
|
this._focusedMonth = (await this._elCalendar).focusedMonth;
|
|
2286
2315
|
this._focusedYear = (await this._elCalendar).focusedYear;
|
|
2316
|
+
this.value = (await this._elCalendar).focusedDate;
|
|
2287
2317
|
this.requestUpdate();
|
|
2318
|
+
__privateMethod(this, _dispatchChangeEvent2, dispatchChangeEvent_fn2).call(this);
|
|
2288
2319
|
});
|
|
2289
2320
|
__privateAdd(this, _handlePopoverStateChange, (e) => {
|
|
2290
2321
|
if (e.target !== e.currentTarget)
|
|
2291
2322
|
return;
|
|
2292
2323
|
this.open = e.detail.open;
|
|
2324
|
+
if (e.detail.reason === "cancel") {
|
|
2325
|
+
this.value = __privateGet(this, _valueOnOpen);
|
|
2326
|
+
__privateMethod(this, _dispatchChangeEvent2, dispatchChangeEvent_fn2).call(this);
|
|
2327
|
+
}
|
|
2293
2328
|
});
|
|
2294
2329
|
__privateAdd(this, _handleSpinnerKeydown, (e) => {
|
|
2295
2330
|
const index = Array.from(this._elSpinners).findIndex(
|
|
@@ -2342,6 +2377,12 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2342
2377
|
else
|
|
2343
2378
|
return void 0;
|
|
2344
2379
|
}
|
|
2380
|
+
/**
|
|
2381
|
+
* Get a string representation of the currently displayed value in the input field. The formatting will match the dateformat attribute.
|
|
2382
|
+
*/
|
|
2383
|
+
get displayValue() {
|
|
2384
|
+
return this._elInput.innerText;
|
|
2385
|
+
}
|
|
2345
2386
|
/**
|
|
2346
2387
|
* A reference to a date cell element (<td>) inside the shadow root of the calendar primitive.
|
|
2347
2388
|
* Inteded for use in integration tests.
|
|
@@ -2359,7 +2400,13 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2359
2400
|
|
|
2360
2401
|
<div class="form-info"><slot name="sub-label"></slot></div>
|
|
2361
2402
|
|
|
2362
|
-
<div
|
|
2403
|
+
<div
|
|
2404
|
+
class="field"
|
|
2405
|
+
id="trigger"
|
|
2406
|
+
@click=${__privateGet(this, _handleFieldClick)}
|
|
2407
|
+
@copy=${__privateGet(this, _handleClipboardCopy)}
|
|
2408
|
+
@paste=${__privateGet(this, _handleClipboardPaste)}
|
|
2409
|
+
>
|
|
2363
2410
|
<div class="input">
|
|
2364
2411
|
${join(
|
|
2365
2412
|
map(
|
|
@@ -2457,7 +2504,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2457
2504
|
<gds-calendar
|
|
2458
2505
|
id="calendar"
|
|
2459
2506
|
@change=${__privateGet(this, _handleCalendarChange)}
|
|
2460
|
-
@gds-date-focused=${__privateGet(this,
|
|
2507
|
+
@gds-date-focused=${__privateGet(this, _handleCalendarFocusChange)}
|
|
2461
2508
|
.focusedMonth=${this._focusedMonth}
|
|
2462
2509
|
.focusedYear=${this._focusedYear}
|
|
2463
2510
|
.value=${this.value}
|
|
@@ -2476,7 +2523,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2476
2523
|
>
|
|
2477
2524
|
${msg5("Clear")}
|
|
2478
2525
|
</button>
|
|
2479
|
-
${until(__privateMethod(this, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn).call(this),
|
|
2526
|
+
${until(__privateMethod(this, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn).call(this), nothing2)}
|
|
2480
2527
|
<button
|
|
2481
2528
|
class="tertiary today"
|
|
2482
2529
|
@click=${() => {
|
|
@@ -2507,10 +2554,13 @@ var GdsDatepicker = class extends GdsFormControlElement {
|
|
|
2507
2554
|
__privateSet(this, _spinnerState, { year, month, day });
|
|
2508
2555
|
}
|
|
2509
2556
|
_handleOpenChange() {
|
|
2510
|
-
if (this.open)
|
|
2557
|
+
if (this.open) {
|
|
2558
|
+
__privateSet(this, _valueOnOpen, this.value);
|
|
2511
2559
|
this._elCalendar.then((el) => el.focus());
|
|
2560
|
+
}
|
|
2512
2561
|
}
|
|
2513
2562
|
};
|
|
2563
|
+
_valueOnOpen = new WeakMap();
|
|
2514
2564
|
_renderBackToValidRangeButton = new WeakSet();
|
|
2515
2565
|
renderBackToValidRangeButton_fn = async function() {
|
|
2516
2566
|
const focusedDate = await this.getFocusedDate();
|
|
@@ -2528,13 +2578,13 @@ renderBackToValidRangeButton_fn = async function() {
|
|
|
2528
2578
|
() => html`<button class="tertiary back-to-range" @click=${buttonAction}>
|
|
2529
2579
|
${buttonTxt}
|
|
2530
2580
|
</button>`,
|
|
2531
|
-
() =>
|
|
2581
|
+
() => nothing2
|
|
2532
2582
|
)}`;
|
|
2533
2583
|
};
|
|
2534
2584
|
_focusDate = new WeakSet();
|
|
2535
2585
|
focusDate_fn = function(d) {
|
|
2536
2586
|
const firstValidDate = new Date(d);
|
|
2537
|
-
this._elCalendar.then((el) => el.focusedDate = firstValidDate).then(__privateGet(this,
|
|
2587
|
+
this._elCalendar.then((el) => el.focusedDate = firstValidDate).then(__privateGet(this, _handleCalendarFocusChange));
|
|
2538
2588
|
};
|
|
2539
2589
|
_getSpinnerLabel = new WeakSet();
|
|
2540
2590
|
getSpinnerLabel_fn = function(name) {
|
|
@@ -2571,13 +2621,15 @@ dispatchChangeEvent_fn2 = function() {
|
|
|
2571
2621
|
})
|
|
2572
2622
|
);
|
|
2573
2623
|
};
|
|
2624
|
+
_handleClipboardCopy = new WeakMap();
|
|
2625
|
+
_handleClipboardPaste = new WeakMap();
|
|
2574
2626
|
_handleFieldClick = new WeakMap();
|
|
2575
2627
|
_handleCalendarChange = new WeakMap();
|
|
2576
2628
|
_handleMonthChange = new WeakMap();
|
|
2577
2629
|
_handleYearChange = new WeakMap();
|
|
2578
2630
|
_handleIncrementFocusedMonth = new WeakMap();
|
|
2579
2631
|
_handleDecrementFocusedMonth = new WeakMap();
|
|
2580
|
-
|
|
2632
|
+
_handleCalendarFocusChange = new WeakMap();
|
|
2581
2633
|
_handlePopoverStateChange = new WeakMap();
|
|
2582
2634
|
_handleSpinnerKeydown = new WeakMap();
|
|
2583
2635
|
_parseDateFormat = new WeakSet();
|
|
@@ -2666,6 +2718,9 @@ __decorateClass([
|
|
|
2666
2718
|
__decorateClass([
|
|
2667
2719
|
queryAll(getScopedTagName("gds-date-part-spinner"))
|
|
2668
2720
|
], GdsDatepicker.prototype, "_elSpinners", 2);
|
|
2721
|
+
__decorateClass([
|
|
2722
|
+
query3(".input")
|
|
2723
|
+
], GdsDatepicker.prototype, "_elInput", 2);
|
|
2669
2724
|
__decorateClass([
|
|
2670
2725
|
state10()
|
|
2671
2726
|
], GdsDatepicker.prototype, "_tStyles", 2);
|
package/package.json
CHANGED
package/transitional-styles.js
CHANGED
|
@@ -102,6 +102,9 @@ var option_trans_styles_default = `/**
|
|
|
102
102
|
}
|
|
103
103
|
:host(:hover),
|
|
104
104
|
:host(:focus-visible) {
|
|
105
|
+
background-color: var(--gds-ref-pallet-base200);
|
|
106
|
+
}
|
|
107
|
+
:host(:active) {
|
|
105
108
|
background-color: var(--gds-ref-pallet-base300);
|
|
106
109
|
}
|
|
107
110
|
:host(:focus) {
|
|
@@ -1301,6 +1304,7 @@ button.icon,
|
|
|
1301
1304
|
height: 2.75rem;
|
|
1302
1305
|
width: 2.75rem;
|
|
1303
1306
|
min-width: auto;
|
|
1307
|
+
--color: var(--gds-ref-pallet-base800);
|
|
1304
1308
|
}
|
|
1305
1309
|
.form-group button.icon,
|
|
1306
1310
|
.form-group .button.icon {
|
|
@@ -1336,27 +1340,17 @@ button.icon text,
|
|
|
1336
1340
|
stroke: var(--gds-ref-pallet-base800);
|
|
1337
1341
|
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
1338
1342
|
}
|
|
1339
|
-
button.icon:hover,
|
|
1340
|
-
.button.icon:hover
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
button.icon:hover
|
|
1346
|
-
button.icon:
|
|
1347
|
-
button.icon:hover
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
button.icon:hover text,
|
|
1351
|
-
.button.icon:hover path,
|
|
1352
|
-
.button.icon:hover line,
|
|
1353
|
-
.button.icon:hover circle,
|
|
1354
|
-
.button.icon:hover rect,
|
|
1355
|
-
.button.icon:hover ellipse,
|
|
1356
|
-
.button.icon:hover polyline,
|
|
1357
|
-
.button.icon:hover text {
|
|
1358
|
-
fill: var(--gds-ref-pallet-base000);
|
|
1359
|
-
stroke: var(--gds-ref-pallet-base000);
|
|
1343
|
+
button.icon:hover, button.icon.highlighted,
|
|
1344
|
+
.button.icon:hover,
|
|
1345
|
+
.button.icon.highlighted {
|
|
1346
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
1347
|
+
border-color: transparent;
|
|
1348
|
+
}
|
|
1349
|
+
button.icon:active, button.icon.highlighted:hover,
|
|
1350
|
+
.button.icon:active,
|
|
1351
|
+
.button.icon.highlighted:hover {
|
|
1352
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
1353
|
+
border-color: transparent;
|
|
1360
1354
|
}
|
|
1361
1355
|
|
|
1362
1356
|
button.primary.danger,
|
|
@@ -2708,10 +2702,13 @@ i.sg-icon.sg-icon-ellipsis::before {
|
|
|
2708
2702
|
align-items: center;
|
|
2709
2703
|
display: inline-flex;
|
|
2710
2704
|
justify-content: center;
|
|
2711
|
-
|
|
2712
|
-
border
|
|
2713
|
-
|
|
2714
|
-
|
|
2705
|
+
background-color: transparent;
|
|
2706
|
+
border: 0.0625rem solid transparent;
|
|
2707
|
+
padding: 0.625rem;
|
|
2708
|
+
height: 2.75rem;
|
|
2709
|
+
width: 2.75rem;
|
|
2710
|
+
min-width: auto;
|
|
2711
|
+
--color: var(--gds-ref-pallet-base800);
|
|
2715
2712
|
}
|
|
2716
2713
|
button:focus:not(:focus-visible) {
|
|
2717
2714
|
box-shadow: none;
|
|
@@ -2744,47 +2741,48 @@ i.sg-icon.sg-icon-ellipsis::before {
|
|
|
2744
2741
|
font-size: 1.5rem;
|
|
2745
2742
|
line-height: 2rem;
|
|
2746
2743
|
}
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
color: rgb(255, 255, 255);
|
|
2750
|
-
--background: rgb(51, 51, 51);
|
|
2751
|
-
--color: rgb(255, 255, 255);
|
|
2752
|
-
border-color: rgb(51, 51, 51);
|
|
2753
|
-
}
|
|
2754
|
-
button[aria-selected], button:active, button.active, button.active:hover, button:active:hover {
|
|
2755
|
-
background-color: rgb(51, 51, 51);
|
|
2756
|
-
color: rgb(255, 255, 255);
|
|
2757
|
-
--background: rgb(51, 51, 51);
|
|
2758
|
-
--color: rgb(255, 255, 255);
|
|
2759
|
-
border-color: rgb(51, 51, 51);
|
|
2744
|
+
.form-group button {
|
|
2745
|
+
margin-top: -0.625rem;
|
|
2760
2746
|
}
|
|
2761
|
-
button
|
|
2762
|
-
|
|
2747
|
+
button.small {
|
|
2748
|
+
height: 2rem;
|
|
2749
|
+
width: 2rem;
|
|
2750
|
+
padding: 0.4375rem;
|
|
2751
|
+
line-height: 1.125rem;
|
|
2763
2752
|
}
|
|
2764
|
-
button
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
--background: rgb(51, 51, 51);
|
|
2768
|
-
--color: rgb(255, 255, 255);
|
|
2769
|
-
border-color: rgb(51, 51, 51) !important;
|
|
2753
|
+
button svg {
|
|
2754
|
+
height: 1rem;
|
|
2755
|
+
width: 1rem;
|
|
2770
2756
|
}
|
|
2771
|
-
button
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2757
|
+
button path,
|
|
2758
|
+
button line,
|
|
2759
|
+
button circle,
|
|
2760
|
+
button rect,
|
|
2761
|
+
button ellipse,
|
|
2762
|
+
button polyline,
|
|
2763
|
+
button text {
|
|
2764
|
+
fill: var(--gds-ref-pallet-base800);
|
|
2765
|
+
stroke: var(--gds-ref-pallet-base800);
|
|
2766
|
+
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
2775
2767
|
}
|
|
2776
|
-
button:
|
|
2777
|
-
color:
|
|
2768
|
+
button:hover, button.highlighted {
|
|
2769
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
2770
|
+
border-color: transparent;
|
|
2778
2771
|
}
|
|
2779
|
-
button:
|
|
2780
|
-
color:
|
|
2772
|
+
button:active, button.highlighted:hover {
|
|
2773
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
2774
|
+
border-color: transparent;
|
|
2781
2775
|
}
|
|
2782
2776
|
}
|
|
2783
2777
|
@layer _overrides {
|
|
2784
2778
|
button {
|
|
2785
2779
|
border-color: transparent;
|
|
2780
|
+
color: var(--gds-ref-pallet-base800);
|
|
2781
|
+
display: flex;
|
|
2782
|
+
gap: 0.5rem;
|
|
2786
2783
|
line-height: 0.75;
|
|
2787
2784
|
padding-inline: 0.4375rem;
|
|
2785
|
+
width: auto;
|
|
2788
2786
|
}
|
|
2789
2787
|
button.highlighted {
|
|
2790
2788
|
background-color: var(--gds-ref-pallet-base300);
|
|
@@ -2871,14 +2869,14 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
|
|
|
2871
2869
|
:host table tbody tr td.today {
|
|
2872
2870
|
background: transparent;
|
|
2873
2871
|
border-radius: 4px;
|
|
2874
|
-
color:
|
|
2875
|
-
|
|
2872
|
+
color: var(--gds-ref-pallet-base800);
|
|
2873
|
+
box-shadow: inset 0 0 0 2px var(--gds-ref-pallet-base800);
|
|
2876
2874
|
}
|
|
2877
2875
|
:host table tbody tr td:hover:not(.disabled) {
|
|
2878
|
-
background:
|
|
2876
|
+
background: var(--gds-ref-pallet-base300);
|
|
2879
2877
|
border: solid 1px var(--sg-bg-level-2);
|
|
2880
2878
|
border-radius: 4px;
|
|
2881
|
-
color:
|
|
2879
|
+
color: var(--gds-sys-color-font);
|
|
2882
2880
|
cursor: pointer;
|
|
2883
2881
|
}
|
|
2884
2882
|
:host table tbody tr td:focus-visible:not(.disabled) {
|
|
@@ -2899,17 +2897,16 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
|
|
|
2899
2897
|
outline-offset: 0.125rem;
|
|
2900
2898
|
}
|
|
2901
2899
|
:host table tbody tr td[aria-selected=true] {
|
|
2902
|
-
background:
|
|
2900
|
+
background: var(--gds-ref-pallet-base800);
|
|
2903
2901
|
border: solid 1px var(--sg-bg-level-2);
|
|
2904
2902
|
border-radius: 4px;
|
|
2905
2903
|
color: hsl(var(--sg-hsl-white));
|
|
2906
2904
|
}
|
|
2907
2905
|
:host table tbody tr td[tabindex="0"] {
|
|
2908
2906
|
border-radius: 4px;
|
|
2909
|
-
box-shadow: inset 0 0 0 2px hsl(var(--sg-hsl-blue-2));
|
|
2910
2907
|
}
|
|
2911
2908
|
:host table tbody tr td:hover:active:not(.disabled) {
|
|
2912
|
-
background:
|
|
2909
|
+
background: var(--gds-ref-pallet-base800);
|
|
2913
2910
|
border: solid 1px var(--sg-bg-level-2);
|
|
2914
2911
|
border-radius: 4px;
|
|
2915
2912
|
color: hsl(var(--sg-hsl-white));
|
|
@@ -3085,6 +3082,12 @@ i.sg-icon.sg-icon-ellipsis::before {
|
|
|
3085
3082
|
background: color-mix(in srgb, var(--gds-sys-color-blue) 50%, transparent);
|
|
3086
3083
|
outline: none;
|
|
3087
3084
|
}
|
|
3085
|
+
.field [role=spinbutton]::-moz-selection {
|
|
3086
|
+
background: transparent;
|
|
3087
|
+
}
|
|
3088
|
+
.field [role=spinbutton]::selection {
|
|
3089
|
+
background: transparent;
|
|
3090
|
+
}
|
|
3088
3091
|
.field button {
|
|
3089
3092
|
-webkit-appearance: none;
|
|
3090
3093
|
-moz-appearance: none;
|
|
@@ -3212,7 +3215,7 @@ function register6() {
|
|
|
3212
3215
|
// libs/core/src/utils/helpers/custom-element-scoping.ts
|
|
3213
3216
|
import { html as litHtml } from "lit";
|
|
3214
3217
|
import { customElement } from "lit/decorators.js";
|
|
3215
|
-
var VER_SUFFIX = "-
|
|
3218
|
+
var VER_SUFFIX = "-eaa4d5";
|
|
3216
3219
|
var elementLookupTable = /* @__PURE__ */ new Map();
|
|
3217
3220
|
var templateCache = /* @__PURE__ */ new WeakMap();
|
|
3218
3221
|
function applyElementScoping(strings, ...values) {
|