@everymatrix/casino-tournaments-details 1.0.16 → 1.0.70

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,134 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { onMount } from 'svelte';
5
-
6
- export let title = '';
7
- export let text = '';
8
-
9
- export let clientstyling:string = '';
10
- export let clientstylingurl:string = '';
11
-
12
- let customStylingContainer: HTMLElement;
13
- let displayNone:boolean = false;
14
-
15
- let collapsed:Boolean = false;
16
-
17
- const collapseText = () => {
18
- collapsed = !collapsed;
19
- }
20
-
21
- const setClientStyling = ():void => {
22
- let sheet = document.createElement('style');
23
- sheet.innerHTML = clientstyling;
24
- customStylingContainer.appendChild(sheet);
25
- }
26
-
27
- const setClientStylingURL = ():void => {
28
- displayNone = true;
29
-
30
- let url:URL = new URL(clientstylingurl);
31
- let cssFile:HTMLElement = document.createElement('style');
32
-
33
- fetch(url.href)
34
- .then((res:any) => res.text())
35
- .then((data:any) => {
36
- cssFile.innerHTML = data
37
-
38
- if (customStylingContainer) {
39
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
40
- setTimeout(() => { displayNone = false; }, 500);
41
- }
42
- });
43
- }
44
-
45
- const setContent = (element:HTMLElement, content:any) => {
46
- let htmlContent = document.createElement("div");
47
- htmlContent.innerHTML = content;
48
- element.append(htmlContent);
49
- }
50
-
51
- $: customStylingContainer && clientstyling && setClientStyling();
52
- $: customStylingContainer && clientstylingurl && setClientStylingURL();
53
- </script>
54
-
55
- <div bind:this={customStylingContainer} class="DetailsCard" part="DetailsCard">
56
- {#if title}
57
- <div class="DetailsTitle" part="DetailsTitle">
58
- <p class="Title" part="Title">{title}</p>
59
- <div class="CollapseButtonDetails" part="CollapseButtonDetails" on:click={() => collapseText()}>
60
- {#if !collapsed}
61
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
62
- <path d="M18 15l-6-6-6 6"/>
63
- </svg>
64
- {:else}
65
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
66
- <path d="M6 9l6 6 6-6"/>
67
- </svg>
68
- {/if}
69
- </div>
70
- </div>
71
- {/if}
72
-
73
- {#if text && !collapsed}
74
- <div class="DetailsContent sc" part="DetailsContent" use:setContent={text}>
75
- </div>
76
- {/if}
77
- </div>
78
-
79
-
80
- <style lang="scss">
81
- $primary-background-color: var(--emfe-w-color-contrast, #07072A);
82
- $primary-font-color: var(--emfe-w-color-white, #FFFFFF);
83
-
84
- :host {
85
- font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
86
- }
87
-
88
- *,
89
- *::before,
90
- *::after {
91
- box-sizing: border-box;
92
- }
93
-
94
- .Title {
95
- text-transform: uppercase;
96
- }
97
-
98
- .DetailsCard {
99
- border: 1px solid var(--emfe-w-color-contrast, #07072A);
100
- color: $primary-font-color;
101
- width: 100%;
102
- margin: 25px 0 25px 0;
103
- }
104
-
105
- .DetailsTitle {
106
- padding: 0 20px;
107
- height: 60px;
108
- display: flex;
109
- align-items: center;
110
- justify-content: space-between;
111
- background: var(--emfe-w-color-contrast, #07072A);
112
- }
113
-
114
- .DetailsContent {
115
- overflow: auto;
116
- height: 150px;
117
- font-size: 14px;
118
- padding: 10px 10px 10px 20px;
119
- margin: 10px 20px 10px 0;
120
- }
121
-
122
- .sc::-webkit-scrollbar {
123
- width: 5px;
124
- height: 5px;
125
- }
126
- .sc::-webkit-scrollbar-track {
127
- background-color: rgba(255, 255, 255, 0.1);
128
- border-radius: 10px;
129
- }
130
- .sc::-webkit-scrollbar-thumb {
131
- background-color: var(--emfe-w-color-white, #FFFFFF);
132
- border-radius: 10px;
133
- }
134
- </style>
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import CasinoTournamentsDetails from './CasinoTournamentsDetails.svelte';
2
-
3
- !customElements.get('casino-tournaments-details') && customElements.define('casino-tournaments-details', CasinoTournamentsDetails);
4
- export default CasinoTournamentsDetails;
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import CasinoTournamentsDetails from '../src/CasinoTournamentsDetails';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'CasinoTournamentsDetails',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const CasinoTournamentsDetails = ({ aProperty }) => html`<casino-tournaments-details></casino-tournaments-details>`;
12
-
13
- export const FirstStory = CasinoTournamentsDetails.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
- }