@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commenda/pathfinder",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Commenda's Pathfinder design system, with precompiled styles.",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": [
@@ -389,6 +389,10 @@
389
389
  "./artifact-panel": {
390
390
  "types": "./dist/components/artifact-panel/index.d.ts",
391
391
  "import": "./dist/components/artifact-panel/index.js"
392
+ },
393
+ "./sidebar": {
394
+ "types": "./dist/components/side-nav/index.d.ts",
395
+ "import": "./dist/components/side-nav/index.js"
392
396
  }
393
397
  },
394
398
  "main": "./dist/index.js",
@@ -1,11 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.defineProperty, t = (t, n) => {
3
- let r = {};
4
- for (var i in t) e(r, i, {
5
- get: t[i],
6
- enumerable: !0
7
- });
8
- return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
- };
10
- //#endregion
11
- export { t as __exportAll };
@@ -1,23 +0,0 @@
1
- export interface DateRange {
2
- start: string | null;
3
- end: string | null;
4
- }
5
- export interface DateConstraints {
6
- min?: string;
7
- max?: string;
8
- isDateUnavailable?: (date: string) => boolean;
9
- }
10
- export interface MonthConstraints {
11
- min?: string;
12
- max?: string;
13
- isMonthUnavailable?: (month: string) => boolean;
14
- }
15
- export declare function daysInMonth(year: number, month: number): number;
16
- export declare function validDate(value: string): boolean;
17
- export declare function validMonth(value: string): boolean;
18
- /** Calendar adapters use local noon, never parsing YYYY-MM-DD as UTC. */
19
- export declare function toDate(value: string): Date;
20
- export declare function fromDate(value: Date): string;
21
- export declare function dateError(value: string | null, constraints?: DateConstraints): string | undefined;
22
- export declare function rangeError(value: DateRange, constraints?: DateConstraints): string | undefined;
23
- export declare function monthError(value: string | null, constraints?: MonthConstraints): string | undefined;
@@ -1,52 +0,0 @@
1
- //#region src/components/date-picker/date-values.ts
2
- function e(e, t) {
3
- return new Date(e, t, 0, 12).getDate();
4
- }
5
- function t(t) {
6
- if (!/^\d{4}-\d{2}-\d{2}$/.test(t)) return !1;
7
- let [n, r, i] = t.split("-").map(Number);
8
- return n >= 1e3 && n <= 9999 && r >= 1 && r <= 12 && i >= 1 && i <= e(n, r);
9
- }
10
- function n(e) {
11
- return /^\d{4}-\d{2}$/.test(e) && t(`${e}-01`);
12
- }
13
- function r(e) {
14
- let [t, n, r] = e.split("-").map(Number);
15
- return new Date(t, n - 1, r, 12);
16
- }
17
- function i(e) {
18
- return `${String(e.getFullYear()).padStart(4, "0")}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
19
- }
20
- function a(e, n) {
21
- if (e) {
22
- if (!t(e)) return "Enter a valid date.";
23
- if (n?.min && e < n.min) return `Choose ${n.min} or later.`;
24
- if (n?.max && e > n.max) return `Choose ${n.max} or earlier.`;
25
- if (n?.isDateUnavailable?.(e)) return "This date is unavailable.";
26
- }
27
- }
28
- function o(e, t) {
29
- let n = a(e.start, t), o = a(e.end, t);
30
- if (n || o) return n ?? o;
31
- if (e.end && !e.start) return "Enter a start date first.";
32
- if (e.start && e.end) {
33
- if (e.end < e.start) return "End date must be on or after the start date.";
34
- if (t?.isDateUnavailable) {
35
- let n = r(e.start), a = r(e.end);
36
- for (; n <= a;) {
37
- if (t.isDateUnavailable(i(n))) return "The range includes an unavailable date.";
38
- n.setDate(n.getDate() + 1);
39
- }
40
- }
41
- }
42
- }
43
- function s(e, t) {
44
- if (e) {
45
- if (!n(e)) return "Enter a valid month.";
46
- if (t?.min && e < t.min) return `Choose ${t.min} or later.`;
47
- if (t?.max && e > t.max) return `Choose ${t.max} or earlier.`;
48
- if (t?.isMonthUnavailable?.(e)) return "This month is unavailable.";
49
- }
50
- }
51
- //#endregion
52
- export { a as dateError, e as daysInMonth, i as fromDate, s as monthError, o as rangeError, r as toDate, t as validDate, n as validMonth };
@@ -1,6 +0,0 @@
1
- export declare function TableHeaderPin({ label, pin, active, onChange, }: {
2
- label: string;
3
- pin?: 'start' | 'end';
4
- active: boolean;
5
- onChange?: (pin: 'start' | 'end' | null) => void;
6
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,66 +0,0 @@
1
- import { Tooltip as e } from "../tooltip/Tooltip.js";
2
- import { CheckIcon as t } from "../icons/CheckIcon.js";
3
- import { IconButton as n } from "../icon-button/IconButton.js";
4
- import { Dropdown as r } from "../dropdown/Dropdown.js";
5
- import { Pin01Icon as i } from "../icons/Pin01Icon.js";
6
- import { useState as a } from "react";
7
- import { jsx as o } from "react/jsx-runtime";
8
- //#region src/components/table/TableHeaderPin.tsx
9
- function s({ label: s, pin: c, active: l, onChange: u }) {
10
- let [d, f] = a(!1), p = c ? `${s} pinned to ${c}` : `Pin ${s}`;
11
- return u ? /* @__PURE__ */ o(r, {
12
- open: d,
13
- onOpenChange: f,
14
- trigger: /* @__PURE__ */ o(n, {
15
- label: p,
16
- size: "xs",
17
- className: c ? "pf:text-blue-700!" : void 0,
18
- children: /* @__PURE__ */ o(i, {
19
- size: 12,
20
- tone: c ? "brand" : "inherit"
21
- })
22
- }),
23
- menu: { groups: [{
24
- id: "pinning",
25
- label: `${s} position`,
26
- items: [
27
- {
28
- id: "start",
29
- label: "Pin to start",
30
- value: "start"
31
- },
32
- {
33
- id: "end",
34
- label: "Pin to end",
35
- value: "end"
36
- },
37
- {
38
- id: "none",
39
- label: "Unpin",
40
- value: null
41
- }
42
- ].map((e) => ({
43
- id: e.id,
44
- type: "action",
45
- label: e.label,
46
- leadingIcon: (c ?? null) === e.value ? /* @__PURE__ */ o(t, { size: 16 }) : void 0,
47
- onClick: () => {
48
- f(!1), u(e.value);
49
- }
50
- }))
51
- }] }
52
- }) : c ? /* @__PURE__ */ o(e, {
53
- content: l ? p : `${p}; scrolls at this width`,
54
- trigger: /* @__PURE__ */ o("span", {
55
- role: "img",
56
- className: "pf:inline-flex pf:shrink-0 pf:text-blue-700",
57
- "aria-label": p,
58
- children: /* @__PURE__ */ o(i, {
59
- size: 12,
60
- tone: "inherit"
61
- })
62
- })
63
- }) : null;
64
- }
65
- //#endregion
66
- export { s as TableHeaderPin };