@neo4j-ndl/react 3.8.34 → 3.9.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 (487) hide show
  1. package/lib/cjs/avatar/stories/avatar-shapes.story.js +1 -1
  2. package/lib/cjs/avatar/stories/avatar-shapes.story.js.map +1 -1
  3. package/lib/cjs/avatar/stories/avatar-sizes.story.js +1 -1
  4. package/lib/cjs/avatar/stories/avatar-sizes.story.js.map +1 -1
  5. package/lib/cjs/avatar/stories/avatar-statuses.story.js +1 -1
  6. package/lib/cjs/avatar/stories/avatar-statuses.story.js.map +1 -1
  7. package/lib/cjs/avatar/stories/avatar-types.story.js +1 -1
  8. package/lib/cjs/avatar/stories/avatar-types.story.js.map +1 -1
  9. package/lib/cjs/avatar/stories/avatar.stories.js +12 -1
  10. package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
  11. package/lib/cjs/callout/stories/callout-default.story.js +30 -0
  12. package/lib/cjs/callout/stories/callout-default.story.js.map +1 -0
  13. package/lib/cjs/callout/stories/callout-full.story.js +30 -0
  14. package/lib/cjs/callout/stories/callout-full.story.js.map +1 -0
  15. package/lib/cjs/callout/stories/callout-types.story.js +30 -0
  16. package/lib/cjs/callout/stories/callout-types.story.js.map +1 -0
  17. package/lib/cjs/callout/stories/callout-with-children.story.js +30 -0
  18. package/lib/cjs/callout/stories/callout-with-children.story.js.map +1 -0
  19. package/lib/cjs/callout/stories/callout-without-header.story.js +30 -0
  20. package/lib/cjs/callout/stories/callout-without-header.story.js.map +1 -0
  21. package/lib/cjs/callout/stories/callout.stories.js +101 -0
  22. package/lib/cjs/callout/stories/callout.stories.js.map +1 -0
  23. package/lib/cjs/callout/stories/index.js +48 -0
  24. package/lib/cjs/callout/stories/index.js.map +1 -0
  25. package/lib/cjs/checkbox/stories/checkbox-checkedByDefault.story.js +30 -0
  26. package/lib/cjs/checkbox/stories/checkbox-checkedByDefault.story.js.map +1 -0
  27. package/lib/cjs/checkbox/stories/checkbox-default.story.js +30 -0
  28. package/lib/cjs/checkbox/stories/checkbox-default.story.js.map +1 -0
  29. package/lib/cjs/checkbox/stories/checkbox-disabled.story.js +30 -0
  30. package/lib/cjs/checkbox/stories/checkbox-disabled.story.js.map +1 -0
  31. package/lib/cjs/checkbox/stories/checkbox-full.story.js +39 -0
  32. package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -0
  33. package/lib/cjs/checkbox/stories/checkbox-hasLabelBefore.story.js +30 -0
  34. package/lib/cjs/checkbox/stories/checkbox-hasLabelBefore.story.js.map +1 -0
  35. package/lib/cjs/checkbox/stories/checkbox-indeterminate.story.js +33 -0
  36. package/lib/cjs/checkbox/stories/checkbox-indeterminate.story.js.map +1 -0
  37. package/lib/cjs/checkbox/stories/checkbox-no-label.story.js +30 -0
  38. package/lib/cjs/checkbox/stories/checkbox-no-label.story.js.map +1 -0
  39. package/lib/cjs/checkbox/stories/checkbox.stories.js +137 -0
  40. package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -0
  41. package/lib/cjs/checkbox/stories/index.js +56 -0
  42. package/lib/cjs/checkbox/stories/index.js.map +1 -0
  43. package/lib/cjs/context-menu/ContextMenu.js +1 -1
  44. package/lib/cjs/context-menu/stories/context-menu-custom-items.story.js +33 -0
  45. package/lib/cjs/context-menu/stories/context-menu-custom-items.story.js.map +1 -0
  46. package/lib/cjs/context-menu/stories/context-menu-default.story.js +45 -0
  47. package/lib/cjs/context-menu/stories/context-menu-default.story.js.map +1 -0
  48. package/lib/cjs/context-menu/stories/context-menu-in-modal.story.js +38 -0
  49. package/lib/cjs/context-menu/stories/context-menu-in-modal.story.js.map +1 -0
  50. package/lib/cjs/context-menu/stories/context-menu-in-popover.story.js +34 -0
  51. package/lib/cjs/context-menu/stories/context-menu-in-popover.story.js.map +1 -0
  52. package/lib/cjs/context-menu/stories/context-menu-nested.story.js +34 -0
  53. package/lib/cjs/context-menu/stories/context-menu-nested.story.js.map +1 -0
  54. package/lib/cjs/context-menu/stories/context-menu-placements.story.js +45 -0
  55. package/lib/cjs/context-menu/stories/context-menu-placements.story.js.map +1 -0
  56. package/lib/cjs/context-menu/stories/context-menu-with-disabled-item.story.js +36 -0
  57. package/lib/cjs/context-menu/stories/context-menu-with-disabled-item.story.js.map +1 -0
  58. package/lib/cjs/context-menu/stories/context-menu-with-divider.story.js +36 -0
  59. package/lib/cjs/context-menu/stories/context-menu-with-divider.story.js.map +1 -0
  60. package/lib/cjs/context-menu/stories/context-menu-with-header.story.js +36 -0
  61. package/lib/cjs/context-menu/stories/context-menu-with-header.story.js.map +1 -0
  62. package/lib/cjs/context-menu/stories/context-menu-with-icon.story.js +34 -0
  63. package/lib/cjs/context-menu/stories/context-menu-with-icon.story.js.map +1 -0
  64. package/lib/cjs/context-menu/stories/context-menu.stories.js +170 -0
  65. package/lib/cjs/context-menu/stories/context-menu.stories.js.map +1 -0
  66. package/lib/cjs/context-menu/stories/index.js +68 -0
  67. package/lib/cjs/context-menu/stories/index.js.map +1 -0
  68. package/lib/cjs/drawer/stories/drawer-full.story.js +36 -0
  69. package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -0
  70. package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +33 -0
  71. package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -0
  72. package/lib/cjs/drawer/stories/drawer-overlay.story.js +33 -0
  73. package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -0
  74. package/lib/cjs/drawer/stories/drawer-portaled.story.js +38 -0
  75. package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -0
  76. package/lib/cjs/drawer/stories/drawer-push.story.js +32 -0
  77. package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -0
  78. package/lib/cjs/drawer/stories/drawer-resizable.story.js +36 -0
  79. package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -0
  80. package/lib/cjs/drawer/stories/drawer-right-side.story.js +33 -0
  81. package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -0
  82. package/lib/cjs/drawer/stories/drawer-scrollable.story.js +33 -0
  83. package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -0
  84. package/lib/cjs/drawer/stories/drawer.stories.js +150 -0
  85. package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -0
  86. package/lib/cjs/drawer/stories/index.js +60 -0
  87. package/lib/cjs/drawer/stories/index.js.map +1 -0
  88. package/lib/cjs/graph-label/stories/graph-label-color.story.js +30 -0
  89. package/lib/cjs/graph-label/stories/graph-label-color.story.js.map +1 -0
  90. package/lib/cjs/graph-label/stories/graph-label-disabled.story.js +30 -0
  91. package/lib/cjs/graph-label/stories/graph-label-disabled.story.js.map +1 -0
  92. package/lib/cjs/graph-label/stories/graph-label-fluid.story.js +30 -0
  93. package/lib/cjs/graph-label/stories/graph-label-fluid.story.js.map +1 -0
  94. package/lib/cjs/graph-label/stories/graph-label-non-interactive.story.js +30 -0
  95. package/lib/cjs/graph-label/stories/graph-label-non-interactive.story.js.map +1 -0
  96. package/lib/cjs/graph-label/stories/graph-label-selected.story.js +30 -0
  97. package/lib/cjs/graph-label/stories/graph-label-selected.story.js.map +1 -0
  98. package/lib/cjs/graph-label/stories/graph-label-sizes.story.js +30 -0
  99. package/lib/cjs/graph-label/stories/graph-label-sizes.story.js.map +1 -0
  100. package/lib/cjs/graph-label/stories/graph-label-types.story.js +30 -0
  101. package/lib/cjs/graph-label/stories/graph-label-types.story.js.map +1 -0
  102. package/lib/cjs/graph-label/stories/graph-label.stories.js +132 -0
  103. package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -0
  104. package/lib/cjs/graph-label/stories/index.js +56 -0
  105. package/lib/cjs/graph-label/stories/index.js.map +1 -0
  106. package/lib/cjs/label/stories/index.js +44 -0
  107. package/lib/cjs/label/stories/index.js.map +1 -0
  108. package/lib/cjs/label/stories/label-colors.story.js +30 -0
  109. package/lib/cjs/label/stories/label-colors.story.js.map +1 -0
  110. package/lib/cjs/label/stories/label-default.story.js +30 -0
  111. package/lib/cjs/label/stories/label-default.story.js.map +1 -0
  112. package/lib/cjs/label/stories/label-fills.story.js +30 -0
  113. package/lib/cjs/label/stories/label-fills.story.js.map +1 -0
  114. package/lib/cjs/label/stories/label-with-icons.story.js +30 -0
  115. package/lib/cjs/label/stories/label-with-icons.story.js.map +1 -0
  116. package/lib/cjs/label/stories/label.stories.js +93 -0
  117. package/lib/cjs/label/stories/label.stories.js.map +1 -0
  118. package/lib/cjs/loading-bar/stories/index.js +36 -0
  119. package/lib/cjs/loading-bar/stories/index.js.map +1 -0
  120. package/lib/cjs/loading-bar/stories/loading-bar-default.story.js +30 -0
  121. package/lib/cjs/loading-bar/stories/loading-bar-default.story.js.map +1 -0
  122. package/lib/cjs/loading-bar/stories/loading-bar-with-rail.story.js +30 -0
  123. package/lib/cjs/loading-bar/stories/loading-bar-with-rail.story.js.map +1 -0
  124. package/lib/cjs/loading-bar/stories/loading-bar.stories.js +67 -0
  125. package/lib/cjs/loading-bar/stories/loading-bar.stories.js.map +1 -0
  126. package/lib/cjs/loading-spinner/stories/index.js +36 -0
  127. package/lib/cjs/loading-spinner/stories/index.js.map +1 -0
  128. package/lib/cjs/loading-spinner/stories/loading-spinner-default.story.js +30 -0
  129. package/lib/cjs/loading-spinner/stories/loading-spinner-default.story.js.map +1 -0
  130. package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js +30 -0
  131. package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -0
  132. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +67 -0
  133. package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -0
  134. package/lib/cjs/segmented-control/stories/index.js +44 -0
  135. package/lib/cjs/segmented-control/stories/index.js.map +1 -0
  136. package/lib/cjs/segmented-control/stories/segmented-control-default.story.js +32 -0
  137. package/lib/cjs/segmented-control/stories/segmented-control-default.story.js.map +1 -0
  138. package/lib/cjs/segmented-control/stories/segmented-control-floating.story.js +32 -0
  139. package/lib/cjs/segmented-control/stories/segmented-control-floating.story.js.map +1 -0
  140. package/lib/cjs/segmented-control/stories/segmented-control-only-icons.story.js +33 -0
  141. package/lib/cjs/segmented-control/stories/segmented-control-only-icons.story.js.map +1 -0
  142. package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js +33 -0
  143. package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js.map +1 -0
  144. package/lib/cjs/segmented-control/stories/segmented-control.stories.js +93 -0
  145. package/lib/cjs/segmented-control/stories/segmented-control.stories.js.map +1 -0
  146. package/lib/cjs/slider/stories/index.js +25 -5
  147. package/lib/cjs/slider/stories/index.js.map +1 -1
  148. package/lib/cjs/slider/stories/slider-custom-step-length.story.js +31 -0
  149. package/lib/cjs/slider/stories/slider-custom-step-length.story.js.map +1 -0
  150. package/lib/cjs/slider/stories/slider-default.story.js +31 -0
  151. package/lib/cjs/slider/stories/slider-default.story.js.map +1 -0
  152. package/lib/cjs/slider/stories/slider-disabled.story.js +31 -0
  153. package/lib/cjs/slider/stories/slider-disabled.story.js.map +1 -0
  154. package/lib/cjs/slider/stories/slider-range.story.js +2 -2
  155. package/lib/cjs/slider/stories/slider-range.story.js.map +1 -1
  156. package/lib/cjs/slider/stories/slider-show-steps.story.js +31 -0
  157. package/lib/cjs/slider/stories/slider-show-steps.story.js.map +1 -0
  158. package/lib/cjs/slider/stories/slider-show-values.story.js +31 -0
  159. package/lib/cjs/slider/stories/slider-show-values.story.js.map +1 -0
  160. package/lib/cjs/slider/stories/slider-single-controlled.story.js +49 -6
  161. package/lib/cjs/slider/stories/slider-single-controlled.story.js.map +1 -1
  162. package/lib/cjs/slider/stories/slider-single.story.js +2 -2
  163. package/lib/cjs/slider/stories/slider-single.story.js.map +1 -1
  164. package/lib/cjs/slider/stories/slider.stories.js +76 -7
  165. package/lib/cjs/slider/stories/slider.stories.js.map +1 -1
  166. package/lib/cjs/status-indicator/stories/index.js +32 -0
  167. package/lib/cjs/status-indicator/stories/index.js.map +1 -0
  168. package/lib/cjs/status-indicator/stories/status-indicator-types.story.js +30 -0
  169. package/lib/cjs/status-indicator/stories/status-indicator-types.story.js.map +1 -0
  170. package/lib/cjs/status-indicator/stories/status-indicator.stories.js +54 -0
  171. package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -0
  172. package/lib/cjs/toast/Toast.js +5 -1
  173. package/lib/cjs/toast/Toast.js.map +1 -1
  174. package/lib/cjs/toast/ToastControlled.js +87 -0
  175. package/lib/cjs/toast/ToastControlled.js.map +1 -0
  176. package/lib/cjs/toast/index.js +1 -0
  177. package/lib/cjs/toast/index.js.map +1 -1
  178. package/lib/cjs/toast/stories/index.js +60 -0
  179. package/lib/cjs/toast/stories/index.js.map +1 -0
  180. package/lib/cjs/toast/stories/toast-action-story.js +38 -0
  181. package/lib/cjs/toast/stories/toast-action-story.js.map +1 -0
  182. package/lib/cjs/toast/stories/toast-closeable-story.js +37 -0
  183. package/lib/cjs/toast/stories/toast-closeable-story.js.map +1 -0
  184. package/lib/cjs/toast/stories/toast-controlled-story.js +44 -0
  185. package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -0
  186. package/lib/cjs/toast/stories/toast-custom-story.js +32 -0
  187. package/lib/cjs/toast/stories/toast-custom-story.js.map +1 -0
  188. package/lib/cjs/toast/stories/toast-danger-story.js +32 -0
  189. package/lib/cjs/toast/stories/toast-danger-story.js.map +1 -0
  190. package/lib/cjs/toast/stories/toast-neutral-story.js +32 -0
  191. package/lib/cjs/toast/stories/toast-neutral-story.js.map +1 -0
  192. package/lib/cjs/toast/stories/toast-progress-bar.js +49 -0
  193. package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -0
  194. package/lib/cjs/toast/stories/toast-success-story.js +32 -0
  195. package/lib/cjs/toast/stories/toast-success-story.js.map +1 -0
  196. package/lib/cjs/toast/stories/toast.stories.js +137 -0
  197. package/lib/cjs/toast/stories/toast.stories.js.map +1 -0
  198. package/lib/esm/avatar/stories/avatar-shapes.story.js +1 -1
  199. package/lib/esm/avatar/stories/avatar-shapes.story.js.map +1 -1
  200. package/lib/esm/avatar/stories/avatar-sizes.story.js +1 -1
  201. package/lib/esm/avatar/stories/avatar-sizes.story.js.map +1 -1
  202. package/lib/esm/avatar/stories/avatar-statuses.story.js +1 -1
  203. package/lib/esm/avatar/stories/avatar-statuses.story.js.map +1 -1
  204. package/lib/esm/avatar/stories/avatar-types.story.js +1 -1
  205. package/lib/esm/avatar/stories/avatar-types.story.js.map +1 -1
  206. package/lib/esm/avatar/stories/avatar.stories.js +11 -0
  207. package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
  208. package/lib/esm/callout/stories/callout-default.story.js +28 -0
  209. package/lib/esm/callout/stories/callout-default.story.js.map +1 -0
  210. package/lib/esm/callout/stories/callout-full.story.js +28 -0
  211. package/lib/esm/callout/stories/callout-full.story.js.map +1 -0
  212. package/lib/esm/callout/stories/callout-types.story.js +28 -0
  213. package/lib/esm/callout/stories/callout-types.story.js.map +1 -0
  214. package/lib/esm/callout/stories/callout-with-children.story.js +28 -0
  215. package/lib/esm/callout/stories/callout-with-children.story.js.map +1 -0
  216. package/lib/esm/callout/stories/callout-without-header.story.js +28 -0
  217. package/lib/esm/callout/stories/callout-without-header.story.js.map +1 -0
  218. package/lib/esm/callout/stories/callout.stories.js +98 -0
  219. package/lib/esm/callout/stories/callout.stories.js.map +1 -0
  220. package/lib/esm/callout/stories/index.js +37 -0
  221. package/lib/esm/callout/stories/index.js.map +1 -0
  222. package/lib/esm/checkbox/stories/checkbox-checkedByDefault.story.js +28 -0
  223. package/lib/esm/checkbox/stories/checkbox-checkedByDefault.story.js.map +1 -0
  224. package/lib/esm/checkbox/stories/checkbox-default.story.js +28 -0
  225. package/lib/esm/checkbox/stories/checkbox-default.story.js.map +1 -0
  226. package/lib/esm/checkbox/stories/checkbox-disabled.story.js +28 -0
  227. package/lib/esm/checkbox/stories/checkbox-disabled.story.js.map +1 -0
  228. package/lib/esm/checkbox/stories/checkbox-full.story.js +37 -0
  229. package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -0
  230. package/lib/esm/checkbox/stories/checkbox-hasLabelBefore.story.js +28 -0
  231. package/lib/esm/checkbox/stories/checkbox-hasLabelBefore.story.js.map +1 -0
  232. package/lib/esm/checkbox/stories/checkbox-indeterminate.story.js +31 -0
  233. package/lib/esm/checkbox/stories/checkbox-indeterminate.story.js.map +1 -0
  234. package/lib/esm/checkbox/stories/checkbox-no-label.story.js +28 -0
  235. package/lib/esm/checkbox/stories/checkbox-no-label.story.js.map +1 -0
  236. package/lib/esm/checkbox/stories/checkbox.stories.js +134 -0
  237. package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -0
  238. package/lib/esm/checkbox/stories/index.js +43 -0
  239. package/lib/esm/checkbox/stories/index.js.map +1 -0
  240. package/lib/esm/context-menu/ContextMenu.js +1 -1
  241. package/lib/esm/context-menu/stories/context-menu-custom-items.story.js +31 -0
  242. package/lib/esm/context-menu/stories/context-menu-custom-items.story.js.map +1 -0
  243. package/lib/esm/context-menu/stories/context-menu-default.story.js +43 -0
  244. package/lib/esm/context-menu/stories/context-menu-default.story.js.map +1 -0
  245. package/lib/esm/context-menu/stories/context-menu-in-modal.story.js +36 -0
  246. package/lib/esm/context-menu/stories/context-menu-in-modal.story.js.map +1 -0
  247. package/lib/esm/context-menu/stories/context-menu-in-popover.story.js +32 -0
  248. package/lib/esm/context-menu/stories/context-menu-in-popover.story.js.map +1 -0
  249. package/lib/esm/context-menu/stories/context-menu-nested.story.js +32 -0
  250. package/lib/esm/context-menu/stories/context-menu-nested.story.js.map +1 -0
  251. package/lib/esm/context-menu/stories/context-menu-placements.story.js +43 -0
  252. package/lib/esm/context-menu/stories/context-menu-placements.story.js.map +1 -0
  253. package/lib/esm/context-menu/stories/context-menu-with-disabled-item.story.js +34 -0
  254. package/lib/esm/context-menu/stories/context-menu-with-disabled-item.story.js.map +1 -0
  255. package/lib/esm/context-menu/stories/context-menu-with-divider.story.js +34 -0
  256. package/lib/esm/context-menu/stories/context-menu-with-divider.story.js.map +1 -0
  257. package/lib/esm/context-menu/stories/context-menu-with-header.story.js +34 -0
  258. package/lib/esm/context-menu/stories/context-menu-with-header.story.js.map +1 -0
  259. package/lib/esm/context-menu/stories/context-menu-with-icon.story.js +32 -0
  260. package/lib/esm/context-menu/stories/context-menu-with-icon.story.js.map +1 -0
  261. package/lib/esm/context-menu/stories/context-menu.stories.js +167 -0
  262. package/lib/esm/context-menu/stories/context-menu.stories.js.map +1 -0
  263. package/lib/esm/context-menu/stories/index.js +52 -0
  264. package/lib/esm/context-menu/stories/index.js.map +1 -0
  265. package/lib/esm/drawer/stories/drawer-full.story.js +34 -0
  266. package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -0
  267. package/lib/esm/drawer/stories/drawer-not-closeable.story.js +31 -0
  268. package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -0
  269. package/lib/esm/drawer/stories/drawer-overlay.story.js +31 -0
  270. package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -0
  271. package/lib/esm/drawer/stories/drawer-portaled.story.js +36 -0
  272. package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -0
  273. package/lib/esm/drawer/stories/drawer-push.story.js +30 -0
  274. package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -0
  275. package/lib/esm/drawer/stories/drawer-resizable.story.js +34 -0
  276. package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -0
  277. package/lib/esm/drawer/stories/drawer-right-side.story.js +31 -0
  278. package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -0
  279. package/lib/esm/drawer/stories/drawer-scrollable.story.js +31 -0
  280. package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -0
  281. package/lib/esm/drawer/stories/drawer.stories.js +147 -0
  282. package/lib/esm/drawer/stories/drawer.stories.js.map +1 -0
  283. package/lib/esm/drawer/stories/index.js +46 -0
  284. package/lib/esm/drawer/stories/index.js.map +1 -0
  285. package/lib/esm/graph-label/stories/graph-label-color.story.js +28 -0
  286. package/lib/esm/graph-label/stories/graph-label-color.story.js.map +1 -0
  287. package/lib/esm/graph-label/stories/graph-label-disabled.story.js +28 -0
  288. package/lib/esm/graph-label/stories/graph-label-disabled.story.js.map +1 -0
  289. package/lib/esm/graph-label/stories/graph-label-fluid.story.js +28 -0
  290. package/lib/esm/graph-label/stories/graph-label-fluid.story.js.map +1 -0
  291. package/lib/esm/graph-label/stories/graph-label-non-interactive.story.js +28 -0
  292. package/lib/esm/graph-label/stories/graph-label-non-interactive.story.js.map +1 -0
  293. package/lib/esm/graph-label/stories/graph-label-selected.story.js +28 -0
  294. package/lib/esm/graph-label/stories/graph-label-selected.story.js.map +1 -0
  295. package/lib/esm/graph-label/stories/graph-label-sizes.story.js +28 -0
  296. package/lib/esm/graph-label/stories/graph-label-sizes.story.js.map +1 -0
  297. package/lib/esm/graph-label/stories/graph-label-types.story.js +28 -0
  298. package/lib/esm/graph-label/stories/graph-label-types.story.js.map +1 -0
  299. package/lib/esm/graph-label/stories/graph-label.stories.js +129 -0
  300. package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -0
  301. package/lib/esm/graph-label/stories/index.js +43 -0
  302. package/lib/esm/graph-label/stories/index.js.map +1 -0
  303. package/lib/esm/label/stories/index.js +34 -0
  304. package/lib/esm/label/stories/index.js.map +1 -0
  305. package/lib/esm/label/stories/label-colors.story.js +28 -0
  306. package/lib/esm/label/stories/label-colors.story.js.map +1 -0
  307. package/lib/esm/label/stories/label-default.story.js +28 -0
  308. package/lib/esm/label/stories/label-default.story.js.map +1 -0
  309. package/lib/esm/label/stories/label-fills.story.js +28 -0
  310. package/lib/esm/label/stories/label-fills.story.js.map +1 -0
  311. package/lib/esm/label/stories/label-with-icons.story.js +28 -0
  312. package/lib/esm/label/stories/label-with-icons.story.js.map +1 -0
  313. package/lib/esm/label/stories/label.stories.js +90 -0
  314. package/lib/esm/label/stories/label.stories.js.map +1 -0
  315. package/lib/esm/loading-bar/stories/index.js +28 -0
  316. package/lib/esm/loading-bar/stories/index.js.map +1 -0
  317. package/lib/esm/loading-bar/stories/loading-bar-default.story.js +28 -0
  318. package/lib/esm/loading-bar/stories/loading-bar-default.story.js.map +1 -0
  319. package/lib/esm/loading-bar/stories/loading-bar-with-rail.story.js +28 -0
  320. package/lib/esm/loading-bar/stories/loading-bar-with-rail.story.js.map +1 -0
  321. package/lib/esm/loading-bar/stories/loading-bar.stories.js +64 -0
  322. package/lib/esm/loading-bar/stories/loading-bar.stories.js.map +1 -0
  323. package/lib/esm/loading-spinner/stories/index.js +28 -0
  324. package/lib/esm/loading-spinner/stories/index.js.map +1 -0
  325. package/lib/esm/loading-spinner/stories/loading-spinner-default.story.js +28 -0
  326. package/lib/esm/loading-spinner/stories/loading-spinner-default.story.js.map +1 -0
  327. package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js +28 -0
  328. package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -0
  329. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +64 -0
  330. package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -0
  331. package/lib/esm/segmented-control/stories/index.js +34 -0
  332. package/lib/esm/segmented-control/stories/index.js.map +1 -0
  333. package/lib/esm/segmented-control/stories/segmented-control-default.story.js +30 -0
  334. package/lib/esm/segmented-control/stories/segmented-control-default.story.js.map +1 -0
  335. package/lib/esm/segmented-control/stories/segmented-control-floating.story.js +30 -0
  336. package/lib/esm/segmented-control/stories/segmented-control-floating.story.js.map +1 -0
  337. package/lib/esm/segmented-control/stories/segmented-control-only-icons.story.js +31 -0
  338. package/lib/esm/segmented-control/stories/segmented-control-only-icons.story.js.map +1 -0
  339. package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js +31 -0
  340. package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js.map +1 -0
  341. package/lib/esm/segmented-control/stories/segmented-control.stories.js +90 -0
  342. package/lib/esm/segmented-control/stories/segmented-control.stories.js.map +1 -0
  343. package/lib/esm/slider/stories/index.js +15 -0
  344. package/lib/esm/slider/stories/index.js.map +1 -1
  345. package/lib/esm/slider/stories/slider-custom-step-length.story.js +29 -0
  346. package/lib/esm/slider/stories/slider-custom-step-length.story.js.map +1 -0
  347. package/lib/esm/slider/stories/slider-default.story.js +29 -0
  348. package/lib/esm/slider/stories/slider-default.story.js.map +1 -0
  349. package/lib/esm/slider/stories/slider-disabled.story.js +29 -0
  350. package/lib/esm/slider/stories/slider-disabled.story.js.map +1 -0
  351. package/lib/esm/slider/stories/slider-range.story.js +1 -1
  352. package/lib/esm/slider/stories/slider-range.story.js.map +1 -1
  353. package/lib/esm/slider/stories/slider-show-steps.story.js +29 -0
  354. package/lib/esm/slider/stories/slider-show-steps.story.js.map +1 -0
  355. package/lib/esm/slider/stories/slider-show-values.story.js +29 -0
  356. package/lib/esm/slider/stories/slider-show-values.story.js.map +1 -0
  357. package/lib/esm/slider/stories/slider-single-controlled.story.js +50 -7
  358. package/lib/esm/slider/stories/slider-single-controlled.story.js.map +1 -1
  359. package/lib/esm/slider/stories/slider-single.story.js +1 -1
  360. package/lib/esm/slider/stories/slider-single.story.js.map +1 -1
  361. package/lib/esm/slider/stories/slider.stories.js +73 -4
  362. package/lib/esm/slider/stories/slider.stories.js.map +1 -1
  363. package/lib/esm/status-indicator/stories/index.js +25 -0
  364. package/lib/esm/status-indicator/stories/index.js.map +1 -0
  365. package/lib/esm/status-indicator/stories/status-indicator-types.story.js +28 -0
  366. package/lib/esm/status-indicator/stories/status-indicator-types.story.js.map +1 -0
  367. package/lib/esm/status-indicator/stories/status-indicator.stories.js +51 -0
  368. package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -0
  369. package/lib/esm/toast/Toast.js +5 -1
  370. package/lib/esm/toast/Toast.js.map +1 -1
  371. package/lib/esm/toast/ToastControlled.js +83 -0
  372. package/lib/esm/toast/ToastControlled.js.map +1 -0
  373. package/lib/esm/toast/index.js +1 -0
  374. package/lib/esm/toast/index.js.map +1 -1
  375. package/lib/esm/toast/stories/index.js +46 -0
  376. package/lib/esm/toast/stories/index.js.map +1 -0
  377. package/lib/esm/toast/stories/toast-action-story.js +36 -0
  378. package/lib/esm/toast/stories/toast-action-story.js.map +1 -0
  379. package/lib/esm/toast/stories/toast-closeable-story.js +35 -0
  380. package/lib/esm/toast/stories/toast-closeable-story.js.map +1 -0
  381. package/lib/esm/toast/stories/toast-controlled-story.js +42 -0
  382. package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -0
  383. package/lib/esm/toast/stories/toast-custom-story.js +30 -0
  384. package/lib/esm/toast/stories/toast-custom-story.js.map +1 -0
  385. package/lib/esm/toast/stories/toast-danger-story.js +30 -0
  386. package/lib/esm/toast/stories/toast-danger-story.js.map +1 -0
  387. package/lib/esm/toast/stories/toast-neutral-story.js +30 -0
  388. package/lib/esm/toast/stories/toast-neutral-story.js.map +1 -0
  389. package/lib/esm/toast/stories/toast-progress-bar.js +47 -0
  390. package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -0
  391. package/lib/esm/toast/stories/toast-success-story.js +30 -0
  392. package/lib/esm/toast/stories/toast-success-story.js.map +1 -0
  393. package/lib/esm/toast/stories/toast.stories.js +134 -0
  394. package/lib/esm/toast/stories/toast.stories.js.map +1 -0
  395. package/lib/types/avatar/stories/avatar.stories.d.ts +3 -12
  396. package/lib/types/callout/stories/callout-default.story.d.ts +23 -0
  397. package/lib/types/callout/stories/callout-full.story.d.ts +23 -0
  398. package/lib/types/callout/stories/callout-types.story.d.ts +23 -0
  399. package/lib/types/callout/stories/callout-with-children.story.d.ts +23 -0
  400. package/lib/types/callout/stories/callout-without-header.story.d.ts +23 -0
  401. package/lib/types/callout/stories/callout.stories.d.ts +39 -0
  402. package/lib/types/callout/stories/index.d.ts +30 -0
  403. package/lib/types/checkbox/stories/checkbox-checkedByDefault.story.d.ts +23 -0
  404. package/lib/types/checkbox/stories/checkbox-default.story.d.ts +23 -0
  405. package/lib/types/checkbox/stories/checkbox-disabled.story.d.ts +23 -0
  406. package/lib/types/checkbox/stories/checkbox-full.story.d.ts +23 -0
  407. package/lib/types/checkbox/stories/checkbox-hasLabelBefore.story.d.ts +23 -0
  408. package/lib/types/checkbox/stories/checkbox-indeterminate.story.d.ts +23 -0
  409. package/lib/types/checkbox/stories/checkbox-no-label.story.d.ts +23 -0
  410. package/lib/types/checkbox/stories/checkbox.stories.d.ts +32 -0
  411. package/lib/types/checkbox/stories/index.d.ts +34 -0
  412. package/lib/types/context-menu/stories/context-menu-custom-items.story.d.ts +23 -0
  413. package/lib/types/context-menu/stories/context-menu-default.story.d.ts +23 -0
  414. package/lib/types/context-menu/stories/context-menu-in-modal.story.d.ts +23 -0
  415. package/lib/types/context-menu/stories/context-menu-in-popover.story.d.ts +23 -0
  416. package/lib/types/context-menu/stories/context-menu-nested.story.d.ts +23 -0
  417. package/lib/types/context-menu/stories/context-menu-placements.story.d.ts +23 -0
  418. package/lib/types/context-menu/stories/context-menu-with-disabled-item.story.d.ts +23 -0
  419. package/lib/types/context-menu/stories/context-menu-with-divider.story.d.ts +23 -0
  420. package/lib/types/context-menu/stories/context-menu-with-header.story.d.ts +23 -0
  421. package/lib/types/context-menu/stories/context-menu-with-icon.story.d.ts +23 -0
  422. package/lib/types/context-menu/stories/context-menu.stories.d.ts +34 -0
  423. package/lib/types/context-menu/stories/index.d.ts +40 -0
  424. package/lib/types/drawer/stories/drawer-full.story.d.ts +23 -0
  425. package/lib/types/drawer/stories/drawer-not-closeable.story.d.ts +23 -0
  426. package/lib/types/drawer/stories/drawer-overlay.story.d.ts +23 -0
  427. package/lib/types/drawer/stories/drawer-portaled.story.d.ts +23 -0
  428. package/lib/types/drawer/stories/drawer-push.story.d.ts +22 -0
  429. package/lib/types/drawer/stories/drawer-resizable.story.d.ts +23 -0
  430. package/lib/types/drawer/stories/drawer-right-side.story.d.ts +23 -0
  431. package/lib/types/drawer/stories/drawer-scrollable.story.d.ts +23 -0
  432. package/lib/types/drawer/stories/drawer.stories.d.ts +62 -0
  433. package/lib/types/drawer/stories/index.d.ts +36 -0
  434. package/lib/types/graph-label/stories/graph-label-color.story.d.ts +23 -0
  435. package/lib/types/graph-label/stories/graph-label-disabled.story.d.ts +23 -0
  436. package/lib/types/graph-label/stories/graph-label-fluid.story.d.ts +23 -0
  437. package/lib/types/graph-label/stories/graph-label-non-interactive.story.d.ts +23 -0
  438. package/lib/types/graph-label/stories/graph-label-selected.story.d.ts +23 -0
  439. package/lib/types/graph-label/stories/graph-label-sizes.story.d.ts +23 -0
  440. package/lib/types/graph-label/stories/graph-label-types.story.d.ts +23 -0
  441. package/lib/types/graph-label/stories/graph-label.stories.d.ts +32 -0
  442. package/lib/types/graph-label/stories/index.d.ts +34 -0
  443. package/lib/types/label/stories/index.d.ts +28 -0
  444. package/lib/types/label/stories/label-colors.story.d.ts +23 -0
  445. package/lib/types/label/stories/label-default.story.d.ts +23 -0
  446. package/lib/types/label/stories/label-fills.story.d.ts +23 -0
  447. package/lib/types/label/stories/label-with-icons.story.d.ts +23 -0
  448. package/lib/types/label/stories/label.stories.d.ts +29 -0
  449. package/lib/types/loading-bar/stories/index.d.ts +24 -0
  450. package/lib/types/loading-bar/stories/loading-bar-default.story.d.ts +23 -0
  451. package/lib/types/loading-bar/stories/loading-bar-with-rail.story.d.ts +23 -0
  452. package/lib/types/loading-bar/stories/loading-bar.stories.d.ts +27 -0
  453. package/lib/types/loading-spinner/stories/index.d.ts +24 -0
  454. package/lib/types/loading-spinner/stories/loading-spinner-default.story.d.ts +23 -0
  455. package/lib/types/loading-spinner/stories/loading-spinner-sizes.story.d.ts +23 -0
  456. package/lib/types/loading-spinner/stories/loading-spinner.stories.d.ts +27 -0
  457. package/lib/types/segmented-control/stories/index.d.ts +28 -0
  458. package/lib/types/segmented-control/stories/segmented-control-default.story.d.ts +23 -0
  459. package/lib/types/segmented-control/stories/segmented-control-floating.story.d.ts +23 -0
  460. package/lib/types/segmented-control/stories/segmented-control-only-icons.story.d.ts +23 -0
  461. package/lib/types/segmented-control/stories/segmented-control-sizes.story.d.ts +23 -0
  462. package/lib/types/segmented-control/stories/segmented-control.stories.d.ts +29 -0
  463. package/lib/types/slider/stories/index.d.ts +10 -0
  464. package/lib/types/slider/stories/slider-custom-step-length.story.d.ts +23 -0
  465. package/lib/types/slider/stories/slider-default.story.d.ts +23 -0
  466. package/lib/types/slider/stories/slider-disabled.story.d.ts +23 -0
  467. package/lib/types/slider/stories/slider-show-steps.story.d.ts +23 -0
  468. package/lib/types/slider/stories/slider-show-values.story.d.ts +23 -0
  469. package/lib/types/slider/stories/slider-single.story.d.ts +1 -0
  470. package/lib/types/slider/stories/slider.stories.d.ts +7 -1
  471. package/lib/types/status-indicator/stories/index.d.ts +22 -0
  472. package/lib/types/status-indicator/stories/status-indicator-types.story.d.ts +23 -0
  473. package/lib/types/status-indicator/stories/status-indicator.stories.d.ts +26 -0
  474. package/lib/types/toast/Toast.d.ts +9 -1
  475. package/lib/types/toast/ToastControlled.d.ts +40 -0
  476. package/lib/types/toast/index.d.ts +1 -0
  477. package/lib/types/toast/stories/index.d.ts +36 -0
  478. package/lib/types/toast/stories/toast-action-story.d.ts +23 -0
  479. package/lib/types/toast/stories/toast-closeable-story.d.ts +23 -0
  480. package/lib/types/toast/stories/toast-controlled-story.d.ts +23 -0
  481. package/lib/types/toast/stories/toast-custom-story.d.ts +23 -0
  482. package/lib/types/toast/stories/toast-danger-story.d.ts +23 -0
  483. package/lib/types/toast/stories/toast-neutral-story.d.ts +23 -0
  484. package/lib/types/toast/stories/toast-progress-bar.d.ts +23 -0
  485. package/lib/types/toast/stories/toast-success-story.d.ts +23 -0
  486. package/lib/types/toast/stories/toast.stories.d.ts +38 -0
  487. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
