xv-webcomponents 0.1.4 → 0.1.6
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-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-888a60d0.js +1198 -0
- package/dist/cjs/index-888a60d0.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/xv-button-v2_2.cjs.entry.js +68 -0
- package/dist/cjs/xv-button-v2_2.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +27 -0
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/xv-button/xv-button.js +119 -0
- package/dist/collection/components/xv-button/xv-button.js.map +1 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +22 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/index-5147034e.js +1170 -0
- package/dist/esm/index-5147034e.js.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/xv-button-v2_2.entry.js +63 -0
- package/dist/esm/xv-button-v2_2.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +22 -0
- package/dist/esm/xv-webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/xv-button/xv-button.d.ts +0 -4
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +0 -1
- package/dist/types/components.d.ts +0 -8
- package/dist/xv-webcomponents/index.esm.js +1 -16
- package/dist/xv-webcomponents/index.esm.js.map +1 -1
- package/dist/xv-webcomponents/p-02843f6e.entry.js +2 -0
- package/dist/xv-webcomponents/p-02843f6e.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-b6c1c52d.js +3 -0
- package/dist/xv-webcomponents/p-b6c1c52d.js.map +1 -0
- package/dist/xv-webcomponents/p-e1255160.js +2 -0
- package/dist/xv-webcomponents/p-e1255160.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -48
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/index.d.ts +0 -33
- package/dist/components/xv-button-v2.d.ts +0 -11
- package/dist/components/xv-checkbox-v2.d.ts +0 -11
- package/dist/xv-webcomponents/index-00c283a0.js +0 -3922
- package/dist/xv-webcomponents/index-00c283a0.js.map +0 -1
- package/dist/xv-webcomponents/index-13275c1e.js +0 -3922
- package/dist/xv-webcomponents/index-13275c1e.js.map +0 -1
- package/dist/xv-webcomponents/index-5f0a9e2d.js +0 -3922
- package/dist/xv-webcomponents/index-5f0a9e2d.js.map +0 -1
- package/dist/xv-webcomponents/xv-button-v2.entry.js +0 -45
- package/dist/xv-webcomponents/xv-button-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js +0 -28
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +0 -1
- /package/dist/{xv-webcomponents → esm}/app-globals-0f993ce5.js +0 -0
- /package/dist/{xv-webcomponents → esm}/app-globals-0f993ce5.js.map +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-888a60d0.js');
|
|
6
|
+
|
|
7
|
+
const XvButton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.buttonClick = index.createEvent(this, "buttonClick", 7);
|
|
11
|
+
/** Button label */
|
|
12
|
+
this.label = '';
|
|
13
|
+
/** Variant */
|
|
14
|
+
this.variant = 'primary';
|
|
15
|
+
/** Disabled state */
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
/** Handle click only if not disabled */
|
|
18
|
+
this.handleClick = () => {
|
|
19
|
+
if (this.disabled) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this.buttonClick.emit();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
applyGlobalStyles() {
|
|
26
|
+
var _a;
|
|
27
|
+
const globalStyle = document.getElementById("brand-style");
|
|
28
|
+
if (globalStyle) {
|
|
29
|
+
const styleClone = document.createElement("style");
|
|
30
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
31
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.applyGlobalStyles();
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (index.h("button", { key: '7f3af3f4e73a964d9742313bb63ded06ccdb4ea9', class: `xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`, onClick: this.handleClick }, this.label));
|
|
39
|
+
}
|
|
40
|
+
get el() { return index.getElement(this); }
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const XvCheckbox = class {
|
|
44
|
+
constructor(hostRef) {
|
|
45
|
+
index.registerInstance(this, hostRef);
|
|
46
|
+
}
|
|
47
|
+
applyGlobalStyles() {
|
|
48
|
+
var _a;
|
|
49
|
+
const globalStyle = document.getElementById("brand-style");
|
|
50
|
+
if (globalStyle) {
|
|
51
|
+
const styleClone = document.createElement("style");
|
|
52
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
53
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
this.applyGlobalStyles();
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
return (index.h("label", { key: 'ec72f67055064e97584c34606c997b671db5c4a6', class: "checkbox-container" }, index.h("input", { key: '5473f8ce3e1b85bbfc7ba2cfa56ed9dc3fc09254', type: "checkbox" }), index.h("span", { key: '9384407aa8a34a9c20cf46f68d508d71c3e0efa8', class: "checkmark" }), index.h("slot", { key: 'a3d8a7c8a242da4cdf71deddf2349c088bab4785' })));
|
|
61
|
+
}
|
|
62
|
+
get el() { return index.getElement(this); }
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.xv_button_v2 = XvButton;
|
|
66
|
+
exports.xv_checkbox_v2 = XvCheckbox;
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=xv-button-v2_2.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-button-v2.xv-checkbox-v2.entry.cjs.js","mappings":";;;;;;MAOa,QAAQ;IAJrB;;;;QAQU,UAAK,GAAW,EAAE,CAAC;;QAGnB,YAAO,GAA8D,SAAS,CAAC;;QAG/E,aAAQ,GAAY,KAAK,CAAC;;QAgB1B,gBAAW,GAAG;YACpB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YACD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;SACzB,CAAC;KAgBH;IA/BS,iBAAiB;;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE;YACf,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;SAC/C;KACF;IAUD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACEA,qEACE,KAAK,EAAE,aAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,EAAE,EACrE,OAAO,EAAE,IAAI,CAAC,WAAW,IAExB,IAAI,CAAC,KAAK,CACJ,EACT;KACH;;;;MC/CU,UAAU;;;;IAGb,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE;YACf,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;SAC7C;KACF;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACEA,oEAAO,KAAK,EAAC,oBAAoB,IAC/BA,oEAAO,IAAI,EAAC,UAAU,GAAG,EACzBA,mEAAM,KAAK,EAAC,WAAW,GAAQ,EAC/BA,oEAAa,CACP,EACR;KACH;;;;;;;","names":["h"],"sources":["src/components/xv-button/xv-button.tsx","src/components/xv-checkbox/xv-checkbox.tsx"],"sourcesContent":["import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\r\n\r\n\r\n@Component({\r\n tag: 'xv-button-v2',\r\n shadow: true,\r\n})\r\nexport class XvButton {\r\n @Element() el!: HTMLElement;\r\n\r\n /** Button label */\r\n @Prop() label: string = '';\r\n\r\n /** Variant */\r\n @Prop() variant: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost' = 'primary';\r\n\r\n /** Disabled state */\r\n @Prop() disabled: boolean = false;\r\n\r\n /** Emits when the button is clicked */\r\n @Event() buttonClick!: EventEmitter<void>;\r\n\r\n\r\n private applyGlobalStyles() {\r\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\r\n if (globalStyle) {\r\n const styleClone = document.createElement(\"style\");\r\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\r\n this.el.shadowRoot?.appendChild(styleClone);\r\n }\r\n }\r\n\r\n /** Handle click only if not disabled */\r\n private handleClick = () => {\r\n if (this.disabled) {\r\n return;\r\n }\r\n this.buttonClick.emit();\r\n };\r\n\r\n componentWillLoad() {\r\n this.applyGlobalStyles();\r\n }\r\n\r\n render() {\r\n return (\r\n <button\r\n class={`xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`}\r\n onClick={this.handleClick}\r\n >\r\n {this.label}\r\n </button>\r\n );\r\n }\r\n}\r\n","import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'xv-checkbox-v2',\n shadow: true, // ✅ Shadow DOM aktiviert\n})\nexport class XvCheckbox {\n @Element() el!: HTMLElement;\n\n private applyGlobalStyles() {\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\n if (globalStyle) {\n const styleClone = document.createElement(\"style\");\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\n this.el.shadowRoot?.appendChild(styleClone);\n }\n }\n\n componentWillLoad() {\n this.applyGlobalStyles();\n }\n\n render() {\n return (\n <label class=\"checkbox-container\">\n <input type=\"checkbox\" />\n <span class=\"checkmark\"></span>\n <slot></slot>\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-888a60d0.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('xv-webcomponents.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["xv-button-v2_2.cjs",[[1,"xv-button-v2",{"label":[1],"variant":[1],"disabled":[4]}],[1,"xv-checkbox-v2"]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=xv-webcomponents.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"xv-webcomponents.cjs.js","mappings":";;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,kNAAe,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,wBAAa,EAAE,CAAC;AACxB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","globalScripts","bootstrapLazy"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class XvButton {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Button label */
|
|
5
|
+
this.label = '';
|
|
6
|
+
/** Variant */
|
|
7
|
+
this.variant = 'primary';
|
|
8
|
+
/** Disabled state */
|
|
9
|
+
this.disabled = false;
|
|
10
|
+
/** Handle click only if not disabled */
|
|
11
|
+
this.handleClick = () => {
|
|
12
|
+
if (this.disabled) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
this.buttonClick.emit();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
applyGlobalStyles() {
|
|
19
|
+
var _a;
|
|
20
|
+
const globalStyle = document.getElementById("brand-style");
|
|
21
|
+
if (globalStyle) {
|
|
22
|
+
const styleClone = document.createElement("style");
|
|
23
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
24
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.applyGlobalStyles();
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h("button", { key: '7f3af3f4e73a964d9742313bb63ded06ccdb4ea9', class: `xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`, onClick: this.handleClick }, this.label));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "xv-button-v2"; }
|
|
34
|
+
static get encapsulation() { return "shadow"; }
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"label": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "string",
|
|
42
|
+
"resolved": "string",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": "Button label"
|
|
50
|
+
},
|
|
51
|
+
"getter": false,
|
|
52
|
+
"setter": false,
|
|
53
|
+
"attribute": "label",
|
|
54
|
+
"reflect": false,
|
|
55
|
+
"defaultValue": "''"
|
|
56
|
+
},
|
|
57
|
+
"variant": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost'",
|
|
62
|
+
"resolved": "\"accent\" | \"ghost\" | \"primary\" | \"secondary\" | \"tertiary\"",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": "Variant"
|
|
70
|
+
},
|
|
71
|
+
"getter": false,
|
|
72
|
+
"setter": false,
|
|
73
|
+
"attribute": "variant",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "'primary'"
|
|
76
|
+
},
|
|
77
|
+
"disabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "Disabled state"
|
|
90
|
+
},
|
|
91
|
+
"getter": false,
|
|
92
|
+
"setter": false,
|
|
93
|
+
"attribute": "disabled",
|
|
94
|
+
"reflect": false,
|
|
95
|
+
"defaultValue": "false"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get events() {
|
|
100
|
+
return [{
|
|
101
|
+
"method": "buttonClick",
|
|
102
|
+
"name": "buttonClick",
|
|
103
|
+
"bubbles": true,
|
|
104
|
+
"cancelable": true,
|
|
105
|
+
"composed": true,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Emits when the button is clicked"
|
|
109
|
+
},
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "void",
|
|
112
|
+
"resolved": "void",
|
|
113
|
+
"references": {}
|
|
114
|
+
}
|
|
115
|
+
}];
|
|
116
|
+
}
|
|
117
|
+
static get elementRef() { return "el"; }
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=xv-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-button.js","sourceRoot":"","sources":["../../../src/components/xv-button/xv-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,QAAQ;IAJrB;QAOE,mBAAmB;QACX,UAAK,GAAW,EAAE,CAAC;QAE3B,cAAc;QACN,YAAO,GAA8D,SAAS,CAAC;QAEvF,qBAAqB;QACb,aAAQ,GAAY,KAAK,CAAC;QAelC,wCAAwC;QAChC,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YACD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAC;KAgBH;IA/BS,iBAAiB;;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAUD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,+DACE,KAAK,EAAE,aAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EACrE,OAAO,EAAE,IAAI,CAAC,WAAW,IAExB,IAAI,CAAC,KAAK,CACJ,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\r\n\r\n\r\n@Component({\r\n tag: 'xv-button-v2',\r\n shadow: true,\r\n})\r\nexport class XvButton {\r\n @Element() el!: HTMLElement;\r\n\r\n /** Button label */\r\n @Prop() label: string = '';\r\n\r\n /** Variant */\r\n @Prop() variant: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost' = 'primary';\r\n\r\n /** Disabled state */\r\n @Prop() disabled: boolean = false;\r\n\r\n /** Emits when the button is clicked */\r\n @Event() buttonClick!: EventEmitter<void>;\r\n\r\n\r\n private applyGlobalStyles() {\r\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\r\n if (globalStyle) {\r\n const styleClone = document.createElement(\"style\");\r\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\r\n this.el.shadowRoot?.appendChild(styleClone);\r\n }\r\n }\r\n\r\n /** Handle click only if not disabled */\r\n private handleClick = () => {\r\n if (this.disabled) {\r\n return;\r\n }\r\n this.buttonClick.emit();\r\n };\r\n\r\n componentWillLoad() {\r\n this.applyGlobalStyles();\r\n }\r\n\r\n render() {\r\n return (\r\n <button\r\n class={`xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`}\r\n onClick={this.handleClick}\r\n >\r\n {this.label}\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class XvCheckbox {
|
|
3
|
+
applyGlobalStyles() {
|
|
4
|
+
var _a;
|
|
5
|
+
const globalStyle = document.getElementById("brand-style");
|
|
6
|
+
if (globalStyle) {
|
|
7
|
+
const styleClone = document.createElement("style");
|
|
8
|
+
styleClone.innerHTML = `@import url('${globalStyle.href}');`;
|
|
9
|
+
(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(styleClone);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
componentWillLoad() {
|
|
13
|
+
this.applyGlobalStyles();
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("label", { key: 'ec72f67055064e97584c34606c997b671db5c4a6', class: "checkbox-container" }, h("input", { key: '5473f8ce3e1b85bbfc7ba2cfa56ed9dc3fc09254', type: "checkbox" }), h("span", { key: '9384407aa8a34a9c20cf46f68d508d71c3e0efa8', class: "checkmark" }), h("slot", { key: 'a3d8a7c8a242da4cdf71deddf2349c088bab4785' })));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "xv-checkbox-v2"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get elementRef() { return "el"; }
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=xv-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-checkbox.js","sourceRoot":"","sources":["../../../src/components/xv-checkbox/xv-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAMtD,MAAM,OAAO,UAAU;IAGb,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,8DAAO,KAAK,EAAC,oBAAoB;YAC/B,8DAAO,IAAI,EAAC,UAAU,GAAG;YACzB,6DAAM,KAAK,EAAC,WAAW,GAAQ;YAC/B,8DAAa,CACP,CACT,CAAC;IACJ,CAAC;;;;CACF","sourcesContent":["import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'xv-checkbox-v2',\n shadow: true, // ✅ Shadow DOM aktiviert\n})\nexport class XvCheckbox {\n @Element() el!: HTMLElement;\n\n private applyGlobalStyles() {\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\n if (globalStyle) {\n const styleClone = document.createElement(\"style\");\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\n this.el.shadowRoot?.appendChild(styleClone);\n }\n }\n\n componentWillLoad() {\n this.applyGlobalStyles();\n }\n\n render() {\n return (\n <label class=\"checkbox-container\">\n <input type=\"checkbox\" />\n <span class=\"checkmark\"></span>\n <slot></slot>\n </label>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview entry point for your component library
|
|
3
|
+
*
|
|
4
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
5
|
+
* constants or data structure that accompany your components.
|
|
6
|
+
*
|
|
7
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
9
|
+
*/
|
|
10
|
+
export { format } from './utils/utils';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/**\r\n * @fileoverview entry point for your component library\r\n *\r\n * This is the entry point for your component library. Use this file to export utilities,\r\n * constants or data structure that accompany your components.\r\n *\r\n * DO NOT use this file to export your components. Instead, use the recommended approaches\r\n * to consume components of this package as outlined in the `README.md`.\r\n */\r\n\r\nexport { format } from './utils/utils';\r\nexport type * from './components.d.ts';\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjF,CAAC","sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\r\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\r\n}\r\n"]}
|