@nasa-jpl/stellar-svelte 2.0.0-alpha.34 → 2.0.0-alpha.38

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 (32) hide show
  1. package/dist/components/ui/button/index.d.ts +35 -0
  2. package/dist/components/ui/button/index.js +10 -5
  3. package/dist/components/ui/input/index.d.ts +9 -2
  4. package/dist/components/ui/input/index.js +9 -3
  5. package/dist/components/ui/input/input.svelte +4 -1
  6. package/dist/components/ui/input/input.svelte.d.ts +3 -2
  7. package/dist/components/ui/select/index.d.ts +33 -7
  8. package/dist/components/ui/select/index.js +33 -8
  9. package/dist/components/ui/select/select-content.svelte +19 -16
  10. package/dist/components/ui/select/select-content.svelte.d.ts +25 -2
  11. package/dist/components/ui/select/select-item.svelte +27 -24
  12. package/dist/components/ui/select/select-item.svelte.d.ts +22 -3
  13. package/dist/components/ui/select/select-label.svelte +6 -7
  14. package/dist/components/ui/select/select-label.svelte.d.ts +7 -2
  15. package/dist/components/ui/select/select-trigger.svelte +17 -14
  16. package/dist/components/ui/select/select-trigger.svelte.d.ts +15 -3
  17. package/dist/components/ui/theme-switcher/index.d.ts +3 -3
  18. package/dist/components/ui/theme-switcher/index.js +3 -3
  19. package/dist/components/ui/theme-switcher/theme-switcher-button.svelte +10 -11
  20. package/dist/components/ui/theme-switcher/theme-switcher-button.svelte.d.ts +4 -1
  21. package/dist/components/ui/theme-switcher/theme-switcher-dropdown.svelte +7 -4
  22. package/dist/components/ui/theme-switcher/theme-switcher-dropdown.svelte.d.ts +4 -1
  23. package/dist/components/ui/toggle/index.d.ts +7 -0
  24. package/dist/components/ui/toggle/index.js +1 -0
  25. package/dist/components/ui/toggle-group/index.d.ts +1 -1
  26. package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +1 -1
  27. package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +1 -1
  28. package/dist/index.css +411 -122
  29. package/package.json +6 -5
  30. package/tailwind.config.ts +3 -14
  31. package/dist/components/ui/theme-switcher/button.svelte +0 -20
  32. package/dist/components/ui/theme-switcher/button.svelte.d.ts +0 -14
@@ -15,7 +15,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
15
15
  xs: string;
16
16
  sm: string;
17
17
  lg: string;
18
+ xl: string;
18
19
  icon: string;
20
+ 'icon-xs': string;
21
+ 'icon-sm': string;
22
+ 'icon-lg': string;
23
+ 'icon-xl': string;
19
24
  };
20
25
  }, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
21
26
  variant: {
@@ -31,7 +36,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
31
36
  xs: string;
32
37
  sm: string;
33
38
  lg: string;
39
+ xl: string;
34
40
  icon: string;
41
+ 'icon-xs': string;
42
+ 'icon-sm': string;
43
+ 'icon-lg': string;
44
+ 'icon-xl': string;
35
45
  };
36
46
  }, {
37
47
  variant: {
@@ -47,7 +57,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
47
57
  xs: string;
48
58
  sm: string;
49
59
  lg: string;
60
+ xl: string;
50
61
  icon: string;
62
+ 'icon-xs': string;
63
+ 'icon-sm': string;
64
+ 'icon-lg': string;
65
+ 'icon-xl': string;
51
66
  };
52
67
  }>, {
53
68
  variant: {
@@ -63,7 +78,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
63
78
  xs: string;
64
79
  sm: string;
65
80
  lg: string;
81
+ xl: string;
66
82
  icon: string;
83
+ 'icon-xs': string;
84
+ 'icon-sm': string;
85
+ 'icon-lg': string;
86
+ 'icon-xl': string;
67
87
  };
68
88
  }, undefined, import("tailwind-variants").TVReturnType<{
69
89
  variant: {
@@ -79,7 +99,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
79
99
  xs: string;
80
100
  sm: string;
81
101
  lg: string;
102
+ xl: string;
82
103
  icon: string;
104
+ 'icon-xs': string;
105
+ 'icon-sm': string;
106
+ 'icon-lg': string;
107
+ 'icon-xl': string;
83
108
  };
84
109
  }, undefined, "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import("tailwind-variants/dist/config").TVConfig<{
