@streamscloud/kit 0.96.0 → 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.
@@ -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,7 @@ 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%))` |
142
143
  | `--sc-kit--nav-rail--brand--padding-block-start` | Space above the `brand` block | `24px` |
143
144
  | `--sc-kit--nav-rail--brand--padding-block-end` | Space below the `brand` block | `24px` |
144
145
  | `--sc-kit--nav-rail--scroll-area--padding-block-start` | Space above the first tile | `8px` |
@@ -164,6 +165,7 @@ Purely presentational: the consumer owns active state, routing and feature gatin
164
165
  --_nav-rail--brand-padding-block-start: var(--sc-kit--nav-rail--brand--padding-block-start, 1.5rem);
165
166
  --_nav-rail--brand-padding-block-end: var(--sc-kit--nav-rail--brand--padding-block-end, 1.5rem);
166
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%)));
167
169
  display: flex;
168
170
  flex-direction: column;
169
171
  align-items: stretch;
@@ -176,6 +178,9 @@ Purely presentational: the consumer owns active state, routing and feature gatin
176
178
  .nav-rail--icons-only {
177
179
  --_nav-rail--item-gap-default: var(--sc-kit--space--4);
178
180
  }
181
+ .nav-rail--edge-shadow {
182
+ box-shadow: var(--_nav-rail--edge-shadow);
183
+ }
179
184
 
180
185
  .nav-rail__brand {
181
186
  display: flex;
@@ -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,7 @@ 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%))` |
30
33
  * | `--sc-kit--nav-rail--brand--padding-block-start` | Space above the `brand` block | `24px` |
31
34
  * | `--sc-kit--nav-rail--brand--padding-block-end` | Space below the `brand` block | `24px` |
32
35
  * | `--sc-kit--nav-rail--scroll-area--padding-block-start` | Space above the first tile | `8px` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.96.0",
3
+ "version": "0.96.1",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",