@ganpatiinfo/gids-core-web 10.1.0 → 10.2.0

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 (140) hide show
  1. package/dist/css/index.css +201 -0
  2. package/dist/css/index.css.map +1 -1
  3. package/dist/gids-action-bar.js +1 -1
  4. package/dist/gids-activity-gauge.js +1 -1
  5. package/dist/gids-bar-chart.js +1 -1
  6. package/dist/gids-calendar-header-panel.js +1 -1
  7. package/dist/gids-calendar-month-list.js +1 -1
  8. package/dist/gids-calendar-year-list.js +1 -1
  9. package/dist/gids-calendar.js +1 -1
  10. package/dist/gids-chart-legend-item.js +1 -1
  11. package/dist/gids-chart-legend.js +1 -1
  12. package/dist/gids-chart.js +1 -1
  13. package/dist/gids-chevron-button.js +1 -1
  14. package/dist/gids-dot.js +1 -1
  15. package/dist/gids-dropdown-field.js +1 -1
  16. package/dist/gids-dropdown-picker.js +1 -1
  17. package/dist/gids-dropdown.js +1 -1
  18. package/dist/gids-field.js +1 -1
  19. package/dist/gids-filter.js +1 -1
  20. package/dist/gids-icon.js +1 -1
  21. package/dist/gids-input.js +1 -1
  22. package/dist/gids-line-chart.js +1 -1
  23. package/dist/gids-overflow-container.js +1 -1
  24. package/dist/gids-overlay-provider.js +1 -1
  25. package/dist/gids-password-field.js +1 -1
  26. package/dist/gids-pie-chart.js +1 -1
  27. package/dist/gids-popover.js +1 -1
  28. package/dist/gids-scrim.js +1 -1
  29. package/dist/gids-tab-item.d.ts +11 -0
  30. package/dist/gids-tab-item.js +1 -0
  31. package/dist/gids-tab.d.ts +11 -0
  32. package/dist/gids-tab.js +1 -0
  33. package/dist/gids-text-field.js +1 -1
  34. package/dist/gids-toggle-button.js +1 -1
  35. package/dist/gids-tooltip.js +1 -1
  36. package/dist/{p-DfxTsSdZ.js → p-5VIPb1eU.js} +1 -1
  37. package/dist/{p-Db62Pz3n.js → p-8tOn5SjU.js} +1 -1
  38. package/dist/{p-V48JyMbP.js → p-B1Jgtjhu.js} +1 -1
  39. package/dist/{p-mZJdpfOo.js → p-BYDimyG-.js} +1 -1
  40. package/dist/{p-DPIK2ayL.js → p-BfnzH6wp.js} +1 -1
  41. package/dist/p-Bj28yqMD.js +1 -0
  42. package/dist/{p-CW7tw1Fb.js → p-C-cUL-aA.js} +1 -1
  43. package/dist/{p-DNTv2BQ5.js → p-C7ifjRCE.js} +1 -1
  44. package/dist/{p-JjN8U9B5.js → p-Ciw-O9qN.js} +1 -1
  45. package/dist/{p-BpQB6ncp.js → p-DiNad9Px.js} +1 -1
  46. package/dist/{p-CQH7eAs3.js → p-DoPuGtJd.js} +1 -1
  47. package/dist/{p-BQ-ZnlnH.js → p-Doi8Yizl.js} +1 -1
  48. package/dist/{p-BZCJlqVe.js → p-Jdpe4Sgj.js} +1 -1
  49. package/dist/{p-CP1wz2PI.js → p-bPPm7cuw.js} +1 -1
  50. package/dist/{p-DoCwI_bx.js → p-qb1aWgjh.js} +1 -1
  51. package/dist/{p-H1JIMJ2t.js → p-qrjEbv6g.js} +1 -1
  52. package/dist/{p-Cn3-K5eR.js → p-xITwQAMz.js} +1 -1
  53. package/dist/types/components/webComponents/GidsTab/GidsTab.d.ts +17 -0
  54. package/dist/types/components/webComponents/GidsTabItem/GidsTabItem.d.ts +29 -0
  55. package/dist/types/components.d.ts +123 -2
  56. package/dist-bundled/es/gids-action-bar.js +4 -4
  57. package/dist-bundled/es/gids-activity-gauge.js +1 -1
  58. package/dist-bundled/es/gids-bar-chart.js +3 -3
  59. package/dist-bundled/es/gids-calendar-header-panel.js +4 -4
  60. package/dist-bundled/es/gids-calendar-month-list.js +1 -1
  61. package/dist-bundled/es/gids-calendar-year-list.js +3 -3
  62. package/dist-bundled/es/gids-calendar.js +33 -33
  63. package/dist-bundled/es/gids-chart-legend-item.js +4 -4
  64. package/dist-bundled/es/gids-chart-legend.js +4 -4
  65. package/dist-bundled/es/gids-chart.js +6 -6
  66. package/dist-bundled/es/gids-chevron-button.js +4 -4
  67. package/dist-bundled/es/gids-dot.js +3 -3
  68. package/dist-bundled/es/gids-dropdown-field.js +10 -10
  69. package/dist-bundled/es/gids-dropdown-picker.js +2 -2
  70. package/dist-bundled/es/gids-dropdown.js +1 -1
  71. package/dist-bundled/es/gids-field.js +1 -1
  72. package/dist-bundled/es/gids-filter.js +3 -3
  73. package/dist-bundled/es/gids-icon.js +4 -4
  74. package/dist-bundled/es/gids-input.js +4 -4
  75. package/dist-bundled/es/gids-line-chart.js +4 -4
  76. package/dist-bundled/es/gids-overflow-container.js +9 -9
  77. package/dist-bundled/es/gids-overlay-provider.js +2 -2
  78. package/dist-bundled/es/gids-password-field.js +19 -19
  79. package/dist-bundled/es/gids-pie-chart.js +4 -4
  80. package/dist-bundled/es/gids-popover.js +1 -1
  81. package/dist-bundled/es/gids-scrim.js +3 -3
  82. package/dist-bundled/es/gids-tab-item.js +100 -0
  83. package/dist-bundled/es/gids-tab.js +63 -0
  84. package/dist-bundled/es/gids-text-field.js +9 -9
  85. package/dist-bundled/es/gids-toggle-button.js +4 -4
  86. package/dist-bundled/es/gids-tooltip.js +4 -4
  87. package/dist-bundled/es/nonEmpty-B284_5ai.js +4 -0
  88. package/dist-bundled/es/{p-DfxTsSdZ-C2Afv1lS.js → p-5VIPb1eU-MCAo8JCp.js} +2 -2
  89. package/dist-bundled/es/{p-Db62Pz3n-DpQjwBYb.js → p-8tOn5SjU-D9rZ28cf.js} +10 -10
  90. package/dist-bundled/es/{p-V48JyMbP-Bx-0od-Z.js → p-B1Jgtjhu-B_VYp-ZP.js} +7 -7
  91. package/dist-bundled/es/{p-mZJdpfOo-DicbKil0.js → p-BYDimyG--DBCLrqDJ.js} +6 -6
  92. package/dist-bundled/es/{p-DPIK2ayL-DPEbctqo.js → p-BfnzH6wp-BfLC7Nak.js} +2 -2
  93. package/dist-bundled/es/{p-DmLoB2Dn-D-FSoCvI.js → p-Bj28yqMD-Dz1SWSqM.js} +6 -6
  94. package/dist-bundled/es/{p-CW7tw1Fb-DtJ5TwCU.js → p-C-cUL-aA-2jsvw-Lr.js} +11 -11
  95. package/dist-bundled/es/{p-DNTv2BQ5-Bwgd30mM.js → p-C7ifjRCE-CRlorwoN.js} +12 -12
  96. package/dist-bundled/es/{p-JjN8U9B5-GeWjfJBY.js → p-Ciw-O9qN-DkWfirFu.js} +4 -4
  97. package/dist-bundled/es/{p-BpQB6ncp-C2AWddf-.js → p-DiNad9Px-uOCMHqAq.js} +9 -9
  98. package/dist-bundled/es/{p-CQH7eAs3-BVowyVGn.js → p-DoPuGtJd-DYlbhh57.js} +2 -2
  99. package/dist-bundled/es/{p-BQ-ZnlnH-CUVdDHzX.js → p-Doi8Yizl-BszWK5Dq.js} +3 -3
  100. package/dist-bundled/es/{p-BZCJlqVe-BcSwze-q.js → p-Jdpe4Sgj-acwaxLtK.js} +5 -5
  101. package/dist-bundled/es/p-UVmSPzTd-6vjXok6h.js +26 -0
  102. package/dist-bundled/es/{p-CP1wz2PI-DhVAsHFS.js → p-bPPm7cuw-B-dtPJF9.js} +5 -5
  103. package/dist-bundled/es/{p-DoCwI_bx-BXHlZI7-.js → p-qb1aWgjh-CzmMPIME.js} +6 -6
  104. package/dist-bundled/es/{p-H1JIMJ2t-DEXp7M4I.js → p-qrjEbv6g-ITSp3ky_.js} +2 -2
  105. package/dist-bundled/es/{p-Cn3-K5eR-tQ1EOnDF.js → p-xITwQAMz-BMXjOAAQ.js} +12 -12
  106. package/dist-bundled/umd/gids-action-bar.umd.js +2 -2
  107. package/dist-bundled/umd/gids-activity-gauge.umd.js +1 -1
  108. package/dist-bundled/umd/gids-bar-chart.umd.js +1 -1
  109. package/dist-bundled/umd/gids-calendar-header-panel.umd.js +1 -1
  110. package/dist-bundled/umd/gids-calendar-month-list.umd.js +1 -1
  111. package/dist-bundled/umd/gids-calendar-year-list.umd.js +1 -1
  112. package/dist-bundled/umd/gids-calendar.umd.js +1 -1
  113. package/dist-bundled/umd/gids-chart-legend-item.umd.js +1 -1
  114. package/dist-bundled/umd/gids-chart-legend.umd.js +1 -1
  115. package/dist-bundled/umd/gids-chart.umd.js +1 -1
  116. package/dist-bundled/umd/gids-chevron-button.umd.js +1 -1
  117. package/dist-bundled/umd/gids-dot.umd.js +1 -1
  118. package/dist-bundled/umd/gids-dropdown-field.umd.js +1 -1
  119. package/dist-bundled/umd/gids-dropdown-picker.umd.js +1 -1
  120. package/dist-bundled/umd/gids-dropdown.umd.js +1 -1
  121. package/dist-bundled/umd/gids-field.umd.js +2 -2
  122. package/dist-bundled/umd/gids-filter.umd.js +2 -2
  123. package/dist-bundled/umd/gids-icon.umd.js +1 -1
  124. package/dist-bundled/umd/gids-input.umd.js +1 -1
  125. package/dist-bundled/umd/gids-line-chart.umd.js +1 -1
  126. package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
  127. package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
  128. package/dist-bundled/umd/gids-password-field.umd.js +1 -1
  129. package/dist-bundled/umd/gids-pie-chart.umd.js +2 -2
  130. package/dist-bundled/umd/gids-popover.umd.js +1 -1
  131. package/dist-bundled/umd/gids-scrim.umd.js +1 -1
  132. package/dist-bundled/umd/gids-tab-item.umd.js +5 -0
  133. package/dist-bundled/umd/gids-tab.umd.js +5 -0
  134. package/dist-bundled/umd/gids-text-field.umd.js +2 -2
  135. package/dist-bundled/umd/gids-toggle-button.umd.js +3 -3
  136. package/dist-bundled/umd/gids-tooltip.umd.js +1 -1
  137. package/dist-bundled/umd-complete/gids-core-web.umd.js +4 -4
  138. package/package.json +20 -4
  139. package/dist/p-DmLoB2Dn.js +0 -1
  140. package/dist-bundled/es/p-UVmSPzTd-DiTxS9kW.js +0 -25
