@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
package/README.md CHANGED
@@ -59,7 +59,7 @@ Composites accept no `style`/`className`. Geometry the host legitimately owns is
59
59
 
60
60
  The registered knobs and the full policy live in `src/tokens/CONTRACT.md` §7.
61
61
 
62
- Icons are internal: components render glyphs through a semantic layer over the [Iconify](https://iconify.design/) provider (default set: Lucide), registered offline (no runtime network fetch). There is no public `Icon` export yet see CONTRIBUTING ADR-005.
62
+ Icons are semantic: `Icon` (public since ADR-010) is named by intent (`<Icon intent="status.success" />`), never by glyph. The theme maps intents to [Iconify](https://iconify.design/) glyphs (default set: Lucide), registered offline (no runtime network fetch); color inherits via `currentColor` and size comes from `vars.sizing.icon.*`.
63
63
 
64
64
  ## AI-first surface
65
65
 
@@ -0,0 +1,124 @@
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/AppShell/AppShell.tsx
6
+ /** Formal semantic identity — AppShell root (Structure entity, app frame). */
7
+ var appShellMeta = {
8
+ displayName: "AppShell",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var SIDEBAR_WIDTH = {
13
+ sm: "13rem",
14
+ md: "16rem",
15
+ lg: "20rem"
16
+ };
17
+ /** Build the body's column template from which side panels are present. */
18
+ var bodyColumns = ({
19
+ hasSidebar,
20
+ hasAside,
21
+ sidebarWidth,
22
+ asideWidth
23
+ }) => {
24
+ return `${hasSidebar ? `${SIDEBAR_WIDTH[sidebarWidth]} ` : ""}minmax(0, 1fr)${hasAside ? ` ${SIDEBAR_WIDTH[asideWidth]}` : ""}`;
25
+ };
26
+ var HAIRLINE = `${_ttoss_fsl_theme_vars.vars.border.outline.surface.width} ${_ttoss_fsl_theme_vars.vars.border.outline.surface.style} ${_ttoss_fsl_theme_vars.vars.colors.informational.muted.border?.default}`;
27
+ /**
28
+ * The application-frame primitive — a full-viewport header + sidebars + main.
29
+ *
30
+ * Entity = Structure. Wrap the whole app in an AppShell to get the standard
31
+ * "header over navigator | main | inspector" frame without hand-rolling a grid:
32
+ * pass any of `header`, `sidebar`, `aside`, and the main content as `children`.
33
+ * The frame fills the viewport, each region scrolls on its own, and the main
34
+ * region always takes the remaining width. Sidebar widths come from a named
35
+ * scale — there is no raw track template.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <AppShell
40
+ * header={<Toolbar>…</Toolbar>}
41
+ * sidebar={<Navigator />}
42
+ * aside={<Inspector />}
43
+ * >
44
+ * <MainStage />
45
+ * </AppShell>
46
+ * ```
47
+ */
48
+ var AppShell = ({
49
+ header,
50
+ sidebar,
51
+ aside,
52
+ sidebarWidth = "sm",
53
+ asideWidth = "sm",
54
+ sidebarLabel,
55
+ asideLabel,
56
+ children,
57
+ ...props
58
+ }) => {
59
+ const hasSidebar = sidebar !== void 0 && sidebar !== null;
60
+ const hasAside = aside !== void 0 && aside !== null;
61
+ return /* @__PURE__ */(0, react_jsx_runtime.jsxs)("div", {
62
+ ...props,
63
+ "data-scope": "app-shell",
64
+ "data-part": "root",
65
+ style: {
66
+ display: "grid",
67
+ gridTemplateRows: header ? "auto minmax(0, 1fr)" : "minmax(0, 1fr)",
68
+ blockSize: "100dvh"
69
+ },
70
+ children: [header ? /* @__PURE__ */(0, react_jsx_runtime.jsx)("header", {
71
+ "data-scope": "app-shell",
72
+ "data-part": "header",
73
+ style: {
74
+ borderBlockEnd: HAIRLINE
75
+ },
76
+ children: header
77
+ }) : null, /* @__PURE__ */(0, react_jsx_runtime.jsxs)("div", {
78
+ "data-scope": "app-shell",
79
+ "data-part": "body",
80
+ style: {
81
+ display: "grid",
82
+ gridTemplateColumns: bodyColumns({
83
+ hasSidebar,
84
+ hasAside,
85
+ sidebarWidth,
86
+ asideWidth
87
+ }),
88
+ minBlockSize: 0
89
+ },
90
+ children: [hasSidebar ? /* @__PURE__ */(0, react_jsx_runtime.jsx)("aside", {
91
+ "data-scope": "app-shell",
92
+ "data-part": "sidebar",
93
+ "aria-label": sidebarLabel,
94
+ style: {
95
+ overflowY: "auto",
96
+ borderInlineEnd: HAIRLINE
97
+ },
98
+ children: sidebar
99
+ }) : null, /* @__PURE__ */(0, react_jsx_runtime.jsx)("main", {
100
+ "data-scope": "app-shell",
101
+ "data-part": "main",
102
+ style: {
103
+ overflow: "auto",
104
+ minInlineSize: 0
105
+ },
106
+ children
107
+ }), hasAside ? /* @__PURE__ */(0, react_jsx_runtime.jsx)("aside", {
108
+ "data-scope": "app-shell",
109
+ "data-part": "aside",
110
+ "aria-label": asideLabel,
111
+ style: {
112
+ overflowY: "auto",
113
+ borderInlineStart: HAIRLINE
114
+ },
115
+ children: aside
116
+ }) : null]
117
+ })]
118
+ });
119
+ };
120
+ AppShell.displayName = appShellMeta.displayName;
121
+
122
+ //#endregion
123
+ exports.AppShell = AppShell;
124
+ exports.appShellMeta = appShellMeta;
@@ -0,0 +1,74 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/AppShell/AppShell.d.ts
5
+ /** Formal semantic identity — AppShell root (Structure entity, app frame). */
6
+ declare const appShellMeta: {
7
+ readonly displayName: "AppShell";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Sidebar width from a named threshold scale (not a raw length). */
12
+ type AppShellSidebarWidth = 'sm' | 'md' | 'lg';
13
+ /** Props for the AppShell component. */
14
+ interface AppShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
15
+ /** Top bar, spanning the full width above the body. Omit for no header. */
16
+ header?: React.ReactNode;
17
+ /** Start-side panel (navigator). Omit for no start sidebar. */
18
+ sidebar?: React.ReactNode;
19
+ /** End-side panel (inspector). Omit for no end aside. */
20
+ aside?: React.ReactNode;
21
+ /**
22
+ * Width of the start `sidebar`, from the named scale.
23
+ * @default 'sm'
24
+ */
25
+ sidebarWidth?: AppShellSidebarWidth;
26
+ /**
27
+ * Width of the end `aside`, from the named scale.
28
+ * @default 'sm'
29
+ */
30
+ asideWidth?: AppShellSidebarWidth;
31
+ /** Accessible name for the start `sidebar` landmark (`aria-label`). */
32
+ sidebarLabel?: string;
33
+ /** Accessible name for the end `aside` landmark (`aria-label`). */
34
+ asideLabel?: string;
35
+ /** The main region — always takes the remaining space and scrolls. */
36
+ children?: React.ReactNode;
37
+ }
38
+ /**
39
+ * The application-frame primitive — a full-viewport header + sidebars + main.
40
+ *
41
+ * Entity = Structure. Wrap the whole app in an AppShell to get the standard
42
+ * "header over navigator | main | inspector" frame without hand-rolling a grid:
43
+ * pass any of `header`, `sidebar`, `aside`, and the main content as `children`.
44
+ * The frame fills the viewport, each region scrolls on its own, and the main
45
+ * region always takes the remaining width. Sidebar widths come from a named
46
+ * scale — there is no raw track template.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <AppShell
51
+ * header={<Toolbar>…</Toolbar>}
52
+ * sidebar={<Navigator />}
53
+ * aside={<Inspector />}
54
+ * >
55
+ * <MainStage />
56
+ * </AppShell>
57
+ * ```
58
+ */
59
+ declare const AppShell: {
60
+ ({
61
+ header,
62
+ sidebar,
63
+ aside,
64
+ sidebarWidth,
65
+ asideWidth,
66
+ sidebarLabel,
67
+ asideLabel,
68
+ children,
69
+ ...props
70
+ }: AppShellProps): import("react/jsx-runtime").JSX.Element;
71
+ displayName: "AppShell";
72
+ };
73
+ //#endregion
74
+ export { AppShell, AppShellProps, AppShellSidebarWidth, appShellMeta };
@@ -0,0 +1,74 @@
1
+
2
+ import * as React from "react";
3
+
4
+ //#region src/components/AppShell/AppShell.d.ts
5
+ /** Formal semantic identity — AppShell root (Structure entity, app frame). */
6
+ declare const appShellMeta: {
7
+ readonly displayName: "AppShell";
8
+ readonly entity: "Structure";
9
+ readonly structure: "root";
10
+ };
11
+ /** Sidebar width from a named threshold scale (not a raw length). */
12
+ type AppShellSidebarWidth = 'sm' | 'md' | 'lg';
13
+ /** Props for the AppShell component. */
14
+ interface AppShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
15
+ /** Top bar, spanning the full width above the body. Omit for no header. */
16
+ header?: React.ReactNode;
17
+ /** Start-side panel (navigator). Omit for no start sidebar. */
18
+ sidebar?: React.ReactNode;
19
+ /** End-side panel (inspector). Omit for no end aside. */
20
+ aside?: React.ReactNode;
21
+ /**
22
+ * Width of the start `sidebar`, from the named scale.
23
+ * @default 'sm'
24
+ */
25
+ sidebarWidth?: AppShellSidebarWidth;
26
+ /**
27
+ * Width of the end `aside`, from the named scale.
28
+ * @default 'sm'
29
+ */
30
+ asideWidth?: AppShellSidebarWidth;
31
+ /** Accessible name for the start `sidebar` landmark (`aria-label`). */
32
+ sidebarLabel?: string;
33
+ /** Accessible name for the end `aside` landmark (`aria-label`). */
34
+ asideLabel?: string;
35
+ /** The main region — always takes the remaining space and scrolls. */
36
+ children?: React.ReactNode;
37
+ }
38
+ /**
39
+ * The application-frame primitive — a full-viewport header + sidebars + main.
40
+ *
41
+ * Entity = Structure. Wrap the whole app in an AppShell to get the standard
42
+ * "header over navigator | main | inspector" frame without hand-rolling a grid:
43
+ * pass any of `header`, `sidebar`, `aside`, and the main content as `children`.
44
+ * The frame fills the viewport, each region scrolls on its own, and the main
45
+ * region always takes the remaining width. Sidebar widths come from a named
46
+ * scale — there is no raw track template.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <AppShell
51
+ * header={<Toolbar>…</Toolbar>}
52
+ * sidebar={<Navigator />}
53
+ * aside={<Inspector />}
54
+ * >
55
+ * <MainStage />
56
+ * </AppShell>
57
+ * ```
58
+ */
59
+ declare const AppShell: {
60
+ ({
61
+ header,
62
+ sidebar,
63
+ aside,
64
+ sidebarWidth,
65
+ asideWidth,
66
+ sidebarLabel,
67
+ asideLabel,
68
+ children,
69
+ ...props
70
+ }: AppShellProps): import("react/jsx-runtime").JSX.Element;
71
+ displayName: "AppShell";
72
+ };
73
+ //#endregion
74
+ export { AppShell, AppShellProps, AppShellSidebarWidth, appShellMeta };
@@ -0,0 +1,123 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { vars } from "@ttoss/fsl-theme/vars";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+
5
+ //#region src/components/AppShell/AppShell.tsx
6
+ /** Formal semantic identity — AppShell root (Structure entity, app frame). */
7
+ var appShellMeta = {
8
+ displayName: "AppShell",
9
+ entity: "Structure",
10
+ structure: "root"
11
+ };
12
+ var SIDEBAR_WIDTH = {
13
+ sm: "13rem",
14
+ md: "16rem",
15
+ lg: "20rem"
16
+ };
17
+ /** Build the body's column template from which side panels are present. */
18
+ var bodyColumns = ({
19
+ hasSidebar,
20
+ hasAside,
21
+ sidebarWidth,
22
+ asideWidth
23
+ }) => {
24
+ return `${hasSidebar ? `${SIDEBAR_WIDTH[sidebarWidth]} ` : ""}minmax(0, 1fr)${hasAside ? ` ${SIDEBAR_WIDTH[asideWidth]}` : ""}`;
25
+ };
26
+ var HAIRLINE = `${vars.border.outline.surface.width} ${vars.border.outline.surface.style} ${vars.colors.informational.muted.border?.default}`;
27
+ /**
28
+ * The application-frame primitive — a full-viewport header + sidebars + main.
29
+ *
30
+ * Entity = Structure. Wrap the whole app in an AppShell to get the standard
31
+ * "header over navigator | main | inspector" frame without hand-rolling a grid:
32
+ * pass any of `header`, `sidebar`, `aside`, and the main content as `children`.
33
+ * The frame fills the viewport, each region scrolls on its own, and the main
34
+ * region always takes the remaining width. Sidebar widths come from a named
35
+ * scale — there is no raw track template.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <AppShell
40
+ * header={<Toolbar>…</Toolbar>}
41
+ * sidebar={<Navigator />}
42
+ * aside={<Inspector />}
43
+ * >
44
+ * <MainStage />
45
+ * </AppShell>
46
+ * ```
47
+ */
48
+ var AppShell = ({
49
+ header,
50
+ sidebar,
51
+ aside,
52
+ sidebarWidth = "sm",
53
+ asideWidth = "sm",
54
+ sidebarLabel,
55
+ asideLabel,
56
+ children,
57
+ ...props
58
+ }) => {
59
+ const hasSidebar = sidebar !== void 0 && sidebar !== null;
60
+ const hasAside = aside !== void 0 && aside !== null;
61
+ return /* @__PURE__ */jsxs("div", {
62
+ ...props,
63
+ "data-scope": "app-shell",
64
+ "data-part": "root",
65
+ style: {
66
+ display: "grid",
67
+ gridTemplateRows: header ? "auto minmax(0, 1fr)" : "minmax(0, 1fr)",
68
+ blockSize: "100dvh"
69
+ },
70
+ children: [header ? /* @__PURE__ */jsx("header", {
71
+ "data-scope": "app-shell",
72
+ "data-part": "header",
73
+ style: {
74
+ borderBlockEnd: HAIRLINE
75
+ },
76
+ children: header
77
+ }) : null, /* @__PURE__ */jsxs("div", {
78
+ "data-scope": "app-shell",
79
+ "data-part": "body",
80
+ style: {
81
+ display: "grid",
82
+ gridTemplateColumns: bodyColumns({
83
+ hasSidebar,
84
+ hasAside,
85
+ sidebarWidth,
86
+ asideWidth
87
+ }),
88
+ minBlockSize: 0
89
+ },
90
+ children: [hasSidebar ? /* @__PURE__ */jsx("aside", {
91
+ "data-scope": "app-shell",
92
+ "data-part": "sidebar",
93
+ "aria-label": sidebarLabel,
94
+ style: {
95
+ overflowY: "auto",
96
+ borderInlineEnd: HAIRLINE
97
+ },
98
+ children: sidebar
99
+ }) : null, /* @__PURE__ */jsx("main", {
100
+ "data-scope": "app-shell",
101
+ "data-part": "main",
102
+ style: {
103
+ overflow: "auto",
104
+ minInlineSize: 0
105
+ },
106
+ children
107
+ }), hasAside ? /* @__PURE__ */jsx("aside", {
108
+ "data-scope": "app-shell",
109
+ "data-part": "aside",
110
+ "aria-label": asideLabel,
111
+ style: {
112
+ overflowY: "auto",
113
+ borderInlineStart: HAIRLINE
114
+ },
115
+ children: aside
116
+ }) : null]
117
+ })]
118
+ });
119
+ };
120
+ AppShell.displayName = appShellMeta.displayName;
121
+
122
+ //#endregion
123
+ export { AppShell, appShellMeta };
@@ -0,0 +1,61 @@
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/Badge/Badge.tsx
6
+ /** Formal semantic identity — Badge root (Feedback entity, status pill). */
7
+ var badgeMeta = {
8
+ displayName: "Badge",
9
+ entity: "Feedback",
10
+ structure: "root"
11
+ };
12
+ /**
13
+ * A compact status pill bound to the FSL feedback palette.
14
+ *
15
+ * Entity = Feedback. Use it for a small, non-interactive tag whose colour
16
+ * carries meaning: a contrast rating, a validation state, a count. Pick the
17
+ * `evaluation` by valence, not by colour — the theme decides the hue per mode.
18
+ * For running feedback messages use `Toast`; for interactive filters use a
19
+ * control.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Badge evaluation="positive" numeric="tabular">AA 5.1:1</Badge>
24
+ * <Badge evaluation="negative">Fail</Badge>
25
+ * ```
26
+ */
27
+ var Badge = ({
28
+ evaluation = "primary",
29
+ numeric = "normal",
30
+ children,
31
+ ...props
32
+ }) => {
33
+ const colors = _ttoss_fsl_theme_vars.vars.colors.feedback[evaluation];
34
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
35
+ ...props,
36
+ "data-scope": "badge",
37
+ "data-part": "root",
38
+ "data-evaluation": evaluation,
39
+ style: {
40
+ display: "inline-flex",
41
+ alignItems: "center",
42
+ justifyContent: "center",
43
+ paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
44
+ paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
45
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
46
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
47
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
48
+ borderColor: colors?.border?.default,
49
+ color: colors?.text?.default,
50
+ backgroundColor: colors?.background?.default,
51
+ fontVariantNumeric: numeric === "tabular" ? "tabular-nums" : void 0,
52
+ ..._ttoss_fsl_theme_vars.vars.text.label.sm
53
+ },
54
+ children
55
+ });
56
+ };
57
+ Badge.displayName = badgeMeta.displayName;
58
+
59
+ //#endregion
60
+ exports.Badge = Badge;
61
+ exports.badgeMeta = badgeMeta;
@@ -0,0 +1,56 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.cjs";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/Badge/Badge.d.ts
6
+ /** Formal semantic identity — Badge root (Feedback entity, status pill). */
7
+ declare const badgeMeta: {
8
+ readonly displayName: "Badge";
9
+ readonly entity: "Feedback";
10
+ readonly structure: "root";
11
+ };
12
+ /** Numeric figure style — `tabular` aligns digits (ratios, counts). */
13
+ type BadgeNumeric = 'normal' | 'tabular';
14
+ /** Props for the Badge component. */
15
+ interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'style' | 'className'> {
16
+ /**
17
+ * Feedback valence the badge communicates. `primary` is neutral-informational;
18
+ * `positive`/`caution`/`negative` carry status colour.
19
+ * @default 'primary'
20
+ */
21
+ evaluation?: EvaluationsFor<(typeof badgeMeta)['entity']>;
22
+ /**
23
+ * Numeric figure style. `tabular` renders `tabular-nums` so digits line up —
24
+ * use it for ratios/counts inside a scannable column.
25
+ * @default 'normal'
26
+ */
27
+ numeric?: BadgeNumeric;
28
+ /** The badge label. */
29
+ children?: React.ReactNode;
30
+ }
31
+ /**
32
+ * A compact status pill bound to the FSL feedback palette.
33
+ *
34
+ * Entity = Feedback. Use it for a small, non-interactive tag whose colour
35
+ * carries meaning: a contrast rating, a validation state, a count. Pick the
36
+ * `evaluation` by valence, not by colour — the theme decides the hue per mode.
37
+ * For running feedback messages use `Toast`; for interactive filters use a
38
+ * control.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <Badge evaluation="positive" numeric="tabular">AA 5.1:1</Badge>
43
+ * <Badge evaluation="negative">Fail</Badge>
44
+ * ```
45
+ */
46
+ declare const Badge: {
47
+ ({
48
+ evaluation,
49
+ numeric,
50
+ children,
51
+ ...props
52
+ }: BadgeProps): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "Badge";
54
+ };
55
+ //#endregion
56
+ export { Badge, BadgeNumeric, BadgeProps, badgeMeta };
@@ -0,0 +1,56 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.mjs";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/Badge/Badge.d.ts
6
+ /** Formal semantic identity — Badge root (Feedback entity, status pill). */
7
+ declare const badgeMeta: {
8
+ readonly displayName: "Badge";
9
+ readonly entity: "Feedback";
10
+ readonly structure: "root";
11
+ };
12
+ /** Numeric figure style — `tabular` aligns digits (ratios, counts). */
13
+ type BadgeNumeric = 'normal' | 'tabular';
14
+ /** Props for the Badge component. */
15
+ interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'style' | 'className'> {
16
+ /**
17
+ * Feedback valence the badge communicates. `primary` is neutral-informational;
18
+ * `positive`/`caution`/`negative` carry status colour.
19
+ * @default 'primary'
20
+ */
21
+ evaluation?: EvaluationsFor<(typeof badgeMeta)['entity']>;
22
+ /**
23
+ * Numeric figure style. `tabular` renders `tabular-nums` so digits line up —
24
+ * use it for ratios/counts inside a scannable column.
25
+ * @default 'normal'
26
+ */
27
+ numeric?: BadgeNumeric;
28
+ /** The badge label. */
29
+ children?: React.ReactNode;
30
+ }
31
+ /**
32
+ * A compact status pill bound to the FSL feedback palette.
33
+ *
34
+ * Entity = Feedback. Use it for a small, non-interactive tag whose colour
35
+ * carries meaning: a contrast rating, a validation state, a count. Pick the
36
+ * `evaluation` by valence, not by colour — the theme decides the hue per mode.
37
+ * For running feedback messages use `Toast`; for interactive filters use a
38
+ * control.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <Badge evaluation="positive" numeric="tabular">AA 5.1:1</Badge>
43
+ * <Badge evaluation="negative">Fail</Badge>
44
+ * ```
45
+ */
46
+ declare const Badge: {
47
+ ({
48
+ evaluation,
49
+ numeric,
50
+ children,
51
+ ...props
52
+ }: BadgeProps): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "Badge";
54
+ };
55
+ //#endregion
56
+ export { Badge, BadgeNumeric, BadgeProps, badgeMeta };
@@ -0,0 +1,60 @@
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/Badge/Badge.tsx
6
+ /** Formal semantic identity — Badge root (Feedback entity, status pill). */
7
+ var badgeMeta = {
8
+ displayName: "Badge",
9
+ entity: "Feedback",
10
+ structure: "root"
11
+ };
12
+ /**
13
+ * A compact status pill bound to the FSL feedback palette.
14
+ *
15
+ * Entity = Feedback. Use it for a small, non-interactive tag whose colour
16
+ * carries meaning: a contrast rating, a validation state, a count. Pick the
17
+ * `evaluation` by valence, not by colour — the theme decides the hue per mode.
18
+ * For running feedback messages use `Toast`; for interactive filters use a
19
+ * control.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Badge evaluation="positive" numeric="tabular">AA 5.1:1</Badge>
24
+ * <Badge evaluation="negative">Fail</Badge>
25
+ * ```
26
+ */
27
+ var Badge = ({
28
+ evaluation = "primary",
29
+ numeric = "normal",
30
+ children,
31
+ ...props
32
+ }) => {
33
+ const colors = vars.colors.feedback[evaluation];
34
+ return /* @__PURE__ */jsx("span", {
35
+ ...props,
36
+ "data-scope": "badge",
37
+ "data-part": "root",
38
+ "data-evaluation": evaluation,
39
+ style: {
40
+ display: "inline-flex",
41
+ alignItems: "center",
42
+ justifyContent: "center",
43
+ paddingBlock: vars.spacing.inset.control.sm,
44
+ paddingInline: vars.spacing.inset.control.md,
45
+ borderRadius: vars.radii.control,
46
+ borderWidth: vars.border.outline.surface.width,
47
+ borderStyle: vars.border.outline.surface.style,
48
+ borderColor: colors?.border?.default,
49
+ color: colors?.text?.default,
50
+ backgroundColor: colors?.background?.default,
51
+ fontVariantNumeric: numeric === "tabular" ? "tabular-nums" : void 0,
52
+ ...vars.text.label.sm
53
+ },
54
+ children
55
+ });
56
+ };
57
+ Badge.displayName = badgeMeta.displayName;
58
+
59
+ //#endregion
60
+ export { Badge, badgeMeta };