@devalok/shilp-sutra-karm 0.19.0 → 0.20.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 (93) hide show
  1. package/dist/_chunks/render-adjustment-type.js +50 -48
  2. package/dist/_chunks/sidebar-scratchpad.js +714 -326
  3. package/dist/_chunks/task-detail-panel.js +902 -634
  4. package/dist/_chunks/vendor.js +1154 -1123
  5. package/dist/dashboard/index.d.ts +20 -0
  6. package/dist/dashboard/index.d.ts.map +1 -1
  7. package/dist/dashboard/index.js +451 -5
  8. package/dist/dashboard/project-health-card.d.ts +22 -0
  9. package/dist/dashboard/project-health-card.d.ts.map +1 -0
  10. package/dist/dashboard/scratchpad/index.d.ts +13 -0
  11. package/dist/dashboard/scratchpad/index.d.ts.map +1 -0
  12. package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts +11 -0
  13. package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts.map +1 -0
  14. package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts +15 -0
  15. package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts.map +1 -0
  16. package/dist/dashboard/scratchpad/scratchpad-context.d.ts +44 -0
  17. package/dist/dashboard/scratchpad/scratchpad-context.d.ts.map +1 -0
  18. package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts +13 -0
  19. package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts.map +1 -0
  20. package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts +7 -0
  21. package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts.map +1 -0
  22. package/dist/dashboard/scratchpad/scratchpad-header.d.ts +9 -0
  23. package/dist/dashboard/scratchpad/scratchpad-header.d.ts.map +1 -0
  24. package/dist/dashboard/scratchpad/scratchpad-item.d.ts +13 -0
  25. package/dist/dashboard/scratchpad/scratchpad-item.d.ts.map +1 -0
  26. package/dist/dashboard/scratchpad/scratchpad-list.d.ts +9 -0
  27. package/dist/dashboard/scratchpad/scratchpad-list.d.ts.map +1 -0
  28. package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts +11 -0
  29. package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts.map +1 -0
  30. package/dist/dashboard/scratchpad/scratchpad-root.d.ts +8 -0
  31. package/dist/dashboard/scratchpad/scratchpad-root.d.ts.map +1 -0
  32. package/dist/dashboard/scratchpad/scratchpad.d.ts +29 -0
  33. package/dist/dashboard/scratchpad/scratchpad.d.ts.map +1 -0
  34. package/dist/dashboard/scratchpad-widget.d.ts +5 -5
  35. package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
  36. package/dist/dashboard/sidebar-scratchpad.d.ts +8 -1
  37. package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
  38. package/dist/dashboard/week-heatmap/index.d.ts +10 -0
  39. package/dist/dashboard/week-heatmap/index.d.ts.map +1 -0
  40. package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts +31 -0
  41. package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts.map +1 -0
  42. package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts +7 -0
  43. package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts.map +1 -0
  44. package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts +15 -0
  45. package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts.map +1 -0
  46. package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts +7 -0
  47. package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts.map +1 -0
  48. package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts +8 -0
  49. package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts.map +1 -0
  50. package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts +7 -0
  51. package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts.map +1 -0
  52. package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts +7 -0
  53. package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts.map +1 -0
  54. package/dist/dashboard/week-heatmap/week-heatmap.d.ts +33 -0
  55. package/dist/dashboard/week-heatmap/week-heatmap.d.ts.map +1 -0
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +57 -56
  59. package/dist/tasks/index.d.ts +1 -0
  60. package/dist/tasks/index.d.ts.map +1 -1
  61. package/dist/tasks/index.js +18 -17
  62. package/dist/tasks/task-action-row/index.d.ts +3 -0
  63. package/dist/tasks/task-action-row/index.d.ts.map +1 -0
  64. package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts +8 -0
  65. package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts.map +1 -0
  66. package/dist/tasks/task-action-row/task-action-row-context.d.ts +21 -0
  67. package/dist/tasks/task-action-row/task-action-row-context.d.ts.map +1 -0
  68. package/dist/tasks/task-action-row/task-action-row-due-date.d.ts +5 -0
  69. package/dist/tasks/task-action-row/task-action-row-due-date.d.ts.map +1 -0
  70. package/dist/tasks/task-action-row/task-action-row-labels.d.ts +8 -0
  71. package/dist/tasks/task-action-row/task-action-row-labels.d.ts.map +1 -0
  72. package/dist/tasks/task-action-row/task-action-row-navigate.d.ts +9 -0
  73. package/dist/tasks/task-action-row/task-action-row-navigate.d.ts.map +1 -0
  74. package/dist/tasks/task-action-row/task-action-row-priority.d.ts +5 -0
  75. package/dist/tasks/task-action-row/task-action-row-priority.d.ts.map +1 -0
  76. package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts +8 -0
  77. package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts.map +1 -0
  78. package/dist/tasks/task-action-row/task-action-row-root.d.ts +14 -0
  79. package/dist/tasks/task-action-row/task-action-row-root.d.ts.map +1 -0
  80. package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts +5 -0
  81. package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts.map +1 -0
  82. package/dist/tasks/task-action-row/task-action-row-title.d.ts +9 -0
  83. package/dist/tasks/task-action-row/task-action-row-title.d.ts.map +1 -0
  84. package/dist/tasks/task-action-row/task-action-row.d.ts +48 -0
  85. package/dist/tasks/task-action-row/task-action-row.d.ts.map +1 -0
  86. package/dist/tasks/task-detail-panel.d.ts.map +1 -1
  87. package/docs/components/dashboard/project-health-card.md +90 -0
  88. package/docs/components/dashboard/scratchpad-widget.md +17 -0
  89. package/docs/components/dashboard/scratchpad.md +151 -0
  90. package/docs/components/dashboard/sidebar-scratchpad.md +29 -5
  91. package/docs/components/dashboard/week-heatmap.md +95 -0
  92. package/docs/components/tasks/task-action-row.md +159 -0
  93. package/package.json +82 -82
