odj-svelte-ui 0.2.0 → 0.2.2

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.
Files changed (38) hide show
  1. package/README.md +10 -1
  2. package/dist/avatar/Avatar.svelte +43 -5
  3. package/dist/avatar/Avatar.svelte.d.ts +3 -1
  4. package/dist/avatar/index.d.ts +2 -2
  5. package/dist/avatar/index.js +2 -2
  6. package/dist/avatar/theme.d.ts +144 -3
  7. package/dist/avatar/theme.js +34 -4
  8. package/dist/avatar/type.d.ts +2 -0
  9. package/dist/dropdown/Dropdown.svelte +61 -12
  10. package/dist/dropdown/Dropdown.svelte.d.ts +6 -5
  11. package/dist/dropdown/DropdownLi.svelte +9 -3
  12. package/dist/dropdown/DropdownLi.svelte.d.ts +1 -0
  13. package/dist/dropdown/theme.d.ts +4 -12
  14. package/dist/dropdown/theme.js +7 -8
  15. package/dist/dropdown/type.d.ts +11 -5
  16. package/dist/forms/checkbox/Checkbox.svelte +34 -5
  17. package/dist/forms/checkbox/theme.js +26 -24
  18. package/dist/forms/checkbox/type.d.ts +1 -0
  19. package/dist/forms/toggle/theme.js +22 -22
  20. package/dist/nav/Navbar.svelte +13 -11
  21. package/dist/nav/theme.d.ts +6 -6
  22. package/dist/nav/theme.js +20 -20
  23. package/dist/sidebar/Sidebar.svelte +9 -54
  24. package/dist/sidebar/Sidebar.svelte.d.ts +0 -7
  25. package/dist/sidebar/SidebarGroup.svelte +8 -5
  26. package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -2
  27. package/dist/sidebar/SidebarItem.svelte +1 -1
  28. package/dist/sidebar/index.d.ts +3 -4
  29. package/dist/sidebar/index.js +2 -3
  30. package/dist/sidebar/theme.d.ts +223 -108
  31. package/dist/sidebar/theme.js +27 -28
  32. package/dist/sidebar/type.d.ts +4 -15
  33. package/dist/theme/Theme.svelte +0 -2
  34. package/dist/tooltip/Tooltip.svelte +25 -34
  35. package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
  36. package/package.json +1 -5
  37. package/dist/sidebar/SidebarButton.svelte +0 -21
  38. package/dist/sidebar/SidebarButton.svelte.d.ts +0 -10
