tera-system-ui 0.0.21 → 0.0.23

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 (73) hide show
  1. package/dist/components/avatar/Avatar.d.ts +82 -0
  2. package/dist/components/avatar/Avatar.js +35 -0
  3. package/dist/components/avatar/Avatar.svelte +43 -0
  4. package/dist/components/avatar/Avatar.svelte.d.ts +3 -0
  5. package/dist/components/avatar/index.d.ts +1 -0
  6. package/dist/components/avatar/index.js +1 -0
  7. package/dist/components/dialog/Dialog.astro +2 -1
  8. package/dist/components/dialog/Dialog.d.ts +2 -0
  9. package/dist/components/dialog/Dialog.svelte +8 -8
  10. package/dist/components/dialog/Dialog.svelte.d.ts +1 -1
  11. package/dist/components/dropdown-menu/DropdownMenu.d.ts +22 -0
  12. package/dist/components/dropdown-menu/DropdownMenu.js +15 -0
  13. package/dist/components/dropdown-menu/components/DropdownMenu.svelte +34 -0
  14. package/dist/components/dropdown-menu/components/DropdownMenu.svelte.d.ts +3 -0
  15. package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte +12 -0
  16. package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte.d.ts +5 -0
  17. package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte +12 -0
  18. package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte.d.ts +5 -0
  19. package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte +30 -0
  20. package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte.d.ts +3 -0
  21. package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte +11 -0
  22. package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte.d.ts +5 -0
  23. package/dist/components/dropdown-menu/index.d.ts +5 -0
  24. package/dist/components/dropdown-menu/index.js +5 -0
  25. package/dist/components/icons/IconLogout.svelte +10 -0
  26. package/dist/components/icons/IconLogout.svelte.d.ts +4 -0
  27. package/dist/components/icons/IconSettings.svelte +10 -0
  28. package/dist/components/icons/IconSettings.svelte.d.ts +4 -0
  29. package/dist/components/icons/index.d.ts +2 -0
  30. package/dist/components/icons/index.js +2 -0
  31. package/dist/components/popover/Popover.svelte +25 -3
  32. package/dist/components/slider/Slider.d.ts +9 -0
  33. package/dist/components/slider/Slider.js +7 -0
  34. package/dist/components/slider/Slider.svelte +228 -0
  35. package/dist/components/slider/Slider.svelte.d.ts +3 -0
  36. package/dist/components/slider/index.d.ts +1 -0
  37. package/dist/components/slider/index.js +1 -0
  38. package/dist/components/tabs/Tabs.d.ts +17 -0
  39. package/dist/components/tabs/Tabs.js +15 -0
  40. package/dist/components/tabs/components/Tabs.svelte +48 -0
  41. package/dist/components/tabs/components/Tabs.svelte.d.ts +3 -0
  42. package/dist/components/tabs/components/TabsContent.svelte +36 -0
  43. package/dist/components/tabs/components/TabsContent.svelte.d.ts +6 -0
  44. package/dist/components/tabs/components/TabsItem.svelte +32 -0
  45. package/dist/components/tabs/components/TabsItem.svelte.d.ts +6 -0
  46. package/dist/components/tabs/components/TabsList.svelte +42 -0
  47. package/dist/components/tabs/components/TabsList.svelte.d.ts +5 -0
  48. package/dist/components/tabs/index.d.ts +4 -0
  49. package/dist/components/tabs/index.js +4 -0
  50. package/dist/components/tabs/tabs.svelte.d.ts +3 -0
  51. package/dist/components/tabs/tabs.svelte.js +11 -0
  52. package/dist/components/tera-ui-context/TeraUiContext.d.ts +1 -0
  53. package/dist/components/text-area/TextArea.d.ts +145 -0
  54. package/dist/components/text-area/TextArea.js +39 -0
  55. package/dist/components/text-area/TextArea.svelte +89 -0
  56. package/dist/components/text-area/TextArea.svelte.d.ts +3 -0
  57. package/dist/components/text-area/index.d.ts +1 -0
  58. package/dist/components/text-area/index.js +1 -0
  59. package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.d.ts +11 -0
  60. package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.js +7 -0
  61. package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte +68 -0
  62. package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte.d.ts +3 -0
  63. package/dist/components/user-avatar-with-menu/index.d.ts +1 -0
  64. package/dist/components/user-avatar-with-menu/index.js +1 -0
  65. package/dist/index.d.ts +7 -1
  66. package/dist/index.js +7 -1
  67. package/dist/internal/service/user.service.d.ts +2 -0
  68. package/dist/internal/service/user.service.js +20 -0
  69. package/dist/types/user-data.d.ts +31 -0
  70. package/dist/types/user-data.js +1 -0
  71. package/package.json +25 -24
  72. package/scripts/add-component-template.js +1 -1
  73. package/scripts/generate-ts-index.js +8 -6
