@camunda/design-system 0.35.0 → 0.37.0

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.
Files changed (130) hide show
  1. package/dist/src/components/ui/app-header.d.ts +6 -2
  2. package/dist/src/components/ui/app-header.d.ts.map +1 -1
  3. package/dist/src/components/ui/app-header.js +1 -1
  4. package/dist/src/components/ui/app-header.js.map +1 -1
  5. package/dist/src/components/ui/app-sidebar.d.ts +44 -12
  6. package/dist/src/components/ui/app-sidebar.d.ts.map +1 -1
  7. package/dist/src/components/ui/app-sidebar.js +42 -15
  8. package/dist/src/components/ui/app-sidebar.js.map +1 -1
  9. package/dist/src/components/ui/avatar.d.ts +7 -0
  10. package/dist/src/components/ui/avatar.d.ts.map +1 -1
  11. package/dist/src/components/ui/avatar.js +1 -1
  12. package/dist/src/components/ui/avatar.js.map +1 -1
  13. package/dist/src/components/ui/bar-chart.d.ts.map +1 -1
  14. package/dist/src/components/ui/bar-chart.js +45 -7
  15. package/dist/src/components/ui/bar-chart.js.map +1 -1
  16. package/dist/src/components/ui/chart.d.ts +9 -2
  17. package/dist/src/components/ui/chart.d.ts.map +1 -1
  18. package/dist/src/components/ui/chart.js +13 -4
  19. package/dist/src/components/ui/chart.js.map +1 -1
  20. package/dist/src/components/ui/data-table.d.ts +6 -0
  21. package/dist/src/components/ui/data-table.d.ts.map +1 -1
  22. package/dist/src/components/ui/data-table.js +6 -5
  23. package/dist/src/components/ui/data-table.js.map +1 -1
  24. package/dist/src/components/ui/definition-tooltip.d.ts.map +1 -1
  25. package/dist/src/components/ui/definition-tooltip.js +37 -9
  26. package/dist/src/components/ui/definition-tooltip.js.map +1 -1
  27. package/dist/src/components/ui/line-chart.d.ts.map +1 -1
  28. package/dist/src/components/ui/line-chart.js +12 -2
  29. package/dist/src/components/ui/line-chart.js.map +1 -1
  30. package/dist/src/components/ui/meter.d.ts.map +1 -1
  31. package/dist/src/components/ui/meter.js +1 -10
  32. package/dist/src/components/ui/meter.js.map +1 -1
  33. package/dist/src/components/ui/nav-breadcrumb.d.ts +120 -2
  34. package/dist/src/components/ui/nav-breadcrumb.d.ts.map +1 -1
  35. package/dist/src/components/ui/nav-breadcrumb.js +54 -7
  36. package/dist/src/components/ui/nav-breadcrumb.js.map +1 -1
  37. package/dist/src/components/ui/nav-data.d.ts +46 -0
  38. package/dist/src/components/ui/nav-data.d.ts.map +1 -0
  39. package/dist/src/components/ui/nav-data.js +66 -0
  40. package/dist/src/components/ui/nav-data.js.map +1 -0
  41. package/dist/src/components/ui/nav-icon.assignability.d.ts +30 -0
  42. package/dist/src/components/ui/nav-icon.assignability.d.ts.map +1 -0
  43. package/dist/src/components/ui/nav-icon.assignability.js +28 -0
  44. package/dist/src/components/ui/nav-icon.assignability.js.map +1 -0
  45. package/dist/src/components/ui/nav-icon.d.ts +33 -0
  46. package/dist/src/components/ui/nav-icon.d.ts.map +1 -0
  47. package/dist/src/components/ui/nav-icon.js +20 -0
  48. package/dist/src/components/ui/nav-icon.js.map +1 -0
  49. package/dist/src/components/ui/notifications.d.ts +72 -0
  50. package/dist/src/components/ui/notifications.d.ts.map +1 -0
  51. package/dist/src/components/ui/notifications.js +53 -0
  52. package/dist/src/components/ui/notifications.js.map +1 -0
  53. package/dist/src/components/ui/scorecard.d.ts +1 -1
  54. package/dist/src/components/ui/scorecard.d.ts.map +1 -1
  55. package/dist/src/components/ui/scorecard.js +13 -8
  56. package/dist/src/components/ui/scorecard.js.map +1 -1
  57. package/dist/src/components/ui/sheet.d.ts +1 -1
  58. package/dist/src/components/ui/sparkline.d.ts.map +1 -1
  59. package/dist/src/components/ui/sparkline.js +11 -1
  60. package/dist/src/components/ui/sparkline.js.map +1 -1
  61. package/dist/src/examples/agent-control-plane-processes/DashboardPage.d.ts +3 -0
  62. package/dist/src/examples/agent-control-plane-processes/DashboardPage.d.ts.map +1 -0
  63. package/dist/src/examples/agent-control-plane-processes/DashboardPage.js +114 -0
  64. package/dist/src/examples/agent-control-plane-processes/DashboardPage.js.map +1 -0
  65. package/dist/src/examples/agent-control-plane-processes/derive.d.ts +65 -0
  66. package/dist/src/examples/agent-control-plane-processes/derive.d.ts.map +1 -0
  67. package/dist/src/examples/agent-control-plane-processes/derive.js +234 -0
  68. package/dist/src/examples/agent-control-plane-processes/derive.js.map +1 -0
  69. package/dist/src/examples/agent-control-plane-processes/mock-data.d.ts +37 -0
  70. package/dist/src/examples/agent-control-plane-processes/mock-data.d.ts.map +1 -0
  71. package/dist/src/examples/agent-control-plane-processes/mock-data.js +206 -0
  72. package/dist/src/examples/agent-control-plane-processes/mock-data.js.map +1 -0
  73. package/dist/src/examples/agent-control-plane-processes/summary-mock-data.d.ts +37 -0
  74. package/dist/src/examples/agent-control-plane-processes/summary-mock-data.d.ts.map +1 -0
  75. package/dist/src/examples/agent-control-plane-processes/summary-mock-data.js +53 -0
  76. package/dist/src/examples/agent-control-plane-processes/summary-mock-data.js.map +1 -0
  77. package/dist/src/examples/shared/DashboardSection.d.ts +9 -0
  78. package/dist/src/examples/shared/DashboardSection.d.ts.map +1 -0
  79. package/dist/src/examples/shared/DashboardSection.js +5 -0
  80. package/dist/src/examples/shared/DashboardSection.js.map +1 -0
  81. package/dist/src/examples/shared/DateRangePopover.d.ts +3 -0
  82. package/dist/src/examples/shared/DateRangePopover.d.ts.map +1 -0
  83. package/dist/src/examples/shared/DateRangePopover.js +35 -0
  84. package/dist/src/examples/shared/DateRangePopover.js.map +1 -0
  85. package/dist/src/examples/shared/agent-control-plane-nav.d.ts +4 -0
  86. package/dist/src/examples/shared/agent-control-plane-nav.d.ts.map +1 -0
  87. package/dist/src/examples/shared/agent-control-plane-nav.js +25 -0
  88. package/dist/src/examples/shared/agent-control-plane-nav.js.map +1 -0
  89. package/dist/src/examples/shared/date-range-utils.d.ts +10 -0
  90. package/dist/src/examples/shared/date-range-utils.d.ts.map +1 -0
  91. package/dist/src/examples/shared/date-range-utils.js +75 -0
  92. package/dist/src/examples/shared/date-range-utils.js.map +1 -0
  93. package/dist/src/icons/camunda-app-icons.d.ts +19 -0
  94. package/dist/src/icons/camunda-app-icons.d.ts.map +1 -0
  95. package/dist/src/icons/camunda-app-icons.js +26 -0
  96. package/dist/src/icons/camunda-app-icons.js.map +1 -0
  97. package/dist/src/icons/index.d.ts +1 -0
  98. package/dist/src/icons/index.d.ts.map +1 -1
  99. package/dist/src/icons/index.js +1 -0
  100. package/dist/src/icons/index.js.map +1 -1
  101. package/dist/src/index.d.ts +6 -3
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/index.js +4 -2
  104. package/dist/src/index.js.map +1 -1
  105. package/dist/styles.css +77 -25
  106. package/package.json +1 -1
  107. package/dist/src/examples/cost-dashboard/CostBreakdownChart.d.ts +0 -2
  108. package/dist/src/examples/cost-dashboard/CostBreakdownChart.d.ts.map +0 -1
  109. package/dist/src/examples/cost-dashboard/CostBreakdownChart.js +0 -21
  110. package/dist/src/examples/cost-dashboard/CostBreakdownChart.js.map +0 -1
  111. package/dist/src/examples/cost-dashboard/CostDashboardPage.d.ts +0 -2
  112. package/dist/src/examples/cost-dashboard/CostDashboardPage.d.ts.map +0 -1
  113. package/dist/src/examples/cost-dashboard/CostDashboardPage.js +0 -56
  114. package/dist/src/examples/cost-dashboard/CostDashboardPage.js.map +0 -1
  115. package/dist/src/examples/cost-dashboard/TrendChart.d.ts +0 -2
  116. package/dist/src/examples/cost-dashboard/TrendChart.d.ts.map +0 -1
  117. package/dist/src/examples/cost-dashboard/TrendChart.js +0 -19
  118. package/dist/src/examples/cost-dashboard/TrendChart.js.map +0 -1
  119. package/dist/src/examples/cost-dashboard/mock-data.d.ts +0 -34
  120. package/dist/src/examples/cost-dashboard/mock-data.d.ts.map +0 -1
  121. package/dist/src/examples/cost-dashboard/mock-data.js +0 -120
  122. package/dist/src/examples/cost-dashboard/mock-data.js.map +0 -1
  123. package/dist/src/examples/projects-list/ProjectsListPage.d.ts +0 -4
  124. package/dist/src/examples/projects-list/ProjectsListPage.d.ts.map +0 -1
  125. package/dist/src/examples/projects-list/ProjectsListPage.js +0 -58
  126. package/dist/src/examples/projects-list/ProjectsListPage.js.map +0 -1
  127. package/dist/src/examples/projects-list/mock-data.d.ts +0 -10
  128. package/dist/src/examples/projects-list/mock-data.d.ts.map +0 -1
  129. package/dist/src/examples/projects-list/mock-data.js +0 -83
  130. package/dist/src/examples/projects-list/mock-data.js.map +0 -1
