@casinogate/ui 1.3.2 → 1.3.4
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/app-shell/components/app-shell.content.svelte +0 -2
- package/dist/components/field/field.svelte +12 -14
- package/dist/components/field/field.svelte.d.ts +2 -12
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/field/types.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
export type FieldProps = WithoutChildrenOrChild<FieldRootProps> & {
|
|
5
|
-
label?: string | Snippet;
|
|
6
|
-
error?: string | Snippet;
|
|
7
|
-
description?: string | Snippet;
|
|
8
|
-
children?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
9
|
-
};
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
1
|
<script lang="ts">
|
|
13
2
|
import type { WithoutChildrenOrChild } from 'svelte-toolbelt';
|
|
14
3
|
import FieldControl from './components/field.control.svelte';
|
|
15
4
|
import FieldDescription from './components/field.description.svelte';
|
|
16
5
|
import FieldError from './components/field.error.svelte';
|
|
17
6
|
import FieldLabel from './components/field.label.svelte';
|
|
18
|
-
import FieldRoot
|
|
7
|
+
import FieldRoot from './components/field.root.svelte';
|
|
8
|
+
|
|
9
|
+
import type { FieldProps } from './types.js';
|
|
19
10
|
|
|
20
|
-
let {
|
|
11
|
+
let {
|
|
12
|
+
label,
|
|
13
|
+
error,
|
|
14
|
+
description,
|
|
15
|
+
ref = $bindable(null),
|
|
16
|
+
children: childrenSnippet,
|
|
17
|
+
...restProps
|
|
18
|
+
}: FieldProps = $props();
|
|
21
19
|
</script>
|
|
22
20
|
|
|
23
21
|
<FieldRoot bind:ref {...restProps}>
|
|
@@ -29,7 +27,7 @@
|
|
|
29
27
|
|
|
30
28
|
<FieldControl>
|
|
31
29
|
{#snippet children({ props })}
|
|
32
|
-
{@render
|
|
30
|
+
{@render childrenSnippet?.({ props })}
|
|
33
31
|
{/snippet}
|
|
34
32
|
</FieldControl>
|
|
35
33
|
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
label?: string | Snippet;
|
|
4
|
-
error?: string | Snippet;
|
|
5
|
-
description?: string | Snippet;
|
|
6
|
-
children?: Snippet<[{
|
|
7
|
-
props: Record<string, unknown>;
|
|
8
|
-
}]>;
|
|
9
|
-
};
|
|
10
|
-
import type { WithoutChildrenOrChild } from 'svelte-toolbelt';
|
|
11
|
-
import { type FieldRootProps } from './components/field.root.svelte';
|
|
12
|
-
declare const Field: import("svelte").Component<any, {}, "ref">;
|
|
1
|
+
import type { FieldProps } from './types.js';
|
|
2
|
+
declare const Field: import("svelte").Component<FieldProps, {}, "ref">;
|
|
13
3
|
type Field = ReturnType<typeof Field>;
|
|
14
4
|
export default Field;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * as FieldPrimitive from './exports-primitive.js';
|
|
2
2
|
export * from './exports.js';
|
|
3
|
-
export type { FieldControlProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldRootProps, } from './types.js';
|
|
3
|
+
export type { FieldControlProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldProps, FieldRootProps, } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PrimitiveDivAttributes, PrimitiveLabelAttributes, PrimitiveSpanAttributes } from '../../internal/types/html-attributes.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { WithChild, WithElementRef, Without } from 'svelte-toolbelt';
|
|
3
|
+
import type { WithChild, WithElementRef, Without, WithoutChildrenOrChild } from 'svelte-toolbelt';
|
|
4
4
|
type FieldRootPropsWithoutHTML = WithElementRef<WithChild<{
|
|
5
5
|
invalid?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -20,4 +20,12 @@ type FieldErrorPropsWithoutHTML = WithElementRef<WithChild<{}>>;
|
|
|
20
20
|
export type FieldErrorProps = FieldErrorPropsWithoutHTML & Without<PrimitiveSpanAttributes, FieldErrorPropsWithoutHTML>;
|
|
21
21
|
type FieldLabelPropsWithoutHTML = WithElementRef<WithChild<{}>>;
|
|
22
22
|
export type FieldLabelProps = FieldLabelPropsWithoutHTML & Without<PrimitiveLabelAttributes, FieldLabelPropsWithoutHTML>;
|
|
23
|
+
export type FieldProps = WithoutChildrenOrChild<FieldRootProps> & {
|
|
24
|
+
label?: string | Snippet;
|
|
25
|
+
error?: string | Snippet;
|
|
26
|
+
description?: string | Snippet;
|
|
27
|
+
children?: Snippet<[{
|
|
28
|
+
props: Record<string, unknown>;
|
|
29
|
+
}]>;
|
|
30
|
+
};
|
|
23
31
|
export {};
|