@@ -0,0 +1,82 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ export declare const styles: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ sm: string;
5
+ md: string;
6
+ lg: string;
7
+ xl: string;
8
+ };
9
+ border: {
10
+ true: string;
11
+ };
12
+ }, undefined, "relative rounded-full object-cover bg-primary-token-1 select-none grid place-content-center leading-none font-bold overflow-clip hover:brightness-90", import("tailwind-variants/dist/config").TVConfig<{
13
+ size: {
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ xl: string;
18
+ };
19
+ border: {
20
+ true: string;
21
+ };
22
+ }, {
23
+ size: {
24
+ sm: string;
25
+ md: string;
26
+ lg: string;
27
+ xl: string;
28
+ };
29
+ border: {
30
+ true: string;
31
+ };
32
+ }>, {
33
+ size: {
34
+ sm: string;
35
+ md: string;
36
+ lg: string;
37
+ xl: string;
38
+ };
39
+ border: {
40
+ true: string;
41
+ };
42
+ }, undefined, import("tailwind-variants").TVReturnType<{
43
+ size: {
44
+ sm: string;
45
+ md: string;
46
+ lg: string;
47
+ xl: string;
48
+ };
49
+ border: {
50
+ true: string;
51
+ };
52
+ }, undefined, "relative rounded-full object-cover bg-primary-token-1 select-none grid place-content-center leading-none font-bold overflow-clip hover:brightness-90", import("tailwind-variants/dist/config").TVConfig<{
53
+ size: {
54
+ sm: string;
55
+ md: string;
56
+ lg: string;
57
+ xl: string;
58
+ };
59
+ border: {
60
+ true: string;
61
+ };
62
+ }, {
63
+ size: {
64
+ sm: string;
65
+ md: string;
66
+ lg: string;
67
+ xl: string;
68
+ };
69
+ border: {
70
+ true: string;
71
+ };
72
+ }>, unknown, unknown, undefined>>;
73
+ type AvatarVariants = VariantProps<typeof styles>;
74
+ export interface AvatarProps extends AvatarVariants {
75
+ children?: any;
76
+ class?: string;
77
+ alt?: string;
78
+ src?: string;
79
+ ref?: any;
80
+ userUid?: string;
81
+ }
82
+ export {};
@@ -0,0 +1,35 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const styles = tv({
3
+ base: 'relative rounded-full object-cover bg-primary-token-1 select-none grid place-content-center leading-none font-bold overflow-clip hover:brightness-90',
4
+ variants: {
5
+ size: {
6
+ sm: 'size-8 text-xs',
7
+ md: 'size-10 text-sm',
8
+ lg: 'size-12 font-bold',
9
+ xl: 'size-16 text-xl font-bold',
10
+ },
11
+ border: {
12
+ true: 'border-[4px] border-primary-token-6'
13
+ }
14
+ },
15
+ compoundVariants: [
16
+ {
17
+ size: 'sm',
18
+ border: true,
19
+ class: 'border-[2px]'
20
+ },
21
+ {
22
+ size: ['md', 'lg'],
23
+ border: true,
24
+ class: 'border-[3px]'
25
+ },
26
+ {
27
+ size: ['xl'],
28
+ border: true,
29
+ class: 'border-[4px]'
30
+ }
31
+ ],
32
+ defaultVariants: {
33
+ size: 'md',
34
+ },
35
+ });
@@ -0,0 +1,43 @@
1
+ <script lang="ts">
2
+ import {type AvatarProps, styles} from "./Avatar";
3
+ import {getUserAvatarUrl} from "../../internal/service/user.service";
4
+ import {cn} from "../../utils/utils";
5
+
6
+ let {
7
+ children,
8
+ alt = 'Avatar',
9
+ size = 'md',
10
+ src,
11
+ class: className,
12
+ border = true,
13
+ ref = $bindable(),
14
+ userUid,
15
+ ...props
16
+ }: AvatarProps = $props();
17
+
18
+ let isError = $state()
19
+
20
+ function handleErrorImage() {
21
+ isError = true
22
+ }
23
+
24
+ let imgUrl = src ? src : userUid ? getUserAvatarUrl(userUid) : undefined
25
+ </script>
26
+
27
+ <div bind:this={ref}
28
+ class={styles({ size, className, border })} {...props}>
29
+ {#if imgUrl && !isError}
30
+ <img src={imgUrl} alt={alt} onerror={handleErrorImage} class="w-full h-full object-cover"/>
31
+ {:else}
32
+ <span class="leading-none">
33
+ {@render children?.()}
34
+ </span>
35
+ {/if}
36
+ <div class={
37
+ cn("absolute inset-[0px] border-[2px] border-neutral-token-2 rounded-full", {
38
+ 'border-[3px]' : size === 'lg' || size === 'xl',
39
+ })
40
+ }>
41
+
42
+ </div>
43
+ </div>
@@ -0,0 +1,3 @@
1
+ import { type AvatarProps } from "./Avatar";
2
+ declare const Avatar: import("svelte").Component<AvatarProps, {}, "ref">;
3
+ export default Avatar;
@@ -0,0 +1 @@
1
+ export { default as Avatar } from './Avatar.svelte';
@@ -0,0 +1 @@
1
+ export { default as Avatar } from './Avatar.svelte';
@@ -11,6 +11,7 @@ const {
11
11
  class: className,
12
12
  position = 'center',
13
13
  padding,
14
+ containerClass,
14
15
  focusTriggerAfterClose,
15
16
  ...props
16
17
  }: DialogPropsAstro = Astro.props
@@ -44,7 +45,7 @@ const hasFooterSlot = !!Astro.slots["footer"];
44
45
  </form>
45
46
  }
