@casinogate/ui 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/components/app-shell/components/app-shell.content.svelte +5 -10
  2. package/dist/components/app-shell/components/app-shell.content.svelte.d.ts +1 -4
  3. package/dist/components/app-shell/components/app-shell.header.svelte +5 -10
  4. package/dist/components/app-shell/components/app-shell.header.svelte.d.ts +1 -4
  5. package/dist/components/app-shell/components/app-shell.nav-bar.svelte +5 -10
  6. package/dist/components/app-shell/components/app-shell.nav-bar.svelte.d.ts +1 -4
  7. package/dist/components/app-shell/components/app-shell.root.svelte +6 -21
  8. package/dist/components/app-shell/components/app-shell.root.svelte.d.ts +2 -11
  9. package/dist/components/app-shell/components/app-shell.sidebar-footer.svelte +5 -10
  10. package/dist/components/app-shell/components/app-shell.sidebar-footer.svelte.d.ts +1 -4
  11. package/dist/components/app-shell/components/app-shell.sidebar-head.svelte +5 -10
  12. package/dist/components/app-shell/components/app-shell.sidebar-head.svelte.d.ts +1 -4
  13. package/dist/components/app-shell/components/app-shell.sidebar-toggle.svelte +7 -12
  14. package/dist/components/app-shell/components/app-shell.sidebar-toggle.svelte.d.ts +1 -4
  15. package/dist/components/app-shell/components/app-shell.sidebar.svelte +5 -10
  16. package/dist/components/app-shell/components/app-shell.sidebar.svelte.d.ts +1 -4
  17. package/dist/components/app-shell/components/app-shell.viewport.svelte +5 -10
  18. package/dist/components/app-shell/components/app-shell.viewport.svelte.d.ts +1 -4
  19. package/dist/components/app-shell/exports-primitive.d.ts +9 -0
  20. package/dist/components/app-shell/exports-primitive.js +9 -0
  21. package/dist/components/app-shell/index.d.ts +2 -20
  22. package/dist/components/app-shell/index.js +1 -20
  23. package/dist/components/app-shell/types.d.ts +26 -0
  24. package/dist/components/button/button.component.svelte +12 -135
  25. package/dist/components/button/button.component.svelte.d.ts +2 -236
  26. package/dist/components/button/exports.d.ts +1 -0
  27. package/dist/components/button/exports.js +1 -0
  28. package/dist/components/button/index.d.ts +2 -233
  29. package/dist/components/button/index.js +1 -4
  30. package/dist/components/button/styles.d.ts +231 -0
  31. package/dist/components/button/styles.js +105 -0
  32. package/dist/components/button/types.d.ts +7 -0
  33. package/dist/components/button/types.js +1 -0
  34. package/dist/components/button-group/button-group.stories.svelte +10 -10
  35. package/dist/components/button-group/button-group.stories.svelte.d.ts +0 -1
  36. package/dist/components/button-group/components/button-group.root.svelte +4 -11
  37. package/dist/components/button-group/components/button-group.root.svelte.d.ts +1 -5
  38. package/dist/components/button-group/components/button-group.separator.svelte +2 -2
  39. package/dist/components/button-group/components/button-group.separator.svelte.d.ts +1 -11
  40. package/dist/components/button-group/exports-primitive.d.ts +2 -0
  41. package/dist/components/button-group/exports-primitive.js +2 -0
  42. package/dist/components/button-group/index.d.ts +2 -16
  43. package/dist/components/button-group/index.js +1 -6
  44. package/dist/components/button-group/types.d.ts +8 -0
  45. package/dist/components/button-group/types.js +1 -0
  46. package/dist/components/checkbox/components/checkbox.root.svelte +8 -9
  47. package/dist/components/checkbox/components/checkbox.root.svelte.d.ts +3 -4
  48. package/dist/components/checkbox/exports-primitive.d.ts +2 -0
  49. package/dist/components/checkbox/exports-primitive.js +2 -0
  50. package/dist/components/checkbox/index.d.ts +3 -0
  51. package/dist/components/checkbox/index.js +2 -6
  52. package/dist/components/checkbox/model/{checkbox-model.svelte.d.ts → checkbox-controller.svelte.d.ts} +3 -4
  53. package/dist/components/checkbox/model/{checkbox-model.svelte.js → checkbox-controller.svelte.js} +1 -4
  54. package/dist/components/checkbox/model/index.d.ts +1 -1
  55. package/dist/components/checkbox/model/index.js +1 -1
  56. package/dist/components/checkbox/types.d.ts +3 -0
  57. package/dist/components/checkbox/types.js +2 -0
  58. package/dist/components/collapsible/components/collapsaible.content.svelte +5 -9
  59. package/dist/components/collapsible/components/collapsaible.content.svelte.d.ts +1 -2
  60. package/dist/components/collapsible/components/collapsaible.root.svelte +6 -14
  61. package/dist/components/collapsible/components/collapsaible.root.svelte.d.ts +1 -3
  62. package/dist/components/collapsible/components/collapsaible.trigger.svelte +7 -14
  63. package/dist/components/collapsible/components/collapsaible.trigger.svelte.d.ts +1 -5
  64. package/dist/components/collapsible/exports-primitive.d.ts +3 -0
  65. package/dist/components/collapsible/exports-primitive.js +3 -0
  66. package/dist/components/collapsible/index.d.ts +2 -9
  67. package/dist/components/collapsible/index.js +1 -8
  68. package/dist/components/collapsible/styles.d.ts +8 -8
  69. package/dist/components/collapsible/types.d.ts +8 -0
  70. package/dist/components/collapsible/types.js +1 -1
  71. package/dist/components/data-table/components/data-table.body.svelte +2 -10
  72. package/dist/components/data-table/components/data-table.body.svelte.d.ts +1 -5
  73. package/dist/components/data-table/components/data-table.cell.svelte +2 -14
  74. package/dist/components/data-table/components/data-table.cell.svelte.d.ts +1 -7
  75. package/dist/components/data-table/components/data-table.head.svelte +2 -14
  76. package/dist/components/data-table/components/data-table.head.svelte.d.ts +1 -7
  77. package/dist/components/data-table/components/data-table.header.svelte +2 -9
  78. package/dist/components/data-table/components/data-table.header.svelte.d.ts +1 -4
  79. package/dist/components/data-table/components/data-table.resize-handler.svelte +2 -9
  80. package/dist/components/data-table/components/data-table.resize-handler.svelte.d.ts +1 -4
  81. package/dist/components/data-table/components/data-table.root.svelte +4 -15
  82. package/dist/components/data-table/components/data-table.root.svelte.d.ts +6 -13
  83. package/dist/components/data-table/components/data-table.row.svelte +2 -9
  84. package/dist/components/data-table/components/data-table.row.svelte.d.ts +1 -4
  85. package/dist/components/data-table/components/data-table.sort-button.svelte +4 -11
  86. package/dist/components/data-table/components/data-table.sort-button.svelte.d.ts +1 -4
  87. package/dist/components/data-table/components/data-table.svelte.d.ts +2 -2
  88. package/dist/components/data-table/components/data-table.table.svelte +2 -9
  89. package/dist/components/data-table/components/data-table.table.svelte.d.ts +1 -4
  90. package/dist/components/data-table/data-table.svelte +3 -16
  91. package/dist/components/data-table/data-table.svelte.d.ts +2 -9
  92. package/dist/components/data-table/exports-primitive.d.ts +10 -0
  93. package/dist/components/data-table/exports-primitive.js +10 -0
  94. package/dist/components/data-table/exports.d.ts +1 -0
  95. package/dist/components/data-table/exports.js +1 -28
  96. package/dist/components/data-table/index.d.ts +4 -0
  97. package/dist/components/data-table/index.js +3 -0
  98. package/dist/components/data-table/types.d.ts +37 -1
  99. package/dist/components/data-table/types.js +1 -1
  100. package/dist/components/field/components/field.control.svelte +3 -1
  101. package/dist/components/field/components/field.description.svelte +5 -10
  102. package/dist/components/field/components/field.description.svelte.d.ts +1 -4
  103. package/dist/components/field/components/field.error.svelte +5 -10
  104. package/dist/components/field/components/field.error.svelte.d.ts +1 -4
  105. package/dist/components/field/components/field.label.svelte +5 -10
  106. package/dist/components/field/components/field.label.svelte.d.ts +1 -4
  107. package/dist/components/field/components/field.root.svelte +5 -19
  108. package/dist/components/field/components/field.root.svelte.d.ts +1 -9
  109. package/dist/components/field/exports-primitive.d.ts +5 -0
  110. package/dist/components/field/exports-primitive.js +5 -0
  111. package/dist/components/field/exports.d.ts +1 -0
  112. package/dist/components/field/exports.js +1 -0
  113. package/dist/components/field/field.svelte.d.ts +1 -1
  114. package/dist/components/field/index.d.ts +3 -14
  115. package/dist/components/field/index.js +2 -14
  116. package/dist/components/field/styles.d.ts +3 -3
  117. package/dist/components/field/types.d.ts +23 -0
  118. package/dist/components/field/types.js +1 -0
  119. package/dist/components/icons/exports.d.ts +22 -0
  120. package/dist/components/icons/exports.js +22 -0
  121. package/dist/components/icons/index.d.ts +1 -22
  122. package/dist/components/icons/index.js +1 -22
  123. package/dist/components/index.d.ts +19 -0
  124. package/dist/components/index.js +19 -0
  125. package/dist/components/input/exports.d.ts +2 -0
  126. package/dist/components/input/exports.js +2 -0
  127. package/dist/components/input/index.d.ts +2 -6
  128. package/dist/components/input/index.js +1 -5
  129. package/dist/components/input/input.password.svelte +6 -15
  130. package/dist/components/input/input.password.svelte.d.ts +2 -4
  131. package/dist/components/input/input.svelte +5 -16
  132. package/dist/components/input/input.svelte.d.ts +1 -9
  133. package/dist/components/input/types.d.ts +13 -0
  134. package/dist/components/input/types.js +1 -0
  135. package/dist/components/navigation/components/navigation.content.svelte +6 -11
  136. package/dist/components/navigation/components/navigation.content.svelte.d.ts +1 -4
  137. package/dist/components/navigation/components/navigation.item.svelte +5 -10
  138. package/dist/components/navigation/components/navigation.item.svelte.d.ts +1 -4
  139. package/dist/components/navigation/components/navigation.root.svelte +6 -11
  140. package/dist/components/navigation/components/navigation.root.svelte.d.ts +1 -7
  141. package/dist/components/navigation/components/navigation.sub-content.svelte +6 -11
  142. package/dist/components/navigation/components/navigation.sub-content.svelte.d.ts +1 -6
  143. package/dist/components/navigation/components/navigation.trigger.svelte +4 -21
  144. package/dist/components/navigation/components/navigation.trigger.svelte.d.ts +1 -9
  145. package/dist/components/navigation/exports-primitive.d.ts +5 -0
  146. package/dist/components/navigation/exports-primitive.js +5 -0
  147. package/dist/components/navigation/exports.d.ts +1 -0
  148. package/dist/components/navigation/exports.js +1 -0
  149. package/dist/components/navigation/index.d.ts +3 -12
  150. package/dist/components/navigation/index.js +2 -12
  151. package/dist/components/navigation/types.d.ts +23 -0
  152. package/dist/components/navigation/types.js +1 -0
  153. package/dist/components/pagination/components/pagination.ellipsis.svelte +3 -9
  154. package/dist/components/pagination/components/pagination.ellipsis.svelte.d.ts +1 -4
  155. package/dist/components/pagination/components/pagination.item.svelte +2 -5
  156. package/dist/components/pagination/components/pagination.item.svelte.d.ts +1 -2
  157. package/dist/components/pagination/components/pagination.next-button.svelte +4 -10
  158. package/dist/components/pagination/components/pagination.next-button.svelte.d.ts +1 -2
  159. package/dist/components/pagination/components/pagination.prev-button.svelte +4 -11
  160. package/dist/components/pagination/components/pagination.prev-button.svelte.d.ts +1 -2
  161. package/dist/components/pagination/components/pagination.root.svelte +3 -10
  162. package/dist/components/pagination/components/pagination.root.svelte.d.ts +1 -3
  163. package/dist/components/pagination/exports-primitive.d.ts +5 -0
  164. package/dist/components/pagination/exports-primitive.js +5 -0
  165. package/dist/components/pagination/exports.d.ts +1 -0
  166. package/dist/components/pagination/exports.js +1 -0
  167. package/dist/components/pagination/index.d.ts +3 -16
  168. package/dist/components/pagination/index.js +2 -16
  169. package/dist/components/pagination/pagination.stories.svelte +1 -1
  170. package/dist/components/pagination/pagination.svelte +28 -0
  171. package/dist/components/pagination/pagination.svelte.d.ts +3 -0
  172. package/dist/components/pagination/types.d.ts +10 -0
  173. package/dist/components/pagination/types.js +1 -0
  174. package/dist/components/popover/exports-primitive.d.ts +4 -0
  175. package/dist/components/popover/exports-primitive.js +5 -0
  176. package/dist/components/popover/exports.d.ts +1 -0
  177. package/dist/components/popover/exports.js +1 -15
  178. package/dist/components/popover/index.d.ts +2 -0
  179. package/dist/components/popover/index.js +1 -0
  180. package/dist/components/popover/popover.svelte +1 -2
  181. package/dist/components/popover/popover.svelte.d.ts +1 -2
  182. package/dist/components/popover/types.d.ts +1 -1
  183. package/dist/components/segment/components/segment.item.svelte +12 -14
  184. package/dist/components/segment/components/segment.item.svelte.d.ts +1 -6
  185. package/dist/components/segment/components/segment.root.svelte +6 -22
  186. package/dist/components/segment/components/segment.root.svelte.d.ts +1 -10
  187. package/dist/components/segment/exports-primitive.d.ts +2 -0
  188. package/dist/components/segment/exports-primitive.js +2 -0
  189. package/dist/components/segment/index.d.ts +2 -7
  190. package/dist/components/segment/index.js +1 -6
  191. package/dist/components/segment/types.d.ts +14 -0
  192. package/dist/components/segment/types.js +1 -0
  193. package/dist/components/select/components/select.root.svelte +3 -6
  194. package/dist/components/select/components/select.root.svelte.d.ts +1 -3
  195. package/dist/components/select/components/select.trigger.svelte +2 -11
  196. package/dist/components/select/components/select.trigger.svelte.d.ts +1 -7
  197. package/dist/components/select/exports-primitive.d.ts +2 -0
  198. package/dist/components/select/exports-primitive.js +2 -0
  199. package/dist/components/select/index.d.ts +2 -7
  200. package/dist/components/select/index.js +1 -6
  201. package/dist/components/select/select.stories.svelte +3 -3
  202. package/dist/components/select/types.d.ts +9 -0
  203. package/dist/components/select/types.js +2 -0
  204. package/dist/components/separator/exports.d.ts +1 -0
  205. package/dist/components/separator/exports.js +1 -0
  206. package/dist/components/separator/index.d.ts +2 -5
  207. package/dist/components/separator/index.js +1 -4
  208. package/dist/components/separator/separator.svelte +1 -4
  209. package/dist/components/separator/separator.svelte.d.ts +0 -1
  210. package/dist/components/separator/types.d.ts +2 -0
  211. package/dist/components/separator/types.js +1 -0
  212. package/dist/components/skeleton/exports.d.ts +1 -0
  213. package/dist/components/skeleton/exports.js +1 -0
  214. package/dist/components/skeleton/index.d.ts +2 -1
  215. package/dist/components/skeleton/index.js +1 -1
  216. package/dist/components/skeleton/skeleton.svelte +3 -15
  217. package/dist/components/skeleton/skeleton.svelte.d.ts +1 -8
  218. package/dist/components/skeleton/types.d.ts +9 -0
  219. package/dist/components/skeleton/types.js +1 -0
  220. package/dist/components/spinner/exports.d.ts +1 -0
  221. package/dist/components/spinner/exports.js +1 -0
  222. package/dist/components/spinner/index.d.ts +2 -1
  223. package/dist/components/spinner/index.js +1 -1
  224. package/dist/components/spinner/spinner.svelte +3 -13
  225. package/dist/components/spinner/spinner.svelte.d.ts +1 -6
  226. package/dist/components/spinner/types.d.ts +7 -0
  227. package/dist/components/spinner/types.js +1 -0
  228. package/dist/components/switch/components/switch.root.svelte +6 -7
  229. package/dist/components/switch/components/switch.root.svelte.d.ts +2 -4
  230. package/dist/components/switch/components/switch.thumb.svelte +5 -7
  231. package/dist/components/switch/components/switch.thumb.svelte.d.ts +1 -2
  232. package/dist/components/switch/exports-primitive.d.ts +2 -0
  233. package/dist/components/switch/exports-primitive.js +2 -0
  234. package/dist/components/switch/exports.d.ts +1 -0
  235. package/dist/components/switch/exports.js +1 -0
  236. package/dist/components/switch/index.d.ts +4 -10
  237. package/dist/components/switch/index.js +3 -10
  238. package/dist/components/switch/model/index.d.ts +1 -1
  239. package/dist/components/switch/model/index.js +1 -1
  240. package/dist/components/switch/model/switch-controller.svelte.d.ts +11 -0
  241. package/dist/components/switch/model/{switch-model.svelte.js → switch-controller.svelte.js} +1 -4
  242. package/dist/components/switch/switch.stories.svelte +1 -1
  243. package/dist/components/switch/switch.svelte +11 -0
  244. package/dist/components/switch/switch.svelte.d.ts +3 -0
  245. package/dist/components/switch/types.d.ts +5 -0
  246. package/dist/components/switch/types.js +2 -0
  247. package/dist/components/toast/exports.d.ts +1 -0
  248. package/dist/components/toast/exports.js +1 -0
  249. package/dist/components/toast/index.d.ts +2 -1
  250. package/dist/components/toast/index.js +1 -1
  251. package/dist/components/toast/styles.d.ts +152 -0
  252. package/dist/components/toast/styles.js +62 -0
  253. package/dist/components/toast/toast.component.svelte +9 -97
  254. package/dist/components/toast/toast.component.svelte.d.ts +1 -155
  255. package/dist/components/toast/types.d.ts +11 -0
  256. package/dist/components/toast/types.js +1 -0
  257. package/dist/index.d.ts +1 -17
  258. package/dist/index.js +1 -17
  259. package/package.json +1 -1
  260. package/dist/components/pagination/presets/basic.svelte +0 -31
  261. package/dist/components/pagination/presets/basic.svelte.d.ts +0 -5
  262. package/dist/components/pagination/presets/index.d.ts +0 -1
  263. package/dist/components/pagination/presets/index.js +0 -1
  264. package/dist/components/switch/model/switch-model.svelte.d.ts +0 -12
  265. package/dist/components/switch/presets/basic.svelte +0 -14
  266. package/dist/components/switch/presets/basic.svelte.d.ts +0 -5
