simplesvelte 2.2.22 → 2.3.1

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,43 +1,43 @@
1
- <script lang="ts">
2
- import Label from './Label.svelte'
3
-
4
- type Props = {
5
- value?: any
6
- name?: string
7
- label?: string
8
- class?: string
9
- required?: boolean
10
- disabled?: boolean
11
- element?: HTMLElement
12
- error?: string
13
- zodErrors?: {
14
- expected: string
15
- code: string
16
- path: string[]
17
- message: string
18
- }[]
19
- [x: string]: any
20
- }
21
- let {
22
- value = $bindable(),
23
- element = $bindable(),
24
- label,
25
- name,
26
- required,
27
- disabled,
28
- class: myClass,
29
- error,
30
- zodErrors,
31
- ...rest
32
- }: Props = $props()
33
- const errorText = $derived.by(() => {
34
- if (error) return error
35
- if (!name) return undefined
36
- if (zodErrors) return zodErrors.find((e) => e.path.includes(name))?.message
37
- return undefined
38
- })
39
- </script>
40
-
41
- <Label class={myClass} {label} {name} optional={!required} {disabled} error={errorText}>
42
- <textarea bind:this={element} {disabled} {name} {required} class="textarea w-full" {...rest} bind:value></textarea>
43
- </Label>
1
+ <script lang="ts">
2
+ import Label from './Label.svelte'
3
+
4
+ type Props = {
5
+ value?: any
6
+ name?: string
7
+ label?: string
8
+ class?: string
9
+ required?: boolean
10
+ disabled?: boolean
11
+ element?: HTMLElement
12
+ error?: string
13
+ zodErrors?: {
14
+ expected: string
15
+ code: string
16
+ path: string[]
17
+ message: string
18
+ }[]
19
+ [x: string]: any
20
+ }
21
+ let {
22
+ value = $bindable(),
23
+ element = $bindable(),
24
+ label,
25
+ name,
26
+ required,
27
+ disabled,
28
+ class: myClass,
29
+ error,
30
+ zodErrors,
31
+ ...rest
32
+ }: Props = $props()
33
+ const errorText = $derived.by(() => {
34
+ if (error) return error
35
+ if (!name) return undefined
36
+ if (zodErrors) return zodErrors.find((e) => e.path.includes(name))?.message
37
+ return undefined
38
+ })
39
+ </script>
40
+
41
+ <Label class={myClass} {label} {name} optional={!required} {disabled} error={errorText}>
42
+ <textarea bind:this={element} {disabled} {name} {required} class="textarea w-full" {...rest} bind:value></textarea>
43
+ </Label>
package/dist/styles.css CHANGED
@@ -1,10 +1,10 @@
1
- @import 'tailwindcss';
2
- @plugin "daisyui";
3
-
4
- html,
5
- body {
6
- display: flex;
7
- flex-direction: column;
8
- height: 100%;
9
- background-color: var(--color-base-200);
10
- }
1
+ @import 'tailwindcss';
2
+ @plugin "daisyui";
3
+
4
+ html,
5
+ body {
6
+ display: flex;
7
+ flex-direction: column;
8
+ height: 100%;
9
+ background-color: var(--color-base-200);
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplesvelte",
3
- "version": "2.2.22",
3
+ "version": "2.3.1",
4
4
  "scripts": {
5
5
  "dev": "bun vite dev",
6
6
  "build": "bun vite build && bun run prepack",