@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
@@ -0,0 +1,114 @@
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/Box/Box.tsx
6
+ /** Formal semantic identity — Box root (Structure entity, generic container). */
7
+ var boxMeta = {
8
+ displayName: "Box",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var PADDING = {
13
+ none: "0",
14
+ sm: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.sm,
15
+ md: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.md,
16
+ lg: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.lg
17
+ };
18
+ var BACKGROUND = {
19
+ none: "transparent",
20
+ primary: _ttoss_fsl_theme_vars.vars.colors.informational.primary.background?.default,
21
+ muted: _ttoss_fsl_theme_vars.vars.colors.informational.muted.background?.default
22
+ };
23
+ var RADIUS = {
24
+ none: "0",
25
+ control: _ttoss_fsl_theme_vars.vars.radii.control,
26
+ surface: _ttoss_fsl_theme_vars.vars.radii.surface,
27
+ round: _ttoss_fsl_theme_vars.vars.radii.round
28
+ };
29
+ var BORDER_COLOR = {
30
+ muted: _ttoss_fsl_theme_vars.vars.colors.informational.muted.border?.default,
31
+ strong: _ttoss_fsl_theme_vars.vars.colors.informational.primary.border?.default
32
+ };
33
+ var WIDTH = {
34
+ auto: "auto",
35
+ full: "100%",
36
+ fit: "fit-content"
37
+ };
38
+ var MAX_WIDTH = {
39
+ none: void 0,
40
+ surface: _ttoss_fsl_theme_vars.vars.sizing.surface.maxWidth,
41
+ reading: _ttoss_fsl_theme_vars.vars.sizing.measure.reading
42
+ };
43
+ /** Border longhands for the chosen emphasis; all-`undefined` when `none`. */
44
+ var borderStyleFor = border => {
45
+ if (border === "none") return {};
46
+ return {
47
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
48
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
49
+ borderColor: BORDER_COLOR[border]
50
+ };
51
+ };
52
+ /** Flex-item growth: fill the main axis and allow shrinking past content. */
53
+ var growStyle = grow => {
54
+ return grow ? {
55
+ flexGrow: 1,
56
+ minWidth: 0
57
+ } : {};
58
+ };
59
+ /**
60
+ * The token-constrained escape hatch — a generic block container (D1 / ADR-009).
61
+ *
62
+ * Entity = Structure. Reach for Box when you need a one-off padded, sized, or
63
+ * lightly-grouped region that is not a flex/grid layout (`Stack`/`Grid`) and
64
+ * not a depth-bearing card (`Surface`). Every prop accepts only a **token key**
65
+ * — `padding="md"`, `background="muted"`, `radius="surface"`, `maxWidth="reading"`
66
+ * — so a layout can be composed expressively while no arbitrary hex/px value can
67
+ * enter the consumer. There is no `style` or `className`.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * // A centered, width-constrained reading column
72
+ * <Stack align="center">
73
+ * <Box maxWidth="reading" padding="lg">
74
+ * <Text>Long-form content…</Text>
75
+ * </Box>
76
+ * </Stack>
77
+ * ```
78
+ */
79
+ var Box = ({
80
+ padding = "none",
81
+ paddingBlock,
82
+ paddingInline,
83
+ background = "none",
84
+ radius = "none",
85
+ border = "none",
86
+ width = "auto",
87
+ maxWidth = "none",
88
+ grow = false,
89
+ children,
90
+ ...props
91
+ }) => {
92
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)("div", {
93
+ ...props,
94
+ "data-scope": "box",
95
+ "data-part": "root",
96
+ style: {
97
+ boxSizing: "border-box",
98
+ paddingBlock: PADDING[paddingBlock ?? padding],
99
+ paddingInline: PADDING[paddingInline ?? padding],
100
+ background: BACKGROUND[background],
101
+ borderRadius: RADIUS[radius],
102
+ ...borderStyleFor(border),
103
+ width: WIDTH[width],
104
+ maxWidth: MAX_WIDTH[maxWidth],
105
+ ...growStyle(grow)
106
+ },
107
+ children
108
+ });
109
+ };
110
+ Box.displayName = boxMeta.displayName;
111
+
112
+ //#endregion
113
+ exports.Box = Box;
114
+ exports.boxMeta = boxMeta;
@@ -0,0 +1,115 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/Box/Box.d.ts
5
+ /** Formal semantic identity — Box root (Structure entity, generic container). */
6
+ declare const boxMeta: {
7
+ readonly displayName: "Box";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Padding step drawn from the surface inset scale (`none` collapses to zero). */
12
+ type BoxPadding = 'none' | 'sm' | 'md' | 'lg';
13
+ /** Background from the informational surface palette (`none` is transparent). */
14
+ type BoxBackground = 'none' | 'primary' | 'muted';
15
+ /** Corner radius from the semantic radii scale. */
16
+ type BoxRadius = 'none' | 'control' | 'surface' | 'round';
17
+ /** Hairline boundary emphasis (`none` draws no edge). */
18
+ type BoxBorder = 'none' | 'muted' | 'strong';
19
+ /** Inline size (`width`) from the sizing behavior keywords. */
20
+ type BoxWidth = 'auto' | 'full' | 'fit';
21
+ /** Maximum inline size — a structural surface cap or the readability measure. */
22
+ type BoxMaxWidth = 'none' | 'surface' | 'reading';
23
+ /** Props for the Box component. */
24
+ interface BoxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
25
+ /**
26
+ * Padding on both axes, from the surface inset scale. Overridden per-axis by
27
+ * `paddingBlock` / `paddingInline` when those are set.
28
+ * @default 'none'
29
+ */
30
+ padding?: BoxPadding;
31
+ /** Block-axis (top/bottom) padding from the surface inset scale. */
32
+ paddingBlock?: BoxPadding;
33
+ /** Inline-axis (start/end) padding from the surface inset scale. */
34
+ paddingInline?: BoxPadding;
35
+ /**
36
+ * Background from the informational surface palette. `none` is transparent —
37
+ * Box adds no surface colour unless asked (that is `Surface`'s job).
38
+ * @default 'none'
39
+ */
40
+ background?: BoxBackground;
41
+ /**
42
+ * Corner radius from the semantic radii scale.
43
+ * @default 'none'
44
+ */
45
+ radius?: BoxRadius;
46
+ /**
47
+ * Hairline boundary emphasis, drawn with the surface outline width/style.
48
+ * `muted` is the quiet informational edge; `strong` a firmer one; `none`
49
+ * draws no border.
50
+ * @default 'none'
51
+ */
52
+ border?: BoxBorder;
53
+ /**
54
+ * Inline size (`width`) from the sizing behavior keywords.
55
+ * @default 'auto'
56
+ */
57
+ width?: BoxWidth;
58
+ /**
59
+ * Maximum inline size. `surface` caps at the structural surface width;
60
+ * `reading` caps at the readability measure (long-form text). Pair with
61
+ * `marginInline` centering via a parent `Stack`/`Grid` — Box does not center
62
+ * itself.
63
+ * @default 'none'
64
+ */
65
+ maxWidth?: BoxMaxWidth;
66
+ /**
67
+ * Let the Box grow to fill the free space along a flex parent's main axis
68
+ * (`flex-grow: 1`, with `min-width: 0` so it can also shrink past its
69
+ * content). Use it inside a horizontal `Stack` to make one child — a field,
70
+ * an input — take the remaining width. A structural flex behaviour, not a
71
+ * length.
72
+ * @default false
73
+ */
74
+ grow?: boolean;
75
+ /** The Box's content. */
76
+ children?: React.ReactNode;
77
+ }
78
+ /**
79
+ * The token-constrained escape hatch — a generic block container (D1 / ADR-009).
80
+ *
81
+ * Entity = Structure. Reach for Box when you need a one-off padded, sized, or
82
+ * lightly-grouped region that is not a flex/grid layout (`Stack`/`Grid`) and
83
+ * not a depth-bearing card (`Surface`). Every prop accepts only a **token key**
84
+ * — `padding="md"`, `background="muted"`, `radius="surface"`, `maxWidth="reading"`
85
+ * — so a layout can be composed expressively while no arbitrary hex/px value can
86
+ * enter the consumer. There is no `style` or `className`.
87
+ *
88
+ * @example
89
+ * ```tsx
90
+ * // A centered, width-constrained reading column
91
+ * <Stack align="center">
92
+ * <Box maxWidth="reading" padding="lg">
93
+ * <Text>Long-form content…</Text>
94
+ * </Box>
95
+ * </Stack>
96
+ * ```
97
+ */
98
+ declare const Box: {
99
+ ({
100
+ padding,
101
+ paddingBlock,
102
+ paddingInline,
103
+ background,
104
+ radius,
105
+ border,
106
+ width,
107
+ maxWidth,
108
+ grow,
109
+ children,
110
+ ...props
111
+ }: BoxProps): import("react/jsx-runtime").JSX.Element;
112
+ displayName: "Box";
113
+ };
114
+ //#endregion
115
+ export { Box, BoxBackground, BoxBorder, BoxMaxWidth, BoxPadding, BoxProps, BoxRadius, BoxWidth, boxMeta };
@@ -0,0 +1,115 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/Box/Box.d.ts
5
+ /** Formal semantic identity — Box root (Structure entity, generic container). */
6
+ declare const boxMeta: {
7
+ readonly displayName: "Box";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Padding step drawn from the surface inset scale (`none` collapses to zero). */
12
+ type BoxPadding = 'none' | 'sm' | 'md' | 'lg';
13
+ /** Background from the informational surface palette (`none` is transparent). */
14
+ type BoxBackground = 'none' | 'primary' | 'muted';
15
+ /** Corner radius from the semantic radii scale. */
16
+ type BoxRadius = 'none' | 'control' | 'surface' | 'round';
17
+ /** Hairline boundary emphasis (`none` draws no edge). */
18
+ type BoxBorder = 'none' | 'muted' | 'strong';
19
+ /** Inline size (`width`) from the sizing behavior keywords. */
20
+ type BoxWidth = 'auto' | 'full' | 'fit';
21
+ /** Maximum inline size — a structural surface cap or the readability measure. */
22
+ type BoxMaxWidth = 'none' | 'surface' | 'reading';
23
+ /** Props for the Box component. */
24
+ interface BoxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
25
+ /**
26
+ * Padding on both axes, from the surface inset scale. Overridden per-axis by
27
+ * `paddingBlock` / `paddingInline` when those are set.
28
+ * @default 'none'
29
+ */
30
+ padding?: BoxPadding;
31
+ /** Block-axis (top/bottom) padding from the surface inset scale. */
32
+ paddingBlock?: BoxPadding;
33
+ /** Inline-axis (start/end) padding from the surface inset scale. */
34
+ paddingInline?: BoxPadding;
35
+ /**
36
+ * Background from the informational surface palette. `none` is transparent —
37
+ * Box adds no surface colour unless asked (that is `Surface`'s job).
38
+ * @default 'none'
39
+ */
40
+ background?: BoxBackground;
41
+ /**
42
+ * Corner radius from the semantic radii scale.
43
+ * @default 'none'
44
+ */
45
+ radius?: BoxRadius;
46
+ /**
47
+ * Hairline boundary emphasis, drawn with the surface outline width/style.
48
+ * `muted` is the quiet informational edge; `strong` a firmer one; `none`
49
+ * draws no border.
50
+ * @default 'none'
51
+ */
52
+ border?: BoxBorder;
53
+ /**
54
+ * Inline size (`width`) from the sizing behavior keywords.
55
+ * @default 'auto'
56
+ */
57
+ width?: BoxWidth;
58
+ /**
59
+ * Maximum inline size. `surface` caps at the structural surface width;
60
+ * `reading` caps at the readability measure (long-form text). Pair with
61
+ * `marginInline` centering via a parent `Stack`/`Grid` — Box does not center
62
+ * itself.
63
+ * @default 'none'
64
+ */
65
+ maxWidth?: BoxMaxWidth;
66
+ /**
67
+ * Let the Box grow to fill the free space along a flex parent's main axis
68
+ * (`flex-grow: 1`, with `min-width: 0` so it can also shrink past its
69
+ * content). Use it inside a horizontal `Stack` to make one child — a field,
70
+ * an input — take the remaining width. A structural flex behaviour, not a
71
+ * length.
72
+ * @default false
73
+ */
74
+ grow?: boolean;
75
+ /** The Box's content. */
76
+ children?: React.ReactNode;
77
+ }
78
+ /**
79
+ * The token-constrained escape hatch — a generic block container (D1 / ADR-009).
80
+ *
81
+ * Entity = Structure. Reach for Box when you need a one-off padded, sized, or
82
+ * lightly-grouped region that is not a flex/grid layout (`Stack`/`Grid`) and
83
+ * not a depth-bearing card (`Surface`). Every prop accepts only a **token key**
84
+ * — `padding="md"`, `background="muted"`, `radius="surface"`, `maxWidth="reading"`
85
+ * — so a layout can be composed expressively while no arbitrary hex/px value can
86
+ * enter the consumer. There is no `style` or `className`.
87
+ *
88
+ * @example
89
+ * ```tsx
90
+ * // A centered, width-constrained reading column
91
+ * <Stack align="center">
92
+ * <Box maxWidth="reading" padding="lg">
93
+ * <Text>Long-form content…</Text>
94
+ * </Box>
95
+ * </Stack>
96
+ * ```
97
+ */
98
+ declare const Box: {
99
+ ({
100
+ padding,
101
+ paddingBlock,
102
+ paddingInline,
103
+ background,
104
+ radius,
105
+ border,
106
+ width,
107
+ maxWidth,
108
+ grow,
109
+ children,
110
+ ...props
111
+ }: BoxProps): import("react/jsx-runtime").JSX.Element;
112
+ displayName: "Box";
113
+ };
114
+ //#endregion
115
+ export { Box, BoxBackground, BoxBorder, BoxMaxWidth, BoxPadding, BoxProps, BoxRadius, BoxWidth, boxMeta };
@@ -0,0 +1,113 @@
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/Box/Box.tsx
6
+ /** Formal semantic identity — Box root (Structure entity, generic container). */
7
+ var boxMeta = {
8
+ displayName: "Box",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var PADDING = {
13
+ none: "0",
14
+ sm: vars.spacing.inset.surface.sm,
15
+ md: vars.spacing.inset.surface.md,
16
+ lg: vars.spacing.inset.surface.lg
17
+ };
18
+ var BACKGROUND = {
19
+ none: "transparent",
20
+ primary: vars.colors.informational.primary.background?.default,
21
+ muted: vars.colors.informational.muted.background?.default
22
+ };
23
+ var RADIUS = {
24
+ none: "0",
25
+ control: vars.radii.control,
26
+ surface: vars.radii.surface,
27
+ round: vars.radii.round
28
+ };
29
+ var BORDER_COLOR = {
30
+ muted: vars.colors.informational.muted.border?.default,
31
+ strong: vars.colors.informational.primary.border?.default
32
+ };
33
+ var WIDTH = {
34
+ auto: "auto",
35
+ full: "100%",
36
+ fit: "fit-content"
37
+ };
38
+ var MAX_WIDTH = {
39
+ none: void 0,
40
+ surface: vars.sizing.surface.maxWidth,
41
+ reading: vars.sizing.measure.reading
42
+ };
43
+ /** Border longhands for the chosen emphasis; all-`undefined` when `none`. */
44
+ var borderStyleFor = border => {
45
+ if (border === "none") return {};
46
+ return {
47
+ borderWidth: vars.border.outline.surface.width,
48
+ borderStyle: vars.border.outline.surface.style,
49
+ borderColor: BORDER_COLOR[border]
50
+ };
51
+ };
52
+ /** Flex-item growth: fill the main axis and allow shrinking past content. */
53
+ var growStyle = grow => {
54
+ return grow ? {
55
+ flexGrow: 1,
56
+ minWidth: 0
57
+ } : {};
58
+ };
59
+ /**
60
+ * The token-constrained escape hatch — a generic block container (D1 / ADR-009).
61
+ *
62
+ * Entity = Structure. Reach for Box when you need a one-off padded, sized, or
63
+ * lightly-grouped region that is not a flex/grid layout (`Stack`/`Grid`) and
64
+ * not a depth-bearing card (`Surface`). Every prop accepts only a **token key**
65
+ * — `padding="md"`, `background="muted"`, `radius="surface"`, `maxWidth="reading"`
66
+ * — so a layout can be composed expressively while no arbitrary hex/px value can
67
+ * enter the consumer. There is no `style` or `className`.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * // A centered, width-constrained reading column
72
+ * <Stack align="center">
73
+ * <Box maxWidth="reading" padding="lg">
74
+ * <Text>Long-form content…</Text>
75
+ * </Box>
76
+ * </Stack>
77
+ * ```
78
+ */
79
+ var Box = ({
80
+ padding = "none",
81
+ paddingBlock,
82
+ paddingInline,
83
+ background = "none",
84
+ radius = "none",
85
+ border = "none",
86
+ width = "auto",
87
+ maxWidth = "none",
88
+ grow = false,
89
+ children,
90
+ ...props
91
+ }) => {
92
+ return /* @__PURE__ */jsx("div", {
93
+ ...props,
94
+ "data-scope": "box",
95
+ "data-part": "root",
96
+ style: {
97
+ boxSizing: "border-box",
98
+ paddingBlock: PADDING[paddingBlock ?? padding],
99
+ paddingInline: PADDING[paddingInline ?? padding],
100
+ background: BACKGROUND[background],
101
+ borderRadius: RADIUS[radius],
102
+ ...borderStyleFor(border),
103
+ width: WIDTH[width],
104
+ maxWidth: MAX_WIDTH[maxWidth],
105
+ ...growStyle(grow)
106
+ },
107
+ children
108
+ });
109
+ };
110
+ Box.displayName = boxMeta.displayName;
111
+
112
+ //#endregion
113
+ export { Box, boxMeta };
@@ -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/Breadcrumbs/Breadcrumbs.tsx
9
9
  /** Formal semantic identity — Breadcrumbs root (Navigation entity, trail). */
@@ -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 { Breadcrumb, Breadcrumbs, Link } from "react-aria-components";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Breadcrumb, Breadcrumbs, Link } from "react-aria-components";
7
7
 
