@tcn/ui 0.18.0 → 0.18.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,1009 @@
1
+ # @tcn/ui
2
+
3
+ ## 0.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8ed3944: Added AI documentation scaffolding — `AI_USAGE.md` entry point with decision tree routing to 15 topic docs covering all component categories. Published docs are included in the package via `ai-docs/`.
8
+
9
+ ## Migration
10
+
11
+ None required.
12
+
13
+ - Updated dependencies [d181540]
14
+ - @tcn/state@1.3.4
15
+ - @tcn/icons@2.4.0
16
+
17
+ ## 0.18.0
18
+
19
+ ### Minor Changes
20
+
21
+ - 2743104: Reorganized utils into logical subdirectories: `decorators/` (Resizable, Draggable), `listeners/` (ClickAwayListener, ScrollAwayListener), `system/` (shared design token types), and `hooks/`. Added shared `cloneWithDecorator` internal utility and decorator pattern documentation. Removed broken `./dnd` package export.
22
+
23
+ ## Migration
24
+
25
+ If importing directly from internal paths (e.g. `@tcn/ui/src/utils/resize/...` or `@tcn/ui/src/utils/dnd/...`), update to the new paths under `utils/decorators/resizable/` and `utils/decorators/draggable/`. Barrel imports from `@tcn/ui/utils` are unchanged.
26
+
27
+ - 05a0db3: Refactored FieldSet to a composition-based API with a new `Legend` child component. Added `disabled` and `name` props. Moved visual styles (gap, padding, border-radius, background) from the system CSS layer to theme layers.
28
+
29
+ ## Breaking Changes
30
+
31
+ - The `legend`, `startAdornments`, and `endAdornments` props have been removed. Use a `<Legend>` child instead.
32
+ - The inner body `<div class="tcn-field-set-body">` has been removed. Children now render directly inside the fieldset. Any CSS targeting `.tcn-field-set-body` must target `.tcn-field-set` instead.
33
+
34
+ ## Migration
35
+
36
+ Replace the `legend` string prop with a composed `<Legend>` child. String children are automatically styled:
37
+
38
+ ```tsx
39
+ // Before
40
+ <FieldSet legend="Personal Info">
41
+ <Field label="Name"><Input /></Field>
42
+ </FieldSet>
43
+
44
+ // After
45
+ <FieldSet>
46
+ <Legend>Personal Info</Legend>
47
+ <Field label="Name"><Input /></Field>
48
+ </FieldSet>
49
+ ```
50
+
51
+ If you used `startAdornments` or `endAdornments`, place them directly inside `<Legend>`:
52
+
53
+ ```tsx
54
+ <Legend>
55
+ <Icon />
56
+ <BodyText size="lg">Section</BodyText>
57
+ <Spacer />
58
+ <Badge>3</Badge>
59
+ </Legend>
60
+ ```
61
+
62
+ If you have custom CSS targeting `.tcn-field-set-body`, move those rules to `.tcn-field-set`.
63
+
64
+ - 7523fa4: Removed deprecated `SlimButton` component. Use `<Button utility>` instead — same API, just add the `utility` prop.
65
+
66
+ ## Breaking Changes
67
+
68
+ `SlimButton` export has been removed from `@tcn/ui`.
69
+
70
+ ## Migration
71
+
72
+ Replace all `<SlimButton>` usage with `<Button utility>`:
73
+
74
+ ```diff
75
+ - import { SlimButton } from '@tcn/ui';
76
+ + import { Button } from '@tcn/ui';
77
+
78
+ - <SlimButton hierarchy="tertiary" size="sm">
79
+ + <Button utility hierarchy="tertiary" size="sm">
80
+ <CrossIcon />
81
+ - </SlimButton>
82
+ + </Button>
83
+ ```
84
+
85
+ - fb46de8: Resize origin values changed from physical (`'left'`/`'right'`) to logical (`'start'`/`'end'`) for i18n/RTL support. The `WidthResizeOrigin` type is now `'start' | 'end'`. Physical `ResizeHandlePosition` values (`'left'`, `'right'`, `'top-left'`, etc.) have been removed — use logical equivalents (`'start'`, `'end'`, `'top-start'`, etc.).
86
+
87
+ New shared utility types `HorizontalSide` and `VerticalSide` are exported from `@tcn/ui/utils`.
88
+
89
+ ## Breaking Changes
90
+
91
+ - `WidthResizeOrigin` changed from `'left' | 'right'` to `'start' | 'end'`
92
+ - Resize callbacks (`onWidthResize`, `onWidthResizeEnd`) now report `origin: 'start'` or `origin: 'end'`
93
+ - Physical `ResizeHandlePosition` values removed: `'left'`, `'right'`, `'top-left'`, `'top-right'`, `'bottom-left'`, `'bottom-right'`
94
+
95
+ ## Migration
96
+
97
+ - `origin === 'left'` → `origin === 'start'`
98
+ - `origin === 'right'` → `origin === 'end'`
99
+ - `position="left"` → `position="start"` (on ResizeHandle)
100
+ - `position="right"` → `position="end"` (on ResizeHandle)
101
+ - Corner equivalents: `top-left` → `top-start`, `top-right` → `top-end`, `bottom-left` → `bottom-start`, `bottom-right` → `bottom-end`
102
+
103
+ ### Patch Changes
104
+
105
+ - 0cbec73: Resize-related props on Box (`enableResizeOn*`, `horizontalHandleProps`, `verticalHandleProps`, `onWidthResize`, `onHeightResize`, `onWidthResizeEnd`, `onHeightResizeEnd`) are now deprecated. Use `Resizable` + `ResizeHandle` instead. A `DeprecatedBoxResizeProps` type union is exported for easy omission from derived interfaces via `Omit<BoxProps, DeprecatedBoxResizeProps>`.
106
+
107
+ ## Migration
108
+
109
+ Wrap your Box in `<Resizable>` and add `<ResizeHandle position="...">` children instead of using the `enableResizeOn*` props. See the Resizable component docs for usage examples.
110
+
111
+ - 75f907f: Continued splitting ergo theme into modular part files. Extracted `inputs.css` (entry, control, control-set, checkbox, switch, slider, multiselect), `form.css` (field-set, legend), and `navigation.css` (default + inline tab variants) from the monolithic `ergo_theme.css` into `parts/`. No visual changes — all styles are identical, just reorganized for maintainability.
112
+
113
+ ## Migration
114
+
115
+ None required.
116
+
117
+ - d3738cd: Fixed ergo theme Divider rendering as transparent by migrating from the renamed `--material-line` variable to `--ergo-material-divider` token, with `#aaa` fallback.
118
+ - 59ef353: Frame now uses the Resizable + ResizeHandle decorator pattern internally instead of Box's built-in resize handles. Resize handles are themed with a -6px offset for overlays. No changes to Frame's public API.
119
+
120
+ Storybook preview-head files now explicitly declare `@layer tcn-reset, tcn-system, tcn-theme` to restore correct CSS layer ordering after the layer injection was removed from Theme.
121
+
122
+ ## Migration
123
+
124
+ None required.
125
+
126
+ - b9ad8cc: Fixed MultiSelect/MultiComboBox values container overflowing wider than the input above it (`box-sizing: border-box`). Disabled and default visual states now use ergo theme tokens instead of hardcoded colors.
127
+
128
+ ## Migration
129
+
130
+ None required.
131
+
132
+ - Updated dependencies [206a97a]
133
+ - @tcn/icons@2.4.0
134
+
135
+ ## 0.17.0
136
+
137
+ ### Minor Changes
138
+
139
+ - cb69f98: Adds default item-sizing props to `Columns` and `Rows`.
140
+
141
+ **`Columns`** gains `columnsMinWidth`, `columnsWidth`, and `columnsMaxWidth`. Set them once on the container to apply a uniform default to every child `Column`. An explicit prop on a `Column` always wins.
142
+
143
+ ```tsx
144
+ <Columns columnsMinWidth="300px">
145
+ <Column>Left</Column>
146
+ <Column>Right</Column>
147
+ <Column minWidth="500px">Override — wider</Column>
148
+ </Columns>
149
+ ```
150
+
151
+ **`Rows`** gains `rowsMinHeight`, `rowsHeight`, and `rowsMaxHeight`. Same propagation model — set once on `Rows`, override on individual `Row`.
152
+
153
+ ```tsx
154
+ <Rows rowsMinHeight="80px">
155
+ <Row>Top</Row>
156
+ <Row>Middle</Row>
157
+ <Row minHeight="160px">Override — taller</Row>
158
+ </Rows>
159
+ ```
160
+
161
+ Implemented via CSS custom properties (`--columns-min-width`, `--columns-width`, `--columns-max-width`, `--rows-min-height`, `--rows-height`, `--rows-max-height`) — zero runtime cost.
162
+
163
+ ## Migration
164
+
165
+ None required. Existing usages are unchanged.
166
+
167
+ - 45d229d: Introduces `Resizable` and `ResizeHandle` — composable resize decorators in `utils/resize/`.
168
+ Decouples resize behavior from `Box`, allowing any element to be made resizable without
169
+ a wrapper component.
170
+
171
+ **`Resizable`** — decorates its first child with `position: relative` via `cloneElement`
172
+ and injects `ResizeHandle` children directly into the target. Provides context for
173
+ resize callbacks (`onWidthResize`, `onHeightResize`, `onWidthResizeEnd`, `onHeightResizeEnd`).
174
+
175
+ **`ResizeHandle`** — renders an absolutely-positioned handle div. Supports 14 positions:
176
+ 6 edges (`top`, `bottom`, `left`, `right`, `start`, `end`) and 8 corners
177
+ (`top-left`, `top-right`, `bottom-left`, `bottom-right` + RTL-aware logical variants).
178
+ Accepts all `HTMLDivElement` props and a forwarded `ref`.
179
+
180
+ **Pure logic layer** (`handle_config.ts`) — position-to-config mapping, RTL direction
181
+ resolution, and delta computation are extracted into pure functions with no DOM/React
182
+ dependencies, fully unit-testable.
183
+
184
+ ### Usage
185
+
186
+ ```tsx
187
+ <Resizable onWidthResize={({ width }) => setWidth(width)}>
188
+ <Column width={`${width}px`}>content</Column>
189
+ <ResizeHandle position="right" />
190
+ </Resizable>
191
+ ```
192
+
193
+ ### Corner handles (dual-axis)
194
+
195
+ ```tsx
196
+ <Resizable
197
+ onWidthResize={({ width }) => setWidth(width)}
198
+ onHeightResize={({ height }) => setHeight(height)}
199
+ >
200
+ <Box width={`${width}px`} height={`${height}px`}>
201
+ content
202
+ </Box>
203
+ <ResizeHandle position="bottom-right" />
204
+ </Resizable>
205
+ ```
206
+
207
+ ### Overflow — consumer-controlled clipping
208
+
209
+ ```tsx
210
+ <Resizable onWidthResize={({ width }) => setWidth(width)}>
211
+ <Box width={`${width}px`} minWidth="100px">
212
+ <Box overflow="hidden">clipped content</Box>
213
+ </Box>
214
+ <ResizeHandle position="right" />
215
+ </Resizable>
216
+ ```
217
+
218
+ ### Theming
219
+
220
+ Handle offset is controlled via `--resize-offset` CSS variable (defaults to `0px`).
221
+ Themes or inline styles can override:
222
+
223
+ ```tsx
224
+ <ResizeHandle position="left" style={{ "--resize-offset": "-8px" }} />
225
+ ```
226
+
227
+ ## Migration
228
+
229
+ None required. This is additive — existing Box resize props continue to work.
230
+
231
+ - 03d8f6c: Introduces `Rows` and `Row` — the vertical counterparts to `Columns` and `Column`.
232
+ Use them to stack fixed-height horizontal strips inside a `Scaffold`, with theme-driven
233
+ separators between rows.
234
+
235
+ **`Row`** — an `HStack` that renders as `<section>`. Defaults to `flex-grow: 0`
236
+ (holds its height). Pass `height="fill"` to let it grow into remaining space.
237
+
238
+ **`Rows`** — extends `Scaffold`, adding the `.tcn-rows` context class. The ergo
239
+ theme uses this context to apply `border-bottom` separators and block-axis padding
240
+ between rows. The last `Row` never receives a trailing border.
241
+
242
+ ### Contexts
243
+
244
+ | Container | Separator | Padding |
245
+ | ------------------------- | ---------------------------- | ---------------------------- |
246
+ | `.tcn-panel`, `.tcn-card` | `border-bottom` between rows | `padding-block` between rows |
247
+ | `.tcn-page` | none | `padding-block` between rows |
248
+
249
+ ### Card / Panel — metadata rows with separators
250
+
251
+ ```tsx
252
+ <Card maxWidth="400px">
253
+ <Header>
254
+ <Title>Login Information</Title>
255
+ </Header>
256
+ <Scaffold>
257
+ <Rows>
258
+ <Row minHeight="48px">
259
+ <Term>
260
+ <Key>Username:</Key>
261
+ <Value>jsmith</Value>
262
+ </Term>
263
+ </Row>
264
+ <Row minHeight="48px">
265
+ <Term>
266
+ <Key>Email:</Key>
267
+ <Value severity="encouraged">jsmith@example.com</Value>
268
+ </Term>
269
+ </Row>
270
+ <Row minHeight="48px">
271
+ <Term>
272
+ <Key>Force Password Reset:</Key>
273
+ <Value>No</Value>
274
+ </Term>
275
+ <Term>
276
+ <Key>Two-Factor:</Key>
277
+ <Value severity="encouraged">Enabled</Value>
278
+ </Term>
279
+ </Row>
280
+ <Row height="fill">
281
+ <Term>
282
+ <Key>Expiration Date:</Key>
283
+ <Value>02/27/2024</Value>
284
+ </Term>
285
+ </Row>
286
+ </Rows>
287
+ </Scaffold>
288
+ </Card>
289
+ ```
290
+
291
+ ### Page — Column body with Rows
292
+
293
+ ```tsx
294
+ <Page>
295
+ <Rail>
296
+ <Column width="fill">
297
+ <Rows>
298
+ <Row minHeight="64px">{/* top strip — filters, toolbar */}</Row>
299
+ <Row height="fill">{/* main content */}</Row>
300
+ <Row minHeight="56px">{/* footer strip — pager, summary */}</Row>
301
+ </Rows>
302
+ </Column>
303
+ </Rail>
304
+ </Page>
305
+ ```
306
+
307
+ ## Migration
308
+
309
+ None required.
310
+
311
+ ### Patch Changes
312
+
313
+ - 61815b2: Adds default ergo theme styles for `ResizeHandle`.
314
+
315
+ **Visual indicators** — edge handles render a centered pill chip via `::after`; corner handles render an L-shape indicator matching the resize cursor direction. Both darken on hover.
316
+
317
+ - Horizontal edges (`left`, `right`, `start`, `end`): 4px × 16px pill, centered vertically
318
+ - Vertical edges (`top`, `bottom`): 16px × 4px pill, centered horizontally
319
+ - Corners: 8px × 8px L-shape with 4px borders on two adjacent sides, anchored to the corner
320
+
321
+ **`data-axis` attribute** — `ResizeHandle` now exposes a `data-axis` attribute (`"horizontal"` | `"vertical"` | `"corner"`) derived from its `position` prop. Simplifies theme selectors and is available for custom styling.
322
+
323
+ **Column context offset** — within `.tcn-panel` and `.tcn-page`, handles inside `Columns` automatically inherit `--resize-offset` and `width` from the column padding token (`--padding-medium`), placing the handle in the gap between columns without any inline style override.
324
+
325
+ ## Migration
326
+
327
+ Remove any `--resize-offset` inline style overrides on `ResizeHandle` when used inside `Columns` within a `Panel` or `Page` — the ergo theme now sets this automatically.
328
+
329
+ ```diff
330
+ - <ResizeHandle position="left" style={{ '--resize-offset': '-8px' } as React.CSSProperties} />
331
+ + <ResizeHandle position="left" />
332
+ ```
333
+
334
+ - 35fb302: `Scaffold` and `Rail` now render a single element (`VStack`/`HStack`) instead of a nested `Box` > Stack pair. This removes one DOM node per container, simplifies CSS selectors, and aligns the component API with the underlying stack primitives.
335
+
336
+ `ScaffoldProps` now extends `VStackProps` (minus `as`); `RailProps` now extends `HStackProps` (minus `as`). All existing sizing, spacing, and alignment props continue to work. The ergo theme `--pad-inline` default has moved from `.tcn-scaffold` to each surface (Page, Panel, Aside, Modal, Drawer, Window) individually.
337
+
338
+ ## Migration
339
+
340
+ - If you targeted `.tcn-scaffold-stack`, `.tcn-rail-stack`, or `.tcn-container-stack` in custom CSS, update selectors to target the container directly (`.tcn-scaffold`, `.tcn-rail`, `.tcn-container`).
341
+ - If you relied on `BoxProps`-specific types from `ScaffoldProps`/`RailProps`, switch to the equivalent `VStackProps`/`HStackProps` types.
342
+ - Resize props (`enableResizeOn*`, `onWidthResize`, `onHeightResize`, etc.) are no longer available on Scaffold/Rail. Wrap the container with `Resizable` and add a `ResizeHandle` child to restore resize behavior:
343
+
344
+ ```tsx
345
+ // Before
346
+ <Scaffold enableResizeOnEnd onWidthResize={handleResize}>...</Scaffold>
347
+
348
+ // After
349
+ <Resizable>
350
+ <Scaffold>
351
+ ...
352
+ <ResizeHandle position="right" />
353
+ </Scaffold>
354
+ </Resizable>
355
+ ```
356
+
357
+ - 48b2b3f: We need to get the closest root, not just the document.
358
+
359
+ ## 0.16.0
360
+
361
+ ### Minor Changes
362
+
363
+ - ff1db56: Introduces `Columns` and refactors `Column`. Removes `Side`.
364
+
365
+ **`Columns`** — new container that extends `Rail`, adding the `.tcn-columns` context
366
+ class. The ergo theme uses this context to apply column separators (right border +
367
+ padding-inline) when `Columns` is nested inside a Panel. Standalone `Column`
368
+ components in `Rail` and adjacent `Aside` components are unaffected.
369
+
370
+ **`Column`** — now a `VStack` directly (no Box wrapper). Defaults to `flex-grow: 0`
371
+ so it holds its width in a Rail. Pass `width="fill"` to make a Column grow and fill
372
+ remaining space. Two canonical uses:
373
+
374
+ - **Inside `Columns`** — fixed-width panel-body strip; ergo adds separators
375
+ - **Directly in `Rail`** — standalone sidebar or control column; no separator
376
+
377
+ ## Examples
378
+
379
+ **Panel with Columns** — side-by-side field groups, ergo applies right-border separators:
380
+
381
+ ```tsx
382
+ <Panel>
383
+ <Header>
384
+ <Title>Agent Details</Title>
385
+ </Header>
386
+ <Scaffold>
387
+ <Columns>
388
+ <Column minWidth="300px">
389
+ <Section>
390
+ <Heading>General</Heading>
391
+ <Detail>
392
+ <Term>
393
+ <Key>Agent</Key>
394
+ <Value>John Doe</Value>
395
+ </Term>
396
+ <Term>
397
+ <Key>Queue</Key>
398
+ <Value>Support</Value>
399
+ </Term>
400
+ <Term>
401
+ <Key>Status</Key>
402
+ <Value>Active</Value>
403
+ </Term>
404
+ </Detail>
405
+ </Section>
406
+ </Column>
407
+ <Column minWidth="300px">
408
+ <Section>
409
+ <Heading>Contact</Heading>
410
+ <Detail>
411
+ <Term>
412
+ <Key>Email</Key>
413
+ <Value>john.doe@example.com</Value>
414
+ </Term>
415
+ <Term>
416
+ <Key>Phone</Key>
417
+ <Value>+1 555 000 1234</Value>
418
+ </Term>
419
+ </Detail>
420
+ </Section>
421
+ </Column>
422
+ </Columns>
423
+ </Scaffold>
424
+ <Footer>
425
+ <Spacer />
426
+ <Button hierarchy="secondary">Cancel</Button>
427
+ <Button hierarchy="primary">Save</Button>
428
+ </Footer>
429
+ </Panel>
430
+ ```
431
+
432
+ **Page-level two-column layout** — primary panel fills, quarter-view panel fixed:
433
+
434
+ ```tsx
435
+ <Page>
436
+ <Columns>
437
+ <Column width="fill" minWidth="600px">
438
+ <Panel>
439
+ <Header>
440
+ <Title>Tasks</Title>
441
+ </Header>
442
+ <Scaffold>{/* table / main content */}</Scaffold>
443
+ <Footer>{/* pager */}</Footer>
444
+ </Panel>
445
+ </Column>
446
+ <Column minWidth="300px">
447
+ <Panel>
448
+ <Header>
449
+ <Title>Details</Title>
450
+ </Header>
451
+ <Scaffold>{/* selected row preview */}</Scaffold>
452
+ </Panel>
453
+ </Column>
454
+ </Columns>
455
+ </Page>
456
+ ```
457
+
458
+ ## Migration
459
+
460
+ **`Side` removed.** Replace `<Side width="Xpx">` with `<Column minWidth="Xpx">`.
461
+
462
+ **`Column` no longer grows by default.** If you had a `Column` that was growing to
463
+ fill space, add `width="fill"`: `<Column width="fill">`.
464
+
465
+ If you relied on `Column`'s previous hardcoded `250px` minimum width, pass
466
+ `minWidth="250px"` explicitly.
467
+
468
+ ## 0.15.0
469
+
470
+ ### Minor Changes
471
+
472
+ - 4606dcd: Adds `Detail` as the named content slot for `Section`, replacing the catch-all CSS rule that applied `padding-inline-start` to all direct Section children.
473
+
474
+ `Detail` is a `VStack` that opts in to indentation based on context:
475
+
476
+ - Inside `Section` — receives `--section-tab` (inline-start) and `--gap-small` (inline-end)
477
+ - Inside `Scaffold` or `Panel` directly — receives `--pad-inline` on both sides, enabling flat Panel layouts without requiring an intermediate `Section`
478
+
479
+ Both contexts also apply `padding-block` via the ergo theme.
480
+
481
+ The ergo theme section block has been refactored: sticky positioning, height, z-index, and all padding values have moved out of the system CSS layer and into the theme. Heading sticky offsets are now driven by `--section-heading-height * --section-tab-depth` rather than hardcoded depth selectors.
482
+
483
+ ## Migration
484
+
485
+ Content placed directly inside `Section` (not wrapped in `Detail`) will no longer receive `padding-inline-start`. Wrap existing Section content in `Detail`:
486
+
487
+ ```tsx
488
+ // Before
489
+ <Section>
490
+ <Heading>Title</Heading>
491
+ <Term>...</Term>
492
+ </Section>
493
+
494
+ // After
495
+ <Section>
496
+ <Heading>Title</Heading>
497
+ <Detail>
498
+ <Term>...</Term>
499
+ </Detail>
500
+ </Section>
501
+ ```
502
+
503
+ `Detail` also replaces the need for a bare `Section` when no labeled grouping is required:
504
+
505
+ ```tsx
506
+ // Instead of a Section with no meaningful Heading just to get indentation:
507
+ <Panel>
508
+ <Header>Request Details</Header>
509
+ <Scaffold>
510
+ <Detail>
511
+ <Term>
512
+ <Key>Agent</Key>
513
+ <Value>John Doe</Value>
514
+ </Term>
515
+ </Detail>
516
+ </Scaffold>
517
+ </Panel>
518
+ ```
519
+
520
+ Surfaces like `Card` placed at section level are no longer affected by the catch-all indent — they are self-contained unless explicitly wrapped in `Detail`.
521
+
522
+ ### Patch Changes
523
+
524
+ - 772908a: Ergo theme tokens are now organized into a dedicated brand palette file, with system-level tokens (`--action-severity-*`, spacing, palette colors, etc.) broken out into their own layer. All CSS variable references in the theme now resolve directly through named ergo tokens rather than ad-hoc values.
525
+
526
+ ## Migration
527
+
528
+ None required.
529
+
530
+ - b0bca82: Adds `Term` to `Tokens` — a labeled key/value row — along with `emphasis` and `severity` props on `Key` and `Value`. A shared `tcn-datum` CSS class enables theme-level styling across both. Severity maps to the ergo status color palette. `Row` has been removed in favor of `Term`.
531
+
532
+ ## 0.14.0
533
+
534
+ ### Minor Changes
535
+
536
+ - 8510f5b: Remove `Body` layout component. `Scaffold` and `Rail` now automatically apply body
537
+ behavior — flex growth, min-height clamping, and overflow scrolling — when nested
538
+ inside a parent `Scaffold` or `Rail`. This removes the need for an explicit wrapper
539
+ and makes layout composition more ergonomic.
540
+
541
+ **Migration:** Delete all `<Body>` imports and usages from your layouts. No other
542
+ changes are required — a nested `<Scaffold>` or `<Rail>` is now the scroll container
543
+ by default.
544
+
545
+ ```diff
546
+ - import { Scaffold, Body, Header, Footer } from '@tcn/ui'
547
+ + import { Scaffold, Header, Footer } from '@tcn/ui'
548
+
549
+ <Scaffold>
550
+ <Header />
551
+ - <Body>
552
+ <Scaffold>
553
+ {content}
554
+ </Scaffold>
555
+ - </Body>
556
+ <Footer />
557
+ </Scaffold>
558
+ ```
559
+
560
+ ### Patch Changes
561
+
562
+ - 1ee1dcc: Input font sizes are now consistent across all input types at 12px, including date picker and select-based inputs which previously inherited an incorrect size from the button component.
563
+
564
+ ## Migration
565
+
566
+ None required.
567
+
568
+ - a5a9cf0: Fix card internal spacing when used inside panels and sections.
569
+
570
+ Cards now isolate their own `--pad-inline` (8px) so header and body padding
571
+ are not polluted by the parent scaffold context (e.g. panels with edge-to-edge
572
+ headings that set padding to zero).
573
+
574
+ **Using cards inside panels:**
575
+
576
+ Cards should be placed using the following structure to ensure correct depth,
577
+ indentation, and internal spacing:
578
+
579
+ ```
580
+ Panel
581
+ └─ Body
582
+ └─ Scaffold
583
+ └─ Section (establishes depth / padding via --section-tab)
584
+ └─ Row (absorbs section depth, positions card correctly)
585
+ └─ Card
586
+ ```
587
+
588
+ Placing a `Card` directly inside a `Section` without a `Row` wrapper will cause
589
+ the section's `padding-inline-start` to be applied to the card element itself,
590
+ distorting its layout. `Row` acts as the inset carrier so the card remains
591
+ self-contained.
592
+
593
+ Cards placed directly inside a `Body > Scaffold` (without sections) do not
594
+ require a `Row` wrapper.
595
+
596
+ - f83aaa6: Adding Mobile (Phone) Input. I haven't made them available yet. I want to iterate on the before I do.
597
+ - 0d6328f: Style tweak for Ergo Theme select
598
+ - b51d168: Font tweak for Title/Label on Filter fields
599
+ - Updated dependencies [fb6bc45]
600
+ - @tcn/state@1.3.3
601
+ - @tcn/icons@2.3.0
602
+
603
+ ## 0.13.1
604
+
605
+ ### Patch Changes
606
+
607
+ - e3d567c: Updates the table theme for ergo. Ensures that the first column is justified with a panel header. Quick fix for checkboxes in the first column - should be dark blue instead of orange. Adds a selection column example in ui-table
608
+
609
+ ## 0.13.0
610
+
611
+ ### Minor Changes
612
+
613
+ - f2b9c66: # Changes
614
+
615
+ Removes deprecated V/H Body components. Finishes implementation for Body component, Updates all references and fixes stories
616
+
617
+ Body's only role now is to fill the available space in a layout. To determine the layout and scroll direction of the Body children pick between Scaffold (a vertical layout) or Rail (a horizontal layout).
618
+
619
+ ## Migration
620
+
621
+ Previous:
622
+
623
+ Vertical Approach
624
+
625
+ ```tsx
626
+ <Panel>
627
+ <Header><Title>Panel Title</Title></Header>
628
+ <VBody>
629
+ <Section>
630
+ <Heading>Example Content</Heading>
631
+ </Section>
632
+ <Footer><Title>Panel Title</Title></Footer>
633
+ </Panel>
634
+ ```
635
+
636
+ Horizontal Approach
637
+
638
+ ```tsx
639
+ <Panel>
640
+ <Header><Title>Panel Title</Title></Header>
641
+ <HBody>
642
+ <Section>
643
+ <Heading>Example Content</Heading>
644
+ </Section>
645
+ <Footer><Title>Panel Title</Title></Footer>
646
+ </Panel>
647
+ ```
648
+
649
+ New Approach:
650
+
651
+ Vertical Approach
652
+
653
+ ```tsx
654
+ <Panel>
655
+ <Header>
656
+ <Title>Header Title</Title>
657
+ </Header>
658
+ <Body>
659
+ <Scaffold>
660
+ <Section>
661
+ <Heading>Example Content</Heading>
662
+ </Section>
663
+ </Scaffold>
664
+ </Body>
665
+ <Footer>
666
+ <Title>Footer Title</Title>
667
+ </Footer>
668
+ </Panel>
669
+ ```
670
+
671
+ Horizontal Approach
672
+
673
+ ```tsx
674
+ <Panel>
675
+ <Header>
676
+ <Title>Header Title</Title>
677
+ </Header>
678
+ <Body>
679
+ <Scaffold>
680
+ <Section>
681
+ <Heading>Example Content</Heading>
682
+ </Section>
683
+ </Scaffold>
684
+ </Body>
685
+ <Footer>
686
+ <Title>Footer Title</Title>
687
+ </Footer>
688
+ </Panel>
689
+ ```
690
+
691
+ - 675106d: Added autocomplete attribute for sipinput
692
+
693
+ ## 0.12.7
694
+
695
+ ### Patch Changes
696
+
697
+ - 0c68fb9: Adds new Aside component - used to conditionally support the primary body content of a surface (scaffold)
698
+ - Updated dependencies [182ee39]
699
+ - Updated dependencies [2129fea]
700
+ - @tcn/state@1.3.2
701
+ - @tcn/icons@2.3.0
702
+
703
+ ## 0.12.6
704
+
705
+ ### Patch Changes
706
+
707
+ - f768aa1: Adds Slide (Overlay utility) and Drawer (Surface)
708
+ - 8e6f051: Remove shim from reset styles, test application fix
709
+ - e7a2cfe: Add Control, rename InputGroup to ControlSet
710
+ - Updated dependencies [41a4a76]
711
+ - Updated dependencies [24a7d4d]
712
+ - Updated dependencies [2c56723]
713
+ - @tcn/state@1.3.1
714
+ - @tcn/icons@2.3.0
715
+
716
+ ## 0.12.5
717
+
718
+ ### Patch Changes
719
+
720
+ - 3505a49: Refactored resize callback signatures from individual parameters to payload objects (OnWidthResizePayload and OnHeightResizePayload). Expanded Modal and Windows stories to thouroughly test props
721
+ - 27d3484: Fixes Frame and Box resizing logic - bounds are now enforced at same paint with pixel compare omptization if style is in px'
722
+ - Updated dependencies [c3722d6]
723
+ - @tcn/state@1.3.0
724
+ - @tcn/icons@2.3.0
725
+
726
+ ## 0.12.4
727
+
728
+ ### Patch Changes
729
+
730
+ - 4ee8e97: Adds Group component, adjusts theming on Tabs and Group component
731
+ - adfd1af: Updated title and description to reactNode.
732
+ - 36645db: Move SelectGroup from actions into Inputs
733
+ - a0f28a7: Tweaks Ergo Theme for Rail
734
+ - Updated dependencies [ffb3b25]
735
+ - @tcn/state@1.2.1
736
+ - @tcn/icons@2.3.0
737
+
738
+ ## 0.12.3
739
+
740
+ ### Patch Changes
741
+
742
+ - ffcdad3: fix(popper): add content and anchor refs to acceptedRefs so portaled content doesn't dismiss on inside click.
743
+
744
+ ElementPopper and ContextPopper now pass popperRef and anchorElement into acceptedRefs. With portaled content, ClickAwayListener's node ref isn't an ancestor of the popover DOM, so clicks on the popover were treated as "away". Including the portaled root and anchor in acceptedRefs fixes that.
745
+
746
+ - ffcdad3: docs(pop-confirm): add stories for dismissal variants and manual-close, fix incorrect description
747
+ - ffcdad3: fix(popper): fix isException for dismissals
748
+
749
+ - Use dismissals.includes(dismissal) in buildExceptionHandler so isException runs for click-away and scroll-away (was “dismissal in dismissals”, which never matched for arrays).
750
+
751
+ - bc8489a: Add margin to caret in ergo theme and set background to be surface aware, refactor tether and origin code to fix bug in initial position of caret
752
+
753
+ ## 0.12.2
754
+
755
+ ### Patch Changes
756
+
757
+ - 3025114: Bug fixes for suggestion list and fixed layout on phone number input.
758
+
759
+ ## 0.12.1
760
+
761
+ ### Patch Changes
762
+
763
+ - bdf2a7b: Setting tooltip caret to hidden until styles are fixed
764
+
765
+ ## 0.12.0
766
+
767
+ ### Minor Changes
768
+
769
+ - 36f80fd: Separated ProgressBar into Progress and ProgressBar so we can use both.
770
+
771
+ ### Patch Changes
772
+
773
+ - 7af569e: Adds functionality to clamp Frame to min/max width and heights
774
+ - 438fab1: Fixed cache children bug.
775
+
776
+ ## 0.11.0
777
+
778
+ ### Minor Changes
779
+
780
+ - 9bff31f: Improve Frame and Window sizing and clipping so overlays lay out and contain content correctly.
781
+ - 1c97124: Added dialog to the reset
782
+ - 494565b: Accessibility changes to PhoneNumberInput, VField and HField
783
+ - 664f7f2: Updated SuggestionLists restore focus and fixed phone number inputs.
784
+
785
+ ### Patch Changes
786
+
787
+ - 11de0f7: Updates Table Filter Panel to use new theming for inputs and applies an IR
788
+ - 4389af3: Adjust Ergo Theme for inputs. Adds InputGroup
789
+ - Updated dependencies [9a96e1f]
790
+ - @tcn/icons@2.3.0
791
+
792
+ ## 0.10.0
793
+
794
+ ### Minor Changes
795
+
796
+ - 4547051: Upgraded Box's resize handlers to support displacment and origin position.
797
+ - b52d699: Corrected divider coloring by emphasis in ergo theme.
798
+
799
+ ### Patch Changes
800
+
801
+ - 60748a8: Deprecated Main, Tweaked Body components on Scaffold, updated examples.
802
+
803
+ ## 0.9.0
804
+
805
+ ### Minor Changes
806
+
807
+ - fa45937: Upgraded Draggable Context to support setPosition.
808
+ - 07bd249: Addded Responsive Component
809
+
810
+ ## 0.8.1
811
+
812
+ ### Patch Changes
813
+
814
+ - a340e9f: Added rules for ai.
815
+ - 2d53528: Initial implementation of Horizontal Layouts
816
+ - de43067: Adds new app for testing composition of blackcat components. The app has two list view templates to begin with. Adds exports for horizontal layouts in UI, and ensure primitive table exports wont interfere with ui-table namespace.
817
+ - 234a025: UI Table now uses themed primitive table component wrappers from ui. Also made some small adjustments to wrappers and Ergo Theme.
818
+ - 61dcbbf: Adds primitive table elements to ui and themes them.
819
+
820
+ ## 0.8.0
821
+
822
+ ### Minor Changes
823
+
824
+ - 40c0f66: Extract IWeakPromise interface and refactor code to use interface types instead of concrete WeakPromise class
825
+
826
+ ### Patch Changes
827
+
828
+ - 2ac9878: Adds tab panel role onto tab child
829
+ - Updated dependencies [40c0f66]
830
+ - @tcn/state@1.2.0
831
+ - @tcn/icons@2.2.1
832
+
833
+ ## 0.7.0
834
+
835
+ ### Minor Changes
836
+
837
+ - 1e5a0d4: Added a disablePhoneNumber prop to the PhoneNumberInput
838
+ - 96673cd: Adds caret positioning to the tethered overlay component, controlled by the precision prop. Renames BaseCaret component to Caret and updates CSS class from tcn-base-caret to tcn-caret.
839
+ - a296e49: Exported the draggable handlers
840
+
841
+ ### Patch Changes
842
+
843
+ - 861892e: Adjust Ergo theme for sections and panel body (scaffold)
844
+ - 8ee1be6: Another approach for the Ergo Button hover issue
845
+ - 109666d: Patch Ergo Theme - Button click bug, when clicking on the top 1px.
846
+
847
+ ## 0.6.0
848
+
849
+ ### Minor Changes
850
+
851
+ - 9d000b3: Addded the correct background color to the confirm
852
+
853
+ ## 0.5.0
854
+
855
+ ### Minor Changes
856
+
857
+ - f9677aa: Exported section heading from layout
858
+
859
+ ## 0.4.0
860
+
861
+ ### Minor Changes
862
+
863
+ - 98d7081: Add new BaseCarrot component to overlay system with directional support (up, down, start, end) and theme support.
864
+
865
+ ### Patch Changes
866
+
867
+ - a4c43ed: Added section to surfaces
868
+ - 5fa70a3: Added Row, Key, Value, Section, Heading.
869
+ - 3379485: removed root background colors off the ergo and windows 98 theme
870
+ - d4d4046: Deprecates SlimButton, adds utlity prop to toggle and button components that replaces SlimButton useage. Updates theming for Toggle, and docs'
871
+ - 547b393: Add Toggle Button
872
+
873
+ ## 0.3.3
874
+
875
+ ### Patch Changes
876
+
877
+ - b249670: Add initial implementation of Tabs in UI Navigation
878
+ - fa08372: Fixes Ergo theme font family, provides lato out of the box'
879
+
880
+ ## 0.3.2
881
+
882
+ ### Patch Changes
883
+
884
+ - 74f4f89: Ergo theme supports SelectGroup and ButtonGroup
885
+ - 3287a66: Fixed default select files.
886
+ - 5318f44: Refactor vite build configuration to fix CSS entrypoint handling
887
+
888
+ - Replace `getEntrypoints`/`getRollupEntrypoints` with unified `getLibEntrypoints` function
889
+ - Use `externalizeDeps` plugin for cleaner dependency externalization
890
+ - Fix standalone CSS files (themes, layers.css) not being included in builds
891
+ - Improve `preventEmptyJsFilesPlugin` to filter type-only JS outputs
892
+
893
+ - 532b07b: Added tcn to all classnames and fixed windows98 theme.
894
+ - 11b4861: "Fixed exception for popover."
895
+ - 7c4039d: Adjust Ergo theme for ButtonGroup
896
+ - 7a9ad32: Fixed slider styles
897
+ - 8efd840: Fixed tooltip hover bug.
898
+ - 91432ed: Added css layers for tcn-reset, tcn-system and tcn-theme.
899
+ - 11b4861: Fixed month selector
900
+ - Updated dependencies [5318f44]
901
+ - @tcn/state@1.1.1
902
+ - @tcn/icons@2.2.1
903
+
904
+ ## 0.3.1
905
+
906
+ ### Patch Changes
907
+
908
+ - b497df0: Added Severity type to buttons, needs to be iterated on'
909
+
910
+ ## 0.3.0
911
+
912
+ ### Minor Changes
913
+
914
+ - fb762bd: Added ResponsiveRenderer to index.ts to be exported
915
+ - fb762bd: Added changeset script to package.json
916
+
917
+ ### Patch Changes
918
+
919
+ - 3c14164: Add Scaffold component to ui/layout. Panel, Modal, Window, Card surfaces extend the scaffold layout. Simplifies shared theming in ergo theme between these surfaces
920
+ - ca4ace6: Expose tcn-surface class that is shared between panel, card, modal and window
921
+ - d02aae3: Patched Tethered and Poppers to use Portals
922
+ - 9a46dc5: Adding Exports for base popper and dismisal types
923
+ - 532d392: Adds Tooltip Surface - a small wrapper around a PreviewPopper
924
+ - ff797d8: Add PopConfirm Surface
925
+ - a818f23: Add Preview, Context, and Element Popper components
926
+ - b462f6f: Adds re-usable atomic components for relative overlays - Tethered and ElementTethered.
927
+ - Updated dependencies [7347527]
928
+ - Updated dependencies [acbec1e]
929
+ - @tcn/icons@2.2.0
930
+ - @tcn/state@1.1.0
931
+
932
+ ## 0.2.0
933
+
934
+ ### Minor Changes
935
+
936
+ - 9557ed3: Added the TextareaHTMLAttributes to the textarea
937
+ - 9f6a086: Added the name and autocomplete to the phoneinput
938
+
939
+ ### Patch Changes
940
+
941
+ - 6f1d975: Update useDraggable hook to accept multiple handles. Add Draggable and DragHandle Utils - HOC Decorator components. Add Frame component. Refactor Modal and Window to use Frame. Adjust ergo theme for window, modal, and draggable.
942
+ - @tcn/icons@2.1.1
943
+
944
+ ## 0.1.1
945
+
946
+ ### Patch Changes
947
+
948
+ - 0d622c5: - Updated shared dependencies across all packages.
949
+ - Improved build and test infrastructure for better reliability and consistency.
950
+ - Updated dependencies [0d622c5]
951
+ - @tcn/icons@2.1.1
952
+ - @tcn/state@1.0.1
953
+
954
+ ## 0.1.0
955
+
956
+ ### Minor Changes
957
+
958
+ - 012ff63: InputHTMLAttributes was updated as the prop type for inputs
959
+
960
+ ### Patch Changes
961
+
962
+ - @tcn/icons@2.1.0
963
+
964
+ ## 0.0.5
965
+
966
+ ### Patch Changes
967
+
968
+ - ee5e0b1: Adjusts Ergo theme: Adds initial styles for card and list, tweaks styles for modal and panel, adds styles for interactives, button and slim button. Adjusts theme class hooks for Card and Button, using tcn prefix for classes
969
+ - 170af57: Added UtilityBar to the index.ts barrel file to be exported.
970
+ - 4b52496: Added optional obfuscate feature for phone numbers in the phone book. This prevents agents from seeing phone numbers they shouldn't know anything about.
971
+ - @tcn/icons@2.1.0
972
+
973
+ ## 0.0.4
974
+
975
+ ### Patch Changes
976
+
977
+ - 1dbd8fc: remove themes that are causing issues with js testing in consuming apps due to cssstylesheets
978
+ - 5ec1141: Updated dependencies: replaced classnames dep with clsx for more ergonomic use and a bump in speed
979
+ - b4654d6: Initial ergo theme for modal, covers header color, inset, and background color.
980
+ - @tcn/icons@2.1.0
981
+
982
+ ## 0.0.3
983
+
984
+ ### Patch Changes
985
+
986
+ - 072bbe5: Added fill as a legit size for stacks and boxes. It will also work on the oppisite direction correctly.
987
+ - b852190: Adds initial Ergo theme for panel, tweaks VBody and HBody layout components to work within panel. Adds tcn scoped classNames to panel related components.
988
+ - 42c7053: Explicit exports for the ui/forms module. Tweaks imports to use type for type imports to allow easier removal for bundlers and dep analysis. Removes duplicate FormField component.
989
+ - @tcn/icons@2.1.0
990
+
991
+ ## 0.0.2
992
+
993
+ ### Patch Changes
994
+
995
+ - 8bf95bf: Moved drawers to surfaces and add vBody and hBody
996
+ - e8fa43c: Added barrel file for overlay package and missing fields for form package
997
+ - @tcn/icons@2.1.0
998
+
999
+ ## 0.0.1
1000
+
1001
+ ### Patch Changes
1002
+
1003
+ - d04e50c: the phone number stripNonNumericAfterCountryCode removes all non numeric characters unless first character is a plus sign for edge cases.
1004
+ - 1383733: Added documentation for contributing and added new theme variables.
1005
+ - Updated dependencies [d7062b5]
1006
+ - Updated dependencies [5b662bc]
1007
+ - Updated dependencies [23a302d]
1008
+ - @tcn/state@1.0.0
1009
+ - @tcn/icons@2.1.0