package/dist/gids-icon.js CHANGED
@@ -1 +1 @@
1
- import{G as o,d as s}from"./p-Db62Pz3n.js";const p=o,r=s;export{p as GidsIcon,r as defineCustomElement}
1
+ import{G as o,d as s}from"./p-8tOn5SjU.js";const t=o,p=s;export{t as GidsIcon,p as defineCustomElement}
@@ -1 +1 @@
1
- import{G as o,d as s}from"./p-BQ-ZnlnH.js";const n=o,p=s;export{n as GidsInput,p as defineCustomElement}
1
+ import{G as o,d as s}from"./p-Doi8Yizl.js";const i=o,p=s;export{i as GidsInput,p as defineCustomElement}
@@ -1 +1 @@
1
- import{G as s,d as o}from"./p-CQH7eAs3.js";const p=s,r=o;export{p as GidsLineChart,r as defineCustomElement}
1
+ import{G as o,d as s}from"./p-DoPuGtJd.js";const t=o,p=s;export{t as GidsLineChart,p as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as o,H as i,h as s}from"./p-Bf3p-DY2.js";import{g as e}from"./p-B2zUuNXz.js";import{GidsOverflowContainerCommonUtils as a}from"@ganpatiinfo/gids-core-shared";const{showGidsOverflowContainerBottomShadow:r,showGidsOverflowContainerTopShadow:n}=a,c=o(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.shadowLocation="bottom"}connectedCallback(){const t=e();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this._textArea=this._el.shadowRoot?.querySelector(".gids-overflow-container__text-area"),r(this.shadowLocation)&&this._textArea.scrollHeight>this._textArea.offsetHeight&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity","1")}calculateShadows(){const t=this._textArea.scrollTop<=0?0:this._textArea.scrollTop;this._textArea.scrollTop+this._textArea.offsetHeight>=this._textArea.scrollHeight?this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0"):0!==t?t>0&&(n(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-before-opacity",""+Math.min(t/20,1)),r(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity",""+Math.min((this._textArea.scrollHeight-(this._textArea.scrollTop+this._textArea.offsetHeight))/20,1))):this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0")}render(){return s("div",{key:"97362225f8b3eb16c63650c2265649f0c10cd02d",class:"gids-overflow-container__text-area",onScroll:this.calculateShadows.bind(this)},s("slot",{key:"833add367bb620d6405caab9aa0fddbbf99185a5"}))}get _el(){return this}},[257,"gids-overflow-container",{shadowLocation:[513,"shadow-location"]}]);function h(){"undefined"!=typeof customElements&&["gids-overflow-container"].forEach((o=>{"gids-overflow-container"===o&&(customElements.get(t(o))||customElements.define(t(o),c))}))}h();const d=c,f=h;export{d as GidsOverflowContainer,f as defineCustomElement}
1
+ import{t,p as o,H as i,h as s}from"./p-Bf3p-DY2.js";import{g as e}from"./p-B2zUuNXz.js";import{GidsOverflowContainerCommonUtils as a}from"@ganpatiinfo/gids-core-shared";const{showGidsOverflowContainerBottomShadow:r,showGidsOverflowContainerTopShadow:n}=a,c=o(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.shadowLocation="bottom"}connectedCallback(){const t=e();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this._textArea=this._el.shadowRoot?.querySelector(".gids-overflow-container__text-area"),r(this.shadowLocation)&&this._textArea.scrollHeight>this._textArea.offsetHeight&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity","1")}calculateShadows(){const t=this._textArea.scrollTop<=0?0:this._textArea.scrollTop;this._textArea.scrollTop+this._textArea.offsetHeight>=this._textArea.scrollHeight?this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0"):0!==t?t>0&&(n(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-before-opacity",""+Math.min(t/20,1)),r(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity",""+Math.min((this._textArea.scrollHeight-(this._textArea.scrollTop+this._textArea.offsetHeight))/20,1))):this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0")}render(){return s("div",{key:"da2e579bb37ac775378a4f53c7c30b4f578d9c94",class:"gids-overflow-container__text-area",onScroll:this.calculateShadows.bind(this)},s("slot",{key:"eaa87a33af09ad8a96361c0368c50730c172bdc1"}))}get _el(){return this}},[257,"gids-overflow-container",{shadowLocation:[513,"shadow-location"]}]);function h(){"undefined"!=typeof customElements&&["gids-overflow-container"].forEach((o=>{"gids-overflow-container"===o&&(customElements.get(t(o))||customElements.define(t(o),c))}))}h();const d=c,f=h;export{d as GidsOverflowContainer,f as defineCustomElement}
@@ -1 +1 @@
1
- import{h as t,t as i,p as n,H as e,F as a}from"./p-Bf3p-DY2.js";import{g as o}from"./p-B2zUuNXz.js";import{g as s,a as r}from"./p-CVtNa0cL.js";import{GidsSnackbarContainerWebUtils as l,GidsNotificationContainerWebUtils as m,GidsOverlayProviderWebUtils as c}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-D4Pimu_8.js";import{G as p}from"./p-UVmSPzTd.js";const{getGidsSnackbarContainerClassNames:f,getSnackbarContainerIconNames:u}=l,g=({appearance:i="default",children:n,button:e,class:a,...o})=>{const s=u(i);return t("div",{...o,class:f({appearance:i},a)},t("div",{class:"gids-snackbar-container__content"},"default"!==i&&null!=s?t(d,{name:s,alt:"",appearance:"filled",size:"md",class:"gids-snackbar-container__icon"}):null,"string"==typeof n?t("p",null,n):n),e)},{getGidsNotificationContainerClassNames:h,getNotificationContainerIconNames:b}=m,v=({notificationTitle:i,children:n,button:e,appearance:a="default",pronunciation:o="standard",onCloseNotificationClick:s,class:r,...l})=>{const m=b(a);return t("div",{class:h({appearance:a},r),...l},"default"!==a&&m?t("div",{class:"gids-notification-container__leading-icon-wrapper"},t(d,{size:"md",name:m,alt:"",appearance:"filled"})):null,t("div",{class:"gids-notification-container__content-wrapper"},t("div",{class:"gids-notification-container__top-content"},t("div",{class:"gids-notification-container__text-content"},null!=i&&""!==i?t("span",{class:"gids-notification-container__title"},i):null,n?"string"==typeof n?t("p",null,n):n:null),"standard"===o?t("div",{class:"gids-notification-container__cross-btn-wrapper"},t(p,{size:"sm",appearance:"subtle",width:"intrinsic",leadingIcon:t(d,{name:"cross",size:"md",appearance:"regular"}),onClick:s})):null),e?t("div",{class:"gids-notification-container__bottom-content"},e):null))},{getComponentClasses:y,getComponentStackClasses:k}=c,w=n(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this._parentOverlayProvider=null,this._componentQueue=[],this._allowedComponentQueue=[],this._exitingComponents=[],this._renderSnackbar=(i,n)=>{const{id:e,message:a,appearance:o,buttonLabel:s,onButtonClick:r}=i;return t(g,{key:e,class:n,children:a,appearance:o,button:null!=s&&""!==s?t(p,{appearance:"subtle",onClick:r},s):void 0})},this._renderNotification=(i,n)=>{const{id:e,notificationTitle:a,message:o,pronunciation:s,appearance:r,buttonLabel:l,onButtonClick:m,timerInMs:c}=i;return t(v,{key:e,class:n,notificationTitle:a,children:o,pronunciation:s,appearance:r,onCloseNotificationClick:()=>this.removeComponent(i,c||0,!0),button:null!=l&&""!==l?t(p,{appearance:"default",size:"sm",onClick:m},l):void 0})},this._renderComponent=t=>{const{componentName:i,position:n="bottom-center",id:e}=t,a=y({position:n,id:e,exitingComponents:this._exitingComponents});return null==i||"snackbar"===i?this._renderSnackbar(t,a):"notification"===i?this._renderNotification(t,a):null}}connectedCallback(){const t=o();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t),this._parentOverlayProvider=s(this._el)}_isRoot(){return null===this._parentOverlayProvider}async getRootOverlayProvider(){return this._isRoot()?this._el:this._parentOverlayProvider}autoHide(t){return new Promise((i=>{const n=setTimeout((()=>(clearTimeout(n),i({isTimeout:!0}))),t)}))}async _queueSnackbar(t){const{appearance:i,message:n,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r}=t,l={id:""+(Date.now()+Math.random()),message:n,appearance:i,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r};this._componentQueue=[...this._componentQueue,l],this.processSingleComponentQueue()}async _queueNotification(t){const{appearance:i,notificationTitle:n,pronunciation:e,message:a,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m}=t,c={id:""+(Date.now()+Math.random()),notificationTitle:n,message:a,pronunciation:e,appearance:i,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m};this._componentQueue=[...this._componentQueue,c],this.processMultiComponentQueue()}async queueComponent(t){if(await this._isRoot()){const{componentName:i}=t;null!=i&&"snackbar"!==i||this._queueSnackbar(t),"notification"===i&&this._queueNotification(t)}else(await this.getRootOverlayProvider()).queueComponent(t)}async removeComponent(t,i,n){return n||await this.autoHide(i),this._exitingComponents=[...this._exitingComponents,t.id],new Promise((i=>{setTimeout((()=>{this._componentQueue=this._componentQueue.filter((i=>i.id!==t.id)),this._exitingComponents=this._exitingComponents.filter((i=>i!==t.id)),this._allowedComponentQueue=[],i()}),500)}))}async processSingleComponentQueue(){if(0===this._componentQueue.length)return;const t=this._componentQueue[0];if(!t)return;this._allowedComponentQueue=[t],await new Promise((t=>requestAnimationFrame((()=>t()))));const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1),this.processSingleComponentQueue()}async processMultiComponentQueue(){const t=this._componentQueue;0!==t.length&&(this._allowedComponentQueue=t,await new Promise((t=>requestAnimationFrame((()=>t())))),this._allowedComponentQueue.map((async t=>{const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1)})),this.processMultiComponentQueue())}render(){const i=this._allowedComponentQueue[0]?.position||"bottom-center";return t(a,{key:"98b34b44016b714b3ea32f097a954e7044928a09"},t("slot",{key:"81a68d3e2087bb2cb547e33579bd9f92ef45e968"}),this._isRoot()?t("div",{class:k({position:i})},[...this._allowedComponentQueue].reverse().map((t=>this._renderComponent(t)))):null)}get _el(){return this}static get style(){return".common-component-stack{display:flex;flex-direction:column;position:fixed;gap:var(--gids-gap-200);min-width:var(--gids-width-2-xs);max-width:var(--gids-width-md);width:100%}.component-stack-bottom-left{justify-self:left;bottom:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-right{justify-self:right;bottom:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-left{top:50%;justify-self:left;align-self:center;left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-right{top:50%;justify-self:right;align-self:center;right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-center{justify-self:center;top:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-left{justify-self:left;top:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-right{justify-self:right;top:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-center{justify-self:center;bottom:var(--gids-padding-vertical-edge-to-element-250)}.component-enter-bottom-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-center{animation-name:slide-up-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-center{animation-name:slide-up-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-center{animation-name:slide-down-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-center{animation-name:slide-down-invisible;animation-duration:0.3s;animation-fill-mode:forwards}@keyframes slide-up-visible{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-invisible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(100%)}}@keyframes slide-up-invisible{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-visible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-100%)}}@keyframes left-to-right-visible{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@keyframes right-to-left-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-100%)}}@keyframes right-to-left-visible{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@keyframes left-to-right-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(100%)}}"}},[257,"gids-overlay-provider",{_componentQueue:[32],_allowedComponentQueue:[32],_exitingComponents:[32],queueComponent:[64]}]);function C(){"undefined"!=typeof customElements&&["gids-overlay-provider"].forEach((t=>{"gids-overlay-provider"===t&&(customElements.get(i(t))||customElements.define(i(t),w))}))}C();const _=w,N=C;export{_ as GidsOverlayProvider,N as defineCustomElement}
1
+ import{h as t,t as i,p as n,H as e,F as a}from"./p-Bf3p-DY2.js";import{g as o}from"./p-B2zUuNXz.js";import{g as s,a as r}from"./p-CVtNa0cL.js";import{GidsSnackbarContainerWebUtils as l,GidsNotificationContainerWebUtils as m,GidsOverlayProviderWebUtils as c}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-D4Pimu_8.js";import{G as p}from"./p-UVmSPzTd.js";const{getGidsSnackbarContainerClassNames:f,getSnackbarContainerIconNames:u}=l,g=({appearance:i="default",children:n,button:e,class:a,...o})=>{const s=u(i);return t("div",{...o,class:f({appearance:i},a)},t("div",{class:"gids-snackbar-container__content"},"default"!==i&&null!=s?t(d,{name:s,alt:"",appearance:"filled",size:"md",class:"gids-snackbar-container__icon"}):null,"string"==typeof n?t("p",null,n):n),e)},{getGidsNotificationContainerClassNames:h,getNotificationContainerIconNames:v}=m,b=({notificationTitle:i,children:n,button:e,appearance:a="default",pronunciation:o="standard",onCloseNotificationClick:s,class:r,...l})=>{const m=v(a);return t("div",{class:h({appearance:a},r),...l},"default"!==a&&m?t("div",{class:"gids-notification-container__leading-icon-wrapper"},t(d,{size:"md",name:m,alt:"",appearance:"filled"})):null,t("div",{class:"gids-notification-container__content-wrapper"},t("div",{class:"gids-notification-container__top-content"},t("div",{class:"gids-notification-container__text-content"},null!=i&&""!==i?t("span",{class:"gids-notification-container__title"},i):null,n?"string"==typeof n?t("p",null,n):n:null),"standard"===o?t("div",{class:"gids-notification-container__cross-btn-wrapper"},t(p,{size:"sm",appearance:"subtle",width:"intrinsic",leadingIcon:t(d,{name:"cross",size:"md",appearance:"regular"}),onClick:s})):null),e?t("div",{class:"gids-notification-container__bottom-content"},e):null))},{getComponentClasses:y,getComponentStackClasses:k}=c,w=n(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this._parentOverlayProvider=null,this._componentQueue=[],this._allowedComponentQueue=[],this._exitingComponents=[],this._renderSnackbar=(i,n)=>{const{id:e,message:a,appearance:o,buttonLabel:s,onButtonClick:r}=i;return t(g,{key:e,class:n,children:a,appearance:o,button:null!=s&&""!==s?t(p,{appearance:"subtle",onClick:r},s):void 0})},this._renderNotification=(i,n)=>{const{id:e,notificationTitle:a,message:o,pronunciation:s,appearance:r,buttonLabel:l,onButtonClick:m,timerInMs:c}=i;return t(b,{key:e,class:n,notificationTitle:a,children:o,pronunciation:s,appearance:r,onCloseNotificationClick:()=>this.removeComponent(i,c||0,!0),button:null!=l&&""!==l?t(p,{appearance:"default",size:"sm",onClick:m},l):void 0})},this._renderComponent=t=>{const{componentName:i,position:n="bottom-center",id:e}=t,a=y({position:n,id:e,exitingComponents:this._exitingComponents});return null==i||"snackbar"===i?this._renderSnackbar(t,a):"notification"===i?this._renderNotification(t,a):null}}connectedCallback(){const t=o();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t),this._parentOverlayProvider=s(this._el)}_isRoot(){return null===this._parentOverlayProvider}async getRootOverlayProvider(){return this._isRoot()?this._el:this._parentOverlayProvider}autoHide(t){return new Promise((i=>{const n=setTimeout((()=>(clearTimeout(n),i({isTimeout:!0}))),t)}))}async _queueSnackbar(t){const{appearance:i,message:n,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r}=t,l={id:""+(Date.now()+Math.random()),message:n,appearance:i,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r};this._componentQueue=[...this._componentQueue,l],this.processSingleComponentQueue()}async _queueNotification(t){const{appearance:i,notificationTitle:n,pronunciation:e,message:a,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m}=t,c={id:""+(Date.now()+Math.random()),notificationTitle:n,message:a,pronunciation:e,appearance:i,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m};this._componentQueue=[...this._componentQueue,c],this.processMultiComponentQueue()}async queueComponent(t){if(await this._isRoot()){const{componentName:i}=t;null!=i&&"snackbar"!==i||this._queueSnackbar(t),"notification"===i&&this._queueNotification(t)}else(await this.getRootOverlayProvider()).queueComponent(t)}async removeComponent(t,i,n){return n||await this.autoHide(i),this._exitingComponents=[...this._exitingComponents,t.id],new Promise((i=>{setTimeout((()=>{this._componentQueue=this._componentQueue.filter((i=>i.id!==t.id)),this._exitingComponents=this._exitingComponents.filter((i=>i!==t.id)),this._allowedComponentQueue=[],i()}),500)}))}async processSingleComponentQueue(){if(0===this._componentQueue.length)return;const t=this._componentQueue[0];if(!t)return;this._allowedComponentQueue=[t],await new Promise((t=>requestAnimationFrame((()=>t()))));const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1),this.processSingleComponentQueue()}async processMultiComponentQueue(){const t=this._componentQueue;0!==t.length&&(this._allowedComponentQueue=t,await new Promise((t=>requestAnimationFrame((()=>t())))),this._allowedComponentQueue.map((async t=>{const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1)})),this.processMultiComponentQueue())}render(){const i=this._allowedComponentQueue[0]?.position||"bottom-center";return t(a,{key:"c33ac4169b668a47a2a2a68dd2578378379e8b71"},t("slot",{key:"a404014f33eb6a13ca999a97c657e4d6c743e946"}),this._isRoot()?t("div",{class:k({position:i})},[...this._allowedComponentQueue].reverse().map((t=>this._renderComponent(t)))):null)}get _el(){return this}static get style(){return".common-component-stack{display:flex;flex-direction:column;position:fixed;gap:var(--gids-gap-200);min-width:var(--gids-width-2-xs);max-width:var(--gids-width-md);width:100%}.component-stack-bottom-left{justify-self:left;bottom:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-right{justify-self:right;bottom:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-left{top:50%;justify-self:left;align-self:center;left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-right{top:50%;justify-self:right;align-self:center;right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-center{justify-self:center;top:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-left{justify-self:left;top:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-right{justify-self:right;top:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-center{justify-self:center;bottom:var(--gids-padding-vertical-edge-to-element-250)}.component-enter-bottom-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-center{animation-name:slide-up-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-center{animation-name:slide-up-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-center{animation-name:slide-down-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-center{animation-name:slide-down-invisible;animation-duration:0.3s;animation-fill-mode:forwards}@keyframes slide-up-visible{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-invisible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(100%)}}@keyframes slide-up-invisible{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-visible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-100%)}}@keyframes left-to-right-visible{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@keyframes right-to-left-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-100%)}}@keyframes right-to-left-visible{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@keyframes left-to-right-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(100%)}}"}},[257,"gids-overlay-provider",{_componentQueue:[32],_allowedComponentQueue:[32],_exitingComponents:[32],queueComponent:[64]}]);function C(){"undefined"!=typeof customElements&&["gids-overlay-provider"].forEach((t=>{"gids-overlay-provider"===t&&(customElements.get(i(t))||customElements.define(i(t),w))}))}C();const _=w,N=C;export{_ as GidsOverlayProvider,N as defineCustomElement}
@@ -1 +1 @@
1
- import{h as e,t,p as s,H as i,c as n,f as a,F as r}from"./p-Bf3p-DY2.js";import{GidsStrengthMeterWebUtils as d,GidsRequirementsMeterLabelWebUtils as l,GidsRequirementsMeterWebUtils as o,generateId as h,GidsPasswordFieldWebUtils as u}from"@ganpatiinfo/gids-web-shared";import{g as c}from"./p-B2zUuNXz.js";import{G as m}from"./p-Dg2yoUxw.js";import{G as f}from"./p-UxDcM-C5.js";import{G as g}from"./p-UVmSPzTd.js";import{minLengthRuleCanBeApplied as p,getMeterRulesFromRequirements as b,getDefaultRulesAndRequirementsForMeters as x}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils.js";import{GidsStrengthMeterCommonUtils as q,GidsRequirementsMeterLabelCommonUtils as R,GidsRequirementsMeterCommonUtils as w}from"@ganpatiinfo/gids-core-shared";import{minLengthRuleCanBeApplied as v}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils";import{G as y}from"./p-D4Pimu_8.js";import{d as M}from"./p-DNTv2BQ5.js";import{d as L}from"./p-BQ-ZnlnH.js";const{getGidsStrengthMeterClassNames:C}=d,{getStrengthMeterScore:k,getColorModifierByScore:P}=q,S=({text:t,textMinLength:s,meterRules:i=["1-uppercase","1-lowercase","1-digit","1-special-character","include-min-length"],class:n})=>{const a=(t,s,i)=>e("div",{key:t,class:["gids-strength-meter__strength-"+t,i?"is-active":"",i?s:""].filter(Boolean).join(" ")});return i.length>0?e("div",{class:C(n)},(()=>{const e=i.length,n=k({text:t,textMinLength:s,meterRules:i}),r=P({textScore:n,maxScore:e});return Array.from({length:e},((e,t)=>{const d=t+1,l=d<=n;return"include-min-length"===i[d]?v({requirementRule:"include-min-length",textMinLength:s})?a(d,r,l):null:a(d,r,l)}))})()):null},{getGidsRequirementsMeterLabelClassNames:T}=l,{getRequirementsMeterLabelLeadingIcon:_}=R,G=t=>{const{label:s,status:i="default",leadingIconVisible:n=!0,class:a}=t,r=_(i);return e("div",{class:T({status:i},a)},n&&i&&r?e(y,{name:r,size:"sm",appearance:"filled"}):null,s&&""!==s?e("span",null,s):null)},{checkRequirementRuleSatisfied:B}=w,{getGidsRequirementsMeterClassNames:F}=o,j=({requirements:t=[],text:s,textMinLength:i,class:n})=>{const a=(t,s)=>e(G,{status:s?"success":"error",label:t.requirementText});return e("div",{class:F(n)},t.map((e=>{if(null!=e?.requirementText&&null!=e?.requirementRule){const t=B({rule:e.requirementRule,textMinLength:i,text:s});return"include-min-length"===e.requirementRule?!0===p({requirementRule:e.requirementRule,textMinLength:i})?a(e,t):null:a(e,t)}return null})))},{inputToGidsFieldStatusForPassword:E}=u,z=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsPasswordFieldClear=n(this,"gidsPasswordFieldClear"),this.gidsPasswordFieldRevealPassword=n(this,"gidsPasswordFieldRevealPassword"),this.isPasswordRevealed=!1,this.meterRules=[],this.requirementsMeterRequirements=[],this.requirements=[],this.#e=h(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsPasswordFieldClear.emit()},this._handleRevealPassword=()=>{const e=this.#t?.querySelector("input.gids-input__control");this.isPasswordRevealed=null!=e?.value&&""!==e.value&&!1===this.isPasswordRevealed,this._el.dispatchEvent(new CustomEvent("gidsPasswordFieldRevealPassword",{detail:{passwordRevealed:this.isPasswordRevealed},bubbles:!0,composed:!0}))},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))},this._isRequirementAndStrengthMeterVisible=()=>{const e=this.requirements;return!!(e&&e.length>0)},this._handleRequirementsMeter=()=>{const e=this._isRequirementAndStrengthMeterVisible();this.requirementsMeterRequirements=this.requirements&&this.requirements.length>0?this.requirements:[],this.meterRules=e?b(this.requirements):[]}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}handleRequirementsChange(e){void 0===e&&(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}componentWillLoad(){this.requirements||(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._handleRequirementsMeter(),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:t,...s}=this.inputProps??{},i=t??this.#e,n=this.showClearButton&&void 0!==this.value&&this.value.length>0,a=this.showRevealPasswordButton,d={...s},l=void 0!==d?.placeholder&&null!==d.placeholder&&""!=d.placeholder?d.placeholder:"Enter password",o=this.isPasswordRevealed,h=this.meterRules,u=void 0!==this.textMinLength?this.textMinLength:8;return e(r,{key:"ad8824cc057aa37efa91c06726fdc1b557d409de"},e("gids-field",{key:"59ebf5007857762d94d9b97e43b78ddff47c9ff0",disabled:this.disabled,count:void 0,helperText:this.helperText,statusText:this.statusText,status:E(this.status)},e(m,{key:"48268834c82d79a615a8664cc82392ced99fdca7",slot:"label",disabled:this.disabled,info:e("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),e("gids-input",{key:"b788da8c254e5d60500d61d304ec651d3fedea0c",ref:e=>this.#t=e,appearance:"default",status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:void 0,trailingLabel:void 0,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...d,placeholder:l,type:o?"text":"password",id:i,maxLength:this.maxLength}},e("slot",{key:"d391d4aa12d3141c90ed75738407d1c67b0d0702",name:"leadingIcon"}),e("slot",{key:"6e832b40ffd56cf269c1a0a864f5d87766a27388",name:"leadingAccessory"}),e("div",{key:"583893f7fa33d8f6a38f3751e47294ac48f96176",slot:"trailingAccessory",class:"gids-password-field__trailing-accessory"},n&&e(f,{key:"405c0a96c792c3ea4ab9ed3f62b902865328a878",label:"clear text",size:"lg",onPressDismiss:this._handleDismiss}),a&&e(g,{key:"20239498d925c2b88a0197cd24d32dc5f0a3d241",appearance:"default",size:"xs",width:"intrinsic",disabled:this.disabled,onClick:this._handleRevealPassword},o?"Hide":"Show")))),e("div",{key:"0f86c1cdf84b819848c7e4051720482ff5a5247f",class:"gids-password-field__meters-container"},e(S,{key:"646c27887adf3f4913bfa78c9f2c30758a4c2491",meterRules:h,text:this.value,textMinLength:u}),e(j,{key:"07ff4be07b41ea41504a40c775402b138c2c0dc8",requirements:this.requirementsMeterRequirements,text:this.value,textMinLength:u})))}get _el(){return this}static get watchers(){return{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}}},[260,"gids-password-field",{label:[513],showClearButton:[516,"show-clear-button"],showRevealPasswordButton:[516,"show-reveal-password-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],loading:[516],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16],textMinLength:[514,"text-min-length"],requirements:[16],isPasswordRevealed:[32],meterRules:[32],requirementsMeterRequirements:[32]},void 0,{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}]);function D(){"undefined"!=typeof customElements&&["gids-password-field","gids-field","gids-input"].forEach((e=>{switch(e){case"gids-password-field":customElements.get(t(e))||customElements.define(t(e),z);break;case"gids-field":customElements.get(t(e))||M();break;case"gids-input":customElements.get(t(e))||L()}}))}D();const O=z,U=D;export{O as GidsPasswordField,U as defineCustomElement}
1
+ import{h as e,t,p as s,H as i,c as n,f as a,F as r}from"./p-Bf3p-DY2.js";import{GidsStrengthMeterWebUtils as l,GidsRequirementsMeterLabelWebUtils as d,GidsRequirementsMeterWebUtils as o,generateId as h,GidsPasswordFieldWebUtils as u}from"@ganpatiinfo/gids-web-shared";import{g as c}from"./p-B2zUuNXz.js";import{G as m}from"./p-Dg2yoUxw.js";import{G as g}from"./p-UxDcM-C5.js";import{G as p}from"./p-UVmSPzTd.js";import{minLengthRuleCanBeApplied as b,getMeterRulesFromRequirements as f,getDefaultRulesAndRequirementsForMeters as x}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils.js";import{GidsStrengthMeterCommonUtils as R,GidsRequirementsMeterLabelCommonUtils as q,GidsRequirementsMeterCommonUtils as w}from"@ganpatiinfo/gids-core-shared";import{minLengthRuleCanBeApplied as v}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils";import{G as y}from"./p-D4Pimu_8.js";import{d as M}from"./p-C7ifjRCE.js";import{d as L}from"./p-Doi8Yizl.js";const{getGidsStrengthMeterClassNames:C}=l,{getStrengthMeterScore:k,getColorModifierByScore:P}=R,S=({text:t,textMinLength:s,meterRules:i=["1-uppercase","1-lowercase","1-digit","1-special-character","include-min-length"],class:n})=>{const a=(t,s,i)=>e("div",{key:t,class:["gids-strength-meter__strength-"+t,i?"is-active":"",i?s:""].filter(Boolean).join(" ")});return i.length>0?e("div",{class:C(n)},(()=>{const e=i.length,n=k({text:t,textMinLength:s,meterRules:i}),r=P({textScore:n,maxScore:e});return Array.from({length:e},((e,t)=>{const l=t+1,d=l<=n;return"include-min-length"===i[l]?v({requirementRule:"include-min-length",textMinLength:s})?a(l,r,d):null:a(l,r,d)}))})()):null},{getGidsRequirementsMeterLabelClassNames:_}=d,{getRequirementsMeterLabelLeadingIcon:G}=q,T=t=>{const{label:s,status:i="default",leadingIconVisible:n=!0,class:a}=t,r=G(i);return e("div",{class:_({status:i},a)},n&&i&&r?e(y,{name:r,size:"sm",appearance:"filled"}):null,s&&""!==s?e("span",null,s):null)},{checkRequirementRuleSatisfied:j}=w,{getGidsRequirementsMeterClassNames:F}=o,E=({requirements:t=[],text:s,textMinLength:i,class:n})=>{const a=(t,s)=>e(T,{status:s?"success":"error",label:t.requirementText});return e("div",{class:F(n)},t.map((e=>{if(null!=e?.requirementText&&null!=e?.requirementRule){const t=j({rule:e.requirementRule,textMinLength:i,text:s});return"include-min-length"===e.requirementRule?!0===b({requirementRule:e.requirementRule,textMinLength:i})?a(e,t):null:a(e,t)}return null})))},{inputToGidsFieldStatusForPassword:B}=u,z=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsPasswordFieldClear=n(this,"gidsPasswordFieldClear"),this.gidsPasswordFieldRevealPassword=n(this,"gidsPasswordFieldRevealPassword"),this.isPasswordRevealed=!1,this.meterRules=[],this.requirementsMeterRequirements=[],this.requirements=[],this.#e=h(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsPasswordFieldClear.emit()},this._handleRevealPassword=()=>{const e=this.#t?.querySelector("input.gids-input__control");this.isPasswordRevealed=null!=e?.value&&""!==e.value&&!1===this.isPasswordRevealed,this._el.dispatchEvent(new CustomEvent("gidsPasswordFieldRevealPassword",{detail:{passwordRevealed:this.isPasswordRevealed},bubbles:!0,composed:!0}))},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))},this._isRequirementAndStrengthMeterVisible=()=>{const e=this.requirements;return!!(e&&e.length>0)},this._handleRequirementsMeter=()=>{const e=this._isRequirementAndStrengthMeterVisible();this.requirementsMeterRequirements=this.requirements&&this.requirements.length>0?this.requirements:[],this.meterRules=e?f(this.requirements):[]}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}handleRequirementsChange(e){void 0===e&&(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}componentWillLoad(){this.requirements||(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._handleRequirementsMeter(),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:t,...s}=this.inputProps??{},i=t??this.#e,n=this.showClearButton&&void 0!==this.value&&this.value.length>0,a=this.showRevealPasswordButton,l={...s},d=void 0!==l?.placeholder&&null!==l.placeholder&&""!=l.placeholder?l.placeholder:"Enter password",o=this.isPasswordRevealed,h=this.meterRules,u=void 0!==this.textMinLength?this.textMinLength:8;return e(r,{key:"5a01700ed2e889989e76a785a4ea9f0832d43cba"},e("gids-field",{key:"82a848875d90d33e909277e9caca152802263775",disabled:this.disabled,count:void 0,helperText:this.helperText,statusText:this.statusText,status:B(this.status)},e(m,{key:"cbc12d98213148de3bd0bd24f73122fcc1bb0175",slot:"label",disabled:this.disabled,info:e("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),e("gids-input",{key:"86182396314618b1191b5af4dad1974ecec29d90",ref:e=>this.#t=e,appearance:"default",status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:void 0,trailingLabel:void 0,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...l,placeholder:d,type:o?"text":"password",id:i,maxLength:this.maxLength}},e("slot",{key:"e0b5bfe6509975144dbb6eb9051cc161ee3730fb",name:"leadingIcon"}),e("slot",{key:"591d68804011e67edefbebd2ecbb0477608a6b9e",name:"leadingAccessory"}),e("div",{key:"e0b980ba3896b39aa59601f6ccc1940459de83da",slot:"trailingAccessory",class:"gids-password-field__trailing-accessory"},n&&e(g,{key:"29890daceaa8d95274eb501dba3ba139b1992b3f",label:"clear text",size:"lg",onPressDismiss:this._handleDismiss}),a&&e(p,{key:"6e278e24e56531945fd9ee76b85278d31bf359d7",appearance:"default",size:"xs",width:"intrinsic",disabled:this.disabled,onClick:this._handleRevealPassword},o?"Hide":"Show")))),e("div",{key:"6b379f62ce81fc6c2c641e98c53f3b5a57abe939",class:"gids-password-field__meters-container"},e(S,{key:"de60ed4d66045e988f60a8240b1e649003c7a841",meterRules:h,text:this.value,textMinLength:u}),e(E,{key:"8bcaae4c9d45b10b8462f81c885dbb4998f62a8f",requirements:this.requirementsMeterRequirements,text:this.value,textMinLength:u})))}get _el(){return this}static get watchers(){return{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}}},[260,"gids-password-field",{label:[513],showClearButton:[516,"show-clear-button"],showRevealPasswordButton:[516,"show-reveal-password-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],loading:[516],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16],textMinLength:[514,"text-min-length"],requirements:[16],isPasswordRevealed:[32],meterRules:[32],requirementsMeterRequirements:[32]},void 0,{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}]);function D(){"undefined"!=typeof customElements&&["gids-password-field","gids-field","gids-input"].forEach((e=>{switch(e){case"gids-password-field":customElements.get(t(e))||customElements.define(t(e),z);break;case"gids-field":customElements.get(t(e))||M();break;case"gids-input":customElements.get(t(e))||L()}}))}D();const O=z,U=D;export{O as GidsPasswordField,U as defineCustomElement}
@@ -1 +1 @@
1
- import{G as o,d as s}from"./p-DPIK2ayL.js";const a=o,p=s;export{a as GidsPieChart,p as defineCustomElement}
1
+ import{G as o,d as p}from"./p-BfnzH6wp.js";const s=o,r=p;export{s as GidsPieChart,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as e,H as o,h as i,F as s}from"./p-Bf3p-DY2.js";import{G as r}from"./p-a3JfEYJp.js";import{G as a}from"./p-B8kX8Vqv.js";const n=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.previouslyFocusedElement=null,this.focusableElements=[],this.handleToggleEvent=t=>{t.stopPropagation();const e=this.floatingElementManager.isVisible();this.floatingElementManager.toggle(),!e&&this.floatingElementManager.isVisible()?this.onPopoverShow():e&&!this.floatingElementManager.isVisible()&&this.onPopoverHide()},this.handleDocumentClick=t=>{this.floatingElementManager.isVisible()&&!this._el.contains(t.target)&&(this.floatingElementManager.hide(),this.onPopoverHide())},this.handleKeyDown=t=>{if(this.floatingElementManager.isVisible())return"Escape"===t.key?(t.preventDefault(),this.floatingElementManager.hide(),void this.onPopoverHide()):void("Tab"===t.key&&this.trapFocus(t))}}componentDidLoad(){this.floatingElementManager=new r(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:!0,floatingElementSelector:"#popover",arrowElementSelector:"#arrow",visibilityClass:"gids-popover--visible",elementType:a.POPOVER,getAnchorElementFromSlot:t=>{const e=t.querySelector('slot[name="anchor"]');return e?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("click",this.handleToggleEvent),document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleKeyDown))}onPopoverShow(){this.previouslyFocusedElement=document.activeElement,this.updateFocusableElements(),setTimeout((()=>{this.focusableElements.length>0&&this.focusableElements[0]&&this.focusableElements[0].focus()}),50)}onPopoverHide(){this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}updateFocusableElements(){const t=this._el.shadowRoot?.querySelector("#popover");if(!t)return;const e=[],o=l(t);e.push(...o);const i=this._el.shadowRoot?.querySelector("slot:not([name])");i&&i.assignedElements({flatten:!0}).forEach((t=>{const o=l(t);e.push(...o)})),this.focusableElements=e.sort(((t,e)=>{const o=t.compareDocumentPosition(e),i=!!(o&Node.DOCUMENT_POSITION_FOLLOWING),s=!!(o&Node.DOCUMENT_POSITION_PRECEDING);return i?-1:s?1:0}))}trapFocus(t){if(0===this.focusableElements.length)return;const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];let i=document.activeElement;if(i===this._el){const t=this._el.shadowRoot?.activeElement;null!==t&&(i=t)}const s=-1!==this.focusableElements.indexOf(i);t.shiftKey?i!==e&&s||(t.preventDefault(),o&&o.focus()):i!==o&&s||(t.preventDefault(),e&&e.focus())}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&t.removeEventListener("click",this.handleToggleEvent),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleKeyDown)}render(){return i(s,{key:"d46aad4680cea0578107034ca4945659910c6dd8"},i("slot",{key:"71b5b313244ca9be78ca0e76e0056a8d6f201f89",name:"anchor"}),i("div",{key:"9be3b9f604bf8a15795ff2f6cbbc439936734795",id:"popover",part:"popover",role:"dialog","aria-modal":"true",tabindex:"-1"},i("span",{key:"48f4b97c8c0f2df0bea15c067ebf7cc28f98e98c",id:"arrow"}),i("div",{key:"5547088b9b186ab816e4d6a9e9a3c6bfdde41fd2"},i("slot",{key:"460c256bddf41d061352917b129501fdd3f383a2"}))))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-popover{--gidsPopover-background:var(--gids-elevation-surface-overlay-default);--gidsPopover-text-color:var(--gids-color-text-default);--gidsPopover-padding:var(--gids-padding-vertical-edge-to-element-200) var(--gids-padding-horizontal-edge-to-element-300);--gidsPopover-border-radius:var(--gids-border-radius-lg);--gidsPopover-tip-border-radius:2px;--gidsPopover-tip-size:12px;--gidsPopover-shadow:var(--gids-elevation-shadow-overlay);--gidsFloatingElement-background:var(--gidsPopover-background);--gidsFloatingElement-tip-border-radius:var(--gidsPopover-tip-border-radius)}[part=popover]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;background-color:var(--gidsPopover-background);color:var(--gidsPopover-text-color);border-radius:var(--gidsPopover-border-radius);box-shadow:var(--gidsPopover-shadow);z-index:1000;opacity:0;pointer-events:none;outline:none}[part=popover]:focus{outline:none}[part=popover].gids-popover--visible{pointer-events:initial;opacity:1}[part=popover] span#arrow{position:absolute;height:var(--gidsPopover-tip-size);width:var(--gidsPopover-tip-size);background-color:var(--gidsPopover-background)}"}},[257,"gids-popover",{htmlFor:[513,"for"],placement:[513]},void 0,{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}]),d=t=>{if(!(t instanceof o))return!1;if(-1===t.tabIndex)return!1;if(t.hasAttribute("disabled"))return!1;const e=getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility||t.hidden)return!1;try{const e=t.tabIndex;t.tabIndex=-1,t.focus();const o=document.activeElement===t;return t.tabIndex=e,o&&t.blur(),o}catch{return!1}},l=t=>{const e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>d(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),o=[];d(t)&&o.push(t);let i=e.nextNode();for(;null!==i;)o.push(i),i=e.nextNode();return o};function p(){"undefined"!=typeof customElements&&["gids-popover"].forEach((e=>{"gids-popover"===e&&(customElements.get(t(e))||customElements.define(t(e),n))}))}p();const h=n,c=p;export{h as GidsPopover,c as defineCustomElement}
1
+ import{t,p as e,H as o,h as i,F as s}from"./p-Bf3p-DY2.js";import{G as r}from"./p-a3JfEYJp.js";import{G as a}from"./p-B8kX8Vqv.js";const n=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.previouslyFocusedElement=null,this.focusableElements=[],this.handleToggleEvent=t=>{t.stopPropagation();const e=this.floatingElementManager.isVisible();this.floatingElementManager.toggle(),!e&&this.floatingElementManager.isVisible()?this.onPopoverShow():e&&!this.floatingElementManager.isVisible()&&this.onPopoverHide()},this.handleDocumentClick=t=>{this.floatingElementManager.isVisible()&&!this._el.contains(t.target)&&(this.floatingElementManager.hide(),this.onPopoverHide())},this.handleKeyDown=t=>{if(this.floatingElementManager.isVisible())return"Escape"===t.key?(t.preventDefault(),this.floatingElementManager.hide(),void this.onPopoverHide()):void("Tab"===t.key&&this.trapFocus(t))}}componentDidLoad(){this.floatingElementManager=new r(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:!0,floatingElementSelector:"#popover",arrowElementSelector:"#arrow",visibilityClass:"gids-popover--visible",elementType:a.POPOVER,getAnchorElementFromSlot:t=>{const e=t.querySelector('slot[name="anchor"]');return e?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("click",this.handleToggleEvent),document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleKeyDown))}onPopoverShow(){this.previouslyFocusedElement=document.activeElement,this.updateFocusableElements(),setTimeout((()=>{this.focusableElements.length>0&&this.focusableElements[0]&&this.focusableElements[0].focus()}),50)}onPopoverHide(){this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}updateFocusableElements(){const t=this._el.shadowRoot?.querySelector("#popover");if(!t)return;const e=[],o=l(t);e.push(...o);const i=this._el.shadowRoot?.querySelector("slot:not([name])");i&&i.assignedElements({flatten:!0}).forEach((t=>{const o=l(t);e.push(...o)})),this.focusableElements=e.sort(((t,e)=>{const o=t.compareDocumentPosition(e),i=!!(o&Node.DOCUMENT_POSITION_FOLLOWING),s=!!(o&Node.DOCUMENT_POSITION_PRECEDING);return i?-1:s?1:0}))}trapFocus(t){if(0===this.focusableElements.length)return;const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];let i=document.activeElement;if(i===this._el){const t=this._el.shadowRoot?.activeElement;null!==t&&(i=t)}const s=-1!==this.focusableElements.indexOf(i);t.shiftKey?i!==e&&s||(t.preventDefault(),o&&o.focus()):i!==o&&s||(t.preventDefault(),e&&e.focus())}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&t.removeEventListener("click",this.handleToggleEvent),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleKeyDown)}render(){return i(s,{key:"da99dff29f34b163522c42a2a17bf4556dd9ba02"},i("slot",{key:"776a6ca0c9379f9059f8522feda55210476e0cd1",name:"anchor"}),i("div",{key:"1a73966a626ae553e28dca105f9b567312362497",id:"popover",part:"popover",role:"dialog","aria-modal":"true",tabindex:"-1"},i("span",{key:"06f5ddfd7795fa4f7a8c6fc7106e128d0ec51e54",id:"arrow"}),i("div",{key:"aed89418ee2297532a0655fca1a0d1bc8d24c06b"},i("slot",{key:"2474edda5a80075dabc0b19af54ea2585e62ca1d"}))))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-popover{--gidsPopover-background:var(--gids-elevation-surface-overlay-default);--gidsPopover-text-color:var(--gids-color-text-default);--gidsPopover-padding:var(--gids-padding-vertical-edge-to-element-200) var(--gids-padding-horizontal-edge-to-element-300);--gidsPopover-border-radius:var(--gids-border-radius-lg);--gidsPopover-tip-border-radius:2px;--gidsPopover-tip-size:12px;--gidsPopover-shadow:var(--gids-elevation-shadow-overlay);--gidsFloatingElement-background:var(--gidsPopover-background);--gidsFloatingElement-tip-border-radius:var(--gidsPopover-tip-border-radius)}[part=popover]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;background-color:var(--gidsPopover-background);color:var(--gidsPopover-text-color);border-radius:var(--gidsPopover-border-radius);box-shadow:var(--gidsPopover-shadow);z-index:1000;opacity:0;pointer-events:none;outline:none}[part=popover]:focus{outline:none}[part=popover].gids-popover--visible{pointer-events:initial;opacity:1}[part=popover] span#arrow{position:absolute;height:var(--gidsPopover-tip-size);width:var(--gidsPopover-tip-size);background-color:var(--gidsPopover-background)}"}},[257,"gids-popover",{htmlFor:[513,"for"],placement:[513]},void 0,{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}]),d=t=>{if(!(t instanceof o))return!1;if(-1===t.tabIndex)return!1;if(t.hasAttribute("disabled"))return!1;const e=getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility||t.hidden)return!1;try{const e=t.tabIndex;t.tabIndex=-1,t.focus();const o=document.activeElement===t;return t.tabIndex=e,o&&t.blur(),o}catch{return!1}},l=t=>{const e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>d(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),o=[];d(t)&&o.push(t);let i=e.nextNode();for(;null!==i;)o.push(i),i=e.nextNode();return o};function p(){"undefined"!=typeof customElements&&["gids-popover"].forEach((e=>{"gids-popover"===e&&(customElements.get(t(e))||customElements.define(t(e),n))}))}p();const h=n,c=p;export{h as GidsPopover,c as defineCustomElement}
@@ -1 +1 @@
1
- import{t as s,p as e,H as t,h as a}from"./p-Bf3p-DY2.js";import{g as r}from"./p-B2zUuNXz.js";import{GidsScrimWebUtils as i}from"@ganpatiinfo/gids-web-shared";const{getGidsScrimClassNames:o}=i,c=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.activeClasses=""}handleExtraClassesChange(s){this.activeClasses=o(s)}connectedCallback(){const s=r();void 0!==s&&this._el.shadowRoot?.adoptedStyleSheets.push(s),this.activeClasses=o(this.extraClasses)}render(){return a("div",{key:"43ae2df4c05e5ce29bb2cd6755ef4472e9a6e078",class:this.activeClasses,part:"root"},a("slot",{key:"2610048a1d440e95632575b232ca7d923f66cea5"}))}get _el(){return this}static get watchers(){return{extraClasses:[{handleExtraClassesChange:0}]}}static get style(){return".gids-scrim{display:flex;flex-direction:column;background-color:var(--gids-color-background-scrim);height:100vh !important;position:absolute;top:0;bottom:0;left:0;right:0;z-index:1001;align-items:center;justify-content:center;backdrop-filter:blur(12)}"}},[257,"gids-scrim",{extraClasses:[513,"extra-classes"],activeClasses:[32]},void 0,{extraClasses:[{handleExtraClassesChange:0}]}]);function n(){"undefined"!=typeof customElements&&["gids-scrim"].forEach((e=>{"gids-scrim"===e&&(customElements.get(s(e))||customElements.define(s(e),c))}))}n();const l=c,d=n;export{l as GidsScrim,d as defineCustomElement}
1
+ import{t as s,p as t,H as e,h as a}from"./p-Bf3p-DY2.js";import{g as r}from"./p-B2zUuNXz.js";import{GidsScrimWebUtils as i}from"@ganpatiinfo/gids-web-shared";const{getGidsScrimClassNames:c}=i,o=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.activeClasses=""}handleExtraClassesChange(s){this.activeClasses=c(s)}connectedCallback(){const s=r();void 0!==s&&this._el.shadowRoot?.adoptedStyleSheets.push(s),this.activeClasses=c(this.extraClasses)}render(){return a("div",{key:"f9bf11077e7b7141816116d1cace7a87d9dfa652",class:this.activeClasses,part:"root"},a("slot",{key:"221cacbb0a57c9c356d20988b02e7730e74b4430"}))}get _el(){return this}static get watchers(){return{extraClasses:[{handleExtraClassesChange:0}]}}static get style(){return".gids-scrim{display:flex;flex-direction:column;background-color:var(--gids-color-background-scrim);height:100vh !important;position:absolute;top:0;bottom:0;left:0;right:0;z-index:1001;align-items:center;justify-content:center;backdrop-filter:blur(12)}"}},[257,"gids-scrim",{extraClasses:[513,"extra-classes"],activeClasses:[32]},void 0,{extraClasses:[{handleExtraClassesChange:0}]}]);function n(){"undefined"!=typeof customElements&&["gids-scrim"].forEach((t=>{"gids-scrim"===t&&(customElements.get(s(t))||customElements.define(s(t),o))}))}n();const l=o,d=n;export{l as GidsScrim,d as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist-dev/types/components";
2
+
3
+ interface GidsTabItem extends Components.GidsTabItem, HTMLElement {}
4
+ export const GidsTabItem: {
5
+ prototype: GidsTabItem;
6
+ new (): GidsTabItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{h as e,t as a,p as r,H as i,d as o}from"./p-Bf3p-DY2.js";import{nonEmpty as t,GidsBadgeWebUtils as d,GidsTabItemWebUtils as c}from"@ganpatiinfo/gids-web-shared";import{GidsBadgeCommonUtils as s}from"@ganpatiinfo/gids-core-shared";const{getDisplayContent:n,shouldIncludeA11yText:g}=s,{getGidsBadgeClassNames:l}=d,b=({appearance:a,type:r,count:i,accessibleText:o,outline:d,class:c,...s})=>{const b=g(r,i,t(o));return e("span",{class:l({appearance:a,type:r,outline:d},c),...s},b&&e("span",{class:"gids-visually-hidden"},t(o)?o:i),"notification"===r?b?e("span",{"aria-hidden":"true"},n(i,o)):n(i,o):null)},{getGidsTabItemClassNames:v}=c,h=r(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.active=!1,this.width="intrinsic",this.appearance="default",this.badgeVisible=!1,this.badgeAppearance="information",this.badgeType="dot",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.handleHostClick=()=>{this.onPressGidsTabItem&&this.onPressGidsTabItem({itemId:this.itemId,label:this?.label??"",active:this?.active??!1,appearance:this?.appearance??"default",name:this?.name,badgeCount:this?.badgeCount??0})}}handleWidthChange(e){this.width=e}handleAppearanceChange(e){this.appearance=e}handleBadgeVisibilityChange(e){this.badgeVisible=e}handleBadgeAppearanceChange(e){this.badgeAppearance=e}handleBadgeTypeChange(e){this.badgeType=e}handleActiveChange(e){this.active=e}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconTabItem"]'),this.hasTrailingIcon=!!this.hostElement.querySelector('[slot="trailingIconTabItem"]')}render(){const a=v({appearance:this.appearance,width:this.width,active:this.active}),r=this.hasTrailingIcon,i=this.badgeVisible,t="primary"===this.appearance&&this.active?"inverse":this.badgeAppearance??"information",d=this.label;return e(o,{key:"111117f9953d07da3af26834ab19352c9334a36a",class:a,onClick:this.handleHostClick},this.hasLeadingIcon?e("slot",{name:"leadingIconTabItem"}):void 0,d&&""!==d?e("span",{class:"gids-tab-item__label"},d&&""!==d?d:void 0,i?e(b,{appearance:t,type:this.badgeType,count:this.badgeCount}):void 0):void 0,r?e("slot",{name:"trailingIconTabItem"}):void 0)}get hostElement(){return this}static get watchers(){return{width:[{handleWidthChange:0}],appearance:[{handleAppearanceChange:0}],badgeVisible:[{handleBadgeVisibilityChange:0}],badgeAppearance:[{handleBadgeAppearanceChange:0}],badgeType:[{handleBadgeTypeChange:0}],active:[{handleActiveChange:0}]}}static get style(){return".gids-tab-item{margin:0;padding:0;appearance:none;border:none;background:none;display:inline-flex;justify-content:center;align-items:center;gap:var(--gids-gap-100);padding:var(--gids-padding-vertical-edge-to-element-150) var(--gids-padding-horizontal-edge-to-element-150);color:var(--gids-color-text-accent-5);cursor:pointer}.gids-tab-item .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-5)}.gids-tab-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);display:flex;justify-content:center;align-items:center;gap:var(--gids-gap-150)}.gids-tab-item--full{display:flex}.gids-tab-item--default{border-radius:var(--gids-border-radius-md)}.gids-tab-item--default:hover{background-color:var(--gids-color-background-accent-4-subtler-hovered);color:var(--gids-color-text-accent-4)}.gids-tab-item--default:hover .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--default:active{background-color:var(--gids-color-background-accent-4-subtler-pressed);color:var(--gids-color-text-accent-4)}.gids-tab-item--default:active .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--primary{border-radius:var(--gids-border-radius-md)}.gids-tab-item--primary:hover{background-color:var(--gids-color-background-accent-4-bolder-hovered);color:var(--gids-color-text-inverse)}.gids-tab-item--primary:hover .gids-icon{--gidsIcon-color:var(--gids-color-icon-inverse)}.gids-tab-item--primary:active{background-color:var(--gids-color-background-accent-4-bolder-pressed);color:var(--gids-color-text-inverse)}.gids-tab-item--primary:active .gids-icon{--gidsIcon-color:var(--gids-color-icon-inverse)}.gids-tab-item--bordered{border-radius:var(--gids-border-radius-full)}.gids-tab-item--bordered:hover{background-color:var(--gids-color-background-accent-4-subtlest-hovered);color:var(--gids-color-text-accent-4);border:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4)}.gids-tab-item--bordered:hover .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--bordered:active{background-color:var(--gids-color-background-accent-4-subtlest-pressed);color:var(--gids-color-text-accent-4);border:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4)}.gids-tab-item--bordered:active .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--underlined{border-bottom:var(--gids-border-width-thick) solid var(--gids-color-border-input)}.gids-tab-item--underlined:hover{background-color:var(--gids-color-background-accent-4-subtlest-hovered);border-bottom:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4);border-top-left-radius:var(--gids-border-radius-md);border-top-right-radius:var(--gids-border-radius-md);color:var(--gids-color-text-accent-4)}.gids-tab-item--underlined:active{background-color:var(--gids-color-background-accent-4-subtlest-pressed);border-bottom:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4);border-top-left-radius:var(--gids-border-radius-md);border-top-right-radius:var(--gids-border-radius-md);color:var(--gids-color-text-accent-4)}.gids-tab-item--subtle:hover{color:var(--gids-color-text-accent-4)}.gids-tab-item--subtle:hover .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--subtle:active{color:var(--gids-color-text-accent-4)}.gids-tab-item--subtle:active .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--active-default{border-radius:var(--gids-border-radius-md);background-color:var(--gids-color-background-accent-4-subtler-default);color:var(--gids-color-text-accent-4)}.gids-tab-item--active-default .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--active-default:hover{background-color:var(--gids-color-background-accent-4-subtler-hovered)}.gids-tab-item--active-default:active{background-color:var(--gids-color-background-accent-4-subtler-pressed)}.gids-tab-item--active-primary{border-radius:var(--gids-border-radius-md);background-color:var(--gids-color-background-accent-4-bolder-default);color:var(--gids-color-text-inverse)}.gids-tab-item--active-primary .gids-icon{--gidsIcon-color:var(--gids-color-icon-inverse)}.gids-tab-item--active-primary:hover{background-color:var(--gids-color-background-accent-4-bolder-hovered)}.gids-tab-item--active-primary:active{background-color:var(--gids-color-background-accent-4-bolder-pressed)}.gids-tab-item--active-bordered{border-radius:var(--gids-border-radius-full);border:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4);background-color:var(--gids-color-background-accent-4-subtlest-default);color:var(--gids-color-text-accent-4)}.gids-tab-item--active-bordered .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--active-bordered:hover{background-color:var(--gids-color-background-accent-4-subtlest-hovered)}.gids-tab-item--active-bordered:active{background-color:var(--gids-color-background-accent-4-subtlest-pressed)}.gids-tab-item--active-underlined{border-bottom:var(--gids-border-width-thick) solid var(--gids-color-border-accent-4);border-top-left-radius:var(--gids-border-radius-md);border-top-right-radius:var(--gids-border-radius-md);color:var(--gids-color-text-accent-4);background-color:var(--gids-color-background-accent-4-subtlest-default)}.gids-tab-item--active-underlined .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}.gids-tab-item--active-underlined:hover{background-color:var(--gids-color-background-accent-4-subtlest-hovered)}.gids-tab-item--active-underlined:active{background-color:var(--gids-color-background-accent-4-subtlest-pressed)}.gids-tab-item--active-subtle{color:var(--gids-color-text-accent-4)}.gids-tab-item--active-subtle .gids-icon{--gidsIcon-color:var(--gids-color-icon-accent-4)}"}},[260,"gids-tab-item",{itemId:[1,"item-id"],label:[1],active:[4],name:[1],width:[1],appearance:[1],badgeVisible:[4,"badge-visible"],badgeAppearance:[1,"badge-appearance"],badgeCount:[2,"badge-count"],badgeType:[1,"badge-type"],onPressGidsTabItem:[16],hasLeadingIcon:[32],hasTrailingIcon:[32]},void 0,{width:[{handleWidthChange:0}],appearance:[{handleAppearanceChange:0}],badgeVisible:[{handleBadgeVisibilityChange:0}],badgeAppearance:[{handleBadgeAppearanceChange:0}],badgeType:[{handleBadgeTypeChange:0}],active:[{handleActiveChange:0}]}]);function u(){"undefined"!=typeof customElements&&["gids-tab-item"].forEach((e=>{"gids-tab-item"===e&&(customElements.get(a(e))||customElements.define(a(e),h))}))}u();const p=h,m=u;export{p as GidsTabItem,m as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist-dev/types/components";
2
+
3
+ interface GidsTab extends Components.GidsTab, HTMLElement {}
4
+ export const GidsTab: {
5
+ prototype: GidsTab;
6
+ new (): GidsTab;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as a,h as i,d as s}from"./p-Bf3p-DY2.js";import{GidsTabWebUtils as n}from"@ganpatiinfo/gids-web-shared";const{getGidsTabClassNames:d}=n,h=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.width="intrinsic",this.appearance="default"}handleWidthChange(e){this.width=e}handleAppearanceChange(e){this.appearance=e}handleActiveTabIdChange(e){this.activeTabId=e}componentDidLoad(){this.syncPropsToChildren(),this.hostElement.addEventListener("slotchange",(()=>this.syncPropsToChildren()))}componentDidUpdate(){this.syncPropsToChildren()}syncPropsToChildren(){this.hostElement.querySelectorAll("gids-tab-item").forEach((e=>{e&&(e.appearance=this.appearance,e.width=this.width,e.active=this.isTabActive(e.itemId),e.onPressGidsTabItem=e=>{this.activeTabId=e?.itemId,this.onPressGidsTab&&this.onPressGidsTab(e),this.syncPropsToChildren()})}))}isTabActive(e){return e===this.activeTabId}render(){const e=d({width:this.width,appearance:this.appearance});return i(s,{key:"cc7d6cde876ed48c224b7226f750bb5e4bb4cbf1",class:e},i("slot",{key:"bb499ecb3dfd5cba0fb59b1f22ec135fe435b28c"}))}get hostElement(){return this}static get watchers(){return{width:[{handleWidthChange:0}],appearance:[{handleAppearanceChange:0}],activeTabId:[{handleActiveTabIdChange:0}]}}static get style(){return".gids-tab{display:inline-flex;align-items:center;justify-content:flex-start;gap:var(--gids-gap-150)}.gids-tab--full{display:flex}.gids-tab--item-subtle{gap:0}.gids-tab--item-underlined{gap:0}"}},[260,"gids-tab",{width:[1],appearance:[1],activeTabId:[1,"active-tab-id"],onPressGidsTab:[16]},void 0,{width:[{handleWidthChange:0}],appearance:[{handleAppearanceChange:0}],activeTabId:[{handleActiveTabIdChange:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-tab"].forEach((t=>{"gids-tab"===t&&(customElements.get(e(t))||customElements.define(e(t),h))}))}c();const r=h,b=c;export{r as GidsTab,b as defineCustomElement}
@@ -1 +1 @@
1
- import{t as e,p as t,H as i,c as s,f as a,h as n}from"./p-Bf3p-DY2.js";import{GidsTextFieldCommonUtils as l}from"@ganpatiinfo/gids-core-shared";import{generateId as d,GidsTextFieldWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{g as o}from"./p-B2zUuNXz.js";import{G as h}from"./p-Dg2yoUxw.js";import{G as u}from"./p-UxDcM-C5.js";import{d as f}from"./p-DNTv2BQ5.js";import{d as c}from"./p-BQ-ZnlnH.js";const{formatCharCount:m}=l,{inputToGidsFieldStatus:p}=r,b=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsTextFieldClear=s(this,"gidsTextFieldClear"),this.#e=d(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsTextFieldClear.emit()},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}connectedCallback(){const e=o();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:e,...t}=this.inputProps??{},i=e??this.#e,s=this.showClearButton&&void 0!==this.value&&this.value.length>0;return n("gids-field",{key:"67703f015d57768e530aff47b206ff6716f35332",disabled:this.disabled,count:m(this.value?.length,this.maxLength),helperText:this.helperText,statusText:this.statusText,status:p(this.status)},n(h,{key:"182405668848cdfe3960eef04a7862862fb42117",slot:"label",disabled:this.disabled,info:n("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),n("gids-input",{key:"f625d9ca7001879c392f55e806e7f080d7bb4185",ref:e=>this.#t=e,appearance:this.appearance,status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:this.leadingLabel,trailingLabel:this.trailingLabel,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...t,type:this.type,id:i,maxLength:this.maxLength}},n("slot",{key:"4283d3712a98973ccb96d57b3d6f9fc42a0ff04e",name:"leadingIcon"}),n("slot",{key:"c61b5a4a62ecf2002426d167155fd8687f84b99f",name:"leadingAccessory"}),s&&n(u,{key:"61d1a7b396fa1a8bacce9ade90a36de46886b3c0",label:"clear text",slot:"trailingAccessory",size:"lg",onPressDismiss:this._handleDismiss}),n("slot",{key:"b1f35a7a5e7ffc719d86741033fdfc25ee20debc",name:"trailingIcon"})))}get _el(){return this}},[260,"gids-text-field",{label:[513],showClearButton:[516,"show-clear-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],appearance:[513],status:[513],leadingLabel:[513,"leading-label"],trailingLabel:[513,"trailing-label"],loading:[516],type:[513],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16]}]);function g(){"undefined"!=typeof customElements&&["gids-text-field","gids-field","gids-input"].forEach((t=>{switch(t){case"gids-text-field":customElements.get(e(t))||customElements.define(e(t),b);break;case"gids-field":customElements.get(e(t))||f();break;case"gids-input":customElements.get(e(t))||c()}}))}g();const x=b,y=g;export{x as GidsTextField,y as defineCustomElement}
1
+ import{t as e,p as t,H as i,c as s,f as a,h as l}from"./p-Bf3p-DY2.js";import{GidsTextFieldCommonUtils as n}from"@ganpatiinfo/gids-core-shared";import{generateId as d,GidsTextFieldWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{g as o}from"./p-B2zUuNXz.js";import{G as h}from"./p-Dg2yoUxw.js";import{G as u}from"./p-UxDcM-C5.js";import{d as c}from"./p-C7ifjRCE.js";import{d as f}from"./p-Doi8Yizl.js";const{formatCharCount:m}=n,{inputToGidsFieldStatus:p}=r,b=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsTextFieldClear=s(this,"gidsTextFieldClear"),this.#e=d(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsTextFieldClear.emit()},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}connectedCallback(){const e=o();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:e,...t}=this.inputProps??{},i=e??this.#e,s=this.showClearButton&&void 0!==this.value&&this.value.length>0;return l("gids-field",{key:"951d6052bb8e98950f01a1c204a35904e3a3ee4c",disabled:this.disabled,count:m(this.value?.length,this.maxLength),helperText:this.helperText,statusText:this.statusText,status:p(this.status)},l(h,{key:"02a0b0308d754a68dd5f1be3cd8dd10b191f32a6",slot:"label",disabled:this.disabled,info:l("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),l("gids-input",{key:"9e601808d03998011afd0cef3a683e153ea42f10",ref:e=>this.#t=e,appearance:this.appearance,status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:this.leadingLabel,trailingLabel:this.trailingLabel,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...t,type:this.type,id:i,maxLength:this.maxLength}},l("slot",{key:"f519b7683865ec3bc7d6dc02c3a4d3383b62c09a",name:"leadingIcon"}),l("slot",{key:"4241d7a23659bd3f7fe2b54ad3e9fce5b83de649",name:"leadingAccessory"}),s&&l(u,{key:"35d7868cec672757617bad343a3e700a4a9719c8",label:"clear text",slot:"trailingAccessory",size:"lg",onPressDismiss:this._handleDismiss}),l("slot",{key:"07f1cd892f9eb103110e54f377ed6683da22157d",name:"trailingIcon"})))}get _el(){return this}},[260,"gids-text-field",{label:[513],showClearButton:[516,"show-clear-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],appearance:[513],status:[513],leadingLabel:[513,"leading-label"],trailingLabel:[513,"trailing-label"],loading:[516],type:[513],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16]}]);function g(){"undefined"!=typeof customElements&&["gids-text-field","gids-field","gids-input"].forEach((t=>{switch(t){case"gids-text-field":customElements.get(e(t))||customElements.define(e(t),b);break;case"gids-field":customElements.get(e(t))||c();break;case"gids-input":customElements.get(e(t))||f()}}))}g();const x=b,y=g;export{x as GidsTextField,y as defineCustomElement}
@@ -1 +1 @@
1
- import{G as o,d as s}from"./p-DmLoB2Dn.js";const m=o,p=s;export{m as GidsToggleButton,p as defineCustomElement}
1
+ import{G as o,d as s}from"./p-Bj28yqMD.js";const p=o,r=s;export{p as GidsToggleButton,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as i,H as o,h as e,F as s}from"./p-Bf3p-DY2.js";import{G as a}from"./p-a3JfEYJp.js";import{g as l}from"./p-B2zUuNXz.js";import{G as r}from"./p-B8kX8Vqv.js";const n=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.showWithoutDelay=!1,this.lockToMainAxis=!1,this.handleShowEvent=()=>{this.floatingElementManager.showAfterDelay()},this.handleHideEvent=()=>{this.floatingElementManager.hideAfterDelay()}}connectedCallback(){const t=l();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this.floatingElementManager=new a(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:this.showWithoutDelay,lockToMainAxis:this.lockToMainAxis,floatingElementSelector:"#tooltip",arrowElementSelector:"#arrow",visibilityClass:"gids-tooltip--visible",elementType:r.TOOLTIP,getAnchorElementFromSlot:t=>{const i=t.querySelector("slot");return i?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("mouseenter",this.handleShowEvent),t.addEventListener("focus",this.handleShowEvent),t.addEventListener("mouseleave",this.handleHideEvent),t.addEventListener("blur",this.handleHideEvent))}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}showWithoutDelayChanged(t){this.floatingElementManager?.updateConfig({showWithoutDelay:t})}lockToMainAxisChanged(t){this.floatingElementManager?.updateConfig({lockToMainAxis:t})}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&(t.removeEventListener("mouseenter",this.handleShowEvent),t.removeEventListener("focus",this.handleShowEvent),t.removeEventListener("mouseleave",this.handleHideEvent),t.removeEventListener("blur",this.handleHideEvent))}render(){return e(s,{key:"87da0ed1ded01cd47b54a7445df2ec4a1ce621b2"},e("slot",{key:"31b07131bcd26021340d37cadc8aa01f59ad0262"}),e("span",{key:"03fa6ca6e6f3d9bfa2b319254a22a817091fa9b5",id:"tooltip",part:"tooltip",role:"tooltip"},e("span",{key:"7affbdf276e42c78a4829b5c47854786b97af3bd",id:"arrow"}),this.tooltipText))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-tooltip{--gidsTooltip-background:var(--gids-color-background-neutral-bold-default);--gidsTooltip-text-color:var(--gids-color-text-inverse);--gidsTooltip-padding:var(--gids-padding-vertical-edge-to-element-100) var(--gids-padding-horizontal-edge-to-element-200);--gidsTooltip-border-radius:var(--gids-border-radius-sm);--gidsTooltip-tip-border-radius:2px;--gidsTooltip-tip-size:12px;--gidsFloatingElement-background:var(--gidsTooltip-background);--gidsFloatingElement-tip-border-radius:var(--gidsTooltip-tip-border-radius)}[part=tooltip]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;hyphens:auto;background-color:var(--gidsTooltip-background);color:var(--gidsTooltip-text-color);padding:var(--gidsTooltip-padding);border-radius:var(--gidsTooltip-border-radius);z-index:1000;opacity:0;pointer-events:none}[part=tooltip].gids-tooltip--visible{pointer-events:initial;opacity:1}[part=tooltip] span#arrow{position:absolute;height:var(--gidsTooltip-tip-size);width:var(--gidsTooltip-tip-size)}"}},[257,"gids-tooltip",{htmlFor:[513,"for"],tooltipText:[513,"tooltip-text"],placement:[513],showWithoutDelay:[516,"show-without-delay"],lockToMainAxis:[4,"lock-to-main-axis"]},void 0,{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-tooltip"].forEach((i=>{"gids-tooltip"===i&&(customElements.get(t(i))||customElements.define(t(i),n))}))}d();const h=n,p=d;export{h as GidsTooltip,p as defineCustomElement}
1
+ import{t,p as i,H as o,h as e,F as s}from"./p-Bf3p-DY2.js";import{G as a}from"./p-a3JfEYJp.js";import{g as l}from"./p-B2zUuNXz.js";import{G as r}from"./p-B8kX8Vqv.js";const n=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.showWithoutDelay=!1,this.lockToMainAxis=!1,this.handleShowEvent=()=>{this.floatingElementManager.showAfterDelay()},this.handleHideEvent=()=>{this.floatingElementManager.hideAfterDelay()}}connectedCallback(){const t=l();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this.floatingElementManager=new a(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:this.showWithoutDelay,lockToMainAxis:this.lockToMainAxis,floatingElementSelector:"#tooltip",arrowElementSelector:"#arrow",visibilityClass:"gids-tooltip--visible",elementType:r.TOOLTIP,getAnchorElementFromSlot:t=>{const i=t.querySelector("slot");return i?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("mouseenter",this.handleShowEvent),t.addEventListener("focus",this.handleShowEvent),t.addEventListener("mouseleave",this.handleHideEvent),t.addEventListener("blur",this.handleHideEvent))}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}showWithoutDelayChanged(t){this.floatingElementManager?.updateConfig({showWithoutDelay:t})}lockToMainAxisChanged(t){this.floatingElementManager?.updateConfig({lockToMainAxis:t})}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&(t.removeEventListener("mouseenter",this.handleShowEvent),t.removeEventListener("focus",this.handleShowEvent),t.removeEventListener("mouseleave",this.handleHideEvent),t.removeEventListener("blur",this.handleHideEvent))}render(){return e(s,{key:"b1339ba783e86f33840b20038f900b09ba70e61f"},e("slot",{key:"1103b8056a880282cad202905f8a606ffd8ed119"}),e("span",{key:"ad2f4fc135f7d26d7224e134149f2075f66bed4e",id:"tooltip",part:"tooltip",role:"tooltip"},e("span",{key:"c1edf194581bd0696b32b92657a59bc6f876774d",id:"arrow"}),this.tooltipText))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-tooltip{--gidsTooltip-background:var(--gids-color-background-neutral-bold-default);--gidsTooltip-text-color:var(--gids-color-text-inverse);--gidsTooltip-padding:var(--gids-padding-vertical-edge-to-element-100) var(--gids-padding-horizontal-edge-to-element-200);--gidsTooltip-border-radius:var(--gids-border-radius-sm);--gidsTooltip-tip-border-radius:2px;--gidsTooltip-tip-size:12px;--gidsFloatingElement-background:var(--gidsTooltip-background);--gidsFloatingElement-tip-border-radius:var(--gidsTooltip-tip-border-radius)}[part=tooltip]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;hyphens:auto;background-color:var(--gidsTooltip-background);color:var(--gidsTooltip-text-color);padding:var(--gidsTooltip-padding);border-radius:var(--gidsTooltip-border-radius);z-index:1000;opacity:0;pointer-events:none}[part=tooltip].gids-tooltip--visible{pointer-events:initial;opacity:1}[part=tooltip] span#arrow{position:absolute;height:var(--gidsTooltip-tip-size);width:var(--gidsTooltip-tip-size)}"}},[257,"gids-tooltip",{htmlFor:[513,"for"],tooltipText:[513,"tooltip-text"],placement:[513],showWithoutDelay:[516,"show-without-delay"],lockToMainAxis:[4,"lock-to-main-axis"]},void 0,{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-tooltip"].forEach((i=>{"gids-tooltip"===i&&(customElements.get(t(i))||customElements.define(t(i),n))}))}d();const h=n,p=d;export{h as GidsTooltip,p as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-DoCwI_bx.js";import{d as r}from"./p-mZJdpfOo.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
1
+ import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-qb1aWgjh.js";import{d as r}from"./p-BYDimyG-.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
@@ -1 +1 @@
1
- import{t as i,p as s,H as t,h as e}from"./p-Bf3p-DY2.js";import{g as o}from"./p-B2zUuNXz.js";import{G as n}from"./p-D4Pimu_8.js";const c=s(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}connectedCallback(){const i=o();void 0!==i&&this._el.shadowRoot?.adoptedStyleSheets.push(i)}render(){return e(n,{key:"38a60d81d2e4682272e7892c137bad482b471f52",name:this.name,size:this.size,appearance:this.appearance,alt:this.alt,titleId:this.titleId})}get _el(){return this}static get style(){return".gids-icon{color:var(--gidsIcon-color, var(--gids-color-icon-default));fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}"}},[1,"gids-icon",{name:[1],size:[1],appearance:[1],alt:[1],titleId:[1,"title-id"]}]);function d(){"undefined"!=typeof customElements&&["gids-icon"].forEach((s=>{"gids-icon"===s&&(customElements.get(i(s))||customElements.define(i(s),c))}))}d();export{c as G,d}
1
+ import{t as i,p as s,H as t,h as e}from"./p-Bf3p-DY2.js";import{g as o}from"./p-B2zUuNXz.js";import{G as c}from"./p-D4Pimu_8.js";const n=s(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}connectedCallback(){const i=o();void 0!==i&&this._el.shadowRoot?.adoptedStyleSheets.push(i)}render(){return e(c,{key:"cb54fb7ca0ded77690f44cbf794b2e192cf9c681",name:this.name,size:this.size,appearance:this.appearance,alt:this.alt,titleId:this.titleId})}get _el(){return this}static get style(){return".gids-icon{color:var(--gidsIcon-color, var(--gids-color-icon-default));fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}"}},[1,"gids-icon",{name:[1],size:[1],appearance:[1],alt:[1],titleId:[1,"title-id"]}]);function d(){"undefined"!=typeof customElements&&["gids-icon"].forEach((s=>{"gids-icon"===s&&(customElements.get(i(s))||customElements.define(i(s),n))}))}d();export{n as G,d}
@@ -1 +1 @@
1
- import{t,p as e,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarMonthListWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{a as d,b as o,c as h}from"./p-D6lxqcxP.js";const{getGidsCalendarMonthListClassNames:a,getGidsCalendarMonthListMonths:r}=n,l=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=t=>{const{title:e,value:s,selectedIndex:i,disabled:n,id:d}=t.detail;n||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:d,month:e,monthInNumber:Number(s),disabled:!1,selectedIndex:i}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t?.detail;this.applySelection({id:e.id,monthInNumber:Number(e.value),month:e.title,disabled:!1,selectedIndex:e.selectedIndex})},this.monthsList=()=>r(),this.getSelectedItem=()=>{const t=this.selectedMonthNumber,e=this.monthsList(),s=e.findIndex((e=>e.value===t));let i;return null!=s&&-1!==s&&(i=e[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=t=>{const{foundIndex:e}=this.getSelectedItem();return e===t}}connectedCallback(){this.attachItemListener()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}applySelection(t){this.clearActive(),this.onSelectionMonthChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarMonthChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}render(){const t=a();return i("div",{key:"a4c3d291302079299a702892a7feb47fecdc0ab3",class:t},i(d,{key:"57a34a46ff0d264d11faf29a1c852385d20f4303",type:this.type,supportingText:this.noOptionsText},i(o,{key:"f6bed17740192c11aabd7de928396147e8da7dfd",sectionLabel:"Months"},this.monthsList().map(((t,e)=>{const s=`${e+1}`,n=this.disabledIndices?.includes(e);return i(h,{title:t.title,value:`${t.value}`,key:`${e.toString()}`,index:e,id:s,selected:this.isItemSelected(e),onPressDropdownItem:this.handleMenuClick,disabled:n,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-month-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedMonthNumber:[2,"selected-month-number"],onSelectionMonthChange:[16]}]);function c(){"undefined"!=typeof customElements&&["gids-calendar-month-list"].forEach((e=>{"gids-calendar-month-list"===e&&(customElements.get(t(e))||customElements.define(t(e),l))}))}c();export{l as G,c as d}
1
+ import{t,p as e,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarMonthListWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{a as d,b as o,c as h}from"./p-D6lxqcxP.js";const{getGidsCalendarMonthListClassNames:a,getGidsCalendarMonthListMonths:r}=n,l=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=t=>{const{title:e,value:s,selectedIndex:i,disabled:n,id:d}=t.detail;n||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:d,month:e,monthInNumber:Number(s),disabled:!1,selectedIndex:i}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t?.detail;this.applySelection({id:e.id,monthInNumber:Number(e.value),month:e.title,disabled:!1,selectedIndex:e.selectedIndex})},this.monthsList=()=>r(),this.getSelectedItem=()=>{const t=this.selectedMonthNumber,e=this.monthsList(),s=e.findIndex((e=>e.value===t));let i;return null!=s&&-1!==s&&(i=e[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=t=>{const{foundIndex:e}=this.getSelectedItem();return e===t}}connectedCallback(){this.attachItemListener()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}applySelection(t){this.clearActive(),this.onSelectionMonthChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarMonthChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}render(){const t=a();return i("div",{key:"edfe08732e3f5a916c9c4b20d45aa60ee435bafb",class:t},i(d,{key:"745227860a28c875576b70e5cbc8676bb4966ae2",type:this.type,supportingText:this.noOptionsText},i(o,{key:"e428a8ff2525a0e2815d96938ef8e852b9275ba9",sectionLabel:"Months"},this.monthsList().map(((t,e)=>{const s=`${e+1}`,n=this.disabledIndices?.includes(e);return i(h,{title:t.title,value:`${t.value}`,key:`${e.toString()}`,index:e,id:s,selected:this.isItemSelected(e),onPressDropdownItem:this.handleMenuClick,disabled:n,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-month-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedMonthNumber:[2,"selected-month-number"],onSelectionMonthChange:[16]}]);function c(){"undefined"!=typeof customElements&&["gids-calendar-month-list"].forEach((e=>{"gids-calendar-month-list"===e&&(customElements.get(t(e))||customElements.define(t(e),l))}))}c();export{l as G,c as d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as a,h as i}from"./p-Bf3p-DY2.js";import{G as r}from"./p-D4Pimu_8.js";import{GidsChartLegendItemWebUtils as s}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendItemClassNames:n}=s,l=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal",this.seriesType="1"}handleOrientationChange(e){this.orientation=e}handleSeriesTypeChange(e){this.seriesType=e}render(){const e=n({seriesType:this.seriesType,orientation:this.orientation});return i("div",{key:"a168968003ccd7216f5c69beac50898a1f176dc7",class:e},i("div",{key:"995b46947af3677386a2c67a7b7fa469483a8745",class:"vertical"===this.orientation?"gids-chart-legend-item__dot-wrapper-vertical":"gids-chart-legend-item__dot-wrapper-horizontal"},i(r,{key:"6b8b0a267e30a77f8c6d4ae18db2f4dfcf4041e7",name:"new",alt:"new_icon",appearance:"filled"})),i("span",{key:"c9e38851fd89a20e06e111fe2ca4faf3211f03fa",class:"gids-chart-legend-item__label"},i("slot",{key:"aa30a8f07ef92ff658f76fe1dce2d10dbfb636c1"})))}static get watchers(){return{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}]}}static get style(){return".gids-chart-legend-item{display:flex;align-items:center;gap:var(--gids-gap-100);--gidsChartLegendItemIcon-color:var(--gids-color-icon-subtle);--gidsIcon-color:var(--gidsChartLegendItemIcon-color);--gidsIcon-height:var(--gids-size-080)}.gids-chart-legend-item--orientation-vertical{display:flex}.gids-chart-legend-item--series-2{--gidsChartLegendItemIcon-color:var(--gids-color-icon-warning)}.gids-chart-legend-item--series-3{--gidsChartLegendItemIcon-color:var(--gids-color-icon-danger)}.gids-chart-legend-item--series-4{--gidsChartLegendItemIcon-color:var(--gids-color-background-positive-bold-hovered)}.gids-chart-legend-item--series-5{--gidsChartLegendItemIcon-color:var(--gids-color-background-information-bold-default)}.gids-chart-legend-item--series-6{--gidsChartLegendItemIcon-color:rgb(238, 70, 188)}.gids-chart-legend-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);text-align:left;color:var(--gids-color-text-subtlest)}.gids-chart-legend-item__dot-wrapper-vertical{display:flex;padding-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-chart-legend-item__dot-wrapper-horizontal{display:flex;align-items:center}"}},[260,"gids-chart-legend-item",{orientation:[1],seriesType:[1,"series-type"]},void 0,{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-chart-legend-item"].forEach((t=>{"gids-chart-legend-item"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}d();export{l as G,d}
1
+ import{t as e,p as t,H as a,h as i}from"./p-Bf3p-DY2.js";import{G as r}from"./p-D4Pimu_8.js";import{GidsChartLegendItemWebUtils as s}from"@ganpatiinfo/gids-web-shared";const{getGidsChartLegendItemClassNames:n}=s,d=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.orientation="horizontal",this.seriesType="1"}handleOrientationChange(e){this.orientation=e}handleSeriesTypeChange(e){this.seriesType=e}render(){const e=n({seriesType:this.seriesType,orientation:this.orientation});return i("div",{key:"43080c591c0fd7decf794c10b12c6ec423374aca",class:e},i("div",{key:"52b09fe027b6ce228bafdeb1b0631ce1f3a9860f",class:"vertical"===this.orientation?"gids-chart-legend-item__dot-wrapper-vertical":"gids-chart-legend-item__dot-wrapper-horizontal"},i(r,{key:"749d70e3b0d3d1117d7de2b3ce00ae76372c05b9",name:"new",alt:"new_icon",appearance:"filled"})),i("span",{key:"f6fd7ecf6d4dfcdafed4bf25dd3b763fffa78a96",class:"gids-chart-legend-item__label"},i("slot",{key:"885035e521300c2d061b8aa41f0d4258caa22ce7"})))}static get watchers(){return{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}]}}static get style(){return".gids-chart-legend-item{display:flex;align-items:center;gap:var(--gids-gap-100);--gidsChartLegendItemIcon-color:var(--gids-color-icon-subtle);--gidsIcon-color:var(--gidsChartLegendItemIcon-color);--gidsIcon-height:var(--gids-size-080)}.gids-chart-legend-item--orientation-vertical{display:flex}.gids-chart-legend-item--series-2{--gidsChartLegendItemIcon-color:var(--gids-color-icon-warning)}.gids-chart-legend-item--series-3{--gidsChartLegendItemIcon-color:var(--gids-color-icon-danger)}.gids-chart-legend-item--series-4{--gidsChartLegendItemIcon-color:var(--gids-color-background-positive-bold-hovered)}.gids-chart-legend-item--series-5{--gidsChartLegendItemIcon-color:var(--gids-color-background-information-bold-default)}.gids-chart-legend-item--series-6{--gidsChartLegendItemIcon-color:rgb(238, 70, 188)}.gids-chart-legend-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);text-align:left;color:var(--gids-color-text-subtlest)}.gids-chart-legend-item__dot-wrapper-vertical{display:flex;padding-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-chart-legend-item__dot-wrapper-horizontal{display:flex;align-items:center}"}},[260,"gids-chart-legend-item",{orientation:[1],seriesType:[1,"series-type"]},void 0,{orientation:[{handleOrientationChange:0}],seriesType:[{handleSeriesTypeChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-chart-legend-item"].forEach((t=>{"gids-chart-legend-item"===t&&(customElements.get(e(t))||customElements.define(e(t),d))}))}l();export{d as G,l as d}
@@ -1 +1 @@
1
- import{t as e,p as i,H as t,h as s}from"./p-Bf3p-DY2.js";import{GidsPieChartWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{G as a}from"./p-DMNS1d8v.js";import{d}from"./p-DoCwI_bx.js";import{d as h}from"./p-mZJdpfOo.js";const{getGidsPieChartClassNames:g}=r,n=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.breakpoint="desktop",this.legendVisible=!1,this.chartData=[],this.size="xxs",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendVisibilityChanged(e){this.legendVisible=e}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const e=this.hostElement.getBoundingClientRect();this.width=e.width,this.height=e.height>0?e.height:240}render(){if(this.chartLoading)return s("div",{class:"gids-pie-chart__no-data"},s(a,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const e=this.chartData.length,i=this.chartData.reduce(((e,i)=>e+(i.value||0)),0);let t=i;e<6&&e>0&&(t=i+i/e*(6-e));const r=t>0?t:1,d=g({breakpoint:this.breakpoint}),h=2*Math.PI*25;let n=0;return s("div",{class:d},s("div",{class:"gids-pie-chart__main-container"},s("div",{class:"gids-pie-chart__chart-stage-container"},s("div",{class:`gids-pie-chart__svg-wrapper gids-pie-chart__svg-wrapper--size-${this.size}`},s("svg",{viewBox:"0 0 100 100",class:"gids-pie-chart__chart-vector"},s("circle",{cx:"50",cy:"50",r:25,class:"gids-pie-chart__track-background"}),this.chartData.map(((e,i)=>{const t=(e.value||0)/r,a=`${t*h} ${h}`,d=-n*h;return n+=t,s("circle",{key:e.label||i,cx:"50",cy:"50",r:25,class:`gids-pie-chart__segment gids-pie-chart__segment-series-${i+1}`,"stroke-dasharray":a,"stroke-dashoffset":d,transform:"rotate(-90 50 50)"})}))))),this.legendVisible?s("div",{class:"gids-pie-chart__legend-container"},s("gids-chart-legend",{orientation:"vertical"},this.chartData.map(((e,i)=>s("gids-chart-legend-item",{key:e.label,seriesType:`${i+1}`,orientation:"vertical"},e.label))))):null))}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legendVisible:[{legendVisibilityChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-pie-chart__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-pie-chart__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-pie-chart{}.gids-pie-chart__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-pie-chart__svg-wrapper--size-xxs{width:180px;height:180px}.gids-pie-chart__svg-wrapper--size-xs{width:220px;height:220px}.gids-pie-chart__svg-wrapper--size-sm{width:260px;height:260px}.gids-pie-chart__svg-wrapper--size-md{width:300px;height:300px}.gids-pie-chart__svg-wrapper--size-lg{width:340px;height:340px}.gids-pie-chart__chart-vector{display:block;width:100%;height:100%}.gids-pie-chart{}.gids-pie-chart__track-background{fill:none;stroke:var(--gids-color-background-neutral-default);stroke-width:12;}.gids-pie-chart__segment{fill:none;stroke-width:12;stroke-linecap:butt;transition:stroke-dashoffset 0.3s ease;}.gids-pie-chart__segment.gids-pie-chart__segment-series-1{stroke:var(--gids-color-icon-subtle);}.gids-pie-chart__segment.gids-pie-chart__segment-series-2{stroke:var(--gids-color-icon-warning);}.gids-pie-chart__segment.gids-pie-chart__segment-series-3{stroke:var(--gids-color-icon-danger);}.gids-pie-chart__segment.gids-pie-chart__segment-series-4{stroke:var(--gids-color-background-positive-bold-hovered);}.gids-pie-chart__segment.gids-pie-chart__segment-series-5{stroke:var(--gids-color-background-information-bold-default);}.gids-pie-chart__segment.gids-pie-chart__segment-series-6{stroke:rgb(238, 70, 188);}.gids-pie-chart__legend-container{display:inline-flex;align-items:flex-start}.gids-pie-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-pie-chart",{breakpoint:[1],legendVisible:[4,"legend-visible"],chartData:[16],size:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legendVisible:[{legendVisibilityChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-pie-chart","gids-chart-legend","gids-chart-legend-item"].forEach((i=>{switch(i){case"gids-pie-chart":customElements.get(e(i))||customElements.define(e(i),n);break;case"gids-chart-legend":customElements.get(e(i))||d();break;case"gids-chart-legend-item":customElements.get(e(i))||h()}}))}c();export{n as G,c as d}
1
+ import{t as e,p as i,H as t,h as s}from"./p-Bf3p-DY2.js";import{GidsPieChartWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{G as a}from"./p-DMNS1d8v.js";import{d}from"./p-qb1aWgjh.js";import{d as h}from"./p-BYDimyG-.js";const{getGidsPieChartClassNames:g}=r,n=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.breakpoint="desktop",this.legendVisible=!1,this.chartData=[],this.size="xxs",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendVisibilityChanged(e){this.legendVisible=e}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const e=this.hostElement.getBoundingClientRect();this.width=e.width,this.height=e.height>0?e.height:240}render(){if(this.chartLoading)return s("div",{class:"gids-pie-chart__no-data"},s(a,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const e=this.chartData.length,i=this.chartData.reduce(((e,i)=>e+(i.value||0)),0);let t=i;e<6&&e>0&&(t=i+i/e*(6-e));const r=t>0?t:1,d=g({breakpoint:this.breakpoint}),h=2*Math.PI*25;let n=0;return s("div",{class:d},s("div",{class:"gids-pie-chart__main-container"},s("div",{class:"gids-pie-chart__chart-stage-container"},s("div",{class:`gids-pie-chart__svg-wrapper gids-pie-chart__svg-wrapper--size-${this.size}`},s("svg",{viewBox:"0 0 100 100",class:"gids-pie-chart__chart-vector"},s("circle",{cx:"50",cy:"50",r:25,class:"gids-pie-chart__track-background"}),this.chartData.map(((e,i)=>{const t=(e.value||0)/r,a=`${t*h} ${h}`,d=-n*h;return n+=t,s("circle",{key:e.label||i,cx:"50",cy:"50",r:25,class:`gids-pie-chart__segment gids-pie-chart__segment-series-${i+1}`,"stroke-dasharray":a,"stroke-dashoffset":d,transform:"rotate(-90 50 50)"})}))))),this.legendVisible?s("div",{class:"gids-pie-chart__legend-container"},s("gids-chart-legend",{orientation:"vertical"},this.chartData.map(((e,i)=>s("gids-chart-legend-item",{key:e.label,seriesType:`${i+1}`,orientation:"vertical"},e.label))))):null))}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legendVisible:[{legendVisibilityChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-pie-chart__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-pie-chart__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-pie-chart{}.gids-pie-chart__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-pie-chart__svg-wrapper--size-xxs{width:180px;height:180px}.gids-pie-chart__svg-wrapper--size-xs{width:220px;height:220px}.gids-pie-chart__svg-wrapper--size-sm{width:260px;height:260px}.gids-pie-chart__svg-wrapper--size-md{width:300px;height:300px}.gids-pie-chart__svg-wrapper--size-lg{width:340px;height:340px}.gids-pie-chart__chart-vector{display:block;width:100%;height:100%}.gids-pie-chart{}.gids-pie-chart__track-background{fill:none;stroke:var(--gids-color-background-neutral-default);stroke-width:12;}.gids-pie-chart__segment{fill:none;stroke-width:12;stroke-linecap:butt;transition:stroke-dashoffset 0.3s ease;}.gids-pie-chart__segment.gids-pie-chart__segment-series-1{stroke:var(--gids-color-icon-subtle);}.gids-pie-chart__segment.gids-pie-chart__segment-series-2{stroke:var(--gids-color-icon-warning);}.gids-pie-chart__segment.gids-pie-chart__segment-series-3{stroke:var(--gids-color-icon-danger);}.gids-pie-chart__segment.gids-pie-chart__segment-series-4{stroke:var(--gids-color-background-positive-bold-hovered);}.gids-pie-chart__segment.gids-pie-chart__segment-series-5{stroke:var(--gids-color-background-information-bold-default);}.gids-pie-chart__segment.gids-pie-chart__segment-series-6{stroke:rgb(238, 70, 188);}.gids-pie-chart__legend-container{display:inline-flex;align-items:flex-start}.gids-pie-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-pie-chart",{breakpoint:[1],legendVisible:[4,"legend-visible"],chartData:[16],size:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legendVisible:[{legendVisibilityChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-pie-chart","gids-chart-legend","gids-chart-legend-item"].forEach((i=>{switch(i){case"gids-pie-chart":customElements.get(e(i))||customElements.define(e(i),n);break;case"gids-chart-legend":customElements.get(e(i))||d();break;case"gids-chart-legend-item":customElements.get(e(i))||h()}}))}c();export{n as G,c as d}
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as s,c as i,h as n,d as a}from"./p-Bf3p-DY2.js";import{G as c}from"./p-UVmSPzTd.js";import{g as d}from"./p-B2zUuNXz.js";const l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=i(this,"select"),this._toggle=this._toggle.bind(this)}handleSelctedChange(e){this.selected=e}connectedCallback(){const e=d();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=this.selected,this.select?.emit(e),this.selected=this.selected}render(){return n(a,{key:"60cd33c1303b2f0d79c359f79f77c5e0b2055c73"},n("style",{key:"5780343ecee89c7f6df46aebae53895784314a71"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),n(c,{key:"03705a1d3fb0807af87d6e85083bf424c462f328",appearance:this.appearance,size:this.size,width:this.width,disabled:this.disabled,onClick:this._toggle,"aria-pressed":this.selected?"true":"false",leadingIcon:n("slot",{name:"leadingIcon"}),trailingIcon:n("slot",{name:"trailingIcon"}),forceIconOnly:this._onlyHasLeadingIcon()},n("slot",{key:"05e75b6a46032ddfe7448b81f5ac929105d20383"})))}_onlyHasLeadingIcon(){const e=this._el.childNodes;return 1===e.length&&e[0]instanceof window.Element&&"leadingIcon"===e[0].slot}get _el(){return this}static get watchers(){return{selected:[{handleSelctedChange:0}]}}},[257,"gids-toggle-button",{disabled:[516],appearance:[513],size:[513],width:[513],defaultSelected:[516,"default-selected"],selected:[1540]},void 0,{selected:[{handleSelctedChange:0}]}]);function o(){"undefined"!=typeof customElements&&["gids-toggle-button"].forEach((t=>{"gids-toggle-button"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}o();export{l as G,o as d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarYearListWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{a as r,b as n,c as d}from"./p-D6lxqcxP.js";const{getGidsCalendarYearListClassNames:h,getGidsCalendarYearListYears:o,isValidFourDigitYear:c}=a,l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.newStartYear=(new Date).getFullYear(),this.newEndYear=(new Date).getFullYear()+100,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=e=>{const{title:t,value:s,selectedIndex:i,disabled:a,id:r}=e.detail;a||"string"!=typeof t||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:r,year:Number(s),disabled:!1,selectedIndex:i,startYear:this.newStartYear,endYear:this.newEndYear}))},this.handleMenuClick=e=>{if(this.suppressNextMenuClickSelection)return;const t=e?.detail;this.applySelection({id:t.id,year:Number(t.value),disabled:!1,selectedIndex:t.selectedIndex,startYear:this.newStartYear,endYear:this.newEndYear})},this.yearsList=()=>o({startYear:this.newStartYear,endYear:this.newEndYear}),this.getSelectedItem=()=>{const e=this.selectedYear,t=this.yearsList(),s=t.findIndex((t=>t.value===e));let i;return null!=s&&-1!==s&&(i=t[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=e=>{const{foundIndex:t}=this.getSelectedItem();return t===e}}connectedCallback(){this.attachItemListener(),this.handleStartAndEndYear()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}handleStartAndEndYear(){const e=this.startYear,t=this.endYear;return this.newStartYear=e&&e>0&&c(e)?e:(new Date).getFullYear(),this.newEndYear=t&&t>0&&c(t)?t:this.newStartYear+100,{newStartYear:this.newStartYear,newEndYear:this.newEndYear}}applySelection(e){this.clearActive(),this.onSelectionYearChange?.(e),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarYearChange",{bubbles:!0,composed:!0,detail:e}))}clearActive(){this.getItemElements().forEach((e=>e.classList.remove("gids-dropdown-item--active")))}render(){const e=h();return i("div",{key:"6f7e9060d5bae75255f0c82d6e39c59350e115db",class:e},i(r,{key:"6d8c2cf5f688ed922abb21d2243c8101ea3a2e45",type:this.type,supportingText:this.noOptionsText},i(n,{key:"f832e544140b66b74c64e306eb23f7c42a2db960",sectionLabel:"Years"},this.yearsList().map(((e,t)=>{const s=`${t+1}`,a=this.disabledIndices?.includes(e.value);return i(d,{title:e.title,value:`${e.value}`,key:`${t.toString()}`,index:t,id:s,selected:this.isItemSelected(t),onPressDropdownItem:this.handleMenuClick,disabled:a,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-year-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedYear:[2,"selected-year"],startYear:[2,"start-year"],endYear:[2,"end-year"],onSelectionYearChange:[16],newStartYear:[32],newEndYear:[32]}]);function u(){"undefined"!=typeof customElements&&["gids-calendar-year-list"].forEach((t=>{"gids-calendar-year-list"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}u();export{l as G,u as d}
1
+ import{t as e,p as t,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarYearListWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{a as d,b as r,c as n}from"./p-D6lxqcxP.js";const{getGidsCalendarYearListClassNames:h,getGidsCalendarYearListYears:o,isValidFourDigitYear:c}=a,l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.newStartYear=(new Date).getFullYear(),this.newEndYear=(new Date).getFullYear()+100,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=e=>{const{title:t,value:s,selectedIndex:i,disabled:a,id:d}=e.detail;a||"string"!=typeof t||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:d,year:Number(s),disabled:!1,selectedIndex:i,startYear:this.newStartYear,endYear:this.newEndYear}))},this.handleMenuClick=e=>{if(this.suppressNextMenuClickSelection)return;const t=e?.detail;this.applySelection({id:t.id,year:Number(t.value),disabled:!1,selectedIndex:t.selectedIndex,startYear:this.newStartYear,endYear:this.newEndYear})},this.yearsList=()=>o({startYear:this.newStartYear,endYear:this.newEndYear}),this.getSelectedItem=()=>{const e=this.selectedYear,t=this.yearsList(),s=t.findIndex((t=>t.value===e));let i;return null!=s&&-1!==s&&(i=t[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=e=>{const{foundIndex:t}=this.getSelectedItem();return t===e}}connectedCallback(){this.attachItemListener(),this.handleStartAndEndYear()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}handleStartAndEndYear(){const e=this.startYear,t=this.endYear;return this.newStartYear=e&&e>0&&c(e)?e:(new Date).getFullYear(),this.newEndYear=t&&t>0&&c(t)?t:this.newStartYear+100,{newStartYear:this.newStartYear,newEndYear:this.newEndYear}}applySelection(e){this.clearActive(),this.onSelectionYearChange?.(e),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarYearChange",{bubbles:!0,composed:!0,detail:e}))}clearActive(){this.getItemElements().forEach((e=>e.classList.remove("gids-dropdown-item--active")))}render(){const e=h();return i("div",{key:"bfcd01860c33d9e76df2050ea70a1f3b2bfaf46c",class:e},i(d,{key:"159e5afcf58334206f70bd5dde34d9d4aa8373f7",type:this.type,supportingText:this.noOptionsText},i(r,{key:"8ba8e9441574b35f00faad1ccf151cdd543dab90",sectionLabel:"Years"},this.yearsList().map(((e,t)=>{const s=`${t+1}`,a=this.disabledIndices?.includes(e.value);return i(n,{title:e.title,value:`${e.value}`,key:`${t.toString()}`,index:t,id:s,selected:this.isItemSelected(t),onPressDropdownItem:this.handleMenuClick,disabled:a,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-year-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedYear:[2,"selected-year"],startYear:[2,"start-year"],endYear:[2,"end-year"],onSelectionYearChange:[16],newStartYear:[32],newEndYear:[32]}]);function u(){"undefined"!=typeof customElements&&["gids-calendar-year-list"].forEach((t=>{"gids-calendar-year-list"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}u();export{l as G,u as d}
@@ -1 +1 @@
1
- import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"f830ae3da5de21c80d9fd5b7161fa3f2845a82df"},e("div",{key:"8c6c4af1b4ebe897873a49c42975a8730905cf27",class:l()},e("div",{key:"3afa55c23b729296ff65fb03b501919dcaa420d3",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"6d8c9adf2b04d19a446fdd2707259d931dbc2eb9",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"46cc09d9414bb88622f95e7ccffba84b602b25f0",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"0e6ddf85cf459c53f2cfc5f453cd4fe35e532d9b",class:"gids-field__control"},e("slot",{key:"d2d007d50a5f7001872b368dee5d648a8751c1af",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"09e08e474051efd8bb9e526311cd8d3bb14f8671",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
1
+ import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"55afcede8d0a565f98b1cdd20293c9f885997d6c"},e("div",{key:"4c9ce99475a4c38e5b8c62b2bef588eb48fcec28",class:l()},e("div",{key:"4c254203e9d4414e59c2564e86119280a7f89186",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"3f8c6df5ac4098e821490edf0699d002ee8ca430",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"c2da3ba663158c54514d959e98ad2861fc64bd57",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"da5091c74fb3df1146b4eecb4d7ee6537a322f32",class:"gids-field__control"},e("slot",{key:"bc49fb537279473305d616f900d5df696d9c2c3c",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"326849f878b531e4695368f1f112ce6d36c3ef4d",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
@@ -1 +1 @@
1
- import{t,p as e,H as i,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownPickerWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-UVmSPzTd.js";import{G as d}from"./p-D4Pimu_8.js";const{getGidsDropdownPickerClassNames:a}=n,r=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="subtle",this.size="sm",this.idPicker="",this.expanded=!1,this.hasLeadingIcon=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.handleDropdownPickerItemSelect=t=>{const{value:e,title:i,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:e,title:i,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t.target;if(!(e instanceof Element))return;const i=e.closest(".gids-dropdown-item");if(!i||!this.hostElement.contains(i))return;if(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;const s=i instanceof HTMLButtonElement?i.value:i.getAttribute("value")??"";if("string"!=typeof s||0===s.length)return;const n=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=i.getAttribute("is-placeholder-item")??"";this.applySelection({id:n,value:s,title:i.textContent?.trim()??"",disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleDropdownButtonClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},this.handleOutSpaceClickOfDropdownButtonToggle=t=>{this.expanded&&(t.stopPropagation(),this.setExpandedState(!1))},this.handleDocumentPointerDown=t=>{2!==t.button&&this.expanded&&(("function"==typeof t.composedPath?t.composedPath():[]).includes(this.hostElement)||this.hostElement.contains(t.target)||this.setExpandedState(!1,t))},this.handleDocumentKeyDown=t=>{if(!this.expanded)return;const e=t.key;if("Escape"===e||"Esc"===e)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===e&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.setExpandedState(!1)}}handleExpandedChange(t){t&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}connectedCallback(){this.initialValue=this.value,this.attachItemListener(),this.attachDocumentListeners(),this.attachFormListener()}disconnectedCallback(){this.detachItemListener(),this.detachDocumentListeners(),this.detachFormListener()}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconDropdownPicker"]')}getDropdownButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.clearActive(),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}setExpandedState(t,e){const i=Boolean(t);i&&!this.isInteractive()||this.expanded!==i&&(this.expanded=i,i||(this.clearActive(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerToggle",{bubbles:!0,composed:!0,detail:{expanded:i,originalEvent:e}})))}syncInputDisplayValue(){const t=this.getDropdownButtonControl();t&&t.value!==(this.selectedItemTitle??"")&&(t.value=this.selectedItemTitle??"")}attachDocumentListeners(){this.hasDocumentListeners||"undefined"==typeof document||(document.addEventListener("pointerdown",this.handleDocumentPointerDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!0)}detachDocumentListeners(){this.hasDocumentListeners&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!1)}attachFormListener(){const t=this.hostElement.closest("form");this.patternForm!==t&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=t??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}isInteractive(){return!this.disabled}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}render(){const t=this.expanded&&this.isInteractive(),e=a({expanded:t}),i="string"==typeof this.idPicker?this.idPicker:void 0,n=i?`${i}__menu`:void 0;return s("div",{key:"fd8821be1aecb1e5ba7f725d9ebec0f6222a16cd",class:e,onClick:this.handleOutSpaceClickOfDropdownButtonToggle},s(o,{key:"63016b4e74dfeaa3f9c29139f69a2d46ca97ae76",role:"pickerbox","aria-expanded":t?"true":"false","aria-haspopup":"pickerlistbox","aria-controls":n??"",onClick:this.handleDropdownButtonClickToggle,disabled:this.disabled,value:this.selectedItemTitle??this.value??"",loading:this.loading,appearance:this.appearance,size:this.size},this.hasLeadingIcon?s("slot",{name:"leadingIconDropdownPicker",slot:"leadingIcon"}):s(d,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"})),s("div",{key:"4f463a8f04de48e3b8b6ceeab69c90cbc8ba7631",class:"gids-dropdown-picker__menu",id:n,role:"pickerbox",onClick:this.handleMenuClick},s("slot",{key:"1fab2b1bd8cd2bcd0fd7031712d0585635620be1"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}}static get style(){return".gids-dropdown-picker{position:relative}.gids-dropdown-picker__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown-picker__menu>*{flex-shrink:0}.gids-dropdown-picker--expanded .gids-dropdown-picker__menu{display:flex}"}},[260,"gids-dropdown-picker",{appearance:[1],size:[1],idPicker:[1,"id-picker"],expanded:[1540],disabled:[516],loading:[516],value:[513],name:[1],onSelectionChange:[16],selectedItemTitle:[32],hasLeadingIcon:[32]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-dropdown-picker"].forEach((e=>{"gids-dropdown-picker"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}h();export{r as G,h as d}
1
+ import{t,p as e,H as i,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownPickerWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-UVmSPzTd.js";import{G as d}from"./p-D4Pimu_8.js";const{getGidsDropdownPickerClassNames:r}=n,h=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="subtle",this.size="sm",this.idPicker="",this.expanded=!1,this.hasLeadingIcon=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.handleDropdownPickerItemSelect=t=>{const{value:e,title:i,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:e,title:i,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t.target;if(!(e instanceof Element))return;const i=e.closest(".gids-dropdown-item");if(!i||!this.hostElement.contains(i))return;if(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;const s=i instanceof HTMLButtonElement?i.value:i.getAttribute("value")??"";if("string"!=typeof s||0===s.length)return;const n=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=i.getAttribute("is-placeholder-item")??"";this.applySelection({id:n,value:s,title:i.textContent?.trim()??"",disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleDropdownButtonClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},this.handleOutSpaceClickOfDropdownButtonToggle=t=>{this.expanded&&(t.stopPropagation(),this.setExpandedState(!1))},this.handleDocumentPointerDown=t=>{2!==t.button&&this.expanded&&(("function"==typeof t.composedPath?t.composedPath():[]).includes(this.hostElement)||this.hostElement.contains(t.target)||this.setExpandedState(!1,t))},this.handleDocumentKeyDown=t=>{if(!this.expanded)return;const e=t.key;if("Escape"===e||"Esc"===e)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===e&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.setExpandedState(!1)}}handleExpandedChange(t){t&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}connectedCallback(){this.initialValue=this.value,this.attachItemListener(),this.attachDocumentListeners(),this.attachFormListener()}disconnectedCallback(){this.detachItemListener(),this.detachDocumentListeners(),this.detachFormListener()}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconDropdownPicker"]')}getDropdownButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownPickerItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.clearActive(),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}setExpandedState(t,e){const i=Boolean(t);i&&!this.isInteractive()||this.expanded!==i&&(this.expanded=i,i||(this.clearActive(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerToggle",{bubbles:!0,composed:!0,detail:{expanded:i,originalEvent:e}})))}syncInputDisplayValue(){const t=this.getDropdownButtonControl();t&&t.value!==(this.selectedItemTitle??"")&&(t.value=this.selectedItemTitle??"")}attachDocumentListeners(){this.hasDocumentListeners||"undefined"==typeof document||(document.addEventListener("pointerdown",this.handleDocumentPointerDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!0)}detachDocumentListeners(){this.hasDocumentListeners&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!1)}attachFormListener(){const t=this.hostElement.closest("form");this.patternForm!==t&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=t??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}isInteractive(){return!this.disabled}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}render(){const t=this.expanded&&this.isInteractive(),e=r({expanded:t}),i="string"==typeof this.idPicker?this.idPicker:void 0,n=i?`${i}__menu`:void 0;return s("div",{key:"1ee449ed3c2d93b14e4b2df8d535bd30e580fb0f",class:e,onClick:this.handleOutSpaceClickOfDropdownButtonToggle},s(o,{key:"e566f446f656a90c51ff25206d1b56918641904c",role:"pickerbox","aria-expanded":t?"true":"false","aria-haspopup":"pickerlistbox","aria-controls":n??"",onClick:this.handleDropdownButtonClickToggle,disabled:this.disabled,value:this.selectedItemTitle??this.value??"",loading:this.loading,appearance:this.appearance,size:this.size},this.hasLeadingIcon?s("slot",{name:"leadingIconDropdownPicker",slot:"leadingIcon"}):s(d,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"})),s("div",{key:"ff00f5d0f0ecd11fd67ba8748f983a0444400c50",class:"gids-dropdown-picker__menu",id:n,role:"pickerbox",onClick:this.handleMenuClick},s("slot",{key:"ea983b061c69295bc6756a44617cc35267d6ce70"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}}static get style(){return".gids-dropdown-picker{position:relative}.gids-dropdown-picker__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown-picker__menu>*{flex-shrink:0}.gids-dropdown-picker--expanded .gids-dropdown-picker__menu{display:flex}"}},[260,"gids-dropdown-picker",{appearance:[1],size:[1],idPicker:[1,"id-picker"],expanded:[1540],disabled:[516],loading:[516],value:[513],name:[1],onSelectionChange:[16],selectedItemTitle:[32],hasLeadingIcon:[32]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}]}]);function a(){"undefined"!=typeof customElements&&["gids-dropdown-picker"].forEach((e=>{"gids-dropdown-picker"===e&&(customElements.get(t(e))||customElements.define(t(e),h))}))}a();export{h as G,a as d}