@papu1337/builder 0.0.5 → 1.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/builder/BuilderView.svelte +158 -0
- package/dist/builder/BuilderView.svelte.d.ts +8 -0
- package/dist/builder/builder.vanilla.es.js +6514 -0
- package/dist/builder/builder.vanilla.umd.js +89 -0
- package/dist/builder/canvas/canvas.svelte +92 -0
- package/dist/builder/canvas/canvas.svelte.d.ts +17 -0
- package/dist/builder/canvas/styles.css +63 -0
- package/dist/builder/createBuilder.svelte.d.ts +9 -0
- package/dist/builder/createBuilder.svelte.js +17 -0
- package/dist/builder/index.d.ts +8 -0
- package/dist/builder/index.js +7 -0
- package/dist/builder/leftbar/leftBar.svelte +740 -0
- package/dist/builder/leftbar/leftBar.svelte.d.ts +8 -0
- package/dist/builder/leftbar/styles.css +152 -0
- package/dist/builder/pageMeta.svelte.d.ts +13 -0
- package/dist/builder/pageMeta.svelte.js +25 -0
- package/dist/builder/rightbar/rightBar.svelte +100 -0
- package/dist/builder/rightbar/rightBar.svelte.d.ts +10 -0
- package/dist/builder/rightbar/styles.css +167 -0
- package/dist/builder/topbar/TopBar.svelte +337 -0
- package/dist/builder/topbar/TopBar.svelte.d.ts +12 -0
- package/dist/builder/topbar/styles.css +123 -0
- package/dist/builder/viewport.svelte.d.ts +9 -0
- package/dist/builder/viewport.svelte.js +17 -0
- package/dist/elements/_shared/Arrow.svelte +58 -0
- package/dist/elements/_shared/Arrow.svelte.d.ts +11 -0
- package/dist/elements/_shared/GradientBorder.svelte +55 -0
- package/dist/elements/_shared/GradientBorder.svelte.d.ts +10 -0
- package/dist/elements/banner/bannerElement.svelte +101 -33
- package/dist/elements/banner/settings.d.ts +13 -3
- package/dist/elements/banner/settings.js +88 -8
- package/dist/elements/button/buttonElement.svelte +27 -21
- package/dist/elements/button/settings.d.ts +11 -9
- package/dist/elements/button/settings.js +18 -39
- package/dist/elements/globalSettings.js +5 -4
- package/dist/elements/howItWorks/howItWorksElement.svelte +221 -0
- package/dist/elements/howItWorks/howItWorksElement.svelte.d.ts +7 -0
- package/dist/elements/howItWorks/settings.d.ts +16 -0
- package/dist/elements/howItWorks/settings.js +70 -0
- package/dist/elements/steps/settings.d.ts +17 -0
- package/dist/elements/steps/settings.js +69 -0
- package/dist/elements/steps/stepsElement.svelte +220 -0
- package/dist/elements/steps/stepsElement.svelte.d.ts +7 -0
- package/dist/elements/terms/settings.d.ts +14 -0
- package/dist/elements/terms/settings.js +32 -0
- package/dist/elements/terms/termsElement.svelte +209 -0
- package/dist/elements/terms/termsElement.svelte.d.ts +7 -0
- package/dist/elements/text/settings.d.ts +8 -11
- package/dist/elements/text/settings.js +21 -51
- package/dist/elements/text/textElement.svelte +23 -23
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useTranslation.svelte.d.ts +9 -0
- package/dist/hooks/useTranslation.svelte.js +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/renderer/BuilderRenderer.svelte +30 -2
- package/dist/renderer/registry.js +6 -6
- package/dist/renderer/renderer.vanilla.es.js +1547 -1188
- package/dist/renderer/renderer.vanilla.umd.js +64 -39
- package/dist/renderer/resolve.d.ts +1 -1
- package/dist/renderer/resolve.js +28 -14
- package/dist/renderer/types.d.ts +2 -0
- package/dist/service/element.action.svelte.d.ts +21 -0
- package/dist/service/element.action.svelte.js +125 -0
- package/dist/service/element.history.svelte.d.ts +8 -0
- package/dist/service/element.history.svelte.js +36 -0
- package/dist/service/element.io.svelte.d.ts +4 -0
- package/dist/service/element.io.svelte.js +232 -0
- package/dist/service/element.reader.svelte.d.ts +4 -0
- package/dist/service/element.reader.svelte.js +51 -0
- package/dist/service/element.translate.svelte.d.ts +12 -0
- package/dist/service/element.translate.svelte.js +81 -0
- package/dist/service/index.d.ts +5 -0
- package/dist/service/index.js +5 -0
- package/dist/service/types.d.ts +13 -0
- package/dist/service/types.js +1 -0
- package/dist/settings/base.svelte.d.ts +6 -1
- package/dist/settings/base.svelte.js +61 -17
- package/dist/settings/components/ColorSettings.svelte +169 -40
- package/dist/settings/components/ColorSettings.svelte.d.ts +3 -2
- package/dist/settings/components/ListSettings.svelte +4 -5
- package/dist/settings/components/NumberSettings.svelte +117 -20
- package/dist/settings/components/RepeaterSettings.svelte +145 -0
- package/dist/settings/components/RepeaterSettings.svelte.d.ts +14 -0
- package/dist/settings/components/SegmentSettings.svelte +85 -0
- package/dist/settings/components/SegmentSettings.svelte.d.ts +5 -0
- package/dist/settings/components/SelectSettings.svelte +2 -3
- package/dist/settings/components/SettingsGroup.svelte +14 -69
- package/dist/settings/components/SettingsRenderer.svelte +76 -0
- package/dist/settings/components/SettingsRenderer.svelte.d.ts +8 -0
- package/dist/settings/components/TextSettings.svelte +2 -3
- package/dist/settings/components/TranslatableSettings.svelte +3 -4
- package/dist/settings/components/UploadSettings.svelte +2 -3
- package/dist/settings/groups.d.ts +23 -7
- package/dist/settings/groups.js +48 -24
- package/dist/settings/implementation.svelte.js +4 -0
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/index.js +2 -0
- package/dist/settings/mode.svelte.d.ts +4 -0
- package/dist/settings/mode.svelte.js +4 -0
- package/dist/settings/repeater.svelte.d.ts +26 -0
- package/dist/settings/repeater.svelte.js +70 -0
- package/dist/settings/types.d.ts +28 -2
- package/package.json +8 -2
- package/dist/elements/accordion/accordionElement.svelte +0 -101
- package/dist/elements/accordion/accordionElement.svelte.d.ts +0 -7
- package/dist/elements/accordion/settings.d.ts +0 -17
- package/dist/elements/accordion/settings.js +0 -54
- package/dist/elements/badge/badgeElement.svelte +0 -49
- package/dist/elements/badge/badgeElement.svelte.d.ts +0 -7
- package/dist/elements/badge/settings.d.ts +0 -14
- package/dist/elements/badge/settings.js +0 -47
- package/dist/elements/ctaCard/ctaCardElement.svelte +0 -132
- package/dist/elements/ctaCard/ctaCardElement.svelte.d.ts +0 -7
- package/dist/elements/ctaCard/settings.d.ts +0 -22
- package/dist/elements/ctaCard/settings.js +0 -64
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HowItWorksSettingsMap } from './settings';
|
|
3
|
+
import GradientBorder from '../_shared/GradientBorder.svelte';
|
|
4
|
+
import Arrow from '../_shared/Arrow.svelte';
|
|
5
|
+
|
|
6
|
+
let { settings }: { settings: HowItWorksSettingsMap } = $props();
|
|
7
|
+
|
|
8
|
+
const defaultBorder =
|
|
9
|
+
'linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(13,25,35,0) 100%)';
|
|
10
|
+
|
|
11
|
+
const accentLine = (accent: string): string =>
|
|
12
|
+
`linear-gradient(90deg, rgba(22,45,63,0) 0%, ${accent} 50%, rgba(22,45,63,0) 100%)`;
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div class="hiw" style="margin-top: {settings.marginTop}px;">
|
|
16
|
+
{#if settings.title}
|
|
17
|
+
<h2 class="hiw-title">{settings.title}</h2>
|
|
18
|
+
{/if}
|
|
19
|
+
|
|
20
|
+
<div class="hiw-steps">
|
|
21
|
+
{#each settings.steps as step, index (index)}
|
|
22
|
+
<GradientBorder
|
|
23
|
+
className="hiw-step-border"
|
|
24
|
+
backgroundGradient={step.borderColor || defaultBorder}
|
|
25
|
+
>
|
|
26
|
+
<div class="hiw-step">
|
|
27
|
+
<div class="hiw-step-glow" style="background: {step.glowColor};"></div>
|
|
28
|
+
<div class="hiw-step-content">
|
|
29
|
+
<div class="hiw-step-head">
|
|
30
|
+
<h3 class="hiw-step-title">{step.title}</h3>
|
|
31
|
+
<p class="hiw-step-text">{step.description}</p>
|
|
32
|
+
</div>
|
|
33
|
+
{#if step.highlight}
|
|
34
|
+
<p class="hiw-step-highlight" style="color: {step.highlightColor};">
|
|
35
|
+
{step.highlight}
|
|
36
|
+
</p>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
39
|
+
<div
|
|
40
|
+
class="hiw-step-line"
|
|
41
|
+
style="background: {accentLine(step.accentColor || step.highlightColor)};"
|
|
42
|
+
></div>
|
|
43
|
+
</div>
|
|
44
|
+
</GradientBorder>
|
|
45
|
+
|
|
46
|
+
{#if index < settings.steps.length - 1}
|
|
47
|
+
<div class="hiw-arrow">
|
|
48
|
+
<Arrow width={10} height={10} direction="down" className="md-rotate-left" stroke="#fff" />
|
|
49
|
+
</div>
|
|
50
|
+
{/if}
|
|
51
|
+
{/each}
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{#if settings.footer}
|
|
55
|
+
<div class="hiw-footer">
|
|
56
|
+
<p class="hiw-footer-text">{settings.footer}</p>
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
.hiw {
|
|
63
|
+
position: relative;
|
|
64
|
+
width: 100%;
|
|
65
|
+
margin: 0 auto;
|
|
66
|
+
max-width: 56rem;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hiw-title {
|
|
71
|
+
margin: 0 0 1rem;
|
|
72
|
+
font-size: 1.5rem;
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
text-align: center;
|
|
75
|
+
color: inherit;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.hiw-steps {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
gap: 0.5rem;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@container page (min-width: 768px) {
|
|
88
|
+
.hiw-steps {
|
|
89
|
+
flex-direction: row;
|
|
90
|
+
align-items: stretch;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:global(.hiw-step-border) {
|
|
95
|
+
width: 100%;
|
|
96
|
+
max-width: 320px;
|
|
97
|
+
flex: 1 1 0;
|
|
98
|
+
min-width: 0;
|
|
99
|
+
border-radius: 1rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@container page (min-width: 768px) {
|
|
103
|
+
:global(.hiw-step-border) {
|
|
104
|
+
max-width: 273px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.hiw-step {
|
|
109
|
+
position: relative;
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
gap: 1rem;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
border-radius: 1rem;
|
|
116
|
+
background: rgba(13, 25, 35, 0.7);
|
|
117
|
+
padding: 1rem;
|
|
118
|
+
min-height: 145px;
|
|
119
|
+
height: 100%;
|
|
120
|
+
width: 100%;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.hiw-step-glow {
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
position: absolute;
|
|
126
|
+
right: -270px;
|
|
127
|
+
top: -150px;
|
|
128
|
+
height: 175px;
|
|
129
|
+
width: 445px;
|
|
130
|
+
transform: rotate(17deg);
|
|
131
|
+
border-radius: 9999px;
|
|
132
|
+
filter: blur(48px);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hiw-step-content {
|
|
136
|
+
position: relative;
|
|
137
|
+
display: flex;
|
|
138
|
+
flex: 1;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
gap: 0.25rem;
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.hiw-step-head {
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
gap: 0.5rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.hiw-step-title {
|
|
152
|
+
margin: 0;
|
|
153
|
+
font-size: 1.25rem;
|
|
154
|
+
font-weight: 700;
|
|
155
|
+
line-height: 1.1;
|
|
156
|
+
letter-spacing: -0.025em;
|
|
157
|
+
color: #fff;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.hiw-step-text {
|
|
161
|
+
margin: 0;
|
|
162
|
+
font-size: 0.875rem;
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
line-height: 1.6;
|
|
165
|
+
color: rgba(210, 216, 231, 0.92);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.hiw-step-highlight {
|
|
169
|
+
margin: 0;
|
|
170
|
+
font-size: 0.875rem;
|
|
171
|
+
line-height: 1.25rem;
|
|
172
|
+
letter-spacing: -0.01em;
|
|
173
|
+
font-weight: 400;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.hiw-step-line {
|
|
177
|
+
position: absolute;
|
|
178
|
+
bottom: 0;
|
|
179
|
+
left: 50%;
|
|
180
|
+
height: 1px;
|
|
181
|
+
width: 200px;
|
|
182
|
+
transform: translateX(-50%);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.hiw-arrow {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
border-radius: 9999px;
|
|
190
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
191
|
+
background: rgba(13, 25, 35, 0.6);
|
|
192
|
+
padding: 0.375rem;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@container page (min-width: 768px) {
|
|
196
|
+
.hiw-arrow {
|
|
197
|
+
align-self: center;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.hiw-footer {
|
|
202
|
+
position: relative;
|
|
203
|
+
margin: 0 auto;
|
|
204
|
+
max-width: 800px;
|
|
205
|
+
border-radius: 0 0 1.5rem 1.5rem;
|
|
206
|
+
border: 1px solid #355d80;
|
|
207
|
+
border-top: 0;
|
|
208
|
+
background: linear-gradient(to bottom, #10202d, #162a3b);
|
|
209
|
+
padding: 1.25rem 0.75rem;
|
|
210
|
+
text-align: center;
|
|
211
|
+
backdrop-filter: blur(4px);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.hiw-footer-text {
|
|
215
|
+
margin: 0;
|
|
216
|
+
font-size: 0.875rem;
|
|
217
|
+
line-height: 1.5;
|
|
218
|
+
font-weight: 400;
|
|
219
|
+
color: #fff;
|
|
220
|
+
}
|
|
221
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HowItWorksSettingsMap } from './settings';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
settings: HowItWorksSettingsMap;
|
|
4
|
+
};
|
|
5
|
+
declare const HowItWorksElement: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type HowItWorksElement = ReturnType<typeof HowItWorksElement>;
|
|
7
|
+
export default HowItWorksElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, TranslatableSetting, RepeaterSetting, type InferSettingsMapType } from '../../settings';
|
|
2
|
+
export declare const howItWorksSettings: Settings<{
|
|
3
|
+
marginTop: NumberSetting;
|
|
4
|
+
title: TranslatableSetting;
|
|
5
|
+
steps: RepeaterSetting<{
|
|
6
|
+
title: TranslatableSetting;
|
|
7
|
+
description: TranslatableSetting;
|
|
8
|
+
highlight: TranslatableSetting;
|
|
9
|
+
highlightColor: ColorSetting;
|
|
10
|
+
glowColor: ColorSetting;
|
|
11
|
+
borderColor: ColorSetting;
|
|
12
|
+
accentColor: ColorSetting;
|
|
13
|
+
}>;
|
|
14
|
+
footer: TranslatableSetting;
|
|
15
|
+
}>;
|
|
16
|
+
export type HowItWorksSettingsMap = InferSettingsMapType<typeof howItWorksSettings>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, TranslatableSetting, RepeaterSetting } from '../../settings';
|
|
2
|
+
const STEP_SEEDS = [
|
|
3
|
+
{
|
|
4
|
+
title: 'Place qualifying bets',
|
|
5
|
+
description: 'Bet on UEFA Champions League fixtures with at least 2 selections at minimum odds 1.50.',
|
|
6
|
+
highlight: 'Min stake $20 per matchweek',
|
|
7
|
+
highlightColor: '#E8C75C',
|
|
8
|
+
glowColor: 'rgba(231, 193, 70, 0.3)',
|
|
9
|
+
borderColor: 'linear-gradient(180deg, rgba(232, 199, 92, 0.5) 0%, rgba(13, 25, 35, 0) 100%)',
|
|
10
|
+
accentColor: '#FFCA16'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: 'Hit the threshold',
|
|
14
|
+
description: 'Reach $50 turnover in a single matchweek to unlock the bigger reward.',
|
|
15
|
+
highlight: '$50+ unlocks $15 freebet',
|
|
16
|
+
highlightColor: '#7EE787',
|
|
17
|
+
glowColor: 'rgba(46, 160, 67, 0.3)',
|
|
18
|
+
borderColor: 'linear-gradient(180deg, rgba(63, 185, 80, 0.5) 0%, rgba(13, 25, 35, 0) 100%)',
|
|
19
|
+
accentColor: '#2CBA44'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: 'Claim your freebet',
|
|
23
|
+
description: 'Freebets are credited within 24 hours after the matchweek and stay valid for 7 days.',
|
|
24
|
+
highlight: 'Use on any UCL market',
|
|
25
|
+
highlightColor: '#DAB2FF',
|
|
26
|
+
glowColor: 'rgba(173, 70, 255, 0.3)',
|
|
27
|
+
borderColor: 'linear-gradient(180deg, rgba(194, 122, 255, 0.5) 0%, rgba(13, 25, 35, 0) 100%)',
|
|
28
|
+
accentColor: '#B658C4'
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
const stepFactory = (index) => {
|
|
32
|
+
const seed = STEP_SEEDS[index] ?? {
|
|
33
|
+
title: 'New step',
|
|
34
|
+
description: 'Describe what the user does.',
|
|
35
|
+
highlight: '',
|
|
36
|
+
highlightColor: '#E8C75C',
|
|
37
|
+
glowColor: 'rgba(231, 193, 70, 0.3)',
|
|
38
|
+
borderColor: 'linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(13,25,35,0) 100%)',
|
|
39
|
+
accentColor: '#FFCA16'
|
|
40
|
+
};
|
|
41
|
+
return new Settings('Step', {
|
|
42
|
+
title: new TranslatableSetting({ title: 'Title', defaultValue: { en: seed.title } }),
|
|
43
|
+
description: new TranslatableSetting({
|
|
44
|
+
title: 'Description',
|
|
45
|
+
defaultValue: { en: seed.description }
|
|
46
|
+
}),
|
|
47
|
+
highlight: new TranslatableSetting({ title: 'Highlight', defaultValue: { en: seed.highlight } }),
|
|
48
|
+
highlightColor: new ColorSetting({ title: 'Highlight Color', defaultValue: seed.highlightColor }),
|
|
49
|
+
glowColor: new ColorSetting({ title: 'Glow Color', defaultValue: seed.glowColor }),
|
|
50
|
+
borderColor: new ColorSetting({ title: 'Border', defaultValue: seed.borderColor }),
|
|
51
|
+
accentColor: new ColorSetting({ title: 'Accent Color', defaultValue: seed.accentColor })
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
export const howItWorksSettings = new Settings('How It Works', {
|
|
55
|
+
marginTop: new NumberSetting({ title: 'Margin Top', defaultValue: 24, extra: { min: 0, max: 200 } }),
|
|
56
|
+
title: new TranslatableSetting({ title: 'Title', defaultValue: { en: '' } }),
|
|
57
|
+
steps: new RepeaterSetting({
|
|
58
|
+
title: 'Steps',
|
|
59
|
+
itemLabel: 'Step',
|
|
60
|
+
addButtonText: '+ Add step',
|
|
61
|
+
factory: stepFactory,
|
|
62
|
+
count: 3
|
|
63
|
+
}),
|
|
64
|
+
footer: new TranslatableSetting({
|
|
65
|
+
title: 'Footer',
|
|
66
|
+
defaultValue: {
|
|
67
|
+
en: 'Stake of a winning freebet is not returned with the payout. Only one freebet may be claimed per matchweek.'
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, TextSetting, TranslatableSetting, RepeaterSetting, type InferSettingsMapType } from '../../settings';
|
|
2
|
+
export declare const stepsSettings: Settings<{
|
|
3
|
+
marginTop: NumberSetting;
|
|
4
|
+
steps: RepeaterSetting<{
|
|
5
|
+
number: TextSetting;
|
|
6
|
+
title: TranslatableSetting;
|
|
7
|
+
description: TranslatableSetting;
|
|
8
|
+
highlight: TranslatableSetting;
|
|
9
|
+
accentColor: ColorSetting;
|
|
10
|
+
highlightColor: ColorSetting;
|
|
11
|
+
barColor: ColorSetting;
|
|
12
|
+
}>;
|
|
13
|
+
exampleLabel: TranslatableSetting;
|
|
14
|
+
exampleText: TranslatableSetting;
|
|
15
|
+
exampleLabelColor: ColorSetting;
|
|
16
|
+
}>;
|
|
17
|
+
export type StepsSettingsMap = InferSettingsMapType<typeof stepsSettings>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, TextSetting, TranslatableSetting, RepeaterSetting } from '../../settings';
|
|
2
|
+
const STEP_SEEDS = [
|
|
3
|
+
{
|
|
4
|
+
number: '1',
|
|
5
|
+
title: 'Create Your Ticket',
|
|
6
|
+
description: 'Pick 3+ Wimbledon selections',
|
|
7
|
+
highlight: 'Min Odd: 1.4',
|
|
8
|
+
accentColor: '#E8C75C',
|
|
9
|
+
highlightColor: '#E8C75C',
|
|
10
|
+
barColor: '#E8C75C'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
number: '2',
|
|
14
|
+
title: 'Place Your Bet',
|
|
15
|
+
description: 'Only combo bets qualify',
|
|
16
|
+
highlight: 'Min Bet: $30',
|
|
17
|
+
accentColor: '#35D1C8',
|
|
18
|
+
highlightColor: '#E8C75C',
|
|
19
|
+
barColor: '#15B7AE'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
number: '3',
|
|
23
|
+
title: 'Get 15% Freebet',
|
|
24
|
+
description: 'If your qualifying combo loses',
|
|
25
|
+
highlight: 'Max Freebet: $100',
|
|
26
|
+
accentColor: '#CF96FF',
|
|
27
|
+
highlightColor: '#E8C75C',
|
|
28
|
+
barColor: '#CF96FF'
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
const stepFactory = (index) => {
|
|
32
|
+
const seed = STEP_SEEDS[index] ?? {
|
|
33
|
+
number: String(index + 1),
|
|
34
|
+
title: 'New step',
|
|
35
|
+
description: '',
|
|
36
|
+
highlight: '',
|
|
37
|
+
accentColor: '#E8C75C',
|
|
38
|
+
highlightColor: '#E8C75C',
|
|
39
|
+
barColor: '#E8C75C'
|
|
40
|
+
};
|
|
41
|
+
return new Settings('Step', {
|
|
42
|
+
number: new TextSetting({ title: 'Number', defaultValue: seed.number }),
|
|
43
|
+
title: new TranslatableSetting({ title: 'Title', defaultValue: { en: seed.title } }),
|
|
44
|
+
description: new TranslatableSetting({
|
|
45
|
+
title: 'Description',
|
|
46
|
+
defaultValue: { en: seed.description }
|
|
47
|
+
}),
|
|
48
|
+
highlight: new TranslatableSetting({ title: 'Highlight', defaultValue: { en: seed.highlight } }),
|
|
49
|
+
accentColor: new ColorSetting({ title: 'Accent Color', defaultValue: seed.accentColor }),
|
|
50
|
+
highlightColor: new ColorSetting({ title: 'Highlight Color', defaultValue: seed.highlightColor }),
|
|
51
|
+
barColor: new ColorSetting({ title: 'Bar Color', defaultValue: seed.barColor })
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
export const stepsSettings = new Settings('Steps', {
|
|
55
|
+
marginTop: new NumberSetting({ title: 'Margin Top', defaultValue: 24, extra: { min: 0, max: 200 } }),
|
|
56
|
+
steps: new RepeaterSetting({
|
|
57
|
+
title: 'Steps',
|
|
58
|
+
itemLabel: 'Step',
|
|
59
|
+
addButtonText: '+ Add step',
|
|
60
|
+
factory: stepFactory,
|
|
61
|
+
count: 3
|
|
62
|
+
}),
|
|
63
|
+
exampleLabel: new TranslatableSetting({ title: 'Example Label', defaultValue: { en: 'Example:' } }),
|
|
64
|
+
exampleText: new TranslatableSetting({
|
|
65
|
+
title: 'Example Text',
|
|
66
|
+
defaultValue: { en: ' Back team A to win, go 2-0 up, and get paid early regardless of the final outcome.' }
|
|
67
|
+
}),
|
|
68
|
+
exampleLabelColor: new ColorSetting({ title: 'Example Label Color', defaultValue: '#E8C75C' })
|
|
69
|
+
});
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { StepsSettingsMap } from './settings';
|
|
3
|
+
|
|
4
|
+
let { settings }: { settings: StepsSettingsMap } = $props();
|
|
5
|
+
|
|
6
|
+
const ringFill = (accent: string): string =>
|
|
7
|
+
`linear-gradient(135deg, color-mix(in srgb, ${accent} 18%, transparent) 0%, rgba(255,255,255,0.04) 55%, rgba(0,0,0,0) 100%)`;
|
|
8
|
+
|
|
9
|
+
const connectorBackground = (barColor: string, accent: string): string =>
|
|
10
|
+
`linear-gradient(180deg, ${barColor || accent} 0%, #142636 100%)`;
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="steps" style="margin-top: {settings.marginTop}px;">
|
|
14
|
+
<div class="steps-grid">
|
|
15
|
+
{#each settings.steps as step, index (index)}
|
|
16
|
+
<div class="steps-item">
|
|
17
|
+
<div class="steps-rail">
|
|
18
|
+
<div class="steps-badge">
|
|
19
|
+
<div class="steps-badge__ring" style="background-image: {ringFill(step.accentColor)};">
|
|
20
|
+
<span class="steps-badge__number" style="color: {step.accentColor};">
|
|
21
|
+
{step.number}
|
|
22
|
+
</span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div
|
|
26
|
+
class="steps-connector"
|
|
27
|
+
style="background: {connectorBackground(step.barColor, step.accentColor)};"
|
|
28
|
+
aria-hidden="true"
|
|
29
|
+
></div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="steps-body">
|
|
32
|
+
<h3 class="steps-title">{step.title}</h3>
|
|
33
|
+
<p class="steps-description">{step.description}</p>
|
|
34
|
+
{#if step.highlight}
|
|
35
|
+
<p class="steps-highlight" style="color: {step.highlightColor};">{step.highlight}</p>
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
{/each}
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{#if settings.exampleText || settings.exampleLabel}
|
|
43
|
+
<div class="steps-example-wrap">
|
|
44
|
+
<div class="steps-example">
|
|
45
|
+
<p class="steps-example__text">
|
|
46
|
+
{#if settings.exampleLabel}<span
|
|
47
|
+
class="steps-example__label"
|
|
48
|
+
style="color: {settings.exampleLabelColor};">{settings.exampleLabel}</span
|
|
49
|
+
>{/if}<span>{settings.exampleText}</span>
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
.steps {
|
|
58
|
+
position: relative;
|
|
59
|
+
width: 100%;
|
|
60
|
+
min-width: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.steps-grid {
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-columns: 1fr;
|
|
66
|
+
gap: 24px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@container page (min-width: 768px) {
|
|
70
|
+
.steps-grid {
|
|
71
|
+
grid-template-columns: repeat(3, 1fr);
|
|
72
|
+
gap: 32px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.steps-item {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
min-width: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.steps-rail {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 12px;
|
|
88
|
+
width: 100px;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.steps-badge {
|
|
93
|
+
position: relative;
|
|
94
|
+
width: 72px;
|
|
95
|
+
height: 72px;
|
|
96
|
+
border-radius: 9999px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.steps-badge__ring {
|
|
100
|
+
position: absolute;
|
|
101
|
+
inset: 0;
|
|
102
|
+
border-radius: 9999px;
|
|
103
|
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.steps-badge__number {
|
|
107
|
+
position: absolute;
|
|
108
|
+
left: 50%;
|
|
109
|
+
top: 50%;
|
|
110
|
+
transform: translate(-50%, -50%);
|
|
111
|
+
white-space: nowrap;
|
|
112
|
+
font-size: 30px;
|
|
113
|
+
font-weight: 700;
|
|
114
|
+
line-height: 1.2;
|
|
115
|
+
letter-spacing: -0.8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.steps-connector {
|
|
119
|
+
width: 2px;
|
|
120
|
+
height: 72px;
|
|
121
|
+
flex-shrink: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.steps-body {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex: 1;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
align-items: flex-start;
|
|
129
|
+
gap: 8px;
|
|
130
|
+
min-width: 0;
|
|
131
|
+
padding-top: 19px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.steps-title {
|
|
135
|
+
margin: 0;
|
|
136
|
+
width: 100%;
|
|
137
|
+
font-size: 24px;
|
|
138
|
+
font-weight: 700;
|
|
139
|
+
line-height: 1.2;
|
|
140
|
+
letter-spacing: -0.8px;
|
|
141
|
+
text-transform: uppercase;
|
|
142
|
+
color: #fff;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.steps-description {
|
|
146
|
+
margin: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
font-size: 18px;
|
|
149
|
+
line-height: 1.5;
|
|
150
|
+
color: #b1cadf;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.steps-highlight {
|
|
154
|
+
margin: 0;
|
|
155
|
+
width: 100%;
|
|
156
|
+
font-size: 18px;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
line-height: 1.4;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@container page (min-width: 768px) {
|
|
162
|
+
.steps-body {
|
|
163
|
+
padding-top: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.steps-title {
|
|
167
|
+
font-size: 30px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.steps-description {
|
|
171
|
+
font-size: 16px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.steps-highlight {
|
|
175
|
+
font-size: 16px;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.steps-example-wrap {
|
|
180
|
+
display: flex;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
margin-top: 18px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@container page (min-width: 768px) {
|
|
186
|
+
.steps-example-wrap {
|
|
187
|
+
margin-top: 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.steps-example {
|
|
192
|
+
position: relative;
|
|
193
|
+
width: 100%;
|
|
194
|
+
max-width: 800px;
|
|
195
|
+
padding: 12px 16px;
|
|
196
|
+
border: 1px solid rgba(177, 202, 223, 0.2);
|
|
197
|
+
border-radius: 24px;
|
|
198
|
+
background: linear-gradient(
|
|
199
|
+
180deg,
|
|
200
|
+
rgba(13, 25, 35, 0) 0%,
|
|
201
|
+
rgba(177, 202, 223, 0.1) 100%
|
|
202
|
+
);
|
|
203
|
+
backdrop-filter: blur(7.5px);
|
|
204
|
+
-webkit-backdrop-filter: blur(7.5px);
|
|
205
|
+
text-align: center;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.steps-example__text {
|
|
209
|
+
margin: 0;
|
|
210
|
+
font-size: 14px;
|
|
211
|
+
line-height: 1.5;
|
|
212
|
+
font-weight: 400;
|
|
213
|
+
color: #fff;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.steps-example__label {
|
|
217
|
+
font-weight: 700;
|
|
218
|
+
margin-right: 4px;
|
|
219
|
+
}
|
|
220
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StepsSettingsMap } from './settings';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
settings: StepsSettingsMap;
|
|
4
|
+
};
|
|
5
|
+
declare const StepsElement: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type StepsElement = ReturnType<typeof StepsElement>;
|
|
7
|
+
export default StepsElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, SelectSetting, TranslatableSetting, RepeaterSetting, type InferSettingsMapType } from '../../settings';
|
|
2
|
+
export declare const termsSettings: Settings<{
|
|
3
|
+
marginTop: NumberSetting;
|
|
4
|
+
title: TranslatableSetting;
|
|
5
|
+
panelBgColor: ColorSetting;
|
|
6
|
+
borderColor: ColorSetting;
|
|
7
|
+
textColor: ColorSetting;
|
|
8
|
+
openByDefault: SelectSetting;
|
|
9
|
+
sections: RepeaterSetting<{
|
|
10
|
+
title: TranslatableSetting;
|
|
11
|
+
lines: TranslatableSetting;
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
14
|
+
export type TermsSettingsMap = InferSettingsMapType<typeof termsSettings>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Settings, NumberSetting, ColorSetting, SelectSetting, TranslatableSetting, RepeaterSetting } from '../../settings';
|
|
2
|
+
const sectionFactory = () => new Settings('Section', {
|
|
3
|
+
title: new TranslatableSetting({ title: 'Title', defaultValue: { en: 'Eligibility' } }),
|
|
4
|
+
lines: new TranslatableSetting({
|
|
5
|
+
title: 'Lines (one per row)',
|
|
6
|
+
defaultValue: { en: 'Promotion is available to verified accounts only.' }
|
|
7
|
+
})
|
|
8
|
+
});
|
|
9
|
+
export const termsSettings = new Settings('Terms', {
|
|
10
|
+
marginTop: new NumberSetting({ title: 'Margin Top', defaultValue: 0, extra: { min: 0, max: 200 } }),
|
|
11
|
+
title: new TranslatableSetting({ title: 'Title', defaultValue: { en: 'Terms and conditions' } }),
|
|
12
|
+
panelBgColor: new ColorSetting({ title: 'Panel Background', defaultValue: '#162D3F' }),
|
|
13
|
+
borderColor: new ColorSetting({ title: 'Border', defaultValue: 'rgba(177,202,223,0.05)' }),
|
|
14
|
+
textColor: new ColorSetting({ title: 'Text Color', defaultValue: '#B1CADF' }),
|
|
15
|
+
openByDefault: new SelectSetting({
|
|
16
|
+
title: 'Open by default',
|
|
17
|
+
defaultValue: 'true',
|
|
18
|
+
extra: {
|
|
19
|
+
options: [
|
|
20
|
+
{ label: 'Closed', value: 'false' },
|
|
21
|
+
{ label: 'Open', value: 'true' }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
sections: new RepeaterSetting({
|
|
26
|
+
title: 'Sections',
|
|
27
|
+
itemLabel: 'Section',
|
|
28
|
+
addButtonText: '+ Add section',
|
|
29
|
+
factory: sectionFactory,
|
|
30
|
+
count: 2
|
|
31
|
+
})
|
|
32
|
+
});
|