package/README.md CHANGED
@@ -15,14 +15,23 @@ This is a fork from [Flowbite for Svelte 5 with Runes](https://svelte-5-ui-lib.c
15
15
  - `Textarea` is fixed;
16
16
  - `Pagination` respect max-width;
17
17
  - `Modal` title has a better size, improved default animations with control of backdrop's animations and removed the outdated divider;
18
- - `Label` now has `space-y-1` by default, a new default color and the `disabled` prop;
19
18
  - `Input:Search` has a better X button for Chromium browsers;
20
19
  - `Radio` has a new design and it's animated;
20
+ - `Header` has blur, some small design tweaks and a fixed design for the menu on mobile;
21
+ - `Dropdown` is more modern;
22
+ - `Avatar` has better borders;
23
+ - `Sidebar` has better hover colors and some other design tweaks, like border radius;
21
24
  - `Tabs` styles are fixed and introduced underline animations and a complete modern redesign for "Full" style;
22
25
  - The `Tooltip` component received a rework;
23
26
  - `Modal` has <kbd>Esc</kbd> to close again;
24
27
  - `Button` has now a built-in loading state and can be controlled by the `loading` prop;
28
+ - `Label` now has `space-y-1` by default, a new default color and the `disabled` prop;
25
29
  - `Textarea` can autoexpand as user type, control this by `autoexpand` and `maxRows` props;
30
+ - `Dropdown` now locks the page scroll and you can enable this default behaviour setting `lock` to `true`. Also, it uses a new strategy instead of `uiHelpers`;
31
+ - `Avatar` supports a `fallback` snippet to show when the image is loading or can't be loaded;
32
+ - `Sidebar` can not be opened or closed anymore. If you want this behaviour, this component should be inside the `Drawer` component. On mobile, `Sidebar` will look like tabs;
33
+ - `SidebarButton` has been removed. Please use the `Drawer` component to maintain the old sidebar behaviour;
34
+
26
35
 
27
36
  ## Installation
28
37
 
@@ -1,10 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { Indicator } from "..";
3
- import { type AvatarProps as Props, avatar } from ".";
3
+ import { onMount } from "svelte";
4
+ import { type AvatarProps as Props, avatar, fallback as fallbackTheme } from ".";
4
5
 
5
- let { children, src, href, target, cornerStyle = "circular", border = false, stacked = false, dot, class: className, alt, size = "md", onclick, ...restProps }: Props = $props();
6
+ let { children, src, href, target, cornerStyle = "circular", border = false, stacked = false, dot, class: className, alt, size = "md", onclick, fallback, fallbackClass: fallbackClassName, ...restProps }: Props = $props();
6
7
 
7
- dot = dot && { placement: "top-right", color: "gray", size: "lg", ...dot };
8
+ dot = dot && { placement: "top-right", color: "red", size: "lg", ...dot };
8
9
 
9
10
  let avatarClass = $derived(
10
11
  avatar({
@@ -15,12 +16,43 @@
15
16
  className
16
17
  })
17
18
  );
19
+ let fallbackClass = $derived(
20
+ fallbackTheme({
21
+ cornerStyle,
22
+ border,
23
+ stacked,
24
+ size,
25
+ className: fallbackClassName
26
+ })
27
+ );
28
+
29
+ let imageState: "loading" | "loaded" | "error" = $state("loading");
30
+ onMount(() => {
31
+ const img = new Image();
32
+ if (!src) return;
33
+
34
+ img.src = src;
35
+ imageState = "loading";
36
+
37
+ img.onload = () => {
38
+ imageState = "loaded";
39
+ };
40
+ img.onerror = () => {
41
+ imageState = "error";
42
+ };
43
+ });
18
44
  </script>
19
45
 
20
46
  {#if !src || !!href || children || dot}
21
47
  <svelte:element this={href ? "a" : "div"} role={href ? undefined : "button"} {onclick} {href} {target} {...restProps} class={avatarClass}>
22
48
  {#if src}
23
- <img {alt} {src} class={cornerStyle === "circular" ? "rounded-full" : "rounded-sm"} />
49
+ {#if fallback && imageState !== "loaded"}
50
+ <div class={fallbackClass}>
51
+ {@render fallback()}
52
+ </div>
53
+ {:else}
54
+ <img {alt} {src} class={cornerStyle === "circular" ? "rounded-full" : "rounded-sm"} />
55
+ {/if}
24
56
  {:else if children}
25
57
  {@render children()}
26
58
  {:else}
@@ -32,6 +64,10 @@
32
64
  <Indicator border offset={cornerStyle === "circular" ? true : false} {...dot} />
33
65
  {/if}
34
66
  </svelte:element>
67
+ {:else if fallback && imageState !== "loaded"}
68
+ <div class={fallbackClass}>
69
+ {@render fallback()}
70
+ </div>
35
71
  {:else}
36
72
  <img {alt} {src} {...restProps} class={avatarClass} />
37
73
  {/if}
@@ -40,7 +76,8 @@
40
76
  @component
41
77
  [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
42
78
  ## Props
43
- @props: children: any;
79
+ @props:children: any;
80
+ @props:fallback: any;
44
81
  @props:src: any;
45
82
  @props:href: any;
46
83
  @props:target: any;
@@ -49,6 +86,7 @@
49
86
  @props:stacked: any = false;
50
87
  @props:dot: any;
51
88
  @props:class: string;
89
+ @props:fallbackClass: string;
52
90
  @props:alt: any;
53
91
  @props:size: any = "md";
54
92
  @props:onclick: any;
@@ -2,7 +2,8 @@ import { type AvatarProps as Props } from ".";
2
2
  /**
3
3
  * [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
4
4
  * ## Props
5
- * @props: children: any;
5
+ * @props:children: any;
6
+ * @props:fallback: any;
6
7
  * @props:src: any;
7
8
  * @props:href: any;
8
9
  * @props:target: any;
@@ -11,6 +12,7 @@ import { type AvatarProps as Props } from ".";
11
12
  * @props:stacked: any = false;
12
13
  * @props:dot: any;
13
14
  * @props:class: string;
15
+ * @props:fallbackClass: string;
14
16
  * @props:alt: any;
15
17
  * @props:size: any = "md";
16
18
  * @props:onclick: any;
@@ -1,4 +1,4 @@
1
1
  import type { AvatarProps } from "./type";
2
2
  import Avatar from "./Avatar.svelte";
3
- import { avatar } from "./theme";
4
- export { Avatar, avatar, type AvatarProps };
3
+ import { avatar, fallback } from "./theme";
4
+ export { Avatar, avatar, fallback, type AvatarProps };
@@ -1,3 +1,3 @@
1
1
  import Avatar from "./Avatar.svelte";
2
- import { avatar } from "./theme";
3
- export { Avatar, avatar };
2
+ import { avatar, fallback } from "./theme";
3
+ export { Avatar, avatar, fallback };
@@ -18,7 +18,7 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
18
18
  lg: string;
19
19
  xl: string;
20
20
  };
21
- }, undefined, "relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300", import("tailwind-variants/dist/config").TVConfig<{
21
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config").TVConfig<{
22
22
  cornerStyle: {
23
23
  rounded: string;
24
24
  circular: string;
@@ -98,7 +98,7 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
98
98
  lg: string;
99
99
  xl: string;
100
100
  };
101
- }, undefined, "relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300", import("tailwind-variants/dist/config").TVConfig<{
101
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config").TVConfig<{
102
102
  cornerStyle: {
103
103
  rounded: string;
104
104
  circular: string;
@@ -139,4 +139,145 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
139
139
  xl: string;
140
140
  };
141
141
  }>, unknown, unknown, undefined>>;
142
- export { avatar };
142
+ declare const fallback: import("tailwind-variants").TVReturnType<{
143
+ cornerStyle: {
144
+ rounded: string;
145
+ circular: string;
146
+ };
147
+ border: {
148
+ true: string;
149
+ false: string;
150
+ };
151
+ stacked: {
152
+ true: string;
153
+ false: string;
154
+ };
155
+ size: {
156
+ xs: string;
157
+ sm: string;
158
+ md: string;
159
+ lg: string;
160
+ xl: string;
161
+ };
162
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config").TVConfig<{
163
+ cornerStyle: {
164
+ rounded: string;
165
+ circular: string;
166
+ };
167
+ border: {
168
+ true: string;
169
+ false: string;
170
+ };
171
+ stacked: {
172
+ true: string;
173
+ false: string;
174
+ };
175
+ size: {
176
+ xs: string;
177
+ sm: string;
178
+ md: string;
179
+ lg: string;
180
+ xl: string;
181
+ };
182
+ }, {
183
+ cornerStyle: {
184
+ rounded: string;
185
+ circular: string;
186
+ };
187
+ border: {
188
+ true: string;
189
+ false: string;
190
+ };
191
+ stacked: {
192
+ true: string;
193
+ false: string;
194
+ };
195
+ size: {
196
+ xs: string;
197
+ sm: string;
198
+ md: string;
199
+ lg: string;
200
+ xl: string;
201
+ };
202
+ }>, {
203
+ cornerStyle: {
204
+ rounded: string;
205
+ circular: string;
206
+ };
207
+ border: {
208
+ true: string;
209
+ false: string;
210
+ };
211
+ stacked: {
212
+ true: string;
213
+ false: string;
214
+ };
215
+ size: {
216
+ xs: string;
217
+ sm: string;
218
+ md: string;
219
+ lg: string;
220
+ xl: string;
221
+ };
222
+ }, undefined, import("tailwind-variants").TVReturnType<{
223
+ cornerStyle: {
224
+ rounded: string;
225
+ circular: string;
226
+ };
227
+ border: {
228
+ true: string;
229
+ false: string;
230
+ };
231
+ stacked: {
232
+ true: string;
233
+ false: string;
234
+ };
235
+ size: {
236
+ xs: string;
237
+ sm: string;
238
+ md: string;
239
+ lg: string;
240
+ xl: string;
241
+ };
242
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config").TVConfig<{
243
+ cornerStyle: {
244
+ rounded: string;
245
+ circular: string;
246
+ };
247
+ border: {
248
+ true: string;
249
+ false: string;
250
+ };
251
+ stacked: {
252
+ true: string;
253
+ false: string;
254
+ };
255
+ size: {
256
+ xs: string;
257
+ sm: string;
258
+ md: string;
259
+ lg: string;
260
+ xl: string;
261
+ };
262
+ }, {
263
+ cornerStyle: {
264
+ rounded: string;
265
+ circular: string;
266
+ };
267
+ border: {
268
+ true: string;
269
+ false: string;
270
+ };
271
+ stacked: {
272
+ true: string;
273
+ false: string;
274
+ };
275
+ size: {
276
+ xs: string;
277
+ sm: string;
278
+ md: string;
279
+ lg: string;
280
+ xl: string;
281
+ };
282
+ }>, unknown, unknown, undefined>>;
283
+ export { avatar, fallback };
@@ -1,17 +1,17 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  const avatar = tv({
3
- base: "relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300",
3
+ base: "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300",
4
4
  variants: {
5
5
  cornerStyle: {
6
6
  rounded: "rounded-sm",
7
7
  circular: "rounded-full"
8
8
  },
9
9
  border: {
10
- true: "p-1 ring-2 ring-gray-300 dark:ring-gray-500",
10
+ true: "border-2 border-light-surface-300 dark:border-dark-surface-500",
11
11
  false: ""
12
12
  },
13
13
  stacked: {
14
- true: "border-2 -ms-4 border-white dark:border-gray-800",
14
+ true: "border-2 -ms-4 border-white dark:border-dark-surface-800",
15
15
  false: ""
16
16
  },
17
17
  size: {
@@ -29,4 +29,34 @@ const avatar = tv({
29
29
  size: "md"
30
30
  }
31
31
  });
32
- export { avatar };
32
+ const fallback = tv({
33
+ base: "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase",
34
+ variants: {
35
+ cornerStyle: {
36
+ rounded: "rounded-sm",
37
+ circular: "rounded-full"
38
+ },
39
+ border: {
40
+ true: "border-2 border-light-surface-300 dark:border-dark-surface-500",
41
+ false: ""
42
+ },
43
+ stacked: {
44
+ true: "border-2 -ms-4 border-white dark:border-dark-surface-800",
45
+ false: ""
46
+ },
47
+ size: {
48
+ xs: "w-6 h-6",
49
+ sm: "w-8 h-8",
50
+ md: "w-10 h-10",
51
+ lg: "w-20 h-20",
52
+ xl: "w-36 h-36"
53
+ }
54
+ },
55
+ defaultVariants: {
56
+ cornerStyle: "circular",
57
+ border: false,
58
+ stacked: false,
59
+ size: "md"
60
+ }
61
+ });
62
+ export { avatar, fallback };
@@ -12,5 +12,7 @@ interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
12
12
  size?: "xs" | "sm" | "md" | "lg" | "xl";
13
13
  onclick?: () => void;
14
14
  border?: boolean;
15
+ fallback?: Snippet;
16
+ fallbackClass?: string;
15
17
  }
16
18
  export { type AvatarProps };
@@ -1,39 +1,88 @@
1
1
  <script lang="ts">
2
2
  import { type DropdownProps as Props, dropdown } from "./";
3
- import { fly } from "svelte/transition";
4
- import type { ParamsType } from "../types";
3
+ import { autoUpdate, flip, offset as floatingUIOffset, useClick, useDismiss, useFloating, useInteractions, useRole } from "@skeletonlabs/floating-ui-svelte";
4
+ import { fade, fly } from "svelte/transition";
5
5
  import { setContext } from "svelte";
6
6
  import { writable } from "svelte/store";
7
7
 
8
- let { children, dropdownStatus = $bindable(), closeDropdown, class: className, backdropClass, params, transition = fly, activeUrl = "", ...restProps }: Props = $props();
8
+ let { children, open = $bindable(false), triggeredBy, position: placement = "bottom", offset = 8, class: className, transitionIn = fade, transitionInParams = { duration: 200 }, transitionOut = fly, transitionOutParams = { y: -5 }, activeUrl = "", lock = false, ...restProps }: Props = $props();
9
9
 
10
- const { base, backdrop } = $derived(dropdown());
10
+ const { base } = $derived(dropdown());
11
+
12
+ // Use Floating
13
+ let floating = $derived(
14
+ useFloating({
15
+ get open() {
16
+ return open;
17
+ },
18
+ onOpenChange: (v) => {
19
+ open = v;
20
+ },
21
+ whileElementsMounted: autoUpdate,
22
+ placement,
23
+ get middleware() {
24
+ return [floatingUIOffset(offset), flip()];
25
+ }
26
+ })
27
+ );
28
+
29
+ // Interactions
30
+ let role = $derived(useRole(floating.context));
31
+ let behaviour = $derived(useClick(floating.context));
32
+ let dismiss = $derived(useDismiss(floating.context));
33
+ let interactions = $derived(useInteractions([role, behaviour, dismiss]));
34
+
35
+ // Get elements
36
+ $effect(() => {
37
+ let triggerElement = document.querySelector(triggeredBy);
38
+ if (!triggerElement) return;
39
+
40
+ floating.elements.reference = triggerElement;
41
+
42
+ // Assign the props to the element
43
+ Object.entries(interactions.getReferenceProps()).forEach(([key, value]) => {
44
+ (triggerElement as any)[key] = value;
45
+ });
46
+ });
47
+
48
+ // Active URL
11
49
  const activeUrlStore = writable("");
12
50
  setContext("activeUrl", activeUrlStore);
13
51
 
14
52
  $effect(() => {
15
53
  activeUrlStore.set(activeUrl ?? "");
16
54
  });
55
+
56
+ // Lock scroll system
57
+ $effect(() => {
58
+ if (open && lock) {
59
+ const scrollWidth = window.innerWidth - document.documentElement.clientWidth;
60
+ document.body.style.overflow = "hidden";
61
+ document.body.style.paddingRight = `${scrollWidth}px`;
62
+ } else if (lock) {
63
+ document.body.style.overflow = "";
64
+ document.body.style.paddingRight = "";
65
+ }
66
+ });
17
67
  </script>
18
68
 
19
69
  <!-- Dropdown menu -->
20
- {#if dropdownStatus}
21
- <div {...restProps} class={base({ class: className })} transition:transition={params as ParamsType}>
70
+ {#if open}
71
+ <div bind:this={floating.elements.floating} style={floating.floatingStyles} {...interactions.getFloatingProps()} class={base({ class: className })} in:transitionIn={transitionInParams} out:transitionOut={transitionOutParams} {...restProps}>
22
72
  {@render children()}
23
73
  </div>
24
-
25
- <div role="presentation" class={backdrop({ class: backdropClass })} onclick={closeDropdown}></div>
26
74
  {/if}
27
75
 
28
76
  <!--
29
77
  @component
30
78
  [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
31
79
  ## Props
32
- @props: children: any;
33
- @props:dropdownStatus: any = $bindable();
34
- @props:closeDropdown: any;
80
+ @props:children: any;
81
+ @props:open: any = $bindable();
82
+ @props:triggeredBy: any;
83
+ @props:position: string;
84
+ @props:offset: number;
35
85
  @props:class: string;
36
- @props:backdropClass: any;
37
86
  @props:params: any;
38
87
  @props:transition: any = fly;
39
88
  @props:activeUrl: any = "";
@@ -2,15 +2,16 @@ import { type DropdownProps as Props } from "./";
2
2
  /**
3
3
  * [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
4
4
  * ## Props
5
- * @props: children: any;
6
- * @props:dropdownStatus: any = $bindable();
7
- * @props:closeDropdown: any;
5
+ * @props:children: any;
6
+ * @props:open: any = $bindable();
7
+ * @props:triggeredBy: any;
8
+ * @props:position: string;
9
+ * @props:offset: number;
8
10
  * @props:class: string;
9
- * @props:backdropClass: any;
10
11
  * @props:params: any;
11
12
  * @props:transition: any = fly;
12
13
  * @props:activeUrl: any = "";
13
14
  */
14
- declare const Dropdown: import("svelte").Component<Props, {}, "dropdownStatus">;
15
+ declare const Dropdown: import("svelte").Component<Props, {}, "open">;
15
16
  type Dropdown = ReturnType<typeof Dropdown>;
16
17
  export default Dropdown;
@@ -2,12 +2,11 @@
2
2
  import { getContext } from "svelte";
3
3
  import { type DropdownLiProps as Props, dropdownli } from "./";
4
4
 
5
- let { aClass, children, href, activeClass, liClass, ...restProps }: Props = $props();
5
+ let { aClass, children, href, activeClass, liClass, custom = false, ...restProps }: Props = $props();
6
6
 
7
7
  const activeUrlStore = getContext("activeUrl") as { subscribe: (callback: (value: string) => void) => void };
8
8
  let sidebarUrl = $state("");
9
9
  activeUrlStore.subscribe((value) => {
10
- // console.log('value: ', value)
11
10
  sidebarUrl = value;
12
11
  });
13
12
  let active = $state(false);
@@ -23,8 +22,14 @@
23
22
  <a {href} {...restProps} class={active ? activeAnchor({ class: activeClass }) : anchor({ class: aClass })}>
24
23
  {@render children()}
25
24
  </a>
25
+ {:else if custom}
26
+ <button {...restProps} class={active ? activeAnchor({ class: activeClass }) : anchor({ class: aClass })}>
27
+ {@render children()}
28
+ </button>
26
29
  {:else}
27
- {@render children()}
30
+ <a {href} {...restProps} class={active ? activeAnchor({ class: activeClass }) : anchor({ class: aClass })}>
31
+ {@render children()}
32
+ </a>
28
33
  {/if}
29
34
  </li>
30
35
 
@@ -37,4 +42,5 @@
37
42
  @props:href: any;
38
43
  @props:activeClass: any;
39
44
  @props:liClass: any;
45
+ @props:custom: boolean;
40
46
  -->
@@ -7,6 +7,7 @@ import { type DropdownLiProps as Props } from "./";
7
7
  * @props:href: any;
8
8
  * @props:activeClass: any;
9
9
  * @props:liClass: any;
10
+ * @props:custom: boolean;
10
11
  */
11
12
  declare const DropdownLi: import("svelte").Component<Props, {}, "">;
12
13
  type DropdownLi = ReturnType<typeof DropdownLi>;
@@ -2,50 +2,42 @@ export declare const dropdown: import("tailwind-variants").TVReturnType<{
2
2
  [key: string]: {
3
3
  [key: string]: import("tailwind-variants").ClassValue | {
4
4
  base?: import("tailwind-variants").ClassValue;
5
- backdrop?: import("tailwind-variants").ClassValue;
6
5
  };
7
6
  };
8
7
  } | {
9
8
  [x: string]: {
10
9
  [x: string]: import("tailwind-variants").ClassValue | {
11
10
  base?: import("tailwind-variants").ClassValue;
12
- backdrop?: import("tailwind-variants").ClassValue;
13
11
  };
14
12
  };
15
13
  } | {}, {
16
14
  base: string;
17
- backdrop: string;
18
15
  }, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
19
16
  [key: string]: {
20
17
  [key: string]: import("tailwind-variants").ClassValue | {
21
18
  base?: import("tailwind-variants").ClassValue;
22
- backdrop?: import("tailwind-variants").ClassValue;
23
19
  };
24
20
  };
25
21
  } | {}>, {
26
22
  [key: string]: {
27
23
  [key: string]: import("tailwind-variants").ClassValue | {
28
24
  base?: import("tailwind-variants").ClassValue;
29
- backdrop?: import("tailwind-variants").ClassValue;
30
25
  };
31
26
  };
32
27
  } | {}, {
33
28
  base: string;
34
- backdrop: string;
35
29
  }, import("tailwind-variants").TVReturnType<unknown, {
36
30
  base: string;
37
- backdrop: string;
38
31
  }, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
39
32
  [key: string]: {
40
33
  [key: string]: import("tailwind-variants").ClassValue | {
41
34
  base?: import("tailwind-variants").ClassValue;
42
- backdrop?: import("tailwind-variants").ClassValue;
43
35
  };
44
36
  };
45
37
  } | {}>, unknown, unknown, undefined>>;
46
- export declare const dropdowndivider: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
47
- export declare const dropdownHeader: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
48
- export declare const dropdownFooter: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "overflow-hidden rounded-b-lg py-1", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "overflow-hidden rounded-b-lg py-1", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
38
+ export declare const dropdowndivider: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "my-1 h-px bg-light-surface-200 dark:bg-dark-surface-600", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "my-1 h-px bg-light-surface-200 dark:bg-dark-surface-600", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
39
+ export declare const dropdownHeader: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-4 py-3 rounded-t-xl text-sm text-light-surface-900 dark:text-white", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-4 py-3 rounded-t-xl text-sm text-light-surface-900 dark:text-white", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
40
+ export declare const dropdownFooter: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "overflow-hidden rounded-b-xl", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "overflow-hidden rounded-b-xl", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
49
41
  export declare const dropdownli: import("tailwind-variants").TVReturnType<{
50
42
  [key: string]: {
51
43
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -91,4 +83,4 @@ export declare const dropdownli: import("tailwind-variants").TVReturnType<{
91
83
  };
92
84
  };
93
85
  } | {}>, unknown, unknown, undefined>>;
94
- export declare const dropdownul: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
86
+ export declare const dropdownul: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "p-1 flex flex-col", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "p-1 flex flex-col", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
@@ -1,25 +1,24 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const dropdown = tv({
3
3
  slots: {
4
- base: "z-10 w-44 mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700",
5
- backdrop: "fixed top-0 start-0 w-full h-full"
4
+ base: "z-10 w-max rounded-xl shadow-lg bg-white dark:bg-dark-surface-700 text-light-surface-700 dark:text-dark-surface-200 border border-light-surface-200 dark:border-dark-surface-600 divide-y divide-light-surface-100 dark:divide-dark-surface-600 overflow-hidden"
6
5
  }
7
6
  });
8
7
  export const dropdowndivider = tv({
9
- base: "my-1 h-px bg-gray-100 dark:bg-gray-500"
8
+ base: "my-1 h-px bg-light-surface-200 dark:bg-dark-surface-600"
10
9
  });
11
10
  export const dropdownHeader = tv({
12
- base: "px-4 py-3 text-sm text-gray-900 dark:text-white"
11
+ base: "px-4 py-3 rounded-t-xl text-sm text-light-surface-900 dark:text-white"
13
12
  });
14
13
  export const dropdownFooter = tv({
15
- base: "overflow-hidden rounded-b-lg py-1"
14
+ base: "overflow-hidden rounded-b-xl"
16
15
  });
17
16
  export const dropdownli = tv({
18
17
  slots: {
19
- anchor: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
20
- activeAnchor: "block px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
18
+ anchor: "cursor-pointer flex flex-row gap-3 items-center py-2 px-3 rounded-lg text-sm hover:bg-light-surface-200/70 dark:hover:bg-dark-surface-600 hover:text-light-surface-900 dark:hover:text-white",
19
+ activeAnchor: "cursor-pointer flex flex-row gap-3 items-center py-2 px-3 rounded-lg text-sm bg-primary-700 dark:bg-primary-600 text-white dark:text-white hover:bg-primary-800 dark:hover:bg-primary-700"
21
20
  }
22
21
  });
23
22
  export const dropdownul = tv({
24
- base: "py-2 text-sm text-gray-700 dark:text-gray-200"
23
+ base: "p-1 flex flex-col"
25
24
  });