@everymatrix/helper-tabs 0.0.3
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/helper-tab_2.cjs.entry.js +65 -0
- package/dist/cjs/helper-tabs.cjs.js +19 -0
- package/dist/cjs/index-1c312caa.js +1164 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/helper-tab/helper-tab.css +3 -0
- package/dist/collection/components/helper-tab/helper-tab.js +69 -0
- package/dist/collection/components/helper-tabs/helper-tabs.css +34 -0
- package/dist/collection/components/helper-tabs/helper-tabs.js +154 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +33 -0
- package/dist/components/helper-tab.d.ts +11 -0
- package/dist/components/helper-tab.js +6 -0
- package/dist/components/helper-tab2.js +47 -0
- package/dist/components/helper-tabs.d.ts +11 -0
- package/dist/components/helper-tabs.js +65 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.js +3 -0
- package/dist/esm/helper-tab_2.entry.js +60 -0
- package/dist/esm/helper-tabs.js +17 -0
- package/dist/esm/index-1d6a1419.js +1138 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/helper-tabs/helper-tabs.esm.js +1 -0
- package/dist/helper-tabs/index.esm.js +0 -0
- package/dist/helper-tabs/p-a82226ce.entry.js +1 -0
- package/dist/helper-tabs/p-ae7ea99b.js +2 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/helper-tabs/.stencil/packages/helper-tabs/stencil.config.d.ts +2 -0
- package/dist/types/components/helper-tab/helper-tab.d.ts +15 -0
- package/dist/types/components/helper-tabs/helper-tabs.d.ts +29 -0
- package/dist/types/components.d.ts +114 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/utils.d.ts +15 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +19 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1c312caa.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchEsm = () => {
|
|
11
|
+
return index.promiseResolve();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const defineCustomElements = (win, options) => {
|
|
15
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
+
return patchEsm().then(() => {
|
|
17
|
+
return index.bootstrapLazy([["helper-tab_2.cjs",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/helper-tab/helper-tab.js",
|
|
4
|
+
"./components/helper-tabs/helper-tabs.js"
|
|
5
|
+
],
|
|
6
|
+
"compiler": {
|
|
7
|
+
"name": "@stencil/core",
|
|
8
|
+
"version": "2.17.0",
|
|
9
|
+
"typescriptVersion": "4.5.4"
|
|
10
|
+
},
|
|
11
|
+
"collections": [],
|
|
12
|
+
"bundles": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
export class HelperTab {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Selected index
|
|
6
|
+
*/
|
|
7
|
+
this.selectedIndex = 0;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Endpoing for CMS
|
|
11
|
+
*/
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
/**
|
|
14
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
15
|
+
*/
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return [
|
|
19
|
+
h("div", null,
|
|
20
|
+
"Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.",
|
|
21
|
+
this.selectedIndex + 1)
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "helper-tab"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() { return {
|
|
27
|
+
"$": ["helper-tab.scss"]
|
|
28
|
+
}; }
|
|
29
|
+
static get styleUrls() { return {
|
|
30
|
+
"$": ["helper-tab.css"]
|
|
31
|
+
}; }
|
|
32
|
+
static get properties() { return {
|
|
33
|
+
"selectedIndex": {
|
|
34
|
+
"type": "number",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "number",
|
|
38
|
+
"resolved": "number",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": "Selected index"
|
|
46
|
+
},
|
|
47
|
+
"attribute": "selected-index",
|
|
48
|
+
"reflect": false,
|
|
49
|
+
"defaultValue": "0"
|
|
50
|
+
},
|
|
51
|
+
"cmsEndpoint": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "string",
|
|
56
|
+
"resolved": "string",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": "Endpoing for CMS"
|
|
64
|
+
},
|
|
65
|
+
"attribute": "cms-endpoint",
|
|
66
|
+
"reflect": false
|
|
67
|
+
}
|
|
68
|
+
}; }
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: "Roboto", sans-serif;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.Tabs {
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: 10px;
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.TabButton {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
width: auto;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
padding: 8px 15px;
|
|
18
|
+
margin: 5px 0 10px;
|
|
19
|
+
border: 1px solid #009993;
|
|
20
|
+
background: #FFF;
|
|
21
|
+
color: #000;
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
transition: all 0.2s linear;
|
|
24
|
+
text-align: center;
|
|
25
|
+
letter-spacing: 0;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
}
|
|
28
|
+
.TabButton:hover {
|
|
29
|
+
background: #F1F1F1;
|
|
30
|
+
}
|
|
31
|
+
.TabButton.Active {
|
|
32
|
+
background: #009993;
|
|
33
|
+
color: #FFF;
|
|
34
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Component, Prop, Element, h } from '@stencil/core';
|
|
2
|
+
export class HelperTabs {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Tell me if it is disabled
|
|
6
|
+
*/
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
/**
|
|
9
|
+
* Tell me what tab is selected
|
|
10
|
+
*/
|
|
11
|
+
this.selected = false;
|
|
12
|
+
/**
|
|
13
|
+
* Default selected index
|
|
14
|
+
*/
|
|
15
|
+
this.selectedIndex = 0;
|
|
16
|
+
/**
|
|
17
|
+
* Tabs details
|
|
18
|
+
*/
|
|
19
|
+
this.tabs = [{ label: 'Draw Details' }, { label: 'Winnings' }, { label: 'How to Play' }, { label: 'Game Odds' }, { label: 'FAQs' }];
|
|
20
|
+
}
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
if (this.tabs.length == 0) {
|
|
23
|
+
// fetch CMS data
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return (h("div", null,
|
|
28
|
+
h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))),
|
|
29
|
+
h("div", null,
|
|
30
|
+
h("helper-tab", { selectedIndex: this.selectedIndex }))));
|
|
31
|
+
}
|
|
32
|
+
static get is() { return "helper-tabs"; }
|
|
33
|
+
static get encapsulation() { return "shadow"; }
|
|
34
|
+
static get originalStyleUrls() { return {
|
|
35
|
+
"$": ["helper-tabs.scss"]
|
|
36
|
+
}; }
|
|
37
|
+
static get styleUrls() { return {
|
|
38
|
+
"$": ["helper-tabs.css"]
|
|
39
|
+
}; }
|
|
40
|
+
static get properties() { return {
|
|
41
|
+
"disabled": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"mutable": false,
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "boolean",
|
|
46
|
+
"resolved": "boolean",
|
|
47
|
+
"references": {}
|
|
48
|
+
},
|
|
49
|
+
"required": false,
|
|
50
|
+
"optional": false,
|
|
51
|
+
"docs": {
|
|
52
|
+
"tags": [],
|
|
53
|
+
"text": "Tell me if it is disabled"
|
|
54
|
+
},
|
|
55
|
+
"attribute": "disabled",
|
|
56
|
+
"reflect": false,
|
|
57
|
+
"defaultValue": "false"
|
|
58
|
+
},
|
|
59
|
+
"label": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "string",
|
|
64
|
+
"resolved": "string",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "Gimme names or you die"
|
|
72
|
+
},
|
|
73
|
+
"attribute": "label",
|
|
74
|
+
"reflect": false
|
|
75
|
+
},
|
|
76
|
+
"selected": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "boolean",
|
|
81
|
+
"resolved": "boolean",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "Tell me what tab is selected"
|
|
89
|
+
},
|
|
90
|
+
"attribute": "selected",
|
|
91
|
+
"reflect": false,
|
|
92
|
+
"defaultValue": "false"
|
|
93
|
+
},
|
|
94
|
+
"cmsEndpoint": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "string",
|
|
99
|
+
"resolved": "string",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "Endpoing for CMS"
|
|
107
|
+
},
|
|
108
|
+
"attribute": "cms-endpoint",
|
|
109
|
+
"reflect": false
|
|
110
|
+
},
|
|
111
|
+
"selectedIndex": {
|
|
112
|
+
"type": "number",
|
|
113
|
+
"mutable": true,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "number",
|
|
116
|
+
"resolved": "number",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Default selected index"
|
|
124
|
+
},
|
|
125
|
+
"attribute": "selected-index",
|
|
126
|
+
"reflect": true,
|
|
127
|
+
"defaultValue": "0"
|
|
128
|
+
},
|
|
129
|
+
"tabs": {
|
|
130
|
+
"type": "unknown",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "Array<Object>",
|
|
134
|
+
"resolved": "Object[]",
|
|
135
|
+
"references": {
|
|
136
|
+
"Array": {
|
|
137
|
+
"location": "global"
|
|
138
|
+
},
|
|
139
|
+
"Object": {
|
|
140
|
+
"location": "global"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "Tabs details"
|
|
149
|
+
},
|
|
150
|
+
"defaultValue": "[{label: 'Draw Details'}, {label: 'Winnings'}, {label: 'How to Play'}, {label: 'Game Odds'}, {label: 'FAQs'}]"
|
|
151
|
+
}
|
|
152
|
+
}; }
|
|
153
|
+
static get elementRef() { return "host"; }
|
|
154
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function format(first, middle, last) {
|
|
2
|
+
return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* @name isMobile
|
|
6
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
7
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
8
|
+
* @returns {Boolean} true or false
|
|
9
|
+
*/
|
|
10
|
+
export const isMobile = (userAgent) => {
|
|
11
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
12
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
13
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
14
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @name getDevice
|
|
18
|
+
* @description A method that returns the type of the device
|
|
19
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
20
|
+
* @returns {String} Android/iPhone/iPad/PC
|
|
21
|
+
*/
|
|
22
|
+
export const getDevice = (userAgent) => {
|
|
23
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
24
|
+
return 'Android';
|
|
25
|
+
}
|
|
26
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
27
|
+
return 'iPhone';
|
|
28
|
+
}
|
|
29
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
30
|
+
return 'iPad';
|
|
31
|
+
}
|
|
32
|
+
return 'PC';
|
|
33
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface HelperTab extends Components.HelperTab, HTMLElement {}
|
|
4
|
+
export const HelperTab: {
|
|
5
|
+
prototype: HelperTab;
|
|
6
|
+
new (): HelperTab;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const helperTabCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Selected index
|
|
12
|
+
*/
|
|
13
|
+
this.selectedIndex = 0;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Endpoing for CMS
|
|
17
|
+
*/
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
/**
|
|
20
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
21
|
+
*/
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return [
|
|
25
|
+
h("div", null, "Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.", this.selectedIndex + 1)
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
static get style() { return helperTabCss; }
|
|
29
|
+
}, [1, "helper-tab", {
|
|
30
|
+
"selectedIndex": [2, "selected-index"],
|
|
31
|
+
"cmsEndpoint": [1, "cms-endpoint"]
|
|
32
|
+
}]);
|
|
33
|
+
function defineCustomElement() {
|
|
34
|
+
if (typeof customElements === "undefined") {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const components = ["helper-tab"];
|
|
38
|
+
components.forEach(tagName => { switch (tagName) {
|
|
39
|
+
case "helper-tab":
|
|
40
|
+
if (!customElements.get(tagName)) {
|
|
41
|
+
customElements.define(tagName, HelperTab);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { HelperTab as H, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface HelperTabs extends Components.HelperTabs, HTMLElement {}
|
|
4
|
+
export const HelperTabs: {
|
|
5
|
+
prototype: HelperTabs;
|
|
6
|
+
new (): HelperTabs;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './helper-tab2.js';
|
|
3
|
+
|
|
4
|
+
const helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}";
|
|
5
|
+
|
|
6
|
+
const HelperTabs$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
/**
|
|
12
|
+
* Tell me if it is disabled
|
|
13
|
+
*/
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
/**
|
|
16
|
+
* Tell me what tab is selected
|
|
17
|
+
*/
|
|
18
|
+
this.selected = false;
|
|
19
|
+
/**
|
|
20
|
+
* Default selected index
|
|
21
|
+
*/
|
|
22
|
+
this.selectedIndex = 0;
|
|
23
|
+
/**
|
|
24
|
+
* Tabs details
|
|
25
|
+
*/
|
|
26
|
+
this.tabs = [{ label: 'Draw Details' }, { label: 'Winnings' }, { label: 'How to Play' }, { label: 'Game Odds' }, { label: 'FAQs' }];
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
|
|
32
|
+
}
|
|
33
|
+
get host() { return this; }
|
|
34
|
+
static get style() { return helperTabsCss; }
|
|
35
|
+
}, [1, "helper-tabs", {
|
|
36
|
+
"disabled": [4],
|
|
37
|
+
"label": [1],
|
|
38
|
+
"selected": [4],
|
|
39
|
+
"cmsEndpoint": [1, "cms-endpoint"],
|
|
40
|
+
"selectedIndex": [1538, "selected-index"],
|
|
41
|
+
"tabs": [16]
|
|
42
|
+
}]);
|
|
43
|
+
function defineCustomElement$1() {
|
|
44
|
+
if (typeof customElements === "undefined") {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const components = ["helper-tabs", "helper-tab"];
|
|
48
|
+
components.forEach(tagName => { switch (tagName) {
|
|
49
|
+
case "helper-tabs":
|
|
50
|
+
if (!customElements.get(tagName)) {
|
|
51
|
+
customElements.define(tagName, HelperTabs$1);
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case "helper-tab":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
defineCustomElement$2();
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
} });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const HelperTabs = HelperTabs$1;
|
|
63
|
+
const defineCustomElement = defineCustomElement$1;
|
|
64
|
+
|
|
65
|
+
export { HelperTabs, defineCustomElement };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* HelperTabs custom elements */
|
|
2
|
+
export { HelperTab as HelperTab } from '../types/components/helper-tab/helper-tab';
|
|
3
|
+
export { HelperTabs as HelperTabs } from '../types/components/helper-tabs/helper-tabs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Used to manually set the base path where assets can be found.
|
|
7
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
8
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
9
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
10
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
11
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
12
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
13
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
14
|
+
*/
|
|
15
|
+
export declare const setAssetPath: (path: string) => void;
|
|
16
|
+
|
|
17
|
+
export interface SetPlatformOptions {
|
|
18
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
19
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
20
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
23
|
+
export * from '../types';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
export { HelperTab, defineCustomElement as defineCustomElementHelperTab } from './helper-tab.js';
|
|
3
|
+
export { HelperTabs, defineCustomElement as defineCustomElementHelperTabs } from './helper-tabs.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-1d6a1419.js';
|
|
2
|
+
|
|
3
|
+
const helperTabCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const HelperTab = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/**
|
|
9
|
+
* Selected index
|
|
10
|
+
*/
|
|
11
|
+
this.selectedIndex = 0;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Endpoing for CMS
|
|
15
|
+
*/
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
/**
|
|
18
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
19
|
+
*/
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return [
|
|
23
|
+
h("div", null, "Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.", this.selectedIndex + 1)
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
HelperTab.style = helperTabCss;
|
|
28
|
+
|
|
29
|
+
const helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}";
|
|
30
|
+
|
|
31
|
+
const HelperTabs = class {
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
34
|
+
/**
|
|
35
|
+
* Tell me if it is disabled
|
|
36
|
+
*/
|
|
37
|
+
this.disabled = false;
|
|
38
|
+
/**
|
|
39
|
+
* Tell me what tab is selected
|
|
40
|
+
*/
|
|
41
|
+
this.selected = false;
|
|
42
|
+
/**
|
|
43
|
+
* Default selected index
|
|
44
|
+
*/
|
|
45
|
+
this.selectedIndex = 0;
|
|
46
|
+
/**
|
|
47
|
+
* Tabs details
|
|
48
|
+
*/
|
|
49
|
+
this.tabs = [{ label: 'Draw Details' }, { label: 'Winnings' }, { label: 'How to Play' }, { label: 'Game Odds' }, { label: 'FAQs' }];
|
|
50
|
+
}
|
|
51
|
+
connectedCallback() {
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
|
|
55
|
+
}
|
|
56
|
+
get host() { return getElement(this); }
|
|
57
|
+
};
|
|
58
|
+
HelperTabs.style = helperTabsCss;
|
|
59
|
+
|
|
60
|
+
export { HelperTab as helper_tab, HelperTabs as helper_tabs };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-1d6a1419.js';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
5
|
+
*/
|
|
6
|
+
const patchBrowser = () => {
|
|
7
|
+
const importMeta = import.meta.url;
|
|
8
|
+
const opts = {};
|
|
9
|
+
if (importMeta !== '') {
|
|
10
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
11
|
+
}
|
|
12
|
+
return promiseResolve(opts);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
patchBrowser().then(options => {
|
|
16
|
+
return bootstrapLazy([["helper-tab_2",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"]}]]]], options);
|
|
17
|
+
});
|