@everymatrix/lottery-selection 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-3a1e7e63.js +5 -0
- package/dist/cjs/index-9b8fe4ee.js +1215 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-selection-3122c2e3.js +214 -0
- package/dist/cjs/lottery-selection.cjs.entry.js +10 -0
- package/dist/cjs/lottery-selection.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/lottery-selection/index.js +1 -0
- package/dist/collection/components/lottery-selection/lottery-selection.css +64 -0
- package/dist/collection/components/lottery-selection/lottery-selection.js +342 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +11 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-ab825ca6.js +1188 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-selection-75fcc811.js +212 -0
- package/dist/esm/lottery-selection.entry.js +2 -0
- package/dist/esm/lottery-selection.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-selection/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-selection/index-ab825ca6.js +2 -0
- package/dist/lottery-selection/index.esm.js +1 -0
- package/dist/lottery-selection/lottery-selection-75fcc811.js +1 -0
- package/dist/lottery-selection/lottery-selection.entry.js +1 -0
- package/dist/lottery-selection/lottery-selection.esm.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/packages/stencil/lottery-selection/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/packages/stencil/lottery-selection/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/packages/stencil/lottery-selection/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/packages/stencil/lottery-selection/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-selection/index.d.ts +1 -0
- package/dist/types/components/lottery-selection/lottery-selection.d.ts +68 -0
- package/dist/types/components.d.ts +149 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/utils.d.ts +2 -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/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-9b8fe4ee.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["lottery-selection.cjs",[[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-9b8fe4ee.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @name setClientStyling
|
|
7
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
8
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
9
|
+
* @param {string} clientStyling The style content
|
|
10
|
+
*/
|
|
11
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
12
|
+
if (stylingContainer) {
|
|
13
|
+
const sheet = document.createElement('style');
|
|
14
|
+
sheet.innerHTML = clientStyling;
|
|
15
|
+
stylingContainer.appendChild(sheet);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @name setClientStylingURL
|
|
21
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
22
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
23
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
24
|
+
*/
|
|
25
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
26
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
27
|
+
|
|
28
|
+
const url = new URL(clientStylingUrl);
|
|
29
|
+
|
|
30
|
+
fetch(url.href)
|
|
31
|
+
.then((res) => res.text())
|
|
32
|
+
.then((data) => {
|
|
33
|
+
const cssFile = document.createElement('style');
|
|
34
|
+
cssFile.innerHTML = data;
|
|
35
|
+
if (stylingContainer) {
|
|
36
|
+
stylingContainer.appendChild(cssFile);
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.catch((err) => {
|
|
40
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @name setStreamLibrary
|
|
46
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
47
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
48
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
49
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
50
|
+
*/
|
|
51
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
52
|
+
if (window.emMessageBus) {
|
|
53
|
+
const sheet = document.createElement('style');
|
|
54
|
+
|
|
55
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
56
|
+
sheet.innerHTML = data;
|
|
57
|
+
if (stylingContainer) {
|
|
58
|
+
stylingContainer.appendChild(sheet);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// This icon file is generated automatically.
|
|
65
|
+
var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" };
|
|
66
|
+
const DeleteFilled$1 = DeleteFilled;
|
|
67
|
+
|
|
68
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
69
|
+
__assign = Object.assign || function(t) {
|
|
70
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
71
|
+
s = arguments[i];
|
|
72
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
73
|
+
t[p] = s[p];
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
};
|
|
77
|
+
return __assign.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
var defaultColors = {
|
|
80
|
+
primaryColor: '#333',
|
|
81
|
+
secondaryColor: '#E6E6E6'
|
|
82
|
+
};
|
|
83
|
+
function renderIconDefinitionToSVGElement(icond, options) {
|
|
84
|
+
if (options === void 0) { options = {}; }
|
|
85
|
+
if (typeof icond.icon === 'function') {
|
|
86
|
+
// two-tone
|
|
87
|
+
var placeholders = options.placeholders || defaultColors;
|
|
88
|
+
return renderAbstractNodeToSVGElement(icond.icon(placeholders.primaryColor, placeholders.secondaryColor), options);
|
|
89
|
+
}
|
|
90
|
+
// fill, outline
|
|
91
|
+
return renderAbstractNodeToSVGElement(icond.icon, options);
|
|
92
|
+
}
|
|
93
|
+
function renderAbstractNodeToSVGElement(node, options) {
|
|
94
|
+
var targetAttrs = node.tag === 'svg'
|
|
95
|
+
? __assign(__assign({}, node.attrs), (options.extraSVGAttrs || {})) : node.attrs;
|
|
96
|
+
var attrs = Object.keys(targetAttrs).reduce(function (acc, nextKey) {
|
|
97
|
+
var key = nextKey;
|
|
98
|
+
var value = targetAttrs[key];
|
|
99
|
+
var token = "".concat(key, "=\"").concat(value, "\"");
|
|
100
|
+
acc.push(token);
|
|
101
|
+
return acc;
|
|
102
|
+
}, []);
|
|
103
|
+
var attrsToken = attrs.length ? ' ' + attrs.join(' ') : '';
|
|
104
|
+
var children = (node.children || [])
|
|
105
|
+
.map(function (child) { return renderAbstractNodeToSVGElement(child, options); })
|
|
106
|
+
.join('');
|
|
107
|
+
if (children && children.length) {
|
|
108
|
+
return "<".concat(node.tag).concat(attrsToken, ">").concat(children, "</").concat(node.tag, ">");
|
|
109
|
+
}
|
|
110
|
+
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Basic sanitization method for SVG content
|
|
114
|
+
// This is NOT a complete XSS prevention for SVG, but prevents common attacks.
|
|
115
|
+
function sanitizeSvg(svgString) {
|
|
116
|
+
let sanitized = svgString.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); // Remove <script> tags
|
|
117
|
+
sanitized = sanitized.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi, ''); // Remove on* attributes
|
|
118
|
+
sanitized = sanitized.replace(/javascript:/gi, ''); // Remove javascript: URLs
|
|
119
|
+
return sanitized;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const lotterySelectionCss = ":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";
|
|
123
|
+
const LotterySelectionStyle0 = lotterySelectionCss;
|
|
124
|
+
|
|
125
|
+
const LotterySelection = class {
|
|
126
|
+
constructor(hostRef) {
|
|
127
|
+
index.registerInstance(this, hostRef);
|
|
128
|
+
this.lotteryBulletClickHandler = index.createEvent(this, "lotteryBulletClick", 7);
|
|
129
|
+
this.value = 0;
|
|
130
|
+
this.text = undefined;
|
|
131
|
+
this.idx = undefined;
|
|
132
|
+
this.type = 'toggle';
|
|
133
|
+
this.mbSource = undefined;
|
|
134
|
+
this.clientStyling = undefined;
|
|
135
|
+
this.clientStylingUrl = undefined;
|
|
136
|
+
this.hasBorder = true;
|
|
137
|
+
this.hasBackground = true;
|
|
138
|
+
this.deleteIconSvg = '';
|
|
139
|
+
this.deleteIconWidth = '16px';
|
|
140
|
+
this.deleteIconHeight = '16px';
|
|
141
|
+
}
|
|
142
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
143
|
+
if (newValue !== oldValue) {
|
|
144
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
148
|
+
if (newValue !== oldValue) {
|
|
149
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
153
|
+
if (newValue !== oldValue) {
|
|
154
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
componentDidLoad() {
|
|
158
|
+
if (this.stylingContainer) {
|
|
159
|
+
if (this.mbSource)
|
|
160
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
161
|
+
if (this.clientStyling)
|
|
162
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
163
|
+
if (this.clientStylingUrl)
|
|
164
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
disconnectedCallback() {
|
|
168
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
169
|
+
}
|
|
170
|
+
handleClick() {
|
|
171
|
+
if (this.type === 'disabled' || this.type === 'readonly') {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
console.log('bullet clicked', this.type, this.idx, this.text, this.value);
|
|
175
|
+
this.lotteryBulletClickHandler.emit({
|
|
176
|
+
type: this.type,
|
|
177
|
+
idx: this.idx,
|
|
178
|
+
text: this.text,
|
|
179
|
+
value: this.value
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
render() {
|
|
183
|
+
let iconToRender;
|
|
184
|
+
if (this.deleteIconSvg) {
|
|
185
|
+
iconToRender = sanitizeSvg(this.deleteIconSvg);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
iconToRender = renderIconDefinitionToSVGElement(DeleteFilled$1, {
|
|
189
|
+
extraSVGAttrs: {
|
|
190
|
+
width: this.deleteIconWidth,
|
|
191
|
+
height: this.deleteIconHeight,
|
|
192
|
+
fill: 'currentColor'
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return (index.h("div", { key: '0d1e8aaa80a907a7467410f6b27b4b6175e82299', class: "lottery-selection", ref: (el) => (this.stylingContainer = el) }, index.h("button", { key: '11a2402abbc290dc877ad95f3433092c3a0d8419', class: {
|
|
197
|
+
'lottery-selection__button': true,
|
|
198
|
+
'lottery-selection__button--selected': this.value == 1,
|
|
199
|
+
'lottery-selection__button--disabled': this.type === 'disabled',
|
|
200
|
+
'lottery-selection__button--no-border': !this.hasBorder,
|
|
201
|
+
'lottery-selection__button--no-background': !this.hasBackground,
|
|
202
|
+
isDeleteByIcon: this.type === 'delete',
|
|
203
|
+
isCallDialogBtn: this.type === 'input' || this.type === 'readonly'
|
|
204
|
+
}, onClick: this.handleClick.bind(this), disabled: this.type === 'disabled' }, this.type === 'delete' && index.h("span", { key: 'f99001d936a8f7bdf8adc5c46e82caf730a9442a', class: "lottery-selection__delete-icon", innerHTML: iconToRender }), index.h("span", { key: '55775e2492a1fe45cc8a457ac0a0d206744461ab', class: "lottery-selection__text" }, this.text))));
|
|
205
|
+
}
|
|
206
|
+
static get watchers() { return {
|
|
207
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
208
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
209
|
+
"mbSource": ["handleMbSourceChange"]
|
|
210
|
+
}; }
|
|
211
|
+
};
|
|
212
|
+
LotterySelection.style = LotterySelectionStyle0;
|
|
213
|
+
|
|
214
|
+
exports.LotterySelection = LotterySelection;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-9b8fe4ee.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | 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('lottery-selection.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([["lottery-selection.cjs",[[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LotterySelection } from './lottery-selection';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.lottery-selection__button {
|
|
6
|
+
/* Basic Layout & Sizing */
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: var(--lottery-selection-width, 32px);
|
|
11
|
+
height: var(--lottery-selection-height, 32px);
|
|
12
|
+
padding: var(--lottery-selection-padding, 0);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
/* Appearance */
|
|
15
|
+
background: var(--lottery-selection-background, var(--emw--color-background, #fff));
|
|
16
|
+
border: var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));
|
|
17
|
+
border-radius: var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));
|
|
18
|
+
/* Typography */
|
|
19
|
+
color: var(--lottery-selection-color, var(--emw--color-typography, #000));
|
|
20
|
+
font-weight: var(--lottery-selection-font-weight, bold);
|
|
21
|
+
font-size: var(--lottery-selection-font-size, 1em);
|
|
22
|
+
/* Behavior */
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
user-select: none;
|
|
25
|
+
/* Specific Modes */
|
|
26
|
+
/* States */
|
|
27
|
+
/* Modifiers */
|
|
28
|
+
}
|
|
29
|
+
.lottery-selection__button:hover {
|
|
30
|
+
background: var(--lottery-selection-hover-background, var(--emw--color-background, #fff));
|
|
31
|
+
border-color: var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));
|
|
32
|
+
color: var(--lottery-selection-hover-color, var(--emw--color-typography, #000));
|
|
33
|
+
}
|
|
34
|
+
.lottery-selection__button .lottery-selection__delete-icon {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
fill: var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));
|
|
45
|
+
vertical-align: middle;
|
|
46
|
+
}
|
|
47
|
+
.lottery-selection__button.lottery-selection__button--selected {
|
|
48
|
+
background-color: var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));
|
|
49
|
+
border-color: var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));
|
|
50
|
+
color: var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff));
|
|
51
|
+
}
|
|
52
|
+
.lottery-selection__button.lottery-selection__button--disabled {
|
|
53
|
+
background-color: var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));
|
|
54
|
+
border-color: var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));
|
|
55
|
+
color: var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
pointer-events: none; /* Disable hover effects cleanly */
|
|
58
|
+
}
|
|
59
|
+
.lottery-selection__button.lottery-selection__button--no-border {
|
|
60
|
+
border: none;
|
|
61
|
+
}
|
|
62
|
+
.lottery-selection__button.lottery-selection__button--no-background {
|
|
63
|
+
background: transparent;
|
|
64
|
+
}
|