@@ -1,10 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { ChevronDown } from "lucide-react";
4
+ import { Check, ChevronDown, MoreVertical } from "lucide-react";
5
5
  import { cn } from "../../lib/utils.js";
6
6
  import { Button } from "./button.js";
7
- import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "./dropdown.js";
7
+ import { linkDestination, resolveActive, resolveLinkProps, } from "./nav-data.js";
8
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "./dropdown.js";
8
9
  /**
9
10
  * Top-nav context switcher — chain of split-button segments separated by `/`.
10
11
  *
@@ -32,7 +33,7 @@ function NavBreadcrumb({ className, children, "aria-label": ariaLabel = "Context
32
33
  className: "select-none text-xs text-neutral-foreground-subtle/40", children: "/" })) : null, child] }, childKey));
33
34
  }) }) }));
34
35
  }
35
- function NavBreadcrumbItem({ icon, label, onClick, switchLabel = "Switch context", children, active = false, className, }) {
36
+ function NavBreadcrumbItem({ icon, label, onClick, switchLabel = "Switch context", linkProps, linkComponent, children, actions, actionsLabel, trailingElement, menuElement, active = false, className, }) {
36
37
  // Clone the user's icon so it carries the `data-icon` attribute the
37
38
  // Button uses to drive its inline padding rules.
38
39
  const iconWithData = icon && React.isValidElement(icon)
@@ -42,20 +43,66 @@ function NavBreadcrumbItem({ icon, label, onClick, switchLabel = "Switch context
42
43
  // padding; with one, we tighten the right side so the chevron reads as
43
44
  // paired (otherwise the inline-start `pl-2` makes the segment look
44
45
  // heavier on the right).
45
- const hasSwitcher = children !== undefined && children !== null;
46
- return (_jsxs("li", { "data-slot": "nav-breadcrumb-item", className: cn("inline-flex items-center", className), children: [_jsxs(Button, { variant: "ghost", size: "sm", onClick: onClick,
46
+ //
47
+ // Filtering matters: `children={[]}` and `children={cond && <Item/>}` both arrive here as
48
+ // something non-null, and a bare presence test would give them a chevron that opens nothing.
49
+ const hasSwitcher = React.Children.toArray(children).filter(Boolean).length > 0;
50
+ const visibleActions = actions?.filter(Boolean) ?? [];
51
+ const hasActions = visibleActions.length > 0;
52
+ const resolvedActionsLabel = actionsLabel ??
53
+ (typeof label === "string" ? `${label} actions` : "More actions");
54
+ const destination = linkDestination(linkProps);
55
+ const isLink = destination !== undefined;
56
+ const LinkEl = linkComponent ?? "a";
57
+ const labelContent = (_jsxs(_Fragment, { children: [iconWithData, label, trailingElement] }));
58
+ return (_jsxs("li", { "data-slot": "nav-breadcrumb-item", className: cn("inline-flex items-center", className), children: [_jsx(Button, { variant: "ghost", size: "sm",
59
+ // A link segment renders through Button's Slot so it keeps the ghost styling while
60
+ // being a real anchor — hoverable href, Cmd-click, "open in new tab", and announced
61
+ // as a link rather than a button.
62
+ asChild: isLink, onClick: onClick,
47
63
  // Padding rules:
48
64
  // • icon present → Button's `has-data-[icon=inline-start]:pl-2`
49
65
  // already tightens the left; tighten the right when there's a
50
66
  // switcher so the segment reads as paired.
51
67
  // • no icon → force `px-2` so left and right match the same
52
68
  // 8px the icon variant uses.
53
- className: cn(!icon ? "px-2" : hasSwitcher && "pr-2", active && "font-medium"), children: [iconWithData, label] }), hasSwitcher ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": switchLabel,
69
+ className: cn(!icon ? "px-2" : (hasSwitcher || hasActions) && "pr-2", active && "font-medium"), children: isLink ? (_jsx(LinkEl, { ...resolveLinkProps(linkProps, linkComponent !== undefined), children: labelContent })) : (labelContent) }), menuElement, hasActions ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": resolvedActionsLabel, className: "-ml-0.5 text-neutral-foreground-subtle", children: _jsx(MoreVertical, {}) }) }), _jsx(DropdownMenuContent, { align: "start", children: visibleActions.map((action) => (_jsxs(React.Fragment, { children: [action.hasDivider ? _jsx(DropdownMenuSeparator, {}) : null, _jsx(DropdownMenuItem, { variant: action.isDanger ? "destructive" : "default", disabled: action.disabled, onClick: action.onClick, children: action.label })] }, action.key))) })] })) : null, hasSwitcher ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": switchLabel,
54
70
  // Tighten the gap so the chevron reads as paired with the
55
71
  // label, not a sibling segment. `text-neutral-foreground-subtle`
56
72
  // matches the `/` separator — secondary affordance,
57
73
  // but readable.
58
74
  className: "-ml-0.5 text-neutral-foreground-subtle", children: _jsx(ChevronDown, {}) }) }), _jsx(DropdownMenuContent, { align: "start", children: children })] })) : null] }));
59
75
  }
76
+ /**
77
+ * `NavBreadcrumb` built from data instead of composition.
78
+ *
79
+ * `NavBreadcrumb` itself stays composition-based: it takes children and gains no `activeItemKey`.
80
+ * This helper is the data-fed entry point, and it owns the two resolutions a descriptor implies —
81
+ * label functions and dropdown selection — so consumers stop hand-rolling them.
82
+ */
83
+ export function NavBreadcrumbSwitcher({ items, activeItemKey, linkComponent, "aria-label": ariaLabel, className, }) {
84
+ return (_jsx(NavBreadcrumb, { "aria-label": ariaLabel, className: className, children: items.map((item) => {
85
+ const label = typeof item.label === "function"
86
+ ? item.label(activeItemKey ?? "")
87
+ : item.label;
88
+ const Icon = item.icon;
89
+ const rows = item.dropdownItems ?? [];
90
+ return (_jsx(NavBreadcrumbItem, { icon: Icon ? _jsx(Icon, {}) : undefined, label: label, onClick: item.onClick, linkProps: item.linkProps, linkComponent: linkComponent, actions: item.actions, actionsLabel: item.actionsLabel, trailingElement: item.trailingElement, menuElement: item.menuElement, switchLabel: item.dropdownAriaLabel, children: rows.length > 0 ? (_jsxs(_Fragment, { children: [item.dropdownTitle ? (_jsx(DropdownMenuLabel, { children: item.dropdownTitle })) : null, rows.map((row) => (_jsx(SwitcherRow, { row: row, activeItemKey: activeItemKey, linkComponent: linkComponent }, row.key)))] })) : null }, item.key));
91
+ }) }));
92
+ }
93
+ function SwitcherRow({ row, activeItemKey, linkComponent, }) {
94
+ // No key fallback here — see `isSelected` on NavBreadcrumbDropdownItem for why.
95
+ const selected = row.isSelected === undefined
96
+ ? false
97
+ : resolveActive(row.isSelected, row.key, activeItemKey);
98
+ const destination = linkDestination(row.linkProps);
99
+ const RowIcon = row.icon;
100
+ const LinkEl = linkComponent ?? "a";
101
+ const content = (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "flex w-4 shrink-0 justify-center", children: selected ? _jsx(Check, { className: "size-4" }) : null }), RowIcon ? _jsx(RowIcon, { "aria-hidden": true, className: "size-4 shrink-0" }) : null, _jsx("span", { className: "flex-1 truncate", children: row.label }), row.trailingElement] }));
102
+ return (_jsx(DropdownMenuItem
103
+ // `aria-current` rather than `aria-selected`: the row is a menuitem, and menuitem does
104
+ // not support aria-selected. Screen readers announce the page relationship instead.
105
+ , { "aria-current": selected ? "page" : undefined, onClick: row.onClick, asChild: destination !== undefined, children: destination !== undefined ? (_jsx(LinkEl, { ...resolveLinkProps(row.linkProps, linkComponent !== undefined), children: content })) : (content) }));
106
+ }
60
107
  export { NavBreadcrumb, NavBreadcrumbItem };
