@commenda/pathfinder 0.1.0 → 0.2.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 (133) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/accordion/AccordionSection.js +9 -3
  3. package/dist/components/address-input/AddressInput.js +1 -1
  4. package/dist/components/artifact-card/ArtifactCard.js +1 -1
  5. package/dist/components/artifact-panel/ArtifactPanel.js +81 -55
  6. package/dist/components/attachment/Attachment.d.ts +2 -6
  7. package/dist/components/attachment/Attachment.js +59 -36
  8. package/dist/components/attachment/AttachmentCard.d.ts +1 -1
  9. package/dist/components/attachment/AttachmentCard.js +56 -43
  10. package/dist/components/attachment/attachment-class-names.d.ts +1 -1
  11. package/dist/components/attachment/attachment-class-names.js +1 -1
  12. package/dist/components/attachment-group/AttachmentGroup.js +1 -1
  13. package/dist/components/avatar/avatar-helper.d.ts +1 -1
  14. package/dist/components/banner/Banner.js +5 -2
  15. package/dist/components/button/Button.js +1 -1
  16. package/dist/components/calendar/CalendarAgenda.js +1 -1
  17. package/dist/components/calendar/CalendarArtwork.js +16 -22
  18. package/dist/components/calendar/CalendarEventContent.js +2 -2
  19. package/dist/components/calendar/CalendarPopup.js +102 -82
  20. package/dist/components/calendar/CalendarToolbar.js +10 -10
  21. package/dist/components/card/Card.js +47 -41
  22. package/dist/components/checkbox/Checkbox.js +31 -13
  23. package/dist/components/choices/choice-motion.d.ts +12 -0
  24. package/dist/components/choices/choice-motion.js +22 -0
  25. package/dist/components/code-block/CodeBlock.js +3 -2
  26. package/dist/components/controls/control-class-names.d.ts +1 -0
  27. package/dist/components/controls/control-class-names.js +8 -8
  28. package/dist/components/controls/useHoverHighlight.d.ts +12 -0
  29. package/dist/components/controls/useHoverHighlight.js +51 -0
  30. package/dist/components/controls/useSelectionIndicator.d.ts +3 -4
  31. package/dist/components/controls/useSelectionIndicator.js +43 -28
  32. package/dist/components/data-grid/DataGrid.js +7 -7
  33. package/dist/components/data-grid/DataGridHeaders.js +1 -1
  34. package/dist/components/date-picker/DateCalendar.js +3 -3
  35. package/dist/components/date-picker/DatePicker.js +10 -10
  36. package/dist/components/date-picker/field/DateField.js +1 -1
  37. package/dist/components/description-list/DescriptionList.js +2 -2
  38. package/dist/components/dialog/ConfirmDialog.js +1 -1
  39. package/dist/components/dialog/Dialog.js +1 -1
  40. package/dist/components/distribution-bar/DistributionBar.js +45 -35
  41. package/dist/components/drag-handle/DragHandle.d.ts +1 -1
  42. package/dist/components/dropdown/Dropdown.js +27 -26
  43. package/dist/components/dropdown/MenuContent.js +100 -69
  44. package/dist/components/dropdown/dropdown-types.d.ts +1 -0
  45. package/dist/components/dropdown/menu-motion.d.ts +2 -0
  46. package/dist/components/dropdown/menu-motion.js +4 -0
  47. package/dist/components/feedback/FeedbackIcon.d.ts +2 -1
  48. package/dist/components/feedback/FeedbackIcon.js +4 -4
  49. package/dist/components/feedback/FeedbackSurface.d.ts +3 -3
  50. package/dist/components/feedback/FeedbackSurface.js +49 -21
  51. package/dist/components/fields/FieldAction.d.ts +1 -0
  52. package/dist/components/fields/FieldAction.js +2 -2
  53. package/dist/components/icon-button/IconButton.js +37 -37
  54. package/dist/components/icons/index.js +776 -776
  55. package/dist/components/inline-reference/InlineReference.js +1 -8
  56. package/dist/components/list/List.js +2 -2
  57. package/dist/components/list/ListGroup.js +35 -30
  58. package/dist/components/list/ListTask.js +1 -1
  59. package/dist/components/list/SettingRow.js +1 -1
  60. package/dist/components/markdown/Markdown.js +11 -10
  61. package/dist/components/markdown/MarkdownTable.d.ts +1 -1
  62. package/dist/components/markdown/MarkdownTable.js +71 -54
  63. package/dist/components/otp/OTP.js +44 -43
  64. package/dist/components/output-sections/OutputRow.js +2 -3
  65. package/dist/components/overlays/OverlayFrame.js +2 -2
  66. package/dist/components/overlays/overlay-class-names.d.ts +3 -3
  67. package/dist/components/overlays/overlay-class-names.js +1 -1
  68. package/dist/components/phone-input/CountryPicker.js +11 -8
  69. package/dist/components/popover/Popover.js +2 -2
  70. package/dist/components/question-card/QuestionOptions.js +3 -3
  71. package/dist/components/radio-group/RadioGroup.js +59 -50
  72. package/dist/components/search/Search.js +51 -47
  73. package/dist/components/segmented-control/SegmentedControl.js +7 -6
  74. package/dist/components/selection/ChoiceField.js +1 -1
  75. package/dist/components/selection/ChoiceList.js +2 -1
  76. package/dist/components/selection/SearchableChoice.js +129 -114
  77. package/dist/components/selection/SelectedTags.js +1 -1
  78. package/dist/components/selection/SimpleChoice.js +95 -77
  79. package/dist/components/selection/choice-styles.d.ts +2 -2
  80. package/dist/components/selection/choice-styles.js +1 -1
  81. package/dist/components/sheet/Sheet.js +7 -7
  82. package/dist/components/side-nav/SideNav.d.ts +2 -5
  83. package/dist/components/side-nav/SideNav.js +98 -56
  84. package/dist/components/side-nav/SideNavItemView.d.ts +1 -1
  85. package/dist/components/side-nav/SideNavItemView.js +83 -98
  86. package/dist/components/side-nav/index.d.ts +2 -0
  87. package/dist/components/side-nav/index.js +1 -1
  88. package/dist/components/split-button/SplitButton.js +3 -2
  89. package/dist/components/stepper/StepMarker.js +32 -28
  90. package/dist/components/stepper/Stepper.js +30 -22
  91. package/dist/components/suggested-prompt/SuggestedPrompt.js +1 -1
  92. package/dist/components/switch/Switch.d.ts +1 -1
  93. package/dist/components/switch/Switch.js +38 -28
  94. package/dist/components/table/Table.js +134 -110
  95. package/dist/components/table/TableColumnHeader.js +20 -2
  96. package/dist/components/table/TableColumnResize.js +1 -1
  97. package/dist/components/table/TableColumnsMenu.js +1 -0
  98. package/dist/components/table/TableFilterChip.js +1 -1
  99. package/dist/components/table/TableFilterEditor.js +6 -6
  100. package/dist/components/table/TableFilters.js +1 -0
  101. package/dist/components/table/TableOptionMenu.d.ts +1 -1
  102. package/dist/components/table/TableOptionMenu.js +16 -17
  103. package/dist/components/table/TablePagination.js +1 -0
  104. package/dist/components/table/TableSelectionBar.js +4 -1
  105. package/dist/components/table/index.js +6 -6
  106. package/dist/components/table/table-column-style.js +0 -1
  107. package/dist/components/table/table-types.d.ts +5 -0
  108. package/dist/components/table/useTableData.js +2 -2
  109. package/dist/components/tabs/Tabs.js +61 -53
  110. package/dist/components/tabs/tab-class-names.d.ts +1 -1
  111. package/dist/components/tabs/tab-class-names.js +1 -1
  112. package/dist/components/tabular/TableEditCell.js +3 -1
  113. package/dist/components/tabular/tabular-class-names.d.ts +1 -0
  114. package/dist/components/tabular/tabular-class-names.js +1 -0
  115. package/dist/components/tabular/useCellEdit.js +1 -1
  116. package/dist/components/tabular/useTabularPinning.js +7 -6
  117. package/dist/components/tag/Tag.js +1 -1
  118. package/dist/components/tag-input/TagInput.js +64 -53
  119. package/dist/components/tag-input/useTagMotion.d.ts +6 -0
  120. package/dist/components/tag-input/useTagMotion.js +36 -0
  121. package/dist/components/text-area/TextArea.js +2 -1
  122. package/dist/components/thread/ThreadReply.js +10 -7
  123. package/dist/components/tool-call/ToolCall.js +2 -2
  124. package/dist/components/tree/TreeItemView.js +3 -3
  125. package/dist/index.d.ts +2 -2
  126. package/dist/index.js +37 -37
  127. package/dist/styles.css +1 -1
  128. package/package.json +5 -1
  129. package/dist/_virtual/_rolldown/runtime.js +0 -11
  130. package/dist/components/date-picker/date-values.d.ts +0 -23
  131. package/dist/components/date-picker/date-values.js +0 -52
  132. package/dist/components/table/TableHeaderPin.d.ts +0 -6
  133. package/dist/components/table/TableHeaderPin.js +0 -66
