@ttoss/fsl-ui 0.2.4 → 0.2.6

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 (134) hide show
  1. package/README.md +1 -1
  2. package/dist/components/AppShell/AppShell.cjs +124 -0
  3. package/dist/components/AppShell/AppShell.d.cts +74 -0
  4. package/dist/components/AppShell/AppShell.d.mts +74 -0
  5. package/dist/components/AppShell/AppShell.mjs +123 -0
  6. package/dist/components/Badge/Badge.cjs +61 -0
  7. package/dist/components/Badge/Badge.d.cts +56 -0
  8. package/dist/components/Badge/Badge.d.mts +56 -0
  9. package/dist/components/Badge/Badge.mjs +60 -0
  10. package/dist/components/Box/Box.cjs +114 -0
  11. package/dist/components/Box/Box.d.cts +115 -0
  12. package/dist/components/Box/Box.d.mts +115 -0
  13. package/dist/components/Box/Box.mjs +113 -0
  14. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
  15. package/dist/components/Breadcrumbs/Breadcrumbs.mjs +1 -1
  16. package/dist/components/Button/Button.cjs +2 -2
  17. package/dist/components/Button/Button.d.cts +2 -1
  18. package/dist/components/Button/Button.d.mts +2 -1
  19. package/dist/components/Button/Button.mjs +2 -2
  20. package/dist/components/Checkbox/Checkbox.cjs +2 -2
  21. package/dist/components/Checkbox/Checkbox.mjs +2 -2
  22. package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
  23. package/dist/components/CheckboxGroup/CheckboxGroup.mjs +1 -1
  24. package/dist/components/Code/Code.cjs +69 -0
  25. package/dist/components/Code/Code.d.cts +53 -0
  26. package/dist/components/Code/Code.d.mts +53 -0
  27. package/dist/components/Code/Code.mjs +68 -0
  28. package/dist/components/Container/Container.cjs +65 -0
  29. package/dist/components/Container/Container.d.cts +61 -0
  30. package/dist/components/Container/Container.d.mts +61 -0
  31. package/dist/components/Container/Container.mjs +64 -0
  32. package/dist/components/FileTrigger/FileTrigger.cjs +1 -1
  33. package/dist/components/FileTrigger/FileTrigger.mjs +1 -1
  34. package/dist/components/Grid/Grid.cjs +88 -0
  35. package/dist/components/Grid/Grid.d.cts +87 -0
  36. package/dist/components/Grid/Grid.d.mts +87 -0
  37. package/dist/components/Grid/Grid.mjs +87 -0
  38. package/dist/components/GridList/GridList.cjs +2 -2
  39. package/dist/components/GridList/GridList.mjs +2 -2
  40. package/dist/components/Group/Group.cjs +1 -1
  41. package/dist/components/Group/Group.mjs +1 -1
  42. package/dist/components/Heading/Heading.cjs +78 -0
  43. package/dist/components/Heading/Heading.d.cts +63 -0
  44. package/dist/components/Heading/Heading.d.mts +63 -0
  45. package/dist/components/Heading/Heading.mjs +77 -0
  46. package/dist/components/Icon/Icon.cjs +2 -1
  47. package/dist/components/Icon/Icon.d.cts +59 -0
  48. package/dist/components/Icon/Icon.d.mts +59 -0
  49. package/dist/components/Icon/Icon.mjs +1 -1
  50. package/dist/components/Icon/glyphs.cjs +37 -10
  51. package/dist/components/Icon/glyphs.mjs +34 -10
  52. package/dist/components/Icon/intents.cjs +32 -0
  53. package/dist/components/Icon/intents.d.cts +33 -0
  54. package/dist/components/Icon/intents.d.mts +33 -0
  55. package/dist/components/Icon/intents.mjs +32 -0
  56. package/dist/components/Link/Link.cjs +1 -1
  57. package/dist/components/Link/Link.mjs +1 -1
  58. package/dist/components/ListBox/ListBox.cjs +1 -1
  59. package/dist/components/ListBox/ListBox.mjs +1 -1
  60. package/dist/components/Meter/Meter.cjs +11 -1
  61. package/dist/components/Meter/Meter.mjs +11 -1
  62. package/dist/components/NumberField/NumberField.cjs +2 -2
  63. package/dist/components/NumberField/NumberField.mjs +2 -2
  64. package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
  65. package/dist/components/ProgressBar/ProgressBar.mjs +1 -1
  66. package/dist/components/RadioGroup/RadioGroup.cjs +2 -2
  67. package/dist/components/RadioGroup/RadioGroup.mjs +2 -2
  68. package/dist/components/Select/Select.cjs +2 -2
  69. package/dist/components/Select/Select.mjs +2 -2
  70. package/dist/components/Separator/Separator.cjs +1 -1
  71. package/dist/components/Separator/Separator.mjs +1 -1
  72. package/dist/components/Slider/Slider.cjs +1 -1
  73. package/dist/components/Slider/Slider.mjs +1 -1
  74. package/dist/components/Stack/Stack.cjs +89 -0
  75. package/dist/components/Stack/Stack.d.cts +75 -0
  76. package/dist/components/Stack/Stack.d.mts +75 -0
  77. package/dist/components/Stack/Stack.mjs +88 -0
  78. package/dist/components/Surface/Surface.cjs +84 -0
  79. package/dist/components/Surface/Surface.d.cts +72 -0
  80. package/dist/components/Surface/Surface.d.mts +72 -0
  81. package/dist/components/Surface/Surface.mjs +83 -0
  82. package/dist/components/Switch/Switch.cjs +3 -3
  83. package/dist/components/Switch/Switch.d.cts +1 -1
  84. package/dist/components/Switch/Switch.d.mts +1 -1
  85. package/dist/components/Switch/Switch.mjs +3 -3
  86. package/dist/components/Table/Table.cjs +248 -0
  87. package/dist/components/Table/Table.d.cts +128 -0
  88. package/dist/components/Table/Table.d.mts +128 -0
  89. package/dist/components/Table/Table.mjs +239 -0
  90. package/dist/components/Tabs/Tabs.cjs +71 -28
  91. package/dist/components/Tabs/Tabs.d.cts +0 -17
  92. package/dist/components/Tabs/Tabs.d.mts +0 -17
  93. package/dist/components/Tabs/Tabs.mjs +69 -28
  94. package/dist/components/Text/Text.cjs +70 -0
  95. package/dist/components/Text/Text.d.cts +89 -0
  96. package/dist/components/Text/Text.d.mts +89 -0
  97. package/dist/components/Text/Text.mjs +69 -0
  98. package/dist/components/Toast/Toast.cjs +1 -1
  99. package/dist/components/Toast/Toast.mjs +1 -1
  100. package/dist/components/ToggleButton/ToggleButton.cjs +2 -2
  101. package/dist/components/ToggleButton/ToggleButton.mjs +2 -2
  102. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.cjs +1 -1
  103. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.mjs +1 -1
  104. package/dist/components/Toolbar/Toolbar.cjs +1 -1
  105. package/dist/components/Toolbar/Toolbar.mjs +1 -1
  106. package/dist/composites/Accordion/Accordion.cjs +14 -9
  107. package/dist/composites/Accordion/Accordion.mjs +14 -9
  108. package/dist/composites/Dialog/Dialog.cjs +1 -1
  109. package/dist/composites/Dialog/Dialog.mjs +1 -1
  110. package/dist/composites/Disclosure/Disclosure.cjs +14 -9
  111. package/dist/composites/Disclosure/Disclosure.mjs +14 -9
  112. package/dist/composites/Form/Form.cjs +1 -1
  113. package/dist/composites/Form/Form.mjs +1 -1
  114. package/dist/composites/Menu/Menu.cjs +2 -2
  115. package/dist/composites/Menu/Menu.mjs +2 -2
  116. package/dist/composites/Popover/Popover.cjs +1 -1
  117. package/dist/composites/Popover/Popover.mjs +1 -1
  118. package/dist/composites/SearchField/SearchField.cjs +2 -2
  119. package/dist/composites/SearchField/SearchField.mjs +2 -2
  120. package/dist/composites/TagGroup/TagGroup.cjs +2 -2
  121. package/dist/composites/TagGroup/TagGroup.mjs +2 -2
  122. package/dist/composites/TextArea/TextArea.cjs +2 -2
  123. package/dist/composites/TextArea/TextArea.mjs +2 -2
  124. package/dist/composites/TextField/TextField.cjs +2 -2
  125. package/dist/composites/TextField/TextField.mjs +2 -2
  126. package/dist/composites/Tooltip/Tooltip.cjs +1 -1
  127. package/dist/composites/Tooltip/Tooltip.mjs +1 -1
  128. package/dist/index.cjs +46 -0
  129. package/dist/index.d.cts +14 -1
  130. package/dist/index.d.mts +14 -1
  131. package/dist/index.mjs +14 -1
  132. package/llms.txt +51 -8
  133. package/package.json +4 -4
  134. package/src/tokens/CONTRACT.md +28 -10
