@streamoid/ui 0.6.18 → 0.6.20
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/docs/AGENTS.md +5 -1
- package/dist/docs/ScHDivider.md +15 -18
- package/dist/docs/ScWorkspaceAccountMenu.md +115 -0
- package/dist/docs/ScWorkspaceSwitchCard.md +22 -24
- package/dist/docs/StreamoidSidebar.md +10 -0
- package/dist/docs/components.json +84 -2
- package/dist/index.css +331 -0
- package/dist/index.d.mts +203 -88
- package/dist/index.d.ts +203 -88
- package/dist/index.js +2490 -1629
- package/dist/index.mjs +2492 -1622
- package/package.json +3 -2
package/dist/docs/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @streamoid/ui — component router (for AI agents)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
125 components. Full docs for each live beside this file as `<ScName>.md`;
|
|
4
4
|
the same metadata is machine-readable in `components.json`.
|
|
5
5
|
|
|
6
6
|
**How to use this file:** scan for the job you need below, then open only that
|
|
@@ -178,7 +178,10 @@ theme-aware (dark on `:root`, light override) — never hardcode a colour.
|
|
|
178
178
|
- **`ScSidebarProfile`** _(legacy)_ — use when never. There is no way to pass a real user through it.
|
|
179
179
|
- **`ScSidebarSwitchMenu`** — use when you're building a "switch to another product" list inside a sidebar and each entry needs a name **and** a subtitle.
|
|
180
180
|
- **`ScVersion`** _(legacy)_ — use when never. `StreamoidSidebar` renders its own version footer inline from `versionText`.
|
|
181
|
+
- **`ScWorkspaceAccountMenu`** — use when building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains.
|
|
182
|
+
- also documented here: `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, `ScSidebarAppIdentity`, `useStreamoidThemePreference`, `useStreamoidSidebarPreference`
|
|
181
183
|
- **`StreamoidSidebar`** — use when you are building (or fixing) a desktop app's primary left navigation and you want the same chrome CXO, Photogenix and Catalogix use.
|
|
184
|
+
- also documented here: `ScSidebarResizeHandle`, `advanceSidebarResizeGesture`, `SIDEBAR_RESIZE_THRESHOLD_PX`
|
|
182
185
|
|
|
183
186
|
## tables
|
|
184
187
|
|
|
@@ -265,6 +268,7 @@ theme-aware (dark on `:root`, light override) — never hardcode a colour.
|
|
|
265
268
|
| `ScSidebarMenu` | `ScSidebarSwitchMenu`, `ScSidebar`, `ScMenuOptions`, `ScSettingsTabComp` |
|
|
266
269
|
| `ScSidebarProfile` | `ScProfile`, `ScProfileOptions`, `ScProfilePopup`, `ScProfileSettingsComp`, `ScProfileV2Mobile`, `ScIntialProfileCover` |
|
|
267
270
|
| `StreamoidSidebar` | `ScSidebar`, `ScArtifaxSidebar`, `ScCatalogixSidebar`, `ScSidebarMenu`, `ScLogoUnit` |
|
|
271
|
+
| `ScWorkspaceAccountMenu` | `ScProfilePopup`, `ScWorkspaceSwitcher`, `ScAppSwitchPanel` |
|
|
268
272
|
| `ScSlider` | `ScProgressBar`, `ScCounter`, `ScSelectionPillGroup`, `ScTabSwitcher` |
|
|
269
273
|
| `ScStoreCard` | `ScCatalogixStoreTableList`, `ScDefaultCard`, `ScAppListingCard`, `ScWorkspaceCard` |
|
|
270
274
|
| `ScSubAgent` | `ScInChatList`, `ScBadges`, `ScTaxonomyPill`, `ScSelectionPill` |
|
package/dist/docs/ScHDivider.md
CHANGED
|
@@ -23,9 +23,9 @@ semantics — it exists so nobody hand-rolls a `border-top` with a hex colour ag
|
|
|
23
23
|
- **Don't reach for it when:** the rule runs vertically between two columns
|
|
24
24
|
(→ `ScVDivider`), or you need a semantic `<hr>` in prose.
|
|
25
25
|
- **Three things that will bite you:**
|
|
26
|
-
1. `
|
|
27
|
-
|
|
28
|
-
2.
|
|
26
|
+
1. `fullBleed` is sized for the standard 8px (`--spacing-md`) card/sidebar
|
|
27
|
+
padding; use a custom class for a different inset.
|
|
28
|
+
2. By default it has **no margin**. Two sections separated by it will look cramped unless the
|
|
29
29
|
parent supplies the gap.
|
|
30
30
|
3. In a **flex-row** parent it vanishes (0.5px tall, no width). It needs a block
|
|
31
31
|
or flex-column parent.
|
|
@@ -51,8 +51,9 @@ import "@streamoid/ui/dist/index.css"; // once, at your app root
|
|
|
51
51
|
|
|
52
52
|
| Prop | Type | Default | Notes |
|
|
53
53
|
|---|---|---|---|
|
|
54
|
-
| `className` | `string` | – | Appended after the internal
|
|
55
|
-
|
|
|
54
|
+
| `className` | `string` | – | Appended after the internal classes; use it for custom spacing, colour or width. |
|
|
55
|
+
| `fullBleed` | `boolean` | `false` | Extends through the standard `--spacing-md` padding on both sides. |
|
|
56
|
+
| `...props` | `HTMLAttributes<HTMLDivElement>` | – | Native div attributes such as `style`, `role`, `aria-*`, and `data-*`. |
|
|
56
57
|
|
|
57
58
|
### What the stylesheet does
|
|
58
59
|
|
|
@@ -79,7 +80,7 @@ import "@streamoid/ui/dist/index.css"; // once, at your app root
|
|
|
79
80
|
// Inside a card, edge-to-edge under the header
|
|
80
81
|
<div className={styles.card}>
|
|
81
82
|
<CardHeader />
|
|
82
|
-
<ScHDivider
|
|
83
|
+
<ScHDivider fullBleed />
|
|
83
84
|
<CardBody />
|
|
84
85
|
</div>
|
|
85
86
|
```
|
|
@@ -144,20 +145,16 @@ Used by all four host apps; it's part of the universal core.
|
|
|
144
145
|
|
|
145
146
|
## Gotchas
|
|
146
147
|
|
|
147
|
-
**1.
|
|
148
|
-
|
|
148
|
+
**1. `fullBleed` assumes standard padding.** It uses `--spacing-md` on each side.
|
|
149
|
+
For a container with a different inset, provide a custom class instead.
|
|
149
150
|
|
|
150
151
|
```tsx
|
|
151
|
-
|
|
152
|
-
<ScHDivider
|
|
153
|
-
|
|
154
|
-
// RIGHT — spacing via a class
|
|
155
|
-
<ScHDivider className="my-2" />
|
|
152
|
+
<ScHDivider fullBleed />
|
|
153
|
+
<ScHDivider className={styles.customBleed} />
|
|
156
154
|
```
|
|
157
155
|
|
|
158
|
-
**2.
|
|
159
|
-
`
|
|
160
|
-
assertions in tests will fail.
|
|
156
|
+
**2. Native div attributes are supported.** `style`, `role`, `aria-*`, and
|
|
157
|
+
`data-*` are typed and forwarded to the root divider.
|
|
161
158
|
|
|
162
159
|
**3. It disappears in a flex-row parent.** `height: 0.5px` beats `align-self:
|
|
163
160
|
stretch`, and there is no `width`, so a row-direction parent gives it zero area.
|
|
@@ -174,8 +171,8 @@ stretch`, and there is no `width`, so a row-direction parent gives it zero area.
|
|
|
174
171
|
</div>
|
|
175
172
|
```
|
|
176
173
|
|
|
177
|
-
**4. No margin
|
|
178
|
-
a spacing class.
|
|
174
|
+
**4. No vertical margin.** The parent owns the rhythm. `fullBleed` only adds
|
|
175
|
+
negative inline margins; use the parent's `gap` or a spacing class vertically.
|
|
179
176
|
|
|
180
177
|
**5. No `color` prop.** Its sibling `ScVDivider` has one; this doesn't. To recolour,
|
|
181
178
|
override `background-color` from your own class.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: ScWorkspaceAccountMenu
|
|
3
|
+
package: "@streamoid/ui"
|
|
4
|
+
category: sidebar
|
|
5
|
+
status: stable
|
|
6
|
+
renders: div
|
|
7
|
+
tags: [sidebar, workspace, account, app-switcher, theme, persistence]
|
|
8
|
+
related: [StreamoidSidebar, ScArtifaxSidebar, ScAppSwitchPanel, ScProfilePopup]
|
|
9
|
+
do_not_confuse_with: [ScProfilePopup, ScWorkspaceSwitcher, ScAppSwitchPanel]
|
|
10
|
+
used_by: [cxo, artifax, catalogix, photogenix]
|
|
11
|
+
required_props: [workspaceName, accountName]
|
|
12
|
+
also_exports: [ScSidebarWorkspaceTrigger, ScSidebarSearchTrigger, ScSidebarAppIdentity, useStreamoidThemePreference, useStreamoidSidebarPreference]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Shared Streamoid sidebar shell
|
|
16
|
+
|
|
17
|
+
`ScWorkspaceAccountMenu` and its companion rail controls keep the constant
|
|
18
|
+
sidebar chrome identical across Streamoid applications. The host still owns
|
|
19
|
+
routes, navigation data, user/workspace data, positioning, and dialogs.
|
|
20
|
+
|
|
21
|
+
## TL;DR for agents
|
|
22
|
+
|
|
23
|
+
- **Reach for it when:** building the standard workspace menu opened from the
|
|
24
|
+
top-left of a Streamoid application sidebar.
|
|
25
|
+
- Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and
|
|
26
|
+
`ScSidebarAppIdentity` for the matching constant rail controls.
|
|
27
|
+
- Use the two preference hooks so theme and expanded/collapsed state survive an
|
|
28
|
+
app switch across Streamoid subdomains.
|
|
29
|
+
|
|
30
|
+
## 1. How to use it
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import {
|
|
34
|
+
ScWorkspaceAccountMenu,
|
|
35
|
+
useStreamoidSidebarPreference,
|
|
36
|
+
useStreamoidThemePreference,
|
|
37
|
+
} from "@streamoid/ui";
|
|
38
|
+
|
|
39
|
+
const sidebar = useStreamoidSidebarPreference({
|
|
40
|
+
legacyCollapsedKeys: ["my-app-sidebar-collapsed"],
|
|
41
|
+
});
|
|
42
|
+
const theme = useStreamoidThemePreference({
|
|
43
|
+
legacyStorageKeys: ["canvas_theme"],
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Purpose |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| `workspaceName` | `string` | required | Current workspace label. |
|
|
50
|
+
| `workspaceRole` | `string` | `"Member"` | Role shown below the workspace. |
|
|
51
|
+
| `workspaceImage` | `string` | none | Optional square workspace image. |
|
|
52
|
+
| `credits` | `ReactNode` | none | Value shown as credits left beside Billing & Usage. |
|
|
53
|
+
| `onSwitchWorkspace` | `() => void` | none | Opens the workspace switch/create flow. |
|
|
54
|
+
| `onInviteMembers` | `() => void` | none | Opens workspace members. |
|
|
55
|
+
| `onBilling` | `() => void` | none | Opens billing and usage. |
|
|
56
|
+
| `organizationName` | `string` | none | Current organization name. |
|
|
57
|
+
| `onOrganizationClick` | `() => void` | none | Opens organization settings. |
|
|
58
|
+
| `accountName` | `string` | required | Signed-in user name. |
|
|
59
|
+
| `accountEmail` | `string` | none | Signed-in email. |
|
|
60
|
+
| `onAccountClick` | `() => void` | none | Opens account/profile settings. |
|
|
61
|
+
| `themeMode` | `light \| dark \| system` | `system` | Selected theme icon. |
|
|
62
|
+
| `onThemeModeChange` | `(mode) => void` | none | Updates the host theme. |
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
<ScWorkspaceAccountMenu
|
|
66
|
+
workspaceName={workspace.name}
|
|
67
|
+
workspaceRole={workspace.role}
|
|
68
|
+
credits={workspace.credits}
|
|
69
|
+
organizationName={organization.name}
|
|
70
|
+
accountName={user.name}
|
|
71
|
+
accountEmail={user.email}
|
|
72
|
+
themeMode={theme.preference}
|
|
73
|
+
onThemeModeChange={theme.setPreference}
|
|
74
|
+
/>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 2. Where to use it
|
|
78
|
+
|
|
79
|
+
Render the panel beside the top workspace trigger. Render the app identity at
|
|
80
|
+
the bottom of the sidebar and open `ScAppSwitchPanel` from that row.
|
|
81
|
+
|
|
82
|
+
## 3. When to use it
|
|
83
|
+
|
|
84
|
+
Use it in authenticated application shells. Login pages, standalone settings
|
|
85
|
+
screens, and embedded widgets should not render the full sidebar menu.
|
|
86
|
+
|
|
87
|
+
## 4. Why to use it
|
|
88
|
+
|
|
89
|
+
The package fixes layout, copy, theme selection, and app-switch affordances in
|
|
90
|
+
one release. Apps only supply data and routing callbacks, avoiding five drifting
|
|
91
|
+
copies of the same shell.
|
|
92
|
+
|
|
93
|
+
## Gotchas
|
|
94
|
+
|
|
95
|
+
- The menu is a panel body only; the host owns open state, placement, overlay,
|
|
96
|
+
outside-click dismissal, and mobile presentation.
|
|
97
|
+
- The preference hooks write a parent-domain cookie on `.test.streamoid.com`
|
|
98
|
+
and `.streamoid.com`. On localhost the cookie is host-only and works across
|
|
99
|
+
ports.
|
|
100
|
+
- Legacy sidebar keys describe the collapsed state, while the hook exposes the
|
|
101
|
+
positive `expanded` state. Both hooks continue mirroring supplied legacy keys
|
|
102
|
+
so older code in the same host stays synchronized during migration.
|
|
103
|
+
|
|
104
|
+
## In the wild
|
|
105
|
+
|
|
106
|
+
No host render site found before the `0.6.19` rollout. The first consumer is the
|
|
107
|
+
CXO dashboard sidebar integration shipped with this release.
|
|
108
|
+
|
|
109
|
+
## Related
|
|
110
|
+
|
|
111
|
+
- `StreamoidSidebar` — the common config-driven rail.
|
|
112
|
+
- `ScArtifaxSidebar` — the sectioned rail used by Artifax and Tactix.
|
|
113
|
+
- `ScAppSwitchPanel` — the app list opened from the bottom app identity.
|
|
114
|
+
- `ScProfilePopup` — the previous profile-first menu; do not use it for the new
|
|
115
|
+
workspace-first shell.
|
|
@@ -27,17 +27,17 @@ hand-rolled in each.
|
|
|
27
27
|
CTA (→ `ScWorkspaceCard`), a mobile row (→ `ScWorkspaceSwitchMobileV2`), or a bare
|
|
28
28
|
workspace identity line (→ `ScProfilePopup`'s workspace block).
|
|
29
29
|
- **Five things that will bite you:**
|
|
30
|
-
1.
|
|
31
|
-
|
|
30
|
+
1. The secondary settings/leave actions are hover-gated. The whole `otherWS`
|
|
31
|
+
card is clickable and keyboard-activatable when `onSwitch` is supplied.
|
|
32
32
|
2. `role` is a **free string** and drives everything: `role.toLowerCase() === "admin"`
|
|
33
33
|
picks amber text **and** the settings button; anything else (including
|
|
34
34
|
`"owner"`) gets info-blue and the **red leave** button.
|
|
35
|
-
3. Its props do **not** extend `HTMLAttributes` — no
|
|
36
|
-
|
|
35
|
+
3. Its props do **not** extend `HTMLAttributes` — no custom `style`, `data-*`,
|
|
36
|
+
or `aria-*`. Use `onSwitch` for the card activation contract.
|
|
37
37
|
4. ⚠️ `ownerId` defaults to a real person's address, **`"rohan@streamoid.com"`**,
|
|
38
38
|
and `wsName` to `"Workspace name is kepler"`.
|
|
39
|
-
5. `
|
|
40
|
-
|
|
39
|
+
5. `onSwitch` is invoked by the whole `otherWS` card and by its hover button;
|
|
40
|
+
the button stops propagation so it fires only once.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -76,7 +76,7 @@ import "@streamoid/ui/dist/index.css"; // once, at your app root
|
|
|
76
76
|
| `type` | `"currentWS"` \| `"otherWS"` | `"currentWS"` | ⚠️ Defaults to **current**. Drives surface, border, cursor and whether "Switch Workspace" can appear. |
|
|
77
77
|
| `hover` | `boolean` | – | Controlled override of the internal hover state. `undefined` → the card tracks its own mouse enter/leave. Pass `true` to force the actions visible (Figma parity / tests). |
|
|
78
78
|
| `className` | `string` | – | Appended after the internal classes. |
|
|
79
|
-
| `onSwitch` | `() => void` | – |
|
|
79
|
+
| `onSwitch` | `() => void` | – | Activates the whole `otherWS` card and its hover button. |
|
|
80
80
|
| `onSettings` | `() => void` | – | Settings icon button. **admin + hover only** (both `type`s). |
|
|
81
81
|
| `onLeave` | `() => void` | – | Red leave button. **non-admin + hover only** (both `type`s). |
|
|
82
82
|
|
|
@@ -90,7 +90,7 @@ Nothing else is accepted — `ScWorkspaceSwitchCardProps` is a plain interface,
|
|
|
90
90
|
| Surface | `surface-raised` + `border-default`, `cursor: default` | `surface-base` + `border-subtle`, `cursor: pointer`; hover → `surface-basesubtle` |
|
|
91
91
|
| Tile | `ScDp` forced to **90 × 90**, `radius-xl`, bg `neutralactive` | same, bg `neutralselected` |
|
|
92
92
|
| Details | Role · Plan · Workspace Owner, split by two `ScVDivider`s | identical |
|
|
93
|
-
|
|
|
93
|
+
| Switch action | **never** | whole card; labelled button also appears on hover |
|
|
94
94
|
| Settings icon | hover **and** `role` is admin | hover **and** `role` is admin |
|
|
95
95
|
| Leave (red) | hover **and** `role` is not admin | hover **and** `role` is not admin |
|
|
96
96
|
|
|
@@ -133,12 +133,12 @@ Role colour: admin → `text-and-icons-warning` (amber); everything else →
|
|
|
133
133
|
// Force the actions visible — screenshots, Figma parity, or a touch fallback
|
|
134
134
|
<ScWorkspaceSwitchCard wsName={ws.name} type="otherWS" hover onSwitch={switchTo} />
|
|
135
135
|
|
|
136
|
-
//
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
// The other-workspace card is pointer and keyboard reachable by default.
|
|
137
|
+
<ScWorkspaceSwitchCard
|
|
138
|
+
wsName={ws.name}
|
|
139
|
+
type="otherWS"
|
|
140
|
+
onSwitch={() => void switchTo(ws)}
|
|
141
|
+
/>
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
---
|
|
@@ -224,10 +224,9 @@ is the DS's own attempt at that modal, but no app uses it (see its README).
|
|
|
224
224
|
|
|
225
225
|
## Gotchas
|
|
226
226
|
|
|
227
|
-
**1.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
or `hover` forced on for touch), or use the `*Mobile` twins.
|
|
227
|
+
**1. Settings and leave remain hover/focus actions.** Switching is available by
|
|
228
|
+
clicking or pressing Enter/Space on the whole `otherWS` card. Touch-first layouts
|
|
229
|
+
that need settings/leave should still use the `*Mobile` twins.
|
|
231
230
|
|
|
232
231
|
**2. `role` is a free string with real consequences.**
|
|
233
232
|
|
|
@@ -250,13 +249,12 @@ treated as a non-admin.
|
|
|
250
249
|
`"Free" + "rohan@streamoid.com"` because the store's `/workspaces` payload has no
|
|
251
250
|
plan. Always pass real values, or `""`.
|
|
252
251
|
|
|
253
|
-
**4. No `onClick` / `style` / `data-*`
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
**4. No custom `onClick` / `style` / `data-*` props.** The interface does not
|
|
253
|
+
extend `HTMLAttributes`; use the semantic `onSwitch`, `onSettings`, and `onLeave`
|
|
254
|
+
callbacks.
|
|
256
255
|
|
|
257
|
-
**5. The `otherWS`
|
|
258
|
-
|
|
259
|
-
Either wrap the card in your own click handler or accept the mismatch.
|
|
256
|
+
**5. The whole `otherWS` card switches.** Do not wrap it in a second click handler,
|
|
257
|
+
or the same transition may be requested twice.
|
|
260
258
|
|
|
261
259
|
**6. `ScDp`'s `size` is overridden.** `.dp` forces `width/height: 90px !important`, so
|
|
262
260
|
the nested tile is always 90px regardless of anything you would pass. The tile's
|
|
@@ -9,6 +9,7 @@ related: [ScSideBarLogoUnit, ScAppSwitchPanel, ScSidebarMenu, ScAskAgentButton,
|
|
|
9
9
|
do_not_confuse_with: [ScSidebar, ScArtifaxSidebar, ScCatalogixSidebar, ScSidebarMenu, ScLogoUnit]
|
|
10
10
|
used_by: [cxo, photogenix, catalogix]
|
|
11
11
|
required_props: [expanded, onToggle, config, iconMap]
|
|
12
|
+
also_exports: [ScSidebarResizeHandle, advanceSidebarResizeGesture, SIDEBAR_RESIZE_THRESHOLD_PX]
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
# StreamoidSidebar
|
|
@@ -80,6 +81,8 @@ const iconMap: SidebarIconMap = { bag: <SiconBag /> };
|
|
|
80
81
|
|---|---|---|---|
|
|
81
82
|
| `expanded` | `boolean` | — | **Required.** You own the state. `true` → 256px rounded card; `false` → 56px rail. Two completely different render branches. |
|
|
82
83
|
| `onToggle` | `() => void` | — | **Required.** Fired by the collapse toggle (and the mobile close icon). |
|
|
84
|
+
| `resizable` | `boolean` | `false` | Shows the shared 12px right-edge resize handle on desktop. The rail still has only expanded and collapsed widths. |
|
|
85
|
+
| `onExpandedChange` | `(expanded: boolean) => void` | – | Controlled resize callback. One drag may call it more than once as the pointer reverses; omit it to fall back to `onToggle`. |
|
|
83
86
|
| `config` | `SidebarConfig` | — | **Required.** `{ topItem?, sections, bottomItems? }`. Pass `{ sections: [] }` if you drive nav via `bodyContent`. |
|
|
84
87
|
| `iconMap` | `SidebarIconMap` | — | **Required.** `Record<iconKey, ReactNode \| ({item, active, expanded}) => ReactNode>`. A missing key renders **no icon**, silently. |
|
|
85
88
|
| `activeItemId` | `string` | – | Matching item gets `state="active"`. |
|
|
@@ -337,6 +340,13 @@ no `<nav>`/`aria-label`; wrap it yourself:
|
|
|
337
340
|
is `width: 56`. Not responsive, not overridable via props — hosts measure these
|
|
338
341
|
constants themselves.
|
|
339
342
|
|
|
343
|
+
The optional resize edge is a two-state gesture, not a free-width splitter.
|
|
344
|
+
After either state change it re-anchors at the crossing point, so the user can
|
|
345
|
+
collapse and expand again in the same uninterrupted drag. Hosts should pass a
|
|
346
|
+
controlled setter: `onExpandedChange={setExpanded}`. In the collapsed state,
|
|
347
|
+
the 12px hit target straddles the rail boundary and its blue line renders just
|
|
348
|
+
outside the rail; expanded positioning remains on the wrapper's outside edge.
|
|
349
|
+
|
|
340
350
|
**12. Tailwind utilities are a hard requirement.** The component's structure is
|
|
341
351
|
`className="flex flex-col flex-1 min-h-0 overflow-y-auto shrink-0 truncate …"` with
|
|
342
352
|
inline styles only for colours/spacing. `dist/index.css` ships the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@streamoid/ui",
|
|
3
|
-
"count":
|
|
3
|
+
"count": 125,
|
|
4
4
|
"components": {
|
|
5
5
|
"ScAccess": {
|
|
6
6
|
"doc": "ScAccess.md",
|
|
@@ -2691,7 +2691,57 @@
|
|
|
2691
2691
|
"photogenix",
|
|
2692
2692
|
"catalogix"
|
|
2693
2693
|
],
|
|
2694
|
-
"alsoExports": [
|
|
2694
|
+
"alsoExports": [
|
|
2695
|
+
"ScSidebarResizeHandle",
|
|
2696
|
+
"advanceSidebarResizeGesture",
|
|
2697
|
+
"SIDEBAR_RESIZE_THRESHOLD_PX"
|
|
2698
|
+
],
|
|
2699
|
+
"exported": true
|
|
2700
|
+
},
|
|
2701
|
+
"ScWorkspaceAccountMenu": {
|
|
2702
|
+
"doc": "ScWorkspaceAccountMenu.md",
|
|
2703
|
+
"source": "src/SC-SidebarShell",
|
|
2704
|
+
"category": "sidebar",
|
|
2705
|
+
"status": "stable",
|
|
2706
|
+
"renders": "div",
|
|
2707
|
+
"summary": "Reach for it when:",
|
|
2708
|
+
"reachForWhen": "building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains.",
|
|
2709
|
+
"tags": [
|
|
2710
|
+
"sidebar",
|
|
2711
|
+
"workspace",
|
|
2712
|
+
"account",
|
|
2713
|
+
"app-switcher",
|
|
2714
|
+
"theme",
|
|
2715
|
+
"persistence"
|
|
2716
|
+
],
|
|
2717
|
+
"related": [
|
|
2718
|
+
"StreamoidSidebar",
|
|
2719
|
+
"ScArtifaxSidebar",
|
|
2720
|
+
"ScAppSwitchPanel",
|
|
2721
|
+
"ScProfilePopup"
|
|
2722
|
+
],
|
|
2723
|
+
"doNotConfuseWith": [
|
|
2724
|
+
"ScProfilePopup",
|
|
2725
|
+
"ScWorkspaceSwitcher",
|
|
2726
|
+
"ScAppSwitchPanel"
|
|
2727
|
+
],
|
|
2728
|
+
"requiredProps": [
|
|
2729
|
+
"workspaceName",
|
|
2730
|
+
"accountName"
|
|
2731
|
+
],
|
|
2732
|
+
"usedBy": [
|
|
2733
|
+
"cxo",
|
|
2734
|
+
"artifax",
|
|
2735
|
+
"catalogix",
|
|
2736
|
+
"photogenix"
|
|
2737
|
+
],
|
|
2738
|
+
"alsoExports": [
|
|
2739
|
+
"ScSidebarWorkspaceTrigger",
|
|
2740
|
+
"ScSidebarSearchTrigger",
|
|
2741
|
+
"ScSidebarAppIdentity",
|
|
2742
|
+
"useStreamoidThemePreference",
|
|
2743
|
+
"useStreamoidSidebarPreference"
|
|
2744
|
+
],
|
|
2695
2745
|
"exported": true
|
|
2696
2746
|
},
|
|
2697
2747
|
"ScSlider": {
|
|
@@ -4837,6 +4887,38 @@
|
|
|
4837
4887
|
"documentedIn": "ScSideBarLogoUnit",
|
|
4838
4888
|
"doc": "ScSideBarLogoUnit.md"
|
|
4839
4889
|
},
|
|
4890
|
+
"ScSidebarResizeHandle": {
|
|
4891
|
+
"documentedIn": "StreamoidSidebar",
|
|
4892
|
+
"doc": "StreamoidSidebar.md"
|
|
4893
|
+
},
|
|
4894
|
+
"advanceSidebarResizeGesture": {
|
|
4895
|
+
"documentedIn": "StreamoidSidebar",
|
|
4896
|
+
"doc": "StreamoidSidebar.md"
|
|
4897
|
+
},
|
|
4898
|
+
"SIDEBAR_RESIZE_THRESHOLD_PX": {
|
|
4899
|
+
"documentedIn": "StreamoidSidebar",
|
|
4900
|
+
"doc": "StreamoidSidebar.md"
|
|
4901
|
+
},
|
|
4902
|
+
"ScSidebarWorkspaceTrigger": {
|
|
4903
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
4904
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
4905
|
+
},
|
|
4906
|
+
"ScSidebarSearchTrigger": {
|
|
4907
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
4908
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
4909
|
+
},
|
|
4910
|
+
"ScSidebarAppIdentity": {
|
|
4911
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
4912
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
4913
|
+
},
|
|
4914
|
+
"useStreamoidThemePreference": {
|
|
4915
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
4916
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
4917
|
+
},
|
|
4918
|
+
"useStreamoidSidebarPreference": {
|
|
4919
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
4920
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
4921
|
+
},
|
|
4840
4922
|
"formatSubAgentLabel": {
|
|
4841
4923
|
"documentedIn": "ScSubAgent",
|
|
4842
4924
|
"doc": "ScSubAgent.md"
|