@everymatrix/casino-wagering-bonus-progress 1.44.0 → 1.45.2

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/rollup.config.js DELETED
@@ -1,59 +0,0 @@
1
- import svelte from 'rollup-plugin-svelte';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import serve from 'rollup-plugin-dev-server';
5
- import livereload from 'rollup-plugin-livereload';
6
- import { terser } from 'rollup-plugin-terser';
7
- import sveltePreprocess from 'svelte-preprocess';
8
- import typescript from '@rollup/plugin-typescript';
9
- const production = process.env.NODE_ENV === 'production';
10
- const dev = process.env.NODE_ENV === 'development';
11
-
12
- export default {
13
- input: 'src/index.ts',
14
- output: {
15
- sourcemap: true,
16
- format: 'umd',
17
- name: 'app',
18
- file: 'dist/casino-wagering-bonus-progress.js'
19
- },
20
- plugins: [
21
- svelte({
22
- preprocess: sveltePreprocess(),
23
- compilerOptions: {
24
- // enable run-time checks when not in production
25
- customElement: true,
26
- dev: !production
27
- }
28
- }),
29
- commonjs(),
30
- resolve({
31
- browser: true,
32
- dedupe: ['svelte']
33
- }),
34
- dev && serve({
35
- open: true,
36
- verbose: true,
37
- allowCrossOrigin: true,
38
- historyApiFallback: false,
39
- host: 'localhost',
40
- port: 5050,
41
- }),
42
- dev && livereload({ watch: ['', 'dist'] }),
43
- typescript({
44
- sourceMap: !production,
45
- inlineSources: !production,
46
- }),
47
- // If we're building for production (npm run build
48
- // instead of npm run dev), minify
49
- production &&
50
- terser({
51
- output: {
52
- comments: "all"
53
- },
54
- })
55
- ],
56
- watch: {
57
- clearScreen: false
58
- }
59
- };
@@ -1,148 +0,0 @@
1
- <svelte:options tag={null} />
2
- <script lang="ts">
3
- export let percent: string = ''
4
- export let status: string = ''
5
-
6
- enum BonusStatus {
7
- BeforeClaimed = 'BeforeClaimed',
8
- InProgress = 'active',
9
- ForfeitedOrCompleted = 'ForfeitedOrCompleted',
10
- }
11
-
12
- let innerWidth = 200
13
- $: isMobileView = innerWidth <= 576
14
-
15
- // svg
16
- $: size = isMobileView ? innerWidth / 4 : 100;
17
- $: ringStrokeWidth = size / 7.5
18
- $: radius = size / 2 - ringStrokeWidth / 2;
19
- $: center = size / 2;
20
-
21
- $: circumference = radius * 2 * Math.PI;
22
-
23
- const classWithPart = (partAndClass, extraClass = '') => ({
24
- part: partAndClass,
25
- class: [partAndClass, extraClass].join(' '),
26
- })
27
-
28
- $: classWithPartMatchMobile = (partAndClass, extraClass = '') =>
29
- classWithPart(`${partAndClass}${isMobileView ? ` ${partAndClass}Mobile` : ''}`, extraClass)
30
-
31
-
32
- </script>
33
-
34
- <svelte:window
35
- bind:innerWidth
36
- />
37
-
38
- <svg
39
- {...{
40
- width: size,
41
- height: size,
42
- }}
43
- >
44
- <circle {...{
45
- class: "ring",
46
- r: radius,
47
- cx: center,
48
- cy: center,
49
- "stroke-width": `${ringStrokeWidth}px`,
50
- }} />
51
- <circle {...{
52
- class: `ring ring-progress ${status === BonusStatus.InProgress ? "active" : ""}`,
53
- r: radius,
54
- cx: center,
55
- cy: center,
56
- "stroke-width": `${ringStrokeWidth}px`,
57
- "stroke-dasharray": `${circumference} ${circumference}`,
58
- "stroke-dashoffset": circumference - Number(percent) / 100 * circumference,
59
- }} />
60
-
61
- <circle {...{
62
- class: `center ${status === BonusStatus.InProgress ? "active" : ""}`,
63
- r: radius - ringStrokeWidth / 2 - 3,
64
- cx: center,
65
- cy: center,
66
- }} />
67
-
68
- <text
69
- {...{
70
- x: center,
71
- y: center,
72
- }}
73
- {...classWithPartMatchMobile("ProgressText")}
74
- >
75
- {percent}%
76
- </text>
77
-
78
- </svg>
79
-
80
- <style lang="scss">
81
-
82
-
83
- *,
84
- *::before,
85
- *::after {
86
- margin: 0;
87
- padding: 0;
88
- list-style: none;
89
- text-decoration: none;
90
- outline: none;
91
- box-sizing: border-box;
92
- }
93
-
94
-
95
- $vw_base: 390px;
96
- @function vw($px) {
97
- @return ($px / $vw_base) * 100vw;
98
- }
99
-
100
-
101
- $vw_base_pc: 1307px;
102
- @function vwpc($px) {
103
- @return ($px / $vw_base_pc) * 800px;
104
- // @return $px;
105
- }
106
- // $vw_base_pc: 1307px;
107
- // @function vwpc($px) {
108
- // @return ($px / $vw_base_pc) * 100vw;
109
- // }
110
-
111
- .ProgressText {
112
- fill: #FFFFFF;
113
- text-anchor: middle;
114
- dominant-baseline: middle;
115
- font-style: normal;
116
- font-weight: 700;
117
-
118
- font-size: vwpc(36px);
119
- }
120
-
121
- .ProgressTextMobile {
122
- font-size: vw(20px);
123
- }
124
-
125
- circle.ring {
126
- stroke: #F2F4F6;
127
- fill: transparent;
128
- }
129
-
130
- circle.ring-progress {
131
- transition: 0.35s stroke-dashoffset;
132
- // axis compensation
133
- stroke: #C4C4C4;
134
- transform: rotate(-90deg);
135
- transform-origin: 50% 50%;
136
-
137
- &.active {
138
- stroke: #00AEEF;
139
- }
140
- }
141
-
142
- circle.center {
143
- fill: #C4C4C4;
144
- &.active {
145
- fill: #00AEEF;
146
- }
147
- }
148
- </style>
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import CasinoWageringBonusProgress from './CasinoWageringBonusProgress.svelte';
2
-
3
- !customElements.get('casino-wagering-bonus-progress') && customElements.define('casino-wagering-bonus-progress', CasinoWageringBonusProgress);
4
- export default CasinoWageringBonusProgress;
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import CasinoWageringBonusProgress from '../src/CasinoWageringBonusProgress';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'CasinoWageringBonusProgress',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const CasinoWageringBonusProgress = ({ aProperty }) => html`<casino-wagering-bonus-progress></casino-wagering-bonus-progress>`;
12
-
13
- export const FirstStory = CasinoWageringBonusProgress.bind({});
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
6
- }