@@ -112,7 +112,7 @@ The grouping criterion is a single discriminant question:
112
112
 
113
113
  **Stacking inside `informational`.** When two `informational` surfaces overlap (Card inside Dialog, Dialog over page, …) they may resolve to the same `background` colour. Differentiation is paid in `elevation` first, `border` second, never in colour. See [colors.md → Stacking informational surfaces](/docs/design/design-system/design-tokens/colors#stacking-informational-surfaces) for the operational rule.
114
114
 
115
- **Collection containers with Selection items (per-part entity split).** A selectable list composite (`ListBox`, `GridList`) is allowed to declare **two entities across its parts**: the container root is `Collection` (an `informational` surface — the frame that carries the items) while each selectable item is `Selection` (`input` chrome, `selected` State). The item's selection chrome is therefore identical to `Select`/`Checkbox`/`RadioGroup` (`vars.colors.input.*`), and the container reads `vars.colors.informational.*`. This is intentional and enforced-compatible: the entity→ux-context contract test unions the contexts of all entities declared in a file, so both reads are legal. See ADR-007 for the rationale.
115
+ **Collection containers with Selection items (per-part entity split).** A selectable list composite (`ListBox`, `GridList`, `Table`) is allowed to declare **two entities across its parts**: the container root is `Collection` (an `informational` surface — the frame that carries the items) while each selectable item is `Selection` (`input` chrome, `selected` State). The item's selection chrome is therefore identical to `Select`/`Checkbox`/`RadioGroup` (`vars.colors.input.*`), and the container reads `vars.colors.informational.*`. This is intentional and enforced-compatible: the entity→ux-context contract test unions the contexts of all entities declared in a file, so both reads are legal. See ADR-007 for the rationale. `Table` extends the split with two Collection parts: `TableColumn` is the `title` structural role (columnheader; sortable columns render the `action.sortAscending`/`action.sortDescending` Icon intents) and `TableCell` is `content` — the ROADMAP B2 mapping, no taxonomy addition needed.
116
116
 
117
117
  **Surface type rule** (derives all non-color columns):
118
118
 
@@ -294,13 +294,21 @@ color: resolveInteractiveStyle(c?.text, { isHovered, isPressed,
294
294
 
295
295
  | Family | Standard step | Token path |
296
296
  | ---------- | ------------- | ------------------------------------------ |
297
- | Sizing | `base` | `vars.sizing.hit.base` |
297
+ | Sizing | _(single)_ | `vars.sizing.hit` |
298
298
  | Spacing | `md` | `vars.spacing.inset.{control\|surface}.md` |
299
299
  | Typography | `md` | `vars.text.label.md` |
300
300
 
301
301
  If a design calls for a "small button", the question is: **why is it smaller semantically?**
302
302
  Is it a toolbar action? A chip? A compact selection control? Name it, give it an entity, and it gets its own fixed step.
303
303
 
304
+ > **Layout is not a control.** The "no size prop" rule governs _interactive_
305
+ > components (Entity ≠ Structure). The presentational layer — `Box`, `Grid`,
306
+ > `Container`, `Stack`, `Surface` (all Entity = `Structure`) — is the sanctioned,
307
+ > **token-constrained** escape hatch (ADR-009): its props accept only token keys
308
+ > (`padding="md"`, `columns={3}`, `maxWidth="reading"`) or layout keywords
309
+ > (`align`, `auto`/`100%`/`fit-content`), never a raw `style`/`className`/hex/px.
310
+ > Compose layouts with these instead of hand-rolling CSS.
311
+
304
312
  ---
305
313
 
306
314
  ## §5 — data-\* Attribute Convention
@@ -349,7 +357,18 @@ const valid = ENTITY_EVALUATION['Action'];
349
357
 
350
358
  ---
351
359
 
352
- ## §7 — Escape Hatches: Composite-Scoped CSS Custom Properties
360
+ ## §7 — Escape Hatches
361
+
362
+ There are **two** sanctioned escape hatches, for two different needs:
363
+
364
+ 1. **Composition → the presentational layer (ADR-009).** To arrange, pad, size,
365
+ or lightly group content, use `Box`/`Grid`/`Container`/`Stack`/`Surface`
366
+ (Entity = `Structure`). Their props are token-constrained (token keys +
367
+ layout keywords only) — this is the answer to "I need custom layout" and
368
+ replaces hand-rolled CSS. See §4.
369
+ 2. **Host geometry on composites → composite-scoped CSS custom properties.**
370
+ For host-owned geometry knobs on interactive composites (which own their
371
+ layout and expose no visual props), the single channel is described below.
353
372
 
354
373
  Composites own their layout: they expose no `style`/`className` and no
355
374
  visual props. The **single sanctioned customization channel** is a
@@ -407,7 +426,7 @@ Registered knobs:
407
426
  ## §8 — Full Example: Button (Entity = Action)
408
427
 
409
428
  `entity: 'Action'` → §1 row: colors=`action`, radii=`control`, border=`outline.control`,
410
- sizing=`hit.base`, spacing=`inset.control.md`, typography=`label.md`, motion=`feedback`, elevation=`flat`.
429
+ sizing=`hit`, spacing=`inset.control.md`, typography=`label.md`, motion=`feedback`, elevation=`flat`.
411
430
 
412
431
  ```typescript
413
432
  import { vars } from '@ttoss/fsl-theme/vars';
@@ -440,7 +459,7 @@ export const Button = ({ evaluation = 'primary', ...props }: ButtonProps) => {
440
459
  borderRadius: vars.radii.control,
441
460
  borderWidth: vars.border.outline.control.width,
442
461
  borderStyle: vars.border.outline.control.style,
443
- minHeight: vars.sizing.hit.base,
462
+ minHeight: vars.sizing.hit,
444
463
  paddingBlock: vars.spacing.inset.control.md,
445
464
  paddingInline: vars.spacing.inset.control.md,
446
465
  ...(vars.text.label.md as React.CSSProperties),
@@ -471,15 +490,14 @@ export const Button = ({ evaluation = 'primary', ...props }: ButtonProps) => {
471
490
 
472
491
  ---
473
492
 
474
- ## §9 — Icons (internal glyph layer)
493
+ ## §9 — Icons (semantic glyph layer; public since ADR-010)
475
494
 
476
495
  When a component needs a glyph (chevron, check, close, …), do **not** hardcode
477
- a unicode character or hand-author SVG. Use the internal `Icon`
478
- (`src/components/Icon/`) a semantic layer over the Iconify provider
479
- (ADR-005):
496
+ a unicode character or hand-author SVG. Use `Icon` — a semantic layer over
497
+ the Iconify provider (ADR-005; public export per ADR-010):
480
498
 
481
499
  ```typescript
482
- import { Icon } from '../Icon'; // from src/components/*; '../../components/Icon' from composites
500
+ import { Icon } from '@ttoss/fsl-ui'; // inside this package: '../Icon' from src/components/*
483
501
 
484
502
  <Icon intent="disclosure.expand" /> // named by meaning, not glyph
485
503
  <Icon intent="action.close" size="sm" /> // sm | md (default) | lg → vars.sizing.icon.*