@ttoss/fsl-ui 0.2.4 → 0.2.5

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 (117) hide show
  1. package/dist/components/AppShell/AppShell.cjs +124 -0
  2. package/dist/components/AppShell/AppShell.d.cts +74 -0
  3. package/dist/components/AppShell/AppShell.d.mts +74 -0
  4. package/dist/components/AppShell/AppShell.mjs +123 -0
  5. package/dist/components/Badge/Badge.cjs +61 -0
  6. package/dist/components/Badge/Badge.d.cts +56 -0
  7. package/dist/components/Badge/Badge.d.mts +56 -0
  8. package/dist/components/Badge/Badge.mjs +60 -0
  9. package/dist/components/Box/Box.cjs +114 -0
  10. package/dist/components/Box/Box.d.cts +115 -0
  11. package/dist/components/Box/Box.d.mts +115 -0
  12. package/dist/components/Box/Box.mjs +113 -0
  13. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
  14. package/dist/components/Breadcrumbs/Breadcrumbs.mjs +1 -1
  15. package/dist/components/Button/Button.cjs +2 -2
  16. package/dist/components/Button/Button.d.cts +2 -1
  17. package/dist/components/Button/Button.d.mts +2 -1
  18. package/dist/components/Button/Button.mjs +2 -2
  19. package/dist/components/Checkbox/Checkbox.cjs +2 -2
  20. package/dist/components/Checkbox/Checkbox.mjs +2 -2
  21. package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
  22. package/dist/components/CheckboxGroup/CheckboxGroup.mjs +1 -1
  23. package/dist/components/Code/Code.cjs +69 -0
  24. package/dist/components/Code/Code.d.cts +53 -0
  25. package/dist/components/Code/Code.d.mts +53 -0
  26. package/dist/components/Code/Code.mjs +68 -0
  27. package/dist/components/Container/Container.cjs +65 -0
  28. package/dist/components/Container/Container.d.cts +61 -0
  29. package/dist/components/Container/Container.d.mts +61 -0
  30. package/dist/components/Container/Container.mjs +64 -0
  31. package/dist/components/FileTrigger/FileTrigger.cjs +1 -1
  32. package/dist/components/FileTrigger/FileTrigger.mjs +1 -1
  33. package/dist/components/Grid/Grid.cjs +88 -0
  34. package/dist/components/Grid/Grid.d.cts +87 -0
  35. package/dist/components/Grid/Grid.d.mts +87 -0
  36. package/dist/components/Grid/Grid.mjs +87 -0
  37. package/dist/components/GridList/GridList.cjs +2 -2
  38. package/dist/components/GridList/GridList.mjs +2 -2
  39. package/dist/components/Group/Group.cjs +1 -1
  40. package/dist/components/Group/Group.mjs +1 -1
  41. package/dist/components/Heading/Heading.cjs +78 -0
  42. package/dist/components/Heading/Heading.d.cts +63 -0
  43. package/dist/components/Heading/Heading.d.mts +63 -0
  44. package/dist/components/Heading/Heading.mjs +77 -0
  45. package/dist/components/Link/Link.cjs +1 -1
  46. package/dist/components/Link/Link.mjs +1 -1
  47. package/dist/components/ListBox/ListBox.cjs +1 -1
  48. package/dist/components/ListBox/ListBox.mjs +1 -1
  49. package/dist/components/Meter/Meter.cjs +11 -1
  50. package/dist/components/Meter/Meter.mjs +11 -1
  51. package/dist/components/NumberField/NumberField.cjs +2 -2
  52. package/dist/components/NumberField/NumberField.mjs +2 -2
  53. package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
  54. package/dist/components/ProgressBar/ProgressBar.mjs +1 -1
  55. package/dist/components/RadioGroup/RadioGroup.cjs +2 -2
  56. package/dist/components/RadioGroup/RadioGroup.mjs +2 -2
  57. package/dist/components/Select/Select.cjs +2 -2
  58. package/dist/components/Select/Select.mjs +2 -2
  59. package/dist/components/Separator/Separator.cjs +1 -1
  60. package/dist/components/Separator/Separator.mjs +1 -1
  61. package/dist/components/Slider/Slider.cjs +1 -1
  62. package/dist/components/Slider/Slider.mjs +1 -1
  63. package/dist/components/Stack/Stack.cjs +89 -0
  64. package/dist/components/Stack/Stack.d.cts +75 -0
  65. package/dist/components/Stack/Stack.d.mts +75 -0
  66. package/dist/components/Stack/Stack.mjs +88 -0
  67. package/dist/components/Surface/Surface.cjs +84 -0
  68. package/dist/components/Surface/Surface.d.cts +72 -0
  69. package/dist/components/Surface/Surface.d.mts +72 -0
  70. package/dist/components/Surface/Surface.mjs +83 -0
  71. package/dist/components/Switch/Switch.cjs +3 -3
  72. package/dist/components/Switch/Switch.d.cts +1 -1
  73. package/dist/components/Switch/Switch.d.mts +1 -1
  74. package/dist/components/Switch/Switch.mjs +3 -3
  75. package/dist/components/Tabs/Tabs.cjs +1 -1
  76. package/dist/components/Tabs/Tabs.mjs +1 -1
  77. package/dist/components/Text/Text.cjs +69 -0
  78. package/dist/components/Text/Text.d.cts +84 -0
  79. package/dist/components/Text/Text.d.mts +84 -0
  80. package/dist/components/Text/Text.mjs +68 -0
  81. package/dist/components/Toast/Toast.cjs +1 -1
  82. package/dist/components/Toast/Toast.mjs +1 -1
  83. package/dist/components/ToggleButton/ToggleButton.cjs +2 -2
  84. package/dist/components/ToggleButton/ToggleButton.mjs +2 -2
  85. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.cjs +1 -1
  86. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.mjs +1 -1
  87. package/dist/components/Toolbar/Toolbar.cjs +1 -1
  88. package/dist/components/Toolbar/Toolbar.mjs +1 -1
  89. package/dist/composites/Accordion/Accordion.cjs +14 -9
  90. package/dist/composites/Accordion/Accordion.mjs +14 -9
  91. package/dist/composites/Dialog/Dialog.cjs +1 -1
  92. package/dist/composites/Dialog/Dialog.mjs +1 -1
  93. package/dist/composites/Disclosure/Disclosure.cjs +14 -9
  94. package/dist/composites/Disclosure/Disclosure.mjs +14 -9
  95. package/dist/composites/Form/Form.cjs +1 -1
  96. package/dist/composites/Form/Form.mjs +1 -1
  97. package/dist/composites/Menu/Menu.cjs +2 -2
  98. package/dist/composites/Menu/Menu.mjs +2 -2
  99. package/dist/composites/Popover/Popover.cjs +1 -1
  100. package/dist/composites/Popover/Popover.mjs +1 -1
  101. package/dist/composites/SearchField/SearchField.cjs +2 -2
  102. package/dist/composites/SearchField/SearchField.mjs +2 -2
  103. package/dist/composites/TagGroup/TagGroup.cjs +2 -2
  104. package/dist/composites/TagGroup/TagGroup.mjs +2 -2
  105. package/dist/composites/TextArea/TextArea.cjs +2 -2
  106. package/dist/composites/TextArea/TextArea.mjs +2 -2
  107. package/dist/composites/TextField/TextField.cjs +2 -2
  108. package/dist/composites/TextField/TextField.mjs +2 -2
  109. package/dist/composites/Tooltip/Tooltip.cjs +1 -1
  110. package/dist/composites/Tooltip/Tooltip.mjs +1 -1
  111. package/dist/index.cjs +30 -0
  112. package/dist/index.d.cts +11 -1
  113. package/dist/index.d.mts +11 -1
  114. package/dist/index.mjs +11 -1
  115. package/llms.txt +12 -1
  116. package/package.json +4 -4
  117. package/src/tokens/CONTRACT.md +23 -4
