@kiefer-tek/sophea-design-system 0.15.1 → 0.15.3
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,28 @@ 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, onClick, "aria-label": ariaLabel, ...rest }, ref) {
|
|
8327
8329
|
const Comp = asChild ? Slot : "button";
|
|
8330
|
+
const accessibleName = ariaLabel ?? (hideLabel && typeof label2 === "string" ? label2 : void 0);
|
|
8331
|
+
const handleClick = (event) => {
|
|
8332
|
+
onClick?.(event);
|
|
8333
|
+
if (!event.defaultPrevented) onSelect?.();
|
|
8334
|
+
};
|
|
8328
8335
|
return /* @__PURE__ */ jsxs(
|
|
8329
8336
|
Comp,
|
|
8330
8337
|
{
|
|
8331
8338
|
ref,
|
|
8332
|
-
className: cx(styles$g.railItem, className),
|
|
8339
|
+
className: cx(styles$g.railItem, hideLabel && styles$g.railItemIconOnly, className),
|
|
8333
8340
|
"data-selected": selected2 ? "true" : "false",
|
|
8334
|
-
|
|
8341
|
+
...accessibleName ? { "aria-label": accessibleName } : {},
|
|
8335
8342
|
...asChild ? {} : { type: "button", "aria-pressed": selected2 },
|
|
8336
8343
|
...rest,
|
|
8344
|
+
onClick: handleClick,
|
|
8337
8345
|
children: [
|
|
8338
8346
|
/* @__PURE__ */ jsx(Slottable, { children: asChild ? children : null }),
|
|
8339
8347
|
selected2 ? /* @__PURE__ */ jsx("span", { className: styles$g.railItemPill, "aria-hidden": "true" }) : null,
|
|
8340
8348
|
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 })
|
|
8349
|
+
hideLabel ? null : /* @__PURE__ */ jsx("span", { className: styles$g.railItemLabel, children: label2 })
|
|
8342
8350
|
]
|
|
8343
8351
|
}
|
|
8344
8352
|
);
|