monobill-mintui 0.6.618 → 0.6.620

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.
Files changed (101) hide show
  1. package/dist/components/alert/browser.js +3 -3
  2. package/dist/components/alert/index.cjs +1 -1
  3. package/dist/components/alert/index.js +3 -3
  4. package/dist/components/back-button/browser.js +2 -2
  5. package/dist/components/back-button/index.cjs +1 -1
  6. package/dist/components/back-button/index.js +2 -2
  7. package/dist/components/bottom-navigation/browser.js +2 -2
  8. package/dist/components/bottom-navigation/index.cjs +1 -1
  9. package/dist/components/bottom-navigation/index.js +2 -2
  10. package/dist/components/button/browser.js +1 -1
  11. package/dist/components/button/index.cjs +1 -1
  12. package/dist/components/button/index.js +1 -1
  13. package/dist/components/chart/browser.js +110 -99
  14. package/dist/components/chart/index.cjs +3 -3
  15. package/dist/components/chart/index.js +110 -99
  16. package/dist/components/checkbox/browser.js +2 -2
  17. package/dist/components/checkbox/index.cjs +1 -1
  18. package/dist/components/checkbox/index.js +2 -2
  19. package/dist/components/chip/browser.js +1 -1
  20. package/dist/components/chip/index.cjs +1 -1
  21. package/dist/components/chip/index.js +1 -1
  22. package/dist/components/chunks/{button-BZ25puI2.js → button-BYQbRAwl.js} +2 -2
  23. package/dist/components/chunks/{button-CgYC1lB7.js → button-DbxqmBWQ.js} +1 -1
  24. package/dist/components/chunks/caret-down-CeADWana.js +1 -0
  25. package/dist/components/chunks/{caret-down-CDGP3GB2.js → caret-down-DD9Ie5js.js} +1 -1
  26. package/dist/components/chunks/caret-right-3V_JDnOP.js +1 -0
  27. package/dist/components/chunks/{caret-right-CQ5hBjsy.js → caret-right-fnCcTJKp.js} +1 -1
  28. package/dist/components/chunks/{caret-up-1paz-pnI.js → caret-up-CK7JOG6X.js} +1 -1
  29. package/dist/components/chunks/caret-up-hwsMK8n3.js +1 -0
  30. package/dist/components/chunks/{chip-p6RXdzHa.js → chip-08aR26vc.js} +3 -3
  31. package/dist/components/chunks/{chip-Bb1Epj5C.js → chip-8BYSJ7yI.js} +1 -1
  32. package/dist/components/chunks/close-BdZJfr6m.js +1 -0
  33. package/dist/components/chunks/{close-y8q0rMSE.js → close-CFxX3WCG.js} +1 -1
  34. package/dist/components/chunks/icon-B8p3Co0-.js +1 -0
  35. package/dist/components/chunks/{icon-B01tq_aJ.js → icon-BWUYe89V.js} +4 -3
  36. package/dist/components/chunks/{icon-BcsWL4kZ.js → icon-B_7c8b8e.js} +1 -1
  37. package/dist/components/chunks/icon-CSqBgTae.js +1 -0
  38. package/dist/components/chunks/{input-BzrCXBg4.js → input-Dwrs8tJH.js} +4 -4
  39. package/dist/components/chunks/{input-DnVgj6QV.js → input-lLl8cB6r.js} +1 -1
  40. package/dist/components/chunks/{modal-9S-FF3_o.js → modal-CNBmdA63.js} +1 -1
  41. package/dist/components/chunks/{modal-D7KKb4f9.js → modal-CPcIPIO7.js} +2 -2
  42. package/dist/components/chunks/search-Bsaoxa30.js +1 -0
  43. package/dist/components/chunks/{search-Dd28O4mG.js → search-xHKqAXph.js} +1 -1
  44. package/dist/components/confirm-action/browser.js +2 -2
  45. package/dist/components/confirm-action/index.cjs +1 -1
  46. package/dist/components/confirm-action/index.js +2 -2
  47. package/dist/components/date-picker/browser.js +4 -4
  48. package/dist/components/date-picker/index.cjs +1 -1
  49. package/dist/components/date-picker/index.js +4 -4
  50. package/dist/components/dropzone/browser.js +3 -3
  51. package/dist/components/dropzone/index.cjs +1 -1
  52. package/dist/components/dropzone/index.js +3 -3
  53. package/dist/components/icon/browser.js +1 -1
  54. package/dist/components/icon/index.cjs +1 -1
  55. package/dist/components/icon/index.js +1 -1
  56. package/dist/components/input/browser.js +1 -1
  57. package/dist/components/input/index.cjs +1 -1
  58. package/dist/components/input/index.js +1 -1
  59. package/dist/components/modal/browser.js +1 -1
  60. package/dist/components/modal/index.cjs +1 -1
  61. package/dist/components/modal/index.js +1 -1
  62. package/dist/components/navigation/browser.js +2 -2
  63. package/dist/components/navigation/index.cjs +1 -1
  64. package/dist/components/navigation/index.js +2 -2
  65. package/dist/components/off-canvas/browser.js +2 -2
  66. package/dist/components/off-canvas/index.cjs +1 -1
  67. package/dist/components/off-canvas/index.js +2 -2
  68. package/dist/components/resource-table/browser.js +7 -7
  69. package/dist/components/resource-table/index.cjs +1 -1
  70. package/dist/components/resource-table/index.js +7 -7
  71. package/dist/components/search/browser.js +7 -7
  72. package/dist/components/search/index.cjs +1 -1
  73. package/dist/components/search/index.js +7 -7
  74. package/dist/components/select/browser.js +4 -4
  75. package/dist/components/select/index.cjs +1 -1
  76. package/dist/components/select/index.js +4 -4
  77. package/dist/components/side-navigation/browser.js +4 -4
  78. package/dist/components/side-navigation/index.cjs +1 -1
  79. package/dist/components/side-navigation/index.js +4 -4
  80. package/dist/components/switch/browser.js +2 -2
  81. package/dist/components/switch/index.cjs +1 -1
  82. package/dist/components/switch/index.js +2 -2
  83. package/dist/components/tags/browser.js +3 -3
  84. package/dist/components/tags/index.cjs +1 -1
  85. package/dist/components/tags/index.js +3 -3
  86. package/dist/components/time-picker/browser.js +2 -2
  87. package/dist/components/time-picker/index.cjs +1 -1
  88. package/dist/components/time-picker/index.js +2 -2
  89. package/dist/icons/pin.svg +1 -3
  90. package/dist/index.cjs +4 -4
  91. package/dist/index.css +1 -1
  92. package/dist/index.js +115 -103
  93. package/dist/input.css +1 -1
  94. package/package.json +1 -1
  95. package/dist/components/chunks/caret-down-C5a1fGvt.js +0 -1
  96. package/dist/components/chunks/caret-right-BMyWflHN.js +0 -1
  97. package/dist/components/chunks/caret-up-BJAyfrty.js +0 -1
  98. package/dist/components/chunks/close-Bg0kqvrY.js +0 -1
  99. package/dist/components/chunks/icon-DNWs0suS.js +0 -1
  100. package/dist/components/chunks/icon-uMo_iGkX.js +0 -1
  101. package/dist/components/chunks/search-C5jD2OC-.js +0 -1
@@ -14,10 +14,10 @@ __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('text', '../../text.css')
15
15
  __mintLoadStyle('icon', '../../icon.css')
16
16
  __mintLoadStyle('alert', '../../alert.css')
17
- import { a as e } from "../chunks/icon-B01tq_aJ.js";
17
+ import { a as e } from "../chunks/icon-BWUYe89V.js";
18
18
  import { t } from "../chunks/register-element-BFYmIynH.js";
19
- import "../chunks/icon-DNWs0suS.js";
20
- import "../chunks/close-y8q0rMSE.js";
19
+ import "../chunks/icon-B8p3Co0-.js";
20
+ import "../chunks/close-CFxX3WCG.js";
21
21
  import "../chunks/text-Bmfl6CxJ.js";
