@kiefer-tek/sophea-design-system 0.15.1 → 0.15.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.
package/dist/index.css
CHANGED
|
@@ -10683,6 +10683,14 @@ tbody tr:hover .sn-Table-module__td--jv9tA {
|
|
|
10683
10683
|
color: var(--text-05);
|
|
10684
10684
|
}
|
|
10685
10685
|
|
|
10686
|
+
/* Icon-only (hideLabel): drop the label gap and square up the padding so the
|
|
10687
|
+
glyph reads as a compact icon button. The name is surfaced on hover by the
|
|
10688
|
+
consumer (tooltip) + kept as aria-label. */
|
|
10689
|
+
.sn-AppShell-module__railItemIconOnly--SKMyQ {
|
|
10690
|
+
gap: 0;
|
|
10691
|
+
padding: 0.625rem 0;
|
|
10692
|
+
}
|
|
10693
|
+
|
|
10686
10694
|
/* Selection pill — rendered only when selected (absolute inset-0). */
|
|
10687
10695
|
.sn-AppShell-module__railItemPill--B67qF {
|
|
10688
10696
|
position: absolute;
|
package/dist/index.js
CHANGED
|
@@ -8201,6 +8201,7 @@ const topAccent = "sn-AppShell-module__topAccent--nyV0S";
|
|
|
8201
8201
|
const railHeader = "sn-AppShell-module__railHeader--Z-dh6";
|
|
8202
8202
|
const railItems = "sn-AppShell-module__railItems--q4Ukh";
|
|
8203
8203
|
const railFooter = "sn-AppShell-module__railFooter--96gh-";
|
|
8204
|
+
const railItemIconOnly = "sn-AppShell-module__railItemIconOnly--SKMyQ";
|
|
8204
8205
|
const railItemPill = "sn-AppShell-module__railItemPill--B67qF";
|
|
8205
8206
|
const railItemIcon = "sn-AppShell-module__railItemIcon--pLfnP";
|
|
8206
8207
|
const railItemLabel = "sn-AppShell-module__railItemLabel--1CFas";
|
|
@@ -8228,6 +8229,7 @@ const styles$g = {
|
|
|
8228
8229
|
railHeader,
|
|
8229
8230
|
railItems,
|
|
8230
8231
|
railFooter,
|
|
8232
|
+
railItemIconOnly,
|
|
8231
8233
|
railItemPill,
|
|
8232
8234
|
railItemIcon,
|
|
8233
8235
|
railItemLabel,
|
|
@@ -8323,22 +8325,24 @@ const AppShellRail = forwardRef(function AppShellRail2({ collapsed, header: head
|
|
|
8323
8325
|
});
|
|
8324
8326
|
AppShellRail[ROLE] = "drawer";
|
|
8325
8327
|
const AppShellRailItem = forwardRef(
|
|
8326
|
-
function AppShellRailItem2({ icon: Icon, label: label2, selected: selected2 = false, onSelect, asChild = false, className, children, ...rest }, ref) {
|
|
8328
|
+
function AppShellRailItem2({ icon: Icon, label: label2, selected: selected2 = false, onSelect, asChild = false, hideLabel = false, className, children, "aria-label": ariaLabel, ...rest }, ref) {
|
|
8327
8329
|
const Comp = asChild ? Slot : "button";
|
|
8330
|
+
const accessibleName = ariaLabel ?? (hideLabel && typeof label2 === "string" ? label2 : void 0);
|
|
8328
8331
|
return /* @__PURE__ */ jsxs(
|
|
8329
8332
|
Comp,
|
|
8330
8333
|
{
|
|
8331
8334
|
ref,
|
|
8332
|
-
className: cx(styles$g.railItem, className),
|
|
8335
|
+
className: cx(styles$g.railItem, hideLabel && styles$g.railItemIconOnly, className),
|
|
8333
8336
|
"data-selected": selected2 ? "true" : "false",
|
|
8334
8337
|
onClick: onSelect,
|
|
8338
|
+
...accessibleName ? { "aria-label": accessibleName } : {},
|
|
8335
8339
|
...asChild ? {} : { type: "button", "aria-pressed": selected2 },
|
|
8336
8340
|
...rest,
|
|
8337
8341
|
children: [
|
|
8338
8342
|
/* @__PURE__ */ jsx(Slottable, { children: asChild ? children : null }),
|
|
8339
8343
|
selected2 ? /* @__PURE__ */ jsx("span", { className: styles$g.railItemPill, "aria-hidden": "true" }) : null,
|
|
8340
8344
|
Icon ? /* @__PURE__ */ jsx(Icon, { className: styles$g.railItemIcon, width: 24, height: 24, "aria-hidden": "true" }) : null,
|
|
8341
|
-
/* @__PURE__ */ jsx("span", { className: styles$g.railItemLabel, children: label2 })
|
|
8345
|
+
hideLabel ? null : /* @__PURE__ */ jsx("span", { className: styles$g.railItemLabel, children: label2 })
|
|
8342
8346
|
]
|
|
8343
8347
|
}
|
|
8344
8348
|
);
|