@streamscloud/kit 0.94.0 → 0.94.2

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.
@@ -98,7 +98,9 @@ const scrollDown = () => {
98
98
  </Popover>
99
99
  {/if}
100
100
  {#if trailingItems && trailingItems.length > 0}
101
- <div class="nav-rail__divider" role="separator"></div>
101
+ {#if overflowItems.length > 0}
102
+ <div class="nav-rail__divider" role="separator"></div>
103
+ {/if}
102
104
  {#each trailingItems as item (item.id)}
103
105
  <NavRailItem item={item} showLabel={showLabels} />
104
106
  {/each}
@@ -134,7 +136,7 @@ Purely presentational: the consumer owns active state, routing and feature gatin
134
136
  | Property | Description | Default |
135
137
  |---|---|---|
136
138
  | `--sc-kit--nav-rail--width` | Rail width | `70px` |
137
- | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `12px` with `showLabels={false}` |
139
+ | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `--sc-kit--space--4` with `showLabels={false}` |
138
140
  | `--sc-kit--nav-rail--background` | Rail background | `--sc-kit--color--bg--panel` |
139
141
  | `--sc-kit--nav-rail--divider-color` | Divider before `trailingItems` | `--sc-kit--color--border` |
140
142
  | `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
@@ -166,7 +168,7 @@ Purely presentational: the consumer owns active state, routing and feature gatin
166
168
  padding: 0.25rem 0.25rem 0;
167
169
  }
168
170
  .nav-rail--icons-only {
169
- --_nav-rail--item-gap-default: 0.75rem;
171
+ --_nav-rail--item-gap-default: var(--sc-kit--space--4);
170
172
  }
171
173
 
172
174
  .nav-rail__brand {
@@ -221,6 +223,7 @@ Purely presentational: the consumer owns active state, routing and feature gatin
221
223
 
222
224
  .nav-rail__divider {
223
225
  flex-shrink: 0;
226
+ margin-block: calc(var(--_nav-rail--item-gap) / -4);
224
227
  width: 2rem;
225
228
  height: 1px;
226
229
  background: var(--_nav-rail--divider-color);
@@ -5,7 +5,7 @@ type Props = {
5
5
  brand?: Snippet;
6
6
  /** Rail tiles, in display order. */
7
7
  items: NavRailItemData[];
8
- /** Tiles after a divider that follows `items` and the "More" tile. Never counted by `maxVisibleItems` and never moved into "More". */
8
+ /** Tiles after `items`, set off by a divider while the "More" tile is shown. Never counted by `maxVisibleItems` and never moved into "More". */
9
9
  trailingItems?: NavRailItemData[];
10
10
  /** Number of `items` shown as tiles; the rest move into a trailing "More" tile that opens them in a menu. All tiles show when not set. */
11
11
  maxVisibleItems?: number;
@@ -24,7 +24,7 @@ type Props = {
24
24
  * | Property | Description | Default |
25
25
  * |---|---|---|
26
26
  * | `--sc-kit--nav-rail--width` | Rail width | `70px` |
27
- * | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `12px` with `showLabels={false}` |
27
+ * | `--sc-kit--nav-rail--item-gap` | Vertical gap between tiles | `26px`; `--sc-kit--space--4` with `showLabels={false}` |
28
28
  * | `--sc-kit--nav-rail--background` | Rail background | `--sc-kit--color--bg--panel` |
29
29
  * | `--sc-kit--nav-rail--divider-color` | Divider before `trailingItems` | `--sc-kit--color--border` |
30
30
  * | `--sc-kit--nav-rail--item-width` | Tile width | `58px` |
@@ -23,6 +23,7 @@ const handleClick = (event) => {
23
23
  {#if item.href && !item.disabled}
24
24
  <a
25
25
  class="nav-rail-item"
26
+ class:nav-rail-item--icon-only={!showLabel}
26
27
  class:nav-rail-item--active={item.active}
27
28
  class:nav-rail-item--error={item.error}
28
29
  href={item.href}
@@ -36,6 +37,7 @@ const handleClick = (event) => {
36
37
  <button
37
38
  type="button"
38
39
  class="nav-rail-item"
40
+ class:nav-rail-item--icon-only={!showLabel}
39
41
  class:nav-rail-item--active={item.active}
40
42
  class:nav-rail-item--error={item.error}
41
43
  class:nav-rail-item--disabled={item.disabled}
@@ -84,6 +86,9 @@ const handleClick = (event) => {
84
86
  font-family: inherit;
85
87
  transition: color var(--sc-kit--duration--base) var(--sc-kit--ease--default), background-color var(--sc-kit--duration--base) var(--sc-kit--ease--default);
86
88
  }
89
+ .nav-rail-item--icon-only {
90
+ padding-block: var(--sc-kit--space--3);
91
+ }
87
92
  .nav-rail-item--active {
88
93
  color: var(--_nav-rail--item-color-active);
89
94
  background: var(--_nav-rail--item-background-active);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.94.0",
3
+ "version": "0.94.2",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",