@streamscloud/kit 0.9.9 → 0.9.11
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/ui/listing-card/cmp.listing-card.svelte +0 -5
- package/dist/ui/listing-card/cmp.listing-card.svelte.d.ts +1 -1
- package/dist/ui/navigation/cmp.nav-menu-header.svelte +44 -5
- package/dist/ui/navigation/cmp.nav-menu-header.svelte.d.ts +15 -2
- package/dist/ui/navigation/cmp.nav-menu-item.svelte +3 -7
- package/dist/ui/navigation/cmp.nav-menu-item.svelte.d.ts +1 -1
- package/dist/ui/navigation/cmp.nav-rail-item.svelte +2 -6
- package/dist/ui/navigation/cmp.nav-rail-item.svelte.d.ts +1 -1
- package/package.json +1 -1
|
@@ -103,11 +103,6 @@ card a click target without nesting `<button>` elements with the action snippet.
|
|
|
103
103
|
overflow: hidden;
|
|
104
104
|
pointer-events: none;
|
|
105
105
|
}
|
|
106
|
-
.listing-card__preview :global(img),
|
|
107
|
-
.listing-card__preview :global(svg) {
|
|
108
|
-
max-width: 100%;
|
|
109
|
-
max-height: 100%;
|
|
110
|
-
}
|
|
111
106
|
.listing-card__body {
|
|
112
107
|
position: relative;
|
|
113
108
|
z-index: 1;
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
label: string;
|
|
9
9
|
tone?: StatusTone;
|
|
10
10
|
};
|
|
11
|
-
/** Top preview area — image, illustration, screenshot, gradient. Omit to skip the preview. */
|
|
11
|
+
/** Top preview area — image, illustration, screenshot, gradient. Consumer sizes its own content (e.g. `width:100%`). Omit to skip the preview. */
|
|
12
12
|
preview?: Snippet;
|
|
13
13
|
/** Action slot, typically a kit `<Button size="sm" variant="outline">`. */
|
|
14
14
|
action?: Snippet;
|
|
@@ -1,17 +1,56 @@
|
|
|
1
|
-
<script lang="ts">const { label } = $props();
|
|
1
|
+
<script lang="ts">const { label, fontFamily = 'mono', divider = false } = $props();
|
|
2
|
+
export {};
|
|
2
3
|
</script>
|
|
3
4
|
|
|
4
|
-
<div
|
|
5
|
+
<div
|
|
6
|
+
class="nav-menu-header"
|
|
7
|
+
class:nav-menu-header--mono={fontFamily === 'mono'}
|
|
8
|
+
class:nav-menu-header--sans={fontFamily === 'sans'}
|
|
9
|
+
class:nav-menu-header--display={fontFamily === 'display'}
|
|
10
|
+
class:nav-menu-header--divided={divider}>
|
|
11
|
+
{label}
|
|
12
|
+
</div>
|
|
5
13
|
|
|
6
14
|
<!--
|
|
7
15
|
@component
|
|
8
|
-
NavMenuHeader — group label rendered above a stack of `NavMenuItem`s.
|
|
9
|
-
`NavMenuGroup`.
|
|
16
|
+
NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Monospace 400 by default;
|
|
17
|
+
non-mono families default to weight 500. Use one per `NavMenuGroup`. Pass `divider` to draw a bottom
|
|
18
|
+
separator (same style as `NavMenuDivider`), so the header itself groups the items below it without a
|
|
19
|
+
standalone divider and wider spacing.
|
|
20
|
+
|
|
21
|
+
### CSS Custom Properties
|
|
22
|
+
| Property | Description | Default |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--mono)` |
|
|
25
|
+
| `--sc-kit--nav-menu-header--font-weight` | Label font weight | `400` (mono) / `500` (other families) |
|
|
10
26
|
-->
|
|
11
27
|
<style>.nav-menu-header {
|
|
28
|
+
--_nav-menu-header--font-family: var(--sc-kit--nav-menu-header--font-family, var(--_nav-menu-header--font-family-default));
|
|
29
|
+
--_nav-menu-header--font-weight: var(--sc-kit--nav-menu-header--font-weight, var(--_nav-menu-header--font-weight-default));
|
|
12
30
|
padding: var(--sc-kit--space--2) var(--sc-kit--space--5);
|
|
31
|
+
font-family: var(--_nav-menu-header--font-family), sans-serif;
|
|
13
32
|
font-size: var(--sc-kit--font-size--md);
|
|
14
|
-
font-weight: var(--
|
|
33
|
+
font-weight: var(--_nav-menu-header--font-weight);
|
|
15
34
|
line-height: var(--sc-kit--leading--tight);
|
|
16
35
|
color: var(--sc-kit--color--text--secondary);
|
|
36
|
+
}
|
|
37
|
+
.nav-menu-header--mono {
|
|
38
|
+
--_nav-menu-header--font-family-default: var(--sc-kit--font--mono);
|
|
39
|
+
--_nav-menu-header--font-weight-default: var(--sc-kit--font-weight--regular);
|
|
40
|
+
}
|
|
41
|
+
.nav-menu-header--sans {
|
|
42
|
+
--_nav-menu-header--font-family-default: var(--sc-kit--font--sans);
|
|
43
|
+
--_nav-menu-header--font-weight-default: var(--sc-kit--font-weight--medium);
|
|
44
|
+
}
|
|
45
|
+
.nav-menu-header--display {
|
|
46
|
+
--_nav-menu-header--font-family-default: var(--sc-kit--font--display);
|
|
47
|
+
--_nav-menu-header--font-weight-default: var(--sc-kit--font-weight--medium);
|
|
48
|
+
}
|
|
49
|
+
.nav-menu-header--divided::after {
|
|
50
|
+
content: "";
|
|
51
|
+
display: block;
|
|
52
|
+
height: 1px;
|
|
53
|
+
margin-block-start: var(--sc-kit--space--2);
|
|
54
|
+
margin-inline: calc(var(--sc-kit--space--4) - var(--sc-kit--space--5));
|
|
55
|
+
background: var(--sc-kit--color--border);
|
|
17
56
|
}</style>
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import type { KitFontFamily } from '../../fonts';
|
|
1
2
|
type Props = {
|
|
2
3
|
label: string;
|
|
4
|
+
/** Label font family; each family carries its own default weight (mono → 400, others → 500). Overridable via `--sc-kit--nav-menu-header--font-family`. @default 'mono' */
|
|
5
|
+
fontFamily?: KitFontFamily;
|
|
6
|
+
/** Draw a bottom separator (same style as `NavMenuDivider`) under the label. @default false */
|
|
7
|
+
divider?: boolean;
|
|
3
8
|
};
|
|
4
9
|
/**
|
|
5
|
-
* NavMenuHeader — group label rendered above a stack of `NavMenuItem`s.
|
|
6
|
-
* `NavMenuGroup`.
|
|
10
|
+
* NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Monospace 400 by default;
|
|
11
|
+
* non-mono families default to weight 500. Use one per `NavMenuGroup`. Pass `divider` to draw a bottom
|
|
12
|
+
* separator (same style as `NavMenuDivider`), so the header itself groups the items below it without a
|
|
13
|
+
* standalone divider and wider spacing.
|
|
14
|
+
*
|
|
15
|
+
* ### CSS Custom Properties
|
|
16
|
+
* | Property | Description | Default |
|
|
17
|
+
* |---|---|---|
|
|
18
|
+
* | `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--mono)` |
|
|
19
|
+
* | `--sc-kit--nav-menu-header--font-weight` | Label font weight | `400` (mono) / `500` (other families) |
|
|
7
20
|
*/
|
|
8
21
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
9
22
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -57,7 +57,7 @@ Renders as `<a>` when `href` is set, `<button>` otherwise. Active state is consu
|
|
|
57
57
|
| Property | Description | Default |
|
|
58
58
|
|---|---|---|
|
|
59
59
|
| `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `18px` |
|
|
60
|
-
| `--sc-kit--nav-menu-item--icon-size` | Icon box
|
|
60
|
+
| `--sc-kit--nav-menu-item--icon-size` | Icon size (box + glyph) | `18px` |
|
|
61
61
|
| `--sc-kit--nav-menu-item--radius` | Row radius | `--sc-kit--radius--sm` |
|
|
62
62
|
| `--sc-kit--nav-menu-item--color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
|
|
63
63
|
| `--sc-kit--nav-menu-item--color--active` | Active / hover text color | `--sc-kit--color--text--primary` |
|
|
@@ -69,7 +69,7 @@ Renders as `<a>` when `href` is set, `<button>` otherwise. Active state is consu
|
|
|
69
69
|
-->
|
|
70
70
|
<style>.nav-menu-item {
|
|
71
71
|
--_nav-menu-item--gap: var(--sc-kit--nav-menu-item--gap, 1.125rem);
|
|
72
|
-
--_nav-menu-item--icon-size: var(--sc-kit--nav-menu-item--icon-size, 1.
|
|
72
|
+
--_nav-menu-item--icon-size: var(--sc-kit--nav-menu-item--icon-size, 1.125rem);
|
|
73
73
|
--_nav-menu-item--radius: var(--sc-kit--nav-menu-item--radius, var(--sc-kit--radius--sm));
|
|
74
74
|
--_nav-menu-item--color: var(--sc-kit--nav-menu-item--color, var(--sc-kit--color--text--secondary));
|
|
75
75
|
--_nav-menu-item--color-active: var(--sc-kit--nav-menu-item--color--active, var(--sc-kit--color--text--primary));
|
|
@@ -112,6 +112,7 @@ Renders as `<a>` when `href` is set, `<button>` otherwise. Active state is consu
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.nav-menu-item__icon {
|
|
115
|
+
--sc-kit--icon--size: var(--_nav-menu-item--icon-size);
|
|
115
116
|
position: relative;
|
|
116
117
|
display: inline-flex;
|
|
117
118
|
align-items: center;
|
|
@@ -121,11 +122,6 @@ Renders as `<a>` when `href` is set, `<button>` otherwise. Active state is consu
|
|
|
121
122
|
height: var(--_nav-menu-item--icon-size);
|
|
122
123
|
line-height: 0;
|
|
123
124
|
}
|
|
124
|
-
.nav-menu-item__icon :global(svg) {
|
|
125
|
-
width: 100%;
|
|
126
|
-
height: 100%;
|
|
127
|
-
fill: currentColor;
|
|
128
|
-
}
|
|
129
125
|
|
|
130
126
|
.nav-menu-item__badge {
|
|
131
127
|
position: absolute;
|
|
@@ -28,7 +28,7 @@ type Props = {
|
|
|
28
28
|
* | Property | Description | Default |
|
|
29
29
|
* |---|---|---|
|
|
30
30
|
* | `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `18px` |
|
|
31
|
-
* | `--sc-kit--nav-menu-item--icon-size` | Icon box
|
|
31
|
+
* | `--sc-kit--nav-menu-item--icon-size` | Icon size (box + glyph) | `18px` |
|
|
32
32
|
* | `--sc-kit--nav-menu-item--radius` | Row radius | `--sc-kit--radius--sm` |
|
|
33
33
|
* | `--sc-kit--nav-menu-item--color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
|
|
34
34
|
* | `--sc-kit--nav-menu-item--color--active` | Active / hover text color | `--sc-kit--color--text--primary` |
|
|
@@ -50,7 +50,7 @@ CSS variables (settable on the parent rail or any ancestor).
|
|
|
50
50
|
| Property | Description | Default |
|
|
51
51
|
|---|---|---|
|
|
52
52
|
| `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
|
|
53
|
-
| `--sc-kit--nav-rail--item-icon-size` | Icon box
|
|
53
|
+
| `--sc-kit--nav-rail--item-icon-size` | Icon size (box + glyph) | `24px` |
|
|
54
54
|
| `--sc-kit--nav-rail--item-label-size` | Label font size | `10px` |
|
|
55
55
|
| `--sc-kit--nav-rail--item-radius` | Tile radius | `--sc-kit--radius--sm` |
|
|
56
56
|
| `--sc-kit--nav-rail--item-color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
|
|
@@ -98,6 +98,7 @@ CSS variables (settable on the parent rail or any ancestor).
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.nav-rail-item__icon {
|
|
101
|
+
--sc-kit--icon--size: var(--_nav-rail--item-icon-size);
|
|
101
102
|
display: inline-flex;
|
|
102
103
|
align-items: center;
|
|
103
104
|
justify-content: center;
|
|
@@ -105,11 +106,6 @@ CSS variables (settable on the parent rail or any ancestor).
|
|
|
105
106
|
height: var(--_nav-rail--item-icon-size);
|
|
106
107
|
line-height: 0;
|
|
107
108
|
}
|
|
108
|
-
.nav-rail-item__icon :global(svg) {
|
|
109
|
-
width: 100%;
|
|
110
|
-
height: 100%;
|
|
111
|
-
fill: currentColor;
|
|
112
|
-
}
|
|
113
109
|
|
|
114
110
|
.nav-rail-item__label {
|
|
115
111
|
font-size: var(--_nav-rail--item-label-size);
|
|
@@ -26,7 +26,7 @@ type Props = {
|
|
|
26
26
|
* | Property | Description | Default |
|
|
27
27
|
* |---|---|---|
|
|
28
28
|
* | `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
|
|
29
|
-
* | `--sc-kit--nav-rail--item-icon-size` | Icon box
|
|
29
|
+
* | `--sc-kit--nav-rail--item-icon-size` | Icon size (box + glyph) | `24px` |
|
|
30
30
|
* | `--sc-kit--nav-rail--item-label-size` | Label font size | `10px` |
|
|
31
31
|
* | `--sc-kit--nav-rail--item-radius` | Tile radius | `--sc-kit--radius--sm` |
|
|
32
32
|
* | `--sc-kit--nav-rail--item-color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
|