@streamscloud/kit 0.96.1 → 0.97.0

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/fonts.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@fontsource-variable/geist/wght.css';
2
2
  import '@fontsource-variable/geist-mono/wght.css';
3
- export type KitFontFamily = 'sans' | 'mono' | 'display';
3
+ export type KitFontFamily = 'sans' | 'mono';
4
4
  /** Maps a `KitFontFamily` value to its kit CSS-var reference. */
5
5
  export declare const KIT_FONT_VARS: Record<KitFontFamily, string>;
package/dist/fonts.js CHANGED
@@ -8,6 +8,5 @@ import '@fontsource-variable/geist-mono/wght.css';
8
8
  /** Maps a `KitFontFamily` value to its kit CSS-var reference. */
9
9
  export const KIT_FONT_VARS = {
10
10
  sans: 'var(--sc-kit--font--sans)',
11
- mono: 'var(--sc-kit--font--mono)',
12
- display: 'var(--sc-kit--font--display)'
11
+ mono: 'var(--sc-kit--font--mono)'
13
12
  };
@@ -190,7 +190,6 @@
190
190
  --sc-kit--leading--relaxed: 1.65;
191
191
 
192
192
  --sc-kit--font--sans: 'Geist Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
193
- --sc-kit--font--display: var(--sc-kit--font--sans);
194
193
  --sc-kit--font--mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
195
194
 
196
195
  // ============================================================
@@ -9,9 +9,19 @@ export {};
9
9
  <!--
10
10
  @component
11
11
  NavMenuGroup — visual grouping wrapper. Stacks a `NavMenuHeader` and `NavMenuItem`s in a flex
12
- column and adds vertical spacing between adjacent groups.
12
+ column and adds vertical spacing above every group but its container's first child.
13
+
14
+ ### CSS Custom Properties
15
+ | Property | Description | Default |
16
+ |---|---|---|
17
+ | `--sc-kit--nav-menu-group--margin-block-start` | Space above the group unless it is its container's first child; adds to the container's own gap | `var(--sc-kit--space--1)` |
13
18
  -->
14
19
  <style>.nav-menu-group {
20
+ --_nav-menu-group--margin-block-start: var(--sc-kit--nav-menu-group--margin-block-start, var(--sc-kit--space--1));
15
21
  display: flex;
16
22
  flex-direction: column;
23
+ margin-block-start: var(--_nav-menu-group--margin-block-start);
24
+ }
25
+ .nav-menu-group:first-child {
26
+ margin-block-start: 0;
17
27
  }</style>
@@ -4,7 +4,12 @@ type Props = {
4
4
  };
5
5
  /**
6
6
  * NavMenuGroup — visual grouping wrapper. Stacks a `NavMenuHeader` and `NavMenuItem`s in a flex
7
- * column and adds vertical spacing between adjacent groups.
7
+ * column and adds vertical spacing above every group but its container's first child.
8
+ *
9
+ * ### CSS Custom Properties
10
+ * | Property | Description | Default |
11
+ * |---|---|---|
12
+ * | `--sc-kit--nav-menu-group--margin-block-start` | Space above the group unless it is its container's first child; adds to the container's own gap | `var(--sc-kit--space--1)` |
8
13
  */
9
14
  declare const Cmp: import("svelte").Component<Props, {}, "">;
10
15
  type Cmp = ReturnType<typeof Cmp>;
@@ -1,4 +1,4 @@
1
- <script lang="ts">const { label, fontFamily = 'mono', tone = 'primary', divider = false } = $props();
1
+ <script lang="ts">const { label, fontFamily = 'sans', tone = 'secondary', divider = false } = $props();
2
2
  export {};
3
3
  </script>
4
4
 
@@ -6,7 +6,6 @@ export {};
6
6
  class="nav-menu-header"
7
7
  class:nav-menu-header--mono={fontFamily === 'mono'}
8
8
  class:nav-menu-header--sans={fontFamily === 'sans'}
9
- class:nav-menu-header--display={fontFamily === 'display'}
10
9
  class:nav-menu-header--primary={tone === 'primary'}
11
10
  class:nav-menu-header--secondary={tone === 'secondary'}
12
11
  class:nav-menu-header--divided={divider}>
@@ -15,8 +14,8 @@ export {};
15
14
 
16
15
  <!--
17
16
  @component
