@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.
@@ -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:self-start @3xl:rounded-sm @3xl:border @3xl:border-border @3xl:bg-muted/30 @3xl:p-3";
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 without a panel.
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. The container must bound the board's height, for example as a flex child with
35
- * `min-h-0`. Without it the board grows with its cards and the page scrolls.
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
  /**
@@ -7,7 +7,7 @@ import {
7
7
  DragSource2,
8
8
  DropTarget2,
9
9
  Kanban2
10
- } from "../../chunk-sw3hhejw.js";
10
+ } from "../../chunk-mtbhe5kk.js";
11
11
  import"../../chunk-en44w1pn.js";
12
12
  import"../../chunk-cgj3ade2.js";
13
13
  import"../../chunk-7ny0vyek.js";
@@ -100,7 +100,7 @@ import {
100
100
  TabsList2,
101
101
  TabsTrigger2,
102
102
  TabsContent2
103
- } from "../../chunk-sw3hhejw.js";
103
+ } from "../../chunk-mtbhe5kk.js";
104
104
  import"../../chunk-4e96tpw0.js";
105
105
  import {
106
106
  Checkbox2
package/dist/index.js CHANGED
@@ -225,7 +225,7 @@ import {
225
225
  useDropTarget2,
226
226
  DropTarget2,
227
227
  Kanban2
228
- } from "./chunk-sw3hhejw.js";
228
+ } from "./chunk-mtbhe5kk.js";
229
229
  import {
230
230
  NumberField2,
231
231
  NumberFieldGroup2,
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.210",
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.210",
3
+ "version": "0.0.212",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {