@streamscloud/kit 0.95.4 → 0.96.1

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,11 +1,5 @@
1
- import '@fontsource/inter/400.css';
2
- import '@fontsource/inter/500.css';
3
- import '@fontsource/inter/600.css';
4
- import '@fontsource/inter/700.css';
5
- import '@fontsource/inter/900.css';
6
- import '@fontsource/jetbrains-mono/400.css';
7
- import '@fontsource/jetbrains-mono/500.css';
8
- import '@fontsource/source-sans-pro/900.css';
1
+ import '@fontsource-variable/geist/wght.css';
2
+ import '@fontsource-variable/geist-mono/wght.css';
9
3
  export type KitFontFamily = 'sans' | 'mono' | 'display';
10
4
  /** Maps a `KitFontFamily` value to its kit CSS-var reference. */
11
5
  export declare const KIT_FONT_VARS: Record<KitFontFamily, string>;
package/dist/fonts.js CHANGED
@@ -3,14 +3,8 @@
3
3
  // the .css side-effect imports during dev and bundle.
4
4
  //
5
5
  // Consumers: `import '@streamscloud/kit/fonts';` at app entry. Once.
6
- import '@fontsource/inter/400.css';
7
- import '@fontsource/inter/500.css';
8
- import '@fontsource/inter/600.css';
9
- import '@fontsource/inter/700.css';
10
- import '@fontsource/inter/900.css';
11
- import '@fontsource/jetbrains-mono/400.css';
12
- import '@fontsource/jetbrains-mono/500.css';
13
- import '@fontsource/source-sans-pro/900.css';
6
+ import '@fontsource-variable/geist/wght.css';
7
+ import '@fontsource-variable/geist-mono/wght.css';
14
8
  /** Maps a `KitFontFamily` value to its kit CSS-var reference. */