@@ -1,6 +1,3 @@
1
1
  import type { SideNavProps } from './side-nav-types.js';
2
- /** NAV-001: Figma715:12/145. Width208/56, pearl100, inset12, 28px rows; rail labels use Tooltip.
3
- * NAV-003: App owns active route, persistence and links. Collapsing the rail preserves section/group state.
4
- * NAV-004: Overflow fades derive from scroll geometry. No cookies, global shortcuts, or private app dependencies.
5
- */
6
- export declare function SideNav({ label, sections, activeId, collapseConfig, expansionConfig, header, footer, modeConfig, renderLink, className, }: SideNavProps): import("react/jsx-runtime").JSX.Element;
2
+ /** Mobile navigation uses the existing modal Sheet for focus trapping and dismissal. */
3
+ export declare function SideNav(props: SideNavProps): import("react/jsx-runtime").JSX.Element;
@@ -3,110 +3,152 @@ import { IconButton as e } from "../icon-button/IconButton.js";
3
3
  import { ChevronDownIcon as t } from "../icons/ChevronDownIcon.js";
4
4
  import { SegmentedControl as n } from "../segmented-control/SegmentedControl.js";
5
5
  import { LayoutLeftIcon as r } from "../icons/LayoutLeftIcon.js";
6
- import { SideNavItemView as i } from "./SideNavItemView.js";
7
- import { useNavScroll as a } from "./useNavScroll.js";
8
- import o from "clsx";
9
- import { useState as s } from "react";
10
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { Sheet as i } from "../sheet/Sheet.js";
7
+ import { SideNavItemView as a } from "./SideNavItemView.js";
8
+ import { useNavScroll as o } from "./useNavScroll.js";
9
+ import s from "clsx";
10
+ import { useEffect as c, useRef as l, useState as u } from "react";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
12
  //#region src/components/side-nav/SideNav.tsx