22
22
  e({
23
23
  name: "info",
@@ -1 +1 @@
1
- const e=require(`../chunks/icon-BcsWL4kZ.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-uMo_iGkX.js`),require(`../chunks/close-Bg0kqvrY.js`),require(`../chunks/text-Cpl5ljSe.js`),e.a({name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`heading`,`dismissable`,`tone`]}constructor(){super(),this._headingElement=null,this._iconElement=null,this._dismissButton=null,this._headerWrapper=null,this._bodyWrapper=null,this._dismissHandler=null,this._rendering=!1,this._childObserver=null,this._normalizingChildren=!1}connectedCallback(){this.render()}disconnectedCallback(){this._childObserver?.disconnect(),this._dismissButton?.removeEventListener(`click`,this._dismissHandler),this._dismissHandler=null}get heading(){return this.getAttribute(`heading`)??``}set heading(e){this.setAttribute(`heading`,String(e??``))}get tone(){return this.getTone()}set tone(e){this.setAttribute(`tone`,e)}get dismissable(){return this.isDismissable()}set dismissable(e){this.setAttribute(`dismissable`,String(!!e))}get dismissible(){return this.dismissable}set dismissible(e){this.dismissable=e}cleanupDismissListener(){this._dismissButton&&this._dismissHandler&&this._dismissButton.removeEventListener(`click`,this._dismissHandler),this._dismissHandler=null}attributeChangedCallback(e,t,n){t!==n&&this.render()}getHeading(){return this.getAttribute(`heading`)||``}getTone(){let e=this.getAttribute(`tone`);return e===`info`||e===`success`||e===`warning`||e===`danger`?e:`info`}isDismissable(){return this.getAttribute(`dismissable`)===`true`}getIconName(){switch(this.getTone()){case`info`:return`info`;case`success`:return`success`;case`warning`:return`warning`;case`danger`:return`error`;default:return`info`}}getAriaLive(){return this.getTone()===`danger`?`assertive`:`polite`}render(){if(!(this._rendering||!this.isConnected)){this._rendering=!0;try{this.renderContent()}finally{this._rendering=!1}}}renderContent(){this._childObserver?.disconnect();let e=this.getTone(),t=this.getHeading(),n=this.isDismissable(),r=this.getAriaLive();this.setAttribute(`role`,e===`danger`?`alert`:`status`),this.setAttribute(`aria-live`,r),e===`danger`?this.setAttribute(`aria-atomic`,`true`):this.removeAttribute(`aria-atomic`);let i=[];for(this._bodyWrapper?Array.from(this._bodyWrapper.childNodes).forEach(e=>{i.push(e)}):Array.from(this.childNodes).forEach(e=>{e!==this._headerWrapper&&e!==this._bodyWrapper&&e!==this._iconElement&&e!==this._headingElement&&e!==this._dismissButton&&i.push(e)}),this.cleanupDismissListener();this.firstChild;)this.removeChild(this.firstChild);if(this._headerWrapper=null,this._bodyWrapper=null,this._iconElement=null,this._headingElement=null,this._dismissButton=null,this._headerWrapper=document.createElement(`div`),this._headerWrapper.className=`mint-alert-header`,this._iconElement=document.createElement(`mint-icon`),this._iconElement.setAttribute(`name`,this.getIconName()),this._iconElement.className=`mint-alert-icon`,this._headerWrapper.appendChild(this._iconElement),this._headingElement=document.createElement(`mint-text`),this._headingElement.className=`mint-alert-heading`,this._headingElement.textContent=t||``,this._headerWrapper.appendChild(this._headingElement),n){this._dismissButton=document.createElement(`button`),this._dismissButton.className=`mint-alert-dismiss`,this._dismissButton.setAttribute(`aria-label`,`Dismiss alert`),this._dismissButton.setAttribute(`type`,`button`);let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`close`),e.className=`mint-alert-close-icon`,this._dismissButton.appendChild(e),this._dismissHandler=e=>{e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent(`dismissed`,{bubbles:!0,composed:!0})),this.remove()},this._dismissButton.addEventListener(`click`,this._dismissHandler),this._headerWrapper.appendChild(this._dismissButton)}this._bodyWrapper=document.createElement(`div`),this._bodyWrapper.className=`mint-alert-body`,i.forEach(e=>{this._bodyWrapper.appendChild(e)}),this.appendChild(this._headerWrapper),this.appendChild(this._bodyWrapper),this._childObserver||=new MutationObserver(()=>this.normalizeConsumerChildren()),this._childObserver.observe(this,{childList:!0})}normalizeConsumerChildren(){if(!(this._normalizingChildren||!this._bodyWrapper)){this._normalizingChildren=!0;try{Array.from(this.childNodes).forEach(e=>{e!==this._headerWrapper&&e!==this._bodyWrapper&&this._bodyWrapper.appendChild(e)})}finally{this._normalizingChildren=!1}}}};customElements.get(`mint-alert`)||t.t(`mint-alert`,n),module.exports=n;
1
+ const e=require(`../chunks/icon-B_7c8b8e.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CSqBgTae.js`),require(`../chunks/close-BdZJfr6m.js`),require(`../chunks/text-Cpl5ljSe.js`),e.a({name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`heading`,`dismissable`,`tone`]}constructor(){super(),this._headingElement=null,this._iconElement=null,this._dismissButton=null,this._headerWrapper=null,this._bodyWrapper=null,this._dismissHandler=null,this._rendering=!1,this._childObserver=null,this._normalizingChildren=!1}connectedCallback(){this.render()}disconnectedCallback(){this._childObserver?.disconnect(),this._dismissButton?.removeEventListener(`click`,this._dismissHandler),this._dismissHandler=null}get heading(){return this.getAttribute(`heading`)??``}set heading(e){this.setAttribute(`heading`,String(e??``))}get tone(){return this.getTone()}set tone(e){this.setAttribute(`tone`,e)}get dismissable(){return this.isDismissable()}set dismissable(e){this.setAttribute(`dismissable`,String(!!e))}get dismissible(){return this.dismissable}set dismissible(e){this.dismissable=e}cleanupDismissListener(){this._dismissButton&&this._dismissHandler&&this._dismissButton.removeEventListener(`click`,this._dismissHandler),this._dismissHandler=null}attributeChangedCallback(e,t,n){t!==n&&this.render()}getHeading(){return this.getAttribute(`heading`)||``}getTone(){let e=this.getAttribute(`tone`);return e===`info`||e===`success`||e===`warning`||e===`danger`?e:`info`}isDismissable(){return this.getAttribute(`dismissable`)===`true`}getIconName(){switch(this.getTone()){case`info`:return`info`;case`success`:return`success`;case`warning`:return`warning`;case`danger`:return`error`;default:return`info`}}getAriaLive(){return this.getTone()===`danger`?`assertive`:`polite`}render(){if(!(this._rendering||!this.isConnected)){this._rendering=!0;try{this.renderContent()}finally{this._rendering=!1}}}renderContent(){this._childObserver?.disconnect();let e=this.getTone(),t=this.getHeading(),n=this.isDismissable(),r=this.getAriaLive();this.setAttribute(`role`,e===`danger`?`alert`:`status`),this.setAttribute(`aria-live`,r),e===`danger`?this.setAttribute(`aria-atomic`,`true`):this.removeAttribute(`aria-atomic`);let i=[];for(this._bodyWrapper?Array.from(this._bodyWrapper.childNodes).forEach(e=>{i.push(e)}):Array.from(this.childNodes).forEach(e=>{e!==this._headerWrapper&&e!==this._bodyWrapper&&e!==this._iconElement&&e!==this._headingElement&&e!==this._dismissButton&&i.push(e)}),this.cleanupDismissListener();this.firstChild;)this.removeChild(this.firstChild);if(this._headerWrapper=null,this._bodyWrapper=null,this._iconElement=null,this._headingElement=null,this._dismissButton=null,this._headerWrapper=document.createElement(`div`),this._headerWrapper.className=`mint-alert-header`,this._iconElement=document.createElement(`mint-icon`),this._iconElement.setAttribute(`name`,this.getIconName()),this._iconElement.className=`mint-alert-icon`,this._headerWrapper.appendChild(this._iconElement),this._headingElement=document.createElement(`mint-text`),this._headingElement.className=`mint-alert-heading`,this._headingElement.textContent=t||``,this._headerWrapper.appendChild(this._headingElement),n){this._dismissButton=document.createElement(`button`),this._dismissButton.className=`mint-alert-dismiss`,this._dismissButton.setAttribute(`aria-label`,`Dismiss alert`),this._dismissButton.setAttribute(`type`,`button`);let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`close`),e.className=`mint-alert-close-icon`,this._dismissButton.appendChild(e),this._dismissHandler=e=>{e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent(`dismissed`,{bubbles:!0,composed:!0})),this.remove()},this._dismissButton.addEventListener(`click`,this._dismissHandler),this._headerWrapper.appendChild(this._dismissButton)}this._bodyWrapper=document.createElement(`div`),this._bodyWrapper.className=`mint-alert-body`,i.forEach(e=>{this._bodyWrapper.appendChild(e)}),this.appendChild(this._headerWrapper),this.appendChild(this._bodyWrapper),this._childObserver||=new MutationObserver(()=>this.normalizeConsumerChildren()),this._childObserver.observe(this,{childList:!0})}normalizeConsumerChildren(){if(!(this._normalizingChildren||!this._bodyWrapper)){this._normalizingChildren=!0;try{Array.from(this.childNodes).forEach(e=>{e!==this._headerWrapper&&e!==this._bodyWrapper&&this._bodyWrapper.appendChild(e)})}finally{this._normalizingChildren=!1}}}};customElements.get(`mint-alert`)||t.t(`mint-alert`,n),module.exports=n;
@@ -2,10 +2,10 @@ import '../../theme.css'
2
2
  import '../../text.css'
