@sierra-95/svelte-scaffold 1.2.17 → 1.2.18
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.
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
let {
|
|
3
|
+
id = '',
|
|
4
|
+
label = '',
|
|
5
|
+
value = $bindable<string | number>(),
|
|
6
|
+
options = [],
|
|
7
|
+
background = 'transparent',
|
|
8
|
+
width = '100%',
|
|
9
|
+
maxWidth = '',
|
|
10
|
+
height = '100%',
|
|
11
|
+
textColor = 'inherit',
|
|
12
|
+
optionsColor = 'inherit',
|
|
13
|
+
optionsBackground = 'white',
|
|
14
|
+
showInput = true,
|
|
15
|
+
readonly = false,
|
|
16
|
+
} = $props();
|
|
14
17
|
</script>
|
|
15
18
|
|
|
16
19
|
{#if showInput}
|
|
17
20
|
<label class="sierra-input" style="width: {width}; max-width: {maxWidth}; color: {textColor}" for={id}>{label}
|
|
18
|
-
<select bind:value={value} id={id} name={id} required style="background-color: {background}; height: {height}">
|
|
21
|
+
<select disabled={readonly} bind:value={value} id={id} name={id} required style="background-color: {background}; height: {height}">
|
|
19
22
|
{#each options as option}
|
|
20
23
|
<option
|
|
21
24
|
value={option.value}
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Select: $$__sveltets_2_IsomorphicComponent<{
|
|
1
|
+
declare const Select: import("svelte").Component<{
|
|
15
2
|
id?: string;
|
|
16
3
|
label?: string;
|
|
17
|
-
value?:
|
|
18
|
-
options?:
|
|
19
|
-
value: string | number;
|
|
20
|
-
label: string;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
}[];
|
|
4
|
+
value?: any;
|
|
5
|
+
options?: any[];
|
|
23
6
|
background?: string;
|
|
24
7
|
width?: string;
|
|
25
8
|
maxWidth?: string;
|
|
@@ -28,8 +11,7 @@ declare const Select: $$__sveltets_2_IsomorphicComponent<{
|
|
|
28
11
|
optionsColor?: string;
|
|
29
12
|
optionsBackground?: string;
|
|
30
13
|
showInput?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type Select = InstanceType<typeof Select>;
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
}, {}, "value">;
|
|
16
|
+
type Select = ReturnType<typeof Select>;
|
|
35
17
|
export default Select;
|
package/dist/global.css
CHANGED
|
@@ -147,16 +147,39 @@ body[data-theme='dark']{
|
|
|
147
147
|
--background-v1-gradient-line-end: var(--background-v1-gradient-line-dark-end);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
/**
|
|
150
|
+
/**START OF INPUTS*/
|
|
151
|
+
select:focus,
|
|
152
|
+
input:focus,
|
|
153
|
+
textarea:focus {
|
|
154
|
+
outline: none;
|
|
155
|
+
box-shadow: none;
|
|
156
|
+
}
|
|
151
157
|
.sierra-input{
|
|
152
158
|
display: flex;
|
|
153
159
|
flex-direction: column;
|
|
154
160
|
gap: 0.2rem;
|
|
155
161
|
}
|
|
162
|
+
/*select*/
|
|
163
|
+
.sierra-input select {
|
|
164
|
+
border-radius: 5px;
|
|
165
|
+
border: 1px solid var(--input-border);
|
|
166
|
+
background-color: unset;
|
|
167
|
+
}
|
|
168
|
+
select option {
|
|
169
|
+
background-color: var(--background-tertiary);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.sierra-input select:disabled{
|
|
173
|
+
border: 1px solid rgb(from var(--input-border) r g b / 0.3) !important;
|
|
174
|
+
}
|
|
175
|
+
/*input and textarea*/
|
|
156
176
|
.sierra-input input, .sierra-input textarea {
|
|
157
177
|
padding: 0.75rem;
|
|
158
178
|
border-radius: 4px;
|
|
159
179
|
}
|
|
180
|
+
.sierra-input input:read-only, .sierra-input textarea:read-only {
|
|
181
|
+
border: 1px solid rgb(from var(--input-border) r g b / 0.3) !important;
|
|
182
|
+
}
|
|
160
183
|
|
|
161
184
|
.sierra-input .underline-input{
|
|
162
185
|
border: none !important;
|
|
@@ -175,55 +198,11 @@ body[data-theme='dark']{
|
|
|
175
198
|
.sierra-input button i{
|
|
176
199
|
color: var(--icon-theme);
|
|
177
200
|
}
|
|
201
|
+
/* END OF INPUTS **/
|
|
178
202
|
|
|
179
|
-
button{
|
|
180
|
-
cursor: pointer;
|
|
181
|
-
}
|
|
182
203
|
|
|
183
|
-
.sierra-text-ellipsis{
|
|
184
|
-
white-space: nowrap;
|
|
185
|
-
overflow: hidden;
|
|
186
|
-
text-overflow: ellipsis;
|
|
187
|
-
}
|
|
188
|
-
.sierra-text-wrap {
|
|
189
|
-
white-space: normal;
|
|
190
|
-
overflow-wrap: break-word;
|
|
191
|
-
word-break: break-word;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.sierra-translate {
|
|
195
|
-
display: inline-block;
|
|
196
|
-
transition: transform 0.3s ease;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.sierra-translate:hover {
|
|
200
|
-
transform: translateY(-5px);
|
|
201
|
-
}
|
|
202
204
|
|
|
203
|
-
|
|
204
|
-
display: flex;
|
|
205
|
-
flex-direction: column;
|
|
206
|
-
}
|
|
207
|
-
/**Select, Input**/
|
|
208
|
-
select:focus,
|
|
209
|
-
input:focus,
|
|
210
|
-
textarea:focus {
|
|
211
|
-
outline: none;
|
|
212
|
-
box-shadow: none;
|
|
213
|
-
}
|
|
214
|
-
select {
|
|
215
|
-
border-radius: 5px;
|
|
216
|
-
border: 1px solid var(--input-border);
|
|
217
|
-
background-color: unset;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
select option {
|
|
221
|
-
background-color: var(--background-tertiary);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
/* Scrollbar */
|
|
205
|
+
/* START OF SCROLLBAR */
|
|
227
206
|
::-webkit-scrollbar {
|
|
228
207
|
width: 8px;
|
|
229
208
|
}
|
|
@@ -241,7 +220,9 @@ select option {
|
|
|
241
220
|
background: var(--scroll-bar-thumb-hover);
|
|
242
221
|
}
|
|
243
222
|
|
|
244
|
-
|
|
223
|
+
/* END OF SCROLLBAR */
|
|
224
|
+
|
|
225
|
+
/**START OF BUTTON RIPPLE EFFECT */
|
|
245
226
|
button:disabled{
|
|
246
227
|
opacity: 0.6;
|
|
247
228
|
cursor: not-allowed;
|
|
@@ -263,10 +244,40 @@ button:disabled{
|
|
|
263
244
|
background: currentColor;
|
|
264
245
|
}
|
|
265
246
|
|
|
266
|
-
|
|
247
|
+
/**END OF BUTTON RIPPLE EFFECT */
|
|
248
|
+
|
|
249
|
+
/*START OF CONVINIENCE CLASSES*/
|
|
250
|
+
button{
|
|
251
|
+
cursor: pointer;
|
|
252
|
+
}
|
|
267
253
|
i.fa-chevron-down {
|
|
268
254
|
transition: transform 0.2s;
|
|
269
255
|
}
|
|
270
256
|
i.fa-chevron-down.active {
|
|
271
257
|
transform: rotate(180deg);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.sierra-text-ellipsis{
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
overflow: hidden;
|
|
263
|
+
text-overflow: ellipsis;
|
|
264
|
+
}
|
|
265
|
+
.sierra-text-wrap {
|
|
266
|
+
white-space: normal;
|
|
267
|
+
overflow-wrap: break-word;
|
|
268
|
+
word-break: break-word;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.sierra-translate {
|
|
272
|
+
display: inline-block;
|
|
273
|
+
transition: transform 0.3s ease;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.sierra-translate:hover {
|
|
277
|
+
transform: translateY(-5px);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.sierra-flex-col{
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-direction: column;
|
|
272
283
|
}
|