12
- function u({ label: u, sections: d, activeId: f, collapseConfig: p, expansionConfig: m, header: h, footer: g, modeConfig: _, renderLink: v, className: y }) {
13
- let [b, x] = s(p?.defaultValue ?? !1), S = p?.value ?? b, [C, w] = s(m?.defaultValue ?? d.filter((e) => e.collapsible).map((e) => e.id)), T = m?.value ?? C, E = new Set(T), { viewport: D, content: O, edges: k } = a(), A = (e) => {
14
- x(e), p?.onValueChange?.(e);
15
- }, j = (e) => {
16
- let t = T.includes(e) ? T.filter((t) => t !== e) : [...T, e];
17
- w(t), m?.onValueChange?.(t);
13
+ function p({ label: i, sections: c, activeId: p, collapseConfig: m, expansionConfig: h, header: g, footer: _, modeConfig: v, renderLink: y, className: b, mobile: x = !1 }) {
14
+ let [S, C] = u(m?.defaultValue ?? !1), w = !x && (m?.value ?? S), T = l(null), [E, D] = u(h?.defaultValue ?? c.filter((e) => e.collapsible).map((e) => e.id)), O = h?.value ?? E, k = new Set(O), { viewport: A, content: j, edges: M } = o(), N = (e) => {
15
+ C(e), m?.onValueChange?.(e);
16
+ }, P = (e) => {
17
+ let t = O.includes(e) ? O.filter((t) => t !== e) : [...O, e];
18
+ D(t), h?.onValueChange?.(t);
18
19
  };
19
- return /* @__PURE__ */ l("nav", {
20
- "aria-label": u,
21
- "data-collapsed": S,
22
- className: o("pf:box-border pf:flex pf:shrink-0 pf:flex-col pf:gap-3xl pf:h-full pf:min-h-0 pf:max-w-full pf:p-lg pf:bg-soft-pearl-100 pf:font-body pf:text-label-13", S ? "pf:w-[56px]" : "pf:w-[208px]", y),
20
+ return /* @__PURE__ */ f("nav", {
21
+ ref: T,
22
+ onPointerDownCapture: () => {
23
+ T.current?.setAttribute("data-motion", "pointer");
24
+ },
25
+ onKeyDownCapture: () => {
26
+ T.current?.removeAttribute("data-motion");
27
+ },
28
+ "aria-label": i,
29
+ "data-collapsed": w,
30
+ className: s("pf:box-border pf:flex pf:shrink-0 pf:flex-col pf:gap-3xl pf:h-full pf:min-h-0 pf:max-w-full pf:overflow-x-clip pf:transition-none pf:motion-safe:data-[motion=pointer]:transition-[width] pf:duration-180 pf:ease-[cubic-bezier(0.23,1,0.32,1)] pf:p-lg pf:bg-soft-pearl-100 pf:font-body pf:text-label-13", x ? "pf:w-full" : w ? "pf:w-[56px]" : "pf:w-[208px] pf:[&>*]:min-w-[184px]", b),
23
31
  children: [
24
- /* @__PURE__ */ l("header", {
25
- className: o("pf:shrink-0 pf:flex pf:gap-lg pf:items-center", S ? "pf:flex-col" : "pf:justify-between"),
26
- children: [/* @__PURE__ */ c("div", {
27
- className: "pf:min-w-0 pf:overflow-hidden",
28
- children: typeof h == "function" ? h(S) : h
29
- }), /* @__PURE__ */ c(e, {
30
- label: S ? "Expand sidebar" : "Collapse sidebar",
32
+ /* @__PURE__ */ f("header", {
33
+ className: s("pf:shrink-0 pf:flex pf:gap-lg pf:items-center", w ? "pf:flex-col" : "pf:justify-between"),
34
+ children: [/* @__PURE__ */ d("div", {
35
+ className: "pf:min-w-0 pf:overflow-hidden pf:whitespace-nowrap",
36
+ children: typeof g == "function" ? g(w) : g
37
+ }), !x && /* @__PURE__ */ d(e, {
38
+ label: w ? "Expand sidebar" : "Collapse sidebar",
31
39
  size: "xs",
32
40
  onClick: () => {
33
- A(!S);
41
+ N(!w);
34
42
  },
35
- children: /* @__PURE__ */ c(r, {})
43
+ children: /* @__PURE__ */ d(r, {})
36
44
  })]
37
45
  }),
38
- _ && /* @__PURE__ */ c(n, {
39
- ..._,
46
+ v && /* @__PURE__ */ d(n, {
47
+ ...v,
40
48
  size: "sm",
41
- className: o(S ? "pf:flex-col" : "pf:w-full", _.className),
42
- options: S ? _.options.map((e) => ({
49
+ className: s(w ? "pf:flex-col" : "pf:w-full pf:[&_.pf-segment]:flex-1 pf:[&_.pf-segment]:basis-0", v.className),
50
+ options: w ? v.options.map((e) => ({
43
51
  ...e,
44
52
  iconOnly: !0,
45
- leadingIcon: /* @__PURE__ */ c("span", {
53
+ leadingIcon: /* @__PURE__ */ d("span", {
46
54
  className: "pf:inline-flex pf:size-[16px] pf:items-center pf:justify-center",
47
55
  children: e.leadingIcon ?? e.label.slice(0, 1)
48
56
  })
49
- })) : _.options
57
+ })) : v.options
50
58
  }),
51
- /* @__PURE__ */ l("div", {
59
+ /* @__PURE__ */ f("div", {
52
60
  className: "pf:relative pf:flex-1 pf:min-h-0",
53
61
  children: [
54
- /* @__PURE__ */ c("div", {
55
- ref: D,
62
+ /* @__PURE__ */ d("div", {
63
+ ref: A,
56
64
  className: "pf:h-full pf:overflow-y-auto pf:overscroll-contain pf:[scrollbar-width:none]",
57
- children: /* @__PURE__ */ c("div", {
58
- ref: O,
65
+ children: /* @__PURE__ */ d("div", {
66
+ ref: j,
59
67
  className: "pf:flex pf:flex-col pf:gap-3xl",
60
- children: d.map((e) => /* @__PURE__ */ l("section", {
68
+ children: c.map((e) => /* @__PURE__ */ f("section", {
61
69
  "aria-label": e.label,
62
70
  className: "pf:min-w-0",
63
- children: [e.label && !S && (e.collapsible ? /* @__PURE__ */ l("button", {
71
+ children: [e.label && !w && (e.collapsible ? /* @__PURE__ */ f("button", {
64
72
  type: "button",
65
- "aria-expanded": E.has(e.id),
73
+ "aria-expanded": k.has(e.id),
66
74
  onClick: () => {
67
- j(e.id);
75
+ P(e.id);
68
76
  },
69
77
  className: "pf:flex pf:items-center pf:gap-xs pf:w-full pf:min-h-[28px] pf:px-md pf:py-xs pf:mb-sm pf:border-0 pf:rounded-sm pf:bg-transparent pf:text-label-12 pf:font-body pf:text-soft-pearl-800 pf:hover:text-soft-pearl-1000 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700",
70
- children: [e.label, /* @__PURE__ */ c(t, {
78
+ children: [e.label, /* @__PURE__ */ d(t, {
71
79
  size: 12,
72
- className: E.has(e.id) ? "" : "pf:-rotate-90"
80
+ className: k.has(e.id) ? "" : "pf:-rotate-90"
73
81
  })]
74
- }) : /* @__PURE__ */ c("h2", {
82
+ }) : /* @__PURE__ */ d("h2", {
75
83
  className: "pf:m-0 pf:mb-sm pf:px-md pf:py-sm pf:text-label-12 pf:font-normal pf:text-soft-pearl-800",
76
84
  children: e.label
77
- })), (S || !e.collapsible || E.has(e.id)) && /* @__PURE__ */ c("ul", {
85
+ })), (w || !e.collapsible || k.has(e.id)) && /* @__PURE__ */ d("ul", {
78
86
  className: "pf:m-0 pf:p-0 pf:list-none pf:flex pf:flex-col pf:gap-xxs",
79
- children: e.items.map((e) => /* @__PURE__ */ c(i, {
87
+ children: e.items.map((e) => /* @__PURE__ */ d(a, {
80
88
  item: e,
81
- collapsed: S,
82
- activeId: f,
83
- expanded: E,
84
- toggle: j,
89
+ collapsed: w,
90
+ activeId: p,
91
+ expanded: k,
92
+ toggle: P,
85
93
  expandRail: () => {
86
- A(!1);
94
+ N(!1);
87
95
  },
88
- renderLink: v
96
+ renderLink: y
89
97
  }, e.id))
90
98
  })]
91
99
  }, e.id))
92
100
  })
93
101
  }),
94
- k.top && /* @__PURE__ */ c("div", {
102
+ M.top && /* @__PURE__ */ d("div", {
95
103
  "aria-hidden": "true",
96
104
  className: "pf:pointer-events-none pf:absolute pf:inset-x-0 pf:top-0 pf:h-[48px] pf:bg-[linear-gradient(to_bottom,var(--pf-color-soft-pearl-100),transparent)]"
97
105
  }),
98
- k.bottom && /* @__PURE__ */ c("div", {
106
+ M.bottom && /* @__PURE__ */ d("div", {
99
107
  "aria-hidden": "true",
100
108
  className: "pf:pointer-events-none pf:absolute pf:inset-x-0 pf:bottom-0 pf:h-[48px] pf:bg-[linear-gradient(to_top,var(--pf-color-soft-pearl-100),transparent)]"
101
109
  })
102
110
  ]
103
111
  }),
104
- g && /* @__PURE__ */ c("footer", {
105
- className: "pf:shrink-0 pf:min-w-0",
106
- children: typeof g == "function" ? g(S) : g
112
+ _ && /* @__PURE__ */ d("footer", {
113
+ className: "pf:shrink-0 pf:min-w-0 pf:whitespace-nowrap",
114
+ children: typeof _ == "function" ? _(w) : _
107
115
  })
108
116
  ]
109
117
  });
110
118
  }
119
+ function m(t) {
120
+ let [n, a] = u(!1), [o, s] = u(!1);
121
+ return c(() => {
122
+ if (typeof matchMedia != "function") return;
123
+ let e = matchMedia("(max-width: 639px)"), t = () => {
124
+ a(e.matches), e.matches || s(!1);
125
+ };
126
+ return t(), e.addEventListener("change", t), () => {
127
+ e.removeEventListener("change", t);
128
+ };
129
+ }, []), n ? /* @__PURE__ */ d(i, {
130
+ title: t.label,
131
+ modal: !0,
132
+ size: "sm",
133
+ open: o,
134
+ onOpenChange: s,
135
+ dismissConfig: { outsidePress: !0 },
136
+ trigger: /* @__PURE__ */ d(e, {
137
+ label: `Open ${t.label} sidebar`,
138
+ children: /* @__PURE__ */ d(r, {})
139
+ }),
140
+ children: /* @__PURE__ */ d("div", {
141
+ role: "presentation",
142
+ className: "pf:h-full",
143
+ onClick: (e) => {
144
+ e.target.closest("a[href]:not([aria-disabled=\"true\"])") && s(!1);
145
+ },
146
+ children: /* @__PURE__ */ d(p, {
147
+ ...t,
148
+ mobile: !0
149
+ })
150
+ })
151
+ }) : /* @__PURE__ */ d(p, { ...t });
152
+ }
111
153
  //#endregion
112
- export { u as SideNav };
154
+ export { m as SideNav };
@@ -10,6 +10,6 @@ interface ItemViewProps {
10
10
  renderLink?: NavigationLinkConfig['render'];
11
11
  depth?: number;
12
12
  }
13
- /** NAV-002: Figma714:15 selected pearl300, icon blue700; weight never changes. One row surface; distinct link/expansion targets. */
13
+ /** NAV-002: Figma714:15 selected pearl300, icon blue700; weight never changes. One row surface; group rows toggle expansion. */
14
14
  export declare function SideNavItemView({ item, collapsed, activeId, expanded, toggle, expandRail, renderLink, depth, }: ItemViewProps): import("react/jsx-runtime").JSX.Element;
15
15
  export {};
@@ -2,133 +2,118 @@ import { Tooltip as e } from "../tooltip/Tooltip.js";
2
2
  import { ControlIcon as t } from "../controls/ControlIcon.js";
3
3
  import { IconButton as n } from "../icon-button/IconButton.js";
4
4
  import { NavigationLink as r } from "../controls/NavigationLink.js";
5
- import { ChevronRightIcon as i } from "../icons/ChevronRightIcon.js";
6
- import { Dropdown as a } from "../dropdown/Dropdown.js";
7
- import { DotsHorizontalIcon as o } from "../icons/DotsHorizontalIcon.js";
8
- import { ChevronDownIcon as s } from "../icons/ChevronDownIcon.js";
9
- import { RunActivity as c } from "../run-list/RunActivity.js";
10
- import { Badge as l } from "../badge/Badge.js";
11
- import u from "clsx";
12
- import { useId as d } from "react";
13
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
5
+ import { Dropdown as i } from "../dropdown/Dropdown.js";
6
+ import { DotsHorizontalIcon as a } from "../icons/DotsHorizontalIcon.js";
7
+ import { ChevronDownIcon as o } from "../icons/ChevronDownIcon.js";
8
+ import { RunActivity as s } from "../run-list/RunActivity.js";
9
+ import { Badge as c } from "../badge/Badge.js";
10
+ import l from "clsx";
11
+ import { useId as u } from "react";
12
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
14
13
  //#region src/components/side-nav/SideNavItemView.tsx
15
- function h({ item: g, collapsed: _, activeId: v, expanded: y, toggle: b, expandRail: x, renderLink: S, depth: C = 0 }) {
16
- let w = d(), T = g.kind === "group", E = T && y.has(g.id), D = v === g.id, O = g.disableConfig?.isDisabled === !0, k = () => {
17
- O || (_ && x(), (!E || !_) && b(g.id));
18
- }, A = [
19
- g.label,
20
- g.activityConfig?.label,
21
- g.count === void 0 ? "" : String(g.count),
22
- g.unread ? "Unread" : "",
23
- O ? g.disableConfig?.reason : ""
24
- ].filter(Boolean).join(" · "), j = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("span", {
25
- className: u("pf:relative pf:shrink-0 pf:inline-flex pf:items-center pf:justify-center pf:size-[16px]", D ? "pf:text-blue-700" : "pf:text-soft-pearl-800"),
26
- children: [g.presentation === "conversation" ? /* @__PURE__ */ p(c, { item: {
27
- status: g.activityConfig?.status === "idle" || !g.activityConfig ? "completed" : g.activityConfig.status,
28
- unread: g.unread
29
- } }) : /* @__PURE__ */ p(t, {
14
+ function m({ item: h, collapsed: g, activeId: _, expanded: v, toggle: y, expandRail: b, renderLink: x, depth: S = 0 }) {
15
+ let C = u(), w = h.kind === "group", T = w && v.has(h.id), E = _ === h.id, D = h.disableConfig?.isDisabled === !0, O = () => {
16
+ D || (g && b(), (!T || !g) && y(h.id));
17
+ }, k = [
18
+ h.label,
19
+ h.activityConfig?.label,
20
+ h.count === void 0 ? "" : String(h.count),
21
+ h.unread ? "Unread" : "",
22
+ D ? h.disableConfig?.reason : ""
23
+ ].filter(Boolean).join(" · "), A = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("span", {
24
+ className: l("pf:relative pf:shrink-0 pf:inline-flex pf:items-center pf:justify-center pf:size-[16px]", E ? "pf:text-blue-700" : "pf:text-soft-pearl-800"),
25
+ children: [h.presentation === "conversation" ? /* @__PURE__ */ f(s, { item: {
26
+ status: h.activityConfig?.status === "idle" || !h.activityConfig ? "completed" : h.activityConfig.status,
27
+ unread: h.unread && (g || h.count === void 0)
28
+ } }) : /* @__PURE__ */ f(t, {
30
29
  size: 16,
31
- children: g.icon
32
- }), _ && g.presentation !== "conversation" && g.unread && /* @__PURE__ */ p("span", { className: "pf:absolute pf:-end-xs pf:-top-xs pf:size-[5px] pf:rounded-full pf:bg-blue-700" })]
33
- }), !_ && /* @__PURE__ */ m(f, { children: [
34
- /* @__PURE__ */ p("span", {
30
+ children: h.icon
31
+ }), g && h.presentation !== "conversation" && h.unread && /* @__PURE__ */ f("span", { className: "pf:absolute pf:-end-xs pf:-top-xs pf:size-[5px] pf:rounded-full pf:bg-blue-700" })]
32
+ }), !g && /* @__PURE__ */ p(d, { children: [
33
+ /* @__PURE__ */ f("span", {
35
34
  className: "pf:flex-1 pf:min-w-0 pf:truncate",
36
- children: g.label
35
+ children: h.label
37
36
  }),
38
- g.count !== void 0 && /* @__PURE__ */ p("span", {
37
+ h.count !== void 0 && /* @__PURE__ */ f("span", {
39
38
  className: "pf:shrink-0 pf:max-w-[48px] pf:truncate pf:text-label-12 pf:text-soft-pearl-800",
40
- title: String(g.count),
41
- children: g.presentation === "conversation" ? /* @__PURE__ */ p(l, { label: `${String(g.count)} new` }) : g.count
39
+ title: String(h.count),
40
+ children: h.presentation === "conversation" ? /* @__PURE__ */ f(c, { label: `${String(h.count)} new` }) : h.count
42
41
  }),
43
- g.presentation !== "conversation" && g.unread && /* @__PURE__ */ p("span", { className: "pf:size-[5px] pf:shrink-0 pf:rounded-full pf:bg-blue-700" })
44
- ] })] }), M = u("pf:box-border pf:flex pf:items-center pf:gap-lg pf:min-w-0 pf:min-h-[28px] pf:rounded-sm pf:border-0 pf:font-body pf:text-label-13 pf:font-normal pf:no-underline pf:text-start pf:cursor-pointer pf:bg-transparent pf:group-hover/nav-item:text-soft-pearl-1000 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700", _ ? "pf:size-[28px] pf:justify-center pf:p-0" : "pf:flex-1 pf:px-md pf:py-xs", g.presentation === "conversation" && !_ && "pf:min-h-[32px]", D ? "pf:text-soft-pearl-1000" : "pf:text-soft-pearl-900", O && "pf:opacity-50 pf:cursor-not-allowed"), N = g.linkConfig ? /* @__PURE__ */ p(r, {
42
+ h.presentation !== "conversation" && h.unread && h.count === void 0 && /* @__PURE__ */ f("span", { className: "pf:size-[5px] pf:shrink-0 pf:rounded-full pf:bg-blue-700" })
43
+ ] })] }), j = l("pf:box-border pf:flex pf:items-center pf:gap-lg pf:min-w-0 pf:min-h-[28px] pf:rounded-sm pf:border-0 pf:font-body pf:text-label-13 pf:font-normal pf:no-underline pf:text-start pf:cursor-pointer pf:bg-transparent pf:group-hover/nav-item:text-soft-pearl-1000 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700", g ? "pf:size-[28px] pf:justify-center pf:p-0" : "pf:flex-1 pf:px-md pf:py-xs", h.presentation === "conversation" && !g && "pf:min-h-[32px]", E ? "pf:text-soft-pearl-1000" : "pf:text-soft-pearl-900", D && "pf:opacity-50 pf:cursor-not-allowed"), M = h.linkConfig && !w ? /* @__PURE__ */ f(r, {
45
44
  linkConfig: {
46
- ...g.linkConfig,
47
- render: g.linkConfig.render ?? S
45
+ ...h.linkConfig,
46
+ render: h.linkConfig.render ?? x
48
47
  },
49
- className: M,
50
- "aria-label": g.label,
51
- "aria-describedby": A === g.label ? void 0 : w,
52
- "aria-current": D ? "page" : void 0,
53
- "aria-disabled": O || void 0,
48
+ className: j,
49
+ "aria-label": h.label,
50
+ "aria-describedby": k === h.label ? void 0 : C,
51
+ "aria-current": E ? "page" : void 0,
52
+ "aria-disabled": D || void 0,
54
53
  onClick: (e) => {
55
- O && e.preventDefault();
54
+ D && e.preventDefault();
56
55
  },
57
- children: j
58
- }) : /* @__PURE__ */ m("button", {
56
+ children: A
57
+ }) : /* @__PURE__ */ p("button", {
59
58
  type: "button",
60
- className: M,
61
- "aria-label": g.label,
62
- "aria-describedby": A === g.label ? void 0 : w,
63
- "aria-disabled": O || void 0,
64
- "aria-expanded": T ? E : void 0,
59
+ className: j,
60
+ "aria-label": h.label,
61
+ "aria-describedby": k === h.label ? void 0 : C,
62
+ "aria-disabled": D || void 0,
63
+ "aria-expanded": w ? T : void 0,
65
64
  onClick: () => {
66
- T ? k() : O || g.onAction();
65
+ w ? O() : D || h.onAction();
67
66
  },
68
- children: [j, T && !_ && /* @__PURE__ */ p(s, {
67
+ children: [A, w && !g && /* @__PURE__ */ f(o, {
69
68
  size: 12,
70
- className: E ? "" : "pf:-rotate-90"
69
+ className: T ? "" : "pf:-rotate-90"
71
70
  })]
72
71
  });
73
- return /* @__PURE__ */ m("li", {
72
+ return /* @__PURE__ */ p("li", {
74
73
  className: "pf:min-w-0",
75
74
  children: [
76
- /* @__PURE__ */ p("span", {
77
- id: w,
75
+ /* @__PURE__ */ f("span", {
76
+ id: C,
78
77
  className: "pf:sr-only",
79
- children: A
78
+ children: k
80
79
  }),
81
- /* @__PURE__ */ m("div", {
82
- className: u("pf:group/nav-item pf:flex pf:items-center pf:min-w-0 pf:rounded-sm", _ && "pf:w-[28px]", D ? "pf:bg-soft-pearl-300" : !O && "pf:hover:bg-soft-pearl-200"),
83
- style: _ ? void 0 : { paddingInlineStart: Math.min(C, 4) * 16 },
84
- children: [
85
- /* @__PURE__ */ p(e, {
86
- trigger: N,
87
- content: A,
88
- disabled: !_ && !O,
89
- side: "right"
90
- }),
91
- g.menuConfig && !_ && /* @__PURE__ */ p("span", {
92
- className: "pf:shrink-0 pf:pe-xs pf:[@media(hover:hover)]:opacity-0 pf:group-hover/nav-item:opacity-100 pf:group-focus-within/nav-item:opacity-100",
93
- children: /* @__PURE__ */ p(a, {
94
- disabled: O,
95
- menu: g.menuConfig,
96
- trigger: /* @__PURE__ */ p(n, {
97
- size: "xs",
98
- label: `Actions for ${g.label}`,
99
- children: /* @__PURE__ */ p(o, {})
100
- })
101
- })
102
- }),
103
- T && g.linkConfig && !_ && /* @__PURE__ */ p("button", {
104
- type: "button",
105
- "aria-label": `${E ? "Collapse" : "Expand"} ${g.label}`,
106
- "aria-expanded": E,
107
- "aria-disabled": O || void 0,
108
- onClick: k,
109
- className: "pf:flex pf:items-center pf:justify-center pf:size-[28px] pf:shrink-0 pf:border-0 pf:rounded-sm pf:bg-transparent pf:text-soft-pearl-800 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700",
110
- children: E ? /* @__PURE__ */ p(s, { size: 12 }) : /* @__PURE__ */ p(i, {
111
- size: 12,
112
- className: "pf:rtl:rotate-180"
80
+ /* @__PURE__ */ p("div", {
81
+ className: l("pf:group/nav-item pf:flex pf:items-center pf:min-w-0 pf:rounded-sm", g && "pf:w-[28px]", E ? "pf:bg-soft-pearl-300" : !D && "pf:hover:bg-soft-pearl-200"),
82
+ style: g ? void 0 : { paddingInlineStart: Math.min(S, 4) * 16 },
83
+ children: [/* @__PURE__ */ f(e, {
84
+ trigger: M,
85
+ content: k,
86
+ disabled: !g && !D,
87
+ side: "right",
88
+ showArrow: !0
89
+ }), h.menuConfig && !g && /* @__PURE__ */ f("span", {
90
+ className: "pf:shrink-0 pf:pe-xs pf:[@media(hover:hover)]:opacity-0 pf:group-hover/nav-item:opacity-100 pf:group-focus-within/nav-item:opacity-100",
91
+ children: /* @__PURE__ */ f(i, {
92
+ disabled: D,
93
+ menu: h.menuConfig,
94
+ trigger: /* @__PURE__ */ f(n, {
95
+ size: "xs",
96
+ label: `Actions for ${h.label}`,
97
+ children: /* @__PURE__ */ f(a, {})
113
98
  })
114
99
  })
115
- ]
100
+ })]
116
101
  }),
117
- T && E && !_ && /* @__PURE__ */ p("ul", {
102
+ w && T && !g && /* @__PURE__ */ f("ul", {
118
103
  className: "pf:m-0 pf:p-0 pf:list-none pf:flex pf:flex-col pf:gap-xxs",
119
- children: g.children.map((e) => /* @__PURE__ */ p(h, {
104
+ children: h.children.map((e) => /* @__PURE__ */ f(m, {
120
105
  item: e,
121
106
  collapsed: !1,
122
- activeId: v,
123
- expanded: y,
124
- toggle: b,
125
- expandRail: x,
126
- renderLink: S,
127
- depth: C + 1
107
+ activeId: _,
108
+ expanded: v,
109
+ toggle: y,
110
+ expandRail: b,
111
+ renderLink: x,
112
+ depth: S + 1
128
113
  }, e.id))
129
114
  })
130
115
  ]
131
116
  });
132
117
  }
133
118
  //#endregion
134
- export { h as SideNavItemView };
119
+ export { m as SideNavItemView };
@@ -1,2 +1,4 @@
1
1
  export type { SideNavItem, SideNavProps, SideNavSection, } from './side-nav-types.js';
2
2
  export { SideNav } from './SideNav.js';
3
+ export { SideNav as Sidebar } from './SideNav.js';
4
+ export type { SideNavProps as SidebarProps, SideNavItem as SidebarItem, SideNavSection as SidebarSection, } from './side-nav-types.js';
@@ -1 +1 @@
1
- export { SideNav } from "./SideNav.js";
1
+ export { SideNav, SideNav as Sidebar } from "./SideNav.js";
@@ -20,6 +20,7 @@ var c = a(({ label: a, variant: c = "primary", size: l = "md", menuConfig: u, di
20
20
  children: [/* @__PURE__ */ o(e, {
21
21
  ..._,
22
22
  ref: v,
23
+ className: "pf:scale-none!",
23
24
  variant: c,
24
25
  size: l,
25
26
  disabled: d,
@@ -34,13 +35,13 @@ var c = a(({ label: a, variant: c = "primary", size: l = "md", menuConfig: u, di
34
35
  portalContainer: u.portalContainer,
35
36
  disabled: y,
36
37
  trigger: /* @__PURE__ */ o(t, {
37
- className: i("pf-split-trigger pf:rounded-s-none! pf:h-auto!", c === "primary" ? "pf:border-s pf:border-s-blue-100" : "pf:border-s-0"),
38
+ className: i("pf-split-trigger pf:rounded-s-none! pf:h-auto!", "pf:scale-none!", c === "primary" ? "pf:border-s pf:border-s-blue-100" : "pf:border-s-0"),
38
39
  label: u.label ?? `More options for ${a}`,
39
40
  variant: c,
40
41
  size: l,
41
42
  disabled: y,
42
43
  disabledReason: b,
43
- children: /* @__PURE__ */ o(r, {})
44
+ children: /* @__PURE__ */ o(r, { size: l === "lg" ? 20 : 16 })
44
45
  })
45
46
  })]
46
47
  });
@@ -1,30 +1,34 @@
1
- "use client";
2
- import { CheckIcon as e } from "../icons/CheckIcon.js";
3
- import t from "clsx";
4
- import { useState as n } from "react";
5
- import { jsx as r } from "react/jsx-runtime";
1
+ import e from "clsx";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
6
3
  //#region src/components/stepper/StepMarker.tsx
7
- var i = ({ state: i, number: a }) => {
8
- let [o, s] = n(i), [c, l] = n(!1);
9
- return o !== i && (s(i), l(i === "done")), /* @__PURE__ */ r("span", {
10
- "aria-hidden": "true",
11
- className: t("pf:flex pf:size-[20px] pf:shrink-0 pf:items-center pf:justify-center pf:rounded-full pf:box-border pf:font-body pf:text-label-12-strong pf:transition-colors pf:duration-(--pf-duration-base) pf:motion-reduce:transition-none", {
12
- "pf:bg-soft-pearl-300 pf:text-soft-pearl-900": i === "upcoming",
13
- "pf:bg-blue-700 pf:text-background": i === "current",
14
- "pf:bg-green-700 pf:text-background": i === "done",
15
- "pf:bg-soft-pearl-100 pf:text-soft-pearl-600 pf:border pf:border-solid pf:border-soft-pearl-300": i === "disabled"
16
- }),
17
- children: i === "done" ? /* @__PURE__ */ r("span", {
18
- onAnimationEnd: () => {
19
- l(!1);
20
- },
21
- className: t("pf:flex", c && "pf:motion-safe:animate-[pf-step-check_200ms_ease-out]"),
22
- children: /* @__PURE__ */ r(e, {
23
- size: 12,
24
- tone: "inherit"
25
- })
26
- }) : a
27
- });
28
- };
4
+ var r = ({ state: r, number: i }) => /* @__PURE__ */ n("span", {
5
+ "aria-hidden": "true",
6
+ "data-done": r === "done" ? "" : void 0,
7
+ className: e("pf:group/marker pf:relative pf:flex pf:size-[20px] pf:shrink-0 pf:items-center pf:justify-center pf:rounded-full pf:box-border pf:font-body pf:text-label-12-strong", {
8
+ "pf:bg-soft-pearl-300 pf:text-soft-pearl-900": r === "upcoming",
9
+ "pf:bg-blue-700 pf:text-background": r === "current",
10
+ "pf:bg-green-700 pf:text-background": r === "done",
11
+ "pf:bg-soft-pearl-100 pf:text-soft-pearl-600 pf:border pf:border-solid pf:border-soft-pearl-300": r === "disabled"
12
+ }),
13
+ children: [/* @__PURE__ */ t("span", {
14
+ className: r === "done" ? "pf:invisible" : void 0,
15
+ children: i
16
+ }), /* @__PURE__ */ t("svg", {
17
+ width: "12",
18
+ height: "12",
19
+ viewBox: "0 0 12 12",
20
+ fill: "none",
21
+ className: "pf:absolute pf:inset-0 pf:m-auto pf:opacity-0 pf:group-data-done/marker:opacity-100",
22
+ children: /* @__PURE__ */ t("path", {
23
+ d: "M2.5 6L5 8.5L9.5 3.5",
24
+ pathLength: "1",
25
+ stroke: "currentColor",
26
+ strokeWidth: "1.5",
27
+ strokeLinecap: "round",
28
+ strokeLinejoin: "round",
29
+ className: "pf:[stroke-dasharray:1] pf:[stroke-dashoffset:1] pf:group-data-done/marker:[stroke-dashoffset:0] pf:transition-none pf:motion-safe:group-data-[motion=pointer]/stepper:transition-[stroke-dashoffset] pf:duration-180 pf:ease-[cubic-bezier(0.23,1,0.32,1)]"
30
+ })
31
+ })]
32
+ });
29
33
  //#endregion
30
- export { i as StepMarker };
34
+ export { r as StepMarker };