85
110
  variant: {
@@ -95,7 +120,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
95
120
  xs: string;
96
121
  sm: string;
97
122
  lg: string;
123
+ xl: string;
98
124
  icon: string;
125
+ 'icon-xs': string;
126
+ 'icon-sm': string;
127
+ 'icon-lg': string;
128
+ 'icon-xl': string;
99
129
  };
100
130
  }, {
101
131
  variant: {
@@ -111,7 +141,12 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
111
141
  xs: string;
112
142
  sm: string;
113
143
  lg: string;
144
+ xl: string;
114
145
  icon: string;
146
+ 'icon-xs': string;
147
+ 'icon-sm': string;
148
+ 'icon-lg': string;
149
+ 'icon-xl': string;
115
150
  };
116
151
  }>, unknown, unknown, undefined>>;
117
152
  type Variant = VariantProps<typeof buttonVariants>['variant'];
@@ -12,11 +12,16 @@ const buttonVariants = tv({
12
12
  link: 'text-primary underline-offset-4 hover:underline',
13
13
  },
14
14
  size: {
15
- default: 'h-6 px-2 py-2',
16
- xs: 'h-4 px-1 py-0.5 rounded-sm',
17
- sm: 'h-4 rounded-md px-1 py-2',
18
- lg: 'h-8 rounded-lg px-4',
19
- icon: 'h-10 w-10',
15
+ default: 'h-6 px-2 py-2 text-xs',
16
+ xs: 'h-4 px-1 py-0.5 rounded-sm text-xs',
17
+ sm: 'h-5 px-1.5 py-1 rounded-md text-xs',
18
+ lg: 'h-8 rounded-md px-4',
19
+ xl: 'h-10 rounded-md px-4',
20
+ icon: 'h-6 w-6',
21
+ 'icon-xs': 'h-4 w-4',
22
+ 'icon-sm': 'h-5 w-5',
23
+ 'icon-lg': 'h-8 w-8',
24
+ 'icon-xl': 'h-10 w-10',
20
25
  },
21
26
  },
