@spaethtech/svelte-ui 0.3.1-dev.7.3dc4fbb → 0.3.1-dev.8.7f749c3
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.
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Border + radius come from the shared tint tokens (the same scheme Input/DataTable use, so surfaces
|
|
8
8
|
* match): the OUTER frame is the variant token at `--ui-tint-border` (rest) / `--ui-tint-border-hover`
|
|
9
|
-
* (hover) — one calc for every variant, no `secondary` special case —
|
|
10
|
-
* separators
|
|
9
|
+
* (hover) — one calc for every variant, no `secondary` special case — and the inset Header/Footer
|
|
10
|
+
* separators use that SAME rest calc, so the divider always matches the frame. `variant` sets the
|
|
11
|
+
* border colour; `size` the padding.
|
|
11
12
|
*
|
|
12
13
|
* Background comes from `--ui-color-background` so the card reads as a raised panel over the page
|
|
13
14
|
* body (matches Input, Dialog, tooltip surface tokens). Themes remap this token to their own
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
} & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
|
|
31
31
|
|
|
32
32
|
const space: Record<Size, string> = { sm: "pt-2 mt-2", md: "pt-3 mt-3", lg: "pt-4 mt-4" };
|
|
33
|
-
//
|
|
33
|
+
// The separator matches the Card frame EXACTLY: the shared tint calc for every variant
|
|
34
|
+
// (variantToken at --ui-tint-border), identical to Card.svelte's border. (Previously the
|
|
35
|
+
// `secondary` default used the softer `--ui-border-color` (30%), which read visibly lighter than
|
|
36
|
+
// the frame and than in-card fields like Input/TextArea.)
|
|
34
37
|
const sepColor = $derived(
|
|
35
|
-
variant
|
|
36
|
-
? "var(--ui-border-color)"
|
|
37
|
-
: `color-mix(in srgb, var(${variantToken[variant]}) var(--ui-tint-border), transparent)`,
|
|
38
|
+
`color-mix(in srgb, var(${variantToken[variant]}) var(--ui-tint-border), transparent)`,
|
|
38
39
|
);
|
|
39
40
|
</script>
|
|
40
41
|
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
} & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
|
|
31
31
|
|
|
32
32
|
const space: Record<Size, string> = { sm: "pb-2 mb-2", md: "pb-3 mb-3", lg: "pb-4 mb-4" };
|
|
33
|
-
//
|
|
33
|
+
// The separator matches the Card frame EXACTLY: the shared tint calc for every variant
|
|
34
|
+
// (variantToken at --ui-tint-border), identical to Card.svelte's border. (Previously the
|
|
35
|
+
// `secondary` default used the softer `--ui-border-color` (30%), which read visibly lighter than
|
|
36
|
+
// the frame and than in-card fields like Input/TextArea.)
|
|
34
37
|
const sepColor = $derived(
|
|
35
|
-
variant
|
|
36
|
-
? "var(--ui-border-color)"
|
|
37
|
-
: `color-mix(in srgb, var(${variantToken[variant]}) var(--ui-tint-border), transparent)`,
|
|
38
|
+
`color-mix(in srgb, var(${variantToken[variant]}) var(--ui-tint-border), transparent)`,
|
|
38
39
|
);
|
|
39
40
|
</script>
|
|
40
41
|
|