tfy-web-components 0.0.34 → 0.0.36

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 (230) hide show
  1. package/README.md +49 -58
  2. package/dist/Button-C77b7jpW.js +284 -0
  3. package/dist/Button-C77b7jpW.js.map +1 -0
  4. package/dist/CompositeItem-BGwD51jI.js +33 -0
  5. package/dist/CompositeItem-BGwD51jI.js.map +1 -0
  6. package/dist/CompositeList-D4xmSZ5V.js +291 -0
  7. package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
  8. package/dist/CompositeRoot-BxrPc7F6.js +351 -0
  9. package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
  10. package/dist/DirectionContext-Pb9yafF5.js +11 -0
  11. package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
  12. package/dist/FieldItemContext-DRVgx-D1.js +13 -0
  13. package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
  14. package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
  15. package/dist/Input-Dhmo6L2n.js.map +1 -0
  16. package/dist/Modal-C4MUy9GD.js +696 -0
  17. package/dist/Modal-C4MUy9GD.js.map +1 -0
  18. package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
  19. package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
  20. package/dist/Popover-eC_vX5By.js +1074 -0
  21. package/dist/Popover-eC_vX5By.js.map +1 -0
  22. package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
  23. package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
  24. package/dist/Tooltip-BuGLP-PU.js +4096 -0
  25. package/dist/Tooltip-BuGLP-PU.js.map +1 -0
  26. package/dist/classNames-B1XpQHle.js +44 -0
  27. package/dist/classNames-B1XpQHle.js.map +1 -0
  28. package/dist/components/atoms/Accordion.d.ts +19 -37
  29. package/dist/components/atoms/Accordion.es.js +847 -78
  30. package/dist/components/atoms/Accordion.es.js.map +1 -1
  31. package/dist/components/atoms/AudioPlayer.es.js +9 -9
  32. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  33. package/dist/components/atoms/Avatar.d.ts +42 -9
  34. package/dist/components/atoms/Avatar.es.js +491 -36
  35. package/dist/components/atoms/Avatar.es.js.map +1 -1
  36. package/dist/components/atoms/Badge.d.ts +40 -35
  37. package/dist/components/atoms/Badge.es.js +163 -53
  38. package/dist/components/atoms/Badge.es.js.map +1 -1
  39. package/dist/components/atoms/Button.d.ts +37 -16
  40. package/dist/components/atoms/Button.es.js +16 -221
  41. package/dist/components/atoms/Button.es.js.map +1 -1
  42. package/dist/components/atoms/ButtonGroup.d.ts +53 -0
  43. package/dist/components/atoms/ButtonGroup.es.js +349 -0
  44. package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +23 -9
  46. package/dist/components/atoms/IconButton.es.js +82 -16
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.d.ts +5 -2
  49. package/dist/components/atoms/IconProvider.es.js +69 -10
  50. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  51. package/dist/components/atoms/Logo.d.ts +18 -0
  52. package/dist/components/atoms/Logo.es.js +79 -0
  53. package/dist/components/atoms/Logo.es.js.map +1 -0
  54. package/dist/components/atoms/Modal.d.ts +27 -3
  55. package/dist/components/atoms/Modal.es.js +15 -16
  56. package/dist/components/atoms/Modal.es.js.map +1 -1
  57. package/dist/components/atoms/Notification.d.ts +1 -1
  58. package/dist/components/atoms/Notification.es.js +26 -3
  59. package/dist/components/atoms/Notification.es.js.map +1 -1
  60. package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
  61. package/dist/components/atoms/OutlinedRadio.es.js +12 -25
  62. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  63. package/dist/components/atoms/Progress.d.ts +48 -0
  64. package/dist/components/atoms/Progress.es.js +279 -0
  65. package/dist/components/atoms/Progress.es.js.map +1 -0
  66. package/dist/components/atoms/Skeleton.d.ts +9 -3
  67. package/dist/components/atoms/Skeleton.es.js +33 -3
  68. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  69. package/dist/components/atoms/Spinner.d.ts +15 -4
  70. package/dist/components/atoms/Spinner.es.js +86 -22
  71. package/dist/components/atoms/Spinner.es.js.map +1 -1
  72. package/dist/components/atoms/Switch.d.ts +19 -7
  73. package/dist/components/atoms/Switch.es.js +288 -50
  74. package/dist/components/atoms/Switch.es.js.map +1 -1
  75. package/dist/components/atoms/TabButton.d.ts +17 -3
  76. package/dist/components/atoms/TabButton.es.js +647 -25
  77. package/dist/components/atoms/TabButton.es.js.map +1 -1
  78. package/dist/components/atoms/TabPanel.es.js +1 -1
  79. package/dist/components/atoms/Tag.d.ts +43 -0
  80. package/dist/components/atoms/Tag.es.js +219 -0
  81. package/dist/components/atoms/Tag.es.js.map +1 -0
  82. package/dist/components/atoms/Tooltip.d.ts +36 -14
  83. package/dist/components/atoms/Tooltip.es.js +7 -114
  84. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  85. package/dist/components/molecules/Alert.d.ts +1 -1
  86. package/dist/components/molecules/Alert.es.js +13 -9
  87. package/dist/components/molecules/Alert.es.js.map +1 -1
  88. package/dist/components/molecules/CopyField.d.ts +2 -2
  89. package/dist/components/molecules/CopyField.es.js +3 -4
  90. package/dist/components/molecules/CopyField.es.js.map +1 -1
  91. package/dist/components/molecules/CustomDrawer.d.ts +5 -4
  92. package/dist/components/molecules/CustomDrawer.es.js +141 -82
  93. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  94. package/dist/components/molecules/Dialog.d.ts +16 -8
  95. package/dist/components/molecules/Dialog.es.js +33 -31
  96. package/dist/components/molecules/Dialog.es.js.map +1 -1
  97. package/dist/components/molecules/ImagesPreview.es.js +15 -11
  98. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  99. package/dist/components/molecules/Input.d.ts +1 -1
  100. package/dist/components/molecules/Input.es.js +3 -5
  101. package/dist/components/molecules/Input.es.js.map +1 -1
  102. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
  103. package/dist/components/molecules/Markdown/components.d.ts +12 -11
  104. package/dist/components/molecules/Markdown.es.js +26 -49
  105. package/dist/components/molecules/Markdown.es.js.map +1 -1
  106. package/dist/components/molecules/Notify.d.ts +30 -1
  107. package/dist/components/molecules/Notify.es.js +91 -36
  108. package/dist/components/molecules/Notify.es.js.map +1 -1
  109. package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
  110. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  111. package/dist/components/molecules/ToggleButton.d.ts +3 -2
  112. package/dist/components/molecules/ToggleButton.es.js +155 -57
  113. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  114. package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
  115. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  116. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
  117. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  118. package/dist/components/molecules/agent-chat/index.d.ts +0 -6
  119. package/dist/components/molecules/agent-chat.es.js +76 -407
  120. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  121. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
  122. package/dist/components/theme/colors.d.ts +17 -53
  123. package/dist/components/theme/colors.es.js +384 -180
  124. package/dist/components/theme/colors.es.js.map +1 -1
  125. package/dist/components/theme/theme.d.ts +14 -11
  126. package/dist/components/theme/theme.es.js +3 -64
  127. package/dist/components/theme/theme.es.js.map +1 -1
  128. package/dist/components/theme/useTheme.es.js +1 -4
  129. package/dist/components/theme/useTheme.es.js.map +1 -1
  130. package/dist/composite-CrCQWAKA.js +108 -0
  131. package/dist/composite-CrCQWAKA.js.map +1 -0
  132. package/dist/composite-DCpXNxz9.js +66 -0
  133. package/dist/composite-DCpXNxz9.js.map +1 -0
  134. package/dist/conversions-CbWPvHRE.js +14 -0
  135. package/dist/conversions-CbWPvHRE.js.map +1 -0
  136. package/dist/error-FX4R42W-.js +6 -0
  137. package/dist/error-FX4R42W-.js.map +1 -0
  138. package/dist/fonts.css +7 -0
  139. package/dist/hooks/useContainerDimensions.d.ts +1 -1
  140. package/dist/index-B806bfA-.js +257 -0
  141. package/dist/index-B806bfA-.js.map +1 -0
  142. package/dist/index-DSVg79g-.js +45 -0
  143. package/dist/index-DSVg79g-.js.map +1 -0
  144. package/dist/index.d.ts +21 -4
  145. package/dist/index.es.js +58 -9
  146. package/dist/index.es.js.map +1 -1
  147. package/dist/inertValue-IJM5NA30.js +11 -0
  148. package/dist/inertValue-IJM5NA30.js.map +1 -0
  149. package/dist/lib/utils.d.ts +1 -0
  150. package/dist/markdown.css +13 -14
  151. package/dist/new-components/atoms/Checkbox.d.ts +6 -0
  152. package/dist/new-components/atoms/Checkbox.es.js +423 -0
  153. package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
  154. package/dist/new-components/atoms/Chip.d.ts +38 -0
  155. package/dist/new-components/atoms/Chip.es.js +269 -0
  156. package/dist/new-components/atoms/Chip.es.js.map +1 -0
  157. package/dist/new-components/atoms/Popover.d.ts +87 -0
  158. package/dist/new-components/atoms/Popover.es.js +21 -0
  159. package/dist/new-components/atoms/Popover.es.js.map +1 -0
  160. package/dist/new-components/atoms/Radio.d.ts +14 -0
  161. package/dist/new-components/atoms/Radio.es.js +536 -0
  162. package/dist/new-components/atoms/Radio.es.js.map +1 -0
  163. package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
  164. package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
  165. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
  166. package/dist/new-components/atoms/Slider.d.ts +8 -0
  167. package/dist/new-components/atoms/Slider.es.js +1415 -0
  168. package/dist/new-components/atoms/Slider.es.js.map +1 -0
  169. package/dist/new-components/atoms/Toggletip.d.ts +43 -0
  170. package/dist/new-components/atoms/Toggletip.es.js +216 -0
  171. package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
  172. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
  173. package/dist/shadowDom-Bq4g0Qeu.js +52 -0
  174. package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
  175. package/dist/style.css +1 -1
  176. package/dist/tfy-YZ5zY9Jw.js +6 -0
  177. package/dist/tfy-YZ5zY9Jw.js.map +1 -0
  178. package/dist/theme.css +9 -154
  179. package/dist/tokens.css +1124 -0
  180. package/dist/useAnimationFrame-DwhymJoW.js +108 -0
  181. package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
  182. package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
  183. package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
  184. package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
  185. package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
  186. package/dist/useButton-PUBhT4Vo.js +235 -0
  187. package/dist/useButton-PUBhT4Vo.js.map +1 -0
  188. package/dist/useControlled-BSyYkg5C.js +65 -0
  189. package/dist/useControlled-BSyYkg5C.js.map +1 -0
  190. package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
  191. package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
  192. package/dist/useLabelableId-DCLzrdD-.js +241 -0
  193. package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
  194. package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
  195. package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
  196. package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
  197. package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
  198. package/dist/useTimeout-BXf1hDIL.js +46 -0
  199. package/dist/useTimeout-BXf1hDIL.js.map +1 -0
  200. package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
  201. package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
  202. package/dist/useValueAsRef-BfFRcMg6.js +28 -0
  203. package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
  204. package/dist/utils/classNames.d.ts +3 -2
  205. package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
  206. package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
  207. package/dist/vite-env.d.ts +18 -0
  208. package/package.json +30 -22
  209. package/dist/Input-BvwIpntS.js.map +0 -1
  210. package/dist/Notification-BT4CZ69U.js +0 -39
  211. package/dist/Notification-BT4CZ69U.js.map +0 -1
  212. package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
  213. package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
  214. package/dist/classNames-Dy-RXSjS.js +0 -9
  215. package/dist/classNames-Dy-RXSjS.js.map +0 -1
  216. package/dist/components/molecules/DropdownMenu.d.ts +0 -18
  217. package/dist/components/molecules/DropdownMenu.es.js +0 -104
  218. package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
  219. package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
  220. package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
  221. package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
  222. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
  223. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
  224. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
  225. package/dist/components/theme/lightColorPlugin.d.ts +0 -1
  226. package/dist/components/theme/lightColorPlugin.es.js +0 -92
  227. package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
  228. package/dist/tailwindPreset.d.ts +0 -144
  229. package/dist/tailwindPreset.es.js +0 -100
  230. package/dist/tailwindPreset.es.js.map +0 -1
