@simplysm/solid 13.0.97 → 13.0.99

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/README.md ADDED
@@ -0,0 +1,256 @@
1
+ # @simplysm/solid
2
+
3
+ SolidJS + Tailwind CSS UI component library for building enterprise web applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @simplysm/solid
9
+ ```
10
+
11
+ ## API Overview
12
+
13
+ ### Form Control
14
+ | API | Type | Description |
15
+ |-----|------|-------------|
16
+ | `Button` | Component | Themed button with ripple effect |
17
+ | `Select` | Component | Dropdown select (single/multiple, search, tree) |
18
+ | `Select.Item` | Sub-component | Selectable item in Select dropdown |
19
+ | `Select.Header` | Sub-component | Custom header slot in Select dropdown |
20
+ | `Select.Action` | Sub-component | Action button appended to Select trigger |
21
+ | `Select.ItemTemplate` | Sub-component | Template function for items mode |
22
+ | `SelectContext` | Context | Select state context |
23
+ | `Combobox` | Component | Async autocomplete with debounced search |
24
+ | `Combobox.Item` | Sub-component | Selectable item in Combobox dropdown |
25
+ | `Combobox.ItemTemplate` | Sub-component | Template function for Combobox items |
26
+ | `ComboboxContext` | Context | Combobox state context |
27
+ | `TextInput` | Component | Text input with format masking and IME handling |
28
+ | `TextInput.Prefix` | Sub-component | Prefix slot for TextInput |
29
+ | `TextInputPrefix` | Component | Standalone prefix slot component |
30
+ | `NumberInput` | Component | Numeric input with thousand separator |
31
+ | `NumberInput.Prefix` | Sub-component | Prefix slot for NumberInput |
32
+ | `NumberInputPrefix` | Component | Standalone prefix slot component |
33
+ | `DatePicker` | Component | Date input (year/month/date units) |
34
+ | `DateTimePicker` | Component | DateTime input (minute/second units) |
35
+ | `TimePicker` | Component | Time input (minute/second units) |
36
+ | `Textarea` | Component | Auto-resizing textarea |
37
+ | `Checkbox` | Component | Checkbox toggle |
38
+ | `Radio` | Component | Radio button |
39
+ | `CheckboxGroup` | Component | Multi-value checkbox group |
40
+ | `CheckboxGroup.Item` | Sub-component | Individual checkbox in group |
41
+ | `RadioGroup` | Component | Single-value radio group |
42
+ | `RadioGroup.Item` | Sub-component | Individual radio in group |
43
+ | `ColorPicker` | Component | Native color picker |
44
+ | `DateRangePicker` | Component | Date range with period type selector |
45
+ | `RichTextEditor` | Component | WYSIWYG editor (TipTap) |
46
+ | `Numpad` | Component | On-screen number pad |
47
+ | `StatePreset` | Component | Save/restore named state presets |
48
+ | `ThemeToggle` | Component | Light/system/dark theme toggle |
49
+ | `Invalid` | Component | Validation error indicator wrapper |
50
+ | `Field.styles` | Styles | Shared form field style utilities |
51
+ | `Checkbox.styles` | Styles | Shared checkbox/radio style constants |
52
+
53
+ > See [docs/form-control.md](./docs/form-control.md) for details.
54
+
55
+ ### Layout
56
+ | API | Type | Description |
57
+ |-----|------|-------------|
58
+ | `FormGroup` | Component | Vertical/inline form field grouping |
59
+ | `FormGroup.Item` | Sub-component | Labeled form field |
60
+ | `FormTable` | Component | Table-based form layout |
61
+ | `FormTable.Row` | Sub-component | Form table row |
62
+ | `FormTable.Item` | Sub-component | Form table cell with label |
63
+ | `Sidebar` | Component | Responsive sidebar navigation |
64
+ | `Sidebar.Container` | Sub-component | Root container with toggle context |
65
+ | `Sidebar.Menu` | Sub-component | Recursive navigation menu |
66
+ | `Sidebar.User` | Sub-component | User info with dropdown |
67
+ | `useSidebar` | Hook | Access sidebar toggle state |
68
+ | `Topbar` | Component | Top navigation bar |
69
+ | `Topbar.Container` | Sub-component | Layout container with actions context |
70
+ | `Topbar.Menu` | Sub-component | Responsive dropdown menu |
71
+ | `Topbar.User` | Sub-component | User section with dropdown |
72
+ | `Topbar.Actions` | Sub-component | Dynamic actions display |
73
+ | `useTopbarActions` | Hook | Register dynamic topbar actions |
74
+ | `useTopbarActionsAccessor` | Hook | Read registered actions |
75
+
76
+ > See [docs/layout.md](./docs/layout.md) for details.
77
+
78
+ ### Data
79
+ | API | Type | Description |
80
+ |-----|------|-------------|
81
+ | `Table` | Component | Simple HTML table with borders |
82
+ | `Table.Row` / `Table.HeaderCell` / `Table.Cell` | Sub-components | Table elements |
83
+ | `List` | Component | List container with keyboard navigation |
84
+ | `List.Item` | Sub-component | Interactive list item |
85
+ | `ListContext` / `useListContext` | Context/Hook | List nesting level |
86
+ | `ListItem.styles` | Styles | List item style constants |
87
+ | `Pagination` | Component | Page navigation |
88
+ | `DataSheet` | Component | Feature-rich data grid |
89
+ | `DataSheet.styles` | Styles | DataSheet style constants |
90
+ | `DataSheet.types` | Types | DataSheet type definitions |
91
+ | `Calendar` | Component | Monthly calendar grid |
92
+ | `Kanban` | Component | Drag-and-drop kanban board |
93
+ | `KanbanContext` / `useKanbanContext` | Context/Hook | Board-level context |
94
+ | `KanbanLaneContext` / `useKanbanLaneContext` | Context/Hook | Lane-level context |
95
+
96
+ > See [docs/data.md](./docs/data.md) for details.
97
+
98
+ ### Display
99
+ | API | Type | Description |
100
+ |-----|------|-------------|
101
+ | `Barcode` | Component | SVG barcode renderer (100+ formats) |
102
+ | `BarcodeType` | Type | Barcode format union type |
103
+ | `Card` | Component | Surface container with shadow |
104
+ | `Echarts` | Component | Apache ECharts wrapper |
105
+ | `Icon` | Component | Tabler Icons wrapper |
106
+ | `Tag` | Component | Inline badge with theme colors |
107
+ | `Link` | Component | Styled anchor element |
108
+ | `Alert` | Component | Block-level alert container |
109
+
110
+ > See [docs/display.md](./docs/display.md) for details.
111
+
112
+ ### Disclosure
113
+ | API | Type | Description |
114
+ |-----|------|-------------|
115
+ | `Collapse` | Component | Animated collapsible container |
116
+ | `Dropdown` | Component | Popup dropdown with auto-positioning |
117
+ | `Dropdown.Trigger` / `Dropdown.Content` | Sub-components | Trigger and content slots |
118
+ | `Dialog` | Component | Modal/float dialog with drag and resize |
119
+ | `Dialog.Header` / `Dialog.Action` | Sub-components | Header and action slots |
120
+ | `DialogProvider` | Component | Programmatic dialog provider |
121
+ | `useDialog` | Hook | Programmatic dialog access |
122
+ | `DialogContext` / `DialogDefaultsContext` | Contexts | Dialog state contexts |
123
+ | `Tabs` | Component | Tab bar with underline indicator |
124
+ | `Tabs.Tab` | Sub-component | Individual tab button |
125
+
126
+ > See [docs/disclosure.md](./docs/disclosure.md) for details.
127
+
128
+ ### Feedback
129
+ | API | Type | Description |
130
+ |-----|------|-------------|
131
+ | `NotificationProvider` | Component | Notification system provider |
132
+ | `useNotification` | Hook | Access notification system |
133
+ | `NotificationBell` | Component | Bell icon with unread count |
134
+ | `NotificationBanner` | Component | Fixed-position notification banner |
135
+ | `BusyProvider` | Component | Busy overlay provider |
136
+ | `useBusy` | Hook | Access busy overlay |
137
+ | `BusyContainer` | Component | Inline loading overlay |
138
+ | `PrintProvider` | Component | Print-to-printer/PDF provider |
139
+ | `usePrint` / `usePrintInstance` | Hooks | Print access |
140
+ | `Print` / `Print.Page` | Components | Print content wrappers |
141
+ | `Progress` | Component | Progress bar |
142
+
143
+ > See [docs/feedback.md](./docs/feedback.md) for details.
144
+
145
+ ### Providers
146
+ | API | Type | Description |
147
+ |-----|------|-------------|
148
+ | `ConfigContext` / `ConfigProvider` / `useConfig` | Context | App-wide configuration |
149
+ | `SyncStorageProvider` / `SyncStorageContext` / `useSyncStorage` | Provider | Configurable storage adapter |
150
+ | `LoggerProvider` / `LoggerContext` | Provider | Logger adapter |
151
+ | `ThemeProvider` / `useTheme` | Provider/Hook | Theme mode management |
152
+ | `ServiceClientProvider` / `ServiceClientContext` / `useServiceClient` | Provider | WebSocket service client |
153
+ | `SharedDataProvider` | Provider | Reactive shared data subscriptions |
154
+ | `SharedDataChangeEvent` | Event | Server-client data change event |
155
+ | `SystemProvider` | Provider | All-in-one provider composition |
156
+ | `I18nProvider` / `useI18n` | Provider/Hook | Internationalization |
157
+
158
+ > See [docs/providers.md](./docs/providers.md) for details.
159
+
160
+ ### Hooks
161
+ | API | Type | Description |
162
+ |-----|------|-------------|
163
+ | `useLocalStorage` | Hook | localStorage-based storage |
164
+ | `useSyncConfig` | Hook | Reactive storage sync |
165
+ | `useLogger` | Hook | Logging with configurable adapter |
166
+ | `createControllableSignal` | Hook | Controlled/uncontrolled signal pattern |
167
+ | `createControllableStore` | Hook | Controlled/uncontrolled store pattern |
168
+ | `createIMEHandler` | Hook | IME composition handling |
169
+ | `createMountTransition` | Hook | Mount/unmount CSS transition |
170
+ | `useRouterLink` | Hook | Router navigation with modifier keys |
171
+
172
+ > See [docs/hooks.md](./docs/hooks.md) for details.
173
+
174
+ ### Styles
175
+ | API | Type | Description |
176
+ |-----|------|-------------|
177
+ | `border` / `bg` / `text` | Tokens | Base design tokens |
178
+ | `ComponentSize` / `state` / `pad` / `gap` | Tokens | Control design tokens |
179
+ | `SemanticTheme` / `themeTokens` | Tokens | Theme color tokens |
180
+
181
+ > See [docs/styles.md](./docs/styles.md) for details.
182
+
183
+ ### Directives
184
+ | API | Type | Description |
185
+ |-----|------|-------------|
186
+ | `ripple` | Directive | Material-design ripple effect |
187
+
188
+ > See [docs/styles.md](./docs/styles.md) for details.
189
+
190
+ ### Helpers
191
+ | API | Type | Description |
192
+ |-----|------|-------------|
193
+ | `mergeStyles` | Function | Merge CSS style objects/strings |
194
+ | `createAppStructure` | Function | App navigation structure factory |
195
+ | `createSlot` | Function | Single-occupancy slot pattern |
196
+ | `createSlots` | Function | Multi-occupancy slot pattern |
197
+ | `startPointerDrag` | Function | Pointer capture drag helper |
198
+
199
+ > See [docs/helpers.md](./docs/helpers.md) for details.
200
+
201
+ ### Features
202
+ | API | Type | Description |
203
+ |-----|------|-------------|
204
+ | `AddressSearchContent` | Component | Korean address search (Daum API) |
205
+ | `SharedDataSelect` | Component | Select with SharedData integration |
206
+ | `SharedDataSelectButton` | Component | Button select with SharedData |
207
+ | `SharedDataSelectList` | Component | List select with SharedData |
208
+ | `DataSelectButton` | Component | Generic dialog-based select button |
209
+ | `CrudSheet` | Component | Full CRUD data grid |
210
+ | `CrudDetail` | Component | CRUD detail view |
211
+ | `PermissionTable` | Component | Permission management table |
212
+
213
+ > See [docs/features.md](./docs/features.md) for details.
214
+
215
+ ## Usage Examples
216
+
217
+ ### Button with theme
218
+
219
+ ```tsx
220
+ import { Button } from "@simplysm/solid";
221
+
222
+ <Button theme="primary" variant="solid" size="md" onClick={handleClick}>
223
+ Save
224
+ </Button>
225
+ ```
226
+
227
+ ### Select with items
228
+
229
+ ```tsx
230
+ import { Select } from "@simplysm/solid";
231
+
232
+ <Select
233
+ items={users}
234
+ value={selectedUser()}
235
+ onValueChange={setSelectedUser}
236
+ renderValue={(u) => u.name}
237
+ >
238
+ <Select.ItemTemplate>
239
+ {(user) => <>{user.name} ({user.email})</>}
240
+ </Select.ItemTemplate>
241
+ </Select>
242
+ ```
243
+
244
+ ### Dialog (programmatic)
245
+
246
+ ```tsx
247
+ import { useDialog } from "@simplysm/solid";
248
+
249
+ const dialog = useDialog();
250
+
251
+ const result = await dialog.show(
252
+ MyDialogContent,
253
+ { title: "Edit Item" },
254
+ { header: "Edit", resizable: true, width: 600 },
255
+ );
256
+ ```
package/docs/data.md ADDED
@@ -0,0 +1,342 @@
1
+ # Data Components
2
+
3
+ Source: `src/components/data/**`
4
+
5
+ ## `Table`
6
+
7
+ Simple HTML table component with border and padding styles.
8
+
9
+ ```typescript
10
+ export interface TableProps extends JSX.HTMLAttributes<HTMLTableElement> {
11
+ inset?: boolean;
12
+ }
13
+ ```
14
+
15
+ | Prop | Type | Description |
16
+ |------|------|-------------|
17
+ | `inset` | `boolean` | Remove outer border and rounded corners |
18
+
19
+ ### Sub-components
20
+
21
+ - **`Table.Row`** -- Table row (`<tr>`)
22
+ - **`Table.HeaderCell`** -- Header cell (`<th>`) with bold text and muted background
23
+ - **`Table.Cell`** -- Body cell (`<td>`)
24
+
25
+ ---
26
+
27
+ ## `List`
28
+
29
+ Container component for list items with tree-view keyboard navigation (Space/Enter, ArrowUp/Down, ArrowLeft/Right, Home/End).
30
+
31
+ ```typescript
32
+ export interface ListProps extends JSX.HTMLAttributes<HTMLDivElement> {
33
+ inset?: boolean;
34
+ }
35
+ ```
36
+
37
+ | Prop | Type | Description |
38
+ |------|------|-------------|
39
+ | `inset` | `boolean` | Transparent background, no outer border |
40
+
41
+ ### Sub-components
42
+
43
+ - **`List.Item`** -- Interactive list item (see `ListItem` below)
44
+
45
+ ---
46
+
47
+ ## `ListContext`
48
+
49
+ Context for tracking nesting level in nested lists.
50
+
51
+ ```typescript
52
+ export interface ListContextValue {
53
+ level: number;
54
+ }
55
+
56
+ export const ListContext: Context<ListContextValue>;
57
+ export const useListContext: () => ListContextValue;
58
+ ```
59
+
60
+ ---
61
+
62
+ ## `ListItem.styles`
63
+
64
+ Shared style constants for list items.
65
+
66
+ | Export | Type | Description |
67
+ |--------|------|-------------|
68
+ | `listItemBaseClass` | `string` | Base item styles |
69
+ | `listItemSizeClasses` | `Record<ComponentSize, string>` | Size-specific padding |
70
+ | `listItemSelectedClass` | `string` | Selected state styles |
71
+ | `listItemDisabledClass` | `string` | Disabled state styles |
72
+ | `listItemReadonlyClass` | `string` | Read-only state styles |
73
+ | `listItemIndentGuideClass` | `string` | Indent guide line styles |
74
+ | `listItemBasePadLeft` | `Record<ComponentSize, number>` | Base left padding per size (rem) |
75
+ | `LIST_ITEM_INDENT_SIZE` | `number` | Indent size per nesting level (1.5 rem) |
76
+ | `listItemContentClass` | `string` | Item content area styles |
77
+ | `getListItemSelectedIconClass` | `(selected: boolean) => string` | Selection icon color |
78
+
79
+ ---
80
+
81
+ ## `Pagination`
82
+
83
+ Page navigation component with first/prev/next/last buttons and page number buttons.
84
+
85
+ ```typescript
86
+ export interface PaginationProps extends JSX.HTMLAttributes<HTMLElement> {
87
+ page: number;
88
+ onPageChange?: (page: number) => void;
89
+ totalPageCount: number;
90
+ displayPageCount?: number;
91
+ size?: ComponentSize;
92
+ }
93
+ ```
94
+
95
+ | Prop | Type | Description |
96
+ |------|------|-------------|
97
+ | `page` | `number` | Current page (1-based) |
98
+ | `onPageChange` | `(page: number) => void` | Page change callback |
99
+ | `totalPageCount` | `number` | Total number of pages |
100
+ | `displayPageCount` | `number` | Visible page buttons. Default: `10` |
101
+ | `size` | `ComponentSize` | Button size |
102
+
103
+ ---
104
+
105
+ ## `DataSheet`
106
+
107
+ Feature-rich data grid with sorting, pagination, selection, tree expansion, column resizing/reordering, fixed columns, and config persistence.
108
+
109
+ ```typescript
110
+ export interface DataSheetProps<TItem> {
111
+ items?: TItem[];
112
+ storageKey?: string;
113
+ hideConfigBar?: boolean;
114
+ inset?: boolean;
115
+ contentStyle?: JSX.CSSProperties | string;
116
+ sorts?: SortingDef[];
117
+ onSortsChange?: (sorts: SortingDef[]) => void;
118
+ autoSort?: boolean;
119
+ page?: number;
120
+ onPageChange?: (page: number) => void;
121
+ totalPageCount?: number;
122
+ pageSize?: number;
123
+ displayPageCount?: number;
124
+ selectionMode?: "single" | "multiple";
125
+ selection?: TItem[];
126
+ onSelectionChange?: (items: TItem[]) => void;
127
+ autoSelect?: boolean;
128
+ isItemSelectable?: (item: TItem) => boolean | string;
129
+ expandedItems?: TItem[];
130
+ onExpandedItemsChange?: (items: TItem[]) => void;
131
+ itemChildren?: (item: TItem, index: number) => TItem[] | undefined;
132
+ cellClass?: (item: TItem, colKey: string) => string | undefined;
133
+ cellStyle?: (item: TItem, colKey: string) => string | undefined;
134
+ onItemsReorder?: (event: DataSheetReorderEvent<TItem>) => void;
135
+ class?: string;
136
+ children: JSX.Element;
137
+ }
138
+ ```
139
+
140
+ ### `DataSheetColumnProps`
141
+
142
+ ```typescript
143
+ export interface DataSheetColumnProps<TItem> {
144
+ key: string;
145
+ header?: string | string[];
146
+ headerContent?: () => JSX.Element;
147
+ headerStyle?: string;
148
+ summary?: () => JSX.Element;
149
+ tooltip?: string;
150
+ fixed?: boolean;
151
+ hidden?: boolean;
152
+ collapse?: boolean;
153
+ width?: string;
154
+ class?: string;
155
+ sortable?: boolean;
156
+ resizable?: boolean;
157
+ children: (ctx: DataSheetCellContext<TItem>) => JSX.Element;
158
+ }
159
+ ```
160
+
161
+ ### `DataSheetCellContext`
162
+
163
+ ```typescript
164
+ export interface DataSheetCellContext<TItem> {
165
+ item: TItem;
166
+ index: number;
167
+ row: number;
168
+ depth: number;
169
+ }
170
+ ```
171
+
172
+ ### `SortingDef`
173
+
174
+ ```typescript
175
+ export interface SortingDef {
176
+ key: string;
177
+ desc: boolean;
178
+ }
179
+ ```
180
+
181
+ ### `DataSheetReorderEvent`
182
+
183
+ ```typescript
184
+ export interface DataSheetReorderEvent<TItem> {
185
+ item: TItem;
186
+ targetItem: TItem;
187
+ position: DataSheetDragPosition;
188
+ }
189
+
190
+ export type DataSheetDragPosition = "before" | "after" | "inside";
191
+ ```
192
+
193
+ ### `DataSheetConfig` / `DataSheetConfigColumn`
194
+
195
+ ```typescript
196
+ export interface DataSheetConfig {
197
+ columnRecord?: Partial<Record<string, DataSheetConfigColumn>>;
198
+ }
199
+
200
+ export interface DataSheetConfigColumn {
201
+ fixed?: boolean;
202
+ width?: string;
203
+ displayOrder?: number;
204
+ hidden?: boolean;
205
+ }
206
+ ```
207
+
208
+ ### `FlatItem`
209
+
210
+ ```typescript
211
+ export interface FlatItem<TItem> {
212
+ item: TItem;
213
+ index: number;
214
+ row: number;
215
+ depth: number;
216
+ hasChildren: boolean;
217
+ parent?: TItem;
218
+ }
219
+ ```
220
+
221
+ ---
222
+
223
+ ## `DataSheet.styles`
224
+
225
+ Shared style constants for DataSheet rendering. Key exports:
226
+
227
+ | Export | Description |
228
+ |--------|-------------|
229
+ | `dataSheetContainerClass` | Container class |
230
+ | `tableClass` | Table element class |
231
+ | `thClass` / `tdClass` | Header/body cell classes |
232
+ | `summaryThClass` | Summary row header class |
233
+ | `sortableThClass` | Sortable header class |
234
+ | `fixedClass` / `fixedLastClass` | Fixed column classes |
235
+ | `resizerClass` | Column resize handle class |
236
+ | `resizeIndicatorClass` | Resize drag indicator class |
237
+ | `featureThClass` / `featureTdClass` | Feature column classes |
238
+ | `expandToggleClass` | Expand toggle button class |
239
+ | `selectSingleClass` | Single select icon class |
240
+ | `reorderHandleClass` | Drag reorder handle class |
241
+ | `reorderIndicatorClass` | Reorder drag indicator class |
242
+ | `toolbarClass` | Toolbar class |
243
+ | `trRowClass` | Body row class with hover/selected overlays |
244
+ | `configButtonClass` | Settings button class |
245
+
246
+ ---
247
+
248
+ ## `Calendar`
249
+
250
+ Monthly calendar grid displaying items by date.
251
+
252
+ ```typescript
253
+ export interface CalendarProps<TValue> extends Omit<
254
+ JSX.HTMLAttributes<HTMLTableElement>,
255
+ "children"
256
+ > {
257
+ items: TValue[];
258
+ getItemDate: (item: TValue, index: number) => DateOnly;
259
+ renderItem: (item: TValue, index: number) => JSX.Element;
260
+ yearMonth?: DateOnly;
261
+ onYearMonthChange?: (value: DateOnly) => void;
262
+ weekStartDay?: number;
263
+ minDaysInFirstWeek?: number;
264
+ }
265
+ ```
266
+
267
+ | Prop | Type | Description |
268
+ |------|------|-------------|
269
+ | `items` | `TValue[]` | Data items to display |
270
+ | `getItemDate` | `(item, index) => DateOnly` | Extract date from item |
271
+ | `renderItem` | `(item, index) => JSX.Element` | Render item content |
272
+ | `yearMonth` | `DateOnly` | Displayed month |
273
+ | `onYearMonthChange` | `(value: DateOnly) => void` | Month change callback |
274
+ | `weekStartDay` | `number` | Week start day (0=Sun). Default: `0` |
275
+ | `minDaysInFirstWeek` | `number` | Min days in first week. Default: `1` |
276
+
277
+ ---
278
+
279
+ ## `Kanban`
280
+
281
+ Drag-and-drop kanban board with lanes, cards, and multi-select support.
282
+
283
+ ### Types
284
+
285
+ ```typescript
286
+ export interface KanbanCardRef<TLaneValue, TCardValue> {
287
+ value: TCardValue | undefined;
288
+ laneValue: TLaneValue | undefined;
289
+ heightOnDrag: number;
290
+ }
291
+
292
+ export interface KanbanDropInfo<TLaneValue, TCardValue> {
293
+ sourceValue?: TCardValue;
294
+ targetLaneValue?: TLaneValue;
295
+ targetCardValue?: TCardValue;
296
+ position?: "before" | "after";
297
+ }
298
+
299
+ export interface KanbanDropTarget<TCardValue> {
300
+ element: HTMLElement;
301
+ value: TCardValue | undefined;
302
+ position: "before" | "after";
303
+ }
304
+
305
+ export interface KanbanCardProps<TCardValue = unknown> {
306
+ value?: TCardValue;
307
+ draggable?: boolean;
308
+ selectable?: boolean;
309
+ contentClass?: string;
310
+ children?: JSX.Element;
311
+ }
312
+ ```
313
+
314
+ ### `KanbanContextValue`
315
+
316
+ ```typescript
317
+ export interface KanbanContextValue<TLaneValue, TCardValue> {
318
+ dragCard: Accessor<KanbanCardRef<TLaneValue, TCardValue> | undefined>;
319
+ setDragCard: Setter<KanbanCardRef<TLaneValue, TCardValue> | undefined>;
320
+ onDropTo: (targetLaneValue, targetCardValue, position) => void;
321
+ selectedValues: Accessor<TCardValue[]>;
322
+ setSelectedValues: (updater) => void;
323
+ toggleSelection: (value: TCardValue) => void;
324
+ }
325
+ ```
326
+
327
+ ### `KanbanLaneContextValue`
328
+
329
+ ```typescript
330
+ export interface KanbanLaneContextValue<TLaneValue, TCardValue> {
331
+ value: Accessor<TLaneValue | undefined>;
332
+ dropTarget: Accessor<KanbanDropTarget<TCardValue> | undefined>;
333
+ setDropTarget: (target) => void;
334
+ registerCard: (id, info) => void;
335
+ unregisterCard: (id) => void;
336
+ }
337
+ ```
338
+
339
+ ### Hooks
340
+
341
+ - **`useKanbanContext()`** -- Access board-level context
342
+ - **`useKanbanLaneContext()`** -- Access lane-level context