@ganpatiinfo/gids-core-web 2.1.1 → 3.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.
Files changed (37) hide show
  1. package/dist/css/elements.css.map +1 -0
  2. package/dist/{index.css → css/index.css} +277 -4
  3. package/dist/css/index.css.map +1 -0
  4. package/dist/custom-elements.json +143 -4
  5. package/dist/gids-icon.d.ts +11 -0
  6. package/dist/gids-icon.js +1 -0
  7. package/dist/gids-toggle-button.js +1 -130
  8. package/dist/index.d.ts +2 -1
  9. package/dist/index.js +1 -5
  10. package/dist/p-CgujYzVX.js +1 -0
  11. package/dist/types/components/html/GidsPagination/GidsPagination.d.ts +7 -0
  12. package/dist/types/components/html/_GidsPaginationItem/GidsPaginationItem.d.ts +7 -0
  13. package/dist/types/components/webComponents/GidsIcon/GidsIcon.d.ts +12 -0
  14. package/dist/types/components.d.ts +48 -2
  15. package/dist/types/index.d.ts +1 -10
  16. package/dist/types/stencil-public-runtime.d.ts +170 -12
  17. package/dist/types/utils/assets.d.ts +6 -0
  18. package/dist-bundled/es/assets-Drv1fXkA.js +73 -0
  19. package/dist-bundled/es/clsx-OuTLNxxd.js +16 -0
  20. package/dist-bundled/es/gids-icon.js +216 -0
  21. package/dist-bundled/es/gids-toggle-button.js +87 -0
  22. package/dist-bundled/es/index.js +22 -0
  23. package/dist-bundled/es/p-CgujYzVX-xo1axnk6.js +465 -0
  24. package/dist-bundled/umd/gids-icon.umd.js +1 -0
  25. package/dist-bundled/umd/gids-toggle-button.umd.js +3 -0
  26. package/dist-bundled/umd/index.umd.js +1 -0
  27. package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -0
  28. package/distPaths.js +34 -0
  29. package/package.json +191 -158
  30. package/scriptUtils.js +6 -0
  31. package/dist/elements.css.map +0 -1
  32. package/dist/gids-toggle-button.js.map +0 -1
  33. package/dist/index.css.map +0 -1
  34. package/dist/index.js.map +0 -1
  35. package/dist/p-C0FfV2mK.js +0 -1134
  36. package/dist/p-C0FfV2mK.js.map +0 -1
  37. /package/dist/{elements.css → css/elements.css} +0 -0
