@sebgroup/green-core 1.0.1 → 1.0.3
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/generated/locales/sv.d.ts +1 -0
- package/index.js +13 -8
- package/localization.js +1 -0
- package/package.json +1 -1
- package/transitional-styles.js +8 -3
package/index.js
CHANGED
|
@@ -9,9 +9,9 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
9
9
|
__defProp(target, key, result);
|
|
10
10
|
return result;
|
|
11
11
|
};
|
|
12
|
-
var __accessCheck = (obj, member,
|
|
12
|
+
var __accessCheck = (obj, member, msg3) => {
|
|
13
13
|
if (!member.has(obj))
|
|
14
|
-
throw TypeError("Cannot " +
|
|
14
|
+
throw TypeError("Cannot " + msg3);
|
|
15
15
|
};
|
|
16
16
|
var __privateGet = (obj, member, getter) => {
|
|
17
17
|
__accessCheck(obj, member, "read from private field");
|
|
@@ -38,7 +38,7 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
|
38
38
|
import { when as when2 } from "lit/directives/when.js";
|
|
39
39
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
40
40
|
import { createRef as createRef3, ref as ref3 } from "lit/directives/ref.js";
|
|
41
|
-
import { msg, str, updateWhenLocaleChanges } from "@lit/localize";
|
|
41
|
+
import { msg as msg2, str, updateWhenLocaleChanges } from "@lit/localize";
|
|
42
42
|
import "reflect-metadata";
|
|
43
43
|
|
|
44
44
|
// libs/core/src/utils/helpers/constrain-slots.ts
|
|
@@ -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 = "-0c50fd";
|
|
147
147
|
var elementLookupTable = /* @__PURE__ */ new Map();
|
|
148
148
|
var gdsCustomElement = (tagName) => {
|
|
149
149
|
if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
|
|
@@ -559,6 +559,7 @@ GdsListbox = __decorateClass([
|
|
|
559
559
|
// libs/core/src/primitives/popover/popover.ts
|
|
560
560
|
import { LitElement as LitElement3, html as html3, unsafeCSS as unsafeCSS3 } from "lit";
|
|
561
561
|
import { property as property3 } from "lit/decorators.js";
|
|
562
|
+
import { msg } from "@lit/localize";
|
|
562
563
|
import { createRef as createRef2, ref as ref2 } from "lit/directives/ref.js";
|
|
563
564
|
import { computePosition, autoUpdate, offset, flip } from "@floating-ui/dom";
|
|
564
565
|
|
|
@@ -804,7 +805,11 @@ var GdsPopover = class extends LitElement3 {
|
|
|
804
805
|
return html3`<dialog ${ref2(__privateGet(this, _dialogElementRef))}>
|
|
805
806
|
<header>
|
|
806
807
|
<h2>${this.label}</h2>
|
|
807
|
-
<button
|
|
808
|
+
<button
|
|
809
|
+
class="close"
|
|
810
|
+
@click=${__privateGet(this, _handleCloseButton)}
|
|
811
|
+
aria-label="${msg("Close")}"
|
|
812
|
+
>
|
|
808
813
|
<i></i>
|
|
809
814
|
</button>
|
|
810
815
|
</header>
|
|
@@ -1156,7 +1161,7 @@ var GdsDropdown = class extends GdsFormControlElement {
|
|
|
1156
1161
|
get displayValue() {
|
|
1157
1162
|
let displayValue;
|
|
1158
1163
|
if (Array.isArray(this.value)) {
|
|
1159
|
-
this.value.length > 2 ? displayValue =
|
|
1164
|
+
this.value.length > 2 ? displayValue = msg2(str`${this.value.length} selected`) : displayValue = this.value.reduce(
|
|
1160
1165
|
(acc, cur) => acc + this.options.find((v) => v.value === cur)?.innerHTML + ", ",
|
|
1161
1166
|
""
|
|
1162
1167
|
).slice(0, -2);
|
|
@@ -1201,8 +1206,8 @@ var GdsDropdown = class extends GdsFormControlElement {
|
|
|
1201
1206
|
this.searchable,
|
|
1202
1207
|
() => html`<input
|
|
1203
1208
|
type="text"
|
|
1204
|
-
aria-label="${
|
|
1205
|
-
placeholder="${
|
|
1209
|
+
aria-label="${msg2("Filter available options")}"
|
|
1210
|
+
placeholder="${msg2("Search")}"
|
|
1206
1211
|
${ref3(__privateGet(this, _searchInputRef))}
|
|
1207
1212
|
@keydown=${__privateGet(this, _handleSearchFieldKeyDown)}
|
|
1208
1213
|
@keyup=${__privateGet(this, _handleSearchFieldKeyUp)}
|
package/localization.js
CHANGED
package/package.json
CHANGED
package/transitional-styles.js
CHANGED
|
@@ -3605,7 +3605,7 @@ dialog {
|
|
|
3605
3605
|
visibility: hidden;
|
|
3606
3606
|
z-index: var(--z-index);
|
|
3607
3607
|
border-width: 0;
|
|
3608
|
-
overflow:
|
|
3608
|
+
overflow: hidden;
|
|
3609
3609
|
padding: 0;
|
|
3610
3610
|
right: 0;
|
|
3611
3611
|
}
|
|
@@ -5611,13 +5611,17 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner
|
|
|
5611
5611
|
}
|
|
5612
5612
|
|
|
5613
5613
|
input[type=text] {
|
|
5614
|
-
border-radius: 0;
|
|
5614
|
+
border-bottom-left-radius: 0;
|
|
5615
|
+
border-bottom-right-radius: 0;
|
|
5615
5616
|
font-size: 1rem;
|
|
5616
5617
|
line-height: 1;
|
|
5617
5618
|
margin: -1px;
|
|
5618
5619
|
min-height: auto;
|
|
5619
5620
|
padding: 0.75rem;
|
|
5620
5621
|
}
|
|
5622
|
+
input[type=text]:focus {
|
|
5623
|
+
outline-offset: -0.25rem;
|
|
5624
|
+
}
|
|
5621
5625
|
|
|
5622
5626
|
button {
|
|
5623
5627
|
background-color: transparent;
|
|
@@ -5664,6 +5668,7 @@ button {
|
|
|
5664
5668
|
max-width: 100%;
|
|
5665
5669
|
font-size: inherit;
|
|
5666
5670
|
font-weight: normal;
|
|
5671
|
+
line-height: 1.125;
|
|
5667
5672
|
margin-bottom: 0.5rem;
|
|
5668
5673
|
margin-top: 0.5rem;
|
|
5669
5674
|
width: 100%;
|
|
@@ -5792,7 +5797,7 @@ function register3() {
|
|
|
5792
5797
|
// libs/core/src/utils/helpers/custom-element-scoping.ts
|
|
5793
5798
|
import { html as litHtml } from "lit";
|
|
5794
5799
|
import { customElement } from "lit/decorators.js";
|
|
5795
|
-
var VER_SUFFIX = "-
|
|
5800
|
+
var VER_SUFFIX = "-0c50fd";
|
|
5796
5801
|
var elementLookupTable = /* @__PURE__ */ new Map();
|
|
5797
5802
|
var templateCache = /* @__PURE__ */ new WeakMap();
|
|
5798
5803
|
function applyElementScoping(strings, ...values) {
|