fuma 1.0.2 → 1.0.4

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.
@@ -41,6 +41,7 @@
41
41
  export let actionCreate = '_create'
42
42
  export let actionDelete = '_delete'
43
43
  export let actionUpdate = '_update'
44
+ export let disabled = false
44
45
 
45
46
  /** Ignore actionCreate, actionDelete and actionUpdate */
46
47
  export let simpleAction = false
@@ -155,12 +156,12 @@
155
156
  sticky col-span-full mt-2 flex flex-row-reverse gap-2 border-t py-4 backdrop-blur-sm
156
157
  "
157
158
  >
158
- <button class="btn btn-primary"> Valider </button>
159
+ <button class="btn btn-primary" {disabled}> Valider </button>
159
160
  <div class="grow"></div>
160
161
  {#if !simpleAction && data.id && actionDelete}
161
162
  {@const formaction = `${action}${actionDelete}`}
162
163
  <slot name="delete" {formaction}>
163
- <ButtonDelete {formaction}>Supprimer</ButtonDelete>
164
+ <ButtonDelete {formaction} {disabled}>Supprimer</ButtonDelete>
164
165
  </slot>
165
166
  {/if}
166
167
  </div>
@@ -15,6 +15,7 @@ declare class __sveltets_Render<Shape extends z.ZodRawShape, ReturnData extends
15
15
  actionCreate?: string | undefined;
16
16
  actionDelete?: string | undefined;
17
17
  actionUpdate?: string | undefined;
18
+ disabled?: boolean | undefined;
18
19
  /** Ignore actionCreate, actionDelete and actionUpdate */ simpleAction?: boolean | undefined;
19
20
  options?: UseFormOptions<ReturnData> | undefined;
20
21
  data?: Nullable<Data> | undefined;
@@ -8,6 +8,7 @@
8
8
 
9
9
  let klass = ''
10
10
  export { klass as class }
11
+ export let defaultMode: 'dark' | 'light' | 'system' | undefined = undefined
11
12
 
12
13
  onMount(() => {
13
14
  const [html] = document.getElementsByTagName('html')
@@ -25,7 +26,7 @@
25
26
  $: path = $mode === 'light' ? mdiWhiteBalanceSunny : mdiWeatherNight
26
27
  </script>
27
28
 
28
- <ModeWatcher defaultMode="light" />
29
+ <ModeWatcher {defaultMode} />
29
30
 
30
31
  <slot {toggleMode} {path}>
31
32
  <button class="btn btn-square btn-sm {klass}" on:click={toggleMode}>
@@ -3,6 +3,7 @@ import { toggleMode } from 'mode-watcher';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  class?: string | undefined;
6
+ defaultMode?: 'dark' | 'light' | 'system' | undefined;
6
7
  children?: import("svelte").Snippet<[{
7
8
  toggleMode: typeof toggleMode;
8
9
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",