@neo4j-ndl/react 4.1.8 → 4.2.0

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 (497) hide show
  1. package/lib/cjs/ai/code-preview/CodePreview.js +91 -0
  2. package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -0
  3. package/lib/cjs/ai/code-preview/index.js +26 -0
  4. package/lib/cjs/ai/code-preview/index.js.map +1 -0
  5. package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js +37 -0
  6. package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
  7. package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js +31 -0
  8. package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
  9. package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js +36 -0
  10. package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
  11. package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js +36 -0
  12. package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
  13. package/lib/cjs/ai/code-preview/stories/code-preview.stories.js +88 -0
  14. package/lib/cjs/ai/code-preview/stories/code-preview.stories.js.map +1 -0
  15. package/lib/cjs/ai/code-preview/stories/index.js +44 -0
  16. package/lib/cjs/ai/code-preview/stories/index.js.map +1 -0
  17. package/lib/cjs/ai/file-tag/FileTag.js +58 -0
  18. package/lib/cjs/ai/file-tag/FileTag.js.map +1 -0
  19. package/lib/cjs/ai/file-tag/index.js +38 -0
  20. package/lib/cjs/ai/file-tag/index.js.map +1 -0
  21. package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js +31 -0
  22. package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
  23. package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js +33 -0
  24. package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
  25. package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js +33 -0
  26. package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
  27. package/lib/cjs/ai/file-tag/stories/file-tag.stories.js +76 -0
  28. package/lib/cjs/ai/file-tag/stories/file-tag.stories.js.map +1 -0
  29. package/lib/cjs/ai/file-tag/stories/index.js +40 -0
  30. package/lib/cjs/ai/file-tag/stories/index.js.map +1 -0
  31. package/lib/cjs/ai/image-tag/ImageTag.js +58 -0
  32. package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -0
  33. package/lib/cjs/ai/image-tag/index.js +38 -0
  34. package/lib/cjs/ai/image-tag/index.js.map +1 -0
  35. package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js +30 -0
  36. package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
  37. package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js +32 -0
  38. package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
  39. package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js +32 -0
  40. package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
  41. package/lib/cjs/ai/image-tag/stories/image-tag.stories.js +76 -0
  42. package/lib/cjs/ai/image-tag/stories/image-tag.stories.js.map +1 -0
  43. package/lib/cjs/ai/image-tag/stories/index.js +40 -0
  44. package/lib/cjs/ai/image-tag/stories/index.js.map +1 -0
  45. package/lib/cjs/ai/index.js +23 -1
  46. package/lib/cjs/ai/index.js.map +1 -1
  47. package/lib/cjs/ai/more-files/MoreFiles.js +55 -0
  48. package/lib/cjs/ai/more-files/MoreFiles.js.map +1 -0
  49. package/lib/cjs/ai/more-files/index.js +38 -0
  50. package/lib/cjs/ai/more-files/index.js.map +1 -0
  51. package/lib/cjs/ai/more-files/stories/index.js +32 -0
  52. package/lib/cjs/ai/more-files/stories/index.js.map +1 -0
  53. package/lib/cjs/ai/more-files/stories/more-files.stories.js +50 -0
  54. package/lib/cjs/ai/more-files/stories/more-files.stories.js.map +1 -0
  55. package/lib/cjs/ai/more-files/stories/more-files.story.js +35 -0
  56. package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -0
  57. package/lib/cjs/ai/presence/Presence.js +5 -1
  58. package/lib/cjs/ai/presence/Presence.js.map +1 -1
  59. package/lib/cjs/ai/prompt/Prompt.js +163 -0
  60. package/lib/cjs/ai/prompt/Prompt.js.map +1 -0
  61. package/lib/cjs/ai/prompt/index.js +38 -0
  62. package/lib/cjs/ai/prompt/index.js.map +1 -0
  63. package/lib/cjs/ai/prompt/stories/index.js +36 -0
  64. package/lib/cjs/ai/prompt/stories/index.js.map +1 -0
  65. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js +56 -0
  66. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
  67. package/lib/cjs/ai/prompt/stories/prompt-default.story.js +40 -0
  68. package/lib/cjs/ai/prompt/stories/prompt-default.story.js.map +1 -0
  69. package/lib/cjs/ai/prompt/stories/prompt.stories.js +63 -0
  70. package/lib/cjs/ai/prompt/stories/prompt.stories.js.map +1 -0
  71. package/lib/cjs/ai/reasoning/Reasoning.js +77 -0
  72. package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -0
  73. package/lib/cjs/ai/reasoning/index.js +38 -0
  74. package/lib/cjs/ai/reasoning/index.js.map +1 -0
  75. package/lib/cjs/ai/reasoning/stories/index.js +32 -0
  76. package/lib/cjs/ai/reasoning/stories/index.js.map +1 -0
  77. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +34 -0
  78. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
  79. package/lib/cjs/ai/reasoning/stories/reasoning.stories.js +50 -0
  80. package/lib/cjs/ai/reasoning/stories/reasoning.stories.js.map +1 -0
  81. package/lib/cjs/ai/response/Response.js +185 -0
  82. package/lib/cjs/ai/response/Response.js.map +1 -0
  83. package/lib/cjs/ai/response/index.js +26 -0
  84. package/lib/cjs/ai/response/index.js.map +1 -0
  85. package/lib/cjs/ai/response/stories/index.js +56 -0
  86. package/lib/cjs/ai/response/stories/index.js.map +1 -0
  87. package/lib/cjs/ai/response/stories/response-all-components.story.js +229 -0
  88. package/lib/cjs/ai/response/stories/response-all-components.story.js.map +1 -0
  89. package/lib/cjs/ai/response/stories/response-code-examples.story.js +248 -0
  90. package/lib/cjs/ai/response/stories/response-code-examples.story.js.map +1 -0
  91. package/lib/cjs/ai/response/stories/response-default.story.js +50 -0
  92. package/lib/cjs/ai/response/stories/response-default.story.js.map +1 -0
  93. package/lib/cjs/ai/response/stories/response-full-example.story.js +162 -0
  94. package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -0
  95. package/lib/cjs/ai/response/stories/response-headings.story.js +120 -0
  96. package/lib/cjs/ai/response/stories/response-headings.story.js.map +1 -0
  97. package/lib/cjs/ai/response/stories/response-lists.story.js +170 -0
  98. package/lib/cjs/ai/response/stories/response-lists.story.js.map +1 -0
  99. package/lib/cjs/ai/response/stories/response-streaming.story.js +65 -0
  100. package/lib/cjs/ai/response/stories/response-streaming.story.js.map +1 -0
  101. package/lib/cjs/ai/response/stories/response.stories.js +132 -0
  102. package/lib/cjs/ai/response/stories/response.stories.js.map +1 -0
  103. package/lib/cjs/ai/suggestion/Suggestion.js +58 -0
  104. package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -0
  105. package/lib/cjs/ai/suggestion/index.js +38 -0
  106. package/lib/cjs/ai/suggestion/index.js.map +1 -0
  107. package/lib/cjs/ai/suggestion/stories/index.js +44 -0
  108. package/lib/cjs/ai/suggestion/stories/index.js.map +1 -0
  109. package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js +30 -0
  110. package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
  111. package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js +31 -0
  112. package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
  113. package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js +30 -0
  114. package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
  115. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +30 -0
  116. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
  117. package/lib/cjs/ai/suggestion/stories/suggestion.stories.js +89 -0
  118. package/lib/cjs/ai/suggestion/stories/suggestion.stories.js.map +1 -0
  119. package/lib/cjs/ai/thinking/Thinking.js +57 -0
  120. package/lib/cjs/ai/thinking/Thinking.js.map +1 -0
  121. package/lib/cjs/ai/thinking/index.js +38 -0
  122. package/lib/cjs/ai/thinking/index.js.map +1 -0
  123. package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js +30 -0
  124. package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
  125. package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js +30 -0
  126. package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
  127. package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js +63 -0
  128. package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
  129. package/lib/cjs/ai/thinking/stories/index.js +36 -0
  130. package/lib/cjs/ai/thinking/stories/index.js.map +1 -0
  131. package/lib/cjs/ai/thinking/thinking-duration-formatter.js +71 -0
  132. package/lib/cjs/ai/thinking/thinking-duration-formatter.js.map +1 -0
  133. package/lib/cjs/ai/tool-call/ToolCall.js +55 -0
  134. package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -0
  135. package/lib/cjs/ai/tool-call/index.js +38 -0
  136. package/lib/cjs/ai/tool-call/index.js.map +1 -0
  137. package/lib/cjs/ai/tool-call/stories/index.js +36 -0
  138. package/lib/cjs/ai/tool-call/stories/index.js.map +1 -0
  139. package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js +30 -0
  140. package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
  141. package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js +30 -0
  142. package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
  143. package/lib/cjs/ai/tool-call/stories/tool-call.stories.js +63 -0
  144. package/lib/cjs/ai/tool-call/stories/tool-call.stories.js.map +1 -0
  145. package/lib/cjs/ai/user-bubble/UserBubble.js +53 -0
  146. package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -0
  147. package/lib/cjs/ai/user-bubble/index.js +38 -0
  148. package/lib/cjs/ai/user-bubble/index.js.map +1 -0
  149. package/lib/cjs/ai/user-bubble/stories/index.js +44 -0
  150. package/lib/cjs/ai/user-bubble/stories/index.js.map +1 -0
  151. package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js +35 -0
  152. package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
  153. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +39 -0
  154. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
  155. package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js +33 -0
  156. package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
  157. package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js +89 -0
  158. package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
  159. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js +34 -0
  160. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
  161. package/lib/cjs/code/Code.js.map +1 -1
  162. package/lib/cjs/text-area/TextArea.js.map +1 -1
  163. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
  164. package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  165. package/lib/cjs/tooltip/use-tooltip.js +1 -0
  166. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  167. package/lib/esm/ai/code-preview/CodePreview.js +84 -0
  168. package/lib/esm/ai/code-preview/CodePreview.js.map +1 -0
  169. package/lib/esm/ai/code-preview/index.js +22 -0
  170. package/lib/esm/ai/code-preview/index.js.map +1 -0
  171. package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js +33 -0
  172. package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
  173. package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js +27 -0
  174. package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
  175. package/lib/esm/ai/code-preview/stories/code-preview-read.story.js +32 -0
  176. package/lib/esm/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
  177. package/lib/esm/ai/code-preview/stories/code-preview-write.story.js +32 -0
  178. package/lib/esm/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
  179. package/lib/esm/ai/code-preview/stories/code-preview.stories.js +85 -0
  180. package/lib/esm/ai/code-preview/stories/code-preview.stories.js.map +1 -0
  181. package/lib/esm/ai/code-preview/stories/index.js +34 -0
  182. package/lib/esm/ai/code-preview/stories/index.js.map +1 -0
  183. package/lib/esm/ai/file-tag/FileTag.js +52 -0
  184. package/lib/esm/ai/file-tag/FileTag.js.map +1 -0
  185. package/lib/esm/ai/file-tag/index.js +22 -0
  186. package/lib/esm/ai/file-tag/index.js.map +1 -0
  187. package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js +29 -0
  188. package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
  189. package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js +31 -0
  190. package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
  191. package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js +31 -0
  192. package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
  193. package/lib/esm/ai/file-tag/stories/file-tag.stories.js +73 -0
  194. package/lib/esm/ai/file-tag/stories/file-tag.stories.js.map +1 -0
  195. package/lib/esm/ai/file-tag/stories/index.js +31 -0
  196. package/lib/esm/ai/file-tag/stories/index.js.map +1 -0
  197. package/lib/esm/ai/image-tag/ImageTag.js +52 -0
  198. package/lib/esm/ai/image-tag/ImageTag.js.map +1 -0
  199. package/lib/esm/ai/image-tag/index.js +22 -0
  200. package/lib/esm/ai/image-tag/index.js.map +1 -0
  201. package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js +28 -0
  202. package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
  203. package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js +30 -0
  204. package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
  205. package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js +30 -0
  206. package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
  207. package/lib/esm/ai/image-tag/stories/image-tag.stories.js +73 -0
  208. package/lib/esm/ai/image-tag/stories/image-tag.stories.js.map +1 -0
  209. package/lib/esm/ai/image-tag/stories/index.js +31 -0
  210. package/lib/esm/ai/image-tag/stories/index.js.map +1 -0
  211. package/lib/esm/ai/index.js +11 -0
  212. package/lib/esm/ai/index.js.map +1 -1
  213. package/lib/esm/ai/more-files/MoreFiles.js +49 -0
  214. package/lib/esm/ai/more-files/MoreFiles.js.map +1 -0
  215. package/lib/esm/ai/more-files/index.js +22 -0
  216. package/lib/esm/ai/more-files/index.js.map +1 -0
  217. package/lib/esm/ai/more-files/stories/index.js +25 -0
  218. package/lib/esm/ai/more-files/stories/index.js.map +1 -0
  219. package/lib/esm/ai/more-files/stories/more-files.stories.js +47 -0
  220. package/lib/esm/ai/more-files/stories/more-files.stories.js.map +1 -0
  221. package/lib/esm/ai/more-files/stories/more-files.story.js +33 -0
  222. package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -0
  223. package/lib/esm/ai/presence/Presence.js +5 -1
  224. package/lib/esm/ai/presence/Presence.js.map +1 -1
  225. package/lib/esm/ai/prompt/Prompt.js +157 -0
  226. package/lib/esm/ai/prompt/Prompt.js.map +1 -0
  227. package/lib/esm/ai/prompt/index.js +22 -0
  228. package/lib/esm/ai/prompt/index.js.map +1 -0
  229. package/lib/esm/ai/prompt/stories/index.js +28 -0
  230. package/lib/esm/ai/prompt/stories/index.js.map +1 -0
  231. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js +54 -0
  232. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
  233. package/lib/esm/ai/prompt/stories/prompt-default.story.js +38 -0
  234. package/lib/esm/ai/prompt/stories/prompt-default.story.js.map +1 -0
  235. package/lib/esm/ai/prompt/stories/prompt.stories.js +60 -0
  236. package/lib/esm/ai/prompt/stories/prompt.stories.js.map +1 -0
  237. package/lib/esm/ai/reasoning/Reasoning.js +71 -0
  238. package/lib/esm/ai/reasoning/Reasoning.js.map +1 -0
  239. package/lib/esm/ai/reasoning/index.js +22 -0
  240. package/lib/esm/ai/reasoning/index.js.map +1 -0
  241. package/lib/esm/ai/reasoning/stories/index.js +25 -0
  242. package/lib/esm/ai/reasoning/stories/index.js.map +1 -0
  243. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +32 -0
  244. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
  245. package/lib/esm/ai/reasoning/stories/reasoning.stories.js +47 -0
  246. package/lib/esm/ai/reasoning/stories/reasoning.stories.js.map +1 -0
  247. package/lib/esm/ai/response/Response.js +179 -0
  248. package/lib/esm/ai/response/Response.js.map +1 -0
  249. package/lib/esm/ai/response/index.js +22 -0
  250. package/lib/esm/ai/response/index.js.map +1 -0
  251. package/lib/esm/ai/response/stories/index.js +43 -0
  252. package/lib/esm/ai/response/stories/index.js.map +1 -0
  253. package/lib/esm/ai/response/stories/response-all-components.story.js +225 -0
  254. package/lib/esm/ai/response/stories/response-all-components.story.js.map +1 -0
  255. package/lib/esm/ai/response/stories/response-code-examples.story.js +244 -0
  256. package/lib/esm/ai/response/stories/response-code-examples.story.js.map +1 -0
  257. package/lib/esm/ai/response/stories/response-default.story.js +46 -0
  258. package/lib/esm/ai/response/stories/response-default.story.js.map +1 -0
  259. package/lib/esm/ai/response/stories/response-full-example.story.js +158 -0
  260. package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -0
  261. package/lib/esm/ai/response/stories/response-headings.story.js +116 -0
  262. package/lib/esm/ai/response/stories/response-headings.story.js.map +1 -0
  263. package/lib/esm/ai/response/stories/response-lists.story.js +166 -0
  264. package/lib/esm/ai/response/stories/response-lists.story.js.map +1 -0
  265. package/lib/esm/ai/response/stories/response-streaming.story.js +61 -0
  266. package/lib/esm/ai/response/stories/response-streaming.story.js.map +1 -0
  267. package/lib/esm/ai/response/stories/response.stories.js +129 -0
  268. package/lib/esm/ai/response/stories/response.stories.js.map +1 -0
  269. package/lib/esm/ai/suggestion/Suggestion.js +52 -0
  270. package/lib/esm/ai/suggestion/Suggestion.js.map +1 -0
  271. package/lib/esm/ai/suggestion/index.js +22 -0
  272. package/lib/esm/ai/suggestion/index.js.map +1 -0
  273. package/lib/esm/ai/suggestion/stories/index.js +34 -0
  274. package/lib/esm/ai/suggestion/stories/index.js.map +1 -0
  275. package/lib/esm/ai/suggestion/stories/suggestion-default.story.js +28 -0
  276. package/lib/esm/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
  277. package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js +29 -0
  278. package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
  279. package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js +28 -0
  280. package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
  281. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +28 -0
  282. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
  283. package/lib/esm/ai/suggestion/stories/suggestion.stories.js +86 -0
  284. package/lib/esm/ai/suggestion/stories/suggestion.stories.js.map +1 -0
  285. package/lib/esm/ai/thinking/Thinking.js +51 -0
  286. package/lib/esm/ai/thinking/Thinking.js.map +1 -0
  287. package/lib/esm/ai/thinking/index.js +22 -0
  288. package/lib/esm/ai/thinking/index.js.map +1 -0
  289. package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js +28 -0
  290. package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
  291. package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js +28 -0
  292. package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
  293. package/lib/esm/ai/thinking/stories/ai-thinking.stories.js +60 -0
  294. package/lib/esm/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
  295. package/lib/esm/ai/thinking/stories/index.js +28 -0
  296. package/lib/esm/ai/thinking/stories/index.js.map +1 -0
  297. package/lib/esm/ai/thinking/thinking-duration-formatter.js +67 -0
  298. package/lib/esm/ai/thinking/thinking-duration-formatter.js.map +1 -0
  299. package/lib/esm/ai/tool-call/ToolCall.js +49 -0
  300. package/lib/esm/ai/tool-call/ToolCall.js.map +1 -0
  301. package/lib/esm/ai/tool-call/index.js +22 -0
  302. package/lib/esm/ai/tool-call/index.js.map +1 -0
  303. package/lib/esm/ai/tool-call/stories/index.js +28 -0
  304. package/lib/esm/ai/tool-call/stories/index.js.map +1 -0
  305. package/lib/esm/ai/tool-call/stories/tool-call-default.story.js +28 -0
  306. package/lib/esm/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
  307. package/lib/esm/ai/tool-call/stories/tool-call-done.story.js +28 -0
  308. package/lib/esm/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
  309. package/lib/esm/ai/tool-call/stories/tool-call.stories.js +60 -0
  310. package/lib/esm/ai/tool-call/stories/tool-call.stories.js.map +1 -0
  311. package/lib/esm/ai/user-bubble/UserBubble.js +47 -0
  312. package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -0
  313. package/lib/esm/ai/user-bubble/index.js +22 -0
  314. package/lib/esm/ai/user-bubble/index.js.map +1 -0
  315. package/lib/esm/ai/user-bubble/stories/index.js +34 -0
  316. package/lib/esm/ai/user-bubble/stories/index.js.map +1 -0
  317. package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js +33 -0
  318. package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
  319. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +37 -0
  320. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
  321. package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js +31 -0
  322. package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
  323. package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js +86 -0
  324. package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
  325. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js +32 -0
  326. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
  327. package/lib/esm/code/Code.js.map +1 -1
  328. package/lib/esm/text-area/TextArea.js.map +1 -1
  329. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
  330. package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
  331. package/lib/esm/tooltip/use-tooltip.js +2 -1
  332. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  333. package/lib/types/ai/code-preview/CodePreview.d.ts +44 -0
  334. package/lib/types/ai/code-preview/CodePreview.d.ts.map +1 -0
  335. package/lib/types/ai/code-preview/index.d.ts +22 -0
  336. package/lib/types/ai/code-preview/index.d.ts.map +1 -0
  337. package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts +23 -0
  338. package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts.map +1 -0
  339. package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts +23 -0
  340. package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts.map +1 -0
  341. package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts +23 -0
  342. package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts.map +1 -0
  343. package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts +23 -0
  344. package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts.map +1 -0
  345. package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts +30 -0
  346. package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts.map +1 -0
  347. package/lib/types/ai/code-preview/stories/index.d.ts +29 -0
  348. package/lib/types/ai/code-preview/stories/index.d.ts.map +1 -0
  349. package/lib/types/ai/file-tag/FileTag.d.ts +44 -0
  350. package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -0
  351. package/lib/types/ai/file-tag/index.d.ts +22 -0
  352. package/lib/types/ai/file-tag/index.d.ts.map +1 -0
  353. package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts +24 -0
  354. package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts.map +1 -0
  355. package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts +24 -0
  356. package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts.map +1 -0
  357. package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts +24 -0
  358. package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts.map +1 -0
  359. package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts +29 -0
  360. package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts.map +1 -0
  361. package/lib/types/ai/file-tag/stories/index.d.ts +27 -0
  362. package/lib/types/ai/file-tag/stories/index.d.ts.map +1 -0
  363. package/lib/types/ai/image-tag/ImageTag.d.ts +46 -0
  364. package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -0
  365. package/lib/types/ai/image-tag/index.d.ts +22 -0
  366. package/lib/types/ai/image-tag/index.d.ts.map +1 -0
  367. package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts +24 -0
  368. package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts.map +1 -0
  369. package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts +24 -0
  370. package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts.map +1 -0
  371. package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts +24 -0
  372. package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts.map +1 -0
  373. package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts +29 -0
  374. package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts.map +1 -0
  375. package/lib/types/ai/image-tag/stories/index.d.ts +27 -0
  376. package/lib/types/ai/image-tag/stories/index.d.ts.map +1 -0
  377. package/lib/types/ai/index.d.ts +11 -0
  378. package/lib/types/ai/index.d.ts.map +1 -1
  379. package/lib/types/ai/more-files/MoreFiles.d.ts +38 -0
  380. package/lib/types/ai/more-files/MoreFiles.d.ts.map +1 -0
  381. package/lib/types/ai/more-files/index.d.ts +22 -0
  382. package/lib/types/ai/more-files/index.d.ts.map +1 -0
  383. package/lib/types/ai/more-files/stories/index.d.ts +23 -0
  384. package/lib/types/ai/more-files/stories/index.d.ts.map +1 -0
  385. package/lib/types/ai/more-files/stories/more-files.stories.d.ts +27 -0
  386. package/lib/types/ai/more-files/stories/more-files.stories.d.ts.map +1 -0
  387. package/lib/types/ai/more-files/stories/more-files.story.d.ts +24 -0
  388. package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -0
  389. package/lib/types/ai/presence/Presence.d.ts.map +1 -1
  390. package/lib/types/ai/prompt/Prompt.d.ts +62 -0
  391. package/lib/types/ai/prompt/Prompt.d.ts.map +1 -0
  392. package/lib/types/ai/prompt/index.d.ts +22 -0
  393. package/lib/types/ai/prompt/index.d.ts.map +1 -0
  394. package/lib/types/ai/prompt/stories/index.d.ts +25 -0
  395. package/lib/types/ai/prompt/stories/index.d.ts.map +1 -0
  396. package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts +24 -0
  397. package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts.map +1 -0
  398. package/lib/types/ai/prompt/stories/prompt-default.story.d.ts +24 -0
  399. package/lib/types/ai/prompt/stories/prompt-default.story.d.ts.map +1 -0
  400. package/lib/types/ai/prompt/stories/prompt.stories.d.ts +28 -0
  401. package/lib/types/ai/prompt/stories/prompt.stories.d.ts.map +1 -0
  402. package/lib/types/ai/reasoning/Reasoning.d.ts +44 -0
  403. package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -0
  404. package/lib/types/ai/reasoning/index.d.ts +22 -0
  405. package/lib/types/ai/reasoning/index.d.ts.map +1 -0
  406. package/lib/types/ai/reasoning/stories/index.d.ts +23 -0
  407. package/lib/types/ai/reasoning/stories/index.d.ts.map +1 -0
  408. package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts +24 -0
  409. package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -0
  410. package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts +27 -0
  411. package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts.map +1 -0
  412. package/lib/types/ai/response/Response.d.ts +37 -0
  413. package/lib/types/ai/response/Response.d.ts.map +1 -0
  414. package/lib/types/ai/response/index.d.ts +22 -0
  415. package/lib/types/ai/response/index.d.ts.map +1 -0
  416. package/lib/types/ai/response/stories/index.d.ts +35 -0
  417. package/lib/types/ai/response/stories/index.d.ts.map +1 -0
  418. package/lib/types/ai/response/stories/response-all-components.story.d.ts +24 -0
  419. package/lib/types/ai/response/stories/response-all-components.story.d.ts.map +1 -0
  420. package/lib/types/ai/response/stories/response-code-examples.story.d.ts +24 -0
  421. package/lib/types/ai/response/stories/response-code-examples.story.d.ts.map +1 -0
  422. package/lib/types/ai/response/stories/response-default.story.d.ts +23 -0
  423. package/lib/types/ai/response/stories/response-default.story.d.ts.map +1 -0
  424. package/lib/types/ai/response/stories/response-full-example.story.d.ts +24 -0
  425. package/lib/types/ai/response/stories/response-full-example.story.d.ts.map +1 -0
  426. package/lib/types/ai/response/stories/response-headings.story.d.ts +24 -0
  427. package/lib/types/ai/response/stories/response-headings.story.d.ts.map +1 -0
  428. package/lib/types/ai/response/stories/response-lists.story.d.ts +24 -0
  429. package/lib/types/ai/response/stories/response-lists.story.d.ts.map +1 -0
  430. package/lib/types/ai/response/stories/response-streaming.story.d.ts +23 -0
  431. package/lib/types/ai/response/stories/response-streaming.story.d.ts.map +1 -0
  432. package/lib/types/ai/response/stories/response.stories.d.ts +33 -0
  433. package/lib/types/ai/response/stories/response.stories.d.ts.map +1 -0
  434. package/lib/types/ai/suggestion/Suggestion.d.ts +42 -0
  435. package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -0
  436. package/lib/types/ai/suggestion/index.d.ts +22 -0
  437. package/lib/types/ai/suggestion/index.d.ts.map +1 -0
  438. package/lib/types/ai/suggestion/stories/index.d.ts +29 -0
  439. package/lib/types/ai/suggestion/stories/index.d.ts.map +1 -0
  440. package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts +24 -0
  441. package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts.map +1 -0
  442. package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts +24 -0
  443. package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts.map +1 -0
  444. package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts +24 -0
  445. package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts.map +1 -0
  446. package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts +24 -0
  447. package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts.map +1 -0
  448. package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts +30 -0
  449. package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts.map +1 -0
  450. package/lib/types/ai/thinking/Thinking.d.ts +40 -0
  451. package/lib/types/ai/thinking/Thinking.d.ts.map +1 -0
  452. package/lib/types/ai/thinking/index.d.ts +22 -0
  453. package/lib/types/ai/thinking/index.d.ts.map +1 -0
  454. package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts +24 -0
  455. package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts.map +1 -0
  456. package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts +24 -0
  457. package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts.map +1 -0
  458. package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts +28 -0
  459. package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts.map +1 -0
  460. package/lib/types/ai/thinking/stories/index.d.ts +25 -0
  461. package/lib/types/ai/thinking/stories/index.d.ts.map +1 -0
  462. package/lib/types/ai/thinking/thinking-duration-formatter.d.ts +45 -0
  463. package/lib/types/ai/thinking/thinking-duration-formatter.d.ts.map +1 -0
  464. package/lib/types/ai/tool-call/ToolCall.d.ts +37 -0
  465. package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -0
  466. package/lib/types/ai/tool-call/index.d.ts +22 -0
  467. package/lib/types/ai/tool-call/index.d.ts.map +1 -0
  468. package/lib/types/ai/tool-call/stories/index.d.ts +25 -0
  469. package/lib/types/ai/tool-call/stories/index.d.ts.map +1 -0
  470. package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts +24 -0
  471. package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts.map +1 -0
  472. package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts +24 -0
  473. package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts.map +1 -0
  474. package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts +28 -0
  475. package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts.map +1 -0
  476. package/lib/types/ai/user-bubble/UserBubble.d.ts +39 -0
  477. package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -0
  478. package/lib/types/ai/user-bubble/index.d.ts +22 -0
  479. package/lib/types/ai/user-bubble/index.d.ts.map +1 -0
  480. package/lib/types/ai/user-bubble/stories/index.d.ts +29 -0
  481. package/lib/types/ai/user-bubble/stories/index.d.ts.map +1 -0
  482. package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts +24 -0
  483. package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts.map +1 -0
  484. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts +24 -0
  485. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -0
  486. package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts +24 -0
  487. package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts.map +1 -0
  488. package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts +30 -0
  489. package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts.map +1 -0
  490. package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts +24 -0
  491. package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts.map +1 -0
  492. package/lib/types/code/Code.d.ts +4 -1
  493. package/lib/types/code/Code.d.ts.map +1 -1
  494. package/lib/types/text-area/TextArea.d.ts.map +1 -1
  495. package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
  496. package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
  497. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/tool-call/stories/tool-call-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,mCAA4B,CAAC;AAC/C,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { ToolCall } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <ToolCall>list_import_jobs</ToolCall>;\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { ToolCall } from '@neo4j-ndl/react/ai';