@@ -2,7 +2,7 @@
2
2
  import { jsx as e, jsxs as a, Fragment as Q } from "react/jsx-runtime";
3
3
  import * as _ from "react";
4
4
  import Ee, { useState as B, useEffect as se, useRef as Pe, useCallback as $, Fragment as bs, useReducer as qs, useMemo as Be, createContext as gs, useContext as ws } from "react";
5
- import { g as Us, i as et, j as He, k as st, l as Z, m as O, n as tt, o as Re, p as at, q as Ns, r as Je, t as ys, c as rt, w as ee, x as dt, y as Ds, z as lt, A as ls, B as nt } from "./vendor.js";
5
+ import { j as Us, k as et, l as He, m as st, n as Z, o as O, p as tt, q as Re, r as at, t as Ns, w as Je, x as ys, c as rt, y as ee, z as dt, A as Ds, B as lt, E as ls, F as nt } from "./vendor.js";
6
6
  import { cn as D } from "@devalok/shilp-sutra/ui/lib/utils";
7
7
  import { Skeleton as R } from "@devalok/shilp-sutra/ui/skeleton";
8
8
  import { DropdownMenu as ge, DropdownMenuTrigger as we, DropdownMenuContent as Te, DropdownMenuItem as be } from "@devalok/shilp-sutra/ui/dropdown-menu";