@@ -1,17 +1,32 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import React__default, { forwardRef, Suspense } from "react";
2
+ import * as React from "react";
3
+ import React__default, { forwardRef, useState, Suspense } from "react";
3
4
  import { library } from "@fortawesome/fontawesome-svg-core";
4
5
  import { faCheckCircle as faCheckCircle$1, faClone, faFileLines } from "@fortawesome/free-regular-svg-icons";
5
- import { faCheck, faCheckCircle, faChevronLeft, faChevronRight, faCircleXmark, faCode, faCopy, faCube, faExpandAlt, faExternalLink, faRotateRight, faServer, faTerminal, faUpDown, faWrench } from "@fortawesome/free-solid-svg-icons";
6
+ import { faCheck, faCheckCircle, faChevronDown, faChevronLeft, faChevronRight, faCircleQuestion, faCircleXmark, faCompressAlt, faDownload, faPause, faPlay, faSpinner, faXmark, faCode, faCopy, faCube, faExpandAlt, faExternalLink, faRotateRight, faServer, faTerminal, faTriangleExclamation, faUpDown, faWrench, faGlobe, faIdBadge, faPen, faPlus, faUserSlash, faUsers } from "@fortawesome/free-solid-svg-icons";
6
7
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
- import { c as classNames } from "../../classNames-Dy-RXSjS.js";
8
+ import { c as classNames } from "../../classNames-B1XpQHle.js";
8
9
  import { useTheme } from "../theme/useTheme.es.js";