22
27
  defaultVariants: {
@@ -1,4 +1,4 @@
1
- import Root from "./input.svelte";
1
+ import Root from './input.svelte';
2
2
  export type FormInputEvent<T extends Event = Event> = T & {
3
3
  currentTarget: EventTarget & HTMLInputElement;
4
4
  };
@@ -20,4 +20,11 @@ export type InputEvents = {
20
20
  input: FormInputEvent<InputEvent>;
21
21
  wheel: FormInputEvent<WheelEvent>;
22
22
  };
23
- export { Root, Root as Input, };
23
+ export type InputSize = 'default' | 'sm';
24
+ declare const inputVariants: {
25
+ size: {
26
+ default: string;
27
+ sm: string;
28
+ };
29
+ };
30
+ export { Root as Input, inputVariants, Root, };
@@ -1,4 +1,10 @@
1
- import Root from "./input.svelte";
2
- export { Root,
1
+ import Root from './input.svelte';
2
+ const inputVariants = {
3
+ size: {
4
+ default: 'h-10 px-3 py-2',
5
+ sm: 'h-8 px-2 text-xs',
6
+ },
7
+ };
8
+ export {
3
9
  //
4
- Root as Input, };
10
+ Root as Input, inputVariants, Root, };
@@ -1,6 +1,8 @@
1
1
  <script>import { cn } from "../../../utils.js";
2
+ import { inputVariants } from "./index.js";
2
3
  let className = void 0;
3
4
  export let value = void 0;
5
+ export let size = "default";
4
6
  export { className as class };
5
7
  export let readonly = void 0;
6
8
  export let el = void 0;
@@ -8,7 +10,8 @@ export let el = void 0;
8
10
 
9
11
  <input
10
12
  class={cn(
11
- 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
13
+ 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex w-full rounded-md border file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
14
+ inputVariants.size[size],
12
15
  className,
13
16
  )}
14
17
  bind:value
@@ -1,9 +1,10 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  import type { HTMLInputAttributes } from 'svelte/elements';
3
- import type { InputEvents } from './index.js';
3
+ import type { InputEvents, InputSize } from './index.js';
4
4
  declare const __propDef: {
5
5
  props: HTMLInputAttributes & {
6
- el?: HTMLSpanElement;
6
+ el?: HTMLInputElement;
7
+ size?: InputSize;
7
8
  };
8
9
  slots: {};
9
10
  events: InputEvents;
@@ -1,11 +1,37 @@
1
- import { Select as SelectPrimitive } from "bits-ui";
2
- import Label from "./select-label.svelte";
3
- import Item from "./select-item.svelte";
4
- import Content from "./select-content.svelte";
5
- import Trigger from "./select-trigger.svelte";
6
- import Separator from "./select-separator.svelte";
1
+ import { Select as SelectPrimitive } from 'bits-ui';
2
+ import Content from './select-content.svelte';
3
+ import Item from './select-item.svelte';
4
+ import Label from './select-label.svelte';
5
+ import Separator from './select-separator.svelte';
6
+ import Trigger from './select-trigger.svelte';
7
7
  declare const Root: typeof SelectPrimitive.Root;
8
8
  declare const Group: typeof SelectPrimitive.Group;
9
9
  declare const Input: typeof SelectPrimitive.Input;
10
10
  declare const Value: typeof SelectPrimitive.Value;
11
- export { Root, Group, Input, Label, Item, Value, Content, Trigger, Separator, Root as Select, Group as SelectGroup, Input as SelectInput, Label as SelectLabel, Item as SelectItem, Value as SelectValue, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, };
11
+ export type SelectSize = 'default' | 'sm' | 'xs';
12
+ declare const selectVariants: {
13
+ size: {
14
+ default: {
15
+ trigger: string;
16
+ content: string;
17
+ item: string;
18
+ label: string;
19
+ icon: string;
20
+ };
21
+ sm: {
22
+ trigger: string;
23
+ content: string;
24
+ item: string;
25
+ label: string;
26
+ icon: string;
27
+ };
28
+ xs: {
29
+ trigger: string;
30
+ content: string;
31
+ item: string;
32
+ label: string;
33
+ icon: string;
34
+ };
35
+ };
36
+ };
37
+ export { Content, Group, Input, Item, Label, Root, Root as Select, Content as SelectContent, Group as SelectGroup, Input as SelectInput, Item as SelectItem, Label as SelectLabel, Separator as SelectSeparator, Trigger as SelectTrigger, Value as SelectValue, selectVariants, Separator, Trigger, Value, };
@@ -1,13 +1,38 @@
1
- import { Select as SelectPrimitive } from "bits-ui";
2
- import Label from "./select-label.svelte";
3
- import Item from "./select-item.svelte";
4
- import Content from "./select-content.svelte";
5
- import Trigger from "./select-trigger.svelte";
6
- import Separator from "./select-separator.svelte";
1
+ import { Select as SelectPrimitive } from 'bits-ui';
2
+ import Content from './select-content.svelte';
3
+ import Item from './select-item.svelte';
4
+ import Label from './select-label.svelte';
5
+ import Separator from './select-separator.svelte';
6
+ import Trigger from './select-trigger.svelte';
7
7
  const Root = SelectPrimitive.Root;
8
8
  const Group = SelectPrimitive.Group;
9
9
  const Input = SelectPrimitive.Input;
10
10
  const Value = SelectPrimitive.Value;
11
- export { Root, Group, Input, Label, Item, Value, Content, Trigger, Separator,
11
+ const selectVariants = {
12
+ size: {
13
+ default: {
14
+ trigger: 'h-10 px-3 py-2',
15
+ content: 'p-1',
16
+ item: 'py-1.5 pl-8 pr-2 text-sm',
17
+ label: 'py-1.5 pl-8 pr-2 text-sm',
18
+ icon: 'left-2 h-3.5 w-3.5',
19
+ },
20
+ sm: {
21
+ trigger: 'h-8 px-2 py-1.5 text-sm',
22
+ content: 'p-0.5',
23
+ item: 'py-1 pl-6 pr-1.5 text-sm',
24
+ label: 'py-1 pl-6 pr-1.5 text-sm',
25
+ icon: 'left-1.5 h-3 w-3',
26
+ },
27
+ xs: {
28
+ trigger: 'h-6 px-2 py-1 text-xs',
29
+ content: 'p-0.5',
30
+ item: 'py-1 pl-5 pr-1 text-xs',
31
+ label: 'py-1 pl-5 pr-1 text-xs',
32
+ icon: 'left-1 h-2.5 w-2.5',
33
+ },
34
+ },
35
+ };
36
+ export { Content, Group, Input, Item, Label, Root,
12
37
  //
13
- Root as Select, Group as SelectGroup, Input as SelectInput, Label as SelectLabel, Item as SelectItem, Value as SelectValue, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, };
38
+ Root as Select, Content as SelectContent, Group as SelectGroup, Input as SelectInput, Item as SelectItem, Label as SelectLabel, Separator as SelectSeparator, Trigger as SelectTrigger, Value as SelectValue, selectVariants, Separator, Trigger, Value, };
@@ -1,6 +1,7 @@
1
- <script>import { Select as SelectPrimitive } from "bits-ui";
1
+ <script>import { cn, flyAndScale } from "../../../utils.js";
2
+ import { Select as SelectPrimitive } from "bits-ui";
2
3
  import { scale } from "svelte/transition";
3
- import { cn, flyAndScale } from "../../../utils.js";
4
+ import { selectVariants } from "./index.js";
4
5
  export let sideOffset = 4;
5
6
  export let inTransition = flyAndScale;
6
7
  export let inTransitionConfig = void 0;
@@ -11,23 +12,25 @@ export let outTransitionConfig = {
11
12
  duration: 50
12
13
  };
13
14
  let className = void 0;
15
+ export let size = "default";
14
16
  export { className as class };
15
17
  </script>
16
18
 
17
19
  <SelectPrimitive.Content
18
- {inTransition}
19
- {inTransitionConfig}
20
- {outTransition}
21
- {outTransitionConfig}
22
- {sideOffset}
23
- class={cn(
24
- "bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md outline-none",
25
- className
26
- )}
27
- {...$$restProps}
28
- on:keydown
20
+ {inTransition}
21
+ {inTransitionConfig}
22
+ {outTransition}
23
+ {outTransitionConfig}
24
+ {sideOffset}
25
+ class={cn(
26
+ 'bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md outline-none',
27
+ selectVariants.size[size].content,
28
+ className,
29
+ )}
30
+ {...$$restProps}
31
+ on:keydown
29
32
  >
30
- <div class="w-full p-1">
31
- <slot />
32
- </div>
33
+ <div class="w-full p-1">
34
+ <slot />
35
+ </div>
33
36
  </SelectPrimitive.Content>
@@ -1,7 +1,30 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { Select as SelectPrimitive } from "bits-ui";
2
+ import { Select as SelectPrimitive } from 'bits-ui';
3
+ import type { SelectSize } from './index.js';
3
4
  declare const __propDef: {
4
- props: SelectPrimitive.ContentProps;
5
+ props: {
6
+ side?: "top" | "right" | "bottom" | "left" | undefined | undefined;
7
+ align?: "start" | "center" | "end" | undefined | undefined;
8
+ alignOffset?: number | undefined | undefined;
9
+ sideOffset?: number | undefined | undefined;
10
+ sameWidth?: boolean | undefined | undefined;
11
+ avoidCollisions?: boolean | undefined | undefined;
12
+ collisionPadding?: number | undefined | undefined;
13
+ collisionBoundary?: import("bits-ui/dist/bits/floating/_types.js").Boundary | undefined;
14
+ fitViewport?: boolean | undefined | undefined;
15
+ strategy?: "absolute" | "fixed" | undefined | undefined;
16
+ overlap?: boolean | undefined | undefined;
17
+ transition?: import("bits-ui/dist/internal/types.js").Transition | undefined;
18
+ transitionConfig?: any;
19
+ inTransition?: import("bits-ui/dist/internal/types.js").Transition | undefined;
20
+ inTransitionConfig?: any;
21
+ outTransition?: import("bits-ui/dist/internal/types.js").Transition | undefined;
22
+ outTransitionConfig?: any;
23
+ asChild?: boolean | undefined | undefined;
24
+ el?: HTMLDivElement | undefined;
25
+ } & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
26
+ size?: SelectSize;
27
+ };
5
28
  slots: {
6
29
  default: {};
7
30
  };
@@ -1,7 +1,9 @@
1
- <script>import Check from "lucide-svelte/icons/check";
1
+ <script>import { cn } from "../../../utils.js";
2
2
  import { Select as SelectPrimitive } from "bits-ui";
3
- import { cn } from "../../../utils.js";
3
+ import Check from "lucide-svelte/icons/check";
4
+ import { selectVariants } from "./index.js";
4
5
  let className = void 0;
6
+ export let size = "default";
5
7
  export let value;
6
8
  export let label = void 0;
7
9
  export let disabled = void 0;
@@ -9,27 +11,28 @@ export { className as class };
9
11
  </script>
10
12
 
11
13
  <SelectPrimitive.Item
12
- {value}
13
- {disabled}
14
- {label}
15
- class={cn(
16
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
17
- className
18
- )}
19
- {...$$restProps}
20
- on:click
21
- on:keydown
22
- on:focusin
23
- on:focusout
24
- on:pointerleave
25
- on:pointermove
14
+ {value}
15
+ {disabled}
16
+ {label}
17
+ class={cn(
18
+ 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
19
+ selectVariants.size[size].item,
20
+ className,
21
+ )}
22
+ {...$$restProps}
23
+ on:click
24
+ on:keydown
25
+ on:focusin
26
+ on:focusout
27
+ on:pointerleave
28
+ on:pointermove
26
29
  >
27
- <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
28
- <SelectPrimitive.ItemIndicator>
29
- <Check class="h-4 w-4" />
30
- </SelectPrimitive.ItemIndicator>
31
- </span>
32
- <slot>
33
- {label || value}
34
- </slot>
30
+ <span class={cn('absolute flex items-center justify-center', selectVariants.size[size].icon)}>
31
+ <SelectPrimitive.ItemIndicator>
32
+ <Check class="h-full w-full" />
33
+ </SelectPrimitive.ItemIndicator>
34
+ </span>
35
+ <slot>
36
+ {label || value}
37
+ </slot>
35
38
  </SelectPrimitive.Item>
@@ -1,11 +1,30 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { Select as SelectPrimitive } from "bits-ui";
2
+ import type { SelectSize } from './index.js';
3
3
  declare const __propDef: {
4
- props: SelectPrimitive.ItemProps;
4
+ props: {
5
+ value: unknown;
6
+ label?: string | undefined;
7
+ disabled?: boolean | undefined;
8
+ asChild?: boolean | undefined | undefined;
9
+ el?: HTMLDivElement | undefined;
10
+ } & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
11
+ size?: SelectSize;
12
+ };
13
+ events: {
14
+ click: import("bits-ui").CustomEventHandler<MouseEvent, HTMLDivElement>;
15
+ keydown: import("bits-ui").CustomEventHandler<KeyboardEvent, HTMLDivElement>;
16
+ focusin: import("bits-ui").CustomEventHandler<FocusEvent, HTMLDivElement>;
17
+ focusout: import("bits-ui").CustomEventHandler<FocusEvent, HTMLDivElement>;
18
+ pointerleave: import("bits-ui").CustomEventHandler<PointerEvent, HTMLDivElement>;
19
+ pointermove: import("bits-ui").CustomEventHandler<PointerEvent, HTMLDivElement>;
20
+ } & {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
5
23
  slots: {
6
24
  default: {};
7
25
  };
8
- events: SelectPrimitive.ItemEvents;
26
+ exports?: {} | undefined;
27
+ bindings?: string | undefined;
9
28
  };
10
29
  export type SelectItemProps = typeof __propDef.props;
11
30
  export type SelectItemEvents = typeof __propDef.events;
@@ -1,12 +1,11 @@
1
- <script>import { Select as SelectPrimitive } from "bits-ui";
2
- import { cn } from "../../../utils.js";
1
+ <script>import { cn } from "../../../utils.js";
2
+ import { Select as SelectPrimitive } from "bits-ui";
3
+ import { selectVariants } from "./index.js";
3
4
  let className = void 0;
5
+ export let size = "default";
4
6
  export { className as class };
5
7
  </script>
6
8
 
7
- <SelectPrimitive.Label
8
- class={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
9
- {...$$restProps}
10
- >
11
- <slot />
9
+ <SelectPrimitive.Label class={cn('font-semibold', selectVariants.size[size].label, className)} {...$$restProps}>
10
+ <slot />
12
11
  </SelectPrimitive.Label>
@@ -1,7 +1,12 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { Select as SelectPrimitive } from "bits-ui";
2
+ import type { SelectSize } from './index.js';
3
3
  declare const __propDef: {
4
- props: SelectPrimitive.LabelProps;
4
+ props: {
5
+ asChild?: boolean | undefined | undefined;
6
+ el?: HTMLDivElement | undefined;
7
+ } & import("bits-ui/dist/internal/types.js").HTMLDivAttributes & {
8
+ size?: SelectSize;
9
+ };
5
10
  events: {
6
11
  [evt: string]: CustomEvent<any>;
7
12
  };
@@ -1,22 +1,25 @@
1
- <script>import { Select as SelectPrimitive } from "bits-ui";
1
+ <script>import { cn } from "../../../utils.js";
2
+ import { Select as SelectPrimitive } from "bits-ui";
2
3
  import ChevronDown from "lucide-svelte/icons/chevron-down";
3
- import { cn } from "../../../utils.js";
4
+ import { selectVariants } from "./index.js";
4
5
  let className = void 0;
6
+ export let size = "default";
5
7
  export { className as class };
6
8
  </script>
7
9
 
8
10
  <SelectPrimitive.Trigger
9
- class={cn(
10
- "border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
11
- className
12
- )}
13
- {...$$restProps}
14
- let:builder
15
- on:click
16
- on:keydown
11
+ class={cn(
12
+ 'border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex w-full items-center justify-between rounded-md border text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
13
+ selectVariants.size[size].trigger,
14
+ className,
15
+ )}
16
+ {...$$restProps}
17
+ let:builder
18
+ on:click
19
+ on:keydown
17
20
  >
18
- <slot {builder} />
19
- <div>
20
- <ChevronDown class="h-4 w-4 opacity-50" />
21
- </div>
21
+ <slot {builder} />
22
+ <div>
23
+ <ChevronDown class="h-4 w-4 opacity-50" />
24
+ </div>
22
25
  </SelectPrimitive.Trigger>
@@ -1,7 +1,18 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { Select as SelectPrimitive } from "bits-ui";
2
+ import type { SelectSize } from './index.js';
3
3
  declare const __propDef: {
4
- props: SelectPrimitive.TriggerProps;
4
+ props: {
5
+ asChild?: boolean | undefined | undefined;
6
+ el?: HTMLButtonElement | undefined;
7
+ } & import("svelte/elements.js").HTMLButtonAttributes & {
8
+ size?: SelectSize;
9
+ };
10
+ events: {
11
+ click: import("bits-ui").CustomEventHandler<MouseEvent, HTMLButtonElement>;
12
+ keydown: import("bits-ui").CustomEventHandler<KeyboardEvent, HTMLButtonElement>;
13
+ } & {
14
+ [evt: string]: CustomEvent<any>;
15
+ };
5
16
  slots: {
6
17
  default: {
7
18
  builder: {
@@ -21,7 +32,8 @@ declare const __propDef: {
21
32
  };
22
33
  };
23
34
  };
24
- events: SelectPrimitive.TriggerEvents;
35
+ exports?: {} | undefined;
36
+ bindings?: string | undefined;
25
37
  };
26
38
  export type SelectTriggerProps = typeof __propDef.props;
27
39
  export type SelectTriggerEvents = typeof __propDef.events;
@@ -1,4 +1,4 @@
1
- import { ModeWatcher } from "mode-watcher";
2
- import ThemeSwitcherButton from "./theme-switcher-button.svelte";
3
- import ThemeSwitcherDropdown from "./theme-switcher-dropdown.svelte";
1
+ import { ModeWatcher } from 'mode-watcher';
2
+ import ThemeSwitcherButton from './theme-switcher-button.svelte';
3
+ import ThemeSwitcherDropdown from './theme-switcher-dropdown.svelte';
4
4
  export { ModeWatcher, ThemeSwitcherButton, ThemeSwitcherDropdown };
@@ -1,4 +1,4 @@
1
- import { ModeWatcher } from "mode-watcher";
2
- import ThemeSwitcherButton from "./theme-switcher-button.svelte";
3
- import ThemeSwitcherDropdown from "./theme-switcher-dropdown.svelte";
1
+ import { ModeWatcher } from 'mode-watcher';
2
+ import ThemeSwitcherButton from './theme-switcher-button.svelte';
3
+ import ThemeSwitcherDropdown from './theme-switcher-dropdown.svelte';
4
4
  export { ModeWatcher, ThemeSwitcherButton, ThemeSwitcherDropdown };
@@ -1,15 +1,14 @@
1
- <script>import Sun from "lucide-svelte/icons/sun";
2
- import Moon from "lucide-svelte/icons/moon";
3
- import { toggleMode } from "mode-watcher";
1
+ <script>import Moon from "lucide-svelte/icons/moon";
2
+ import Sun from "lucide-svelte/icons/sun";
4
3
  import { Button } from "../button/index.js";
4
+ import { toggleMode } from "mode-watcher";
5
+ let className = void 0;
6
+ export let size = "icon-lg";
7
+ export { className as class };
5
8
  </script>
6
9
 
7
- <Button on:click={toggleMode} variant="outline" size="icon">
8
- <Sun
9
- class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
10
- />
11
- <Moon
12
- class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
13
- />
14
- <span class="sr-only">Toggle theme</span>
10
+ <Button on:click={toggleMode} variant="outline" {size} class={className}>
11
+ <Sun class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
12
+ <Moon class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
13
+ <span class="sr-only">Toggle theme</span>
15
14
  </Button>
@@ -1,6 +1,9 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
- props: Record<string, never>;
3
+ props: {
4
+ size?: "icon-xs" | "icon-sm" | "icon" | "icon-lg" | "icon-xl" | undefined;
5
+ class?: string | undefined | null;
6
+ };
4
7
  events: {
5
8
  [evt: string]: CustomEvent<any>;
6
9
  };
@@ -1,13 +1,16 @@
1
- <script>import Sun from "lucide-svelte/icons/sun";
1
+ <script>import { Button } from "../button/index.js";
2
+ import * as DropdownMenu from "../dropdown-menu/index.js";
2
3
  import Moon from "lucide-svelte/icons/moon";
4
+ import Sun from "lucide-svelte/icons/sun";
3
5
  import { resetMode, setMode } from "mode-watcher";
4
- import * as DropdownMenu from "../dropdown-menu/index.js";
5
- import { Button } from "../button/index.js";
6
+ let className = void 0;
7
+ export let size = "icon-lg";
8
+ export { className as class };
6
9
  </script>
7
10
 
8
11
  <DropdownMenu.Root>
9
12
  <DropdownMenu.Trigger asChild let:builder>
10
- <Button builders={[builder]} variant="ghost" size="icon">
13
+ <Button builders={[builder]} variant="ghost" {size} class={className}>
11
14
  <Sun class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
12
15
  <Moon class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
13
16
  <span class="sr-only">Toggle theme</span>