@@ -982,54 +982,56 @@ const Rs = _.forwardRef(
982
982
  ] }) : /* @__PURE__ */ a("div", { className: "mb-auto flex w-full flex-col md:pr-ds-06", children: [
983
983
  /* @__PURE__ */ e("p", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-06 text-accent-11", children: "Tasks for the day" }),
984
984
  i && /* @__PURE__ */ a(Q, { children: [
985
- /* @__PURE__ */ e("div", { role: "listbox", "aria-label": "Tasks for the day", className: "no-scrollbar mb-ds-03 flex max-h-[250px] flex-col gap-ds-03 overflow-y-auto", children: i.map((E, j) => /* @__PURE__ */ a(
986
- "div",
987
- {
988
- role: "option",
989
- "aria-selected": A === j,
990
- "aria-label": `Task ${j + 1} of ${i.length}: ${E.title}. Use Alt+Arrow keys to reorder.`,
991
- tabIndex: 0,
992
- className: D("task-item mb-ds-03 flex items-center gap-ds-02", A === j ? "dragging" : ""),
993
- draggable: !0,
994
- onDragStart: (P) => K(P, j),
995
- onDragOver: (P) => P.preventDefault(),
996
- onDrop: (P) => z(P, j),
997
- onDragEnter: () => C(j),
998
- onDragLeave: () => C(null),
999
- onDragEnd: (P) => {
1000
- P.target instanceof HTMLElement && P.target.classList.remove("dragging");
1001
- },
1002
- onKeyDown: (P) => {
1003
- P.altKey && P.key === "ArrowUp" && j > 0 ? (P.preventDefault(), x == null || x(E.id, i[j - 1].id)) : P.altKey && P.key === "ArrowDown" && j < i.length - 1 && (P.preventDefault(), x == null || x(E.id, i[j + 1].id));
985
+ /* @__PURE__ */ e("div", { role: "list", "aria-label": "Tasks for the day", className: "no-scrollbar mb-ds-03 flex max-h-[250px] flex-col gap-ds-03 overflow-y-auto", children: i.map((E, j) => (
986
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- listitem is interactive (draggable reorder)
987
+ /* @__PURE__ */ a(
988
+ "div",
989
+ {
990
+ role: "listitem",
991
+ "aria-label": `Task ${j + 1} of ${i.length}: ${E.title}. Use Alt+Arrow keys to reorder.`,
992
+ tabIndex: 0,
993
+ className: D("task-item mb-ds-03 flex items-center gap-ds-02", A === j ? "dragging" : ""),
994
+ draggable: !0,
995
+ onDragStart: (P) => K(P, j),
996
+ onDragOver: (P) => P.preventDefault(),
997
+ onDrop: (P) => z(P, j),
998
+ onDragEnter: () => C(j),
999
+ onDragLeave: () => C(null),
1000
+ onDragEnd: (P) => {
1001
+ P.target instanceof HTMLElement && P.target.classList.remove("dragging");
1002
+ },
1003
+ onKeyDown: (P) => {
1004
+ P.altKey && P.key === "ArrowUp" && j > 0 ? (P.preventDefault(), x == null || x(E.id, i[j - 1].id)) : P.altKey && P.key === "ArrowDown" && j < i.length - 1 && (P.preventDefault(), x == null || x(E.id, i[j + 1].id));
1005
+ },
1006
+ children: [
1007
+ k === j && /* @__PURE__ */ e("div", { className: "drop-indicator" }),
1008
+ E.status === "COMPLETED" ? /* @__PURE__ */ e(ns, { className: "" }) : /* @__PURE__ */ e(ns, {}),
1009
+ /* @__PURE__ */ e(
1010
+ "button",
1011
+ {
1012
+ type: "button",
1013
+ onClick: () => {
1014
+ r == null || r(
1015
+ E.id,
1016
+ E.status === "COMPLETED" ? "TODO" : "COMPLETED"
1017
+ );
1018
+ },
1019
+ "aria-label": E.status === "COMPLETED" ? `Mark "${E.title}" as incomplete` : `Mark "${E.title}" as complete`,
1020
+ className: "cursor-pointer",
1021
+ children: E.status === "COMPLETED" ? /* @__PURE__ */ e(it, { className: "text-accent-12" }) : /* @__PURE__ */ e(ct, {})
1022
+ }
1023
+ ),
1024
+ /* @__PURE__ */ e(
1025
+ "p",
1026
+ {
1027
+ className: D("text-ds-md flex-1 overflow-hidden hyphens-auto break-all pr-ds-05 break-words min-w-0", E.status === "COMPLETED" ? "text-disabled line-through" : "text-surface-fg-muted"),
1028
+ children: E.title
1029
+ }
1030
+ )
1031
+ ]
1004
1032
  },
1005
- children: [
1006
- k === j && /* @__PURE__ */ e("div", { className: "drop-indicator" }),
1007
- E.status === "COMPLETED" ? /* @__PURE__ */ e(ns, { className: "" }) : /* @__PURE__ */ e(ns, {}),
1008
- /* @__PURE__ */ e(
1009
- "button",
1010
- {
1011
- type: "button",
1012
- onClick: () => {
1013
- r == null || r(
1014
- E.id,
1015
- E.status === "COMPLETED" ? "TODO" : "COMPLETED"
1016
- );
1017
- },
1018
- "aria-label": E.status === "COMPLETED" ? `Mark "${E.title}" as incomplete` : `Mark "${E.title}" as complete`,
1019
- className: "cursor-pointer",
1020
- children: E.status === "COMPLETED" ? /* @__PURE__ */ e(it, { className: "text-accent-12" }) : /* @__PURE__ */ e(ct, {})
1021
- }
1022
- ),
1023
- /* @__PURE__ */ e(
1024
- "p",
1025
- {
1026
- className: D("text-ds-md flex-1 overflow-hidden hyphens-auto break-all pr-ds-05 break-words min-w-0", E.status === "COMPLETED" ? "text-disabled line-through" : "text-surface-fg-muted"),
1027
- children: E.title
1028
- }
1029
- )
1030
- ]
1031
- },
1032
- E.id
1033
+ E.id
1034
+ )
1033
1035
  )) }),
1034
1036
  q(new Date(l), /* @__PURE__ */ new Date()) && /* @__PURE__ */ a(
1035
1037
  "form",