@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,38 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e from "clsx";
|
|
3
|
-
import { useEffect as t,
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { useEffect as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/feedback/FeedbackSurface.tsx
|
|
6
|
-
var
|
|
7
|
-
let [
|
|
8
|
-
|
|
9
|
-
let
|
|
6
|
+
var o = typeof window > "u" ? t : n, s = ({ open: n, defaultOpen: s = !0, onOpenChange: c, dismissConfig: l, children: u }) => {
|
|
7
|
+
let d = r(null), f = r([]), [p, m] = i(!1), [h, g] = i(s), [_, v] = i(!(n ?? s)), [y, b] = i(!1), x = n ?? h, [S, C] = i(x);
|
|
8
|
+
S !== x && (C(x), x && v(!1));
|
|
9
|
+
let w = l?.onDismiss;
|
|
10
10
|
return t(() => {
|
|
11
|
-
if (
|
|
11
|
+
if (x || _ && !y) return;
|
|
12
12
|
let e = setTimeout(() => {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
_ ? (b(!1), w?.()) : (f.current = p ? Array.from(d.current?.parentElement?.children ?? []).filter((e) => e instanceof HTMLElement && e !== d.current).map((e) => {
|
|
14
|
+
let t = e.getBoundingClientRect();
|
|
15
|
+
return {
|
|
16
|
+
element: e,
|
|
17
|
+
top: t.top,
|
|
18
|
+
left: t.left
|
|
19
|
+
};
|
|
20
|
+
}) : [], v(!0));
|
|
21
|
+
}, p ? _ ? 180 : 100 : 0);
|
|
15
22
|
return () => {
|
|
16
23
|
clearTimeout(e);
|
|
17
24
|
};
|
|
18
25
|
}, [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
x,
|
|
27
|
+
_,
|
|
28
|
+
y,
|
|
29
|
+
w,
|
|
30
|
+
p
|
|
31
|
+
]), o(() => {
|
|
32
|
+
if (!_ || x || !p) return;
|
|
33
|
+
let e = f.current.flatMap(({ element: e, top: t, left: n }) => {
|
|
34
|
+
let r = e.getBoundingClientRect(), i = n - r.left, a = t - r.top;
|
|
35
|
+
if (!i && !a || typeof e.animate != "function") return [];
|
|
36
|
+
let o = getComputedStyle(e).transform, s = o === "none" ? "" : o;
|
|
37
|
+
return [e.animate([{ transform: `translate(${String(i)}px, ${String(a)}px) ${s}` }, { transform: s || "none" }], {
|
|
38
|
+
duration: 180,
|
|
39
|
+
easing: "cubic-bezier(0.23,1,0.32,1)"
|
|
40
|
+
})];
|
|
41
|
+
});
|
|
42
|
+
return () => {
|
|
43
|
+
e.forEach((e) => {
|
|
44
|
+
e.cancel();
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}, [
|
|
48
|
+
_,
|
|
49
|
+
x,
|
|
50
|
+
p
|
|
51
|
+
]), !x && _ ? null : /* @__PURE__ */ a("div", {
|
|
52
|
+
"aria-hidden": !x || void 0,
|
|
25
53
|
ref: (e) => {
|
|
26
|
-
e && (e.inert = !
|
|
54
|
+
d.current = e, e && (e.inert = !x);
|
|
27
55
|
},
|
|
28
|
-
className: e("pf:
|
|
29
|
-
children: /* @__PURE__ */
|
|
56
|
+
className: e("pf:motion-reduce:transition-none", p && "pf:transition-opacity pf:duration-100 pf:ease-out", x ? "pf:opacity-100" : "pf:pointer-events-none pf:opacity-0"),
|
|
57
|
+
children: /* @__PURE__ */ a("div", {
|
|
30
58
|
className: "pf:min-h-0 pf:overflow-hidden",
|
|
31
|
-
children:
|
|
32
|
-
m(!0),
|
|
59
|
+
children: u((e) => {
|
|
60
|
+
m(e.detail > 0 && !(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)), b(!0), v(!1), g(!1), c?.(!1);
|
|
33
61
|
})
|
|
34
62
|
})
|
|
35
63
|
});
|
|
36
64
|
};
|
|
37
65
|
//#endregion
|
|
38
|
-
export {
|
|
66
|
+
export { s as FeedbackSurface };
|
|
@@ -16,7 +16,7 @@ function c({ config: c, value: l, fieldLabel: u, disabled: d, revealed: f, onAct
|
|
|
16
16
|
onClick: () => {
|
|
17
17
|
c.kind === "copy" ? (async () => {
|
|
18
18
|
try {
|
|
19
|
-
await navigator.clipboard.writeText(l), h("Copied");
|
|
19
|
+
await navigator.clipboard.writeText(l), h("Copied"), c.onCopy?.();
|
|
20
20
|
} catch (e) {
|
|
21
21
|
h("Could not copy. Select the text and copy it manually."), c.onCopyError?.(e instanceof Error ? e : /* @__PURE__ */ Error("Clipboard unavailable"));
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function c({ config: c, value: l, fieldLabel: u, disabled: d, revealed: f, onAct
|
|
|
24
24
|
h("Could not copy.");
|
|
25
25
|
}) : p();
|
|
26
26
|
},
|
|
27
|
-
className: "pf:self-stretch pf:shrink-0 pf:w-[28px] pf:flex pf:items-center pf:justify-center pf:border-0 pf:border-s pf:border-solid pf:border-soft-pearl-400 pf:bg-transparent pf:text-soft-pearl-800 pf:rounded-e-sm pf:hover:bg-soft-pearl-200 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700 pf:focus-visible:-outline-offset-2 pf:disabled:opacity-50 pf:disabled:cursor-not-allowed",
|
|
27
|
+
className: "pf:cursor-pointer pf:self-stretch pf:shrink-0 pf:w-[28px] pf:flex pf:items-center pf:justify-center pf:border-0 pf:border-s pf:border-solid pf:border-soft-pearl-400 pf:bg-transparent pf:text-soft-pearl-800 pf:rounded-e-sm pf:hover:bg-soft-pearl-200 pf:focus-visible:outline-2 pf:focus-visible:outline-blue-700 pf:focus-visible:-outline-offset-2 pf:disabled:opacity-50 pf:disabled:cursor-not-allowed",
|
|
28
28
|
children: /* @__PURE__ */ o(_, { size: 16 })
|
|
29
29
|
}), /* @__PURE__ */ o("span", {
|
|
30
30
|
role: "status",
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { ControlHint as
|
|
4
|
-
import { ControlIcon as
|
|
5
|
-
import
|
|
6
|
-
import { Button as
|
|
7
|
-
import { forwardRef as
|
|
8
|
-
import { Fragment as
|
|
2
|
+
import { controlPressClassNames as e, getControlClassNames as t } from "../controls/control-class-names.js";
|
|
3
|
+
import { ControlHint as n } from "../controls/ControlHint.js";
|
|
4
|
+
import { ControlIcon as r } from "../controls/ControlIcon.js";
|
|
5
|
+
import i from "clsx";
|
|
6
|
+
import { Button as a } from "@base-ui/react/button";
|
|
7
|
+
import { forwardRef as o, useId as s } from "react";
|
|
8
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/icon-button/IconButton.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
label:
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
-
...
|
|
16
|
-
type:
|
|
17
|
-
ref:
|
|
18
|
-
"aria-label":
|
|
19
|
-
disabled:
|
|
20
|
-
focusableWhenDisabled:
|
|
21
|
-
"aria-describedby": [
|
|
22
|
-
"data-variant":
|
|
23
|
-
"data-size":
|
|
24
|
-
"data-destructive":
|
|
25
|
-
"data-unavailable":
|
|
26
|
-
className:
|
|
27
|
-
variant:
|
|
28
|
-
size:
|
|
29
|
-
destructive:
|
|
30
|
-
disabled:
|
|
10
|
+
var d = o(({ label: o, children: d, variant: f = "tertiary", size: p = "md", destructive: m, disabled: h = !1, disabledReason: g, tooltip: _ = !0, className: v, type: y = "button", "aria-describedby": b, focusableWhenDisabled: x, ...S }, C) => {
|
|
11
|
+
let w = s(), T = h ? g : void 0;
|
|
12
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(n, {
|
|
13
|
+
label: _ ? T ? `${o}: ${T}` : o : void 0,
|
|
14
|
+
children: /* @__PURE__ */ l(a, {
|
|
15
|
+
...S,
|
|
16
|
+
type: y,
|
|
17
|
+
ref: C,
|
|
18
|
+
"aria-label": o,
|
|
19
|
+
disabled: h,
|
|
20
|
+
focusableWhenDisabled: x ?? !!T,
|
|
21
|
+
"aria-describedby": [b, T ? w : void 0].filter(Boolean).join(" ") || void 0,
|
|
22
|
+
"data-variant": f,
|
|
23
|
+
"data-size": p,
|
|
24
|
+
"data-destructive": m || void 0,
|
|
25
|
+
"data-unavailable": h || void 0,
|
|
26
|
+
className: i("pf-control pf-icon-button", t({
|
|
27
|
+
variant: f,
|
|
28
|
+
size: p,
|
|
29
|
+
destructive: m,
|
|
30
|
+
disabled: h,
|
|
31
31
|
iconOnly: !0
|
|
32
|
-
}),
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
size:
|
|
35
|
-
children:
|
|
32
|
+
}), e, v),
|
|
33
|
+
children: /* @__PURE__ */ l(r, {
|
|
34
|
+
size: p === "lg" ? 20 : 16,
|
|
35
|
+
children: d
|
|
36
36
|
})
|
|
37
37
|
})
|
|
38
|
-
}),
|
|
38
|
+
}), T && /* @__PURE__ */ l("span", {
|
|
39
39
|
className: "pf-control-sr pf:sr-only",
|
|
40
|
-
id:
|
|
41
|
-
children:
|
|
40
|
+
id: w,
|
|
41
|
+
children: T
|
|
42
42
|
})] });
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
d.displayName = "PathfinderIconButton";
|
|
45
45
|
//#endregion
|
|
46
|
-
export {
|
|
46
|
+
export { d as IconButton };
|