15
9
  export const KIT_FONT_VARS = {
16
10
  sans: 'var(--sc-kit--font--sans)',
@@ -36,6 +36,7 @@ html {
36
36
  body {
37
37
  line-height: 1.5;
38
38
  -webkit-font-smoothing: antialiased;
39
+ font-variant-numeric: tabular-nums;
39
40
  }
40
41
 
41
42
  /* 5. Improve media defaults */
@@ -31,7 +31,7 @@
31
31
  // ============================================================
32
32
  // COLOR — BORDERS
33
33
  // ============================================================
34
- --sc-kit--color--border: light-dark(#{$color-neutral-200}, #{$color-dark-600});
34
+ --sc-kit--color--border: light-dark(#{$color-neutral-100}, #{$color-dark-600});
35
35
  --sc-kit--color--border--strong: light-dark(#{$color-neutral-400}, #{$color-neutral-600});
36
36
  --sc-kit--color--border--field: light-dark(#{$color-neutral-200}, #{$color-dark-600});
37
37
  --sc-kit--color--border--focus: light-dark(#{$color-blue-500}, #{$color-blue-400});
@@ -62,6 +62,8 @@
62
62
  --sc-kit--color--info--hover: light-dark(#{$color-blue-700}, #{$color-blue-300});
63
63
  --sc-kit--color--info--soft: light-dark(#{$color-blue-50}, #{$color-blue-900});
64
64
 
65
+ --sc-kit--color--intelligence: light-dark(#4ca53f, #a6ef9b);
66
+
65
67
  // ============================================================
66
68
  // COLOR — TONES (categorical palette; fg + soft bg, component-neutral)
67
69
  // ============================================================
@@ -149,12 +151,12 @@
149
151
  // ============================================================
150
152
  // TYPOGRAPHY
151
153
  // ============================================================
152
- --sc-kit--font-size--xs: 11px;
153
- --sc-kit--font-size--sm: 12px;
154
+ --sc-kit--font-size--xs: 12px;
155
+ --sc-kit--font-size--sm: 13px;
154
156
  --sc-kit--font-size--md: 14px;
155
157
  --sc-kit--font-size--lg: 16px;
156
158
  --sc-kit--font-size--xl: 20px;
157
- --sc-kit--font-size--2xl: 26px;
159
+ --sc-kit--font-size--2xl: 24px;
158
160
  --sc-kit--font-size--3xl: 32px;
159
161
  --sc-kit--font-size--4xl: 40px;
160
162
 
@@ -187,9 +189,9 @@
187
189
  --sc-kit--leading--normal: 1.5;
188
190
  --sc-kit--leading--relaxed: 1.65;
189
191
 
190
- --sc-kit--font--sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
191
- --sc-kit--font--display: 'Source Sans Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
192
- --sc-kit--font--mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
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
+ --sc-kit--font--mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
193
195
 
194
196
  // ============================================================
195
197
  // SHADOWS
@@ -30,6 +30,7 @@ html {
30
30
  body {
31
31
  line-height: 1.5;
32
32
  -webkit-font-smoothing: antialiased;
33
+ font-variant-numeric: tabular-nums;
33
34
  }
34
35
 
35
36
  /* 5. Improve media defaults */
@@ -33,6 +33,7 @@ routing, or feature gating. Compose with `NavMenuGroup`, `NavMenuHeader`, `NavMe
33
33
  | `--sc-kit--nav-menu--border-color` | Right (panel) border color | `--sc-kit--color--border` |
34
34
  | `--sc-kit--nav-menu--header--border-color` | Header bottom-border color | `transparent` |
35
35
  | `--sc-kit--nav-menu--footer--border-color` | Footer top-border color | `--sc-kit--color--border` |
36
+ | `--sc-kit--nav-menu--body--padding-block-start` | Space above the body content | `20px` |
36
37
  -->
37
38
  <style>.nav-menu {
38
39
  --_nav-menu--width: var(--sc-kit--nav-menu--width, 15rem);
@@ -40,6 +41,7 @@ routing, or feature gating. Compose with `NavMenuGroup`, `NavMenuHeader`, `NavMe
40
41
  --_nav-menu--border-color: var(--sc-kit--nav-menu--border-color, var(--sc-kit--color--border));
41
42
  --_nav-menu--header-border-color: var(--sc-kit--nav-menu--header--border-color, transparent);
42
43
  --_nav-menu--footer-border-color: var(--sc-kit--nav-menu--footer--border-color, var(--sc-kit--color--border));
44
+ --_nav-menu--body-padding-block-start: var(--sc-kit--nav-menu--body--padding-block-start, 1.25rem);
43
45
  display: flex;
44
46
  flex-direction: column;
45
47
  width: var(--_nav-menu--width);
@@ -63,6 +65,7 @@ routing, or feature gating. Compose with `NavMenuGroup`, `NavMenuHeader`, `NavMe
63
65
  gap: var(--sc-kit--space--3);
64
66
  overflow-y: auto;
65
67
  padding: var(--sc-kit--space--2);
68
+ padding-block-start: var(--_nav-menu--body-padding-block-start);
66
69
  --_cross-browser-scrollbar--thumb-color: transparent;
67
70
  --_cross-browser-scrollbar--track-color: transparent;
68
71
  }
@@ -21,6 +21,7 @@ type Props = {
21
21
  * | `--sc-kit--nav-menu--border-color` | Right (panel) border color | `--sc-kit--color--border` |
22
22
  * | `--sc-kit--nav-menu--header--border-color` | Header bottom-border color | `transparent` |
23
23
  * | `--sc-kit--nav-menu--footer--border-color` | Footer top-border color | `--sc-kit--color--border` |
24
+ * | `--sc-kit--nav-menu--body--padding-block-start` | Space above the body content | `20px` |
24
25
  */
25
26
  declare const Cmp: import("svelte").Component<Props, {}, "">;
26
27
  type Cmp = ReturnType<typeof Cmp>;
@@ -6,7 +6,7 @@ import { NavRailLocalization } from './nav-rail-localization';
6
6
  import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
7
7
  import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
8
8
  import IconMoreHorizontal from '@fluentui/svg-icons/icons/more_horizontal_20_regular.svg?raw';
9
- const { brand, items, trailingItems, maxVisibleItems, showLabels = true, footerToggles, 'aria-label': ariaLabel } = $props();
9
+ const { brand, items, trailingItems, maxVisibleItems, showLabels = true, edgeShadow = false, footerToggles, 'aria-label': ariaLabel } = $props();
10
10
  const localization = new NavRailLocalization();
11
11
  const SCROLL_STEP = 120;
12
12
  const overflowItems = $derived(maxVisibleItems !== undefined && items.length > maxVisibleItems ? items.slice(maxVisibleItems) : []);
@@ -55,7 +55,7 @@ const scrollDown = () => {
55
55
  };
56
56
  </script>
57
57
 
58
- <div class="nav-rail" class:nav-rail--icons-only={!showLabels} role="navigation" aria-label={ariaLabel}>
58
+ <div class="nav-rail" class:nav-rail--icons-only={!showLabels} class:nav-rail--edge-shadow={edgeShadow} role="navigation" aria-label={ariaLabel}>
59
59
  {#if brand}
60
60
  <div class="nav-rail__brand">
61
61
  {@render brand()}
@@ -139,6 +139,10 @@ Purely presentational: the consumer owns active state, routing and feature gatin
139
139
  | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `--sc-kit--space--4` with `showLabels={false}` |
140
140
  | `--sc-kit--nav-rail--background` | Rail background | `--sc-kit--color--bg--panel` |
141
141
  | `--sc-kit--nav-rail--divider-color` | Divider before `trailingItems` | `--sc-kit--color--border` |
142
+ | `--sc-kit--nav-rail--edge-shadow` | Right-edge shadow with `edgeShadow` | `inset -6px 0 20px -10px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%))` |
143
+ | `--sc-kit--nav-rail--brand--padding-block-start` | Space above the `brand` block | `24px` |
144
+ | `--sc-kit--nav-rail--brand--padding-block-end` | Space below the `brand` block | `24px` |
145
+ | `--sc-kit--nav-rail--scroll-area--padding-block-start` | Space above the first tile | `8px` |
142
146
  | `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
143
147
  | `--sc-kit--nav-rail--item-icon-size` | Tile icon size (box + glyph) | `24px` |
144
148
  | `--sc-kit--nav-rail--item-label-size` | Tile label font size | `10px` |
@@ -158,6 +162,10 @@ Purely presentational: the consumer owns active state, routing and feature gatin
158
162
  --_nav-rail--item-gap: var(--sc-kit--nav-rail--item-gap, var(--_nav-rail--item-gap-default));
159
163
  --_nav-rail--background: var(--sc-kit--nav-rail--background, var(--sc-kit--color--bg--panel));
160
164
  --_nav-rail--divider-color: var(--sc-kit--nav-rail--divider-color, var(--sc-kit--color--border));
165
+ --_nav-rail--brand-padding-block-start: var(--sc-kit--nav-rail--brand--padding-block-start, 1.5rem);
166
+ --_nav-rail--brand-padding-block-end: var(--sc-kit--nav-rail--brand--padding-block-end, 1.5rem);
167
+ --_nav-rail--scroll-area-padding-block-start: var(--sc-kit--nav-rail--scroll-area--padding-block-start, 0.5rem);
168
+ --_nav-rail--edge-shadow: var(--sc-kit--nav-rail--edge-shadow, inset -6px 0 20px -10px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%)));
161
169
  display: flex;
162
170
  flex-direction: column;
163
171
  align-items: stretch;
@@ -170,20 +178,23 @@ Purely presentational: the consumer owns active state, routing and feature gatin
170
178
  .nav-rail--icons-only {
171
179
  --_nav-rail--item-gap-default: var(--sc-kit--space--4);
172
180
  }
181
+ .nav-rail--edge-shadow {
182
+ box-shadow: var(--_nav-rail--edge-shadow);
183
+ }
173
184
 
174
185
  .nav-rail__brand {
175
186
  display: flex;
176
187
  align-items: center;
177
188
  justify-content: center;
178
189
  flex-shrink: 0;
179
- padding: 1.5rem 0;
190
+ padding-block: var(--_nav-rail--brand-padding-block-start) var(--_nav-rail--brand-padding-block-end);
180
191
  }
181
192
 
182
193
  .nav-rail__scroll-area {
183
194
  position: relative;
184
195
  flex: 1;
185
196
  min-height: 0;
186
- padding-top: 0.5rem;
197
+ padding-block-start: var(--_nav-rail--scroll-area-padding-block-start);
187
198
  }
188
199
  .nav-rail__scroll-area:hover {
189
200
  --_scroll-btn-opacity: 1;
@@ -11,6 +11,8 @@ type Props = {
11
11
  maxVisibleItems?: number;
12
12
  /** Show the label under each tile icon. Without it a tile is icon-only, shorter, and shows its label in a tooltip; the "More" menu keeps its labels. @default true */
13
13
  showLabels?: boolean;
14
+ /** Inset shadow along the rail's right edge, as if cast by the panel next to it. */
15
+ edgeShadow?: boolean;
14
16
  /** Icon-only toggle buttons stacked at the bottom of the rail (e.g. expand panel, account). */
15
17
  footerToggles?: NavRailFooterToggle[];
16
18
  /** Accessible name of the navigation landmark — needed when the page has more than one navigation. */
@@ -27,6 +29,10 @@ type Props = {
27
29
  * | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `--sc-kit--space--4` with `showLabels={false}` |
28
30
  * | `--sc-kit--nav-rail--background` | Rail background | `--sc-kit--color--bg--panel` |
29
31
  * | `--sc-kit--nav-rail--divider-color` | Divider before `trailingItems` | `--sc-kit--color--border` |
32
+ * | `--sc-kit--nav-rail--edge-shadow` | Right-edge shadow with `edgeShadow` | `inset -6px 0 20px -10px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%))` |
33
+ * | `--sc-kit--nav-rail--brand--padding-block-start` | Space above the `brand` block | `24px` |
34
+ * | `--sc-kit--nav-rail--brand--padding-block-end` | Space below the `brand` block | `24px` |
35
+ * | `--sc-kit--nav-rail--scroll-area--padding-block-start` | Space above the first tile | `8px` |
30
36
  * | `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
31
37
  * | `--sc-kit--nav-rail--item-icon-size` | Tile icon size (box + glyph) | `24px` |
32
38
  * | `--sc-kit--nav-rail--item-label-size` | Tile label font size | `10px` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.95.4",
3
+ "version": "0.96.1",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -485,9 +485,8 @@
485
485
  "peerDependencies": {
486
486
  "@floating-ui/dom": "^1.7.6",
487
487
  "@fluentui/svg-icons": "^1.1.341",
488
- "@fontsource/inter": "^5.2.8",
489
- "@fontsource/jetbrains-mono": "^5.2.8",
490
- "@fontsource/source-sans-pro": "^5.2.5",
488
+ "@fontsource-variable/geist": "^5.3.0",
489
+ "@fontsource-variable/geist-mono": "^5.3.0",
491
490
  "@urql/core": "^6.0.1",
492
491
  "any-ascii": "^0.3.3",
493
492
  "cleave-zen": "^0.0.17",
@@ -512,9 +511,8 @@
512
511
  "@eslint/js": "^10.0.1",
513
512
  "@floating-ui/dom": "^1.7.6",
514
513
  "@fluentui/svg-icons": "^1.1.341",
515
- "@fontsource/inter": "^5.2.8",
516
- "@fontsource/jetbrains-mono": "^5.2.8",
517
- "@fontsource/source-sans-pro": "^5.2.5",
514
+ "@fontsource-variable/geist": "^5.3.0",
515
+ "@fontsource-variable/geist-mono": "^5.3.0",
518
516
  "@sveltejs/package": "^2.5.8",
519
517
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
520
518
  "@tsconfig/svelte": "^5.0.8",