@@ -18,7 +18,7 @@ export type AnimationDirection = {
18
18
  x: number;
19
19
  y: number;
20
20
  };
21
- export type PopoverProps<TAnimationFn extends AnimationFn> = WithoutChildrenOrChild<PrimitivePopoverRootProps> & Pick<PrimitivePopoverContentProps, 'ref' | 'class' | 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'preventScroll' | 'customAnchor' | 'forceMount'> & {
21
+ export type PopoverProps<TAnimationFn extends AnimationFn = AnimationFn> = WithoutChildrenOrChild<PrimitivePopoverRootProps> & Pick<PrimitivePopoverContentProps, 'ref' | 'class' | 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'preventScroll' | 'customAnchor' | 'forceMount'> & {
22
22
  trigger?: Snippet;
23
23
  children?: Snippet;
24
24
  animationFn?: TAnimationFn;
@@ -1,22 +1,20 @@
1
- <script lang="ts" module>
2
- import type { PrimitiveButtonAttributes } from '../../../internal/types/html-attributes.js';
1
+ <script lang="ts">
3
2
  import { cn, useId } from '../../../internal/utils/common.js';
4
- import { box, mergeProps, type WithChildren, type WithElementRef, type Without } from 'svelte-toolbelt';
3
+ import { box, mergeProps } from 'svelte-toolbelt';
5
4
  import { SegmentStylesContext } from '../styles.js';
5
+ import type { SegmentItemProps } from '../types.js';
6
6
  import { SegmentItemState } from './segmet.svelte.js';
7
7
 
8
- type SegmentItemPropsWithoutHTML = WithElementRef<
9
- WithChildren<{
10
- value: string;
11
- }>
12
- >;
13
-
14
- export type SegmentItemProps = SegmentItemPropsWithoutHTML &
15
- Without<PrimitiveButtonAttributes, SegmentItemPropsWithoutHTML>;
16
- </script>
8
+ const uid = $props.id();
17
9
 
18
- <script lang="ts">
19
- let { value, ref = $bindable(null), id = useId(), children, class: className, ...props }: SegmentItemProps = $props();
10
+ let {
11
+ value,
12
+ ref = $bindable(null),
13
+ id = useId(uid),
14
+ children,
15
+ class: className,
16
+ ...props
17
+ }: SegmentItemProps = $props();
20
18
 
21
19
  const itemState = SegmentItemState.create({
22
20
  value: box.with(() => value),
@@ -1,9 +1,4 @@
1
- import type { PrimitiveButtonAttributes } from '../../../internal/types/html-attributes.js';
2
- import { type WithChildren, type WithElementRef, type Without } from 'svelte-toolbelt';
3
- type SegmentItemPropsWithoutHTML = WithElementRef<WithChildren<{
4
- value: string;
5
- }>>;
6
- export type SegmentItemProps = SegmentItemPropsWithoutHTML & Without<PrimitiveButtonAttributes, SegmentItemPropsWithoutHTML>;
1
+ import type { SegmentItemProps } from '../types.js';
7
2
  declare const Segment: import("svelte").Component<SegmentItemProps, {}, "ref">;
8
3
  type Segment = ReturnType<typeof Segment>;
9
4
  export default Segment;
@@ -1,32 +1,16 @@
1
- <script lang="ts" module>
2
- import type { Without } from '../../../internal/types/common.js';
3
- import type { PrimitiveDivAttributes } from '../../../internal/types/html-attributes.js';
1
+ <script lang="ts">
4
2
  import { cn, useId } from '../../../internal/utils/common.js';
5
- import { box, mergeProps, type WithChildren, type WithElementRef } from 'svelte-toolbelt';
6
- import { SegmentStylesContext, segmentVariants, type SegmentVariantsProps } from '../styles.js';
3
+ import { box, mergeProps } from 'svelte-toolbelt';
4
+ import { SegmentStylesContext, segmentVariants } from '../styles.js';
5
+ import type { SegmentRootProps } from '../types.js';
7
6
  import { SegmentRootState } from './segmet.svelte.js';
8
7
 
9
- type SegmentRootPropsWithouitHTML = WithElementRef<
10
- WithChildren<
11
- {
12
- value?: string;
13
-
14
- onValueChange?: (value: string) => void;
15
-
16
- disabled?: boolean;
17
- } & SegmentVariantsProps
18
- >
19
- >;
8
+ const uid = $props.id();
20
9
 
21
- export type SegmentRootProps = SegmentRootPropsWithouitHTML &
22
- Without<PrimitiveDivAttributes, SegmentRootPropsWithouitHTML>;
23
- </script>
24
-
25
- <script lang="ts">
26
10
  let {
27
11
  value = $bindable(''),
28
12
  ref = $bindable(null),
29
- id = useId(),
13
+ id = useId(uid),
30
14
  disabled = false,
31
15
  children,
32
16
  class: className,
@@ -1,13 +1,4 @@
1
- import type { Without } from '../../../internal/types/common.js';
2
- import type { PrimitiveDivAttributes } from '../../../internal/types/html-attributes.js';
3
- import { type WithChildren, type WithElementRef } from 'svelte-toolbelt';
4
- import { type SegmentVariantsProps } from '../styles.js';
5
- type SegmentRootPropsWithouitHTML = WithElementRef<WithChildren<{
6
- value?: string;
7
- onValueChange?: (value: string) => void;
8
- disabled?: boolean;
9
- } & SegmentVariantsProps>>;
10
- export type SegmentRootProps = SegmentRootPropsWithouitHTML & Without<PrimitiveDivAttributes, SegmentRootPropsWithouitHTML>;
1
+ import type { SegmentRootProps } from '../types.js';
11
2
  declare const Segment: import("svelte").Component<SegmentRootProps, {}, "value" | "ref">;
12
3
  type Segment = ReturnType<typeof Segment>;
13
4
  export default Segment;
@@ -0,0 +1,2 @@
1
+ export { default as Item } from './components/segment.item.svelte';
2
+ export { default as Root } from './components/segment.root.svelte';
@@ -0,0 +1,2 @@
1
+ export { default as Item } from './components/segment.item.svelte';
2
+ export { default as Root } from './components/segment.root.svelte';
@@ -1,7 +1,2 @@
1
- import { type SegmentItemProps } from './components/segment.item.svelte';
2
- import { type SegmentRootProps } from './components/segment.root.svelte';
3
- export declare const SegmentPrimitive: {
4
- Root: import("svelte").Component<SegmentRootProps, {}, "value" | "ref">;
5
- Item: import("svelte").Component<SegmentItemProps, {}, "ref">;
6
- };
7
- export type { SegmentItemProps, SegmentRootProps };
1
+ export * as SegmentPrimitive from './exports-primitive.js';
2
+ export type { SegmentItemProps, SegmentRootProps } from './types.js';
@@ -1,6 +1 @@
1
- import Item, {} from './components/segment.item.svelte';
2
- import Root, {} from './components/segment.root.svelte';
3
- export const SegmentPrimitive = {
4
- Root,
5
- Item,
6
- };
1
+ export * as SegmentPrimitive from './exports-primitive.js';
@@ -0,0 +1,14 @@
1
+ import type { PrimitiveButtonAttributes, PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
2
+ import type { WithChildren, WithElementRef, Without } from 'svelte-toolbelt';
3
+ import type { SegmentVariantsProps } from './styles.js';
4
+ type SegmentRootPropsWithouitHTML = WithElementRef<WithChildren<{
5
+ value?: string;
6
+ onValueChange?: (value: string) => void;
7
+ disabled?: boolean;
8
+ } & SegmentVariantsProps>>;
9
+ export type SegmentRootProps = SegmentRootPropsWithouitHTML & Without<PrimitiveDivAttributes, SegmentRootPropsWithouitHTML>;
10
+ type SegmentItemPropsWithoutHTML = WithElementRef<WithChildren<{
11
+ value: string;
12
+ }>>;
13
+ export type SegmentItemProps = SegmentItemPropsWithoutHTML & Without<PrimitiveButtonAttributes, SegmentItemPropsWithoutHTML>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,13 +1,10 @@
1
- <script lang="ts" module>
2
- export type SelectRootProps = SelectRootPropsPrimitive & SelectVariantsProps;
3
- </script>
4
-
5
1
  <script lang="ts">
6
2
  import { box } from 'svelte-toolbelt';
7
3
 
8
- import { SelectStylesContext, selectVariants, type SelectVariantsProps } from '../styles.js';
4
+ import { SelectStylesContext, selectVariants } from '../styles.js';
9
5
 
10
- import { Select as SelectPrimitive, type SelectRootProps as SelectRootPropsPrimitive } from 'bits-ui';
6
+ import { Select as SelectPrimitive } from 'bits-ui';
7
+ import type { SelectRootProps } from '../types.js';
11
8
 
12
9
  let {
13
10
  value = $bindable(''),
@@ -1,6 +1,4 @@
1
- export type SelectRootProps = SelectRootPropsPrimitive & SelectVariantsProps;
2
- import { type SelectVariantsProps } from '../styles.js';
3
- import { type SelectRootProps as SelectRootPropsPrimitive } from 'bits-ui';
1
+ import type { SelectRootProps } from '../types.js';
4
2
  declare const Select: import("svelte").Component<SelectRootProps, {}, "value" | "open">;
5
3
  type Select = ReturnType<typeof Select>;
6
4
  export default Select;
@@ -1,18 +1,9 @@
1
- <script lang="ts" module>
2
- export type SelectTriggerProps = WithoutChild<SelectTriggerPropsPrimitive> & {
3
- startChevron?: Snippet;
4
-
5
- endChevron?: Snippet;
6
- };
7
- </script>
8
-
9
1
  <script lang="ts">
10
2
  import { getDataActive } from '../../../internal/utils/attrs.js';
11
3
  import { cn, useId } from '../../../internal/utils/common.js';
12
- import { Select as SelectPrimitive, type SelectTriggerProps as SelectTriggerPropsPrimitive } from 'bits-ui';
13
- import type { Snippet } from 'svelte';
14
- import type { WithoutChild } from 'svelte-toolbelt';
4
+ import { Select as SelectPrimitive } from 'bits-ui';
15
5
  import { SelectStylesContext } from '../styles.js';
6
+ import type { SelectTriggerProps } from '../types.js';
16
7
 
17
8
  let {
18
9
  ref = $bindable(null),
@@ -1,10 +1,4 @@
1
- export type SelectTriggerProps = WithoutChild<SelectTriggerPropsPrimitive> & {
2
- startChevron?: Snippet;
3
- endChevron?: Snippet;
4
- };
5
- import { type SelectTriggerProps as SelectTriggerPropsPrimitive } from 'bits-ui';
6
- import type { Snippet } from 'svelte';
7
- import type { WithoutChild } from 'svelte-toolbelt';
1
+ import type { SelectTriggerProps } from '../types.js';
8
2
  declare const Select: import("svelte").Component<SelectTriggerProps, {}, "ref">;
9
3
  type Select = ReturnType<typeof Select>;
10
4
  export default Select;
@@ -0,0 +1,2 @@
1
+ export { default as Root } from './components/select.root.svelte';
2
+ export { default as Trigger } from './components/select.trigger.svelte';
@@ -0,0 +1,2 @@
1
+ export { default as Root } from './components/select.root.svelte';
2
+ export { default as Trigger } from './components/select.trigger.svelte';
@@ -1,7 +1,2 @@
1
- import { type SelectRootProps } from './components/select.root.svelte';
2
- import { type SelectTriggerProps } from './components/select.trigger.svelte';
3
- export declare const SelectPrimitive: {
4
- Root: import("svelte").Component<SelectRootProps, {}, "value" | "open">;
5
- Trigger: import("svelte").Component<SelectTriggerProps, {}, "ref">;
6
- };
7
- export type { SelectRootProps, SelectTriggerProps };
1
+ export * as SelectPrimitive from './exports-primitive.js';
2
+ export type { SelectRootProps, SelectTriggerProps } from './types.js';
@@ -1,6 +1 @@
1
- import Root, {} from './components/select.root.svelte';
2
- import Trigger, {} from './components/select.trigger.svelte';
3
- export const SelectPrimitive = {
4
- Root,
5
- Trigger,
6
- };
1
+ export * as SelectPrimitive from './exports-primitive.js';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" module>
2
- import { ChevronDownIcon } from '../icons/index.js';
2
+ import { Icon } from '../icons/index.js';
3
3
  import { defineMeta } from '@storybook/addon-svelte-csf';
4
4
  import type { Parameters } from '@storybook/sveltekit';
5
5
  import type { ComponentProps } from 'svelte';
@@ -29,11 +29,11 @@
29
29
  </script>
30
30
 
31
31
  {#snippet startChevron()}
32
- <ChevronDownIcon class="cgui:size-4" />
32
+ <Icon.ChevronDown class="cgui:size-4" />
33
33
  {/snippet}
34
34
 
35
35
  {#snippet endChevron()}
36
- <ChevronDownIcon class="cgui:size-4" />
36
+ <Icon.ChevronDown class="cgui:size-4" />
37
37
  {/snippet}
38
38
 
39
39
  <Story name="Basic" {args} {parameters}>
@@ -0,0 +1,9 @@
1
+ import { type SelectRootProps as SelectRootPropsPrimitive, type SelectTriggerProps as SelectTriggerPropsPrimitive } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import type { WithoutChild } from 'svelte-toolbelt';
4
+ import { type SelectVariantsProps } from './styles.js';
5
+ export type SelectRootProps = SelectRootPropsPrimitive & SelectVariantsProps;
6
+ export type SelectTriggerProps = WithoutChild<SelectTriggerPropsPrimitive> & {
7
+ startChevron?: Snippet;
8
+ endChevron?: Snippet;
9
+ };
@@ -0,0 +1,2 @@
1
+ import {} from 'bits-ui';
2
+ import {} from './styles.js';
@@ -0,0 +1 @@
1
+ export { default as Separator } from './separator.svelte';
@@ -0,0 +1 @@
1
+ export { default as Separator } from './separator.svelte';
@@ -1,5 +1,2 @@
1
- import { type SeparatorProps } from './separator.svelte';
2
- export declare const Separator: {
3
- Root: import("svelte").Component<import("bits-ui").SeparatorRootProps, {}, "ref">;
4
- };
5
- export type { SeparatorProps };
1
+ export * from './exports.js';
2
+ export type { SeparatorProps } from './types.js';
@@ -1,4 +1 @@
1
- import Root, {} from './separator.svelte';
2
- export const Separator = {
3
- Root,
4
- };
1
+ export * from './exports.js';
@@ -1,11 +1,8 @@
1
- <script lang="ts" module>
2
- export type SeparatorProps = SeparatorPrimitive.RootProps;
3
- </script>
4
-
5
1
  <script lang="ts">
6
2
  import { SLOT_ATTR_NAME } from '../../internal/constants/attrs.js';
7
3
  import { cn } from '../../internal/utils/common.js';
8
4
  import { Separator as SeparatorPrimitive } from 'bits-ui';
5
+ import type { SeparatorProps } from './types.js';
9
6
 
10
7
  let { ref = $bindable(null), class: className, ...restProps }: SeparatorProps = $props();
11
8
  </script>
@@ -1,4 +1,3 @@
1
- export type SeparatorProps = SeparatorPrimitive.RootProps;
2
1
  import { Separator as SeparatorPrimitive } from 'bits-ui';
3
2
  declare const Separator: import("svelte").Component<SeparatorPrimitive.RootProps, {}, "ref">;
4
3
  type Separator = ReturnType<typeof Separator>;
@@ -0,0 +1,2 @@
1
+ import { type SeparatorRootProps as SeparatorRootPropsPrimitive } from 'bits-ui';
2
+ export type SeparatorProps = SeparatorRootPropsPrimitive;
@@ -0,0 +1 @@
1
+ import {} from 'bits-ui';
@@ -0,0 +1 @@
1
+ export { default as Skeleton } from './skeleton.svelte';
@@ -0,0 +1 @@
1
+ export { default as Skeleton } from './skeleton.svelte';
@@ -1 +1,2 @@
1
- export { default as Skeleton, type SkeletonProps } from './skeleton.svelte';
1
+ export * from './exports.js';
2
+ export type { SkeletonProps } from './types.js';
@@ -1 +1 @@
1
- export { default as Skeleton } from './skeleton.svelte';
1
+ export * from './exports.js';
@@ -1,20 +1,8 @@
1
- <script lang="ts" module>
2
- import type { PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
1
+ <script lang="ts">
3
2
  import { cn } from '../../internal/utils/common.js';
4
- import type { WithElementRef, Without } from 'svelte-toolbelt';
5
- import { skeletonStyles, type SkeletonVariantProps } from './styles.js';
6
-
7
- type SkeletonPropsWithoutHTML = WithElementRef<{
8
- count?: number;
9
-
10
- as?: keyof HTMLElementTagNameMap;
11
- }> &
12
- SkeletonVariantProps;
3
+ import { skeletonStyles } from './styles.js';
4
+ import type { SkeletonProps } from './types.js';
13
5
 
14
- export type SkeletonProps = SkeletonPropsWithoutHTML & Without<PrimitiveDivAttributes, SkeletonPropsWithoutHTML>;
15
- </script>
16
-
17
- <script lang="ts">
18
6
  let {
19
7
  ref = $bindable(null),
20
8
  class: className,
@@ -1,11 +1,4 @@
1
- import type { PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
2
- import type { WithElementRef, Without } from 'svelte-toolbelt';
3
- import { type SkeletonVariantProps } from './styles.js';
4
- type SkeletonPropsWithoutHTML = WithElementRef<{
5
- count?: number;
6
- as?: keyof HTMLElementTagNameMap;
7
- }> & SkeletonVariantProps;
8
- export type SkeletonProps = SkeletonPropsWithoutHTML & Without<PrimitiveDivAttributes, SkeletonPropsWithoutHTML>;
1
+ import type { SkeletonProps } from './types.js';
9
2
  declare const Skeleton: import("svelte").Component<SkeletonProps, {}, "ref">;
10
3
  type Skeleton = ReturnType<typeof Skeleton>;
11
4
  export default Skeleton;
@@ -0,0 +1,9 @@
1
+ import type { PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
2
+ import type { WithElementRef, Without } from 'svelte-toolbelt';
3
+ import type { SkeletonVariantProps } from './styles.js';
4
+ type SkeletonPropsWithoutHTML = WithElementRef<{
5
+ count?: number;
6
+ as?: keyof HTMLElementTagNameMap;
7
+ }> & SkeletonVariantProps;
8
+ export type SkeletonProps = SkeletonPropsWithoutHTML & Without<PrimitiveDivAttributes, SkeletonPropsWithoutHTML>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as Spinner } from './spinner.svelte';
@@ -0,0 +1 @@
1
+ export { default as Spinner } from './spinner.svelte';
@@ -1 +1,2 @@
1
- export { default as Spinner, type SpinnerProps } from './spinner.svelte';
1
+ export * from './exports.js';
2
+ export type { SpinnerProps } from './types.js';
@@ -1 +1 @@
1
- export { default as Spinner } from './spinner.svelte';
1
+ export * from './exports.js';
@@ -1,22 +1,12 @@
1
- <script lang="ts" module>
2
- type SpinnerPropsWithoutHTML = {
3
- size?: number;
4
- };
5
-
6
- export type SpinnerProps = SpinnerPropsWithoutHTML &
7
- Without<Omit<PrimitiveSVGAttributes, 'width' | 'height'>, SpinnerPropsWithoutHTML>;
8
- </script>
9
-
10
1
  <script lang="ts">
11
- import type { PrimitiveSVGAttributes } from '../../internal/types/html-attributes.js';
12
2
  import { cn } from '../../internal/utils/common.js';
13
- import type { Without } from 'bits-ui';
14
- import { SpinnerIcon } from '../icons/index.js';
3
+ import { Icon } from '../icons/index.js';
4
+ import type { SpinnerProps } from './types.js';
15
5
 
16
6
  let { class: className, size = 24, ...restProps }: SpinnerProps = $props();
17
7
  </script>
18
8
 
19
- <SpinnerIcon
9
+ <Icon.Spinner
20
10
  class={cn('cgui:animate-spin cgui:text-icon-default', className)}
21
11
  width={size}
22
12
  height={size}
@@ -1,9 +1,4 @@
1
- type SpinnerPropsWithoutHTML = {
2
- size?: number;
3
- };
4
- export type SpinnerProps = SpinnerPropsWithoutHTML & Without<Omit<PrimitiveSVGAttributes, 'width' | 'height'>, SpinnerPropsWithoutHTML>;
5
- import type { PrimitiveSVGAttributes } from '../../internal/types/html-attributes.js';
6
- import type { Without } from 'bits-ui';
1
+ import type { SpinnerProps } from './types.js';
7
2
  declare const Spinner: import("svelte").Component<SpinnerProps, {}, "">;
8
3
  type Spinner = ReturnType<typeof Spinner>;
9
4
  export default Spinner;
@@ -0,0 +1,7 @@
1
+ import type { PrimitiveSVGAttributes } from '../../internal/types/html-attributes.js';
2
+ import type { Without } from 'svelte-toolbelt';
3
+ type SpinnerPropsWithoutHTML = {
4
+ size?: number;
5
+ };
6
+ export type SpinnerProps = SpinnerPropsWithoutHTML & Without<Omit<PrimitiveSVGAttributes, 'width' | 'height'>, SpinnerPropsWithoutHTML>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,17 +1,16 @@
1
- <script lang="ts" module>
2
- export type SwitchRootProps = SwitchRootPropsPrimitive & SwitchVariantsProps;
3
- </script>
4
-
5
1
  <script lang="ts">
6
2
  import { box } from 'svelte-toolbelt';
7
3
 
8
- import { SwitchStylesContext, switchVariants, type SwitchVariantsProps } from '../styles.js';
4
+ import { SwitchStylesContext, switchVariants } from '../styles.js';
9
5
 
10
6
  import { cn, useId } from '../../../internal/utils/common.js';
11
- import { Switch as SwitchPrimitive, type SwitchRootProps as SwitchRootPropsPrimitive } from 'bits-ui';
7
+ import { Switch as SwitchPrimitive } from 'bits-ui';
8
+ import type { SwitchRootProps } from '../types.js';
9
+
10
+ const uid = $props.id();
12
11
 
13
12
  let {
14
- id = useId(),
13
+ id = useId(uid),
15
14
  ref = $bindable(null),
16
15
  checked = $bindable(false),
17
16
  size = 'md',
@@ -1,6 +1,4 @@
1
- export type SwitchRootProps = SwitchRootPropsPrimitive & SwitchVariantsProps;
2
- import { type SwitchVariantsProps } from '../styles.js';
3
- import { type SwitchRootProps as SwitchRootPropsPrimitive } from 'bits-ui';
4
- declare const Switch: import("svelte").Component<SwitchRootProps, {}, "ref" | "checked">;
1
+ import type { SwitchRootProps } from '../types.js';
2
+ declare const Switch: import("svelte").Component<SwitchRootProps, {}, "checked" | "ref">;
5
3
  type Switch = ReturnType<typeof Switch>;
6
4
  export default Switch;
@@ -1,15 +1,13 @@
1
- <script lang="ts" module>
2
- export type SwitchThumbProps = SwitchThumbPropsPrimitive;
3
- </script>
4
-
5
1
  <script lang="ts">
6
2
  import { cn, useId } from '../../../internal/utils/common.js';
7
-
8
3
  import { SwitchStylesContext } from '../styles.js';
4
+ import type { SwitchThumbProps } from '../types.js';
5
+
6
+ import { Switch as SwitchPrimitive } from 'bits-ui';
9
7
 
10
- import { Switch as SwitchPrimitive, type SwitchThumbProps as SwitchThumbPropsPrimitive } from 'bits-ui';
8
+ const uid = $props.id();
11
9
 
12
- let { ref = $bindable(null), id = useId(), class: className, ...props }: SwitchThumbProps = $props();
10
+ let { ref = $bindable(null), id = useId(uid), class: className, ...props }: SwitchThumbProps = $props();
13
11
 
14
12
  const styles = SwitchStylesContext.get();
15
13
  </script>
@@ -1,5 +1,4 @@
1
- export type SwitchThumbProps = SwitchThumbPropsPrimitive;
2
- import { Switch as SwitchPrimitive, type SwitchThumbProps as SwitchThumbPropsPrimitive } from 'bits-ui';
1
+ import { Switch as SwitchPrimitive } from 'bits-ui';
3
2
  declare const Switch: import("svelte").Component<SwitchPrimitive.ThumbProps, {}, "ref">;
4
3
  type Switch = ReturnType<typeof Switch>;
5
4
  export default Switch;
@@ -0,0 +1,2 @@
1
+ export { default as Root } from './components/switch.root.svelte';
2
+ export { default as Thumb } from './components/switch.thumb.svelte';
@@ -0,0 +1,2 @@
1
+ export { default as Root } from './components/switch.root.svelte';
2
+ export { default as Thumb } from './components/switch.thumb.svelte';
@@ -0,0 +1 @@
1
+ export { default as Switch } from './switch.svelte';
@@ -0,0 +1 @@
1
+ export { default as Switch } from './switch.svelte';
@@ -1,10 +1,4 @@
1
- import { type SwitchRootProps } from './components/switch.root.svelte';
2
- import { type SwitchThumbProps } from './components/switch.thumb.svelte';
3
- export declare const SwitchPrimitive: {
4
- Root: import("svelte").Component<SwitchRootProps, {}, "ref" | "checked">;
5
- Thumb: import("svelte").Component<import("bits-ui").SwitchThumbProps, {}, "ref">;
6
- };
7
- export declare const Switch: {
8
- Basic: import("svelte").Component<SwitchRootProps, {}, "ref" | "checked">;
9
- };
10
- export type { SwitchRootProps, SwitchThumbProps };
1
+ export * as SwitchPrimitive from './exports-primitive.js';
2
+ export * from './exports.js';
3
+ export { SwitchController } from './model/index.js';
4
+ export type { SwitchProps, SwitchRootProps, SwitchThumbProps } from './types.js';
@@ -1,10 +1,3 @@
1
- import Root, {} from './components/switch.root.svelte';
2
- import Thumb, {} from './components/switch.thumb.svelte';
3
- import Basic from './presets/basic.svelte';
4
- export const SwitchPrimitive = {
5
- Root,
6
- Thumb,
7
- };
8
- export const Switch = {
9
- Basic,
10
- };
1
+ export * as SwitchPrimitive from './exports-primitive.js';
2
+ export * from './exports.js';
3
+ export { SwitchController } from './model/index.js';
@@ -1 +1 @@
1
- export { SwitchModel, useSwitchModel } from './switch-model.svelte.js';
1
+ export { SwitchController } from './switch-controller.svelte.js';
@@ -1 +1 @@
1
- export { SwitchModel, useSwitchModel } from './switch-model.svelte.js';
1
+ export { SwitchController } from './switch-controller.svelte.js';
@@ -0,0 +1,11 @@
1
+ type SwitchControllerOpts = {
2
+ defaultChecked?: boolean;
3
+ onCheckedChange?: (checked: boolean) => void;
4
+ };
5
+ export declare class SwitchController {
6
+ #private;
7
+ constructor(opts?: SwitchControllerOpts);
8
+ get checked(): boolean;
9
+ set checked(value: boolean);
10
+ }
11
+ export {};