@casinogate/ui 1.6.2 → 1.8.0

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 (164) hide show
  1. package/dist/assets/css/root.css +236 -32
  2. package/dist/assets/css/theme.css +6 -3
  3. package/dist/components/breadcrumb/breadcrumb.svelte +2 -2
  4. package/dist/components/breadcrumb/styles.d.ts +21 -21
  5. package/dist/components/breadcrumb/types.d.ts +2 -2
  6. package/dist/components/button/button.component.svelte +2 -1
  7. package/dist/components/button/styles.d.ts +15 -0
  8. package/dist/components/button/styles.js +10 -5
  9. package/dist/components/button-group/components/button-group.root.svelte +1 -3
  10. package/dist/components/collapsible/components/collapsaible.svelte.js +3 -3
  11. package/dist/components/collapsible/styles.d.ts +8 -8
  12. package/dist/components/data-table/data-table.svelte +1 -1
  13. package/dist/components/data-table/utils/pagination-state.svelte.js +3 -3
  14. package/dist/components/data-table/utils/resize-state.svelte.js +3 -3
  15. package/dist/components/data-table/utils/row-selection-state.svelte.js +3 -3
  16. package/dist/components/dialog/components/dialog.overlay.svelte +1 -7
  17. package/dist/components/dropdown/components/dropdown.content.svelte +39 -0
  18. package/dist/components/dropdown/components/dropdown.content.svelte.d.ts +4 -0
  19. package/dist/components/dropdown/components/dropdown.group-heading.svelte +16 -0
  20. package/dist/components/dropdown/components/dropdown.group-heading.svelte.d.ts +4 -0
  21. package/dist/components/dropdown/components/dropdown.group.svelte +16 -0
  22. package/dist/components/dropdown/components/dropdown.group.svelte.d.ts +4 -0
  23. package/dist/components/dropdown/components/dropdown.item.svelte +22 -0
  24. package/dist/components/dropdown/components/dropdown.item.svelte.d.ts +4 -0
  25. package/dist/components/dropdown/components/dropdown.portal.svelte +10 -0
  26. package/dist/components/dropdown/components/dropdown.portal.svelte.d.ts +3 -0
  27. package/dist/components/dropdown/components/dropdown.root.svelte +10 -0
  28. package/dist/components/dropdown/components/dropdown.root.svelte.d.ts +3 -0
  29. package/dist/components/dropdown/components/dropdown.separator.svelte +22 -0
  30. package/dist/components/dropdown/components/dropdown.separator.svelte.d.ts +4 -0
  31. package/dist/components/dropdown/components/dropdown.sub-content.svelte +16 -0
  32. package/dist/components/dropdown/components/dropdown.sub-content.svelte.d.ts +4 -0
  33. package/dist/components/dropdown/components/dropdown.sub-trigger.svelte +21 -0
  34. package/dist/components/dropdown/components/dropdown.sub-trigger.svelte.d.ts +4 -0
  35. package/dist/components/dropdown/components/dropdown.sub.svelte +8 -0
  36. package/dist/components/dropdown/components/dropdown.sub.svelte.d.ts +3 -0
  37. package/dist/components/dropdown/components/dropdown.trigger.svelte +16 -0
  38. package/dist/components/dropdown/components/dropdown.trigger.svelte.d.ts +4 -0
  39. package/dist/components/dropdown/dropdown.svelte +196 -0
  40. package/dist/components/dropdown/dropdown.svelte.d.ts +7 -0
  41. package/dist/components/dropdown/exports-primitive.d.ts +11 -0
  42. package/dist/components/dropdown/exports-primitive.js +11 -0
  43. package/dist/components/dropdown/exports.d.ts +1 -0
  44. package/dist/components/dropdown/exports.js +1 -0
  45. package/dist/components/dropdown/index.d.ts +3 -0
  46. package/dist/components/dropdown/index.js +2 -0
  47. package/dist/components/dropdown/styles.d.ts +496 -0
  48. package/dist/components/dropdown/styles.js +111 -0
  49. package/dist/components/dropdown/types.d.ts +86 -0
  50. package/dist/components/dropdown/types.js +1 -0
  51. package/dist/components/field/field.svelte +0 -1
  52. package/dist/components/field/styles.d.ts +15 -15
  53. package/dist/components/popover/components/popover.content.svelte +7 -2
  54. package/dist/components/popover/components/popover.content.svelte.d.ts +2 -2
  55. package/dist/components/popover/components/popover.root.svelte +0 -6
  56. package/dist/components/popover/components/popover.trigger.svelte +6 -2
  57. package/dist/components/popover/components/popover.trigger.svelte.d.ts +2 -2
  58. package/dist/components/popover/styles.d.ts +60 -52
  59. package/dist/components/popover/styles.js +37 -14
  60. package/dist/components/popover/types.d.ts +4 -4
  61. package/dist/components/segment/components/segment.root.svelte +2 -1
  62. package/dist/components/segment/components/segmet.svelte.d.ts +0 -1
  63. package/dist/components/segment/components/segmet.svelte.js +0 -1
  64. package/dist/components/segment/styles.d.ts +18 -0
  65. package/dist/components/segment/styles.js +7 -1
  66. package/dist/components/select/components/select.content.svelte +2 -4
  67. package/dist/components/select/components/select.group-heading.svelte +2 -4
  68. package/dist/components/select/components/select.group-heading.svelte.d.ts +2 -2
  69. package/dist/components/select/components/select.group.svelte.d.ts +2 -2
  70. package/dist/components/select/components/select.item.svelte +5 -13
  71. package/dist/components/select/components/select.item.svelte.d.ts +2 -2
  72. package/dist/components/select/components/select.root.svelte +1 -17
  73. package/dist/components/select/components/select.root.svelte.d.ts +1 -2
  74. package/dist/components/select/components/select.trigger.svelte +17 -5
  75. package/dist/components/select/components/select.viewport.svelte +2 -4
  76. package/dist/components/select/components/select.viewport.svelte.d.ts +2 -2
  77. package/dist/components/select/exports.d.ts +1 -1
  78. package/dist/components/select/exports.js +1 -1
  79. package/dist/components/select/select.async.svelte +146 -83
  80. package/dist/components/select/select.async.svelte.d.ts +1 -1
  81. package/dist/components/select/select.svelte +107 -62
  82. package/dist/components/select/select.svelte.d.ts +4 -2
  83. package/dist/components/select/styles.d.ts +48 -139
  84. package/dist/components/select/styles.js +74 -101
  85. package/dist/components/select/types.d.ts +69 -29
  86. package/dist/components/select/types.js +0 -1
  87. package/dist/components/select/utils/get-item-key.d.ts +1 -1
  88. package/dist/components/separator/separator.svelte +4 -5
  89. package/dist/components/separator/separator.svelte.d.ts +2 -2
  90. package/dist/components/separator/styles.d.ts +18 -0
  91. package/dist/components/separator/styles.js +10 -0
  92. package/dist/components/separator/types.d.ts +2 -1
  93. package/dist/components/spinner/spinner.svelte +1 -6
  94. package/dist/internal/index.d.ts +1 -0
  95. package/dist/internal/index.js +1 -0
  96. package/dist/internal/lib/collection/grid-collection.d.ts +3 -0
  97. package/dist/internal/lib/collection/grid-collection.js +2 -0
  98. package/dist/internal/lib/collection/index.d.ts +5 -0
  99. package/dist/internal/lib/collection/index.js +5 -0
  100. package/dist/internal/lib/collection/list-collection.d.ts +3 -0
  101. package/dist/internal/lib/collection/list-collection.js +2 -0
  102. package/dist/internal/lib/collection/tree-collection.d.ts +4 -0
  103. package/dist/internal/lib/collection/tree-collection.js +3 -0
  104. package/dist/internal/lib/collection/use-list-collection.svelte.d.ts +88 -0
  105. package/dist/internal/lib/collection/use-list-collection.svelte.js +94 -0
  106. package/dist/internal/lib/collection/use-list-selection.svelte.d.ts +92 -0
  107. package/dist/internal/lib/collection/use-list-selection.svelte.js +80 -0
  108. package/dist/internal/lib/index.d.ts +1 -0
  109. package/dist/internal/lib/index.js +1 -0
  110. package/dist/internal/utils/equal.d.ts +3 -0
  111. package/dist/internal/utils/equal.js +56 -0
  112. package/dist/internal/utils/functions.d.ts +2 -0
  113. package/dist/internal/utils/functions.js +4 -0
  114. package/dist/internal/utils/guard.d.ts +5 -0
  115. package/dist/internal/utils/guard.js +5 -0
  116. package/dist/internal/utils/tailwindcss.d.ts +3 -2
  117. package/dist/internal/utils/tailwindcss.js +25 -5
  118. package/package.json +6 -4
  119. package/dist/components/app-shell/app-shell.stories.svelte +0 -107
  120. package/dist/components/app-shell/app-shell.stories.svelte.d.ts +0 -18
  121. package/dist/components/badge/badge.stories.svelte +0 -81
  122. package/dist/components/badge/badge.stories.svelte.d.ts +0 -19
  123. package/dist/components/breadcrumb/breadcrumb.stories.svelte +0 -67
  124. package/dist/components/breadcrumb/breadcrumb.stories.svelte.d.ts +0 -4
  125. package/dist/components/button/button.stories.svelte +0 -106
  126. package/dist/components/button/button.stories.svelte.d.ts +0 -19
  127. package/dist/components/button-group/button-group.stories.svelte +0 -59
  128. package/dist/components/button-group/button-group.stories.svelte.d.ts +0 -18
  129. package/dist/components/checkbox/checkbox.stories.svelte +0 -52
  130. package/dist/components/checkbox/checkbox.stories.svelte.d.ts +0 -18
  131. package/dist/components/collapsible/collapsible.stories.svelte +0 -69
  132. package/dist/components/collapsible/collapsible.stories.svelte.d.ts +0 -18
  133. package/dist/components/data-table/data-table.stories.svelte +0 -327
  134. package/dist/components/data-table/data-table.stories.svelte.d.ts +0 -4
  135. package/dist/components/dialog/dialog.stories.svelte +0 -102
  136. package/dist/components/dialog/dialog.stories.svelte.d.ts +0 -3
  137. package/dist/components/field/field.stories.svelte +0 -56
  138. package/dist/components/field/field.stories.svelte.d.ts +0 -19
  139. package/dist/components/input/input.stories.svelte +0 -41
  140. package/dist/components/input/input.stories.svelte.d.ts +0 -19
  141. package/dist/components/navigation/navigation.stories.svelte +0 -99
  142. package/dist/components/navigation/navigation.stories.svelte.d.ts +0 -19
  143. package/dist/components/pagination/pagination.stories.svelte +0 -69
  144. package/dist/components/pagination/pagination.stories.svelte.d.ts +0 -19
  145. package/dist/components/popover/popover.stories.svelte +0 -135
  146. package/dist/components/popover/popover.stories.svelte.d.ts +0 -4
  147. package/dist/components/segment/segment.stories.svelte +0 -57
  148. package/dist/components/segment/segment.stories.svelte.d.ts +0 -19
  149. package/dist/components/select/select.stories.svelte +0 -263
  150. package/dist/components/select/select.stories.svelte.d.ts +0 -4
  151. package/dist/components/separator/separator.stories.svelte +0 -44
  152. package/dist/components/separator/separator.stories.svelte.d.ts +0 -19
  153. package/dist/components/skeleton/skeleton.stories.svelte +0 -129
  154. package/dist/components/skeleton/skeleton.stories.svelte.d.ts +0 -19
  155. package/dist/components/spinner/spinner.stories.svelte +0 -29
  156. package/dist/components/spinner/spinner.stories.svelte.d.ts +0 -19
  157. package/dist/components/switch/switch.stories.svelte +0 -55
  158. package/dist/components/switch/switch.stories.svelte.d.ts +0 -19
  159. package/dist/components/textarea/textarea.stories.svelte +0 -36
  160. package/dist/components/textarea/textarea.stories.svelte.d.ts +0 -19
  161. package/dist/components/toast/toast.stories.svelte +0 -96
  162. package/dist/components/toast/toast.stories.svelte.d.ts +0 -19
  163. package/dist/internal/utils/arrays.d.ts +0 -1
  164. package/dist/internal/utils/arrays.js +0 -30
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { buttonVariants } from './styles.js';
3
3
  import type { ButtonProps } from './types.js';