61
108
  //# sourceMappingURL=nav-breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-breadcrumb.js","sourceRoot":"","sources":["../../../../src/components/ui/nav-breadcrumb.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,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ation surfaces: how a node describes where it goes,
3
+ * and how it says whether it is the current one. `AppSidebar` and `NavBreadcrumb` both read
4
+ * these — the rules must not diverge, or the same `linkProps` would resolve differently
5
+ * depending on which surface renders it.
6
+ */
7
+ export interface NavLinkProps {
8
+ href?: string;
9
+ /**
10
+ * React Router's destination, declared alongside `href` because `to` is the router convention
11
+ * and most consumers building navigation data already emit it.
12
+ *
13
+ * Narrowed to `string` on purpose. React Router's own `to` is
14
+ * `LocationDescriptor | ((location) => LocationDescriptor)`, and a non-string value reaching
15
+ * the default anchor renders `href="[object Object]"` — a link that looks real and navigates
16
+ * nowhere. Object and function destinations are still supported, but only through an injected
17
+ * `linkComponent`, which knows how to read them.
18
+ */
19
+ to?: string;
20
+ [key: string]: unknown;
21
+ }
22
+ /**
23
+ * Whether a node is the current one.
24
+ *
25
+ * - `undefined` — fall back to comparing the node's `key` against `activeItemKey`
26
+ * - `boolean` — as given
27
+ * - `string` — active when it equals `activeItemKey`
28
+ * - function — called with `activeItemKey`
29
+ *
30
+ * The function form is why this is a union rather than a boolean: a matcher passed to a boolean
31
+ * prop is always truthy, so every row using one renders permanently active.
32
+ */
33
+ export type ActiveMatcher = boolean | string | ((activeItemKey: string) => boolean);
34
+ /** The destination a node points at, or `undefined` when it is not a link. */
35
+ export declare function linkDestination(linkProps: NavLinkProps | undefined): string | undefined;
36
+ /**
37
+ * Props for the rendered link element. An injected `linkComponent` gets everything; the default
38
+ * anchor gets the router keys stripped and an `href` resolved from `href ?? to`.
39
+ */
40
+ export declare function resolveLinkProps(linkProps: NavLinkProps | undefined, hasLinkComponent: boolean): Record<string, unknown>;
41
+ /**
42
+ * Resolves a node's active state. A per-node matcher of any form always wins; `activeItemKey`
43
+ * is only the fallback comparand, compared against the node's own key.
44
+ */
45
+ export declare function resolveActive(isActive: ActiveMatcher | undefined, key: string, activeItemKey: string | undefined): boolean;
46
+ //# sourceMappingURL=nav-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-data.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/nav-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GACvB,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAuB1D,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,sBAIlE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,gBAAgB,EAAE,OAAO,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,aAAa,GAAG,SAAS,EACnC,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,OAAO,CAOT"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Vocabulary shared by the data-driven navigation surfaces: how a node describes where it goes,
3
+ * and how it says whether it is the current one. `AppSidebar` and `NavBreadcrumb` both read
4
+ * these — the rules must not diverge, or the same `linkProps` would resolve differently
5
+ * depending on which surface renders it.
6
+ */
7
+ /**
8
+ * React Router keys that must not reach a plain `<a>`. When a `linkComponent` is injected every
9
+ * key passes through verbatim — it needs these. When the design system renders its own anchor
10
+ * they are unknown DOM attributes, and React warns about each one.
11
+ *
12
+ * Targets react-router v5 and v6. A consumer on another router should inject a `linkComponent`
13
+ * rather than expect this list to know its prop names.
14
+ */
15
+ const ROUTER_ONLY_LINK_KEYS = new Set([
16
+ "to",
17
+ "replace",
18
+ "state",
19
+ "innerRef",
20
+ "component",
21
+ "exact",
22
+ "strict",
23
+ "isActive",
24
+ "activeClassName",
25
+ "activeStyle",
26
+ ]);
27
+ /** The destination a node points at, or `undefined` when it is not a link. */
28
+ export function linkDestination(linkProps) {
29
+ if (!linkProps)
30
+ return undefined;
31
+ if (linkProps.href !== undefined)
32
+ return linkProps.href;
33
+ return typeof linkProps.to === "string" ? linkProps.to : undefined;
34
+ }
35
+ /**
36
+ * Props for the rendered link element. An injected `linkComponent` gets everything; the default
37
+ * anchor gets the router keys stripped and an `href` resolved from `href ?? to`.
38
+ */
39
+ export function resolveLinkProps(linkProps, hasLinkComponent) {
40
+ if (!linkProps)
41
+ return {};
42
+ if (hasLinkComponent)
43
+ return linkProps;
44
+ const rest = {};
45
+ for (const [key, value] of Object.entries(linkProps)) {
46
+ if (!ROUTER_ONLY_LINK_KEYS.has(key))
47
+ rest[key] = value;
48
+ }
49
+ rest.href = linkDestination(linkProps);
50
+ return rest;
51
+ }
52
+ /**
53
+ * Resolves a node's active state. A per-node matcher of any form always wins; `activeItemKey`
54
+ * is only the fallback comparand, compared against the node's own key.
55
+ */
56
+ export function resolveActive(isActive, key, activeItemKey) {
57
+ if (isActive === undefined) {
58
+ return activeItemKey !== undefined && key === activeItemKey;
59
+ }
60
+ if (typeof isActive === "boolean")
61
+ return isActive;
62
+ if (typeof isActive === "string")
63
+ return isActive === activeItemKey;
64
+ return activeItemKey !== undefined ? isActive(activeItemKey) : false;
65
+ }
66
+ //# sourceMappingURL=nav-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-data.js","sourceRoot":"","sources":["../../../../src/components/ui/nav-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgCH;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,IAAI;IACJ,SAAS;IACT,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,aAAa;CACd,CAAC,CAAC;AAEH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CAAC,KAAK,CAAC;AACvE,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Compile-time fixture for the `NavIcon` contract. Nothing imports this file — it exists to be
3
+ * type-checked, and `npm run typecheck` is what runs it.
4
+ *
5
+ * `NavIcon` is deliberately structural. Narrowing it back to lucide's `LucideIcon` (a
6
+ * `React.ForwardRefExoticComponent`, which structurally requires `$$typeof`) would silently
7
+ * reject three of the four sources below — including this package's own registry icons — and
8
+ * every consumer would discover it at their call sites rather than here.
9
+ */
10
+ import type * as React from "react";
11
+ import type { NavIcon } from "./nav-icon.js";
12
+ import type { SidebarItem } from "./app-sidebar.js";
13
+ import type { GlobalActionButton } from "./app-header.js";
14
+ /** A Carbon icon's shape, which is what C3's `IconComponent` resolves to. */
15
+ interface CarbonIconProps extends React.SVGProps<SVGSVGElement> {
16
+ size?: number | string;
17
+ }
18
+ declare const fromLucide: NavIcon;
19
+ declare const fromRegistryNamed: NavIcon;
20
+ declare const fromRegistryMap: NavIcon;
21
+ declare const fromAppMap: NavIcon;
22
+ declare const fromCarbonClass: NavIcon;
23
+ declare const fromCarbonFunction: NavIcon;
24
+ /** Both consuming surfaces accept the same four sources. */
25
+ declare const sidebarItem: SidebarItem;
26
+ declare const sidebarItemWithoutIcon: SidebarItem;
27
+ declare const globalAction: GlobalActionButton;
28
+ export type { CarbonIconProps as _CarbonIconProps };
29
+ export { fromLucide, fromRegistryNamed, fromRegistryMap, fromAppMap, fromCarbonClass, fromCarbonFunction, sidebarItem, sidebarItemWithoutIcon, globalAction, };
30
+ //# sourceMappingURL=nav-icon.assignability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-icon.assignability.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/nav-icon.assignability.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,6EAA6E;AAC7E,UAAU,eAAgB,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC7D,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAID,QAAA,MAAM,UAAU,EAAE,OAAmC,CAAC;AACtD,QAAA,MAAM,iBAAiB,EAAE,OAAqB,CAAC;AAC/C,QAAA,MAAM,eAAe,EAAE,OAA8B,CAAC;AACtD,QAAA,MAAM,UAAU,EAAE,OAAiC,CAAC;AACpD,QAAA,MAAM,eAAe,EAAE,OAAyB,CAAC;AACjD,QAAA,MAAM,kBAAkB,EAAE,OAA4B,CAAC;AAEvD,4DAA4D;AAC5D,QAAA,MAAM,WAAW,EAAE,WAKlB,CAAC;AACF,QAAA,MAAM,sBAAsB,EAAE,WAI7B,CAAC;AACF,QAAA,MAAM,YAAY,EAAE,kBAInB,CAAC;AAEF,YAAY,EAAE,eAAe,IAAI,gBAAgB,EAAE,CAAC;AACpD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,YAAY,GACb,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { Home } from "lucide-react";
2
+ import { camundaIcons, ProjectIcon } from "../../icons/index.js";
3
+ import { camundaAppIcons } from "../../icons/camunda-app-icons.js";
4
+ const fromLucide = Home;
5
+ const fromRegistryNamed = ProjectIcon;
6
+ const fromRegistryMap = camundaIcons.project;
7
+ const fromAppMap = camundaAppIcons.operate;
8
+ const fromCarbonClass = CarbonClassIcon;
9
+ const fromCarbonFunction = CarbonFunctionIcon;
10
+ /** Both consuming surfaces accept the same four sources. */
11
+ const sidebarItem = {
12
+ type: "item",
13
+ key: "k",
14
+ label: "Label",
15
+ icon: CarbonFunctionIcon,
16
+ };
17
+ const sidebarItemWithoutIcon = {
18
+ type: "item",
19
+ key: "k",
20
+ label: "Label",
21
+ };
22
+ const globalAction = {
23
+ key: "k",
24
+ label: "Label",
25
+ icon: ProjectIcon,
26
+ };
27
+ export { fromLucide, fromRegistryNamed, fromRegistryMap, fromAppMap, fromCarbonClass, fromCarbonFunction, sidebarItem, sidebarItemWithoutIcon, globalAction, };
28
+ //# sourceMappingURL=nav-icon.assignability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-icon.assignability.js","sourceRoot":"","sources":["../../../../src/components/ui/nav-icon.assignability.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAYhE,MAAM,UAAU,GAAY,IAAyB,CAAC;AACtD,MAAM,iBAAiB,GAAY,WAAW,CAAC;AAC/C,MAAM,eAAe,GAAY,YAAY,CAAC,OAAO,CAAC;AACtD,MAAM,UAAU,GAAY,eAAe,CAAC,OAAO,CAAC;AACpD,MAAM,eAAe,GAAY,eAAe,CAAC;AACjD,MAAM,kBAAkB,GAAY,kBAAkB,CAAC;AAEvD,4DAA4D;AAC5D,MAAM,WAAW,GAAgB;IAC/B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,kBAAkB;CACzB,CAAC;AACF,MAAM,sBAAsB,GAAgB;IAC1C,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,OAAO;CACf,CAAC;AACF,MAAM,YAAY,GAAuB;IACvC,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,WAAW;CAClB,CAAC;AAGF,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,YAAY,GACb,CAAC"}
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ /**
3
+ * The accepted type of every data-driven icon slot in the navigation API.
4
+ *
5
+ * Deliberately structural rather than lucide's nominal `LucideIcon`: that type is a
6
+ * `React.ForwardRefExoticComponent`, so it structurally requires `$$typeof` and rejects any
7
+ * plain function component — including the design system's own registry icons. All four sources
8
+ * a consumer can hold assign to this one: lucide icons, the registry's icons, `camundaIcons[key]`
9
+ * and Carbon-shaped icon components.
10
+ *
11
+ * `size` is intentionally absent, and both plausible spellings were measured to fail under
12
+ * `strict`: `size?: number | string` rejects Carbon-shaped icons (whose `size` is `number`,
13
+ * through `getDerivedStateFromProps` contravariance) and `size?: number` rejects lucide
14
+ * (`propTypes` invariance). Size icons with the `size-*` utility, optionally reinforced with
15
+ * numeric `width`/`height` — both are members of `SVGProps<SVGSVGElement>`. A class overrides an
16
+ * SVG `width`/`height` attribute but not an inline `style`, so an icon that hardcodes its
17
+ * dimensions inline is out of contract.
18
+ */
19
+ export type NavIcon = React.ComponentType<React.SVGProps<SVGSVGElement>>;
20
+ /**
21
+ * Renders a navigation row's icon, falling back to the label's initials.
22
+ *
23
+ * The collapsed rail renders the icon as the row's only visual, with the label moved into
24
+ * `sr-only`. An icon-less node would collapse to a row that is invisible yet still focusable and
25
+ * still carries a tooltip — so something has to occupy the box. Initials keep rows
26
+ * distinguishable, and the rail's existing tooltip names them.
27
+ */
28
+ export declare function NavRowIcon({ icon: Icon, label, className, }: {
29
+ icon?: NavIcon;
30
+ label: string;
31
+ className?: string;
32
+ }): React.JSX.Element;
33
+ //# sourceMappingURL=nav-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-icon.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/nav-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEzE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EACL,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBAmBA"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils.js";
4
+ import { deriveInitials } from "./avatar.js";
5
+ /**
6
+ * Renders a navigation row's icon, falling back to the label's initials.
7
+ *
8
+ * The collapsed rail renders the icon as the row's only visual, with the label moved into
9
+ * `sr-only`. An icon-less node would collapse to a row that is invisible yet still focusable and
10
+ * still carries a tooltip — so something has to occupy the box. Initials keep rows
11
+ * distinguishable, and the rail's existing tooltip names them.
12
+ */
13
+ export function NavRowIcon({ icon: Icon, label, className, }) {
14
+ if (Icon) {
15
+ return _jsx(Icon, { "aria-hidden": true, className: cn("size-5 shrink-0", className) });
16
+ }
17
+ const initials = deriveInitials(label);
18
+ return (_jsx("span", { "aria-hidden": true, "data-slot": "nav-row-icon-fallback", className: cn("flex size-5 shrink-0 items-center justify-center rounded-sm border border-current/30 text-[0.625rem] font-medium leading-none", className), children: initials }));
19
+ }
20
+ //# sourceMappingURL=nav-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-icon.js","sourceRoot":"","sources":["../../../../src/components/ui/nav-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAqB1C;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EACL,SAAS,GAKV;IACC,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,KAAC,IAAI,yBAAa,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAI,CAAC;IAC3E,CAAC;IAED,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAEvC,OAAO,CACL,iDAEY,uBAAuB,EACjC,SAAS,EAAE,EAAE,CACX,+HAA+H,EAC/H,SAAS,CACV,YAEA,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,72 @@
1
+ import * as React from "react";
2
+ /**
3
+ * One notification, as the consumer already has it.
4
+ *
5
+ * Presentational only: `timestamp` is a pre-formatted string, not a Date, because relative
6
+ * formatting is locale and library work that belongs with the consumer — the design system has
7
+ * no opinion on whether "2h ago" or "14:32" is right for a product.
8
+ */
9
+ export interface NavNotification {
10
+ key: string;
11
+ title: string;
12
+ description?: React.ReactNode;
13
+ /** Pre-formatted by the consumer. */
14
+ timestamp?: string;
15
+ /** Unread notifications carry a marker and count toward the bell's badge. */
16
+ isRead?: boolean;
17
+ href?: string;
18
+ onClick?: () => void;
19
+ }
20
+ export interface NotificationBellProps {
21
+ /**
22
+ * Unread notifications. Rendered as a badge; counts above `maxCount` show as `9+`. The bell
23
+ * owns no state — pass the count you already hold.
24
+ */
25
+ unreadCount?: number;
26
+ /** Highest number rendered literally. Default 9. */
27
+ maxCount?: number;
28
+ /** Accessible name for the trigger. Default "Notifications". */
29
+ label?: string;
30
+ /** Reflected as `aria-expanded`, for when the bell toggles a panel. */
31
+ isActive?: boolean;
32
+ onClick?: () => void;
33
+ className?: string;
34
+ }
35
+ /**
36
+ * Notification bell, for `AppHeader.globalActions` (as an `element`) or anywhere a trigger fits.
37
+ *
38
+ * Split from the panel on purpose: the trigger belongs in the header's action row while the
39
+ * panel is an overlay, and a consumer may already own one of the two.
40
+ */
41
+ export declare function NotificationBell({ unreadCount, maxCount, label, isActive, onClick, className, }: NotificationBellProps): React.JSX.Element;
42
+ export interface NotificationsPanelProps {
43
+ notifications: NavNotification[];
44
+ open: boolean;
45
+ onOpenChange: (open: boolean) => void;
46
+ /** Omit to render notifications without a per-item dismiss control. */
47
+ onDismiss?: (key: string) => void;
48
+ /** Panel heading. Default "Notifications". */
49
+ title?: string;
50
+ /** Shown when there is nothing to list. */
51
+ emptyMessage?: React.ReactNode;
52
+ /** Rendered in the panel header — e.g. a "Mark all as read" button. */
53
+ headerAction?: React.ReactNode;
54
+ /** Component used for notifications carrying an `href`. Default: a plain anchor. */
55
+ linkComponent?: React.ElementType;
56
+ className?: string;
57
+ }
58
+ /**
59
+ * Notification panel — a right-hand overlay listing what the consumer passes.
60
+ *
61
+ * Fetches nothing and stores nothing: `open` is controlled, because the trigger usually lives in
62
+ * the header and the panel does not, so one of the two has to own the state and it cannot be
63
+ * this one.
64
+ *
65
+ * **Mark notifications read from `onOpenChange(true)`.** The panel does not fire that write —
66
+ * it is a persisted mutation and the transport differs per product — but it is the agreed
67
+ * moment. Console's notification runtime deliberately leaves the timing here, and the same feed
68
+ * appears in several products: if one marks on open, another on click and a third only on an
69
+ * explicit action, the unread count means something different in each app.
70
+ */
71
+ export declare function NotificationsPanel({ notifications, open, onOpenChange, onDismiss, title, emptyMessage, headerAction, linkComponent, className, }: NotificationsPanelProps): React.JSX.Element;
72
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/notifications.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,qCAAqC;IACrC,SAAS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T,KAAuB,EACvB,YAA2C,EAC3C,YAAY,EACZ,aAAa,EACb,SAAS,GACV,EAAE,uBAAuB,qBAqCzB"}
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Bell, X } from "lucide-react";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Button } from "./button.js";
7
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "./sheet.js";
8
+ /**
9
+ * Notification bell, for `AppHeader.globalActions` (as an `element`) or anywhere a trigger fits.
10
+ *
11
+ * Split from the panel on purpose: the trigger belongs in the header's action row while the
12
+ * panel is an overlay, and a consumer may already own one of the two.
13
+ */
14
+ export function NotificationBell({ unreadCount = 0, maxCount = 9, label = "Notifications", isActive, onClick, className, }) {
15
+ const hasUnread = unreadCount > 0;
16
+ const badgeText = unreadCount > maxCount ? `${maxCount}+` : `${unreadCount}`;
17
+ return (
18
+ // inline-flex, not block: the badge is positioned against this box, so it has to
19
+ // shrink-wrap the button or it anchors to the container's right edge instead.
20
+ _jsxs("div", { className: cn("relative inline-flex", className), children: [_jsx(Button, { variant: "ghost", size: "icon", "aria-label": hasUnread
21
+ ? `${label}, ${unreadCount} unread`
22
+ : `${label}, none unread`, "aria-expanded": isActive, onClick: onClick, "data-slot": "notification-bell", children: _jsx(Bell, { "aria-hidden": true, className: "size-4" }) }), hasUnread ? (_jsx("span", { "aria-hidden": true, "data-slot": "notification-bell-badge", className: "pointer-events-none absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-primary-action-default text-[0.625rem] leading-none text-primary-action-foreground", children: badgeText })) : null, _jsx("span", { "aria-live": "polite", className: "sr-only", children: hasUnread ? `${unreadCount} unread notifications` : "" })] }));
23
+ }
24
+ /**
25
+ * Notification panel — a right-hand overlay listing what the consumer passes.
26
+ *
27
+ * Fetches nothing and stores nothing: `open` is controlled, because the trigger usually lives in
28
+ * the header and the panel does not, so one of the two has to own the state and it cannot be
29
+ * this one.
30
+ *
31
+ * **Mark notifications read from `onOpenChange(true)`.** The panel does not fire that write —
32
+ * it is a persisted mutation and the transport differs per product — but it is the agreed
33
+ * moment. Console's notification runtime deliberately leaves the timing here, and the same feed
34
+ * appears in several products: if one marks on open, another on click and a third only on an
35
+ * explicit action, the unread count means something different in each app.
36
+ */
37
+ export function NotificationsPanel({ notifications, open, onOpenChange, onDismiss, title = "Notifications", emptyMessage = "You have no notifications.", headerAction, linkComponent, className, }) {
38
+ const isEmpty = notifications.length === 0;
39
+ return (_jsx(Sheet, { open: open, onOpenChange: onOpenChange, children: _jsxs(SheetContent, { side: "right", "data-slot": "notifications-panel", className: cn("w-full sm:max-w-sm", className), children: [_jsxs(SheetHeader, { children: [_jsx(SheetTitle, { children: title }), isEmpty ? (_jsx(SheetDescription, { children: emptyMessage })) : (_jsx(SheetDescription, { className: "sr-only", children: `${notifications.length} notifications` })), headerAction] }), isEmpty ? null : (_jsx("ul", { className: "m-0 flex list-none flex-col gap-1 overflow-y-auto p-4 pt-0", children: notifications.map((notification) => (_jsx(NotificationRow, { notification: notification, onDismiss: onDismiss, linkComponent: linkComponent }, notification.key))) }))] }) }));
40
+ }
41
+ function NotificationRow({ notification, onDismiss, linkComponent, }) {
42
+ const { key, title, description, timestamp, isRead, href, onClick } = notification;
43
+ const isInteractive = href !== undefined || onClick !== undefined;
44
+ const LinkEl = linkComponent ?? "a";
45
+ const Body = href
46
+ ? LinkEl
47
+ : isInteractive
48
+ ? "button"
49
+ : "div";
50
+ return (_jsxs("li", { "data-slot": "notification-item", "data-read": isRead ? "true" : "false", className: "flex items-start gap-2 rounded-md p-2 hover:bg-neutral-background-medium", children: [_jsx("span", { "aria-hidden": true, className: cn("mt-1.5 size-2 shrink-0 rounded-full", isRead ? "bg-transparent" : "bg-primary-action-default") }), _jsxs(Body, { ...(href ? { href } : isInteractive ? { type: "button" } : {}), onClick: onClick, className: cn("min-w-0 flex-1 text-left", isInteractive &&
51
+ "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: [_jsxs("span", { className: "block text-sm text-neutral-foreground-strong", children: [isRead ? null : _jsx("span", { className: "sr-only", children: "Unread. " }), title] }), description ? (_jsx("span", { className: "block text-sm text-neutral-foreground-subtle", children: description })) : null, timestamp ? (_jsx("span", { className: "block text-xs text-neutral-foreground-subtle", children: timestamp })) : null] }), onDismiss ? (_jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": `Dismiss ${title}`, onClick: () => onDismiss(key), className: "shrink-0 text-neutral-foreground-subtle", children: _jsx(X, {}) })) : null] }));
52
+ }
53
+ //# sourceMappingURL=notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../../src/components/ui/notifications.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,SAAS,CAAC;AAqCjB;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,WAAW,GAAG,CAAC,EACf,QAAQ,GAAG,CAAC,EACZ,KAAK,GAAG,eAAe,EACvB,QAAQ,EACR,OAAO,EACP,SAAS,GACa;IACtB,MAAM,SAAS,GAAG,WAAW,GAAG,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,GAAG,WAAW,EAAE,CAAC;IAE7E,OAAO;IACL,iFAAiF;IACjF,8EAA8E;IAC9E,eAAK,SAAS,EAAE,E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/D,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,EAAE,CACX,0BAA0B,EAC1B,aAAa;oBACX,oFAAoF,CACvF,aAED,gBAAM,SAAS,EAAC,8CAA8C,aAC3D,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,SAAS,yBAAgB,EACzD,KAAK,IACD,EACN,WAAW,CAAC,CAAC,CAAC,CACb,eAAM,SAAS,EAAC,8CAA8C,YAC3D,WAAW,GACP,CACR,CAAC,CAAC,CAAC,IAAI,EACP,SAAS,CAAC,CAAC,CAAC,CACX,eAAM,SAAS,EAAC,8CAA8C,YAC3D,SAAS,GACL,CACR,CAAC,CAAC,CAAC,IAAI,IACH,EACN,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,SAAS,gBACF,WAAW,KAAK,EAAE,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAC7B,SAAS,EAAC,yCAAyC,YAEnD,KAAC,CAAC,KAAG,GACE,CACV,CAAC,CAAC,CAAC,IAAI,IACL,CACN,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  interface ScorecardDelta {
3
3
  value: string;