3
3
  import '../../icon.css'
4
4
  import '../../alert.css'
5
- import { a as e } from "../chunks/icon-B01tq_aJ.js";
5
+ import { a as e } from "../chunks/icon-BWUYe89V.js";
6
6
  import { t } from "../chunks/register-element-BFYmIynH.js";
7
- import "../chunks/icon-DNWs0suS.js";
8
- import "../chunks/close-y8q0rMSE.js";
7
+ import "../chunks/icon-B8p3Co0-.js";
8
+ import "../chunks/close-CFxX3WCG.js";
9
9
  import "../chunks/text-Bmfl6CxJ.js";
10
10
  e({
11
11
  name: "info",
@@ -15,9 +15,9 @@ __mintLoadStyle('button', '../../button.css')
15
15
  __mintLoadStyle('spinner', '../../spinner.css')
16
16
  __mintLoadStyle('icon', '../../icon.css')
17
17
  __mintLoadStyle('back-button', '../../back-button.css')
18
- import { a as e } from "../chunks/icon-B01tq_aJ.js";
18
+ import { a as e } from "../chunks/icon-BWUYe89V.js";
19
19
  import { t } from "../chunks/register-element-BFYmIynH.js";
20
- import "../chunks/icon-DNWs0suS.js";
20
+ import "../chunks/icon-B8p3Co0-.js";
21
21
  /* empty css */
22
22
  import "../chunks/spinner-BsaFHuS6.js";
23
23
  e({
@@ -1 +1 @@
1
- const e=require(`../chunks/icon-BcsWL4kZ.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-uMo_iGkX.js`),/* empty css */require(`../chunks/spinner-DbTohC6i.js`),e.a({name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`variant`,`tone`,`disabled`,`loading`,`button-type`,`type`,`full-width`,`icon-position`,`icon`]}constructor(){super(),this._button=null,this._clickHandler=null,this._isHandlingClick=!1}connectedCallback(){this.render(),this._button&&this.setupEventListeners()}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getVariant(){return this.getAttribute(`variant`)||`solid`}getTone(){return this.getAttribute(`tone`)||`neutral`}isDisabled(){return this.hasAttribute(`disabled`)}isLoading(){return this.hasAttribute(`loading`)}getType(){return(this.getAttribute(`type`)||this.getAttribute(`button-type`)||`default`)===`submit`?`submit`:`button`}isFullWidth(){return this.hasAttribute(`full-width`)}getIconPosition(){return this.getAttribute(`icon-position`)||`left`}getIcon(){return this.getAttribute(`icon`)||``}isIconOnly(){if(!(this.getIcon()||this._button?.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`)))return!1;let e=this._button?.querySelector(`.mint-button-content`);if(e&&e.textContent.trim())return!1;if(this._button){for(let e=this._button.firstChild;e;e=e.nextSibling)if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()||e.nodeType===Node.ELEMENT_NODE&&e.tagName!==`MINT-ICON`&&e.tagName!==`MINT-SPINNER`&&!e.querySelector?.(`mint-spinner`)&&!e.hasAttribute?.(`slot`)&&e.className!==`mint-button-icon`&&!(e.className===`mr-2`&&e.querySelector(`mint-spinner`))&&e.textContent.trim())return!1}return!0}getButtonClasses(){return[`mint-button-core`,`mint-button-`+this.getVariant(),`mint-button-tone-`+this.getTone(),this.isIconOnly()?`mint-button-icon-only`:``,this.isFullWidth()?`mint-button-full-width`:``].filter(Boolean).join(` `)}render(){let e=this.isDisabled()||this.isLoading(),t=this.getType();if(!this._button){for(this._button=document.createElement(`button`);this.firstChild;)this._button.appendChild(this.firstChild);this.appendChild(this._button),this.setupEventListeners()}this._button.type=t,this._button.disabled=e;let n=this._button.querySelector(`mint-spinner`);if(this.isLoading())if(n)n.setAttribute(`data-button-variant`,this.getVariant()),n.setAttribute(`data-button-tone`,this.getTone()),n.render();else{let e=document.createElement(`span`);e.className=`mint-spinner-wrap`;let t=document.createElement(`mint-spinner`);t.setAttribute(`size`,`default`),t.setAttribute(`data-button-variant`,this.getVariant()),t.setAttribute(`data-button-tone`,this.getTone()),t.style.width=`0.875rem`,t.style.height=`0.875rem`,e.appendChild(t),this._button.insertBefore(e,this._button.firstChild)}else n&&n.parentElement?.remove();for(;this.firstChild&&this.firstChild!==this._button;)this._button.appendChild(this.firstChild);let r=this.getIcon(),i=this._button.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`);r?(i&&i.tagName!==`MINT-ICON`&&(i.remove(),i=null),!i||i.tagName!==`MINT-ICON`?(i=document.createElement(`mint-icon`),i.setAttribute(`name`,r),i.className=`mint-button-icon`):i.setAttribute(`name`,r)):i&&i.tagName===`MINT-ICON`&&(i.remove(),i=null),i||=this._button.querySelector(`[slot="icon"], .mint-button-icon`);let a=this.getIconPosition(),o=this._button.querySelector(`.mint-button-content`);if(o){let e=i&&i.tagName===`MINT-ICON`;if(i&&!i.parentElement){let t=this._button.querySelector(`mint-spinner`)?.parentElement;e||a===`left`?t?t.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o):o.insertAdjacentElement(`afterend`,i)}else if(i&&(e||a===`left`)&&i.nextSibling!==o){i.remove();let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o)}else i&&!e&&a===`right`&&i.previousSibling!==o&&(i.remove(),o.insertAdjacentElement(`afterend`,i))}else{let e=[];for(let t=this._button.firstChild;t;t=t.nextSibling)t.tagName!==`MINT-SPINNER`&&!t.querySelector?.(`mint-spinner`)&&t!==i&&!t.hasAttribute?.(`slot`)&&!(t.className===`mr-2`&&t.querySelector(`mint-spinner`))&&e.push(t);if(e.length>0){o=document.createElement(`span`),o.className=`mint-button-content`,e.forEach(e=>{o.appendChild(e)});let t=this._button.querySelector(`mint-spinner`)?.parentElement;i&&a===`left`?t?(t.insertAdjacentElement(`afterend`,i),i.insertAdjacentElement(`afterend`,o)):(this._button.insertBefore(i,this._button.firstChild),i.insertAdjacentElement(`afterend`,o)):i&&a===`right`?t?(t.insertAdjacentElement(`afterend`,o),o.insertAdjacentElement(`afterend`,i)):(this._button.insertBefore(o,this._button.firstChild),o.insertAdjacentElement(`afterend`,i)):t?t.insertAdjacentElement(`afterend`,o):this._button.insertBefore(o,this._button.firstChild)}else if(i&&i.tagName===`MINT-ICON`&&!i.parentElement){let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,this._button.firstChild)}}let s=this.isIconOnly();i&&(i.classList.contains(`mint-button-icon`)||i.classList.add(`mint-button-icon`),i.classList.remove(`mint-icon-leading`,`mint-icon-trailing`),s?i.tagName===`MINT-ICON`?(i.style.width=`1rem`,i.style.height=`1rem`,i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`):(i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`,i.tagName===`svg`&&(i.style.width=`1rem`,i.style.height=`1rem`)):a===`left`?i.classList.add(`mint-icon-leading`):i.classList.add(`mint-icon-trailing`));let c=this.getButtonClasses();this._button.className=c}setupEventListeners(){this._button&&!this._clickHandler&&(this._clickHandler=this.handleClick.bind(this),this._button.addEventListener(`click`,this._clickHandler,!0),this._button.addEventListener(`mousedown`,this._handleMouseDown),this._button.addEventListener(`mouseup`,this._handleMouseUp),this._button.addEventListener(`mouseleave`,this._handleMouseLeave),this._button.addEventListener(`touchstart`,this._handleTouchStart),this._button.addEventListener(`touchend`,this._handleTouchEnd),this._button.addEventListener(`touchcancel`,this._handleTouchCancel))}removeEventListeners(){this._button&&(this._clickHandler&&=(this._button.removeEventListener(`click`,this._clickHandler,!0),null),this._button.removeEventListener(`mousedown`,this._handleMouseDown),this._button.removeEventListener(`mouseup`,this._handleMouseUp),this._button.removeEventListener(`mouseleave`,this._handleMouseLeave),this._button.removeEventListener(`touchstart`,this._handleTouchStart),this._button.removeEventListener(`touchend`,this._handleTouchEnd),this._button.removeEventListener(`touchcancel`,this._handleTouchCancel))}_handleMouseDown=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleMouseUp=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleMouseLeave=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchStart=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleTouchEnd=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchCancel=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};handleClick(e){if(this.isDisabled()||this.isLoading()){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();return}if(e.stopPropagation(),e.stopImmediatePropagation(),this._isHandlingClick){e.preventDefault();return}this._isHandlingClick=!0,e.preventDefault(),this.dispatchEvent(new CustomEvent(`click`,{detail:{originalEvent:e},bubbles:!0,cancelable:!0,composed:!0})),requestAnimationFrame(()=>{this._isHandlingClick=!1})}};typeof customElements<`u`&&!customElements.get(`mint-button`)&&t.t(`mint-button`,n);var r=class extends HTMLElement{static get observedAttributes(){return[`href`,`fallback-href`]}constructor(){super(),this._historyDepth=0,this._maxBackAttempts=10,this._backAttempts=0}connectedCallback(){this.render(),this._setupHistoryTracking()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_setupHistoryTracking(){window.addEventListener(`popstate`,()=>{this._backAttempts=0}),this._historyDepth=window.history.length}getFallbackHref(){return this.getAttribute(`fallback-href`)||this.getAttribute(`href`)||`/`}handleClick(e){if(e.preventDefault(),e.stopPropagation(),window.history.length>1&&this._backAttempts<this._maxBackAttempts&&this._backAttempts===0){this._backAttempts++;let e=window.location.href,t=Date.now();window.history.back(),setTimeout(()=>{Date.now()-t,window.location.href===e?this._navigateToFallback():setTimeout(()=>{this._backAttempts=0},500)},200)}else this._navigateToFallback()}_navigateToFallback(){let e=this.getFallbackHref();if(this._backAttempts=0,e.startsWith(`/`)&&!e.startsWith(`//`))try{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`));return}catch{}window.location.href=e}render(){this._button||(this._button=document.createElement(`mint-button`),this._button.setAttribute(`variant`,`neutral`),this._button.setAttribute(`icon`,`arrow-left`),this._button.addEventListener(`click`,e=>this.handleClick(e)),this.appendChild(this._button))}};typeof customElements<`u`&&!customElements.get(`mint-back-button`)&&t.t(`mint-back-button`,r),module.exports=r;
1
+ const e=require(`../chunks/icon-B_7c8b8e.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CSqBgTae.js`),/* empty css */require(`../chunks/spinner-DbTohC6i.js`),e.a({name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`variant`,`tone`,`disabled`,`loading`,`button-type`,`type`,`full-width`,`icon-position`,`icon`]}constructor(){super(),this._button=null,this._clickHandler=null,this._isHandlingClick=!1}connectedCallback(){this.render(),this._button&&this.setupEventListeners()}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getVariant(){return this.getAttribute(`variant`)||`solid`}getTone(){return this.getAttribute(`tone`)||`neutral`}isDisabled(){return this.hasAttribute(`disabled`)}isLoading(){return this.hasAttribute(`loading`)}getType(){return(this.getAttribute(`type`)||this.getAttribute(`button-type`)||`default`)===`submit`?`submit`:`button`}isFullWidth(){return this.hasAttribute(`full-width`)}getIconPosition(){return this.getAttribute(`icon-position`)||`left`}getIcon(){return this.getAttribute(`icon`)||``}isIconOnly(){if(!(this.getIcon()||this._button?.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`)))return!1;let e=this._button?.querySelector(`.mint-button-content`);if(e&&e.textContent.trim())return!1;if(this._button){for(let e=this._button.firstChild;e;e=e.nextSibling)if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()||e.nodeType===Node.ELEMENT_NODE&&e.tagName!==`MINT-ICON`&&e.tagName!==`MINT-SPINNER`&&!e.querySelector?.(`mint-spinner`)&&!e.hasAttribute?.(`slot`)&&e.className!==`mint-button-icon`&&!(e.className===`mr-2`&&e.querySelector(`mint-spinner`))&&e.textContent.trim())return!1}return!0}getButtonClasses(){return[`mint-button-core`,`mint-button-`+this.getVariant(),`mint-button-tone-`+this.getTone(),this.isIconOnly()?`mint-button-icon-only`:``,this.isFullWidth()?`mint-button-full-width`:``].filter(Boolean).join(` `)}render(){let e=this.isDisabled()||this.isLoading(),t=this.getType();if(!this._button){for(this._button=document.createElement(`button`);this.firstChild;)this._button.appendChild(this.firstChild);this.appendChild(this._button),this.setupEventListeners()}this._button.type=t,this._button.disabled=e;let n=this._button.querySelector(`mint-spinner`);if(this.isLoading())if(n)n.setAttribute(`data-button-variant`,this.getVariant()),n.setAttribute(`data-button-tone`,this.getTone()),n.render();else{let e=document.createElement(`span`);e.className=`mint-spinner-wrap`;let t=document.createElement(`mint-spinner`);t.setAttribute(`size`,`default`),t.setAttribute(`data-button-variant`,this.getVariant()),t.setAttribute(`data-button-tone`,this.getTone()),t.style.width=`0.875rem`,t.style.height=`0.875rem`,e.appendChild(t),this._button.insertBefore(e,this._button.firstChild)}else n&&n.parentElement?.remove();for(;this.firstChild&&this.firstChild!==this._button;)this._button.appendChild(this.firstChild);let r=this.getIcon(),i=this._button.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`);r?(i&&i.tagName!==`MINT-ICON`&&(i.remove(),i=null),!i||i.tagName!==`MINT-ICON`?(i=document.createElement(`mint-icon`),i.setAttribute(`name`,r),i.className=`mint-button-icon`):i.setAttribute(`name`,r)):i&&i.tagName===`MINT-ICON`&&(i.remove(),i=null),i||=this._button.querySelector(`[slot="icon"], .mint-button-icon`);let a=this.getIconPosition(),o=this._button.querySelector(`.mint-button-content`);if(o){let e=i&&i.tagName===`MINT-ICON`;if(i&&!i.parentElement){let t=this._button.querySelector(`mint-spinner`)?.parentElement;e||a===`left`?t?t.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o):o.insertAdjacentElement(`afterend`,i)}else if(i&&(e||a===`left`)&&i.nextSibling!==o){i.remove();let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o)}else i&&!e&&a===`right`&&i.previousSibling!==o&&(i.remove(),o.insertAdjacentElement(`afterend`,i))}else{let e=[];for(let t=this._button.firstChild;t;t=t.nextSibling)t.tagName!==`MINT-SPINNER`&&!t.querySelector?.(`mint-spinner`)&&t!==i&&!t.hasAttribute?.(`slot`)&&!(t.className===`mr-2`&&t.querySelector(`mint-spinner`))&&e.push(t);if(e.length>0){o=document.createElement(`span`),o.className=`mint-button-content`,e.forEach(e=>{o.appendChild(e)});let t=this._button.querySelector(`mint-spinner`)?.parentElement;i&&a===`left`?t?(t.insertAdjacentElement(`afterend`,i),i.insertAdjacentElement(`afterend`,o)):(this._button.insertBefore(i,this._button.firstChild),i.insertAdjacentElement(`afterend`,o)):i&&a===`right`?t?(t.insertAdjacentElement(`afterend`,o),o.insertAdjacentElement(`afterend`,i)):(this._button.insertBefore(o,this._button.firstChild),o.insertAdjacentElement(`afterend`,i)):t?t.insertAdjacentElement(`afterend`,o):this._button.insertBefore(o,this._button.firstChild)}else if(i&&i.tagName===`MINT-ICON`&&!i.parentElement){let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,this._button.firstChild)}}let s=this.isIconOnly();i&&(i.classList.contains(`mint-button-icon`)||i.classList.add(`mint-button-icon`),i.classList.remove(`mint-icon-leading`,`mint-icon-trailing`),s?i.tagName===`MINT-ICON`?(i.style.width=`1rem`,i.style.height=`1rem`,i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`):(i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`,i.tagName===`svg`&&(i.style.width=`1rem`,i.style.height=`1rem`)):a===`left`?i.classList.add(`mint-icon-leading`):i.classList.add(`mint-icon-trailing`));let c=this.getButtonClasses();this._button.className=c}setupEventListeners(){this._button&&!this._clickHandler&&(this._clickHandler=this.handleClick.bind(this),this._button.addEventListener(`click`,this._clickHandler,!0),this._button.addEventListener(`mousedown`,this._handleMouseDown),this._button.addEventListener(`mouseup`,this._handleMouseUp),this._button.addEventListener(`mouseleave`,this._handleMouseLeave),this._button.addEventListener(`touchstart`,this._handleTouchStart),this._button.addEventListener(`touchend`,this._handleTouchEnd),this._button.addEventListener(`touchcancel`,this._handleTouchCancel))}removeEventListeners(){this._button&&(this._clickHandler&&=(this._button.removeEventListener(`click`,this._clickHandler,!0),null),this._button.removeEventListener(`mousedown`,this._handleMouseDown),this._button.removeEventListener(`mouseup`,this._handleMouseUp),this._button.removeEventListener(`mouseleave`,this._handleMouseLeave),this._button.removeEventListener(`touchstart`,this._handleTouchStart),this._button.removeEventListener(`touchend`,this._handleTouchEnd),this._button.removeEventListener(`touchcancel`,this._handleTouchCancel))}_handleMouseDown=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleMouseUp=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleMouseLeave=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchStart=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleTouchEnd=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchCancel=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};handleClick(e){if(this.isDisabled()||this.isLoading()){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();return}if(e.stopPropagation(),e.stopImmediatePropagation(),this._isHandlingClick){e.preventDefault();return}this._isHandlingClick=!0,e.preventDefault(),this.dispatchEvent(new CustomEvent(`click`,{detail:{originalEvent:e},bubbles:!0,cancelable:!0,composed:!0})),requestAnimationFrame(()=>{this._isHandlingClick=!1})}};typeof customElements<`u`&&!customElements.get(`mint-button`)&&t.t(`mint-button`,n);var r=class extends HTMLElement{static get observedAttributes(){return[`href`,`fallback-href`]}constructor(){super(),this._historyDepth=0,this._maxBackAttempts=10,this._backAttempts=0}connectedCallback(){this.render(),this._setupHistoryTracking()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_setupHistoryTracking(){window.addEventListener(`popstate`,()=>{this._backAttempts=0}),this._historyDepth=window.history.length}getFallbackHref(){return this.getAttribute(`fallback-href`)||this.getAttribute(`href`)||`/`}handleClick(e){if(e.preventDefault(),e.stopPropagation(),window.history.length>1&&this._backAttempts<this._maxBackAttempts&&this._backAttempts===0){this._backAttempts++;let e=window.location.href,t=Date.now();window.history.back(),setTimeout(()=>{Date.now()-t,window.location.href===e?this._navigateToFallback():setTimeout(()=>{this._backAttempts=0},500)},200)}else this._navigateToFallback()}_navigateToFallback(){let e=this.getFallbackHref();if(this._backAttempts=0,e.startsWith(`/`)&&!e.startsWith(`//`))try{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`));return}catch{}window.location.href=e}render(){this._button||(this._button=document.createElement(`mint-button`),this._button.setAttribute(`variant`,`neutral`),this._button.setAttribute(`icon`,`arrow-left`),this._button.addEventListener(`click`,e=>this.handleClick(e)),this.appendChild(this._button))}};typeof customElements<`u`&&!customElements.get(`mint-back-button`)&&t.t(`mint-back-button`,r),module.exports=r;
@@ -3,9 +3,9 @@ import '../../button.css'
3
3
  import '../../spinner.css'
4
4
  import '../../icon.css'
5
5
  import '../../back-button.css'
6
- import { a as e } from "../chunks/icon-B01tq_aJ.js";
6
+ import { a as e } from "../chunks/icon-BWUYe89V.js";
7
7
  import { t } from "../chunks/register-element-BFYmIynH.js";
8
- import "../chunks/icon-DNWs0suS.js";
8
+ import "../chunks/icon-B8p3Co0-.js";
9
9
  /* empty css */
10
10
  import "../chunks/spinner-BsaFHuS6.js";
11
11
  e({
@@ -13,9 +13,9 @@ const __mintLoadStyle = (key, url) => {
13
13
  __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('icon', '../../icon.css')
15
15
  __mintLoadStyle('bottom-navigation', '../../bottom-navigation.css')
16
- import "../chunks/icon-B01tq_aJ.js";
16
+ import "../chunks/icon-BWUYe89V.js";
17
17
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
18
- import "../chunks/icon-DNWs0suS.js";
18
+ import "../chunks/icon-B8p3Co0-.js";
19
19
  //#region src/components/bottom-navigation/BottomNavigation.ts
20
20
  var t = class extends HTMLElement {
21
21
  constructor(...e) {
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../chunks/icon-BcsWL4kZ.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-uMo_iGkX.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._lastScrollY=0,this._scrollHandler=null}connectedCallback(){this.classList.add(`mint-bottom-navigation`),this.setAttribute(`role`,`navigation`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Primary`),this._lastScrollY=window.scrollY,this.hasAttribute(`data-preview`)||this._attachScrollListener()}disconnectedCallback(){this._detachScrollListener()}_attachScrollListener(){this._scrollHandler||(this._scrollHandler=()=>{let e=window.scrollY;if(e<=8){this.classList.remove(`is-hidden`),this._lastScrollY=e;return}let t=e-this._lastScrollY;Math.abs(t)<4||(t>0?this.classList.add(`is-hidden`):this.classList.remove(`is-hidden`),this._lastScrollY=e)},window.addEventListener(`scroll`,this._scrollHandler,{passive:!0}))}_detachScrollListener(){this._scrollHandler&&=(window.removeEventListener(`scroll`,this._scrollHandler),null)}};customElements.get(`mint-bottom-navigation`)||e.t(`mint-bottom-navigation`,t);var n=class extends HTMLElement{constructor(...e){super(...e),this._root=null}static get observedAttributes(){return[`icon`,`label`,`href`,`active`]}connectedCallback(){this.classList.add(`mint-bottom-nav-item`),this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_isActive(){return this.hasAttribute(`active`)&&this.getAttribute(`active`)!==`false`}_getLabel(){return this.getAttribute(`label`)||``}_getIcon(){return this.getAttribute(`icon`)||``}_getHref(){return this.getAttribute(`href`)}render(){let e=this._getHref(),t=this._getLabel(),n=this._getIcon(),r=this._isActive(),i;e?(i=document.createElement(`a`),i.href=e):(i=document.createElement(`button`),i.type=`button`),i.className=`mint-bottom-nav-link`,i.setAttribute(`aria-current`,r?`page`:`false`);let a=n.split(`-`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);i.setAttribute(`aria-label`,t||a||`Navigation item`);let o=document.createElement(`span`);if(o.className=`mint-bottom-nav-icon`,n){let e=document.createElement(`mint-icon`);e.setAttribute(`name`,n),e.className=`mint-bottom-nav-icon-glyph`,o.appendChild(e)}let s=document.createElement(`span`);s.className=`mint-bottom-nav-label`,s.textContent=t,i.appendChild(o),i.appendChild(s),this.replaceChildren(i),this._root=i}};customElements.get(`mint-bottom-nav-item`)||e.t(`mint-bottom-nav-item`,n);var r=t;exports.MintBottomNavItem=n,exports.MintBottomNavigation=t,exports.default=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../chunks/icon-B_7c8b8e.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CSqBgTae.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._lastScrollY=0,this._scrollHandler=null}connectedCallback(){this.classList.add(`mint-bottom-navigation`),this.setAttribute(`role`,`navigation`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Primary`),this._lastScrollY=window.scrollY,this.hasAttribute(`data-preview`)||this._attachScrollListener()}disconnectedCallback(){this._detachScrollListener()}_attachScrollListener(){this._scrollHandler||(this._scrollHandler=()=>{let e=window.scrollY;if(e<=8){this.classList.remove(`is-hidden`),this._lastScrollY=e;return}let t=e-this._lastScrollY;Math.abs(t)<4||(t>0?this.classList.add(`is-hidden`):this.classList.remove(`is-hidden`),this._lastScrollY=e)},window.addEventListener(`scroll`,this._scrollHandler,{passive:!0}))}_detachScrollListener(){this._scrollHandler&&=(window.removeEventListener(`scroll`,this._scrollHandler),null)}};customElements.get(`mint-bottom-navigation`)||e.t(`mint-bottom-navigation`,t);var n=class extends HTMLElement{constructor(...e){super(...e),this._root=null}static get observedAttributes(){return[`icon`,`label`,`href`,`active`]}connectedCallback(){this.classList.add(`mint-bottom-nav-item`),this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_isActive(){return this.hasAttribute(`active`)&&this.getAttribute(`active`)!==`false`}_getLabel(){return this.getAttribute(`label`)||``}_getIcon(){return this.getAttribute(`icon`)||``}_getHref(){return this.getAttribute(`href`)}render(){let e=this._getHref(),t=this._getLabel(),n=this._getIcon(),r=this._isActive(),i;e?(i=document.createElement(`a`),i.href=e):(i=document.createElement(`button`),i.type=`button`),i.className=`mint-bottom-nav-link`,i.setAttribute(`aria-current`,r?`page`:`false`);let a=n.split(`-`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);i.setAttribute(`aria-label`,t||a||`Navigation item`);let o=document.createElement(`span`);if(o.className=`mint-bottom-nav-icon`,n){let e=document.createElement(`mint-icon`);e.setAttribute(`name`,n),e.className=`mint-bottom-nav-icon-glyph`,o.appendChild(e)}let s=document.createElement(`span`);s.className=`mint-bottom-nav-label`,s.textContent=t,i.appendChild(o),i.appendChild(s),this.replaceChildren(i),this._root=i}};customElements.get(`mint-bottom-nav-item`)||e.t(`mint-bottom-nav-item`,n);var r=t;exports.MintBottomNavItem=n,exports.MintBottomNavigation=t,exports.default=r;
@@ -1,9 +1,9 @@
1
1
  import '../../theme.css'
2
2
  import '../../icon.css'
3
3
  import '../../bottom-navigation.css'
4
- import "../chunks/icon-B01tq_aJ.js";
4
+ import "../chunks/icon-BWUYe89V.js";
5
5
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
6
- import "../chunks/icon-DNWs0suS.js";
6
+ import "../chunks/icon-B8p3Co0-.js";
7
7
  //#region src/components/bottom-navigation/BottomNavigation.ts
8
8
  var t = class extends HTMLElement {
9
9
  constructor(...e) {
@@ -14,5 +14,5 @@ __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('spinner', '../../spinner.css')
15
15
  __mintLoadStyle('icon', '../../icon.css')
16
16
  __mintLoadStyle('button', '../../button.css')
17
- import { t as e } from "../chunks/button-BZ25puI2.js";
17
+ import { t as e } from "../chunks/button-BYQbRAwl.js";
18
18
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/button-CgYC1lB7.js`);module.exports=e.t;
1
+ const e=require(`../chunks/button-DbxqmBWQ.js`);module.exports=e.t;
@@ -2,5 +2,5 @@ import '../../theme.css'
2
2
  import '../../spinner.css'
3
3
  import '../../icon.css'
4
4
  import '../../button.css'
5
- import { t as e } from "../chunks/button-BZ25puI2.js";
5
+ import { t as e } from "../chunks/button-BYQbRAwl.js";
6
6
  export { e as default };
@@ -358,12 +358,14 @@ var t = class e extends HTMLElement {
358
358
  let e = document.createElement("canvas").getContext("2d");
359
359
  if (!e) return 60;
360
360
  e.font = "12px system-ui, -apple-system, sans-serif";
361
- let t = this._showLegend ? Math.max(this._legendHeight, 60) : 0, n = this._height - t, r = Math.floor(n / 35), i = Math.min(5, r), a = 0;
361
+ let t = this._showLegend ? Math.max(this._legendHeight, 60) : 0, n = this._height - t, r = Math.floor(n / 35), i = Math.max(1, Math.min(5, r)), a = this._getYRange();
362
+ if (this._hasOnlyZeroValues()) return Math.ceil(e.measureText(this._formatYAxisValue(0)).width) + 20;
363
+ let o = 0;
362
364
  for (let t = 0; t <= i; t++) {
363
- let n = this._getYRange(), r = n.max - (n.max - n.min) / i * t, o = this._formatYAxisValue(r), s = e.measureText(o);
364
- a = Math.max(a, s.width);
365
+ let n = a.max - (a.max - a.min) / i * t, r = this._formatYAxisValue(n), s = e.measureText(r);
366
+ o = Math.max(o, s.width);
365
367
  }
366
- return Math.ceil(a) + 20;
368
+ return Math.ceil(o) + 20;
367
369
  }
368
370
  _getChartBounds() {
369
371
  let e = this._calculateMaxYAxisLabelWidth(), t = `${this._width}-${this._height}-${this._showGrid}-${this._showLegend}-${this._legendHeight}-${e}-${this._rotatedLabelHeight}`;
@@ -398,6 +400,10 @@ var t = class e extends HTMLElement {
398
400
  this._isDatasetVisible(t, n) && e.push(...t.data);
399
401
  }), e;
400
402
  }
403
+ _hasOnlyZeroValues() {
404
+ let e = this._getAllDataPoints();
405
+ return e.length > 0 && e.every((e) => e.y === 0);
406
+ }
401
407
  _getXValues() {
402
408
  if (!this._chartData) return [];
403
409
  let e = JSON.stringify(this._chartData.labels) + JSON.stringify(this._chartData.datasets.map((e) => e.data.map((e) => e.x)));
@@ -766,7 +772,7 @@ var t = class e extends HTMLElement {
766
772
  }
767
773
  _scaleY(e, t) {
768
774
  let n = this._getYRange();
769
- if (n.max === n.min) return t.y + t.height / 2;
775
+ if (n.max === n.min) return n.min === 0 ? t.y + t.height : t.y + t.height / 2;
770
776
  let r = (e - n.min) / (n.max - n.min);
771
777
  return t.y + t.height - r * t.height;
772
778
  }
@@ -813,116 +819,117 @@ var t = class e extends HTMLElement {
813
819
  }
814
820
  }
815
821
  _renderGrid(e) {
816
- if (!this._svg || !this._showGrid) return;
817
- let t = document.createElementNS("http://www.w3.org/2000/svg", "g");
818
- t.setAttribute("class", "chart-grid");
819
- let n = this._getYRange(), r = Math.floor(e.height / 35), i = Math.min(5, r);
820
- for (let r = 0; r <= i; r++) {
821
- let a = e.y + e.height / i * r, o = document.createElementNS("http://www.w3.org/2000/svg", "line");
822
- o.setAttribute("x1", e.x.toString()), o.setAttribute("y1", a.toString()), o.setAttribute("x2", (e.x + e.width).toString()), o.setAttribute("y2", a.toString()), o.setAttribute("stroke", "#e5e7eb"), o.setAttribute("stroke-width", "1"), o.setAttribute("stroke-dasharray", "2,2"), document.documentElement.classList.contains("dark") && o.setAttribute("stroke", "#374151"), t.appendChild(o);
823
- let s = n.max - (n.max - n.min) / i * r, c = document.createElementNS("http://www.w3.org/2000/svg", "text"), l = a + 4;
824
- r === 0 && (l = a + 12), c.setAttribute("x", "5"), c.setAttribute("y", l.toString()), c.setAttribute("text-anchor", "start"), c.setAttribute("fill", "#6b7280"), c.setAttribute("font-size", "12"), c.textContent = this._formatYAxisValue(s), document.documentElement.classList.contains("dark") && c.setAttribute("fill", "#9ca3af"), t.appendChild(c);
822
+ let t = this._chartType !== "pie" && this._hasOnlyZeroValues();
823
+ if (!this._svg || !this._showGrid && !t) return;
824
+ let n = document.createElementNS("http://www.w3.org/2000/svg", "g");
825
+ n.setAttribute("class", "chart-grid");
826
+ let r = this._getYRange(), i = Math.floor(e.height / 35), a = t ? 0 : Math.max(1, Math.min(5, i));
827
+ for (let i = 0; i <= a; i++) {
828
+ let o = t ? e.y + e.height : e.y + e.height / a * i, s = document.createElementNS("http://www.w3.org/2000/svg", "line");
829
+ if (s.setAttribute("x1", e.x.toString()), s.setAttribute("y1", o.toString()), s.setAttribute("x2", (e.x + e.width).toString()), s.setAttribute("y2", o.toString()), s.setAttribute("stroke", t ? "#9ca3af" : "#e5e7eb"), s.setAttribute("stroke-width", "1"), t || s.setAttribute("stroke-dasharray", "2,2"), document.documentElement.classList.contains("dark") && s.setAttribute("stroke", "#374151"), n.appendChild(s), t && !this._showGrid) continue;
830
+ let c = t ? 0 : r.max - (r.max - r.min) / a * i, l = document.createElementNS("http://www.w3.org/2000/svg", "text"), u = o + 4;
831
+ i === 0 && (u = o + 12), l.setAttribute("x", "5"), l.setAttribute("y", u.toString()), l.setAttribute("text-anchor", "start"), l.setAttribute("fill", "#6b7280"), l.setAttribute("font-size", "12"), l.textContent = this._formatYAxisValue(c), document.documentElement.classList.contains("dark") && l.setAttribute("fill", "#9ca3af"), n.appendChild(l);
825
832
  }
826
- let a = this._getXValues();
827
- if (a.length === 0) {
828
- this._svg.appendChild(t);
833
+ let o = this._getXValues();
834
+ if (o.length === 0) {
835
+ this._svg.appendChild(n);
829
836
  return;
830
837
  }
831
- let o = this._chartType === "bar", s = [];
832
- a.forEach((t) => {
833
- let n = o ? this._scaleXForBarChart(t, e) : this._scaleX(t, e);
834
- s.push(n);
838
+ let s = this._chartType === "bar", c = [];
839
+ o.forEach((t) => {
840
+ let n = s ? this._scaleXForBarChart(t, e) : this._scaleX(t, e);
841
+ c.push(n);
835
842
  });
836
- let c = document.createElement("canvas").getContext("2d"), l = !1, u = Array(a.length).fill(!0);
837
- if (c && a.length > 1) {
838
- c.font = "12px system-ui, -apple-system, sans-serif";
843
+ let l = document.createElement("canvas").getContext("2d"), u = !1, d = Array(o.length).fill(!0);
844
+ if (l && o.length > 1) {
845
+ l.font = "12px system-ui, -apple-system, sans-serif";
839
846
  let e = [];
840
- a.forEach((t) => {
841
- let n = this._formatXAxisValue(t), r = c.measureText(n);
847
+ o.forEach((t) => {
848
+ let n = this._formatXAxisValue(t), r = l.measureText(n);
842
849
  e.push(r.width);
843
850
  });
844
851
  let t = !0;
845
- for (let n = 1; n < a.length; n++) {
846
- let r = s[n] - s[n - 1], i = e[n - 1] / 2 + e[n] / 2 + 10;
852
+ for (let n = 1; n < o.length; n++) {
853
+ let r = c[n] - c[n - 1], i = e[n - 1] / 2 + e[n] / 2 + 10;
847
854
  if (r < Math.max(i, 80)) {
848
855
  t = !1;
849
856
  break;
850
857
  }
851
858
  }
852
859
  if (!t) {
853
- l = !0;
860
+ u = !0;
854
861
  let t = 12 * 1.2;
855
862
  if (this._rotatedLabelHeight === 0) {
856
863
  let n = (Math.max(...e) + t) * .707;
857
864
  this._rotatedLabelHeight = Math.ceil(n) + 10;
858
865
  }
859
866
  let n = t * 1.5, r = !0;
860
- for (let e = 1; e < a.length; e++) if (s[e] - s[e - 1] < n) {
867
+ for (let e = 1; e < o.length; e++) if (c[e] - c[e - 1] < n) {
861
868
  r = !1;
862
869
  break;
863
870
  }
864
871
  if (!r) {
865
872
  let e = n;
866
- u = Array(a.length).fill(!1);
873
+ d = Array(o.length).fill(!1);
867
874
  let t = -Infinity;
868
- a.length > 0 && (u[0] = !0, t = s[0]);
869
- for (let n = 1; n < a.length - 1; n++) {
870
- let r = s[n];
871
- r - t >= e && (u[n] = !0, t = r);
875
+ o.length > 0 && (d[0] = !0, t = c[0]);
876
+ for (let n = 1; n < o.length - 1; n++) {
877
+ let r = c[n];
878
+ r - t >= e && (d[n] = !0, t = r);
872
879
  }
873
- if (a.length > 1) {
874
- let n = s[a.length - 1];
875
- if (n - t >= e) u[a.length - 1] = !0;
880
+ if (o.length > 1) {
881
+ let n = c[o.length - 1];
882
+ if (n - t >= e) d[o.length - 1] = !0;
876
883
  else {
877
884
  for (; n - t < e;) {
878
885
  let e = !1;
879
- for (let n = a.length - 2; n >= 0; n--) if (u[n]) {
880
- if (u[n] = !1, n > 0) {
881
- for (let r = n - 1; r >= 0; r--) if (u[r]) {
882
- t = s[r], e = !0;
886
+ for (let n = o.length - 2; n >= 0; n--) if (d[n]) {
887
+ if (d[n] = !1, n > 0) {
888
+ for (let r = n - 1; r >= 0; r--) if (d[r]) {
889
+ t = c[r], e = !0;
883
890
  break;
884
891
  }
885
- e || (t = s[0]);
886
- } else t = s[0];
892
+ e || (t = c[0]);
893
+ } else t = c[0];
887
894
  e = !0;
888
895
  break;
889
896
  }
890
897
  if (!e) break;
891
898
  }
892
- n - t >= e && (u[a.length - 1] = !0);
899
+ n - t >= e && (d[o.length - 1] = !0);
893
900
  }
894
901
  }
895
902
  }
896
903
  }
897
- } else u = Array(a.length).fill(!1), a.length > 0 && (u[0] = !0), a.length > 1 && (u[a.length - 1] = !0), this._rotatedLabelHeight = 0;
898
- l || (this._rotatedLabelHeight = 0), a.forEach((n, r) => {
899
- if (u[r]) {
900
- let i = s[r], o = document.createElementNS("http://www.w3.org/2000/svg", "line");
901
- o.setAttribute("x1", i.toString()), o.setAttribute("y1", e.y.toString()), o.setAttribute("x2", i.toString()), o.setAttribute("y2", (e.y + e.height).toString()), o.setAttribute("stroke", "#e5e7eb"), o.setAttribute("stroke-width", "1"), o.setAttribute("stroke-dasharray", "2,2"), document.documentElement.classList.contains("dark") && o.setAttribute("stroke", "#374151"), t.appendChild(o);
902
- let c = document.createElementNS("http://www.w3.org/2000/svg", "text"), u = i, d = "middle";
903
- if (!l) {
904
+ } else d = Array(o.length).fill(!1), o.length > 0 && (d[0] = !0), o.length > 1 && (d[o.length - 1] = !0), this._rotatedLabelHeight = 0;
905
+ u || (this._rotatedLabelHeight = 0), o.forEach((t, r) => {
906
+ if (d[r]) {
907
+ let i = c[r], a = document.createElementNS("http://www.w3.org/2000/svg", "line");
908
+ a.setAttribute("x1", i.toString()), a.setAttribute("y1", e.y.toString()), a.setAttribute("x2", i.toString()), a.setAttribute("y2", (e.y + e.height).toString()), a.setAttribute("stroke", "#e5e7eb"), a.setAttribute("stroke-width", "1"), a.setAttribute("stroke-dasharray", "2,2"), document.documentElement.classList.contains("dark") && a.setAttribute("stroke", "#374151"), n.appendChild(a);
909
+ let s = document.createElementNS("http://www.w3.org/2000/svg", "text"), l = i, d = "middle";
910
+ if (!u) {
904
911
  if (r === 0) {
905
912
  let t = e.x;
906
- u = Math.max(i, t), d = "start";
907
- } else if (r === a.length - 1) {
913
+ l = Math.max(i, t), d = "start";
914
+ } else if (r === o.length - 1) {
908
915
  let t = e.x + e.width;
909
- u = Math.min(i, t), d = "end";
916
+ l = Math.min(i, t), d = "end";
910
917
  }
911
- } else if (d = "end", r === a.length - 1) {
912
- let t = document.createElement("canvas").getContext("2d");
913
- if (t) {
914
- t.font = "12px system-ui, -apple-system, sans-serif";
915
- let r = this._formatXAxisValue(n), a = t.measureText(r).width * .707, o = e.x + e.width + 100;
916
- u = Math.min(i, o - a);
918
+ } else if (d = "end", r === o.length - 1) {
919
+ let n = document.createElement("canvas").getContext("2d");
920
+ if (n) {
921
+ n.font = "12px system-ui, -apple-system, sans-serif";
922
+ let r = this._formatXAxisValue(t), a = n.measureText(r).width * .707, o = e.x + e.width + 100;
923
+ l = Math.min(i, o - a);
917
924
  }
918
925
  }
919
- c.setAttribute("x", u.toString());
926
+ s.setAttribute("x", l.toString());
920
927
  let f = (this._rotatedLabelHeight > 0 ? 30 : 20) + this._rotatedLabelHeight + 12, p = f;
921
928
  this._showLegend && (p = f + 20 + Math.max(this._legendHeight, 60));
922
- let m = (this._height - e.y - e.height) / p, h = (l ? 30 : 20) * m, g = e.y + e.height + h;
923
- c.setAttribute("y", g.toString()), c.setAttribute("text-anchor", d), c.setAttribute("fill", "#6b7280"), c.setAttribute("font-size", "12"), l && c.setAttribute("transform", `rotate(-45 ${u} ${g})`), c.textContent = this._formatXAxisValue(n), document.documentElement.classList.contains("dark") && c.setAttribute("fill", "#9ca3af"), t.appendChild(c);
929
+ let m = (this._height - e.y - e.height) / p, h = (u ? 30 : 20) * m, g = e.y + e.height + h;
930
+ s.setAttribute("y", g.toString()), s.setAttribute("text-anchor", d), s.setAttribute("fill", "#6b7280"), s.setAttribute("font-size", "12"), u && s.setAttribute("transform", `rotate(-45 ${l} ${g})`), s.textContent = this._formatXAxisValue(t), document.documentElement.classList.contains("dark") && s.setAttribute("fill", "#9ca3af"), n.appendChild(s);
924
931
  }
925
- }), this._svg.appendChild(t);
932
+ }), this._svg.appendChild(n);
926
933
  }
927
934
  _buildMonotoneXLinePathD(e) {
928
935
  let t = (e) => e < 0 ? -1 : 1, n = (e, n, r, i, a, o) => {
@@ -991,26 +998,26 @@ var t = class e extends HTMLElement {
991
998
  }
992
999
  _renderLineChart() {
993
1000
  if (!this._svg || !this._chartData) return;
994
- let e = this._getChartBounds();
1001
+ let e = this._getChartBounds(), t = this._hasOnlyZeroValues();
995
1002
  this._renderGrid(e);
996
- let t = document.createElementNS("http://www.w3.org/2000/svg", "g");
997
- t.setAttribute("class", "chart-data");
998
- let n = document.createDocumentFragment();
999
- this._chartData.datasets.forEach((t, r) => {
1000
- if (!this._isDatasetVisible(t, r)) return;
1001
- let i = this._getDatasetColor(t, r), a = document.createElementNS("http://www.w3.org/2000/svg", "path"), o = t.data.map((t) => ({
1003
+ let n = document.createElementNS("http://www.w3.org/2000/svg", "g");
1004
+ n.setAttribute("class", "chart-data");
1005
+ let r = document.createDocumentFragment();
1006
+ this._chartData.datasets.forEach((n, i) => {
1007
+ if (!this._isDatasetVisible(n, i)) return;
1008
+ let a = this._getDatasetColor(n, i), o = document.createElementNS("http://www.w3.org/2000/svg", "path"), s = n.data.map((t) => ({
1002
1009
  x: this._scaleX(t.x, e),
1003
1010
  y: this._scaleY(t.y, e)
1004
1011
  }));
1005
- o.length !== 0 && (a.setAttribute("d", this._buildSmoothLinePathD(o)), a.setAttribute("fill", "none"), a.setAttribute("stroke", i), a.setAttribute("stroke-width", "2"), a.setAttribute("stroke-linecap", "round"), a.setAttribute("stroke-linejoin", "round"), n.appendChild(a), t.data.forEach((a) => {
1006
- let o = document.createElementNS("http://www.w3.org/2000/svg", "circle"), s = this._scaleX(a.x, e), c = this._scaleY(a.y, e);
1007
- o.setAttribute("cx", s.toString()), o.setAttribute("cy", c.toString()), o.setAttribute("r", "4"), o.setAttribute("fill", i);
1012
+ s.length !== 0 && (t || (o.setAttribute("d", this._buildSmoothLinePathD(s)), o.setAttribute("fill", "none"), o.setAttribute("stroke", a), o.setAttribute("stroke-width", "2"), o.setAttribute("stroke-linecap", "round"), o.setAttribute("stroke-linejoin", "round"), r.appendChild(o)), n.data.forEach((t) => {
1013
+ let o = document.createElementNS("http://www.w3.org/2000/svg", "circle"), s = this._scaleX(t.x, e), c = this._scaleY(t.y, e);
1014
+ o.setAttribute("cx", s.toString()), o.setAttribute("cy", c.toString()), o.setAttribute("r", "4"), o.setAttribute("fill", a);
1008
1015
  let l = document.documentElement.classList.contains("dark");
1009
- o.setAttribute("stroke", l ? "#1f2937" : "#fff"), o.setAttribute("stroke-width", "2"), o.setAttribute("class", "chart-point"), o.setAttribute("data-dataset", r.toString()), o.setAttribute("data-x", String(a.x)), o.setAttribute("data-y", a.y.toString()), o.setAttribute("data-name", t.name), o.style.opacity = "0", o.style.pointerEvents = "none";
1010
- let u = String(a.x);
1011
- this._plotPoints.has(u) || this._plotPoints.set(u, []), this._plotPoints.get(u).push(o), n.appendChild(o);
1016
+ o.setAttribute("stroke", l ? "#1f2937" : "#fff"), o.setAttribute("stroke-width", "2"), o.setAttribute("class", "chart-point"), o.setAttribute("data-dataset", i.toString()), o.setAttribute("data-x", String(t.x)), o.setAttribute("data-y", t.y.toString()), o.setAttribute("data-name", n.name), o.style.opacity = "0", o.style.pointerEvents = "none";
1017
+ let u = String(t.x);
1018
+ this._plotPoints.has(u) || this._plotPoints.set(u, []), this._plotPoints.get(u).push(o), r.appendChild(o);
1012
1019
  }));
1013
- }), t.appendChild(n), this._svg.appendChild(t);
1020
+ }), n.appendChild(r), this._svg.appendChild(n);
1014
1021
  }
1015
1022
  _scaleXForBarChart(e, t) {
1016
1023
  let n = this._getXValues();
@@ -1063,30 +1070,34 @@ var t = class e extends HTMLElement {
1063
1070
  }
1064
1071
  _renderAreaChart() {
1065
1072
  if (!this._svg || !this._chartData) return;
1066
- let e = this._getChartBounds();
1073
+ let e = this._getChartBounds(), t = this._hasOnlyZeroValues();
1067
1074
  this._renderGrid(e);
1068
- let t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1069
- t.setAttribute("class", "chart-data");
1070
- let n = document.createDocumentFragment();
1071
- this._chartData.datasets.forEach((t, r) => {
1072
- if (!this._isDatasetVisible(t, r)) return;
1073
- let i = this._getDatasetColor(t, r), a = t.data.map((t) => ({
1075
+ let n = document.createElementNS("http://www.w3.org/2000/svg", "g");
1076
+ n.setAttribute("class", "chart-data");
1077
+ let r = document.createDocumentFragment();
1078
+ this._chartData.datasets.forEach((n, i) => {
1079
+ if (!this._isDatasetVisible(n, i)) return;
1080
+ let a = this._getDatasetColor(n, i), o = n.data.map((t) => ({
1074
1081
  x: this._scaleX(t.x, e),
1075
1082
  y: this._scaleY(t.y, e)
1076
1083
  }));
1077
- if (a.length === 0) return;
1078
- let o = e.y + e.height, s = document.createElementNS("http://www.w3.org/2000/svg", "path");
1079
- s.setAttribute("d", this._buildAreaFillPathD(a, o)), s.setAttribute("fill", i), s.setAttribute("fill-opacity", "0.3"), n.appendChild(s);
1080
- let c = document.createElementNS("http://www.w3.org/2000/svg", "path");
1081
- c.setAttribute("d", this._buildSmoothLinePathD(a)), c.setAttribute("fill", "none"), c.setAttribute("stroke", i), c.setAttribute("stroke-width", "2"), c.setAttribute("stroke-linecap", "round"), c.setAttribute("stroke-linejoin", "round"), n.appendChild(c), t.data.forEach((a) => {
1082
- let o = document.createElementNS("http://www.w3.org/2000/svg", "circle"), s = this._scaleX(a.x, e), c = this._scaleY(a.y, e);
1083
- o.setAttribute("cx", s.toString()), o.setAttribute("cy", c.toString()), o.setAttribute("r", "4"), o.setAttribute("fill", i);
1084
- let l = document.documentElement.classList.contains("dark");
1085
- o.setAttribute("stroke", l ? "#1f2937" : "#fff"), o.setAttribute("stroke-width", "2"), o.setAttribute("class", "chart-point"), o.setAttribute("data-dataset", r.toString()), o.setAttribute("data-x", String(a.x)), o.setAttribute("data-y", a.y.toString()), o.setAttribute("data-name", t.name), o.style.opacity = "0", o.style.pointerEvents = "none";
1086
- let u = String(a.x);
1087
- this._plotPoints.has(u) || this._plotPoints.set(u, []), this._plotPoints.get(u).push(o), n.appendChild(o);
1088
- });
1089
- }), t.appendChild(n), this._svg.appendChild(t);
1084
+ if (o.length !== 0) {
1085
+ if (!t) {
1086
+ let t = e.y + e.height, n = document.createElementNS("http://www.w3.org/2000/svg", "path");
1087
+ n.setAttribute("d", this._buildAreaFillPathD(o, t)), n.setAttribute("fill", a), n.setAttribute("fill-opacity", "0.3"), r.appendChild(n);
1088
+ let i = document.createElementNS("http://www.w3.org/2000/svg", "path");
1089
+ i.setAttribute("d", this._buildSmoothLinePathD(o)), i.setAttribute("fill", "none"), i.setAttribute("stroke", a), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), r.appendChild(i);
1090
+ }
1091
+ n.data.forEach((t) => {
1092
+ let o = document.createElementNS("http://www.w3.org/2000/svg", "circle"), s = this._scaleX(t.x, e), c = this._scaleY(t.y, e);
1093
+ o.setAttribute("cx", s.toString()), o.setAttribute("cy", c.toString()), o.setAttribute("r", "4"), o.setAttribute("fill", a);
1094
+ let l = document.documentElement.classList.contains("dark");
1095
+ o.setAttribute("stroke", l ? "#1f2937" : "#fff"), o.setAttribute("stroke-width", "2"), o.setAttribute("class", "chart-point"), o.setAttribute("data-dataset", i.toString()), o.setAttribute("data-x", String(t.x)), o.setAttribute("data-y", t.y.toString()), o.setAttribute("data-name", n.name), o.style.opacity = "0", o.style.pointerEvents = "none";
1096
+ let u = String(t.x);
1097
+ this._plotPoints.has(u) || this._plotPoints.set(u, []), this._plotPoints.get(u).push(o), r.appendChild(o);
1098
+ });
1099
+ }
1100
+ }), n.appendChild(r), this._svg.appendChild(n);
1090
1101
  }
1091
1102
  _renderPieChart() {
1092
1103
  if (!this._svg || !this._chartData) return;