18
- NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Monospace 400 by default;
19
- non-mono families default to weight 500. `tone` switches the text between primary and secondary.
17
+ NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Sans 500 in the secondary tone by default;
18
+ the mono family defaults to weight 400. `tone` switches the text between primary and secondary.
20
19
  Use one per `NavMenuGroup`. Pass `divider` to draw a bottom separator (same style as
21
20
  `NavMenuDivider`), so the header itself groups the items below it without a standalone divider and
22
21
  wider spacing.
@@ -24,20 +23,22 @@ wider spacing.
24
23
  ### CSS Custom Properties
25
24
  | Property | Description | Default |
26
25
  |---|---|---|
27
- | `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--mono)` |
28
- | `--sc-kit--nav-menu-header--font-weight` | Label font weight | `400` (mono) / `500` (other families) |
29
- | `--sc-kit--nav-menu-header--color` | Label text color | `var(--sc-kit--color--text--primary)` (tone-dependent) |
26
+ | `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--sans)` |
27
+ | `--sc-kit--nav-menu-header--font-size` | Label font size | `var(--sc-kit--font-size--xs)` |
28
+ | `--sc-kit--nav-menu-header--font-weight` | Label font weight | `500` / `400` (mono) |
29
+ | `--sc-kit--nav-menu-header--color` | Label text color | `var(--sc-kit--color--text--secondary)` (tone-dependent) |
30
30
  -->
31
31
  <style>.nav-menu-header {
32
- --_nav-menu-header--font-family: var(--sc-kit--nav-menu-header--font-family, var(--_nav-menu-header--font-family-default, var(--sc-kit--font--mono)));
32
+ --_nav-menu-header--font-family: var(--sc-kit--nav-menu-header--font-family, var(--_nav-menu-header--font-family-default, var(--sc-kit--font--sans)));
33
+ --_nav-menu-header--font-size: var(--sc-kit--nav-menu-header--font-size, var(--sc-kit--font-size--xs));
33
34
  --_nav-menu-header--font-weight: var(
34
35
  --sc-kit--nav-menu-header--font-weight,
35
- var(--_nav-menu-header--font-weight-default, var(--sc-kit--font-weight--regular))
36
+ var(--_nav-menu-header--font-weight-default, var(--sc-kit--font-weight--medium))
36
37
  );
37
- --_nav-menu-header--color: var(--sc-kit--nav-menu-header--color, var(--_nav-menu-header--color-default, var(--sc-kit--color--text--primary)));
38
+ --_nav-menu-header--color: var(--sc-kit--nav-menu-header--color, var(--_nav-menu-header--color-default, var(--sc-kit--color--text--secondary)));
38
39
  padding: var(--sc-kit--space--2) var(--sc-kit--space--5);
39
40
  font-family: var(--_nav-menu-header--font-family), sans-serif;
40
- font-size: var(--sc-kit--font-size--md);
41
+ font-size: var(--_nav-menu-header--font-size);
41
42
  font-weight: var(--_nav-menu-header--font-weight);
42
43
  line-height: var(--sc-kit--leading--tight);
43
44
  color: var(--_nav-menu-header--color);
@@ -50,10 +51,6 @@ wider spacing.
50
51
  --_nav-menu-header--font-family-default: var(--sc-kit--font--sans);
51
52
  --_nav-menu-header--font-weight-default: var(--sc-kit--font-weight--medium);
52
53
  }
53
- .nav-menu-header--display {
54
- --_nav-menu-header--font-family-default: var(--sc-kit--font--display);
55
- --_nav-menu-header--font-weight-default: var(--sc-kit--font-weight--medium);
56
- }
57
54
  .nav-menu-header--primary {
58
55
  --_nav-menu-header--color-default: var(--sc-kit--color--text--primary);
59
56
  }
@@ -1,16 +1,16 @@
1
1
  import type { KitFontFamily } from '../../fonts';
2
2
  type Props = {
3
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' */
4
+ /** Label font family; each family carries its own default weight (sans → 500, mono → 400). Overridable via `--sc-kit--nav-menu-header--font-family`. @default 'sans' */
5
5
  fontFamily?: KitFontFamily;
6
- /** Text tone. Overridable via `--sc-kit--nav-menu-header--color`. @default 'primary' */
6
+ /** Text tone. Overridable via `--sc-kit--nav-menu-header--color`. @default 'secondary' */
7
7
  tone?: 'primary' | 'secondary';
8
8
  /** Draw a bottom separator (same style as `NavMenuDivider`) under the label. @default false */
9
9
  divider?: boolean;
10
10
  };