3
  *
4
4
  * Copyright (c) "Neo4j"
@@ -19,13 +19,56 @@ import { jsx as _jsx } from "react/jsx-runtime";
19
19
  * You should have received a copy of the GNU General Public License
20
20
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
- import { useState } from 'react';
23
- import { Slider } from '../../slider'; // Get base props
22
+ import { Slider, TextInput } from '@neo4j-ndl/react';
23
+ import { useCallback, useState } from 'react';
24
+ const MIN_VALUE = 0;
25
+ const MAX_VALUE = 100;
26
+ const STEP = 5;
27
+ const INITIAL_VALUE = 50;
28
+ const getValidationError = (input) => {
29
+ const trimmed = input.trim();
30
+ if (!trimmed) {
31
+ return { error: 'Value is required', isValid: false };
32
+ }
33
+ const numValue = Number(trimmed);
34
+ if (isNaN(numValue)) {
35
+ return { error: 'Please enter a valid number', isValid: false };
36
+ }
37
+ if (!Number.isInteger(numValue)) {
38
+ return { error: 'Please enter a whole number', isValid: false };
39
+ }
40
+ if (numValue < MIN_VALUE) {
41
+ return { error: `Value must be at least ${MIN_VALUE}`, isValid: false };
42
+ }
43
+ if (numValue > MAX_VALUE) {
44
+ return { error: `Value must be at most ${MAX_VALUE}`, isValid: false };
45
+ }
46
+ return { error: undefined, isValid: true };
47
+ };
24
48
  const Component = () => {
25
- const [value, setValue] = useState(100);
26
- return (_jsx(Slider, { type: "single", value: value, onChange: (newValue) => {
27
- setValue(newValue);
28
- }, minValue: 0, maxValue: 200, isDisabled: false, step: 10, showSteps: true, showValues: true, inputProps: { 'aria-valuetext': 'percent' } }));
49
+ const [value, setValue] = useState(INITIAL_VALUE);
50
+ const [inputValue, setInputValue] = useState(String(INITIAL_VALUE));
51
+ const { error, isValid } = getValidationError(inputValue);
52
+ const hasError = !isValid;
53
+ const handleInputChange = useCallback((e) => {
54
+ const newInputValue = e.target.value;
55
+ setInputValue(newInputValue);
56
+ if (isValid) {
57
+ setValue(Number(newInputValue));
58
+ }
59
+ }, [setInputValue, setValue, isValid]);
60
+ const handleSliderChange = useCallback((newValue) => {
61
+ setValue(newValue);
62
+ setInputValue(String(newValue));
63
+ }, [setInputValue, setValue]);
64
+ return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-6", children: [_jsx(TextInput, { label: "Slider value", helpText: `Enter a value between ${MIN_VALUE} and ${MAX_VALUE}`, isRequired: true, errorText: error, htmlAttributes: {
65
+ max: MAX_VALUE,
66
+ min: MIN_VALUE,
67
+ step: STEP,
68
+ type: 'number',
69
+ }, value: inputValue, onChange: handleInputChange }), _jsx(Slider, { type: "single", value: value, onChange: handleSliderChange, minValue: MIN_VALUE, maxValue: MAX_VALUE, step: STEP, showSteps: true, showValues: true, isDisabled: hasError, inputProps: {
70
+ 'aria-valuetext': `${value} out of ${MAX_VALUE}`,
71
+ } })] }));
29
72
  };
