@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.
- package/CHANGELOG.md +12 -0
- package/dist/components/accordion/AccordionSection.js +9 -3
- package/dist/components/address-input/AddressInput.js +1 -1
- package/dist/components/artifact-card/ArtifactCard.js +1 -1
- package/dist/components/artifact-panel/ArtifactPanel.js +81 -55
- package/dist/components/attachment/Attachment.d.ts +2 -6
- package/dist/components/attachment/Attachment.js +59 -36
- package/dist/components/attachment/AttachmentCard.d.ts +1 -1
- package/dist/components/attachment/AttachmentCard.js +56 -43
- package/dist/components/attachment/attachment-class-names.d.ts +1 -1
- package/dist/components/attachment/attachment-class-names.js +1 -1
- package/dist/components/attachment-group/AttachmentGroup.js +1 -1
- package/dist/components/avatar/avatar-helper.d.ts +1 -1
- package/dist/components/banner/Banner.js +5 -2
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/CalendarAgenda.js +1 -1
- package/dist/components/calendar/CalendarArtwork.js +16 -22
- package/dist/components/calendar/CalendarEventContent.js +2 -2
- package/dist/components/calendar/CalendarPopup.js +102 -82
- package/dist/components/calendar/CalendarToolbar.js +10 -10
- package/dist/components/card/Card.js +47 -41
- package/dist/components/checkbox/Checkbox.js +31 -13
- package/dist/components/choices/choice-motion.d.ts +12 -0
- package/dist/components/choices/choice-motion.js +22 -0
- package/dist/components/code-block/CodeBlock.js +3 -2
- package/dist/components/controls/control-class-names.d.ts +1 -0
- package/dist/components/controls/control-class-names.js +8 -8
- package/dist/components/controls/useHoverHighlight.d.ts +12 -0
- package/dist/components/controls/useHoverHighlight.js +51 -0
- package/dist/components/controls/useSelectionIndicator.d.ts +3 -4
- package/dist/components/controls/useSelectionIndicator.js +43 -28
- package/dist/components/data-grid/DataGrid.js +7 -7
- package/dist/components/data-grid/DataGridHeaders.js +1 -1
- package/dist/components/date-picker/DateCalendar.js +3 -3
- package/dist/components/date-picker/DatePicker.js +10 -10
- package/dist/components/date-picker/field/DateField.js +1 -1
- package/dist/components/description-list/DescriptionList.js +2 -2
- package/dist/components/dialog/ConfirmDialog.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/distribution-bar/DistributionBar.js +45 -35
- package/dist/components/drag-handle/DragHandle.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.js +27 -26
- package/dist/components/dropdown/MenuContent.js +100 -69
- package/dist/components/dropdown/dropdown-types.d.ts +1 -0
- package/dist/components/dropdown/menu-motion.d.ts +2 -0
- package/dist/components/dropdown/menu-motion.js +4 -0
- package/dist/components/feedback/FeedbackIcon.d.ts +2 -1
- package/dist/components/feedback/FeedbackIcon.js +4 -4
- package/dist/components/feedback/FeedbackSurface.d.ts +3 -3
- package/dist/components/feedback/FeedbackSurface.js +49 -21
- package/dist/components/fields/FieldAction.d.ts +1 -0
- package/dist/components/fields/FieldAction.js +2 -2
- package/dist/components/icon-button/IconButton.js +37 -37
- package/dist/components/icons/index.js +776 -776
- package/dist/components/inline-reference/InlineReference.js +1 -8
- package/dist/components/list/List.js +2 -2
- package/dist/components/list/ListGroup.js +35 -30
- package/dist/components/list/ListTask.js +1 -1
- package/dist/components/list/SettingRow.js +1 -1
- package/dist/components/markdown/Markdown.js +11 -10
- package/dist/components/markdown/MarkdownTable.d.ts +1 -1
- package/dist/components/markdown/MarkdownTable.js +71 -54
- package/dist/components/otp/OTP.js +44 -43
- package/dist/components/output-sections/OutputRow.js +2 -3
- package/dist/components/overlays/OverlayFrame.js +2 -2
- package/dist/components/overlays/overlay-class-names.d.ts +3 -3
- package/dist/components/overlays/overlay-class-names.js +1 -1
- package/dist/components/phone-input/CountryPicker.js +11 -8
- package/dist/components/popover/Popover.js +2 -2
- package/dist/components/question-card/QuestionOptions.js +3 -3
- package/dist/components/radio-group/RadioGroup.js +59 -50
- package/dist/components/search/Search.js +51 -47
- package/dist/components/segmented-control/SegmentedControl.js +7 -6
- package/dist/components/selection/ChoiceField.js +1 -1
- package/dist/components/selection/ChoiceList.js +2 -1
- package/dist/components/selection/SearchableChoice.js +129 -114
- package/dist/components/selection/SelectedTags.js +1 -1
- package/dist/components/selection/SimpleChoice.js +95 -77
- package/dist/components/selection/choice-styles.d.ts +2 -2
- package/dist/components/selection/choice-styles.js +1 -1
- package/dist/components/sheet/Sheet.js +7 -7
- package/dist/components/side-nav/SideNav.d.ts +2 -5
- package/dist/components/side-nav/SideNav.js +98 -56
- package/dist/components/side-nav/SideNavItemView.d.ts +1 -1
- package/dist/components/side-nav/SideNavItemView.js +83 -98
- package/dist/components/side-nav/index.d.ts +2 -0
- package/dist/components/side-nav/index.js +1 -1
- package/dist/components/split-button/SplitButton.js +3 -2
- package/dist/components/stepper/StepMarker.js +32 -28
- package/dist/components/stepper/Stepper.js +30 -22
- package/dist/components/suggested-prompt/SuggestedPrompt.js +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/Switch.js +38 -28
- package/dist/components/table/Table.js +134 -110
- package/dist/components/table/TableColumnHeader.js +20 -2
- package/dist/components/table/TableColumnResize.js +1 -1
- package/dist/components/table/TableColumnsMenu.js +1 -0
- package/dist/components/table/TableFilterChip.js +1 -1
- package/dist/components/table/TableFilterEditor.js +6 -6
- package/dist/components/table/TableFilters.js +1 -0
- package/dist/components/table/TableOptionMenu.d.ts +1 -1
- package/dist/components/table/TableOptionMenu.js +16 -17
- package/dist/components/table/TablePagination.js +1 -0
- package/dist/components/table/TableSelectionBar.js +4 -1
- package/dist/components/table/index.js +6 -6
- package/dist/components/table/table-column-style.js +0 -1
- package/dist/components/table/table-types.d.ts +5 -0
- package/dist/components/table/useTableData.js +2 -2
- package/dist/components/tabs/Tabs.js +61 -53
- package/dist/components/tabs/tab-class-names.d.ts +1 -1
- package/dist/components/tabs/tab-class-names.js +1 -1
- package/dist/components/tabular/TableEditCell.js +3 -1
- package/dist/components/tabular/tabular-class-names.d.ts +1 -0
- package/dist/components/tabular/tabular-class-names.js +1 -0
- package/dist/components/tabular/useCellEdit.js +1 -1
- package/dist/components/tabular/useTabularPinning.js +7 -6
- package/dist/components/tag/Tag.js +1 -1
- package/dist/components/tag-input/TagInput.js +64 -53
- package/dist/components/tag-input/useTagMotion.d.ts +6 -0
- package/dist/components/tag-input/useTagMotion.js +36 -0
- package/dist/components/text-area/TextArea.js +2 -1
- package/dist/components/thread/ThreadReply.js +10 -7
- package/dist/components/tool-call/ToolCall.js +2 -2
- package/dist/components/tree/TreeItemView.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -37
- package/dist/styles.css +1 -1
- package/package.json +5 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -11
- package/dist/components/date-picker/date-values.d.ts +0 -23
- package/dist/components/date-picker/date-values.js +0 -52
- package/dist/components/table/TableHeaderPin.d.ts +0 -6
- package/dist/components/table/TableHeaderPin.js +0 -66
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { SideNavProps } from './side-nav-types.js';
|
|
2
|
-
/**
|
|
3
|
-
|
|
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 {
|
|
7
|
-
import {
|
|
8
|
-
import o from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
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
|
|
13
|
-
let [
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
let t =
|
|
17
|
-
|
|
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__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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__ */
|
|
25
|
-
className:
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
-
className: "pf:min-w-0 pf:overflow-hidden",
|
|
28
|
-
children: typeof
|
|
29
|
-
}), /* @__PURE__ */
|
|
30
|
-
label:
|
|
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
|
-
|
|
41
|
+
N(!w);
|
|
34
42
|
},
|
|
35
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ d(r, {})
|
|
36
44
|
})]
|
|
37
45
|
}),
|
|
38
|
-
|
|
39
|
-
...
|
|
46
|
+
v && /* @__PURE__ */ d(n, {
|
|
47
|
+
...v,
|
|
40
48
|
size: "sm",
|
|
41
|
-
className:
|
|
42
|
-
options:
|
|
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__ */
|
|
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
|
-
})) :
|
|
57
|
+
})) : v.options
|
|
50
58
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ f("div", {
|
|
52
60
|
className: "pf:relative pf:flex-1 pf:min-h-0",
|
|
53
61
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
ref:
|
|
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__ */
|
|
58
|
-
ref:
|
|
65
|
+
children: /* @__PURE__ */ d("div", {
|
|
66
|
+
ref: j,
|
|
59
67
|
className: "pf:flex pf:flex-col pf:gap-3xl",
|
|
60
|
-
children:
|
|
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 && !
|
|
71
|
+
children: [e.label && !w && (e.collapsible ? /* @__PURE__ */ f("button", {
|
|
64
72
|
type: "button",
|
|
65
|
-
"aria-expanded":
|
|
73
|
+
"aria-expanded": k.has(e.id),
|
|
66
74
|
onClick: () => {
|
|
67
|
-
|
|
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__ */
|
|
78
|
+
children: [e.label, /* @__PURE__ */ d(t, {
|
|
71
79
|
size: 12,
|
|
72
|
-
className:
|
|
80
|
+
className: k.has(e.id) ? "" : "pf:-rotate-90"
|
|
73
81
|
})]
|
|
74
|
-
}) : /* @__PURE__ */
|
|
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
|
-
})), (
|
|
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__ */
|
|
87
|
+
children: e.items.map((e) => /* @__PURE__ */ d(a, {
|
|
80
88
|
item: e,
|
|
81
|
-
collapsed:
|
|
82
|
-
activeId:
|
|
83
|
-
expanded:
|
|
84
|
-
toggle:
|
|
89
|
+
collapsed: w,
|
|
90
|
+
activeId: p,
|
|
91
|
+
expanded: k,
|
|
92
|
+
toggle: P,
|
|
85
93
|
expandRail: () => {
|
|
86
|
-
|
|
94
|
+
N(!1);
|
|
87
95
|
},
|
|
88
|
-
renderLink:
|
|
96
|
+
renderLink: y
|
|
89
97
|
}, e.id))
|
|
90
98
|
})]
|
|
91
99
|
}, e.id))
|
|
92
100
|
})
|
|
93
101
|
}),
|
|
94
|
-
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
className: "pf:shrink-0 pf:min-w-0",
|
|
106
|
-
children: typeof
|
|
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 {
|
|
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;
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import u from "
|
|
12
|
-
import {
|
|
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
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
].filter(Boolean).join(" · "),
|
|
25
|
-
className:
|
|
26
|
-
children: [
|
|
27
|
-
status:
|
|
28
|
-
unread: g.
|
|
29
|
-
} }) : /* @__PURE__ */
|
|
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:
|
|
32
|
-
}),
|
|
33
|
-
}), !
|
|
34
|
-
/* @__PURE__ */
|
|
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:
|
|
35
|
+
children: h.label
|
|
37
36
|
}),
|
|
38
|
-
|
|
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(
|
|
41
|
-
children:
|
|
39
|
+
title: String(h.count),
|
|
40
|
+
children: h.presentation === "conversation" ? /* @__PURE__ */ f(c, { label: `${String(h.count)} new` }) : h.count
|
|
42
41
|
}),
|
|
43
|
-
|
|
44
|
-
] })] }),
|
|
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
|
-
...
|
|
47
|
-
render:
|
|
45
|
+
...h.linkConfig,
|
|
46
|
+
render: h.linkConfig.render ?? x
|
|
48
47
|
},
|
|
49
|
-
className:
|
|
50
|
-
"aria-label":
|
|
51
|
-
"aria-describedby":
|
|
52
|
-
"aria-current":
|
|
53
|
-
"aria-disabled":
|
|
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
|
-
|
|
54
|
+
D && e.preventDefault();
|
|
56
55
|
},
|
|
57
|
-
children:
|
|
58
|
-
}) : /* @__PURE__ */
|
|
56
|
+
children: A
|
|
57
|
+
}) : /* @__PURE__ */ p("button", {
|
|
59
58
|
type: "button",
|
|
60
|
-
className:
|
|
61
|
-
"aria-label":
|
|
62
|
-
"aria-describedby":
|
|
63
|
-
"aria-disabled":
|
|
64
|
-
"aria-expanded":
|
|
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
|
-
|
|
65
|
+
w ? O() : D || h.onAction();
|
|
67
66
|
},
|
|
68
|
-
children: [
|
|
67
|
+
children: [A, w && !g && /* @__PURE__ */ f(o, {
|
|
69
68
|
size: 12,
|
|
70
|
-
className:
|
|
69
|
+
className: T ? "" : "pf:-rotate-90"
|
|
71
70
|
})]
|
|
72
71
|
});
|
|
73
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ p("li", {
|
|
74
73
|
className: "pf:min-w-0",
|
|
75
74
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
id:
|
|
75
|
+
/* @__PURE__ */ f("span", {
|
|
76
|
+
id: C,
|
|
78
77
|
className: "pf:sr-only",
|
|
79
|
-
children:
|
|
78
|
+
children: k
|
|
80
79
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
className:
|
|
83
|
-
style:
|
|
84
|
-
children: [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
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:
|
|
104
|
+
children: h.children.map((e) => /* @__PURE__ */ f(m, {
|
|
120
105
|
item: e,
|
|
121
106
|
collapsed: !1,
|
|
122
|
-
activeId:
|
|
123
|
-
expanded:
|
|
124
|
-
toggle:
|
|
125
|
-
expandRail:
|
|
126
|
-
renderLink:
|
|
127
|
-
depth:
|
|
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 {
|
|
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
|
-
|
|
2
|
-
import {
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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 {
|
|
34
|
+
export { r as StepMarker };
|