@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,80 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ const require_escapeHatch = require('../../tokens/escapeHatch.cjs');
3
+ let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
4
+ let react_aria_components = require("react-aria-components");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+
7
+ //#region src/composites/Popover/Popover.tsx
8
+ var POPOVER_MAX_WIDTH_DEFAULT = "min(320px, 90vw)";
9
+ var POPOVER_OFFSET_DEFAULT = 8;
10
+ /**
11
+ * The trigger that owns a Popover's open state. Alias of React Aria's overlay
12
+ * trigger (the same primitive `DialogTrigger` uses): wire a focusable trigger
13
+ * and a `Popover` as its two children.
14
+ */
15
+ var PopoverTrigger = props => {
16
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.DialogTrigger, {
17
+ ...props
18
+ });
19
+ };
20
+ PopoverTrigger.displayName = "PopoverTrigger";
21
+ /** Formal semantic identity — Popover surface (Overlay entity). */
22
+ var popoverMeta = {
23
+ displayName: "Popover",
24
+ entity: "Overlay",
25
+ structure: "root"
26
+ };
27
+ /**
28
+ * A standalone anchored overlay surface (Overlay entity). Place inside a
29
+ * `PopoverTrigger` alongside the focusable trigger. Geometry the host owns is
30
+ * the `--fsl-popover-max-width` knob (CONTRACT §7); React Aria positioning
31
+ * props (`placement`, `offset`, `crossOffset`, `shouldFlip`,
32
+ * `containerPadding`) are forwarded as behavior.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <PopoverTrigger>
37
+ * <Button>Details</Button>
38
+ * <Popover>
39
+ * <p>Anchored content</p>
40
+ * </Popover>
41
+ * </PopoverTrigger>
42
+ * ```
43
+ */
44
+ var Popover = ({
45
+ evaluation = "primary",
46
+ offset = POPOVER_OFFSET_DEFAULT,
47
+ children,
48
+ ...props
49
+ }) => {
50
+ const colors = _ttoss_fsl_theme_vars.vars.colors.informational[evaluation];
51
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Popover, {
52
+ ...props,
53
+ offset,
54
+ "data-scope": "popover",
55
+ "data-part": "root",
56
+ "data-evaluation": evaluation,
57
+ style: {
58
+ boxSizing: "border-box",
59
+ maxWidth: require_escapeHatch.fslVar("--fsl-popover-max-width", POPOVER_MAX_WIDTH_DEFAULT),
60
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.surface,
61
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
62
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
63
+ borderColor: colors?.border?.default,
64
+ backgroundColor: colors?.background?.default,
65
+ color: colors?.text?.default,
66
+ boxShadow: _ttoss_fsl_theme_vars.vars.elevation.surface.overlay,
67
+ padding: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.md,
68
+ outline: "none",
69
+ ..._ttoss_fsl_theme_vars.vars.text.body.md,
70
+ zIndex: _ttoss_fsl_theme_vars.vars.zIndex.layer.overlay
71
+ },
72
+ children
73
+ });
74
+ };
75
+ Popover.displayName = popoverMeta.displayName;
76
+
77
+ //#endregion
78
+ exports.Popover = Popover;
79
+ exports.PopoverTrigger = PopoverTrigger;
80
+ exports.popoverMeta = popoverMeta;
@@ -0,0 +1,56 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.cjs";
3
+ import { DialogTriggerProps, PopoverProps } from "react-aria-components";
4
+
5
+ //#region src/composites/Popover/Popover.d.ts
6
+ /**
7
+ * The trigger that owns a Popover's open state. Alias of React Aria's overlay
8
+ * trigger (the same primitive `DialogTrigger` uses): wire a focusable trigger
9
+ * and a `Popover` as its two children.
10
+ */
11
+ declare const PopoverTrigger: {
12
+ (props: DialogTriggerProps): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ /** Formal semantic identity — Popover surface (Overlay entity). */
16
+ declare const popoverMeta: {
17
+ readonly displayName: "Popover";
18
+ readonly entity: "Overlay";
19
+ readonly structure: "root";
20
+ };
21
+ /** Props for the Popover surface. */
22
+ interface PopoverProps$1 extends Omit<PopoverProps, 'style'> {
23
+ /**
24
+ * Semantic emphasis for the overlay surface.
25
+ * @default 'primary'
26
+ */
27
+ evaluation?: EvaluationsFor<(typeof popoverMeta)['entity']>;
28
+ }
29
+ /**
30
+ * A standalone anchored overlay surface (Overlay entity). Place inside a
31
+ * `PopoverTrigger` alongside the focusable trigger. Geometry the host owns is
32
+ * the `--fsl-popover-max-width` knob (CONTRACT §7); React Aria positioning
33
+ * props (`placement`, `offset`, `crossOffset`, `shouldFlip`,
34
+ * `containerPadding`) are forwarded as behavior.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <PopoverTrigger>
39
+ * <Button>Details</Button>
40
+ * <Popover>
41
+ * <p>Anchored content</p>
42
+ * </Popover>
43
+ * </PopoverTrigger>
44
+ * ```
45
+ */
46
+ declare const Popover: {
47
+ ({
48
+ evaluation,
49
+ offset,
50
+ children,
51
+ ...props
52
+ }: PopoverProps$1): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "Popover";
54
+ };
55
+ //#endregion
56
+ export { Popover, PopoverProps$1 as PopoverProps, PopoverTrigger, popoverMeta };
@@ -0,0 +1,56 @@
1
+
2
+ import { EvaluationsFor } from "../../semantics/taxonomy.mjs";
3
+ import { DialogTriggerProps, PopoverProps } from "react-aria-components";
4
+
5
+ //#region src/composites/Popover/Popover.d.ts
6
+ /**
7
+ * The trigger that owns a Popover's open state. Alias of React Aria's overlay
8
+ * trigger (the same primitive `DialogTrigger` uses): wire a focusable trigger
9
+ * and a `Popover` as its two children.
10
+ */
11
+ declare const PopoverTrigger: {
12
+ (props: DialogTriggerProps): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ /** Formal semantic identity — Popover surface (Overlay entity). */
16
+ declare const popoverMeta: {
17
+ readonly displayName: "Popover";
18
+ readonly entity: "Overlay";
19
+ readonly structure: "root";
20
+ };
21
+ /** Props for the Popover surface. */
22
+ interface PopoverProps$1 extends Omit<PopoverProps, 'style'> {
23
+ /**
24
+ * Semantic emphasis for the overlay surface.
25
+ * @default 'primary'
26
+ */
27
+ evaluation?: EvaluationsFor<(typeof popoverMeta)['entity']>;
28
+ }
29
+ /**
30
+ * A standalone anchored overlay surface (Overlay entity). Place inside a
31
+ * `PopoverTrigger` alongside the focusable trigger. Geometry the host owns is
32
+ * the `--fsl-popover-max-width` knob (CONTRACT §7); React Aria positioning
33
+ * props (`placement`, `offset`, `crossOffset`, `shouldFlip`,
34
+ * `containerPadding`) are forwarded as behavior.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <PopoverTrigger>
39
+ * <Button>Details</Button>
40
+ * <Popover>
41
+ * <p>Anchored content</p>
42
+ * </Popover>
43
+ * </PopoverTrigger>
44
+ * ```
45
+ */
46
+ declare const Popover$1: {
47
+ ({
48
+ evaluation,
49
+ offset,
50
+ children,
51
+ ...props
52
+ }: PopoverProps$1): import("react/jsx-runtime").JSX.Element;
53
+ displayName: "Popover";
54
+ };
55
+ //#endregion
56
+ export { Popover$1 as Popover, PopoverProps$1 as PopoverProps, PopoverTrigger, popoverMeta };
@@ -0,0 +1,78 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { fslVar } from "../../tokens/escapeHatch.mjs";
3
+ import { vars } from "@ttoss/fsl-theme/vars";
4
+ import { DialogTrigger, Popover } from "react-aria-components";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/composites/Popover/Popover.tsx
8
+ var POPOVER_MAX_WIDTH_DEFAULT = "min(320px, 90vw)";
9
+ var POPOVER_OFFSET_DEFAULT = 8;
10
+ /**
11
+ * The trigger that owns a Popover's open state. Alias of React Aria's overlay
12
+ * trigger (the same primitive `DialogTrigger` uses): wire a focusable trigger
13
+ * and a `Popover` as its two children.
14
+ */
15
+ var PopoverTrigger = props => {
16
+ return /* @__PURE__ */jsx(DialogTrigger, {
17
+ ...props
18
+ });
19
+ };
20
+ PopoverTrigger.displayName = "PopoverTrigger";
21
+ /** Formal semantic identity — Popover surface (Overlay entity). */
22
+ var popoverMeta = {
23
+ displayName: "Popover",
24
+ entity: "Overlay",
25
+ structure: "root"
26
+ };
27
+ /**
28
+ * A standalone anchored overlay surface (Overlay entity). Place inside a
29
+ * `PopoverTrigger` alongside the focusable trigger. Geometry the host owns is
30
+ * the `--fsl-popover-max-width` knob (CONTRACT §7); React Aria positioning
31
+ * props (`placement`, `offset`, `crossOffset`, `shouldFlip`,
32
+ * `containerPadding`) are forwarded as behavior.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <PopoverTrigger>
37
+ * <Button>Details</Button>
38
+ * <Popover>
39
+ * <p>Anchored content</p>
40
+ * </Popover>
41
+ * </PopoverTrigger>
42
+ * ```
43
+ */
44
+ var Popover$1 = ({
45
+ evaluation = "primary",
46
+ offset = POPOVER_OFFSET_DEFAULT,
47
+ children,
48
+ ...props
49
+ }) => {
50
+ const colors = vars.colors.informational[evaluation];
51
+ return /* @__PURE__ */jsx(Popover, {
52
+ ...props,
53
+ offset,
54
+ "data-scope": "popover",
55
+ "data-part": "root",
56
+ "data-evaluation": evaluation,
57
+ style: {
58
+ boxSizing: "border-box",
59
+ maxWidth: fslVar("--fsl-popover-max-width", POPOVER_MAX_WIDTH_DEFAULT),
60
+ borderRadius: vars.radii.surface,
61
+ borderWidth: vars.border.outline.surface.width,
62
+ borderStyle: vars.border.outline.surface.style,
63
+ borderColor: colors?.border?.default,
64
+ backgroundColor: colors?.background?.default,
65
+ color: colors?.text?.default,
66
+ boxShadow: vars.elevation.surface.overlay,
67
+ padding: vars.spacing.inset.surface.md,
68
+ outline: "none",
69
+ ...vars.text.body.md,
70
+ zIndex: vars.zIndex.layer.overlay
71
+ },
72
+ children
73
+ });
74
+ };
75
+ Popover$1.displayName = popoverMeta.displayName;
76
+
77
+ //#endregion
78
+ export { Popover$1 as Popover, PopoverTrigger, popoverMeta };
@@ -0,0 +1,194 @@
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('../../components/Icon/Icon.cjs');
5
+ const require_scope = require('../scope.cjs');
6
+ let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
7
+ let react_aria_components = require("react-aria-components");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+
10
+ //#region src/composites/SearchField/SearchField.tsx
11
+ var searchFieldScope = require_scope.createCompositeScope("SearchField");
12
+ /** Formal semantic identity — SearchField root (Input entity). */
13
+ var searchFieldMeta = {
14
+ displayName: "SearchField",
15
+ entity: "Input",
16
+ structure: "root"
17
+ };
18
+ /** Formal semantic identity — label slot. */
19
+ var searchFieldLabelMeta = {
20
+ displayName: "SearchFieldLabel",
21
+ entity: "Input",
22
+ structure: "label",
23
+ composition: "label"
24
+ };
25
+ /** Formal semantic identity — control slot (search box). */
26
+ var searchFieldControlMeta = {
27
+ displayName: "SearchFieldControl",
28
+ entity: "Input",
29
+ structure: "control",
30
+ composition: "control"
31
+ };
32
+ /**
33
+ * A search input composite (Input entity). Renders a labelled search box with
34
+ * a leading search glyph and a trailing clear button (shown once there is
35
+ * text). Compose with `SearchFieldLabel` and `SearchFieldControl`.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <SearchField clearLabel="Clear search" onSubmit={run}>
40
+ * <SearchFieldLabel>Search</SearchFieldLabel>
41
+ * <SearchFieldControl placeholder="Search…" />
42
+ * </SearchField>
43
+ * ```
44
+ */
45
+ var SearchField = ({
46
+ clearLabel,
47
+ children,
48
+ ...props
49
+ }) => {
50
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.SearchField, {
51
+ ...props,
52
+ "data-scope": "search-field",
53
+ "data-part": "root",
54
+ style: {
55
+ boxSizing: "border-box",
56
+ display: "flex",
57
+ flexDirection: "column",
58
+ gap: _ttoss_fsl_theme_vars.vars.spacing.gap.stack.xs
59
+ },
60
+ children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(searchFieldScope.Provider, {
61
+ value: {
62
+ clearLabel
63
+ },
64
+ children
65
+ })
66
+ });
67
+ };
68
+ SearchField.displayName = searchFieldMeta.displayName;
69
+ /** The label slot of a SearchField. */
70
+ var SearchFieldLabel = props => {
71
+ searchFieldScope.use(searchFieldLabelMeta.displayName);
72
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
73
+ return /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Label, {
74
+ ...props,
75
+ "data-scope": "search-field",
76
+ "data-part": "label",
77
+ style: {
78
+ color: colors?.text?.default,
79
+ ..._ttoss_fsl_theme_vars.vars.text.label.md
80
+ }
81
+ });
82
+ };
83
+ SearchFieldLabel.displayName = searchFieldLabelMeta.displayName;
84
+ var ADORNMENT_INSET = `calc(${_ttoss_fsl_theme_vars.vars.sizing.icon.md} + ${_ttoss_fsl_theme_vars.vars.spacing.inset.control.md} * 2)`;
85
+ /**
86
+ * The control slot — the search box. Renders the leading search glyph
87
+ * (`leadingAdornment`), the `<input>`, and the trailing clear button
88
+ * (`trailingAdornment`, labelled by the root's `clearLabel`). The clear
89
+ * button is managed by React Aria (hidden while empty).
90
+ */
91
+ var SearchFieldControl = props => {
92
+ const {
93
+ clearLabel
94
+ } = searchFieldScope.use(searchFieldControlMeta.displayName);
95
+ const colors = _ttoss_fsl_theme_vars.vars.colors.input.primary;
96
+ return /* @__PURE__ */(0, react_jsx_runtime.jsxs)("div", {
97
+ "data-scope": "search-field",
98
+ "data-part": "control",
99
+ style: {
100
+ boxSizing: "border-box",
101
+ position: "relative",
102
+ display: "inline-flex",
103
+ alignItems: "center",
104
+ inlineSize: "100%"
105
+ },
106
+ children: [/* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
107
+ "data-scope": "search-field",
108
+ "data-part": "leadingAdornment",
109
+ "aria-hidden": true,
110
+ style: {
111
+ position: "absolute",
112
+ insetInlineStart: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
113
+ display: "inline-flex",
114
+ color: colors?.text?.default,
115
+ pointerEvents: "none"
116
+ },
117
+ children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(require_Icon.Icon, {
118
+ intent: "action.search",
119
+ size: "sm"
120
+ })
121
+ }), /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Input, {
122
+ ...props,
123
+ "data-scope": "search-field",
124
+ "data-part": "control",
125
+ style: ({
126
+ isHovered,
127
+ isDisabled,
128
+ isFocusVisible,
129
+ isInvalid
130
+ }) => {
131
+ return {
132
+ boxSizing: "border-box",
133
+ inlineSize: "100%",
134
+ minHeight: _ttoss_fsl_theme_vars.vars.sizing.hit.base,
135
+ paddingBlock: _ttoss_fsl_theme_vars.vars.spacing.inset.control.sm,
136
+ paddingInlineStart: ADORNMENT_INSET,
137
+ paddingInlineEnd: ADORNMENT_INSET,
138
+ borderRadius: _ttoss_fsl_theme_vars.vars.radii.control,
139
+ borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.control.width,
140
+ borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.control.style,
141
+ transitionDuration: _ttoss_fsl_theme_vars.vars.motion.feedback.duration,
142
+ transitionTimingFunction: _ttoss_fsl_theme_vars.vars.motion.feedback.easing,
143
+ transitionProperty: "background-color, border-color, color",
144
+ backgroundColor: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.background, {
145
+ isHovered,
146
+ isDisabled,
147
+ isInvalid
148
+ }),
149
+ borderColor: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.border, {
150
+ isDisabled,
151
+ isInvalid,
152
+ isFocusVisible
153
+ }),
154
+ color: require_resolveInteractiveStyle.resolveInteractiveStyle(colors?.text, {
155
+ isHovered,
156
+ isDisabled,
157
+ isInvalid
158
+ }) ?? colors?.text?.default,
159
+ outline: require_focusRing.focusRingOutline(isFocusVisible),
160
+ ..._ttoss_fsl_theme_vars.vars.text.label.md
161
+ };
162
+ }
163
+ }), /* @__PURE__ */(0, react_jsx_runtime.jsx)(react_aria_components.Button, {
164
+ "aria-label": clearLabel,
165
+ "data-scope": "search-field",
166
+ "data-part": "trailingAdornment",
167
+ style: {
168
+ position: "absolute",
169
+ insetInlineEnd: _ttoss_fsl_theme_vars.vars.spacing.inset.control.md,
170
+ display: "inline-flex",
171
+ alignItems: "center",
172
+ justifyContent: "center",
173
+ cursor: "pointer",
174
+ border: 0,
175
+ background: "transparent",
176
+ color: colors?.text?.default,
177
+ padding: 0
178
+ },
179
+ children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(require_Icon.Icon, {
180
+ intent: "action.close",
181
+ size: "sm"
182
+ })
183
+ })]
184
+ });
185
+ };
186
+ SearchFieldControl.displayName = searchFieldControlMeta.displayName;
187
+
188
+ //#endregion
189
+ exports.SearchField = SearchField;
190
+ exports.SearchFieldControl = SearchFieldControl;
191
+ exports.SearchFieldLabel = SearchFieldLabel;
192
+ exports.searchFieldControlMeta = searchFieldControlMeta;
193
+ exports.searchFieldLabelMeta = searchFieldLabelMeta;
194
+ exports.searchFieldMeta = searchFieldMeta;
@@ -0,0 +1,81 @@
1
+
2
+ import * as React from "react";
3
+ import { Input, LabelProps, SearchFieldProps } from "react-aria-components";
4
+
5
+ //#region src/composites/SearchField/SearchField.d.ts
6
+ /** Formal semantic identity — SearchField root (Input entity). */
7
+ declare const searchFieldMeta: {
8
+ readonly displayName: "SearchField";
9
+ readonly entity: "Input";
10
+ readonly structure: "root";
11
+ };
12
+ /** Formal semantic identity — label slot. */
13
+ declare const searchFieldLabelMeta: {
14
+ readonly displayName: "SearchFieldLabel";
15
+ readonly entity: "Input";
16
+ readonly structure: "label";
17
+ readonly composition: "label";
18
+ };
19
+ /** Formal semantic identity — control slot (search box). */
20
+ declare const searchFieldControlMeta: {
21
+ readonly displayName: "SearchFieldControl";
22
+ readonly entity: "Input";
23
+ readonly structure: "control";
24
+ readonly composition: "control";
25
+ };
26
+ /** Props for the SearchField root. */
27
+ interface SearchFieldProps$1 extends Omit<SearchFieldProps, 'style' | 'className' | 'children'> {
28
+ /**
29
+ * Accessible label for the clear button (caller-localized — no default, per
30
+ * the i18n rule / ADR-001). e.g. "Clear search".
31
+ */
32
+ clearLabel: string;
33
+ /**
34
+ * Field parts (label, input, clear button, …). Plain nodes only — the
35
+ * composite provides its own scope context, so React Aria's
36
+ * function-children form is not part of this API.
37
+ */
38
+ children?: React.ReactNode;
39
+ }
40
+ /**
41
+ * A search input composite (Input entity). Renders a labelled search box with
42
+ * a leading search glyph and a trailing clear button (shown once there is
43
+ * text). Compose with `SearchFieldLabel` and `SearchFieldControl`.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <SearchField clearLabel="Clear search" onSubmit={run}>
48
+ * <SearchFieldLabel>Search</SearchFieldLabel>
49
+ * <SearchFieldControl placeholder="Search…" />
50
+ * </SearchField>
51
+ * ```
52
+ */
53
+ declare const SearchField: {
54
+ ({
55
+ clearLabel,
56
+ children,
57
+ ...props
58
+ }: SearchFieldProps$1): import("react/jsx-runtime").JSX.Element;
59
+ displayName: "SearchField";
60
+ };
61
+ /** Props for the SearchField label. */
62
+ type SearchFieldLabelProps = Omit<LabelProps, 'style' | 'className'>;
63
+ /** The label slot of a SearchField. */
64
+ declare const SearchFieldLabel: {
65
+ (props: SearchFieldLabelProps): import("react/jsx-runtime").JSX.Element;
66
+ displayName: "SearchFieldLabel";
67
+ };
68
+ /** Props for the SearchField control. */
69
+ type SearchFieldControlProps = Omit<React.ComponentProps<typeof Input>, 'style' | 'className'>;
70
+ /**
71
+ * The control slot — the search box. Renders the leading search glyph
72
+ * (`leadingAdornment`), the `<input>`, and the trailing clear button
73
+ * (`trailingAdornment`, labelled by the root's `clearLabel`). The clear
74
+ * button is managed by React Aria (hidden while empty).
75
+ */
76
+ declare const SearchFieldControl: {
77
+ (props: SearchFieldControlProps): import("react/jsx-runtime").JSX.Element;
78
+ displayName: "SearchFieldControl";
79
+ };
80
+ //#endregion
81
+ export { SearchField, SearchFieldControl, SearchFieldControlProps, SearchFieldLabel, SearchFieldLabelProps, SearchFieldProps$1 as SearchFieldProps, searchFieldControlMeta, searchFieldLabelMeta, searchFieldMeta };
@@ -0,0 +1,81 @@
1
+
2
+ import { Input, LabelProps, SearchFieldProps } from "react-aria-components";
3
+ import * as React from "react";
4
+
5
+ //#region src/composites/SearchField/SearchField.d.ts
6
+ /** Formal semantic identity — SearchField root (Input entity). */
7
+ declare const searchFieldMeta: {
8
+ readonly displayName: "SearchField";
9
+ readonly entity: "Input";
10
+ readonly structure: "root";
11
+ };
12
+ /** Formal semantic identity — label slot. */
13
+ declare const searchFieldLabelMeta: {
14
+ readonly displayName: "SearchFieldLabel";
15
+ readonly entity: "Input";
16
+ readonly structure: "label";
17
+ readonly composition: "label";
18
+ };
19
+ /** Formal semantic identity — control slot (search box). */
20
+ declare const searchFieldControlMeta: {
21
+ readonly displayName: "SearchFieldControl";
22
+ readonly entity: "Input";
23
+ readonly structure: "control";
24
+ readonly composition: "control";
25
+ };
26
+ /** Props for the SearchField root. */
27
+ interface SearchFieldProps$1 extends Omit<SearchFieldProps, 'style' | 'className' | 'children'> {
28
+ /**
29
+ * Accessible label for the clear button (caller-localized — no default, per
30
+ * the i18n rule / ADR-001). e.g. "Clear search".
31
+ */
32
+ clearLabel: string;
33
+ /**
34
+ * Field parts (label, input, clear button, …). Plain nodes only — the
35
+ * composite provides its own scope context, so React Aria's
36
+ * function-children form is not part of this API.
37
+ */
38
+ children?: React.ReactNode;
39
+ }
40
+ /**
41
+ * A search input composite (Input entity). Renders a labelled search box with
42
+ * a leading search glyph and a trailing clear button (shown once there is
43
+ * text). Compose with `SearchFieldLabel` and `SearchFieldControl`.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <SearchField clearLabel="Clear search" onSubmit={run}>
48
+ * <SearchFieldLabel>Search</SearchFieldLabel>
49
+ * <SearchFieldControl placeholder="Search…" />
50
+ * </SearchField>
51
+ * ```
52
+ */
53
+ declare const SearchField$1: {
54
+ ({
55
+ clearLabel,
56
+ children,
57
+ ...props
58
+ }: SearchFieldProps$1): import("react/jsx-runtime").JSX.Element;
59
+ displayName: "SearchField";
60
+ };
61
+ /** Props for the SearchField label. */
62
+ type SearchFieldLabelProps = Omit<LabelProps, 'style' | 'className'>;
63
+ /** The label slot of a SearchField. */
64
+ declare const SearchFieldLabel: {
65
+ (props: SearchFieldLabelProps): import("react/jsx-runtime").JSX.Element;
66
+ displayName: "SearchFieldLabel";
67
+ };
68
+ /** Props for the SearchField control. */
69
+ type SearchFieldControlProps = Omit<React.ComponentProps<typeof Input>, 'style' | 'className'>;
70
+ /**
71
+ * The control slot — the search box. Renders the leading search glyph
72
+ * (`leadingAdornment`), the `<input>`, and the trailing clear button
73
+ * (`trailingAdornment`, labelled by the root's `clearLabel`). The clear
74
+ * button is managed by React Aria (hidden while empty).
75
+ */
76
+ declare const SearchFieldControl: {
77
+ (props: SearchFieldControlProps): import("react/jsx-runtime").JSX.Element;
78
+ displayName: "SearchFieldControl";
79
+ };
80
+ //#endregion
81
+ export { SearchField$1 as SearchField, SearchFieldControl, SearchFieldControlProps, SearchFieldLabel, SearchFieldLabelProps, SearchFieldProps$1 as SearchFieldProps, searchFieldControlMeta, searchFieldLabelMeta, searchFieldMeta };