@@ -0,0 +1,87 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/Grid/Grid.d.ts
5
+ /** Formal semantic identity — Grid root (Structure entity, 2D layout). */
6
+ declare const gridMeta: {
7
+ readonly displayName: "Grid";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** A step of the gap scale. */
12
+ type GridGap = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ /** Track (item) alignment along an axis. */
14
+ type GridAlign = 'start' | 'center' | 'end' | 'stretch';
15
+ /**
16
+ * Minimum column width for a responsive auto-fit grid. A small named
17
+ * threshold scale (like a breakpoint), not a per-use length — the grid fits as
18
+ * many equal columns as the container allows, each at least this wide, and
19
+ * reflows the count automatically.
20
+ */
21
+ type GridMinColumnWidth = 'xs' | 'sm' | 'md' | 'lg';
22
+ /** Props for the Grid component. */
23
+ interface GridProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
24
+ /**
25
+ * Number of equal-fraction columns (`repeat(N, minmax(0, 1fr))`). A
26
+ * structural integer, not a length — there is no raw track template.
27
+ * Ignored when `minColumnWidth` is set (responsive auto-fit takes over).
28
+ * @default 1
29
+ */
30
+ columns?: number;
31
+ /**
32
+ * Make the grid **responsive**: fit as many equal columns as the container
33
+ * allows, each at least this wide, reflowing the count automatically
34
+ * (`repeat(auto-fit, minmax(…, 1fr))`). Takes a named threshold, not a
35
+ * length. When set, it overrides `columns`.
36
+ */
37
+ minColumnWidth?: GridMinColumnWidth;
38
+ /**
39
+ * Number of equal-fraction rows. Omit to let rows size to content (the
40
+ * common case); set it only for explicit row grids.
41
+ */
42
+ rows?: number;
43
+ /**
44
+ * Space between tracks (row and column), from the gap scale. There is no
45
+ * raw-length vocabulary — rhythm always comes from the scale.
46
+ * @default 'md'
47
+ */
48
+ gap?: GridGap;
49
+ /** Block-axis alignment of items within their tracks (`align-items`). @default 'stretch' */
50
+ align?: GridAlign;
51
+ /** Inline-axis alignment of items within their tracks (`justify-items`). @default 'stretch' */
52
+ justify?: GridAlign;
53
+ /** The grid items. */
54
+ children?: React.ReactNode;
55
+ }
56
+ /**
57
+ * The 2D layout primitive — a CSS grid spaced from the FSL gap scale.
58
+ *
59
+ * Entity = Structure. Use it for card grids, form field matrices, and any
60
+ * two-dimensional arrangement. `columns`/`rows` are structural integers that
61
+ * resolve to equal, overflow-safe fraction tracks; `gap` draws only from the
62
+ * named scale, so grid rhythm stays consistent across a product. For a single
63
+ * axis of flow, reach for `Stack` instead.
64
+ *
65
+ * @example
66
+ * ```tsx
67
+ * // Fixed columns
68
+ * <Grid columns={3} gap="lg">…</Grid>
69
+ * // Responsive: as many ≥16rem columns as fit, reflowing automatically
70
+ * <Grid minColumnWidth="sm" gap="lg">…</Grid>
71
+ * ```
72
+ */
73
+ declare const Grid: {
74
+ ({
75
+ columns,
76
+ minColumnWidth,
77
+ rows,
78
+ gap,
79
+ align,
80
+ justify,
81
+ children,
82
+ ...props
83
+ }: GridProps): import("react/jsx-runtime").JSX.Element;
84
+ displayName: "Grid";
85
+ };
86
+ //#endregion
87
+ export { Grid, GridAlign, GridGap, GridMinColumnWidth, GridProps, gridMeta };
@@ -0,0 +1,87 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { vars } from "@ttoss/fsl-theme/vars";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/components/Grid/Grid.tsx
6
+ /** Formal semantic identity — Grid root (Structure entity, 2D layout). */
7
+ var gridMeta = {
8
+ displayName: "Grid",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var GAP = {
13
+ xs: vars.spacing.gap.stack.xs,
14
+ sm: vars.spacing.gap.stack.sm,
15
+ md: vars.spacing.gap.stack.md,
16
+ lg: vars.spacing.gap.stack.lg,
17
+ xl: vars.spacing.gap.stack.xl
18
+ };
19
+ var MIN_COLUMN_WIDTH = {
20
+ xs: "12rem",
21
+ sm: "16rem",
22
+ md: "20rem",
23
+ lg: "24rem"
24
+ };
25
+ var ALIGN = {
26
+ start: "start",
27
+ center: "center",
28
+ end: "end",
29
+ stretch: "stretch"
30
+ };
31
+ /** Equal-fraction track template with an overflow-safe minimum. */
32
+ var tracks = count => {
33
+ return `repeat(${count}, minmax(0, 1fr))`;
34
+ };
35
+ /** Responsive auto-fit template — as many ≥`min`-wide columns as fit. */
36
+ var autoTracks = min => {
37
+ return `repeat(auto-fit, minmax(min(100%, ${MIN_COLUMN_WIDTH[min]}), 1fr))`;
38
+ };
39
+ /**
40
+ * The 2D layout primitive — a CSS grid spaced from the FSL gap scale.
41
+ *
42
+ * Entity = Structure. Use it for card grids, form field matrices, and any
43
+ * two-dimensional arrangement. `columns`/`rows` are structural integers that
44
+ * resolve to equal, overflow-safe fraction tracks; `gap` draws only from the
45
+ * named scale, so grid rhythm stays consistent across a product. For a single
46
+ * axis of flow, reach for `Stack` instead.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * // Fixed columns
51
+ * <Grid columns={3} gap="lg">…</Grid>
52
+ * // Responsive: as many ≥16rem columns as fit, reflowing automatically
53
+ * <Grid minColumnWidth="sm" gap="lg">…</Grid>
54
+ * ```
55
+ */
56
+ var Grid = ({
57
+ columns = 1,
58
+ minColumnWidth,
59
+ rows,
60
+ gap = "md",
61
+ align = "stretch",
62
+ justify = "stretch",
63
+ children,
64
+ ...props
65
+ }) => {
66
+ const templateColumns = minColumnWidth === void 0 ? tracks(columns) : autoTracks(minColumnWidth);
67
+ return /* @__PURE__ */jsx("div", {
68
+ ...props,
69
+ "data-scope": "grid",
70
+ "data-part": "root",
71
+ "data-columns": minColumnWidth === void 0 ? columns : "auto",
72
+ "data-gap": gap,
73
+ style: {
74
+ display: "grid",
75
+ gridTemplateColumns: templateColumns,
76
+ gridTemplateRows: rows === void 0 ? void 0 : tracks(rows),
77
+ gap: GAP[gap],
78
+ alignItems: ALIGN[align],
79
+ justifyItems: ALIGN[justify]
80
+ },
81
+ children
82
+ });
83
+ };
84
+ Grid.displayName = gridMeta.displayName;
85
+
86
+ //#endregion
87
+ export { Grid, gridMeta };
@@ -3,8 +3,8 @@ const require_focusRing = require('../../tokens/focusRing.cjs');
3
3
  const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
4
4
  const require_Icon = require('../Icon/Icon.cjs');
5
5
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
6
- let react_aria_components = require("react-aria-components");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let react_aria_components = require("react-aria-components");
8
8
 
9
9
  //#region src/components/GridList/GridList.tsx
10
10
  /** Formal semantic identity — GridList root (Collection entity, surface). */
@@ -33,7 +33,7 @@ var buildRowStyle = ({
33
33
  display: "flex",
34
34
  alignItems: "center",
35
35
  gap: _ttoss_fsl_theme_vars.vars.spacing.gap.inline.sm,
36
- minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
36
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit,
37
37
  paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
38
38
  paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
39
39
  borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
@@ -3,8 +3,8 @@ import { focusRingOutline } from "../../tokens/focusRing.mjs";
3
3
  import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
4
4
  import { Icon } from "../Icon/Icon.mjs";
5
5
  import { vars } from "@ttoss/fsl-theme/vars";
6
- import { Checkbox, GridList, GridListItem } from "react-aria-components";
7
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Checkbox, GridList, GridListItem } from "react-aria-components";
8
8
 
9
9
  //#region src/components/GridList/GridList.tsx
10
10
  /** Formal semantic identity — GridList root (Collection entity, surface). */
@@ -33,7 +33,7 @@ var buildRowStyle = ({
33
33
  display: "flex",
34
34
  alignItems: "center",
35
35
  gap: vars.spacing.gap.inline.sm,
36
- minHeight: vars.sizing.hit.base,
36
+ minHeight: vars.sizing.hit,
37
37
  paddingBlock: vars.spacing.inset.control.sm,
38
38
  paddingInline: vars.spacing.inset.control.md,
39
39
  borderRadius: vars.radii.control,
@@ -1,8 +1,8 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
4
- let react_aria_components = require("react-aria-components");
5
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
+ let react_aria_components = require("react-aria-components");
6
6
  let react = require("react");
7
7
  react = require_runtime.__toESM(react);
8
8
 
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import { vars } from "@ttoss/fsl-theme/vars";
3
- import { Group } from "react-aria-components";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Group } from "react-aria-components";
5
5
  import * as React from "react";
6
6
 
7
7
  //#region src/components/Group/Group.tsx
@@ -0,0 +1,78 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+
5
+ //#region src/components/Heading/Heading.tsx
6
+ /** Formal semantic identity — Heading root (Structure entity, heading text). */
7
+ var headingMeta = {
8
+ displayName: "Heading",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ /** Typography token per heading size — the scale reaches the DOM only here. */
13
+ var TYPE_BY_SIZE = {
14
+ "display-lg": _ttoss_fsl_theme_vars.vars.text.display.lg,
15
+ "display-md": _ttoss_fsl_theme_vars.vars.text.display.md,
16
+ "display-sm": _ttoss_fsl_theme_vars.vars.text.display.sm,
17
+ "headline-lg": _ttoss_fsl_theme_vars.vars.text.headline.lg,
18
+ "headline-md": _ttoss_fsl_theme_vars.vars.text.headline.md,
19
+ "headline-sm": _ttoss_fsl_theme_vars.vars.text.headline.sm,
20
+ "title-lg": _ttoss_fsl_theme_vars.vars.text.title.lg,
21
+ "title-md": _ttoss_fsl_theme_vars.vars.text.title.md,
22
+ "title-sm": _ttoss_fsl_theme_vars.vars.text.title.sm
23
+ };
24
+ /**
25
+ * Default visual size per rank. Rank drives document structure (a11y); `size`
26
+ * can override the visual step independently so heading order stays correct
27
+ * even when the design wants a smaller-looking `<h2>`.
28
+ */
29
+ var DEFAULT_SIZE_BY_LEVEL = {
30
+ 1: "headline-lg",
31
+ 2: "headline-md",
32
+ 3: "title-lg",
33
+ 4: "title-md",
34
+ 5: "title-sm",
35
+ 6: "title-sm"
36
+ };
37
+ /**
38
+ * A document heading bound to the FSL type scale.
39
+ *
40
+ * Entity = Structure. `level` sets the `<h1>`…`<h6>` element (structure and
41
+ * accessibility); `size` optionally overrides the visual step. There is no way
42
+ * to pass a raw font size — the scale is the only vocabulary — which is how the
43
+ * theme's typography reaches the screen consistently. Colour is inherited from
44
+ * the surrounding surface.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Heading level={1}>Billing</Heading>
49
+ * <Heading level={2} size="title-md">Payment methods</Heading>
50
+ * ```
51
+ */
52
+ var Heading = ({
53
+ level,
54
+ size,
55
+ align = "start",
56
+ children,
57
+ ...props
58
+ }) => {
59
+ const resolvedSize = size ?? DEFAULT_SIZE_BY_LEVEL[level];
60
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(`h${level}`, {
61
+ ...props,
62
+ "data-scope": "heading",
63
+ "data-part": "root",
64
+ "data-size": resolvedSize,
65
+ style: {
66
+ margin: 0,
67
+ color: "inherit",
68
+ textAlign: align,
69
+ ...TYPE_BY_SIZE[resolvedSize]
70
+ },
71
+ children
72
+ });
73
+ };
74
+ Heading.displayName = headingMeta.displayName;
75
+
76
+ //#endregion
77
+ exports.Heading = Heading;
78
+ exports.headingMeta = headingMeta;
@@ -0,0 +1,63 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/Heading/Heading.d.ts
5
+ /** Formal semantic identity — Heading root (Structure entity, heading text). */
6
+ declare const headingMeta: {
7
+ readonly displayName: "Heading";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Heading rank — sets the rendered `<h1>`…`<h6>` element and the default size. */
12
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
13
+ /** Inline heading alignment. */
14
+ type HeadingAlign = 'start' | 'center' | 'end';
15
+ /** A step of the heading type scale (`{family}-{step}`). */
16
+ type HeadingSize = 'display-lg' | 'display-md' | 'display-sm' | 'headline-lg' | 'headline-md' | 'headline-sm' | 'title-lg' | 'title-md' | 'title-sm';
17
+ /** Props for the Heading component. */
18
+ interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'style' | 'className'> {
19
+ /**
20
+ * Heading rank — renders the matching `<h1>`…`<h6>`. Choose it for document
21
+ * structure and screen-reader navigation, not for visual size.
22
+ */
23
+ level: HeadingLevel;
24
+ /**
25
+ * Visual size from the heading type scale, overriding the rank's default.
26
+ * Use it to decouple appearance from rank (e.g. a visually small `<h2>`).
27
+ */
28
+ size?: HeadingSize;
29
+ /**
30
+ * Inline alignment (`text-align`). A layout keyword, not a design token.
31
+ * @default 'start'
32
+ */
33
+ align?: HeadingAlign;
34
+ /** The heading text. */
35
+ children?: React.ReactNode;
36
+ }
37
+ /**
38
+ * A document heading bound to the FSL type scale.
39
+ *
40
+ * Entity = Structure. `level` sets the `<h1>`…`<h6>` element (structure and
41
+ * accessibility); `size` optionally overrides the visual step. There is no way
42
+ * to pass a raw font size — the scale is the only vocabulary — which is how the
43
+ * theme's typography reaches the screen consistently. Colour is inherited from
44
+ * the surrounding surface.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Heading level={1}>Billing</Heading>
49
+ * <Heading level={2} size="title-md">Payment methods</Heading>
50
+ * ```
51
+ */
52
+ declare const Heading: {
53
+ ({
54
+ level,
55
+ size,
56
+ align,
57
+ children,
58
+ ...props
59
+ }: HeadingProps): import("react/jsx-runtime").JSX.Element;
60
+ displayName: "Heading";
61
+ };
62
+ //#endregion
63
+ export { Heading, HeadingAlign, HeadingLevel, HeadingProps, HeadingSize, headingMeta };
@@ -0,0 +1,63 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/Heading/Heading.d.ts
5
+ /** Formal semantic identity — Heading root (Structure entity, heading text). */
6
+ declare const headingMeta: {
7
+ readonly displayName: "Heading";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Heading rank — sets the rendered `<h1>`…`<h6>` element and the default size. */
12
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
13
+ /** Inline heading alignment. */
14
+ type HeadingAlign = 'start' | 'center' | 'end';
15
+ /** A step of the heading type scale (`{family}-{step}`). */
16
+ type HeadingSize = 'display-lg' | 'display-md' | 'display-sm' | 'headline-lg' | 'headline-md' | 'headline-sm' | 'title-lg' | 'title-md' | 'title-sm';
17
+ /** Props for the Heading component. */
18
+ interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'style' | 'className'> {
19
+ /**
20
+ * Heading rank — renders the matching `<h1>`…`<h6>`. Choose it for document
21
+ * structure and screen-reader navigation, not for visual size.
22
+ */
23
+ level: HeadingLevel;
24
+ /**
25
+ * Visual size from the heading type scale, overriding the rank's default.
26
+ * Use it to decouple appearance from rank (e.g. a visually small `<h2>`).
27
+ */
28
+ size?: HeadingSize;
29
+ /**
30
+ * Inline alignment (`text-align`). A layout keyword, not a design token.
31
+ * @default 'start'
32
+ */
33
+ align?: HeadingAlign;
34
+ /** The heading text. */
35
+ children?: React.ReactNode;
36
+ }
37
+ /**
38
+ * A document heading bound to the FSL type scale.
39
+ *
40
+ * Entity = Structure. `level` sets the `<h1>`…`<h6>` element (structure and
41
+ * accessibility); `size` optionally overrides the visual step. There is no way
42
+ * to pass a raw font size — the scale is the only vocabulary — which is how the
43
+ * theme's typography reaches the screen consistently. Colour is inherited from
44
+ * the surrounding surface.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Heading level={1}>Billing</Heading>
49
+ * <Heading level={2} size="title-md">Payment methods</Heading>
50
+ * ```
51
+ */
52
+ declare const Heading: {
53
+ ({
54
+ level,
55
+ size,
56
+ align,
57
+ children,
58
+ ...props
59
+ }: HeadingProps): import("react/jsx-runtime").JSX.Element;
60
+ displayName: "Heading";
61
+ };
62
+ //#endregion
63
+ export { Heading, HeadingAlign, HeadingLevel, HeadingProps, HeadingSize, headingMeta };
@@ -0,0 +1,77 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { vars } from "@ttoss/fsl-theme/vars";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/components/Heading/Heading.tsx
6
+ /** Formal semantic identity — Heading root (Structure entity, heading text). */
7
+ var headingMeta = {
8
+ displayName: "Heading",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ /** Typography token per heading size — the scale reaches the DOM only here. */
13
+ var TYPE_BY_SIZE = {
14
+ "display-lg": vars.text.display.lg,
15
+ "display-md": vars.text.display.md,
16
+ "display-sm": vars.text.display.sm,
17
+ "headline-lg": vars.text.headline.lg,
18
+ "headline-md": vars.text.headline.md,
19
+ "headline-sm": vars.text.headline.sm,
20
+ "title-lg": vars.text.title.lg,
21
+ "title-md": vars.text.title.md,
22
+ "title-sm": vars.text.title.sm
23
+ };
24
+ /**
25
+ * Default visual size per rank. Rank drives document structure (a11y); `size`
26
+ * can override the visual step independently so heading order stays correct
27
+ * even when the design wants a smaller-looking `<h2>`.
28
+ */
29
+ var DEFAULT_SIZE_BY_LEVEL = {
30
+ 1: "headline-lg",
31
+ 2: "headline-md",
32
+ 3: "title-lg",
33
+ 4: "title-md",
34
+ 5: "title-sm",
35
+ 6: "title-sm"
36
+ };
37
+ /**
38
+ * A document heading bound to the FSL type scale.
39
+ *
40
+ * Entity = Structure. `level` sets the `<h1>`…`<h6>` element (structure and
41
+ * accessibility); `size` optionally overrides the visual step. There is no way
42
+ * to pass a raw font size — the scale is the only vocabulary — which is how the
43
+ * theme's typography reaches the screen consistently. Colour is inherited from
44
+ * the surrounding surface.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Heading level={1}>Billing</Heading>
49
+ * <Heading level={2} size="title-md">Payment methods</Heading>
50
+ * ```
51
+ */
52
+ var Heading = ({
53
+ level,
54
+ size,
55
+ align = "start",
56
+ children,
57
+ ...props
58
+ }) => {
59
+ const resolvedSize = size ?? DEFAULT_SIZE_BY_LEVEL[level];
60
+ return /* @__PURE__ */jsx(`h${level}`, {
61
+ ...props,
62
+ "data-scope": "heading",
63
+ "data-part": "root",
64
+ "data-size": resolvedSize,
65
+ style: {
66
+ margin: 0,
67
+ color: "inherit",
68
+ textAlign: align,
69
+ ...TYPE_BY_SIZE[resolvedSize]
70
+ },
71
+ children
72
+ });
73
+ };
74
+ Heading.displayName = headingMeta.displayName;
75
+
76
+ //#endregion
77
+ export { Heading, headingMeta };
@@ -2,8 +2,8 @@
2
2
  const require_focusRing = require('../../tokens/focusRing.cjs');
3
3
  const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
4
4
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
5
- let react_aria_components = require("react-aria-components");
6
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let react_aria_components = require("react-aria-components");
7
7
 
8
8
  //#region src/components/Link/Link.tsx
9
9
  /**
@@ -2,8 +2,8 @@
2
2
  import { focusRingOutline } from "../../tokens/focusRing.mjs";
3
3
  import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
4
4
  import { vars } from "@ttoss/fsl-theme/vars";
5
- import { Link } from "react-aria-components";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { Link } from "react-aria-components";
7
7
 
8
8
  //#region src/components/Link/Link.tsx
9
9
  /**
@@ -2,8 +2,8 @@
2
2
  const require_focusRing = require('../../tokens/focusRing.cjs');
3
3
  const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
4
4
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
5
- let react_aria_components = require("react-aria-components");
6
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let react_aria_components = require("react-aria-components");
7
7
 
8
8
  //#region src/components/ListBox/ListBox.tsx
9
9
  /** Formal semantic identity — ListBox root (Collection entity, surface). */
@@ -2,8 +2,8 @@
2
2
  import { focusRingOutline } from "../../tokens/focusRing.mjs";
3
3
  import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
4
4
  import { vars } from "@ttoss/fsl-theme/vars";
5
- import { ListBox, ListBoxItem } from "react-aria-components";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { ListBox, ListBoxItem } from "react-aria-components";
7
7
 
8
8
  //#region src/components/ListBox/ListBox.tsx
9
9
  /** Formal semantic identity — ListBox root (Collection entity, surface). */
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
3
- let react_aria_components = require("react-aria-components");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
+ let react_aria_components = require("react-aria-components");
5
5
 
6
6
  //#region src/components/Meter/Meter.tsx
7
7
  /** Formal semantic identity — Meter root (Feedback entity). */
@@ -89,17 +89,27 @@ var Meter = ({
89
89
  display: "flex",
90
90
  justifyContent: "space-between",
91
91
  alignItems: "baseline",
92
+ gap: _ttoss_fsl_theme_vars.vars.spacing.gap.inline.sm,
92
93
  color: c?.text?.default,
93
94
  ..._ttoss_fsl_theme_vars.vars.text.label.md
94
95
  },
95
96
  children: [/* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
96
97
  "data-scope": "meter",
97
98
  "data-part": "title",
99
+ style: {
100
+ minInlineSize: 0,
101
+ overflow: "hidden",
102
+ textOverflow: "ellipsis",
103
+ whiteSpace: "nowrap"
104
+ },
98
105
  children: label
99
106
  }), showValueLabel && /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
100
107
  "data-scope": "meter",
101
108
  "data-part": "status",
102
109
  "aria-hidden": true,
110
+ style: {
111
+ flex: "none"
112
+ },
103
113
  children: valueText ?? `${Math.round(percentage)}%`
104
114
  })]
105
115
  }), /* @__PURE__ */(0, react_jsx_runtime.jsx)("div", {
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import { vars } from "@ttoss/fsl-theme/vars";
3
- import { Meter } from "react-aria-components";
4
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Meter } from "react-aria-components";
5
5
 
6
6
  //#region src/components/Meter/Meter.tsx
7
7
  /** Formal semantic identity — Meter root (Feedback entity). */
@@ -89,17 +89,27 @@ var Meter$1 = ({
89
89
  display: "flex",
90
90
  justifyContent: "space-between",
91
91
  alignItems: "baseline",
92
+ gap: vars.spacing.gap.inline.sm,
92
93
  color: c?.text?.default,
93
94
  ...vars.text.label.md
94
95
  },
95
96
  children: [/* @__PURE__ */jsx("span", {
96
97
  "data-scope": "meter",
97
98
  "data-part": "title",
99
+ style: {
100
+ minInlineSize: 0,
101
+ overflow: "hidden",
102
+ textOverflow: "ellipsis",
103
+ whiteSpace: "nowrap"
104
+ },
98
105
  children: label
99
106
  }), showValueLabel && /* @__PURE__ */jsx("span", {
100
107
  "data-scope": "meter",
101
108
  "data-part": "status",
102
109
  "aria-hidden": true,
110
+ style: {
111
+ flex: "none"
112
+ },
103
113
  children: valueText ?? `${Math.round(percentage)}%`
104
114
  })]
105
115
  }), /* @__PURE__ */jsx("div", {
@@ -3,8 +3,8 @@ const require_focusRing = require('../../tokens/focusRing.cjs');
3
3
  const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
4
4
  const require_Icon = require('../Icon/Icon.cjs');
5
5
  let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
6
- let react_aria_components = require("react-aria-components");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let react_aria_components = require("react-aria-components");
8
8
 
9
9
  //#region src/components/NumberField/NumberField.tsx
10
10
  /** Formal semantic identity — NumberField root (Input entity). */
@@ -24,7 +24,7 @@ var buildControlBoxStyle = ({
24
24
  boxSizing: "border-box",
25
25
  display: "inline-flex",
26
26
  alignItems: "center",
27
- minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
27
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit,
28
28
  borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
29
29
  borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.control.width,
30
30
  borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style,