@sierra-95/svelte-scaffold 1.0.52 → 1.0.54

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,18 +1,22 @@
1
1
  <script lang="ts">
2
- export let id: string = '';
3
- export let label: string = '';
4
- export let value: string | number = '';
5
- export let type: string = 'text';
6
- export let placeholder: string = '';
7
- export let underline: boolean = false;
8
- export let borderSize: string = '1px';
9
- export let borderColor: string = 'var(--input-border)';
10
- export let background: string = 'transparent';
11
- export let width: string = '100%';
12
- export let maxWidth: string = '';
2
+ let {
3
+ id = '',
4
+ label = '',
5
+ value = $bindable(""),
6
+ type = 'text',
7
+ placeholder = '',
8
+ underline = false,
9
+ borderSize = '1px',
10
+ borderColor = 'var(--input-border)',
11
+ background = 'transparent',
12
+ width = '100%',
13
+ maxWidth = '',
14
+ textColor = 'inherit',
15
+ ...rest
16
+ } = $props();
13
17
  </script>
14
18
 
15
- <label class="sierra-input" style="width: {width}; max-width: {maxWidth};" for={id}>{label}
19
+ <label class="sierra-input" style="width: {width}; max-width: {maxWidth}; color: {textColor}" for={id}>{label}
16
20
  <input
17
21
  id={id}
18
22
  name={id}
@@ -21,5 +25,8 @@
21
25
  placeholder={placeholder}
22
26
  class="{underline? 'underline-input':''}"
23
27
  style="background-color: {background}; border: {borderSize} solid {borderColor};"
24
- />
28
+ onclick={(e: MouseEvent) => {
29
+ rest.onclick?.(e);
30
+ }}
31
+ />
25
32
  </label>
@@ -1,20 +1,7 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
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 Input: $$__sveltets_2_IsomorphicComponent<{
1
+ declare const Input: import("svelte").Component<{
15
2
  id?: string;
16
3
  label?: string;
17
- value?: string | number;
4
+ value?: string;
18
5
  type?: string;
19
6
  placeholder?: string;
20
7
  underline?: boolean;
@@ -23,8 +10,7 @@ declare const Input: $$__sveltets_2_IsomorphicComponent<{
23
10
  background?: string;
24
11
  width?: string;
25
12
  maxWidth?: string;
26
- }, {
27
- [evt: string]: CustomEvent<any>;
28
- }, {}, {}, string>;
29
- type Input = InstanceType<typeof Input>;
13
+ textColor?: string;
14
+ } & Record<string, any>, {}, "value">;
15
+ type Input = ReturnType<typeof Input>;
30
16
  export default Input;
@@ -9,11 +9,12 @@
9
9
  export let background: string = 'transparent';
10
10
  export let width: string = '100%';
11
11
  export let maxWidth: string = '';
12
+ export let textColor: string = 'inherit';
12
13
 
13
14
  let show: boolean = false;
14
15
  </script>
15
16
 
16
- <label class="sierra-input" style="width: {width}; max-width: {maxWidth};" for={id}>{label}
17
+ <label class="sierra-input" style="width: {width}; max-width: {maxWidth}; color: {textColor}" for={id}>{label}
17
18
  <div style="position: relative;">
18
19
  <input
19
20
  type={show ? "text" : "password"}
@@ -22,6 +22,7 @@ declare const Password: $$__sveltets_2_IsomorphicComponent<{
22
22
  background?: string;
23
23
  width?: string;
24
24
  maxWidth?: string;
25
+ textColor?: string;
25
26
  }, {
26
27
  [evt: string]: CustomEvent<any>;
27
28
  }, {}, {}, string>;
@@ -6,14 +6,19 @@
6
6
  export let background: string ='transparent';
7
7
  export let width: string = '100%';
8
8
  export let maxWidth: string = '';
9
+ export let height: string = '100%';
10
+ export let textColor: string = 'inherit';
11
+ export let optionsColor: string = 'inherit';
12
+ export let optionsBackground: string = 'white';
9
13
  </script>
10
14
 
11
- <label class="sierra-input" style="width: {width}; max-width: {maxWidth};" for={id}>{label}
12
- <select bind:value={value} id={id} required style="background-color: {background};">
15
+ <label class="sierra-input" style="width: {width}; max-width: {maxWidth}; color: {textColor}" for={id}>{label}
16
+ <select bind:value={value} id={id} required style="background-color: {background}; height: {height}">
13
17
  {#each options as option}
14
18
  <option
15
19
  value={option.value}
16
20
  disabled={option.disabled}
21
+ style="color: {optionsColor}; background-color: {optionsBackground};"
17
22
  >{option.label}
18
23
  </option>
19
24
  {/each}
@@ -23,6 +23,10 @@ declare const Select: $$__sveltets_2_IsomorphicComponent<{
23
23
  background?: string;
24
24
  width?: string;
25
25
  maxWidth?: string;
26
+ height?: string;
27
+ textColor?: string;
28
+ optionsColor?: string;
29
+ optionsBackground?: string;
26
30
  }, {
27
31
  [evt: string]: CustomEvent<any>;
28
32
  }, {}, {}, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sierra-95/svelte-scaffold",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",