24
+ const Component = () => {
25
+ return _jsx(ToolCall, { isDone: true, children: "list_import_jobs" });
26
+ };
27
+ export default Component;
28
+ //# sourceMappingURL=tool-call-done.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-done.story.js","sourceRoot":"","sources":["../../../../../src/ai/tool-call/stories/tool-call-done.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,MAAM,uCAA4B,CAAC;AACtD,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { ToolCall } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <ToolCall isDone>list_import_jobs</ToolCall>;\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,60 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ import { ToolCall } from '../ToolCall';
23
+ import { ToolCallDefault, ToolCallDefaultSrc, ToolCallDone, ToolCallDoneSrc, } from '.';
24
+ const componentMeta = {
25
+ component: ToolCall,
26
+ id: 'components-ai-tool-call',
27
+ parameters: {
28
+ controls: { disable: true },
29
+ },
30
+ tags: ['docsPage'],
31
+ title: 'Components/AI/ToolCall',
32
+ };
33
+ export default componentMeta;
34
+ export const Default = {
35
+ args: {},
36
+ parameters: {
37
+ docs: {
38
+ source: {
39
+ code: ToolCallDefaultSrc,
40
+ language: 'tsx',
41
+ type: 'code',
42
+ },
43
+ },
44
+ },
45
+ render: ToolCallDefault,
46
+ };
47
+ export const Done = {
48
+ args: {},
49
+ parameters: {
50
+ docs: {
51
+ source: {
52
+ code: ToolCallDoneSrc,
53
+ language: 'tsx',
54
+ type: 'code',
55
+ },
56
+ },
57
+ },
58
+ render: ToolCallDone,
59
+ };
60
+ //# sourceMappingURL=tool-call.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call.stories.js","sourceRoot":"","sources":["../../../../../src/ai/tool-call/stories/tool-call.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,eAAe,GAChB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,EAAE,EAAE,yBAAyB;IAC7B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,wBAAwB;CAChC,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,YAAY;CACrB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { ToolCall } from '../ToolCall';\nimport {\n ToolCallDefault,\n ToolCallDefaultSrc,\n ToolCallDone,\n ToolCallDoneSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof ToolCall> = {\n component: ToolCall,\n id: 'components-ai-tool-call',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/ToolCall',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToolCallDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToolCallDefault,\n};\n\nexport const Done: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ToolCallDoneSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ToolCallDone,\n};\n"]}
@@ -0,0 +1,47 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /**
14
+ *
15
+ * Copyright (c) "Neo4j"
16
+ * Neo4j Sweden AB [http://neo4j.com]
17
+ *
18
+ * This file is part of Neo4j.
19
+ *
20
+ * Neo4j is free software: you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License as published by
22
+ * the Free Software Foundation, either version 3 of the License, or
23
+ * (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
+ */
33
+ import { Avatar, Typography } from '@neo4j-ndl/react';
34
+ import classNames from 'classnames';
35
+ /**
36
+ * The component is used to display the user's message in a chat.
37
+ * It has an avatar to represent the user and a trailing element to display potential additional actions.
38
+ *
39
+ * @alpha - Changes to this component may be breaking.
40
+ */
41
+ const UserBubbleComponent = (_a) => {
42
+ var { avatarProps, trailingElement, children, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["avatarProps", "trailingElement", "children", "className", "style", "htmlAttributes", "ref"]);
43
+ const classes = classNames('ndl-ai-user-bubble', className);
44
+ return (_jsxs("div", Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [_jsx(Avatar, Object.assign({ type: "image" }, avatarProps, { size: "small", shape: "circle", className: classNames('ndl-ai-user-bubble-avatar', avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.className) })), _jsx(Typography, { variant: "body-medium", className: "ndl-ai-user-bubble-content", children: children }), _jsx("div", { className: "ndl-ai-user-bubble-trailing", children: trailingElement })] })));
45
+ };
46
+ export { UserBubbleComponent as UserBubble };
47
+ //# sourceMappingURL=UserBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserBubble.js","sourceRoot":"","sources":["../../../../src/ai/user-bubble/UserBubble.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,UAAU,MAAM,YAAY,CAAC;AAWpC;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,CAAC,EASS,EAAE,EAAE;QATb,EAC3B,WAAW,EACX,eAAe,EACf,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEiC,EADjC,SAAS,cARe,6FAS5B,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAE5D,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,KAAC,MAAM,kBACL,IAAI,EAAC,OAAO,IACR,WAAW,IACf,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,UAAU,CACnB,2BAA2B,EAC3B,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CACvB,IACD,EACF,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,4BAA4B,YACrE,QAAQ,GACE,EACb,cAAK,SAAS,EAAC,6BAA6B,YAAE,eAAe,GAAO,KAChE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Avatar, Typography } from '@neo4j-ndl/react';\nimport type { CommonProps } from '@neo4j-ndl/react/_common/types';\nimport classNames from 'classnames';\n\ntype UserBubbleProps = {\n /** The content of the user bubble */\n children?: React.ReactNode;\n /** The props for the avatar */\n avatarProps?: React.ComponentProps<typeof Avatar>;\n /** The element to display after the content. Could be a CleanIconButton to edit the user bubble. */\n trailingElement?: React.ReactNode;\n};\n\n/**\n * The component is used to display the user's message in a chat.\n * It has an avatar to represent the user and a trailing element to display potential additional actions.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst UserBubbleComponent = ({\n avatarProps,\n trailingElement,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', UserBubbleProps>) => {\n const classes = classNames('ndl-ai-user-bubble', className);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <Avatar\n type=\"image\"\n {...avatarProps}\n size=\"small\"\n shape=\"circle\"\n className={classNames(\n 'ndl-ai-user-bubble-avatar',\n avatarProps?.className,\n )}\n />\n <Typography variant=\"body-medium\" className=\"ndl-ai-user-bubble-content\">\n {children}\n </Typography>\n <div className=\"ndl-ai-user-bubble-trailing\">{trailingElement}</div>\n </div>\n );\n};\n\nexport { UserBubbleComponent as UserBubble };\n"]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ export * from './UserBubble';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/user-bubble/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,cAAc,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './UserBubble';\n"]}
@@ -0,0 +1,34 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ export { default as UserBubbleDefault } from './user-bubble.story';
22
+ export { default as UserBubbleAction } from './user-bubble-action.story';
23
+ export { default as UserBubbleLong } from './user-bubble-long.story';
24
+ export { default as UserBubbleAndFiles } from './user-bubble-and-files.story';
25
+ import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
26
+ import UserBubbleDefaultSrcRaw from './user-bubble.story?raw';
27
+ import UserBubbleActionSrcRaw from './user-bubble-action.story?raw';
28
+ import UserBubbleAndFilesSrcRaw from './user-bubble-and-files.story?raw';
29
+ import UserBubbleLongSrcRaw from './user-bubble-long.story?raw';
30
+ export const UserBubbleDefaultSrc = removeLicenseHeader(UserBubbleDefaultSrcRaw);
31
+ export const UserBubbleActionSrc = removeLicenseHeader(UserBubbleActionSrcRaw);
32
+ export const UserBubbleLongSrc = removeLicenseHeader(UserBubbleLongSrcRaw);
33
+ export const UserBubbleAndFilesSrc = removeLicenseHeader(UserBubbleAndFilesSrcRaw);
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,uBAAuB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,wBAAwB,MAAM,mCAAmC,CAAC;AACzE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as UserBubbleDefault } from './user-bubble.story';\nexport { default as UserBubbleAction } from './user-bubble-action.story';\nexport { default as UserBubbleLong } from './user-bubble-long.story';\nexport { default as UserBubbleAndFiles } from './user-bubble-and-files.story';\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport UserBubbleDefaultSrcRaw from './user-bubble.story?raw';\nimport UserBubbleActionSrcRaw from './user-bubble-action.story?raw';\nimport UserBubbleAndFilesSrcRaw from './user-bubble-and-files.story?raw';\nimport UserBubbleLongSrcRaw from './user-bubble-long.story?raw';\nexport const UserBubbleDefaultSrc = removeLicenseHeader(\n UserBubbleDefaultSrcRaw,\n);\nexport const UserBubbleActionSrc = removeLicenseHeader(UserBubbleActionSrcRaw);\nexport const UserBubbleLongSrc = removeLicenseHeader(UserBubbleLongSrcRaw);\nexport const UserBubbleAndFilesSrc = removeLicenseHeader(\n UserBubbleAndFilesSrcRaw,\n);\n"]}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { UserBubble } from '@neo4j-ndl/react/ai';
24
+ import { CleanIconButton } from '@neo4j-ndl/react/clean-icon-button';
25
+ import { PencilSquareIconOutline } from '@neo4j-ndl/react/icons';
26
+ const Component = () => {
27
+ return (_jsx(UserBubble, { avatarProps: {
28
+ name: 'KM',
29
+ type: 'letters',
30
+ }, trailingElement: _jsx(CleanIconButton, { description: "Edit", size: "large", children: _jsx(PencilSquareIconOutline, {}) }), children: "Can you analyse my data and tell me about...?" }));
31
+ };
32
+ export default Component;
33
+ //# sourceMappingURL=user-bubble-action.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bubble-action.story.js","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble-action.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,UAAU,IACT,WAAW,EAAE;YACX,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,SAAS;SAChB,EACD,eAAe,EACb,KAAC,eAAe,IAAC,WAAW,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,YAC9C,KAAC,uBAAuB,KAAG,GACX,8DAIT,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { UserBubble } from '@neo4j-ndl/react/ai';\nimport { CleanIconButton } from '@neo4j-ndl/react/clean-icon-button';\nimport { PencilSquareIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <UserBubble\n avatarProps={{\n name: 'KM',\n type: 'letters',\n }}\n trailingElement={\n <CleanIconButton description=\"Edit\" size=\"large\">\n <PencilSquareIconOutline />\n </CleanIconButton>\n }\n >\n Can you analyse my data and tell me about...?\n </UserBubble>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { FileTag, ImageTag, MoreFiles, UserBubble } from '@neo4j-ndl/react/ai';
24
+ import { DocumentIconOutline, PhotoIconOutline, TableCellsIconOutline, } from '@neo4j-ndl/react/icons';
25
+ import { Menu } from '@neo4j-ndl/react/menu';
26
+ import { useRef, useState } from 'react';
27
+ const Component = () => {
28
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
29
+ const anchorRef = useRef(null);
30
+ return (_jsx("div", { className: "n-flex n-flex-coln-gap-token-64 n-w-full n-justify-end", children: _jsxs("div", { className: "n-flex n-flex-col n-gap-token-8 n-items-end", children: [_jsx(MoreFiles, { count: 4, isActive: isMenuOpen, onClick: () => setIsMenuOpen(!isMenuOpen), ref: anchorRef }), _jsx(Menu, { isOpen: isMenuOpen, anchorRef: anchorRef, onClose: () => setIsMenuOpen(false), children: _jsxs(Menu.Items, { children: [_jsx(Menu.Item, { leadingVisual: _jsx(DocumentIconOutline, {}), title: "Gardening tips", description: "PDF", onClick: () => alert('Gardening tips') }), _jsx(Menu.Item, { leadingVisual: _jsx(TableCellsIconOutline, {}), title: "TvSeries", description: "CSV", onClick: () => alert('TvSeries') }), _jsx(Menu.Item, { leadingVisual: _jsx(PhotoIconOutline, {}), title: "Family photo", description: "JPG", onClick: () => alert('Family photo') })] }) }), _jsx(ImageTag, { src: "https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", alt: "Landscape image", fileName: "Landscape image", fileType: "jpg" }), _jsx(FileTag, { icon: _jsx(TableCellsIconOutline, {}), fileName: "MoviesDecade", fileType: "csv" }), _jsx(FileTag, { icon: _jsx(DocumentIconOutline, {}), fileName: "Science Fiction Bestsellers", fileType: "pdf" }), _jsx(UserBubble, { avatarProps: {
31
+ name: 'KM',
32
+ source: 'https://media.istockphoto.com/id/1334716681/photo/a-smiling-man.jpg?s=612x612&w=0&k=20&c=U6rkSDpQMzkcJEqx2hAa63fNLIhqnZb31Xuc_QSi648=',
33
+ type: 'image',
34
+ }, children: "Can you analyse my data and tell me about...?" })] }) }));
35
+ };
36
+ export default Component;
37
+ //# sourceMappingURL=user-bubble-and-files.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bubble-and-files.story.js","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble-and-files.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC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AC,qBAAqB,KAAG,EAC/B,QAAQ,EAAC,cAAc,EACvB,QAAQ,EAAC,KAAK,GACd,EACF,KAAC,OAAO,IACN,IAAI,EAAE,KAAC,mBAAmB,KAAG,EAC7B,QAAQ,EAAC,6BAA6B,EACtC,QAAQ,EAAC,KAAK,GACd,EACF,KAAC,UAAU,IACT,WAAW,EAAE;wBACX,IAAI,EAAE,IAAI;wBACV,MAAM,EACJ,uIAAuI;wBACzI,IAAI,EAAE,OAAO;qBACd,8DAGU,IACT,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FileTag, ImageTag, MoreFiles, UserBubble } from '@neo4j-ndl/react/ai';\nimport {\n DocumentIconOutline,\n PhotoIconOutline,\n TableCellsIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { Menu } from '@neo4j-ndl/react/menu';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const anchorRef = useRef<HTMLButtonElement | null>(null);\n\n return (\n <div className=\"n-flex n-flex-coln-gap-token-64 n-w-full n-justify-end\">\n <div className=\"n-flex n-flex-col n-gap-token-8 n-items-end\">\n <MoreFiles\n count={4}\n isActive={isMenuOpen}\n onClick={() => setIsMenuOpen(!isMenuOpen)}\n ref={anchorRef}\n />\n <Menu\n isOpen={isMenuOpen}\n anchorRef={anchorRef}\n onClose={() => setIsMenuOpen(false)}\n >\n <Menu.Items>\n <Menu.Item\n leadingVisual={<DocumentIconOutline />}\n title=\"Gardening tips\"\n description=\"PDF\"\n onClick={() => alert('Gardening tips')}\n />\n <Menu.Item\n leadingVisual={<TableCellsIconOutline />}\n title=\"TvSeries\"\n description=\"CSV\"\n onClick={() => alert('TvSeries')}\n />\n <Menu.Item\n leadingVisual={<PhotoIconOutline />}\n title=\"Family photo\"\n description=\"JPG\"\n onClick={() => alert('Family photo')}\n />\n </Menu.Items>\n </Menu>\n <ImageTag\n src=\"https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Landscape image\"\n fileName=\"Landscape image\"\n fileType=\"jpg\"\n />\n <FileTag\n icon={<TableCellsIconOutline />}\n fileName=\"MoviesDecade\"\n fileType=\"csv\"\n />\n <FileTag\n icon={<DocumentIconOutline />}\n fileName=\"Science Fiction Bestsellers\"\n fileType=\"pdf\"\n />\n <UserBubble\n avatarProps={{\n name: 'KM',\n source:\n 'https://media.istockphoto.com/id/1334716681/photo/a-smiling-man.jpg?s=612x612&w=0&k=20&c=U6rkSDpQMzkcJEqx2hAa63fNLIhqnZb31Xuc_QSi648=',\n type: 'image',\n }}\n >\n Can you analyse my data and tell me about...?\n </UserBubble>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { UserBubble } from '@neo4j-ndl/react/ai';
24
+ const Component = () => {
25
+ return (_jsx(UserBubble, { avatarProps: {
26
+ name: 'KM',
27
+ type: 'letters',
28
+ }, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in rutrum massa, ut congue nisi. Curabitur pulvinar odio id eros ornare dictum. Aliquam faucibus dui ligula, ac gravida enim mattis at. Proin pretium massa a risus eleifend consectetur. Fusce auctor maximus tellus sed lobortis. Nulla congue leo posuere ante accumsan, vel maximus justo cursus. Sed cursus varius ante at scelerisque. Fusce non venenatis diam. Nam sed dolor ultricies, varius sem sed, vulputate felis. Ut facilisis efficitur sem, et laoreet neque. Fusce congue vulputate magna. Mauris euismod egestas imperdiet. Sed mollis venenatis nunc eget laoreet." }));
29
+ };
30
+ export default Component;
31
+ //# sourceMappingURL=user-bubble-long.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bubble-long.story.js","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble-long.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,UAAU,IACT,WAAW,EAAE;YACX,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,SAAS;SAChB,ooBAWU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { UserBubble } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <UserBubble\n avatarProps={{\n name: 'KM',\n type: 'letters',\n }}\n >\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in rutrum\n massa, ut congue nisi. Curabitur pulvinar odio id eros ornare dictum.\n Aliquam faucibus dui ligula, ac gravida enim mattis at. Proin pretium\n massa a risus eleifend consectetur. Fusce auctor maximus tellus sed\n lobortis. Nulla congue leo posuere ante accumsan, vel maximus justo\n cursus. Sed cursus varius ante at scelerisque. Fusce non venenatis diam.\n Nam sed dolor ultricies, varius sem sed, vulputate felis. Ut facilisis\n efficitur sem, et laoreet neque. Fusce congue vulputate magna. Mauris\n euismod egestas imperdiet. Sed mollis venenatis nunc eget laoreet.\n </UserBubble>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,86 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ import { UserBubble } from '../UserBubble';
23
+ import { UserBubbleAction, UserBubbleActionSrc, UserBubbleAndFiles, UserBubbleAndFilesSrc, UserBubbleDefault, UserBubbleDefaultSrc, UserBubbleLong, UserBubbleLongSrc, } from '.';
24
+ const componentMeta = {
25
+ component: UserBubble,
26
+ id: 'components-ai-user-bubble',
27
+ parameters: {
28
+ controls: { disable: true },
29
+ },
30
+ tags: ['docsPage'],
31
+ title: 'Components/AI/UserBubble',
32
+ };
33
+ export default componentMeta;
34
+ export const Default = {
35
+ args: {},
36
+ parameters: {
37
+ docs: {
38
+ source: {
39
+ code: UserBubbleDefaultSrc,
40
+ language: 'tsx',
41
+ type: 'code',
42
+ },
43
+ },
44
+ },
45
+ render: UserBubbleDefault,
46
+ };
47
+ export const WithAction = {
48
+ args: {},
49
+ parameters: {
50
+ docs: {
51
+ source: {
52
+ code: UserBubbleActionSrc,
53
+ language: 'tsx',
54
+ type: 'code',
55
+ },
56
+ },
57
+ },
58
+ render: UserBubbleAction,
59
+ };
60
+ export const LongMessage = {
61
+ args: {},
62
+ parameters: {
63
+ docs: {
64
+ source: {
65
+ code: UserBubbleLongSrc,
66
+ language: 'tsx',
67
+ type: 'code',
68
+ },
69
+ },
70
+ },
71
+ render: UserBubbleLong,
72
+ };
73
+ export const WithFiles = {
74
+ args: {},
75
+ parameters: {
76
+ docs: {
77
+ source: {
78
+ code: UserBubbleAndFilesSrc,
79
+ language: 'tsx',
80
+ type: 'code',
81
+ },
82
+ },
83
+ },
84
+ render: UserBubbleAndFiles,
85
+ };
86
+ //# sourceMappingURL=user-bubble.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bubble.stories.js","sourceRoot":"","s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F,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { UserBubble } from '../UserBubble';\nimport {\n UserBubbleAction,\n UserBubbleActionSrc,\n UserBubbleAndFiles,\n UserBubbleAndFilesSrc,\n UserBubbleDefault,\n UserBubbleDefaultSrc,\n UserBubbleLong,\n UserBubbleLongSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof UserBubble> = {\n component: UserBubble,\n id: 'components-ai-user-bubble',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/UserBubble',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: UserBubbleDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: UserBubbleDefault,\n};\n\nexport const WithAction: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: UserBubbleActionSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: UserBubbleAction,\n};\n\nexport const LongMessage: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: UserBubbleLongSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: UserBubbleLong,\n};\n\nexport const WithFiles: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: UserBubbleAndFilesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: UserBubbleAndFiles,\n};\n"]}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { UserBubble } from '@neo4j-ndl/react/ai';
24
+ const Component = () => {
25
+ return (_jsx(UserBubble, { avatarProps: {
26
+ name: 'KM',
27
+ source: 'https://media.istockphoto.com/id/1334716681/photo/a-smiling-man.jpg?s=612x612&w=0&k=20&c=U6rkSDpQMzkcJEqx2hAa63fNLIhqnZb31Xuc_QSi648=',
28
+ type: 'image',
29
+ }, children: "Can you analyse my data and tell me about...?" }));
30
+ };
31
+ export default Component;
32
+ //# sourceMappingURL=user-bubble.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bubble.story.js","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,UAAU,IACT,WAAW,EAAE;YACX,IAAI,EAAE,IAAI;YACV,MAAM,EACJ,uIAAuI;YACzI,IAAI,EAAE,OAAO;SACd,8DAGU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { UserBubble } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <UserBubble\n avatarProps={{\n name: 'KM',\n source:\n 'https://media.istockphoto.com/id/1334716681/photo/a-smiling-man.jpg?s=612x612&w=0&k=20&c=U6rkSDpQMzkcJEqx2hAa63fNLIhqnZb31Xuc_QSi648=',\n type: 'image',\n }}\n >\n Can you analyse my data and tell me about...?\n </UserBubble>\n );\n};\n\nexport default Component;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,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ACpB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,yBAAO,QAAQ,GAAQ,IACb,GACI,CACnB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n children: React.ReactNode;\n isDisabled?: boolean;\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n e:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n\n onClick?.(e);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isDisabled}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
1
+ {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAmBrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAyC,EAYtB,EAAE,EAAE;QAZkB,EAC3D,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,OAAO,EACP,EAAE,EACF,GAAG,EACH,cAAc,OAEuB,EADlC,SAAS,cAX+C,uHAY5D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAG,UAAU,CACxB,UAAU,EACV;QACE,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;KAC3B,EACD,SAAS,CACV,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,CAA4C,EAAE,EAAE;QACnE,IAAI,UAAU,EAAE,CAAC;YACf,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,CAAC,CAAC,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,IACd,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,EACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,EAAE,SAAS,KAAK,QAAQ,YACtD,QAAQ,GACO,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,WAAW,GAAmB,IACxC,CACX,YAED,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,EACpB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,yBAAO,QAAQ,GAAQ,IACb,GACI,CACnB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n /** The content of the code */\n children?: React.ReactNode;\n /** Whether the code is disabled */\n isDisabled?: boolean;\n /** Whether the code is runnable */\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n e:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n\n onClick?.(e);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isDisabled}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/text-area/TextArea.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAM9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA4DrC;;;;;;GAMG;AAEH,MA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AK,SAAS,EAAC,mBAAmB,aAChC,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,0BAA0B,KAAG,GAC1B,EACN,cAAK,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAO,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { type ReactNode, useMemo } from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport {\n type CommonProps,\n type HtmlAttributes,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport {\n ExclamationCircleIconSolid,\n InformationCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype TextAreaProps = {\n /** The label displayed above the textarea */\n label?: ReactNode;\n\n /** Whether the textarea should take the full available width */\n isFluid?: boolean;\n\n /** Assistive text displayed below the textarea */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the textarea. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Size of the textarea */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether to display the Optional label next to the field label */\n isOptional?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether the textarea is disabled */\n isDisabled?: boolean;\n\n /** Additional HTML attributes passed to the textarea element */\n htmlAttributes?: HtmlAttributes<'textarea'>;\n\n /** Aria label for accessibility when no visible label is provided */\n ariaLabel?: string;\n\n /** Additional class names */\n className?: string;\n\n /** Additional styles applied to the root element */\n style?: React.CSSProperties;\n\n /** Whether the textarea is read-only */\n isReadOnly?: boolean;\n\n /** The current value of the textarea */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n\n /** Placeholder text displayed when the textarea is empty */\n placeholder?: React.ComponentPropsWithoutRef<'textarea'>['placeholder'];\n};\n\n/**\n *\n *\n * TextArea Component\n *\n *\n */\n\nexport const TextArea = ({\n label,\n isFluid = false,\n errorText,\n helpText,\n isOptional = false,\n moreInformationText,\n size = 'medium',\n ariaLabel,\n tooltipProps,\n isDisabled = false,\n className,\n isReadOnly = false,\n style,\n value,\n placeholder,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'textarea', TextAreaProps>) => {\n const containerWrappingClasses = classNames(\n `ndl-text-area ndl-type-text`,\n className,\n {\n 'ndl-disabled': isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n 'ndl-has-error': errorText,\n 'ndl-has-trailing-icon': errorText,\n 'ndl-has-icon': errorText,\n },\n );\n\n const hasEmptyLabelValue = !label || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-area-label', {\n 'ndl-fluid': isFluid,\n 'ndl-text-area-no-label': hasEmptyLabelValue,\n });\n\n const isCustomLabel = label && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel = isCustomLabel && !ariaLabel;\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextArea without a label does not have an aria label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n 'ndl-information-icon-large': size === 'large',\n });\n\n return (\n <div className={containerWrappingClasses}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n <div className=\"ndl-text-area-wrapper\">\n <textarea\n disabled={isDisabled}\n ref={ref}\n aria-label={ariaLabel}\n readOnly={isReadOnly}\n value={value}\n placeholder={placeholder}\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n </div>\n {!hasEmptyLabelValue && (\n <div className=\"ndl-text-area-wrapper\">\n <span className=\"ndl-text-area-label-text\">{label}</span>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger {...tooltipProps?.trigger}>\n <div\n className={informationIconClasses}\n data-testid=\"ndl-information-icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {isOptional && (\n <span className=\"ndl-text-area-optional\">Optional</span>\n )}\n </div>\n )}\n </label>\n {helpText && !errorText && (\n <div className=\"ndl-text-area-msg\">{helpText}</div>\n )}\n {errorText && (\n <div className=\"ndl-text-area-msg\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <div className=\"ndl-error-text\">{errorText}</div>\n </div>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/text-area/TextArea.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,uCAAuC,E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C,mBAAmB,IACJ,KACV,CACX,EACA,UAAU,IAAI,CACb,eAAM,SAAS,EAAC,wBAAwB,yBAAgB,CACzD,IACG,CACP,IACK,EACP,QAAQ,IAAI,CAAC,SAAS,IAAI,CACzB,cAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,CACpD,EACA,SAAS,IAAI,CACZ,eAAK,SAAS,EAAC,mBAAmB,aAChC,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,0BAA0B,KAAG,GAC1B,EACN,cAAK,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAO,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { type ReactNode, useMemo } from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport {\n type CommonProps,\n type HtmlAttributes,\n type TooltipObjectProps,\n} from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport {\n ExclamationCircleIconSolid,\n InformationCircleIconOutline,\n} from '../icons';\nimport { Tooltip } from '../tooltip';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype TextAreaProps = {\n /** The label displayed above the textarea */\n label?: ReactNode;\n\n /** Whether the textarea should take the full available width */\n isFluid?: boolean;\n\n /** Assistive text displayed below the textarea */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the textarea. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Size of the textarea */\n size?: 'small' | 'medium' | 'large';\n\n // TODO v5: use isRequired and showRequiredOrOptionalLabel like in TextInput\n /** Whether to display the Optional label next to the field label */\n isOptional?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether the textarea is disabled */\n isDisabled?: boolean;\n\n /** Additional HTML attributes passed to the textarea element */\n htmlAttributes?: HtmlAttributes<'textarea'>;\n\n /** Aria label for accessibility when no visible label is provided */\n ariaLabel?: string;\n\n /** Additional class names */\n className?: string;\n\n /** Additional styles applied to the root element */\n style?: React.CSSProperties;\n\n /** Whether the textarea is read-only */\n isReadOnly?: boolean;\n\n /** The current value of the textarea */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n\n /** Placeholder text displayed when the textarea is empty */\n placeholder?: React.ComponentPropsWithoutRef<'textarea'>['placeholder'];\n};\n\n/**\n *\n *\n * TextArea Component\n *\n *\n */\n\nexport const TextArea = ({\n label,\n isFluid = false,\n errorText,\n helpText,\n isOptional = false,\n moreInformationText,\n size = 'medium',\n ariaLabel,\n tooltipProps,\n isDisabled = false,\n className,\n isReadOnly = false,\n style,\n value,\n placeholder,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'textarea', TextAreaProps>) => {\n const containerWrappingClasses = classNames(\n `ndl-text-area ndl-type-text`,\n className,\n {\n 'ndl-disabled': isDisabled,\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n 'ndl-has-error': errorText,\n 'ndl-has-trailing-icon': errorText,\n 'ndl-has-icon': errorText,\n },\n );\n\n const hasEmptyLabelValue = !label || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-area-label', {\n 'ndl-fluid': isFluid,\n 'ndl-text-area-no-label': hasEmptyLabelValue,\n });\n\n const isCustomLabel = label && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel = isCustomLabel && !ariaLabel;\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextArea without a label does not have an aria label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n 'ndl-information-icon-large': size === 'large',\n });\n\n return (\n <div className={containerWrappingClasses}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n <div className=\"ndl-text-area-wrapper\">\n <textarea\n disabled={isDisabled}\n ref={ref}\n aria-label={ariaLabel}\n readOnly={isReadOnly}\n value={value}\n placeholder={placeholder}\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n </div>\n {!hasEmptyLabelValue && (\n <div className=\"ndl-text-area-wrapper\">\n <span className=\"ndl-text-area-label-text\">{label}</span>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger {...tooltipProps?.trigger}>\n <div\n className={informationIconClasses}\n data-testid=\"ndl-information-icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {isOptional && (\n <span className=\"ndl-text-area-optional\">Optional</span>\n )}\n </div>\n )}\n </label>\n {helpText && !errorText && (\n <div className=\"ndl-text-area-msg\">{helpText}</div>\n )}\n {errorText && (\n <div className=\"ndl-text-area-msg\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <div className=\"ndl-error-text\">{errorText}</div>\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -24,7 +24,7 @@ import { TimeZonePicker } from '@neo4j-ndl/react';
24
24
  import { useState } from 'react';
25
25
  const Component = () => {
26
26
  const [selectedTimeZone, setSelectedTimeZone] = useState('Europe/Stockholm');
27
- const [referenceDate, setReferenceDate] = useState(new Date());
27
+ const [referenceDate, setReferenceDate] = useState(new Date('2025-01-01'));
28
28
  // Create summer and winter dates for DST demonstration
29
29
  const summerDate = new Date('2024-07-15T12:00:00'); // July (DST in effect)
30
30
  const winterDate = new Date('2024-01-15T12:00:00'); // January (Standard time)