30
73
  export default Component;
31
74
  //# sourceMappingURL=slider-single-controlled.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider-single-controlled.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC,CAAC,iBAAiB;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC,EACD,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"slider-single-controlled.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,IAAI,GAAG,CAAC,CAAC;AACf,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,MAAM,kBAAkB,GAAG,CACzB,KAAa,EAC4D,EAAE;IAC3E,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAE7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClE,CAAC;IAED,IAAI,QAAQ,GAAG,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,0BAA0B,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1E,CAAC;IAED,IAAI,QAAQ,GAAG,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,yBAAyB,SAAS,EAAE,EAAE,OAAO,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oBACd,GAAG,EAAE,SAAS;oBACd,IAAI,EAAE,IAAI;oBACV,IAAI,EAAE,QAAQ;iBACf,EACD,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,iBAAiB,GAC3B,EAEF,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,IAAI,EACV,SAAS,QACT,UAAU,QACV,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE;oBACV,gBAAgB,EAAE,GAAG,KAAK,WAAW,SAAS,EAAE;iBACjD,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -19,7 +19,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
19
19
  * You should have received a copy of the GNU General Public License
20
20
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
- import { Slider } from '../../slider'; // Get base props
22
+ import { Slider } from '@neo4j-ndl/react';
23
23
  const Component = () => {
24
24
  return (_jsx(Slider, { type: "single", value: 100, onChange: (newValue) => {
25
25
  console.info('onChange', newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"slider-single.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC,CAAC,iBAAiB;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACrC,CAAC,EACD,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"slider-single.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACrC,CAAC,EACD,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  /**
2
3
  *
3
4
  * Copyright (c) "Neo4j"
@@ -18,10 +19,8 @@
18
19
  * You should have received a copy of the GNU General Public License
19
20
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21
  */
21
-
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { Slider } from '../Slider';
24
- import { SliderRangeDemo, SliderRangeSource, SliderSingleControlledDemo, SliderSingleControlledSource, SliderSingleDemo, SliderSingleSource, } from '.';
22
+ import { Slider } from '@neo4j-ndl/react';
23
+ import { SliderCustomStepLengthDemo, SliderCustomStepLengthSource, SliderDefaultDemo, SliderDefaultSource, SliderDisabledDemo, SliderDisabledSource, SliderRangeDemo, SliderRangeSource, SliderShowStepsDemo, SliderShowStepsSource, SliderShowValuesDemo, SliderShowValuesSource, SliderSingleControlledDemo, SliderSingleControlledSource, SliderSingleDemo, SliderSingleSource, } from '.';
25
24
  const componentMeta = {
26
25
  component: Slider,
27
26
  parameters: {
@@ -32,6 +31,20 @@ const componentMeta = {
32
31
  id: 'components-slider',
33
32
  };
34
33
  export default componentMeta;
34
+ export const Default = {
35
+ // @ts-expect-error The args from the full story are not actually used but we get a type issue here
36
+ args: {},
37
+ parameters: {
38
+ docs: {
39
+ source: {
40
+ code: SliderDefaultSource,
41
+ language: 'tsx',
42
+ type: 'code',
43
+ },
44
+ },
45
+ },
46
+ render: () => _jsx(SliderDefaultDemo, {}),
47
+ };
35
48
  export const Single = {
36
49
  // @ts-expect-error The args from the full story are not actually used but we get a type issue here
37
50
  args: {},
@@ -74,4 +87,60 @@ export const SingleControlled = {
74
87
  },
75
88
  render: () => _jsx(SliderSingleControlledDemo, {}),
76
89
  };
90
+ export const Disabled = {
91
+ // @ts-expect-error The args from the full story are not actually used but we get a type issue here
92
+ args: {},
93
+ parameters: {
94
+ docs: {
95
+ source: {
96
+ code: SliderDisabledSource,
97
+ language: 'tsx',
98
+ type: 'code',
99
+ },
100
+ },
101
+ },
102
+ render: () => _jsx(SliderDisabledDemo, {}),
103
+ };
104
+ export const ShowSteps = {
105
+ // @ts-expect-error The args from the full story are not actually used but we get a type issue here
106
+ args: {},
107
+ parameters: {
108
+ docs: {
109
+ source: {
110
+ code: SliderShowStepsSource,
111
+ language: 'tsx',
112
+ type: 'code',
113
+ },
114
+ },
115
+ },
116
+ render: () => _jsx(SliderShowStepsDemo, {}),
117
+ };
118
+ export const ShowValues = {
119
+ // @ts-expect-error The args from the full story are not actually used but we get a type issue here
120
+ args: {},
121
+ parameters: {
122
+ docs: {
123
+ source: {
124
+ code: SliderShowValuesSource,
125
+ language: 'tsx',
126
+ type: 'code',
127
+ },
128
+ },
129
+ },
130
+ render: () => _jsx(SliderShowValuesDemo, {}),
131
+ };
132
+ export const CustomStepLength = {
133
+ // @ts-expect-error The args from the full story are not actually used but we get a type issue here
134
+ args: {},
135
+ parameters: {
136
+ docs: {
137
+ source: {
138
+ code: SliderCustomStepLengthSource,
139
+ language: 'tsx',
140
+ type: 'code',
141
+ },
142
+ },
143
+ },
144
+ render: () => _jsx(SliderCustomStepLengthDemo, {}),
145
+ };
77
146
  //# sourceMappingURL=slider.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.stories.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;CACM,CAAC;AAEhC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,mGAAmG;IACnG,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,GAAG,EAAE,CAAC,KAAC,gBAAgB,KAAG;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,eAAe,KAAG;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,0BAA0B,KAAG;CAC7C,CAAC"}
1
+ {"version":3,"file":"slider.stories.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;CACM,CAAC;AAEhC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;I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AAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,kBAAkB,KAAG;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,mGAAmG;IACnG,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,GAAG,EAAE,CAAC,KAAC,mBAAmB,KAAG;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,oBAAoB,KAAG;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,0BAA0B,KAAG;CAC7C,CAAC"}
@@ -0,0 +1,25 @@
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 StatusIndicatorTypes } from './status-indicator-types.story';
22
+ import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
23
+ import StatusIndicatorTypesSourceRaw from './status-indicator-types.story?raw';
24
+ export const StatusIndicatorTypesSource = removeLicenseHeader(StatusIndicatorTypesSourceRaw);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAE/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC"}
@@ -0,0 +1,28 @@
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 { StatusIndicator, Typography } from '@neo4j-ndl/react';
24
+ const Component = () => {
25
+ return (_jsxs("div", { className: "n-flex n-gap-token-6", children: [_jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "unknown" }), _jsx(Typography, { variant: "label", children: "Unknown" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "success" }), _jsx(Typography, { variant: "label", children: "Success" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "info" }), _jsx(Typography, { variant: "label", children: "Info" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "warning" }), _jsx(Typography, { variant: "label", children: "Warning" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4 ", children: [_jsx(StatusIndicator, { type: "danger" }), _jsx(Typography, { variant: "label", children: "Danger" })] })] }));
26
+ };
27
+ export default Component;
28
+ //# sourceMappingURL=status-indicator-types.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-indicator-types.story.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator-types.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,MAAM,GAAG,EAC/B,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,qBAAkB,IACzC,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,mDAAmD,aAChE,KAAC,eAAe,IAAC,IAAI,EAAC,QAAQ,GAAG,EACjC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,51 @@
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 { jsx as _jsx } from "react/jsx-runtime";
23
+ import { StatusIndicator } from '../../index';
24
+ import { StatusIndicatorTypes, StatusIndicatorTypesSource } from '.';
25
+ const componentMeta = {
26
+ title: 'Components/Status Indicator',
27
+ id: 'components-status-indicator',
28
+ component: StatusIndicator,
29
+ tags: ['docsPage'],
30
+ parameters: {
31
+ controls: { disable: true },
32
+ },
33
+ decorators: [
34
+ (Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
35
+ ],
36
+ };
37
+ export default componentMeta;
38
+ export const Types = {
39
+ args: {},
40
+ render: StatusIndicatorTypes,
41
+ parameters: {
42
+ docs: {
43
+ source: {
44
+ language: 'tsx',
45
+ type: 'code',
46
+ code: StatusIndicatorTypesSource,
47
+ },
48
+ },
49
+ },
50
+ };
51
+ //# sourceMappingURL=status-indicator.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAErE,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,6BAA6B;IACpC,EAAE,EAAE,6BAA6B;IACjC,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC"}
@@ -50,9 +50,13 @@ function onCloseCallback(callback, id) {
50
50
  delete sonnerToast.needle[id];
51
51
  }
52
52
  }
53
- const Toast = React.forwardRef(function Toast({ icon, id, text, variant, isCloseable, onClose, actionLabel, onAction, shouldCloseOnAction, initialProgressBarValue, htmlAttributes, }, ref) {
53
+ const Toast = React.forwardRef(function Toast({ icon, id, text, variant, isCloseable, onClose, actionLabel, onAction, shouldCloseOnAction, initialProgressBarValue, isControlled, htmlAttributes, }, ref) {
54
54
  const isProgressBar = variant === 'progress-bar';
55
55
  const handleOnClose = (event) => {
56
+ if (isControlled) {
57
+ onCloseCallback(onClose, id);
58
+ return;
59
+ }
56
60
  const shouldTrigger = (event.type === 'keydown' &&
57
61
  event.key === 'Enter') ||
58
62
  event.key === 'Space' ||
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/toast/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAEL,KAAK,IAAI,WAAW,EACpB,OAAO,IAAI,aAAa,GAGzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAsE9C,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACtC,MAAM,EACJ,QAAQ,GAAG,aAAa,EACxB,a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, 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 } 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 { useEffect, useState } from 'react';
34
+ import { toast, Toaster } from './Toast';
35
+ const toastWithVariant = (input) => {
36
+ const commonRootProps = {
37
+ actionLabel: input.actionLabel,
38
+ isCloseable: input.onClose !== undefined,
39
+ isControlled: true,
40
+ onAction(id) {
41
+ var _a;
42
+ (_a = input.onAction) === null || _a === void 0 ? void 0 : _a.call(input, id);
43
+ },
44
+ onClose(id) {
45
+ var _a;
46
+ (_a = input.onClose) === null || _a === void 0 ? void 0 : _a.call(input, id);
47
+ },
48
+ shouldAutoClose: false,
49
+ shouldCloseOnAction: false,
50
+ };
51
+ const commonSonnerProps = {
52
+ dismissible: false,
53
+ id: input.id,
54
+ };
55
+ switch (input.variant) {
56
+ case 'neutral':
57
+ return toast.neutral(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
58
+ case 'success':
59
+ return toast.success(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
60
+ case 'danger':
61
+ return toast.danger(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
62
+ case 'progress-bar':
63
+ return toast.progressBar(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps, initialProgressBarValue: input.progressBarValue }));
64
+ }
65
+ };
66
+ export const ToasterControlled = (_a) => {
67
+ var { toasts } = _a, restProps = __rest(_a, ["toasts"]);
68
+ const [toastsState, setToastsState] = useState([]);
69
+ useEffect(() => {
70
+ // if a toast is removed, close it
71
+ const removedToasts = toastsState.filter((toast) => !toasts.some((t) => t.id === toast.id));
72
+ removedToasts.forEach((removedToast) => {
73
+ toast.close(removedToast.id);
74
+ });
75
+ // Otherwise, update the toast or create a new one
76
+ for (const toast of toasts) {
77
+ toastWithVariant(toast);
78
+ }
79
+ setToastsState(toasts);
80
+ }, [toasts, toastsState]);
81
+ return _jsx(Toaster, Object.assign({ visibleToasts: 1 }, restProps));
82
+ };
83
+ //# sourceMappingURL=ToastControlled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastControlled.js","sourceRoot":"","sources":["../../../src/toast/ToastControlled.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAoC,MAAM,SAAS,CAAC;AAsB3E,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,MAAM,eAAe,GAAG;QACtB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,KAAK,SAAS;QACxC,YAAY,EAAE,IAAI;QAClB,QAAQ,CAAC,EAAW;;YAClB,MAAA,KAAK,CAAC,QAAQ,s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AC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAClD,CAAC;QACF,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YACrC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,kDAAkD;QAClD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QAED,cAAc,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1B,OAAO,KAAC,OAAO,kBAAC,aAAa,EAAE,CAAC,IAAM,SAAS,EAAI,CAAC;AACtD,CAAC,CAAC"}
@@ -19,4 +19,5 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  export * from './Toast';
22
+ export * from './ToastControlled';
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,46 @@
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 ToastNeutral } from './toast-neutral-story';
22
+ export { default as ToastSuccess } from './toast-success-story';
23
+ export { default as ToastDanger } from './toast-danger-story';
24
+ export { default as ToastAction } from './toast-action-story';
25
+ export { default as ToastCloseable } from './toast-closeable-story';
26
+ export { default as ToastProgressBar } from './toast-progress-bar';
27
+ export { default as ToastCustom } from './toast-custom-story';
28
+ export { default as ToastControlled } from './toast-controlled-story';
29
+ import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
30
+ import ToastActionSrcRaw from './toast-action-story?raw';
31
+ import ToastCloseableSrcRaw from './toast-closeable-story?raw';
32
+ import ToastControlledSrcRaw from './toast-controlled-story?raw';
33
+ import ToastCustomSrcRaw from './toast-custom-story?raw';
34
+ import ToastDangerSrcRaw from './toast-danger-story?raw';
35
+ import ToastNeutralSrcRaw from './toast-neutral-story?raw';
36
+ import ToastProgressBarSrcRaw from './toast-progress-bar?raw';
37
+ import ToastSuccessSrcRaw from './toast-success-story?raw';
38
+ export const ToastNeutralSrc = removeLicenseHeader(ToastNeutralSrcRaw);
39
+ export const ToastSuccessSrc = removeLicenseHeader(ToastSuccessSrcRaw);
40
+ export const ToastDangerSrc = removeLicenseHeader(ToastDangerSrcRaw);
41
+ export const ToastActionSrc = removeLicenseHeader(ToastActionSrcRaw);
42
+ export const ToastCloseableSrc = removeLicenseHeader(ToastCloseableSrcRaw);
43
+ export const ToastProgressBarSrc = removeLicenseHeader(ToastProgressBarSrcRaw);
44
+ export const ToastCustomSrc = removeLicenseHeader(ToastCustomSrcRaw);
45
+ export const ToastControlledSrc = removeLicenseHeader(ToastControlledSrcRaw);
46
+ //#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AiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,36 @@
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 { Button, toast, Toaster } from '@neo4j-ndl/react';
24
+ const Component = () => {
25
+ return (_jsxs("div", { className: "n-flex n-flex-row n-justify-center", children: [_jsx(Toaster, {}), _jsx(Button, { onClick: () => {
26
+ toast.neutral('Hello', {
27
+ actionLabel: 'Action',
28
+ shouldCloseOnAction: true,
29
+ onAction: () => {
30
+ console.info('action');
31
+ },
32
+ });
33
+ }, children: "Press to show a Toast" })] }));
34
+ };
35
+ export default Component;
36
+ //# sourceMappingURL=toast-action-story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast-action-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-action-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAEjD,KAAC,OAAO,KAAG,EACX,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,QAAQ;wBACrB,mBAAmB,EAAE,IAAI;wBACzB,QAAQ,EAAE,GAAG,EAAE;4BACb,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBACzB,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGM,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,35 @@
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 { Button, toast, Toaster } from '@neo4j-ndl/react';
24
+ const Component = () => {
25
+ return (_jsxs("div", { className: "n-flex n-justify-center", children: [_jsx(Toaster, {}), _jsx(Button, { onClick: () => {
26
+ toast.neutral('Hello', {
27
+ isCloseable: true,
28
+ onClose: () => {
29
+ console.info('close');
30
+ },
31
+ });
32
+ }, children: "Press to show a Toast" })] }));
33
+ };
34
+ export default Component;
35
+ //# sourceMappingURL=toast-closeable-story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast-closeable-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-closeable-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aAEtC,KAAC,OAAO,KAAG,EACX,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,IAAI;wBACjB,OAAO,EAAE,GAAG,EAAE;4BACZ,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxB,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGM,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}