@casinogate/ui 1.1.0 → 1.1.1
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.
- package/dist/components/skeleton/skeleton.stories.svelte +9 -1
- package/dist/components/skeleton/skeleton.svelte +8 -2
- package/dist/components/skeleton/skeleton.svelte.d.ts +3 -1
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
const parameters: Parameters = {
|
|
8
8
|
controls: {
|
|
9
|
-
include: ['rounded', 'w', 'variant'],
|
|
9
|
+
include: ['rounded', 'w', 'variant', 'count'],
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
{parameters}
|
|
55
55
|
/>
|
|
56
56
|
|
|
57
|
+
<Story name="Count" {args} {parameters}>
|
|
58
|
+
{#snippet template(args: Args)}
|
|
59
|
+
<div class="cgui:flex cgui:gap-2.5">
|
|
60
|
+
<Skeleton {...args} class="cgui:h-11" w="full" count={3} />
|
|
61
|
+
</div>
|
|
62
|
+
{/snippet}
|
|
63
|
+
</Story>
|
|
64
|
+
|
|
57
65
|
<Story
|
|
58
66
|
name="Avatar"
|
|
59
67
|
args={{
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
import type { WithElementRef, Without } from 'svelte-toolbelt';
|
|
5
5
|
import { skeletonStyles, type SkeletonVariantProps } from './styles.js';
|
|
6
6
|
|
|
7
|
-
type SkeletonPropsWithoutHTML = WithElementRef<{
|
|
7
|
+
type SkeletonPropsWithoutHTML = WithElementRef<{
|
|
8
|
+
count?: number;
|
|
9
|
+
}> &
|
|
10
|
+
SkeletonVariantProps;
|
|
8
11
|
|
|
9
12
|
export type SkeletonProps = SkeletonPropsWithoutHTML & Without<PrimitiveDivAttributes, SkeletonPropsWithoutHTML>;
|
|
10
13
|
</script>
|
|
@@ -16,10 +19,13 @@
|
|
|
16
19
|
w = 'clear',
|
|
17
20
|
rounded = 'md',
|
|
18
21
|
variant = 'clear',
|
|
22
|
+
count = 1,
|
|
19
23
|
...restProps
|
|
20
24
|
}: SkeletonProps = $props();
|
|
21
25
|
|
|
22
26
|
const variants = $derived(skeletonStyles({ w, rounded, variant }));
|
|
23
27
|
</script>
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
{#each Array.from({ length: count }) as i (i)}
|
|
30
|
+
<div class={cn(variants, className)} {...restProps}></div>
|
|
31
|
+
{/each}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
|
|
2
2
|
import type { WithElementRef, Without } from 'svelte-toolbelt';
|
|
3
3
|
import { type SkeletonVariantProps } from './styles.js';
|
|
4
|
-
type SkeletonPropsWithoutHTML = WithElementRef<{
|
|
4
|
+
type SkeletonPropsWithoutHTML = WithElementRef<{
|
|
5
|
+
count?: number;
|
|
6
|
+
}> & SkeletonVariantProps;
|
|
5
7
|
export type SkeletonProps = SkeletonPropsWithoutHTML & Without<PrimitiveDivAttributes, SkeletonPropsWithoutHTML>;
|
|
6
8
|
declare const Skeleton: import("svelte").Component<SkeletonProps, {}, "ref">;
|
|
7
9
|
type Skeleton = ReturnType<typeof Skeleton>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,7 @@ export * from './components/segment/index.js';
|
|
|
8
8
|
export * from './components/icons/index.js';
|
|
9
9
|
export * from './components/input/index.js';
|
|
10
10
|
export * from './components/spinner/index.js';
|
|
11
|
+
export * from './components/button-group/index.js';
|
|
12
|
+
export * from './components/skeleton/index.js';
|
|
13
|
+
export * from './components/field/index.js';
|
|
14
|
+
export * from './components/separator/index.js';
|
package/dist/index.js
CHANGED
|
@@ -8,3 +8,7 @@ export * from './components/segment/index.js';
|
|
|
8
8
|
export * from './components/icons/index.js';
|
|
9
9
|
export * from './components/input/index.js';
|
|
10
10
|
export * from './components/spinner/index.js';
|
|
11
|
+
export * from './components/button-group/index.js';
|
|
12
|
+
export * from './components/skeleton/index.js';
|
|
13
|
+
export * from './components/field/index.js';
|
|
14
|
+
export * from './components/separator/index.js';
|