11
11
  /**
12
- * NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Monospace 400 by default;
13
- * non-mono families default to weight 500. `tone` switches the text between primary and secondary.
12
+ * NavMenuHeader — group label rendered above a stack of `NavMenuItem`s. Sans 500 in the secondary tone by default;
13
+ * the mono family defaults to weight 400. `tone` switches the text between primary and secondary.
14
14
  * Use one per `NavMenuGroup`. Pass `divider` to draw a bottom separator (same style as
15
15
  * `NavMenuDivider`), so the header itself groups the items below it without a standalone divider and
16
16
  * wider spacing.
@@ -18,9 +18,10 @@ type Props = {
18
18
  * ### CSS Custom Properties
19
19
  * | Property | Description | Default |
20
20
  * |---|---|---|
21
- * | `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--mono)` |
22
- * | `--sc-kit--nav-menu-header--font-weight` | Label font weight | `400` (mono) / `500` (other families) |
23
- * | `--sc-kit--nav-menu-header--color` | Label text color | `var(--sc-kit--color--text--primary)` (tone-dependent) |
21
+ * | `--sc-kit--nav-menu-header--font-family` | Label font family | `var(--sc-kit--font--sans)` |
22
+ * | `--sc-kit--nav-menu-header--font-size` | Label font size | `var(--sc-kit--font-size--xs)` |
23
+ * | `--sc-kit--nav-menu-header--font-weight` | Label font weight | `500` / `400` (mono) |
24
+ * | `--sc-kit--nav-menu-header--color` | Label text color | `var(--sc-kit--color--text--secondary)` (tone-dependent) |
24
25
  */
25
26
  declare const Cmp: import("svelte").Component<Props, {}, "">;
26
27
  type Cmp = ReturnType<typeof Cmp>;
@@ -99,7 +99,7 @@ signal and hover keeps working on the active row; `'filled'` plates it and suppr
99
99
  ### CSS Custom Properties
100
100
  | Property | Description | Default |
101
101
  |---|---|---|
102
- | `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `18px` |
102
+ | `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `var(--sc-kit--space--3)` |
103
103
  | `--sc-kit--nav-menu-item--icon-size` | Icon size (box + glyph) | `18px` |
104
104
  | `--sc-kit--nav-menu-item--radius` | Row radius | `--sc-kit--radius--sm` |
105
105
  | `--sc-kit--nav-menu-item--color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
@@ -112,7 +112,7 @@ signal and hover keeps working on the active row; `'filled'` plates it and suppr
112
112
  | `--sc-kit--nav-menu-item--badge--color` | Badge text color | `--sc-kit--color--text--on-accent` |
113
113
  -->
114
114
  <style>.nav-menu-item {
115
- --_nav-menu-item--gap: var(--sc-kit--nav-menu-item--gap, 1.125rem);
115
+ --_nav-menu-item--gap: var(--sc-kit--nav-menu-item--gap, var(--sc-kit--space--3));
116
116
  --_nav-menu-item--icon-size: var(--sc-kit--nav-menu-item--icon-size, 1.125rem);
117
117
  --_nav-menu-item--radius: var(--sc-kit--nav-menu-item--radius, var(--sc-kit--radius--sm));
118
118
  --_nav-menu-item--color: var(--sc-kit--nav-menu-item--color, var(--sc-kit--color--text--secondary));
@@ -36,7 +36,7 @@ type Props = {
36
36
  * ### CSS Custom Properties
37
37
  * | Property | Description | Default |
38
38
  * |---|---|---|
39
- * | `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `18px` |
39
+ * | `--sc-kit--nav-menu-item--gap` | Gap between icon and label | `var(--sc-kit--space--3)` |
40
40
  * | `--sc-kit--nav-menu-item--icon-size` | Icon size (box + glyph) | `18px` |
41
41
  * | `--sc-kit--nav-menu-item--radius` | Row radius | `--sc-kit--radius--sm` |
42
42
  * | `--sc-kit--nav-menu-item--color` | Idle text/icon color | `--sc-kit--color--text--secondary` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.96.1",
3
+ "version": "0.97.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",