@ganpatiinfo/gids-core-web 8.2.0 → 9.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 +475 -0
- package/dist/css/index.css.map +1 -1
- package/dist/custom-elements.json +332 -0
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-overflow-container.js +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-popover.d.ts +11 -0
- package/dist/gids-popover.js +1 -0
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.d.ts +11 -0
- package/dist/gids-tooltip.js +1 -0
- package/dist/index.js +1 -1
- package/dist/p-B8kX8Vqv.js +1 -0
- package/dist/p-CFw4_-5A.js +1 -0
- package/dist/{p-Bg3lw2Ae.js → p-DvoHLz_5.js} +1 -1
- package/dist/p-a3JfEYJp.js +1 -0
- package/dist/{p-DjvDBWCb.js → p-iCAclJND.js} +1 -1
- package/dist/types/components/html/GidsButton/GidsButton.d.ts +1 -1
- package/dist/types/components/html/GidsDropdownItem/GidsDropdownItem.d.ts +9 -0
- package/dist/types/components/html/GidsDropdownMenu/GidsDropdownMenu.d.ts +6 -0
- package/dist/types/components/html/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +5 -0
- package/dist/types/components/html/GidsEditButton/GidsEditButton.d.ts +7 -0
- package/dist/types/components/html/GidsListItem/GidsListItem.d.ts +11 -0
- package/dist/types/components/html/GidsMenu/GidsMenu.d.ts +6 -0
- package/dist/types/components/html/GidsMenuGroup/GidsMenuGroup.d.ts +5 -0
- package/dist/types/components/shared/GidsFloatingElementManager.d.ts +57 -0
- package/dist/types/components/shared/GidsFloatingElementTypes.d.ts +4 -0
- package/dist/types/components/webComponents/GidsPopover/GidsPopover.d.ts +24 -0
- package/dist/types/components/webComponents/GidsTooltip/GidsTooltip.d.ts +23 -0
- package/dist/types/components.d.ts +77 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/childrenValidityUtils.d.ts +8 -0
- package/dist-bundled/es/gids-field.js +1 -1
- package/dist-bundled/es/gids-icon.js +9 -9
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-overflow-container.js +4 -4
- package/dist-bundled/es/gids-overlay-provider.js +3 -3
- package/dist-bundled/es/gids-password-field.js +19 -19
- package/dist-bundled/es/gids-popover.js +110 -0
- package/dist-bundled/es/gids-scrim.js +3 -3
- package/dist-bundled/es/gids-text-field.js +7 -7
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/gids-tooltip.js +66 -0
- package/dist-bundled/es/index.js +33 -19
- package/dist-bundled/es/p-B8kX8Vqv-trBz4jdS.js +7 -0
- package/dist-bundled/es/p-CFw4_-5A-Dzvju3VE.js +25 -0
- package/dist-bundled/es/{p-DijVkS9b-CtFkEtlE.js → p-DijVkS9b-CeV1i4T-.js} +1 -1
- package/dist-bundled/es/{p-Bg3lw2Ae-CkC8nUqv.js → p-DvoHLz_5-C5EvA91N.js} +7 -7
- package/dist-bundled/es/p-a3JfEYJp-DyhDK6VZ.js +1128 -0
- package/dist-bundled/es/{p-DjvDBWCb-C9js0PPL.js → p-iCAclJND-Bmsvd-W1.js} +10 -10
- package/dist-bundled/es/{p-veoOgDXg-DElc87c0.js → p-veoOgDXg-fRinub-C.js} +12 -5
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-popover.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.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 +5 -0
- package/dist-bundled/umd/index.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +278 -262
- package/dist/p-CWdkmFbc.js +0 -1
- package/dist-bundled/es/p-CWdkmFbc-D89ZE8Mi.js +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{autoUpdate as t,offset as i,flip as s,shift as e,arrow as n,computePosition as o,platform as h}from"@floating-ui/dom";import{G as r}from"./p-B8kX8Vqv.js";function a(t){var i;return(null==t||null==(i=t.ownerDocument)?void 0:i.defaultView)||window}const l=/transform|translate|scale|rotate|perspective|filter/,c=/paint|layout|strict|content/,u=t=>!!t&&"none"!==t;let d;function m(t){const i=(s=t,"undefined"!=typeof window&&(s instanceof Element||s instanceof a(s).Element)?a(e=t).getComputedStyle(e):t);var s,e;return u(i.transform)||u(i.translate)||u(i.scale)||u(i.rotate)||u(i.perspective)||(null==d&&(d="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),!d&&(u(i.backdropFilter)||u(i.filter)))||l.test(i.willChange||"")||c.test(i.contain||"")}function f(t){return function(t){for(let i=t;i;i=p(i))if(i instanceof Element&&"none"===getComputedStyle(i).display)return null;for(let i=p(t);i;i=p(i)){if(!(i instanceof Element))continue;const t=getComputedStyle(i);if("contents"!==t.display){if("static"!==t.position||m(t))return i;if("BODY"===i.tagName)return i}}return null}(t)}function p(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}class g{static{this.currentFloatingElements=new Map}constructor(t,i){this.el=t,this.config=i,this.offset=10,this.timeDelayBeforeFadingOut=50,this.popoverMainAxisEnabled=!0,this.currentPlacement=i.placement,this.cleanup=null}setCommonTimingConfig(){this.timeBeforeElementShows=this.config.showWithoutDelay?50:500,this.timeOfAnimation=this.config.showWithoutDelay?50:250}initialize(){this.setCommonTimingConfig(),this.floatingElement=this.el.shadowRoot?.querySelector(this.config.floatingElementSelector),this.floatingElement&&this.applyViewportMaxWidth(),this.arrowEl=!1!==this.config.showArrow&&this.config.arrowElementSelector?this.el.shadowRoot?.querySelector(this.config.arrowElementSelector):null,this.anchorElement=this.config.htmlFor?.length>0?document.getElementById(this.config.htmlFor):this.config.getAnchorElementFromSlot(this.el.shadowRoot),this.anchorElement?this.setupPositioning():console.warn("Could not determine the element associated with this floating element."+(this.config.htmlFor?.length>0?`Element with id=${this.config.htmlFor} could not be found on the DOM.`:""))}getAnchorElement(){return this.anchorElement}updateConfig(t){this.config={...this.config,...t},"showWithoutDelay"in t&&this.setCommonTimingConfig(),this.forceUpdate()}getConfig(){return this.config}getCurrentPlacement(){return this.currentPlacement||this.config.placement}reposition(){this.forceUpdate()}forceUpdate(){this.anchorElement&&this.floatingElement&&this.updatePosition()}setupPositioning(){this.anchorElement&&this.updatePosition()}setupAutoUpdate(){!this.cleanup&&this.anchorElement&&(this.cleanup=t(this.anchorElement,this.floatingElement,(()=>{this.updatePosition()}),{ancestorScroll:!0,ancestorResize:!1,elementResize:!0,layoutShift:!0,animationFrame:!1}))}cleanupAutoUpdate(){this.cleanup&&(this.cleanup(),this.cleanup=null)}updatePosition(){if(!this.anchorElement)return;const t=[i(this.offset)],a=s({mainAxis:!0,crossAxis:!this.config.lockToMainAxis&&"alignment",fallbackAxisSideDirection:"end",padding:this.offset}),l=this.config.elementType===r.POPOVER,c=e({padding:this.offset,mainAxis:this.config.elementType===r.TOOLTIP||l&&this.popoverMainAxisEnabled,crossAxis:!1});this.config.placement.includes("-")?t.push(a,c):t.push(c,a),!1!==this.config.showArrow&&this.arrowEl&&t.push(n({element:this.arrowEl,padding:this.offset})),o(this.anchorElement,this.floatingElement,{placement:this.config.placement,strategy:"fixed",middleware:t,platform:{...h,getOffsetParent:t=>h.getOffsetParent(t,f)}}).then((({x:t,y:i,middlewareData:s,placement:e})=>{if(l){const t=e.startsWith("left")||e.startsWith("right"),i=e.startsWith("top")||e.startsWith("bottom"),s=this.isAnchorInViewport(),n=!!i||(t?s:this.popoverMainAxisEnabled);if(n!==this.popoverMainAxisEnabled)return this.popoverMainAxisEnabled=n,void this.updatePosition()}this.currentPlacement=e,Object.assign(this.floatingElement.style,{left:`${t}px`,top:`${i}px`,position:"fixed",transition:`opacity ${this.timeOfAnimation}ms ease`});const n=e.split("-")[0]??"bottom",o={top:"bottom",right:"left",bottom:"top",left:"right"}[n],{arrowZIndex:h}=this.normalizeFloatingElementStacking();if(s.arrow&&this.arrowEl){const t=this.arrowEl.offsetWidth,{x:i,y:e}=s.arrow;this.arrowEl.style.borderRadius=`${["left","right"].includes(n)?"0 ":""}var(--gidsFloatingElement-tip-border-radius, 2px)${["top","bottom"].includes(n)?" 0":""}`,Object.assign(this.arrowEl.style,{left:null!==i?`${i}px`:"",top:null!==e?`${e}px`:"",right:"",bottom:"",[o]:-t/2+"px",transform:"rotate(45deg)",zIndex:`${h}`,background:"var(--gidsFloatingElement-background)"})}}))}applyViewportMaxWidth(){const t=`calc(100vw - ${2*this.offset}px)`;this.floatingElement?.style.maxWidth!==t&&(this.floatingElement.style.maxWidth=t)}normalizeFloatingElementStacking(){const t=this.floatingElement.style.zIndex||(window.getComputedStyle?.(this.floatingElement).zIndex??""),i=Number.parseInt(t,10),s=Number.isNaN(i)?-1:i-1,e=Number.isNaN(i)?s+1:i;return Number.isNaN(e)||(this.floatingElement.style.zIndex=`${e}`),Array.from(this.floatingElement.children).forEach((t=>{if(!(t instanceof HTMLElement)||t===this.arrowEl)return;const i=t.style.zIndex||(window.getComputedStyle?.(t).zIndex??""),s=Number.parseInt(i,10),n=window.getComputedStyle?.(t).position??"";(""===i||"auto"===i||Number.isNaN(s)||s<e)&&(t.style.zIndex=`${e}`,""!==n&&"static"!==n||(t.style.position="relative"))})),{contentZIndex:e,arrowZIndex:s}}hideFloatingElement(){this.floatingElement.classList.remove(this.config.visibilityClass),g.currentFloatingElements.delete(this.config.elementType)}showFloatingElement(){const t=g.currentFloatingElements.get(this.config.elementType);t&&t.hideFloatingElement(),this.floatingElement.classList.add(this.config.visibilityClass),g.currentFloatingElements.set(this.config.elementType,this)}isVisible(){return this.floatingElement.classList.contains(this.config.visibilityClass)}show(){this.setupAutoUpdate(),this.showFloatingElement()}hide(){this.cleanupAutoUpdate(),this.hideFloatingElement()}toggle(){this.isVisible()?this.hide():this.show()}showAfterDelay(){clearTimeout(this.hoverOutTimeout),this.hoverTimeout=setTimeout((()=>{this.show()}),this.timeBeforeElementShows)}hideAfterDelay(){clearTimeout(this.hoverTimeout),this.hoverOutTimeout=setTimeout((()=>{this.hide()}),this.timeDelayBeforeFadingOut)}cancelDelayedActions(){clearTimeout(this.hoverTimeout),clearTimeout(this.hoverOutTimeout)}destroy(){this.cleanupAutoUpdate(),this.cancelDelayedActions()}isAnchorInViewport(){if(!(this.anchorElement&&this.anchorElement instanceof Element))return!1;const t=this.anchorElement.getBoundingClientRect(),i=window.innerHeight||document.documentElement?.clientHeight||0,s=window.innerWidth||document.documentElement?.clientWidth||0,e=t.height/2+2*this.offset;return t.bottom>=e&&t.top<=i-e&&t.right>=0&&t.left<=s}}export{g as G}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,h as e,d as a}from"./p-ibikYq-w.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-veoOgDXg.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"a8e81000bf235a842ddf98ef3be3ff5a82201b5d"},e("div",{key:"1c940955fd104dd85a5701f553d2ac5a7ddc14c8",class:l()},e("div",{key:"62e2a77c0661fc5507fe86d5343f85351895b3e7",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"c94c3346cd083969831905e0d0a7091013d32f3d",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"ef4ba969b9ac7be32c9c88260e357661eff68d54",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"cc2ea221e9c9725193238625f571848879e5c656",class:"gids-field__control"},e("slot",{key:"8530e0748d181e0c3b90e7602545cc67b404ef02",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"654ce845b3a9b5bfe3833a8122a05f3158a43fe4",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
|
|
1
|
+
import{t,p as i,H as s,h as e,d as a}from"./p-ibikYq-w.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-veoOgDXg.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"f1c189d4ab013c55a6c4c28421a43ebb33878fed"},e("div",{key:"473d4ee6ff5c4799eb390dace343c04cdddfc959",class:l()},e("div",{key:"2c9360422392ee547c88d68251e2c2818d12df9a",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"9aeddb378b273fb98297f4d08bf63506ad12edc2",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"6408089c512c2f3a5182f26c396f21e0cd1d55e1",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"46f8ba80d3bb1b501361121a1ccf6e7aa46b6466",class:"gids-field__control"},e("slot",{key:"472a3796360ffe099e8baef78b7483da66da2f3e",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"adc16a67e0e48ac97e593ea65690db81ca1614c9",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
|
|
@@ -21,4 +21,4 @@ export type GidsButtonProps<E extends PermittedGidsButtonElements> = GidsButtonW
|
|
|
21
21
|
* @param children
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
export declare const GidsButton: <E extends PermittedGidsButtonElements = "button">({ appearance, size, destructive, loading, width, leadingIcon, trailingIcon, as, disabled, class: className, forceIconOnly, ...rest }: GidsButtonProps<E>, children: VNode[]) => VNode | VNode[];
|
|
24
|
+
export declare const GidsButton: <E extends PermittedGidsButtonElements = "button">({ appearance, size, destructive, positive, loading, width, leadingIcon, trailingIcon, as, disabled, class: className, forceIconOnly, ...rest }: GidsButtonProps<E>, children: VNode[]) => VNode | VNode[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GidsDropdownItemWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { FunctionalComponent, JSXBase, VNode } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsDropdownItemSelectEventDetail } from '@ganpatiinfo/gids-core-shared';
|
|
4
|
+
type NativeButtonProps = Omit<JSXBase.IntrinsicElements['button'], 'disabled' | 'type' | 'onClick' | 'children' | 'value'>;
|
|
5
|
+
export interface GidsDropdownItemProps extends GidsDropdownItemWebProps<VNode>, NativeButtonProps {
|
|
6
|
+
onPressDropdownItem?: (event: CustomEvent<GidsDropdownItemSelectEventDetail>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const GidsDropdownItem: FunctionalComponent<GidsDropdownItemProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionalComponent, VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { type GidsDropdownMenuWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export interface GidsDropdownMenuProps extends GidsDropdownMenuWebProps<VNode>, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'> {
|
|
5
|
+
}
|
|
6
|
+
export declare const GidsDropdownMenu: FunctionalComponent<GidsDropdownMenuProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsDropdownMenuGroupWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export type GidsDropdownMenuGroupProps = GidsDropdownMenuGroupWebProps<VNode> & Omit<JSXBase.IntrinsicElements['div'], 'onClick' | 'children'>;
|
|
5
|
+
export declare const GidsDropdownMenuGroup: FunctionalComponent<GidsDropdownMenuGroupProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsEditButtonWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export interface GidsEditButtonProps extends Omit<JSXBase.IntrinsicElements['button'], 'children' | 'onClick'>, GidsEditButtonWebProps<VNode> {
|
|
5
|
+
onPressEditButton?: (this: HTMLButtonElement, event: Event) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const GidsEditButton: FunctionalComponent<GidsEditButtonProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionalComponent, type VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsListItemWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { type JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
import { GidsListItemSelectEventDetail } from '@ganpatiinfo/gids-core-shared';
|
|
5
|
+
type NativeButtonProps = Omit<JSXBase.IntrinsicElements['button'], 'children' | 'onClick' | 'disabled' | 'type' | 'value'>;
|
|
6
|
+
export interface GidsListItemProps extends GidsListItemWebProps<VNode | string, VNode, VNode | string, VNode | string>, NativeButtonProps {
|
|
7
|
+
onPressEditButton?: (this: HTMLButtonElement, event: Event) => void;
|
|
8
|
+
onPressListItem?: (event: CustomEvent<GidsListItemSelectEventDetail>) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const GidsListItem: FunctionalComponent<GidsListItemProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionalComponent, VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsMenuWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export interface GidsMenuProps extends GidsMenuWebProps<VNode, VNode | string>, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'> {
|
|
5
|
+
}
|
|
6
|
+
export declare const GidsMenu: FunctionalComponent<GidsMenuProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsMenuGroupWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
export type GidsMenuGroupProps = GidsMenuGroupWebProps<VNode> & Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'>;
|
|
5
|
+
export declare const GidsMenuGroup: FunctionalComponent<GidsMenuGroupProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type GidsFloatingElementPlacement } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsFloatingElementType } from './GidsFloatingElementTypes.js';
|
|
3
|
+
export interface GidsFloatingElementConfig {
|
|
4
|
+
htmlFor: string;
|
|
5
|
+
placement: GidsFloatingElementPlacement;
|
|
6
|
+
showWithoutDelay: boolean;
|
|
7
|
+
floatingElementSelector: string;
|
|
8
|
+
arrowElementSelector?: string;
|
|
9
|
+
visibilityClass: string;
|
|
10
|
+
showArrow?: boolean;
|
|
11
|
+
elementType: GidsFloatingElementType;
|
|
12
|
+
lockToMainAxis?: boolean;
|
|
13
|
+
getAnchorElementFromSlot: (shadowRoot: ShadowRoot) => HTMLElement | Element | null;
|
|
14
|
+
}
|
|
15
|
+
export declare class GidsFloatingElementManager {
|
|
16
|
+
private el;
|
|
17
|
+
private config;
|
|
18
|
+
private anchorElement;
|
|
19
|
+
private floatingElement;
|
|
20
|
+
private arrowEl;
|
|
21
|
+
private hoverTimeout;
|
|
22
|
+
private hoverOutTimeout;
|
|
23
|
+
private currentPlacement;
|
|
24
|
+
private static currentFloatingElements;
|
|
25
|
+
private cleanup;
|
|
26
|
+
private offset;
|
|
27
|
+
private timeBeforeElementShows;
|
|
28
|
+
private timeOfAnimation;
|
|
29
|
+
private timeDelayBeforeFadingOut;
|
|
30
|
+
private popoverMainAxisEnabled;
|
|
31
|
+
constructor(el: Element, config: GidsFloatingElementConfig);
|
|
32
|
+
setCommonTimingConfig(): void;
|
|
33
|
+
initialize(): void;
|
|
34
|
+
getAnchorElement(): HTMLElement | Element | null | undefined;
|
|
35
|
+
updateConfig(newConfig: Partial<GidsFloatingElementConfig>): void;
|
|
36
|
+
getConfig(): GidsFloatingElementConfig;
|
|
37
|
+
getCurrentPlacement(): GidsFloatingElementPlacement;
|
|
38
|
+
reposition(): void;
|
|
39
|
+
private forceUpdate;
|
|
40
|
+
private setupPositioning;
|
|
41
|
+
private setupAutoUpdate;
|
|
42
|
+
private cleanupAutoUpdate;
|
|
43
|
+
private updatePosition;
|
|
44
|
+
private applyViewportMaxWidth;
|
|
45
|
+
private normalizeFloatingElementStacking;
|
|
46
|
+
private hideFloatingElement;
|
|
47
|
+
private showFloatingElement;
|
|
48
|
+
isVisible(): boolean;
|
|
49
|
+
show(): void;
|
|
50
|
+
hide(): void;
|
|
51
|
+
toggle(): void;
|
|
52
|
+
showAfterDelay(): void;
|
|
53
|
+
hideAfterDelay(): void;
|
|
54
|
+
cancelDelayedActions(): void;
|
|
55
|
+
destroy(): void;
|
|
56
|
+
private isAnchorInViewport;
|
|
57
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GidsFloatingElementPlacement } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsPopoverWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
export declare class GidsPopover implements GidsPopoverWebProps<HTMLElement> {
|
|
4
|
+
_el: HTMLGidsPopoverElement;
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
placement: GidsFloatingElementPlacement;
|
|
7
|
+
private floatingElementManager;
|
|
8
|
+
private previouslyFocusedElement;
|
|
9
|
+
private focusableElements;
|
|
10
|
+
componentDidLoad(): void;
|
|
11
|
+
private setupEventListeners;
|
|
12
|
+
private handleToggleEvent;
|
|
13
|
+
private handleDocumentClick;
|
|
14
|
+
private handleKeyDown;
|
|
15
|
+
private onPopoverShow;
|
|
16
|
+
private onPopoverHide;
|
|
17
|
+
private updateFocusableElements;
|
|
18
|
+
private trapFocus;
|
|
19
|
+
placementChanged(newPlacement: GidsFloatingElementPlacement): void;
|
|
20
|
+
htmlForChanged(newHtmlFor: string): void;
|
|
21
|
+
private cleanupEventListeners;
|
|
22
|
+
render(): any;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GidsFloatingElementPlacement } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsTooltipWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
export declare class GidsTooltip implements GidsTooltipWebProps {
|
|
4
|
+
_el: HTMLGidsTooltipElement;
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
tooltipText: string;
|
|
7
|
+
placement: GidsFloatingElementPlacement;
|
|
8
|
+
showWithoutDelay: boolean;
|
|
9
|
+
lockToMainAxis: boolean;
|
|
10
|
+
private floatingElementManager;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
componentDidLoad(): void;
|
|
13
|
+
private setupEventListeners;
|
|
14
|
+
private handleShowEvent;
|
|
15
|
+
private handleHideEvent;
|
|
16
|
+
placementChanged(newPlacement: GidsFloatingElementPlacement): void;
|
|
17
|
+
showWithoutDelayChanged(newShowWithoutDelay: boolean): void;
|
|
18
|
+
lockToMainAxisChanged(newLockToMainAxis?: boolean): void;
|
|
19
|
+
htmlForChanged(newHtmlFor: string): void;
|
|
20
|
+
private cleanupEventListeners;
|
|
21
|
+
render(): any;
|
|
22
|
+
disconnectedCallback(): void;
|
|
23
|
+
}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
|
|
9
9
|
import { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
|
|
10
|
-
import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
10
|
+
import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsFloatingElementPlacement, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
11
11
|
import { JSXBase } from "./stencil-public-runtime";
|
|
12
12
|
export { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
|
|
13
13
|
export { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
|
|
14
|
-
export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
14
|
+
export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsFloatingElementPlacement, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
15
15
|
export { JSXBase } from "./stencil-public-runtime";
|
|
16
16
|
export namespace Components {
|
|
17
17
|
interface GidsField {
|
|
@@ -110,6 +110,13 @@ export namespace Components {
|
|
|
110
110
|
"textMinLength"?: number;
|
|
111
111
|
"value"?: string;
|
|
112
112
|
}
|
|
113
|
+
interface GidsPopover {
|
|
114
|
+
"htmlFor": string;
|
|
115
|
+
/**
|
|
116
|
+
* @default 'bottom'
|
|
117
|
+
*/
|
|
118
|
+
"placement": GidsFloatingElementPlacement;
|
|
119
|
+
}
|
|
113
120
|
interface GidsScrim {
|
|
114
121
|
"extraClasses"?: string | undefined;
|
|
115
122
|
}
|
|
@@ -190,6 +197,22 @@ export namespace Components {
|
|
|
190
197
|
*/
|
|
191
198
|
"width"?: GidsButtonWidth;
|
|
192
199
|
}
|
|
200
|
+
interface GidsTooltip {
|
|
201
|
+
"htmlFor": string;
|
|
202
|
+
/**
|
|
203
|
+
* @default false
|
|
204
|
+
*/
|
|
205
|
+
"lockToMainAxis": boolean;
|
|
206
|
+
/**
|
|
207
|
+
* @default 'bottom'
|
|
208
|
+
*/
|
|
209
|
+
"placement": GidsFloatingElementPlacement;
|
|
210
|
+
/**
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
213
|
+
"showWithoutDelay": boolean;
|
|
214
|
+
"tooltipText": string;
|
|
215
|
+
}
|
|
193
216
|
}
|
|
194
217
|
export interface GidsPasswordFieldCustomEvent<T> extends CustomEvent<T> {
|
|
195
218
|
detail: T;
|
|
@@ -258,6 +281,12 @@ declare global {
|
|
|
258
281
|
prototype: HTMLGidsPasswordFieldElement;
|
|
259
282
|
new (): HTMLGidsPasswordFieldElement;
|
|
260
283
|
};
|
|
284
|
+
interface HTMLGidsPopoverElement extends Components.GidsPopover, HTMLStencilElement {
|
|
285
|
+
}
|
|
286
|
+
var HTMLGidsPopoverElement: {
|
|
287
|
+
prototype: HTMLGidsPopoverElement;
|
|
288
|
+
new (): HTMLGidsPopoverElement;
|
|
289
|
+
};
|
|
261
290
|
interface HTMLGidsScrimElement extends Components.GidsScrim, HTMLStencilElement {
|
|
262
291
|
}
|
|
263
292
|
var HTMLGidsScrimElement: {
|
|
@@ -304,6 +333,12 @@ declare global {
|
|
|
304
333
|
prototype: HTMLGidsToggleButtonElement;
|
|
305
334
|
new (): HTMLGidsToggleButtonElement;
|
|
306
335
|
};
|
|
336
|
+
interface HTMLGidsTooltipElement extends Components.GidsTooltip, HTMLStencilElement {
|
|
337
|
+
}
|
|
338
|
+
var HTMLGidsTooltipElement: {
|
|
339
|
+
prototype: HTMLGidsTooltipElement;
|
|
340
|
+
new (): HTMLGidsTooltipElement;
|
|
341
|
+
};
|
|
307
342
|
interface HTMLElementTagNameMap {
|
|
308
343
|
"gids-field": HTMLGidsFieldElement;
|
|
309
344
|
"gids-icon": HTMLGidsIconElement;
|
|
@@ -312,10 +347,12 @@ declare global {
|
|
|
312
347
|
"gids-overflow-container": HTMLGidsOverflowContainerElement;
|
|
313
348
|
"gids-overlay-provider": HTMLGidsOverlayProviderElement;
|
|
314
349
|
"gids-password-field": HTMLGidsPasswordFieldElement;
|
|
350
|
+
"gids-popover": HTMLGidsPopoverElement;
|
|
315
351
|
"gids-scrim": HTMLGidsScrimElement;
|
|
316
352
|
"gids-snackbar": HTMLGidsSnackbarElement;
|
|
317
353
|
"gids-text-field": HTMLGidsTextFieldElement;
|
|
318
354
|
"gids-toggle-button": HTMLGidsToggleButtonElement;
|
|
355
|
+
"gids-tooltip": HTMLGidsTooltipElement;
|
|
319
356
|
}
|
|
320
357
|
}
|
|
321
358
|
declare namespace LocalJSX {
|
|
@@ -417,6 +454,13 @@ declare namespace LocalJSX {
|
|
|
417
454
|
"textMinLength"?: number;
|
|
418
455
|
"value"?: string;
|
|
419
456
|
}
|
|
457
|
+
interface GidsPopover {
|
|
458
|
+
"htmlFor"?: string;
|
|
459
|
+
/**
|
|
460
|
+
* @default 'bottom'
|
|
461
|
+
*/
|
|
462
|
+
"placement"?: GidsFloatingElementPlacement;
|
|
463
|
+
}
|
|
420
464
|
interface GidsScrim {
|
|
421
465
|
"extraClasses"?: string | undefined;
|
|
422
466
|
}
|
|
@@ -499,6 +543,22 @@ declare namespace LocalJSX {
|
|
|
499
543
|
*/
|
|
500
544
|
"width"?: GidsButtonWidth;
|
|
501
545
|
}
|
|
546
|
+
interface GidsTooltip {
|
|
547
|
+
"htmlFor"?: string;
|
|
548
|
+
/**
|
|
549
|
+
* @default false
|
|
550
|
+
*/
|
|
551
|
+
"lockToMainAxis"?: boolean;
|
|
552
|
+
/**
|
|
553
|
+
* @default 'bottom'
|
|
554
|
+
*/
|
|
555
|
+
"placement"?: GidsFloatingElementPlacement;
|
|
556
|
+
/**
|
|
557
|
+
* @default false
|
|
558
|
+
*/
|
|
559
|
+
"showWithoutDelay"?: boolean;
|
|
560
|
+
"tooltipText"?: string;
|
|
561
|
+
}
|
|
502
562
|
|
|
503
563
|
interface GidsFieldAttributes {
|
|
504
564
|
"disabled": boolean;
|
|
@@ -560,6 +620,10 @@ declare namespace LocalJSX {
|
|
|
560
620
|
"fieldRequirementRequiredText": string | GidsLabelFieldRequirementTextFn;
|
|
561
621
|
"textMinLength": number;
|
|
562
622
|
}
|
|
623
|
+
interface GidsPopoverAttributes {
|
|
624
|
+
"htmlFor": string;
|
|
625
|
+
"placement": GidsFloatingElementPlacement;
|
|
626
|
+
}
|
|
563
627
|
interface GidsScrimAttributes {
|
|
564
628
|
"extraClasses": string | undefined;
|
|
565
629
|
}
|
|
@@ -601,6 +665,13 @@ declare namespace LocalJSX {
|
|
|
601
665
|
"defaultSelected": boolean;
|
|
602
666
|
"selected": boolean | undefined;
|
|
603
667
|
}
|
|
668
|
+
interface GidsTooltipAttributes {
|
|
669
|
+
"htmlFor": string;
|
|
670
|
+
"tooltipText": string;
|
|
671
|
+
"placement": GidsFloatingElementPlacement;
|
|
672
|
+
"showWithoutDelay": boolean;
|
|
673
|
+
"lockToMainAxis": boolean;
|
|
674
|
+
}
|
|
604
675
|
|
|
605
676
|
interface IntrinsicElements {
|
|
606
677
|
"gids-field": Omit<GidsField, keyof GidsFieldAttributes> & { [K in keyof GidsField & keyof GidsFieldAttributes]?: GidsField[K] } & { [K in keyof GidsField & keyof GidsFieldAttributes as `attr:${K}`]?: GidsFieldAttributes[K] } & { [K in keyof GidsField & keyof GidsFieldAttributes as `prop:${K}`]?: GidsField[K] };
|
|
@@ -610,10 +681,12 @@ declare namespace LocalJSX {
|
|
|
610
681
|
"gids-overflow-container": Omit<GidsOverflowContainer, keyof GidsOverflowContainerAttributes> & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes]?: GidsOverflowContainer[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `attr:${K}`]?: GidsOverflowContainerAttributes[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `prop:${K}`]?: GidsOverflowContainer[K] };
|
|
611
682
|
"gids-overlay-provider": GidsOverlayProvider;
|
|
612
683
|
"gids-password-field": Omit<GidsPasswordField, keyof GidsPasswordFieldAttributes> & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes]?: GidsPasswordField[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `attr:${K}`]?: GidsPasswordFieldAttributes[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `prop:${K}`]?: GidsPasswordField[K] };
|
|
684
|
+
"gids-popover": Omit<GidsPopover, keyof GidsPopoverAttributes> & { [K in keyof GidsPopover & keyof GidsPopoverAttributes]?: GidsPopover[K] } & { [K in keyof GidsPopover & keyof GidsPopoverAttributes as `attr:${K}`]?: GidsPopoverAttributes[K] } & { [K in keyof GidsPopover & keyof GidsPopoverAttributes as `prop:${K}`]?: GidsPopover[K] };
|
|
613
685
|
"gids-scrim": Omit<GidsScrim, keyof GidsScrimAttributes> & { [K in keyof GidsScrim & keyof GidsScrimAttributes]?: GidsScrim[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `attr:${K}`]?: GidsScrimAttributes[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `prop:${K}`]?: GidsScrim[K] };
|
|
614
686
|
"gids-snackbar": Omit<GidsSnackbar, keyof GidsSnackbarAttributes> & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes]?: GidsSnackbar[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `attr:${K}`]?: GidsSnackbarAttributes[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `prop:${K}`]?: GidsSnackbar[K] };
|
|
615
687
|
"gids-text-field": Omit<GidsTextField, keyof GidsTextFieldAttributes> & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes]?: GidsTextField[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `attr:${K}`]?: GidsTextFieldAttributes[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `prop:${K}`]?: GidsTextField[K] };
|
|
616
688
|
"gids-toggle-button": Omit<GidsToggleButton, keyof GidsToggleButtonAttributes> & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes]?: GidsToggleButton[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `attr:${K}`]?: GidsToggleButtonAttributes[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `prop:${K}`]?: GidsToggleButton[K] };
|
|
689
|
+
"gids-tooltip": Omit<GidsTooltip, keyof GidsTooltipAttributes> & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes]?: GidsTooltip[K] } & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes as `attr:${K}`]?: GidsTooltipAttributes[K] } & { [K in keyof GidsTooltip & keyof GidsTooltipAttributes as `prop:${K}`]?: GidsTooltip[K] };
|
|
617
690
|
}
|
|
618
691
|
}
|
|
619
692
|
export { LocalJSX as JSX };
|
|
@@ -627,10 +700,12 @@ declare module "@stencil/core" {
|
|
|
627
700
|
"gids-overflow-container": LocalJSX.IntrinsicElements["gids-overflow-container"] & JSXBase.HTMLAttributes<HTMLGidsOverflowContainerElement>;
|
|
628
701
|
"gids-overlay-provider": LocalJSX.IntrinsicElements["gids-overlay-provider"] & JSXBase.HTMLAttributes<HTMLGidsOverlayProviderElement>;
|
|
629
702
|
"gids-password-field": LocalJSX.IntrinsicElements["gids-password-field"] & JSXBase.HTMLAttributes<HTMLGidsPasswordFieldElement>;
|
|
703
|
+
"gids-popover": LocalJSX.IntrinsicElements["gids-popover"] & JSXBase.HTMLAttributes<HTMLGidsPopoverElement>;
|
|
630
704
|
"gids-scrim": LocalJSX.IntrinsicElements["gids-scrim"] & JSXBase.HTMLAttributes<HTMLGidsScrimElement>;
|
|
631
705
|
"gids-snackbar": LocalJSX.IntrinsicElements["gids-snackbar"] & JSXBase.HTMLAttributes<HTMLGidsSnackbarElement>;
|
|
632
706
|
"gids-text-field": LocalJSX.IntrinsicElements["gids-text-field"] & JSXBase.HTMLAttributes<HTMLGidsTextFieldElement>;
|
|
633
707
|
"gids-toggle-button": LocalJSX.IntrinsicElements["gids-toggle-button"] & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
|
|
708
|
+
"gids-tooltip": LocalJSX.IntrinsicElements["gids-tooltip"] & JSXBase.HTMLAttributes<HTMLGidsTooltipElement>;
|
|
634
709
|
}
|
|
635
710
|
}
|
|
636
711
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from './utils/constructedGidsStylesheet.js';
|
|
2
2
|
export * from './utils/assets.js';
|
|
3
|
+
export * from './utils/childrenValidityUtils.js';
|
|
4
|
+
export { GidsFloatingElementType } from './components/shared/GidsFloatingElementTypes.js';
|
|
3
5
|
export type * from './components.d.ts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FunctionalComponent, VNode } from '../stencil-public-runtime';
|
|
2
|
+
export interface TestHtmlChildrenValidity<T = Record<string, unknown>> {
|
|
3
|
+
children?: VNode;
|
|
4
|
+
classNameToBeValidated?: string;
|
|
5
|
+
childrenToBeValidated?: FunctionalComponent<T>;
|
|
6
|
+
currentComponentName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const testHtmlChildrenValidity: <T>({ children, classNameToBeValidated, childrenToBeValidated, currentComponentName, }: TestHtmlChildrenValidity<T>) => void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { C as o, H as e, f as
|
|
2
|
-
import { i as
|
|
3
|
-
import { d as c } from "./p-veoOgDXg-
|
|
4
|
-
const t = o(class extends
|
|
1
|
+
import { C as o, H as e, f as d, R as a } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as n } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { d as c } from "./p-veoOgDXg-fRinub-C.js";
|
|
4
|
+
const t = o(class extends d {
|
|
5
5
|
constructor(i) {
|
|
6
6
|
super(), i !== !1 && this.__registerHost(), this.__attachShadow();
|
|
7
7
|
}
|
|
8
8
|
connectedCallback() {
|
|
9
|
-
const i =
|
|
9
|
+
const i = n();
|
|
10
10
|
i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return
|
|
13
|
+
return a(c, { key: "3033afda529cd2143bd0d3c3ca5c985b4b950eae", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
|
|
14
14
|
}
|
|
15
15
|
get _el() {
|
|
16
16
|
return this;
|
|
17
17
|
}
|
|
18
18
|
static get style() {
|
|
19
|
-
return ".gids-icon{fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);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)}";
|
|
19
|
+
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)}";
|
|
20
20
|
}
|
|
21
21
|
}, [1, "gids-icon", { name: [1], size: [1], appearance: [1], alt: [1], titleId: [1, "title-id"] }]);
|
|
22
22
|
function s() {
|
|
@@ -25,8 +25,8 @@ function s() {
|
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
s();
|
|
28
|
-
const
|
|
28
|
+
const h = t, m = s;
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
h as GidsIcon,
|
|
31
31
|
m as defineCustomElement
|
|
32
32
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { l as r, r as s } from "./p-DvoHLz_5-C5EvA91N.js";
|
|
2
|
+
const e = r, o = s;
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
e as GidsInput,
|
|
5
|
+
o as defineCustomElement
|
|
6
6
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { C as i, f as n, R as e, H as o } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as l } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
-
const
|
|
3
|
+
const h = (t) => t === "top" || t === "top-bottom", c = (t) => t === "bottom" || t === "top-bottom", d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
5
|
-
showGidsOverflowContainerBottomShadow:
|
|
6
|
-
showGidsOverflowContainerTopShadow:
|
|
5
|
+
showGidsOverflowContainerBottomShadow: c,
|
|
6
|
+
showGidsOverflowContainerTopShadow: h
|
|
7
7
|
}, Symbol.toStringTag, { value: "Module" })), { showGidsOverflowContainerBottomShadow: s, showGidsOverflowContainerTopShadow: f } = d, r = i(class extends n {
|
|
8
8
|
constructor(t) {
|
|
9
9
|
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.shadowLocation = "bottom";
|
|
@@ -20,7 +20,7 @@ const c = (t) => t === "top" || t === "top-bottom", h = (t) => t === "bottom" ||
|
|
|
20
20
|
this._textArea.scrollTop + this._textArea.offsetHeight >= this._textArea.scrollHeight ? this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0") : t !== 0 ? t > 0 && (f(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-before-opacity", "" + Math.min(t / 20, 1)), s(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "" + Math.min((this._textArea.scrollHeight - (this._textArea.scrollTop + this._textArea.offsetHeight)) / 20, 1))) : this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0");
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return e("div", { key: "
|
|
23
|
+
return e("div", { key: "0a7916237558157e7122aeb05de6bf2eaaf5df77", class: "gids-overflow-container__text-area", onScroll: this.calculateShadows.bind(this) }, e("slot", { key: "fda73f846c0ec7371d57b7a8e379c028e0feaa98" }));
|
|
24
24
|
}
|
|
25
25
|
get _el() {
|
|
26
26
|
return this;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as k, f as y, R as o, L as w, H as f } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as x } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { e as N, n as g } from "./p-CVtNa0cL-sSVeJsR3.js";
|
|
4
|
-
import { d as p } from "./p-veoOgDXg-
|
|
5
|
-
import {
|
|
4
|
+
import { d as p } from "./p-veoOgDXg-fRinub-C.js";
|
|
5
|
+
import { o as u } from "./p-CFw4_-5A-Dzvju3VE.js";
|
|
6
6
|
import { c as h } from "./clsx-OuTLNxxd.js";
|
|
7
7
|
const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
8
8
|
// 'gids-snackbar-container--appearance-default': appearance === 'default' // its a default
|
|
@@ -187,7 +187,7 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
|
187
187
|
}
|
|
188
188
|
render() {
|
|
189
189
|
const t = this._allowedComponentQueue[0]?.position || "bottom-center";
|
|
190
|
-
return o(w, { key: "
|
|
190
|
+
return o(w, { key: "cfacf71807978b22d6f2a9e33c0518e9aefc3a58" }, o("slot", { key: "4b4fa08f00a46a95ed4af543f85aad06affee847" }), this._isRoot() ? o("div", { class: G({ position: t }) }, [...this._allowedComponentQueue].reverse().map(((e) => this._renderComponent(e)))) : null);
|
|
191
191
|
}
|
|
192
192
|
get _el() {
|
|
193
193
|
return this;
|