10
+ const SvgAgents = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "1em", height: "1em", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("path", { d: "M5 20a7 7 0 0 1 14 0", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), /* @__PURE__ */ React.createElement("circle", { cx: 18.5, cy: 8.5, r: 2, stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("circle", { cx: 5.5, cy: 8.5, r: 2, stroke: "currentColor", strokeWidth: 1.5 }));
11
+ const SvgGuardrails = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "1em", height: "1em", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 3 4 7v5c0 5 3.5 8.5 8 9 4.5-.5 8-4 8-9V7l-8-4Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinejoin: "round" }), /* @__PURE__ */ React.createElement("path", { d: "M9 12.5 11 14.5 15.5 10", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }));
12
+ const logo = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='15.5862'%20viewBox='0%200%2016%2015.5862'%20fill='none'%3e%3cg%20id='TFY%20mark'%3e%3cpath%20id='Face%201'%20d='M15.7931%202.06897L8%206.48276V11.0345L11.931%208.96552L12%2013.3793L16%2011.1724L15.7931%202.06897Z'%20fill='%231F009D'/%3e%3cpath%20id='Face%202'%20d='M0.137931%202.06897L0%2011.1724L8%2015.5862V11.0345L4%208.82759V4.27586L0.137931%202.06897Z'%20fill='%236DCAFF'/%3e%3cpath%20id='Face%203'%20d='M15.7931%202.06897L11.8621%200L4%204.27586L8%206.48276L15.7931%202.06897Z'%20fill='%235429FF'/%3e%3cpath%20id='Face%204'%20d='M4%204.27586V8.82759L8%2011.0345V6.48276L4%204.27586Z'%20fill='%232900CE'/%3e%3cpath%20id='Face%205'%20d='M11.931%208.96552L8%2011.0345V15.5862L12%2013.3793L11.931%208.96552Z'%20fill='%23B9E5FF'/%3e%3cpath%20id='Face%206'%20d='M0.137939%202.06897L4.00001%204.27586L7.58622%202.06897L4.00001%200.137931L0.137939%202.06897Z'%20fill='%2399DAFF'/%3e%3c/g%3e%3c/svg%3e";
13
+ const SvgMcp = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "1em", height: "1em", ...props }, /* @__PURE__ */ React.createElement("rect", { x: 3, y: 3, width: 7, height: 7, rx: 1.5, stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("rect", { x: 14, y: 3, width: 7, height: 7, rx: 1.5, stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("rect", { x: 3, y: 14, width: 7, height: 7, rx: 1.5, stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("path", { d: "M14 17.5h7M17.5 14v7", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }));
14
+ const SvgModelGateway = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "1em", height: "1em", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M4 12h16M12 4v16", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), /* @__PURE__ */ React.createElement("circle", { cx: 12, cy: 12, r: 3, stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement("circle", { cx: 4, cy: 12, r: 1.5, fill: "currentColor" }), /* @__PURE__ */ React.createElement("circle", { cx: 20, cy: 12, r: 1.5, fill: "currentColor" }), /* @__PURE__ */ React.createElement("circle", { cx: 12, cy: 4, r: 1.5, fill: "currentColor" }), /* @__PURE__ */ React.createElement("circle", { cx: 12, cy: 20, r: 1.5, fill: "currentColor" }));
15
+ const SvgTrash = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M3.66634 1.66668V0.333344H10.333V1.66668H13.6663V3.00001H12.333V13C12.333 13.3682 12.0345 13.6667 11.6663 13.6667H2.33301C1.96482 13.6667 1.66634 13.3682 1.66634 13V3.00001H0.333008V1.66668H3.66634ZM2.99967 3.00001V12.3333H10.9997V3.00001H2.99967ZM4.99967 5.00001H6.33301V10.3333H4.99967V5.00001ZM7.66634 5.00001H8.99967V10.3333H7.66634V5.00001Z", fill: "currentColor" }));
9
16
  library.add(
10
17
  faCheck,
11
18
  faCheckCircle,
19
+ faChevronDown,
12
20
  faChevronLeft,
13
21
  faChevronRight,
22
+ faCircleQuestion,
14
23
  faCircleXmark,
24
+ faCompressAlt,
25
+ faDownload,
26
+ faPause,
27
+ faPlay,
28
+ faSpinner,
29
+ faXmark,
15
30
  faCode,
16
31
  faCopy,
17
32
  faCube,
@@ -20,8 +35,15 @@ library.add(
20
35
  faRotateRight,
21
36
  faServer,
22
37
  faTerminal,
38
+ faTriangleExclamation,
23
39
  faUpDown,
24
40
  faWrench,
41
+ faGlobe,
42
+ faIdBadge,
43
+ faPen,
44
+ faPlus,
45
+ faUserSlash,
46
+ faUsers,
25
47
  faCheckCircle$1,
26
48
  faClone,
27
49
  faFileLines
@@ -42,8 +64,29 @@ const FA_ICON_ALIAS_MAP = {
42
64
  "angles-up-down": "up-down",
43
65
  clone: ["far", "clone"],
44
66
  "file-lines": ["far", "file-lines"],
45
- brain: "brain"
67
+ brain: "brain",
68
+ times: "xmark",
69
+ close: "xmark",
70
+ x: "xmark",
71
+ "chevron-down": "chevron-down",
72
+ download: "download",
73
+ play: "play",
74
+ pause: "pause",
75
+ spinner: "spinner",
76
+ "fa-warning": "triangle-exclamation",
77
+ "compress-alt": "down-left-and-up-right-to-center"
46
78
  };
79
+ registerIcons({
80
+ agents: SvgAgents,
81
+ mcp: SvgMcp,
82
+ "model-gateway": SvgModelGateway,
83
+ guardrails: SvgGuardrails,
84
+ trash: SvgTrash
85
+ });
86
+ registerImgIcons({
87
+ logo
88
+ });
89
+ const ICON_SIZE_REM = { "12": 0.75, "16": 1, "24": 1.5 };
47
90
  const DynamicIcon = ({ name, ...props }) => {
48
91
  const IconToRender = CUSTOM_ICONS_MAP[name];
49
92
  return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("span", {}), children: /* @__PURE__ */ jsx(IconToRender, { ...props }) });
@@ -77,6 +120,7 @@ const IconProvider = ({
77
120
  nativeProps = {}
78
121
  }) => {
79
122
  const { isDark } = useTheme();
123
+ const [failedSrc, setFailedSrc] = useState(null);
80
124
  let themeAwareImgIcon = null;
81
125
  let fallbackImgIcon = null;
82
126
  if (typeof icon === "string" && icon.startsWith("http")) {
@@ -90,25 +134,40 @@ const IconProvider = ({
90
134
  fallbackImgIcon = IMG_ICONS_MAP[icon[1]];
91
135
  }
92
136
  const faIcon = FA_ICON_ALIAS_MAP[icon] || icon;
93
- const iconStyles = width ? { width: `${width}rem`, height: "auto" } : { height: `${size}rem`, width: "auto" };
137
+ const sizeRem = typeof size === "string" && size in ICON_SIZE_REM ? ICON_SIZE_REM[size] : typeof size === "number" ? size : 0.75;
138
+ const iconStyles = width ? { width: `${width}rem`, height: "auto" } : { height: `${sizeRem}rem`, width: "auto" };
139
+ const imgSrc = failedSrc === themeAwareImgIcon && fallbackImgIcon && fallbackImgIcon !== themeAwareImgIcon ? fallbackImgIcon : themeAwareImgIcon;
94
140
  return themeAwareImgIcon ? /* @__PURE__ */ jsx(
95
141
  "img",
96
142
  {
97
143
  ref: forwardedRef,
98
- src: themeAwareImgIcon,
144
+ src: imgSrc ?? void 0,
145
+ alt: "",
146
+ "aria-hidden": true,
99
147
  style: iconStyles,
100
148
  className: classNames(className),
101
149
  onClick,
102
- onError: (e) => {
103
- e.currentTarget.src = fallbackImgIcon;
150
+ onError: () => {
151
+ if (themeAwareImgIcon && fallbackImgIcon && fallbackImgIcon !== themeAwareImgIcon) {
152
+ setFailedSrc(themeAwareImgIcon);
153
+ }
104
154
  }
105
155
  }
106
- ) : CUSTOM_ICONS_MAP[icon] ? /* @__PURE__ */ jsx(DynamicIcon, { onClick, style: { ...iconStyles, color }, name: String(icon), className }) : /* @__PURE__ */ jsx(
156
+ ) : CUSTOM_ICONS_MAP[icon] ? /* @__PURE__ */ jsx(
157
+ DynamicIcon,
158
+ {
159
+ onClick,
160
+ style: { ...iconStyles, color },
161
+ name: String(icon),
162
+ className,
163
+ "aria-hidden": true
164
+ }
165
+ ) : /* @__PURE__ */ jsx(
107
166
  FontAwesomeIcon,
108
167
  {
109
168
  ref: forwardedRef,
110
169
  icon: faIcon,
111
- style: { color, fontSize: `${width ?? size}rem` },
170
+ style: { color, fontSize: `${width ?? sizeRem}rem` },
112
171
  className: classNames("text-xs", className),
113
172
  onClick,
114
173
  ...nativeProps
@@ -1 +1 @@
1
- {"version":3,"file":"IconProvider.es.js","sources":["../../../src/components/atoms/IconProvider.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef, Suspense } from 'react'\nimport { IconProp as FontAwesomeIconProp, library } from '@fortawesome/fontawesome-svg-core'\nimport {\n faCheckCircle as farCheckCircle,\n faClone as farClone,\n faFileLines as farFileLines,\n} from '@fortawesome/free-regular-svg-icons'\nimport {\n faCheck,\n faCheckCircle,\n faChevronLeft,\n faChevronRight,\n faCircleXmark,\n faCode,\n faCopy,\n faCube,\n faExpandAlt,\n faExternalLink,\n faRotateRight,\n faServer,\n faTerminal,\n faUpDown,\n faWrench,\n} from '@fortawesome/free-solid-svg-icons'\nimport { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome'\n\nimport classNames from '@/utils/classNames'\n\nimport useTheme from '../theme/useTheme'\n\n// Register FontAwesome icons used across agent-chat components\nlibrary.add(\n faCheck,\n faCheckCircle,\n faChevronLeft,\n faChevronRight,\n faCircleXmark,\n faCode,\n faCopy,\n faCube,\n faExpandAlt,\n faExternalLink,\n faRotateRight,\n faServer,\n faTerminal,\n faUpDown,\n faWrench,\n farCheckCircle,\n farClone,\n farFileLines,\n)\n\ntype ImgIconMap = { [key: string]: string }\nconst IMG_ICONS_MAP: ImgIconMap = {}\nexport const registerImgIcons = (iconMap: ImgIconMap) => {\n Object.assign(IMG_ICONS_MAP, iconMap)\n}\n\ntype CustomIcon = React.ComponentType<CustomIconProps>\ntype CustomIconMap = {\n [key: string]: React.LazyExoticComponent<CustomIcon> | CustomIcon\n}\nconst CUSTOM_ICONS_MAP: CustomIconMap = {}\nexport const registerIcons = (iconMap: CustomIconMap) => {\n Object.assign(CUSTOM_ICONS_MAP, iconMap)\n}\n\nconst FA_ICON_ALIAS_MAP: { readonly [key: string]: string | FontAwesomeIconProp } = {\n github: 'fa-brands fa-github',\n gitlab: 'fa-brands fa-gitlab',\n bitbucket: 'fa-brands fa-bitbucket',\n jenkins: 'fa-brands fa-jenkins',\n 'angles-up-down': 'up-down',\n clone: ['far', 'clone'],\n 'file-lines': ['far', 'file-lines'],\n brain: 'brain',\n}\n\nexport type IconProp = string | FontAwesomeIconProp\n\ninterface IconProps {\n icon: IconProp\n color?: string\n className?: string\n onClick?: (e: React.MouseEvent) => void\n size?: number\n width?: number\n forwardedRef?: React.Ref<HTMLElement>\n nativeProps?: Partial<FontAwesomeIconProps>\n}\n\ntype CustomIconProps = {\n onClick?: (e: React.MouseEvent) => void\n className?: string\n style?: React.CSSProperties\n}\ntype DynamicIconProps = CustomIconProps & {\n name: string\n}\n\nconst DynamicIcon = ({ name, ...props }: DynamicIconProps) => {\n const IconToRender = CUSTOM_ICONS_MAP[name]\n return (\n <Suspense fallback={<span />}>\n <IconToRender {...props} />\n </Suspense>\n )\n}\n\nfunction addDarkSuffix(url: string): string {\n const urlObj = new URL(url)\n const parts = urlObj.pathname.split('/')\n const filename = parts.pop()\n\n if (!filename) {\n return url + '-dark'\n }\n\n const dotIndex = filename.lastIndexOf('.')\n let newFilename: string\n\n if (dotIndex !== -1) {\n newFilename = filename.slice(0, dotIndex) + '-dark' + filename.slice(dotIndex)\n } else {\n newFilename = filename + '-dark'\n }\n\n parts.push(newFilename)\n urlObj.pathname = parts.join('/')\n return urlObj.toString()\n}\n\nconst IconProvider = ({\n icon,\n color,\n size = 0.75,\n width,\n className,\n onClick,\n forwardedRef,\n nativeProps = {},\n}: IconProps) => {\n const { isDark } = useTheme()\n let themeAwareImgIcon: string | null = null\n let fallbackImgIcon: string | null = null\n\n if (typeof icon === 'string' && icon.startsWith('http')) {\n themeAwareImgIcon = isDark ? addDarkSuffix(icon) : icon\n fallbackImgIcon = icon\n } else if (typeof icon === 'string' && IMG_ICONS_MAP[icon as string]) {\n themeAwareImgIcon = isDark\n ? IMG_ICONS_MAP[`${icon}-dark`] ?? IMG_ICONS_MAP[icon as string]\n : IMG_ICONS_MAP[icon as string]\n fallbackImgIcon = IMG_ICONS_MAP[icon as string]\n } else if (Array.isArray(icon) && icon[1] && IMG_ICONS_MAP[icon[1] as string]) {\n themeAwareImgIcon = isDark\n ? IMG_ICONS_MAP[`${icon[1]}-dark`] ?? IMG_ICONS_MAP[icon[1] as string]\n : IMG_ICONS_MAP[icon[1] as string]\n fallbackImgIcon = IMG_ICONS_MAP[icon[1] as string]\n }\n\n const faIcon = FA_ICON_ALIAS_MAP[icon as string] || icon\n\n const iconStyles = width ? { width: `${width}rem`, height: 'auto' } : { height: `${size}rem`, width: 'auto' }\n\n return themeAwareImgIcon ? (\n <img\n ref={forwardedRef as React.ForwardedRef<HTMLImageElement>}\n src={themeAwareImgIcon}\n style={iconStyles}\n className={classNames(className)}\n onClick={onClick}\n onError={(e) => {\n e.currentTarget.src = fallbackImgIcon as string\n }}\n />\n ) : CUSTOM_ICONS_MAP[icon as string] ? (\n <DynamicIcon onClick={onClick} style={{ ...iconStyles, color }} name={String(icon)} className={className} />\n ) : (\n <FontAwesomeIcon\n ref={forwardedRef as ForwardedRef<SVGSVGElement>}\n icon={faIcon as FontAwesomeIconProp}\n style={{ color, fontSize: `${width ?? size}rem` }}\n className={classNames('text-xs', className)}\n onClick={onClick}\n {...nativeProps}\n />\n )\n}\n\nexport default React.memo(\n forwardRef<HTMLElement, IconProps>((props, ref) => <IconProvider {...props} forwardedRef={ref} />),\n)\n"],"names":["farCheckCircle","farClone","farFileLines","React"],"mappings":";;;;;;;;AA+BA,QAAQ;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACAA;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U,GAAG,SAAS,IAAI,MAAA;AAAA,MAC1C,WAAW,WAAW,WAAW,SAAS;AAAA,MAC1C;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAA,iBAAeC,eAAM;AAAA,EACnB,WAAmC,CAAC,OAAO,QAAQ,oBAAC,gBAAc,GAAG,OAAO,cAAc,KAAK,CAAE;AACnG;"}
1
+ {"version":3,"file":"IconProvider.es.js","sources":["../../../src/assets/icons/tfy/agents.svg?react","../../../src/assets/icons/tfy/guardrails.svg?react","../../../src/assets/icons/tfy/logo.svg","../../../src/assets/icons/tfy/mcp.svg?react","../../../src/assets/icons/tfy/model-gateway.svg?react","../../../src/assets/icons/trash.svg?react","../../../src/components/atoms/IconProvider.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgAgents = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"currentColor\", width: \"1em\", height: \"1em\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z\", stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M5 20a7 7 0 0 1 14 0\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 18.5, cy: 8.5, r: 2, stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 5.5, cy: 8.5, r: 2, stroke: \"currentColor\", strokeWidth: 1.5 }));\nexport default SvgAgents;\n","import * as React from \"react\";\nconst SvgGuardrails = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"currentColor\", width: \"1em\", height: \"1em\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 3 4 7v5c0 5 3.5 8.5 8 9 4.5-.5 8-4 8-9V7l-8-4Z\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 12.5 11 14.5 15.5 10\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgGuardrails;\n","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='15.5862'%20viewBox='0%200%2016%2015.5862'%20fill='none'%3e%3cg%20id='TFY%20mark'%3e%3cpath%20id='Face%201'%20d='M15.7931%202.06897L8%206.48276V11.0345L11.931%208.96552L12%2013.3793L16%2011.1724L15.7931%202.06897Z'%20fill='%231F009D'/%3e%3cpath%20id='Face%202'%20d='M0.137931%202.06897L0%2011.1724L8%2015.5862V11.0345L4%208.82759V4.27586L0.137931%202.06897Z'%20fill='%236DCAFF'/%3e%3cpath%20id='Face%203'%20d='M15.7931%202.06897L11.8621%200L4%204.27586L8%206.48276L15.7931%202.06897Z'%20fill='%235429FF'/%3e%3cpath%20id='Face%204'%20d='M4%204.27586V8.82759L8%2011.0345V6.48276L4%204.27586Z'%20fill='%232900CE'/%3e%3cpath%20id='Face%205'%20d='M11.931%208.96552L8%2011.0345V15.5862L12%2013.3793L11.931%208.96552Z'%20fill='%23B9E5FF'/%3e%3cpath%20id='Face%206'%20d='M0.137939%202.06897L4.00001%204.27586L7.58622%202.06897L4.00001%200.137931L0.137939%202.06897Z'%20fill='%2399DAFF'/%3e%3c/g%3e%3c/svg%3e\"","import * as React from \"react\";\nconst SvgMcp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"currentColor\", width: \"1em\", height: \"1em\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { x: 3, y: 3, width: 7, height: 7, rx: 1.5, stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"rect\", { x: 14, y: 3, width: 7, height: 7, rx: 1.5, stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"rect\", { x: 3, y: 14, width: 7, height: 7, rx: 1.5, stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M14 17.5h7M17.5 14v7\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\" }));\nexport default SvgMcp;\n","import * as React from \"react\";\nconst SvgModelGateway = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"currentColor\", width: \"1em\", height: \"1em\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 12h16M12 4v16\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 12, cy: 12, r: 3, stroke: \"currentColor\", strokeWidth: 1.5 }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 4, cy: 12, r: 1.5, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 20, cy: 12, r: 1.5, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 12, cy: 4, r: 1.5, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 12, cy: 20, r: 1.5, fill: \"currentColor\" }));\nexport default SvgModelGateway;\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 14 14\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M3.66634 1.66668V0.333344H10.333V1.66668H13.6663V3.00001H12.333V13C12.333 13.3682 12.0345 13.6667 11.6663 13.6667H2.33301C1.96482 13.6667 1.66634 13.3682 1.66634 13V3.00001H0.333008V1.66668H3.66634ZM2.99967 3.00001V12.3333H10.9997V3.00001H2.99967ZM4.99967 5.00001H6.33301V10.3333H4.99967V5.00001ZM7.66634 5.00001H8.99967V10.3333H7.66634V5.00001Z\", fill: \"currentColor\" }));\nexport default SvgTrash;\n","import React, { ForwardedRef, forwardRef, Suspense, useState } from 'react'\nimport { IconProp as FontAwesomeIconProp, library } from '@fortawesome/fontawesome-svg-core'\nimport {\n faCheckCircle as farCheckCircle,\n faClone as farClone,\n faFileLines as farFileLines,\n} from '@fortawesome/free-regular-svg-icons'\nimport {\n faCheck,\n faCheckCircle,\n faChevronDown,\n faChevronLeft,\n faChevronRight,\n faCircleQuestion,\n faCircleXmark,\n faCode,\n faCompressAlt,\n faCopy,\n faCube,\n faDownload,\n faExpandAlt,\n faExternalLink,\n faGlobe,\n faIdBadge,\n faPause,\n faPen,\n faPlay,\n faPlus,\n faRotateRight,\n faServer,\n faSpinner,\n faTerminal,\n faTriangleExclamation,\n faUpDown,\n faUsers,\n faUserSlash,\n faWrench,\n faXmark,\n} from '@fortawesome/free-solid-svg-icons'\nimport { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome'\n\nimport Agents from '@/assets/icons/tfy/agents.svg?react'\nimport Guardrails from '@/assets/icons/tfy/guardrails.svg?react'\nimport logo from '@/assets/icons/tfy/logo.svg'\nimport Mcp from '@/assets/icons/tfy/mcp.svg?react'\nimport ModelGateway from '@/assets/icons/tfy/model-gateway.svg?react'\nimport Trash from '@/assets/icons/trash.svg?react'\n\nimport classNames from '@/utils/classNames'\n\nimport useTheme from '../theme/useTheme'\n\n// Register FontAwesome icons used across agent-chat components\nlibrary.add(\n faCheck,\n faCheckCircle,\n faChevronDown,\n faChevronLeft,\n faChevronRight,\n faCircleQuestion,\n faCircleXmark,\n faCompressAlt,\n faDownload,\n faPause,\n faPlay,\n faSpinner,\n faXmark,\n faCode,\n faCopy,\n faCube,\n faExpandAlt,\n faExternalLink,\n faRotateRight,\n faServer,\n faTerminal,\n faTriangleExclamation,\n faUpDown,\n faWrench,\n faGlobe,\n faIdBadge,\n faPen,\n faPlus,\n faUserSlash,\n faUsers,\n farCheckCircle,\n farClone,\n farFileLines,\n)\n\ntype ImgIconMap = { [key: string]: string }\nconst IMG_ICONS_MAP: ImgIconMap = {}\nexport const registerImgIcons = (iconMap: ImgIconMap) => {\n Object.assign(IMG_ICONS_MAP, iconMap)\n}\n\ntype CustomIcon = React.ComponentType<CustomIconProps>\ntype CustomIconMap = {\n [key: string]: React.LazyExoticComponent<CustomIcon> | CustomIcon\n}\nconst CUSTOM_ICONS_MAP: CustomIconMap = {}\nexport const registerIcons = (iconMap: CustomIconMap) => {\n Object.assign(CUSTOM_ICONS_MAP, iconMap)\n}\n\nconst FA_ICON_ALIAS_MAP: { readonly [key: string]: string | FontAwesomeIconProp } = {\n github: 'fa-brands fa-github',\n gitlab: 'fa-brands fa-gitlab',\n bitbucket: 'fa-brands fa-bitbucket',\n jenkins: 'fa-brands fa-jenkins',\n 'angles-up-down': 'up-down',\n clone: ['far', 'clone'],\n 'file-lines': ['far', 'file-lines'],\n brain: 'brain',\n times: 'xmark',\n close: 'xmark',\n x: 'xmark',\n 'chevron-down': 'chevron-down',\n download: 'download',\n play: 'play',\n pause: 'pause',\n spinner: 'spinner',\n 'fa-warning': 'triangle-exclamation',\n 'compress-alt': 'down-left-and-up-right-to-center',\n}\n\nregisterIcons({\n agents: Agents,\n mcp: Mcp,\n 'model-gateway': ModelGateway,\n guardrails: Guardrails,\n trash: Trash,\n})\n\nregisterImgIcons({\n logo,\n})\n\nexport type IconProp = string | FontAwesomeIconProp\n\n/** Figma Size variant. Pixel frame, resolved to rem (12 → 0.75, 16 → 1, 24 → 1.5). */\nexport type IconSize = '12' | '16' | '24'\n\nconst ICON_SIZE_REM: Record<IconSize, number> = { '12': 0.75, '16': 1, '24': 1.5 }\n\ninterface IconProps {\n icon: IconProp\n color?: string\n className?: string\n onClick?: (e: React.MouseEvent) => void\n size?: number | IconSize\n width?: number\n forwardedRef?: React.Ref<HTMLElement>\n nativeProps?: Partial<FontAwesomeIconProps>\n}\n\ntype CustomIconProps = {\n onClick?: (e: React.MouseEvent) => void\n className?: string\n style?: React.CSSProperties\n 'aria-hidden'?: boolean\n}\ntype DynamicIconProps = CustomIconProps & {\n name: string\n}\n\nconst DynamicIcon = ({ name, ...props }: DynamicIconProps) => {\n const IconToRender = CUSTOM_ICONS_MAP[name]\n return (\n <Suspense fallback={<span />}>\n <IconToRender {...props} />\n </Suspense>\n )\n}\n\nfunction addDarkSuffix(url: string): string {\n const urlObj = new URL(url)\n const parts = urlObj.pathname.split('/')\n const filename = parts.pop()\n\n if (!filename) {\n return url + '-dark'\n }\n\n const dotIndex = filename.lastIndexOf('.')\n let newFilename: string\n\n if (dotIndex !== -1) {\n newFilename = filename.slice(0, dotIndex) + '-dark' + filename.slice(dotIndex)\n } else {\n newFilename = filename + '-dark'\n }\n\n parts.push(newFilename)\n urlObj.pathname = parts.join('/')\n return urlObj.toString()\n}\n\nconst IconProvider = ({\n icon,\n color,\n size = 0.75,\n width,\n className,\n onClick,\n forwardedRef,\n nativeProps = {},\n}: IconProps) => {\n const { isDark } = useTheme()\n const [failedSrc, setFailedSrc] = useState<string | null>(null)\n let themeAwareImgIcon: string | null = null\n let fallbackImgIcon: string | null = null\n\n if (typeof icon === 'string' && icon.startsWith('http')) {\n themeAwareImgIcon = isDark ? addDarkSuffix(icon) : icon\n fallbackImgIcon = icon\n } else if (typeof icon === 'string' && IMG_ICONS_MAP[icon as string]) {\n themeAwareImgIcon = isDark\n ? IMG_ICONS_MAP[`${icon}-dark`] ?? IMG_ICONS_MAP[icon as string]\n : IMG_ICONS_MAP[icon as string]\n fallbackImgIcon = IMG_ICONS_MAP[icon as string]\n } else if (Array.isArray(icon) && icon[1] && IMG_ICONS_MAP[icon[1] as string]) {\n themeAwareImgIcon = isDark\n ? IMG_ICONS_MAP[`${icon[1]}-dark`] ?? IMG_ICONS_MAP[icon[1] as string]\n : IMG_ICONS_MAP[icon[1] as string]\n fallbackImgIcon = IMG_ICONS_MAP[icon[1] as string]\n }\n\n const faIcon = FA_ICON_ALIAS_MAP[icon as string] || icon\n const sizeRem =\n typeof size === 'string' && size in ICON_SIZE_REM ? ICON_SIZE_REM[size] : typeof size === 'number' ? size : 0.75\n\n const iconStyles = width ? { width: `${width}rem`, height: 'auto' } : { height: `${sizeRem}rem`, width: 'auto' }\n const imgSrc =\n failedSrc === themeAwareImgIcon && fallbackImgIcon && fallbackImgIcon !== themeAwareImgIcon\n ? fallbackImgIcon\n : themeAwareImgIcon\n\n return themeAwareImgIcon ? (\n <img\n ref={forwardedRef as React.ForwardedRef<HTMLImageElement>}\n src={imgSrc ?? undefined}\n alt=\"\"\n aria-hidden\n style={iconStyles}\n className={classNames(className)}\n onClick={onClick}\n onError={() => {\n if (themeAwareImgIcon && fallbackImgIcon && fallbackImgIcon !== themeAwareImgIcon) {\n setFailedSrc(themeAwareImgIcon)\n }\n }}\n />\n ) : CUSTOM_ICONS_MAP[icon as string] ? (\n <DynamicIcon\n onClick={onClick}\n style={{ ...iconStyles, color }}\n name={String(icon)}\n className={className}\n aria-hidden\n />\n ) : (\n <FontAwesomeIcon\n ref={forwardedRef as ForwardedRef<SVGSVGElement>}\n icon={faIcon as FontAwesomeIconProp}\n style={{ color, fontSize: `${width ?? sizeRem}rem` }}\n className={classNames('text-xs', className)}\n onClick={onClick}\n {...nativeProps}\n />\n )\n}\n\nexport default React.memo(\n forwardRef<HTMLElement, IconProps>((props, ref) => <IconProvider {...props} forwardedRef={ref} />),\n)\n"],"names":["farCheckCircle","farClone","farFileLines","Agents","Mcp","ModelGateway","Guardrails","Trash","React"],"mappings":";;;;;;;;;AACA,MAAM,YAAY,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,aAAa,MAAM,gBAAgB,OAAO,OAAO,QAAQ,OAAO,GAAG,MAAK,GAAoB,sBAAM,cAAc,QAAQ,EAAE,GAAG,sCAAsC,QAAQ,gBAAgB,aAAa,I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AY,QAAQ,gBAAgB,cAAc,IAAI,IAAI,OAAO,SAAS,WAAW,OAAO;AAE9G,QAAM,aAAa,QAAQ,EAAE,OAAO,GAAG,KAAK,OAAO,QAAQ,OAAA,IAAW,EAAE,QAAQ,GAAG,OAAO,OAAO,OAAO,OAAA;AACxG,QAAM,SACJ,cAAc,qBAAqB,mBAAmB,oBAAoB,oBACtE,kBACA;AAEN,SAAO,oBACL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAK,UAAU;AAAA,MACf,KAAI;AAAA,MACJ,eAAW;AAAA,MACX,OAAO;AAAA,MACP,WAAW,WAAW,SAAS;AAAA,MAC/B;AAAA,MACA,SAAS,MAAM;AACb,YAAI,qBAAqB,mBAAmB,oBAAoB,mBAAmB;AACjF,uBAAa,iBAAiB;AAAA,QAChC;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,IAEA,iBAAiB,IAAc,IACjC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,OAAO,EAAE,GAAG,YAAY,MAAA;AAAA,MACxB,MAAM,OAAO,IAAI;AAAA,MACjB;AAAA,MACA,eAAW;AAAA,IAAA;AAAA,EAAA,IAGb;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO,EAAE,OAAO,UAAU,GAAG,SAAS,OAAO,MAAA;AAAA,MAC7C,WAAW,WAAW,WAAW,SAAS;AAAA,MAC1C;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAA,iBAAeC,eAAM;AAAA,EACnB,WAAmC,CAAC,OAAO,QAAQ,oBAAC,gBAAc,GAAG,OAAO,cAAc,KAAK,CAAE;AACnG;"}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ /** Figma Color: Full · Mono · On dark. */
4
+ export type LogoColor = 'full' | 'mono' | 'on-dark';
5
+ /** Figma Size. Square box in px, same literal style as IconSize. */
6
+ export type LogoSize = '16' | '24' | '32' | '40';
7
+ declare const logoVariants: (props?: ({
8
+ color?: "full" | "mono" | "on-dark" | null | undefined;
9
+ size?: "16" | "24" | "32" | "40" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ type LogoProps = Omit<React.ComponentProps<'span'>, 'color' | 'children'> & VariantProps<typeof logoVariants> & {
12
+ /** kebab-case brand slug, e.g. `github`, or an http(s) CDN URL. */
13
+ brand: string;
14
+ };
15
+ /** Requested colour, then Full, then nothing. Missing Mono and On dark repeat Full. */
16
+ export declare function resolveLogoIcon(brand: string, color: LogoColor, available: ReadonlySet<string>): string | null;
17
+ declare function Logo({ brand, color, size, className, ref, 'aria-label': ariaLabel, ...props }: LogoProps): React.JSX.Element | null;
18
+ export default Logo;
@@ -0,0 +1,79 @@
1
+ var _a;
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { c as cva } from "../../index-DSVg79g-.js";
5
+ import IconProvider, { registerIcons } from "./IconProvider.es.js";
6
+ import { c as classNames } from "../../classNames-B1XpQHle.js";
7
+ const logoModules = /* @__PURE__ */ Object.assign({
8
+ "../../assets/logos/brand/tfy.svg": () => import("../../tfy-YZ5zY9Jw.js").then((m) => m["default"])
9
+ });
10
+ const LOGO_KEYS = /* @__PURE__ */ new Set();
11
+ const logoIcons = {};
12
+ for (const [path, loader] of Object.entries(logoModules)) {
13
+ const basename = (_a = path.split("/").pop()) == null ? void 0 : _a.replace(/\.svg$/, "").split("?")[0];
14
+ if (!basename) continue;
15
+ const key = `logo-${basename}`;
16
+ LOGO_KEYS.add(key);
17
+ logoIcons[key] = React.lazy(async () => ({ default: await loader() }));
18
+ }
19
+ registerIcons(logoIcons);
20
+ const COLOR_SUFFIX = {
21
+ full: "",
22
+ mono: "-mono",
23
+ "on-dark": "-on-dark"
24
+ };
25
+ const LOGO_SIZE_REM = {
26
+ "16": 1,
27
+ "24": 1.5,
28
+ "32": 2,
29
+ "40": 2.5
30
+ };
31
+ const logoVariants = cva("inline-flex shrink-0 items-center justify-center", {
32
+ variants: {
33
+ color: {
34
+ full: "",
35
+ mono: "text-icon-primary",
36
+ "on-dark": "text-icon-on-solid"
37
+ },
38
+ size: {
39
+ "16": "size-4",
40
+ "24": "size-6",
41
+ "32": "size-8",
42
+ "40": "size-10"
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ color: "full",
47
+ size: "32"
48
+ }
49
+ });
50
+ function resolveLogoIcon(brand, color, available) {
51
+ const requested = `logo-${brand}${COLOR_SUFFIX[color]}`;
52
+ if (available.has(requested)) return requested;
53
+ const full = `logo-${brand}`;
54
+ if (color !== "full" && available.has(full)) return full;
55
+ return null;
56
+ }
57
+ function Logo({ brand, color, size, className, ref, "aria-label": ariaLabel, ...props }) {
58
+ const resolvedColor = color ?? "full";
59
+ const resolvedSize = size ?? "32";
60
+ const icon = brand.startsWith("http") ? brand : resolveLogoIcon(brand, resolvedColor, LOGO_KEYS);
61
+ if (!icon) return null;
62
+ const labelled = Boolean(ariaLabel);
63
+ return /* @__PURE__ */ jsx(
64
+ "span",
65
+ {
66
+ ref,
67
+ "data-slot": "logo",
68
+ ...labelled ? { role: "img", "aria-label": ariaLabel } : { "aria-hidden": true },
69
+ ...props,
70
+ className: classNames(logoVariants({ color: resolvedColor, size: resolvedSize }), className),
71
+ children: /* @__PURE__ */ jsx(IconProvider, { icon, size: LOGO_SIZE_REM[resolvedSize], className: "max-h-full max-w-full" })
72
+ }
73
+ );
74
+ }
75
+ export {
76
+ Logo as default,
77
+ resolveLogoIcon
78
+ };
79
+ //# sourceMappingURL=Logo.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.es.js","sources":["../../../src/components/atoms/Logo.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nimport IconProvider, { registerIcons } from './IconProvider'\n\n/**\n * Drop SVGs in `src/assets/logos/{brand,product}/`:\n * `<slug>.svg` (Full), `<slug>-on-dark.svg` (On dark), `<slug>-mono.svg` (Mono).\n * Token-bound fills (Mono, and the white parts of On dark) are `currentColor`.\n * One file per colour; the box scales it. Keys are `logo-<basename>` (not `-dark`,\n * so IconProvider does not swap them with the theme).\n */\nconst logoModules = import.meta.glob<React.FC<React.SVGProps<SVGSVGElement>>>('../../assets/logos/*/*.svg', {\n query: '?react',\n import: 'default',\n})\n\nconst LOGO_KEYS = new Set<string>()\n\nconst logoIcons: Parameters<typeof registerIcons>[0] = {}\nfor (const [path, loader] of Object.entries(logoModules)) {\n const basename = path\n .split('/')\n .pop()\n ?.replace(/\\.svg$/, '')\n .split('?')[0]\n if (!basename) continue\n const key = `logo-${basename}`\n LOGO_KEYS.add(key)\n logoIcons[key] = React.lazy(async () => ({ default: await loader() }))\n}\nregisterIcons(logoIcons)\n\n/** Figma Color: Full · Mono · On dark. */\nexport type LogoColor = 'full' | 'mono' | 'on-dark'\n\n/** Figma Size. Square box in px, same literal style as IconSize. */\nexport type LogoSize = '16' | '24' | '32' | '40'\n\nconst COLOR_SUFFIX: Record<LogoColor, string> = {\n full: '',\n mono: '-mono',\n 'on-dark': '-on-dark',\n}\n\nconst LOGO_SIZE_REM: Record<LogoSize, number> = {\n '16': 1,\n '24': 1.5,\n '32': 2,\n '40': 2.5,\n}\n\nconst logoVariants = cva('inline-flex shrink-0 items-center justify-center', {\n variants: {\n color: {\n full: '',\n mono: 'text-icon-primary',\n 'on-dark': 'text-icon-on-solid',\n },\n size: {\n '16': 'size-4',\n '24': 'size-6',\n '32': 'size-8',\n '40': 'size-10',\n },\n },\n defaultVariants: {\n color: 'full',\n size: '32',\n },\n})\n\ntype LogoProps = Omit<React.ComponentProps<'span'>, 'color' | 'children'> &\n VariantProps<typeof logoVariants> & {\n /** kebab-case brand slug, e.g. `github`, or an http(s) CDN URL. */\n brand: string\n }\n\n/** Requested colour, then Full, then nothing. Missing Mono and On dark repeat Full. */\nexport function resolveLogoIcon(brand: string, color: LogoColor, available: ReadonlySet<string>): string | null {\n const requested = `logo-${brand}${COLOR_SUFFIX[color]}`\n if (available.has(requested)) return requested\n const full = `logo-${brand}`\n if (color !== 'full' && available.has(full)) return full\n return null\n}\n\nfunction Logo({ brand, color, size, className, ref, 'aria-label': ariaLabel, ...props }: LogoProps) {\n const resolvedColor = color ?? 'full'\n const resolvedSize = size ?? '32'\n // CDN urls go through IconProvider, which loads `<file>-dark.<ext>` in dark mode and falls back to the original.\n const icon = brand.startsWith('http') ? brand : resolveLogoIcon(brand, resolvedColor, LOGO_KEYS)\n if (!icon) return null\n\n const labelled = Boolean(ariaLabel)\n\n return (\n <span\n ref={ref}\n data-slot=\"logo\"\n {...(labelled ? { role: 'img' as const, 'aria-label': ariaLabel } : { 'aria-hidden': true as const })}\n {...props}\n className={cn(logoVariants({ color: resolvedColor, size: resolvedSize }), className)}\n >\n <IconProvider icon={icon} size={LOGO_SIZE_REM[resolvedSize]} className=\"max-h-full max-w-full\" />\n </span>\n )\n}\n\nexport default Logo\n"],"names":["cn"],"mappings":";;;;;;AAcA,MAAM,cAAc,uBAAA,OAAA;AAAA,EAAA,oCAAA,MAAA,OAAA,uBAAA,EAAA,KAAA,OAAA,EAAA,SAAA,CAAA;AAAA,CAAA;AAKpB,MAAM,gCAAgB,IAAA;AAEtB,MAAM,YAAiD,CAAA;AACvD,WAAW,CAAC,MAAM,MAAM,KAAK,OAAO,QAAQ,WAAW,GAAG;AACxD,QAAM,YAAW,UACd,MAAM,GAAG,EACT,IAAA,MAFc,mBAGb,QAAQ,UAAU,IACnB,MAAM,KAAK;AACd,MAAI,CAAC,SAAU;AACf,QAAM,MAAM,QAAQ,QAAQ;AAC5B,YAAU,IAAI,GAAG;AACjB,YAAU,GAAG,IAAI,MAAM,KAAK,aAAa,EAAE,SAAS,MAAM,OAAA,EAAO,EAAI;AACvE;AACA,cAAc,SAAS;AAQvB,MAAM,eAA0C;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM;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,YAAY,GAAG,WAAU,wBAAA,CAAwB;AAAA,IAAA;AAAA,EAAA;AAGrG;"}
@@ -1,8 +1,32 @@
1
- import React from 'react';
2
- import MuiModal from '@mui/material/Modal';
3
- export interface ModalProps extends React.ComponentProps<typeof MuiModal> {
1
+ import * as React from 'react';
2
+ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
3
+ declare function Dialog(props: DialogPrimitive.Root.Props): React.JSX.Element;
4
+ declare function DialogTrigger(props: DialogPrimitive.Trigger.Props): React.JSX.Element;
5
+ declare function DialogPortal(props: DialogPrimitive.Portal.Props): React.JSX.Element;
6
+ declare function DialogClose(props: DialogPrimitive.Close.Props): React.JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
8
+ declare function DialogContent({ className, children, showClose, ...props }: DialogPrimitive.Popup.Props & {
9
+ showClose?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
15
+ export interface ModalProps {
16
+ open: boolean;
17
+ onClose?: (event?: object, reason?: string) => void;
4
18
  children: JSX.Element;
19
+ /** Accessible name for the dialog; children supply the visible panel. */
20
+ ariaLabel?: string;
5
21
  disableEnforceFocus?: boolean;
22
+ className?: string;
6
23
  }
24
+ /**
25
+ * Overlay-only modal: children render their own panel (Alert, ImagesPreview), so no
26
+ * DialogContent card/padding/max-width is applied here.
27
+ * Base UI fires `onOpenChange(false)` for backdrop, Escape, and programmatic close;
28
+ * reasons are mapped to the legacy MUI-style strings callers expect.
29
+ */
7
30
  declare const Modal: React.FC<ModalProps>;
8
31
  export default Modal;
32
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -1,19 +1,18 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import MuiModal from "@mui/material/Modal";
3
- const Modal = ({ children, disableEnforceFocus = false, ...nativeProps }) => {
4
- return /* @__PURE__ */ jsx(
5
- MuiModal,
6
- {
7
- ...nativeProps,
8
- disableEnforceFocus,
9
- className: "modal modal-open",
10
- "aria-labelledby": "modal-modal-title",
11
- "aria-describedby": "modal-modal-description",
12
- children
13
- }
14
- );
15
- };
1
+ import "react/jsx-runtime";
2
+ import "./IconProvider.es.js";
3
+ import "../../classNames-B1XpQHle.js";
4
+ import { D, k, a, l, d, b, m, n, c, o, M } from "../../Modal-C4MUy9GD.js";
16
5
  export {
17
- Modal as default
6
+ D as Dialog,
7
+ k as DialogClose,
8
+ a as DialogContent,
9
+ l as DialogDescription,
10
+ d as DialogFooter,
11
+ b as DialogHeader,
12
+ m as DialogOverlay,
13
+ n as DialogPortal,
14
+ c as DialogTitle,
15
+ o as DialogTrigger,
16
+ M as default
18
17
  };
19
18
  //# sourceMappingURL=Modal.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.es.js","sources":["../../../src/components/atoms/Modal.tsx"],"sourcesContent":["import React from 'react'\nimport MuiModal from '@mui/material/Modal'\n\nexport interface ModalProps extends React.ComponentProps<typeof MuiModal> {\n children: JSX.Element\n disableEnforceFocus?: boolean\n}\n\nconst Modal: React.FC<ModalProps> = ({ children, disableEnforceFocus = false, ...nativeProps }) => {\n return (\n <MuiModal\n {...nativeProps}\n disableEnforceFocus={disableEnforceFocus}\n className=\"modal modal-open\"\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n >\n {children}\n </MuiModal>\n )\n}\n\nexport default Modal\n"],"names":[],"mappings":";;AAQA,MAAM,QAA8B,CAAC,EAAE,UAAU,sBAAsB,OAAO,GAAG,kBAAkB;AACjG,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,WAAU;AAAA,MACV,mBAAgB;AAAA,MAChB,oBAAiB;AAAA,MAEhB;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"Modal.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  type ToastProps = {
3
3
  title?: string;
4
4
  msg?: string;
@@ -1,6 +1,29 @@
1
- import "react/jsx-runtime";
2
- import { T } from "../../Notification-BT4CZ69U.js";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { t as toDataTestId } from "../../conversions-CbWPvHRE.js";
3
+ const Toast = ({ title, msg, icon, dataTestPrefix }) => {
4
+ return /* @__PURE__ */ jsxs("div", { className: "flex", children: [
5
+ icon,
6
+ /* @__PURE__ */ jsxs("div", { children: [
7
+ /* @__PURE__ */ jsx(
8
+ "h2",
9
+ {
10
+ className: "mb-2 font-sans text-xl font-bold leading-6 text-text-primary",
11
+ "data-test": toDataTestId("toast-header", dataTestPrefix),
12
+ children: title
13
+ }
14
+ ),
15
+ /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ className: "font-sans text-base leading-5 text-text-secondary",
19
+ "data-test": toDataTestId("toast-subheader", dataTestPrefix),
20
+ children: msg
21
+ }
22
+ )
23
+ ] })
24
+ ] });
25
+ };
3
26
  export {
4
- T as Toast
27
+ Toast
5
28
  };
6
29
  //# sourceMappingURL=Notification.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"Notification.es.js","sources":["../../../src/components/atoms/Notification.tsx"],"sourcesContent":["import React, { type JSX } from 'react'\n\nimport { toDataTestId } from '@/utils/conversions'\n\ntype ToastProps = {\n title?: string\n msg?: string\n icon?: React.ReactNode | JSX.Element | string\n dataTestPrefix?: string\n}\n\nexport const Toast: React.FC<ToastProps> = ({ title, msg, icon, dataTestPrefix }) => {\n return (\n <div className=\"flex\">\n {icon}\n <div>\n <h2\n className=\"mb-2 font-sans text-xl font-bold leading-6 text-text-primary\"\n data-test={toDataTestId('toast-header', dataTestPrefix)}\n >\n {title}\n </h2>\n <div\n className=\"font-sans text-base leading-5 text-text-secondary\"\n data-test={toDataTestId('toast-subheader', dataTestPrefix)}\n >\n {msg}\n </div>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;AAWO,MAAM,QAA8B,CAAC,EAAE,OAAO,KAAK,MAAM,qBAAqB;AACnF,SACE,qBAAC,OAAA,EAAI,WAAU,QACZ,UAAA;AAAA,IAAA;AAAA,yBACA,OAAA,EACC,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,aAAW,aAAa,gBAAgB,cAAc;AAAA,UAErD,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MAEH;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,aAAW,aAAa,mBAAmB,cAAc;AAAA,UAExD,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
- import { RadioProps } from '@mui/material/Radio';
3
- export type OutlinedRadioProps = Omit<RadioProps, 'icon' | 'checkedIcon'>;
2
+ export type OutlinedRadioProps = React.InputHTMLAttributes<HTMLInputElement>;
3
+ /**
4
+ * The dot follows the native input's `:checked` via `peer-checked`.
5
+ * Focus ring is applied with peer-focus-visible outline classes (not `focus-ring`,
6
+ * which only styles the element that has the class on its own `:focus-visible`).
7
+ */
4
8
  declare const OutlinedRadio: React.FC<OutlinedRadioProps>;
5
9
  export default OutlinedRadio;
@@ -1,28 +1,15 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import Radio from "@mui/material/Radio";
3
- import { c as classNames } from "../../classNames-Dy-RXSjS.js";
4
- const SIZE = 16;
5
- const wrapperStyle = { width: SIZE, height: SIZE };
6
- const OutlinedRadioIcon = ({ checked = false }) => /* @__PURE__ */ jsx(
7
- "div",
8
- {
9
- className: classNames("w-4 h-4 shrink-0 box-border rounded-full border border-gray-300", {
10
- "border-[0.3125rem] border-violet-500": checked
11
- })
12
- }
13
- );
14
- const radioSx = { p: 0, m: 0, width: "100%", height: "100%" };
15
- const OutlinedRadio = (props) => /* @__PURE__ */ jsx("div", { className: "relative inline-flex shrink-0 items-start justify-start leading-none", style: wrapperStyle, children: /* @__PURE__ */ jsx(
16
- Radio,
17
- {
18
- disableRipple: true,
19
- size: "small",
20
- ...props,
21
- icon: /* @__PURE__ */ jsx(OutlinedRadioIcon, {}),
22
- checkedIcon: /* @__PURE__ */ jsx(OutlinedRadioIcon, { checked: true }),
23
- sx: radioSx
24
- }
25
- ) });
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { c as classNames } from "../../classNames-B1XpQHle.js";
3
+ const OutlinedRadio = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", { className: classNames("relative inline-flex size-4 shrink-0 items-start justify-start leading-none", className), children: [
4
+ /* @__PURE__ */ jsx("input", { type: "radio", className: "peer absolute inset-0 cursor-pointer opacity-0 disabled:cursor-default", ...props }),
5
+ /* @__PURE__ */ jsx(
6
+ "span",
7
+ {
8
+ "aria-hidden": true,
9
+ className: "inline-flex size-4 shrink-0 rounded-full border border-border-bold bg-background-surface-input peer-checked:border-[0.3125rem] peer-checked:border-border-brand-bold peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-border-focus peer-disabled:opacity-50"
10
+ }
11
+ )
12
+ ] });
26
13
  export {
27
14
  OutlinedRadio as default
28
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OutlinedRadio.es.js","sources":["../../../src/components/atoms/OutlinedRadio.tsx"],"sourcesContent":["import React from 'react'\nimport Radio, { RadioProps } from '@mui/material/Radio'\n\nimport classNames from '@/utils/classNames'\n\nconst SIZE = 16\nconst wrapperStyle = { width: SIZE, height: SIZE }\n\nconst OutlinedRadioIcon: React.FC<{ checked?: boolean }> = ({ checked = false }) => (\n <div\n className={classNames('w-4 h-4 shrink-0 box-border rounded-full border border-gray-300', {\n 'border-[0.3125rem] border-violet-500': checked,\n })}\n />\n)\n\nexport type OutlinedRadioProps = Omit<RadioProps, 'icon' | 'checkedIcon'>\n\nconst radioSx = { p: 0, m: 0, width: '100%', height: '100%' }\n\nconst OutlinedRadio: React.FC<OutlinedRadioProps> = (props) => (\n <div className=\"relative inline-flex shrink-0 items-start justify-start leading-none\" style={wrapperStyle}>\n <Radio\n disableRipple\n size=\"small\"\n {...props}\n icon={<OutlinedRadioIcon />}\n checkedIcon={<OutlinedRadioIcon checked />}\n sx={radioSx}\n />\n </div>\n)\n\nexport default OutlinedRadio\n"],"names":[],"mappings":";;;AAKA,MAAM,OAAO;AACb,MAAM,eAAe,EAAE,OAAO,MAAM,QAAQ,KAAA;AAE5C,MAAM,oBAAqD,CAAC,EAAE,UAAU,YACtE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,WAAW,mEAAmE;AAAA,MACvF,wCAAwC;AAAA,IAAA,CACzC;AAAA,EAAA;AACH;AAKF,MAAM,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,OAAO,QAAQ,QAAQ,OAAA;AAErD,MAAM,gBAA8C,CAAC,UACnD,oBAAC,SAAI,WAAU,wEAAuE,OAAO,cAC3F,UAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAa;AAAA,IACb,MAAK;AAAA,IACJ,GAAG;AAAA,IACJ,0BAAO,mBAAA,EAAkB;AAAA,IACzB,aAAa,oBAAC,mBAAA,EAAkB,SAAO,KAAA,CAAC;AAAA,IACxC,IAAI;AAAA,EAAA;AACN,EAAA,CACF;"}
1
+ {"version":3,"file":"OutlinedRadio.es.js","sources":["../../../src/components/atoms/OutlinedRadio.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport type OutlinedRadioProps = React.InputHTMLAttributes<HTMLInputElement>\n\n/**\n * The dot follows the native input's `:checked` via `peer-checked`.\n * Focus ring is applied with peer-focus-visible outline classes (not `focus-ring`,\n * which only styles the element that has the class on its own `:focus-visible`).\n */\nconst OutlinedRadio: React.FC<OutlinedRadioProps> = ({ className, ...props }) => (\n <span className={cn('relative inline-flex size-4 shrink-0 items-start justify-start leading-none', className)}>\n <input type=\"radio\" className=\"peer absolute inset-0 cursor-pointer opacity-0 disabled:cursor-default\" {...props} />\n <span\n aria-hidden\n className=\"inline-flex size-4 shrink-0 rounded-full border border-border-bold bg-background-surface-input peer-checked:border-[0.3125rem] peer-checked:border-border-brand-bold peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-border-focus peer-disabled:opacity-50\"\n />\n </span>\n)\n\nexport default OutlinedRadio\n"],"names":["cn"],"mappings":";;AAWA,MAAM,gBAA8C,CAAC,EAAE,WAAW,GAAG,MAAA,MACnE,qBAAC,QAAA,EAAK,WAAWA,WAAG,+EAA+E,SAAS,GAC1G,UAAA;AAAA,EAAA,oBAAC,WAAM,MAAK,SAAQ,WAAU,0EAA0E,GAAG,OAAO;AAAA,EAClH;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,WAAU;AAAA,IAAA;AAAA,EAAA;AACZ,EAAA,CACF;"}
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ export type ProgressTone = 'brand' | 'success' | 'error';
4
+ export type ProgressSize = 'sm' | 'md';
5
+ declare const progressTrackVariants: (props?: ({
6
+ size?: "sm" | "md" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export type ProgressProps = Omit<React.ComponentProps<'div'>, 'children'> & VariantProps<typeof progressTrackVariants> & {
9
+ ref?: React.Ref<HTMLDivElement>;
10
+ value?: number;
11
+ loading?: boolean;
12
+ tone?: ProgressTone;
13
+ label?: string;
14
+ };
15
+ export declare function Progress({ ref, className, value, loading, tone, size, label, ...props }: ProgressProps): React.JSX.Element;
16
+ export type ProgressCircleSize = 'sm' | 'md' | 'lg';
17
+ export interface ProgressCircleProps extends Omit<React.ComponentProps<'div'>, 'children'> {
18
+ ref?: React.Ref<HTMLDivElement>;
19
+ value?: number;
20
+ loading?: boolean;
21
+ tone?: ProgressTone;
22
+ size?: ProgressCircleSize;
23
+ showValue?: boolean;
24
+ label?: string;
25
+ }
26
+ export declare function ProgressCircle({ ref, className, value, loading, tone, size, showValue, label, ...props }: ProgressCircleProps): React.JSX.Element;
27
+ export interface ProgressStepsProps extends Omit<React.ComponentProps<'div'>, 'children'> {
28
+ ref?: React.Ref<HTMLDivElement>;
29
+ segments?: 3 | 4 | 5;
30
+ completed?: number;
31
+ tone?: ProgressTone;
32
+ size?: ProgressSize;
33
+ label?: string;
34
+ }
35
+ export declare function ProgressSteps({ ref, className, segments, completed, tone, size, label, ...props }: ProgressStepsProps): React.JSX.Element;
36
+ export type ProgressFieldState = 'default' | 'success' | 'error';
37
+ export interface ProgressFieldProps extends Omit<React.ComponentProps<'div'>, 'children'> {
38
+ ref?: React.Ref<HTMLDivElement>;
39
+ value?: number;
40
+ loading?: boolean;
41
+ state?: ProgressFieldState;
42
+ label: React.ReactNode;
43
+ message?: React.ReactNode;
44
+ showValue?: boolean;
45
+ size?: ProgressSize;
46
+ }
47
+ export declare function ProgressField({ ref, className, value, loading, state, label, message, showValue, size, ...props }: ProgressFieldProps): React.JSX.Element;
48
+ export default Progress;