fuma 0.3.24 → 0.3.25

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,4 +1,4 @@
1
- type Container = 'drawer' | 'card';
1
+ type Container = 'drawer' | 'card' | 'dialog';
2
2
  export declare const contextContainer: {
3
3
  set(container: Container): Container;
4
4
  get(): Container | null;
@@ -1,11 +1,13 @@
1
1
  <script>import { createEventDispatcher, onMount } from "svelte";
2
2
  import { mdiClose } from "@mdi/js";
3
3
  import { Icon } from "../icon/index.js";
4
+ import { contextContainer } from "../context.js";
4
5
  export let dialog;
5
6
  export let hideCloseButton = false;
6
7
  let klass = "";
7
8
  export { klass as class };
8
9
  const dispatch = createEventDispatcher();
10
+ contextContainer.set("dialog");
9
11
  onMount(() => {
10
12
  const inputsSelector = 'input:not([type=hidden], [tabindex="-1"])';
11
13
  const inputs = dialog.querySelectorAll(inputsSelector);
@@ -77,10 +77,13 @@ function lookupValueFromParams() {
77
77
  const actionPadding = getActionPadding();
78
78
  function getActionPadding() {
79
79
  const container = contextContainer.get();
80
+ console.log({ container });
80
81
  if (container === "card")
81
82
  return "-mx-2 sm:-mx-8 px-2 sm:px-8";
82
83
  if (container === "drawer")
83
84
  return "-ml-8 -mr-4 pl-8 pr-4";
85
+ if (container === "dialog")
86
+ return "-bottom-4 -mx-4 px-4";
84
87
  return "";
85
88
  }
86
89
  const getBoolean = (bool) => (_data) => typeof bool === "boolean" || bool === void 0 ? !!bool : !!bool(_data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",