@cjlapao/ui-kit 0.2.11 → 0.2.12
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/{CapsuleBlueprint-BfzZrqRA.d.cts → CapsuleBlueprint-BTIiqZAG.d.cts} +1 -1
- package/dist/{CapsuleBlueprint-BfzZrqRA.d.ts → CapsuleBlueprint-BTIiqZAG.d.ts} +1 -1
- package/dist/index.cjs +170 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +25 -0
- package/dist/index.d.cts +29 -13
- package/dist/index.d.ts +29 -13
- package/dist/index.js +230 -101
- package/dist/index.js.map +1 -1
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1255,4 +1255,4 @@ interface CapsuleBlueprintParameter {
|
|
|
1255
1255
|
[key: string]: any;
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
|
-
export { DEFAULT_CONTROL_CORNER as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, API_ERROR_KIND_CONFIG as D, type AlertIntentConfig as E, type AlertVariantTokens as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, type ApiErrorKindConfig as J, BUTTON_VARIANTS as K, BUTTON_WEIGHTS as L, type BreadcrumbSizeTokens as M, type BreadcrumbToneTokens as N, type Orientation as O, type PlainSurfaceVariant as P, CASCADE_EXPAND as Q, COLLAPSED_RAIL_WIDTH as R, type SurfaceCorner as S, type TrueColor as T, CONTROL_SIZES as U, type ValidationStatus as V, CapsuleBlueprintValueType as W, type CheckboxControlTokens as X, type CheckboxVariantTokens as Y, type CollapsibleHelpToneTokens as Z, type ControlSizeTokens as _, type AlertVariant as a, TRANSLUCENT_SURFACE_VARIANTS as a$, DEFAULT_GLOW_INTENSITY as a0, DEFAULT_SURFACE_CORNER as a1, DEFAULT_SURFACE_GUTTER as a2, DEFAULT_SURFACE_PADDING as a3, DEFAULT_SURFACE_TONE as a4, DEFAULT_TOAST_GAP_PX as a5, DEFAULT_TOAST_LIFE_MS as a6, DEFAULT_TOAST_LIMIT as a7, DEFAULT_TOAST_MODE as a8, DEFAULT_TOAST_POSITION as a9, SIDE_MENU_HEADER_HEIGHT as aA, SIDE_MENU_HEADER_SEAM as aB,
|
|
1258
|
+
export { DEFAULT_CONTROL_CORNER as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, API_ERROR_KIND_CONFIG as D, type AlertIntentConfig as E, type AlertVariantTokens as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, type ApiErrorKindConfig as J, BUTTON_VARIANTS as K, BUTTON_WEIGHTS as L, type BreadcrumbSizeTokens as M, type BreadcrumbToneTokens as N, type Orientation as O, type PlainSurfaceVariant as P, CASCADE_EXPAND as Q, COLLAPSED_RAIL_WIDTH as R, type SurfaceCorner as S, type TrueColor as T, CONTROL_SIZES as U, type ValidationStatus as V, CapsuleBlueprintValueType as W, type CheckboxControlTokens as X, type CheckboxVariantTokens as Y, type CollapsibleHelpToneTokens as Z, type ControlSizeTokens as _, type AlertVariant as a, TRANSLUCENT_SURFACE_VARIANTS as a$, DEFAULT_GLOW_INTENSITY as a0, DEFAULT_SURFACE_CORNER as a1, DEFAULT_SURFACE_GUTTER as a2, DEFAULT_SURFACE_PADDING as a3, DEFAULT_SURFACE_TONE as a4, DEFAULT_TOAST_GAP_PX as a5, DEFAULT_TOAST_LIFE_MS as a6, DEFAULT_TOAST_LIMIT as a7, DEFAULT_TOAST_MODE as a8, DEFAULT_TOAST_POSITION as a9, SIDE_MENU_HEADER_HEIGHT as aA, SIDE_MENU_HEADER_SEAM as aB, SURFACE_VARIANTS as aC, SLIDER_VARIANTS as aD, SURFACE_CORNERS as aE, SURFACE_GLASS_RIM as aF, SURFACE_GUTTER_AXES as aG, SURFACE_PADDINGS as aH, SURFACE_TO_BUTTON_VARIANT as aI, SURFACE_VARIANT_BASE as aJ, SURFACE_VARIANT_FOR_FIELD as aK, type SideMenuItemTokens as aL, type SidebarIdleCopyKind as aM, type SidebarSurfaceTokens as aN, type SliderVariantTokens as aO, type StatusSpinnerSizeTokens as aP, type StatusSpinnerToneTokens as aQ, type SurfaceGutterAxis as aR, type SurfaceTriggerTokens as aS, type SurfaceVariantOverrides as aT, TABLE_DENSITIES as aU, THIN_SCROLLBAR as aV, THIN_SCROLLBAR_FIELD as aW, TOAST_DEFAULT_WIDTH as aX, TOAST_MODES as aY, TOAST_POSITIONS as aZ, TOGGLE_VARIANTS as a_, DEFAULT_TOAST_Z_INDEX as aa, DEFAULT_TRIGGER_CORNER as ab, FIELD_SIZE_STYLES as ac, FIELD_STATUS_CLASSES as ad, type FieldSizeTokens as ae, type FieldToneTokens as af, GLOW_INTENSITIES as ag, type GlowTokens as ah, HelpButton as ai, type HelpButtonPlacement as aj, INPUT_VARIANTS as ak, INPUT_VARIANT_FOR_SURFACE as al, type InputVariantOptions as am, type InputVariantTokens as an, NEUTRAL_TONES as ao, ORIENTATIONS as ap, PANEL_TONE_FOR_FIELD as aq, PANE_EMPTY_STATE_SIZE as ar, PLAIN_SURFACE_VARIANTS as as, type ProgressSpinnerToneTokens as at, SIDEBAR_COLLAPSIBLE_MODES as au, SIDEBAR_IDLE_COPY as av, SIDEBAR_MOBILE_QUERY as aw, SIDEBAR_SIDES as ax, SIDEBAR_VARIANTS as ay, SIDE_MENU_HEADER_FILL as az, type AlertIconAlign as b, stripBorderColor as b$, TRUE_COLORS as b0, TRUE_COLOR_DOT_CLASSES as b1, TRUE_COLOR_TEXT_CLASSES as b2, type TableDensityTokens as b3, type ToastSizeTokens as b4, type ToggleVariantTokens as b5, VALIDATION_STATUSES as b6, configureTheme as b7, getAlertColorClasses as b8, getAlertVariantTokens as b9, getSidebarSurfaceTokens as bA, getSliderVariantTokens as bB, getSpinnerColorTokens as bC, getStatTileColorClasses as bD, getStatusSpinnerSizeTokens as bE, getStatusSpinnerToneTokens as bF, getStepperTonePalette as bG, getSurfaceCornerClass as bH, getSurfaceCornerRem as bI, getSurfaceGutterClass as bJ, getSurfacePaddingClass as bK, getSurfacePaddingClasses as bL, getSurfaceTextTokens as bM, getSurfaceTriggerTokens as bN, getSurfaceVariantClasses as bO, getTableDensityTokens as bP, getTabsColorTokens as bQ, getToastSizeTokens as bR, getToggleColorClasses as bS, getToggleVariantTokens as bT, getTrueColorDotClass as bU, getTrueColorTextClass as bV, hasTextColor as bW, iconRegistry as bX, isGlassSurface as bY, resetTheme as bZ, resolveGlowGradient as b_, getAppDividerToneTokens as ba, getBadgeColorClasses as bb, getBreadcrumbSizeTokens as bc, getBreadcrumbToneTokens as bd, getButtonActiveClasses as be, getButtonActiveHoverClasses as bf, getButtonBaseClasses as bg, getButtonColorClasses as bh, getButtonHoverClasses as bi, getCheckboxColorClasses as bj, getCheckboxControlTokens as bk, getCheckboxGlassCheckedTokens as bl, getCheckboxVariantTokens as bm, getCollapsibleHelpToneTokens as bn, getControlSizeTokens as bo, getFieldSizeTokens as bp, getFieldToneTokens as bq, getGlowTokens as br, getInputVariantTokens as bs, getLoaderProgressColors as bt, getMultiToggleColorTokens as bu, getMultiToggleVariantTokens as bv, getPanelToneStyles as bw, getPillColorClasses as bx, getProgressSpinnerToneTokens as by, getSideMenuItemTokens as bz, type GlassVibrancy as c, stripFillClass as c0, stripTextColor as c1, type SpecularMode as d, type ButtonWeight as e, type SurfacePadding as f, type SurfaceVariant as g, type GlowIntensity as h, type InputVariant as i, type SliderVariant as j, type ToggleVariant as k, type ToastPosition as l, type ToastMode as m, type Size as n, type SidebarVariant as o, type SidebarSide as p, type SidebarCollapsible as q, type SurfaceTextTokens as r, type TableDensity as s, type ApiErrorKind as t, type CapsuleBlueprintParameter as u, ALERT_ICON_ALIGNMENTS as v, ALERT_INTENTS as w, ALERT_INTENT_CONFIG as x, ALERT_VARIANTS as y, API_ERROR_KINDS as z };
|
|
@@ -1255,4 +1255,4 @@ interface CapsuleBlueprintParameter {
|
|
|
1255
1255
|
[key: string]: any;
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
|
-
export { DEFAULT_CONTROL_CORNER as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, API_ERROR_KIND_CONFIG as D, type AlertIntentConfig as E, type AlertVariantTokens as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, type ApiErrorKindConfig as J, BUTTON_VARIANTS as K, BUTTON_WEIGHTS as L, type BreadcrumbSizeTokens as M, type BreadcrumbToneTokens as N, type Orientation as O, type PlainSurfaceVariant as P, CASCADE_EXPAND as Q, COLLAPSED_RAIL_WIDTH as R, type SurfaceCorner as S, type TrueColor as T, CONTROL_SIZES as U, type ValidationStatus as V, CapsuleBlueprintValueType as W, type CheckboxControlTokens as X, type CheckboxVariantTokens as Y, type CollapsibleHelpToneTokens as Z, type ControlSizeTokens as _, type AlertVariant as a, TRANSLUCENT_SURFACE_VARIANTS as a$, DEFAULT_GLOW_INTENSITY as a0, DEFAULT_SURFACE_CORNER as a1, DEFAULT_SURFACE_GUTTER as a2, DEFAULT_SURFACE_PADDING as a3, DEFAULT_SURFACE_TONE as a4, DEFAULT_TOAST_GAP_PX as a5, DEFAULT_TOAST_LIFE_MS as a6, DEFAULT_TOAST_LIMIT as a7, DEFAULT_TOAST_MODE as a8, DEFAULT_TOAST_POSITION as a9, SIDE_MENU_HEADER_HEIGHT as aA, SIDE_MENU_HEADER_SEAM as aB,
|
|
1258
|
+
export { DEFAULT_CONTROL_CORNER as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, API_ERROR_KIND_CONFIG as D, type AlertIntentConfig as E, type AlertVariantTokens as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, type ApiErrorKindConfig as J, BUTTON_VARIANTS as K, BUTTON_WEIGHTS as L, type BreadcrumbSizeTokens as M, type BreadcrumbToneTokens as N, type Orientation as O, type PlainSurfaceVariant as P, CASCADE_EXPAND as Q, COLLAPSED_RAIL_WIDTH as R, type SurfaceCorner as S, type TrueColor as T, CONTROL_SIZES as U, type ValidationStatus as V, CapsuleBlueprintValueType as W, type CheckboxControlTokens as X, type CheckboxVariantTokens as Y, type CollapsibleHelpToneTokens as Z, type ControlSizeTokens as _, type AlertVariant as a, TRANSLUCENT_SURFACE_VARIANTS as a$, DEFAULT_GLOW_INTENSITY as a0, DEFAULT_SURFACE_CORNER as a1, DEFAULT_SURFACE_GUTTER as a2, DEFAULT_SURFACE_PADDING as a3, DEFAULT_SURFACE_TONE as a4, DEFAULT_TOAST_GAP_PX as a5, DEFAULT_TOAST_LIFE_MS as a6, DEFAULT_TOAST_LIMIT as a7, DEFAULT_TOAST_MODE as a8, DEFAULT_TOAST_POSITION as a9, SIDE_MENU_HEADER_HEIGHT as aA, SIDE_MENU_HEADER_SEAM as aB, SURFACE_VARIANTS as aC, SLIDER_VARIANTS as aD, SURFACE_CORNERS as aE, SURFACE_GLASS_RIM as aF, SURFACE_GUTTER_AXES as aG, SURFACE_PADDINGS as aH, SURFACE_TO_BUTTON_VARIANT as aI, SURFACE_VARIANT_BASE as aJ, SURFACE_VARIANT_FOR_FIELD as aK, type SideMenuItemTokens as aL, type SidebarIdleCopyKind as aM, type SidebarSurfaceTokens as aN, type SliderVariantTokens as aO, type StatusSpinnerSizeTokens as aP, type StatusSpinnerToneTokens as aQ, type SurfaceGutterAxis as aR, type SurfaceTriggerTokens as aS, type SurfaceVariantOverrides as aT, TABLE_DENSITIES as aU, THIN_SCROLLBAR as aV, THIN_SCROLLBAR_FIELD as aW, TOAST_DEFAULT_WIDTH as aX, TOAST_MODES as aY, TOAST_POSITIONS as aZ, TOGGLE_VARIANTS as a_, DEFAULT_TOAST_Z_INDEX as aa, DEFAULT_TRIGGER_CORNER as ab, FIELD_SIZE_STYLES as ac, FIELD_STATUS_CLASSES as ad, type FieldSizeTokens as ae, type FieldToneTokens as af, GLOW_INTENSITIES as ag, type GlowTokens as ah, HelpButton as ai, type HelpButtonPlacement as aj, INPUT_VARIANTS as ak, INPUT_VARIANT_FOR_SURFACE as al, type InputVariantOptions as am, type InputVariantTokens as an, NEUTRAL_TONES as ao, ORIENTATIONS as ap, PANEL_TONE_FOR_FIELD as aq, PANE_EMPTY_STATE_SIZE as ar, PLAIN_SURFACE_VARIANTS as as, type ProgressSpinnerToneTokens as at, SIDEBAR_COLLAPSIBLE_MODES as au, SIDEBAR_IDLE_COPY as av, SIDEBAR_MOBILE_QUERY as aw, SIDEBAR_SIDES as ax, SIDEBAR_VARIANTS as ay, SIDE_MENU_HEADER_FILL as az, type AlertIconAlign as b, stripBorderColor as b$, TRUE_COLORS as b0, TRUE_COLOR_DOT_CLASSES as b1, TRUE_COLOR_TEXT_CLASSES as b2, type TableDensityTokens as b3, type ToastSizeTokens as b4, type ToggleVariantTokens as b5, VALIDATION_STATUSES as b6, configureTheme as b7, getAlertColorClasses as b8, getAlertVariantTokens as b9, getSidebarSurfaceTokens as bA, getSliderVariantTokens as bB, getSpinnerColorTokens as bC, getStatTileColorClasses as bD, getStatusSpinnerSizeTokens as bE, getStatusSpinnerToneTokens as bF, getStepperTonePalette as bG, getSurfaceCornerClass as bH, getSurfaceCornerRem as bI, getSurfaceGutterClass as bJ, getSurfacePaddingClass as bK, getSurfacePaddingClasses as bL, getSurfaceTextTokens as bM, getSurfaceTriggerTokens as bN, getSurfaceVariantClasses as bO, getTableDensityTokens as bP, getTabsColorTokens as bQ, getToastSizeTokens as bR, getToggleColorClasses as bS, getToggleVariantTokens as bT, getTrueColorDotClass as bU, getTrueColorTextClass as bV, hasTextColor as bW, iconRegistry as bX, isGlassSurface as bY, resetTheme as bZ, resolveGlowGradient as b_, getAppDividerToneTokens as ba, getBadgeColorClasses as bb, getBreadcrumbSizeTokens as bc, getBreadcrumbToneTokens as bd, getButtonActiveClasses as be, getButtonActiveHoverClasses as bf, getButtonBaseClasses as bg, getButtonColorClasses as bh, getButtonHoverClasses as bi, getCheckboxColorClasses as bj, getCheckboxControlTokens as bk, getCheckboxGlassCheckedTokens as bl, getCheckboxVariantTokens as bm, getCollapsibleHelpToneTokens as bn, getControlSizeTokens as bo, getFieldSizeTokens as bp, getFieldToneTokens as bq, getGlowTokens as br, getInputVariantTokens as bs, getLoaderProgressColors as bt, getMultiToggleColorTokens as bu, getMultiToggleVariantTokens as bv, getPanelToneStyles as bw, getPillColorClasses as bx, getProgressSpinnerToneTokens as by, getSideMenuItemTokens as bz, type GlassVibrancy as c, stripFillClass as c0, stripTextColor as c1, type SpecularMode as d, type ButtonWeight as e, type SurfacePadding as f, type SurfaceVariant as g, type GlowIntensity as h, type InputVariant as i, type SliderVariant as j, type ToggleVariant as k, type ToastPosition as l, type ToastMode as m, type Size as n, type SidebarVariant as o, type SidebarSide as p, type SidebarCollapsible as q, type SurfaceTextTokens as r, type TableDensity as s, type ApiErrorKind as t, type CapsuleBlueprintParameter as u, ALERT_ICON_ALIGNMENTS as v, ALERT_INTENTS as w, ALERT_INTENT_CONFIG as x, ALERT_VARIANTS as y, API_ERROR_KINDS as z };
|
package/dist/index.cjs
CHANGED
|
@@ -258,7 +258,7 @@ __export(src_exports, {
|
|
|
258
258
|
SIDE_MENU_HEADER_HEIGHT: () => SIDE_MENU_HEADER_HEIGHT,
|
|
259
259
|
SIDE_MENU_HEADER_SEAM: () => SIDE_MENU_HEADER_SEAM,
|
|
260
260
|
SIDE_PANEL_SIDES: () => SIDE_PANEL_SIDES,
|
|
261
|
-
SIDE_PANEL_VARIANTS: () =>
|
|
261
|
+
SIDE_PANEL_VARIANTS: () => SURFACE_VARIANTS,
|
|
262
262
|
SLIDER_ORIENTATIONS: () => SLIDER_ORIENTATIONS,
|
|
263
263
|
SLIDER_VARIANTS: () => SLIDER_VARIANTS,
|
|
264
264
|
SMART_GRID_PALETTE_MIME: () => PALETTE_MIME,
|
|
@@ -43762,7 +43762,10 @@ var SideMenu = ({
|
|
|
43762
43762
|
logoIcon,
|
|
43763
43763
|
logoText,
|
|
43764
43764
|
items,
|
|
43765
|
+
activeItemSlug,
|
|
43766
|
+
onItemSelect,
|
|
43765
43767
|
className = "",
|
|
43768
|
+
joinedRole,
|
|
43766
43769
|
collapsed = false,
|
|
43767
43770
|
onToggleCollapse,
|
|
43768
43771
|
mobileOpen = false,
|
|
@@ -43804,7 +43807,7 @@ var SideMenu = ({
|
|
|
43804
43807
|
const [internalSearch, setInternalSearch] = (0, import_react246.useState)("");
|
|
43805
43808
|
const [hoverOpen, setHoverOpen] = (0, import_react246.useState)(false);
|
|
43806
43809
|
const collapseMode = collapsible === true ? "icon" : collapsible === false ? "none" : collapsible;
|
|
43807
|
-
const hoverRail = openOnHover && collapseMode !== "none";
|
|
43810
|
+
const hoverRail = !joinedRole && openOnHover && collapseMode !== "none";
|
|
43808
43811
|
const hoverTimer = (0, import_react246.useRef)(null);
|
|
43809
43812
|
(0, import_react246.useEffect)(() => {
|
|
43810
43813
|
return () => {
|
|
@@ -43833,11 +43836,21 @@ var SideMenu = ({
|
|
|
43833
43836
|
setInternalCollapsed((value) => !value);
|
|
43834
43837
|
}
|
|
43835
43838
|
};
|
|
43836
|
-
const effectiveMode = hoverRail ? "icon" : collapseMode;
|
|
43837
|
-
const expanded = isMobile ? true : hoverRail ? false : effectiveMode === "none" ? true : !collapsedState;
|
|
43838
|
-
const showCollapseControl = !isMobile && !hoverRail && effectiveMode !== "none";
|
|
43839
|
-
const showOffcanvasHandle = !isMobile && effectiveMode === "offcanvas" && !expanded;
|
|
43840
|
-
const
|
|
43839
|
+
const effectiveMode = joinedRole === "rail" ? "icon" : joinedRole === "panel" ? "none" : hoverRail ? "icon" : collapseMode;
|
|
43840
|
+
const expanded = isMobile ? true : joinedRole ? joinedRole === "panel" : hoverRail ? false : effectiveMode === "none" ? true : !collapsedState;
|
|
43841
|
+
const showCollapseControl = !isMobile && !joinedRole && !hoverRail && effectiveMode !== "none";
|
|
43842
|
+
const showOffcanvasHandle = !isMobile && !joinedRole && effectiveMode === "offcanvas" && !expanded;
|
|
43843
|
+
const baseSurface = getSidebarSurfaceTokens(variant, color);
|
|
43844
|
+
const surface = joinedRole && !isMobile ? {
|
|
43845
|
+
...baseSurface,
|
|
43846
|
+
fill: joinedRole === "rail" ? "bg-neutral-100 dark:bg-neutral-950" : "bg-transparent",
|
|
43847
|
+
offset: joinedRole === "panel" ? "my-2" : "",
|
|
43848
|
+
radius: joinedRole === "panel" ? "rounded-l-2xl" : "",
|
|
43849
|
+
border: "",
|
|
43850
|
+
borderSides: "all",
|
|
43851
|
+
shadow: "",
|
|
43852
|
+
shadowRight: ""
|
|
43853
|
+
} : baseSurface;
|
|
43841
43854
|
const idle = SIDEBAR_IDLE_COPY[surface.idleCopy];
|
|
43842
43855
|
const toneTokens3 = getSideMenuItemTokens(color);
|
|
43843
43856
|
const showSkeleton = loading && loaderType === "skeleton";
|
|
@@ -43894,8 +43907,9 @@ var SideMenu = ({
|
|
|
43894
43907
|
if (path === "/") return location.pathname === "/";
|
|
43895
43908
|
return location.pathname === path || location.pathname.startsWith(`${path}/`);
|
|
43896
43909
|
};
|
|
43910
|
+
const isActiveItem = (link) => activeItemSlug !== void 0 ? link.slug === activeItemSlug : isActivePath(link.path);
|
|
43897
43911
|
const hasActiveDescendant = (link) => !!link.children?.some(
|
|
43898
|
-
(child) =>
|
|
43912
|
+
(child) => isActiveItem(child) || hasActiveDescendant(child)
|
|
43899
43913
|
);
|
|
43900
43914
|
const [openSubmenus, setOpenSubmenus] = (0, import_react246.useState)(() => {
|
|
43901
43915
|
const initial = /* @__PURE__ */ new Set();
|
|
@@ -43987,14 +44001,14 @@ var SideMenu = ({
|
|
|
43987
44001
|
const panelPosition = isLeft ? "left-0" : "right-0";
|
|
43988
44002
|
const offcanvasHidden = effectiveMode === "offcanvas" && !expanded;
|
|
43989
44003
|
const desktopClasses = `
|
|
43990
|
-
relative flex-shrink-0 ${heightClass} ${isHoverMode ? RAIL_WIDTH : ""} ${surface.offset}
|
|
44004
|
+
relative ${joinedRole === "panel" ? "min-w-0 flex-1" : "flex-shrink-0"} ${heightClass} ${isHoverMode ? RAIL_WIDTH : ""} ${surface.offset}
|
|
43991
44005
|
`;
|
|
43992
44006
|
const asideClasses = isHoverMode ? `
|
|
43993
44007
|
absolute inset-y-0 ${panelPosition} z-40 overflow-hidden transition-[width] ease-in-out ${asideWidth}
|
|
43994
44008
|
${surface.radius} ${borderClasses} ${isLeft ? surface.shadow : surface.shadowRight}
|
|
43995
44009
|
${className}
|
|
43996
44010
|
` : `
|
|
43997
|
-
relative h-full overflow-hidden transition-all duration-300 ${asideWidth}
|
|
44011
|
+
relative h-full overflow-hidden transition-all duration-300 ${joinedRole === "panel" ? "w-full" : asideWidth}
|
|
43998
44012
|
${surface.radius} ${borderClasses} ${isLeft ? surface.shadow : surface.shadowRight}
|
|
43999
44013
|
${className}
|
|
44000
44014
|
`;
|
|
@@ -44009,7 +44023,7 @@ var SideMenu = ({
|
|
|
44009
44023
|
const logoSection = logoIcon || logoText ? (contentCollapsed2) => /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
|
|
44010
44024
|
"div",
|
|
44011
44025
|
{
|
|
44012
|
-
className: `relative z-50 flex items-center
|
|
44026
|
+
className: `relative z-50 flex items-center px-4 py-4 ${SIDE_MENU_HEADER_HEIGHT} ${joinedRole && !isMobile ? "" : variant === "glass" || variant === "floating-glass" ? "border-b bg-white/20 border-white/30 dark:bg-white/5 dark:border-white/10" : `border-b ${SIDE_MENU_HEADER_FILL} ${SIDE_MENU_HEADER_SEAM}`} ${contentCollapsed2 ? "justify-center" : ""}`,
|
|
44013
44027
|
children: [
|
|
44014
44028
|
logoIcon && /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className: "shrink-0", children: logoIcon }),
|
|
44015
44029
|
logoText && /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
@@ -44024,7 +44038,7 @@ var SideMenu = ({
|
|
|
44024
44038
|
) : null;
|
|
44025
44039
|
const renderLinkRow = (link, depth, key, contentCollapsed2) => {
|
|
44026
44040
|
const hasChildren = !!link.children?.length;
|
|
44027
|
-
const selfActive =
|
|
44041
|
+
const selfActive = isActiveItem(link);
|
|
44028
44042
|
const childActive = hasChildren ? hasActiveDescendant(link) : false;
|
|
44029
44043
|
const visibleChildren = searchActive ? (link.children ?? []).filter(matchesSubtree) : link.children ?? [];
|
|
44030
44044
|
const showChildren = hasChildren && (searchActive || openSubmenus.has(link.slug)) && visibleChildren.length > 0;
|
|
@@ -44033,7 +44047,7 @@ var SideMenu = ({
|
|
|
44033
44047
|
let revealLimit = paged ? childReveal[link.slug] ?? pageSize : visibleChildren.length;
|
|
44034
44048
|
if (paged) {
|
|
44035
44049
|
const activeIndex = visibleChildren.findIndex(
|
|
44036
|
-
(child) =>
|
|
44050
|
+
(child) => isActiveItem(child) || hasActiveDescendant(child)
|
|
44037
44051
|
);
|
|
44038
44052
|
if (activeIndex >= revealLimit) revealLimit = activeIndex + 1;
|
|
44039
44053
|
}
|
|
@@ -44057,7 +44071,8 @@ var SideMenu = ({
|
|
|
44057
44071
|
import_react_router_dom2.Link,
|
|
44058
44072
|
{
|
|
44059
44073
|
to: link.path,
|
|
44060
|
-
onClick: () => {
|
|
44074
|
+
onClick: (event) => {
|
|
44075
|
+
onItemSelect?.(link, event);
|
|
44061
44076
|
if (mobileOpen) onCloseMobile?.();
|
|
44062
44077
|
if (hoverOpen) closeHover();
|
|
44063
44078
|
},
|
|
@@ -44398,6 +44413,7 @@ var SideMenu = ({
|
|
|
44398
44413
|
"div",
|
|
44399
44414
|
{
|
|
44400
44415
|
className: desktopClasses,
|
|
44416
|
+
"data-joined-role": joinedRole,
|
|
44401
44417
|
onKeyDown: (event) => {
|
|
44402
44418
|
if (event.key === "Escape" && hoverOpen) closeHover();
|
|
44403
44419
|
},
|
|
@@ -44514,6 +44530,7 @@ var SideMenuLayout = ({
|
|
|
44514
44530
|
sideMenuProps,
|
|
44515
44531
|
rightSideMenuProps,
|
|
44516
44532
|
secondarySideMenuProps,
|
|
44533
|
+
multiMenuMode = "hover",
|
|
44517
44534
|
header,
|
|
44518
44535
|
children,
|
|
44519
44536
|
className,
|
|
@@ -44522,8 +44539,10 @@ var SideMenuLayout = ({
|
|
|
44522
44539
|
sideItemActions,
|
|
44523
44540
|
sidePanelActions
|
|
44524
44541
|
}) => {
|
|
44542
|
+
const t = useKitT();
|
|
44525
44543
|
const isMobile = useSidebarIsMobile(sideMenuProps.responsive ?? true);
|
|
44526
44544
|
const isMulti = !!secondarySideMenuProps;
|
|
44545
|
+
const isJoined = isMulti && multiMenuMode === "joined";
|
|
44527
44546
|
const [collapsed, setCollapsed] = (0, import_react248.useState)(sideMenuProps.collapsed ?? false);
|
|
44528
44547
|
const [rightCollapsed, setRightCollapsed] = (0, import_react248.useState)(
|
|
44529
44548
|
rightSideMenuProps?.collapsed ?? false
|
|
@@ -44583,7 +44602,7 @@ var SideMenuLayout = ({
|
|
|
44583
44602
|
// expanding as an overlay on hover. `openOnHover` owns that state, so the
|
|
44584
44603
|
// collapse wiring is not passed through — and since collapsing is opt-in
|
|
44585
44604
|
// on SideMenu, the layout opts the rail in itself.
|
|
44586
|
-
...isMulti ? { collapsible: "icon", openOnHover: true } : {
|
|
44605
|
+
...isJoined ? { joinedRole: "rail", responsive: false, mobileOpen: false } : isMulti ? { collapsible: "icon", openOnHover: true } : {
|
|
44587
44606
|
collapsed: isCollapsed,
|
|
44588
44607
|
onToggleCollapse: handleToggleCollapse
|
|
44589
44608
|
}
|
|
@@ -44602,8 +44621,27 @@ var SideMenuLayout = ({
|
|
|
44602
44621
|
side: "left",
|
|
44603
44622
|
collapsed: isSecondaryCollapsed,
|
|
44604
44623
|
onToggleCollapse: handleSecondaryToggleCollapse,
|
|
44605
|
-
fullHeight: true
|
|
44624
|
+
fullHeight: true,
|
|
44625
|
+
...isJoined ? {
|
|
44626
|
+
joinedRole: "panel",
|
|
44627
|
+
responsive: false,
|
|
44628
|
+
mobileOpen: isMobileOpen,
|
|
44629
|
+
onCloseMobile: handleCloseMobile,
|
|
44630
|
+
// Surface family comes from the primary; content/accent remain independent.
|
|
44631
|
+
variant: sideMenuProps.variant
|
|
44632
|
+
} : {}
|
|
44606
44633
|
};
|
|
44634
|
+
const joinedSurface = isJoined && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
44635
|
+
"div",
|
|
44636
|
+
{
|
|
44637
|
+
"aria-hidden": "true",
|
|
44638
|
+
"data-joined-surface": true,
|
|
44639
|
+
className: (0, import_classnames79.default)(
|
|
44640
|
+
"pointer-events-none absolute inset-y-2 left-[68px] right-0 rounded-l-2xl",
|
|
44641
|
+
getSidebarSurfaceTokens(sideMenuProps.variant ?? "sidebar", sideMenuProps.color ?? "blue").fill
|
|
44642
|
+
)
|
|
44643
|
+
}
|
|
44644
|
+
);
|
|
44607
44645
|
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
44608
44646
|
SideMenuActionsProvider,
|
|
44609
44647
|
{
|
|
@@ -44613,13 +44651,56 @@ var SideMenuLayout = ({
|
|
|
44613
44651
|
"div",
|
|
44614
44652
|
{
|
|
44615
44653
|
className: (0, import_classnames79.default)(
|
|
44616
|
-
"flex h-full w-full overflow-hidden
|
|
44654
|
+
"relative flex h-full w-full overflow-hidden",
|
|
44655
|
+
isJoined ? "bg-neutral-100 dark:bg-neutral-950" : "bg-neutral-50 dark:bg-neutral-950",
|
|
44617
44656
|
className
|
|
44618
44657
|
),
|
|
44619
44658
|
children: [
|
|
44620
|
-
|
|
44621
|
-
|
|
44622
|
-
|
|
44659
|
+
isJoined && !isMobile && joinedSurface,
|
|
44660
|
+
isJoined ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
|
|
44661
|
+
isMobile && isMobileOpen && // Pointer backdrop; the close button and Escape provide keyboard dismissal.
|
|
44662
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
44663
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { className: "fixed inset-0 z-50 bg-black/20 backdrop-blur-sm", onClick: handleCloseMobile }),
|
|
44664
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
44665
|
+
"div",
|
|
44666
|
+
{
|
|
44667
|
+
"data-joined-menu": true,
|
|
44668
|
+
inert: isMobile && !isMobileOpen || void 0,
|
|
44669
|
+
onKeyDown: (event) => {
|
|
44670
|
+
if (isMobile && event.key === "Escape") handleCloseMobile();
|
|
44671
|
+
},
|
|
44672
|
+
className: (0, import_classnames79.default)(
|
|
44673
|
+
"flex w-[324px] max-w-[calc(100vw-1rem)] shrink-0",
|
|
44674
|
+
isMobile ? "fixed inset-y-0 left-0 z-[60] flex-col bg-neutral-100 transition-transform duration-300 dark:bg-neutral-950" : "h-full",
|
|
44675
|
+
isMobile && !isMobileOpen && "-translate-x-full"
|
|
44676
|
+
),
|
|
44677
|
+
children: [
|
|
44678
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { className: "flex shrink-0 justify-end px-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
44679
|
+
"button",
|
|
44680
|
+
{
|
|
44681
|
+
type: "button",
|
|
44682
|
+
onClick: handleCloseMobile,
|
|
44683
|
+
"aria-label": t("kit.sidemenu.closeAria"),
|
|
44684
|
+
className: "rounded-lg p-2 text-neutral-600 hover:bg-neutral-200 dark:text-neutral-300 dark:hover:bg-neutral-800",
|
|
44685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(CustomIcon_default, { icon: "Close", className: "h-5 w-5" })
|
|
44686
|
+
}
|
|
44687
|
+
) }),
|
|
44688
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)("div", { className: "relative flex h-full min-h-0 min-w-0 flex-1", children: [
|
|
44689
|
+
isMobile && joinedSurface,
|
|
44690
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SideMenu_default, { ...primaryProps }),
|
|
44691
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SideMenu_default, { ...secondaryProps })
|
|
44692
|
+
] })
|
|
44693
|
+
]
|
|
44694
|
+
}
|
|
44695
|
+
)
|
|
44696
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
|
|
44697
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SideMenu_default, { ...primaryProps }),
|
|
44698
|
+
secondarySideMenuProps && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SideMenu_default, { ...secondaryProps })
|
|
44699
|
+
] }),
|
|
44700
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)("div", { className: (0, import_classnames79.default)(
|
|
44701
|
+
"relative flex min-w-0 flex-1 flex-col",
|
|
44702
|
+
isJoined && !isMobile ? "my-2 h-[calc(100%-1rem)]" : "h-full"
|
|
44703
|
+
), children: [
|
|
44623
44704
|
isMobile && /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)("div", { className: "flex items-center gap-1 border-b border-neutral-200 bg-white px-4 py-2 dark:border-neutral-800 dark:bg-neutral-900", children: [
|
|
44624
44705
|
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
44625
44706
|
"button",
|
|
@@ -44715,9 +44796,14 @@ function getNoiseBlendClasses(scheme = "auto") {
|
|
|
44715
44796
|
|
|
44716
44797
|
// src/components/SidePanel.tsx
|
|
44717
44798
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
44718
|
-
var
|
|
44719
|
-
|
|
44720
|
-
|
|
44799
|
+
var LEGACY_PANEL_VARIANTS = {
|
|
44800
|
+
sidebar: "elevated",
|
|
44801
|
+
inset: "tonal",
|
|
44802
|
+
floating: "elevated",
|
|
44803
|
+
"floating-glass": "glass"
|
|
44804
|
+
};
|
|
44805
|
+
var resolvePanelVariant2 = (variant) => variant in LEGACY_PANEL_VARIANTS ? LEGACY_PANEL_VARIANTS[variant] : variant;
|
|
44806
|
+
var getSidePanelTextTokens = (variant) => getSurfaceTextTokens(resolvePanelVariant2(variant));
|
|
44721
44807
|
var INSET_GAP_Y_CLASS = "inset-y-4";
|
|
44722
44808
|
var INNER_CORNER = {
|
|
44723
44809
|
// (`"auto"` is absent by design: SidePanel's own default is `rounded`, and
|
|
@@ -44781,7 +44867,10 @@ var SidePanel = ({
|
|
|
44781
44867
|
maxWidth = 900,
|
|
44782
44868
|
tone,
|
|
44783
44869
|
color,
|
|
44784
|
-
variant = "
|
|
44870
|
+
variant = "outlined",
|
|
44871
|
+
glassOpacity,
|
|
44872
|
+
vibrancy,
|
|
44873
|
+
specularMode,
|
|
44785
44874
|
surfaceTone = "neutral",
|
|
44786
44875
|
size = "md",
|
|
44787
44876
|
side = "right",
|
|
@@ -44800,7 +44889,16 @@ var SidePanel = ({
|
|
|
44800
44889
|
warnIfMissingTitle("SidePanel", title);
|
|
44801
44890
|
const effectiveTone = tone ?? color ?? "neutral";
|
|
44802
44891
|
const sizeToken = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
|
|
44803
|
-
const
|
|
44892
|
+
const legacyVariant = variant in LEGACY_PANEL_VARIANTS;
|
|
44893
|
+
const panelVariant = resolvePanelVariant2(variant);
|
|
44894
|
+
const panelOuterChrome = (0, import_classnames80.default)(
|
|
44895
|
+
variantBaseStyles[panelVariant].split(" ").filter((token) => /^(dark:)?(shadow|ring)-/.test(token)),
|
|
44896
|
+
panelVariant === "liquid-glass" && getPanelToneStyles(surfaceTone).liquidShadow
|
|
44897
|
+
);
|
|
44898
|
+
const surface = getSidebarSurfaceTokens(
|
|
44899
|
+
legacyVariant ? variant : "sidebar",
|
|
44900
|
+
surfaceTone
|
|
44901
|
+
);
|
|
44804
44902
|
const surfaceText = getSidePanelTextTokens(variant);
|
|
44805
44903
|
const isInset = inset ?? surface.offset !== "";
|
|
44806
44904
|
const cornerClass = INNER_CORNER[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][side];
|
|
@@ -44935,8 +45033,8 @@ var SidePanel = ({
|
|
|
44935
45033
|
isInset ? INSET_GAP_Y_CLASS : "top-0 h-full",
|
|
44936
45034
|
side === "right" ? "right-0" : "left-0",
|
|
44937
45035
|
cornerClass,
|
|
44938
|
-
borderClass,
|
|
44939
|
-
shadowClass
|
|
45036
|
+
legacyVariant && borderClass,
|
|
45037
|
+
legacyVariant ? shadowClass : panelOuterChrome
|
|
44940
45038
|
),
|
|
44941
45039
|
style: {
|
|
44942
45040
|
width: entered ? shellWidth : 0,
|
|
@@ -44957,8 +45055,22 @@ var SidePanel = ({
|
|
|
44957
45055
|
"data-sp-fill": "true",
|
|
44958
45056
|
className: (0, import_classnames80.default)(
|
|
44959
45057
|
"pointer-events-none absolute inset-0",
|
|
44960
|
-
surface.fill,
|
|
45058
|
+
legacyVariant && surface.fill,
|
|
44961
45059
|
cornerClass
|
|
45060
|
+
),
|
|
45061
|
+
children: !legacyVariant && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
45062
|
+
Panel_default,
|
|
45063
|
+
{
|
|
45064
|
+
variant: panelVariant,
|
|
45065
|
+
tone: surfaceTone,
|
|
45066
|
+
glassOpacity,
|
|
45067
|
+
vibrancy,
|
|
45068
|
+
specularMode,
|
|
45069
|
+
padding: "none",
|
|
45070
|
+
corner: "none",
|
|
45071
|
+
className: "h-full w-full",
|
|
45072
|
+
style: { borderRadius: "inherit" }
|
|
45073
|
+
}
|
|
44962
45074
|
)
|
|
44963
45075
|
}
|
|
44964
45076
|
),
|
|
@@ -64909,7 +65021,7 @@ var getStatusTokens = (status, palette) => {
|
|
|
64909
65021
|
const STATUS_STYLES = {
|
|
64910
65022
|
done: {
|
|
64911
65023
|
tone: accent,
|
|
64912
|
-
node: `bg-${accent}-500
|
|
65024
|
+
node: `bg-${accent}-500 border-2 border-${accent}-500`,
|
|
64913
65025
|
glyph: "check",
|
|
64914
65026
|
glyphClass: "text-white",
|
|
64915
65027
|
connector: `bg-${accent}-500 dark:bg-${accent}-500`,
|
|
@@ -65034,14 +65146,15 @@ var WorkflowStatusNode = ({
|
|
|
65034
65146
|
"span",
|
|
65035
65147
|
{
|
|
65036
65148
|
"aria-hidden": "true",
|
|
65149
|
+
"data-workflow-status-node": true,
|
|
65037
65150
|
className: (0, import_classnames111.default)("relative inline-flex shrink-0", node, className),
|
|
65038
65151
|
children: [
|
|
65039
65152
|
tokens.pulse && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
65040
65153
|
"span",
|
|
65041
65154
|
{
|
|
65042
65155
|
className: (0, import_classnames111.default)(
|
|
65043
|
-
"absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
65044
|
-
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-
|
|
65156
|
+
"absolute inset-0 origin-center animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
65157
|
+
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-400`
|
|
65045
65158
|
)
|
|
65046
65159
|
}
|
|
65047
65160
|
),
|
|
@@ -65049,7 +65162,7 @@ var WorkflowStatusNode = ({
|
|
|
65049
65162
|
"span",
|
|
65050
65163
|
{
|
|
65051
65164
|
className: (0, import_classnames111.default)(
|
|
65052
|
-
"
|
|
65165
|
+
"absolute inset-0 inline-flex h-full w-full items-center justify-center rounded-full",
|
|
65053
65166
|
tokens.node
|
|
65054
65167
|
),
|
|
65055
65168
|
children: [
|
|
@@ -65249,6 +65362,7 @@ var WorkflowTimeline = ({
|
|
|
65249
65362
|
renderStepPopover,
|
|
65250
65363
|
stepPopoverProps,
|
|
65251
65364
|
collapsed = false,
|
|
65365
|
+
side = "left",
|
|
65252
65366
|
fillHeight = false,
|
|
65253
65367
|
steps,
|
|
65254
65368
|
activeStepId,
|
|
@@ -65381,6 +65495,7 @@ var WorkflowTimeline = ({
|
|
|
65381
65495
|
{
|
|
65382
65496
|
status,
|
|
65383
65497
|
palette,
|
|
65498
|
+
size: collapsed ? "sm" : "md",
|
|
65384
65499
|
className: collapsed ? void 0 : "mt-0.5"
|
|
65385
65500
|
}
|
|
65386
65501
|
),
|
|
@@ -65440,9 +65555,10 @@ var WorkflowTimeline = ({
|
|
|
65440
65555
|
type: "button",
|
|
65441
65556
|
onClick: () => onStepSelect(step.id),
|
|
65442
65557
|
className: (0, import_classnames114.default)(
|
|
65443
|
-
"relative flex text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400
|
|
65558
|
+
"relative flex text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500",
|
|
65559
|
+
collapsed ? "focus-visible:ring-inset" : "focus-visible:ring-offset-2",
|
|
65444
65560
|
collapsed ? "h-9 w-9 items-center justify-center rounded-xl" : "w-full items-start gap-3 rounded-sm",
|
|
65445
|
-
collapsed &&
|
|
65561
|
+
collapsed && "transition-colors hover:bg-neutral-100 dark:hover:bg-white/5"
|
|
65446
65562
|
),
|
|
65447
65563
|
children: rowContent
|
|
65448
65564
|
}
|
|
@@ -65451,9 +65567,10 @@ var WorkflowTimeline = ({
|
|
|
65451
65567
|
{
|
|
65452
65568
|
tabIndex: collapsed ? 0 : void 0,
|
|
65453
65569
|
className: (0, import_classnames114.default)(
|
|
65454
|
-
"relative flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400",
|
|
65570
|
+
"relative flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500",
|
|
65571
|
+
collapsed && "focus-visible:ring-inset",
|
|
65455
65572
|
collapsed ? "h-9 w-9 items-center justify-center rounded-xl" : "w-full items-start gap-3 rounded-sm",
|
|
65456
|
-
collapsed &&
|
|
65573
|
+
collapsed && "transition-colors hover:bg-neutral-100 dark:hover:bg-white/5"
|
|
65457
65574
|
),
|
|
65458
65575
|
children: rowContent
|
|
65459
65576
|
}
|
|
@@ -65471,7 +65588,12 @@ var WorkflowTimeline = ({
|
|
|
65471
65588
|
"span",
|
|
65472
65589
|
{
|
|
65473
65590
|
"aria-hidden": "true",
|
|
65474
|
-
|
|
65591
|
+
"data-workflow-selection-marker": true,
|
|
65592
|
+
style: { position: "absolute", pointerEvents: "none" },
|
|
65593
|
+
className: (0, import_classnames114.default)(
|
|
65594
|
+
`absolute top-1.5 h-6 w-1 bg-${palette.accent}-600`,
|
|
65595
|
+
side === "left" ? "-left-2 rounded-r-full" : "-right-2 rounded-l-full"
|
|
65596
|
+
)
|
|
65475
65597
|
}
|
|
65476
65598
|
),
|
|
65477
65599
|
!isLast && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
@@ -65925,6 +66047,7 @@ var sampleWorkflow = {
|
|
|
65925
66047
|
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
65926
66048
|
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
65927
66049
|
var WorkflowTrackerRail = ({
|
|
66050
|
+
side = "left",
|
|
65928
66051
|
collapsible = false,
|
|
65929
66052
|
collapsed,
|
|
65930
66053
|
defaultCollapsed = false,
|
|
@@ -65977,7 +66100,11 @@ var WorkflowTrackerRail = ({
|
|
|
65977
66100
|
className,
|
|
65978
66101
|
cardClassName
|
|
65979
66102
|
),
|
|
65980
|
-
style: collapsible ? {
|
|
66103
|
+
style: collapsible ? {
|
|
66104
|
+
...style,
|
|
66105
|
+
width: isCollapsed ? COLLAPSED_RAIL_WIDTH : style?.width ?? 360,
|
|
66106
|
+
...isCollapsed ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
|
|
66107
|
+
} : style,
|
|
65981
66108
|
"aria-busy": loading || void 0,
|
|
65982
66109
|
"data-collapsed": collapsible ? isCollapsed : void 0,
|
|
65983
66110
|
children: [
|
|
@@ -65986,16 +66113,16 @@ var WorkflowTrackerRail = ({
|
|
|
65986
66113
|
{
|
|
65987
66114
|
className: (0, import_classnames115.default)(
|
|
65988
66115
|
"absolute z-20 flex",
|
|
65989
|
-
isCollapsed ? "inset-x-0 top-2 justify-center" : "right-4 top-4"
|
|
66116
|
+
isCollapsed ? "inset-x-0 top-2 justify-center" : side === "left" ? "right-4 top-4" : "left-4 top-4"
|
|
65990
66117
|
),
|
|
65991
66118
|
children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
65992
66119
|
CollapseToggleButton,
|
|
65993
66120
|
{
|
|
65994
66121
|
collapsed: isCollapsed,
|
|
65995
|
-
edge:
|
|
66122
|
+
edge: side,
|
|
65996
66123
|
srLabel: isCollapsed ? expandLabel : collapseLabel,
|
|
65997
66124
|
tooltip: isCollapsed ? expandLabel : collapseLabel,
|
|
65998
|
-
tooltipPosition: "right",
|
|
66125
|
+
tooltipPosition: side === "left" ? "right" : "left",
|
|
65999
66126
|
"aria-controls": timelineId,
|
|
66000
66127
|
onClick: () => {
|
|
66001
66128
|
const next = !isCollapsed;
|
|
@@ -66017,9 +66144,11 @@ var WorkflowTrackerRail = ({
|
|
|
66017
66144
|
{
|
|
66018
66145
|
controls: renderControls?.({ collapsed: isCollapsed }),
|
|
66019
66146
|
collapsed: isCollapsed,
|
|
66147
|
+
side,
|
|
66020
66148
|
hasCollapseToggle: collapsible,
|
|
66021
66149
|
renderStepPopover,
|
|
66022
66150
|
stepPopoverProps: {
|
|
66151
|
+
placement: side === "left" ? "right" : "left",
|
|
66023
66152
|
variant: cardProps.variant,
|
|
66024
66153
|
tone: cardProps.tone,
|
|
66025
66154
|
corner: cardProps.corner,
|