@wrrdev/fenix-ui 1.1.2 → 1.1.4
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/README.md +2 -2
- package/dist/_virtual/preload-helper.js +6 -3
- package/dist/_virtual/preload-helper.js.map +1 -1
- package/dist/components/alert/alert.js +2 -3
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/confirmpopup/confirmpopup.d.ts.map +1 -1
- package/dist/components/confirmpopup/confirmpopup.js +4 -3
- package/dist/components/confirmpopup/confirmpopup.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +2 -0
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +2 -0
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/timeline/timeline.js +2 -3
- package/dist/components/timeline/timeline.js.map +1 -1
- package/dist/components/toast/toast.js +2 -3
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/fenix-ui.umd.min.js +24 -24
- package/dist/fenix-ui3.esm.js +15 -7
- package/dist/fenix-ui3.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/fenix-ui3.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./fenix-ui2.esm.js","./assets/base-css-BifSeW2H.js"])))=>i.map(i=>d[i]);
|
|
2
1
|
var __typeError = (msg) => {
|
|
3
2
|
throw TypeError(msg);
|
|
4
3
|
};
|
|
@@ -4059,6 +4058,8 @@ const _FxDialog = class _FxDialog extends FxElement {
|
|
|
4059
4058
|
</div>
|
|
4060
4059
|
`);
|
|
4061
4060
|
if (!isOpen) return;
|
|
4061
|
+
this._cleanup?.();
|
|
4062
|
+
this._cleanup = void 0;
|
|
4062
4063
|
const overlay = this.root.querySelector(".overlay");
|
|
4063
4064
|
const closeBtn = this.root.querySelector(".close");
|
|
4064
4065
|
const close = () => {
|
|
@@ -4201,12 +4202,15 @@ function defineFxDialog() {
|
|
|
4201
4202
|
return defineElement("fx-dialog", FxDialog);
|
|
4202
4203
|
}
|
|
4203
4204
|
defineFxDialog();
|
|
4204
|
-
const scriptRel =
|
|
4205
|
+
const scriptRel = function detectScriptRel() {
|
|
4206
|
+
const relList = typeof document !== "undefined" && document.createElement("link").relList;
|
|
4207
|
+
return relList && relList.supports && relList.supports("modulepreload") ? "modulepreload" : "preload";
|
|
4208
|
+
}();
|
|
4205
4209
|
const assetsURL = function(dep, importerUrl) {
|
|
4206
4210
|
return new URL(dep, importerUrl).href;
|
|
4207
4211
|
};
|
|
4208
4212
|
const seen = {};
|
|
4209
|
-
const
|
|
4213
|
+
const __fenixPreload = function preload(baseModule, deps, importerUrl) {
|
|
4210
4214
|
let promise = Promise.resolve();
|
|
4211
4215
|
if (deps && deps.length > 0) {
|
|
4212
4216
|
const links = document.getElementsByTagName("link");
|
|
@@ -4296,7 +4300,7 @@ const _FxConfirmPopup = class _FxConfirmPopup extends FxElement {
|
|
|
4296
4300
|
const message = this.getAttr("message");
|
|
4297
4301
|
const icon = this.getAttr("icon");
|
|
4298
4302
|
const iconIsFx = isFenixIconName(icon);
|
|
4299
|
-
if (iconIsFx) void
|
|
4303
|
+
if (iconIsFx) void __fenixPreload(() => import("./fenix-ui2.esm.js"), true ? [] : void 0, import.meta.url);
|
|
4300
4304
|
const acceptLabel = this.getAttr("accept-label", "Sim");
|
|
4301
4305
|
const rejectLabel = this.getAttr("reject-label", "Não");
|
|
4302
4306
|
this.setTemplate(`
|
|
@@ -4318,6 +4322,8 @@ const _FxConfirmPopup = class _FxConfirmPopup extends FxElement {
|
|
|
4318
4322
|
if (!this.open) return;
|
|
4319
4323
|
const popup = this.root.querySelector(".popup");
|
|
4320
4324
|
if (!popup) return;
|
|
4325
|
+
this._cleanup?.();
|
|
4326
|
+
this._cleanup = void 0;
|
|
4321
4327
|
const close = (event) => {
|
|
4322
4328
|
this.open = false;
|
|
4323
4329
|
this._cleanup?.();
|
|
@@ -5451,6 +5457,8 @@ const _FxPopover = class _FxPopover extends FxElement {
|
|
|
5451
5457
|
if (!this.open) return;
|
|
5452
5458
|
const popup = this.root.querySelector(".popup");
|
|
5453
5459
|
if (!popup) return;
|
|
5460
|
+
this._cleanup?.();
|
|
5461
|
+
this._cleanup = void 0;
|
|
5454
5462
|
const close = () => {
|
|
5455
5463
|
this.open = false;
|
|
5456
5464
|
this._cleanup?.();
|
|
@@ -6336,7 +6344,7 @@ const _FxTimeline = class _FxTimeline extends FxElement {
|
|
|
6336
6344
|
const dot = icon ? `<span class="dot fx-icon" part="marker" aria-hidden="true">${esc(icon)}</span>` : `<span class="dot" part="marker" aria-hidden="true">${esc(marker)}</span>`;
|
|
6337
6345
|
return `<li class="event" part="event">${dot}<div class="head">${head}</div><div class="content">${item.innerHTML}</div></li>`;
|
|
6338
6346
|
}).join("");
|
|
6339
|
-
if (items.some((item) => item.hasAttribute("icon"))) void
|
|
6347
|
+
if (items.some((item) => item.hasAttribute("icon"))) void __fenixPreload(() => import("./fenix-ui2.esm.js"), true ? [] : void 0, import.meta.url);
|
|
6340
6348
|
}
|
|
6341
6349
|
connectedCallback() {
|
|
6342
6350
|
super.connectedCallback();
|
|
@@ -6897,7 +6905,7 @@ render_fn = function() {
|
|
|
6897
6905
|
const color = KIND_COLOR[kind] ?? KIND_COLOR.info;
|
|
6898
6906
|
const iconName = this.getAttribute("icon");
|
|
6899
6907
|
const isFxIcon = !!iconName && /^[a-z][a-z0-9_]*$/.test(iconName);
|
|
6900
|
-
if (isFxIcon) void
|
|
6908
|
+
if (isFxIcon) void __fenixPreload(() => import("./fenix-ui2.esm.js"), true ? [] : void 0, import.meta.url);
|
|
6901
6909
|
const iconContent = isFxIcon ? iconName : KIND_ICON[kind] ?? KIND_ICON.info;
|
|
6902
6910
|
this.shadowRoot.innerHTML = `
|
|
6903
6911
|
<style>${CARD_CSS}</style>
|
|
@@ -7657,7 +7665,7 @@ const _FxAlert = class _FxAlert extends FxElement {
|
|
|
7657
7665
|
const variant = this.getAttr("variant", "info");
|
|
7658
7666
|
const title = this.getAttr("title");
|
|
7659
7667
|
const iconName = this.getAttr("icon");
|
|
7660
|
-
if (isFenixIconName(iconName)) void
|
|
7668
|
+
if (isFenixIconName(iconName)) void __fenixPreload(() => import("./fenix-ui2.esm.js"), true ? [] : void 0, import.meta.url);
|
|
7661
7669
|
const icons = {
|
|
7662
7670
|
info: "ℹ",
|
|
7663
7671
|
success: "✓",
|