g-ui-core 0.0.1
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/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/g-button.cjs.entry.js +8 -0
- package/dist/cjs/g-ui.cjs.js +25 -0
- package/dist/cjs/index-DOlVX1hU.js +1580 -0
- package/dist/cjs/index.cjs.js +94 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/my-button/my-button.css +300 -0
- package/dist/collection/components/my-button/my-button.js +522 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/g-button.d.ts +11 -0
- package/dist/components/g-button.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/g-button.entry.js +2 -0
- package/dist/esm/g-ui.js +21 -0
- package/dist/esm/index-BVAZCj8P.js +1574 -0
- package/dist/esm/index.js +92 -0
- package/dist/esm/loader.js +11 -0
- package/dist/g-ui/g-ui.esm.js +1 -0
- package/dist/g-ui/index.esm.js +1 -0
- package/dist/g-ui/p-BVAZCj8P.js +2 -0
- package/dist/g-ui/p-DQuL1Twl.js +1 -0
- package/dist/g-ui/p-a0f43132.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/my-button/my-button.d.ts +32 -0
- package/dist/types/components.d.ts +205 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +38 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-BVAZCj8P.js';
|
|
2
|
+
|
|
3
|
+
const myButtonCss = () => `:host{display:inline-block}:host(:not(:first-child)){margin-left:12px}:host{--g-btn-color:#4f46e5;--g-btn-color-hover:#4338ca;--g-btn-color-active:#3730a3;--g-btn-text-color:#fff;--g-btn-plain-bg:#eef2ff}.btn{display:inline-flex;align-items:center;justify-content:center;gap:0.25em;border:1px solid var(--g-btn-color);border-radius:6px;font-family:inherit;font-weight:600;line-height:1;cursor:pointer;user-select:none;transition:all 0.2s ease;background-color:var(--g-btn-color);color:var(--g-btn-text-color);vertical-align:middle;text-decoration:none;white-space:nowrap}.btn:hover{background-color:var(--g-btn-color-hover);border-color:var(--g-btn-color-hover)}.btn:active{background-color:var(--g-btn-color-active);border-color:var(--g-btn-color-active)}.btn:disabled,.btn--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.btn--sm{padding:0.375rem 0.75rem;font-size:0.875rem}.btn--md{padding:0.5rem 1rem;font-size:1rem}.btn--lg{padding:0.75rem 1.5rem;font-size:1.125rem}.btn--primary{--g-btn-color:#4f46e5;--g-btn-color-hover:#4338ca;--g-btn-color-active:#3730a3;--g-btn-plain-bg:#eef2ff}.btn--success{--g-btn-color:#10b981;--g-btn-color-hover:#059669;--g-btn-color-active:#047857;--g-btn-plain-bg:#d1fae5}.btn--warning{--g-btn-color:#f59e0b;--g-btn-color-hover:#d97706;--g-btn-color-active:#b45309;--g-btn-plain-bg:#fef3c7}.btn--danger{--g-btn-color:#ef4444;--g-btn-color-hover:#dc2626;--g-btn-color-active:#b91c1c;--g-btn-plain-bg:#fee2e2}.btn--info,.btn--secondary{--g-btn-color:#6b7280;--g-btn-color-hover:#4b5563;--g-btn-color-active:#374151;--g-btn-plain-bg:#f3f4f6}.btn--plain{background-color:transparent;color:var(--g-btn-color)}.btn--plain:hover{background-color:var(--g-btn-plain-bg);color:var(--g-btn-color-hover);border-color:var(--g-btn-color-hover)}.btn--plain:active{background-color:var(--g-btn-plain-bg);color:var(--g-btn-color-active);border-color:var(--g-btn-color-active)}.btn--text{border-color:transparent;background-color:transparent;color:var(--g-btn-color)}.btn--text:hover{background-color:transparent;color:var(--g-btn-color-hover);border-color:transparent}.btn--text:active{color:var(--g-btn-color-active)}.btn--text.btn--bg:hover{background-color:var(--g-btn-plain-bg)}.btn--link{border-color:transparent;background-color:transparent;color:var(--g-btn-color);padding:0;font-weight:400}.btn--link:hover{background-color:transparent;color:var(--g-btn-color-hover);border-color:transparent;text-decoration:underline}.btn--link:active{color:var(--g-btn-color-active)}.btn--round{border-radius:9999px}.btn--circle{border-radius:50%;padding:0.5rem;width:2.5rem;height:2.5rem}.btn--circle.btn--sm{width:2rem;height:2rem;padding:0.375rem}.btn--circle.btn--lg{width:3rem;height:3rem;padding:0.75rem}.btn--dashed{border-style:dashed;background-color:color-mix(in srgb, var(--g-btn-color) 10%, transparent)}.btn--dashed:hover{background-color:color-mix(in srgb, var(--g-btn-color) 20%, transparent)}.btn--loading{cursor:wait;opacity:0.8}.btn__loading-icon{display:inline-flex;animation:g-spin 1s linear infinite}@keyframes g-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.btn__icon{display:inline-flex;font-size:1.1em}.btn__label{display:inline-flex;align-items:center}.btn--dark{--g-btn-color:#818cf8;--g-btn-color-hover:#6366f1;--g-btn-color-active:#4f46e5;--g-btn-plain-bg:#1e1b4b;--g-btn-text-color:#0f0f0f}.btn--dark.btn--plain{background-color:transparent;color:var(--g-btn-color);border-color:var(--g-btn-color)}.btn--dark.btn--text,.btn--dark.btn--link{color:var(--g-btn-color)}:host([style*='--g-btn-color']) .btn{background-color:var(--g-btn-color);border-color:var(--g-btn-color);color:var(--g-btn-text-color, #fff)}:host([style*='--g-btn-color']) .btn.btn--plain{background-color:transparent;color:var(--g-btn-color)}:host([style*='--g-btn-color']) .btn.btn--text,:host([style*='--g-btn-color']) .btn.btn--link{background-color:transparent;border-color:transparent;color:var(--g-btn-color)}`;
|
|
4
|
+
|
|
5
|
+
const MyButton = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.type = 'primary';
|
|
9
|
+
this.size = 'md';
|
|
10
|
+
this.plain = false;
|
|
11
|
+
this.text = false;
|
|
12
|
+
this.bg = false;
|
|
13
|
+
this.link = false;
|
|
14
|
+
this.round = false;
|
|
15
|
+
this.circle = false;
|
|
16
|
+
this.dashed = false;
|
|
17
|
+
this.loading = false;
|
|
18
|
+
this.loadingIcon = '●';
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.autofocus = false;
|
|
21
|
+
this.nativeType = 'button';
|
|
22
|
+
this.autoInsertSpace = false;
|
|
23
|
+
this.dark = false;
|
|
24
|
+
this.tag = 'button';
|
|
25
|
+
this.shouldAddSpace = false;
|
|
26
|
+
this.handleClick = (e) => {
|
|
27
|
+
if (this.loading || this.disabled) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
checkAutoSpace() {
|
|
34
|
+
if (!this.autoInsertSpace || !this.label) {
|
|
35
|
+
this.shouldAddSpace = false;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.shouldAddSpace =
|
|
39
|
+
this.label.length === 2 &&
|
|
40
|
+
/^[\u4e00-\u9fa5]+$/.test(this.label);
|
|
41
|
+
}
|
|
42
|
+
componentWillLoad() {
|
|
43
|
+
this.checkAutoSpace();
|
|
44
|
+
}
|
|
45
|
+
get computedClass() {
|
|
46
|
+
const { type, size, plain, text, bg, link, round, circle, dashed, loading, disabled, dark } = this;
|
|
47
|
+
const classes = ['btn', `btn--${type}`, `btn--${size}`];
|
|
48
|
+
if (plain)
|
|
49
|
+
classes.push('btn--plain');
|
|
50
|
+
if (text)
|
|
51
|
+
classes.push('btn--text');
|
|
52
|
+
if (bg)
|
|
53
|
+
classes.push('btn--bg');
|
|
54
|
+
if (link)
|
|
55
|
+
classes.push('btn--link');
|
|
56
|
+
if (round)
|
|
57
|
+
classes.push('btn--round');
|
|
58
|
+
if (circle)
|
|
59
|
+
classes.push('btn--circle');
|
|
60
|
+
if (dashed)
|
|
61
|
+
classes.push('btn--dashed');
|
|
62
|
+
if (loading)
|
|
63
|
+
classes.push('btn--loading');
|
|
64
|
+
if (disabled)
|
|
65
|
+
classes.push('btn--disabled');
|
|
66
|
+
if (dark)
|
|
67
|
+
classes.push('btn--dark');
|
|
68
|
+
return classes.join(' ');
|
|
69
|
+
}
|
|
70
|
+
get customStyle() {
|
|
71
|
+
if (!this.color)
|
|
72
|
+
return {};
|
|
73
|
+
return { '--g-btn-color': this.color };
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
const { loading, disabled, autofocus, nativeType, icon, label, tag: Tag, loadingIcon, shouldAddSpace, } = this;
|
|
77
|
+
const displayLabel = shouldAddSpace ? label.split('').join('\u2009') : label;
|
|
78
|
+
const content = (h(h.Fragment, null, loading && h("span", { key: '46a08c10ad7cadc4952dcb771c4dd1a244f7f156', class: "btn__loading-icon" }, loadingIcon), !loading && icon && h("span", { key: 'afc8df2cb5f8a21d6bdbe19cea1d809f388b64b1', class: "btn__icon" }, icon), displayLabel && h("span", { key: '8d52ddc448732cfbd94aaef3953a6c491ea8f173', class: "btn__label" }, displayLabel), h("slot", { key: 'c7e6e16593967cb08580c6c7fd7aa3728d6f921b' })));
|
|
79
|
+
return (h(Tag, { key: '734ed9490a23e332e0628809df532aed1035e2c5', class: this.computedClass, disabled: Tag === 'button' ? (disabled || loading) : undefined, type: Tag === 'button' ? nativeType : undefined, autofocus: Tag === 'button' ? autofocus : undefined, style: this.customStyle, onClick: this.handleClick }, content));
|
|
80
|
+
}
|
|
81
|
+
static get watchers() { return {
|
|
82
|
+
"label": [{
|
|
83
|
+
"checkAutoSpace": 0
|
|
84
|
+
}],
|
|
85
|
+
"autoInsertSpace": [{
|
|
86
|
+
"checkAutoSpace": 0
|
|
87
|
+
}]
|
|
88
|
+
}; }
|
|
89
|
+
};
|
|
90
|
+
MyButton.style = myButtonCss();
|
|
91
|
+
|
|
92
|
+
export { MyButton };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { b as bootstrapLazy } from './index-BVAZCj8P.js';
|
|
2
|
+
export { s as setNonce } from './index-BVAZCj8P.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
|
+
|
|
5
|
+
const defineCustomElements = async (win, options) => {
|
|
6
|
+
if (typeof window === 'undefined') return undefined;
|
|
7
|
+
await globalScripts();
|
|
8
|
+
return bootstrapLazy([["g-button",[[257,"g-button",{"type":[1],"size":[1],"plain":[4],"text":[4],"bg":[4],"link":[4],"round":[4],"circle":[4],"dashed":[4],"loading":[4],"loadingIcon":[1,"loading-icon"],"disabled":[4],"icon":[1],"autofocus":[4],"nativeType":[1,"native-type"],"autoInsertSpace":[4,"auto-insert-space"],"color":[1],"dark":[4],"tag":[1],"label":[1],"shouldAddSpace":[32]},null,{"label":[{"checkAutoSpace":0}],"autoInsertSpace":[{"checkAutoSpace":0}]}]]]], options);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { defineCustomElements };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as a,b as e}from"./p-BVAZCj8P.js";export{s as setNonce}from"./p-BVAZCj8P.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const e=import.meta.url,o={};return""!==e&&(o.resourcesUrl=new URL(".",e).href),a(o)})().then((async a=>(await o(),e([["p-a0f43132",[[257,"g-button",{type:[1],size:[1],plain:[4],text:[4],bg:[4],link:[4],round:[4],circle:[4],dashed:[4],loading:[4],loadingIcon:[1,"loading-icon"],disabled:[4],icon:[1],autofocus:[4],nativeType:[1,"native-type"],autoInsertSpace:[4,"auto-insert-space"],color:[1],dark:[4],tag:[1],label:[1],shouldAddSpace:[32]},null,{label:[{checkAutoSpace:0}],autoInsertSpace:[{checkAutoSpace:0}]}]]]],a))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o}from"./p-BVAZCj8P.js";const r=class{constructor(o){t(this,o),this.type="primary",this.size="md",this.plain=!1,this.text=!1,this.bg=!1,this.link=!1,this.round=!1,this.circle=!1,this.dashed=!1,this.loading=!1,this.loadingIcon="●",this.disabled=!1,this.autofocus=!1,this.nativeType="button",this.autoInsertSpace=!1,this.dark=!1,this.tag="button",this.shouldAddSpace=!1,this.handleClick=t=>{(this.loading||this.disabled)&&(t.preventDefault(),t.stopPropagation())}}checkAutoSpace(){this.shouldAddSpace=!(!this.autoInsertSpace||!this.label)&&2===this.label.length&&/^[\u4e00-\u9fa5]+$/.test(this.label)}componentWillLoad(){this.checkAutoSpace()}get computedClass(){const{type:t,size:o,plain:r,text:n,bg:e,link:a,round:c,circle:b,dashed:l,loading:i,disabled:s,dark:d}=this,g=["btn",`btn--${t}`,`btn--${o}`];return r&&g.push("btn--plain"),n&&g.push("btn--text"),e&&g.push("btn--bg"),a&&g.push("btn--link"),c&&g.push("btn--round"),b&&g.push("btn--circle"),l&&g.push("btn--dashed"),i&&g.push("btn--loading"),s&&g.push("btn--disabled"),d&&g.push("btn--dark"),g.join(" ")}get customStyle(){return this.color?{"--g-btn-color":this.color}:{}}render(){const{loading:t,disabled:r,autofocus:n,nativeType:e,icon:a,label:c,tag:b,loadingIcon:l,shouldAddSpace:i}=this,s=i?c.split("").join(" "):c,d=o(o.Fragment,null,t&&o("span",{key:"46a08c10ad7cadc4952dcb771c4dd1a244f7f156",class:"btn__loading-icon"},l),!t&&a&&o("span",{key:"afc8df2cb5f8a21d6bdbe19cea1d809f388b64b1",class:"btn__icon"},a),s&&o("span",{key:"8d52ddc448732cfbd94aaef3953a6c491ea8f173",class:"btn__label"},s),o("slot",{key:"c7e6e16593967cb08580c6c7fd7aa3728d6f921b"}));return o(b,{key:"734ed9490a23e332e0628809df532aed1035e2c5",class:this.computedClass,disabled:"button"===b?r||t:void 0,type:"button"===b?e:void 0,autofocus:"button"===b?n:void 0,style:this.customStyle,onClick:this.handleClick},d)}static get watchers(){return{label:[{checkAutoSpace:0}],autoInsertSpace:[{checkAutoSpace:0}]}}};r.style=":host{display:inline-block}:host(:not(:first-child)){margin-left:12px}:host{--g-btn-color:#4f46e5;--g-btn-color-hover:#4338ca;--g-btn-color-active:#3730a3;--g-btn-text-color:#fff;--g-btn-plain-bg:#eef2ff}.btn{display:inline-flex;align-items:center;justify-content:center;gap:0.25em;border:1px solid var(--g-btn-color);border-radius:6px;font-family:inherit;font-weight:600;line-height:1;cursor:pointer;user-select:none;transition:all 0.2s ease;background-color:var(--g-btn-color);color:var(--g-btn-text-color);vertical-align:middle;text-decoration:none;white-space:nowrap}.btn:hover{background-color:var(--g-btn-color-hover);border-color:var(--g-btn-color-hover)}.btn:active{background-color:var(--g-btn-color-active);border-color:var(--g-btn-color-active)}.btn:disabled,.btn--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.btn--sm{padding:0.375rem 0.75rem;font-size:0.875rem}.btn--md{padding:0.5rem 1rem;font-size:1rem}.btn--lg{padding:0.75rem 1.5rem;font-size:1.125rem}.btn--primary{--g-btn-color:#4f46e5;--g-btn-color-hover:#4338ca;--g-btn-color-active:#3730a3;--g-btn-plain-bg:#eef2ff}.btn--success{--g-btn-color:#10b981;--g-btn-color-hover:#059669;--g-btn-color-active:#047857;--g-btn-plain-bg:#d1fae5}.btn--warning{--g-btn-color:#f59e0b;--g-btn-color-hover:#d97706;--g-btn-color-active:#b45309;--g-btn-plain-bg:#fef3c7}.btn--danger{--g-btn-color:#ef4444;--g-btn-color-hover:#dc2626;--g-btn-color-active:#b91c1c;--g-btn-plain-bg:#fee2e2}.btn--info,.btn--secondary{--g-btn-color:#6b7280;--g-btn-color-hover:#4b5563;--g-btn-color-active:#374151;--g-btn-plain-bg:#f3f4f6}.btn--plain{background-color:transparent;color:var(--g-btn-color)}.btn--plain:hover{background-color:var(--g-btn-plain-bg);color:var(--g-btn-color-hover);border-color:var(--g-btn-color-hover)}.btn--plain:active{background-color:var(--g-btn-plain-bg);color:var(--g-btn-color-active);border-color:var(--g-btn-color-active)}.btn--text{border-color:transparent;background-color:transparent;color:var(--g-btn-color)}.btn--text:hover{background-color:transparent;color:var(--g-btn-color-hover);border-color:transparent}.btn--text:active{color:var(--g-btn-color-active)}.btn--text.btn--bg:hover{background-color:var(--g-btn-plain-bg)}.btn--link{border-color:transparent;background-color:transparent;color:var(--g-btn-color);padding:0;font-weight:400}.btn--link:hover{background-color:transparent;color:var(--g-btn-color-hover);border-color:transparent;text-decoration:underline}.btn--link:active{color:var(--g-btn-color-active)}.btn--round{border-radius:9999px}.btn--circle{border-radius:50%;padding:0.5rem;width:2.5rem;height:2.5rem}.btn--circle.btn--sm{width:2rem;height:2rem;padding:0.375rem}.btn--circle.btn--lg{width:3rem;height:3rem;padding:0.75rem}.btn--dashed{border-style:dashed;background-color:color-mix(in srgb, var(--g-btn-color) 10%, transparent)}.btn--dashed:hover{background-color:color-mix(in srgb, var(--g-btn-color) 20%, transparent)}.btn--loading{cursor:wait;opacity:0.8}.btn__loading-icon{display:inline-flex;animation:g-spin 1s linear infinite}@keyframes g-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.btn__icon{display:inline-flex;font-size:1.1em}.btn__label{display:inline-flex;align-items:center}.btn--dark{--g-btn-color:#818cf8;--g-btn-color-hover:#6366f1;--g-btn-color-active:#4f46e5;--g-btn-plain-bg:#1e1b4b;--g-btn-text-color:#0f0f0f}.btn--dark.btn--plain{background-color:transparent;color:var(--g-btn-color);border-color:var(--g-btn-color)}.btn--dark.btn--text,.btn--dark.btn--link{color:var(--g-btn-color)}:host([style*='--g-btn-color']) .btn{background-color:var(--g-btn-color);border-color:var(--g-btn-color);color:var(--g-btn-text-color, #fff)}:host([style*='--g-btn-color']) .btn.btn--plain{background-color:transparent;color:var(--g-btn-color)}:host([style*='--g-btn-color']) .btn.btn--text,:host([style*='--g-btn-color']) .btn.btn--link{background-color:transparent;border-color:transparent;color:var(--g-btn-color)}";export{r as MyButton}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.u?w($):f.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(m),b(v),(h=m.length>0)&&f.raf($)},w=t=>a().then(t),g=y(v,!0);function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(p?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?x(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,L);const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),A={},L={forEach:(t,e)=>t.map(R).forEach(e),map:(t,e)=>t.map(R).map(e).map(D)},R=t=>({vattrs:t.v,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.S,vtext:t.m}),D=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),C(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);return e.v=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},P=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},T=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,H=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=U(n);let i=U(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(u,a)?a.slice(2):a[2]+e.slice(3),n||l){const o=e.endsWith(W);e=e.replace(z,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}},N=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(N):[]),W="Capture",z=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of q(Object.keys(l)))t in i||H(o,t,l[t],void 0,n,e.u);for(const t of q(Object.keys(i)))H(o,t,l[t],i[t],n,e.u)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var F=!1,G=!1,Y=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=u.document.createTextNode(o.m);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=u.document.createElement(o.S),V(null,o,G),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=Y(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=O,l},Z=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=Y(null,n,l),s&&(o[l].O=s,J(r,s,e)))},_=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},B=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),I=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?("slot"!==e.S||F||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{f.u|=1;const e=t.closest(O.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(J(e,t,null!=n?n:null),t["s-sh"]=void 0)}f.u&=-2})(e.O.parentElement)),V(t,e,G),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.S?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(B(d,m,l))I(d,m,l),d=e[++r],m=o[++c];else if(B(p,v,l))I(p,v,l),p=e[--a],v=o[--h];else if(B(d,v,l))I(d,v,l),J(y,d.O,p.O.nextSibling),d=e[++r],v=o[--h];else if(B(p,m,l))I(p,m,l),J(y,p.O,d.O),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=Y(e&&e[c],n,u):(I(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=Y(e&&e[c],n,c),m=o[++c]),i&&J(d.O.parentNode,i,d.O)}r>a?Z(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&_(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),Z(o,null,e,i,0,i.length-1)):!n&&null!==l&&_(l,0,l.length-1)):t.m!==s&&(o.data=s)},J=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),K=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},Q=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);K(t,t.C);const n=()=>X(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},X=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw 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 l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=st(o,"componentWillLoad",void 0,n)):l=st(o,"componentWillUpdate",void 0,n),l=tt(l,(()=>st(o,"componentWillRender",void 0,n))),tt(l,(()=>nt(t,o,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=E(e),s=c.get(i);if(!u.document)return i;if(t=11===t.nodeType?t:u.document,s)if("string"==typeof s){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(i)){l=u.document.createElement("style"),l.textContent=s;const c=null!=(n=f.L)?n:S(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ot(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ot=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.R||x(null,null),s=(t=>t&&t.S===A)(e)?e:C(null,null,e);if(O=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.R=s,s.O=i.O=o.shadowRoot||o,F=!(!(1&l.u)||128&l.u),I(i,s,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;st(n,"componentDidRender",void 0,e),64&t.u?st(n,"componentDidUpdate",void 0,e):(t.u|=64,rt(e),st(n,"componentDidLoad",void 0,e),t.D(e),o||it()),t.M&&(t.M(),t.M=void 0),512&t.u&&w((()=>Q(t,!1))),t.u&=-517},it=()=>{w((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"g-ui"}});return t.dispatchEvent(e),e})(u)))},st=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=T(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.P){const t=l.P[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.A.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||Q(i,!1)}}},ut=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.P&&(n.P=P(e.watchers)),e.deserializers&&!n.T&&(n.T=e.deserializers),e.serializers&&!n.H&&(n.H=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,T(t,i)),void ct(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return ct(this,e,t,n),void(1&l&&!s.i&&s.A.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=T(t,i),ct(this,e,s.i[e],n)};s.i?o():s.A.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){f.jmp((()=>{var s;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==l){const o=f.i,r=null==(s=n.P)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.P)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},ft=(t,e)=>{st(t,"connectedCallback",void 0,e)},at=(t,e)=>{st(t,"disconnectedCallback",void 0,e||t)},dt=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],a=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(f,e),f.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u;const p={u:e[0],h:e[1],t:e[2],N:e[3]};p.t=e[2],p.P=P(e[4]),p.H=null!=(n=e[5])?n:{},p.T=null!=(u=e[6])?u:{};const h=p.h,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.W=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?ft(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>ft(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){K(e,e.C=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 o;try{if(!(32&e.u)){if(e.u|=32,n.V){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.V;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.q}" was not found`);o.isProxied||(n.P=P(o.watchers),n.H=o.serializers,n.T=o.deserializers,ut(o,n,2),o.isProxied=!0);const i=()=>{};e.u|=8;try{new o(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,i(),ft(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,i=()=>Q(e,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.D&&e.D(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const e=o(t);(null==e?void 0:e.i)?at(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>at(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.R)?void 0:t.O)instanceof Node&&!e.R.O.isConnected&&delete e.R.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.W}};p.V=t[0],i.includes(h)||a.get(h)||(l.push(h),a.define(h,ut(m,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=f.L)?n:S(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>y=setTimeout(it,30)))},pt=t=>f.L=t;export{dt as b,C as h,a as p,l as r,pt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MyButton as g_button}from"./index.esm.js";import"./p-BVAZCj8P.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'secondary';
|
|
2
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type NativeButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
+
export declare class MyButton {
|
|
5
|
+
type: ButtonType;
|
|
6
|
+
size: ButtonSize;
|
|
7
|
+
plain: boolean;
|
|
8
|
+
text: boolean;
|
|
9
|
+
bg: boolean;
|
|
10
|
+
link: boolean;
|
|
11
|
+
round: boolean;
|
|
12
|
+
circle: boolean;
|
|
13
|
+
dashed: boolean;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
loadingIcon: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
icon?: string;
|
|
18
|
+
autofocus: boolean;
|
|
19
|
+
nativeType: NativeButtonType;
|
|
20
|
+
autoInsertSpace: boolean;
|
|
21
|
+
color?: string;
|
|
22
|
+
dark: boolean;
|
|
23
|
+
tag: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
private shouldAddSpace;
|
|
26
|
+
checkAutoSpace(): void;
|
|
27
|
+
componentWillLoad(): void;
|
|
28
|
+
private get computedClass();
|
|
29
|
+
private get customStyle();
|
|
30
|
+
private handleClick;
|
|
31
|
+
render(): any;
|
|
32
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { ButtonSize, ButtonType, NativeButtonType } from "./components/my-button/my-button";
|
|
9
|
+
export { ButtonSize, ButtonType, NativeButtonType } from "./components/my-button/my-button";
|
|
10
|
+
export namespace Components {
|
|
11
|
+
interface GButton {
|
|
12
|
+
/**
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
"autoInsertSpace": boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
"autofocus": boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
"bg": boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
"circle": boolean;
|
|
28
|
+
"color"?: string;
|
|
29
|
+
/**
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
"dark": boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
"dashed": boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
"disabled": boolean;
|
|
41
|
+
"icon"?: string;
|
|
42
|
+
"label"?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
"link": boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
"loading": boolean;
|
|
51
|
+
/**
|
|
52
|
+
* @default '●'
|
|
53
|
+
*/
|
|
54
|
+
"loadingIcon": string;
|
|
55
|
+
/**
|
|
56
|
+
* @default 'button'
|
|
57
|
+
*/
|
|
58
|
+
"nativeType": NativeButtonType;
|
|
59
|
+
/**
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
"plain": boolean;
|
|
63
|
+
/**
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
"round": boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @default 'md'
|
|
69
|
+
*/
|
|
70
|
+
"size": ButtonSize;
|
|
71
|
+
/**
|
|
72
|
+
* @default 'button'
|
|
73
|
+
*/
|
|
74
|
+
"tag": string;
|
|
75
|
+
/**
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
"text": boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @default 'primary'
|
|
81
|
+
*/
|
|
82
|
+
"type": ButtonType;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
declare global {
|
|
86
|
+
interface HTMLGButtonElement extends Components.GButton, HTMLStencilElement {
|
|
87
|
+
}
|
|
88
|
+
var HTMLGButtonElement: {
|
|
89
|
+
prototype: HTMLGButtonElement;
|
|
90
|
+
new (): HTMLGButtonElement;
|
|
91
|
+
};
|
|
92
|
+
interface HTMLElementTagNameMap {
|
|
93
|
+
"g-button": HTMLGButtonElement;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
declare namespace LocalJSX {
|
|
97
|
+
interface GButton {
|
|
98
|
+
/**
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
"autoInsertSpace"?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
"autofocus"?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
"bg"?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
"circle"?: boolean;
|
|
114
|
+
"color"?: string;
|
|
115
|
+
/**
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
"dark"?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
"dashed"?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
"disabled"?: boolean;
|
|
127
|
+
"icon"?: string;
|
|
128
|
+
"label"?: string;
|
|
129
|
+
/**
|
|
130
|
+
* @default false
|
|
131
|
+
*/
|
|
132
|
+
"link"?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
"loading"?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* @default '●'
|
|
139
|
+
*/
|
|
140
|
+
"loadingIcon"?: string;
|
|
141
|
+
/**
|
|
142
|
+
* @default 'button'
|
|
143
|
+
*/
|
|
144
|
+
"nativeType"?: NativeButtonType;
|
|
145
|
+
/**
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
"plain"?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
"round"?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* @default 'md'
|
|
155
|
+
*/
|
|
156
|
+
"size"?: ButtonSize;
|
|
157
|
+
/**
|
|
158
|
+
* @default 'button'
|
|
159
|
+
*/
|
|
160
|
+
"tag"?: string;
|
|
161
|
+
/**
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
"text"?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* @default 'primary'
|
|
167
|
+
*/
|
|
168
|
+
"type"?: ButtonType;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface GButtonAttributes {
|
|
172
|
+
"type": ButtonType;
|
|
173
|
+
"size": ButtonSize;
|
|
174
|
+
"plain": boolean;
|
|
175
|
+
"text": boolean;
|
|
176
|
+
"bg": boolean;
|
|
177
|
+
"link": boolean;
|
|
178
|
+
"round": boolean;
|
|
179
|
+
"circle": boolean;
|
|
180
|
+
"dashed": boolean;
|
|
181
|
+
"loading": boolean;
|
|
182
|
+
"loadingIcon": string;
|
|
183
|
+
"disabled": boolean;
|
|
184
|
+
"icon": string;
|
|
185
|
+
"autofocus": boolean;
|
|
186
|
+
"nativeType": NativeButtonType;
|
|
187
|
+
"autoInsertSpace": boolean;
|
|
188
|
+
"color": string;
|
|
189
|
+
"dark": boolean;
|
|
190
|
+
"tag": string;
|
|
191
|
+
"label": string;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
interface IntrinsicElements {
|
|
195
|
+
"g-button": Omit<GButton, keyof GButtonAttributes> & { [K in keyof GButton & keyof GButtonAttributes]?: GButton[K] } & { [K in keyof GButton & keyof GButtonAttributes as `attr:${K}`]?: GButtonAttributes[K] } & { [K in keyof GButton & keyof GButtonAttributes as `prop:${K}`]?: GButton[K] };
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
export { LocalJSX as JSX };
|
|
199
|
+
declare module "@stencil/core" {
|
|
200
|
+
export namespace JSX {
|
|
201
|
+
interface IntrinsicElements {
|
|
202
|
+
"g-button": LocalJSX.IntrinsicElements["g-button"] & JSXBase.HTMLAttributes<HTMLGButtonElement>;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|