46
47
 
47
- <div class={"dialog-box " + dialogContainer()}>
48
+ <div class={"dialog-box " + dialogContainer({className: containerClass})}>
48
49
  {hasHeaderSlot &&
49
50
  <header class={headerStyle()}>
50
51
  <slot name="header"/>
@@ -198,6 +198,7 @@ type DialogPropsCommon = {
198
198
  position?: 'top' | 'center';
199
199
  focusTriggerAfterClose?: boolean;
200
200
  padding?: 'none' | undefined;
201
+ containerClass?: string;
201
202
  };
202
203
  export type DialogProps = DialogVariants & DialogPropsCommon & {
203
204
  children?: any;
@@ -206,6 +207,7 @@ export type DialogProps = DialogVariants & DialogPropsCommon & {
206
207
  open?: boolean;
207
208
  staticRender?: boolean;
208
209
  triggerRef?: HTMLElement;
210
+ ref?: any;
209
211
  };
210
212
  export type DialogPropsAstro = DialogVariants & DialogPropsCommon & {};
211
213
  export {};
@@ -7,6 +7,7 @@
7
7
 
8
8
  let {
9
9
  children, open = $bindable(),
10
+ ref = $bindable(),
10
11
  closeOnClickOutside = true,
11
12
  closeButton = true,
12
13
  size = 'sm',
@@ -18,23 +19,22 @@
18
19
  staticRender = false,
19
20
  triggerRef,
20
21
  focusTriggerAfterClose,
22
+ containerClass,
21
23
  ...props
22
24
  }: DialogProps = $props();
23
25
 
24
- let dialog;
25
-
26
26
  let hasOpened = $state(false);
27
27
 
28
28
  // Watch for prop changes to open/close the dialog
29
29
  $effect(() => {
30
30
  if (open) {
31
31
  stillAnimating = open
32
- dialog?.showModal();
32
+ ref?.showModal();
33
33
 
34
34
  if (!hasOpened)
35
35
  hasOpened = true
36
36
  } else {
37
- dialog?.close()
37
+ ref?.close()
38
38
  sleep(200).then(() => {
39
39
  stillAnimating = open
40
40
  console.log('stillAnimating', stillAnimating)
@@ -48,8 +48,8 @@
48
48
 
49
49
  // Close dialog on clicking outside (optional)
50
50
  function handleClickOutside(e) {
51
- if (closeOnClickOutside && e.target === dialog) {
52
- dialog?.close();
51
+ if (closeOnClickOutside && e.target === ref) {
52
+ ref?.close();
53
53
  }
54
54
  }
55
55
 
@@ -72,7 +72,7 @@
72
72
  {#if staticRender || (!staticRender && (open || stillAnimating))}
73
73
  <dialog class={dialogStyle() + ` ${className}`}
74
74
  data-position={position}
75
- bind:this={dialog}
75
+ bind:this={ref}
76
76
  onclose={handleClose}
77
77
  onmousedown={handleClickOutside}
78
78
  size={size}
@@ -90,7 +90,7 @@
90
90
  </form>
91
91
  {/if}
92
92
 
93
- <div class={"dialog-box " + dialogContainer()}>
93
+ <div class={"dialog-box " + dialogContainer({className: containerClass})}>
94
94
  {#if header}
95
95
  <header class={headerStyle()}>
96
96
  {@render header?.()}
@@ -1,4 +1,4 @@
1
1
  import { type DialogProps } from "./Dialog";
2
2
  import './dialog.scss';
3
- declare const Dialog: import("svelte").Component<DialogProps, {}, "open">;
3
+ declare const Dialog: import("svelte").Component<DialogProps, {}, "ref" | "open">;
4
4
  export default Dialog;
@@ -0,0 +1,22 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, unknown, unknown, undefined>>;
3
+ type DropdownMenuVariants = VariantProps<typeof styles>;
4
+ export interface DropdownMenuProps extends DropdownMenuVariants {
5
+ children?: any;
6
+ class?: string;
7
+ triggerRef: any;
8
+ open?: boolean;
9
+ }
10
+ export type DropdownMenuContext = {
11
+ setOpen: (open: boolean) => void;
12
+ getOpen: () => boolean;
13
+ };
14
+ export declare function getCtx(): DropdownMenuContext;
15
+ export declare function setCtx(context: DropdownMenuContext): void;
16
+ export type DropdownMenuItemProps = {
17
+ children?: any;
18
+ class?: string;
19
+ onclick?: (e: any) => void;
20
+ href?: string;
21
+ };
22
+ export {};
@@ -0,0 +1,15 @@
1
+ import { tv } from "tailwind-variants";
2
+ import { getContext, setContext } from "svelte";
3
+ export const styles = tv({
4
+ base: '',
5
+ variants: {},
6
+ compoundVariants: [],
7
+ defaultVariants: {},
8
+ });
9
+ const CONTEXT_NAME = 'DropdownMenu';
10
+ export function getCtx() {
11
+ return getContext(CONTEXT_NAME);
12
+ }
13
+ export function setCtx(context) {
14
+ setContext(CONTEXT_NAME, context);
15
+ }
@@ -0,0 +1,34 @@
1
+ <script lang="ts">
2
+ import {type DropdownMenuProps, setCtx} from "../DropdownMenu";
3
+ import {Popover} from "../../popover";
4
+
5
+ let {
6
+ children,
7
+ open = $bindable(),
8
+ triggerRef,
9
+
10
+ ...props
11
+ }: DropdownMenuProps = $props();
12
+
13
+ function setOpen(o: boolean) {
14
+ open = o;
15
+ }
16
+
17
+ setCtx({
18
+ setOpen,
19
+ getOpen: () => !!open
20
+ })
21
+
22
+ </script>
23
+
24
+ <Popover
25
+ triggerRef={triggerRef}
26
+ offset={4}
27
+ bind:open
28
+ class=""
29
+ flip="true"
30
+ role="menu"
31
+ {...props}
32
+ >
33
+ {@render children?.()}
34
+ </Popover>
@@ -0,0 +1,3 @@
1
+ import { type DropdownMenuProps } from "../DropdownMenu";
2
+ declare const DropdownMenu: import("svelte").Component<DropdownMenuProps, {}, "open">;
3
+ export default DropdownMenu;
@@ -0,0 +1,12 @@
1
+ <script lang="ts">
2
+ import {cn} from "../../../utils/utils";
3
+
4
+ let {children, class: className, ...props} = $props()
5
+ </script>
6
+
7
+ <div class={cn('p-1', className)}
8
+ data-dropdown-menu-group
9
+ role="group"
10
+ {...props}>
11
+ {@render children?.()}
12
+ </div>
@@ -0,0 +1,5 @@
1
+ declare const DropdownMenuGroup: import("svelte").Component<{
2
+ children: unknown;
3
+ class: unknown;
4
+ } & Record<string, unknown>, {}, "">;
5
+ export default DropdownMenuGroup;
@@ -0,0 +1,12 @@
1
+ <script lang="ts">
2
+ import {cn} from "../../../utils/utils";
3
+
4
+ let {children, class: className, ...props} = $props()
5
+ </script>
6
+
7
+ <div class={cn('px-3 py-1.5 font-semibold', className)}
8
+ data-dropdown-menu-header
9
+ role="group"
10
+ {...props}>
11
+ {@render children?.()}
12
+ </div>
@@ -0,0 +1,5 @@
1
+ declare const DropdownMenuHeader: import("svelte").Component<{
2
+ children: unknown;
3
+ class: unknown;
4
+ } & Record<string, unknown>, {}, "">;
5
+ export default DropdownMenuHeader;
@@ -0,0 +1,30 @@
1
+ <script lang="ts">
2
+ import {type DropdownMenuItemProps, getCtx} from "../DropdownMenu";
3
+ import {cn} from "../../../utils/utils";
4
+
5
+
6
+ let {children, class: className, onclick, href, ...props}: DropdownMenuItemProps = $props()
7
+ let context = getCtx()
8
+ </script>
9
+
10
+ {#snippet button()}
11
+ <button
12
+ onclick={(e) => {
13
+ onclick?.(e)
14
+ context?.setOpen(false)
15
+ }}
16
+ role="menuitem"
17
+ data-dropdown-menu-item
18
+ class={cn('flex w-full items-center gap-2 px-2 py-2 rounded hover:bg-neutral-token-4 transition-all', className)}
19
+ {...props}>
20
+ {@render children?.()}
21
+ </button>
22
+ {/snippet}
23
+
24
+ {#if href}
25
+ <a href={href}>
26
+ {@render button()}
27
+ </a>
28
+ {:else }
29
+ {@render button()}
30
+ {/if}
@@ -0,0 +1,3 @@
1
+ import { type DropdownMenuItemProps } from "../DropdownMenu";
2
+ declare const DropdownMenuItem: import("svelte").Component<DropdownMenuItemProps, {}, "">;
3
+ export default DropdownMenuItem;
@@ -0,0 +1,11 @@
1
+ <script lang="ts">
2
+ import {cn} from "../../../utils/utils";
3
+
4
+ let {children, class: className, ...props} = $props()
5
+ </script>
6
+
7
+ <div class={cn('border-b w-full', className)}
8
+ data-dropdown-menu-separator
9
+ {...props}>
10
+
11
+ </div>
@@ -0,0 +1,5 @@
1
+ declare const DropdownMenuSeparator: import("svelte").Component<{
2
+ children: unknown;
3
+ class: unknown;
4
+ } & Record<string, unknown>, {}, "">;
5
+ export default DropdownMenuSeparator;
@@ -0,0 +1,5 @@
1
+ export { default as DropdownMenu } from './components/DropdownMenu.svelte';
2
+ export { default as DropdownMenuItem } from './components/DropdownMenuItem.svelte';
3
+ export { default as DropdownMenuGroup } from './components/DropdownMenuGroup.svelte';
4
+ export { default as DropdownMenuHeader } from './components/DropdownMenuHeader.svelte';
5
+ export { default as DropdownMenuSeparator } from './components/DropdownMenuSeparator.svelte';
@@ -0,0 +1,5 @@
1
+ export { default as DropdownMenu } from './components/DropdownMenu.svelte';
2
+ export { default as DropdownMenuItem } from './components/DropdownMenuItem.svelte';
3
+ export { default as DropdownMenuGroup } from './components/DropdownMenuGroup.svelte';
4
+ export { default as DropdownMenuHeader } from './components/DropdownMenuHeader.svelte';
5
+ export { default as DropdownMenuSeparator } from './components/DropdownMenuSeparator.svelte';
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import {type IconsProps, styles} from "./Icons";
3
+ import {IconLogout} from "@tabler/icons-svelte";
4
+
5
+ let {children, ...props}: IconsProps = $props();
6
+
7
+ </script>
8
+
9
+ <IconLogout class={styles({...props})}/>
10
+
@@ -0,0 +1,4 @@
1
+ import { type IconsProps } from "./Icons";
2
+ import { IconLogout } from "@tabler/icons-svelte";
3
+ declare const IconLogout: import("svelte").Component<IconsProps, {}, "">;
4
+ export default IconLogout;
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import {type IconsProps, styles} from "./Icons";
3
+ import {IconSettings} from "@tabler/icons-svelte";
4
+
5
+ let {children, ...props}: IconsProps = $props();
6
+
7
+ </script>
8
+
9
+ <IconSettings class={styles({...props})}/>
10
+
@@ -0,0 +1,4 @@
1
+ import { type IconsProps } from "./Icons";
2
+ import { IconSettings } from "@tabler/icons-svelte";
3
+ declare const IconSettings: import("svelte").Component<IconsProps, {}, "">;
4
+ export default IconSettings;
@@ -9,9 +9,11 @@ export { default as IconCopyCheckFilled } from './IconCopyCheckFilled.svelte';
9
9
  export { default as IconHamburger } from './IconHamburger.svelte';
10
10
  export { default as IconLanguage } from './IconLanguage.svelte';
11
11
  export { default as IconLoader2 } from './IconLoader2.svelte';
12
+ export { default as IconLogout } from './IconLogout.svelte';
12
13
  export { default as IconMoon } from './IconMoon.svelte';
13
14
  export { default as IconPointFilled } from './IconPointFilled.svelte';
14
15
  export { default as IconSearch } from './IconSearch.svelte';
16
+ export { default as IconSettings } from './IconSettings.svelte';
15
17
  export { default as IconSun } from './IconSun.svelte';
16
18
  export { default as IconSwitchHorizontal } from './IconSwitchHorizontal.svelte';
17
19
  export { default as IconSwitchVertical } from './IconSwitchVertical.svelte';
@@ -9,9 +9,11 @@ export { default as IconCopyCheckFilled } from './IconCopyCheckFilled.svelte';
9
9
  export { default as IconHamburger } from './IconHamburger.svelte';
10
10
  export { default as IconLanguage } from './IconLanguage.svelte';
11
11
  export { default as IconLoader2 } from './IconLoader2.svelte';
12
+ export { default as IconLogout } from './IconLogout.svelte';
12
13
  export { default as IconMoon } from './IconMoon.svelte';
13
14
  export { default as IconPointFilled } from './IconPointFilled.svelte';
14
15
  export { default as IconSearch } from './IconSearch.svelte';
16
+ export { default as IconSettings } from './IconSettings.svelte';
15
17
  export { default as IconSun } from './IconSun.svelte';
16
18
  export { default as IconSwitchHorizontal } from './IconSwitchHorizontal.svelte';
17
19
  export { default as IconSwitchVertical } from './IconSwitchVertical.svelte';
@@ -5,6 +5,7 @@
5
5
 
6
6
  import {clickOutside} from "../../actions/clickOutside"
7
7
  import {onDestroy, onMount} from "svelte";
8
+ import {circInOut} from "svelte/easing";
8
9
 
9
10
  let {
10
11
  children,
@@ -41,8 +42,10 @@
41
42
  offset(offsetAmount),
42
43
  size({
43
44
  apply({rects, elements}) {
45
+ console.log(elements.reference)
44
46
  Object.assign(elements.floating.style, {
45
47
  minWidth: `${rects.reference.width}px`,
48
+ maxWidth: `${window.innerWidth - 16}px`,
46
49
  });
47
50
  },
48
51
  }),
@@ -116,14 +119,36 @@
116
119
  cleanup?.()
117
120
  }
118
121
  })
122
+
123
+
124
+ function spin(node, {duration}) {
125
+ return {
126
+ duration,
127
+ css: (t) => {
128
+ const eased = circInOut(t);
129
+ return `
130
+ transform-origin: 0% 0%;
131
+ transform: translateY(${eased * 10 - 10}px) scaleY(${eased * 0.05 + 0.95});
132
+ opacity: ${eased};
133
+ `
134
+
135
+ }
136
+ };
137
+ }
138
+
139
+
119
140
  </script>
120
141
 
121
142
  <!-- Popover Content -->
122
143
  {#if open}
123
144
  <div bind:this={popover}
145
+ data-open={open}
124
146
  class={cn("overflow-hidden absolute z-10 bg-neutral-token-1 shadow-2xl rounded-container border border-neutral-token-5", className)}
125
147
  use:clickOutside={{exceptElement: triggerRef}}
126
148
  onclick_outside={handleClickOutside}
149
+
150
+ in:spin={{ duration: 200 }}
151
+ out:spin={{ duration: 200 }}
127
152
  {...props}
128
153
  >
129
154
  <!-- <div bind:this={arrowElement} class="size-2 absolute rotate-45 bg-inherit"></div>-->
@@ -132,6 +157,3 @@
132
157
  {/if}
133
158
 
134
159
 
135
- <style>
136
-
137
- </style>
@@ -0,0 +1,9 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", import("tailwind-variants/dist/config").TVConfig<{}, {}>, unknown, unknown, undefined>>;
3
+ type SliderVariants = VariantProps<typeof styles>;
4
+ export interface SliderProps extends SliderVariants {
5
+ children?: any;
6
+ class?: string;
7
+ }
8
+ export type SliderContextProps = {};
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const styles = tv({
3
+ base: '',
4
+ variants: {},
5
+ compoundVariants: [],
6
+ defaultVariants: {},
7
+ });