@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,181 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { focusRingOutline } from "../../tokens/focusRing.mjs";
3
+ import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
4
+ import { createPresenceScope } from "../scope.mjs";
5
+ import { vars } from "@ttoss/fsl-theme/vars";
6
+ import { FieldError, Label, Text, TextArea, TextField } from "react-aria-components";
7
+ import { jsx } from "react/jsx-runtime";
8
+
9
+ //#region src/composites/TextArea/TextArea.tsx
10
+ var textAreaScope = createPresenceScope("TextArea");
11
+ /** Formal semantic identity — TextArea root (Input entity). */
12
+ var textAreaMeta = {
13
+ displayName: "TextArea",
14
+ entity: "Input",
15
+ structure: "root"
16
+ };
17
+ /** Formal semantic identity — label slot. */
18
+ var textAreaLabelMeta = {
19
+ displayName: "TextAreaLabel",
20
+ entity: "Input",
21
+ structure: "label",
22
+ composition: "label"
23
+ };
24
+ /** Formal semantic identity — control slot (the `<textarea>`). */
25
+ var textAreaControlMeta = {
26
+ displayName: "TextAreaControl",
27
+ entity: "Input",
28
+ structure: "control",
29
+ composition: "control"
30
+ };
31
+ /** Formal semantic identity — description slot. */
32
+ var textAreaDescriptionMeta = {
33
+ displayName: "TextAreaDescription",
34
+ entity: "Input",
35
+ structure: "description",
36
+ composition: "description"
37
+ };
38
+ /** Formal semantic identity — status slot (validation message). */
39
+ var textAreaErrorMeta = {
40
+ displayName: "TextAreaError",
41
+ entity: "Input",
42
+ structure: "validationMessage",
43
+ composition: "status"
44
+ };
45
+ /**
46
+ * A multiline text input composite (Input entity) — the multiline sibling of
47
+ * `TextField`. Composes `TextAreaLabel`, `TextAreaControl`,
48
+ * `TextAreaDescription`, and `TextAreaError`. Validation is driven by React
49
+ * Aria's `isInvalid` / `validate`.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <TextArea isRequired>
54
+ * <TextAreaLabel>Notes</TextAreaLabel>
55
+ * <TextAreaControl rows={4} />
56
+ * <TextAreaError />
57
+ * </TextArea>
58
+ * ```
59
+ */
60
+ var TextArea$1 = ({
61
+ children,
62
+ ...props
63
+ }) => {
64
+ return /* @__PURE__ */jsx(TextField, {
65
+ ...props,
66
+ "data-scope": "text-area",
67
+ "data-part": "root",
68
+ style: {
69
+ boxSizing: "border-box",
70
+ display: "flex",
71
+ flexDirection: "column",
72
+ gap: vars.spacing.gap.stack.xs
73
+ },
74
+ children: values => {
75
+ return /* @__PURE__ */jsx(textAreaScope.Provider, {
76
+ children: typeof children === "function" ? children(values) : children
77
+ });
78
+ }
79
+ });
80
+ };
81
+ TextArea$1.displayName = textAreaMeta.displayName;
82
+ /** The label slot of a TextArea. */
83
+ var TextAreaLabel = props => {
84
+ textAreaScope.use(textAreaLabelMeta.displayName);
85
+ const colors = vars.colors.input.primary;
86
+ return /* @__PURE__ */jsx(Label, {
87
+ ...props,
88
+ "data-scope": "text-area",
89
+ "data-part": "label",
90
+ style: {
91
+ color: colors?.text?.default,
92
+ ...vars.text.label.md
93
+ }
94
+ });
95
+ };
96
+ TextAreaLabel.displayName = textAreaLabelMeta.displayName;
97
+ /**
98
+ * The control slot — the actual `<textarea>`. Surfaces the `invalid` State
99
+ * via `vars.colors.input.primary.*`; vertical resize is enabled.
100
+ */
101
+ var TextAreaControl = props => {
102
+ textAreaScope.use(textAreaControlMeta.displayName);
103
+ const colors = vars.colors.input.primary;
104
+ return /* @__PURE__ */jsx(TextArea, {
105
+ ...props,
106
+ "data-scope": "text-area",
107
+ "data-part": "control",
108
+ style: ({
109
+ isHovered,
110
+ isDisabled,
111
+ isFocusVisible,
112
+ isInvalid
113
+ }) => {
114
+ return {
115
+ boxSizing: "border-box",
116
+ resize: "vertical",
117
+ minBlockSize: vars.sizing.hit.base,
118
+ paddingBlock: vars.spacing.inset.control.sm,
119
+ paddingInline: vars.spacing.inset.control.md,
120
+ borderRadius: vars.radii.control,
121
+ borderWidth: vars.border.outline.control.width,
122
+ borderStyle: vars.border.outline.control.style,
123
+ transitionDuration: vars.motion.feedback.duration,
124
+ transitionTimingFunction: vars.motion.feedback.easing,
125
+ transitionProperty: "background-color, border-color, color",
126
+ backgroundColor: resolveInteractiveStyle(colors?.background, {
127
+ isHovered,
128
+ isDisabled,
129
+ isInvalid
130
+ }),
131
+ borderColor: resolveInteractiveStyle(colors?.border, {
132
+ isDisabled,
133
+ isInvalid,
134
+ isFocusVisible
135
+ }),
136
+ color: resolveInteractiveStyle(colors?.text, {
137
+ isHovered,
138
+ isDisabled,
139
+ isInvalid
140
+ }) ?? colors?.text?.default,
141
+ outline: focusRingOutline(isFocusVisible),
142
+ ...vars.text.label.md
143
+ };
144
+ }
145
+ });
146
+ };
147
+ TextAreaControl.displayName = textAreaControlMeta.displayName;
148
+ /** Helper/description text linked to the control. */
149
+ var TextAreaDescription = props => {
150
+ textAreaScope.use(textAreaDescriptionMeta.displayName);
151
+ const colors = vars.colors.input.primary;
152
+ return /* @__PURE__ */jsx(Text, {
153
+ slot: "description",
154
+ ...props,
155
+ "data-scope": "text-area",
156
+ "data-part": "description",
157
+ style: {
158
+ color: colors?.text?.default,
159
+ ...vars.text.label.sm
160
+ }
161
+ });
162
+ };
163
+ TextAreaDescription.displayName = textAreaDescriptionMeta.displayName;
164
+ /** Validation message — rendered by React Aria only when the field is invalid. */
165
+ var TextAreaError = props => {
166
+ textAreaScope.use(textAreaErrorMeta.displayName);
167
+ const colors = vars.colors.input.primary;
168
+ return /* @__PURE__ */jsx(FieldError, {
169
+ ...props,
170
+ "data-scope": "text-area",
171
+ "data-part": "validationMessage",
172
+ style: {
173
+ color: colors?.text?.invalid ?? colors?.text?.default,
174
+ ...vars.text.label.sm
175
+ }
176
+ });
177
+ };
178
+ TextAreaError.displayName = textAreaErrorMeta.displayName;
179
+
180
+ //#endregion
181
+ export { TextArea$1 as TextArea, TextAreaControl, TextAreaDescription, TextAreaError, TextAreaLabel, textAreaControlMeta, textAreaDescriptionMeta, textAreaErrorMeta, textAreaLabelMeta, textAreaMeta };
@@ -0,0 +1,200 @@
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_scope = require('../scope.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/composites/TextField/TextField.tsx
10
+ var textFieldScope = require_scope.createPresenceScope("TextField");
11
+ /** Formal semantic identity — TextField root (Input entity, root part). */
12
+ var textFieldMeta = {
13
+ displayName: "TextField",
14
+ entity: "Input",
15
+ structure: "root"
16
+ };
17
+ /** Formal semantic identity — label slot. */
18
+ var textFieldLabelMeta = {
19
+ displayName: "TextFieldLabel",
20
+ entity: "Input",
21
+ structure: "label",
22
+ composition: "label"
23
+ };
24
+ /** Formal semantic identity — control slot (the actual input element). */
25
+ var textFieldControlMeta = {
26
+ displayName: "TextFieldControl",
27
+ entity: "Input",
28
+ structure: "control",
29
+ composition: "control"
30
+ };
31
+ /** Formal semantic identity — description slot (helper text). */
32
+ var textFieldDescriptionMeta = {
33
+ displayName: "TextFieldDescription",
34
+ entity: "Input",
35
+ structure: "description",
36
+ composition: "description"
37
+ };
38
+ /** Formal semantic identity — status slot (validation message). */
39
+ var textFieldErrorMeta = {
40
+ displayName: "TextFieldError",
41
+ entity: "Input",
42
+ structure: "validationMessage",
43
+ composition: "status"
44
+ };
45
+ /**
46
+ * A semantic text input composite built on React Aria's `TextField`.
47
+ *
48
+ * Composes four slots: `TextFieldLabel`, `TextFieldControl`,
49
+ * `TextFieldDescription`, and `TextFieldError`. Each sub-part carries its
50
+ * own `ComponentMeta` with a `composition` role per FSL §4.
51
+ *
52
+ * Validation feedback is driven by React Aria's `isInvalid` prop or
53
+ * `validate` callback and surfaces on the control, label, and validation
54
+ * message via the `invalid` token State.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <TextField isRequired>
59
+ * <TextFieldLabel>Email</TextFieldLabel>
60
+ * <TextFieldControl type="email" />
61
+ * <TextFieldDescription>We never share your email.</TextFieldDescription>
62
+ * <TextFieldError />
63
+ * </TextField>
64
+ * ```
65
+ */
66
+ var TextField = ({
67
+ children,
68
+ ...props
69
+ }) => {
70
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.TextField, {
71
+ ...props,
72
+ "data-scope": "text-field",
73
+ "data-part": "root",
74
+ style: {
75
+ boxSizing: "border-box",
76
+ display: "flex",
77
+ flexDirection: "column",
78
+ gap: _ttoss_fsl_theme_vars.vars.spacing.gap.stack.xs
79
+ },
80
+ children: values => {
81
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(textFieldScope.Provider, {
82
+ children: typeof children === "function" ? children(values) : children
83
+ });
84
+ }
85
+ });
86
+ };
87
+ TextField.displayName = textFieldMeta.displayName;
88
+ /** The label slot of a TextField. Wired to React Aria for a11y linkage. */
89
+ var TextFieldLabel = props => {
90
+ textFieldScope.use(textFieldLabelMeta.displayName);
91
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
92
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Label, {
93
+ ...props,
94
+ "data-scope": "text-field",
95
+ "data-part": "label",
96
+ style: {
97
+ color: colors?.text?.default,
98
+ ..._ttoss_fsl_theme_vars.vars.text.label.md
99
+ }
100
+ });
101
+ };
102
+ TextFieldLabel.displayName = textFieldLabelMeta.displayName;
103
+ /**
104
+ * The control slot of a TextField — the actual `<input>` element. Reads
105
+ * `isInvalid` from React Aria's render-props and surfaces the `invalid`
106
+ * State via `vars.colors.input.primary.*`.
107
+ */
108
+ var TextFieldControl = props => {
109
+ textFieldScope.use(textFieldControlMeta.displayName);
110
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
111
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Input, {
112
+ ...props,
113
+ "data-scope": "text-field",
114
+ "data-part": "control",
115
+ style: ({
116
+ isHovered,
117
+ isDisabled,
118
+ isFocusVisible,
119
+ isInvalid
120
+ }) => {
121
+ return {
122
+ boxSizing: "border-box",
123
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
124
+ paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
125
+ paddingInline: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
126
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
127
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.control.width,
128
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style,
129
+ transitionDuration: _ttoss_fsl_theme_vars.vars.motion.feedback.duration,
130
+ transitionTimingFunction: _ttoss_fsl_theme_vars.vars.motion.feedback.easing,
131
+ transitionProperty: "background-color, border-color, color",
132
+ backgroundColor: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.background, {
133
+ isHovered,
134
+ isDisabled,
135
+ isInvalid
136
+ }),
137
+ borderColor: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.border, {
138
+ isDisabled,
139
+ isInvalid,
140
+ isFocusVisible
141
+ }),
142
+ color: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.text, {
143
+ isHovered,
144
+ isDisabled,
145
+ isInvalid
146
+ }) ?? colors?.text?.default,
147
+ outline: require_focusRing.focusRingOutline(isFocusVisible),
148
+ ..._ttoss_fsl_theme_vars.vars.text.label.md
149
+ };
150
+ }
151
+ });
152
+ };
153
+ TextFieldControl.displayName = textFieldControlMeta.displayName;
154
+ /** Helper/description text linked to the control via React Aria's slot. */
155
+ var TextFieldDescription = props => {
156
+ textFieldScope.use(textFieldDescriptionMeta.displayName);
157
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
158
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Text, {
159
+ slot: "description",
160
+ ...props,
161
+ "data-scope": "text-field",
162
+ "data-part": "description",
163
+ style: {
164
+ color: colors?.text?.default,
165
+ ..._ttoss_fsl_theme_vars.vars.text.label.sm
166
+ }
167
+ });
168
+ };
169
+ TextFieldDescription.displayName = textFieldDescriptionMeta.displayName;
170
+ /**
171
+ * Validation message — rendered by React Aria only when the field is
172
+ * invalid. Uses the `invalid` State of the canonical `input.primary`
173
+ * subtree (mirroring the control's invalid coloring).
174
+ */
175
+ var TextFieldError = props => {
176
+ textFieldScope.use(textFieldErrorMeta.displayName);
177
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
178
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.FieldError, {
179
+ ...props,
180
+ "data-scope": "text-field",
181
+ "data-part": "validationMessage",
182
+ style: {
183
+ color: colors?.text?.invalid ?? colors?.text?.default,
184
+ ..._ttoss_fsl_theme_vars.vars.text.label.sm
185
+ }
186
+ });
187
+ };
188
+ TextFieldError.displayName = textFieldErrorMeta.displayName;
189
+
190
+ //#endregion
191
+ exports.TextField = TextField;
192
+ exports.TextFieldControl = TextFieldControl;
193
+ exports.TextFieldDescription = TextFieldDescription;
194
+ exports.TextFieldError = TextFieldError;
195
+ exports.TextFieldLabel = TextFieldLabel;
196
+ exports.textFieldControlMeta = textFieldControlMeta;
197
+ exports.textFieldDescriptionMeta = textFieldDescriptionMeta;
198
+ exports.textFieldErrorMeta = textFieldErrorMeta;
199
+ exports.textFieldLabelMeta = textFieldLabelMeta;
200
+ exports.textFieldMeta = textFieldMeta;
@@ -0,0 +1,111 @@
1
+
2
+ import { FieldErrorProps, InputProps, LabelProps, TextFieldProps, TextProps } from "react-aria-components";
3
+
4
+ //#region src/composites/TextField/TextField.d.ts
5
+ /** Formal semantic identity — TextField root (Input entity, root part). */
6
+ declare const textFieldMeta: {
7
+ readonly displayName: "TextField";
8
+ readonly entity: "Input";
9
+ readonly structure: "root";
10
+ };
11
+ /** Formal semantic identity — label slot. */
12
+ declare const textFieldLabelMeta: {
13
+ readonly displayName: "TextFieldLabel";
14
+ readonly entity: "Input";
15
+ readonly structure: "label";
16
+ readonly composition: "label";
17
+ };
18
+ /** Formal semantic identity — control slot (the actual input element). */
19
+ declare const textFieldControlMeta: {
20
+ readonly displayName: "TextFieldControl";
21
+ readonly entity: "Input";
22
+ readonly structure: "control";
23
+ readonly composition: "control";
24
+ };
25
+ /** Formal semantic identity — description slot (helper text). */
26
+ declare const textFieldDescriptionMeta: {
27
+ readonly displayName: "TextFieldDescription";
28
+ readonly entity: "Input";
29
+ readonly structure: "description";
30
+ readonly composition: "description";
31
+ };
32
+ /** Formal semantic identity — status slot (validation message). */
33
+ declare const textFieldErrorMeta: {
34
+ readonly displayName: "TextFieldError";
35
+ readonly entity: "Input";
36
+ readonly structure: "validationMessage";
37
+ readonly composition: "status";
38
+ };
39
+ /**
40
+ * Props for the TextField root.
41
+ *
42
+ * The composite owns its layout; pass `style`/`className` on a wrapping
43
+ * element rather than on the composite root. See CONTRIBUTING §4.
44
+ */
45
+ type TextFieldProps$1 = Omit<TextFieldProps, 'style' | 'className'>;
46
+ /**
47
+ * A semantic text input composite built on React Aria's `TextField`.
48
+ *
49
+ * Composes four slots: `TextFieldLabel`, `TextFieldControl`,
50
+ * `TextFieldDescription`, and `TextFieldError`. Each sub-part carries its
51
+ * own `ComponentMeta` with a `composition` role per FSL §4.
52
+ *
53
+ * Validation feedback is driven by React Aria's `isInvalid` prop or
54
+ * `validate` callback and surfaces on the control, label, and validation
55
+ * message via the `invalid` token State.
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <TextField isRequired>
60
+ * <TextFieldLabel>Email</TextFieldLabel>
61
+ * <TextFieldControl type="email" />
62
+ * <TextFieldDescription>We never share your email.</TextFieldDescription>
63
+ * <TextFieldError />
64
+ * </TextField>
65
+ * ```
66
+ */
67
+ declare const TextField: {
68
+ ({
69
+ children,
70
+ ...props
71
+ }: TextFieldProps$1): import("react/jsx-runtime").JSX.Element;
72
+ displayName: "TextField";
73
+ };
74
+ /** Props for the TextField label. */
75
+ type TextFieldLabelProps = Omit<LabelProps, 'style' | 'className'>;
76
+ /** The label slot of a TextField. Wired to React Aria for a11y linkage. */
77
+ declare const TextFieldLabel: {
78
+ (props: TextFieldLabelProps): import("react/jsx-runtime").JSX.Element;
79
+ displayName: "TextFieldLabel";
80
+ };
81
+ /** Props for the TextField control. */
82
+ type TextFieldControlProps = Omit<InputProps, 'style' | 'className'>;
83
+ /**
84
+ * The control slot of a TextField — the actual `<input>` element. Reads
85
+ * `isInvalid` from React Aria's render-props and surfaces the `invalid`
86
+ * State via `vars.colors.input.primary.*`.
87
+ */
88
+ declare const TextFieldControl: {
89
+ (props: TextFieldControlProps): import("react/jsx-runtime").JSX.Element;
90
+ displayName: "TextFieldControl";
91
+ };
92
+ /** Props for the TextField description. */
93
+ type TextFieldDescriptionProps = Omit<TextProps, 'style' | 'className' | 'slot'>;
94
+ /** Helper/description text linked to the control via React Aria's slot. */
95
+ declare const TextFieldDescription: {
96
+ (props: TextFieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
97
+ displayName: "TextFieldDescription";
98
+ };
99
+ /** Props for the TextField error. */
100
+ type TextFieldErrorProps = Omit<FieldErrorProps, 'style' | 'className'>;
101
+ /**
102
+ * Validation message — rendered by React Aria only when the field is
103
+ * invalid. Uses the `invalid` State of the canonical `input.primary`
104
+ * subtree (mirroring the control's invalid coloring).
105
+ */
106
+ declare const TextFieldError: {
107
+ (props: TextFieldErrorProps): import("react/jsx-runtime").JSX.Element;
108
+ displayName: "TextFieldError";
109
+ };
110
+ //#endregion
111
+ export { TextField, TextFieldControl, TextFieldControlProps, TextFieldDescription, TextFieldDescriptionProps, TextFieldError, TextFieldErrorProps, TextFieldLabel, TextFieldLabelProps, TextFieldProps$1 as TextFieldProps, textFieldControlMeta, textFieldDescriptionMeta, textFieldErrorMeta, textFieldLabelMeta, textFieldMeta };
@@ -0,0 +1,111 @@
1
+
2
+ import { FieldErrorProps, InputProps, LabelProps, TextFieldProps, TextProps } from "react-aria-components";
3
+
4
+ //#region src/composites/TextField/TextField.d.ts
5
+ /** Formal semantic identity — TextField root (Input entity, root part). */
6
+ declare const textFieldMeta: {
7
+ readonly displayName: "TextField";
8
+ readonly entity: "Input";
9
+ readonly structure: "root";
10
+ };
11
+ /** Formal semantic identity — label slot. */
12
+ declare const textFieldLabelMeta: {
13
+ readonly displayName: "TextFieldLabel";
14
+ readonly entity: "Input";
15
+ readonly structure: "label";
16
+ readonly composition: "label";
17
+ };
18
+ /** Formal semantic identity — control slot (the actual input element). */
19
+ declare const textFieldControlMeta: {
20
+ readonly displayName: "TextFieldControl";
21
+ readonly entity: "Input";
22
+ readonly structure: "control";
23
+ readonly composition: "control";
24
+ };
25
+ /** Formal semantic identity — description slot (helper text). */
26
+ declare const textFieldDescriptionMeta: {
27
+ readonly displayName: "TextFieldDescription";
28
+ readonly entity: "Input";
29
+ readonly structure: "description";
30
+ readonly composition: "description";
31
+ };
32
+ /** Formal semantic identity — status slot (validation message). */
33
+ declare const textFieldErrorMeta: {
34
+ readonly displayName: "TextFieldError";
35
+ readonly entity: "Input";
36
+ readonly structure: "validationMessage";
37
+ readonly composition: "status";
38
+ };
39
+ /**
40
+ * Props for the TextField root.
41
+ *
42
+ * The composite owns its layout; pass `style`/`className` on a wrapping
43
+ * element rather than on the composite root. See CONTRIBUTING §4.
44
+ */
45
+ type TextFieldProps$1 = Omit<TextFieldProps, 'style' | 'className'>;
46
+ /**
47
+ * A semantic text input composite built on React Aria's `TextField`.
48
+ *
49
+ * Composes four slots: `TextFieldLabel`, `TextFieldControl`,
50
+ * `TextFieldDescription`, and `TextFieldError`. Each sub-part carries its
51
+ * own `ComponentMeta` with a `composition` role per FSL §4.
52
+ *
53
+ * Validation feedback is driven by React Aria's `isInvalid` prop or
54
+ * `validate` callback and surfaces on the control, label, and validation
55
+ * message via the `invalid` token State.
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <TextField isRequired>
60
+ * <TextFieldLabel>Email</TextFieldLabel>
61
+ * <TextFieldControl type="email" />
62
+ * <TextFieldDescription>We never share your email.</TextFieldDescription>
63
+ * <TextFieldError />
64
+ * </TextField>
65
+ * ```
66
+ */
67
+ declare const TextField$1: {
68
+ ({
69
+ children,
70
+ ...props
71
+ }: TextFieldProps$1): import("react/jsx-runtime").JSX.Element;
72
+ displayName: "TextField";
73
+ };
74
+ /** Props for the TextField label. */
75
+ type TextFieldLabelProps = Omit<LabelProps, 'style' | 'className'>;
76
+ /** The label slot of a TextField. Wired to React Aria for a11y linkage. */
77
+ declare const TextFieldLabel: {
78
+ (props: TextFieldLabelProps): import("react/jsx-runtime").JSX.Element;
79
+ displayName: "TextFieldLabel";
80
+ };
81
+ /** Props for the TextField control. */
82
+ type TextFieldControlProps = Omit<InputProps, 'style' | 'className'>;
83
+ /**
84
+ * The control slot of a TextField — the actual `<input>` element. Reads
85
+ * `isInvalid` from React Aria's render-props and surfaces the `invalid`
86
+ * State via `vars.colors.input.primary.*`.
87
+ */
88
+ declare const TextFieldControl: {
89
+ (props: TextFieldControlProps): import("react/jsx-runtime").JSX.Element;
90
+ displayName: "TextFieldControl";
91
+ };
92
+ /** Props for the TextField description. */
93
+ type TextFieldDescriptionProps = Omit<TextProps, 'style' | 'className' | 'slot'>;
94
+ /** Helper/description text linked to the control via React Aria's slot. */
95
+ declare const TextFieldDescription: {
96
+ (props: TextFieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
97
+ displayName: "TextFieldDescription";
98
+ };
99
+ /** Props for the TextField error. */
100
+ type TextFieldErrorProps = Omit<FieldErrorProps, 'style' | 'className'>;
101
+ /**
102
+ * Validation message — rendered by React Aria only when the field is
103
+ * invalid. Uses the `invalid` State of the canonical `input.primary`
104
+ * subtree (mirroring the control's invalid coloring).
105
+ */
106
+ declare const TextFieldError: {
107
+ (props: TextFieldErrorProps): import("react/jsx-runtime").JSX.Element;
108
+ displayName: "TextFieldError";
109
+ };
110
+ //#endregion
111
+ export { TextField$1 as TextField, TextFieldControl, TextFieldControlProps, TextFieldDescription, TextFieldDescriptionProps, TextFieldError, TextFieldErrorProps, TextFieldLabel, TextFieldLabelProps, TextFieldProps$1 as TextFieldProps, textFieldControlMeta, textFieldDescriptionMeta, textFieldErrorMeta, textFieldLabelMeta, textFieldMeta };