@ttoss/fsl-ui 0.2.4

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 (174) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +30 -0
  4. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +129 -0
  5. package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +61 -0
  6. package/dist/components/Breadcrumbs/Breadcrumbs.d.mts +61 -0
  7. package/dist/components/Breadcrumbs/Breadcrumbs.mjs +126 -0
  8. package/dist/components/Button/Button.cjs +80 -0
  9. package/dist/components/Button/Button.d.cts +68 -0
  10. package/dist/components/Button/Button.d.mts +68 -0
  11. package/dist/components/Button/Button.mjs +79 -0
  12. package/dist/components/Checkbox/Checkbox.cjs +183 -0
  13. package/dist/components/Checkbox/Checkbox.d.cts +45 -0
  14. package/dist/components/Checkbox/Checkbox.d.mts +45 -0
  15. package/dist/components/Checkbox/Checkbox.mjs +182 -0
  16. package/dist/components/CheckboxGroup/CheckboxGroup.cjs +97 -0
  17. package/dist/components/CheckboxGroup/CheckboxGroup.d.cts +56 -0
  18. package/dist/components/CheckboxGroup/CheckboxGroup.d.mts +56 -0
  19. package/dist/components/CheckboxGroup/CheckboxGroup.mjs +96 -0
  20. package/dist/components/FileTrigger/FileTrigger.cjs +51 -0
  21. package/dist/components/FileTrigger/FileTrigger.d.cts +52 -0
  22. package/dist/components/FileTrigger/FileTrigger.d.mts +52 -0
  23. package/dist/components/FileTrigger/FileTrigger.mjs +50 -0
  24. package/dist/components/GridList/GridList.cjs +220 -0
  25. package/dist/components/GridList/GridList.d.cts +72 -0
  26. package/dist/components/GridList/GridList.d.mts +72 -0
  27. package/dist/components/GridList/GridList.mjs +217 -0
  28. package/dist/components/Group/Group.cjs +77 -0
  29. package/dist/components/Group/Group.d.cts +61 -0
  30. package/dist/components/Group/Group.d.mts +61 -0
  31. package/dist/components/Group/Group.mjs +74 -0
  32. package/dist/components/Icon/Icon.cjs +52 -0
  33. package/dist/components/Icon/Icon.mjs +52 -0
  34. package/dist/components/Icon/glyphs.cjs +72 -0
  35. package/dist/components/Icon/glyphs.mjs +63 -0
  36. package/dist/components/Link/Link.cjs +62 -0
  37. package/dist/components/Link/Link.d.cts +38 -0
  38. package/dist/components/Link/Link.d.mts +38 -0
  39. package/dist/components/Link/Link.mjs +61 -0
  40. package/dist/components/ListBox/ListBox.cjs +126 -0
  41. package/dist/components/ListBox/ListBox.d.cts +63 -0
  42. package/dist/components/ListBox/ListBox.d.mts +63 -0
  43. package/dist/components/ListBox/ListBox.mjs +123 -0
  44. package/dist/components/Meter/Meter.cjs +126 -0
  45. package/dist/components/Meter/Meter.d.cts +63 -0
  46. package/dist/components/Meter/Meter.d.mts +63 -0
  47. package/dist/components/Meter/Meter.mjs +125 -0
  48. package/dist/components/NumberField/NumberField.cjs +221 -0
  49. package/dist/components/NumberField/NumberField.d.cts +68 -0
  50. package/dist/components/NumberField/NumberField.d.mts +68 -0
  51. package/dist/components/NumberField/NumberField.mjs +220 -0
  52. package/dist/components/ProgressBar/ProgressBar.cjs +132 -0
  53. package/dist/components/ProgressBar/ProgressBar.d.cts +56 -0
  54. package/dist/components/ProgressBar/ProgressBar.d.mts +56 -0
  55. package/dist/components/ProgressBar/ProgressBar.mjs +129 -0
  56. package/dist/components/RadioGroup/RadioGroup.cjs +218 -0
  57. package/dist/components/RadioGroup/RadioGroup.d.cts +82 -0
  58. package/dist/components/RadioGroup/RadioGroup.d.mts +82 -0
  59. package/dist/components/RadioGroup/RadioGroup.mjs +215 -0
  60. package/dist/components/Select/Select.cjs +253 -0
  61. package/dist/components/Select/Select.d.cts +86 -0
  62. package/dist/components/Select/Select.d.mts +86 -0
  63. package/dist/components/Select/Select.mjs +250 -0
  64. package/dist/components/Separator/Separator.cjs +64 -0
  65. package/dist/components/Separator/Separator.d.cts +44 -0
  66. package/dist/components/Separator/Separator.d.mts +44 -0
  67. package/dist/components/Separator/Separator.mjs +63 -0
  68. package/dist/components/Slider/Slider.cjs +160 -0
  69. package/dist/components/Slider/Slider.d.cts +45 -0
  70. package/dist/components/Slider/Slider.d.mts +45 -0
  71. package/dist/components/Slider/Slider.mjs +159 -0
  72. package/dist/components/Switch/Switch.cjs +176 -0
  73. package/dist/components/Switch/Switch.d.cts +43 -0
  74. package/dist/components/Switch/Switch.d.mts +43 -0
  75. package/dist/components/Switch/Switch.mjs +175 -0
  76. package/dist/components/Tabs/Tabs.cjs +180 -0
  77. package/dist/components/Tabs/Tabs.d.cts +85 -0
  78. package/dist/components/Tabs/Tabs.d.mts +85 -0
  79. package/dist/components/Tabs/Tabs.mjs +173 -0
  80. package/dist/components/Toast/Toast.cjs +218 -0
  81. package/dist/components/Toast/Toast.d.cts +96 -0
  82. package/dist/components/Toast/Toast.d.mts +96 -0
  83. package/dist/components/Toast/Toast.mjs +214 -0
  84. package/dist/components/ToggleButton/ToggleButton.cjs +125 -0
  85. package/dist/components/ToggleButton/ToggleButton.d.cts +43 -0
  86. package/dist/components/ToggleButton/ToggleButton.d.mts +43 -0
  87. package/dist/components/ToggleButton/ToggleButton.mjs +124 -0
  88. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.cjs +48 -0
  89. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.cts +41 -0
  90. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.mts +41 -0
  91. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.mjs +47 -0
  92. package/dist/components/Toolbar/Toolbar.cjs +67 -0
  93. package/dist/components/Toolbar/Toolbar.d.cts +60 -0
  94. package/dist/components/Toolbar/Toolbar.d.mts +60 -0
  95. package/dist/components/Toolbar/Toolbar.mjs +66 -0
  96. package/dist/composites/Accordion/Accordion.cjs +279 -0
  97. package/dist/composites/Accordion/Accordion.d.cts +176 -0
  98. package/dist/composites/Accordion/Accordion.d.mts +176 -0
  99. package/dist/composites/Accordion/Accordion.mjs +270 -0
  100. package/dist/composites/ConfirmationDialog/ConfirmationDialog.cjs +206 -0
  101. package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.cts +166 -0
  102. package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.mts +166 -0
  103. package/dist/composites/ConfirmationDialog/ConfirmationDialog.mjs +203 -0
  104. package/dist/composites/Dialog/Dialog.cjs +372 -0
  105. package/dist/composites/Dialog/Dialog.d.cts +234 -0
  106. package/dist/composites/Dialog/Dialog.d.mts +234 -0
  107. package/dist/composites/Dialog/Dialog.mjs +360 -0
  108. package/dist/composites/Disclosure/Disclosure.cjs +214 -0
  109. package/dist/composites/Disclosure/Disclosure.d.cts +118 -0
  110. package/dist/composites/Disclosure/Disclosure.d.mts +118 -0
  111. package/dist/composites/Disclosure/Disclosure.mjs +207 -0
  112. package/dist/composites/Form/Form.cjs +161 -0
  113. package/dist/composites/Form/Form.d.cts +176 -0
  114. package/dist/composites/Form/Form.d.mts +176 -0
  115. package/dist/composites/Form/Form.mjs +156 -0
  116. package/dist/composites/Menu/Menu.cjs +190 -0
  117. package/dist/composites/Menu/Menu.d.cts +158 -0
  118. package/dist/composites/Menu/Menu.d.mts +158 -0
  119. package/dist/composites/Menu/Menu.mjs +186 -0
  120. package/dist/composites/Popover/Popover.cjs +80 -0
  121. package/dist/composites/Popover/Popover.d.cts +56 -0
  122. package/dist/composites/Popover/Popover.d.mts +56 -0
  123. package/dist/composites/Popover/Popover.mjs +78 -0
  124. package/dist/composites/SearchField/SearchField.cjs +194 -0
  125. package/dist/composites/SearchField/SearchField.d.cts +81 -0
  126. package/dist/composites/SearchField/SearchField.d.mts +81 -0
  127. package/dist/composites/SearchField/SearchField.mjs +189 -0
  128. package/dist/composites/TagGroup/TagGroup.cjs +212 -0
  129. package/dist/composites/TagGroup/TagGroup.d.cts +84 -0
  130. package/dist/composites/TagGroup/TagGroup.d.mts +84 -0
  131. package/dist/composites/TagGroup/TagGroup.mjs +209 -0
  132. package/dist/composites/TextArea/TextArea.cjs +190 -0
  133. package/dist/composites/TextArea/TextArea.d.cts +95 -0
  134. package/dist/composites/TextArea/TextArea.d.mts +95 -0
  135. package/dist/composites/TextArea/TextArea.mjs +181 -0
  136. package/dist/composites/TextField/TextField.cjs +200 -0
  137. package/dist/composites/TextField/TextField.d.cts +111 -0
  138. package/dist/composites/TextField/TextField.d.mts +111 -0
  139. package/dist/composites/TextField/TextField.mjs +191 -0
  140. package/dist/composites/Tooltip/Tooltip.cjs +79 -0
  141. package/dist/composites/Tooltip/Tooltip.d.cts +53 -0
  142. package/dist/composites/Tooltip/Tooltip.d.mts +53 -0
  143. package/dist/composites/Tooltip/Tooltip.mjs +77 -0
  144. package/dist/composites/Wizard/Wizard.cjs +333 -0
  145. package/dist/composites/Wizard/Wizard.d.cts +206 -0
  146. package/dist/composites/Wizard/Wizard.d.mts +206 -0
  147. package/dist/composites/Wizard/Wizard.mjs +324 -0
  148. package/dist/composites/scope.cjs +124 -0
  149. package/dist/composites/scope.mjs +121 -0
  150. package/dist/index.cjs +186 -0
  151. package/dist/index.d.cts +37 -0
  152. package/dist/index.d.mts +37 -0
  153. package/dist/index.mjs +39 -0
  154. package/dist/semantics/componentMeta.d.cts +37 -0
  155. package/dist/semantics/componentMeta.d.mts +37 -0
  156. package/dist/semantics/index.cjs +16 -0
  157. package/dist/semantics/index.d.cts +4 -0
  158. package/dist/semantics/index.d.mts +4 -0
  159. package/dist/semantics/index.mjs +3 -0
  160. package/dist/semantics/taxonomy.cjs +150 -0
  161. package/dist/semantics/taxonomy.d.cts +153 -0
  162. package/dist/semantics/taxonomy.d.mts +153 -0
  163. package/dist/semantics/taxonomy.mjs +140 -0
  164. package/dist/tokens/escapeHatch.cjs +13 -0
  165. package/dist/tokens/escapeHatch.mjs +13 -0
  166. package/dist/tokens/focusRing.cjs +28 -0
  167. package/dist/tokens/focusRing.mjs +28 -0
  168. package/dist/tokens/keyframes.cjs +76 -0
  169. package/dist/tokens/keyframes.mjs +75 -0
  170. package/dist/tokens/resolveInteractiveStyle.cjs +41 -0
  171. package/dist/tokens/resolveInteractiveStyle.mjs +41 -0
  172. package/llms.txt +142 -0
  173. package/package.json +70 -0
  174. package/src/tokens/CONTRACT.md +505 -0
