@kiefer-tek/sophea-design-system 0.15.5 → 0.15.7

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/index.css CHANGED
@@ -10475,6 +10475,45 @@ tbody tr:hover .sn-Table-module__td--jv9tA {
10475
10475
  box-shadow: 0 0 0 2px var(--action-link-04);
10476
10476
  }
10477
10477
 
10478
+ /* Full-width "bar" trigger — avatar + name/email row for a wide sidebar. */
10479
+ .sn-AccountMenu-module__triggerBar--1deLW {
10480
+ display: flex;
10481
+ align-items: center;
10482
+ gap: 0.625rem;
10483
+ width: 100%;
10484
+ min-width: 0;
10485
+ padding: 0.375rem 0.5rem;
10486
+ border: 0;
10487
+ background: transparent;
10488
+ border-radius: 12px;
10489
+ cursor: pointer;
10490
+ text-align: start;
10491
+ outline: none;
10492
+ }
10493
+
10494
+ .sn-AccountMenu-module__triggerBar--1deLW:hover {
10495
+ background: var(--shell-chrome-hover-bg);
10496
+ }
10497
+
10498
+ .sn-AccountMenu-module__triggerBar--1deLW:focus-visible {
10499
+ box-shadow: 0 0 0 2px var(--action-link-04);
10500
+ }
10501
+
10502
+ .sn-AccountMenu-module__barIdentity--UoPcg {
10503
+ display: flex;
10504
+ flex-direction: column;
10505
+ min-width: 0;
10506
+ flex: 1;
10507
+ }
10508
+
10509
+ /* Avatar + badge anchor (so the badge positions to the avatar in either
10510
+ trigger shape). */
10511
+ .sn-AccountMenu-module__avatarWrap--j5Q62 {
10512
+ position: relative;
10513
+ display: inline-flex;
10514
+ flex-shrink: 0;
10515
+ }
10516
+
10478
10517
  /* Unread badge on the avatar — top-right pill. */