4
- direction: "up" | "down";
4
+ direction: "increase" | "decrease";
5
5
  variant?: "success" | "danger" | "neutral";
6
6
  }
7
7
  interface ScorecardSparklineData {
@@ -1 +1 @@
1
- {"version":3,"file":"scorecard.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/scorecard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC5C;AAED,UAAU,sBAAsB;IAC9B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M,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiFD,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,EACT,MAAa,EACb,IAAgB,EAChB,OAAe,EACf,KAAa,EACb,YAAwB,EACxB,SAAS,GACV,EAAE,cAAc,qBAwDhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC"}
@@ -6,22 +6,27 @@ import { Badge } from "./badge.js";
6
6
  import { Card, CardHeader, CardTitle } from "./card.js";
7
7
  import { Skeleton } from "./skeleton.js";
8
8
  import { Sparkline } from "./sparkline.js";
9
- function ScorecardBody({ label, tooltip, value, delta, sparkline, size, loading, empty, emptyMessage, }) {
9
+ function ScorecardBody({ label, tooltip, value, delta, sparkline, size, loading, empty, emptyMessage, asCard, }) {
10
10
  if (loading) {
11
11
  return (_jsxs(_Fragment, { children: [_jsx(Skeleton, { className: "h-4 w-24" }), _jsx(Skeleton, { className: cn("h-7 w-20", size === "sm" && "h-6 w-16") })] }));
12
12
  }
13
- const resolvedVariant = delta
14
- ? (delta.variant ?? (delta.direction === "up" ? "success" : "danger"))
15
- : undefined;
16
- const DeltaIcon = delta?.direction === "up" ? ArrowUpRight : ArrowDownRight;
13
+ const DeltaIcon = delta?.direction === "increase" ? ArrowUpRight : ArrowDownRight;
17
14
  // `loading` is always false here — the branch above already returned
18
15
  // before this point, so Sparkline never renders its own skeleton; the
19
16
  // fixed two-block skeleton above is what represents loading for the tile.
20
- const sparklineElement = sparkline ? (_jsx(Sparkline, { data: sparkline.data, dataKey: sparkline.dataKey, loading: false })) : null;
21
- return (_jsxs(_Fragment, { children: [_jsx(CardTitle, { tooltip: tooltip, className: "text-sm font-normal", children: label }), _jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: cn("min-w-0 flex-1 truncate text-2xl font-semibold text-neutral-foreground-strong", size === "sm" && "text-xl"), children: empty ? emptyMessage : value }), !empty && delta && (_jsxs(Badge, { variant: resolvedVariant, className: "shrink-0", children: [_jsx(DeltaIcon, { "data-icon": "inline-start", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: delta.direction === "up" ? "Increased by " : "Decreased by " }), delta.value] }))] }), !empty && sparklineElement] }));
17
+ // Bled flush to the Card's own edges via negative margins that cancel
18
+ // CardHeader's `px-4`/`px-3` and Card's own `py-4`/`py-3` only correct
19
+ // when `asCard` actually wraps this content in that padding; the bare
20
+ // `<div>` (`asCard={false}`) has no padding of its own to cancel.
21
+ const sparklineElement = sparkline ? (_jsx(Sparkline, { data: sparkline.data, dataKey: sparkline.dataKey, loading: false, className: asCard
22
+ ? "w-auto -mx-4 -mb-4 group-data-[size=sm]/card:-mx-3 group-data-[size=sm]/card:-mb-3"
23
+ : undefined })) : null;
24
+ return (_jsxs(_Fragment, { children: [_jsx(CardTitle, { tooltip: tooltip, className: "text-sm font-normal", children: label }), _jsx("div", { className: "flex min-w-0 items-center", children: _jsxs("span", { className: "inline-flex min-w-0 max-w-full items-center gap-2", children: [_jsx("span", { className: cn("min-w-0 truncate text-2xl font-semibold text-neutral-foreground-strong", size === "sm" && "text-xl"), children: empty ? emptyMessage : value }), !empty && delta && (_jsxs(Badge, { variant: delta.variant, className: "shrink-0", children: [_jsx(DeltaIcon, { "data-icon": "inline-start", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: delta.direction === "increase"
25
+ ? "Increased by "
26
+ : "Decreased by " }), delta.value] }))] }) }), !empty && sparklineElement] }));
22
27
  }
