@likable-hair/svelte 0.0.14 → 0.0.17
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/common/Card.svelte +21 -5
- package/common/Card.svelte.d.ts +0 -1
- package/dates/Calendar.svelte +0 -1
- package/dates/Calendar.svelte.d.ts +0 -1
- package/forms/Textfield.svelte +26 -23
- package/forms/{TextField.svelte.d.ts → Textfield.svelte.d.ts} +8 -5
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/loaders/Skeleton.svelte +30 -29
- package/loaders/Skeleton.svelte.d.ts +2 -3
- package/media/Carousel.svelte +16 -20
- package/media/Carousel.svelte.d.ts +6 -1
- package/media/Image.svelte +3 -10
- package/media/Image.svelte.d.ts +0 -1
- package/media/ImageGrid.svelte +6 -12
- package/media/ImageGrid.svelte.d.ts +0 -1
- package/navigation/HeaderMenu.svelte +46 -9
- package/navigation/HeaderMenu.svelte.d.ts +0 -1
- package/navigation/Navigator.svelte +7 -3
- package/navigation/Navigator.svelte.d.ts +0 -1
- package/navigation/TabSwitcher.svelte +10 -14
- package/navigation/TabSwitcher.svelte.d.ts +0 -1
- package/package.json +1 -2
- package/shop/ProductCard.svelte +64 -17
- package/shop/ProductCard.svelte.d.ts +6 -1
- package/shop/ProductsGrid.svelte +10 -19
- package/shop/ProductsGrid.svelte.d.ts +2 -1
- package/timeline/ScrollTimeLine.svelte +1 -2
- package/timeline/ScrollTimeLine.svelte.d.ts +0 -1
- package/common/tailwind.css +0 -149
package/common/Card.svelte
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script >export let outlined = false, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined, padding = "5px", borderRadius = "5px", backgroundColor = "rgb(252, 252, 252)", color = undefined, borderColor = undefined, borderWidth = undefined, style = "";
|
|
2
|
-
import '$lib/common/tailwind.css';
|
|
3
2
|
</script>
|
|
4
3
|
|
|
5
4
|
<style>
|
|
5
|
+
.shadow-lg {
|
|
6
|
+
--shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
7
|
+
--shadow-colored: 0 10px 15px -3px #000, 0 4px 6px -4px #000;
|
|
8
|
+
box-shadow: inset 0 0 0 calc(1px + 0px) rgb(255 255 255/0.1), 0 0 #0000, 0 0 #0000;
|
|
9
|
+
}
|
|
6
10
|
</style>
|
|
7
11
|
|
|
8
12
|
<div
|
|
@@ -19,16 +23,28 @@ import '$lib/common/tailwind.css';
|
|
|
19
23
|
style:border-color={borderColor}
|
|
20
24
|
style:border-width={borderWidth}
|
|
21
25
|
style={style}
|
|
22
|
-
|
|
26
|
+
style:display="flex"
|
|
27
|
+
style:flex-direction="column"
|
|
28
|
+
class="shadow-lg"
|
|
23
29
|
class:border-solid={outlined}
|
|
24
30
|
>
|
|
25
|
-
<div
|
|
31
|
+
<div
|
|
32
|
+
style:flex="none"
|
|
33
|
+
class="header"
|
|
34
|
+
>
|
|
26
35
|
<slot name="header"></slot>
|
|
27
36
|
</div>
|
|
28
|
-
<div
|
|
37
|
+
<div
|
|
38
|
+
style:flex-shrink="1"
|
|
39
|
+
style:overflow-y="auto"
|
|
40
|
+
class="body"
|
|
41
|
+
>
|
|
29
42
|
<slot></slot>
|
|
30
43
|
</div>
|
|
31
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
style:flex="none"
|
|
46
|
+
class="footer flex-none"
|
|
47
|
+
>
|
|
32
48
|
<slot name="footer"></slot>
|
|
33
49
|
</div>
|
|
34
50
|
</div>
|
package/common/Card.svelte.d.ts
CHANGED
package/dates/Calendar.svelte
CHANGED
package/forms/Textfield.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script >export let label = "", placeholder = "", color = "", value = "", variant = 'outlined';
|
|
1
|
+
<script >export let label = "", placeholder = "", color = "", value = "", variant = 'outlined', width = "100%", textColor = "balck", borderRadius = "5px", borderColor = undefined;
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
3
|
import { onMount } from 'svelte';
|
|
4
4
|
let inputId = uuidv4(), focused = false, legendWidth = 0, labelElement = undefined;
|
|
@@ -16,22 +16,13 @@ function handleBlur() {
|
|
|
16
16
|
$: if (!!labelElement) {
|
|
17
17
|
legendWidth = !value && !focused ? 0 : (labelElement.offsetWidth * 0.8) + 8;
|
|
18
18
|
}
|
|
19
|
-
$: cssVariables = Object.entries({
|
|
20
|
-
'--theme-color': color,
|
|
21
|
-
'--legend-width': legendWidth + 'px'
|
|
22
|
-
}).filter(([key]) => key.startsWith('--'))
|
|
23
|
-
.reduce((css, [key, value]) => {
|
|
24
|
-
return `${css}${key}: ${value};`;
|
|
25
|
-
}, '');
|
|
26
|
-
import '$lib/common/tailwind.css';
|
|
27
19
|
</script>
|
|
28
20
|
|
|
29
21
|
<style>
|
|
30
22
|
.input-container {
|
|
31
23
|
height: 50px;
|
|
32
24
|
position: relative;
|
|
33
|
-
|
|
34
|
-
--final-color: var(--theme-color, --border-color, rgb(88, 88, 88));
|
|
25
|
+
--textfield-final-color: var(--textfield-theme-color, --textfield-border-color, rgb(88, 88, 88));
|
|
35
26
|
}
|
|
36
27
|
|
|
37
28
|
/* outlined input */
|
|
@@ -39,7 +30,6 @@ import '$lib/common/tailwind.css';
|
|
|
39
30
|
.input-outlined {
|
|
40
31
|
border: 0px solid;
|
|
41
32
|
box-sizing: border-box;
|
|
42
|
-
color: var(--color, black);
|
|
43
33
|
font-size: 18px;
|
|
44
34
|
height: 100%;
|
|
45
35
|
outline: 0;
|
|
@@ -49,18 +39,17 @@ import '$lib/common/tailwind.css';
|
|
|
49
39
|
}
|
|
50
40
|
|
|
51
41
|
.fieldset-outlined {
|
|
52
|
-
border-radius: var(--border-radius, 5px);
|
|
53
42
|
border: 1px solid rgb(122, 122, 122);
|
|
54
43
|
padding-left: 4px;
|
|
55
44
|
}
|
|
56
45
|
|
|
57
46
|
.focused .fieldset-outlined {
|
|
58
|
-
border: 1px solid var(--final-color);
|
|
59
|
-
color: var(--final-color);
|
|
47
|
+
border: 1px solid var(--textfield-final-color);
|
|
48
|
+
color: var(--textfield-final-color);
|
|
60
49
|
}
|
|
61
50
|
|
|
62
51
|
.legend-outlined {
|
|
63
|
-
width: var(--legend-width);
|
|
52
|
+
width: var(--textfield-legend-width);
|
|
64
53
|
padding: 0px;
|
|
65
54
|
transition: width 0.3s, color 0.1s;
|
|
66
55
|
}
|
|
@@ -85,9 +74,8 @@ import '$lib/common/tailwind.css';
|
|
|
85
74
|
/* boxed input */
|
|
86
75
|
|
|
87
76
|
.fieldset-boxed {
|
|
88
|
-
border: 2px solid var(--final-color);
|
|
77
|
+
border: 2px solid var(--textfield-final-color);
|
|
89
78
|
padding: 5px;
|
|
90
|
-
border-radius: var(--border-radius, 0);
|
|
91
79
|
}
|
|
92
80
|
|
|
93
81
|
.input-boxed {
|
|
@@ -103,7 +91,7 @@ import '$lib/common/tailwind.css';
|
|
|
103
91
|
}
|
|
104
92
|
|
|
105
93
|
.input-boxed::placeholder {
|
|
106
|
-
color: var(--final-color);
|
|
94
|
+
color: var(--textfield-final-color);
|
|
107
95
|
opacity: 60%;
|
|
108
96
|
}
|
|
109
97
|
|
|
@@ -111,13 +99,18 @@ import '$lib/common/tailwind.css';
|
|
|
111
99
|
|
|
112
100
|
|
|
113
101
|
<div
|
|
102
|
+
style:width={width}
|
|
103
|
+
style:--textfield-theme-color={color}
|
|
104
|
+
style:--textfield-border-color={borderColor}
|
|
105
|
+
style:--textfield-legend-width={legendWidth + 'px'}
|
|
114
106
|
class="input-container"
|
|
115
|
-
style={cssVariables}
|
|
116
107
|
class:focused={focused}
|
|
117
108
|
class:texted={focused || !!value}
|
|
118
109
|
>
|
|
119
110
|
<fieldset
|
|
120
|
-
aria-hidden="true"
|
|
111
|
+
aria-hidden="true"
|
|
112
|
+
style:border-radius={borderRadius}
|
|
113
|
+
style:border-color={borderColor}
|
|
121
114
|
class="fieldset"
|
|
122
115
|
class:fieldset-outlined={variant == 'outlined'}
|
|
123
116
|
class:fieldset-boxed={variant == 'boxed'}
|
|
@@ -129,11 +122,18 @@ import '$lib/common/tailwind.css';
|
|
|
129
122
|
class="label-outlined"
|
|
130
123
|
bind:this={labelElement}
|
|
131
124
|
>{label}</label>
|
|
132
|
-
<div
|
|
125
|
+
<div
|
|
126
|
+
style:display="flex"
|
|
127
|
+
style:position="relative"
|
|
128
|
+
style:bottom="8px"
|
|
129
|
+
style:margin-left="8px"
|
|
130
|
+
style:margin-right="8px"
|
|
131
|
+
>
|
|
133
132
|
<div>
|
|
134
133
|
<slot name="prepend-inner"></slot>
|
|
135
134
|
</div>
|
|
136
135
|
<input
|
|
136
|
+
style:color={textColor}
|
|
137
137
|
id={inputId}
|
|
138
138
|
class="input-outlined"
|
|
139
139
|
type="text"
|
|
@@ -151,11 +151,14 @@ import '$lib/common/tailwind.css';
|
|
|
151
151
|
</div>
|
|
152
152
|
</div>
|
|
153
153
|
{:else if variant == 'boxed'}
|
|
154
|
-
<div
|
|
154
|
+
<div
|
|
155
|
+
style:display="flex"
|
|
156
|
+
>
|
|
155
157
|
<div>
|
|
156
158
|
<slot name="prepend-inner"></slot>
|
|
157
159
|
</div>
|
|
158
160
|
<input
|
|
161
|
+
style:color={textColor}
|
|
159
162
|
id={inputId}
|
|
160
163
|
class="input-boxed"
|
|
161
164
|
type="text"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import '$lib/common/tailwind.css';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
label?: string;
|
|
@@ -7,6 +6,10 @@ declare const __propDef: {
|
|
|
7
6
|
color?: string;
|
|
8
7
|
value?: string;
|
|
9
8
|
variant?: "outlined" | "boxed";
|
|
9
|
+
width?: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
borderRadius?: string;
|
|
12
|
+
borderColor?: string;
|
|
10
13
|
};
|
|
11
14
|
events: {
|
|
12
15
|
change: Event;
|
|
@@ -21,9 +24,9 @@ declare const __propDef: {
|
|
|
21
24
|
'append-inner': {};
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
|
-
export declare type
|
|
25
|
-
export declare type
|
|
26
|
-
export declare type
|
|
27
|
-
export default class
|
|
27
|
+
export declare type TextfieldProps = typeof __propDef.props;
|
|
28
|
+
export declare type TextfieldEvents = typeof __propDef.events;
|
|
29
|
+
export declare type TextfieldSlots = typeof __propDef.slots;
|
|
30
|
+
export default class Textfield extends SvelteComponentTyped<TextfieldProps, TextfieldEvents, TextfieldSlots> {
|
|
28
31
|
}
|
|
29
32
|
export {};
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { default as Button } from './buttons/Button.svelte';
|
|
|
2
2
|
export { default as Card } from './common/Card.svelte';
|
|
3
3
|
export { default as Gesture } from './common/Gesture.svelte';
|
|
4
4
|
export { default as IntersectionObserver } from './common/IntersectionObserver.svelte';
|
|
5
|
-
export { default as TextField } from './forms/
|
|
5
|
+
export { default as TextField } from './forms/Textfield.svelte';
|
|
6
6
|
export { default as Skeleton } from './loaders/Skeleton.svelte';
|
|
7
7
|
export { default as AttachmentDownloader } from './media/AttachmentDownloader.svelte';
|
|
8
8
|
export { default as Avatar } from './media/Avatar.svelte';
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as Card } from './common/Card.svelte';
|
|
|
5
5
|
export { default as Gesture } from './common/Gesture.svelte';
|
|
6
6
|
export { default as IntersectionObserver } from './common/IntersectionObserver.svelte';
|
|
7
7
|
// forms
|
|
8
|
-
export { default as TextField } from './forms/
|
|
8
|
+
export { default as TextField } from './forms/Textfield.svelte';
|
|
9
9
|
// loaders
|
|
10
10
|
export { default as Skeleton } from './loaders/Skeleton.svelte';
|
|
11
11
|
// media
|
package/loaders/Skeleton.svelte
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
<script
|
|
2
|
-
$: cssVariables = Object.entries({
|
|
3
|
-
'--max-width': maxWidth,
|
|
4
|
-
'--max-height': maxHeight,
|
|
5
|
-
'--min-width': minWidth,
|
|
6
|
-
'--min-height': minHeight,
|
|
7
|
-
'--width': width,
|
|
8
|
-
'--height': height,
|
|
9
|
-
'--padding': padding,
|
|
10
|
-
'--card-background': dark ? '#000000' : '#fff',
|
|
11
|
-
'--element-background': dark ? '#1a1a1a' : '#eee',
|
|
12
|
-
'--animation-color': dark ? '#000000e6' : '#ffffffe6',
|
|
13
|
-
}).filter(([key]) => key.startsWith('--'))
|
|
14
|
-
.reduce((css, [key, value]) => {
|
|
15
|
-
return `${css}${key}: ${value};`;
|
|
16
|
-
}, '');
|
|
17
|
-
import '$lib/common/tailwind.css';
|
|
1
|
+
<script context="module">export {};
|
|
18
2
|
</script>
|
|
19
3
|
|
|
20
|
-
<
|
|
4
|
+
<script >export let sections = [], maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = "100%", height = "100%", padding = '10px', dark = false;
|
|
5
|
+
$: widthLessPadding = `calc(${width} - (${padding} * 2))`;
|
|
6
|
+
$: heightLessPadding = `calc(${height} - (${padding} * 2))`;
|
|
7
|
+
$: maxWidthLessPadding = `calc(${maxWidth} - (${padding} * 2))`;
|
|
8
|
+
$: maxHeightLessPadding = `calc(${maxHeight} - (${padding} * 2))`;
|
|
9
|
+
$: minWidthLessPadding = `calc(${minWidth} - (${padding} * 2))`;
|
|
10
|
+
$: minHeightLessPadding = `calc(${minHeight} - (${padding} * 2))`;
|
|
11
|
+
$: elementBackground = dark ? '#1a1a1a' : '#eee';
|
|
12
|
+
$: animationBackground = dark ? '#000000e6' : '#ffffffe6';
|
|
13
|
+
$: cardBackground = dark ? '#000000' : '#fff';
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
style:--skeleton-card-background={cardBackground}
|
|
19
|
+
style:--skeleton-animation-color={animationBackground}
|
|
20
|
+
style:width={widthLessPadding}
|
|
21
|
+
style:height={heightLessPadding}
|
|
22
|
+
style:max-width={maxWidthLessPadding}
|
|
23
|
+
style:max-height={maxHeightLessPadding}
|
|
24
|
+
style:min-width={minWidthLessPadding}
|
|
25
|
+
style:min-height={minHeightLessPadding}
|
|
26
|
+
style:padding={padding}
|
|
27
|
+
class="card"
|
|
28
|
+
>
|
|
21
29
|
{#each sections as section}
|
|
22
30
|
{#if section.type == 'image'}
|
|
23
31
|
<div
|
|
32
|
+
style:height={section.height}
|
|
33
|
+
style:background={elementBackground}
|
|
24
34
|
class="skeleton-image"
|
|
25
|
-
style="height: {section.height}"
|
|
26
35
|
></div>
|
|
27
36
|
{/if}
|
|
28
37
|
{/each}
|
|
@@ -30,7 +39,6 @@ import '$lib/common/tailwind.css';
|
|
|
30
39
|
|
|
31
40
|
<style>
|
|
32
41
|
.skeleton-image {
|
|
33
|
-
background: var(--element-background);
|
|
34
42
|
margin-bottom: 10px;
|
|
35
43
|
border-radius: 5px;
|
|
36
44
|
overflow: hidden;
|
|
@@ -38,17 +46,10 @@ import '$lib/common/tailwind.css';
|
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
.card {
|
|
41
|
-
background: var(--card-background);
|
|
49
|
+
background: var(--skeleton-card-background);
|
|
42
50
|
position: relative;
|
|
43
|
-
padding: var(--padding);
|
|
44
51
|
border-radius: 5px;
|
|
45
52
|
box-shadow: 0 10px 100px rgba(0, 0, 0, 0.1);
|
|
46
|
-
width: calc(var(--width) - (var(--padding) * 2));
|
|
47
|
-
height: calc(var(--height) - (var(--padding) * 2));
|
|
48
|
-
max-width: calc(var(--max-width) - (var(--padding) * 2));
|
|
49
|
-
max-height: calc(var(--max-height) - (var(--padding) * 2));
|
|
50
|
-
min-width: calc(var(--min-width) - (var(--padding) * 2));
|
|
51
|
-
min-height: calc(var(--min-height) - (var(--padding) * 2));
|
|
52
53
|
overflow: hidden;
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -67,7 +68,7 @@ import '$lib/common/tailwind.css';
|
|
|
67
68
|
background: linear-gradient(
|
|
68
69
|
90deg,
|
|
69
70
|
transparent,
|
|
70
|
-
var(--animation-color),
|
|
71
|
+
var(--skeleton-animation-color),
|
|
71
72
|
transparent
|
|
72
73
|
);
|
|
73
74
|
width: 50%;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
|
|
3
|
-
import '$lib/common/tailwind.css';
|
|
2
|
+
export declare type SectionType = "image" | "text";
|
|
4
3
|
declare const __propDef: {
|
|
5
4
|
props: {
|
|
6
5
|
sections?: {
|
|
@@ -11,9 +10,9 @@ declare const __propDef: {
|
|
|
11
10
|
maxHeight?: string;
|
|
12
11
|
minWidth?: string;
|
|
13
12
|
minHeight?: string;
|
|
14
|
-
padding?: string;
|
|
15
13
|
width?: string;
|
|
16
14
|
height?: string;
|
|
15
|
+
padding?: string;
|
|
17
16
|
dark?: boolean;
|
|
18
17
|
};
|
|
19
18
|
events: {
|
package/media/Carousel.svelte
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
<script >import { onMount } from 'svelte';
|
|
2
|
-
export let images = [];
|
|
3
|
-
let container,
|
|
2
|
+
export let images = [], maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = "100%", height = "100%";
|
|
3
|
+
let container, localWidth = '0px', localHeight = '0px';
|
|
4
4
|
onMount(() => {
|
|
5
5
|
calculateWidthAndHeight();
|
|
6
6
|
});
|
|
7
7
|
function calculateWidthAndHeight() {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
localWidth = container.offsetWidth + 'px';
|
|
9
|
+
localHeight = container.offsetHeight + 'px';
|
|
10
10
|
}
|
|
11
|
-
$: cssVariables = Object.entries({}).filter(([key]) => key.startsWith('--'))
|
|
12
|
-
.reduce((css, [key, value]) => {
|
|
13
|
-
return `${css}${key}: ${value};`;
|
|
14
|
-
}, '');
|
|
15
|
-
import '$lib/common/tailwind.css';
|
|
16
11
|
import Image from './Image.svelte';
|
|
17
12
|
</script>
|
|
18
13
|
|
|
@@ -22,9 +17,16 @@ import Image from './Image.svelte';
|
|
|
22
17
|
|
|
23
18
|
|
|
24
19
|
<div
|
|
25
|
-
style={
|
|
20
|
+
style:max-width={maxWidth}
|
|
21
|
+
style:max-height={maxHeight}
|
|
22
|
+
style:min-width={minWidth}
|
|
23
|
+
style:min-height={minHeight}
|
|
24
|
+
style:width={width}
|
|
25
|
+
style:height={height}
|
|
26
|
+
style:display="flex"
|
|
27
|
+
style:flex-wrap="no-wrap"
|
|
26
28
|
bind:this={container}
|
|
27
|
-
class="container
|
|
29
|
+
class="container"
|
|
28
30
|
>
|
|
29
31
|
{#each images as image}
|
|
30
32
|
<div class="image-container">
|
|
@@ -34,9 +36,9 @@ import Image from './Image.svelte';
|
|
|
34
36
|
description={image.description}
|
|
35
37
|
disableHover={true}
|
|
36
38
|
showSkeletonLoader={false}
|
|
37
|
-
minWidth={
|
|
38
|
-
width={
|
|
39
|
-
height={
|
|
39
|
+
minWidth={localWidth}
|
|
40
|
+
width={localWidth}
|
|
41
|
+
height={localHeight}
|
|
40
42
|
imageContain={true}
|
|
41
43
|
imageCover={false}
|
|
42
44
|
/>
|
|
@@ -46,12 +48,6 @@ import Image from './Image.svelte';
|
|
|
46
48
|
|
|
47
49
|
<style>
|
|
48
50
|
.container {
|
|
49
|
-
height: var(--height);
|
|
50
|
-
width: var(--width);
|
|
51
|
-
max-height: var(--max-height);
|
|
52
|
-
max-width: var(--max-width);
|
|
53
|
-
min-height: var(--min-height);
|
|
54
|
-
min-width: var(--min-width);
|
|
55
51
|
overflow-x: scroll;
|
|
56
52
|
scroll-snap-type: x mandatory;
|
|
57
53
|
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import '$lib/common/tailwind.css';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
images?: {
|
|
@@ -7,6 +6,12 @@ declare const __propDef: {
|
|
|
7
6
|
title: string;
|
|
8
7
|
description: string;
|
|
9
8
|
}[];
|
|
9
|
+
maxWidth?: string;
|
|
10
|
+
maxHeight?: string;
|
|
11
|
+
minWidth?: string;
|
|
12
|
+
minHeight?: string;
|
|
13
|
+
width?: string;
|
|
14
|
+
height?: string;
|
|
10
15
|
};
|
|
11
16
|
events: {
|
|
12
17
|
[evt: string]: CustomEvent<any>;
|
package/media/Image.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script >import {
|
|
2
|
-
import { browser } from '$app/env';
|
|
1
|
+
<script >import { browser } from '$app/env';
|
|
3
2
|
export let maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined, borderRadius = undefined, src = undefined, title = undefined, description = undefined, dark = false, disableHover = false, showSkeletonLoader = true, imageCover = true, imageContain = false;
|
|
4
3
|
const load = (src) => {
|
|
5
4
|
return new Promise(async (resolve, reject) => {
|
|
@@ -16,13 +15,8 @@ const load = (src) => {
|
|
|
16
15
|
}
|
|
17
16
|
});
|
|
18
17
|
};
|
|
19
|
-
$: cssVariables = Object.entries({}).filter(([key]) => key.startsWith('--'))
|
|
20
|
-
.reduce((css, [key, value]) => {
|
|
21
|
-
return `${css}${key}: ${value};`;
|
|
22
|
-
}, '');
|
|
23
18
|
import IntersectionObserver from '../common/IntersectionObserver.svelte';
|
|
24
19
|
import Skeleton from "../loaders/Skeleton.svelte";
|
|
25
|
-
import '$lib/common/tailwind.css';
|
|
26
20
|
</script>
|
|
27
21
|
|
|
28
22
|
<div
|
|
@@ -33,7 +27,6 @@ import '$lib/common/tailwind.css';
|
|
|
33
27
|
style:max-height={maxHeight}
|
|
34
28
|
style:min-height={minHeight}
|
|
35
29
|
style:border-radius={borderRadius}
|
|
36
|
-
style={cssVariables}
|
|
37
30
|
class="image-container"
|
|
38
31
|
>
|
|
39
32
|
<IntersectionObserver once={true} let:intersecting={intersecting}>
|
|
@@ -43,7 +36,7 @@ import '$lib/common/tailwind.css';
|
|
|
43
36
|
<Skeleton
|
|
44
37
|
sections={[
|
|
45
38
|
{
|
|
46
|
-
type:
|
|
39
|
+
type: 'image',
|
|
47
40
|
height: `100%`
|
|
48
41
|
}
|
|
49
42
|
]}
|
|
@@ -82,7 +75,7 @@ import '$lib/common/tailwind.css';
|
|
|
82
75
|
<Skeleton
|
|
83
76
|
sections={[
|
|
84
77
|
{
|
|
85
|
-
type:
|
|
78
|
+
type: 'image',
|
|
86
79
|
height: `100%`
|
|
87
80
|
}
|
|
88
81
|
]}
|
package/media/Image.svelte.d.ts
CHANGED
package/media/ImageGrid.svelte
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
<script >export let images = [], columns = undefined, imageMaxWidth = undefined, imageMinWidth = undefined, imageMaxHeight = undefined, imageMinHeight = undefined, imageHeight = undefined, imageWidth = undefined, disableHover = false, dark = false;
|
|
2
|
-
$: cssVariables = Object.entries({
|
|
3
|
-
'--columns': columns
|
|
4
|
-
}).filter(([key]) => key.startsWith('--'))
|
|
5
|
-
.reduce((css, [key, value]) => {
|
|
6
|
-
return `${css}${key}: ${value};`;
|
|
7
|
-
}, '');
|
|
8
2
|
import Image from './Image.svelte';
|
|
9
|
-
import '$lib/common/tailwind.css';
|
|
10
3
|
</script>
|
|
11
4
|
|
|
12
|
-
<div
|
|
13
|
-
style={cssVariables}
|
|
5
|
+
<div
|
|
14
6
|
class="container flex-container"
|
|
15
7
|
>
|
|
16
8
|
{#each images as image }
|
|
17
|
-
<div
|
|
9
|
+
<div
|
|
10
|
+
style:width={`calc((100% / var(${columns})) - (10px * ${columns})))`}
|
|
11
|
+
class="image-container"
|
|
12
|
+
>
|
|
18
13
|
<Image
|
|
19
14
|
src={image.url}
|
|
20
15
|
height={imageHeight}
|
|
@@ -26,7 +21,7 @@ import '$lib/common/tailwind.css';
|
|
|
26
21
|
description={image.description}
|
|
27
22
|
disableHover={disableHover}
|
|
28
23
|
dark={dark}
|
|
29
|
-
|
|
24
|
+
borderRadius="10px"
|
|
30
25
|
></Image>
|
|
31
26
|
</div>
|
|
32
27
|
{/each}
|
|
@@ -47,6 +42,5 @@ import '$lib/common/tailwind.css';
|
|
|
47
42
|
.image-container {
|
|
48
43
|
margin-right: 10px;
|
|
49
44
|
margin-bottom: 10px;
|
|
50
|
-
width: calc((100% / var(--columns)) - (10px * var(--columns)));
|
|
51
45
|
}
|
|
52
46
|
</style>
|
|
@@ -13,7 +13,6 @@ function handleScroll() {
|
|
|
13
13
|
lastScrollY = scrollY;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
import '$lib/common/tailwind.css';
|
|
17
16
|
import Navigator from './Navigator.svelte';
|
|
18
17
|
</script>
|
|
19
18
|
|
|
@@ -23,21 +22,32 @@ import Navigator from './Navigator.svelte';
|
|
|
23
22
|
></svelte:window>
|
|
24
23
|
|
|
25
24
|
<nav
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
25
|
+
style:position="sticky"
|
|
26
|
+
style:display="flex"
|
|
27
|
+
style:flex-wrap="wrap"
|
|
28
|
+
style:align-items="center"
|
|
29
|
+
style:height="56px"
|
|
30
|
+
class="shadow-md transition-all header-menu-container"
|
|
31
|
+
class:-top-14={!visible}
|
|
31
32
|
class:top-0={visible}
|
|
32
33
|
>
|
|
33
34
|
{#if $$slots.prepend}
|
|
34
|
-
<div
|
|
35
|
+
<div
|
|
36
|
+
style:height="56px"
|
|
37
|
+
style:flex="none"
|
|
38
|
+
>
|
|
35
39
|
<slot name="prepend"></slot>
|
|
36
40
|
</div>
|
|
37
41
|
{/if}
|
|
38
|
-
<div
|
|
42
|
+
<div
|
|
43
|
+
style:flex-grow="1"
|
|
44
|
+
style:margin-left="4px"
|
|
45
|
+
>
|
|
39
46
|
<slot name="title">
|
|
40
|
-
<span
|
|
47
|
+
<span
|
|
48
|
+
style:font-size="24px"
|
|
49
|
+
style:line-height="32px"
|
|
50
|
+
>{title}</span>
|
|
41
51
|
</slot>
|
|
42
52
|
</div>
|
|
43
53
|
<div>
|
|
@@ -54,4 +64,31 @@ import Navigator from './Navigator.svelte';
|
|
|
54
64
|
color: var(--color);
|
|
55
65
|
width: var(--width, 100vw)
|
|
56
66
|
}
|
|
67
|
+
|
|
68
|
+
.shadow-md {
|
|
69
|
+
--shadow-color: #000;
|
|
70
|
+
--ring-inset: inset;
|
|
71
|
+
--ring-offset-width: 0px;
|
|
72
|
+
--ring-color: rgb(255 255 255/0.1);
|
|
73
|
+
--ring-offset-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
74
|
+
--ring-shadow: 0 0 #0000;
|
|
75
|
+
--shadow: 0 0 #0000;
|
|
76
|
+
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
77
|
+
--shadow-colored: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
|
|
78
|
+
box-shadow: var(--ring-offset-shadow, 0 0 #0000), var(--ring-shadow, 0 0 #0000), var(--shadow);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.-top-14 {
|
|
82
|
+
top: -56px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.top-0 {
|
|
86
|
+
top: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.transition-all {
|
|
90
|
+
transition-property: all;
|
|
91
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
92
|
+
transition-duration: 150ms;
|
|
93
|
+
}
|
|
57
94
|
</style>
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
4
|
<script >export let items = [];
|
|
5
|
-
import '$lib/common/tailwind.css';
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
|
-
<div
|
|
7
|
+
<div
|
|
8
|
+
style:display="flex"
|
|
9
|
+
>
|
|
9
10
|
{#each items as item}
|
|
10
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
style:margin-right="20px"
|
|
13
|
+
class="link bar-link"
|
|
14
|
+
>
|
|
11
15
|
{item.title}
|
|
12
16
|
</div>
|
|
13
17
|
{/each}
|
|
@@ -23,23 +23,19 @@ function setBookmarkPosition() {
|
|
|
23
23
|
bookmarkWidth = tabButton.offsetWidth - 10;
|
|
24
24
|
bookmarkLeft = tabButton.offsetLeft + 5;
|
|
25
25
|
}
|
|
26
|
-
$: cssVariables = Object.entries({
|
|
27
|
-
'--bookmark-left': bookmarkLeft + 'px',
|
|
28
|
-
'--bookmark-width': bookmarkWidth + 'px',
|
|
29
|
-
}).filter(([key]) => key.startsWith('--'))
|
|
30
|
-
.reduce((css, [key, value]) => {
|
|
31
|
-
return `${css}${key}: ${value};`;
|
|
32
|
-
}, '');
|
|
33
|
-
import '$lib/common/tailwind.css';
|
|
34
26
|
</script>
|
|
35
27
|
|
|
36
28
|
<div
|
|
37
|
-
|
|
38
|
-
style=
|
|
29
|
+
style:position="relative"
|
|
30
|
+
style:display="flex"
|
|
31
|
+
class="tab-switcher-container"
|
|
39
32
|
>
|
|
40
33
|
{#each tabs as tab}
|
|
41
34
|
<div
|
|
42
|
-
|
|
35
|
+
style:cursor="pointer"
|
|
36
|
+
style:margin-left="12px"
|
|
37
|
+
style:margin-right="12px"
|
|
38
|
+
style:padding="8px"
|
|
43
39
|
class:selected-tab={tab.name == selected}
|
|
44
40
|
on:click={() => handleTabClick(tab)}
|
|
45
41
|
bind:this={tabButtons[tab.name]}
|
|
@@ -47,7 +43,9 @@ import '$lib/common/tailwind.css';
|
|
|
47
43
|
{tab.label}
|
|
48
44
|
</div>
|
|
49
45
|
{/each}
|
|
50
|
-
<span
|
|
46
|
+
<span
|
|
47
|
+
style:left={bookmarkLeft + 'px'}
|
|
48
|
+
style:width={bookmarkWidth + 'px'}
|
|
51
49
|
class="bookmark"
|
|
52
50
|
></span>
|
|
53
51
|
<span class="horizontal-guide"></span>
|
|
@@ -80,8 +78,6 @@ import '$lib/common/tailwind.css';
|
|
|
80
78
|
z-index: 10;
|
|
81
79
|
background-color: var(--bookmark-color, var(--color, rgb(51 65 85)));
|
|
82
80
|
transition: left 400ms, width 400ms;
|
|
83
|
-
left: var(--bookmark-left);
|
|
84
|
-
width: var(--bookmark-width)
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likable-hair/svelte",
|
|
3
3
|
"description": "A Svelte component for likablehair",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.17",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@sveltejs/adapter-auto": "next",
|
|
7
7
|
"@sveltejs/kit": "next",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"./common/Gesture.svelte": "./common/Gesture.svelte",
|
|
30
30
|
"./common/IntersectionObserver.svelte": "./common/IntersectionObserver.svelte",
|
|
31
31
|
"./common/materialDesign.css": "./common/materialDesign.css",
|
|
32
|
-
"./common/tailwind.css": "./common/tailwind.css",
|
|
33
32
|
"./dates/Calendar.svelte": "./dates/Calendar.svelte",
|
|
34
33
|
"./dates/utils": "./dates/utils.js",
|
|
35
34
|
"./forms/Textfield.svelte": "./forms/Textfield.svelte",
|
package/shop/ProductCard.svelte
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
<script >export let image = '', title = '', sale = false, saleText = 'SALE', price = undefined, currency = '€', discount = undefined;
|
|
1
|
+
<script >export let image = '', title = '', sale = false, saleText = 'SALE', price = undefined, currency = '€', discount = undefined, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined;
|
|
2
2
|
$: priceLessDiscount = Number((price - discount).toFixed(2));
|
|
3
3
|
import Image from '../media/Image.svelte';
|
|
4
|
-
import '$lib/common/tailwind.css';
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
6
|
<style>
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
.shadow-lg {
|
|
8
|
+
--shadow-color: #000;
|
|
9
|
+
--ring-inset: inset;
|
|
10
|
+
--ring-offset-width: 0px;
|
|
11
|
+
--ring-color: rgb(255 255 255/0.1);
|
|
12
|
+
--ring-offset-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
13
|
+
--ring-shadow: 0 0 #0000;
|
|
14
|
+
--shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
15
|
+
--shadow-colored: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
|
|
16
|
+
box-shadow: var(--ring-offset-shadow, 0 0 #0000), var(--ring-shadow, 0 0 #0000), var(--shadow);
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.info {
|
|
@@ -19,7 +21,16 @@ import '$lib/common/tailwind.css';
|
|
|
19
21
|
}
|
|
20
22
|
</style>
|
|
21
23
|
|
|
22
|
-
<div
|
|
24
|
+
<div
|
|
25
|
+
style:width={width}
|
|
26
|
+
style:height={height}
|
|
27
|
+
style:max-width={maxWidth}
|
|
28
|
+
style:max-height={maxHeight}
|
|
29
|
+
style:min-width={minWidth}
|
|
30
|
+
style:min-height={minHeight}
|
|
31
|
+
style:border-radius="0.375rem"
|
|
32
|
+
class="container shadow-lg"
|
|
33
|
+
>
|
|
23
34
|
<Image
|
|
24
35
|
src={image}
|
|
25
36
|
width="100%"
|
|
@@ -28,27 +39,63 @@ import '$lib/common/tailwind.css';
|
|
|
28
39
|
--border-radius="10px 10px 0px 0px"
|
|
29
40
|
>
|
|
30
41
|
{#if sale}
|
|
31
|
-
<div
|
|
42
|
+
<div
|
|
43
|
+
style:font-weight="600"
|
|
44
|
+
style:font-size="14px"
|
|
45
|
+
style:line-height="20px"
|
|
46
|
+
style:color="rgb(250 250 249)"
|
|
47
|
+
style:background-color="rgb(239 68 68)"
|
|
48
|
+
style:border-radius="0.375rem"
|
|
49
|
+
style:top="8px"
|
|
50
|
+
style:right="8px"
|
|
51
|
+
style:width="fit-content"
|
|
52
|
+
style:position="absolute"
|
|
53
|
+
style:padding-left="8px"
|
|
54
|
+
style:padding-right="8px"
|
|
55
|
+
>{saleText}</div>
|
|
32
56
|
{/if}
|
|
33
57
|
</Image>
|
|
34
|
-
<div
|
|
35
|
-
|
|
58
|
+
<div
|
|
59
|
+
style:padding="8px"
|
|
60
|
+
style:position="relative"
|
|
61
|
+
class="info"
|
|
62
|
+
>
|
|
63
|
+
<div style:font-weight="600" >{title}</div>
|
|
36
64
|
{#if (price !== undefined && price !== null) || (discount !== undefined && discount !== null)}
|
|
37
|
-
<div
|
|
65
|
+
<div
|
|
66
|
+
style:position="absolute"
|
|
67
|
+
style:bottom="19px"
|
|
68
|
+
style:right="8px"
|
|
69
|
+
>
|
|
38
70
|
{#if discount !== undefined && discount !== null }
|
|
39
|
-
<span
|
|
71
|
+
<span
|
|
72
|
+
style:text-decoration-line="line-through"
|
|
73
|
+
style:font-size=""
|
|
74
|
+
style:letter-spacing="0.025em"
|
|
75
|
+
style:font-weight="400px"
|
|
76
|
+
style:color="rgb(156 163 175)"
|
|
77
|
+
>
|
|
40
78
|
{priceLessDiscount} {currency}
|
|
41
79
|
</span>
|
|
42
80
|
{/if}
|
|
43
81
|
|
|
44
82
|
{#if price !== undefined && price !== null }
|
|
45
|
-
<span
|
|
83
|
+
<span
|
|
84
|
+
style:letter-spacing="0.025em"
|
|
85
|
+
style:font-size="18px"
|
|
86
|
+
style:line-height="28px"
|
|
87
|
+
style:font-weight="600"
|
|
88
|
+
>
|
|
46
89
|
{price} {currency}
|
|
47
90
|
</span>
|
|
48
91
|
{/if}
|
|
49
92
|
</div>
|
|
50
93
|
{/if}
|
|
51
|
-
<div
|
|
94
|
+
<div
|
|
95
|
+
style:position="absolute"
|
|
96
|
+
style:bottom="19px"
|
|
97
|
+
style:left="8px"
|
|
98
|
+
>
|
|
52
99
|
<slot name="sizes">
|
|
53
100
|
|
|
54
101
|
</slot>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import '$lib/common/tailwind.css';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
image?: string;
|
|
@@ -9,6 +8,12 @@ declare const __propDef: {
|
|
|
9
8
|
price?: number;
|
|
10
9
|
currency?: string;
|
|
11
10
|
discount?: number;
|
|
11
|
+
maxWidth?: string;
|
|
12
|
+
maxHeight?: string;
|
|
13
|
+
minWidth?: string;
|
|
14
|
+
minHeight?: string;
|
|
15
|
+
width?: string;
|
|
16
|
+
height?: string;
|
|
12
17
|
};
|
|
13
18
|
events: {
|
|
14
19
|
[evt: string]: CustomEvent<any>;
|
package/shop/ProductsGrid.svelte
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
<script >export let products = [], productMaxWidth = '90vw', productMinWidth = '200px', productMaxHeight = '90vh', productMinHeight = '300px', productHeight = '300px', productWidth = '200px';
|
|
2
|
-
$: cssVariables = Object.entries({
|
|
3
|
-
'--min-width': productMinWidth || productWidth || '200px',
|
|
4
|
-
'--product-width': productWidth || '200px'
|
|
5
|
-
}).filter(([key]) => key.startsWith('--'))
|
|
6
|
-
.reduce((css, [key, value]) => {
|
|
7
|
-
return `${css}${key}: ${value};`;
|
|
8
|
-
}, '');
|
|
1
|
+
<script >export let products = [], productMaxWidth = '90vw', productMinWidth = '200px', productMaxHeight = '90vh', productMinHeight = '300px', productHeight = '300px', productWidth = '200px', width = '100%', gap = '1rem';
|
|
9
2
|
import ProductCard from './ProductCard.svelte';
|
|
10
|
-
import '$lib/common/tailwind.css';
|
|
11
3
|
</script>
|
|
12
4
|
|
|
13
5
|
<div
|
|
6
|
+
style:width={width}
|
|
7
|
+
style:gap={gap}
|
|
8
|
+
style:grid-template-columns={`repeat(auto-fit, minmax(${productMinWidth || productWidth || '200px'}, ${productWidth}))`}
|
|
14
9
|
class="product-grid-container"
|
|
15
|
-
style={cssVariables}
|
|
16
10
|
>
|
|
17
11
|
{#each products as product }
|
|
18
12
|
<div class="product-container">
|
|
19
13
|
<ProductCard
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
height={productHeight}
|
|
15
|
+
width={productWidth}
|
|
16
|
+
max-width={productMaxWidth}
|
|
17
|
+
min-width={productMinWidth}
|
|
18
|
+
max-height={productMaxHeight}
|
|
19
|
+
min-height={productMinHeight}
|
|
26
20
|
image={product.image}
|
|
27
21
|
title={product.title}
|
|
28
22
|
sale={product.sale}
|
|
@@ -41,11 +35,8 @@ import '$lib/common/tailwind.css';
|
|
|
41
35
|
|
|
42
36
|
<style>
|
|
43
37
|
.product-grid-container {
|
|
44
|
-
width: var(--width, 100%);
|
|
45
38
|
display: grid;
|
|
46
|
-
gap: var(--gap, 1rem);
|
|
47
39
|
align-content: space-between;
|
|
48
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--min-width), var(--product-width)));
|
|
49
40
|
}
|
|
50
41
|
|
|
51
42
|
.product-container {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import '$lib/common/tailwind.css';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
products?: {
|
|
@@ -17,6 +16,8 @@ declare const __propDef: {
|
|
|
17
16
|
productMinHeight?: string;
|
|
18
17
|
productHeight?: string;
|
|
19
18
|
productWidth?: string;
|
|
19
|
+
width?: string;
|
|
20
|
+
gap?: string;
|
|
20
21
|
};
|
|
21
22
|
events: {
|
|
22
23
|
[evt: string]: CustomEvent<any>;
|
|
@@ -21,7 +21,6 @@ $: if (!!value && periods.length > 0) {
|
|
|
21
21
|
visiblePeriodIndex = periods.findIndex((period) => period.name == value.name);
|
|
22
22
|
}
|
|
23
23
|
import Gesture from '../common/Gesture.svelte';
|
|
24
|
-
import '$lib/common/tailwind.css';
|
|
25
24
|
</script>
|
|
26
25
|
|
|
27
26
|
<style>
|
|
@@ -45,7 +44,7 @@ import '$lib/common/tailwind.css';
|
|
|
45
44
|
style:minHeight={minHeight}
|
|
46
45
|
class="timeline-container"
|
|
47
46
|
>
|
|
48
|
-
<div style="
|
|
47
|
+
<div style:display="flex">
|
|
49
48
|
{#if sideMenuVisible}
|
|
50
49
|
<div class="side-menu shrink">
|
|
51
50
|
{#if !!value}
|
package/common/tailwind.css
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
html {
|
|
2
|
-
--shadow-color: #000;
|
|
3
|
-
--ring-inset: inset;
|
|
4
|
-
--ring-offset-width: 0px;
|
|
5
|
-
--ring-color: rgb(255 255 255/0.1);
|
|
6
|
-
--ring-offset-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
7
|
-
--ring-shadow: 0 0 #0000;
|
|
8
|
-
--shadow: 0 0 #0000;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.relative {
|
|
12
|
-
position: relative;
|
|
13
|
-
}
|
|
14
|
-
.sticky {
|
|
15
|
-
position: sticky;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.transition-all {
|
|
19
|
-
transition-property: all;
|
|
20
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
-
transition-duration: 150ms;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.flex {
|
|
25
|
-
display: flex;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.flex-col {
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.flex-none {
|
|
33
|
-
flex: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.shrink {
|
|
37
|
-
flex-shrink: 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.grow {
|
|
41
|
-
flex-grow: 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.text-2xl {
|
|
45
|
-
font-size: 1.5rem/* 24px */;
|
|
46
|
-
line-height: 2rem/* 32px */;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.overflow-y-auto {
|
|
50
|
-
overflow-y: auto;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.items-center {
|
|
54
|
-
align-items: center;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.justify-center {
|
|
58
|
-
justify-content: center;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.rounded-md {
|
|
62
|
-
border-radius: 0.375rem
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.cursor-pointer {
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.border-solid {
|
|
70
|
-
border-style: solid;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.-top-12 {
|
|
74
|
-
top: -3rem/* -48px */;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.-top-14 {
|
|
78
|
-
top: -3.5rem/* -56px */;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.top-0 {
|
|
82
|
-
top: 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.bottom-3 {
|
|
86
|
-
bottom: 0.75rem/* 12px */;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.bottom-2 {
|
|
90
|
-
bottom: 0.5rem/* 8px */;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.mt-1 {
|
|
94
|
-
margin-top: 0.25rem/* 4px */;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.mt-6 {
|
|
98
|
-
margin-top: 1.5rem/* 24px */;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.ml-2 {
|
|
102
|
-
margin-left: 0.5rem/* 8px */;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.mr-2 {
|
|
106
|
-
margin-right: 0.5rem/* 8px */;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.mr-5 {
|
|
110
|
-
margin-right: 1.25rem/* 20px */;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.mx-2 {
|
|
114
|
-
margin-left: 0.5rem/* 8px */;
|
|
115
|
-
margin-right: 0.5rem/* 8px */;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.mx-3 {
|
|
119
|
-
margin-left: 0.75rem/* 12px */;
|
|
120
|
-
margin-right: 0.75rem/* 12px */;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.p-2 {
|
|
124
|
-
padding: 0.5rem/* 8px */;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.h-12 {
|
|
128
|
-
height: 3rem/* 48px */;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.h-14 {
|
|
132
|
-
height: 3.5rem/* 56px */;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.h-screen {
|
|
136
|
-
height: 100vh;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.shadow-lg {
|
|
140
|
-
--shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
141
|
-
--shadow-colored: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
|
|
142
|
-
box-shadow: var(--ring-offset-shadow, 0 0 #0000), var(--ring-shadow, 0 0 #0000), var(--shadow);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.shadow-md {
|
|
146
|
-
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
147
|
-
--shadow-colored: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
|
|
148
|
-
box-shadow: var(--ring-offset-shadow, 0 0 #0000), var(--ring-shadow, 0 0 #0000), var(--shadow);
|
|
149
|
-
}
|