@ganpatiinfo/gids-core-web 15.0.0 → 16.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 +598 -0
- package/dist/css/index.css.map +1 -1
- package/dist/gids-action-bar.d.ts +1 -1
- package/dist/gids-action-bar.js +1 -1
- package/dist/gids-activity-gauge.d.ts +1 -1
- package/dist/gids-activity-gauge.js +1 -1
- package/dist/gids-advanced-tooltip.d.ts +1 -1
- package/dist/gids-advanced-tooltip.js +1 -1
- package/dist/gids-bar-chart.d.ts +1 -1
- package/dist/gids-bar-chart.js +1 -1
- package/dist/gids-calendar-header-panel.d.ts +1 -1
- package/dist/gids-calendar-header-panel.js +1 -1
- package/dist/gids-calendar-month-list.d.ts +1 -1
- package/dist/gids-calendar-month-list.js +1 -1
- package/dist/gids-calendar-year-list.d.ts +1 -1
- package/dist/gids-calendar-year-list.js +1 -1
- package/dist/gids-calendar.d.ts +1 -1
- package/dist/gids-calendar.js +1 -1
- package/dist/gids-chart-legend-item.d.ts +1 -1
- package/dist/gids-chart-legend-item.js +1 -1
- package/dist/gids-chart-legend.d.ts +1 -1
- package/dist/gids-chart-legend.js +1 -1
- package/dist/gids-chart.d.ts +1 -1
- package/dist/gids-chart.js +1 -1
- package/dist/gids-chevron-button.d.ts +1 -1
- package/dist/gids-chevron-button.js +1 -1
- package/dist/gids-dot.d.ts +1 -1
- package/dist/gids-dot.js +1 -1
- package/dist/gids-dropdown-field.d.ts +1 -1
- package/dist/gids-dropdown-field.js +1 -1
- package/dist/gids-dropdown-picker.d.ts +1 -1
- package/dist/gids-dropdown-picker.js +1 -1
- package/dist/gids-dropdown.d.ts +1 -1
- package/dist/gids-dropdown.js +1 -1
- package/dist/gids-expansion-body-list-item.d.ts +1 -1
- package/dist/gids-expansion-body-list-item.js +1 -1
- package/dist/gids-expansion-body-list.d.ts +1 -1
- package/dist/gids-expansion-body-list.js +1 -1
- package/dist/gids-expansion-group.d.ts +1 -1
- package/dist/gids-expansion-group.js +1 -1
- package/dist/gids-expansion.d.ts +1 -1
- package/dist/gids-expansion.js +1 -1
- package/dist/gids-field.d.ts +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-filter.d.ts +1 -1
- package/dist/gids-filter.js +1 -1
- package/dist/gids-header-navigation-item.d.ts +11 -0
- package/dist/gids-header-navigation-item.js +1 -0
- package/dist/gids-header-navigation.d.ts +11 -0
- package/dist/gids-header-navigation.js +1 -0
- 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-level-gauge.d.ts +1 -1
- package/dist/gids-line-chart.d.ts +1 -1
- package/dist/gids-line-chart.js +1 -1
- package/dist/gids-md-table.d.ts +1 -1
- package/dist/gids-md-table.js +1 -1
- package/dist/gids-notification.d.ts +1 -1
- package/dist/gids-overflow-container.d.ts +1 -1
- package/dist/gids-overflow-container.js +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-pie-chart.d.ts +1 -1
- package/dist/gids-pie-chart.js +1 -1
- package/dist/gids-popover.d.ts +1 -1
- package/dist/gids-popover.js +1 -1
- package/dist/gids-profile-menu-header.d.ts +11 -0
- package/dist/gids-profile-menu-header.js +1 -0
- package/dist/gids-profile-menu.d.ts +11 -0
- package/dist/gids-profile-menu.js +1 -0
- package/dist/gids-profile.d.ts +11 -0
- package/dist/gids-profile.js +1 -0
- package/dist/gids-progress-circle.d.ts +1 -1
- package/dist/gids-scrim.d.ts +1 -1
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-skeleton.d.ts +1 -1
- package/dist/gids-skeleton.js +1 -1
- package/dist/gids-snackbar.d.ts +1 -1
- package/dist/gids-tab-item.d.ts +1 -1
- package/dist/gids-tab-item.js +1 -1
- package/dist/gids-tab.d.ts +1 -1
- package/dist/gids-tab.js +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/gids-tooltip.d.ts +1 -1
- package/dist/gids-tooltip.js +1 -1
- package/dist/gids-transfer-list.d.ts +1 -1
- package/dist/gids-transfer-list.js +1 -1
- package/dist/{p-Iqbf3Pja.js → p-BrYLEey4.js} +1 -1
- package/dist/p-Bs8TP3Rb.js +1 -0
- package/dist/p-Bw2pVReY.js +1 -0
- package/dist/{p-BtKwhIx5.js → p-Bzjuvoza.js} +1 -1
- package/dist/p-C-HyXFGR.js +1 -0
- package/dist/{p-Cyant-dw.js → p-CCpxJ8wu.js} +1 -1
- package/dist/p-CXFvqDBs.js +1 -0
- package/dist/{p-DLauG0q8.js → p-CZBiavxU.js} +1 -1
- package/dist/p-CcpdJCql.js +1 -0
- package/dist/{p-BKIsp763.js → p-Chb2OeFe.js} +1 -1
- package/dist/{p-Df5xaj-o.js → p-CiWZdp48.js} +1 -1
- package/dist/{p-DaqhrFRM.js → p-Co23kQaH.js} +1 -1
- package/dist/{p-DshXkAUj.js → p-DAuO4g6g.js} +1 -1
- package/dist/{p-BF46eY8H.js → p-DELTZ9Fh.js} +1 -1
- package/dist/{p-CLm5opt9.js → p-DGXqnrKo.js} +1 -1
- package/dist/p-DObJEzlz.js +1 -0
- package/dist/{p-MnCDY1k9.js → p-DbaNvRpS.js} +1 -1
- package/dist/{p-Dvh4sPkD.js → p-Dd-ec-e0.js} +1 -1
- package/dist/{p-DhtEw_C2.js → p-DiTjFG30.js} +1 -1
- package/dist/{p-Db4qRSmH.js → p-DxX3B1f0.js} +1 -1
- package/dist/{p-B0Nc9rVM.js → p-UDG6tkD1.js} +1 -1
- package/dist/p-bhEHIxPv.js +1 -0
- package/dist/{p-BgvpzBUx.js → p-d-t7__OQ.js} +1 -1
- package/dist/p-oJFgjzK5.js +1 -0
- package/dist/p-pVSQxFDF.js +1 -0
- package/dist/{p-DGenc1qz.js → p-u06XOrpj.js} +1 -1
- package/dist/types/components/webComponents/GidsHeaderNavigation/GidsHeaderNavigation.d.ts +51 -0
- package/dist/types/components/webComponents/GidsHeaderNavigationItem/GidsHeaderNavigationItem.d.ts +42 -0
- package/dist/types/components/webComponents/GidsProfile/GidsProfile.d.ts +66 -0
- package/dist/types/components/webComponents/GidsProfileMenu/GidsProfileMenu.d.ts +29 -0
- package/dist/types/components/webComponents/GidsProfileMenuHeader/GidsProfileMenuHeader.d.ts +30 -0
- package/dist/types/components.d.ts +596 -2
- package/dist-bundled/es/gids-action-bar.js +22 -21
- package/dist-bundled/es/gids-activity-gauge.js +1 -1
- package/dist-bundled/es/gids-advanced-tooltip.js +2 -2
- package/dist-bundled/es/gids-bar-chart.js +4 -4
- package/dist-bundled/es/gids-calendar-header-panel.js +1 -1
- package/dist-bundled/es/gids-calendar-month-list.js +3 -3
- package/dist-bundled/es/gids-calendar-year-list.js +2 -2
- package/dist-bundled/es/gids-calendar.js +24 -24
- package/dist-bundled/es/gids-chart-legend-item.js +1 -1
- package/dist-bundled/es/gids-chart-legend.js +4 -4
- package/dist-bundled/es/gids-chart.js +7 -7
- package/dist-bundled/es/gids-chevron-button.js +4 -4
- package/dist-bundled/es/gids-dot.js +2 -2
- package/dist-bundled/es/gids-dropdown-field.js +9 -9
- package/dist-bundled/es/gids-dropdown-picker.js +4 -4
- package/dist-bundled/es/gids-dropdown.js +3 -3
- package/dist-bundled/es/gids-expansion-body-list-item.js +4 -4
- package/dist-bundled/es/gids-expansion-body-list.js +2 -2
- package/dist-bundled/es/gids-expansion-group.js +5 -5
- package/dist-bundled/es/gids-expansion.js +1 -1
- package/dist-bundled/es/gids-field.js +2 -2
- package/dist-bundled/es/gids-filter.js +2 -2
- package/dist-bundled/es/gids-header-navigation-item.js +6 -0
- package/dist-bundled/es/gids-header-navigation.js +134 -0
- package/dist-bundled/es/gids-icon.js +4 -4
- package/dist-bundled/es/gids-input.js +2 -2
- package/dist-bundled/es/gids-line-chart.js +3 -3
- package/dist-bundled/es/gids-md-table.js +59 -59
- package/dist-bundled/es/gids-overflow-container.js +1 -1
- package/dist-bundled/es/gids-overlay-provider.js +1 -1
- package/dist-bundled/es/gids-password-field.js +12 -12
- package/dist-bundled/es/gids-pie-chart.js +1 -1
- package/dist-bundled/es/gids-popover.js +1 -1
- package/dist-bundled/es/gids-profile-menu-header.js +6 -0
- package/dist-bundled/es/gids-profile-menu.js +6 -0
- package/dist-bundled/es/gids-profile.js +199 -0
- package/dist-bundled/es/gids-scrim.js +1 -1
- package/dist-bundled/es/gids-skeleton.js +1 -1
- package/dist-bundled/es/gids-tab-item.js +16 -36
- package/dist-bundled/es/gids-tab.js +4 -4
- package/dist-bundled/es/gids-text-field.js +6 -6
- package/dist-bundled/es/gids-toggle-button.js +1 -1
- package/dist-bundled/es/gids-tooltip.js +1 -1
- package/dist-bundled/es/gids-transfer-list.js +3 -3
- package/dist-bundled/es/p-Bs8TP3Rb-BdcS7d5q.js +20 -0
- package/dist-bundled/es/{p-9NZjfY_u-CnjUEy1y.js → p-Bw2pVReY-K9pdG-hw.js} +2 -2
- package/dist-bundled/es/{p-BtKwhIx5-DTEmfdxe.js → p-Bzjuvoza-CzNs69NV.js} +12 -12
- package/dist-bundled/es/{p-D7qanqNO-Dby5jSjA.js → p-C-HyXFGR-UnFcWLOQ.js} +6 -5
- package/dist-bundled/es/{p-Cyant-dw-Ch2zYNkx.js → p-CCpxJ8wu-CMYQqNoP.js} +6 -6
- package/dist-bundled/es/p-CXFvqDBs-offadaUn.js +27 -0
- package/dist-bundled/es/{p-DLauG0q8-CCUuzYl9.js → p-CZBiavxU-CIstIm2b.js} +9 -9
- package/dist-bundled/es/p-CcpdJCql-CkEW2RAp.js +64 -0
- package/dist-bundled/es/{p-BKIsp763-CqL9MgyZ.js → p-Chb2OeFe-DDv_WPhe.js} +1 -1
- package/dist-bundled/es/{p-Df5xaj-o-fxAXUmag.js → p-CiWZdp48-1vf7Xh2R.js} +5 -5
- package/dist-bundled/es/{p-DaqhrFRM-2PqBeu5o.js → p-Co23kQaH-QJyKkzgc.js} +3 -3
- package/dist-bundled/es/{p-DshXkAUj-DgCiQIA2.js → p-DAuO4g6g-C8miaL-N.js} +6 -6
- package/dist-bundled/es/{p-BF46eY8H-Xn8Fl9EI.js → p-DELTZ9Fh-Byr0nLtY.js} +2 -2
- package/dist-bundled/es/{p-CLm5opt9-DlxkI38w.js → p-DGXqnrKo-C7feKS94.js} +5 -5
- package/dist-bundled/es/p-DObJEzlz-tt9h5cuI.js +17 -0
- package/dist-bundled/es/{p-MnCDY1k9-CgbTyJ5R.js → p-DbaNvRpS-r7kCW1TY.js} +9 -9
- package/dist-bundled/es/{p-Dvh4sPkD-B-T5C03p.js → p-Dd-ec-e0-BqX_F6y0.js} +5 -5
- package/dist-bundled/es/{p-DhtEw_C2-D_91JSPC.js → p-DiTjFG30-CQkxfu2K.js} +2 -2
- package/dist-bundled/es/{p-Db4qRSmH-B5pzOeve.js → p-DxX3B1f0-D1URliVh.js} +5 -5
- package/dist-bundled/es/{p-B0Nc9rVM-SBit1KrF.js → p-UDG6tkD1-JTLPxkEn.js} +5 -5
- package/dist-bundled/es/p-bhEHIxPv-ujyxL30O.js +136 -0
- package/dist-bundled/es/{p-BgvpzBUx-iq-eKBVZ.js → p-d-t7__OQ-CKPQZt2t.js} +3 -3
- package/dist-bundled/es/p-oJFgjzK5-CzagP1qD.js +99 -0
- package/dist-bundled/es/{p-CZxn31uZ-BBHM983b.js → p-pVSQxFDF-CsWxUaZX.js} +10 -9
- package/dist-bundled/es/{p-DGenc1qz-CMwVEtCm.js → p-u06XOrpj-C1tNznDd.js} +6 -6
- package/dist-bundled/umd/gids-action-bar.umd.js +2 -2
- package/dist-bundled/umd/gids-activity-gauge.umd.js +1 -1
- package/dist-bundled/umd/gids-advanced-tooltip.umd.js +1 -1
- package/dist-bundled/umd/gids-bar-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-header-panel.umd.js +2 -2
- package/dist-bundled/umd/gids-calendar-month-list.umd.js +2 -2
- package/dist-bundled/umd/gids-calendar-year-list.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar.umd.js +1 -1
- package/dist-bundled/umd/gids-chart-legend-item.umd.js +1 -1
- package/dist-bundled/umd/gids-chart-legend.umd.js +1 -1
- package/dist-bundled/umd/gids-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-chevron-button.umd.js +1 -1
- package/dist-bundled/umd/gids-dot.umd.js +1 -1
- package/dist-bundled/umd/gids-dropdown-field.umd.js +2 -2
- package/dist-bundled/umd/gids-dropdown-picker.umd.js +1 -1
- package/dist-bundled/umd/gids-dropdown.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-body-list-item.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-body-list.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-group.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion.umd.js +1 -1
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-filter.umd.js +2 -2
- package/dist-bundled/umd/gids-header-navigation-item.umd.js +5 -0
- package/dist-bundled/umd/gids-header-navigation.umd.js +5 -0
- package/dist-bundled/umd/gids-icon.umd.js +1 -1
- package/dist-bundled/umd/gids-input.umd.js +2 -2
- package/dist-bundled/umd/gids-line-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-md-table.umd.js +1 -1
- package/dist-bundled/umd/gids-overflow-container.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-pie-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-popover.umd.js +1 -1
- package/dist-bundled/umd/gids-profile-menu-header.umd.js +5 -0
- package/dist-bundled/umd/gids-profile-menu.umd.js +5 -0
- package/dist-bundled/umd/gids-profile.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.umd.js +1 -1
- package/dist-bundled/umd/gids-skeleton.umd.js +1 -1
- package/dist-bundled/umd/gids-tab-item.umd.js +1 -1
- package/dist-bundled/umd/gids-tab.umd.js +1 -1
- 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/gids-tooltip.umd.js +1 -1
- package/dist-bundled/umd/gids-transfer-list.umd.js +1 -1
- package/dist-bundled/umd-complete/gids-core-web.umd.js +9 -9
- package/package.json +44 -4
- package/dist/p-474lVBcu.js +0 -1
- package/dist/p-9NZjfY_u.js +0 -1
- package/dist/p-CZxn31uZ.js +0 -1
- package/dist/p-D7qanqNO.js +0 -1
- package/dist-bundled/es/p-474lVBcu-B1f8x2o1.js +0 -31
- /package/dist-bundled/es/{p-Iqbf3Pja-DuajY4uD.js → p-BrYLEey4-DuajY4uD.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as o,H as r,h as i,d as a}from"./p-Bf3p-DY2.js";import{GidsProfileWebUtils as t}from"@ganpatiinfo/gids-web-shared";import{GidsProfileMenuHeaderCommonUtils as l}from"@ganpatiinfo/gids-core-shared";import{d as n,G as s}from"./p-oJFgjzK5.js";import{G as d}from"./p-CXFvqDBs.js";import{G as p}from"./p-D4Pimu_8.js";import{d as g}from"./p-CcpdJCql.js";const{getGidsProfileClassNames:c,getGidsProfileTextClassNames:f}=t,{getProfileHeaderMenuAvatarText:h}=l,u=o(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.expanded=!1,this.profileControlAppearance="default",this.profileControlAvatarVisible=!0,this.profileControlAvatarBadgeVisible=!0,this.profileControlBorderRadius="none",this.profileControlShadow="none",this.profileControlLeadingIconSize="sm",this.profileControlTrailingIconSize="sm",this.profileControlLeadingIconAppearance="filled",this.profileControlTrailingIconAppearance="filled",this.profileMenuItems=[],this.headerDividerVisible=!1,this.headerVisible=!1,this.listSectionDividerVisible=!1,this.isMenuExpanded=!1,this.onProfileControlPress=e=>{if(this.hasMenu()){const o=!this.isMenuExpanded;this.isMenuExpanded=o,this.onPressProfileControl&&this.onPressProfileControl({originalEvent:e,id:this.id,menuId:this?.menuId,expanded:o,profileControlTitle:this?.profileControlTitle,profileControlSupportingText:this?.profileControlSupportingText})}},this.onPressProfileMenuItem=e=>{this.isMenuExpanded=!1,this.onPressProfileMenuItem&&this.onPressProfileMenuItem({...e})},this.positionProfileMenu=()=>{const e=this.hostElement?.querySelector(".gids-profile__dropdown-menu-container");if(!e)return;const o=this.hostElement.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight;e.style.maxHeight="none";const a=e.getBoundingClientRect(),t=i-o.bottom-8,l=o.top-4,n=a.height>t&&l>t,s=n?l:t;e.style.maxHeight=a.height>s?s+"px":"none";const d=e.getBoundingClientRect();let p=o.left;p+d.width>r-4&&(p=r-d.width-4),p<4&&(p=4),e.style.left=p-o.left+"px",e.style.top=n?-d.height-4+"px":o.height+4+"px"},this.getProfileControlAvatarText=()=>{const e=this?.profileControlAvatarProps,o=this?.profileControlTitle;return e?.text??h({headerTitle:o})},this.hasHeaderItem=()=>{const e=this?.headerItem,o=this?.headerVisible;return!(!o||!(e?.avatarVisible||e?.avatarProps&&Object.keys(e).length>0||e?.headerSupportingText||e?.headerTitle))},this.hasMenu=()=>!!(this?.profileMenuItems&&this.profileMenuItems.length>0||this.hasHeaderItem()),this.handleDocumentClick=e=>{this.isMenuExpanded&&(e.composedPath().includes(this.hostElement)||(this.isMenuExpanded=!1))}}idChanged(e){this.id=e}profileControlAppearanceChanged(e){this.profileControlAppearance=e}profileControlAvatarPropsChanged(e){this.profileControlAvatarProps=e}expansionChanged(e){this.expanded=e,this.isMenuExpanded=e}profileControlAvatarVisibleChanged(e){this.profileControlAvatarVisible=e}profileControlAvatarBadgeVisibleChanged(e){this.profileControlAvatarBadgeVisible=e}profileControlBorderRadiusChanged(e){this.profileControlBorderRadius=e}profileControlShadowChanged(e){this.profileControlShadow=e}listSectionDividerVisibleChanged(e){this.listSectionDividerVisible=e}profileControlLeadingIconChanged(e){this.profileControlLeadingIcon=e}profileControlTrailingIconChanged(e){this.profileControlTrailingIcon=e}profileControlTitleChanged(e){this.profileControlTitle=e}profileControlSupportingTextChanged(e){this.profileControlSupportingText=e}headerDividerVisibleChanged(e){this.headerDividerVisible=e}headerItemChanged(e){this.headerItem=e}headerVisibleChanged(e){this.headerVisible=e}profileMenuItemsChanged(e){this.profileMenuItems=e}connectedCallback(){this.isMenuExpanded=this?.expanded??!1}componentDidLoad(){document.addEventListener("click",this.handleDocumentClick)}componentDidRender(){this.isMenuExpanded&&this.hasMenu()&&requestAnimationFrame((()=>{this.positionProfileMenu()}))}disconnectedCallback(){document.removeEventListener("click",this.handleDocumentClick)}render(){const e=this?.profileControlAppearance??"default",o=this?.profileControlAvatarProps,r=o?.badgeProps,t=this?.profileControlAvatarVisible??!1,l=this?.profileControlAvatarBadgeVisible??!1,n=this?.profileControlBorderRadius??"none",g=this?.profileControlShadow??"none",h=this?.profileControlLeadingIcon,u=this?.profileControlTrailingIcon,v=this?.profileControlTitle??"",b=this?.profileControlSupportingText??"",C=this?.profileMenuItems??[],m=this?.headerDividerVisible??!1,x=this?.headerVisible??!1,_=this?.headerItem,k=this?.listSectionDividerVisible??!1,y=this?.menuId,w=this?.isMenuExpanded??!1,I=this.hasMenu(),V=this?.profileControlLeadingIconSize??"sm",A=this?.profileControlTrailingIconSize??"sm",T=this?.profileControlLeadingIconAppearance??"filled",S=this?.profileControlTrailingIconAppearance??"filled",P=c({profileControlAppearance:e,profileControlBorderRadius:n,profileControlShadow:g,expanded:w&&I}),D=o?.size??"sm",{titleClasses:B,supportingTextClasses:z}=f({profileControlAppearance:e});let M=o?.color??"brand";return"brand"===e&&(M=o?.color??"default"),i(a,{key:"e3b93542314bfff5a8f7c901b83fb66aa6339df5",class:P,onClick:this.onProfileControlPress,"menu-expanded":w},h?i(p,{name:h,size:V,appearance:T}):void 0,i("div",{key:"4d9c9cb57ead65b8f9df399f1aca1588d34d9746",class:"gids-profile__main-container"},t?i(s,{appearance:o?.appearance??"text",color:M,size:D,text:this.getProfileControlAvatarText(),imageSrc:o?.imageSrc??"",alt:o?.alt??"alt-img",badge:l?i(d,{appearance:r?.appearance??"information",type:r?.type,count:r?.count,outline:r?.outline}):void 0}):void 0,i("div",{key:"0f77df6a414da0a0c4322aff50790354ff43d0a0",class:"gids-profile__content-container"},i("span",{key:"a5b101bb070f00b90615e5589f31db479d0c9dc2",class:B},v),i("p",{key:"d55873ea2defcd4d456a513daecc8e3e907984fe",class:z},b))),u?i(p,{name:u,size:A,appearance:S}):void 0,I&&w?i("div",{class:"gids-profile__dropdown-menu-container",id:y,role:"profilePickerbox",onClick:e=>e.stopPropagation()},i("gids-profile-menu",{headerItem:_,headerDividerVisible:m,headerVisible:x,listSectionDividerVisible:k,profileMenuItems:C,onHeaderAvatarPress:this.onHeaderAvatarPress,onHeaderTitlePress:this.onHeaderTitlePress,onHeaderSupportingTextPress:this.onHeaderSupportingTextPress,onProfileMenuItemPress:this.onPressProfileMenuItem})):void 0)}get hostElement(){return this}static get watchers(){return{id:[{idChanged:0}],profileControlAppearance:[{profileControlAppearanceChanged:0}],profileControlAvatarProps:[{profileControlAvatarPropsChanged:0}],expanded:[{expansionChanged:0}],profileControlAvatarVisible:[{profileControlAvatarVisibleChanged:0}],profileControlAvatarBadgeVisible:[{profileControlAvatarBadgeVisibleChanged:0}],profileControlBorderRadius:[{profileControlBorderRadiusChanged:0}],profileControlShadow:[{profileControlShadowChanged:0}],listSectionDividerVisible:[{listSectionDividerVisibleChanged:0}],profileControlLeadingIcon:[{profileControlLeadingIconChanged:0}],profileControlTrailingIcon:[{profileControlTrailingIconChanged:0}],profileControlTitle:[{profileControlTitleChanged:0}],profileControlSupportingText:[{profileControlSupportingTextChanged:0}],headerDividerVisible:[{headerDividerVisibleChanged:0}],headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}}static get style(){return".gids-profile{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--gids-gap-150);cursor:pointer;background-color:var(--gids-color-background-neutral-default);padding:var(--gids-padding-vertical-edge-to-element-150) var(--gids-padding-horizontal-edge-to-element-200);--gidsIcon-color:var(--gids-color-icon-subtle);border-radius:var(--gids-border-radius-none)}.gids-profile:hover{background-color:var(--gids-color-background-neutral-hovered)}.gids-profile:active{background-color:var(--gids-color-background-neutral-pressed)}.gids-profile__main-container{display:flex;align-items:center;flex:1;gap:var(--gids-gap-100)}.gids-profile__content-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.gids-profile__title-typography{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-profile__supporting-text-typography{margin:0;padding:0;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-profile__title-default{color:var(--gids-color-text-default)}.gids-profile__supporting-text-default{color:var(--gids-color-text-subtlest)}.gids-profile__title-brand{color:var(--gids-color-text-default)}.gids-profile__supporting-text-brand{color:var(--gids-color-text-subtlest)}.gids-profile__title-subtle{color:var(--gids-color-text-default)}.gids-profile__supporting-text-subtle{color:var(--gids-color-text-subtlest)}.gids-profile__title-positive{color:var(--gids-color-text-default)}.gids-profile__supporting-text-positive{color:var(--gids-color-text-subtlest)}.gids-profile__title-information{color:var(--gids-color-text-default)}.gids-profile__supporting-text-information{color:var(--gids-color-text-subtlest)}.gids-profile__title-warning{color:var(--gids-color-text-default)}.gids-profile__supporting-text-warning{color:var(--gids-color-text-subtlest)}.gids-profile__title-danger{color:var(--gids-color-text-default)}.gids-profile__supporting-text-danger{color:var(--gids-color-text-subtlest)}.gids-profile--appearance-brand{background-color:var(--gids-color-background-brand-subtlest-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-brand:hover{background-color:var(--gids-color-background-brand-subtlest-hovered)}.gids-profile--appearance-brand:active{background-color:var(--gids-color-background-brand-subtlest-pressed)}.gids-profile--appearance-danger{background-color:var(--gids-color-background-danger-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-danger:hover{background-color:var(--gids-color-background-danger-hovered)}.gids-profile--appearance-danger:active{background-color:var(--gids-color-background-danger-pressed)}.gids-profile--appearance-information{background-color:var(--gids-color-background-information-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-information:hover{background-color:var(--gids-color-background-information-hovered)}.gids-profile--appearance-information:active{background-color:var(--gids-color-background-information-pressed)}.gids-profile--appearance-positive{background-color:var(--gids-color-background-positive-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-positive:hover{background-color:var(--gids-color-background-positive-hovered)}.gids-profile--appearance-positive:active{background-color:var(--gids-color-background-positive-pressed)}.gids-profile--appearance-subtle{background-color:var(--gids-color-background-neutral-subtle-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-subtle:hover{background-color:var(--gids-color-background-neutral-subtle-hovered)}.gids-profile--appearance-subtle:active{background-color:var(--gids-color-background-neutral-subtle-pressed)}.gids-profile--appearance-warning{background-color:var(--gids-color-background-warning-default);--gidsIcon-color:var(--gids-color-icon-subtle)}.gids-profile--appearance-warning:hover{background-color:var(--gids-color-background-warning-hovered)}.gids-profile--appearance-warning:active{background-color:var(--gids-color-background-warning-pressed)}.gids-profile--border-radius-sm{border-radius:var(--gids-border-radius-sm)}.gids-profile--border-radius-md{border-radius:var(--gids-border-radius-md)}.gids-profile--border-radius-lg{border-radius:var(--gids-border-radius-lg)}.gids-profile--border-radius-full{border-radius:var(--gids-border-radius-full)}.gids-profile--shadow-overflow{box-shadow:var(--gids-elevation-shadow-overflow)}.gids-profile--shadow-overlay{box-shadow:var(--gids-elevation-shadow-overlay)}.gids-profile--shadow-raised{box-shadow:var(--gids-elevation-shadow-raised)}.gids-profile__dropdown-menu-container{position:absolute;left: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;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-profile__dropdown-menu-container>*{flex-shrink:0}.gids-profile--expanded .gids-profile__dropdown-menu-container{display:flex}.gids-profile--expanded .gids-profile__chevron{transform:rotate(180deg)}"}},[0,"gids-profile",{id:[1],menuId:[1,"menu-id"],expanded:[4],profileControlAppearance:[1,"profile-control-appearance"],profileControlAvatarProps:[16],profileControlAvatarVisible:[4,"profile-control-avatar-visible"],profileControlAvatarBadgeVisible:[4,"profile-control-avatar-badge-visible"],profileControlBorderRadius:[1,"profile-control-border-radius"],profileControlShadow:[1,"profile-control-shadow"],profileControlLeadingIcon:[1,"profile-control-leading-icon"],profileControlTrailingIcon:[1,"profile-control-trailing-icon"],profileControlLeadingIconSize:[1,"profile-control-leading-icon-size"],profileControlTrailingIconSize:[1,"profile-control-trailing-icon-size"],profileControlLeadingIconAppearance:[1,"profile-control-leading-icon-appearance"],profileControlTrailingIconAppearance:[1,"profile-control-trailing-icon-appearance"],profileControlTitle:[1,"profile-control-title"],profileControlSupportingText:[1,"profile-control-supporting-text"],profileMenuItems:[16],headerDividerVisible:[4,"header-divider-visible"],headerVisible:[4,"header-visible"],headerItem:[16],listSectionDividerVisible:[4,"list-section-divider-visible"],onHeaderAvatarPress:[16],onHeaderTitlePress:[16],onHeaderSupportingTextPress:[16],onProfileMenuItemPress:[16],onPressProfileControl:[16],isMenuExpanded:[32]},void 0,{id:[{idChanged:0}],profileControlAppearance:[{profileControlAppearanceChanged:0}],profileControlAvatarProps:[{profileControlAvatarPropsChanged:0}],expanded:[{expansionChanged:0}],profileControlAvatarVisible:[{profileControlAvatarVisibleChanged:0}],profileControlAvatarBadgeVisible:[{profileControlAvatarBadgeVisibleChanged:0}],profileControlBorderRadius:[{profileControlBorderRadiusChanged:0}],profileControlShadow:[{profileControlShadowChanged:0}],listSectionDividerVisible:[{listSectionDividerVisibleChanged:0}],profileControlLeadingIcon:[{profileControlLeadingIconChanged:0}],profileControlTrailingIcon:[{profileControlTrailingIconChanged:0}],profileControlTitle:[{profileControlTitleChanged:0}],profileControlSupportingText:[{profileControlSupportingTextChanged:0}],headerDividerVisible:[{headerDividerVisibleChanged:0}],headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["gids-profile","gids-profile-menu","gids-profile-menu-header"].forEach((o=>{switch(o){case"gids-profile":customElements.get(e(o))||customElements.define(e(o),u);break;case"gids-profile-menu":customElements.get(e(o))||g();break;case"gids-profile-menu-header":customElements.get(e(o))||n()}}))}v();const b=u,C=v;export{b as GidsProfile,C as defineCustomElement}
|
package/dist/gids-scrim.d.ts
CHANGED
package/dist/gids-scrim.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as
|
|
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:"dfe5f3ca193fe3c81b79d43391052b06103de249",class:this.activeClasses,part:"root"},a("slot",{key:"ae8ccbb1edf80ba2913c0af0bf06674a81e9e679"}))}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}
|
package/dist/gids-skeleton.d.ts
CHANGED
package/dist/gids-skeleton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as n,h as i,d as
|
|
1
|
+
import{t as e,p as t,H as n,h as i,d as s}from"./p-Bf3p-DY2.js";import{GidsSkeletonWebUtils as a}from"@ganpatiinfo/gids-web-shared";const{getSkeletonBaseClassNames:o}=a,r=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.variant="text",this.animation="none"}getDimension(e){if(null!=e)return"number"==typeof e?e+"px":e}getStyle(){const e={},t=this.getDimension(this.width),n=this.getDimension(this.height);return void 0!==t&&(e.width=t),void 0!==n&&(e.height=n),e}render(){const e=o({variant:this.variant??"text",animation:this.animation??"none"});return i(s,{key:"08f348685310371a41275cc52d9142b2bc50c01e",class:e,style:this.getStyle(),"aria-hidden":"true"})}static get style(){return'gids-skeleton,.gids-skeleton-host{--gidsSkeleton-background:var( --gids-color-background-accent-9-subtle-default );--gidsSkeleton-wave-background:linear-gradient( 90deg, transparent 0%, var(--gids-color-background-accent-9-subtler-default) 50%, transparent 100% );--gidsSkeleton-text-border-radius:var(--gids-border-radius-sm);--gidsSkeleton-border-radius:var(--gids-border-radius-md);display:inline-block;position:relative;vertical-align:middle;background-color:var(--gidsSkeleton-background);overflow:hidden;width:auto;height:auto}.gids-skeleton--variant-text{border-radius:var(--gidsSkeleton-text-border-radius);min-height:1.2em;transform:scaleY(0.6);transform-origin:0 50%}.gids-skeleton--variant-circular{border-radius:100% !important;aspect-ratio:1/1}.gids-skeleton--variant-rectangular{border-radius:0}.gids-skeleton--variant-rounded{border-radius:var(--gidsSkeleton-border-radius)}.gids-skeleton--animation-none{animation:none}.gids-skeleton--animation-pulse{animation:gids-skeleton-pulse 1.5s ease-in-out infinite}.gids-skeleton--animation-wave::after{content:"";position:absolute;inset:0;width:100%;height:100%;background:var(--gidsSkeleton-wave-background);transform:translateX(-100%);animation:gids-skeleton-wave 1.6s linear infinite}@keyframes gids-skeleton-pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes gids-skeleton-wave{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}@media (prefers-reduced-motion: reduce){.gids-skeleton--animation-pulse{animation:none}.gids-skeleton--animation-wave::after{animation:none}}'}},[0,"gids-skeleton",{variant:[1],animation:[1],width:[8],height:[8]}]);function d(){"undefined"!=typeof customElements&&["gids-skeleton"].forEach((t=>{"gids-skeleton"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}d();const l=r,g=d;export{l as GidsSkeleton,g as defineCustomElement}
|
package/dist/gids-snackbar.d.ts
CHANGED
package/dist/gids-tab-item.d.ts
CHANGED
package/dist/gids-tab-item.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e,p as r,H as a,h as i,d as o}from"./p-Bf3p-DY2.js";import{GidsTabItemWebUtils as t}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-CXFvqDBs.js";const{getGidsTabItemClassNames:c}=t,s=r(class extends a{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 e=c({appearance:this.appearance,width:this.width,active:this.active}),r=this.hasTrailingIcon,a=this.badgeVisible,t="primary"===this.appearance&&this.active?"inverse":this.badgeAppearance??"information",s=this.label;return i(o,{key:"77199a879f06e13e122300708079ec317e0b2054",class:e,onClick:this.handleHostClick},this.hasLeadingIcon?i("slot",{name:"leadingIconTabItem"}):void 0,s&&""!==s?i("span",{class:"gids-tab-item__label"},s&&""!==s?s:void 0,a?i(d,{appearance:t,type:this.badgeType,count:this.badgeCount}):void 0):void 0,r?i("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);white-space:nowrap;flex-shrink:0;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;flex:1;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 n(){"undefined"!=typeof customElements&&["gids-tab-item"].forEach((r=>{"gids-tab-item"===r&&(customElements.get(e(r))||customElements.define(e(r),s))}))}n();const g=s,l=n;export{g as GidsTabItem,l as defineCustomElement}
|
package/dist/gids-tab.d.ts
CHANGED
package/dist/gids-tab.js
CHANGED
|
@@ -1 +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:"
|
|
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:"5354ec9e19dda3898ad0cf9ef533b1ea58200677",class:e},i("slot",{key:"676abaabb312f31ccf02c88e260930b052e88ae4"}))}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);overflow-y:hidden;overflow-x:scroll}.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,l=c;export{r as GidsTab,l as defineCustomElement}
|
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 n}from"./p-Bf3p-DY2.js";import{GidsTextFieldCommonUtils as l}from"@ganpatiinfo/gids-core-shared";import{generateId as
|
|
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 c}from"./p-DbaNvRpS.js";import{d as b}from"./p-u06XOrpj.js";const{formatCharCount:f}=l,{inputToGidsFieldStatus:p}=r,m=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:"755613fad9d6baa0ab16ca275c03bd2706267ae7",disabled:this.disabled,count:f(this.value?.length,this.maxLength),helperText:this.helperText,statusText:this.statusText,status:p(this.status)},n(h,{key:"718e5db74be209992a9619961900d0733cc60d7c",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:"82856ad3d01f9169363874b85b02fa3e768cf98d",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:"3a23511b1ec0c425be03a18f43339461c86817f7",name:"leadingIcon"}),n("slot",{key:"5385e6a7e431d74f206a9c5d2ed046e27d819d63",name:"leadingAccessory"}),s&&n(u,{key:"40850120edf5cb18bb375f6b533337c382cb5c88",label:"clear text",slot:"trailingAccessory",size:"lg",onPressDismiss:this._handleDismiss}),n("slot",{key:"8bcb3c2d07ed017bba2dc6908b0f9d9fe2c83698",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),m);break;case"gids-field":customElements.get(e(t))||c();break;case"gids-input":customElements.get(e(t))||b()}}))}g();const x=m,y=g;export{x as GidsTextField,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-CZBiavxU.js";const a=o,p=s;export{a as GidsToggleButton,p as defineCustomElement}
|
package/dist/gids-tooltip.d.ts
CHANGED
package/dist/gids-tooltip.js
CHANGED
|
@@ -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-BBszCFSA.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:"
|
|
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-BBszCFSA.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:"c14b56ca31e84fff6f2103c65065599da3ba8bae"},e("slot",{key:"74268ecacbe214d6c36cfd5c0ce2bdb63ed7aaea"}),e("span",{key:"0c9a6e5366414ab0fd43abb7e00e031b1f771171",id:"tooltip",part:"tooltip",role:"tooltip"},e("span",{key:"8dfdd09262cdf5da5a4b5bd778a9ce60d68a2cba",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{h as e,t,p as i,H as s,d as n}from"./p-Bf3p-DY2.js";import{GidsMenuGroupWebUtils as a,GidsMenuWebUtils as l,GidsCheckboxControlWebUtils as r,GidsTransferListWebUtils as d}from"@ganpatiinfo/gids-web-shared";import{G as h}from"./p-DMNS1d8v.js";import{c as o,a as g,b as m}from"./p-Iqbf3Pja.js";import{G as c}from"./p-D4Pimu_8.js";import{G as f}from"./p-UVmSPzTd.js";const{getGidsMenuGroupClassNames:p}=a,v=({type:t="no-options",supportingText:i="No options",class:s,...n},a)=>e("div",{class:p({type:t},s),...n},"loading"===t?e(h,{indeterminate:!0,size:"md"}):null,"no-options"===t?e("span",null,i):null,"default"===t&&null!=a?a:null),{getGidsMenuClassNames:u}=l,y=({heading:t,supportingText:i,level:s,supportingTextTypography:n,isHeaderDividerVisible:a=!1,class:l,...r},d)=>e("div",{class:u(l),...r},null!=t&&""!==t||null!=i&&""!==i?e(g,{heading:t,supportingText:i,level:s,supportingTextTypography:n??"eyebrow-medium"}):null,a?e("div",{class:"gids-menu__header-divider"},e(o,{orientation:"horizontal"})):void 0,null!=d?e("div",{class:"gids-menu__children"},d):null),{getGidsCheckboxControlClassNames:L}=r,b=({checked:t,defaultChecked:i,disabled:s,indeterminate:n,inputId:a,name:l,value:r,required:d,onChange:h,class:o,...g})=>e("span",{class:L(o),...g},e("input",{class:"gids-checkbox-control__input",type:"checkbox",disabled:s,checked:t,defaultChecked:i,required:d,indeterminate:n,value:r,id:a,name:l,onChange:h}),e(c,{class:"gids-checkbox-control__check",name:"checkmark",alt:"",size:"sm"}),e(c,{class:"gids-checkbox-control__minus",name:"minus",alt:"",size:"sm"})),{getGidsTransferListClassNames:x}=d,_=i(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.leftListHeading="Choices",this.rightListHeading="Choosen",this.moveAllVisible=!1,this.transferListType="basic",this.leftListItems=[],this.rightListItems=[],this.listsMaxHeight="200px",this.leftListItemsState=[],this.rightListItemsState=[],this.tempLeftListItemsState=[],this.tempRightListItemsState=[]}handleListsMaxHeightChange(e){this.listsMaxHeight=e}handleLeftListHeadingChange(e){this.leftListHeading=e}handleRightListHeadingChange(e){this.rightListHeading=e}handleMoveAllVisibilityChange(e){this.moveAllVisible=e}handleTransferListTypeChange(e){this.transferListType=e}handleLeftListItemsChange(e){this.leftListItems=e,this.setListItemsStates()}handleRightListItemsChange(e){this.rightListItems=e,this.setListItemsStates()}componentDidLoad(){this.setListItemsStates()}setListItemsStates(){this.leftListItemsState=this.leftListItems,this.rightListItemsState=this.rightListItems}getListHeading(e){return"left"===e?this.leftListHeading:this.rightListHeading}getListSupportingText(e){let t=this?.tempLeftListItemsState??[],i=this?.leftListItemsState??[];return"right"===e&&(t=this?.tempRightListItemsState??[],i=this?.rightListItemsState??[]),`${t.length} of ${i.length} selected`}isAllItemsSelectedInList({listSide:e}){const t=this.getStateListsItemsArr(e),i=this.getTempListsItemsArr(e);return t.length>0&&t.length===i.length}isAtleastOneItemSelectedInList({listSide:e}){const t=this.getStateListsItemsArr(e),i=this.getTempListsItemsArr(e);return i.length>0&&i.length<t.length}renderListHeading(t){if("basic"!==(this?.transferListType??"basic")){const i=this.isAllItemsSelectedInList({listSide:t}),s=this.isAtleastOneItemSelectedInList({listSide:t});return e("div",{class:"gids-transfer-list__menu-heading-container"},e(b,{checked:i||s,onChange:e=>this.selectUnselectAllItems({event:e,listSide:t}),indeterminate:s}),e("div",{class:"gids-transfer-list__menu-heading-text-content-container"},e("span",{class:"gids-transfer-list__heading-text"},this.getListHeading(t)),e("span",{class:"gids-transfer-list__heading-support-text"},this.getListSupportingText(t))))}}listItemSelection({event:e,pressedIndex:t,listSide:i}){this.selectUnselectListItem({event:e,pressedIndex:t,listSide:i})}onPressingListItem({event:e,pressedIndex:t,listSide:i}){this.listItemSelection({event:e,pressedIndex:t,listSide:i})}selectUnselectListItem({event:e,pressedIndex:t,listSide:i}){const s=this.getStateListsItemsArr(i)[t];let n=!1;if("left"===i&&s){const e=this?.tempLeftListItemsState??[],t=e.findIndex((e=>e?.id===s?.id));null!=t&&-1!==t?(e.splice(t,1),n=!1):(e.push(s),n=!0),this.tempLeftListItemsState=e,this.leftListItemsState=this?.leftListItemsState?[...this.leftListItemsState]:[]}else if("right"===i&&s){const e=this?.tempRightListItemsState??[],t=e.findIndex((e=>e?.id===s?.id));null!=t&&-1!==t?(e.splice(t,1),n=!1):(e.push(s),n=!0),this.tempRightListItemsState=e,this.rightListItemsState=this?.rightListItemsState?[...this.rightListItemsState]:[]}this.callOnTransferListSelectFunc({event:e,isSelected:n,listSide:i,selectedIndexes:[t],selectionType:"single"})}isItemSelected({id:e,listSide:t}){const i=this.getTempListsItemsArr(t);return i.length>0&&!!i.find((t=>t?.id===e))}getStateListsItemsArr(e){let t=this?.leftListItemsState??[];return"right"===e&&(t=this?.rightListItemsState??[]),t}getTempListsItemsArr(e){let t=this?.tempLeftListItemsState??[];return"right"===e&&(t=this?.tempRightListItemsState??[]),t}selectUnselectAllItems({event:e,listSide:t}){const i=this.getStateListsItemsArr(t),s=this.isAllItemsSelectedInList({listSide:t}),n=this.isAtleastOneItemSelectedInList({listSide:t});"left"===t?this.tempLeftListItemsState=s||n?[]:[...i]:this.tempRightListItemsState=s||n?[]:[...i];const a=[];s||n||i.map(((e,t)=>{a.push(t)})),this.callOnTransferListSelectFunc({event:e,isSelected:!s&&!n,listSide:t,selectedIndexes:a,selectionType:"all"})}callOnTransferListSelectFunc({event:e,isSelected:t,listSide:i,selectedIndexes:s,selectionType:n}){this.onTransferListSelect&&this.onTransferListSelect({originalEvent:e,originalLeftListItems:this?.leftListItems??[],originalRightListItems:this?.rightListItems??[],currentLeftListItems:this?.leftListItemsState??[],currentRightListItems:this?.rightListItemsState??[],leftListSelectedItems:this?.tempLeftListItemsState??[],rightListSelectedItems:this?.tempRightListItemsState??[],selectedIndexes:s,selectionType:n,listSide:i,isSelected:t})}movementButtonDisabled({listSide:e,movementType:t}){if("left"===e){const e=this?.leftListItemsState&&this.leftListItemsState.length>0?this.leftListItemsState.length:0;if("move-single"===t)return!(e>0&&(this?.tempLeftListItemsState&&this.tempLeftListItemsState.length>0?this.tempLeftListItemsState.length:0)>0);if("move-all"===t)return!(e>0)}else if("right"===e){const e=this?.rightListItemsState&&this.rightListItemsState.length>0?this.rightListItemsState.length:0;if("move-single"===t)return!(e>0&&(this?.tempRightListItemsState&&this.tempRightListItemsState.length>0?this.tempRightListItemsState.length:0)>0);if("move-all"===t)return!(e>0)}return!0}callOnTransferAction({transferTo:e,transferFrom:t,movementType:i,newTransferredItems:s}){this.onTransferAction&&this.onTransferAction({transferTo:e,transferFrom:t,originalLeftListItems:this?.leftListItems??[],originalRightListItems:this?.rightListItems??[],currentLeftListItems:this?.leftListItemsState??[],currentRightListItems:this?.rightListItemsState??[],leftListSelectedItems:this?.tempLeftListItemsState??[],rightListSelectedItems:this?.tempRightListItemsState??[],newTransferredItems:s,movementType:i})}clearListSystem({event:e,listSide:t,movementType:i}){if(console.log("event",e),console.log("listSide",t),console.log("movementType",i),!this.movementButtonDisabled({listSide:t,movementType:i}))if("left"===t)if("move-single"===i){const e=this?.tempLeftListItemsState??[],t=this?.leftListItemsState??[];if(t.length>0){const i=[];t.map((t=>{e.find((e=>e?.id===t?.id))||i.push(t)})),this.leftListItemsState=[...i]}this.tempLeftListItemsState=[]}else"move-all"===i&&(this.leftListItemsState=[],this.tempLeftListItemsState=[]);else if("right"===t)if("move-single"===i){const e=this?.tempRightListItemsState??[],t=this?.rightListItemsState??[];if(t.length>0){const i=[];t.map((t=>{e.find((e=>e?.id===t?.id))||i.push(t)})),this.rightListItemsState=[...i]}this.tempRightListItemsState=[]}else"move-all"===i&&(this.rightListItemsState=[],this.tempRightListItemsState=[])}moveListItems({event:e,listSide:t,movementType:i}){if(!this.movementButtonDisabled({listSide:t,movementType:i})){const s=this?.leftListItemsState??[],n=this?.rightListItemsState??[],a=this?.tempLeftListItemsState??[],l=this?.tempRightListItemsState??[];let r=[];"left"===t?"move-single"===i?(this.rightListItemsState=[...a,...n],r=[...a]):"move-all"===i&&(this.rightListItemsState=[...s,...n],r=[...s]):"right"===t&&("move-single"===i?(this.leftListItemsState=[...l,...s],r=[...l]):"move-all"===i&&(this.leftListItemsState=[...n,...s],r=[...n])),this.clearListSystem({event:e,listSide:t,movementType:i}),this.callOnTransferAction({transferTo:"left"===t?"right":"left",transferFrom:t,movementType:i,newTransferredItems:r})}}onItemsMovement({event:e,listSide:t,movementType:i}){this.moveListItems({event:e,listSide:t,movementType:i})}render(){const t=x(),i=this?.leftListItemsState??[],s=this?.rightListItemsState??[],a=this.listsMaxHeight,l=this?.transferListType??"basic";return e(n,{key:"aa8da731c2648ec4e359dbe5277fbf5947246276",class:t},e("div",{key:"6dd5eefb717c7dea19165a218354e582a21ce11e",class:"gids-transfer-list__left-container"},e(v,{key:"f89efe4c61e2b75b85b0038434b0424d23df354d",type:i.length>0?"default":"no-options"},e(y,{key:"e3812b4b78c74daa2ed206c8a6928c1fb79984b1",heading:this.renderListHeading("left"),style:{"--gidsMenuChildren-max-height":a},isHeaderDividerVisible:"basic"!==l},i.map(((t,i)=>{const s=t?.id?t.id:""+(i+1),n=this.isItemSelected({id:s,listSide:"left"});return e(m,{id:""+s,index:i,leadingAccessory:e(b,{checked:n}),selected:n,onPressListItem:e=>this.onPressingListItem({event:e,pressedIndex:i,listSide:"left"})},t?.listLabel)}))))),e("div",{key:"db9922210390697fbc27b061ec796d41cabdc430",class:"gids-transfer-list__middle-container"},e(f,{key:"3ebb8dc86a3b549091303298aeb230935ca3d03d",leadingIcon:e(c,{name:"forward"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"left",movementType:"move-all"}),onClick:e=>this.onItemsMovement({event:e,listSide:"left",movementType:"move-all"})}),e(f,{key:"56916d7cc482775f6071bbe18a0269efb65c487d",leadingIcon:e(c,{name:"chevron-right"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"left",movementType:"move-single"}),onClick:e=>this.onItemsMovement({event:e,listSide:"left",movementType:"move-single"})}),e(f,{key:"7a6eb9be1734b750131d7ab22c8bdbc3dfeed0ca",leadingIcon:e(c,{name:"chevron-left"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"right",movementType:"move-single"}),onClick:e=>this.onItemsMovement({event:e,listSide:"right",movementType:"move-single"})}),e(f,{key:"6dee55d6ee67c01d02e59b672f790261e4235445",leadingIcon:e(c,{name:"backward"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"right",movementType:"move-all"}),onClick:e=>this.onItemsMovement({event:e,listSide:"right",movementType:"move-all"})})),e("div",{key:"f58004630c591ae4e776b34751a759b508218489",class:"gids-transfer-list__right-container"},e(v,{key:"2fbdff5086fc1db0a6d7ef1373527f1d624dbdfb",type:s.length>0?"default":"no-options"},e(y,{key:"851366bf08415c614931191b0aa4dee581a559d8",heading:this.renderListHeading("right"),style:{"--gidsMenuChildren-max-height":a},isHeaderDividerVisible:"basic"!==l},s.map(((t,i)=>{const s=t?.id?t.id:""+(i+1),n=this.isItemSelected({id:s,listSide:"right"});return e(m,{id:""+s,index:i,selected:n,leadingAccessory:e(b,{checked:n}),onPressListItem:e=>this.onPressingListItem({event:e,pressedIndex:i,listSide:"right"})},t?.listLabel)}))))))}get hostElement(){return this}static get watchers(){return{listsMaxHeight:[{handleListsMaxHeightChange:0}],leftListHeading:[{handleLeftListHeadingChange:0}],rightListHeading:[{handleRightListHeadingChange:0}],moveAllVisible:[{handleMoveAllVisibilityChange:0}],transferListType:[{handleTransferListTypeChange:0}],leftListItems:[{handleLeftListItemsChange:0}],rightListItems:[{handleRightListItemsChange:0}]}}static get style(){return".gids-transfer-list{display:flex;align-items:center;justify-content:center;gap:var(--gids-gap-500)}.gids-transfer-list .gids-menu__children{max-height:var(--gidsMenuChildren-max-height);overflow:auto}.gids-transfer-list__left-container{display:flex;width:100%;flex-direction:column}.gids-transfer-list__middle-container{display:flex;width:15%;flex-direction:column;gap:var(--gids-gap-150)}.gids-transfer-list__right-container{display:flex;width:100%;flex-direction:column}.gids-transfer-list__menu-heading-container{display:flex;align-items:flex-start;justify-content:flex-start;gap:var(--gids-gap-100)}.gids-transfer-list__menu-heading-text-content-container{display:flex;flex-direction:column}.gids-transfer-list__heading-text{font-family:var(--gids-typography-heading-x-small__font-family);font-size:var(--gids-typography-heading-x-small__font-size);font-weight:var(--gids-typography-heading-x-small__font-weight);letter-spacing:var(--gids-typography-heading-x-small__letter-spacing);line-height:var(--gids-typography-heading-x-small__line-height);text-transform:var(--gids-typography-heading-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-heading-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtle)}.gids-transfer-list__heading-support-text{font-family:var(--gids-typography-paragraph-medium__font-family);font-size:var(--gids-typography-paragraph-medium__font-size);font-weight:var(--gids-typography-paragraph-medium__font-weight);letter-spacing:var(--gids-typography-paragraph-medium__letter-spacing);line-height:var(--gids-typography-paragraph-medium__line-height);text-transform:var(--gids-typography-paragraph-medium__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-medium__font-variant-caps, inherit);color:var(--gids-color-text-subtlest)}"}},[0,"gids-transfer-list",{leftListHeading:[1,"left-list-heading"],rightListHeading:[1,"right-list-heading"],moveAllVisible:[4,"move-all-visible"],transferListType:[1,"transfer-list-type"],leftListItems:[16],rightListItems:[16],listsMaxHeight:[1,"lists-max-height"],onTransferAction:[16],onTransferListSelect:[16],leftListItemsState:[32],rightListItemsState:[32],tempLeftListItemsState:[32],tempRightListItemsState:[32]},void 0,{listsMaxHeight:[{handleListsMaxHeightChange:0}],leftListHeading:[{handleLeftListHeadingChange:0}],rightListHeading:[{handleRightListHeadingChange:0}],moveAllVisible:[{handleMoveAllVisibilityChange:0}],transferListType:[{handleTransferListTypeChange:0}],leftListItems:[{handleLeftListItemsChange:0}],rightListItems:[{handleRightListItemsChange:0}]}]);function I(){"undefined"!=typeof customElements&&["gids-transfer-list"].forEach((e=>{"gids-transfer-list"===e&&(customElements.get(t(e))||customElements.define(t(e),_))}))}I();const S=_,T=I;export{S as GidsTransferList,T as defineCustomElement}
|
|
1
|
+
import{h as e,t,p as i,H as s,d as n}from"./p-Bf3p-DY2.js";import{GidsMenuGroupWebUtils as a,GidsMenuWebUtils as l,GidsCheckboxControlWebUtils as r,GidsTransferListWebUtils as h}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-DMNS1d8v.js";import{a as o,c as g,b as m}from"./p-BrYLEey4.js";import{G as c}from"./p-D4Pimu_8.js";import{G as f}from"./p-UVmSPzTd.js";const{getGidsMenuGroupClassNames:p}=a,v=({type:t="no-options",supportingText:i="No options",class:s,...n},a)=>e("div",{class:p({type:t},s),...n},"loading"===t?e(d,{indeterminate:!0,size:"md"}):null,"no-options"===t?e("span",null,i):null,"default"===t&&null!=a?a:null),{getGidsMenuClassNames:u}=l,y=({heading:t,supportingText:i,level:s,supportingTextTypography:n,isHeaderDividerVisible:a=!1,class:l,...r},h)=>e("div",{class:u(l),...r},null!=t&&""!==t||null!=i&&""!==i?e(g,{heading:t,supportingText:i,level:s,supportingTextTypography:n??"eyebrow-medium"}):null,a?e("div",{class:"gids-menu__header-divider"},e(o,{orientation:"horizontal"})):void 0,null!=h?e("div",{class:"gids-menu__children"},h):null),{getGidsCheckboxControlClassNames:L}=r,b=({checked:t,defaultChecked:i,disabled:s,indeterminate:n,inputId:a,name:l,value:r,required:h,onChange:d,class:o,...g})=>e("span",{class:L(o),...g},e("input",{class:"gids-checkbox-control__input",type:"checkbox",disabled:s,checked:t,defaultChecked:i,required:h,indeterminate:n,value:r,id:a,name:l,onChange:d}),e(c,{class:"gids-checkbox-control__check",name:"checkmark",alt:"",size:"sm"}),e(c,{class:"gids-checkbox-control__minus",name:"minus",alt:"",size:"sm"})),{getGidsTransferListClassNames:x}=h,_=i(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.leftListHeading="Choices",this.rightListHeading="Choosen",this.moveAllVisible=!1,this.transferListType="basic",this.leftListItems=[],this.rightListItems=[],this.listsMaxHeight="200px",this.leftListItemsState=[],this.rightListItemsState=[],this.tempLeftListItemsState=[],this.tempRightListItemsState=[]}handleListsMaxHeightChange(e){this.listsMaxHeight=e}handleLeftListHeadingChange(e){this.leftListHeading=e}handleRightListHeadingChange(e){this.rightListHeading=e}handleMoveAllVisibilityChange(e){this.moveAllVisible=e}handleTransferListTypeChange(e){this.transferListType=e}handleLeftListItemsChange(e){this.leftListItems=e,this.setListItemsStates()}handleRightListItemsChange(e){this.rightListItems=e,this.setListItemsStates()}componentDidLoad(){this.setListItemsStates()}setListItemsStates(){this.leftListItemsState=this.leftListItems,this.rightListItemsState=this.rightListItems}getListHeading(e){return"left"===e?this.leftListHeading:this.rightListHeading}getListSupportingText(e){let t=this?.tempLeftListItemsState??[],i=this?.leftListItemsState??[];return"right"===e&&(t=this?.tempRightListItemsState??[],i=this?.rightListItemsState??[]),`${t.length} of ${i.length} selected`}isAllItemsSelectedInList({listSide:e}){const t=this.getStateListsItemsArr(e),i=this.getTempListsItemsArr(e);return t.length>0&&t.length===i.length}isAtleastOneItemSelectedInList({listSide:e}){const t=this.getStateListsItemsArr(e),i=this.getTempListsItemsArr(e);return i.length>0&&i.length<t.length}renderListHeading(t){if("basic"!==(this?.transferListType??"basic")){const i=this.isAllItemsSelectedInList({listSide:t}),s=this.isAtleastOneItemSelectedInList({listSide:t});return e("div",{class:"gids-transfer-list__menu-heading-container"},e(b,{checked:i||s,onChange:e=>this.selectUnselectAllItems({event:e,listSide:t}),indeterminate:s}),e("div",{class:"gids-transfer-list__menu-heading-text-content-container"},e("span",{class:"gids-transfer-list__heading-text"},this.getListHeading(t)),e("span",{class:"gids-transfer-list__heading-support-text"},this.getListSupportingText(t))))}}listItemSelection({event:e,pressedIndex:t,listSide:i}){this.selectUnselectListItem({event:e,pressedIndex:t,listSide:i})}onPressingListItem({event:e,pressedIndex:t,listSide:i}){this.listItemSelection({event:e,pressedIndex:t,listSide:i})}selectUnselectListItem({event:e,pressedIndex:t,listSide:i}){const s=this.getStateListsItemsArr(i)[t];let n=!1;if("left"===i&&s){const e=this?.tempLeftListItemsState??[],t=e.findIndex((e=>e?.id===s?.id));null!=t&&-1!==t?(e.splice(t,1),n=!1):(e.push(s),n=!0),this.tempLeftListItemsState=e,this.leftListItemsState=this?.leftListItemsState?[...this.leftListItemsState]:[]}else if("right"===i&&s){const e=this?.tempRightListItemsState??[],t=e.findIndex((e=>e?.id===s?.id));null!=t&&-1!==t?(e.splice(t,1),n=!1):(e.push(s),n=!0),this.tempRightListItemsState=e,this.rightListItemsState=this?.rightListItemsState?[...this.rightListItemsState]:[]}this.callOnTransferListSelectFunc({event:e,isSelected:n,listSide:i,selectedIndexes:[t],selectionType:"single"})}isItemSelected({id:e,listSide:t}){const i=this.getTempListsItemsArr(t);return i.length>0&&!!i.find((t=>t?.id===e))}getStateListsItemsArr(e){let t=this?.leftListItemsState??[];return"right"===e&&(t=this?.rightListItemsState??[]),t}getTempListsItemsArr(e){let t=this?.tempLeftListItemsState??[];return"right"===e&&(t=this?.tempRightListItemsState??[]),t}selectUnselectAllItems({event:e,listSide:t}){const i=this.getStateListsItemsArr(t),s=this.isAllItemsSelectedInList({listSide:t}),n=this.isAtleastOneItemSelectedInList({listSide:t});"left"===t?this.tempLeftListItemsState=s||n?[]:[...i]:this.tempRightListItemsState=s||n?[]:[...i];const a=[];s||n||i.map(((e,t)=>{a.push(t)})),this.callOnTransferListSelectFunc({event:e,isSelected:!s&&!n,listSide:t,selectedIndexes:a,selectionType:"all"})}callOnTransferListSelectFunc({event:e,isSelected:t,listSide:i,selectedIndexes:s,selectionType:n}){this.onTransferListSelect&&this.onTransferListSelect({originalEvent:e,originalLeftListItems:this?.leftListItems??[],originalRightListItems:this?.rightListItems??[],currentLeftListItems:this?.leftListItemsState??[],currentRightListItems:this?.rightListItemsState??[],leftListSelectedItems:this?.tempLeftListItemsState??[],rightListSelectedItems:this?.tempRightListItemsState??[],selectedIndexes:s,selectionType:n,listSide:i,isSelected:t})}movementButtonDisabled({listSide:e,movementType:t}){if("left"===e){const e=this?.leftListItemsState&&this.leftListItemsState.length>0?this.leftListItemsState.length:0;if("move-single"===t)return!(e>0&&(this?.tempLeftListItemsState&&this.tempLeftListItemsState.length>0?this.tempLeftListItemsState.length:0)>0);if("move-all"===t)return!(e>0)}else if("right"===e){const e=this?.rightListItemsState&&this.rightListItemsState.length>0?this.rightListItemsState.length:0;if("move-single"===t)return!(e>0&&(this?.tempRightListItemsState&&this.tempRightListItemsState.length>0?this.tempRightListItemsState.length:0)>0);if("move-all"===t)return!(e>0)}return!0}callOnTransferAction({transferTo:e,transferFrom:t,movementType:i,newTransferredItems:s}){this.onTransferAction&&this.onTransferAction({transferTo:e,transferFrom:t,originalLeftListItems:this?.leftListItems??[],originalRightListItems:this?.rightListItems??[],currentLeftListItems:this?.leftListItemsState??[],currentRightListItems:this?.rightListItemsState??[],leftListSelectedItems:this?.tempLeftListItemsState??[],rightListSelectedItems:this?.tempRightListItemsState??[],newTransferredItems:s,movementType:i})}clearListSystem({event:e,listSide:t,movementType:i}){if(console.log("event",e),console.log("listSide",t),console.log("movementType",i),!this.movementButtonDisabled({listSide:t,movementType:i}))if("left"===t)if("move-single"===i){const e=this?.tempLeftListItemsState??[],t=this?.leftListItemsState??[];if(t.length>0){const i=[];t.map((t=>{e.find((e=>e?.id===t?.id))||i.push(t)})),this.leftListItemsState=[...i]}this.tempLeftListItemsState=[]}else"move-all"===i&&(this.leftListItemsState=[],this.tempLeftListItemsState=[]);else if("right"===t)if("move-single"===i){const e=this?.tempRightListItemsState??[],t=this?.rightListItemsState??[];if(t.length>0){const i=[];t.map((t=>{e.find((e=>e?.id===t?.id))||i.push(t)})),this.rightListItemsState=[...i]}this.tempRightListItemsState=[]}else"move-all"===i&&(this.rightListItemsState=[],this.tempRightListItemsState=[])}moveListItems({event:e,listSide:t,movementType:i}){if(!this.movementButtonDisabled({listSide:t,movementType:i})){const s=this?.leftListItemsState??[],n=this?.rightListItemsState??[],a=this?.tempLeftListItemsState??[],l=this?.tempRightListItemsState??[];let r=[];"left"===t?"move-single"===i?(this.rightListItemsState=[...a,...n],r=[...a]):"move-all"===i&&(this.rightListItemsState=[...s,...n],r=[...s]):"right"===t&&("move-single"===i?(this.leftListItemsState=[...l,...s],r=[...l]):"move-all"===i&&(this.leftListItemsState=[...n,...s],r=[...n])),this.clearListSystem({event:e,listSide:t,movementType:i}),this.callOnTransferAction({transferTo:"left"===t?"right":"left",transferFrom:t,movementType:i,newTransferredItems:r})}}onItemsMovement({event:e,listSide:t,movementType:i}){this.moveListItems({event:e,listSide:t,movementType:i})}render(){const t=x(),i=this?.leftListItemsState??[],s=this?.rightListItemsState??[],a=this.listsMaxHeight,l=this?.transferListType??"basic";return e(n,{key:"af23abfc25ed74922553ae77014870db27db3c65",class:t},e("div",{key:"ed2e464e328f851b78fbdf06a386ea67f04fa5f6",class:"gids-transfer-list__left-container"},e(v,{key:"f75ad46e1a6195442c9e15620f6ec5fb448c7cb8",type:i.length>0?"default":"no-options"},e(y,{key:"e0dceb20b685a58bb9cd66694e7d3ca3f10ced97",heading:this.renderListHeading("left"),style:{"--gidsMenuChildren-max-height":a},isHeaderDividerVisible:"basic"!==l},i.map(((t,i)=>{const s=t?.id?t.id:""+(i+1),n=this.isItemSelected({id:s,listSide:"left"});return e(m,{id:""+s,index:i,leadingAccessory:e(b,{checked:n}),selected:n,onPressListItem:e=>this.onPressingListItem({event:e,pressedIndex:i,listSide:"left"})},t?.listLabel)}))))),e("div",{key:"63725e88ac2db5e9277897f3ff769a55a4ed816b",class:"gids-transfer-list__middle-container"},e(f,{key:"197bf107f9f20676aaf700ec10d06a7b891043a5",leadingIcon:e(c,{name:"forward"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"left",movementType:"move-all"}),onClick:e=>this.onItemsMovement({event:e,listSide:"left",movementType:"move-all"})}),e(f,{key:"71b9b8a578b7696ad120a64b3a25d4f0e58a3a81",leadingIcon:e(c,{name:"chevron-right"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"left",movementType:"move-single"}),onClick:e=>this.onItemsMovement({event:e,listSide:"left",movementType:"move-single"})}),e(f,{key:"4031bdec3c01724f79c28e0dec5aaac74a2b0dd2",leadingIcon:e(c,{name:"chevron-left"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"right",movementType:"move-single"}),onClick:e=>this.onItemsMovement({event:e,listSide:"right",movementType:"move-single"})}),e(f,{key:"9fe6a2e20beceab388d0ae64716ee4c81d1a3c9f",leadingIcon:e(c,{name:"backward"}),appearance:"default",size:"sm",width:"full",disabled:this.movementButtonDisabled({listSide:"right",movementType:"move-all"}),onClick:e=>this.onItemsMovement({event:e,listSide:"right",movementType:"move-all"})})),e("div",{key:"ac2254cd42151847242c01873c57fe6e79e5a761",class:"gids-transfer-list__right-container"},e(v,{key:"5d15916805476badca7fbb53b8b93b58adf07c2b",type:s.length>0?"default":"no-options"},e(y,{key:"cbdb401f8e6517b2de5b7d8c12a2acc6742501b3",heading:this.renderListHeading("right"),style:{"--gidsMenuChildren-max-height":a},isHeaderDividerVisible:"basic"!==l},s.map(((t,i)=>{const s=t?.id?t.id:""+(i+1),n=this.isItemSelected({id:s,listSide:"right"});return e(m,{id:""+s,index:i,selected:n,leadingAccessory:e(b,{checked:n}),onPressListItem:e=>this.onPressingListItem({event:e,pressedIndex:i,listSide:"right"})},t?.listLabel)}))))))}get hostElement(){return this}static get watchers(){return{listsMaxHeight:[{handleListsMaxHeightChange:0}],leftListHeading:[{handleLeftListHeadingChange:0}],rightListHeading:[{handleRightListHeadingChange:0}],moveAllVisible:[{handleMoveAllVisibilityChange:0}],transferListType:[{handleTransferListTypeChange:0}],leftListItems:[{handleLeftListItemsChange:0}],rightListItems:[{handleRightListItemsChange:0}]}}static get style(){return".gids-transfer-list{display:flex;align-items:center;justify-content:center;gap:var(--gids-gap-500)}.gids-transfer-list .gids-menu__children{max-height:var(--gidsMenuChildren-max-height);overflow:auto}.gids-transfer-list__left-container{display:flex;width:100%;flex-direction:column}.gids-transfer-list__middle-container{display:flex;width:15%;flex-direction:column;gap:var(--gids-gap-150)}.gids-transfer-list__right-container{display:flex;width:100%;flex-direction:column}.gids-transfer-list__menu-heading-container{display:flex;align-items:flex-start;justify-content:flex-start;gap:var(--gids-gap-100)}.gids-transfer-list__menu-heading-text-content-container{display:flex;flex-direction:column}.gids-transfer-list__heading-text{font-family:var(--gids-typography-heading-x-small__font-family);font-size:var(--gids-typography-heading-x-small__font-size);font-weight:var(--gids-typography-heading-x-small__font-weight);letter-spacing:var(--gids-typography-heading-x-small__letter-spacing);line-height:var(--gids-typography-heading-x-small__line-height);text-transform:var(--gids-typography-heading-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-heading-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtle)}.gids-transfer-list__heading-support-text{font-family:var(--gids-typography-paragraph-medium__font-family);font-size:var(--gids-typography-paragraph-medium__font-size);font-weight:var(--gids-typography-paragraph-medium__font-weight);letter-spacing:var(--gids-typography-paragraph-medium__letter-spacing);line-height:var(--gids-typography-paragraph-medium__line-height);text-transform:var(--gids-typography-paragraph-medium__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-medium__font-variant-caps, inherit);color:var(--gids-color-text-subtlest)}"}},[0,"gids-transfer-list",{leftListHeading:[1,"left-list-heading"],rightListHeading:[1,"right-list-heading"],moveAllVisible:[4,"move-all-visible"],transferListType:[1,"transfer-list-type"],leftListItems:[16],rightListItems:[16],listsMaxHeight:[1,"lists-max-height"],onTransferAction:[16],onTransferListSelect:[16],leftListItemsState:[32],rightListItemsState:[32],tempLeftListItemsState:[32],tempRightListItemsState:[32]},void 0,{listsMaxHeight:[{handleListsMaxHeightChange:0}],leftListHeading:[{handleLeftListHeadingChange:0}],rightListHeading:[{handleRightListHeadingChange:0}],moveAllVisible:[{handleMoveAllVisibilityChange:0}],transferListType:[{handleTransferListTypeChange:0}],leftListItems:[{handleLeftListItemsChange:0}],rightListItems:[{handleRightListItemsChange:0}]}]);function I(){"undefined"!=typeof customElements&&["gids-transfer-list"].forEach((e=>{"gids-transfer-list"===e&&(customElements.get(t(e))||customElements.define(t(e),_))}))}I();const S=_,T=I;export{S as GidsTransferList,T as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,F as i}from"./p-Bf3p-DY2.js";import{GidsButtonGroupWebUtils as e,GidsHeadingWebUtils as s,GidsEditButtonWebUtils as n,GidsDividerWebUtils as l,GidsListItemWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-D4Pimu_8.js";const{getGidsButtonGroupClassNames:o}=e,r=({layout:i,class:e},s)=>t("span",{class:o({layout:i},e)},s),{getGidsHeadingClassNames:c,getGidsHeadingSupportingTextTypographyClass:g}=s,_=({heading:i,supportingText:e,level:s="section",children:n,supportingTextTypography:l,class:a})=>t("div",{class:c(a)},t("div",{class:"gids-heading__content-container"},null!=i&&""!==i?"string"==typeof i?""!==i?t("span",{class:"section"===s?"gids-heading__heading-text-section":"gids-heading__heading-text-group"},i):null:i:null,null!=e&&""!==e?"string"==typeof e?""!==e?t("span",{class:`${"section"===s?"gids-heading__supporting-text-section":"gids-heading__supporting-text-group"} ${g(l)}`},e):null:e:null),n?t(r,{layout:"wrap"},n):null),{getGidsEditButtonClassNames:p}=n,u=({disabled:i,children:e,size:s="md",editButtonType:n="add",onPressEditButton:l,class:a,...o})=>t("button",{class:p({size:s},a),...o,onClick:l,disabled:i},"custom"===n&&e?t("div",null,e):"add"===n?t("div",{class:i?"gids-edit-button__add gids-edit-button__disabled":"gids-edit-button__add"},t(d,{name:"add",appearance:"filled",size:s})):"remove"===n?t("div",{class:i?"gids-edit-button__remove gids-edit-button__disabled":"gids-edit-button__remove"},t(d,{appearance:"filled",name:"remove",size:s})):void 0),{getGidsDividerClassNames:m}=l,b=({orientation:i})=>t("hr",{class:m({orientation:i})}),{getGidsListItemClassNames:y}=a,v=({id:e,value:s,index:n,defaultSelected:l,disabled:a,selected:o,editButton:r,onPressEditButton:c,onPressListItem:g,leadingAccessory:_,leadingSupport:p,leadingParagraph:m,trailingContent:v,trailingAccessory:x,trailingSupport:f,trailingParagraph:h,divider:C,role:P="list-item-option",isPlaceholderItem:B,class:G,...z},I)=>{const T=o||l;return t("button",{type:"button",id:e,class:y({selected:T,disabled:a},G),role:P,"aria-selected":T?"true":"false",disabled:a,value:(()=>{if("string"==typeof s&&""!==s.trim())return s;const t=I;return t?(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t||"number"==typeof t?String(t):t&&"object"==typeof t&&"text"in t?t.text??"":"")).join("").trim():""})(),tabIndex:n,onClick:t=>{const i=t.currentTarget;if(!i)return;if(t.defaultPrevented||i.disabled)return;const e=new CustomEvent("onPressListItem",{bubbles:!0,composed:!0,detail:{selectedIndex:n,defaultSelected:l,isPlaceholderItem:B}});g?.(e)},"is-placeholder-item":B?"true":"false",...z},t("div",{class:"gids-list-item__main-container"},null==r||"none"===r||a?null:t(u,{size:"md",editButtonType:r,onPressEditButton:c}),null!=_?t("div",{class:a?"gids-list-item__leading-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__leading-accessory-container"},_):null,t("div",{class:"gids-list-item__middle-content-container"},t("div",{class:"gids-list-item__leading-content-container"},t(i,null,null!=I?t("span",{class:a?"gids-list-item__leading-content-label gids-list-item__text-content-disabled":"gids-list-item__leading-content-label"},I):null,t("div",{class:"gids-list-item__leading-support-content"},null!=p?"string"==typeof p?t("p",{class:a?"gids-list-item__leading-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-supporting-text"},p):p:null,null!=m?"string"==typeof m?t("p",{class:a?"gids-list-item__leading-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-paragraph-text"},m):m:null))),t("div",{class:"gids-list-item__trailing-content-container"},t(i,null,null!=v?"string"==typeof v?t("span",{class:a?"gids-list-item__trailing-content-label gids-list-item__text-content-disabled":"gids-list-item__trailing-content-label"},v):v:null,t("div",{class:"gids-list-item__trailing-support-content"},null!=f?"string"==typeof f?t("p",{class:a?"gids-list-item__trailing-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-supporting-text"},f):f:null,null!=h?"string"==typeof h?t("p",{class:a?"gids-list-item__trailing-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-paragraph-text"},h):h:null)))),T?t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},t(d,{name:"checkmark",size:"md",appearance:"regular"})):null,T||null==x?null:t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},x)),C&&!T?t("div",{class:"gids-list-item__divider"},t(b,{orientation:"horizontal"})):null)};export{r as G,
|
|
1
|
+
import{h as t,F as i}from"./p-Bf3p-DY2.js";import{GidsButtonGroupWebUtils as e,GidsHeadingWebUtils as s,GidsEditButtonWebUtils as n,GidsDividerWebUtils as l,GidsListItemWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-D4Pimu_8.js";const{getGidsButtonGroupClassNames:o}=e,r=({layout:i,class:e},s)=>t("span",{class:o({layout:i},e)},s),{getGidsHeadingClassNames:c,getGidsHeadingSupportingTextTypographyClass:g}=s,_=({heading:i,supportingText:e,level:s="section",children:n,supportingTextTypography:l,class:a})=>t("div",{class:c(a)},t("div",{class:"gids-heading__content-container"},null!=i&&""!==i?"string"==typeof i?""!==i?t("span",{class:"section"===s?"gids-heading__heading-text-section":"gids-heading__heading-text-group"},i):null:i:null,null!=e&&""!==e?"string"==typeof e?""!==e?t("span",{class:`${"section"===s?"gids-heading__supporting-text-section":"gids-heading__supporting-text-group"} ${g(l)}`},e):null:e:null),n?t(r,{layout:"wrap"},n):null),{getGidsEditButtonClassNames:p}=n,u=({disabled:i,children:e,size:s="md",editButtonType:n="add",onPressEditButton:l,class:a,...o})=>t("button",{class:p({size:s},a),...o,onClick:l,disabled:i},"custom"===n&&e?t("div",null,e):"add"===n?t("div",{class:i?"gids-edit-button__add gids-edit-button__disabled":"gids-edit-button__add"},t(d,{name:"add",appearance:"filled",size:s})):"remove"===n?t("div",{class:i?"gids-edit-button__remove gids-edit-button__disabled":"gids-edit-button__remove"},t(d,{appearance:"filled",name:"remove",size:s})):void 0),{getGidsDividerClassNames:m}=l,b=({orientation:i})=>t("hr",{class:m({orientation:i})}),{getGidsListItemClassNames:y}=a,v=({id:e,value:s,index:n,defaultSelected:l,disabled:a,selected:o,editButton:r,onPressEditButton:c,onPressListItem:g,leadingAccessory:_,leadingSupport:p,leadingParagraph:m,trailingContent:v,trailingAccessory:x,trailingSupport:f,trailingParagraph:h,divider:C,role:P="list-item-option",isPlaceholderItem:B,class:G,...z},I)=>{const T=o||l;return t("button",{type:"button",id:e,class:y({selected:T,disabled:a},G),role:P,"aria-selected":T?"true":"false",disabled:a,value:(()=>{if("string"==typeof s&&""!==s.trim())return s;const t=I;return t?(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t||"number"==typeof t?String(t):t&&"object"==typeof t&&"text"in t?t.text??"":"")).join("").trim():""})(),tabIndex:n,onClick:t=>{const i=t.currentTarget;if(!i)return;if(t.defaultPrevented||i.disabled)return;const e=new CustomEvent("onPressListItem",{bubbles:!0,composed:!0,detail:{selectedIndex:n,defaultSelected:l,isPlaceholderItem:B}});g?.(e)},"is-placeholder-item":B?"true":"false",...z},t("div",{class:"gids-list-item__main-container"},null==r||"none"===r||a?null:t(u,{size:"md",editButtonType:r,onPressEditButton:c}),null!=_?t("div",{class:a?"gids-list-item__leading-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__leading-accessory-container"},_):null,t("div",{class:"gids-list-item__middle-content-container"},t("div",{class:"gids-list-item__leading-content-container"},t(i,null,null!=I?t("span",{class:a?"gids-list-item__leading-content-label gids-list-item__text-content-disabled":"gids-list-item__leading-content-label"},I):null,t("div",{class:"gids-list-item__leading-support-content"},null!=p?"string"==typeof p?t("p",{class:a?"gids-list-item__leading-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-supporting-text"},p):p:null,null!=m?"string"==typeof m?t("p",{class:a?"gids-list-item__leading-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__leading-content-paragraph-text"},m):m:null))),t("div",{class:"gids-list-item__trailing-content-container"},t(i,null,null!=v?"string"==typeof v?t("span",{class:a?"gids-list-item__trailing-content-label gids-list-item__text-content-disabled":"gids-list-item__trailing-content-label"},v):v:null,t("div",{class:"gids-list-item__trailing-support-content"},null!=f?"string"==typeof f?t("p",{class:a?"gids-list-item__trailing-content-supporting-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-supporting-text"},f):f:null,null!=h?"string"==typeof h?t("p",{class:a?"gids-list-item__trailing-content-paragraph-text gids-list-item__text-content-disabled":"gids-list-item__trailing-content-paragraph-text"},h):h:null)))),T?t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},t(d,{name:"checkmark",size:"md",appearance:"regular"})):null,T||null==x?null:t("div",{class:a?"gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled":"gids-list-item__trailing-accessory-container"},x)),C&&!T?t("div",{class:"gids-list-item__divider"},t(b,{orientation:"horizontal"})):null)};export{r as G,b as a,v as b,_ as c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownMenuGroupWebUtils as o,GidsDropdownMenuWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as l}from"./p-DMNS1d8v.js";import{c as p}from"./p-BrYLEey4.js";const{getGidsDropdownMenuGroupClassNames:e}=o,i=({type:o="no-options",supportingText:n="No options",class:p,...i},t)=>s("div",{class:e({type:o},p),...i},"loading"===o?s(l,{indeterminate:!0,size:"md"}):null,"no-options"===o?s("span",null,n):null,"default"===o&&null!=t?t:null),{getGidsDropdownMenuClassNames:t}=n,a=({sectionLabel:o,class:n,...l},e)=>s("div",{class:t(n),...l},null!=o&&""!==o?s(p,{supportingText:o,supportingTextTypography:"eyebrow-medium"}):null,null!=e?s("div",{class:"gids-dropdown-menu__children"},e):null);export{i as G,a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,h as i,t as s}from"./p-Bf3p-DY2.js";import{GidsFilterWebUtils as l}from"@ganpatiinfo/gids-web-shared";import{G as n}from"./p-D4Pimu_8.js";import{d as h}from"./p-CZBiavxU.js";const{getGidsFilterClassNames:d}=l,r=e(class e extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.expanded=!1,this.type="none",this.filterItemType="primary",this.filterSelected=!1,this.filterDefaultSelected=!1,this.disabled=!1,this.size="sm",this.loading=!1,this.filterIndex=0,this.hasSlottedMenu=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.setupDefaultSelctedFilterEmission=()=>{this.setupDefaultSelectedNoneAllFilterEmission()},this.setupDefaultSelectedNoneAllFilterEmission=()=>{const t=`${this.filterId||"default"}_${this.value}`;if(this.filterDefaultSelected&&!e.emittedValuesTracker.has(t)&&("none"===this.type&&"secondary"===this.filterItemType||"all"===this.type)){e.emittedValuesTracker.add(t);const i={id:"1",filterId:this.filterId,value:this.value,title:this.value,disabled:this.disabled,selectedFilterMenuIndex:void 0,filterType:this.type,filterItemType:this.filterItemType,filterTitle:this.value,filterIndex:this.filterIndex,originalEvent:void 0,filterSelected:!0,filterDefaultSelected:this.filterDefaultSelected,hasFilterMenu:!1,isPlaceholderItem:!1};setTimeout((()=>{this.onFilterMenuItemChange?.(i)}),0)}},this.handleFilterPickerItemSelect=e=>{const{value:t,title:i,disabled:s,id:l,selectedIndex:n,isPlaceholderItem:h,defaultSelected:d}=e.detail;s||"string"!=typeof t||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:l,filterId:this?.filterId,value:t,title:i,disabled:!1,selectedFilterMenuIndex:n,defaultSelected:d,filterType:this.type,filterItemType:this.filterItemType,filterTitle:i,filterIndex:this.filterIndex,hasFilterMenu:!0,originalEvent:e,filterSelected:!h,isPlaceholderItem:h||!1}))},this.handleMenuClick=e=>{if(this.suppressNextMenuClickSelection)return;const t=e.target;if(!(t instanceof Element))return;const i=t.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 l=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof l||0===l.length)return;const n=i instanceof HTMLButtonElement?i.tabIndex:i.getAttribute("tabIndex")??"",h=i.getAttribute("is-placeholder-item")??"",d=i.querySelector(".gids-dropdown-item__label")||i.querySelector("span"),r=d?d.textContent?.trim():i.firstChild?.textContent?.trim()||s,a=!(!h||"true"!==h);this.applySelection({id:l,filterId:this.filterId,value:s,title:r,disabled:!1,selectedFilterMenuIndex:Number(n),defaultSelected:this.filterDefaultSelected,filterType:this.type,filterItemType:this.filterItemType,filterTitle:r,filterIndex:this.filterIndex,hasFilterMenu:!0,originalEvent:e,filterSelected:!a,isPlaceholderItem:a})},this.handleTriggerToggle=e=>{this.isInteractive()&&this.setExpandedState(!this.expanded,e)},this.handleFilterButtonClickToggle=e=>{if(!e.defaultPrevented)if(e.stopPropagation(),this.isMenuToggler())this.handleTriggerToggle(e);else{this.filterSelected=e.detail,!1===e?.detail&&this.handleFormReset(),this.applySelection({id:"1",filterId:this.filterId,value:this.value,title:this.value,disabled:this.disabled,selectedFilterMenuIndex:void 0,filterType:this.type,filterItemType:this.filterItemType,filterTitle:this.value,filterIndex:this.filterIndex,originalEvent:e,filterSelected:e.detail,filterDefaultSelected:this.filterDefaultSelected,hasFilterMenu:!1,isPlaceholderItem:!1});const t={expanded:!1,originalEvent:e};this.onToggle?.(t)}},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=this.initialValue,this.filterSelected=!1,this.isMenuToggler()?this.setExpandedState(!1):this.expanded=!1},this.setFilterDropdownPosition=()=>{if(!this.hostElement)return;const e=this.hostElement.querySelector(".gids-filter__menu");if(!e)return;const t=window.innerWidth/2,i=this.hostElement.getBoundingClientRect();i.left+i.width/2>t?e.classList.add("gids-filter__menu--align-right"):e.classList.remove("gids-filter__menu--align-right")}}static{this.emittedValuesTracker=new Set}handleExpandedChange(e){e&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}handleFilterTypeChange(e){this.type=e}handleFilterIdArrival(e){null!=e&&this.setupDefaultSelctedFilterEmission()}handleFilterSelectedChange(e){this.filterSelected=e}handleFilterDefaultSelectedChange(t){const i=`${this.filterId||"default"}_${this.value}`;t?(e.emittedValuesTracker.delete(i),this.setupDefaultSelctedFilterEmission()):e.emittedValuesTracker.delete(i)}connectedCallback(){this.attachItemListener(),this.attachFormListener()}componentDidLoad(){this.initialValue=this.value,this.evaluateSlottedMenuExistence(),null!=this.filterId&&this.setupDefaultSelctedFilterEmission()}disconnectedCallback(){this.detachItemListener(),this.detachFormListener()}getFilterButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}evaluateSlottedMenuExistence(){const e=this.hostElement.querySelector(".gids-filter__menu");if(!e)return void(this.hasSlottedMenu=!1);const t=Array.from(e.childNodes).filter((e=>e.nodeType!==Node.COMMENT_NODE&&!(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())));this.hasSlottedMenu=t.length>0}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleFilterPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleFilterPickerItemSelect),this.hasItemListener=!1)}applySelection(e){this.value=e.value,this.selectedItemTitle="string"==typeof e.title?e.title:void 0,this.clearActive(),this.isMenuToggler()?this.setExpandedState(!1,this.coerceEvent(e.originalEvent)):this.expanded=!1,this.onFilterMenuItemChange?.(e),this.hostElement.dispatchEvent(new CustomEvent("gidsFilterPickerChange",{bubbles:!0,composed:!0,detail:e}))}clearActive(){this.getItemElements().forEach((e=>e.classList.remove("gids-dropdown-item--active")))}setExpandedState(e,t){const i=Boolean(e);if(this.setFilterDropdownPosition(),i&&!this.isInteractive())return;if(this.expanded===i)return;this.expanded=i,i||(this.clearActive(),this.syncFilterDisplayValue());const s={expanded:i,originalEvent:t};this.onToggle?.(s)}syncFilterDisplayValue(){const e=this.getFilterButtonControl();e&&e.value!==(this.selectedItemTitle??"")&&(e.value=this.selectedItemTitle??"")}attachFormListener(){const e=this.hostElement.closest("form");this.patternForm!==e&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=e??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(e){if("undefined"!=typeof Event&&null!==e)return e instanceof Event?e:void 0}isMenuToggler(){return("none"===this.type||"more"===this.type)&&this.hasSlottedMenu}handleWindowClick(e){this.expanded&&(e.composedPath().includes(this.hostElement)||this.setExpandedState(!1,e))}render(){const e=this.expanded&&this.isInteractive(),t=d({expanded:e}),s=this.isMenuToggler(),l="string"==typeof this.filterPickerId?this.filterPickerId:void 0,h=l?`${l}__menu`:void 0,r=this.selectedItemTitle??this.value??"",a="more"===this.type,o="all"===this.type,c="none"===this.type;return i("div",{key:"aa082f2f93cbc5869b3acce1a99cb4c5780ae6f6",class:t,"aria-control":h??""},i("gids-toggle-button",{key:"c57d59c1948339b383efbfd8a63787a8e2535cb6",id:l,name:this.name,expanded:e,value:r,disabled:this.disabled,size:this.size,loading:this.loading,tabIndex:this.filterIndex,defaultSelected:this.filterDefaultSelected,selected:this.filterSelected,onSelect:this.handleFilterButtonClickToggle},a||o?i(n,{name:a?"options":"filter",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"}):void 0,c||o?r:void 0,s&&!a?i(n,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"trailingIcon"}):void 0),i("div",{key:"7b1e38aa0148d9d515e398348629cf6ba151811e",class:"gids-filter__menu",id:h,role:"pickerbox",onClick:this.handleMenuClick},i("slot",{key:"5d899b61e19ef3c149ec3a32c505ff3653aa5430",onSlotchange:()=>this.evaluateSlottedMenuExistence()})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],type:[{handleFilterTypeChange:0}],filterId:[{handleFilterIdArrival:0}],filterSelected:[{handleFilterSelectedChange:0}],filterDefaultSelected:[{handleFilterDefaultSelectedChange:0}]}}static get style(){return".gids-filter{position:relative}.gids-filter__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);left:0;right:auto}.gids-filter__menu--align-right{left:auto !important;right:0 !important}.gids-filter__menu>*{flex-shrink:0}.gids-filter--expanded .gids-filter__menu{display:flex}"}},[260,"gids-filter",{name:[1],filterId:[1025,"filter-id"],filterPickerId:[1,"filter-picker-id"],expanded:[4],type:[1],filterItemType:[1,"filter-item-type"],value:[1],filterSelected:[1540,"filter-selected"],filterDefaultSelected:[4,"filter-default-selected"],disabled:[4],size:[1],loading:[4],filterIndex:[2,"filter-index"],onFilterMenuItemChange:[16],onToggle:[16],selectedItemTitle:[32],hasSlottedMenu:[32]},[[8,"click","handleWindowClick"]],{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],type:[{handleFilterTypeChange:0}],filterId:[{handleFilterIdArrival:0}],filterSelected:[{handleFilterSelectedChange:0}],filterDefaultSelected:[{handleFilterDefaultSelectedChange:0}]}]);function a(){"undefined"!=typeof customElements&&["gids-filter","gids-toggle-button"].forEach((e=>{switch(e){case"gids-filter":customElements.get(s(e))||customElements.define(s(e),r);break;case"gids-toggle-button":customElements.get(s(e))||h()}}))}a();export{r as G,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as e,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-D4Pimu_8.js";import{d}from"./p-DGenc1qz.js";const{getGidsDropdownClassNames:a,getGidsChevronButtonControlClassNames:h}=n,r="gids-dropdown-item--active",c=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="default",this.expanded=!1,this.filterValue="",this.isFilterEditing=!1,this.hasLeadingIcon=!1,this.hasLeadingAccessory=!1,this.activeIndex=-1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.hasPendingControlRevalidation=!1,this.handleDropdownItemSelect=t=>{const{value:i,title:e,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof i||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:i,title:e,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const i=t.target;if(!(i instanceof Element))return;const e=i.closest(".gids-dropdown-item");if(!e||!this.hostElement.contains(e))return;if(e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return;const s=e instanceof HTMLButtonElement?e.value:e.getAttribute("value")||"";if("string"!=typeof s||0===s.length)return;const n=e instanceof HTMLButtonElement?e.id:e.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=e.getAttribute("is-placeholder-item")??"";let d=e.textContent?.trim()??"";d.endsWith("checkmark")&&(d=d.slice(0,-9).trim()),this.applySelection({id:n,value:s,title:d.trim(),disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleFilterInput=t=>{const i=t.target;this.filterValue=i?.value??"",this.isFilterEditing=!0,this.clearActive(),this.expanded||this.setExpandedState(!0,t),this.applyFilter()},this.handleInputKeyDown=t=>{if(!this.isInteractive())return;const i=t.key,e="ArrowDown"===i;if((e||"ArrowUp"===i)&&!t.metaKey&&!t.ctrlKey)return t.preventDefault(),this.expanded||this.setExpandedState(!0,t),void this.moveActive(e?1:-1);if("Home"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(0);if("End"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(this.getVisibleEnabledItems().length-1);if("Enter"===i){if(!this.expanded)return t.preventDefault(),this.setExpandedState(!0,t),void this.setActiveByIndex(0);this.selectActive()&&t.preventDefault()}},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleInputFocusAndBlur=t=>{this.hostElement.dispatchEvent(new FocusEvent(t.type,{relatedTarget:t.relatedTarget}))},this.handleInputClickToggle=t=>{t.defaultPrevented||this.handleTriggerToggle(t)},this.handleChevronClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},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 i=t.key;if("Escape"===i||"Esc"===i)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===i&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.isFilterEditing=!1,this.filterValue="",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="leadingIconDropdown"]'),this.hasLeadingAccessory=!!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]')}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}getVisibleEnabledItems(){return this.getItemElements().filter((t=>"none"!==t.style.display&&!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled")))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.emitNativeSelectionEvents(this.selectedItemTitle??""),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownChange",{bubbles:!0,composed:!0,detail:t}))}getInputControl(){return this.hostElement.querySelector(".gids-input__control")}emitNativeSelectionEvents(t){const i=this.getInputControl();i&&(i.value=t,i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),i.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}clearActive(){this.activeIndex=-1,this.getItemElements().forEach((t=>t.classList.remove(r))),this.setActiveDescendant(void 0)}setActiveByIndex(t){const i=this.getVisibleEnabledItems();if(this.getItemElements().forEach((t=>t.classList.remove(r))),0===i.length)return this.activeIndex=-1,void this.setActiveDescendant(void 0);const e=Math.max(0,Math.min(t,i.length-1)),s=i[e];if(!s)return this.activeIndex=-1,void this.setActiveDescendant(void 0);this.activeIndex=e,s.classList.add(r),s.scrollIntoView({block:"nearest"}),this.setActiveDescendant(s.id||void 0)}moveActive(t){const i=this.getVisibleEnabledItems();0!==i.length?this.setActiveByIndex(-1===this.activeIndex?t>0?0:i.length-1:(this.activeIndex+t+i.length)%i.length):this.clearActive()}selectActive(){const t=this.getVisibleEnabledItems();if(0===t.length)return!1;const i=this.activeIndex>=0?t[this.activeIndex]:t[0];return!!i&&(i.click(),this.getInputControl()?.focus(),!0)}applyFilter(){const t=this.filterValue.trim().toLowerCase();this.getItemElements().forEach((i=>{const e=(i.textContent??"").toLowerCase(),s=0===t.length||e.includes(t);i.style.display=s?"":"none"}))}setActiveDescendant(t){const i=this.getInputControl();i&&(t?i.setAttribute("aria-activedescendant",t):i.removeAttribute("aria-activedescendant"))}setExpandedState(t,i){const e=Boolean(t);e&&!this.isInteractive()||this.expanded!==e&&(this.expanded=e,e||(this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.applyFilter(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownToggle",{bubbles:!0,composed:!0,detail:{expanded:e,originalEvent:i}})))}syncInputDisplayValue(){const t=this.getInputControl();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)}get form(){return this.getInputControl()?.form??this.patternForm??null}get validity(){return this.getInputControl()?.validity??{}}get validationMessage(){return this.getInputControl()?.validationMessage??""}get willValidate(){return this.getInputControl()?.willValidate??!1}async checkValidity(){return this.getInputControl()?.checkValidity()??!0}async reportValidity(){return this.getInputControl()?.reportValidity()??!0}async setCustomValidity(t){return this.getInputControl()?.setCustomValidity(t)}isInteractive(){return!(this.disabled||this.readOnly)}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}scheduleControlRevalidation(){if(this.hasPendingControlRevalidation)return;this.hasPendingControlRevalidation=!0;const t=()=>{this.hasPendingControlRevalidation=!1,this.checkValidity()};"function"!=typeof requestAnimationFrame?t():requestAnimationFrame(t)}getEnhancedInputProps(){const t={...this.inputProps??{}};"string"==typeof t.autoComplete&&0!==t?.autoComplete?.trim?.()?.length||(t.autoComplete="off");const i=t.onInput;t.onInput=t=>{i?.(t),this.handleFilterInput(t)};const e=t.onBlur;t.onBlur=t=>{e?.(t),this.scheduleControlRevalidation()};const s=t.onKeyDown;return t.onKeyDown=t=>{s?.(t),t.defaultPrevented||this.handleInputKeyDown(t)},t}render(){const t=this.expanded&&this.isInteractive(),i=a({expanded:t}),e=this.getEnhancedInputProps(),n="string"==typeof e.id?e.id:void 0,d=n?`${n}__menu`:void 0;e.role="combobox",e["aria-expanded"]=t?"true":"false",e["aria-haspopup"]="listbox",e["aria-autocomplete"]="list",d&&(e["aria-controls"]=d);const r=this.isFilterEditing?this.filterValue:this.selectedItemTitle??this.value??"",c=t?"true":"false",l=s("button",{key:"35d89661d85a8598572ff98383f08f9626e2daf0",class:h({size:"lg"}),slot:"trailingAccessory",type:"button",onClick:this.handleChevronClickToggle,"aria-label":t?"Collapse options":"Expanded options","aria-expanded":c,"aria-haspopup":"listbox","aria-controls":d,disabled:this.disabled||this.readOnly,tabIndex:-1},s("span",{key:"61aa33caa3c33ddec50713f697c66414fb83cb9c",class:"gids-button__content"},s(o,{key:"26a64c22901fdba21daa6cad35de6991b481a5c7",name:"chevron-vertical",alt:""})));return s("div",{key:"6675e14654eb5c6bda87c6ff34633882b1e3b20e",class:i},s("gids-input",{key:"2bf2921699a55a6e67790ac15b6430755a6426e1",appearance:this.appearance,loading:this.loading,disabled:this.disabled,readOnly:this.readOnly,required:this.required,value:r,name:this.name,inputProps:e,onClick:this.handleInputClickToggle,onFocus:this.handleInputFocusAndBlur,onBlur:this.handleInputFocusAndBlur},this.hasLeadingIcon&&s("slot",{key:"69eaf25688c6d199298f8499c6a44d119189900e",name:"leadingIconDropdown",slot:"leadingIcon"}),this.hasLeadingAccessory&&s("slot",{key:"5d13d954b33acb2cd246efd5fae42c73f489137d",name:"leadingAccessoryDropdown",slot:"leadingAccessory"}),l),s("div",{key:"bd0835e11b2c9cd45ae4730144b8b218a93fca6d",class:"gids-dropdown__menu",id:d,role:"listbox",onClick:this.handleMenuClick},s("slot",{key:"e9ab0f9976cec22f1f8d149eb148f6598995104a"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}}static get style(){return'@charset "UTF-8";.gids-dropdown{position:relative}.gids-dropdown__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;min-height:55px;max-height:20rem;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__menu>*{flex-shrink:0}.gids-dropdown--expanded .gids-dropdown__menu{display:flex}.gids-dropdown__leading-icon{display:flex;align-items:center}.gids-dropdown__accessory{display:flex;align-items:center}'}},[260,"gids-dropdown",{appearance:[1],expanded:[1540],inputProps:[16],disabled:[516],readOnly:[516,"read-only"],loading:[516],value:[513],name:[1],onSelectionChange:[16],required:[4],filterValue:[32],isFilterEditing:[32],selectedItemTitle:[32],hasLeadingIcon:[32],hasLeadingAccessory:[32],checkValidity:[64],reportValidity:[64],setCustomValidity:[64]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-dropdown","gids-input"].forEach((i=>{switch(i){case"gids-dropdown":customElements.get(t(i))||customElements.define(t(i),c);break;case"gids-input":customElements.get(t(i))||d()}}))}l();export{c as G,l as d}
|
|
1
|
+
import{t,p as i,H as e,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-D4Pimu_8.js";import{d}from"./p-u06XOrpj.js";const{getGidsDropdownClassNames:a,getGidsChevronButtonControlClassNames:h}=n,r="gids-dropdown-item--active",c=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="default",this.expanded=!1,this.filterValue="",this.isFilterEditing=!1,this.hasLeadingIcon=!1,this.hasLeadingAccessory=!1,this.activeIndex=-1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.hasPendingControlRevalidation=!1,this.handleDropdownItemSelect=t=>{const{value:i,title:e,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof i||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:i,title:e,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const i=t.target;if(!(i instanceof Element))return;const e=i.closest(".gids-dropdown-item");if(!e||!this.hostElement.contains(e))return;if(e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return;const s=e instanceof HTMLButtonElement?e.value:e.getAttribute("value")||"";if("string"!=typeof s||0===s.length)return;const n=e instanceof HTMLButtonElement?e.id:e.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=e.getAttribute("is-placeholder-item")??"";let d=e.textContent?.trim()??"";d.endsWith("checkmark")&&(d=d.slice(0,-9).trim()),this.applySelection({id:n,value:s,title:d.trim(),disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleFilterInput=t=>{const i=t.target;this.filterValue=i?.value??"",this.isFilterEditing=!0,this.clearActive(),this.expanded||this.setExpandedState(!0,t),this.applyFilter()},this.handleInputKeyDown=t=>{if(!this.isInteractive())return;const i=t.key,e="ArrowDown"===i;if((e||"ArrowUp"===i)&&!t.metaKey&&!t.ctrlKey)return t.preventDefault(),this.expanded||this.setExpandedState(!0,t),void this.moveActive(e?1:-1);if("Home"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(0);if("End"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(this.getVisibleEnabledItems().length-1);if("Enter"===i){if(!this.expanded)return t.preventDefault(),this.setExpandedState(!0,t),void this.setActiveByIndex(0);this.selectActive()&&t.preventDefault()}},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleInputFocusAndBlur=t=>{this.hostElement.dispatchEvent(new FocusEvent(t.type,{relatedTarget:t.relatedTarget}))},this.handleInputClickToggle=t=>{t.defaultPrevented||this.handleTriggerToggle(t)},this.handleChevronClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},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 i=t.key;if("Escape"===i||"Esc"===i)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===i&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.isFilterEditing=!1,this.filterValue="",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="leadingIconDropdown"]'),this.hasLeadingAccessory=!!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]')}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}getVisibleEnabledItems(){return this.getItemElements().filter((t=>"none"!==t.style.display&&!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled")))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.emitNativeSelectionEvents(this.selectedItemTitle??""),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownChange",{bubbles:!0,composed:!0,detail:t}))}getInputControl(){return this.hostElement.querySelector(".gids-input__control")}emitNativeSelectionEvents(t){const i=this.getInputControl();i&&(i.value=t,i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),i.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}clearActive(){this.activeIndex=-1,this.getItemElements().forEach((t=>t.classList.remove(r))),this.setActiveDescendant(void 0)}setActiveByIndex(t){const i=this.getVisibleEnabledItems();if(this.getItemElements().forEach((t=>t.classList.remove(r))),0===i.length)return this.activeIndex=-1,void this.setActiveDescendant(void 0);const e=Math.max(0,Math.min(t,i.length-1)),s=i[e];if(!s)return this.activeIndex=-1,void this.setActiveDescendant(void 0);this.activeIndex=e,s.classList.add(r),s.scrollIntoView({block:"nearest"}),this.setActiveDescendant(s.id||void 0)}moveActive(t){const i=this.getVisibleEnabledItems();0!==i.length?this.setActiveByIndex(-1===this.activeIndex?t>0?0:i.length-1:(this.activeIndex+t+i.length)%i.length):this.clearActive()}selectActive(){const t=this.getVisibleEnabledItems();if(0===t.length)return!1;const i=this.activeIndex>=0?t[this.activeIndex]:t[0];return!!i&&(i.click(),this.getInputControl()?.focus(),!0)}applyFilter(){const t=this.filterValue.trim().toLowerCase();this.getItemElements().forEach((i=>{const e=(i.textContent??"").toLowerCase(),s=0===t.length||e.includes(t);i.style.display=s?"":"none"}))}setActiveDescendant(t){const i=this.getInputControl();i&&(t?i.setAttribute("aria-activedescendant",t):i.removeAttribute("aria-activedescendant"))}setExpandedState(t,i){const e=Boolean(t);e&&!this.isInteractive()||this.expanded!==e&&(this.expanded=e,e||(this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.applyFilter(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownToggle",{bubbles:!0,composed:!0,detail:{expanded:e,originalEvent:i}})))}syncInputDisplayValue(){const t=this.getInputControl();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)}get form(){return this.getInputControl()?.form??this.patternForm??null}get validity(){return this.getInputControl()?.validity??{}}get validationMessage(){return this.getInputControl()?.validationMessage??""}get willValidate(){return this.getInputControl()?.willValidate??!1}async checkValidity(){return this.getInputControl()?.checkValidity()??!0}async reportValidity(){return this.getInputControl()?.reportValidity()??!0}async setCustomValidity(t){return this.getInputControl()?.setCustomValidity(t)}isInteractive(){return!(this.disabled||this.readOnly)}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}scheduleControlRevalidation(){if(this.hasPendingControlRevalidation)return;this.hasPendingControlRevalidation=!0;const t=()=>{this.hasPendingControlRevalidation=!1,this.checkValidity()};"function"!=typeof requestAnimationFrame?t():requestAnimationFrame(t)}getEnhancedInputProps(){const t={...this.inputProps??{}};"string"==typeof t.autoComplete&&0!==t?.autoComplete?.trim?.()?.length||(t.autoComplete="off");const i=t.onInput;t.onInput=t=>{i?.(t),this.handleFilterInput(t)};const e=t.onBlur;t.onBlur=t=>{e?.(t),this.scheduleControlRevalidation()};const s=t.onKeyDown;return t.onKeyDown=t=>{s?.(t),t.defaultPrevented||this.handleInputKeyDown(t)},t}render(){const t=this.expanded&&this.isInteractive(),i=a({expanded:t}),e=this.getEnhancedInputProps(),n="string"==typeof e.id?e.id:void 0,d=n?`${n}__menu`:void 0;e.role="combobox",e["aria-expanded"]=t?"true":"false",e["aria-haspopup"]="listbox",e["aria-autocomplete"]="list",d&&(e["aria-controls"]=d);const r=this.isFilterEditing?this.filterValue:this.selectedItemTitle??this.value??"",c=t?"true":"false",l=s("button",{key:"a90a96c60b807126c810e515d0de46231ec72d7d",class:h({size:"lg"}),slot:"trailingAccessory",type:"button",onClick:this.handleChevronClickToggle,"aria-label":t?"Collapse options":"Expanded options","aria-expanded":c,"aria-haspopup":"listbox","aria-controls":d,disabled:this.disabled||this.readOnly,tabIndex:-1},s("span",{key:"e008d0b0d9c8adb1ead8aeff0afe9328e26b3453",class:"gids-button__content"},s(o,{key:"42f2eaef189eb3aa056c844f82606399d70bcc94",name:"chevron-vertical",alt:""})));return s("div",{key:"c835d39b7fc955ee3ab96a04b8bc8272a4c4b7c7",class:i},s("gids-input",{key:"55bebbe9b1f67e462015e9a9fad424c315ebfd84",appearance:this.appearance,loading:this.loading,disabled:this.disabled,readOnly:this.readOnly,required:this.required,value:r,name:this.name,inputProps:e,onClick:this.handleInputClickToggle,onFocus:this.handleInputFocusAndBlur,onBlur:this.handleInputFocusAndBlur},this.hasLeadingIcon&&s("slot",{key:"5a0c8330ecf583a570d856f16be4ad0eb02f294e",name:"leadingIconDropdown",slot:"leadingIcon"}),this.hasLeadingAccessory&&s("slot",{key:"62e98b44a436005202c2cd7a4dd4590110f88a4c",name:"leadingAccessoryDropdown",slot:"leadingAccessory"}),l),s("div",{key:"02654371bfa277d5ab9b9fb8d1f2d4d48c8949ec",class:"gids-dropdown__menu",id:d,role:"listbox",onClick:this.handleMenuClick},s("slot",{key:"b45d0f3182546b2704179ee0be4303c33a2ecdd8"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}}static get style(){return'@charset "UTF-8";.gids-dropdown{position:relative}.gids-dropdown__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;min-height:55px;max-height:20rem;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__menu>*{flex-shrink:0}.gids-dropdown--expanded .gids-dropdown__menu{display:flex}.gids-dropdown__leading-icon{display:flex;align-items:center}.gids-dropdown__accessory{display:flex;align-items:center}'}},[260,"gids-dropdown",{appearance:[1],expanded:[1540],inputProps:[16],disabled:[516],readOnly:[516,"read-only"],loading:[516],value:[513],name:[1],onSelectionChange:[16],required:[4],filterValue:[32],isFilterEditing:[32],selectedItemTitle:[32],hasLeadingIcon:[32],hasLeadingAccessory:[32],checkValidity:[64],reportValidity:[64],setCustomValidity:[64]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-dropdown","gids-input"].forEach((i=>{switch(i){case"gids-dropdown":customElements.get(t(i))||customElements.define(t(i),c);break;case"gids-input":customElements.get(t(i))||d()}}))}l();export{c as G,l as d}
|
|
@@ -0,0 +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{G as d,a as o}from"./p-Bs8TP3Rb.js";import{G as h}from"./p-DObJEzlz.js";const{getGidsCalendarMonthListClassNames:r,getGidsCalendarMonthListMonths:a}=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=()=>a(),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=r();return i("div",{key:"386eb44c8510a6ab48e522b8fd24b0250c3fde5d",class:t},i(d,{key:"9f311dc39039579c9e90f49c01b61259e25914e4",type:this.type,supportingText:this.noOptionsText},i(o,{key:"bafbf47ba0efd3080755f6c4e5b0b826df7b71ed",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 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
|
|
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 a=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:"0df7b2a3d5ce805afa4a3e72a868ba027272d333",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 c(){"undefined"!=typeof customElements&&["gids-icon"].forEach((s=>{"gids-icon"===s&&(customElements.get(i(s))||customElements.define(i(s),a))}))}c();export{a as G,c as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./p-Bf3p-DY2.js";import{GidsBadgeCommonUtils as e}from"@ganpatiinfo/gids-core-shared";import{nonEmpty as s,GidsBadgeWebUtils as n}from"@ganpatiinfo/gids-web-shared";const{getDisplayContent:t,shouldIncludeA11yText:i}=e,{getGidsBadgeClassNames:o}=n,p=({appearance:e,type:n,count:p,accessibleText:r,outline:l,class:c,...d})=>{const u=i(n,p,s(r));return a("span",{class:o({appearance:e,type:n,outline:l},c),...d},u&&a("span",{class:"gids-visually-hidden"},s(r)?r:p),"notification"===n?u?a("span",{"aria-hidden":"true"},t(p,r)):t(p,r):null)};export{p as G}
|
|
@@ -1 +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 d}from"./p-UVmSPzTd.js";import{g as c}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&&(this.selected=e)}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e),this.selected=e}render(){return n(a,{key:"
|
|
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 d}from"./p-UVmSPzTd.js";import{g as c}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&&(this.selected=e)}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e),this.selected=e}render(){return n(a,{key:"1983afcf383a912114f488508c106e78947258ef"},n("style",{key:"f982a6113f2fee97b24fe1253a8c4d5e472970c2"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),n(d,{key:"2cfddcc0c052d848a904edab75665bd5082b3277",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:"7537b4d1f9d6ae68a3d03ed589efe3e564281a4b"})))}_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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as i,H as t,h as s,d}from"./p-Bf3p-DY2.js";import{GidsProfileMenuWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{a as n,b as a}from"./p-BrYLEey4.js";import{G as o,a as h}from"./p-Bs8TP3Rb.js";import{d as l}from"./p-oJFgjzK5.js";const{getGidsProfileMenuClassNames:m}=r,p=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.headerVisible=!1,this.listSectionDividerVisible=!1,this.headerDividerVisible=!0,this.profileMenuItems=[],this.selectedProfileMenuItem=void 0,this.onListItemPress=({event:e,sectionIndex:i,itemIndex:t,item:s})=>{const d={...s,sectionIndex:i,itemIndex:t};this.onProfileMenuItemPress&&!this.isItemAlreadySelected(d)&&this.onProfileMenuItemPress({originalEvent:e,id:s.id,sectionIndex:i,itemIndex:t,leadingLabel:s?.leadingLabel,leadingSupport:s?.leadingSupport,trailingLabel:s?.trailingLabel,trailingSupport:s?.trailingSupport}),this.profileMenuItemSelection(d)},this.profileMenuItemSelection=e=>{e?.id&&(this.isItemAlreadySelected(e)||(this.selectedProfileMenuItem=e))},this.isItemAlreadySelected=e=>e.id===this?.selectedProfileMenuItem?.id&&e?.sectionIndex===this?.selectedProfileMenuItem?.sectionIndex&&e?.itemIndex===this?.selectedProfileMenuItem?.itemIndex,this.isThisItemSelected=e=>e?.id===this?.selectedProfileMenuItem?.id&&e?.sectionIndex===this?.selectedProfileMenuItem?.sectionIndex&&e?.itemIndex===this?.selectedProfileMenuItem?.itemIndex,this.hasHeaderItem=()=>{const e=this?.headerItem,i=this?.headerVisible;return!(!i||!(e?.avatarVisible||e?.avatarProps&&Object.keys(e).length>0||e?.headerSupportingText||e?.headerTitle))},this.hasProfileMenuItems=()=>{const e=this?.profileMenuItems??[];return!!(e.length>0&&e[0]?.items&&e[0].items.length>0||this.hasHeaderItem())}}headerItemChanged(e){this.headerItem=e}headerVisibleChanged(e){this.headerVisible=e}profileMenuItemsChanged(e){this.profileMenuItems=e}connectedCallback(){}render(){const e=this?.headerItem,i=this?.headerVisible,t=this?.headerDividerVisible,r=this?.listSectionDividerVisible,l=this?.profileMenuItems??[],p=m();return s(d,{key:"407f61b49299da79647d4896ae4aa5b5e1e47646",class:p},s(o,{key:"6fb114148ee80d37e707f6c7fe74670b6f9b5fd2",type:this.hasProfileMenuItems()?"default":"no-options"},i?s("div",{class:"gids-profile-menu__header-container"},s("gids-profile-menu-header",{...e,onHeaderAvatarPress:this.onHeaderAvatarPress,onHeaderTitlePress:this.onHeaderTitlePress,onHeaderSupportingTextPress:this.onHeaderSupportingTextPress})):void 0,t&&this.hasHeaderItem()?s("div",{class:"gids-profile-menu__header-divider-container"},s(n,null)):void 0,l.map(((e,i)=>s(h,{key:`${i+1}`,sectionLabel:e?.sectionLabel??""},(e?.items??[]).map(((e,t)=>s(a,{...e,key:`${t+1}`,id:e.id,index:t,onPressListItem:s=>this.onListItemPress({event:s,sectionIndex:i,itemIndex:t,item:e}),selected:this.isThisItemSelected({...e,sectionIndex:i,itemIndex:t})},e?.leadingLabel))),i<l.length-1&&r?s(n,null):void 0)))))}get hostElement(){return this}static get watchers(){return{headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}}static get style(){return".gids-profile-menu .gids-divider{width:100%}.gids-profile-menu__header-divider-container{width:100%;padding-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-profile-menu__header-container{display:flex;width:100%;padding:var(--gids-padding-vertical-edge-to-element-150) 0px}"}},[0,"gids-profile-menu",{headerItem:[16],headerVisible:[4,"header-visible"],listSectionDividerVisible:[4,"list-section-divider-visible"],headerDividerVisible:[4,"header-divider-visible"],profileMenuItems:[16],onHeaderAvatarPress:[16],onHeaderTitlePress:[16],onHeaderSupportingTextPress:[16],onProfileMenuItemPress:[16],selectedProfileMenuItem:[32]},void 0,{headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-profile-menu","gids-profile-menu-header"].forEach((i=>{switch(i){case"gids-profile-menu":customElements.get(e(i))||customElements.define(e(i),p);break;case"gids-profile-menu-header":customElements.get(e(i))||l()}}))}c();export{p as G,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as e,h as s,d as a}from"./p-Bf3p-DY2.js";import{GidsExpansionBodyListItemWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as n}from"./p-C2POfZhu.js";const{getGidsExpansionBodyListItemClassNames:l}=o,r=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.displayTagVisible=!1,this.displayTagColor="accent-5",this.displayTagSize="xs",this.displayTagAppearance="subtle",this.hasSubtitleItemListener=!1,this.hasSupportingTextItemListener=!1,this.handleSubtitleClick=t=>{this.applySubtitleSelection({listItemId:this.listItemId,label:this.label,subtitle:this.subtitle,supportingText:this.supportingText,listItemPressedType:"subtitle",originalEvent:t})},this.handleSupportingTextClick=t=>{this.applySupportingTextSelection({listItemId:this.listItemId,label:this.label,subtitle:this.subtitle,supportingText:this.supportingText,listItemPressedType:"supporting-text",originalEvent:t})}}handleDisplayTagVisibilityChange(t){this.displayTagVisible=t}handleDisplayTagColorChange(t){this.displayTagColor=t}handleDisplayTagSizeChange(t){this.displayTagSize=t}handleDisplayTagAppearanceChange(t){this.displayTagAppearance=t}connectedCallback(){this.attachSubtitleItemListener(),this.attachSupportingTextItemListener()}disconnectedCallback(){this.detachSubtitleItemListener(),this.detachSupportingTextItemListener()}applySubtitleSelection(t){this.onSubtitlePress&&this.onSubtitlePress(t)}applySupportingTextSelection(t){this.onSupportingTextPress&&this.onSupportingTextPress(t)}attachSubtitleItemListener(){this.hasSubtitleItemListener||(this.hostElement.addEventListener("onSubtitlePress",this.handleSubtitleClick),this.hasSubtitleItemListener=!0)}attachSupportingTextItemListener(){this.hasSupportingTextItemListener||(this.hostElement.addEventListener("onSupportingTextPress",this.handleSupportingTextClick),this.hasSupportingTextItemListener=!0)}detachSubtitleItemListener(){this.hasSubtitleItemListener&&(this.hostElement.removeEventListener("onSubtitlePress",this.handleSubtitleClick),this.hasSubtitleItemListener=!1)}detachSupportingTextItemListener(){this.hasSupportingTextItemListener&&(this.hostElement.removeEventListener("onSupportingTextPress",this.handleSupportingTextClick),this.hasSupportingTextItemListener=!1)}isValidLabel(){return!(!this?.label||""===this.label)}isValidSubtitle(){return!(!this?.subtitle||""===this.subtitle)}isValidSupportingText(){return!(!this?.supportingText||""===this.supportingText)}isDisplayTagVisible(){return!(!this.displayTagVisible||!this?.displayTagLabel||""===this.displayTagLabel)}convertTextToUppercase(t){return t&&""!==t?t.toUpperCase():""}render(){const t=l(),i=this?.label,e=this?.subtitle,o=this?.supportingText,r=this.isValidLabel(),d=this.isValidSubtitle(),p=this.isValidSupportingText(),g=this.isDisplayTagVisible(),h=this?.displayTagLabel??"";return s(a,{key:"
|
|
1
|
+
import{t,p as i,H as e,h as s,d as a}from"./p-Bf3p-DY2.js";import{GidsExpansionBodyListItemWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as n}from"./p-C2POfZhu.js";const{getGidsExpansionBodyListItemClassNames:l}=o,r=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.displayTagVisible=!1,this.displayTagColor="accent-5",this.displayTagSize="xs",this.displayTagAppearance="subtle",this.hasSubtitleItemListener=!1,this.hasSupportingTextItemListener=!1,this.handleSubtitleClick=t=>{this.applySubtitleSelection({listItemId:this.listItemId,label:this.label,subtitle:this.subtitle,supportingText:this.supportingText,listItemPressedType:"subtitle",originalEvent:t})},this.handleSupportingTextClick=t=>{this.applySupportingTextSelection({listItemId:this.listItemId,label:this.label,subtitle:this.subtitle,supportingText:this.supportingText,listItemPressedType:"supporting-text",originalEvent:t})}}handleDisplayTagVisibilityChange(t){this.displayTagVisible=t}handleDisplayTagColorChange(t){this.displayTagColor=t}handleDisplayTagSizeChange(t){this.displayTagSize=t}handleDisplayTagAppearanceChange(t){this.displayTagAppearance=t}connectedCallback(){this.attachSubtitleItemListener(),this.attachSupportingTextItemListener()}disconnectedCallback(){this.detachSubtitleItemListener(),this.detachSupportingTextItemListener()}applySubtitleSelection(t){this.onSubtitlePress&&this.onSubtitlePress(t)}applySupportingTextSelection(t){this.onSupportingTextPress&&this.onSupportingTextPress(t)}attachSubtitleItemListener(){this.hasSubtitleItemListener||(this.hostElement.addEventListener("onSubtitlePress",this.handleSubtitleClick),this.hasSubtitleItemListener=!0)}attachSupportingTextItemListener(){this.hasSupportingTextItemListener||(this.hostElement.addEventListener("onSupportingTextPress",this.handleSupportingTextClick),this.hasSupportingTextItemListener=!0)}detachSubtitleItemListener(){this.hasSubtitleItemListener&&(this.hostElement.removeEventListener("onSubtitlePress",this.handleSubtitleClick),this.hasSubtitleItemListener=!1)}detachSupportingTextItemListener(){this.hasSupportingTextItemListener&&(this.hostElement.removeEventListener("onSupportingTextPress",this.handleSupportingTextClick),this.hasSupportingTextItemListener=!1)}isValidLabel(){return!(!this?.label||""===this.label)}isValidSubtitle(){return!(!this?.subtitle||""===this.subtitle)}isValidSupportingText(){return!(!this?.supportingText||""===this.supportingText)}isDisplayTagVisible(){return!(!this.displayTagVisible||!this?.displayTagLabel||""===this.displayTagLabel)}convertTextToUppercase(t){return t&&""!==t?t.toUpperCase():""}render(){const t=l(),i=this?.label,e=this?.subtitle,o=this?.supportingText,r=this.isValidLabel(),d=this.isValidSubtitle(),p=this.isValidSupportingText(),g=this.isDisplayTagVisible(),h=this?.displayTagLabel??"";return s(a,{key:"5cb935888ba9e9fd2693caf1d4aca489f7dcb9d0",class:t},r||d||g?s("div",{class:"gids-expansion-body-list-item__primary-container"},r||g?s("div",{class:"gids-expansion-body-list-item__primary-content"},r?s("span",{class:"gids-expansion-body-list-item__label"},this.convertTextToUppercase(i)):void 0,g?s(n,{color:this.displayTagColor||"accent-5",label:h,size:this.displayTagSize,appearance:this.displayTagAppearance}):void 0):void 0,d?s("button",{type:"button",class:"gids-expansion-body-list-item__subtitle",onClick:this.handleSubtitleClick},e):void 0):void 0,p?s("div",{class:"gids-expansion-body-list-item__secondary-container"},s("button",{type:"button",class:"gids-expansion-body-list-item__supporting-text",onClick:this.handleSupportingTextClick},this.convertTextToUppercase(o))):void 0)}get hostElement(){return this}static get watchers(){return{displayTagVisible:[{handleDisplayTagVisibilityChange:0}],displayTagColor:[{handleDisplayTagColorChange:0}],displayTagSize:[{handleDisplayTagSizeChange:0}],displayTagAppearance:[{handleDisplayTagAppearanceChange:0}]}}static get style(){return'.gids-expansion-body-list-item{display:flex;flex:1;gap:var(--gids-gap-400);padding-bottom:var(--gids-padding-vertical-edge-to-element-300);position:relative;cursor:default}.gids-expansion-body-list-item::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--gids-color-border-default);transition:background 0.3s ease-in-out;z-index:1}.gids-expansion-body-list-item::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:linear-gradient(to right, transparent 0%, transparent 25%, var(--gids-color-background-selected-pressed) 45%, var(--gids-color-background-selected-pressed) 55%, transparent 75%, transparent 100%);opacity:0;transition:opacity 0.3s ease-in-out;z-index:2}.gids-expansion-body-list-item:has(.gids-expansion-body-list-item__subtitle:hover)::after{background:linear-gradient(to right, var(--gids-color-border-default) 0%, var(--gids-color-border-default) 15%, var(--gids-color-background-selected-pressed) 45%, var(--gids-color-background-selected-pressed) 70%, var(--gids-color-border-default) 90%, var(--gids-color-border-default) 100%)}.gids-expansion-body-list-item:has(.gids-expansion-body-list-item__subtitle:hover)::before{opacity:1}.gids-expansion-body-list-item__primary-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:1 0;gap:var(--gids-gap-150)}.gids-expansion-body-list-item__primary-content{display:flex;align-items:center;justify-content:center;gap:var(--gids-gap-200)}.gids-expansion-body-list-item__secondary-container{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end}.gids-expansion-body-list-item__label{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);color:var(--gids-color-text-subtle);cursor:default}.gids-expansion-body-list-item__subtitle{margin:0;padding:0;appearance:none;border:none;background:none;font-family:var(--gids-typography-label-medium__font-family);font-size:var(--gids-typography-label-medium__font-size);font-weight:var(--gids-typography-label-medium__font-weight);letter-spacing:var(--gids-typography-label-medium__letter-spacing);line-height:var(--gids-typography-label-medium__line-height);text-transform:var(--gids-typography-label-medium__text-transform, inherit);font-variant-caps:var(--gids-typography-label-medium__font-variant-caps, inherit);color:var(--gids-color-text-default);cursor:pointer}.gids-expansion-body-list-item__supporting-text{margin:0;padding:0;appearance:none;border:none;background:none;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);color:var(--gids-color-text-subtle);padding:var(--gids-padding-vertical-edge-to-element-050) var(--gids-padding-horizontal-edge-to-element-100);border-radius:var(--gids-border-radius-sm);cursor:pointer;transition:background-color 0.3s ease-in-out, color 0.3s ease-in-out}.gids-expansion-body-list-item__supporting-text:hover{background-color:var(--gids-color-background-brand-bold-hovered);color:var(--gids-color-text-inverse)}.gids-expansion-body-list-item__supporting-text:active{background-color:var(--gids-color-background-brand-bold-pressed);color:var(--gids-color-text-inverse)}'}},[0,"gids-expansion-body-list-item",{listItemId:[1,"list-item-id"],label:[1],subtitle:[1],supportingText:[1,"supporting-text"],displayTagVisible:[4,"display-tag-visible"],displayTagColor:[1,"display-tag-color"],displayTagSize:[1,"display-tag-size"],displayTagAppearance:[1,"display-tag-appearance"],displayTagLabel:[1,"display-tag-label"],onSubtitlePress:[16],onSupportingTextPress:[16]},void 0,{displayTagVisible:[{handleDisplayTagVisibilityChange:0}],displayTagColor:[{handleDisplayTagColorChange:0}],displayTagSize:[{handleDisplayTagSizeChange:0}],displayTagAppearance:[{handleDisplayTagAppearanceChange:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-expansion-body-list-item"].forEach((i=>{"gids-expansion-body-list-item"===i&&(customElements.get(t(i))||customElements.define(t(i),r))}))}d();export{r as G,d}
|