@f-ewald/components 1.1.1 → 1.2.1

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 (44) hide show
  1. package/README.md +4 -0
  2. package/custom-elements.json +2336 -290
  3. package/dist/form-select.d.ts +5 -4
  4. package/dist/form-select.d.ts.map +1 -1
  5. package/dist/form-select.js +6 -5
  6. package/dist/form-select.js.map +1 -1
  7. package/dist/icons.d.ts +1 -0
  8. package/dist/icons.d.ts.map +1 -1
  9. package/dist/icons.js +1 -0
  10. package/dist/icons.js.map +1 -1
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +4 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/kanban-board.d.ts +110 -0
  16. package/dist/kanban-board.d.ts.map +1 -0
  17. package/dist/kanban-board.js +619 -0
  18. package/dist/kanban-board.js.map +1 -0
  19. package/dist/kanban-card.d.ts +35 -0
  20. package/dist/kanban-card.d.ts.map +1 -0
  21. package/dist/kanban-card.js +163 -0
  22. package/dist/kanban-card.js.map +1 -0
  23. package/dist/kanban-column.d.ts +30 -0
  24. package/dist/kanban-column.d.ts.map +1 -0
  25. package/dist/kanban-column.js +166 -0
  26. package/dist/kanban-column.js.map +1 -0
  27. package/dist/multi-select.d.ts +142 -0
  28. package/dist/multi-select.d.ts.map +1 -0
  29. package/dist/multi-select.js +1304 -0
  30. package/dist/multi-select.js.map +1 -0
  31. package/dist/popover-panel.js +1 -1
  32. package/dist/popover-panel.js.map +1 -1
  33. package/dist/tokens.css +3 -0
  34. package/dist/tokens.d.ts.map +1 -1
  35. package/dist/tokens.js +2 -0
  36. package/dist/tokens.js.map +1 -1
  37. package/docs/design-language.md +8 -0
  38. package/docs/form-select.md +5 -4
  39. package/docs/kanban-board.md +96 -0
  40. package/docs/kanban-card.md +56 -0
  41. package/docs/kanban-column.md +58 -0
  42. package/docs/multi-select.md +120 -0
  43. package/llms.txt +182 -4
  44. package/package.json +1 -1
