@everymatrix/lottery-bullet 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/index-ea756967.js +1106 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/lottery-bullet.cjs.entry.js +41 -0
- package/dist/cjs/lottery-bullet.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/lottery-bullet/lottery-bullet.css +50 -0
- package/dist/collection/components/lottery-bullet/lottery-bullet.js +114 -0
- package/dist/collection/components/lottery-bullet/lottery-bullet.types.js +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +0 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +2 -0
- package/dist/components/lottery-bullet.d.ts +11 -0
- package/dist/components/lottery-bullet.js +59 -0
- package/dist/esm/index-5528cd5f.js +1080 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/lottery-bullet.entry.js +37 -0
- package/dist/esm/lottery-bullet.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/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-bullet/index.esm.js +0 -0
- package/dist/lottery-bullet/lottery-bullet.esm.js +1 -0
- package/dist/lottery-bullet/p-7009f302.js +2 -0
- package/dist/lottery-bullet/p-d86c6e28.entry.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-bullet/.stencil/packages/lottery-bullet/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-bullet/lottery-bullet.d.ts +22 -0
- package/dist/types/components/lottery-bullet/lottery-bullet.types.d.ts +4 -0
- package/dist/types/components.d.ts +70 -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 +0 -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-ea756967.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([["lottery-bullet.cjs",[[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ea756967.js');
|
|
6
|
+
|
|
7
|
+
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Circle{cursor:pointer;color:#000000;display:block;background:#FFF;border:solid 2px #00958f;height:20px;width:20px;border-radius:50%;margin:0;display:flex;align-items:center;justify-content:center;user-select:none;font-size:12px;font-weight:600;position:relative}.Circle:hover{background:#aee4e2}.Circle.Selected{color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{color:#707070;background:#D4D4D4;border:solid 2px #707070;cursor:default}.Circle.DisabledSelected{color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #707070;cursor:default}";
|
|
8
|
+
|
|
9
|
+
const LotteryBullet = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.bulletEvent = index.createEvent(this, "lotteryBulletSelection", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Value of the bullet
|
|
15
|
+
*/
|
|
16
|
+
this.value = '0';
|
|
17
|
+
/**
|
|
18
|
+
* Marks if the bullet should be selectable
|
|
19
|
+
*/
|
|
20
|
+
this.selectable = true;
|
|
21
|
+
/**
|
|
22
|
+
* Marks if the bullet should be selected
|
|
23
|
+
*/
|
|
24
|
+
this.isSelected = false;
|
|
25
|
+
this.select = () => {
|
|
26
|
+
if (this.selectable) {
|
|
27
|
+
this.isSelected = !this.isSelected;
|
|
28
|
+
this.bulletEvent.emit({
|
|
29
|
+
value: this.value,
|
|
30
|
+
selected: this.isSelected
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return (index.h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
LotteryBullet.style = lotteryBulletCss;
|
|
40
|
+
|
|
41
|
+
exports.lottery_bullet = LotteryBullet;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-ea756967.js');
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('lottery-bullet.cjs.js', document.baseURI).href));
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== '') {
|
|
12
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return index.promiseResolve(opts);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
patchBrowser().then(options => {
|
|
18
|
+
return index.bootstrapLazy([["lottery-bullet.cjs",[[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
19
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
.Circle {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
color: #000000;
|
|
10
|
+
display: block;
|
|
11
|
+
background: #FFF;
|
|
12
|
+
border: solid 2px #00958f;
|
|
13
|
+
height: 20px;
|
|
14
|
+
width: 20px;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
margin: 0;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
user-select: none;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.Circle:hover {
|
|
26
|
+
background: #aee4e2;
|
|
27
|
+
}
|
|
28
|
+
.Circle.Selected {
|
|
29
|
+
color: #ffffff;
|
|
30
|
+
background: #9EC258;
|
|
31
|
+
background: -webkit-radial-gradient(top, #00958f, #004D4A);
|
|
32
|
+
background: -moz-radial-gradient(top, #00958f, #004D4A);
|
|
33
|
+
background: radial-gradient(to bottom, #00958f, #004D4A);
|
|
34
|
+
border: solid 2px #00958f;
|
|
35
|
+
}
|
|
36
|
+
.Circle.Disabled {
|
|
37
|
+
color: #707070;
|
|
38
|
+
background: #D4D4D4;
|
|
39
|
+
border: solid 2px #707070;
|
|
40
|
+
cursor: default;
|
|
41
|
+
}
|
|
42
|
+
.Circle.DisabledSelected {
|
|
43
|
+
color: #ffffff;
|
|
44
|
+
background: #9EC258;
|
|
45
|
+
background: -webkit-radial-gradient(top, #00958f, #004D4A);
|
|
46
|
+
background: -moz-radial-gradient(top, #00958f, #004D4A);
|
|
47
|
+
background: radial-gradient(to bottom, #00958f, #004D4A);
|
|
48
|
+
border: solid 2px #707070;
|
|
49
|
+
cursor: default;
|
|
50
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Component, h, Prop, Event } from '@stencil/core';
|
|
2
|
+
export class LotteryBullet {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Value of the bullet
|
|
6
|
+
*/
|
|
7
|
+
this.value = '0';
|
|
8
|
+
/**
|
|
9
|
+
* Marks if the bullet should be selectable
|
|
10
|
+
*/
|
|
11
|
+
this.selectable = true;
|
|
12
|
+
/**
|
|
13
|
+
* Marks if the bullet should be selected
|
|
14
|
+
*/
|
|
15
|
+
this.isSelected = false;
|
|
16
|
+
this.select = () => {
|
|
17
|
+
if (this.selectable) {
|
|
18
|
+
this.isSelected = !this.isSelected;
|
|
19
|
+
this.bulletEvent.emit({
|
|
20
|
+
value: this.value,
|
|
21
|
+
selected: this.isSelected
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
28
|
+
}
|
|
29
|
+
static get is() { return "lottery-bullet"; }
|
|
30
|
+
static get encapsulation() { return "shadow"; }
|
|
31
|
+
static get originalStyleUrls() { return {
|
|
32
|
+
"$": ["lottery-bullet.scss"]
|
|
33
|
+
}; }
|
|
34
|
+
static get styleUrls() { return {
|
|
35
|
+
"$": ["lottery-bullet.css"]
|
|
36
|
+
}; }
|
|
37
|
+
static get properties() { return {
|
|
38
|
+
"value": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"mutable": false,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "string",
|
|
43
|
+
"resolved": "string",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": "Value of the bullet"
|
|
51
|
+
},
|
|
52
|
+
"attribute": "value",
|
|
53
|
+
"reflect": false,
|
|
54
|
+
"defaultValue": "'0'"
|
|
55
|
+
},
|
|
56
|
+
"selectable": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"mutable": false,
|
|
59
|
+
"complexType": {
|
|
60
|
+
"original": "boolean",
|
|
61
|
+
"resolved": "boolean",
|
|
62
|
+
"references": {}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": "Marks if the bullet should be selectable"
|
|
69
|
+
},
|
|
70
|
+
"attribute": "selectable",
|
|
71
|
+
"reflect": false,
|
|
72
|
+
"defaultValue": "true"
|
|
73
|
+
},
|
|
74
|
+
"isSelected": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "boolean",
|
|
79
|
+
"resolved": "boolean",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": "Marks if the bullet should be selected"
|
|
87
|
+
},
|
|
88
|
+
"attribute": "is-selected",
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"defaultValue": "false"
|
|
91
|
+
}
|
|
92
|
+
}; }
|
|
93
|
+
static get events() { return [{
|
|
94
|
+
"method": "bulletEvent",
|
|
95
|
+
"name": "lotteryBulletSelection",
|
|
96
|
+
"bubbles": true,
|
|
97
|
+
"cancelable": true,
|
|
98
|
+
"composed": true,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "When a bullet is selected/deselected this event is emmited"
|
|
102
|
+
},
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "BulletEvent",
|
|
105
|
+
"resolved": "BulletEvent",
|
|
106
|
+
"references": {
|
|
107
|
+
"BulletEvent": {
|
|
108
|
+
"location": "import",
|
|
109
|
+
"path": "./lottery-bullet.types"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}]; }
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* LotteryBullet custom elements */
|
|
2
|
+
export { LotteryBullet as LotteryBullet } from '../types/components/lottery-bullet/lottery-bullet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Used to manually set the base path where assets can be found.
|
|
6
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
7
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
8
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
9
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
10
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
11
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
12
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setAssetPath: (path: string) => void;
|
|
15
|
+
|
|
16
|
+
export interface SetPlatformOptions {
|
|
17
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
18
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
19
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
22
|
+
export * from '../types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LotteryBullet extends Components.LotteryBullet, HTMLElement {}
|
|
4
|
+
export const LotteryBullet: {
|
|
5
|
+
prototype: LotteryBullet;
|
|
6
|
+
new (): LotteryBullet;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Circle{cursor:pointer;color:#000000;display:block;background:#FFF;border:solid 2px #00958f;height:20px;width:20px;border-radius:50%;margin:0;display:flex;align-items:center;justify-content:center;user-select:none;font-size:12px;font-weight:600;position:relative}.Circle:hover{background:#aee4e2}.Circle.Selected{color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{color:#707070;background:#D4D4D4;border:solid 2px #707070;cursor:default}.Circle.DisabledSelected{color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #707070;cursor:default}";
|
|
4
|
+
|
|
5
|
+
const LotteryBullet$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.bulletEvent = createEvent(this, "lotteryBulletSelection", 7);
|
|
11
|
+
/**
|
|
12
|
+
* Value of the bullet
|
|
13
|
+
*/
|
|
14
|
+
this.value = '0';
|
|
15
|
+
/**
|
|
16
|
+
* Marks if the bullet should be selectable
|
|
17
|
+
*/
|
|
18
|
+
this.selectable = true;
|
|
19
|
+
/**
|
|
20
|
+
* Marks if the bullet should be selected
|
|
21
|
+
*/
|
|
22
|
+
this.isSelected = false;
|
|
23
|
+
this.select = () => {
|
|
24
|
+
if (this.selectable) {
|
|
25
|
+
this.isSelected = !this.isSelected;
|
|
26
|
+
this.bulletEvent.emit({
|
|
27
|
+
value: this.value,
|
|
28
|
+
selected: this.isSelected
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
35
|
+
}
|
|
36
|
+
static get style() { return lotteryBulletCss; }
|
|
37
|
+
}, [1, "lottery-bullet", {
|
|
38
|
+
"value": [1],
|
|
39
|
+
"selectable": [4],
|
|
40
|
+
"isSelected": [4, "is-selected"]
|
|
41
|
+
}]);
|
|
42
|
+
function defineCustomElement$1() {
|
|
43
|
+
if (typeof customElements === "undefined") {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const components = ["lottery-bullet"];
|
|
47
|
+
components.forEach(tagName => { switch (tagName) {
|
|
48
|
+
case "lottery-bullet":
|
|
49
|
+
if (!customElements.get(tagName)) {
|
|
50
|
+
customElements.define(tagName, LotteryBullet$1);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
} });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const LotteryBullet = LotteryBullet$1;
|
|
57
|
+
const defineCustomElement = defineCustomElement$1;
|
|
58
|
+
|
|
59
|
+
export { LotteryBullet, defineCustomElement };
|