@sierra-95/svelte-scaffold 1.0.14 → 1.0.16

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.
@@ -7,7 +7,7 @@
7
7
  border-bottom-right-radius: 5px;
8
8
  border-left: 6px solid var(--retval);
9
9
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
10
- background-color: var(--background-secondary);
10
+ background-color: var(--menu-bg);
11
11
  z-index: 25;
12
12
  }
13
13
  #toast div:nth-child(1){
@@ -4,6 +4,7 @@
4
4
  export let value: string | number = '';
5
5
  export let type: string = 'text';
6
6
  export let placeholder: string = '';
7
+ export let underline: boolean = false;
7
8
  </script>
8
9
 
9
10
  <label class="sierra-input" for={id}>{label}
@@ -13,5 +14,6 @@
13
14
  type={type}
14
15
  bind:value={value}
15
16
  placeholder={placeholder}
17
+ class="{underline? 'underline-input':''}"
16
18
  />
17
19
  </label>
@@ -17,6 +17,7 @@ declare const Input: $$__sveltets_2_IsomorphicComponent<{
17
17
  value?: string | number;
18
18
  type?: string;
19
19
  placeholder?: string;
20
+ underline?: boolean;
20
21
  }, {
21
22
  [evt: string]: CustomEvent<any>;
22
23
  }, {}, {}, string>;
@@ -3,6 +3,7 @@
3
3
  export let label: string = '';
4
4
  export let value: string = '';
5
5
  export let placeholder: string = '';
6
+ export let underline: boolean = false;
6
7
  let show: boolean = false;
7
8
  </script>
8
9
 
@@ -15,6 +16,7 @@
15
16
  name={id}
16
17
  bind:value={value}
17
18
  placeholder={placeholder}
19
+ class="{underline? 'underline-input':''}"
18
20
  />
19
21
  <button on:click|preventDefault={() => show = !show}>
20
22
  {#if show}
@@ -16,6 +16,7 @@ declare const Password: $$__sveltets_2_IsomorphicComponent<{
16
16
  label?: string;
17
17
  value?: string;
18
18
  placeholder?: string;
19
+ underline?: boolean;
19
20
  }, {
20
21
  [evt: string]: CustomEvent<any>;
21
22
  }, {}, {}, string>;
@@ -63,7 +63,7 @@
63
63
  }
64
64
  #sierra-dropdown .dropdown-paper {
65
65
  position: absolute;
66
- background-color: var(--background-secondary);
66
+ background-color: var(--menu-bg);
67
67
  border-radius: 5px;
68
68
  box-shadow: var(--box-shadow);
69
69
  min-width: 5px;
@@ -42,7 +42,7 @@
42
42
  {:else}
43
43
  <div style="display: flex; flex-wrap:wrap; gap: 1rem">