@@ -0,0 +1,110 @@
1
+ import { LitElement, type PropertyValues } from "lit";
2
+ import "./kanban-column.js";
3
+ import "./kanban-card.js";
4
+ import "./popover-panel.js";
5
+ import "./radio-pills.js";
6
+ import "./relative-time.js";
7
+ /** One card in a column. `id` is stable identity; everything else is display data. */
8
+ export interface KanbanCardData {
9
+ /** Stable unique identifier used as the drag/move key. */
10
+ id: string;
11
+ /** Ticket identifier shown in the overview and detail, e.g. `"PROJ-142"`. */
12
+ ticket: string;
13
+ /** Card title shown in the overview and detail. */
14
+ title: string;
15
+ /** Longer description shown only in the detail popover. */
16
+ description?: string;
17
+ /** ISO 8601 / SQLite `datetime` string shown in the detail popover. */
18
+ createdAt?: string;
19
+ /** ISO 8601 / SQLite `datetime` string shown in the detail popover. */
20
+ updatedAt?: string;
21
+ }
22
+ /** One column: its `id`, header `title`, and ordered `cards`. The column is the card's state. */
23
+ export interface KanbanColumnData {
24
+ /** Stable unique identifier, also the card's state value. */
25
+ id: string;
26
+ /** Column title shown in the header and the detail state selector. */
27
+ title: string;
28
+ /** Cards in display order. */
29
+ cards: KanbanCardData[];
30
+ }
31
+ /** `card-move` detail: which card moved, and where from/to (`toIndex` is its final index in `toColumnId`). */
32
+ export interface KanbanCardMoveDetail {
33
+ cardId: string;
34
+ fromColumnId: string;
35
+ toColumnId: string;
36
+ toIndex: number;
37
+ }
38
+ /** `card-open` detail: the card whose detail view was opened. */
39
+ export interface KanbanCardOpenDetail {
40
+ cardId: string;
41
+ }
42
+ /**
43
+ * A configurable kanban board: a horizontally scrolling row of columns, each
44
+ * holding cards. **A card's column is its state** — moving a card to another
45
+ * column (by drag-and-drop, keyboard, or the detail popover's state selector)
46
+ * changes its state, and the board emits a single `card-move` for all three.
47
+ *
48
+ * Data-driven: set the `columns` property to `KanbanColumnData[]`. The board
49
+ * keeps its own working copy and mutates it optimistically on every move, so it
50
+ * works standalone; re-assign `columns` at any time to stay controlled from a
51
+ * store. Cards show only their ticket number and title in the overview; the
52
+ * full detail (description, state, created/updated timestamps) opens in a
53
+ * screen-centered `popover-panel`.
54
+ *
55
+ * Pointer drag-and-drop supports both cross-column moves and within-column
56
+ * reordering with a live drop indicator (set `reorderable` false to keep only
57
+ * cross-column moves when intra-column order isn't persisted). Keyboard parity:
58
+ * focus a card and press Space to pick it up, arrow keys to move it (left/right
59
+ * across columns, up/down within a column), Space to drop, or Escape to cancel;
60
+ * Enter opens the detail. Moves are announced in a polite live region, and the
61
+ * moved card briefly flashes a warm highlight so you can see where it landed.
62
+ *
63
+ * Set `manual` for a server-authoritative board (API + WebSocket/SSE): every
64
+ * move still emits `card-move`, but the board does NOT apply it locally, so it
65
+ * reflects only what you assign to `columns` — e.g. the change echoed back over
66
+ * the socket. The default is optimistic local updates.
67
+ *
68
+ * @element kanban-board
69
+ * @fires card-open - A card's detail view was opened; detail: { cardId }.
70
+ * @fires card-move - A card changed column/position; detail: { cardId, fromColumnId, toColumnId, toIndex }.
71
+ */
72
+ export declare class KanbanBoard extends LitElement {
73
+ #private;
74
+ /** Columns (with their cards) to render, in display order. */
75
+ columns: KanbanColumnData[];
76
+ /** Accessible label for the board's group role. */
77
+ label: string;
78
+ /**
79
+ * Server-authoritative mode. When true, moves emit `card-move` but are not
80
+ * applied to the board locally; it reflects only what you assign to
81
+ * `columns` (e.g. echoed back over WebSocket/SSE), keeping the server as the
82
+ * single source of truth. Defaults to optimistic local updates.
83
+ */
84
+ manual: boolean;
85
+ /**
86
+ * Whether cards can be reordered within a column. Defaults to true. Set false
87
+ * when intra-column order isn't persisted (no server `rank`): drag and
88
+ * keyboard still move cards *between* columns (appended to the target), but
89
+ * reordering inside a column is disabled, so the UI only offers what sticks.
90
+ */
91
+ reorderable: boolean;
92
+ private _cols;
93
+ private _openCardId;
94
+ private _drag;
95
+ private _pointer;
96
+ private _grab;
97
+ private _liveMessage;
98
+ private _highlighted;
99
+ static styles: import("lit").CSSResult[];
100
+ protected willUpdate(changed: PropertyValues): void;
101
+ protected updated(): void;
102
+ disconnectedCallback(): void;
103
+ render(): import("lit-html").TemplateResult<1>;
104
+ }
105
+ declare global {
106
+ interface HTMLElementTagNameMap {
107
+ "kanban-board": KanbanBoard;
108
+ }
109
+ }
110
+ //# sourceMappingURL=kanban-board.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kanban-board.d.ts","sourceRoot":"","sources":["../src/kanban-board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,oBAAoB,CAAC;AAE5B,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iGAAiG;AACjG,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,8GAA8G;AAC9G,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iEAAiE;AACjE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB;AAwBD;;;;;;;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