@ganpatiinfo/gids-core-web 4.0.0 → 6.0.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.
- package/dist/css/index.css +394 -6
- package/dist/css/index.css.map +1 -1
- package/dist/gids-field.d.ts +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.d.ts +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.d.ts +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-notification.d.ts +1 -1
- package/dist/gids-overlay-provider.d.ts +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.d.ts +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-scrim.d.ts +11 -0
- package/dist/gids-scrim.js +1 -0
- package/dist/gids-snackbar.d.ts +1 -1
- package/dist/gids-text-field.d.ts +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.d.ts +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/{p-RqpjvEHh.js → p-BVh4zbX4.js} +1 -1
- package/dist/{p-D4xtPT_U.js → p-BplPYg8z.js} +1 -1
- package/dist/types/components/html/GidsHeading/GidsHeading.d.ts +2 -2
- package/dist/types/components/html/GidsSearchBar/GidsSearchBar.d.ts +1 -2
- package/dist/types/components/html/GidsSegmentedControl/GidsSegmentedControl.d.ts +1 -1
- package/dist/types/components/html/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts +1 -1
- package/dist/types/components/html/GidsSideMenu/GidsSideMenu.d.ts +5 -0
- package/dist/types/components/html/GidsSideMenuHeader/GidsSideMenuHeader.d.ts +8 -0
- package/dist/types/components/html/GidsSideMenuItem/GidsSideMenuItem.d.ts +7 -0
- package/dist/types/components/html/GidsSideNavigation/GidsSideNavigation.d.ts +7 -0
- package/dist/types/components/html/GidsTopNavigation/GidsTopNavigation.d.ts +1 -1
- package/dist/types/components/webComponents/GidsScrim/GidsScrim.d.ts +7 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-bundled/es/gids-field.js +3 -3
- package/dist-bundled/es/gids-icon.js +8 -8
- package/dist-bundled/es/gids-input.js +2 -2
- package/dist-bundled/es/gids-overlay-provider.js +4 -4
- package/dist-bundled/es/gids-password-field.js +28 -28
- package/dist-bundled/es/gids-scrim.js +35 -0
- package/dist-bundled/es/gids-text-field.js +11 -11
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/{p-RqpjvEHh-BGGYsIBf.js → p-BVh4zbX4-C4UJ8LPX.js} +6 -6
- package/dist-bundled/es/{p-D4xtPT_U-04HkZiXU.js → p-BplPYg8z-B8uAAfo4.js} +4 -4
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-scrim.umd.js +5 -0
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +14 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,t as i,p as n,H as e,F as a}from"./p-ibikYq-w.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-veoOgDXg.js";import{G as p}from"./p-CWdkmFbc.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 console.log("_renderSnackbar_called"),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 console.log("_renderComponent_called",i),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};console.log("component_1",l),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:"41dc60790fe64bf9e0daa2da5fd6c39f30d8ceac"},t("slot",{key:"a480a4344336cbbf75ac3bc771c9416d27d9d742"}),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-ibikYq-w.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-veoOgDXg.js";import{G as p}from"./p-CWdkmFbc.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:"90aa53804ede45cefeb6439d7d5466fbf3ce9bd9"},t("slot",{key:"5705eaedb944a16514dc3570258ec67d60ad82c2"}),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
|
|
1
|
+
import{h as e,t,p as s,H as i,c as n,f as r,F as a}from"./p-ibikYq-w.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,a as g}from"./p-DijVkS9b.js";import{G as f}from"./p-CWdkmFbc.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-veoOgDXg.js";import{d as L}from"./p-BplPYg8z.js";import{d as M}from"./p-BVh4zbX4.js";const{getGidsStrengthMeterClassNames:k}=l,{getStrengthMeterScore:C,getColorModifierByScore:S}=q,P=({text:t,textMinLength:s,meterRules:i=["1-uppercase","1-lowercase","1-digit","1-special-character","include-min-length"],class:n})=>{const r=(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:k(n)},(()=>{const e=i.length,n=C({text:t,textMinLength:s,meterRules:i}),a=S({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})?r(l,a,d):null:r(l,a,d)}))})()):null},{getGidsRequirementsMeterLabelClassNames:_}=d,{getRequirementsMeterLabelLeadingIcon:F}=R,G=t=>{const{label:s,status:i="default",leadingIconVisible:n=!0,class:r}=t,a=F(i);return e("div",{class:_({status:i},r)},n&&i&&a?e(y,{name:a,size:"sm",appearance:"filled"}):null,s&&""!==s?e("span",null,s):null)},{checkRequirementRuleSatisfied:T}=w,{getGidsRequirementsMeterClassNames:j}=o,B=({requirements:t=[],text:s,textMinLength:i,class:n})=>{const r=(t,s)=>e(G,{status:s?"success":"error",label:t.requirementText});return e("div",{class:j(n)},t.map((e=>{if(null!=e?.requirementText&&null!=e?.requirementRule){const t=T({rule:e.requirementRule,textMinLength:i,text:s});return"include-min-length"===e.requirementRule?!0===p({requirementRule:e.requirementRule,textMinLength:i})?r(e,t):null:r(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((()=>{r(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,r=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(a,{key:"b83ca111267e69120811c23a02754fc2f3132131"},e("gids-field",{key:"b10ea7b36a8f7daa4b5877e541ffa468ca06c474",disabled:this.disabled,count:void 0,helperText:this.helperText,statusText:this.statusText,status:E(this.status)},e(m,{key:"04f8c7ee920968585e77dff7e67494547285b6a6",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:"2892c5cda5ac6125e1b1c16195cbe45fed9ed0cd",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:"e6690ff215ac059385463b250d4b75876af23b6b",name:"leadingIcon"}),e("slot",{key:"a22761b031bc9e5d7d115d2c82969685dc4ec150",name:"leadingAccessory"}),e("div",{key:"6e4ddee96b624e07453b06966d02fe22060bdddf",slot:"trailingAccessory",class:"gids-password-field__trailing-accessory"},n&&e(g,{key:"1499342b7785379b68472713b19f2846cb39315c",label:"clear text",size:"lg",onPressDismiss:this._handleDismiss}),r&&e(f,{key:"b309f288c0e7108f0896de407e1b8b4b6cd1f628",appearance:"default",size:"xs",width:"intrinsic",disabled:this.disabled,onClick:this._handleRevealPassword},o?"Hide":"Show")))),e("div",{key:"7cbcb6a793de21d9f990b26ee0ff956a73d3f20e",class:"gids-password-field__meters-container"},e(P,{key:"f0085914442e068821fc01304e75a0fab47d3dd5",meterRules:h,text:this.value,textMinLength:u}),e(B,{key:"832be45d45074a520896001b80a20a0fd54695b7",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 O(){"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))||L();break;case"gids-input":customElements.get(t(e))||M()}}))}O();const I=z,V=O;export{I as GidsPasswordField,V as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "./types/components";
|
|
2
|
+
|
|
3
|
+
interface GidsScrim extends Components.GidsScrim, HTMLElement {}
|
|
4
|
+
export const GidsScrim: {
|
|
5
|
+
prototype: GidsScrim;
|
|
6
|
+
new (): GidsScrim;
|
|
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 s,p as t,H as e,h as i}from"./p-ibikYq-w.js";import{g as c}from"./p-B2zUuNXz.js";import{GidsScrimWebUtils as r}from"@ganpatiinfo/gids-web-shared";const{getGidsScrimClassNames:o}=r,n=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow()}connectedCallback(){const s=c();void 0!==s&&this._el.shadowRoot?.adoptedStyleSheets.push(s)}render(){return i("div",{key:"e00fc92fcb3ec6168367571260a8bfabc41d620a",class:o(this.extraClasses)},i("slot",{key:"c5dbff95f6d3b14ec79fa7102ad3948fcbc94965"}))}get _el(){return this}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"]}]);function a(){"undefined"!=typeof customElements&&["gids-scrim"].forEach((t=>{"gids-scrim"===t&&(customElements.get(s(t))||customElements.define(s(t),n))}))}a();const d=n,l=a;export{d as GidsScrim,l as defineCustomElement}
|
package/dist/gids-snackbar.d.ts
CHANGED
package/dist/gids-text-field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,c as s,f as a,h as
|
|
1
|
+
import{t as e,p as t,H as i,c as s,f as a,h as l}from"./p-ibikYq-w.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{a as h,G as u}from"./p-DijVkS9b.js";import{d as c}from"./p-BplPYg8z.js";import{d as f}from"./p-BVh4zbX4.js";const{formatCharCount:b}=n,{inputToGidsFieldStatus:m}=r,p=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:"7aa5bbe489adc1310365d37aac41ca9772fa1d0f",disabled:this.disabled,count:b(this.value?.length,this.maxLength),helperText:this.helperText,statusText:this.statusText,status:m(this.status)},l(u,{key:"5a9bf6cfe25a0800b466a0aaccd21ac80aca59bb",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:"53f0d81f5227ed7a872ec9acebb559d21c4adc6e",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:"42a2856da9b6d31452fc3fb199eacb336bff3475",name:"leadingIcon"}),l("slot",{key:"3b5cbe26cc943ffeab09231a7d7df750f7b473f7",name:"leadingAccessory"}),s&&l(h,{key:"51a7942f8e31430bf1d74abad31049e9ad11f92e",label:"clear text",slot:"trailingAccessory",size:"lg",onPressDismiss:this._handleDismiss}),l("slot",{key:"ae4eccacb0f60d70b57e5df949f7a0dbc9098654",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),p);break;case"gids-field":customElements.get(e(t))||c();break;case"gids-input":customElements.get(e(t))||f()}}))}g();const x=p,q=g;export{x as GidsTextField,q as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as i,h as n,d as o}from"./p-ibikYq-w.js";import{G as c}from"./p-CWdkmFbc.js";import{g as d}from"./p-B2zUuNXz.js";const l=t(class extends s{get selected(){return this.#e??this.defaultSelected}set selected(e){this.#e=void 0===e?void 0:!!e}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=i(this,"select"),this._toggle=this._toggle.bind(this)}#e;connectedCallback(){const e=d();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e)}render(){return n(o,{key:"
|
|
1
|
+
import{t as e,p as t,H as s,c as i,h as n,d as o}from"./p-ibikYq-w.js";import{G as c}from"./p-CWdkmFbc.js";import{g as d}from"./p-B2zUuNXz.js";const l=t(class extends s{get selected(){return this.#e??this.defaultSelected}set selected(e){this.#e=void 0===e?void 0:!!e}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=i(this,"select"),this._toggle=this._toggle.bind(this)}#e;connectedCallback(){const e=d();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e)}render(){return n(o,{key:"629bf94de5dcf8979c4c52f749e6f1528506cb7f"},n("style",{key:"45b2ada2ba3e26b574f7c34675622db5352802d2"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),n(c,{key:"2f93e85e5dbf968c09c245e71a41a9b587ead04c",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:"599d014741a1d931f44976866e92837ed2184e5f"})))}_onlyHasLeadingIcon(){const e=this._el.childNodes;return 1===e.length&&e[0]instanceof window.Element&&"leadingIcon"===e[0].slot}get _el(){return this}},[257,"gids-toggle-button",{disabled:[516],appearance:[513],size:[513],width:[513],defaultSelected:[516,"default-selected"],selected:[6660]}]);function a(){"undefined"!=typeof customElements&&["gids-toggle-button"].forEach((t=>{"gids-toggle-button"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}a();const r=l,h=a;export{r as GidsToggleButton,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,h as s,F as a}from"./p-ibikYq-w.js";import{isInteractiveElement as n}from"@ganpatiinfo/gids-web-shared";import{G as
|
|
1
|
+
import{t as e,p as t,H as i,h as s,F as a}from"./p-ibikYq-w.js";import{isInteractiveElement as n}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-veoOgDXg.js";import{G as c}from"./p-DybsMR13.js";const l=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.#e={},this._focusInput=e=>{const t=e.target;t===this.#t||this._isWithinInteractiveElement(t)||this.#t?.focus()},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))}}get defaultValue(){return this.#t?.defaultValue??this.#e.defaultValue??""}set defaultValue(e){this.#t?this.#t.defaultValue=e:this.#e.defaultValue=e}get value(){return this.#t?.value??this.#e.value??this.#e.defaultValue??""}set value(e){this.#t?this.#t.value=e:this.#e.value=e}#t;#e;_isWithinInteractiveElement(e){if(null===e||e===this._el||!this._el.contains(e))return!1;if(n(e))return!0;{const t=e.parentElement;if(t)return this._isWithinInteractiveElement(t)}return!1}connectedCallback(){this._el.addEventListener("click",this._focusInput)}disconnectedCallback(){this._el.removeEventListener("click",this._focusInput)}render(){return s(a,{key:"281c832656cace745109fdd8208fe24b90f2c126"},s("slot",{key:"5f8424a1d9bc196e3efee9d1e5d099bed15ddb4b",name:"leadingIcon"}),this.leadingLabel&&s("span",{key:"2ce161a38f74618d60f38028c646c80e361aeced",class:"gids-input__label"},this.leadingLabel),s("slot",{key:"12383525faf774eef618705cf68338a4fc9c9e55",name:"leadingAccessory"}),s("input",{key:"19de1aa1ad2a47db2979dfcbbf9b8e49d045f5af",...this.inputProps,ref:e=>{this.#t=e,void 0!==this.#e.value&&(this.#t.value=this.#e.value,delete this.#e.value),void 0!==this.#e.defaultValue&&(this.#t.defaultValue=this.#e.defaultValue,delete this.#e.defaultValue)},class:"gids-input__control",name:this.name,disabled:this.disabled,readOnly:this.readOnly,required:this.required,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur}),s("slot",{key:"3e0f6ae8c23b2536891ddd0adb7be1215d86ac66",name:"trailingAccessory"}),this.trailingLabel&&s("span",{key:"9b2ac9fbf6c198dd0a4e1decf4631b2b46902587",class:"gids-input__label"},this.trailingLabel),s("slot",{key:"d9848f786ce38136f1ad8c07d685215ede87f157",name:"trailingIcon"}),"incomplete"===this.status&&s(d,{key:"bc8bcc01f07bd345b448f4662a37b28d8029a94f",name:"warning",appearance:"filled",class:"gids-input__warning-icon"}),"complete"===this.status&&s(d,{key:"cafc44041a1d4eac859face7ec5eea2ced1ca3f5",name:"positive",appearance:"filled",class:"gids-input__positive-icon"}),this.loading&&s(c,{key:"0daca638742b098d06da6cd9a7b9cfd6e9c90921",size:"md",indeterminate:!0}))}get _el(){return this}},[260,"gids-input",{appearance:[513],defaultValue:[6657,"default-value"],disabled:[516],inputProps:[16],leadingLabel:[513,"leading-label"],trailingLabel:[513,"trailing-label"],loading:[516],name:[513],readOnly:[516,"readonly"],required:[516],status:[513],value:[6145]}]);function r(){"undefined"!=typeof customElements&&["gids-input"].forEach((t=>{"gids-input"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}r();export{l as G,r as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,h as e,d as a}from"./p-ibikYq-w.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-veoOgDXg.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:"fed52ee2bacf334f4ec630fdaea5285d8aee56b3"},e("div",{key:"fe65a5714ae0e8369a2e6d91f5ccbe37ce1b04b4",class:l()},e("div",{key:"37d656971e39e9c26085b54fd253f9758e6110fa",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"eda62c8170fb5caf2e69f66bae079d1646a52ff8",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"28677c5ebd0e8bfb7f9f0c43634c9a70b84f4cd0",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"0a816504a863304e13be74c64429b74700fc3590",class:"gids-field__control"},e("slot",{key:"1081771bfb182da6b0527303132555458de3ff2e",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"632636f8c4d819b6c32658a7ae72ab9308973fda",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-ibikYq-w.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-veoOgDXg.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:"4bd0ef4ac11ded5f563595485082650801fdbe1b"},e("div",{key:"3617e3301f53dcb21a9beb98b4a23d620e3dd39d",class:l()},e("div",{key:"bb1f6710ee27c94346f7ee9459389d901b23d913",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"8fa03ca31936bc6082052b099ac29afea2ec3032",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"1b50c69005c2d0b89c47dc01c2dcbb343bdeecff",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"b8664a96496a6e7289fb14bdadbb59dcee9af3d1",class:"gids-field__control"},e("slot",{key:"bff757557406c0165be3569c4eb34adb1fe346ca",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"0638e493fc4ac98f6c10a8392c45ffde8b8340a4",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,6 +1,6 @@
|
|
|
1
1
|
import { type VNode } from '../../../stencil-public-runtime';
|
|
2
2
|
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
-
import {
|
|
4
|
-
export interface GidsHeadingProps extends
|
|
3
|
+
import { GidsHeadingWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export interface GidsHeadingProps extends GidsHeadingWebProps<VNode, VNode | string>, Omit<JSXBase.IntrinsicElements['div'], 'onClick'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const GidsHeading: FunctionalComponent<GidsHeadingProps>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type GidsSearchBarWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
2
2
|
import { JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
3
|
import { GidsTextField } from '../../webComponents/GidsTextField/GidsTextField.js';
|
|
4
|
-
type GidsTextFieldBaseProps = JSXBase.HTMLAttributes<typeof GidsTextField>;
|
|
4
|
+
export type GidsTextFieldBaseProps = JSXBase.HTMLAttributes<typeof GidsTextField>;
|
|
5
5
|
export interface GidsSearchBarProps extends GidsSearchBarWebProps<VNode, Omit<JSXBase.IntrinsicElements['input'], 'ref'>>, Pick<GidsTextFieldBaseProps, 'onChange' | 'onInput' | 'onFocus' | 'onBlur'> {
|
|
6
6
|
wrapperClass?: string;
|
|
7
7
|
onGidsSearchBarClear?: (event: CustomEvent<void>) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const GidsSearchBar: (props: GidsSearchBarProps) => any;
|
|
10
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type GidsSegmentedTabItemPressedReturnedProps, type GidsSegmentedControlCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
2
|
import type { FunctionalComponent, JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
|
-
export interface GidsSegmentedControlProps extends Omit<JSXBase.IntrinsicElements['div'], 'onClick' | 'children' | 'onChange' | 'onBlur'>, GidsSegmentedControlCommonProps<VNode | string, string> {
|
|
3
|
+
export interface GidsSegmentedControlProps extends Omit<JSXBase.IntrinsicElements['div'], 'onClick' | 'children' | 'onChange' | 'onBlur'>, GidsSegmentedControlCommonProps<VNode | string, string, VNode> {
|
|
4
4
|
onPress?: (props: GidsSegmentedTabItemPressedReturnedProps) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare const GidsSegmentedControl: FunctionalComponent<GidsSegmentedControlProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GidsSegmentedTabItemPressedReturnedProps, type GidsSegmentedTabItemCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
2
|
import type { FunctionalComponent, JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
|
-
export interface GidsSegmentedTabItemProps extends Omit<JSXBase.IntrinsicElements['button'], 'onClick' | 'children' | 'onChange' | 'onBlur'>, GidsSegmentedTabItemCommonProps<VNode | string, string> {
|
|
3
|
+
export interface GidsSegmentedTabItemProps extends Omit<JSXBase.IntrinsicElements['button'], 'onClick' | 'children' | 'onChange' | 'onBlur'>, GidsSegmentedTabItemCommonProps<VNode | string, string, VNode> {
|
|
4
4
|
onPress?: (props: GidsSegmentedTabItemPressedReturnedProps) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare const GidsSegmentedTabItem: FunctionalComponent<GidsSegmentedTabItemProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FunctionalComponent } from '../../../stencil-public-runtime';
|
|
2
|
+
import { JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsSideMenuWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export type GidsSideMenuProps = GidsSideMenuWebProps<VNode> & Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'>;
|
|
5
|
+
export declare const GidsSideMenu: FunctionalComponent<GidsSideMenuProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsSideMenuHeaderWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
import { GidsSearchBarProps } from '../GidsSearchBar/GidsSearchBar.js';
|
|
5
|
+
export interface GidsSideMenuHeaderProps extends GidsSideMenuHeaderWebProps<VNode, VNode, Omit<JSXBase.IntrinsicElements['input'], 'ref'>>, Pick<GidsSearchBarProps, 'wrapperClass' | 'onGidsSearchBarClear' | 'onChange' | 'onInput' | 'onFocus' | 'onBlur'> {
|
|
6
|
+
headerClasses?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const GidsSideMenuHeader: FunctionalComponent<GidsSideMenuHeaderProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { type GidsSideMenuItemOnPressEvent, type GidsSideMenuItemWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
export interface GidsSideMenuItemProps extends GidsSideMenuItemWebProps<VNode | string, VNode, VNode>, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick' | 'click'> {
|
|
5
|
+
onPressSideMenuItem?: GidsSideMenuItemOnPressEvent;
|
|
6
|
+
}
|
|
7
|
+
export declare const GidsSideMenuItem: FunctionalComponent<GidsSideMenuItemProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GidsSideNavigationWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { FunctionalComponent, JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsSideMenuHeaderProps } from '../GidsSideMenuHeader/GidsSideMenuHeader.js';
|
|
4
|
+
export interface GidsSideNavigationProps extends GidsSideNavigationWebProps<VNode, VNode, VNode, Omit<JSXBase.IntrinsicElements['input'], 'ref'>>, Pick<GidsSideMenuHeaderProps, 'headerClasses' | 'wrapperClass' | 'onGidsSearchBarClear' | 'onBlur' | 'onChange' | 'onFocus' | 'onInput'> {
|
|
5
|
+
extraSideNavigationClasses?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const GidsSideNavigation: FunctionalComponent<GidsSideNavigationProps>;
|
|
@@ -2,7 +2,7 @@ import { type GidsTopNavigationWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
|
2
2
|
import { type VNode } from '../../../stencil-public-runtime';
|
|
3
3
|
import { type GidsSearchBarProps } from '../GidsSearchBar/GidsSearchBar.js';
|
|
4
4
|
import { type GidsSegmentedControlProps } from '../GidsSegmentedControl/GidsSegmentedControl.js';
|
|
5
|
-
export interface GidsTopNavigationProps extends GidsTopNavigationWebProps<VNode, VNode, VNode, VNode | string, string, string, string>, Pick<GidsSearchBarProps, 'onBlur' | 'onChange' | 'onFocus' | 'onInput'>, Pick<GidsSegmentedControlProps, 'onPress'> {
|
|
5
|
+
export interface GidsTopNavigationProps extends GidsTopNavigationWebProps<VNode, VNode, VNode, VNode | string, string, string, string, VNode>, Pick<GidsSearchBarProps, 'onBlur' | 'onChange' | 'onFocus' | 'onInput'>, Pick<GidsSegmentedControlProps, 'onPress'> {
|
|
6
6
|
class?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const GidsTopNavigation: (props: GidsTopNavigationProps) => any;
|
|
@@ -104,6 +104,9 @@ export namespace Components {
|
|
|
104
104
|
"textMinLength"?: number;
|
|
105
105
|
"value"?: string;
|
|
106
106
|
}
|
|
107
|
+
interface GidsScrim {
|
|
108
|
+
"extraClasses"?: string | undefined;
|
|
109
|
+
}
|
|
107
110
|
interface GidsSnackbar {
|
|
108
111
|
/**
|
|
109
112
|
* @default 'default'
|
|
@@ -243,6 +246,12 @@ declare global {
|
|
|
243
246
|
prototype: HTMLGidsPasswordFieldElement;
|
|
244
247
|
new (): HTMLGidsPasswordFieldElement;
|
|
245
248
|
};
|
|
249
|
+
interface HTMLGidsScrimElement extends Components.GidsScrim, HTMLStencilElement {
|
|
250
|
+
}
|
|
251
|
+
var HTMLGidsScrimElement: {
|
|
252
|
+
prototype: HTMLGidsScrimElement;
|
|
253
|
+
new (): HTMLGidsScrimElement;
|
|
254
|
+
};
|
|
246
255
|
interface HTMLGidsSnackbarElement extends Components.GidsSnackbar, HTMLStencilElement {
|
|
247
256
|
}
|
|
248
257
|
var HTMLGidsSnackbarElement: {
|
|
@@ -290,6 +299,7 @@ declare global {
|
|
|
290
299
|
"gids-notification": HTMLGidsNotificationElement;
|
|
291
300
|
"gids-overlay-provider": HTMLGidsOverlayProviderElement;
|
|
292
301
|
"gids-password-field": HTMLGidsPasswordFieldElement;
|
|
302
|
+
"gids-scrim": HTMLGidsScrimElement;
|
|
293
303
|
"gids-snackbar": HTMLGidsSnackbarElement;
|
|
294
304
|
"gids-text-field": HTMLGidsTextFieldElement;
|
|
295
305
|
"gids-toggle-button": HTMLGidsToggleButtonElement;
|
|
@@ -388,6 +398,9 @@ declare namespace LocalJSX {
|
|
|
388
398
|
"textMinLength"?: number;
|
|
389
399
|
"value"?: string;
|
|
390
400
|
}
|
|
401
|
+
interface GidsScrim {
|
|
402
|
+
"extraClasses"?: string | undefined;
|
|
403
|
+
}
|
|
391
404
|
interface GidsSnackbar {
|
|
392
405
|
/**
|
|
393
406
|
* @default 'default'
|
|
@@ -525,6 +538,9 @@ declare namespace LocalJSX {
|
|
|
525
538
|
"fieldRequirementRequiredText": string | GidsLabelFieldRequirementTextFn;
|
|
526
539
|
"textMinLength": number;
|
|
527
540
|
}
|
|
541
|
+
interface GidsScrimAttributes {
|
|
542
|
+
"extraClasses": string | undefined;
|
|
543
|
+
}
|
|
528
544
|
interface GidsSnackbarAttributes {
|
|
529
545
|
"message": string;
|
|
530
546
|
"appearance": GidsSnackbarContainerAppearance;
|
|
@@ -571,6 +587,7 @@ declare namespace LocalJSX {
|
|
|
571
587
|
"gids-notification": Omit<GidsNotification, keyof GidsNotificationAttributes> & { [K in keyof GidsNotification & keyof GidsNotificationAttributes]?: GidsNotification[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `attr:${K}`]?: GidsNotificationAttributes[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `prop:${K}`]?: GidsNotification[K] };
|
|
572
588
|
"gids-overlay-provider": GidsOverlayProvider;
|
|
573
589
|
"gids-password-field": Omit<GidsPasswordField, keyof GidsPasswordFieldAttributes> & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes]?: GidsPasswordField[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `attr:${K}`]?: GidsPasswordFieldAttributes[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `prop:${K}`]?: GidsPasswordField[K] };
|
|
590
|
+
"gids-scrim": Omit<GidsScrim, keyof GidsScrimAttributes> & { [K in keyof GidsScrim & keyof GidsScrimAttributes]?: GidsScrim[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `attr:${K}`]?: GidsScrimAttributes[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `prop:${K}`]?: GidsScrim[K] };
|
|
574
591
|
"gids-snackbar": Omit<GidsSnackbar, keyof GidsSnackbarAttributes> & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes]?: GidsSnackbar[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `attr:${K}`]?: GidsSnackbarAttributes[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `prop:${K}`]?: GidsSnackbar[K] };
|
|
575
592
|
"gids-text-field": Omit<GidsTextField, keyof GidsTextFieldAttributes> & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes]?: GidsTextField[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `attr:${K}`]?: GidsTextFieldAttributes[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `prop:${K}`]?: GidsTextField[K] };
|
|
576
593
|
"gids-toggle-button": Omit<GidsToggleButton, keyof GidsToggleButtonAttributes> & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes]?: GidsToggleButton[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `attr:${K}`]?: GidsToggleButtonAttributes[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `prop:${K}`]?: GidsToggleButton[K] };
|
|
@@ -586,6 +603,7 @@ declare module "@stencil/core" {
|
|
|
586
603
|
"gids-notification": LocalJSX.IntrinsicElements["gids-notification"] & JSXBase.HTMLAttributes<HTMLGidsNotificationElement>;
|
|
587
604
|
"gids-overlay-provider": LocalJSX.IntrinsicElements["gids-overlay-provider"] & JSXBase.HTMLAttributes<HTMLGidsOverlayProviderElement>;
|
|
588
605
|
"gids-password-field": LocalJSX.IntrinsicElements["gids-password-field"] & JSXBase.HTMLAttributes<HTMLGidsPasswordFieldElement>;
|
|
606
|
+
"gids-scrim": LocalJSX.IntrinsicElements["gids-scrim"] & JSXBase.HTMLAttributes<HTMLGidsScrimElement>;
|
|
589
607
|
"gids-snackbar": LocalJSX.IntrinsicElements["gids-snackbar"] & JSXBase.HTMLAttributes<HTMLGidsSnackbarElement>;
|
|
590
608
|
"gids-text-field": LocalJSX.IntrinsicElements["gids-text-field"] & JSXBase.HTMLAttributes<HTMLGidsTextFieldElement>;
|
|
591
609
|
"gids-toggle-button": LocalJSX.IntrinsicElements["gids-toggle-button"] & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { C as o, H as
|
|
2
|
-
import { i as
|
|
1
|
+
import { C as o, H as e, f as n, R as d } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as a } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { d as c } from "./p-veoOgDXg-DElc87c0.js";
|
|
4
|
-
const
|
|
4
|
+
const t = o(class extends n {
|
|
5
5
|
constructor(i) {
|
|
6
6
|
super(), i !== !1 && this.__registerHost(), this.__attachShadow();
|
|
7
7
|
}
|
|
8
8
|
connectedCallback() {
|
|
9
|
-
const i =
|
|
9
|
+
const i = a();
|
|
10
10
|
i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return
|
|
13
|
+
return d(c, { key: "d1215bf1b178ca6fb73458ecb8370b315239fa5b", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
|
|
14
14
|
}
|
|
15
15
|
get _el() {
|
|
16
16
|
return this;
|
|
17
17
|
}
|
|
18
18
|
static get style() {
|
|
19
|
-
return ".gids-icon{fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%)}.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)}";
|
|
19
|
+
return ".gids-icon{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)}";
|
|
20
20
|
}
|
|
21
21
|
}, [1, "gids-icon", { name: [1], size: [1], appearance: [1], alt: [1], titleId: [1, "title-id"] }]);
|
|
22
22
|
function s() {
|
|
23
23
|
typeof customElements < "u" && ["gids-icon"].forEach(((i) => {
|
|
24
|
-
i === "gids-icon" && (customElements.get(
|
|
24
|
+
i === "gids-icon" && (customElements.get(e(i)) || customElements.define(e(i), t));
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
s();
|
|
28
|
-
const l =
|
|
28
|
+
const l = t, m = s;
|
|
29
29
|
export {
|
|
30
30
|
l as GidsIcon,
|
|
31
31
|
m as defineCustomElement
|
|
@@ -125,13 +125,13 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
|
125
125
|
constructor(t) {
|
|
126
126
|
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this._parentOverlayProvider = null, this._componentQueue = [], this._allowedComponentQueue = [], this._exitingComponents = [], this._renderSnackbar = (e, n) => {
|
|
127
127
|
const { id: i, message: a, appearance: r, buttonLabel: s, onButtonClick: m } = e;
|
|
128
|
-
return
|
|
128
|
+
return o(R, { key: i, class: n, children: a, appearance: r, button: s != null && s !== "" ? o(u, { appearance: "subtle", onClick: m }, s) : void 0 });
|
|
129
129
|
}, this._renderNotification = (e, n) => {
|
|
130
130
|
const { id: i, notificationTitle: a, message: r, pronunciation: s, appearance: m, buttonLabel: c, onButtonClick: l, timerInMs: d } = e;
|
|
131
131
|
return o(E, { key: i, class: n, notificationTitle: a, children: r, pronunciation: s, appearance: m, onCloseNotificationClick: () => this.removeComponent(e, d || 0, !0), button: c != null && c !== "" ? o(u, { appearance: "default", size: "sm", onClick: l }, c) : void 0 });
|
|
132
132
|
}, this._renderComponent = (e) => {
|
|
133
133
|
const { componentName: n, position: i = "bottom-center", id: a } = e, r = B({ position: i, id: a, exitingComponents: this._exitingComponents });
|
|
134
|
-
return
|
|
134
|
+
return n == null || n === "snackbar" ? this._renderSnackbar(e, r) : n === "notification" ? this._renderNotification(e, r) : null;
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
connectedCallback() {
|
|
@@ -151,7 +151,7 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
|
151
151
|
}
|
|
152
152
|
async _queueSnackbar(t) {
|
|
153
153
|
const { appearance: e, message: n, buttonLabel: i, onButtonClick: a, position: r, componentName: s, ...m } = t, c = { id: "" + (Date.now() + Math.random()), message: n, appearance: e, buttonLabel: i, onButtonClick: a, position: r, componentName: s, ...m };
|
|
154
|
-
|
|
154
|
+
this._componentQueue = [...this._componentQueue, c], this.processSingleComponentQueue();
|
|
155
155
|
}
|
|
156
156
|
async _queueNotification(t) {
|
|
157
157
|
const { appearance: e, notificationTitle: n, pronunciation: i, message: a, buttonLabel: r, onButtonClick: s, position: m, componentName: c, ...l } = t, d = { id: "" + (Date.now() + Math.random()), notificationTitle: n, message: a, pronunciation: i, appearance: e, buttonLabel: r, onButtonClick: s, position: m, componentName: c, ...l };
|
|
@@ -187,7 +187,7 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
|
187
187
|
}
|
|
188
188
|
render() {
|
|
189
189
|
const t = this._allowedComponentQueue[0]?.position || "bottom-center";
|
|
190
|
-
return o(w, { key: "
|
|
190
|
+
return o(w, { key: "90aa53804ede45cefeb6439d7d5466fbf3ce9bd9" }, o("slot", { key: "5705eaedb944a16514dc3570258ec67d60ad82c2" }), this._isRoot() ? o("div", { class: G({ position: t }) }, [...this._allowedComponentQueue].reverse().map(((e) => this._renderComponent(e)))) : null);
|
|
191
191
|
}
|
|
192
192
|
get _el() {
|
|
193
193
|
return this;
|