10479
10518
  .sn-AccountMenu-module__avatarBadge--2qs2m {
10480
10519
  position: absolute;
@@ -10865,6 +10904,34 @@ tbody tr:hover .sn-Table-module__td--jv9tA {
10865
10904
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
10866
10905
  }
10867
10906
 
10907
+ /* SingleSidebar — full-height flush panel for the one-sidebar shell variant.
10908
+ Width is set inline (collapsed/expanded px); a flex column so the consumer's
10909
+ content fills and an `mt-auto` footer pins. The Root's overflow:hidden +
10910
+ border-radius clip its outer corners; the right edge is square against Main
10911
+ with a divider. */
10912
+ .sn-AppShell-module__singleSidebar--lYabJ {
10913
+ position: relative;
10914
+ display: flex;
10915
+ flex-direction: column;
10916
+ flex-shrink: 0;
10917
+ height: 100%;
10918
+ overflow: hidden;
10919
+ border-inline-end: 1px solid var(--shell-divider);
10920
+ /* Glass (default): frosted over the aurora — mirrors the rail glass. */
10921
+ background: var(--shell-region-glass);
10922
+ -webkit-backdrop-filter: blur(12px);
10923
+ backdrop-filter: blur(12px);
10924
+ transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1);
10925
+ }
10926
+
10927
+ /* Solid: opaque surface, no blur — a shade below the s2 widgets inside it so
10928
+ they still read as elevated cards. */
10929
+ .sn-AppShell-module__singleSidebar--lYabJ[data-glass="false"] {
10930
+ background: var(--shell-solid-sidebar, var(--surface-s1));
10931
+ -webkit-backdrop-filter: none;
10932
+ backdrop-filter: none;
10933
+ }
10934
+
10868
10935
  @media (min-width: 768px) {
10869
10936
  .sn-AppShell-module__sidebar--9-Zb9 {
10870
10937
  width: var(--shell-sidebar-width, 15rem);
@@ -10966,7 +11033,10 @@ html[data-resizing] .sn-AppShell-module__sidebar--9-Zb9 {
10966
11033
  inset: 0;
10967
11034
  z-index: -1;
10968
11035
  overflow: hidden;
10969
- background: var(--shell-region-glass);
11036
+ /* Glass by default (aurora frosts through the content pane). Tunable so a host
11037
+ can make the main pane opaque while keeping the rail/sidebar glass — e.g. a
11038
+ glass sidebar over an opaque content area. */
11039
+ background: var(--shell-main-backdrop, var(--shell-region-glass));
10970
11040
  }
10971
11041
 
10972
11042
  .sn-AppShell-module__mainBackdropImage--bjtQh {
@@ -11070,6 +11140,46 @@ html[data-resizing] .sn-AppShell-module__sidebar--9-Zb9 {
11070
11140
  width: 100%;
11071
11141
  flex-shrink: 0;
11072
11142
  }
11143
+
11144
+ /* ------------------------------------------------------------ Solid variant
11145
+ <AppShell.Root surface="solid"> — opaque theme surfaces, no glass/blur.
11146
+ Flat dark shell in the dark theme. Each region is tunable via a
11147
+ --shell-solid-* variable (falling back to the DS solid surface tokens). */
11148
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] {
11149
+ background: var(--shell-solid-bg, var(--surface-s1));
11150
+ /* Sidebar shares the main pane's surface (s1) so the shell reads as one flat
11151
+ dark slab separated only by the divider — and so elevated widgets inside it
11152
+ (utility chips, account bar) stand out at s2 instead of blending into a
11153
+ same-surface sidebar. */
11154
+ --shell-solid-sidebar: var(--surface-s1);
11155
+ /* Soften descendant search fields (e.g. CommandPalette.Trigger) so they read
11156
+ as a subtle elevated surface on the flat dark shell, not a bright box. */
11157
+ --command-palette-trigger-bg: var(--surface-s2);
11158
+ --command-palette-trigger-bg-hover: var(--surface-s3);
11159
+ --command-palette-trigger-border: var(--shell-divider);
11160
+ }
11161
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] .sn-AppShell-module__rail--RlMBL {
11162
+ background: var(--shell-solid-rail, var(--surface-s2));
11163
+ -webkit-backdrop-filter: none;
11164
+ backdrop-filter: none;
11165
+ }
11166
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] .sn-AppShell-module__sidebar--9-Zb9 {
11167
+ background: var(--shell-solid-sidebar, var(--surface-s2));
11168
+ }
11169
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] .sn-AppShell-module__drawer--3Zhql {
11170
+ background-color: var(--shell-solid-sidebar, var(--surface-s2));
11171
+ background-image: none;
11172
+ box-shadow: none;
11173
+ -webkit-backdrop-filter: none;
11174
+ backdrop-filter: none;
11175
+ }
11176
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] .sn-AppShell-module__mainBackdrop--oikM- {
11177
+ background: var(--shell-solid-main, var(--surface-s1));
11178
+ }
11179
+ .sn-AppShell-module__root--PpqXq[data-surface="solid"] .sn-AppShell-module__mainBackdropFrost--BmFr9 {
11180
+ -webkit-backdrop-filter: none;
11181
+ backdrop-filter: none;
11182
+ }
11073
11183
  /* CommandPalette — tokens only. Trigger mirrors the AppShell header search
11074
11184
  field; overlay/panel mirror the DS Modal substrate; result highlight reuses
11075
11185
  the shell rail-item selection tint. */
