@sierra-95/svelte-scaffold 1.0.15 → 1.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.
@@ -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){
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  export let width: string = "100%";
3
- export let color: string = "var(--text-tertiary)";
3
+ export let color: string = "var(--hr)";
4
4
  </script>
5
5
 
6
6
  <style>
@@ -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
package/dist/global.css CHANGED
@@ -44,16 +44,19 @@
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*/
53
55
  --input-border-light: #B0B0B0;
54
56
  --input-border-dark: #7A7F87;
55
57
 
56
-
58
+ --hr-light: #e5e5e5;
59
+ --hr-dark: #1f1f1f;
57
60
 
58
61
  /*Buttons*/
59
62
  --button-light-text: var(--light-Theme);
@@ -94,7 +97,9 @@ body[data-theme='light'] {
94
97
  --sierra-menu: var(--sierra-menu-light);
95
98
  --border: var(--border-light);
96
99
  --input-border: var(--input-border-light);
100
+ --hr: var(--hr-light);
97
101
 
102
+ --menu-bg: var(--menu-bg-light);
98
103
  --menu-item-hover: var(--menu-item-hover-light);
99
104
  --menu-item-active: var(--menu-item-active-light);
100
105
  --button-text: var(--button-light-text);
@@ -125,7 +130,9 @@ body, body[data-theme='dark']{
125
130
  --sierra-menu: var(--sierra-menu-dark);
126
131
  --border: var(--border-dark);
127
132
  --input-border: var(--input-border-dark);
133
+ --hr: var(--hr-dark);
128
134
 
135
+ --menu-bg: var(--menu-bg-dark);
129
136
  --menu-item-hover: var(--menu-item-hover-dark);
130
137
  --menu-item-active: var(--menu-item-active-dark);
131
138
  --button-text: var(--button-dark-text);
@@ -153,6 +160,13 @@ body, body[data-theme='dark']{
153
160
  background-color: transparent;
154
161
  }
155
162
 
163
+ .sierra-input .underline-input{
164
+ border: none;
165
+ border-bottom: 1px solid var(--input-border);
166
+ border-radius: 0;
167
+ padding: 0.15rem 0;
168
+ }
169
+
156
170
  .sierra-input button {
157
171
  position: absolute;
158
172
  right: 0.75rem;
@@ -188,6 +202,10 @@ button{
188
202
  transform: translateY(-5px);
189
203
  }
190
204
 
205
+ .sierra-flex-col{
206
+ display: flex;
207
+ flex-direction: column;
208
+ }
191
209
  /**Select, Input**/
192
210
  select:focus,
193
211
  input:focus {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sierra-95/svelte-scaffold",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",