@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.
- package/dist/_chunks/render-adjustment-type.js +50 -48
- package/dist/_chunks/sidebar-scratchpad.js +714 -326
- package/dist/_chunks/task-detail-panel.js +902 -634
- package/dist/_chunks/vendor.js +1154 -1123
- package/dist/dashboard/index.d.ts +20 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +451 -5
- package/dist/dashboard/project-health-card.d.ts +22 -0
- package/dist/dashboard/project-health-card.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/index.d.ts +13 -0
- package/dist/dashboard/scratchpad/index.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts +15 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts +44 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts +7 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts +8 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts +29 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts.map +1 -0
- package/dist/dashboard/scratchpad-widget.d.ts +5 -5
- package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts +8 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
- package/dist/dashboard/week-heatmap/index.d.ts +10 -0
- package/dist/dashboard/week-heatmap/index.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts +31 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts +15 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts +8 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts +33 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -56
- package/dist/tasks/index.d.ts +1 -0
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +18 -17
- package/dist/tasks/task-action-row/index.d.ts +3 -0
- package/dist/tasks/task-action-row/index.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts +21 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts +14 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts +48 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts.map +1 -0
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/docs/components/dashboard/project-health-card.md +90 -0
- package/docs/components/dashboard/scratchpad-widget.md +17 -0
- package/docs/components/dashboard/scratchpad.md +151 -0
- package/docs/components/dashboard/sidebar-scratchpad.md +29 -5
- package/docs/components/dashboard/week-heatmap.md +95 -0
- package/docs/components/tasks/task-action-row.md +159 -0
- 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 {
|
|
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: "
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
P
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
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
|
-
|
|
1006
|
-
|
|
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",
|