@@ -11085,9 +11195,13 @@ html[data-resizing] .sn-AppShell-module__sidebar--9-Zb9 {
11085
11195
  max-width: 448px;
11086
11196
  height: 36px;
11087
11197
  padding: 0 10px 0 12px;
11088
- border: 1px solid var(--border-04);
11089
- border-radius: 8px;
11090
- background: var(--shell-search-bg);
11198
+ /* Matches the DS SearchInput field by default (surface-s3 / border-04 / 10px
11199
+ radius). The fill + border are tunable so a host shell can soften them —
11200
+ e.g. AppShell `surface="solid"` makes them a subtle elevated surface so the
11201
+ field doesn't read as a bright floating box on a flat dark page. */
11202
+ border: 1px solid var(--command-palette-trigger-border, var(--border-04));
11203
+ border-radius: 10px;
11204
+ background: var(--command-palette-trigger-bg, var(--surface-s3));
11091
11205
  color: var(--text-03);
11092
11206
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
11093
11207
  font-size: 14px;
@@ -11098,7 +11212,7 @@ html[data-resizing] .sn-AppShell-module__sidebar--9-Zb9 {
11098
11212
  }
11099
11213
 
11100
11214
  .sn-CommandPalette-module__trigger--ZE1so:hover {
11101
- background: var(--shell-search-bg-open);
11215
+ background: var(--command-palette-trigger-bg-hover, var(--surface-s4));
11102
11216
  }
11103
11217
 
11104
11218
  .sn-CommandPalette-module__trigger--ZE1so:focus-visible {
package/dist/index.js CHANGED
@@ -8189,6 +8189,9 @@ const IllustrationContent = forwardRef(
8189
8189
  }
8190
8190
  );
8191
8191
  const trigger$1 = "sn-AccountMenu-module__trigger--EHklO";
8192
+ const triggerBar = "sn-AccountMenu-module__triggerBar--1deLW";
8193
+ const barIdentity = "sn-AccountMenu-module__barIdentity--UoPcg";
8194
+ const avatarWrap = "sn-AccountMenu-module__avatarWrap--j5Q62";
8192
8195
  const avatarBadge = "sn-AccountMenu-module__avatarBadge--2qs2m";
8193
8196
  const itemBadge = "sn-AccountMenu-module__itemBadge--7gWAX";
8194
8197
  const identityName = "sn-AccountMenu-module__identityName--h6xu9";
@@ -8201,6 +8204,9 @@ const notifTitle$1 = "sn-AccountMenu-module__notifTitle--MR2jU";
8201
8204
  const notifBody$1 = "sn-AccountMenu-module__notifBody--RH0Ym";
8202
8205
  const styles$i = {
8203
8206
  trigger: trigger$1,
8207
+ triggerBar,
8208
+ barIdentity,
8209
+ avatarWrap,
8204
8210
  avatarBadge,
8205
8211
  itemBadge,
8206
8212
  identityName,
@@ -8223,6 +8229,7 @@ const AccountMenu = forwardRef(function AccountMenu2({
8223
8229
  avatarTone = "brand",
8224
8230
  avatarSize = "md",
8225
8231
  items,
8232
+ triggerVariant = "avatar",
8226
8233
  notifications,
8227
8234
  side = "right",
8228
8235
  align = "end",
@@ -8240,10 +8247,25 @@ const AccountMenu = forwardRef(function AccountMenu2({
8240
8247
  if (!next) setView("menu");
8241
8248
  };
8242
8249
  return /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange, children: [
8243
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { ref, type: "button", "aria-label": ariaLabel, className: cx$2(styles$i.trigger, className), children: [
8244
- /* @__PURE__ */ jsx(Avatar, { src: avatarSrc, alt: avatarAlt, tone: avatarTone, size: avatarSize, children: initials }),
8245
- notifications && hasUnread ? /* @__PURE__ */ jsx("span", { className: styles$i.avatarBadge, "aria-hidden": "true", children: formatBadge(count2) }) : null
8246
- ] }) }),
8250
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8251
+ "button",
8252
+ {
8253
+ ref,
8254
+ type: "button",
8255
+ "aria-label": ariaLabel,
8256
+ className: cx$2(triggerVariant === "bar" ? styles$i.triggerBar : styles$i.trigger, className),
8257
+ children: [
8258
+ /* @__PURE__ */ jsxs("span", { className: styles$i.avatarWrap, children: [
8259
+ /* @__PURE__ */ jsx(Avatar, { src: avatarSrc, alt: avatarAlt, tone: avatarTone, size: avatarSize, children: initials }),
8260
+ notifications && hasUnread ? /* @__PURE__ */ jsx("span", { className: styles$i.avatarBadge, "aria-hidden": "true", children: formatBadge(count2) }) : null
8261
+ ] }),
8262
+ triggerVariant === "bar" ? /* @__PURE__ */ jsxs("span", { className: styles$i.barIdentity, children: [
8263
+ name2 ? /* @__PURE__ */ jsx("span", { className: styles$i.identityName, children: name2 }) : null,
8264
+ email ? /* @__PURE__ */ jsx("span", { className: styles$i.identityEmail, children: email }) : null
8265
+ ] }) : null
8266
+ ]
8267
+ }
8268
+ ) }),
8247
8269
  /* @__PURE__ */ jsx(
8248
8270
  DropdownMenuContent,
8249
8271
  {
@@ -8312,6 +8334,7 @@ const railItemIconOnly = "sn-AppShell-module__railItemIconOnly--SKMyQ";
8312
8334
  const railItemPill = "sn-AppShell-module__railItemPill--B67qF";
8313
8335
  const railItemIcon = "sn-AppShell-module__railItemIcon--pLfnP";
8314
8336
  const railItemLabel = "sn-AppShell-module__railItemLabel--1CFas";
8337
+ const singleSidebar = "sn-AppShell-module__singleSidebar--lYabJ";
8315
8338
  const sidebarInner = "sn-AppShell-module__sidebarInner--8gOCY";
8316
8339
  const sidebarToggle = "sn-AppShell-module__sidebarToggle--Pof9K";
8317
8340
  const resizeHandle = "sn-AppShell-module__resizeHandle--uB0bK";
@@ -8340,6 +8363,7 @@ const styles$h = {
8340
8363
  railItemPill,
8341
8364
  railItemIcon,
8342
8365
  railItemLabel,
8366
+ singleSidebar,
8343
8367
  sidebarInner,
8344
8368
  sidebarToggle,
8345
8369
  resizeHandle,
@@ -8382,7 +8406,7 @@ function AppShellProvider({
8382
8406
  }
8383
8407
  );
8384
8408
  }
8385
- const AppShellRoot = forwardRef(function AppShellRoot2({ drawerOpen, onDrawerOpenChange, children, className, ...rest }, ref) {
8409
+ const AppShellRoot = forwardRef(function AppShellRoot2({ drawerOpen, onDrawerOpenChange, surface = "glass", children, className, ...rest }, ref) {
8386
8410
  const ctx = useContext(AppShellContext);
8387
8411
  const open = drawerOpen ?? ctx?.drawerOpen ?? false;
8388
8412
  const setOpen = onDrawerOpenChange ?? ctx?.setDrawerOpen;
@@ -8392,7 +8416,7 @@ const AppShellRoot = forwardRef(function AppShellRoot2({ drawerOpen, onDrawerOpe
8392
8416
  if (roleOf(child) === "drawer") drawerChildren.push(child);
8393
8417
  else rowChildren.push(child);
8394
8418
  });
8395
- return /* @__PURE__ */ jsxs("div", { ref, className: cx$1(styles$h.root, className), ...rest, children: [
8419
+ return /* @__PURE__ */ jsxs("div", { ref, className: cx$1(styles$h.root, className), "data-surface": surface, ...rest, children: [
8396
8420
  /* @__PURE__ */ jsx("span", { className: styles$h.topAccent, "aria-hidden": "true" }),
8397
8421
  /* @__PURE__ */ jsx(
8398
8422
  "button",
@@ -8547,6 +8571,36 @@ const AppShellSidebar = forwardRef(function AppShellSidebar2({
8547
8571
  );
8548
8572
  });
8549
8573
  AppShellSidebar[ROLE] = "drawer";
8574
+ const AppShellSingleSidebar = forwardRef(
8575
+ function AppShellSingleSidebar2({
8576
+ glass = true,
8577
+ collapsed,
8578
+ expandedWidth = 232,
8579
+ collapsedWidth = 64,
8580
+ children,
8581
+ className,
8582
+ style,
8583
+ "aria-label": ariaLabel,
8584
+ ...rest
8585
+ }, ref) {
8586
+ const ctx = useContext(AppShellContext);
8587
+ const isCollapsed = collapsed ?? ctx?.sidebarFolded ?? false;
8588
+ return /* @__PURE__ */ jsx(
8589
+ "aside",
8590
+ {
8591
+ ref,
8592
+ className: cx$1(styles$h.singleSidebar, className),
8593
+ "data-glass": glass ? "true" : "false",
8594
+ "data-collapsed": isCollapsed ? "true" : "false",
8595
+ "aria-label": ariaLabel ?? "Sidebar",
8596
+ style: { width: isCollapsed ? collapsedWidth : expandedWidth, ...style },
8597
+ ...rest,
8598
+ children
8599
+ }
8600
+ );
8601
+ }
8602
+ );
8603
+ AppShellSingleSidebar[ROLE] = "drawer";
8550
8604
  const SidebarToggleIcon = (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", width: 16, height: 16, ...props, children: [
8551
8605
  /* @__PURE__ */ jsx("path", { stroke: "currentColor", strokeWidth: 1.5, d: "M2.5 9h19M8 21.5V9" }),
8552
8606
  /* @__PURE__ */ jsx(
@@ -8602,12 +8656,12 @@ const AppShellMain = forwardRef(function AppShellMain2({ backgroundCss, children
8602
8656
  footer2
8603
8657
  ] });
8604
8658
  });
8605
- const AppShellHeader = forwardRef(function AppShellHeader2({ left, center, right: right2, className, ...rest }, ref) {
8606
- return /* @__PURE__ */ jsxs("header", { ref, className: cx$1(styles$h.header, className), ...rest, children: [
8659
+ const AppShellHeader = forwardRef(function AppShellHeader2({ left, center, right: right2, children, className, ...rest }, ref) {
8660
+ return /* @__PURE__ */ jsx("header", { ref, className: cx$1(styles$h.header, className), ...rest, children: children != null ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
8607
8661
  /* @__PURE__ */ jsx("div", { className: styles$h.headerLeft, children: left }),
8608
8662
  /* @__PURE__ */ jsx("div", { className: styles$h.headerCenter, children: center }),
8609
8663
  /* @__PURE__ */ jsx("div", { className: styles$h.headerRight, children: right2 })
8610
- ] });
8664
+ ] }) });
8611
8665
  });
8612
8666
  AppShellHeader[ROLE] = "header";
8613
8667
  const AppShellMainFooter = forwardRef(
@@ -8621,6 +8675,7 @@ const AppShell = Object.assign(AppShellRoot, {
8621
8675
  Rail: AppShellRail,
8622
8676
  RailItem: AppShellRailItem,
8623
8677
  Sidebar: AppShellSidebar,
8678
+ SingleSidebar: AppShellSingleSidebar,
8624
8679
  SidebarToggle: AppShellSidebarToggle,
8625
8680
  Main: AppShellMain,
8626
8681
  Header: AppShellHeader,
@@ -11592,6 +11647,7 @@ export {
11592
11647
  AppShellRoot,
11593
11648
  AppShellSidebar,
11594
11649
  AppShellSidebarToggle,
11650
+ AppShellSingleSidebar,
11595
11651
  AspectRatio,
11596
11652
  Attachment,
11597
11653
  Avatar,