4
+ import { Spinner } from '../spinner/index.js';
4
5
  import { cn } from '../../internal/utils/common.js';
5
6
  import { Button, useId } from 'bits-ui';
6
7
  import { fly } from 'svelte/transition';
@@ -38,7 +39,7 @@
38
39
 
39
40
  {#if loading}
40
41
  <span in:fly={{ duration: 200, x: 20 }} data-slot="loading" class={variants.chevron()}>
41
- <!-- <AnimatedLoaderIcon width={18} height={18} /> -->
42
+ <Spinner size={18} />
42
43
  </span>
43
44
  {/if}
44
45
 
@@ -52,6 +52,11 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
52
52
  root: string;
53
53
  };
54
54
  };
55
+ fullWidth: {
56
+ true: {
57
+ root: string;
58
+ };
59
+ };
55
60
  rounded: {
56
61
  sm: {
57
62
  root: string;
@@ -128,6 +133,11 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
128
133
  root: string;
129
134
  };
130
135
  };
136
+ fullWidth: {
137
+ true: {
138
+ root: string;
139
+ };
140
+ };
131
141
  rounded: {
132
142
  sm: {
133
143
  root: string;
@@ -204,6 +214,11 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
204
214
  root: string;
205
215
  };
206
216
  };
217
+ fullWidth: {
218
+ true: {
219
+ root: string;
220
+ };
221
+ };
207
222
  rounded: {
208
223
  sm: {
209
224
  root: string;
@@ -2,7 +2,7 @@ import { tv } from '../../internal/utils/tailwindcss.js';
2
2
  export const buttonVariants = tv({
3
3
  slots: {
4
4
  root: [
5
- 'cgui:flex cgui:items-center cgui:justify-center cgui:gap-1.5 cgui:cursor-pointer cgui:px-2 cgui:text-center cgui:overflow-hidden',
5
+ 'cgui:flex cgui:items-center cgui:justify-center cgui:gap-1 cgui:cursor-pointer cgui:px-2 cgui:text-center cgui:overflow-hidden',
6
6
  'cgui:transition-all cgui:duration-250 cgui:ease-in-out',
7
7
  'cgui:select-none cgui:font-medium',
8
8
  'cgui:disabled:cursor-not-allowed cgui:disabled:opacity-50',
@@ -49,16 +49,16 @@ export const buttonVariants = tv({
49
49
  },
50
50
  size: {
51
51
  xs: {
52
- root: 'cgui:h-7.5',
52
+ root: 'cgui:h-7.5 cgui:px-2 cgui:text-body',
53
53
  },
54
54
  sm: {
55
- root: 'cgui:h-8',
55
+ root: 'cgui:h-8 cgui:px-2.5 cgui:text-body',
56
56
  },
57
57
  md: {
58
- root: 'cgui:h-8.5',
58
+ root: 'cgui:h-9 cgui:px-3 cgui:text-body',
59
59
  },
60
60
  lg: {
61
- root: 'cgui:h-14',
61
+ root: 'cgui:h-10.5 cgui:px-4 cgui:text-heading-2',
62
62
  },
63
63
  },
64
64
  w: {
@@ -75,6 +75,11 @@ export const buttonVariants = tv({
75
75
  root: '',
76
76
  },
77
77
  },
78
+ fullWidth: {
79
+ true: {
80
+ root: 'cgui:w-full',
81
+ },
82
+ },
78
83
  rounded: {
79
84
  sm: {
80
85
  root: 'cgui:rounded-sm',
@@ -1,15 +1,13 @@
1
1
  <script lang="ts">
2
2
  import type { ButtonGroupRootProps } from '../types.js';
3
3
  import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
4
- import { cn, useId } from '../../../internal/utils/common.js';
4
+ import { cn } from '../../../internal/utils/common.js';
5
5
  import { box } from 'svelte-toolbelt';
6
6
  import { ButtonGroupStylesContext, buttonGroupStyles } from '../styles.js';
7
7
 
8
- const uid = $props.id();
9
8
  let {
10
9
  children,
11
10
  ref = $bindable(null),
12
- id = useId(uid),
13
11
  orientation = 'horizontal',
14
12
  class: className,
15
13
  ...restProps
@@ -1,6 +1,6 @@
1
- import { arraysAreEqual } from '../../../internal/utils/arrays.js';
2
1
  import { getDataDisabled } from '../../../internal/utils/attrs.js';
3
2
  import { keyWithPrefix } from '../../../internal/utils/common.js';
3
+ import { isEqual } from '../../../internal/utils/equal.js';
4
4
  import { Context, watch } from 'runed';
5
5
  import { attachRef } from 'svelte-toolbelt';
6
6
  const CollapsibleRootContext = new Context(keyWithPrefix('collapsible-root'));
@@ -28,7 +28,7 @@ export class CollapsibleGroupState {
28
28
  newValue = [...$state.snapshot(this.opts.value.current), value];
29
29
  }
30
30
  this.opts.value.current = newValue;
31
- if (arraysAreEqual(this.opts.value.current, newValue))
31
+ if (isEqual(this.opts.value.current, newValue))
32
32
  return;
33
33
  this.opts.onValueChange.current(newValue);
34
34
  }
@@ -40,7 +40,7 @@ export class CollapsibleGroupState {
40
40
  return;
41
41
  const newValue = this.opts.value.current.filter((v) => v !== value);
42
42
  this.opts.value.current = newValue;
43
- if (arraysAreEqual(this.opts.value.current, newValue))
43
+ if (isEqual(this.opts.value.current, newValue))
44
44
  return;
45
45
  this.opts.onValueChange.current(newValue);
46
46
  }
@@ -73,34 +73,34 @@ export declare const CollapsibleStylesContext: Context<ReadableBox<{
73
73
  root: (slotProps?: ({
74
74
  variant?: "default" | "clean" | undefined;
75
75
  iconPosition?: "end" | "start" | undefined;
76
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
76
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
77
77
  trigger: (slotProps?: ({
78
78
  variant?: "default" | "clean" | undefined;
79
79
  iconPosition?: "end" | "start" | undefined;
80
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
80
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
81
81
  icon: (slotProps?: ({
82
82
  variant?: "default" | "clean" | undefined;
83
83
  iconPosition?: "end" | "start" | undefined;
84
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
84
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
85
85
  content: (slotProps?: ({
86
86
  variant?: "default" | "clean" | undefined;
87
87
  iconPosition?: "end" | "start" | undefined;
88
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
88
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
89
89
  } & {
90
90
  root: (slotProps?: ({
91
91
  variant?: "default" | "clean" | undefined;
92
92
  iconPosition?: "end" | "start" | undefined;
93
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
93
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
94
94
  trigger: (slotProps?: ({
95
95
  variant?: "default" | "clean" | undefined;
96
96
  iconPosition?: "end" | "start" | undefined;
97
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
97
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
98
98
  icon: (slotProps?: ({
99
99
  variant?: "default" | "clean" | undefined;
100
100
  iconPosition?: "end" | "start" | undefined;
101
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
101
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
102
102
  content: (slotProps?: ({
103
103
  variant?: "default" | "clean" | undefined;
104
104
  iconPosition?: "end" | "start" | undefined;
105
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
105
+ } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
106
106
  } & {}>>;
@@ -14,7 +14,7 @@
14
14
  import FlexRender from './components/flex-render.svelte';
15
15
  import { type DataTableProps, type RowData } from './types.js';
16
16
 
17
- let { ref = $bindable(null), table, empty, loading, ...restProps }: DataTableProps<TData> = $props();
17
+ let { ref = $bindable(null), table, empty, ...restProps }: DataTableProps<TData> = $props();
18
18
 
19
19
  let isFirstLoaded = $state(false);
20
20
 
@@ -7,9 +7,9 @@ export const usePaginationState = (opts) => {
7
7
  get value() {
8
8
  return value;
9
9
  },
10
- set value(value) {
11
- value = value;
12
- opts?.onValueChange?.(value);
10
+ set value(v) {
11
+ value = v;
12
+ opts?.onValueChange?.(v);
13
13
  },
14
14
  updater: (updater) => {
15
15
  let newPaginationState;
@@ -4,9 +4,9 @@ export const useResizeState = (opts) => {
4
4
  get value() {
5
5
  return value;
6
6
  },
7
- set value(value) {
8
- value = value;
9
- opts?.onValueChange?.(value);
7
+ set value(v) {
8
+ value = v;
9
+ opts?.onValueChange?.(v);
10
10
  },
11
11
  updater: (updater) => {
12
12
  let newColumnSizing;
@@ -4,9 +4,9 @@ export const useRowSelectionState = (opts) => {
4
4
  get value() {
5
5
  return value;
6
6
  },
7
- set value(value) {
8
- value = value;
9
- opts?.onValueChange?.(value);
7
+ set value(v) {
8
+ value = v;
9
+ opts?.onValueChange?.(v);
10
10
  },
11
11
  updater: (updater) => {
12
12
  let newRowSelection;
@@ -8,13 +8,7 @@
8
8
 
9
9
  const uid = $props.id();
10
10
 
11
- let {
12
- children,
13
- id = useId(uid),
14
- ref = $bindable(null),
15
- class: className,
16
- ...restProps
17
- }: DialogOverlayProps = $props();
11
+ let { id = useId(uid), ref = $bindable(null), class: className, ...restProps }: DialogOverlayProps = $props();
18
12
 
19
13
  const overlayState = DialogOverlayState.create({
20
14
  ref: boxWith(
@@ -0,0 +1,39 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownContentStyles } from '../styles.js';
6
+ import type { DropdownContentProps } from '../types.js';
7
+
8
+ let {
9
+ children,
10
+ ref = $bindable(null),
11
+ class: className,
12
+ sideOffset = 4,
13
+ variant = 'default',
14
+ rounded = 'default',
15
+ shadow = true,
16
+ w = 'default',
17
+ gap = 'default',
18
+ ...restProps
19
+ }: DropdownContentProps = $props();
20
+ </script>
21
+
22
+ <DropdownMenuPrimitive.Content
23
+ bind:ref
24
+ class={cn(
25
+ dropdownContentStyles({
26
+ variant,
27
+ rounded,
28
+ shadow,
29
+ w,
30
+ gap,
31
+ }),
32
+ className
33
+ )}
34
+ {sideOffset}
35
+ {...restProps}
36
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-content' }}
37
+ >
38
+ {@render children?.()}
39
+ </DropdownMenuPrimitive.Content>
@@ -0,0 +1,4 @@
1
+ import type { DropdownContentProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownContentProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownGroupHeadingStyles } from '../styles.js';
6
+ import type { DropdownGroupHeadingProps } from '../types.js';
7
+
8
+ let { ref = $bindable(null), class: className, ...restProps }: DropdownGroupHeadingProps = $props();
9
+ </script>
10
+
11
+ <DropdownMenuPrimitive.GroupHeading
12
+ bind:ref
13
+ class={cn(dropdownGroupHeadingStyles(), className)}
14
+ {...restProps}
15
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-group-heading' }}
16
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownGroupHeadingProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownGroupHeadingProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownGroupStyles } from '../styles.js';
6
+ import type { DropdownGroupProps } from '../types.js';
7
+
8
+ let { ref = $bindable(null), class: className, ...restProps }: DropdownGroupProps = $props();
9
+ </script>
10
+
11
+ <DropdownMenuPrimitive.Group
12
+ bind:ref
13
+ class={cn(dropdownGroupStyles(), className)}
14
+ {...restProps}
15
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-group' }}
16
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownGroupProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownGroupProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,22 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownItemStyles } from '../styles.js';
6
+ import type { DropdownItemProps } from '../types.js';
7
+
8
+ let {
9
+ ref = $bindable(null),
10
+ class: className,
11
+ gap = 'default',
12
+ rounded = 'default',
13
+ ...restProps
14
+ }: DropdownItemProps = $props();
15
+ </script>
16
+
17
+ <DropdownMenuPrimitive.Item
18
+ bind:ref
19
+ class={cn(dropdownItemStyles({ gap, rounded }), className)}
20
+ {...restProps}
21
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-item' }}
22
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownItemProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownItemProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
+ import type { DropdownPortalProps } from '../types.js';
4
+
5
+ let { children, ...restProps }: DropdownPortalProps = $props();
6
+ </script>
7
+
8
+ <DropdownMenuPrimitive.Portal {...restProps}>
9
+ {@render children?.()}
10
+ </DropdownMenuPrimitive.Portal>
@@ -0,0 +1,3 @@
1
+ declare const Dropdown: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
2
+ type Dropdown = ReturnType<typeof Dropdown>;
3
+ export default Dropdown;
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
+ import type { DropdownRootProps } from '../types.js';
4
+
5
+ let { children, open = $bindable(false), ...restProps }: DropdownRootProps = $props();
6
+ </script>
7
+
8
+ <DropdownMenuPrimitive.Root bind:open {...restProps}>
9
+ {@render children?.()}
10
+ </DropdownMenuPrimitive.Root>
@@ -0,0 +1,3 @@
1
+ declare const Dropdown: import("svelte").Component<import("bits-ui").ContextMenuRootPropsWithoutHTML, {}, "open">;
2
+ type Dropdown = ReturnType<typeof Dropdown>;
3
+ export default Dropdown;
@@ -0,0 +1,22 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownSeparatorStyles } from '../styles.js';
6
+ import type { DropdownSeparatorProps } from '../types.js';
7
+
8
+ let {
9
+ ref = $bindable(null),
10
+ class: className,
11
+ orientation = 'horizontal',
12
+ ...restProps
13
+ }: DropdownSeparatorProps = $props();
14
+ </script>
15
+
16
+ <DropdownMenuPrimitive.Separator
17
+ bind:ref
18
+ {orientation}
19
+ class={cn(dropdownSeparatorStyles({ orientation }), className)}
20
+ {...restProps}
21
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-separator' }}
22
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownSeparatorProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownSeparatorProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownSubContentStyles } from '../styles.js';
6
+ import type { DropdownSubContentProps } from '../types.js';
7
+
8
+ let { ref = $bindable(null), class: className, ...restProps }: DropdownSubContentProps = $props();
9
+ </script>
10
+
11
+ <DropdownMenuPrimitive.SubContent
12
+ bind:ref
13
+ class={cn(dropdownSubContentStyles(), className)}
14
+ {...restProps}
15
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-sub-content' }}
16
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownSubContentProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownSubContentProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ import { Icon } from '../../icons/index.js';
3
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
4
+ import { cn } from '../../../internal/utils/common.js';
5
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
6
+ import { dropdownSubTriggerStyles } from '../styles.js';
7
+ import type { DropdownSubTriggerProps } from '../types.js';
8
+
9
+ let { ref = $bindable(null), class: className, children, ...restProps }: DropdownSubTriggerProps = $props();
10
+ </script>
11
+
12
+ <DropdownMenuPrimitive.SubTrigger
13
+ bind:ref
14
+ class={cn(dropdownSubTriggerStyles(), className)}
15
+ {...restProps}
16
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-sub-trigger' }}
17
+ >
18
+ {@render children?.()}
19
+
20
+ <Icon.ChevronSmallDown class="cgui:ms-auto" />
21
+ </DropdownMenuPrimitive.SubTrigger>
@@ -0,0 +1,4 @@
1
+ import type { DropdownSubTriggerProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownSubTriggerProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;
@@ -0,0 +1,8 @@
1
+ <script lang="ts">
2
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
+ import type { DropdownSubProps } from '../types.js';
4
+
5
+ let { open = $bindable(false), ...restProps }: DropdownSubProps = $props();
6
+ </script>
7
+
8
+ <DropdownMenuPrimitive.Sub bind:open {...restProps} />
@@ -0,0 +1,3 @@
1
+ declare const Dropdown: import("svelte").Component<import("bits-ui").ContextMenuSubPropsWithoutHTML, {}, "open">;
2
+ type Dropdown = ReturnType<typeof Dropdown>;
3
+ export default Dropdown;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
3
+ import { cn } from '../../../internal/utils/common.js';
4
+ import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
5
+ import { dropdownTriggerStyles } from '../styles.js';
6
+ import type { DropdownTriggerProps } from '../types.js';
7
+
8
+ let { ref = $bindable(null), class: className, ...restProps }: DropdownTriggerProps = $props();
9
+ </script>
10
+
11
+ <DropdownMenuPrimitive.Trigger
12
+ bind:ref
13
+ class={cn(dropdownTriggerStyles(), className)}
14
+ {...restProps}
15
+ {...{ [SLOT_ATTR_NAME]: 'dropdown-trigger' }}
16
+ />
@@ -0,0 +1,4 @@
1
+ import type { DropdownTriggerProps } from '../types.js';
2
+ declare const Dropdown: import("svelte").Component<DropdownTriggerProps, {}, "ref">;
3
+ type Dropdown = ReturnType<typeof Dropdown>;
4
+ export default Dropdown;