@@ -0,0 +1,56 @@
1
+
2
+ import * as React from "react";
3
+ import { CheckboxGroupProps } from "react-aria-components";
4
+
5
+ //#region src/components/CheckboxGroup/CheckboxGroup.d.ts
6
+ /** Formal semantic identity — CheckboxGroup root (Selection entity, multi-choice). */
7
+ declare const checkboxGroupMeta: {
8
+ readonly displayName: "CheckboxGroup";
9
+ readonly entity: "Selection";
10
+ readonly structure: "root";
11
+ };
12
+ /** Props for the CheckboxGroup component. */
13
+ interface CheckboxGroupProps$1 extends Omit<CheckboxGroupProps, 'style' | 'children' | 'className'> {
14
+ /** Group label displayed above the checkboxes. */
15
+ label?: React.ReactNode;
16
+ /** Supplementary helper text linked to the group via `aria-describedby`. */
17
+ description?: React.ReactNode;
18
+ /**
19
+ * Validation message shown when the group is invalid (`isInvalid` /
20
+ * `validate`). Supply caller-localized copy (i18n rule / §6).
21
+ */
22
+ errorMessage?: React.ReactNode;
23
+ /** `Checkbox` option children. */
24
+ children?: React.ReactNode;
25
+ }
26
+ /**
27
+ * A semantic checkbox group built on React Aria's `CheckboxGroup`.
28
+ *
29
+ * Orchestrates a set of independently-selectable `Checkbox` options (multi
30
+ * select — the counterpart of the single-select `RadioGroup`). Group-level
31
+ * validation set via `isInvalid` (or React Aria's `validate`) propagates to
32
+ * every child Checkbox, which surfaces the `invalid` State.
33
+ *
34
+ * Entity = Selection → reads `vars.colors.input.primary.*`. Validation is the
35
+ * `invalid` State, never an `evaluation` variant.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <CheckboxGroup label="Notifications" description="Pick at least one">
40
+ * <Checkbox value="email">Email</Checkbox>
41
+ * <Checkbox value="sms">SMS</Checkbox>
42
+ * </CheckboxGroup>
43
+ * ```
44
+ */
45
+ declare const CheckboxGroup: {
46
+ ({
47
+ label,
48
+ description,
49
+ errorMessage,
50
+ children,
51
+ ...props
52
+ }: CheckboxGroupProps$1): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "CheckboxGroup";
54
+ };
55
+ //#endregion
56
+ export { CheckboxGroup, CheckboxGroupProps$1 as CheckboxGroupProps, checkboxGroupMeta };
@@ -0,0 +1,56 @@
1
+
2
+ import { CheckboxGroupProps } from "react-aria-components";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/CheckboxGroup/CheckboxGroup.d.ts
6
+ /** Formal semantic identity — CheckboxGroup root (Selection entity, multi-choice). */
7
+ declare const checkboxGroupMeta: {
8
+ readonly displayName: "CheckboxGroup";
9
+ readonly entity: "Selection";
10
+ readonly structure: "root";
11
+ };
12
+ /** Props for the CheckboxGroup component. */
13
+ interface CheckboxGroupProps$1 extends Omit<CheckboxGroupProps, 'style' | 'children' | 'className'> {
14
+ /** Group label displayed above the checkboxes. */
15
+ label?: React.ReactNode;
16
+ /** Supplementary helper text linked to the group via `aria-describedby`. */
17
+ description?: React.ReactNode;
18
+ /**
19
+ * Validation message shown when the group is invalid (`isInvalid` /
20
+ * `validate`). Supply caller-localized copy (i18n rule / §6).
21
+ */
22
+ errorMessage?: React.ReactNode;
23
+ /** `Checkbox` option children. */
24
+ children?: React.ReactNode;
25
+ }
26
+ /**
27
+ * A semantic checkbox group built on React Aria's `CheckboxGroup`.
28
+ *
29
+ * Orchestrates a set of independently-selectable `Checkbox` options (multi
30
+ * select — the counterpart of the single-select `RadioGroup`). Group-level
31
+ * validation set via `isInvalid` (or React Aria's `validate`) propagates to
32
+ * every child Checkbox, which surfaces the `invalid` State.
33
+ *
34
+ * Entity = Selection → reads `vars.colors.input.primary.*`. Validation is the
35
+ * `invalid` State, never an `evaluation` variant.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <CheckboxGroup label="Notifications" description="Pick at least one">
40
+ * <Checkbox value="email">Email</Checkbox>
41
+ * <Checkbox value="sms">SMS</Checkbox>
42
+ * </CheckboxGroup>
43
+ * ```
44
+ */
45
+ declare const CheckboxGroup$1: {
46
+ ({
47
+ label,
48
+ description,
49
+ errorMessage,
50
+ children,
51
+ ...props
52
+ }: CheckboxGroupProps$1): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "CheckboxGroup";
54
+ };
55
+ //#endregion
56
+ export { CheckboxGroup$1 as CheckboxGroup, CheckboxGroupProps$1 as CheckboxGroupProps, checkboxGroupMeta };
@@ -0,0 +1,96 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { vars } from "@ttoss/fsl-theme/vars";
3
+ import { CheckboxGroup, FieldError, Label, Text } from "react-aria-components";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/CheckboxGroup/CheckboxGroup.tsx
7
+ /** Formal semantic identity — CheckboxGroup root (Selection entity, multi-choice). */
8
+ var checkboxGroupMeta = {
9
+ displayName: "CheckboxGroup",
10
+ entity: "Selection",
11
+ structure: "root"
12
+ };
13
+ /**
14
+ * Resolve the group's text colors once (default for label/description, invalid
15
+ * for the validation message). Hoisted out of the render so the optional-chain
16
+ * reads live here and keep the component's cyclomatic complexity low.
17
+ */
18
+ var resolveGroupTextColors = c => {
19
+ const text = c?.text;
20
+ return {
21
+ base: text?.default,
22
+ invalid: text?.invalid ?? text?.default
23
+ };
24
+ };
25
+ /**
26
+ * A semantic checkbox group built on React Aria's `CheckboxGroup`.
27
+ *
28
+ * Orchestrates a set of independently-selectable `Checkbox` options (multi
29
+ * select — the counterpart of the single-select `RadioGroup`). Group-level
30
+ * validation set via `isInvalid` (or React Aria's `validate`) propagates to
31
+ * every child Checkbox, which surfaces the `invalid` State.
32
+ *
33
+ * Entity = Selection → reads `vars.colors.input.primary.*`. Validation is the
34
+ * `invalid` State, never an `evaluation` variant.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <CheckboxGroup label="Notifications" description="Pick at least one">
39
+ * <Checkbox value="email">Email</Checkbox>
40
+ * <Checkbox value="sms">SMS</Checkbox>
41
+ * </CheckboxGroup>
42
+ * ```
43
+ */
44
+ var CheckboxGroup$1 = ({
45
+ label,
46
+ description,
47
+ errorMessage,
48
+ children,
49
+ ...props
50
+ }) => {
51
+ const {
52
+ base,
53
+ invalid
54
+ } = resolveGroupTextColors(vars.colors.input.primary);
55
+ return /* @__PURE__ */jsxs(CheckboxGroup, {
56
+ ...props,
57
+ "data-scope": "checkbox-group",
58
+ "data-part": "root",
59
+ style: {
60
+ boxSizing: "border-box",
61
+ display: "flex",
62
+ flexDirection: "column",
63
+ gap: vars.spacing.gap.stack.sm
64
+ },
65
+ children: [label != null && /* @__PURE__ */jsx(Label, {
66
+ "data-scope": "checkbox-group",
67
+ "data-part": "label",
68
+ style: {
69
+ ...vars.text.label.md,
70
+ color: base
71
+ },
72
+ children: label
73
+ }), children, description != null && /* @__PURE__ */jsx(Text, {
74
+ slot: "description",
75
+ "data-scope": "checkbox-group",
76
+ "data-part": "description",
77
+ style: {
78
+ ...vars.text.label.sm,
79
+ color: base
80
+ },
81
+ children: description
82
+ }), /* @__PURE__ */jsx(FieldError, {
83
+ "data-scope": "checkbox-group",
84
+ "data-part": "validationMessage",
85
+ style: {
86
+ ...vars.text.label.sm,
87
+ color: invalid
88
+ },
89
+ children: errorMessage
90
+ })]
91
+ });
92
+ };
93
+ CheckboxGroup$1.displayName = checkboxGroupMeta.displayName;
94
+
95
+ //#endregion
96
+ export { CheckboxGroup$1 as CheckboxGroup, checkboxGroupMeta };
@@ -0,0 +1,51 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ const require_Button = require('../Button/Button.cjs');
3
+ let react_aria_components = require("react-aria-components");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+
6
+ //#region src/components/FileTrigger/FileTrigger.tsx
7
+ /** Formal semantic identity — FileTrigger root (Action entity). */
8
+ var fileTriggerMeta = {
9
+ displayName: "FileTrigger",
10
+ entity: "Action",
11
+ structure: "root"
12
+ };
13
+ /**
14
+ * A semantic file-picker trigger built on React Aria's `FileTrigger`.
15
+ *
16
+ * Entity = Action. Renders a `Button` that opens the OS file dialog on press
17
+ * and reports the chosen files via `onSelect`. Configure `acceptedFileTypes`,
18
+ * `allowsMultiple`, and `acceptDirectory` as needed.
19
+ *
20
+ * For drag-and-drop upload, pair with a `DropZone` (deferred to Phase 4) — the
21
+ * `droptarget` State lives there, not on this click trigger.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <FileTrigger
26
+ * acceptedFileTypes={['image/*']}
27
+ * onSelect={(files) => upload(files)}
28
+ * >
29
+ * Upload avatar
30
+ * </FileTrigger>
31
+ * ```
32
+ */
33
+ var FileTrigger = ({
34
+ evaluation = "primary",
35
+ children,
36
+ ...props
37
+ }) => {
38
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.FileTrigger, {
39
+ ...props,
40
+ children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(require_Button.Button, {
41
+ "data-scope": "file-trigger",
42
+ evaluation,
43
+ children
44
+ })
45
+ });
46
+ };
47
+ FileTrigger.displayName = fileTriggerMeta.displayName;
48
+
49
+ //#endregion
50
+ exports.FileTrigger = FileTrigger;
51
+ exports.fileTriggerMeta = fileTriggerMeta;
@@ -0,0 +1,52 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.cjs";
3
+ import * as React from "react";
4
+ import { FileTriggerProps } from "react-aria-components";
5
+
6
+ //#region src/components/FileTrigger/FileTrigger.d.ts
7
+ /** Formal semantic identity — FileTrigger root (Action entity). */
8
+ declare const fileTriggerMeta: {
9
+ readonly displayName: "FileTrigger";
10
+ readonly entity: "Action";
11
+ readonly structure: "root";
12
+ };
13
+ /** Props for the FileTrigger component. */
14
+ interface FileTriggerProps$1 extends Omit<FileTriggerProps, 'children'> {
15
+ /**
16
+ * Authorial emphasis of the trigger button.
17
+ * @default 'primary'
18
+ */
19
+ evaluation?: EvaluationsFor<(typeof fileTriggerMeta)['entity']>;
20
+ /** Label content of the trigger button (e.g. "Upload avatar"). */
21
+ children?: React.ReactNode;
22
+ }
23
+ /**
24
+ * A semantic file-picker trigger built on React Aria's `FileTrigger`.
25
+ *
26
+ * Entity = Action. Renders a `Button` that opens the OS file dialog on press
27
+ * and reports the chosen files via `onSelect`. Configure `acceptedFileTypes`,
28
+ * `allowsMultiple`, and `acceptDirectory` as needed.
29
+ *
30
+ * For drag-and-drop upload, pair with a `DropZone` (deferred to Phase 4) — the
31
+ * `droptarget` State lives there, not on this click trigger.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <FileTrigger
36
+ * acceptedFileTypes={['image/*']}
37
+ * onSelect={(files) => upload(files)}
38
+ * >
39
+ * Upload avatar
40
+ * </FileTrigger>
41
+ * ```
42
+ */
43
+ declare const FileTrigger: {
44
+ ({
45
+ evaluation,
46
+ children,
47
+ ...props
48
+ }: FileTriggerProps$1): import("react/jsx-runtime").JSX.Element;
49
+ displayName: "FileTrigger";
50
+ };
51
+ //#endregion
52
+ export { FileTrigger, FileTriggerProps$1 as FileTriggerProps, fileTriggerMeta };
@@ -0,0 +1,52 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.mjs";
3
+ import { FileTriggerProps } from "react-aria-components";
4
+ import * as React from "react";
5
+
6
+ //#region src/components/FileTrigger/FileTrigger.d.ts
7
+ /** Formal semantic identity — FileTrigger root (Action entity). */
8
+ declare const fileTriggerMeta: {
9
+ readonly displayName: "FileTrigger";
10
+ readonly entity: "Action";
11
+ readonly structure: "root";
12
+ };
13
+ /** Props for the FileTrigger component. */
14
+ interface FileTriggerProps$1 extends Omit<FileTriggerProps, 'children'> {
15
+ /**
16
+ * Authorial emphasis of the trigger button.
17
+ * @default 'primary'
18
+ */
19
+ evaluation?: EvaluationsFor<(typeof fileTriggerMeta)['entity']>;
20
+ /** Label content of the trigger button (e.g. "Upload avatar"). */
21
+ children?: React.ReactNode;
22
+ }
23
+ /**
24
+ * A semantic file-picker trigger built on React Aria's `FileTrigger`.
25
+ *
26
+ * Entity = Action. Renders a `Button` that opens the OS file dialog on press
27
+ * and reports the chosen files via `onSelect`. Configure `acceptedFileTypes`,
28
+ * `allowsMultiple`, and `acceptDirectory` as needed.
29
+ *
30
+ * For drag-and-drop upload, pair with a `DropZone` (deferred to Phase 4) — the
31
+ * `droptarget` State lives there, not on this click trigger.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <FileTrigger
36
+ * acceptedFileTypes={['image/*']}
37
+ * onSelect={(files) => upload(files)}
38
+ * >
39
+ * Upload avatar
40
+ * </FileTrigger>
41
+ * ```
42
+ */
43
+ declare const FileTrigger$1: {
44
+ ({
45
+ evaluation,
46
+ children,
47
+ ...props
48
+ }: FileTriggerProps$1): import("react/jsx-runtime").JSX.Element;
49
+ displayName: "FileTrigger";
50
+ };
51
+ //#endregion
52
+ export { FileTrigger$1 as FileTrigger, FileTriggerProps$1 as FileTriggerProps, fileTriggerMeta };
@@ -0,0 +1,50 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { Button as Button$1 } from "../Button/Button.mjs";
3
+ import { FileTrigger } from "react-aria-components";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/components/FileTrigger/FileTrigger.tsx
7
+ /** Formal semantic identity — FileTrigger root (Action entity). */
8
+ var fileTriggerMeta = {
9
+ displayName: "FileTrigger",
10
+ entity: "Action",
11
+ structure: "root"
12
+ };
13
+ /**
14
+ * A semantic file-picker trigger built on React Aria's `FileTrigger`.
15
+ *
16
+ * Entity = Action. Renders a `Button` that opens the OS file dialog on press
17
+ * and reports the chosen files via `onSelect`. Configure `acceptedFileTypes`,
18
+ * `allowsMultiple`, and `acceptDirectory` as needed.
19
+ *
20
+ * For drag-and-drop upload, pair with a `DropZone` (deferred to Phase 4) — the
21
+ * `droptarget` State lives there, not on this click trigger.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <FileTrigger
26
+ * acceptedFileTypes={['image/*']}
27
+ * onSelect={(files) => upload(files)}
28
+ * >
29
+ * Upload avatar
30
+ * </FileTrigger>
31
+ * ```
32
+ */
33
+ var FileTrigger$1 = ({
34
+ evaluation = "primary",
35
+ children,
36
+ ...props
37
+ }) => {
38
+ return /* @__PURE__ */jsx(FileTrigger, {
39
+ ...props,
40
+ children: /* @__PURE__ */jsx(Button$1, {
41
+ "data-scope": "file-trigger",
42
+ evaluation,
43
+ children
44
+ })
45
+ });
46
+ };
47
+ FileTrigger$1.displayName = fileTriggerMeta.displayName;
48
+
49
+ //#endregion
50
+ export { FileTrigger$1 as FileTrigger, fileTriggerMeta };
@@ -0,0 +1,220 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ const require_focusRing = require('../../tokens/focusRing.cjs');
3
+ const require_resolveInteractiveStyle = require('../../tokens/resolveInteractiveStyle.cjs');
4
+ const require_Icon = require('../Icon/Icon.cjs');
5
+ let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
6
+ let react_aria_components = require("react-aria-components");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+
9
+ //#region src/components/GridList/GridList.tsx
10
+ /** Formal semantic identity — GridList root (Collection entity, surface). */
11
+ var gridListMeta = {
12
+ displayName: "GridList",
13
+ entity: "Collection",
14
+ structure: "root"
15
+ };
16
+ /** Formal semantic identity — GridListItem (Selection entity, selectable row). */
17
+ var gridListItemMeta = {
18
+ displayName: "GridListItem",
19
+ entity: "Selection",
20
+ structure: "item",
21
+ composition: "selection"
22
+ };
23
+ /** Row (item) chrome — reflects the `selected` set-membership State. */
24
+ var buildRowStyle = ({
25
+ c,
26
+ isSelected,
27
+ isHovered,
28
+ isFocusVisible,
29
+ isDisabled
30
+ }) => {
31
+ return {
32
+ boxSizing: "border-box",
33
+ display: "flex",
34
+ alignItems: "center",
35
+ gap: _ttoss_fsl_theme_vars.vars.spacing.gap.inline.sm,
36
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
37
+ paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
38
+ paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
39
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
40
+ cursor: isDisabled ? "not-allowed" : "pointer",
41
+ opacity: isDisabled ? _ttoss_fsl_theme_vars.vars.opacity.disabled : void 0,
42
+ ..._ttoss_fsl_theme_vars.vars.text.label.md,
43
+ transitionProperty: "background-color, color",
44
+ transitionDuration: _ttoss_fsl_theme_vars.vars.motion.feedback.duration,
45
+ transitionTimingFunction: _ttoss_fsl_theme_vars.vars.motion.feedback.easing,
46
+ backgroundColor: require_resolveInteractiveStyle.resolveInteractiveStyle(c?.background, {
47
+ isDisabled,
48
+ isSelected,
49
+ isHovered
50
+ }),
51
+ color: require_resolveInteractiveStyle.resolveInteractiveStyle(c?.text, {
52
+ isDisabled,
53
+ isSelected,
54
+ isHovered
55
+ }) ?? c?.text?.default,
56
+ outline: require_focusRing.focusRingOutline(isFocusVisible),
57
+ outlineOffset: "-2px"
58
+ };
59
+ };
60
+ var SELECTION_BOX_SIZE = "1.125rem";
61
+ /** Static box chrome for the row's selection checkbox. */
62
+ var SELECTION_BOX_STYLE = {
63
+ boxSizing: "border-box",
64
+ flexShrink: 0,
65
+ display: "inline-flex",
66
+ alignItems: "center",
67
+ justifyContent: "center",
68
+ width: SELECTION_BOX_SIZE,
69
+ height: SELECTION_BOX_SIZE,
70
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
71
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.control.width,
72
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style
73
+ };
74
+ /**
75
+ * Selection-box colors resolved once (checked vs default). Hoisted so the
76
+ * render callback stays under the cyclomatic-complexity limit.
77
+ */
78
+ var buildSelectionBoxStyle = ({
79
+ c,
80
+ on
81
+ }) => {
82
+ const text = c?.text;
83
+ const key = on ? "checked" : "default";
84
+ return {
85
+ ...SELECTION_BOX_STYLE,
86
+ backgroundColor: c?.background?.[key],
87
+ borderColor: c?.border?.[key],
88
+ color: text?.checked ?? text?.default
89
+ };
90
+ };
91
+ /**
92
+ * The per-row selection control (a checkbox). Internal — RAC wires it to the
93
+ * row's selection via `slot="selection"`; reads `input.primary` chrome.
94
+ */
95
+ var RowSelectionControl = () => {
96
+ const c = _ttoss_fsl_theme_vars.vars.colors.input.primary;
97
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Checkbox, {
98
+ slot: "selection",
99
+ "data-scope": "grid-list",
100
+ "data-part": "selectionControl",
101
+ style: {
102
+ display: "inline-flex"
103
+ },
104
+ children: ({
105
+ isSelected,
106
+ isIndeterminate
107
+ }) => {
108
+ const on = isSelected || isIndeterminate;
109
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
110
+ "aria-hidden": true,
111
+ style: buildSelectionBoxStyle({
112
+ c,
113
+ on
114
+ }),
115
+ children: on && /* @__PURE__ */(0, react_jsx_runtime.jsx)(require_Icon.Icon, {
116
+ intent: isIndeterminate ? "selection.indeterminate" : "selection.checked",
117
+ size: "sm"
118
+ })
119
+ });
120
+ }
121
+ });
122
+ };
123
+ /**
124
+ * A standalone semantic grid list built on React Aria's `GridList` — rows of
125
+ * selectable content, each with a selection checkbox.
126
+ *
127
+ * Per ADR-007 the CONTAINER is Entity = Collection (an `informational`
128
+ * surface) and each `GridListItem` is Entity = Selection (`input` chrome).
129
+ * Set `selectionMode="single|multiple"`. Use `GridListItem` per row (pass
130
+ * `textValue` when the row content is not plain text).
131
+ *
132
+ * @example
133
+ * ```tsx
134
+ * <GridList aria-label="Files" selectionMode="multiple">
135
+ * <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
136
+ * <GridListItem id="b" textValue="Notes">Notes.txt</GridListItem>
137
+ * </GridList>
138
+ * ```
139
+ */
140
+ var GridList = ({
141
+ children,
142
+ ...props
143
+ }) => {
144
+ const surface = _ttoss_fsl_theme_vars.vars.colors.informational.primary;
145
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.GridList, {
146
+ ...props,
147
+ "data-scope": "grid-list",
148
+ "data-part": "root",
149
+ style: {
150
+ boxSizing: "border-box",
151
+ display: "flex",
152
+ flexDirection: "column",
153
+ gap: _ttoss_fsl_theme_vars.vars.spacing.gap.stack.xs,
154
+ padding: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.sm,
155
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.surface,
156
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
157
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
158
+ borderColor: surface?.border?.default ?? "transparent",
159
+ backgroundColor: surface?.background?.default
160
+ },
161
+ children
162
+ });
163
+ };
164
+ GridList.displayName = gridListMeta.displayName;
165
+ /**
166
+ * A single selectable row inside a `GridList`. Entity = Selection → reads
167
+ * `vars.colors.input.primary.*`, renders a `selectionControl` checkbox, and
168
+ * surfaces the `selected` State.
169
+ *
170
+ * @example
171
+ * ```tsx
172
+ * <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
173
+ * ```
174
+ */
175
+ var GridListItem = ({
176
+ children,
177
+ ...props
178
+ }) => {
179
+ const c = _ttoss_fsl_theme_vars.vars.colors.input.primary;
180
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.GridListItem, {
181
+ ...props,
182
+ "data-scope": "grid-list",
183
+ "data-part": "item",
184
+ style: ({
185
+ isSelected,
186
+ isHovered,
187
+ isFocusVisible,
188
+ isDisabled
189
+ }) => {
190
+ return buildRowStyle({
191
+ c,
192
+ isSelected,
193
+ isHovered,
194
+ isFocusVisible,
195
+ isDisabled
196
+ });
197
+ },
198
+ children: ({
199
+ selectionMode
200
+ }) => {
201
+ return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, {
202
+ children: [selectionMode !== "none" && /* @__PURE__ */(0, react_jsx_runtime.jsx)(RowSelectionControl, {}), /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
203
+ "data-scope": "grid-list",
204
+ "data-part": "content",
205
+ style: {
206
+ flex: 1
207
+ },
208
+ children
209
+ })]
210
+ });
211
+ }
212
+ });
213
+ };
214
+ GridListItem.displayName = gridListItemMeta.displayName;
215
+
216
+ //#endregion
217
+ exports.GridList = GridList;
218
+ exports.GridListItem = GridListItem;
219
+ exports.gridListItemMeta = gridListItemMeta;
220
+ exports.gridListMeta = gridListMeta;