23
28
  function Scorecard({ label, tooltip, value, delta, sparkline, asCard = true, size = "default", loading = false, empty = false, emptyMessage = "No data", className, }) {
24
- const content = (_jsx(ScorecardBody, { label: label, tooltip: tooltip, value: value, delta: delta, sparkline: sparkline, size: size, loading: loading, empty: empty, emptyMessage: emptyMessage }));
29
+ const content = (_jsx(ScorecardBody, { label: label, tooltip: tooltip, value: value, delta: delta, sparkline: sparkline, size: size, loading: loading, empty: empty, emptyMessage: emptyMessage, asCard: asCard }));
25
30
  // Loading removes the title from the accessible tree (it becomes a
26
31
  // Skeleton), so `aria-busy` alone would leave the busy region unnamed.
27
32
  // `aria-label` alone isn't enough either: the root is a plain `<div>`
@@ -1 +1 @@
1
- {"version":3,"file":"scorecard.js","sourceRoot":"","sources":["../../../../src/components/ui/scorecard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA2BxC,SAAS,aAAa,CAAC,EACrB,KAAK,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,YAAY,GAI+D;IAC3E,IAAI,OAAO,EAAE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IAAI,SAAS,EAC/B,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,eACzB,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gBAC7B,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAC9C,SAAS,EAAE,EAAE,CACX,qEAAqE,EACrE,SAAS,CACV,YAEA,OAAO,GACJ,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -7,7 +7,7 @@ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimi
7
7
  declare function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>): React.JSX.Element;
8
8
  declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>): React.JSX.Element;
9
9
  declare const sheetVariants: (props?: ({
10
- side?: "left" | "right" | "top" | "bottom" | null | undefined;
10
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  declare function SheetContent({ className, children, side, showCloseButton, onOpenAutoFocus, onCloseAutoFocus, restoreFocusRef, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & VariantProps<typeof sheetVariants> & {
13
13
  showCloseButton?: boolean;