44
44
  {#each media.Audio as item (item.id || uuid())}
45
- <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position: relative; width: 200px;display: flex; gap: 0.5rem; padding: 0.5rem; box-shadow: var(--box-shadow-secondary); border-radius: 0.3rem; cursor: pointer;">
45
+ <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position: relative; width: 200px;display: flex; gap: 0.5rem; padding: 0.5rem; box-shadow: var(--box-shadow-secondary); border-radius: 0.3rem; cursor: pointer; background-color: var(--background-tertiary);">
46
46
  <button aria-label="Play or pause audio" on:click|stopPropagation={() => togglePlay(item.id)}>
47
47
  <i class="fa {audioPlaying[item.id] ? 'fa-pause' : 'fa-play'}" aria-hidden="true"></i>
48
48
  </button>
@@ -10,7 +10,7 @@
10
10
  {:else}
11
11
  <div style="display: flex; flex-wrap: wrap; gap: 1rem;">
12
12
  {#each media.Images as item}
13
- <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position:relative; box-shadow: var(--box-shadow-secondary);width: 150px;border-radius: 0.3rem;cursor: pointer;">
13
+ <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position:relative; box-shadow: var(--box-shadow-secondary);width: 150px;border-radius: 0.3rem;cursor: pointer; background-color: var(--background-tertiary);">
14
14
  <img src={urlsOnly ? item.url : getPreviewUrlForMedia(item)} alt={item} style="width: 100%; height: 100px; object-fit: cover;border-top-left-radius: 0.3rem; border-top-right-radius: 0.3rem;" />
15
15
  <h3 style="margin: 0.5rem" class="sierra-text-ellipsis">{item.original_name || item.name}</h3>
16
16
  {#if buttonTimes}
@@ -10,7 +10,7 @@
10
10
  {:else}
11
11
  <div style="display: flex; flex-wrap: wrap; gap: 1rem;">
12
12
  {#each media.Videos as item}
13
- <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position:relative; box-shadow: var(--box-shadow-secondary);width: 150px;border-radius: 0.3rem; cursor: pointer;">
13
+ <div on:click={() => toggleSelectForMedia(item, urlsOnly)} role="none" class="sierra-translate" style="position:relative; box-shadow: var(--box-shadow-secondary);width: 150px;border-radius: 0.3rem; cursor: pointer; background-color: var(--background-tertiary);">
14
14
  <video on:click|stopPropagation src={urlsOnly ? item.url : getPreviewUrlForMedia(item)} controls style="width: 100%; height: 100px; object-fit: cover; border-top-left-radius: 0.3rem; border-top-right-radius: 0.3rem;">
15
15
  <track kind="captions" />
16
16
  </video>
@@ -66,12 +66,14 @@
66
66
  </script>
67
67
 
68
68
  {#snippet addLinkContent()}
69
- <Input label="Enter Link Text" id="link-text" bind:value={text}/>
70
- <Input label="Enter Link URL" id="link-url" bind:value={url}/>
69
+ <div class="sierra-flex-col" style="margin: 1rem 0rem; gap: 1rem;">
70
+ <Input underline label="Enter link text" id="link-text" bind:value={text}/>
71
+ <Input underline label="Enter link URL" id="link-url" bind:value={url}/>
72
+ </div>
71
73
  {/snippet}
72
74
 
73
75
  {#snippet editLinkContent()}
74
- <Input label="Edit Link URL" id="link-url" bind:value={url}/>
76
+ <Input underline label="Edit link URL" id="link-url" bind:value={url}/>
75
77
  {/snippet}
76
78
 
77
79
  <button aria-label="Link Button" on:click={ editor.isActive('link')? updateLink : newLink} title="Add/Edit Link">
@@ -76,7 +76,9 @@
76
76
  }
77
77
  </script>
78
78
  {#snippet formContent()}
79
- <Input label="Enter Image URL" id="image-url" bind:value={value}/>
79
+ <div style="margin: 1rem 0rem;">
80
+ <Input label="Enter Image URL" id="image-url" underline bind:value={value}/>
81
+ </div>
80
82
  {/snippet}
81
83
  <DropdownContainer bind:open={openDropdown} width="150px">
82
84
  {#snippet dropdownTrigger()}
@@ -21,7 +21,9 @@
21
21
  </script>
22
22
 
23
23
  {#snippet addYoutubeContent()}
24
- <Input label="Enter Youtube URL" id="youtube-url" bind:value={youtubeUrl}/>
24
+ <div style="margin: 1rem 0rem;">
25
+ <Input label="Enter Youtube URL" id="youtube-url" underline bind:value={youtubeUrl}/>
26
+ </div>
25
27
  {/snippet}
26
28
 
27
29
  <button
@@ -75,6 +75,10 @@
75
75
  </script>
76
76
 
77
77
  <style>
78
+ #sierra-cloud-store{
79
+ /**Dont remove, the Selected item count depends on this relative positioning*/
80
+ position: relative;
81
+ }
78
82
  #sierra-cloud-store .icon-active {
79
83
  background-color: var(--menu-item-active);
80
84
  }
@@ -17,7 +17,7 @@
17
17
  }
18
18
  </script>
19
19
 
20
- <div id="file-picker-previews" style="flex-grow: 1; overflow-y: auto; padding-top: 1rem; max-height: 400px; position: relative;">
20
+ <div id="file-picker-previews" style="flex-grow: 1; overflow-y: auto; padding-top: 1rem; max-height: 400px;">
21
21
  {#if media}
22
22
  {#if $fileInputStore.activeMenu === 'Music'}
23
23
  <PreviewAudio {media} />
package/dist/global.css CHANGED
@@ -44,9 +44,11 @@
44
44
  --border-dark: hsl(220, 14%, 24%);
45
45
 
46
46
  /*Menus*/
47
- --menu-item-hover-light: rgba(0, 0, 0, 0.06);
47
+ --menu-bg-light: var(--light-Theme);
48
+ --menu-bg-dark: var(--dark-secondary);
49
+ --menu-item-hover-light: rgba(0, 0, 0, 0.04);
48
50
  --menu-item-hover-dark: rgba(255, 255, 255, 0.08);
49
- --menu-item-active-light: rgba(0, 0, 0, 0.12);
51
+ --menu-item-active-light: rgba(0, 0, 0, 0.08);
50
52
  --menu-item-active-dark: rgba(255, 255, 255, 0.16);
51
53
 
52
54
  /*Inputs*/
@@ -95,6 +97,7 @@ body[data-theme='light'] {
95
97
  --border: var(--border-light);
96
98
  --input-border: var(--input-border-light);
97
99
 
100
+ --menu-bg: var(--menu-bg-light);
98
101
  --menu-item-hover: var(--menu-item-hover-light);
99
102
  --menu-item-active: var(--menu-item-active-light);
100
103
  --button-text: var(--button-light-text);
@@ -126,6 +129,7 @@ body, body[data-theme='dark']{
126
129
  --border: var(--border-dark);
127
130
  --input-border: var(--input-border-dark);
128
131
 
132
+ --menu-bg: var(--menu-bg-dark);
129
133
  --menu-item-hover: var(--menu-item-hover-dark);
130
134
  --menu-item-active: var(--menu-item-active-dark);
131
135
  --button-text: var(--button-dark-text);
@@ -153,6 +157,13 @@ body, body[data-theme='dark']{
153
157
  background-color: transparent;
154
158
  }
155
159
 
160
+ .sierra-input .underline-input{
161
+ border: none;
162
+ border-bottom: 1px solid var(--input-border);
163
+ border-radius: 0;
164
+ padding: 0.15rem 0;
165
+ }
166
+
156
167
  .sierra-input button {
157
168
  position: absolute;
158
169
  right: 0.75rem;
@@ -188,6 +199,10 @@ button{
188
199
  transform: translateY(-5px);
189
200
  }
190
201
 
202
+ .sierra-flex-col{
203
+ display: flex;
204
+ flex-direction: column;
205
+ }
191
206
  /**Select, Input**/
192
207
  select:focus,
193
208
  input:focus {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sierra-95/svelte-scaffold",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",