simplesvelte 2.4.7 → 2.4.9

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.
@@ -20,6 +20,7 @@ type Props = {
20
20
  disabled?: boolean;
21
21
  multiple?: boolean;
22
22
  error?: string;
23
+ hideOptional?: boolean;
23
24
  zodErrors?: {
24
25
  expected: string;
25
26
  code: string;
@@ -10,6 +10,7 @@
10
10
  disabled?: boolean
11
11
  element?: HTMLElement
12
12
  error?: string
13
+ hideOptional?: boolean
13
14
  zodErrors?: {
14
15
  expected: string
15
16
  code: string
@@ -27,6 +28,7 @@
27
28
  disabled,
28
29
  class: myClass,
29
30
  error,
31
+ hideOptional,
30
32
  zodErrors,
31
33
  ...rest
32
34
  }: Props = $props()
@@ -38,6 +40,6 @@
38
40
  })
39
41
  </script>
40
42
 
41
- <Label class={myClass} {label} {name} optional={!required} {disabled} error={errorText}>
43
+ <Label class={myClass} {label} {name} optional={!required && !hideOptional} {disabled} error={errorText}>
42
44
  <textarea bind:this={element} {disabled} {name} {required} class="textarea w-full" {...rest} bind:value></textarea>
43
45
  </Label>
@@ -7,6 +7,7 @@ type Props = {
7
7
  disabled?: boolean;
8
8
  element?: HTMLElement;
9
9
  error?: string;
10
+ hideOptional?: boolean;
10
11
  zodErrors?: {
11
12
  expected: string;
12
13
  code: string;
package/dist/styles.css CHANGED
@@ -1,15 +1,15 @@
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
- }
11
-
12
- /* Ensure popover elements are hidden by default - use !important to override menu display:flex */
13
- [popover]:not(:popover-open) {
14
- display: none !important;
15
- }
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
+ }
11
+
12
+ /* Ensure popover elements are hidden by default - use !important to override menu display:flex */
13
+ [popover]:not(:popover-open) {
14
+ display: none !important;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplesvelte",
3
- "version": "2.4.7",
3
+ "version": "2.4.9",
4
4
  "scripts": {
5
5
  "dev": "bun vite dev",
6
6
  "build": "bun vite build && bun run prepack",