odj-svelte-ui 0.2.2 → 0.2.3

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.
@@ -4,7 +4,7 @@
4
4
  let { children, footer, items = [], full, dropdownStatus = $bindable(), class: className, ...restProps }: Props = $props();
5
5
 
6
6
  const { base, div, ul, footerDiv } = $derived(megamenu());
7
- $inspect("dropdownStatus", dropdownStatus);
7
+ // $inspect("dropdownStatus", dropdownStatus);
8
8
  </script>
9
9
 
10
10
  <!-- Dropdown menu -->
@@ -19,9 +19,9 @@
19
19
 
20
20
  // let currentUrl = $state();
21
21
  let isActive = $derived(navUrl ? href === navUrl : false);
22
- $effect(() => {
23
- $inspect("navUrl: ", navUrl);
24
- });
22
+ // $effect(() => {
23
+ // $inspect("navUrl: ", navUrl);
24
+ // });
25
25
 
26
26
  const { base, link } = $derived(navLi({ active: isActive, breakPoint }));
27
27
  </script>
@@ -15,8 +15,7 @@
15
15
 
16
16
  const { base, btn, span, svg, ul } = $derived(sidebardropdownwrapper());
17
17
 
18
- let sidebarDropdown = uiHelpers();
19
- sidebarDropdown.isOpen = isOpen;
18
+ let sidebarDropdown = uiHelpers(isOpen);
20
19
  let ctx = getContext<SidebarContext>("sidebarContext") || { isSingle: false };
21
20
  let self = {};
22
21
 
@@ -2,7 +2,7 @@ import { tv } from "tailwind-variants";
2
2
  export const sidebar = tv({
3
3
  slots: {
4
4
  base: "top-0 left-0 z-10 min-w-full",
5
- div: "overflow-y-auto p-2 rounded-lg bg-light-surface-100 dark:bg-dark-surface-800",
5
+ div: "overflow-y-auto p-2 rounded-xl bg-light-surface-100 dark:bg-dark-surface-800",
6
6
  active: "cursor-pointer flex items-center p-2 rounded-lg text-base font-normal text-light-surface-900 dark:text-white bg-light-surface-300 dark:bg-dark-surface-700 hover:bg-light-surface-300/50 dark:hover:bg-dark-surface-600",
7
7
  nonactive: "cursor-pointer flex items-center p-2 rounded-lg text-base font-normal text-light-surface-700 dark:text-dark-surface-400 hover:bg-light-surface-300/50 dark:hover:bg-dark-surface-600 hover:text-light-surface-800 dark:hover:text-dark-surface-200"
8
8
  },
@@ -1,4 +1,4 @@
1
- export declare function uiHelpers(): {
1
+ export declare function uiHelpers(initialValue?: boolean): {
2
2
  isOpen: boolean;
3
3
  toggle: () => void;
4
4
  close: () => void;
@@ -1,5 +1,5 @@
1
- export function uiHelpers() {
2
- let isOpen = $state(false);
1
+ export function uiHelpers(initialValue = false) {
2
+ let isOpen = $state(initialValue);
3
3
  function toggle() {
4
4
  isOpen = !isOpen;
5
5
  // console.log('toggled', isOpen);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "odj-svelte-ui",
3
3
  "author": "orbitadajogatina",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "description": "This is a fork from Flowbite Svelte 5 with Runes. I just made some changes that fits better my taste.",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",