monobill-mintui 0.6.660 → 0.6.662

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.css CHANGED
@@ -333,7 +333,7 @@
333
333
 
334
334
  /* mint-ui aggregate component: alert */
335
335
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
336
- @layer utilities{.static{position:static}.container{width:100%}}mint-alert{box-sizing:border-box;color:var(--mint-color-text,#28372d);background:var(--mint-color-surface-raised,#fff);border:1px solid var(--mint-color-border,#dfe6e0);border-radius:.75rem;margin:0;padding:0;display:block;overflow:hidden;box-shadow:0 1px 2px #15241a0a}mint-alert[tone=success]{border-color:#bbf7d0}mint-alert[tone=warning]{border-color:#fde68a}mint-alert[tone=danger]{border-color:#fecaca}:where(.dark,.dark *) mint-alert[tone=success]{border-color:#166534}:where(.dark,.dark *) mint-alert[tone=warning]{border-color:#854d0e}:where(.dark,.dark *) mint-alert[tone=danger]{border-color:#991b1b}mint-alert :is(.text-gray-900,.text-gray-800,.dark\:text-white,.dark\:text-gray-100){color:var(--mint-color-text,#28372d)!important}mint-alert :is(.text-gray-700,.text-gray-600,.text-gray-500,.dark\:text-gray-300,.dark\:text-gray-400){color:var(--mint-color-text-secondary,#66736a)!important}mint-alert :is(.bg-white,.dark\:bg-mint-elevated){background-color:var(--mint-color-surface-raised,#fff)!important}mint-alert :is(.bg-gray-50,.bg-gray-100,.dark\:bg-mint-canvas,.dark\:bg-mint-hover){background-color:var(--mint-color-surface-muted,#f6f8f4)!important}mint-alert :is(.border-gray-200,.border-gray-300,.dark\:border-mint-divider){border-color:var(--mint-color-border,#dfe6e0)!important}mint-alert>.mint-alert-header{background:var(--mint-color-surface-muted,#f6f8f4);align-items:center;gap:.75rem;min-height:3.5rem;padding:1rem 1.25rem;display:flex}mint-alert[tone=success]>.mint-alert-header{background:#dcfce7}mint-alert[tone=warning]>.mint-alert-header{background:#fef9c3}mint-alert[tone=danger]>.mint-alert-header{background:#fee2e2}:where(.dark,.dark *) mint-alert>.mint-alert-header{background:#ffffff0d}:where(.dark,.dark *) mint-alert[tone=success]>.mint-alert-header{background:#14532d4d}:where(.dark,.dark *) mint-alert[tone=warning]>.mint-alert-header{background:#713f124d}:where(.dark,.dark *) mint-alert[tone=danger]>.mint-alert-header{background:#7f1d1d4d}mint-alert>.mint-alert-icon{flex-shrink:0;width:1.25rem;height:1.25rem;display:flex}mint-alert[tone=success]>.mint-alert-header>.mint-alert-icon{color:#16a34a}mint-alert[tone=warning]>.mint-alert-header>.mint-alert-icon{color:#ca8a04}mint-alert[tone=danger]>.mint-alert-header>.mint-alert-icon{color:#dc2626}:where(.dark,.dark *) mint-alert[tone=success]>.mint-alert-header>.mint-alert-icon{color:#4ade80}:where(.dark,.dark *) mint-alert[tone=warning]>.mint-alert-header>.mint-alert-icon{color:#facc15}:where(.dark,.dark *) mint-alert[tone=danger]>.mint-alert-header>.mint-alert-icon{color:#f87171}mint-alert>.mint-alert-heading{color:var(--mint-color-text,#28372d);flex:1;margin:0;font-size:1rem;font-weight:600;line-height:1.5}mint-alert>.mint-alert-dismiss{cursor:pointer;background:0 0;border:0;border-radius:.25rem;flex-shrink:0;padding:.25rem}mint-alert>.mint-alert-dismiss:hover{background:#0000001a}:where(.dark,.dark *) mint-alert>.mint-alert-dismiss:hover{background:#ffffff1a}mint-alert>.mint-alert-close-icon{width:1rem;height:1rem;color:var(--mint-color-text-secondary,#66736a)}mint-alert>.mint-alert-body{background:var(--mint-color-surface-raised,#fff);padding:1rem 1.25rem;font-size:.875rem;line-height:1.5}mint-alert>.mint-alert-body>*+*{margin-block-start:.75rem}
336
+ @layer utilities{.static{position:static}.container{width:100%}}mint-alert{box-sizing:border-box;color:var(--mint-color-text,#28372d);background:var(--mint-color-surface-raised,#fff);border:1px solid var(--mint-color-border,#dfe6e0);border-radius:.75rem;padding:0;display:block;overflow:hidden;box-shadow:0 1px 2px #15241a0a}mint-alert[tone=success]{border-color:#bbf7d0}mint-alert[tone=warning]{border-color:#fde68a}mint-alert[tone=danger]{border-color:#fecaca}:where(.dark,.dark *) mint-alert[tone=success]{border-color:#166534}:where(.dark,.dark *) mint-alert[tone=warning]{border-color:#854d0e}:where(.dark,.dark *) mint-alert[tone=danger]{border-color:#991b1b}mint-alert :is(.text-gray-900,.text-gray-800,.dark\:text-white,.dark\:text-gray-100){color:var(--mint-color-text,#28372d)!important}mint-alert :is(.text-gray-700,.text-gray-600,.text-gray-500,.dark\:text-gray-300,.dark\:text-gray-400){color:var(--mint-color-text-secondary,#66736a)!important}mint-alert :is(.bg-white,.dark\:bg-mint-elevated){background-color:var(--mint-color-surface-raised,#fff)!important}mint-alert :is(.bg-gray-50,.bg-gray-100,.dark\:bg-mint-canvas,.dark\:bg-mint-hover){background-color:var(--mint-color-surface-muted,#f6f8f4)!important}mint-alert :is(.border-gray-200,.border-gray-300,.dark\:border-mint-divider){border-color:var(--mint-color-border,#dfe6e0)!important}mint-alert>.mint-alert-header{background:var(--mint-color-surface-muted,#f6f8f4);align-items:center;gap:.75rem;min-height:3.5rem;padding:1rem 1.25rem;display:flex}mint-alert[tone=success]>.mint-alert-header{background:#dcfce7}mint-alert[tone=warning]>.mint-alert-header{background:#fef9c3}mint-alert[tone=danger]>.mint-alert-header{background:#fee2e2}:where(.dark,.dark *) mint-alert>.mint-alert-header{background:#ffffff0d}:where(.dark,.dark *) mint-alert[tone=success]>.mint-alert-header{background:#14532d4d}:where(.dark,.dark *) mint-alert[tone=warning]>.mint-alert-header{background:#713f124d}:where(.dark,.dark *) mint-alert[tone=danger]>.mint-alert-header{background:#7f1d1d4d}mint-alert>.mint-alert-icon{flex-shrink:0;width:1.25rem;height:1.25rem;display:flex}mint-alert[tone=success]>.mint-alert-header>.mint-alert-icon{color:#16a34a}mint-alert[tone=warning]>.mint-alert-header>.mint-alert-icon{color:#ca8a04}mint-alert[tone=danger]>.mint-alert-header>.mint-alert-icon{color:#dc2626}:where(.dark,.dark *) mint-alert[tone=success]>.mint-alert-header>.mint-alert-icon{color:#4ade80}:where(.dark,.dark *) mint-alert[tone=warning]>.mint-alert-header>.mint-alert-icon{color:#facc15}:where(.dark,.dark *) mint-alert[tone=danger]>.mint-alert-header>.mint-alert-icon{color:#f87171}mint-alert>.mint-alert-heading{color:var(--mint-color-text,#28372d);flex:1;margin:0;font-size:1rem;font-weight:600;line-height:1.5}mint-alert>.mint-alert-dismiss{cursor:pointer;background:0 0;border:0;border-radius:.25rem;flex-shrink:0;padding:.25rem}mint-alert>.mint-alert-dismiss:hover{background:#0000001a}:where(.dark,.dark *) mint-alert>.mint-alert-dismiss:hover{background:#ffffff1a}mint-alert>.mint-alert-close-icon{width:1rem;height:1rem;color:var(--mint-color-text-secondary,#66736a)}mint-alert>.mint-alert-body{background:var(--mint-color-surface-raised,#fff);padding:1rem 1.25rem;font-size:.875rem;line-height:1.5}mint-alert>.mint-alert-body>*+*{margin-block-start:.75rem}
337
337
 
338
338
  /* mint-ui aggregate component: back-button */
339
339
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
package/dist/index.js CHANGED
@@ -9618,20 +9618,24 @@ var Wn = class extends HTMLElement {
9618
9618
  let d = this._sorting;
9619
9619
  this._sorting = !1, this._sortingColumnData = null, this.dispatchEvent(new CustomEvent("loaded", { detail: { rows: this._rows } })), this._updateSearchIcon();
9620
9620
  let f = `tbody[data-mint-rt-tbody="${this._tableId}"]`, p = !!this.querySelector(f);
9621
- if (this._virtualScrollActive() && this._type === "ajax") p || this.render(), s.forEach((e, t) => {
9622
- this._virtualRowCache.set(o + t, e);
9623
- }), this._virtualInvalidate(), o === 0 ? queueMicrotask(() => this._scrollVirtualTableTopIntoView()) : this._scheduleVirtualWindowSync(), this._loadingPage, this._loadingPage = null, this._updatePagination(), setTimeout(() => {
9624
- let e = this._paginationMountedRoot();
9625
- e && e.querySelectorAll("mint-button[data-action=\"page\"]").forEach((e) => {
9626
- "render" in e && typeof e.render == "function" && e.render();
9627
- });
9628
- }, 0);
9629
- else if (this.querySelector(`#${this._tableId}`)?.closest("table")?.querySelector("tbody")) {
9621
+ if (this._virtualScrollActive() && this._type === "ajax") {
9622
+ p || this.render(), s.forEach((e, t) => {
9623
+ this._virtualRowCache.set(o + t, e);
9624
+ }), this._virtualInvalidate(), o === 0 ? queueMicrotask(() => this._scrollVirtualTableTopIntoView()) : this._scheduleVirtualWindowSync();
9625
+ let e = this._loadingPage;
9626
+ this._loadingPage = null, this._updatePagination(), e !== null && this._schedulePaginatedFirstRowIntoView(), setTimeout(() => {
9627
+ let e = this._paginationMountedRoot();
9628
+ e && e.querySelectorAll("mint-button[data-action=\"page\"]").forEach((e) => {
9629
+ "render" in e && typeof e.render == "function" && e.render();
9630
+ });
9631
+ }, 0);
9632
+ } else if (this.querySelector(`#${this._tableId}`)?.closest("table")?.querySelector("tbody")) {
9630
9633
  if (d) {
9631
9634
  let e = this._loading, t = this._fetching;
9632
9635
  this._loading = !1, this._fetching = !1, this._updateTableBody(), this._loading = e, this._fetching = t;
9633
9636
  } else this._updateTableBody();
9634
- this._loadingPage, this._loadingPage = null, this._updatePagination(), setTimeout(() => {
9637
+ let e = this._loadingPage;
9638
+ this._loadingPage = null, this._updatePagination(), e !== null && this._schedulePaginatedFirstRowIntoView(), setTimeout(() => {
9635
9639
  let e = this._paginationMountedRoot();
9636
9640
  e && e.querySelectorAll("mint-button[data-action=\"page\"]").forEach((e) => {
9637
9641
  "render" in e && typeof e.render == "function" && e.render();
@@ -10378,7 +10382,34 @@ var Wn = class extends HTMLElement {
10378
10382
  }
10379
10383
  _goToPage(e) {
10380
10384
  let t = this._lastPage || Math.ceil(this._rows.length / this._perPage);
10381
- e > t && (e = t), e < 1 && (e = 1), e !== this._currentPage && (this._currentPage = e, this._offset = (e - 1) * this._perPage, this._updatePageInUrl(e), this._type === "ajax" ? (this._loadingPage = e, this._updatePagination(), this._fetchData()) : this.render());
10385
+ e > t && (e = t), e < 1 && (e = 1), e !== this._currentPage && (this._currentPage = e, this._offset = (e - 1) * this._perPage, this._updatePageInUrl(e), this._type === "ajax" ? (this._loadingPage = e, this._updatePagination(), this._fetchData()) : (this.render(), this._schedulePaginatedFirstRowIntoView()));
10386
+ }
10387
+ _schedulePaginatedFirstRowIntoView() {
10388
+ requestAnimationFrame(() => requestAnimationFrame(() => {
10389
+ if (!this.isConnected) return;
10390
+ let e = this._useMobileListLayout() ? this.querySelector(`ul[data-mint-rt-mobile-list="${this._tableId}"]`) : null, t = this.querySelector(`#${this._tableId}`)?.closest("table"), n = e?.querySelector(":scope > li") || t?.querySelector("tbody tr[data-row-index=\"0\"]");
10391
+ if (!n) return;
10392
+ let r = this._virtualScrollStickyOverlapPx(t), i = this._findVerticalScrollContainer(n), a = n.getBoundingClientRect();
10393
+ if (i) {
10394
+ let e = i.getBoundingClientRect();
10395
+ i.scrollTo({
10396
+ top: i.scrollTop + a.top - e.top - r - 8,
10397
+ behavior: "smooth"
10398
+ });
10399
+ } else window.scrollTo({
10400
+ top: Math.max(0, window.scrollY + a.top - r - 8),
10401
+ behavior: "smooth"
10402
+ });
10403
+ }));
10404
+ }
10405
+ _findVerticalScrollContainer(e) {
10406
+ let t = e.parentElement;
10407
+ for (; t && t !== document.body && t !== document.documentElement;) {
10408
+ let e = getComputedStyle(t).overflowY;
10409
+ if (/(auto|scroll|overlay)/.test(e) && t.scrollHeight > t.clientHeight) return t;
10410
+ t = t.parentElement;
10411
+ }
10412
+ return null;
10382
10413
  }
10383
10414
  _handleButtonClick(e) {
10384
10415
  if (this._configuration) switch (e.type) {
@@ -10422,7 +10453,7 @@ var Wn = class extends HTMLElement {
10422
10453
  }
10423
10454
  _getStyle(e) {
10424
10455
  let t = "";
10425
- return (e.nowrap || e.actions) && (t += "white-space: nowrap;"), e.offsetLeft && (t += `left: ${e.offsetLeft} !important;`), e.offsetRight && (t += `right: ${e.offsetRight} !important;`), e.width && (t += `min-width: ${e.width}px; max-width: ${e.width}px;`), t;
10456
+ return (e.nowrap || e.actions) && (t += "white-space: nowrap;"), e.offsetLeft && (t += `left: ${e.offsetLeft} !important;`), e.offsetRight && (t += `right: ${e.offsetRight} !important;`), e.width && (t += `min-width: ${e.width}px; max-width: ${e.width}px;`), e.minWidth && (t += `min-width: ${this._escapeHtml(e.minWidth)};`), t;
10426
10457
  }
10427
10458
  _getClasses(e, t = !1) {
10428
10459
  let n = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monobill-mintui",
3
- "version": "0.6.660",
3
+ "version": "0.6.662",
4
4
  "description": "Framework-independent HTML custom elements with component-scoped CSS.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",