@warp-ds/elements 2.1.1-next.2 → 2.2.0-next.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/dist/index.d.ts +0 -1
- package/dist/index.js +113 -191
- package/dist/index.js.map +4 -4
- package/package.json +1 -4
- package/dist/packages/broadcast/component.d.ts +0 -36
- package/dist/packages/broadcast/index.d.ts +0 -2
- package/dist/packages/broadcast/index.js +0 -87
- package/dist/packages/broadcast/index.js.map +0 -7
package/dist/index.js
CHANGED
|
@@ -3989,15 +3989,15 @@ function getClientRects(element) {
|
|
|
3989
3989
|
return Array.from(element.getClientRects());
|
|
3990
3990
|
}
|
|
3991
3991
|
function getDocumentRect(element) {
|
|
3992
|
-
const
|
|
3992
|
+
const html29 = getDocumentElement(element);
|
|
3993
3993
|
const scroll = getNodeScroll(element);
|
|
3994
3994
|
const body = element.ownerDocument.body;
|
|
3995
|
-
const width = max(
|
|
3996
|
-
const height = max(
|
|
3995
|
+
const width = max(html29.scrollWidth, html29.clientWidth, body.scrollWidth, body.clientWidth);
|
|
3996
|
+
const height = max(html29.scrollHeight, html29.clientHeight, body.scrollHeight, body.clientHeight);
|
|
3997
3997
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
3998
3998
|
const y2 = -scroll.scrollTop;
|
|
3999
3999
|
if (getComputedStyle(body).direction === "rtl") {
|
|
4000
|
-
x += max(
|
|
4000
|
+
x += max(html29.clientWidth, body.clientWidth) - width;
|
|
4001
4001
|
}
|
|
4002
4002
|
return {
|
|
4003
4003
|
width,
|
|
@@ -4008,10 +4008,10 @@ function getDocumentRect(element) {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
function getViewportRect(element, strategy) {
|
|
4010
4010
|
const win = getWindow(element);
|
|
4011
|
-
const
|
|
4011
|
+
const html29 = getDocumentElement(element);
|
|
4012
4012
|
const visualViewport = win.visualViewport;
|
|
4013
|
-
let width =
|
|
4014
|
-
let height =
|
|
4013
|
+
let width = html29.clientWidth;
|
|
4014
|
+
let height = html29.clientHeight;
|
|
4015
4015
|
let x = 0;
|
|
4016
4016
|
let y2 = 0;
|
|
4017
4017
|
if (visualViewport) {
|
|
@@ -4953,89 +4953,9 @@ if (!customElements.get("w-breadcrumbs")) {
|
|
|
4953
4953
|
customElements.define("w-breadcrumbs", WarpBreadcrumbs);
|
|
4954
4954
|
}
|
|
4955
4955
|
|
|
4956
|
-
// packages/
|
|
4956
|
+
// packages/button/index.js
|
|
4957
4957
|
import { html as html13 } from "lit";
|
|
4958
4958
|
import WarpElement7 from "@warp-ds/elements-core";
|
|
4959
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
4960
|
-
|
|
4961
|
-
// packages/utils/window-exists.js
|
|
4962
|
-
var windowExists = typeof window !== "undefined";
|
|
4963
|
-
|
|
4964
|
-
// packages/broadcast/component.js
|
|
4965
|
-
var WarpBroadcast = class extends WarpElement7 {
|
|
4966
|
-
constructor() {
|
|
4967
|
-
super();
|
|
4968
|
-
this._messages = [];
|
|
4969
|
-
this.interval = 3e4;
|
|
4970
|
-
this._hiddenMessageIds = [];
|
|
4971
|
-
this.url = windowExists ? window.location.href : "";
|
|
4972
|
-
}
|
|
4973
|
-
async connectedCallback() {
|
|
4974
|
-
super.connectedCallback();
|
|
4975
|
-
if (!this.api) {
|
|
4976
|
-
console.error('Broadcast "api" attribute invalid or undefined');
|
|
4977
|
-
return;
|
|
4978
|
-
}
|
|
4979
|
-
if (windowExists) {
|
|
4980
|
-
await this._fetchMessage();
|
|
4981
|
-
setInterval(() => this._fetchMessage(), this.interval);
|
|
4982
|
-
}
|
|
4983
|
-
}
|
|
4984
|
-
async _fetchMessage() {
|
|
4985
|
-
const url = `${this.api}?path=${this.url}`;
|
|
4986
|
-
try {
|
|
4987
|
-
const res = await (await fetch(url)).json();
|
|
4988
|
-
this._messages = res.length ? res : [];
|
|
4989
|
-
} catch (err) {
|
|
4990
|
-
console.error(`failed to fetch broadcasts from given url (${url})`, err);
|
|
4991
|
-
}
|
|
4992
|
-
}
|
|
4993
|
-
async _del(id) {
|
|
4994
|
-
const el = this.renderRoot.querySelector(`#broadcast-${id}`);
|
|
4995
|
-
await el.collapse();
|
|
4996
|
-
this._hiddenMessageIds = [.../* @__PURE__ */ new Set([...this._hiddenMessageIds, id])];
|
|
4997
|
-
}
|
|
4998
|
-
render() {
|
|
4999
|
-
const messages79 = this._messages.filter((item) => !this._hiddenMessageIds.includes(item.id));
|
|
5000
|
-
return html13`
|
|
5001
|
-
<aside class=${`${messages79.length === 0 ? "hidden" : "mb-16"}`}>
|
|
5002
|
-
${repeat(
|
|
5003
|
-
messages79,
|
|
5004
|
-
({ id }) => `broadcast-${id}`,
|
|
5005
|
-
({ id, message }) => html13`<w-toast id="broadcast-${id}" type="warning" text="${message}" canclose @close=${() => this._del(id)}> </w-toast>`
|
|
5006
|
-
)}
|
|
5007
|
-
</aside>
|
|
5008
|
-
`;
|
|
5009
|
-
}
|
|
5010
|
-
};
|
|
5011
|
-
__publicField(WarpBroadcast, "properties", {
|
|
5012
|
-
_messages: {
|
|
5013
|
-
state: true,
|
|
5014
|
-
hasChanged(newVal, oldVal) {
|
|
5015
|
-
if (!oldVal || oldVal.length === 0) return true;
|
|
5016
|
-
const newIds = newVal.map(({ id }) => id).sort();
|
|
5017
|
-
const oldIds = oldVal.map(({ id }) => id).sort();
|
|
5018
|
-
return JSON.stringify(newIds) !== JSON.stringify(oldIds);
|
|
5019
|
-
}
|
|
5020
|
-
},
|
|
5021
|
-
_hiddenMessageIds: {
|
|
5022
|
-
state: true,
|
|
5023
|
-
type: Array
|
|
5024
|
-
},
|
|
5025
|
-
interval: { type: Number, attribute: true, reflect: true },
|
|
5026
|
-
url: { type: String, attribute: true, reflect: true },
|
|
5027
|
-
api: { type: String, attribute: true, reflect: true }
|
|
5028
|
-
});
|
|
5029
|
-
__publicField(WarpBroadcast, "styles", [WarpElement7.styles]);
|
|
5030
|
-
|
|
5031
|
-
// packages/broadcast/index.js
|
|
5032
|
-
if (!customElements.get("w-broadcast")) {
|
|
5033
|
-
customElements.define("w-broadcast", WarpBroadcast);
|
|
5034
|
-
}
|
|
5035
|
-
|
|
5036
|
-
// packages/button/index.js
|
|
5037
|
-
import { html as html14 } from "lit";
|
|
5038
|
-
import WarpElement8 from "@warp-ds/elements-core";
|
|
5039
4959
|
|
|
5040
4960
|
// packages/button/locales/da/messages.mjs
|
|
5041
4961
|
var messages21 = JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');
|
|
@@ -5054,7 +4974,7 @@ var messages30 = JSON.parse('{"button.aria.loading":["Laddar ..."]}');
|
|
|
5054
4974
|
|
|
5055
4975
|
// packages/button/index.js
|
|
5056
4976
|
var buttonTypes2 = ["primary", "secondary", "negative", "utility", "pill", "link"];
|
|
5057
|
-
var WarpButton = class extends kebabCaseAttributes(
|
|
4977
|
+
var WarpButton = class extends kebabCaseAttributes(WarpElement7) {
|
|
5058
4978
|
constructor() {
|
|
5059
4979
|
super();
|
|
5060
4980
|
activateI18n7(messages27, messages29, messages28, messages21, messages30);
|
|
@@ -5139,19 +5059,19 @@ ${buttonTypes2.join(", ")}.`);
|
|
|
5139
5059
|
]);
|
|
5140
5060
|
}
|
|
5141
5061
|
render() {
|
|
5142
|
-
return
|
|
5062
|
+
return html13` ${this.href ? html13`<a
|
|
5143
5063
|
href=${this.href}
|
|
5144
5064
|
target=${this.target}
|
|
5145
5065
|
rel=${this.target === "_blank" ? this.rel || "noopener" : void 0}
|
|
5146
5066
|
class=${this._classes}>
|
|
5147
5067
|
<slot></slot>
|
|
5148
|
-
</a>` :
|
|
5068
|
+
</a>` : html13`<button type=${this.type || "button"} class=${this._classes}>
|
|
5149
5069
|
<slot></slot>
|
|
5150
5070
|
</button>`}
|
|
5151
|
-
${this.loading ?
|
|
5071
|
+
${this.loading ? html13`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>` : null}`;
|
|
5152
5072
|
}
|
|
5153
5073
|
};
|
|
5154
|
-
__publicField(WarpButton, "shadowRootOptions", __spreadProps(__spreadValues({},
|
|
5074
|
+
__publicField(WarpButton, "shadowRootOptions", __spreadProps(__spreadValues({}, WarpElement7.shadowRootOptions), {
|
|
5155
5075
|
delegatesFocus: true
|
|
5156
5076
|
}));
|
|
5157
5077
|
__publicField(WarpButton, "properties", {
|
|
@@ -5167,14 +5087,14 @@ __publicField(WarpButton, "properties", {
|
|
|
5167
5087
|
fullWidth: { type: Boolean, reflect: true },
|
|
5168
5088
|
buttonClass: { type: String, reflect: true }
|
|
5169
5089
|
});
|
|
5170
|
-
__publicField(WarpButton, "styles", [
|
|
5090
|
+
__publicField(WarpButton, "styles", [WarpElement7.styles]);
|
|
5171
5091
|
if (!customElements.get("w-button")) {
|
|
5172
5092
|
customElements.define("w-button", WarpButton);
|
|
5173
5093
|
}
|
|
5174
5094
|
|
|
5175
5095
|
// packages/card/index.js
|
|
5176
|
-
import { html as
|
|
5177
|
-
import
|
|
5096
|
+
import { html as html14, css as css4 } from "lit";
|
|
5097
|
+
import WarpElement8 from "@warp-ds/elements-core";
|
|
5178
5098
|
import { ifDefined as ifDefined3 } from "lit/directives/if-defined.js";
|
|
5179
5099
|
|
|
5180
5100
|
// packages/card/locales/da/messages.mjs
|
|
@@ -5197,7 +5117,7 @@ var keys = {
|
|
|
5197
5117
|
ENTER: "Enter",
|
|
5198
5118
|
SPACE: " "
|
|
5199
5119
|
};
|
|
5200
|
-
var WarpCard = class extends
|
|
5120
|
+
var WarpCard = class extends WarpElement8 {
|
|
5201
5121
|
constructor() {
|
|
5202
5122
|
super();
|
|
5203
5123
|
activateI18n7(messages37, messages39, messages38, messages31, messages40);
|
|
@@ -5222,8 +5142,8 @@ var WarpCard = class extends WarpElement9 {
|
|
|
5222
5142
|
return r([card.outline, this.selected ? card.outlineSelected : card.outlineUnselected]);
|
|
5223
5143
|
}
|
|
5224
5144
|
get _interactiveElement() {
|
|
5225
|
-
const renderButton = () =>
|
|
5226
|
-
const renderSpan = () =>
|
|
5145
|
+
const renderButton = () => html14`<button class="${card.a11y}" aria-pressed="${this.selected}" tabindex="-1">${this.buttonText}</button>`;
|
|
5146
|
+
const renderSpan = () => html14`<span role="checkbox" aria-checked="true" aria-disabled="true"></span>`;
|
|
5227
5147
|
return this.clickable ? renderButton() : this.selected ? renderSpan() : "";
|
|
5228
5148
|
}
|
|
5229
5149
|
keypressed(e) {
|
|
@@ -5234,9 +5154,9 @@ var WarpCard = class extends WarpElement9 {
|
|
|
5234
5154
|
}
|
|
5235
5155
|
}
|
|
5236
5156
|
render() {
|
|
5237
|
-
return
|
|
5157
|
+
return html14`
|
|
5238
5158
|
<div tabindex=${ifDefined3(this.clickable ? "0" : void 0)} class="${this._containerClasses}" @keydown=${this.keypressed}>
|
|
5239
|
-
${this._interactiveElement} ${this.flat ? "" :
|
|
5159
|
+
${this._interactiveElement} ${this.flat ? "" : html14`<div class="${this._outlineClasses}"></div>`}
|
|
5240
5160
|
<slot></slot>
|
|
5241
5161
|
</div>
|
|
5242
5162
|
`;
|
|
@@ -5248,7 +5168,7 @@ __publicField(WarpCard, "properties", {
|
|
|
5248
5168
|
clickable: { type: Boolean }
|
|
5249
5169
|
});
|
|
5250
5170
|
__publicField(WarpCard, "styles", [
|
|
5251
|
-
|
|
5171
|
+
WarpElement8.styles,
|
|
5252
5172
|
css4`
|
|
5253
5173
|
a::after {
|
|
5254
5174
|
content: '';
|
|
@@ -5268,13 +5188,13 @@ if (!customElements.get("w-card")) {
|
|
|
5268
5188
|
}
|
|
5269
5189
|
|
|
5270
5190
|
// packages/expandable/index.js
|
|
5271
|
-
import { css as css5, html as
|
|
5272
|
-
import
|
|
5191
|
+
import { css as css5, html as html17 } from "lit";
|
|
5192
|
+
import WarpElement9 from "@warp-ds/elements-core";
|
|
5273
5193
|
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
5274
5194
|
|
|
5275
5195
|
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-_hyhbgchrkasknlbocfng7geeci/node_modules/@warp-ds/icons/dist/elements/chevron-down-16.js
|
|
5276
5196
|
import { LitElement as LitElement7 } from "lit";
|
|
5277
|
-
import { unsafeStatic as unsafeStatic7, html as
|
|
5197
|
+
import { unsafeStatic as unsafeStatic7, html as html15 } from "lit/static-html.js";
|
|
5278
5198
|
var messages41 = JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}');
|
|
5279
5199
|
var messages210 = JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}');
|
|
5280
5200
|
var messages310 = JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}');
|
|
@@ -5359,7 +5279,7 @@ activateI18n8(messages210, messages41, messages310, messages47, messages57);
|
|
|
5359
5279
|
var IconChevronDown16 = class extends LitElement7 {
|
|
5360
5280
|
render() {
|
|
5361
5281
|
const title = i18n.t({ message: `Downward arrow`, id: "icon.title.chevron-down", comment: "Title for chevron-down icon" });
|
|
5362
|
-
return
|
|
5282
|
+
return html15`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${unsafeStatic7(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`;
|
|
5363
5283
|
}
|
|
5364
5284
|
};
|
|
5365
5285
|
if (!customElements.get("w-icon-chevron-down-16")) {
|
|
@@ -5368,7 +5288,7 @@ if (!customElements.get("w-icon-chevron-down-16")) {
|
|
|
5368
5288
|
|
|
5369
5289
|
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-_hyhbgchrkasknlbocfng7geeci/node_modules/@warp-ds/icons/dist/elements/chevron-up-16.js
|
|
5370
5290
|
import { LitElement as LitElement8 } from "lit";
|
|
5371
|
-
import { unsafeStatic as unsafeStatic8, html as
|
|
5291
|
+
import { unsafeStatic as unsafeStatic8, html as html16 } from "lit/static-html.js";
|
|
5372
5292
|
var messages48 = JSON.parse('{"icon.title.chevron-up":["Oppoverpil"]}');
|
|
5373
5293
|
var messages211 = JSON.parse('{"icon.title.chevron-up":["Upward arrow"]}');
|
|
5374
5294
|
var messages311 = JSON.parse('{"icon.title.chevron-up":["Nuoli yl\xF6sp\xE4in"]}');
|
|
@@ -5453,7 +5373,7 @@ activateI18n9(messages211, messages48, messages311, messages49, messages58);
|
|
|
5453
5373
|
var IconChevronUp16 = class extends LitElement8 {
|
|
5454
5374
|
render() {
|
|
5455
5375
|
const title = i18n.t({ message: `Upward arrow`, id: "icon.title.chevron-up", comment: "Title for chevron-up icon" });
|
|
5456
|
-
return
|
|
5376
|
+
return html16`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-up-16-part">${unsafeStatic8(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.5 11 8 5.5l5.5 5.5"></path></svg>`;
|
|
5457
5377
|
}
|
|
5458
5378
|
};
|
|
5459
5379
|
if (!customElements.get("w-icon-chevron-up-16")) {
|
|
@@ -5462,7 +5382,7 @@ if (!customElements.get("w-icon-chevron-up-16")) {
|
|
|
5462
5382
|
|
|
5463
5383
|
// packages/expandable/index.js
|
|
5464
5384
|
var _WarpExpandable_instances, wrapperClasses_get, buttonClasses_get, chevronClasses_get, chevronIcon_get, contentClasses_get, expansionClasses_get;
|
|
5465
|
-
var WarpExpandable = class extends kebabCaseAttributes(
|
|
5385
|
+
var WarpExpandable = class extends kebabCaseAttributes(WarpElement9) {
|
|
5466
5386
|
constructor() {
|
|
5467
5387
|
super();
|
|
5468
5388
|
__privateAdd(this, _WarpExpandable_instances);
|
|
@@ -5485,25 +5405,25 @@ var WarpExpandable = class extends kebabCaseAttributes(WarpElement10) {
|
|
|
5485
5405
|
this._hasTitle = !!this.title || this.renderRoot.querySelector("slot[name='title']").assignedNodes().length > 0;
|
|
5486
5406
|
}
|
|
5487
5407
|
get _expandableSlot() {
|
|
5488
|
-
return
|
|
5408
|
+
return html17`<div class="${__privateGet(this, _WarpExpandable_instances, contentClasses_get)}">
|
|
5489
5409
|
<slot></slot>
|
|
5490
5410
|
</div>`;
|
|
5491
5411
|
}
|
|
5492
5412
|
render() {
|
|
5493
|
-
return
|
|
5494
|
-
${this._hasTitle ?
|
|
5413
|
+
return html17` <div class="${__privateGet(this, _WarpExpandable_instances, wrapperClasses_get)}">
|
|
5414
|
+
${this._hasTitle ? html17`<w-unstyled-heading level=${this.headingLevel}>
|
|
5495
5415
|
<button
|
|
5496
5416
|
type="button"
|
|
5497
5417
|
aria-expanded="${this.expanded}"
|
|
5498
5418
|
class="${__privateGet(this, _WarpExpandable_instances, buttonClasses_get)}"
|
|
5499
5419
|
@click=${() => this.expanded = !this.expanded}>
|
|
5500
5420
|
<div class="${expandable.title}">
|
|
5501
|
-
${this.title ?
|
|
5502
|
-
${this.noChevron ? "" :
|
|
5421
|
+
${this.title ? html17`<span class="${expandable.titleType}">${this.title}</span>` : html17`<slot name="title"></slot>`}
|
|
5422
|
+
${this.noChevron ? "" : html17`<div class="${__privateGet(this, _WarpExpandable_instances, chevronClasses_get)}">${__privateGet(this, _WarpExpandable_instances, chevronIcon_get)}</div>`}
|
|
5503
5423
|
</div>
|
|
5504
5424
|
</button>
|
|
5505
5425
|
</w-unstyled-heading>` : ""}
|
|
5506
|
-
${this.animated ?
|
|
5426
|
+
${this.animated ? html17`<w-expand-transition ?show=${this.expanded}> ${this._expandableSlot} </w-expand-transition>` : html17`<div class="${__privateGet(this, _WarpExpandable_instances, expansionClasses_get)}" aria-hidden=${ifDefined4(!this.expanded ? true : void 0)}>
|
|
5507
5427
|
${this._expandableSlot}
|
|
5508
5428
|
</div>`}
|
|
5509
5429
|
</div>`;
|
|
@@ -5528,7 +5448,7 @@ chevronIcon_get = function() {
|
|
|
5528
5448
|
expandable.elementsChevronDownTransform,
|
|
5529
5449
|
this.expanded && !this._showChevronUp && expandable.elementsChevronExpand
|
|
5530
5450
|
]);
|
|
5531
|
-
return this._showChevronUp ?
|
|
5451
|
+
return this._showChevronUp ? html17`<w-icon-chevron-up-16 class="${upClasses}"></w-icon-chevron-up-16>` : html17`<w-icon-chevron-down-16 class="${downClasses}"></w-icon-chevron-down-16>`;
|
|
5532
5452
|
};
|
|
5533
5453
|
contentClasses_get = function() {
|
|
5534
5454
|
return r(this.contentClass, [this.box && box.base, this._hasTitle && this.box && expandable.contentWithTitle]);
|
|
@@ -5554,7 +5474,7 @@ __publicField(WarpExpandable, "properties", {
|
|
|
5554
5474
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
5555
5475
|
// https://stackoverflow.com/a/61631668
|
|
5556
5476
|
__publicField(WarpExpandable, "styles", [
|
|
5557
|
-
|
|
5477
|
+
WarpElement9.styles,
|
|
5558
5478
|
css5`
|
|
5559
5479
|
:host {
|
|
5560
5480
|
display: block;
|
|
@@ -5569,8 +5489,8 @@ if (!customElements.get("w-expandable")) {
|
|
|
5569
5489
|
}
|
|
5570
5490
|
|
|
5571
5491
|
// packages/modal/modal-footer.js
|
|
5572
|
-
import { html as
|
|
5573
|
-
import
|
|
5492
|
+
import { html as html18 } from "lit";
|
|
5493
|
+
import WarpElement10 from "@warp-ds/elements-core";
|
|
5574
5494
|
|
|
5575
5495
|
// packages/modal/util.js
|
|
5576
5496
|
var CanCloseMixin = (superClass) => class extends superClass {
|
|
@@ -5595,19 +5515,19 @@ var ProvidesCanCloseToSlotsMixin = (superClass) => class extends superClass {
|
|
|
5595
5515
|
};
|
|
5596
5516
|
|
|
5597
5517
|
// packages/modal/modal-footer.js
|
|
5598
|
-
var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(
|
|
5518
|
+
var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(WarpElement10)) {
|
|
5599
5519
|
render() {
|
|
5600
|
-
return
|
|
5520
|
+
return html18`
|
|
5601
5521
|
<div class="${modalElement.footer}">
|
|
5602
5522
|
<slot @slotchange="${this.handleSlotChange}"></slot>
|
|
5603
5523
|
</div>
|
|
5604
5524
|
`;
|
|
5605
5525
|
}
|
|
5606
5526
|
};
|
|
5607
|
-
__publicField(ModalFooter, "styles", [
|
|
5527
|
+
__publicField(ModalFooter, "styles", [WarpElement10.styles]);
|
|
5608
5528
|
|
|
5609
5529
|
// packages/modal/modal-header.js
|
|
5610
|
-
import { html as
|
|
5530
|
+
import { html as html20, nothing as nothing3 } from "lit";
|
|
5611
5531
|
|
|
5612
5532
|
// node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/utility.js
|
|
5613
5533
|
var computeDeltas = (first, last) => ({
|
|
@@ -5626,8 +5546,8 @@ var animationDefaults = { easing: "ease", duration: 300 };
|
|
|
5626
5546
|
|
|
5627
5547
|
// node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/reduce-motion.js
|
|
5628
5548
|
var reduceMotion = false;
|
|
5629
|
-
var
|
|
5630
|
-
if (
|
|
5549
|
+
var windowExists = typeof window !== "undefined";
|
|
5550
|
+
if (windowExists) {
|
|
5631
5551
|
const query = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
5632
5552
|
const callback = ({ matches }) => reduceMotion = matches;
|
|
5633
5553
|
if (query.addEventListener) query.addEventListener("change", callback);
|
|
@@ -5683,7 +5603,7 @@ var Move = class {
|
|
|
5683
5603
|
|
|
5684
5604
|
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-_hyhbgchrkasknlbocfng7geeci/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
|
|
5685
5605
|
import { LitElement as LitElement9 } from "lit";
|
|
5686
|
-
import { unsafeStatic as unsafeStatic9, html as
|
|
5606
|
+
import { unsafeStatic as unsafeStatic9, html as html19 } from "lit/static-html.js";
|
|
5687
5607
|
var messages50 = JSON.parse('{"icon.title.arrow-left":["Pil som peker mot venstre"]}');
|
|
5688
5608
|
var messages212 = JSON.parse('{"icon.title.arrow-left":["Leftward-pointing arrow"]}');
|
|
5689
5609
|
var messages312 = JSON.parse('{"icon.title.arrow-left":["Vasemmalle osoittava nuoli"]}');
|
|
@@ -5768,7 +5688,7 @@ activateI18n10(messages212, messages50, messages312, messages410, messages59);
|
|
|
5768
5688
|
var IconArrowLeft16 = class extends LitElement9 {
|
|
5769
5689
|
render() {
|
|
5770
5690
|
const title = i18n.t({ message: `Leftward-pointing arrow`, id: "icon.title.arrow-left", comment: "Title for table arrow left icon" });
|
|
5771
|
-
return
|
|
5691
|
+
return html19`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-arrow-left-16-part">${unsafeStatic9(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M5.222 8h6.667"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.444 11.75 4.111 8l3.333-3.75"></path></svg>`;
|
|
5772
5692
|
}
|
|
5773
5693
|
};
|
|
5774
5694
|
if (!customElements.get("w-icon-arrow-left-16")) {
|
|
@@ -5776,7 +5696,7 @@ if (!customElements.get("w-icon-arrow-left-16")) {
|
|
|
5776
5696
|
}
|
|
5777
5697
|
|
|
5778
5698
|
// packages/modal/modal-header.js
|
|
5779
|
-
import
|
|
5699
|
+
import WarpElement11 from "@warp-ds/elements-core";
|
|
5780
5700
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5781
5701
|
|
|
5782
5702
|
// packages/modal/locales/da/messages.mjs
|
|
@@ -5796,7 +5716,7 @@ var messages63 = JSON.parse('{"modal.aria.back":["Tillbaka"],"modal.aria.close":
|
|
|
5796
5716
|
|
|
5797
5717
|
// packages/modal/modal-header.js
|
|
5798
5718
|
var NO_CLOSE_BUTTON = "no-close";
|
|
5799
|
-
var ModalHeader = class extends CanCloseMixin(
|
|
5719
|
+
var ModalHeader = class extends CanCloseMixin(WarpElement11) {
|
|
5800
5720
|
constructor() {
|
|
5801
5721
|
super();
|
|
5802
5722
|
__publicField(this, "titleEl", createRef());
|
|
@@ -5804,7 +5724,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement12) {
|
|
|
5804
5724
|
this._hasTopContent = false;
|
|
5805
5725
|
}
|
|
5806
5726
|
render() {
|
|
5807
|
-
return
|
|
5727
|
+
return html20`
|
|
5808
5728
|
<div class="${modalElement.header}">
|
|
5809
5729
|
<slot name="top" @slotchange=${this.handleTopSlotChange}></slot>
|
|
5810
5730
|
<div class="${this._hasTopContent ? "" : modalElement.headerTitleBar}">
|
|
@@ -5831,7 +5751,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement12) {
|
|
|
5831
5751
|
].join(" ");
|
|
5832
5752
|
}
|
|
5833
5753
|
get backButton() {
|
|
5834
|
-
return this.back && !this._hasTopContent ?
|
|
5754
|
+
return this.back && !this._hasTopContent ? html20`<button
|
|
5835
5755
|
type="button"
|
|
5836
5756
|
aria-label="${i18n._({
|
|
5837
5757
|
id: "modal.aria.back",
|
|
@@ -5845,7 +5765,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement12) {
|
|
|
5845
5765
|
}
|
|
5846
5766
|
get closeButton() {
|
|
5847
5767
|
if (this[NO_CLOSE_BUTTON]) return nothing3;
|
|
5848
|
-
return
|
|
5768
|
+
return html20`<button
|
|
5849
5769
|
type="button"
|
|
5850
5770
|
aria-label="${i18n._({
|
|
5851
5771
|
id: "modal.aria.close",
|
|
@@ -5871,11 +5791,11 @@ __publicField(ModalHeader, "properties", {
|
|
|
5871
5791
|
[NO_CLOSE_BUTTON]: { type: Boolean },
|
|
5872
5792
|
_hasTopContent: { state: true }
|
|
5873
5793
|
});
|
|
5874
|
-
__publicField(ModalHeader, "styles", [
|
|
5794
|
+
__publicField(ModalHeader, "styles", [WarpElement11.styles]);
|
|
5875
5795
|
|
|
5876
5796
|
// packages/modal/modal-main.js
|
|
5877
|
-
import { css as css6, html as
|
|
5878
|
-
import
|
|
5797
|
+
import { css as css6, html as html21 } from "lit";
|
|
5798
|
+
import WarpElement12 from "@warp-ds/elements-core";
|
|
5879
5799
|
import { createRef as createRef2, ref as ref2 } from "lit/directives/ref.js";
|
|
5880
5800
|
|
|
5881
5801
|
// node_modules/.pnpm/scroll-doctor@2.0.2/node_modules/scroll-doctor/dist/scroll-doctor.js
|
|
@@ -5939,7 +5859,7 @@ function T() {
|
|
|
5939
5859
|
// packages/modal/modal-main.js
|
|
5940
5860
|
var NO_BACKDROP_CLICKS = "ignore-backdrop-clicks";
|
|
5941
5861
|
var CONTENT_ID = "content-id";
|
|
5942
|
-
var ModalMain = class extends ProvidesCanCloseToSlotsMixin(
|
|
5862
|
+
var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement12) {
|
|
5943
5863
|
constructor() {
|
|
5944
5864
|
super();
|
|
5945
5865
|
__publicField(this, "dialogEl", createRef2());
|
|
@@ -5973,7 +5893,7 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement13) {
|
|
|
5973
5893
|
);
|
|
5974
5894
|
}
|
|
5975
5895
|
render() {
|
|
5976
|
-
return
|
|
5896
|
+
return html21`
|
|
5977
5897
|
<dialog ${ref2(this.dialogEl)} class="w-modal ${modalElement.dialogEl}">
|
|
5978
5898
|
<div ${ref2(this.dialogInnerEl)} class="${modalElement.dialogInner}">
|
|
5979
5899
|
<slot name="header" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -6021,7 +5941,7 @@ __publicField(ModalMain, "properties", {
|
|
|
6021
5941
|
[NO_BACKDROP_CLICKS]: { type: Boolean }
|
|
6022
5942
|
});
|
|
6023
5943
|
__publicField(ModalMain, "styles", [
|
|
6024
|
-
|
|
5944
|
+
WarpElement12.styles,
|
|
6025
5945
|
css6`
|
|
6026
5946
|
.w-modal {
|
|
6027
5947
|
--w-modal-translate-distance: 100%;
|
|
@@ -6091,8 +6011,8 @@ if (!customElements.get("w-modal")) {
|
|
|
6091
6011
|
}
|
|
6092
6012
|
|
|
6093
6013
|
// packages/pill/index.js
|
|
6094
|
-
import { html as
|
|
6095
|
-
import
|
|
6014
|
+
import { html as html22 } from "lit";
|
|
6015
|
+
import WarpElement13 from "@warp-ds/elements-core";
|
|
6096
6016
|
|
|
6097
6017
|
// packages/pill/locales/da/messages.mjs
|
|
6098
6018
|
var messages64 = JSON.parse('{"pill.aria.openFilter":["\xC5bn filter"],"pill.aria.removeFilter":["Fjern filter ",["label"]]}');
|
|
@@ -6110,7 +6030,7 @@ var messages67 = JSON.parse('{"pill.aria.openFilter":["\xC5pne filter"],"pill.ar
|
|
|
6110
6030
|
var messages68 = JSON.parse('{"pill.aria.openFilter":["\xD6ppna filter"],"pill.aria.removeFilter":["Ta bort filtret ",["label"]]}');
|
|
6111
6031
|
|
|
6112
6032
|
// packages/pill/index.js
|
|
6113
|
-
var WarpPill = class extends kebabCaseAttributes(
|
|
6033
|
+
var WarpPill = class extends kebabCaseAttributes(WarpElement13) {
|
|
6114
6034
|
constructor() {
|
|
6115
6035
|
super();
|
|
6116
6036
|
activateI18n7(messages65, messages67, messages66, messages64, messages68);
|
|
@@ -6145,13 +6065,13 @@ var WarpPill = class extends kebabCaseAttributes(WarpElement14) {
|
|
|
6145
6065
|
this.dispatchEvent(new CustomEvent("w-pill-close", { bubbles: true, composed: true }));
|
|
6146
6066
|
}
|
|
6147
6067
|
render() {
|
|
6148
|
-
return
|
|
6068
|
+
return html22`
|
|
6149
6069
|
<div class="${pill.wrapper}">
|
|
6150
6070
|
<button type="button" class="${this._labelClasses}" @click="${this._onClick}">
|
|
6151
6071
|
<span class="${pill.a11y}">${this.openSrLabel ? this.openSrLabel : this.openFilterSrText}</span>
|
|
6152
6072
|
<slot></slot>
|
|
6153
6073
|
</button>
|
|
6154
|
-
${this.canClose ?
|
|
6074
|
+
${this.canClose ? html22`<button type="button" class="${this._closeClasses}" @click="${this._onClose}">
|
|
6155
6075
|
<span class="${pill.a11y}">${this.closeSrLabel ? this.closeSrLabel : this.removeFilterSrText}</span>
|
|
6156
6076
|
<w-icon-close-16></w-icon-close-16>
|
|
6157
6077
|
</button>` : null}
|
|
@@ -6159,7 +6079,7 @@ var WarpPill = class extends kebabCaseAttributes(WarpElement14) {
|
|
|
6159
6079
|
`;
|
|
6160
6080
|
}
|
|
6161
6081
|
};
|
|
6162
|
-
__publicField(WarpPill, "styles", [
|
|
6082
|
+
__publicField(WarpPill, "styles", [WarpElement13.styles]);
|
|
6163
6083
|
__publicField(WarpPill, "properties", {
|
|
6164
6084
|
canClose: { type: Boolean },
|
|
6165
6085
|
suggestion: { type: Boolean },
|
|
@@ -6171,8 +6091,8 @@ if (!customElements.get("w-pill")) {
|
|
|
6171
6091
|
}
|
|
6172
6092
|
|
|
6173
6093
|
// packages/select/index.js
|
|
6174
|
-
import { html as
|
|
6175
|
-
import
|
|
6094
|
+
import { html as html23 } from "lit";
|
|
6095
|
+
import WarpElement14 from "@warp-ds/elements-core";
|
|
6176
6096
|
import { ifDefined as ifDefined5 } from "lit/directives/if-defined.js";
|
|
6177
6097
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
6178
6098
|
import { when } from "lit/directives/when.js";
|
|
@@ -6194,7 +6114,7 @@ var messages73 = JSON.parse('{"select.label.optional":["(valfritt)"]}');
|
|
|
6194
6114
|
|
|
6195
6115
|
// packages/select/index.js
|
|
6196
6116
|
var _WarpSelect_instances, classes_get, helpTextClasses_get, chevronClasses_get2, id_get, helpId_get;
|
|
6197
|
-
var WarpSelect = class extends kebabCaseAttributes(
|
|
6117
|
+
var WarpSelect = class extends kebabCaseAttributes(WarpElement14) {
|
|
6198
6118
|
constructor() {
|
|
6199
6119
|
super();
|
|
6200
6120
|
__privateAdd(this, _WarpSelect_instances);
|
|
@@ -6215,14 +6135,14 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement15) {
|
|
|
6215
6135
|
this.dispatchEvent(event);
|
|
6216
6136
|
}
|
|
6217
6137
|
render() {
|
|
6218
|
-
return
|
|
6138
|
+
return html23`<div class="${select.wrapper}">
|
|
6219
6139
|
${when(
|
|
6220
6140
|
this.label,
|
|
6221
|
-
() =>
|
|
6141
|
+
() => html23`<label class="${label.base}" for="${__privateGet(this, _WarpSelect_instances, id_get)}">
|
|
6222
6142
|
${this.label}
|
|
6223
6143
|
${when(
|
|
6224
6144
|
this.optional,
|
|
6225
|
-
() =>
|
|
6145
|
+
() => html23`<span class="${label.optional}"
|
|
6226
6146
|
>${i18n._({
|
|
6227
6147
|
id: "select.label.optional",
|
|
6228
6148
|
message: "(optional)",
|
|
@@ -6248,7 +6168,7 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement15) {
|
|
|
6248
6168
|
<w-icon-chevron-down-16></w-icon-chevron-down-16>
|
|
6249
6169
|
</div>
|
|
6250
6170
|
</div>
|
|
6251
|
-
${when(this.always || this.invalid, () =>
|
|
6171
|
+
${when(this.always || this.invalid, () => html23`<div id="${__privateGet(this, _WarpSelect_instances, helpId_get)}" class="${__privateGet(this, _WarpSelect_instances, helpTextClasses_get)}">${this.hint}</div>`)}
|
|
6252
6172
|
</div>`;
|
|
6253
6173
|
}
|
|
6254
6174
|
};
|
|
@@ -6293,16 +6213,16 @@ __publicField(WarpSelect, "properties", {
|
|
|
6293
6213
|
readOnly: { type: Boolean, relfect: true },
|
|
6294
6214
|
_options: { state: true }
|
|
6295
6215
|
});
|
|
6296
|
-
__publicField(WarpSelect, "styles", [
|
|
6216
|
+
__publicField(WarpSelect, "styles", [WarpElement14.styles]);
|
|
6297
6217
|
if (!customElements.get("w-select")) {
|
|
6298
6218
|
customElements.define("w-select", WarpSelect);
|
|
6299
6219
|
}
|
|
6300
6220
|
|
|
6301
6221
|
// packages/textfield/index.js
|
|
6302
|
-
import { css as css7, html as
|
|
6303
|
-
import
|
|
6222
|
+
import { css as css7, html as html24 } from "lit";
|
|
6223
|
+
import WarpElement15 from "@warp-ds/elements-core";
|
|
6304
6224
|
import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
|
|
6305
|
-
var WarpTextField = class extends kebabCaseAttributes(
|
|
6225
|
+
var WarpTextField = class extends kebabCaseAttributes(WarpElement15) {
|
|
6306
6226
|
constructor() {
|
|
6307
6227
|
super();
|
|
6308
6228
|
this.type = "text";
|
|
@@ -6323,7 +6243,7 @@ var WarpTextField = class extends kebabCaseAttributes(WarpElement16) {
|
|
|
6323
6243
|
}
|
|
6324
6244
|
get _label() {
|
|
6325
6245
|
if (this.label) {
|
|
6326
|
-
return
|
|
6246
|
+
return html24`<label for="${this._id}" class=${label.base}>${this.label}</label>`;
|
|
6327
6247
|
}
|
|
6328
6248
|
}
|
|
6329
6249
|
get _helpId() {
|
|
@@ -6357,7 +6277,7 @@ var WarpTextField = class extends kebabCaseAttributes(WarpElement16) {
|
|
|
6357
6277
|
if (affixes.length) this._hasSuffix = true;
|
|
6358
6278
|
}
|
|
6359
6279
|
render() {
|
|
6360
|
-
return
|
|
6280
|
+
return html24`
|
|
6361
6281
|
${this._label}
|
|
6362
6282
|
<div class="${input.wrapper}">
|
|
6363
6283
|
<slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot>
|
|
@@ -6385,7 +6305,7 @@ var WarpTextField = class extends kebabCaseAttributes(WarpElement16) {
|
|
|
6385
6305
|
@focus="${this.handler}" />
|
|
6386
6306
|
<slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot>
|
|
6387
6307
|
</div>
|
|
6388
|
-
${this.helpText &&
|
|
6308
|
+
${this.helpText && html24`<div class="${this._helpTextStyles}" id="${this._helpId}">${this.helpText}</div>`}
|
|
6389
6309
|
`;
|
|
6390
6310
|
}
|
|
6391
6311
|
};
|
|
@@ -6415,7 +6335,7 @@ __publicField(WarpTextField, "properties", {
|
|
|
6415
6335
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
6416
6336
|
// https://stackoverflow.com/a/61631668
|
|
6417
6337
|
__publicField(WarpTextField, "styles", [
|
|
6418
|
-
|
|
6338
|
+
WarpElement15.styles,
|
|
6419
6339
|
css7`
|
|
6420
6340
|
:host {
|
|
6421
6341
|
display: block;
|
|
@@ -6429,9 +6349,12 @@ if (!customElements.get("w-textfield")) {
|
|
|
6429
6349
|
customElements.define("w-textfield", WarpTextField);
|
|
6430
6350
|
}
|
|
6431
6351
|
|
|
6352
|
+
// packages/utils/window-exists.js
|
|
6353
|
+
var windowExists2 = typeof window !== "undefined";
|
|
6354
|
+
|
|
6432
6355
|
// packages/toast/api.js
|
|
6433
6356
|
function toast2(message, options) {
|
|
6434
|
-
if (!
|
|
6357
|
+
if (!windowExists2) return;
|
|
6435
6358
|
const toast3 = customElements.get("w-toast-container").init();
|
|
6436
6359
|
const data = __spreadValues({
|
|
6437
6360
|
id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),
|
|
@@ -6443,22 +6366,22 @@ function toast2(message, options) {
|
|
|
6443
6366
|
return data;
|
|
6444
6367
|
}
|
|
6445
6368
|
function removeToast(id) {
|
|
6446
|
-
if (!
|
|
6369
|
+
if (!windowExists2) return;
|
|
6447
6370
|
const toast3 = customElements.get("w-toast-container").init();
|
|
6448
6371
|
return toast3.del(id);
|
|
6449
6372
|
}
|
|
6450
6373
|
function updateToast(id, options) {
|
|
6451
|
-
if (!
|
|
6374
|
+
if (!windowExists2) return;
|
|
6452
6375
|
const toast3 = customElements.get("w-toast-container").init();
|
|
6453
6376
|
toast3.set(__spreadValues(__spreadValues({}, toast3.get(id)), options));
|
|
6454
6377
|
return toast3.get(id);
|
|
6455
6378
|
}
|
|
6456
6379
|
|
|
6457
6380
|
// packages/toast/toast-container.js
|
|
6458
|
-
import { css as css8, html as
|
|
6459
|
-
import
|
|
6460
|
-
import { repeat
|
|
6461
|
-
var WarpToastContainer = class extends
|
|
6381
|
+
import { css as css8, html as html25 } from "lit";
|
|
6382
|
+
import WarpElement16 from "@warp-ds/elements-core";
|
|
6383
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
6384
|
+
var WarpToastContainer = class extends WarpElement16 {
|
|
6462
6385
|
constructor() {
|
|
6463
6386
|
super();
|
|
6464
6387
|
this._toasts = /* @__PURE__ */ new Map();
|
|
@@ -6540,13 +6463,13 @@ var WarpToastContainer = class extends WarpElement17 {
|
|
|
6540
6463
|
return result;
|
|
6541
6464
|
}
|
|
6542
6465
|
render() {
|
|
6543
|
-
return
|
|
6466
|
+
return html25`
|
|
6544
6467
|
<aside class="${toaster.wrapper}">
|
|
6545
6468
|
<div class="${toaster.base}" id="w-toast-container-list">
|
|
6546
|
-
${
|
|
6469
|
+
${repeat(
|
|
6547
6470
|
this._toastsArray,
|
|
6548
6471
|
(toast3) => toast3.id,
|
|
6549
|
-
(toast3) =>
|
|
6472
|
+
(toast3) => html25` <w-toast
|
|
6550
6473
|
class="${toaster.content}"
|
|
6551
6474
|
id="${toast3.id}"
|
|
6552
6475
|
type="${toast3.type}"
|
|
@@ -6561,7 +6484,7 @@ var WarpToastContainer = class extends WarpElement17 {
|
|
|
6561
6484
|
}
|
|
6562
6485
|
};
|
|
6563
6486
|
__publicField(WarpToastContainer, "styles", [
|
|
6564
|
-
|
|
6487
|
+
WarpElement16.styles,
|
|
6565
6488
|
css8`
|
|
6566
6489
|
:host {
|
|
6567
6490
|
display: block;
|
|
@@ -6576,8 +6499,8 @@ if (!customElements.get("w-toast-container")) {
|
|
|
6576
6499
|
}
|
|
6577
6500
|
|
|
6578
6501
|
// packages/toast/toast.js
|
|
6579
|
-
import { css as css9, html as
|
|
6580
|
-
import
|
|
6502
|
+
import { css as css9, html as html26 } from "lit";
|
|
6503
|
+
import WarpElement17 from "@warp-ds/elements-core";
|
|
6581
6504
|
|
|
6582
6505
|
// node_modules/.pnpm/element-collapse@1.1.0/node_modules/element-collapse/index.js
|
|
6583
6506
|
var windowExists3 = typeof window !== "undefined";
|
|
@@ -6670,7 +6593,7 @@ var toastType = {
|
|
|
6670
6593
|
warning: "warning"
|
|
6671
6594
|
};
|
|
6672
6595
|
var _WarpToast_instances, primaryClasses_get, iconClasses_get;
|
|
6673
|
-
var WarpToast = class extends
|
|
6596
|
+
var WarpToast = class extends WarpElement17 {
|
|
6674
6597
|
constructor() {
|
|
6675
6598
|
super();
|
|
6676
6599
|
__privateAdd(this, _WarpToast_instances);
|
|
@@ -6725,9 +6648,9 @@ var WarpToast = class extends WarpElement18 {
|
|
|
6725
6648
|
}
|
|
6726
6649
|
}
|
|
6727
6650
|
get _iconMarkup() {
|
|
6728
|
-
if (this._warning) return
|
|
6729
|
-
if (this._error) return
|
|
6730
|
-
else return
|
|
6651
|
+
if (this._warning) return html26`<w-icon-warning-16></w-icon-warning-16>`;
|
|
6652
|
+
if (this._error) return html26`<w-icon-error-16></w-icon-error-16>`;
|
|
6653
|
+
else return html26`<w-icon-success-16></w-icon-success-16>`;
|
|
6731
6654
|
}
|
|
6732
6655
|
async collapse() {
|
|
6733
6656
|
return new Promise((resolve) => {
|
|
@@ -6744,8 +6667,8 @@ var WarpToast = class extends WarpElement18 {
|
|
|
6744
6667
|
this.updateComplete.then(() => this.dispatchEvent(event));
|
|
6745
6668
|
}
|
|
6746
6669
|
render() {
|
|
6747
|
-
if (!this.text) return
|
|
6748
|
-
return
|
|
6670
|
+
if (!this.text) return html26``;
|
|
6671
|
+
return html26` <section class="${toast.wrapper}" aria-label="${this._typeLabel}">
|
|
6749
6672
|
<div class="${__privateGet(this, _WarpToast_instances, primaryClasses_get)}">
|
|
6750
6673
|
<div class="${__privateGet(this, _WarpToast_instances, iconClasses_get)}">${this._iconMarkup}</div>
|
|
6751
6674
|
<div role="${this._role}" class="${toast.content}">
|
|
@@ -6753,7 +6676,7 @@ var WarpToast = class extends WarpElement18 {
|
|
|
6753
6676
|
</div>
|
|
6754
6677
|
${when2(
|
|
6755
6678
|
this.canclose === true,
|
|
6756
|
-
() =>
|
|
6679
|
+
() => html26`
|
|
6757
6680
|
<button class="${toast.close}" @click="${this.close}">
|
|
6758
6681
|
<w-icon-close-16></w-icon-close-16>
|
|
6759
6682
|
</button>
|
|
@@ -6781,7 +6704,7 @@ iconClasses_get = function() {
|
|
|
6781
6704
|
]);
|
|
6782
6705
|
};
|
|
6783
6706
|
__publicField(WarpToast, "styles", [
|
|
6784
|
-
|
|
6707
|
+
WarpElement17.styles,
|
|
6785
6708
|
css9`
|
|
6786
6709
|
:host {
|
|
6787
6710
|
display: block;
|
|
@@ -6799,10 +6722,10 @@ if (!customElements.get("w-toast")) {
|
|
|
6799
6722
|
}
|
|
6800
6723
|
|
|
6801
6724
|
// packages/utils/expand-transition.js
|
|
6802
|
-
import { css as css10, html as
|
|
6803
|
-
import
|
|
6725
|
+
import { css as css10, html as html27 } from "lit";
|
|
6726
|
+
import WarpElement18 from "@warp-ds/elements-core";
|
|
6804
6727
|
import { ifDefined as ifDefined7 } from "lit/directives/if-defined.js";
|
|
6805
|
-
var ExpandTransition = class extends
|
|
6728
|
+
var ExpandTransition = class extends WarpElement18 {
|
|
6806
6729
|
constructor() {
|
|
6807
6730
|
super();
|
|
6808
6731
|
this.show = false;
|
|
@@ -6834,7 +6757,7 @@ var ExpandTransition = class extends WarpElement19 {
|
|
|
6834
6757
|
return this != null ? this : null;
|
|
6835
6758
|
}
|
|
6836
6759
|
render() {
|
|
6837
|
-
return
|
|
6760
|
+
return html27`<div aria-hidden=${ifDefined7(!this.show ? "true" : void 0)}>${this._removeElement ? html27`` : html27`<slot></slot>`}</div>`;
|
|
6838
6761
|
}
|
|
6839
6762
|
};
|
|
6840
6763
|
__publicField(ExpandTransition, "properties", {
|
|
@@ -6845,7 +6768,7 @@ __publicField(ExpandTransition, "properties", {
|
|
|
6845
6768
|
_removeElement: { type: Boolean, state: true }
|
|
6846
6769
|
});
|
|
6847
6770
|
__publicField(ExpandTransition, "styles", [
|
|
6848
|
-
|
|
6771
|
+
WarpElement18.styles,
|
|
6849
6772
|
css10`
|
|
6850
6773
|
:host {
|
|
6851
6774
|
display: block;
|
|
@@ -6857,10 +6780,10 @@ if (!customElements.get("w-expand-transition")) {
|
|
|
6857
6780
|
}
|
|
6858
6781
|
|
|
6859
6782
|
// packages/utils/unstyled-heading.js
|
|
6860
|
-
import { html as
|
|
6861
|
-
import
|
|
6783
|
+
import { html as html28 } from "lit";
|
|
6784
|
+
import WarpElement19 from "@warp-ds/elements-core";
|
|
6862
6785
|
import { unsafeHTML as unsafeHTML2 } from "lit/directives/unsafe-html.js";
|
|
6863
|
-
var UnstyledHeading = class extends
|
|
6786
|
+
var UnstyledHeading = class extends WarpElement19 {
|
|
6864
6787
|
get _markup() {
|
|
6865
6788
|
return `<h${this.level}
|
|
6866
6789
|
style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
|
|
@@ -6870,13 +6793,13 @@ var UnstyledHeading = class extends WarpElement20 {
|
|
|
6870
6793
|
`;
|
|
6871
6794
|
}
|
|
6872
6795
|
render() {
|
|
6873
|
-
return !this.level ?
|
|
6796
|
+
return !this.level ? html28`<slot></slot>` : unsafeHTML2(this._markup);
|
|
6874
6797
|
}
|
|
6875
6798
|
};
|
|
6876
6799
|
__publicField(UnstyledHeading, "properties", {
|
|
6877
6800
|
level: { type: Number }
|
|
6878
6801
|
});
|
|
6879
|
-
__publicField(UnstyledHeading, "styles", [
|
|
6802
|
+
__publicField(UnstyledHeading, "styles", [WarpElement19.styles]);
|
|
6880
6803
|
if (!customElements.get("w-unstyled-heading")) {
|
|
6881
6804
|
customElements.define("w-unstyled-heading", UnstyledHeading);
|
|
6882
6805
|
}
|
|
@@ -6891,7 +6814,6 @@ export {
|
|
|
6891
6814
|
WarpBadge,
|
|
6892
6815
|
WarpBox,
|
|
6893
6816
|
WarpBreadcrumbs,
|
|
6894
|
-
WarpBroadcast,
|
|
6895
6817
|
WarpButton,
|
|
6896
6818
|
WarpCard,
|
|
6897
6819
|
WarpExpandable,
|