8
8
  //#region src/components/Breadcrumbs/Breadcrumbs.tsx
9
9
  /** Formal semantic identity — Breadcrumbs root (Navigation entity, trail). */
@@ -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/Button/Button.tsx
9
9
  /**
@@ -47,7 +47,7 @@ var Button = ({
47
47
  borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
48
48
  borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.control.width,
49
49
  borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style,
50
- minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
50
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit,
51
51
  paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
52
52
  paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.lg,
53
53
  ..._ttoss_fsl_theme_vars.vars.text.label.md,
@@ -15,7 +15,8 @@ declare const buttonMeta: {
15
15
  * Displays a semantic action trigger (entity: Action).
16
16
  *
17
17
  * Entity = Action → colors: `action`, radii: `control`, border: `outline.control`,
18
- * sizing: `hit.base`, spacing: `inset.control.md`, typography: `label.md`, motion: `feedback`.
18
+ * sizing: `hit` (ergonomic floor, drives height), spacing: `inset.control`
19
+ * (`sm` block / `lg` inline), typography: `label.md`, motion: `feedback`.
19
20
  */
20
21
  interface ButtonProps$1 extends Omit<ButtonProps, 'style'> {
21
22
  /**
@@ -15,7 +15,8 @@ declare const buttonMeta: {
15
15
  * Displays a semantic action trigger (entity: Action).
16
16
  *
17
17
  * Entity = Action → colors: `action`, radii: `control`, border: `outline.control`,
18
- * sizing: `hit.base`, spacing: `inset.control.md`, typography: `label.md`, motion: `feedback`.
18
+ * sizing: `hit` (ergonomic floor, drives height), spacing: `inset.control`
19
+ * (`sm` block / `lg` inline), typography: `label.md`, motion: `feedback`.
19
20
  */
20
21
  interface ButtonProps$1 extends Omit<ButtonProps, 'style'> {
21
22
  /**
@@ -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 { Button } from "react-aria-components";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { Button } from "react-aria-components";
7
7
 
8
8
  //#region src/components/Button/Button.tsx
9
9
  /**
@@ -47,7 +47,7 @@ var Button$1 = ({
47
47
  borderRadius: vars.radii.control,
48
48
  borderWidth: vars.border.outline.control.width,
49
49
  borderStyle: vars.border.outline.control.style,
50
- minHeight: vars.sizing.hit.base,
50
+ minHeight: vars.sizing.hit,
51
51
  paddingBlock: vars.spacing.inset.control.sm,
52
52
  paddingInline: vars.spacing.inset.control.lg,
53
53
  ...vars.text.label.md,
@@ -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/Checkbox/Checkbox.tsx
10
10
  /** Formal semantic identity — Checkbox root (Selection entity, toggle.binary). */
@@ -110,7 +110,7 @@ var Checkbox = ({
110
110
  display: "inline-flex",
111
111
  alignItems: "center",
112
112
  gap: _ttoss_fsl_theme_vars.vars.spacing.gap.inline.sm,
113
- minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
113
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit,
114
114
  cursor: isDisabled ? "not-allowed" : "pointer",
115
115
  opacity: isDisabled ? _ttoss_fsl_theme_vars.vars.opacity.disabled : void 0,
116
116
  ..._ttoss_fsl_theme_vars.vars.text.label.md,
@@ -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 } from "react-aria-components";
7
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Checkbox } from "react-aria-components";
8
8
 
9
9
  //#region src/components/Checkbox/Checkbox.tsx
10
10
  /** Formal semantic identity — Checkbox root (Selection entity, toggle.binary). */
@@ -110,7 +110,7 @@ var Checkbox$1 = ({
110
110
  display: "inline-flex",
111
111
  alignItems: "center",
112
112
  gap: vars.spacing.gap.inline.sm,
113
- minHeight: vars.sizing.hit.base,
113
+ minHeight: vars.sizing.hit,
114
114
  cursor: isDisabled ? "not-allowed" : "pointer",
115
115
  opacity: isDisabled ? vars.opacity.disabled : void 0,
116
116
  ...vars.text.label.md,
@@ -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/CheckboxGroup/CheckboxGroup.tsx
7
7
  /** Formal semantic identity — CheckboxGroup root (Selection entity, multi-choice). */
@@ -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 { CheckboxGroup, FieldError, Label, Text } from "react-aria-components";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { CheckboxGroup, FieldError, Label, Text } from "react-aria-components";
5
5
 
6
6
  //#region src/components/CheckboxGroup/CheckboxGroup.tsx
7
7
  /** Formal semantic identity — CheckboxGroup root (Selection entity, multi-choice). */
@@ -0,0 +1,69 @@
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/Code/Code.tsx
6
+ /** Formal semantic identity — Code root (Structure entity, monospace text). */
7
+ var codeMeta = {
8
+ displayName: "Code",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var TYPE_BY_SIZE = {
13
+ sm: _ttoss_fsl_theme_vars.vars.text.code.sm,
14
+ md: _ttoss_fsl_theme_vars.vars.text.code.md
15
+ };
16
+ /**
17
+ * Source text in the monospace type role.
18
+ *
19
+ * Entity = Structure. Use inline `Code` for a token or keyword inside prose,
20
+ * and `block` for a multi-line snippet — the block is a bordered, scrollable
21
+ * surface. Type comes from the `code` scale; there is no raw font vocabulary.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <Code>npx skills add ttoss/skills --skill fsl</Code>
26
+ * <Code block>{generatedThemeSource}</Code>
27
+ * ```
28
+ */
29
+ var Code = ({
30
+ block = false,
31
+ size = "sm",
32
+ children,
33
+ ...props
34
+ }) => {
35
+ const type = TYPE_BY_SIZE[size];
36
+ if (!block) return /* @__PURE__ */(0, react_jsx_runtime.jsx)("code", {
37
+ ...props,
38
+ "data-scope": "code",
39
+ "data-part": "root",
40
+ style: type,
41
+ children
42
+ });
43
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)("pre", {
44
+ ...props,
45
+ "data-scope": "code",
46
+ "data-part": "root",
47
+ "data-block": "true",
48
+ style: {
49
+ margin: 0,
50
+ overflow: "auto",
51
+ padding: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.sm,
52
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.surface,
53
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
54
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
55
+ borderColor: _ttoss_fsl_theme_vars.vars.colors.informational.muted.border?.default,
56
+ color: _ttoss_fsl_theme_vars.vars.colors.informational.primary.text?.default,
57
+ backgroundColor: _ttoss_fsl_theme_vars.vars.colors.informational.primary.background?.default,
58
+ ...type
59
+ },
60
+ children: /* @__PURE__ */(0, react_jsx_runtime.jsx)("code", {
61
+ children
62
+ })
63
+ });
64
+ };
65
+ Code.displayName = codeMeta.displayName;
66
+
67
+ //#endregion
68
+ exports.Code = Code;
69
+ exports.codeMeta = codeMeta;