@@ -1,130 +1 @@
1
- import { h, p as proxyCustomElement, H, e as createEvent, d as getConstructedGidsStylesheet, f as Host } from './p-C0FfV2mK.js';
2
- import { GidsSpinnerControlWebUtils, GidsButtonWebUtils, nonEmpty } from '@ganpatiinfo/gids-web-shared';
3
- import { GidsSpinnerControlCommonUtils } from '@ganpatiinfo/gids-core-shared';
4
-
5
- const { getGidsSpinnerControlClassNames } = GidsSpinnerControlWebUtils;
6
- const { calculateStrokeDasharray, thickness, radius, centerPosition, viewBox } = GidsSpinnerControlCommonUtils;
7
- const GidsSpinnerControl = ({ size, indeterminate, value, max, ...rest }) => {
8
- let style = undefined;
9
- if (!indeterminate) {
10
- const dashArray = calculateStrokeDasharray(value, max ? max : 0);
11
- style = { strokeDashArray: dashArray, strokeDashoffset: '0' };
12
- }
13
- return (h("svg", { class: getGidsSpinnerControlClassNames({ size, indeterminate, value }), viewBox: viewBox, ...rest },
14
- h("circle", { class: "gids-spinner-control__track", cx: centerPosition, cy: centerPosition, r: radius, "stroke-width": thickness }),
15
- h("circle", { style: style, class: "gids-spinner-control__progress", cx: centerPosition, cy: centerPosition, r: radius, "stroke-width": thickness })));
16
- };
17
-
18
- const { getGidsButtonClassNames } = GidsButtonWebUtils;
19
- /**
20
- * Stencil functional component implementation of GIDS Button component.
21
- *
22
- * Only used internally by Stencil web components that need to render Buttons within their
23
- * JSX templates.
24
- *
25
- * @internal
26
- *
27
- * @param props
28
- * @param children
29
- * @returns
30
- */
31
- const GidsButton = ({ appearance, size, destructive, loading, width, leadingIcon, trailingIcon, as, disabled, class: className, forceIconOnly = false, ...rest }, children) => {
32
- const Element = as || 'button';
33
- const spinnerSize = size === 'lg' || size === undefined ? 'md' : size;
34
- // Default to type="button" if not provided, since HTML's default is "submit"
35
- if (Element === 'button' && !('type' in rest)) {
36
- rest.type = 'button';
37
- }
38
- return (
39
- // @ts-expect-error: TODO This used to work in TypeScript 4.x but not anymore
40
- h(Element, { class: getGidsButtonClassNames({ appearance, size, destructive, loading, width }, forceIconOnly ||
41
- (children.length === 0 &&
42
- nonEmpty(leadingIcon) &&
43
- !nonEmpty(trailingIcon)), className), disabled: Element === 'button' ? disabled : undefined, ...rest },
44
- h("span", { class: "gids-button__content" },
45
- leadingIcon,
46
- children),
47
- loading && (h(GidsSpinnerControl, { size: spinnerSize, indeterminate: true })),
48
- trailingIcon));
49
- };
50
-
51
- const GidsToggleButton$1 = /*@__PURE__*/ proxyCustomElement(class GidsToggleButton extends H {
52
- /**
53
- *
54
- * Only available as a property. There is no `selected` attribute
55
- *
56
- * @inheritdoc
57
- */
58
- get selected() {
59
- return this.#selected ?? this.defaultSelected;
60
- }
61
- set selected(value) {
62
- this.#selected = value === undefined ? undefined : Boolean(value);
63
- }
64
- constructor() {
65
- super();
66
- this.__registerHost();
67
- this.__attachShadow();
68
- this.select = createEvent(this, "select");
69
- this._toggle = this._toggle.bind(this);
70
- }
71
- /**
72
- * @internal
73
- */
74
- #selected;
75
- connectedCallback() {
76
- const constructedGidsStylesheet = getConstructedGidsStylesheet();
77
- if (constructedGidsStylesheet !== undefined) {
78
- this._el.shadowRoot?.adoptedStyleSheets.push(constructedGidsStylesheet);
79
- }
80
- }
81
- _toggle() {
82
- const toggledValue = !this.selected;
83
- this._el.selected = toggledValue;
84
- this.select?.emit(toggledValue);
85
- }
86
- render() {
87
- return (h(Host, { key: '5c54c2974c214043b8d07e03d1bba4428106e2aa' }, h("style", { key: '9d90d24d0b47e87cf0b62d906f05cd2fab689950' }, `:host {
88
- display: ${this.width === 'full' ? 'block' : 'inline-block'}
89
- }`), h(GidsButton, { key: 'e48005f27f637b9f03c9c1e6e0cf13bb0687a6ce', appearance: this.appearance, size: this.size, width: this.width, disabled: this.disabled, onClick: this._toggle, "aria-pressed": this.selected ? 'true' : 'false', leadingIcon: h("slot", { name: "leadingIcon" }), trailingIcon: h("slot", { name: "trailingIcon" }), forceIconOnly: this._onlyHasLeadingIcon() }, h("slot", { key: 'e727c6972563dbb7320dc0157a2522df459a8635' }))));
90
- }
91
- _onlyHasLeadingIcon() {
92
- const childNodes = this._el.childNodes;
93
- if (childNodes.length === 1 &&
94
- childNodes[0] instanceof window.Element &&
95
- childNodes[0].slot === 'leadingIcon') {
96
- return true;
97
- }
98
- return false;
99
- }
100
- get _el() { return this; }
101
- }, [1, "gids-toggle-button", {
102
- "disabled": [516],
103
- "appearance": [513],
104
- "size": [513],
105
- "width": [513],
106
- "defaultSelected": [516, "default-selected"],
107
- "selected": [6660]
108
- }]);
109
- function defineCustomElement$1() {
110
- if (typeof customElements === "undefined") {
111
- return;
112
- }
113
- const components = ["gids-toggle-button"];
114
- components.forEach(tagName => { switch (tagName) {
115
- case "gids-toggle-button":
116
- if (!customElements.get(tagName)) {
117
- customElements.define(tagName, GidsToggleButton$1);
118
- }
119
- break;
120
- } });
121
- }
122
- defineCustomElement$1();
123
-
124
- const GidsToggleButton = GidsToggleButton$1;
125
- const defineCustomElement = defineCustomElement$1;
126
-
127
- export { GidsToggleButton, defineCustomElement };
128
- //# sourceMappingURL=gids-toggle-button.js.map
129
-
130
- //# sourceMappingURL=gids-toggle-button.js.map
1
+ import{h as e,t,p as s,H as i,e as n,d as a,f as o}from"./p-CgujYzVX.js";import{GidsSpinnerControlWebUtils as c,GidsButtonWebUtils as d,nonEmpty as l}from"@ganpatiinfo/gids-web-shared";import{GidsSpinnerControlCommonUtils as r}from"@ganpatiinfo/gids-core-shared";const{getGidsSpinnerControlClassNames:h}=c,{calculateStrokeDasharray:g,thickness:u,radius:b,centerPosition:p,viewBox:f}=r,m=({size:t,indeterminate:s,value:i,max:n,...a})=>{let o;return s||(o={strokeDashArray:g(i,n||0),strokeDashoffset:"0"}),e("svg",{class:h({size:t,indeterminate:s,value:i}),viewBox:f,...a},e("circle",{class:"gids-spinner-control__track",cx:p,cy:p,r:b,"stroke-width":u}),e("circle",{style:o,class:"gids-spinner-control__progress",cx:p,cy:p,r:b,"stroke-width":u}))},{getGidsButtonClassNames:y}=d,k=({appearance:t,size:s,destructive:i,loading:n,width:a,leadingIcon:o,trailingIcon:c,as:d,disabled:r,class:h,forceIconOnly:g=!1,...u},b)=>{const p=d||"button",f="lg"===s||void 0===s?"md":s;return"button"!==p||"type"in u||(u.type="button"),e(p,{class:y({appearance:t,size:s,destructive:i,loading:n,width:a},g||0===b.length&&l(o)&&!l(c),h),disabled:"button"===p?r:void 0,...u},e("span",{class:"gids-button__content"},o,b),n&&e(m,{size:f,indeterminate:!0}),c)},v=s(class extends i{get selected(){return this.#e??this.defaultSelected}set selected(e){this.#e=void 0===e?void 0:!!e}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=n(this,"select"),this._toggle=this._toggle.bind(this)}#e;connectedCallback(){const e=a();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e)}render(){return e(o,{key:"222a7976cfa0daa12d2db51e405d8f3e894209d9"},e("style",{key:"04b1d2f9a184e830b949691e789deaaaea987303"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),e(k,{key:"18ef39dcc5b3a532a347e530784ec4915719f914",appearance:this.appearance,size:this.size,width:this.width,disabled:this.disabled,onClick:this._toggle,"aria-pressed":this.selected?"true":"false",leadingIcon:e("slot",{name:"leadingIcon"}),trailingIcon:e("slot",{name:"trailingIcon"}),forceIconOnly:this._onlyHasLeadingIcon()},e("slot",{key:"f82ab35082be6b10d0fb76b11c8250cd6ab374a4"})))}_onlyHasLeadingIcon(){const e=this._el.childNodes;return 1===e.length&&e[0]instanceof window.Element&&"leadingIcon"===e[0].slot}get _el(){return this}},[257,"gids-toggle-button",{disabled:[516],appearance:[513],size:[513],width:[513],defaultSelected:[516,"default-selected"],selected:[6660]}]);function w(){"undefined"!=typeof customElements&&["gids-toggle-button"].forEach((e=>{"gids-toggle-button"===e&&(customElements.get(t(e))||customElements.define(t(e),v))}))}w();const I=v,_=w;export{I as GidsToggleButton,_ as defineCustomElement}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from "./types/index.js";
2
1
  /**
3
2
  * Get the base path to where the assets can be found. Use "setAssetPath(path)"
4
3
  * if the path needs to be customized.
@@ -32,3 +31,5 @@ export interface SetPlatformOptions {
32
31
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
33
32
  }
34
33
  export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
34
+
35
+ export * from './types/index.js';
package/dist/index.js CHANGED
@@ -1,5 +1 @@
1
- export { g as getAssetPath, d as getConstructedGidsStylesheet, c as refreshConstructedGidsStylesheet, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-C0FfV2mK.js';
2
- export { setGidsAssetFilePaths, setGidsDefaultAssetDirPath } from '@ganpatiinfo/gids-web-shared';
3
- //# sourceMappingURL=index.js.map
4
-
5
- //# sourceMappingURL=index.js.map
1
+ export{g as getAssetPath,d as getConstructedGidsStylesheet,c as refreshConstructedGidsStylesheet,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CgujYzVX.js";import{setGidsAssetPaths as t}from"@ganpatiinfo/gids-web-shared";function e(s,e){t(s,e)}const o=s=>{e(s)},n=s=>{e(s)};export{o as setGidsAssetFilePaths,e as setGidsAssetPaths,n as setGidsDefaultAssetDirPath}
@@ -0,0 +1 @@
1
+ function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},a=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!a&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,h=[],p=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&u.i?b(y):u.raf(y))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{v(h),v(p),(d=h.length>0)&&u.raf(y)},b=t=>Promise.resolve(undefined).then(t),$=m(p,!0),g=t=>{const e=new URL(t,u.u);return e.origin!==r.location.origin?e.href:e.pathname},w=t=>u.u=t;function S(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(f?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var O,j=new WeakMap,M=t=>"sc-"+t.h,k=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!k(l))&&(l=String(l)),s&&i?r[r.length-1].p+=l:r.push(s?C(null,l):l),i=s)};if(c(n),e&&e.key&&(o=e.key),"function"==typeof t)return t(null===e?{}:e,r,A);const u=C(t,null);return u.m=e,r.length>0&&(u.v=r),u.$=o,u},C=(t,e)=>({i:0,S:t,p:null!=e?e:null,O:null,v:null,m:null,$:null}),x={},A={forEach:(t,e)=>t.map(D).forEach(e),map:(t,e)=>t.map(D).map(e).map(L)},D=t=>({vattrs:t.m,vchildren:t.v,vkey:t.$,vname:t.j,vtag:t.S,vtext:t.p}),L=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),E(t.vtag,e,...t.vchildren||[])}const e=C(t.vtag,t.vtext);return e.m=t.vattrs,e.v=t.vchildren,e.$=t.vkey,e.j=t.vname,e},R=(t,e)=>null==t||k(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t,_=(t,e)=>{const n=t;return{emit:t=>H(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},H=(t,e,n)=>{const l=u.ce(e,n);return t.dispatchEvent(l),l},P=(t,e,n,s,i,c)=>{if(n===s)return;let a=o(t,e),f=e.toLowerCase();if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=k(s);if((a||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?a=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!a||4&c||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):o(r,f)?f.slice(2):f[2]+e.slice(3),n||s){const l=e.endsWith(U);e=e.replace(W,""),n&&u.rel(t,e,n,l),s&&u.ael(t,e,s,l)}},U="Capture",W=new RegExp(U+"$"),N=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of T(Object.keys(o)))t in s||P(l,t,o[t],void 0,n,e.i);for(const t of T(Object.keys(s)))P(l,t,o[t],s[t],n,e.i)};function T(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var q=!1,z=!1,F=(t,e,n)=>{const l=e.v[n];let o,s,i=0;if(null!=l.p)o=l.O=r.document.createTextNode(l.p);else{if(!r.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=r.document.createElement(l.S),N(null,l,z),l.v){const e="template"===l.S?o.content:o;for(i=0;i<l.v.length;++i)s=F(t,l,i),s&&e.appendChild(s)}}return o["s-hn"]=O,o},G=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);o<=s;++o)l[o]&&(i=F(null,n,o),i&&(l[o].O=i,Z(r,i,e)))},I=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},V=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),Y=(t,e,n=!1)=>{const l=e.O=t.O,o=t.v,s=e.v,i=e.p;null==i?("slot"!==e.S||q||t.j!==e.j&&(e.O["s-sn"]=e.j||"",(t=>{u.i|=1;const e=t.closest(O.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(Z(e,t,null!=n?n:null),t["s-sh"]=void 0)}u.i&=-2})(e.O.parentElement)),N(t,e,z),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=l.length-1,m=l[0],v=l[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=l[++c];else if(null==v)v=l[--p];else if(V(d,m,o))Y(d,m,o),d=e[++r],m=l[++c];else if(V(h,v,o))Y(h,v,o),h=e[--f],v=l[--p];else if(V(d,v,o))Y(d,v,o),Z(y,d.O,h.O.nextSibling),d=e[++r],v=l[--p];else if(V(h,m,o))Y(h,m,o),Z(y,h.O,d.O),h=e[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].$&&e[a].$===m.$){u=a;break}u>=0?(i=e[u],i.S!==m.S?s=F(e&&e[c],n,u):(Y(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=F(e&&e[c],n,c),m=l[++c]),s&&Z(d.O.parentNode,s,d.O)}r>f?G(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&I(e,r,f)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),G(l,null,e,s,0,s.length-1)):!n&&null!==o&&I(o,0,o.length-1)):t.p!==i&&(l.data=i)},Z=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),B=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||C(null,null);var i;const r=(i=e)&&i.S===x?e:E(null,null,e);if(O=l.tagName,o.k&&(r.m=r.m||{},o.k.forEach((([t,e])=>{r.m[e]=l[t]}))),n&&r.m)for(const t of Object.keys(r.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=l[t]);r.S=null,r.i|=4,t.M=r,r.O=s.O=l.shadowRoot||l,q=!(!(1&o.i)||128&o.i),Y(s,r,n)},J=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.C=()=>{e["s-p"].splice(n-1,1),l()})))}},K=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);J(t,t.A);const n=()=>Q(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},Q=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=st(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=X(o,(()=>st(l,"componentWillRender",void 0,n))),X(o,(()=>et(t,l,e)))},X=(t,e)=>tt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),tt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,et=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const s=M(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let o,i=j.get(t=t.head||t);if(i||j.set(t,i=new Set),!i.has(s)){o=r.document.createElement("style"),o.textContent=c;const d=null!=(n=u.D)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=j.get(t);if(e||j.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(c.constructor===n.CSSStyleSheet)l=c;else{l=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)l.insertRule(c.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);nt(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},nt=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,B(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=e,l=t.A;st(n,"componentDidRender",void 0,e),64&t.i?st(n,"componentDidUpdate",void 0,e):(t.i|=64,it(e),st(n,"componentDidLoad",void 0,e),t.L(e),l||ot()),t.C&&(t.C(),t.C=void 0),512&t.i&&b((()=>K(t,!1))),t.i&=-517},ot=()=>{b((()=>H(r,"appload",{detail:{namespace:"gids-core-web"}})))},st=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},it=t=>t.classList.add("hydrated"),rt=(t,e,n,o)=>{const s=l(t);if(!s)return;const i=t,r=s.o.get(e),c=s.i,u=i;n=R(n,o.t[e][0]);const a=Number.isNaN(r)&&Number.isNaN(n);if(n!==r&&!a&&(s.o.set(e,n),2&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,r,e)&&!(16&c))return;16&c||K(s,!1)}},ct=(e,n)=>{var o,s;const i=e.prototype;if(n.t){const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,l(this).o.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.apply(this,[R(t,o)]),void rt(this,e,t=32&o?this[e]:s.$hostElement$[e],n);rt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var c;const u=t.get(e),a=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==a?void 0:a.i;if(a&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.R)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const f=r.find((([t])=>t===u)),d=f&&4&f[1][0],h=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const p=Object.getOwnPropertyDescriptor(i,u);h||s==this[u]||p.get&&!p.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.R)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,l])=>{var o;const s=l[1]||e;return t.set(s,e),512&l[0]&&(null==(o=n.k)||o.push([e,s])),s}))]))}}return e},ut=(t,e)=>{const o={i:e[0],h:e[1]};try{o.t=e[2],o.k=[];const r=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,_:new Map};l.H=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e.P)||(null==e?void 0:e.H)&&e.H.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=M(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);a&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.A,s=()=>K(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.C&&(e.C(),e.C=void 0),e.L&&e.L(t)}})(t,e,n)}o()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{1&u.i||l(t),j.has(t)&&j.delete(t),t.shadowRoot&&j.has(t.shadowRoot)&&j.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${o.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else S.call(this,o)}}),Object.defineProperty(t,"is",{value:o.h,configurable:!0}),ct(t,o)}catch(e){return s(e),t}},at=t=>u.D=t,ft=t=>Object.assign(u,t),dt=new WeakMap;function ht(t,e){let n=dt.get(e);n||(n={i:0,l:{i:0,h:e.tagName},$hostElement$:e},dt.set(e,n)),B(n,t)}function pt(t){return t}const mt=void 0!==globalThis.CSSStyleSheet?new CSSStyleSheet:void 0;let vt=!1;mt&&document.adoptedStyleSheets?document.adoptedStyleSheets.push(mt):console.warn("CSSStyleSheet is not defined. Omitting constructed stylesheet behaviour.");let yt=null;const bt=void 0!==globalThis.MutationObserver?new MutationObserver((()=>{$t()})):void 0,$t=()=>{if(void 0===mt)return!1;const t=(()=>{if(void 0===mt)return;const t=[];for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets.item(e);if(n)try{let e=-1,l=0;for(let o=0;o<n.cssRules.length;o++){const s=n.cssRules.item(o);if(s?.cssText.startsWith("gids-global-styles-start"))e=o;else if(e>-1){if(s?.cssText.startsWith("gids-global-styles-end")){l=o-e+1;break}t.push(s)}}if(e>-1)return{rulesStartIndex:e,originalRulesCount:l,rules:t,styleSheet:n}}catch(t){if(!(t instanceof DOMException))throw t}}})();if(void 0!==t){const e=t.styleSheet.ownerNode;return void 0!==bt&&e!==yt&&(yt&&bt.disconnect(),e instanceof Element&&bt.observe(e,{childList:!0,characterData:!0,subtree:!0}),yt=e),mt.replaceSync((t=>t.rules.map((t=>t.cssText)).join(""))(t)),(t=>{const{rulesStartIndex:e,originalRulesCount:n,styleSheet:l}=t;for(let t=0;t<n;t++)l.deleteRule(e)})(t),!0}return console.warn("refreshConstructedGidsStylesheet: Gids stylesheet is not found in document."),!1},gt=()=>(vt||(vt=$t()),mt);export{c as H,at as a,ft as b,$t as c,gt as d,_ as e,x as f,g,E as h,ut as p,ht as r,w as s,pt as t}
@@ -0,0 +1,7 @@
1
+ import { type GidsPaginationCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type GidsPaginationButtonParamsProps } from '@ganpatiinfo/gids-web-shared';
3
+ import { type FunctionalComponent, type JSXBase } from '../../../stencil-public-runtime';
4
+ export type GidsPaginationProps = Omit<GidsPaginationCommonProps<string>, 'onClickItem'> & Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick'> & {
5
+ onClickItem?: ({ event, index, page, defaultPage, type, }: GidsPaginationButtonParamsProps<MouseEvent>) => void;
6
+ };
7
+ export declare const GidsPagination: FunctionalComponent<GidsPaginationProps>;
@@ -0,0 +1,7 @@
1
+ import { type GidsPaginationItemCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type VNode } from '../../../stencil-public-runtime';
3
+ import { type FunctionalComponent, type JSXBase } from '../../../stencil-public-runtime';
4
+ export type GidsPaginationItemProps = GidsPaginationItemCommonProps<VNode, string> & Omit<JSXBase.IntrinsicElements['button'], 'children' | 'onClick'> & {
5
+ onClickItem?: (event: MouseEvent) => void;
6
+ };
7
+ export declare const GidsPaginationItem: FunctionalComponent<GidsPaginationItemProps>;
@@ -0,0 +1,12 @@
1
+ import { type IconName, type IconAppearance } from '@ganpatiinfo/gids-web-theme-interface';
2
+ import { type GidsIconWebProps } from '@ganpatiinfo/gids-web-shared';
3
+ export declare class GidsIconWebComponent implements GidsIconWebProps<IconName, IconAppearance> {
4
+ private _el;
5
+ name: IconName;
6
+ size?: GidsIconWebProps<IconName, IconAppearance>['size'];
7
+ appearance?: IconAppearance;
8
+ alt?: string;
9
+ titleId?: string;
10
+ connectedCallback(): void;
11
+ render(): any;
12
+ }
@@ -5,9 +5,20 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
9
+ import { GidsIconWebProps } from "@ganpatiinfo/gids-web-shared";
8
10
  import { GidsButtonSize, GidsButtonWidth, GidsToggleButtonAppearance } from "@ganpatiinfo/gids-core-shared";
11
+ export { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
12
+ export { GidsIconWebProps } from "@ganpatiinfo/gids-web-shared";
9
13
  export { GidsButtonSize, GidsButtonWidth, GidsToggleButtonAppearance } from "@ganpatiinfo/gids-core-shared";
10
14
  export namespace Components {
15
+ interface GidsIcon {
16
+ "alt"?: string;
17
+ "appearance"?: IconAppearance;
18
+ "name": IconName;
19
+ "size"?: GidsIconWebProps<IconName, IconAppearance>['size'];
20
+ "titleId"?: string;
21
+ }
11
22
  interface GidsToggleButton {
12
23
  /**
13
24
  * Reflected by `appearance` property
@@ -46,6 +57,12 @@ export interface GidsToggleButtonCustomEvent<T> extends CustomEvent<T> {
46
57
  target: HTMLGidsToggleButtonElement;
47
58
  }
48
59
  declare global {
60
+ interface HTMLGidsIconElement extends Components.GidsIcon, HTMLStencilElement {
61
+ }
62
+ var HTMLGidsIconElement: {
63
+ prototype: HTMLGidsIconElement;
64
+ new (): HTMLGidsIconElement;
65
+ };
49
66
  interface HTMLGidsToggleButtonElementEventMap {
50
67
  "select": boolean;
51
68
  }
@@ -64,10 +81,20 @@ declare global {
64
81
  new (): HTMLGidsToggleButtonElement;
65
82
  };
66
83
  interface HTMLElementTagNameMap {
84
+ "gids-icon": HTMLGidsIconElement;
67
85
  "gids-toggle-button": HTMLGidsToggleButtonElement;
68
86
  }
69
87
  }
70
88
  declare namespace LocalJSX {
89
+ type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
90
+
91
+ interface GidsIcon {
92
+ "alt"?: string;
93
+ "appearance"?: IconAppearance;
94
+ "name": IconName;
95
+ "size"?: GidsIconWebProps<IconName, IconAppearance>['size'];
96
+ "titleId"?: string;
97
+ }
71
98
  interface GidsToggleButton {
72
99
  /**
73
100
  * Reflected by `appearance` property
@@ -101,15 +128,34 @@ declare namespace LocalJSX {
101
128
  */
102
129
  "width"?: GidsButtonWidth;
103
130
  }
131
+
132
+ interface GidsIconAttributes {
133
+ "name": IconName;
134
+ "size": GidsIconWebProps<IconName, IconAppearance>['size'];
135
+ "appearance": IconAppearance;
136
+ "alt": string;
137
+ "titleId": string;
138
+ }
139
+ interface GidsToggleButtonAttributes {
140
+ "disabled": boolean;
141
+ "appearance": GidsToggleButtonAppearance;
142
+ "size": GidsButtonSize;
143
+ "width": GidsButtonWidth;
144
+ "defaultSelected": boolean;
145
+ "selected": boolean | undefined;
146
+ }
147
+
104
148
  interface IntrinsicElements {
105
- "gids-toggle-button": GidsToggleButton;
149
+ "gids-icon": Omit<GidsIcon, keyof GidsIconAttributes> & { [K in keyof GidsIcon & keyof GidsIconAttributes]?: GidsIcon[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `attr:${K}`]?: GidsIconAttributes[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `prop:${K}`]?: GidsIcon[K] } & OneOf<"name", GidsIcon["name"], GidsIconAttributes["name"]>;
150
+ "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] };
106
151
  }
107
152
  }
108
153
  export { LocalJSX as JSX };
109
154
  declare module "@stencil/core" {
110
155
  export namespace JSX {
111
156
  interface IntrinsicElements {
112
- "gids-toggle-button": LocalJSX.GidsToggleButton & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
157
+ "gids-icon": LocalJSX.IntrinsicElements["gids-icon"] & JSXBase.HTMLAttributes<HTMLGidsIconElement>;
158
+ "gids-toggle-button": LocalJSX.IntrinsicElements["gids-toggle-button"] & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
113
159
  }
114
160
  }
115
161
  }
@@ -1,12 +1,3 @@
1
1
  export * from './utils/constructedGidsStylesheet.js';
2
+ export * from './utils/assets.js';
2
3
  export type * from './components.d.ts';
3
- import { setGidsAssetFilePaths, setGidsDefaultAssetDirPath } from '@ganpatiinfo/gids-web-shared';
4
- export {
5
- /**
6
- * @inheritdoc
7
- */
8
- setGidsAssetFilePaths,
9
- /**
10
- * @inheritdoc
11
- */
12
- setGidsDefaultAssetDirPath, };
@@ -1,4 +1,6 @@
1
- declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
1
+ type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
2
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
3
+ type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
2
4
  export interface ComponentDecorator {
3
5
  (opts?: ComponentOptions): ClassDecorator;
4
6
  }
@@ -61,6 +63,12 @@ export interface ShadowRootOptions {
61
63
  * focusable part is given focus, and the shadow host is given any available `:focus` styling.
62
64
  */
63
65
  delegatesFocus?: boolean;
66
+ /**
67
+ * Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
68
+ * slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
69
+ * declarative slotting behavior.
70
+ */
71
+ slotAssignment?: 'manual' | 'named';
64
72
  }
65
73
  export interface ModeStyles {
66
74
  [modeName: string]: string | string[];
@@ -117,12 +125,34 @@ export interface EventOptions {
117
125
  */
118
126
  composed?: boolean;
119
127
  }
128
+ export interface AttachInternalsOptions {
129
+ /**
130
+ * Initial custom states to set on the ElementInternals.states CustomStateSet.
131
+ * Each key is the state name and the value is the initial boolean state.
132
+ *
133
+ * These states can be targeted with the CSS `:state()` pseudo-class.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * @AttachInternals({ states: { open: true, active: false } })
138
+ * internals: ElementInternals;
139
+ * ```
140
+ *
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
142
+ */
143
+ states?: {
144
+ [stateName: string]: boolean;
145
+ };
146
+ }
120
147
  export interface AttachInternalsDecorator {
121
- (): PropertyDecorator;
148
+ (opts?: AttachInternalsOptions): PropertyDecorator;
122
149
  }
123
150
  export interface ListenDecorator {
124
151
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
125
152
  }
153
+ export interface ResolveVarFunction {
154
+ <T>(variable: T): string;
155
+ }
126
156
  export interface ListenOptions {
127
157
  /**
128
158
  * Handlers can also be registered for an event other than the host itself.
@@ -151,7 +181,15 @@ export interface StateDecorator {
151
181
  (): PropertyDecorator;
152
182
  }
153
183
  export interface WatchDecorator {
154
- (propName: string): CustomMethodDecorator<any>;
184
+ (propName: any, watchOptions?: {
185
+ immediate?: boolean;
186
+ }): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
187
+ }
188
+ export interface PropSerializeDecorator {
189
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
190
+ }
191
+ export interface AttrDeserializeDecorator {
192
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
155
193
  }
156
194
  export interface UserBuildConditionals {
157
195
  isDev: boolean;
@@ -200,6 +238,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
200
238
  * https://stenciljs.com/docs/events#listen-decorator
201
239
  */
202
240
  export declare const Listen: ListenDecorator;
241
+ /**
242
+ * The `resolveVar()` function is a compile-time utility that resolves const variables
243
+ * and object properties to their string literal values. This allows variables to be
244
+ * used in `@Listen` and `@Event` decorators instead of hardcoded strings.
245
+ *
246
+ * @example
247
+ * ```ts
248
+ * const MY_EVENT = 'myEvent';
249
+ * @Listen(resolveVar(MY_EVENT))
250
+ * ```
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * const EVENTS = { MY_EVENT: 'myEvent' } as const;
255
+ * @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
256
+ * ```
257
+ */
258
+ export declare const resolveVar: ResolveVarFunction;
203
259
  /**
204
260
  * The `@Method()` decorator is used to expose methods on the public API.
205
261
  * Class methods decorated with the @Method() decorator can be called directly
@@ -233,6 +289,14 @@ export declare const State: StateDecorator;
233
289
  * https://stenciljs.com/docs/reactive-data#watch-decorator
234
290
  */
235
291
  export declare const Watch: WatchDecorator;
292
+ /**
293
+ * Decorator to serialize a property to an attribute string.
294
+ */
295
+ export declare const PropSerialize: PropSerializeDecorator;
296
+ /**
297
+ * Decorator to deserialize an attribute string to a property.
298
+ */
299
+ export declare const AttrDeserialize: AttrDeserializeDecorator;
236
300
  export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
237
301
  export type ErrorHandler = (err: any, element?: HTMLElement) => void;
238
302
  /**
@@ -349,6 +413,58 @@ export declare function readTask(task: RafCallback): void;
349
413
  * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
350
414
  */
351
415
  export declare const setErrorHandler: (handler: ErrorHandler) => void;
416
+ export type TagTransformer = (tag: string) => string;
417
+ /**
418
+ * Sets a tag transformer to be used when rendering your custom elements.
419
+ * ```ts
420
+ * setTagTransformer((tag) => {
421
+ * if (tag.startsWith('my-')) return `new-${tag}`
422
+ * return tag;
423
+ * });
424
+ * ```
425
+ * Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
426
+ *
427
+ * @param transformer the transformer function to use which must return a string.
428
+ */
429
+ export declare function setTagTransformer(transformer: TagTransformer): void;
430
+ /**
431
+ * Transforms a tag name using a transformer set via `setTagTransformer`
432
+ *
433
+ * @param tag - the tag to transform e.g. `my-tag`
434
+ * @returns the transformed tag e.g. `new-my-tag`
435
+ */
436
+ export declare function transformTag(tag: string): string;
437
+ /**
438
+ * @deprecated - Use `MixedInCtor` instead:
439
+ * ```ts
440
+ * import { MixedInCtor } from '@stencil/core';
441
+ *
442
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
443
+ * ```
444
+ */
445
+ export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
446
+ export type MixedInCtor<T = {}> = new (...args: any[]) => T;
447
+ /**
448
+ * Compose multiple mixin classes into a single constructor.
449
+ * The resulting class has the combined instance types of all mixed-in classes.
450
+ *
451
+ * Example:
452
+ * ```ts
453
+ * import { Mixin, MixedInCtor } from '@stencil/core';
454
+ *
455
+ * const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
456
+ * const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
457
+ * const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
458
+ *
459
+ * class X extends Mixin(AWrap, BWrap, CWrap) {
460
+ * render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
461
+ * }
462
+ * ```
463
+ *
464
+ * @param mixinFactories mixin factory functions that return a class which extends from the provided class.
465
+ * @returns a class that is composed from extending each of the provided classes in the order they were provided.
466
+ */
467
+ export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
352
468
  /**
353
469
  * This file gets copied to all distributions of stencil component collections.
354
470
  * - no imports
@@ -521,7 +637,7 @@ export interface FunctionalUtilities {
521
637
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
522
638
  }
523
639
  export interface FunctionalComponent<T = {}> {
524
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
640
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
525
641
  }
526
642
  /**
527
643
  * A Child VDOM node
@@ -563,6 +679,7 @@ export declare namespace h {
563
679
  function h(sel: any, data: VNodeData | null, text: string): VNode;
564
680
  function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
565
681
  function h(sel: any, data: VNodeData | null, children: VNode): VNode;
682
+ function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
566
683
  namespace JSX {
567
684
  interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
568
685
  [tagName: string]: any;
@@ -577,6 +694,36 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
577
694
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
578
695
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
579
696
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
697
+ export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
698
+ /**
699
+ * Automatic JSX runtime functions for TypeScript's react-jsx mode.
700
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsx".
701
+ * @param type type of node
702
+ * @param props properties of node
703
+ * @param key optional key for the node
704
+ * @returns a jsx vnode
705
+ */
706
+ export declare function jsx(type: any, props: any, key?: string): VNode;
707
+ /**
708
+ * Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
709
+ * @param type type of node
710
+ * @param props properties of node
711
+ * @param key optional key for the node
712
+ * @returns a jsx vnode
713
+ */
714
+ export declare function jsxs(type: any, props: any, key?: string): VNode;
715
+ /**
716
+ * Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
717
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
718
+ * @param type type of node
719
+ * @param props properties of node
720
+ * @param key optional key for the node
721
+ * @param isStaticChildren indicates if the children are static
722
+ * @param source source information
723
+ * @param self reference to the component instance
724
+ * @returns a jsx vnode
725
+ */
726
+ export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
580
727
  /**
581
728
  * A virtual DOM node
582
729
  */
@@ -606,7 +753,7 @@ declare namespace LocalJSX {
606
753
  export { LocalJSX as JSX };
607
754
  export declare namespace JSXBase {
608
755
  interface IntrinsicElements {
609
- slot: JSXBase.SlotAttributes;
756
+ slot: JSXBase.SlotAttributes<HTMLSlotElement>;
610
757
  a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
611
758
  abbr: JSXBase.HTMLAttributes;
612
759
  address: JSXBase.HTMLAttributes;
@@ -776,7 +923,7 @@ export declare namespace JSXBase {
776
923
  use: JSXBase.SVGAttributes;
777
924
  view: JSXBase.SVGAttributes;
778
925
  }
779
- interface SlotAttributes extends JSXAttributes {
926
+ interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
780
927
  name?: string;
781
928
  slot?: string;
782
929
  onSlotchange?: (event: Event) => void;
@@ -832,6 +979,9 @@ export declare namespace JSXBase {
832
979
  popoverTargetAction?: string;
833
980
  popoverTargetElement?: Element | null;
834
981
  popoverTarget?: string;
982
+ command?: string;
983
+ commandFor?: string;
984
+ commandfor?: string;
835
985
  }
836
986
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
837
987
  height?: number | string;
@@ -846,7 +996,7 @@ export declare namespace JSXBase {
846
996
  interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
847
997
  open?: boolean;
848
998
  name?: string;
849
- onToggle?: (event: Event) => void;
999
+ onToggle?: (event: ToggleEvent) => void;
850
1000
  }
851
1001
  interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
852
1002
  cite?: string;
@@ -1552,6 +1702,13 @@ export declare namespace JSXBase {
1552
1702
  z?: number | string;
1553
1703
  zoomAndPan?: string;
1554
1704
  }
1705
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
1706
+ interface ToggleEvent extends Event {
1707
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
1708
+ readonly newState: string;
1709
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
1710
+ readonly oldState: string;
1711
+ }
1555
1712
  interface DOMAttributes<T> extends JSXAttributes<T> {
1556
1713
  slot?: string;
1557
1714
  part?: string;
@@ -1568,6 +1725,10 @@ export declare namespace JSXBase {
1568
1725
  onCompositionstartCapture?: (event: CompositionEvent) => void;
1569
1726
  onCompositionupdate?: (event: CompositionEvent) => void;
1570
1727
  onCompositionupdateCapture?: (event: CompositionEvent) => void;
1728
+ onBeforeToggle?: (event: ToggleEvent) => void;
1729
+ onBeforeToggleCapture?: (event: ToggleEvent) => void;
1730
+ onToggle?: (event: ToggleEvent) => void;
1731
+ onToggleCapture?: (event: ToggleEvent) => void;
1571
1732
  onFocus?: (event: FocusEvent) => void;
1572
1733
  onFocusCapture?: (event: FocusEvent) => void;
1573
1734
  onFocusin?: (event: FocusEvent) => void;
@@ -1586,10 +1747,6 @@ export declare namespace JSXBase {
1586
1747
  onSubmitCapture?: (event: Event) => void;
1587
1748
  onInvalid?: (event: Event) => void;
1588
1749
  onInvalidCapture?: (event: Event) => void;
1589
- onBeforeToggle?: (event: Event) => void;
1590
- onBeforeToggleCapture?: (event: Event) => void;
1591
- onToggle?: (event: Event) => void;
1592
- onToggleCapture?: (event: Event) => void;
1593
1750
  onLoad?: (event: Event) => void;
1594
1751
  onLoadCapture?: (event: Event) => void;
1595
1752
  onError?: (event: Event) => void;
@@ -1601,7 +1758,7 @@ export declare namespace JSXBase {
1601
1758
  onKeyUp?: (event: KeyboardEvent) => void;
1602
1759
  onKeyUpCapture?: (event: KeyboardEvent) => void;
1603
1760
  onAuxClick?: (event: MouseEvent) => void;
1604
- onClick?: (event: MouseEvent) => void;
1761
+ onClick?: (event: PointerEvent) => void;
1605
1762
  onClickCapture?: (event: MouseEvent) => void;
1606
1763
  onContextMenu?: (event: MouseEvent) => void;
1607
1764
  onContextMenuCapture?: (event: MouseEvent) => void;
@@ -1693,6 +1850,7 @@ export interface CustomElementsDefineOptions {
1693
1850
  exclude?: string[];
1694
1851
  resourcesUrl?: string;
1695
1852
  syncQueue?: boolean;
1853
+ /** @deprecated in-favour of `setTagTransformer` and `transformTag` */
1696
1854
  transformTagName?: (tagName: string) => string;
1697
1855
  jmp?: (c: Function) => any;
1698
1856
  raf?: (c: FrameRequestCallback) => number;
@@ -0,0 +1,6 @@
1
+ import { type IconSpriteSheet } from '@ganpatiinfo/gids-web-theme-interface';
2
+ export type GidsThemeAsset = IconSpriteSheet;
3
+ export declare function setGidsAssetPaths(filePaths: Partial<Record<GidsThemeAsset, string>>, defaultPath?: string): void;
4
+ export declare function setGidsAssetPaths(defaultPath: string): void;
5
+ export declare const setGidsAssetFilePaths: (paths: Partial<Record<GidsThemeAsset, string>>) => void;
6
+ export declare const setGidsDefaultAssetDirPath: (path: string) => void;