@alexgorbatchev/shadcn 0.0.210 → 0.0.212
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/{chunk-sw3hhejw.js → chunk-mtbhe5kk.js} +7 -5
- package/dist/components/Kanban.d.ts +5 -3
- package/dist/components/gantt/index.js +1 -1
- package/dist/components/json-render/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/prototype.js +1 -1
- package/llms/components/planning/Kanban.md +16 -0
- package/package.json +1 -1
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
} from "react";
|
|
315
315
|
import { ArrowDownIcon, ArrowUpIcon } from "lucide-react";
|
|
316
316
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
317
|
-
var boardClassName = "@container overflow-x-auto";
|
|
317
|
+
var boardClassName = "@container relative overflow-x-auto";
|
|
318
318
|
var fillClassName = "h-full min-h-0 overflow-y-auto";
|
|
319
319
|
var LONG_PRESS_MS = 500;
|
|
320
320
|
var LONG_PRESS_SLOP = 10;
|
|
@@ -323,7 +323,9 @@ var stickyReadOnlyHeaderClassName = "sticky top-0 z-10 -mb-3 bg-background pb-3
|
|
|
323
323
|
var gridClassName = "grid gap-4 @3xl:auto-cols-[minmax(14rem,1fr)] @3xl:grid-flow-col";
|
|
324
324
|
var columnClassName = "flex min-w-0 flex-col gap-3 @3xl:min-h-48 rounded-sm border border-border bg-muted/30 p-3 data-over:border-primary";
|
|
325
325
|
var readOnlyGridClassName = "grid gap-6 @3xl:auto-cols-[minmax(14rem,1fr)] @3xl:grid-flow-col @3xl:gap-4";
|
|
326
|
-
var readOnlyColumnClassName = "flex min-w-0 flex-col gap-3 @3xl:
|
|
326
|
+
var readOnlyColumnClassName = "flex min-w-0 flex-col gap-3 @3xl:rounded-sm @3xl:border @3xl:border-border @3xl:bg-muted/30 @3xl:p-3";
|
|
327
|
+
var readOnlyEndClassName = "@3xl:self-start";
|
|
328
|
+
var fillGridClassName = "@3xl:min-h-full";
|
|
327
329
|
var cardClassName = "grid gap-3 rounded-sm border border-input bg-card p-3 text-sm";
|
|
328
330
|
function useCardDescriptions(describeItem) {
|
|
329
331
|
const prefix = useId3();
|
|
@@ -490,13 +492,13 @@ function ReadOnlyKanban({
|
|
|
490
492
|
"data-fill": fill ? "" : undefined,
|
|
491
493
|
className: cn2(boardClassName, fill && fillClassName),
|
|
492
494
|
children: /* @__PURE__ */ jsx4("div", {
|
|
493
|
-
className: readOnlyGridClassName,
|
|
495
|
+
className: cn2(readOnlyGridClassName, fill && fillGridClassName),
|
|
494
496
|
children: columns.map((column, columnIndex) => {
|
|
495
497
|
const list = cards[columnIndex];
|
|
496
498
|
return /* @__PURE__ */ jsxs3("section", {
|
|
497
499
|
"aria-label": column.label,
|
|
498
500
|
"data-scroll": "none",
|
|
499
|
-
className: readOnlyColumnClassName,
|
|
501
|
+
className: cn2(readOnlyColumnClassName, !fill && readOnlyEndClassName),
|
|
500
502
|
children: [
|
|
501
503
|
/* @__PURE__ */ jsx4(ColumnHeader, {
|
|
502
504
|
label: column.label,
|
|
@@ -597,7 +599,7 @@ function Kanban2(props) {
|
|
|
597
599
|
"data-fill": fill ? "" : undefined,
|
|
598
600
|
className: cn2(boardClassName, fill && fillClassName),
|
|
599
601
|
children: /* @__PURE__ */ jsx4("div", {
|
|
600
|
-
className: gridClassName,
|
|
602
|
+
className: cn2(gridClassName, fill && fillGridClassName),
|
|
601
603
|
children: columns.map((column, columnIndex) => {
|
|
602
604
|
const cards = items.filter((item) => item.columnId === column.id);
|
|
603
605
|
return /* @__PURE__ */ jsxs3(DropTarget2, {
|
|
@@ -16,7 +16,8 @@ type KanbanProps<T extends KanbanItem> = IDensityProps & {
|
|
|
16
16
|
/**
|
|
17
17
|
* Receives the reordered items after a move. Omit it for a read-only board: cards cannot be dragged and show no move
|
|
18
18
|
* controls, the board is one Tab stop, arrow keys move between cards and Enter activates the card's first link or button.
|
|
19
|
-
* Its columns end after their last card, and stacked columns show their heading over their cards
|
|
19
|
+
* Its columns end after their last card, except with `fill`, and stacked columns show their heading over their cards
|
|
20
|
+
* without a panel.
|
|
20
21
|
*/
|
|
21
22
|
onItemsChange?: (items: T[]) => void;
|
|
22
23
|
renderItem?: (item: T) => ReactNode;
|
|
@@ -31,8 +32,9 @@ type KanbanProps<T extends KanbanItem> = IDensityProps & {
|
|
|
31
32
|
describeItem?: (item: T) => ReactNode;
|
|
32
33
|
/**
|
|
33
34
|
* Fill the container's height and scroll inside it, both ways, keeping each column's heading and count in view while
|
|
34
|
-
* its cards scroll under it.
|
|
35
|
-
*
|
|
35
|
+
* its cards scroll under it. Side by side, every column reaches the board's end, so a short column keeps its heading
|
|
36
|
+
* in view too. The container must bound the board's height, for example as a flex child with `min-h-0`. Without it
|
|
37
|
+
* the board grows with its cards and the page scrolls.
|
|
36
38
|
*/
|
|
37
39
|
fill?: boolean;
|
|
38
40
|
/**
|
package/dist/index.js
CHANGED
package/dist/prototype.js
CHANGED
|
@@ -2051,7 +2051,7 @@ var program = new Command;
|
|
|
2051
2051
|
// package.json
|
|
2052
2052
|
var package_default = {
|
|
2053
2053
|
name: "@alexgorbatchev/shadcn",
|
|
2054
|
-
version: "0.0.
|
|
2054
|
+
version: "0.0.212",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -107,6 +107,22 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
107
107
|
}
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
+
### ReadOnlyFillShort
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
{
|
|
114
|
+
render: () => <FillExample width={1000} items={readOnlyItems}/>
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### FillShort
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
{
|
|
122
|
+
render: () => <FillExample width={1000} items={readOnlyItems} isEditable/>
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
110
126
|
### ReadOnlyFillNarrow
|
|
111
127
|
|
|
112
128
|
```tsx
|