@casinogate/ui 1.1.1 → 1.1.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.
- package/dist/assets/css/root.css +5 -13
- package/dist/components/field/components/field.svelte.js +10 -5
- package/dist/components/field/field.svelte +2 -2
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input.password.svelte +7 -2
- package/dist/components/input/input.password.svelte.d.ts +1 -1
- package/dist/components/input/input.svelte +2 -0
- package/dist/components/input/input.svelte.d.ts +1 -1
- package/package.json +1 -1
package/dist/assets/css/root.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -130,9 +130,7 @@
|
|
|
130
130
|
::placeholder {
|
|
131
131
|
color: currentcolor;
|
|
132
132
|
@supports (color: color-mix(in lab, red, red)) {
|
|
133
|
-
|
|
134
|
-
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
135
|
-
}
|
|
133
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
136
134
|
}
|
|
137
135
|
}
|
|
138
136
|
}
|
|
@@ -564,9 +562,7 @@
|
|
|
564
562
|
.cgui\:bg-neutral-40\/50 {
|
|
565
563
|
background-color: var(--cg-ui-palette-neutral-40);
|
|
566
564
|
@supports (color: color-mix(in lab, red, red)) {
|
|
567
|
-
|
|
568
|
-
background-color: color-mix(in oklab, var(--cg-ui-palette-neutral-40) 50%, transparent);
|
|
569
|
-
}
|
|
565
|
+
background-color: color-mix(in oklab, var(--cg-ui-palette-neutral-40) 50%, transparent);
|
|
570
566
|
}
|
|
571
567
|
}
|
|
572
568
|
.cgui\:bg-primary-10 {
|
|
@@ -609,18 +605,14 @@
|
|
|
609
605
|
.cgui\:from-neutral-40\/30 {
|
|
610
606
|
--tw-gradient-from: var(--cg-ui-palette-neutral-40);
|
|
611
607
|
@supports (color: color-mix(in lab, red, red)) {
|
|
612
|
-
|
|
613
|
-
--tw-gradient-from: color-mix(in oklab, var(--cg-ui-palette-neutral-40) 30%, transparent);
|
|
614
|
-
}
|
|
608
|
+
--tw-gradient-from: color-mix(in oklab, var(--cg-ui-palette-neutral-40) 30%, transparent);
|
|
615
609
|
}
|
|
616
610
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
617
611
|
}
|
|
618
612
|
.cgui\:to-neutral-10\/0 {
|
|
619
613
|
--tw-gradient-to: var(--cg-ui-palette-neutral-10);
|
|
620
614
|
@supports (color: color-mix(in lab, red, red)) {
|
|
621
|
-
|
|
622
|
-
--tw-gradient-to: color-mix(in oklab, var(--cg-ui-palette-neutral-10) 0%, transparent);
|
|
623
|
-
}
|
|
615
|
+
--tw-gradient-to: color-mix(in oklab, var(--cg-ui-palette-neutral-10) 0%, transparent);
|
|
624
616
|
}
|
|
625
617
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
626
618
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
|
|
2
2
|
import { getDataActive, getDataDisabled } from '../../../internal/utils/attrs.js';
|
|
3
3
|
import { Context } from 'runed';
|
|
4
|
+
import { untrack } from 'svelte';
|
|
4
5
|
import { attachRef } from 'svelte-toolbelt';
|
|
5
6
|
const SLOT_ATTR_VALUES = {
|
|
6
7
|
root: 'field-root',
|
|
@@ -21,7 +22,9 @@ export class FieldRootState {
|
|
|
21
22
|
this.attachment = attachRef(opts.ref);
|
|
22
23
|
}
|
|
23
24
|
setId(key, id) {
|
|
24
|
-
|
|
25
|
+
untrack(() => {
|
|
26
|
+
this.#ids = { ...this.#ids, [key]: id };
|
|
27
|
+
});
|
|
25
28
|
}
|
|
26
29
|
getId(key) {
|
|
27
30
|
return this.#ids[key];
|
|
@@ -47,7 +50,8 @@ export class FieldLabelState {
|
|
|
47
50
|
this.opts = opts;
|
|
48
51
|
this.root = root;
|
|
49
52
|
this.attachment = attachRef(opts.ref);
|
|
50
|
-
|
|
53
|
+
this.root.setId('label', this.opts.id.current);
|
|
54
|
+
$effect(() => {
|
|
51
55
|
this.root.setId('label', this.opts.id.current);
|
|
52
56
|
});
|
|
53
57
|
}
|
|
@@ -70,7 +74,8 @@ export class FieldErrorState {
|
|
|
70
74
|
this.opts = opts;
|
|
71
75
|
this.root = root;
|
|
72
76
|
this.attachment = attachRef(opts.ref);
|
|
73
|
-
|
|
77
|
+
this.root.setId('error', this.opts.id.current);
|
|
78
|
+
$effect(() => {
|
|
74
79
|
this.root.setId('error', this.opts.id.current);
|
|
75
80
|
});
|
|
76
81
|
}
|
|
@@ -91,7 +96,7 @@ export class FieldDescriptionState {
|
|
|
91
96
|
this.opts = opts;
|
|
92
97
|
this.root = root;
|
|
93
98
|
this.attachment = attachRef(opts.ref);
|
|
94
|
-
$effect
|
|
99
|
+
$effect(() => {
|
|
95
100
|
this.root.setId('description', this.opts.id.current);
|
|
96
101
|
});
|
|
97
102
|
}
|
|
@@ -110,7 +115,7 @@ export class FieldControlState {
|
|
|
110
115
|
constructor(opts, root) {
|
|
111
116
|
this.opts = opts;
|
|
112
117
|
this.root = root;
|
|
113
|
-
$effect
|
|
118
|
+
$effect(() => {
|
|
114
119
|
this.root.setId('control', this.opts.id.current);
|
|
115
120
|
});
|
|
116
121
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import FieldLabel from './components/field.label.svelte';
|
|
18
18
|
import FieldRoot, { type FieldRootProps } from './components/field.root.svelte';
|
|
19
19
|
|
|
20
|
-
let { label, error, description, ref = $bindable(null), children, ...restProps }: FieldProps = $props();
|
|
20
|
+
let { label, error, description, ref = $bindable(null), children: childrenSlot, ...restProps }: FieldProps = $props();
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<FieldRoot bind:ref {...restProps}>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<FieldControl>
|
|
31
31
|
{#snippet children({ props })}
|
|
32
|
-
{@render
|
|
32
|
+
{@render childrenSlot?.({ props })}
|
|
33
33
|
{/snippet}
|
|
34
34
|
</FieldControl>
|
|
35
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InputPasswordProps } from './input.password.svelte';
|
|
2
2
|
import { type InputProps } from './input.svelte';
|
|
3
|
-
export declare const Input: import("svelte").Component<InputProps, {}, "ref"> & {
|
|
4
|
-
|
|
3
|
+
export declare const Input: import("svelte").Component<InputProps, {}, "value" | "ref"> & {
|
|
4
|
+
Password: import("svelte").Component<InputPasswordProps, {}, "value" | "ref" | "showPassword">;
|
|
5
5
|
};
|
|
6
6
|
export type { InputPasswordProps, InputProps };
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
import { cn } from '../../internal/utils/common.js';
|
|
11
11
|
import Input, { type InputProps } from './input.svelte';
|
|
12
12
|
|
|
13
|
-
let {
|
|
13
|
+
let {
|
|
14
|
+
ref = $bindable(null),
|
|
15
|
+
showPassword = $bindable(false),
|
|
16
|
+
value = $bindable(''),
|
|
17
|
+
...restProps
|
|
18
|
+
}: InputPasswordProps = $props();
|
|
14
19
|
|
|
15
20
|
const type = $derived(showPassword ? 'text' : 'password');
|
|
16
21
|
|
|
@@ -19,7 +24,7 @@
|
|
|
19
24
|
}
|
|
20
25
|
</script>
|
|
21
26
|
|
|
22
|
-
<Input bind:ref {type} {...restProps}>
|
|
27
|
+
<Input bind:ref bind:value {type} {...restProps}>
|
|
23
28
|
{#snippet endChevron()}
|
|
24
29
|
<button
|
|
25
30
|
onclick={togglePassword}
|
|
@@ -2,6 +2,6 @@ export type InputPasswordProps = Omit<InputProps, 'endChevron' | 'type'> & {
|
|
|
2
2
|
showPassword?: boolean;
|
|
3
3
|
};
|
|
4
4
|
import Input, { type InputProps } from './input.svelte';
|
|
5
|
-
declare const Input: import("svelte").Component<InputPasswordProps, {}, "ref" | "showPassword">;
|
|
5
|
+
declare const Input: import("svelte").Component<InputPasswordProps, {}, "value" | "ref" | "showPassword">;
|
|
6
6
|
type Input = ReturnType<typeof Input>;
|
|
7
7
|
export default Input;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
let {
|
|
22
22
|
ref = $bindable(null),
|
|
23
23
|
id = useId(),
|
|
24
|
+
value = $bindable(''),
|
|
24
25
|
class: className,
|
|
25
26
|
startChevron,
|
|
26
27
|
endChevron,
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
<input
|
|
48
49
|
{id}
|
|
49
50
|
bind:this={ref}
|
|
51
|
+
bind:value
|
|
50
52
|
data-start-chevron={getDataActive(Boolean(startChevron))}
|
|
51
53
|
data-end-chevron={getDataActive(Boolean(endChevron))}
|
|
52
54
|
data-slot="input"
|
|
@@ -7,6 +7,6 @@ type InputPropsWithoutHTML = WithElementRef<{
|
|
|
7
7
|
endChevron?: Snippet;
|
|
8
8
|
}> & InputVariants;
|
|
9
9
|
export type InputProps = InputPropsWithoutHTML & Without<PrimitiveInputAttributes, InputPropsWithoutHTML>;
|
|
10
|
-
declare const Input: import("svelte").Component<InputProps, {}, "ref">;
|
|
10
|
+
declare const Input: import("svelte").Component<InputProps, {}, "value" | "ref">;
|
|
11
11
|
type Input = ReturnType<typeof Input>;
|
|
12
12
|
export default Input;
|