@neo4j-ndl/react 4.24.2 → 4.25.1

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 (454) hide show
  1. package/lib/cjs/_common/form-control/FormFieldLabel.js +1 -1
  2. package/lib/cjs/_common/form-control/FormFieldLabel.js.map +1 -1
  3. package/lib/cjs/_common/form-control/FormFieldMessage.js +1 -1
  4. package/lib/cjs/_common/form-control/FormFieldMessage.js.map +1 -1
  5. package/lib/cjs/_common/form-control/form-control-types.js +1 -1
  6. package/lib/cjs/_common/form-control/form-control-types.js.map +1 -1
  7. package/lib/cjs/_common/form-control/form-field-group-context.js +32 -0
  8. package/lib/cjs/_common/form-control/form-field-group-context.js.map +1 -0
  9. package/lib/cjs/_common/form-control/index.js +5 -2
  10. package/lib/cjs/_common/form-control/index.js.map +1 -1
  11. package/lib/cjs/_common/form-control/use-form-field.js +1 -1
  12. package/lib/cjs/_common/form-control/use-form-field.js.map +1 -1
  13. package/lib/cjs/_common/form-control/use-inline-field-label.js +1 -1
  14. package/lib/cjs/_common/form-control/use-inline-field-label.js.map +1 -1
  15. package/lib/cjs/_generated/style-rules/color-utils.js +1 -1
  16. package/lib/cjs/_generated/style-rules/numeric-utils.js +1 -1
  17. package/lib/cjs/accordion/accordion-types.js +1 -1
  18. package/lib/cjs/announcement-banner/AnnouncementBanner.js +1 -1
  19. package/lib/cjs/announcement-banner/AnnouncementBanner.js.map +1 -1
  20. package/lib/cjs/announcement-banner/index.js +1 -1
  21. package/lib/cjs/announcement-banner/index.js.map +1 -1
  22. package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js +1 -1
  23. package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -1
  24. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
  25. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
  26. package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js +1 -1
  27. package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js.map +1 -1
  28. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
  29. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
  30. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
  31. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
  32. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
  33. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
  34. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
  35. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
  36. package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js +1 -1
  37. package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -1
  38. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
  39. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
  40. package/lib/cjs/announcement-banner/stories/index.js +1 -1
  41. package/lib/cjs/announcement-banner/stories/index.js.map +1 -1
  42. package/lib/cjs/box/Box.js +1 -1
  43. package/lib/cjs/checkbox/Checkbox.js +6 -3
  44. package/lib/cjs/checkbox/Checkbox.js.map +1 -1
  45. package/lib/cjs/checkbox-group/CheckboxGroup.js +52 -0
  46. package/lib/cjs/checkbox-group/CheckboxGroup.js.map +1 -0
  47. package/lib/cjs/checkbox-group/index.js +26 -0
  48. package/lib/cjs/checkbox-group/index.js.map +1 -0
  49. package/lib/cjs/checkbox-group/stories/checkbox-group-default.story.js +30 -0
  50. package/lib/cjs/checkbox-group/stories/checkbox-group-default.story.js.map +1 -0
  51. package/lib/cjs/checkbox-group/stories/checkbox-group-disabled.story.js +30 -0
  52. package/lib/cjs/checkbox-group/stories/checkbox-group-disabled.story.js.map +1 -0
  53. package/lib/cjs/checkbox-group/stories/checkbox-group-error.story.js +30 -0
  54. package/lib/cjs/checkbox-group/stories/checkbox-group-error.story.js.map +1 -0
  55. package/lib/cjs/checkbox-group/stories/checkbox-group-optional.story.js +30 -0
  56. package/lib/cjs/checkbox-group/stories/checkbox-group-optional.story.js.map +1 -0
  57. package/lib/cjs/checkbox-group/stories/checkbox-group-required.story.js +30 -0
  58. package/lib/cjs/checkbox-group/stories/checkbox-group-required.story.js.map +1 -0
  59. package/lib/cjs/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js +30 -0
  60. package/lib/cjs/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js.map +1 -0
  61. package/lib/cjs/checkbox-group/stories/index.js +52 -0
  62. package/lib/cjs/checkbox-group/stories/index.js.map +1 -0
  63. package/lib/cjs/clean-icon-button/CleanIconButton.js +1 -1
  64. package/lib/cjs/data-grid/DataGrid.js +1 -1
  65. package/lib/cjs/data-grid/data-grid-context.js +1 -1
  66. package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
  67. package/lib/cjs/data-grid/helpers/index.js +1 -1
  68. package/lib/cjs/data-grid/stories/staticData.js +1 -1
  69. package/lib/cjs/dismissible-tag/DismissibleTag.js +1 -1
  70. package/lib/cjs/fieldset/Fieldset.js +78 -0
  71. package/lib/cjs/fieldset/Fieldset.js.map +1 -0
  72. package/lib/cjs/fieldset/index.js +26 -0
  73. package/lib/cjs/fieldset/index.js.map +1 -0
  74. package/lib/cjs/fieldset/stories/fieldset-default.story.js +30 -0
  75. package/lib/cjs/fieldset/stories/fieldset-default.story.js.map +1 -0
  76. package/lib/cjs/fieldset/stories/fieldset-disabled.story.js +30 -0
  77. package/lib/cjs/fieldset/stories/fieldset-disabled.story.js.map +1 -0
  78. package/lib/cjs/fieldset/stories/fieldset-error.story.js +30 -0
  79. package/lib/cjs/fieldset/stories/fieldset-error.story.js.map +1 -0
  80. package/lib/cjs/fieldset/stories/fieldset-optional.story.js +30 -0
  81. package/lib/cjs/fieldset/stories/fieldset-optional.story.js.map +1 -0
  82. package/lib/cjs/fieldset/stories/fieldset-required.story.js +30 -0
  83. package/lib/cjs/fieldset/stories/fieldset-required.story.js.map +1 -0
  84. package/lib/cjs/fieldset/stories/fieldset-visually-hidden-label.story.js +30 -0
  85. package/lib/cjs/fieldset/stories/fieldset-visually-hidden-label.story.js.map +1 -0
  86. package/lib/cjs/fieldset/stories/index.js +52 -0
  87. package/lib/cjs/fieldset/stories/index.js.map +1 -0
  88. package/lib/cjs/filled-button/FilledButton.js +1 -1
  89. package/lib/cjs/icon-button/IconButton.js +1 -1
  90. package/lib/cjs/icons/generated/custom/FloppyDiskArrowTopRight.js +1 -1
  91. package/lib/cjs/icons/generated/custom/FloppyDiskArrowTopRight.js.map +1 -1
  92. package/lib/cjs/index.js +8 -2
  93. package/lib/cjs/index.js.map +1 -1
  94. package/lib/cjs/kbd/kbd-utils.js +1 -1
  95. package/lib/cjs/logo/Logo.js +1 -1
  96. package/lib/cjs/outlined-button/OutlinedButton.js +1 -1
  97. package/lib/cjs/radio/Radio.js +16 -3
  98. package/lib/cjs/radio/Radio.js.map +1 -1
  99. package/lib/cjs/radio-group/RadioGroup.js +62 -0
  100. package/lib/cjs/radio-group/RadioGroup.js.map +1 -0
  101. package/lib/cjs/radio-group/index.js +26 -0
  102. package/lib/cjs/radio-group/index.js.map +1 -0
  103. package/lib/cjs/radio-group/stories/index.js +60 -0
  104. package/lib/cjs/radio-group/stories/index.js.map +1 -0
  105. package/lib/cjs/radio-group/stories/radio-group-controlled.story.js +32 -0
  106. package/lib/cjs/radio-group/stories/radio-group-controlled.story.js.map +1 -0
  107. package/lib/cjs/radio-group/stories/radio-group-default.story.js +30 -0
  108. package/lib/cjs/radio-group/stories/radio-group-default.story.js.map +1 -0
  109. package/lib/cjs/radio-group/stories/radio-group-disabled.story.js +30 -0
  110. package/lib/cjs/radio-group/stories/radio-group-disabled.story.js.map +1 -0
  111. package/lib/cjs/radio-group/stories/radio-group-error.story.js +30 -0
  112. package/lib/cjs/radio-group/stories/radio-group-error.story.js.map +1 -0
  113. package/lib/cjs/radio-group/stories/radio-group-horizontal.story.js +30 -0
  114. package/lib/cjs/radio-group/stories/radio-group-horizontal.story.js.map +1 -0
  115. package/lib/cjs/radio-group/stories/radio-group-optional.story.js +30 -0
  116. package/lib/cjs/radio-group/stories/radio-group-optional.story.js.map +1 -0
  117. package/lib/cjs/radio-group/stories/radio-group-required.story.js +30 -0
  118. package/lib/cjs/radio-group/stories/radio-group-required.story.js.map +1 -0
  119. package/lib/cjs/radio-group/stories/radio-group-visually-hidden-label.story.js +30 -0
  120. package/lib/cjs/radio-group/stories/radio-group-visually-hidden-label.story.js.map +1 -0
  121. package/lib/cjs/read-only-tag/ReadOnlyTag.js +1 -1
  122. package/lib/cjs/select/Select.js +10 -7
  123. package/lib/cjs/select/Select.js.map +1 -1
  124. package/lib/cjs/select/stories/index.js +5 -1
  125. package/lib/cjs/select/stories/index.js.map +1 -1
  126. package/lib/cjs/select/stories/select-required.story.js +39 -0
  127. package/lib/cjs/select/stories/select-required.story.js.map +1 -0
  128. package/lib/cjs/select/types.js +1 -1
  129. package/lib/cjs/select/types.js.map +1 -1
  130. package/lib/cjs/spotlight/SpotlightTour.js +1 -1
  131. package/lib/cjs/text-button/TextButton.js +1 -1
  132. package/lib/cjs/tree-view/TreeViewItem.js +1 -1
  133. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  134. package/lib/cjs/tree-view/TreeViewTrail.js +1 -1
  135. package/lib/cjs/tree-view/tree-view-types.js +1 -1
  136. package/lib/cjs/tree-view/tree-view-utils.js +1 -1
  137. package/lib/cjs/typography/Typography.js +1 -1
  138. package/lib/esm/_common/form-control/FormFieldLabel.js +1 -1
  139. package/lib/esm/_common/form-control/FormFieldLabel.js.map +1 -1
  140. package/lib/esm/_common/form-control/FormFieldMessage.js +1 -1
  141. package/lib/esm/_common/form-control/FormFieldMessage.js.map +1 -1
  142. package/lib/esm/_common/form-control/form-control-types.js +1 -1
  143. package/lib/esm/_common/form-control/form-control-types.js.map +1 -1
  144. package/lib/esm/_common/form-control/form-field-group-context.js +28 -0
  145. package/lib/esm/_common/form-control/form-field-group-context.js.map +1 -0
  146. package/lib/esm/_common/form-control/index.js +2 -1
  147. package/lib/esm/_common/form-control/index.js.map +1 -1
  148. package/lib/esm/_common/form-control/use-form-field.js +1 -1
  149. package/lib/esm/_common/form-control/use-form-field.js.map +1 -1
  150. package/lib/esm/_common/form-control/use-inline-field-label.js +1 -1
  151. package/lib/esm/_common/form-control/use-inline-field-label.js.map +1 -1
  152. package/lib/esm/_generated/style-rules/color-utils.js +1 -1
  153. package/lib/esm/_generated/style-rules/numeric-utils.js +1 -1
  154. package/lib/esm/accordion/accordion-types.js +1 -1
  155. package/lib/esm/announcement-banner/AnnouncementBanner.js +1 -1
  156. package/lib/esm/announcement-banner/AnnouncementBanner.js.map +1 -1
  157. package/lib/esm/announcement-banner/index.js +1 -1
  158. package/lib/esm/announcement-banner/index.js.map +1 -1
  159. package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js +1 -1
  160. package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -1
  161. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
  162. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
  163. package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js +1 -1
  164. package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js.map +1 -1
  165. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
  166. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
  167. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
  168. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
  169. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
  170. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
  171. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
  172. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
  173. package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js +1 -1
  174. package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -1
  175. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
  176. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
  177. package/lib/esm/announcement-banner/stories/index.js +1 -1
  178. package/lib/esm/announcement-banner/stories/index.js.map +1 -1
  179. package/lib/esm/box/Box.js +1 -1
  180. package/lib/esm/checkbox/Checkbox.js +7 -4
  181. package/lib/esm/checkbox/Checkbox.js.map +1 -1
  182. package/lib/esm/checkbox-group/CheckboxGroup.js +49 -0
  183. package/lib/esm/checkbox-group/CheckboxGroup.js.map +1 -0
  184. package/lib/esm/checkbox-group/index.js +22 -0
  185. package/lib/esm/checkbox-group/index.js.map +1 -0
  186. package/lib/esm/checkbox-group/stories/checkbox-group-default.story.js +28 -0
  187. package/lib/esm/checkbox-group/stories/checkbox-group-default.story.js.map +1 -0
  188. package/lib/esm/checkbox-group/stories/checkbox-group-disabled.story.js +28 -0
  189. package/lib/esm/checkbox-group/stories/checkbox-group-disabled.story.js.map +1 -0
  190. package/lib/esm/checkbox-group/stories/checkbox-group-error.story.js +28 -0
  191. package/lib/esm/checkbox-group/stories/checkbox-group-error.story.js.map +1 -0
  192. package/lib/esm/checkbox-group/stories/checkbox-group-optional.story.js +28 -0
  193. package/lib/esm/checkbox-group/stories/checkbox-group-optional.story.js.map +1 -0
  194. package/lib/esm/checkbox-group/stories/checkbox-group-required.story.js +28 -0
  195. package/lib/esm/checkbox-group/stories/checkbox-group-required.story.js.map +1 -0
  196. package/lib/esm/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js +28 -0
  197. package/lib/esm/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js.map +1 -0
  198. package/lib/esm/checkbox-group/stories/index.js +40 -0
  199. package/lib/esm/checkbox-group/stories/index.js.map +1 -0
  200. package/lib/esm/clean-icon-button/CleanIconButton.js +1 -1
  201. package/lib/esm/data-grid/DataGrid.js +1 -1
  202. package/lib/esm/data-grid/data-grid-context.js +1 -1
  203. package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
  204. package/lib/esm/data-grid/helpers/index.js +1 -1
  205. package/lib/esm/data-grid/stories/staticData.js +1 -1
  206. package/lib/esm/dismissible-tag/DismissibleTag.js +1 -1
  207. package/lib/esm/fieldset/Fieldset.js +71 -0
  208. package/lib/esm/fieldset/Fieldset.js.map +1 -0
  209. package/lib/esm/fieldset/index.js +22 -0
  210. package/lib/esm/fieldset/index.js.map +1 -0
  211. package/lib/esm/fieldset/stories/fieldset-default.story.js +28 -0
  212. package/lib/esm/fieldset/stories/fieldset-default.story.js.map +1 -0
  213. package/lib/esm/fieldset/stories/fieldset-disabled.story.js +28 -0
  214. package/lib/esm/fieldset/stories/fieldset-disabled.story.js.map +1 -0
  215. package/lib/esm/fieldset/stories/fieldset-error.story.js +28 -0
  216. package/lib/esm/fieldset/stories/fieldset-error.story.js.map +1 -0
  217. package/lib/esm/fieldset/stories/fieldset-optional.story.js +28 -0
  218. package/lib/esm/fieldset/stories/fieldset-optional.story.js.map +1 -0
  219. package/lib/esm/fieldset/stories/fieldset-required.story.js +28 -0
  220. package/lib/esm/fieldset/stories/fieldset-required.story.js.map +1 -0
  221. package/lib/esm/fieldset/stories/fieldset-visually-hidden-label.story.js +28 -0
  222. package/lib/esm/fieldset/stories/fieldset-visually-hidden-label.story.js.map +1 -0
  223. package/lib/esm/fieldset/stories/index.js +40 -0
  224. package/lib/esm/fieldset/stories/index.js.map +1 -0
  225. package/lib/esm/filled-button/FilledButton.js +1 -1
  226. package/lib/esm/icon-button/IconButton.js +1 -1
  227. package/lib/esm/icons/generated/custom/FloppyDiskArrowTopRight.js +1 -1
  228. package/lib/esm/icons/generated/custom/FloppyDiskArrowTopRight.js.map +1 -1
  229. package/lib/esm/index.js +3 -0
  230. package/lib/esm/index.js.map +1 -1
  231. package/lib/esm/kbd/kbd-utils.js +1 -1
  232. package/lib/esm/logo/Logo.js +1 -1
  233. package/lib/esm/outlined-button/OutlinedButton.js +1 -1
  234. package/lib/esm/radio/Radio.js +17 -4
  235. package/lib/esm/radio/Radio.js.map +1 -1
  236. package/lib/esm/radio-group/RadioGroup.js +59 -0
  237. package/lib/esm/radio-group/RadioGroup.js.map +1 -0
  238. package/lib/esm/radio-group/index.js +22 -0
  239. package/lib/esm/radio-group/index.js.map +1 -0
  240. package/lib/esm/radio-group/stories/index.js +46 -0
  241. package/lib/esm/radio-group/stories/index.js.map +1 -0
  242. package/lib/esm/radio-group/stories/radio-group-controlled.story.js +30 -0
  243. package/lib/esm/radio-group/stories/radio-group-controlled.story.js.map +1 -0
  244. package/lib/esm/radio-group/stories/radio-group-default.story.js +28 -0
  245. package/lib/esm/radio-group/stories/radio-group-default.story.js.map +1 -0
  246. package/lib/esm/radio-group/stories/radio-group-disabled.story.js +28 -0
  247. package/lib/esm/radio-group/stories/radio-group-disabled.story.js.map +1 -0
  248. package/lib/esm/radio-group/stories/radio-group-error.story.js +28 -0
  249. package/lib/esm/radio-group/stories/radio-group-error.story.js.map +1 -0
  250. package/lib/esm/radio-group/stories/radio-group-horizontal.story.js +28 -0
  251. package/lib/esm/radio-group/stories/radio-group-horizontal.story.js.map +1 -0
  252. package/lib/esm/radio-group/stories/radio-group-optional.story.js +28 -0
  253. package/lib/esm/radio-group/stories/radio-group-optional.story.js.map +1 -0
  254. package/lib/esm/radio-group/stories/radio-group-required.story.js +28 -0
  255. package/lib/esm/radio-group/stories/radio-group-required.story.js.map +1 -0
  256. package/lib/esm/radio-group/stories/radio-group-visually-hidden-label.story.js +28 -0
  257. package/lib/esm/radio-group/stories/radio-group-visually-hidden-label.story.js.map +1 -0
  258. package/lib/esm/read-only-tag/ReadOnlyTag.js +1 -1
  259. package/lib/esm/select/Select.js +10 -7
  260. package/lib/esm/select/Select.js.map +1 -1
  261. package/lib/esm/select/stories/index.js +3 -0
  262. package/lib/esm/select/stories/index.js.map +1 -1
  263. package/lib/esm/select/stories/select-required.story.js +37 -0
  264. package/lib/esm/select/stories/select-required.story.js.map +1 -0
  265. package/lib/esm/select/types.js +1 -1
  266. package/lib/esm/select/types.js.map +1 -1
  267. package/lib/esm/spotlight/SpotlightTour.js +1 -1
  268. package/lib/esm/text-button/TextButton.js +1 -1
  269. package/lib/esm/tree-view/TreeViewItem.js +1 -1
  270. package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
  271. package/lib/esm/tree-view/TreeViewTrail.js +1 -1
  272. package/lib/esm/tree-view/tree-view-types.js +1 -1
  273. package/lib/esm/tree-view/tree-view-utils.js +1 -1
  274. package/lib/esm/typography/Typography.js +1 -1
  275. package/lib/types/_common/ButtonSpinner.d.ts +1 -1
  276. package/lib/types/_common/TruncatedTextWithTooltip.d.ts +1 -1
  277. package/lib/types/_common/form-control/FormFieldLabel.d.ts +1 -1
  278. package/lib/types/_common/form-control/FormFieldMessage.d.ts +1 -1
  279. package/lib/types/_common/form-control/form-control-types.d.ts +1 -1
  280. package/lib/types/_common/form-control/form-field-group-context.d.ts +36 -0
  281. package/lib/types/_common/form-control/form-field-group-context.d.ts.map +1 -0
  282. package/lib/types/_common/form-control/index.d.ts +2 -1
  283. package/lib/types/_common/form-control/index.d.ts.map +1 -1
  284. package/lib/types/_common/form-control/use-form-field.d.ts +1 -1
  285. package/lib/types/_common/form-control/use-inline-field-label.d.ts +1 -1
  286. package/lib/types/_common/utils.d.ts +1 -1
  287. package/lib/types/_generated/style-rules/date-utils.d.ts +1 -1
  288. package/lib/types/_generated/style-rules/range-utils.d.ts +1 -1
  289. package/lib/types/accordion/Accordion.d.ts +1 -1
  290. package/lib/types/accordion/accordion-context.d.ts +1 -1
  291. package/lib/types/ai/response/stories/response-all-components.story.d.ts +1 -1
  292. package/lib/types/ai/response/stories/response-code-examples.story.d.ts +1 -1
  293. package/lib/types/ai/response/stories/response-full-example.story.d.ts +1 -1
  294. package/lib/types/ai/response/stories/response-headings.story.d.ts +1 -1
  295. package/lib/types/ai/response/stories/response-lists.story.d.ts +1 -1
  296. package/lib/types/announcement-banner/AnnouncementBanner.d.ts +1 -1
  297. package/lib/types/announcement-banner/index.d.ts +1 -1
  298. package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts +1 -1
  299. package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts +1 -1
  300. package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts +1 -1
  301. package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts +1 -1
  302. package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts +1 -1
  303. package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts +1 -1
  304. package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts +1 -1
  305. package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts +1 -1
  306. package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts +1 -1
  307. package/lib/types/announcement-banner/stories/index.d.ts +1 -1
  308. package/lib/types/avatar/Avatar.d.ts +1 -1
  309. package/lib/types/banner/Banner.d.ts +1 -1
  310. package/lib/types/button/ButtonBase.d.ts +1 -1
  311. package/lib/types/checkbox/Checkbox.d.ts.map +1 -1
  312. package/lib/types/checkbox-group/CheckboxGroup.d.ts +40 -0
  313. package/lib/types/checkbox-group/CheckboxGroup.d.ts.map +1 -0
  314. package/lib/types/checkbox-group/index.d.ts +22 -0
  315. package/lib/types/checkbox-group/index.d.ts.map +1 -0
  316. package/lib/types/checkbox-group/stories/checkbox-group-default.story.d.ts +24 -0
  317. package/lib/types/checkbox-group/stories/checkbox-group-default.story.d.ts.map +1 -0
  318. package/lib/types/checkbox-group/stories/checkbox-group-disabled.story.d.ts +24 -0
  319. package/lib/types/checkbox-group/stories/checkbox-group-disabled.story.d.ts.map +1 -0
  320. package/lib/types/checkbox-group/stories/checkbox-group-error.story.d.ts +24 -0
  321. package/lib/types/checkbox-group/stories/checkbox-group-error.story.d.ts.map +1 -0
  322. package/lib/types/checkbox-group/stories/checkbox-group-optional.story.d.ts +24 -0
  323. package/lib/types/checkbox-group/stories/checkbox-group-optional.story.d.ts.map +1 -0
  324. package/lib/types/checkbox-group/stories/checkbox-group-required.story.d.ts +24 -0
  325. package/lib/types/checkbox-group/stories/checkbox-group-required.story.d.ts.map +1 -0
  326. package/lib/types/checkbox-group/stories/checkbox-group-visually-hidden-label.story.d.ts +24 -0
  327. package/lib/types/checkbox-group/stories/checkbox-group-visually-hidden-label.story.d.ts.map +1 -0
  328. package/lib/types/checkbox-group/stories/index.d.ts +33 -0
  329. package/lib/types/checkbox-group/stories/index.d.ts.map +1 -0
  330. package/lib/types/code-block/CodeBlock.d.ts +1 -1
  331. package/lib/types/combobox/use-combobox-popover.d.ts +1 -1
  332. package/lib/types/data-grid/Components.d.ts +1 -1
  333. package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts +1 -1
  334. package/lib/types/date-picker/DatePicker.d.ts +1 -1
  335. package/lib/types/dialog/Dialog.d.ts +1 -1
  336. package/lib/types/divider/Divider.d.ts +1 -1
  337. package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
  338. package/lib/types/dropzone/Dropzone.d.ts +1 -1
  339. package/lib/types/dropzone/stories/dropzone-csv-files.story.d.ts +1 -1
  340. package/lib/types/dropzone/stories/dropzone-custom-extensions.story.d.ts +1 -1
  341. package/lib/types/dropzone/stories/dropzone-default.story.d.ts +1 -1
  342. package/lib/types/dropzone/stories/dropzone-disabled.story.d.ts +1 -1
  343. package/lib/types/dropzone/stories/dropzone-full.story.d.ts +1 -1
  344. package/lib/types/dropzone/stories/dropzone-loading-progress.story.d.ts +1 -1
  345. package/lib/types/fieldset/Fieldset.d.ts +59 -0
  346. package/lib/types/fieldset/Fieldset.d.ts.map +1 -0
  347. package/lib/types/fieldset/index.d.ts +22 -0
  348. package/lib/types/fieldset/index.d.ts.map +1 -0
  349. package/lib/types/fieldset/stories/fieldset-default.story.d.ts +24 -0
  350. package/lib/types/fieldset/stories/fieldset-default.story.d.ts.map +1 -0
  351. package/lib/types/fieldset/stories/fieldset-disabled.story.d.ts +24 -0
  352. package/lib/types/fieldset/stories/fieldset-disabled.story.d.ts.map +1 -0
  353. package/lib/types/fieldset/stories/fieldset-error.story.d.ts +24 -0
  354. package/lib/types/fieldset/stories/fieldset-error.story.d.ts.map +1 -0
  355. package/lib/types/fieldset/stories/fieldset-optional.story.d.ts +24 -0
  356. package/lib/types/fieldset/stories/fieldset-optional.story.d.ts.map +1 -0
  357. package/lib/types/fieldset/stories/fieldset-required.story.d.ts +24 -0
  358. package/lib/types/fieldset/stories/fieldset-required.story.d.ts.map +1 -0
  359. package/lib/types/fieldset/stories/fieldset-visually-hidden-label.story.d.ts +24 -0
  360. package/lib/types/fieldset/stories/fieldset-visually-hidden-label.story.d.ts.map +1 -0
  361. package/lib/types/fieldset/stories/index.d.ts +33 -0
  362. package/lib/types/fieldset/stories/index.d.ts.map +1 -0
  363. package/lib/types/graph-label/GraphLabel.d.ts +1 -1
  364. package/lib/types/graph-label/color.d.ts +1 -1
  365. package/lib/types/hooks/index.d.ts +1 -1
  366. package/lib/types/icon-button-array/IconButtonArray.d.ts +1 -1
  367. package/lib/types/icon-button-base/IconButtonBase.d.ts +1 -1
  368. package/lib/types/icons/generated/custom/FloppyDiskArrowTopRight.d.ts +1 -1
  369. package/lib/types/icons/manual/Neo4JAiColor.d.ts +1 -1
  370. package/lib/types/index.d.ts +3 -0
  371. package/lib/types/index.d.ts.map +1 -1
  372. package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
  373. package/lib/types/kbd/Kbd.d.ts +1 -1
  374. package/lib/types/loading-bar/LoadingBar.d.ts +1 -1
  375. package/lib/types/loading-spinner/LoadingSpinner.d.ts +1 -1
  376. package/lib/types/menu/Menu.d.ts +1 -1
  377. package/lib/types/modal/Modal.d.ts +1 -1
  378. package/lib/types/portal/Portal.d.ts +1 -1
  379. package/lib/types/progress-bar/ProgressBar.d.ts +1 -1
  380. package/lib/types/radio/Radio.d.ts +2 -2
  381. package/lib/types/radio/Radio.d.ts.map +1 -1
  382. package/lib/types/radio-group/RadioGroup.d.ts +50 -0
  383. package/lib/types/radio-group/RadioGroup.d.ts.map +1 -0
  384. package/lib/types/radio-group/index.d.ts +22 -0
  385. package/lib/types/radio-group/index.d.ts.map +1 -0
  386. package/lib/types/radio-group/stories/index.d.ts +37 -0
  387. package/lib/types/radio-group/stories/index.d.ts.map +1 -0
  388. package/lib/types/radio-group/stories/radio-group-controlled.story.d.ts +24 -0
  389. package/lib/types/radio-group/stories/radio-group-controlled.story.d.ts.map +1 -0
  390. package/lib/types/radio-group/stories/radio-group-default.story.d.ts +24 -0
  391. package/lib/types/radio-group/stories/radio-group-default.story.d.ts.map +1 -0
  392. package/lib/types/radio-group/stories/radio-group-disabled.story.d.ts +24 -0
  393. package/lib/types/radio-group/stories/radio-group-disabled.story.d.ts.map +1 -0
  394. package/lib/types/radio-group/stories/radio-group-error.story.d.ts +24 -0
  395. package/lib/types/radio-group/stories/radio-group-error.story.d.ts.map +1 -0
  396. package/lib/types/radio-group/stories/radio-group-horizontal.story.d.ts +24 -0
  397. package/lib/types/radio-group/stories/radio-group-horizontal.story.d.ts.map +1 -0
  398. package/lib/types/radio-group/stories/radio-group-optional.story.d.ts +24 -0
  399. package/lib/types/radio-group/stories/radio-group-optional.story.d.ts.map +1 -0
  400. package/lib/types/radio-group/stories/radio-group-required.story.d.ts +24 -0
  401. package/lib/types/radio-group/stories/radio-group-required.story.d.ts.map +1 -0
  402. package/lib/types/radio-group/stories/radio-group-visually-hidden-label.story.d.ts +24 -0
  403. package/lib/types/radio-group/stories/radio-group-visually-hidden-label.story.d.ts.map +1 -0
  404. package/lib/types/segmented-control/SegmentedControl.d.ts +1 -1
  405. package/lib/types/select/Select.d.ts +2 -2
  406. package/lib/types/select/Select.d.ts.map +1 -1
  407. package/lib/types/select/stories/index.d.ts +2 -0
  408. package/lib/types/select/stories/index.d.ts.map +1 -1
  409. package/lib/types/select/stories/select-required.story.d.ts +24 -0
  410. package/lib/types/select/stories/select-required.story.d.ts.map +1 -0
  411. package/lib/types/select/types.d.ts +10 -0
  412. package/lib/types/select/types.d.ts.map +1 -1
  413. package/lib/types/select-icon-button/SelectIconButton.d.ts +1 -1
  414. package/lib/types/selectable-tag/SelectableTag.d.ts +1 -1
  415. package/lib/types/skeleton/Skeleton.d.ts +1 -1
  416. package/lib/types/slider/Slider.d.ts +1 -1
  417. package/lib/types/slider/stories/slider-custom-step-length.story.d.ts +1 -1
  418. package/lib/types/slider/stories/slider-default.story.d.ts +1 -1
  419. package/lib/types/slider/stories/slider-disabled.story.d.ts +1 -1
  420. package/lib/types/slider/stories/slider-range.story.d.ts +1 -1
  421. package/lib/types/slider/stories/slider-show-steps.story.d.ts +1 -1
  422. package/lib/types/slider/stories/slider-show-values.story.d.ts +1 -1
  423. package/lib/types/slider/stories/slider-single.story.d.ts +1 -1
  424. package/lib/types/spotlight/Spotlight.d.ts +1 -1
  425. package/lib/types/spotlight/SpotlightProvider.d.ts +1 -1
  426. package/lib/types/spotlight/SpotlightTarget.d.ts +1 -1
  427. package/lib/types/status-indicator/StatusIndicator.d.ts +1 -1
  428. package/lib/types/status-label/StatusLabel.d.ts +1 -1
  429. package/lib/types/tabs/Tabs.d.ts +1 -1
  430. package/lib/types/tabs/use-tabs-scroll-overflow.d.ts +1 -1
  431. package/lib/types/tag/Tag.d.ts +1 -1
  432. package/lib/types/tag-base/TagBase.d.ts +1 -1
  433. package/lib/types/text-area/TextArea.d.ts +1 -1
  434. package/lib/types/text-link/TextLink.d.ts +1 -1
  435. package/lib/types/text-overflow/TextOverflow.d.ts +1 -1
  436. package/lib/types/theme/ThemeProvider.d.ts +1 -1
  437. package/lib/types/theme/agnostic.d.ts +1 -1
  438. package/lib/types/time-picker/TimePicker.d.ts +1 -1
  439. package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
  440. package/lib/types/timezone-picker/TimeZonePicker.d.ts +1 -1
  441. package/lib/types/timezone-picker/timezone-picker-hooks.d.ts +1 -1
  442. package/lib/types/toast/Toast.d.ts +1 -1
  443. package/lib/types/toast/ToastControlled.d.ts +1 -1
  444. package/lib/types/tree-view/TreeItemWrapper.d.ts +1 -1
  445. package/lib/types/tree-view/tree-view-keyboard-helpers.d.ts +1 -1
  446. package/lib/types/typography/stories/typography-anchor.story.d.ts +1 -1
  447. package/lib/types/wizard/Wizard.d.ts +1 -1
  448. package/package.json +17 -2
  449. package/skills/ndl-react/SKILL.md +6 -3
  450. package/skills/ndl-react/components/checkbox-group.md +195 -0
  451. package/skills/ndl-react/components/fieldset.md +235 -0
  452. package/skills/ndl-react/components/radio-group.md +259 -0
  453. package/skills/ndl-react/components/radio.md +1 -1
  454. package/skills/ndl-react/components/select.md +42 -0
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FormFieldLabel = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- /**
8
+ /*!
9
9
  *
10
10
  * Copyright (c) "Neo4j"
11
11
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldLabel.js","sourceRoot":"","sources":["../../../../src/_common/form-control/FormFieldLabel.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAGpC,+GAA4G;AAC5G,2CAAwC;AACxC,iDAA8C;AA+B9C;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,IAAI,EACJ,WAAW,GAAG,UAAU,EACxB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,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BAAsB,YAElC,uBAAC,2DAA4B,KAAG,GAC5B,IACU,EAClB,uBAAC,iBAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,mBAAmB,IACJ,KACV,CACX,EACA,oBAAoB,IAAI,CACvB,uBAAC,uBAAU,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,0BAA0B,YAC/D,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,GAC1B,CACd,IACG,CACP,CAAC;IAEF,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,2DAAG,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC;AACrD,CAAC,CAAC;AA3EW,QAAA,cAAc,kBA2EzB","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';\nimport type React from 'react';\n\nimport { InformationCircleIconOutline } from '../../icons/generated/heroIcons/InformationCircleIconOutline';\nimport { Tooltip } from '../../tooltip';\nimport { Typography } from '../../typography';\nimport { type TooltipObjectProps } from '../types';\nimport { type FormFieldSize, type FormFieldState } from './form-control-types';\n\ntype FormFieldLabelProps = {\n field: FormFieldState;\n size: FormFieldSize;\n /**\n * How the label is associated with its control. `explicit` renders a\n * `<label>` pointing at the control through `htmlFor`, carrying `labelId`\n * for `aria-labelledby`. `implicit` renders plain text, for components\n * whose control is wrapped by an enclosing `<label>`, where a nested label\n * element would be invalid.\n */\n association?: 'explicit' | 'implicit';\n /**\n * Click handler for an explicit label, for controls that need more than\n * the default `htmlFor` focus forwarding (the Combobox label must move\n * focus without toggling the panel).\n */\n onLabelClick?: React.MouseEventHandler<HTMLLabelElement>;\n /** Text displayed in an information tooltip next to the label */\n moreInformationText?: React.ReactNode;\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n /** Extra class names for the label row */\n className?: string;\n /** Wraps the rendered row, so a component can put it inside a Skeleton. */\n wrap?: (row: React.ReactNode) => React.ReactNode;\n};\n\n/**\n * The label row of a form field: the label itself, an optional information\n * tooltip, and the Required/Optional indicator. The indicator and the tooltip\n * are separate elements rather than label content, keeping them out of the\n * control's accessible name.\n */\nexport const FormFieldLabel = ({\n field,\n size,\n association = 'explicit',\n onLabelClick,\n moreInformationText,\n tooltipProps,\n className,\n wrap,\n}: FormFieldLabelProps) => {\n const {\n label,\n labelId,\n controlId,\n hasVisuallyHiddenLabel,\n hasRequiredIndicator,\n isRequired,\n } = field;\n const variant = size === 'large' ? 'body-large' : 'body-medium';\n const isExplicit = association === 'explicit';\n const informationIconClasses = classNames({\n 'ndl-information-icon-large': size === 'large',\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n });\n\n const row = (\n <div\n className={classNames(\n 'ndl-form-label-row',\n { 'ndl-visually-hidden': hasVisuallyHiddenLabel },\n className,\n )}\n >\n <Typography\n as={isExplicit ? 'label' : 'span'}\n variant={variant}\n className=\"ndl-form-label\"\n htmlAttributes={\n isExplicit\n ? { htmlFor: controlId, id: labelId, onClick: onLabelClick }\n : undefined\n }\n >\n {label}\n </Typography>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger\n {...tooltipProps?.trigger}\n className={informationIconClasses}\n hasButtonWrapper\n >\n <div\n tabIndex={0}\n role=\"button\"\n aria-label=\"Information icon\"\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 {hasRequiredIndicator && (\n <Typography variant={variant} className=\"ndl-form-label-indicator\">\n {isRequired ? 'Required' : 'Optional'}\n </Typography>\n )}\n </div>\n );\n\n return wrap === undefined ? row : <>{wrap(row)}</>;\n};\n"]}
1
+ {"version":3,"file":"FormFieldLabel.js","sourceRoot":"","sources":["../../../../src/_common/form-control/FormFieldLabel.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAGpC,+GAA4G;AAC5G,2CAAwC;AACxC,iDAA8C;AA+B9C;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,IAAI,EACJ,WAAW,GAAG,UAAU,EACxB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,IAAI,GACgB,EAAE,EAAE;IACxB,MAAM,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,GACX,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IAChE,MAAM,UAAU,GAAG,WAAW,KAAK,UAAU,CAAC;IAC9C,MAAM,sBAAsB,GAAG,IAAA,oBAAU,EAAC;QACxC,4BAA4B,EAAE,IAAI,KAAK,OAAO;QAC9C,4BAA4B,EAAE,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ;KACpE,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,CACV,iCACE,SAAS,EAAE,IAAA,oBAAU,EACnB,oBAAoB,EACpB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,EACjD,SAAS,CACV,aAED,uBAAC,uBAAU,IACT,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EACjC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,gBAAgB,EAC1B,cAAc,EACZ,UAAU;oBACR,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE;oBAC5D,CAAC,CAAC,SAAS,YAGd,KAAK,GACK,EACZ,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAC/B,wBAAC,iBAAO,kBAAC,IAAI,EAAC,QAAQ,IAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,eAC3C,uBAAC,iBAAO,CAAC,OAAO,oBACV,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,IACzB,SAAS,EAAE,sBAAsB,EACjC,gBAAgB,kBAEhB,gCACE,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,QAAQ,gBACF,kBAAkB,iBACjB,sBAAsB,YAElC,uBAAC,2DAA4B,KAAG,GAC5B,IACU,EAClB,uBAAC,iBAAO,CAAC,OAAO,oBAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,cACvC,mBAAmB,IACJ,KACV,CACX,EACA,oBAAoB,IAAI,CACvB,uBAAC,uBAAU,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,0BAA0B,YAC/D,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,GAC1B,CACd,IACG,CACP,CAAC;IAEF,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,2DAAG,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC;AACrD,CAAC,CAAC;AA3EW,QAAA,cAAc,kBA2EzB","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';\nimport type React from 'react';\n\nimport { InformationCircleIconOutline } from '../../icons/generated/heroIcons/InformationCircleIconOutline';\nimport { Tooltip } from '../../tooltip';\nimport { Typography } from '../../typography';\nimport { type TooltipObjectProps } from '../types';\nimport { type FormFieldSize, type FormFieldState } from './form-control-types';\n\ntype FormFieldLabelProps = {\n field: FormFieldState;\n size: FormFieldSize;\n /**\n * How the label is associated with its control. `explicit` renders a\n * `<label>` pointing at the control through `htmlFor`, carrying `labelId`\n * for `aria-labelledby`. `implicit` renders plain text, for components\n * whose control is wrapped by an enclosing `<label>`, where a nested label\n * element would be invalid.\n */\n association?: 'explicit' | 'implicit';\n /**\n * Click handler for an explicit label, for controls that need more than\n * the default `htmlFor` focus forwarding (the Combobox label must move\n * focus without toggling the panel).\n */\n onLabelClick?: React.MouseEventHandler<HTMLLabelElement>;\n /** Text displayed in an information tooltip next to the label */\n moreInformationText?: React.ReactNode;\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n /** Extra class names for the label row */\n className?: string;\n /** Wraps the rendered row, so a component can put it inside a Skeleton. */\n wrap?: (row: React.ReactNode) => React.ReactNode;\n};\n\n/**\n * The label row of a form field: the label itself, an optional information\n * tooltip, and the Required/Optional indicator. The indicator and the tooltip\n * are separate elements rather than label content, keeping them out of the\n * control's accessible name.\n */\nexport const FormFieldLabel = ({\n field,\n size,\n association = 'explicit',\n onLabelClick,\n moreInformationText,\n tooltipProps,\n className,\n wrap,\n}: FormFieldLabelProps) => {\n const {\n label,\n labelId,\n controlId,\n hasVisuallyHiddenLabel,\n hasRequiredIndicator,\n isRequired,\n } = field;\n const variant = size === 'large' ? 'body-large' : 'body-medium';\n const isExplicit = association === 'explicit';\n const informationIconClasses = classNames({\n 'ndl-information-icon-large': size === 'large',\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n });\n\n const row = (\n <div\n className={classNames(\n 'ndl-form-label-row',\n { 'ndl-visually-hidden': hasVisuallyHiddenLabel },\n className,\n )}\n >\n <Typography\n as={isExplicit ? 'label' : 'span'}\n variant={variant}\n className=\"ndl-form-label\"\n htmlAttributes={\n isExplicit\n ? { htmlFor: controlId, id: labelId, onClick: onLabelClick }\n : undefined\n }\n >\n {label}\n </Typography>\n {Boolean(moreInformationText) && (\n <Tooltip type=\"simple\" {...tooltipProps?.root}>\n <Tooltip.Trigger\n {...tooltipProps?.trigger}\n className={informationIconClasses}\n hasButtonWrapper\n >\n <div\n tabIndex={0}\n role=\"button\"\n aria-label=\"Information icon\"\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 {hasRequiredIndicator && (\n <Typography variant={variant} className=\"ndl-form-label-indicator\">\n {isRequired ? 'Required' : 'Optional'}\n </Typography>\n )}\n </div>\n );\n\n return wrap === undefined ? row : <>{wrap(row)}</>;\n};\n"]}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FormFieldMessage = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- /**
8
+ /*!
9
9
  *
10
10
  * Copyright (c) "Neo4j"
11
11
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldMessage.js","sourceRoot":"","sources":["../../../../src/_common/form-control/FormFieldMessage.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;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7B,YAAY,EAAE,IAAI,KAAK,QAAQ;YAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;SAC9B,EACD,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,EACvB,SAAS,CACV,eACS,QAAQ,iBACN,MAAM,YAEjB,OAAO,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAC/D,CACP,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,gBAAgB,oBAqD3B","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';\nimport type React from 'react';\n\nimport { ExclamationCircleIconSolid } from '../../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { Typography } from '../../typography';\nimport {\n type FormFieldMessageSeverity,\n type FormFieldSize,\n type FormFieldState,\n} from './form-control-types';\n\ntype FormFieldMessagePresentation = {\n /** Icon rendered before the message text. */\n icon?: React.ComponentType;\n /** Severity modifier class on the message container. */\n className?: string;\n};\n\n/**\n * How each severity presents itself. A future severity (`info`, `warning`) or\n * a new way of presenting a message extends this map rather than reshaping\n * the components that render messages.\n */\nconst presentationBySeverity: Record<\n FormFieldMessageSeverity,\n FormFieldMessagePresentation\n> = {\n error: { className: 'ndl-error', icon: ExclamationCircleIconSolid },\n help: {},\n};\n\ntype FormFieldMessageProps = {\n field: FormFieldState;\n size: FormFieldSize;\n /** Extra class names for the message container */\n className?: string;\n /** Wraps the message content, so a component can put it inside a Skeleton. */\n wrap?: (content: React.ReactNode) => React.ReactNode;\n};\n\n/**\n * The message below a form field: the help text, or the error that replaces\n * it. The container is rendered whether or not there is a message, so the\n * `aria-live` region exists in the document before any text arrives and a\n * validation error is reliably announced. The stylesheet collapses it while\n * it is empty.\n *\n * The region is polite rather than an assertive `role=\"alert\"`, since\n * validation that runs on blur or on change would otherwise interrupt\n * whatever is being read. `aria-atomic` makes the whole message announce as\n * one, matching `role=\"status\"` without presenting plain help text as a\n * status message.\n */\nexport const FormFieldMessage = ({\n field,\n size,\n className,\n wrap,\n}: FormFieldMessageProps) => {\n const { message, messageId, messageSeverity } = field;\n const variant = size === 'large' ? 'body-medium' : 'body-small';\n const presentation =\n messageSeverity === undefined\n ? undefined\n : presentationBySeverity[messageSeverity];\n const Icon = presentation?.icon;\n\n const content =\n messageSeverity === undefined ? null : (\n // The icon and the text share a row of their own, so the container stays\n // a plain block that anything wrapping the content, a Skeleton in\n // particular, can fill the width of.\n <div className=\"ndl-form-message-content\">\n {Icon !== undefined && (\n <div className=\"ndl-form-message-icon\" aria-hidden=\"true\">\n <Icon />\n </div>\n )}\n <Typography\n variant={variant}\n className=\"ndl-form-message-text\"\n htmlAttributes={{ id: messageId }}\n >\n {message}\n </Typography>\n </div>\n );\n\n return (\n <div\n className={classNames(\n 'ndl-form-message',\n {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n },\n presentation?.className,\n className,\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {content !== null && (wrap === undefined ? content : wrap(content))}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"FormFieldMessage.js","sourceRoot":"","sources":["../../../../src/_common/form-control/FormFieldMessage.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAGpC,2GAAwG;A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AAE,IAAI,KAAK,OAAO;SAC9B,EACD,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,EACvB,SAAS,CACV,eACS,QAAQ,iBACN,MAAM,YAEjB,OAAO,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAC/D,CACP,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,gBAAgB,oBAqD3B","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';\nimport type React from 'react';\n\nimport { ExclamationCircleIconSolid } from '../../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { Typography } from '../../typography';\nimport {\n type FormFieldMessageSeverity,\n type FormFieldSize,\n type FormFieldState,\n} from './form-control-types';\n\ntype FormFieldMessagePresentation = {\n /** Icon rendered before the message text. */\n icon?: React.ComponentType;\n /** Severity modifier class on the message container. */\n className?: string;\n};\n\n/**\n * How each severity presents itself. A future severity (`info`, `warning`) or\n * a new way of presenting a message extends this map rather than reshaping\n * the components that render messages.\n */\nconst presentationBySeverity: Record<\n FormFieldMessageSeverity,\n FormFieldMessagePresentation\n> = {\n error: { className: 'ndl-error', icon: ExclamationCircleIconSolid },\n help: {},\n};\n\ntype FormFieldMessageProps = {\n field: FormFieldState;\n size: FormFieldSize;\n /** Extra class names for the message container */\n className?: string;\n /** Wraps the message content, so a component can put it inside a Skeleton. */\n wrap?: (content: React.ReactNode) => React.ReactNode;\n};\n\n/**\n * The message below a form field: the help text, or the error that replaces\n * it. The container is rendered whether or not there is a message, so the\n * `aria-live` region exists in the document before any text arrives and a\n * validation error is reliably announced. The stylesheet collapses it while\n * it is empty.\n *\n * The region is polite rather than an assertive `role=\"alert\"`, since\n * validation that runs on blur or on change would otherwise interrupt\n * whatever is being read. `aria-atomic` makes the whole message announce as\n * one, matching `role=\"status\"` without presenting plain help text as a\n * status message.\n */\nexport const FormFieldMessage = ({\n field,\n size,\n className,\n wrap,\n}: FormFieldMessageProps) => {\n const { message, messageId, messageSeverity } = field;\n const variant = size === 'large' ? 'body-medium' : 'body-small';\n const presentation =\n messageSeverity === undefined\n ? undefined\n : presentationBySeverity[messageSeverity];\n const Icon = presentation?.icon;\n\n const content =\n messageSeverity === undefined ? null : (\n // The icon and the text share a row of their own, so the container stays\n // a plain block that anything wrapping the content, a Skeleton in\n // particular, can fill the width of.\n <div className=\"ndl-form-message-content\">\n {Icon !== undefined && (\n <div className=\"ndl-form-message-icon\" aria-hidden=\"true\">\n <Icon />\n </div>\n )}\n <Typography\n variant={variant}\n className=\"ndl-form-message-text\"\n htmlAttributes={{ id: messageId }}\n >\n {message}\n </Typography>\n </div>\n );\n\n return (\n <div\n className={classNames(\n 'ndl-form-message',\n {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n },\n presentation?.className,\n className,\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {content !== null && (wrap === undefined ? content : wrap(content))}\n </div>\n );\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"form-control-types.js","sourceRoot":"","sources":["../../../../src/_common/form-control/form-control-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","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 type React from 'react';\n\n/** Sizes shared by the form field parts, matching the input sizes. */\ntype FormFieldSize = 'small' | 'medium' | 'large';\n\n/**\n * Severity of the message shown below a form control. An error replaces the\n * help text whenever both are provided.\n *\n * Deliberately a union rather than an error boolean: future severities such\n * as `info` and `warning`, or new ways of presenting a message, only extend\n * this union and the severity presentation map in `FormFieldMessage`.\n */\ntype FormFieldMessageSeverity = 'help' | 'error';\n\n/**\n * The field-related props a form input component maps onto the internal form\n * field. Components pick from these internally so wording, types and behavior\n * stay aligned, while their external prop names stay untouched (for example\n * both TextInput's `showRequiredOrOptionalLabel` and TextArea's `isOptional`\n * map onto `hasRequiredIndicator` here).\n */\ntype FormFieldProps = {\n /** The label displayed above the control */\n label?: React.ReactNode;\n\n /** Assistive text displayed below the control */\n helpText?: React.ReactNode;\n\n /** Error message displayed below the control. When provided, it overrides `helpText` and shows an error icon */\n errorText?: React.ReactNode;\n\n /** Whether the control is required */\n isRequired?: boolean;\n\n /** Whether Required or Optional is shown at the end of the label row */\n hasRequiredIndicator?: boolean;\n\n /** Whether the label is clipped out of the layout, leaving it to screen readers only */\n hasVisuallyHiddenLabel?: boolean;\n};\n\n/**\n * The resolved state of a form field: the ids that tie the label and the\n * message to the control, and which message is currently displayed. Built by\n * `useFormField` and consumed by `FormFieldLabel` and `FormFieldMessage`, so\n * a component never wires ids or picks between help and error itself.\n */\ntype FormFieldState = {\n label?: React.ReactNode;\n /** Id of the label element, for `aria-labelledby` on ARIA widgets. */\n labelId: string;\n /** Id of the control, which an explicit label points at with `htmlFor`. */\n controlId: string;\n /** Id the help text renders with, referenced while it is displayed. */\n helpTextId: string;\n /** Id the error text renders with, referenced while it is displayed. */\n errorTextId: string;\n helpText?: React.ReactNode;\n errorText?: React.ReactNode;\n /** The displayed message. The error text while there is one, else the help text. */\n message?: React.ReactNode;\n /** Id of the displayed message; `undefined` while there is no message. */\n messageId?: string;\n /** Severity of the displayed message; `undefined` while there is no message. */\n messageSeverity?: FormFieldMessageSeverity;\n hasError: boolean;\n isRequired: boolean;\n hasRequiredIndicator: boolean;\n hasVisuallyHiddenLabel: boolean;\n};\n\n// These are DOM attribute names, so the boolean naming convention cannot apply.\n/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * ARIA attributes for the control the field describes. Spread onto the input\n * or the ARIA widget acting as one.\n */\ntype FormFieldControlProps = {\n 'aria-describedby': string | undefined;\n 'aria-invalid': true | undefined;\n};\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type {\n FormFieldControlProps,\n FormFieldMessageSeverity,\n FormFieldProps,\n FormFieldSize,\n FormFieldState,\n};\n"]}
1
+ {"version":3,"file":"form-control-types.js","sourceRoot":"","sources":["../../../../src/_common/form-control/form-control-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","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 type React from 'react';\n\n/** Sizes shared by the form field parts, matching the input sizes. */\ntype FormFieldSize = 'small' | 'medium' | 'large';\n\n/**\n * Severity of the message shown below a form control. An error replaces the\n * help text whenever both are provided.\n *\n * Deliberately a union rather than an error boolean: future severities such\n * as `info` and `warning`, or new ways of presenting a message, only extend\n * this union and the severity presentation map in `FormFieldMessage`.\n */\ntype FormFieldMessageSeverity = 'help' | 'error';\n\n/**\n * The field-related props a form input component maps onto the internal form\n * field. Components pick from these internally so wording, types and behavior\n * stay aligned, while their external prop names stay untouched (for example\n * both TextInput's `showRequiredOrOptionalLabel` and TextArea's `isOptional`\n * map onto `hasRequiredIndicator` here).\n */\ntype FormFieldProps = {\n /** The label displayed above the control */\n label?: React.ReactNode;\n\n /** Assistive text displayed below the control */\n helpText?: React.ReactNode;\n\n /** Error message displayed below the control. When provided, it overrides `helpText` and shows an error icon */\n errorText?: React.ReactNode;\n\n /** Whether the control is required */\n isRequired?: boolean;\n\n /** Whether Required or Optional is shown at the end of the label row */\n hasRequiredIndicator?: boolean;\n\n /** Whether the label is clipped out of the layout, leaving it to screen readers only */\n hasVisuallyHiddenLabel?: boolean;\n};\n\n/**\n * The resolved state of a form field: the ids that tie the label and the\n * message to the control, and which message is currently displayed. Built by\n * `useFormField` and consumed by `FormFieldLabel` and `FormFieldMessage`, so\n * a component never wires ids or picks between help and error itself.\n */\ntype FormFieldState = {\n label?: React.ReactNode;\n /** Id of the label element, for `aria-labelledby` on ARIA widgets. */\n labelId: string;\n /** Id of the control, which an explicit label points at with `htmlFor`. */\n controlId: string;\n /** Id the help text renders with, referenced while it is displayed. */\n helpTextId: string;\n /** Id the error text renders with, referenced while it is displayed. */\n errorTextId: string;\n helpText?: React.ReactNode;\n errorText?: React.ReactNode;\n /** The displayed message. The error text while there is one, else the help text. */\n message?: React.ReactNode;\n /** Id of the displayed message; `undefined` while there is no message. */\n messageId?: string;\n /** Severity of the displayed message; `undefined` while there is no message. */\n messageSeverity?: FormFieldMessageSeverity;\n hasError: boolean;\n isRequired: boolean;\n hasRequiredIndicator: boolean;\n hasVisuallyHiddenLabel: boolean;\n};\n\n// These are DOM attribute names, so the boolean naming convention cannot apply.\n/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * ARIA attributes for the control the field describes. Spread onto the input\n * or the ARIA widget acting as one.\n */\ntype FormFieldControlProps = {\n 'aria-describedby': string | undefined;\n 'aria-invalid': true | undefined;\n};\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type {\n FormFieldControlProps,\n FormFieldMessageSeverity,\n FormFieldProps,\n FormFieldSize,\n FormFieldState,\n};\n"]}
@@ -0,0 +1,32 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.useFormFieldGroup = exports.FormFieldGroupContext = void 0;
24
+ const react_1 = require("react");
25
+ const FormFieldGroupContext = (0, react_1.createContext)(null);
26
+ exports.FormFieldGroupContext = FormFieldGroupContext;
27
+ const useFormFieldGroup = (controlType) => {
28
+ const context = (0, react_1.useContext)(FormFieldGroupContext);
29
+ return (context === null || context === void 0 ? void 0 : context.controlType) === controlType ? context : undefined;
30
+ };
31
+ exports.useFormFieldGroup = useFormFieldGroup;
32
+ //# sourceMappingURL=form-field-group-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-group-context.js","sourceRoot":"","sources":["../../../../src/_common/form-control/form-field-group-context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAGH,iCAAkD;AAelD,MAAM,qBAAqB,GAAG,IAAA,qBAAa,EACzC,IAAI,CACL,CAAC;AASA,sDAAqB;AAPvB,MAAM,iBAAiB,GAAG,CAAC,WAAsC,EAAE,EAAE;IACnE,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,qBAAqB,CAAC,CAAC;IAElD,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACpE,CAAC,CAAC;AAKA,8CAAiB","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 type React from 'react';\nimport { createContext, useContext } from 'react';\n\ntype FormFieldGroupControlType = 'checkbox' | 'radio';\n\ntype FormFieldGroupContextValue = {\n controlType: FormFieldGroupControlType;\n name?: string;\n isDisabled: boolean;\n isRequired: boolean;\n hasError: boolean;\n /** Selected radio value when the group is controlled. `null` means no selection. */\n value?: string | null;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nconst FormFieldGroupContext = createContext<FormFieldGroupContextValue | null>(\n null,\n);\n\nconst useFormFieldGroup = (controlType: FormFieldGroupControlType) => {\n const context = useContext(FormFieldGroupContext);\n\n return context?.controlType === controlType ? context : undefined;\n};\n\nexport {\n FormFieldGroupContext,\n type FormFieldGroupContextValue,\n useFormFieldGroup,\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -20,7 +20,7 @@
20
20
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.useInlineFieldLabel = exports.useFormField = exports.FormFieldMessage = exports.FormFieldLabel = void 0;
23
+ exports.useInlineFieldLabel = exports.useFormField = exports.useFormFieldGroup = exports.FormFieldGroupContext = exports.FormFieldMessage = exports.FormFieldLabel = void 0;
24
24
  /**
25
25
  * The internal form control layer (DES-1772): one implementation of the
26
26
  * label, the required indicator, the help text and the error message shared
@@ -32,6 +32,9 @@ var FormFieldLabel_1 = require("./FormFieldLabel");
32
32
  Object.defineProperty(exports, "FormFieldLabel", { enumerable: true, get: function () { return FormFieldLabel_1.FormFieldLabel; } });
33
33
  var FormFieldMessage_1 = require("./FormFieldMessage");
34
34
  Object.defineProperty(exports, "FormFieldMessage", { enumerable: true, get: function () { return FormFieldMessage_1.FormFieldMessage; } });
35
+ var form_field_group_context_1 = require("./form-field-group-context");
36
+ Object.defineProperty(exports, "FormFieldGroupContext", { enumerable: true, get: function () { return form_field_group_context_1.FormFieldGroupContext; } });
37
+ Object.defineProperty(exports, "useFormFieldGroup", { enumerable: true, get: function () { return form_field_group_context_1.useFormFieldGroup; } });
35
38
  var use_form_field_1 = require("./use-form-field");
36
39
  Object.defineProperty(exports, "useFormField", { enumerable: true, get: function () { return use_form_field_1.useFormField; } });
37
40
  var use_inline_field_label_1 = require("./use-inline-field-label");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_common/form-control/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;;;;;GAMG;AAEH,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAQzB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA","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\n/**\n * The internal form control layer (DES-1772): one implementation of the\n * label, the required indicator, the help text and the error message shared\n * by the form input components, plus the ARIA wiring that ties them to the\n * control. Internal only - not exported from the package index - so a future\n * public field API can be built on top without being constrained by it.\n */\n\nexport { FormFieldLabel } from './FormFieldLabel';\nexport { FormFieldMessage } from './FormFieldMessage';\nexport type {\n FormFieldControlProps,\n FormFieldMessageSeverity,\n FormFieldProps,\n FormFieldSize,\n FormFieldState,\n} from './form-control-types';\nexport { useFormField } from './use-form-field';\nexport { useInlineFieldLabel } from './use-inline-field-label';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_common/form-control/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;;;;;GAMG;AAEH,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,uEAIoC;AAHlC,iIAAA,qBAAqB,OAAA;AAErB,6HAAA,iBAAiB,OAAA;AASnB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA","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\n/**\n * The internal form control layer (DES-1772): one implementation of the\n * label, the required indicator, the help text and the error message shared\n * by the form input components, plus the ARIA wiring that ties them to the\n * control. Internal only - not exported from the package index - so a future\n * public field API can be built on top without being constrained by it.\n */\n\nexport { FormFieldLabel } from './FormFieldLabel';\nexport { FormFieldMessage } from './FormFieldMessage';\nexport {\n FormFieldGroupContext,\n type FormFieldGroupContextValue,\n useFormFieldGroup,\n} from './form-field-group-context';\nexport type {\n FormFieldControlProps,\n FormFieldMessageSeverity,\n FormFieldProps,\n FormFieldSize,\n FormFieldState,\n} from './form-control-types';\nexport { useFormField } from './use-form-field';\nexport { useInlineFieldLabel } from './use-inline-field-label';\n"]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"use-form-field.js","sourceRoot":"","sources":["../../../../src/_common/form-control/use-form-field.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,iCAA8B;AAkC9B;;;;;GAKG;AACI,MAAM,YAA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AAK,EAAE,CAC1D,CAAC;IAEF,OAAO;QACL,YAAY,EAAE;YACZ,kBAAkB,EAChB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;YAClE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAC5C;QACD,KAAK,EAAE;YACL,SAAS,EAAE,iBAAiB;YAC5B,SAAS;YACT,WAAW;YACX,QAAQ;YACR,oBAAoB;YACpB,sBAAsB;YACtB,QAAQ;YACR,UAAU;YACV,UAAU;YACV,KAAK;YACL,OAAO;YACP,OAAO;YACP,SAAS;YACT,eAAe;SAChB;KACF,CAAC;AACJ,CAAC,CAAC;AA3DW,QAAA,YAAY,gBA2DvB","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 { useId } from 'react';\n\nimport {\n type FormFieldControlProps,\n type FormFieldMessageSeverity,\n type FormFieldProps,\n type FormFieldState,\n} from './form-control-types';\n\ntype UseFormFieldOptions = FormFieldProps & {\n /**\n * Base for the generated ids, so a component that mints sibling ids of its\n * own (like the Combobox listbox and panel ids) can share one base.\n * Defaults to a generated id.\n */\n baseId?: string;\n /**\n * Overrides the generated control id, for controls that already name their\n * id (the Combobox trigger is `${baseId}-trigger`).\n */\n controlId?: string;\n /**\n * Ids referenced by `aria-describedby` before the message id, skipping\n * falsy entries (such as the TextInput clear/loading hint).\n */\n extraDescribedByIds?: (string | false | undefined)[];\n};\n\ntype UseFormFieldResult = {\n field: FormFieldState;\n /** ARIA attributes to spread onto the control the field describes. */\n controlProps: FormFieldControlProps;\n};\n\n/**\n * Resolves the shared form field state: id generation, which of help and\n * error is displayed - an error always replaces the help text - and the ARIA\n * wiring of the control. The parts are rendered by `FormFieldLabel` and\n * `FormFieldMessage`.\n */\nexport const useFormField = ({\n baseId,\n controlId,\n label,\n helpText,\n errorText,\n isRequired = false,\n hasRequiredIndicator = false,\n hasVisuallyHiddenLabel = false,\n extraDescribedByIds = [],\n}: UseFormFieldOptions): UseFormFieldResult => {\n const generatedBaseId = useId();\n const base = baseId ?? generatedBaseId;\n const labelId = `${base}-label`;\n const helpTextId = `${base}-help-text`;\n const errorTextId = `${base}-error-text`;\n const resolvedControlId = controlId ?? `${base}-control`;\n\n const hasError = Boolean(errorText);\n const hasHelpText = Boolean(helpText) && !hasError;\n const messageSeverity: FormFieldMessageSeverity | undefined = hasError\n ? 'error'\n : hasHelpText\n ? 'help'\n : undefined;\n const message = hasError ? errorText : hasHelpText ? helpText : undefined;\n const messageId = hasError\n ? errorTextId\n : hasHelpText\n ? helpTextId\n : undefined;\n\n const describedByIds = [...extraDescribedByIds, messageId].filter(\n (id): id is string => typeof id === 'string' && id !== '',\n );\n\n return {\n controlProps: {\n 'aria-describedby':\n describedByIds.length > 0 ? describedByIds.join(' ') : undefined,\n 'aria-invalid': hasError ? true : undefined,\n },\n field: {\n controlId: resolvedControlId,\n errorText,\n errorTextId,\n hasError,\n hasRequiredIndicator,\n hasVisuallyHiddenLabel,\n helpText,\n helpTextId,\n isRequired,\n label,\n labelId,\n message,\n messageId,\n messageSeverity,\n },\n };\n};\n"]}
1
+ {"version":3,"file":"use-form-field.js","sourceRoot":"","sources":["../../../../src/_common/form-control/use-form-field.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,iCAA8B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O,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,EAAE,CAC1D,CAAC;IAEF,OAAO;QACL,YAAY,EAAE;YACZ,kBAAkB,EAChB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;YAClE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAC5C;QACD,KAAK,EAAE;YACL,SAAS,EAAE,iBAAiB;YAC5B,SAAS;YACT,WAAW;YACX,QAAQ;YACR,oBAAoB;YACpB,sBAAsB;YACtB,QAAQ;YACR,UAAU;YACV,UAAU;YACV,KAAK;YACL,OAAO;YACP,OAAO;YACP,SAAS;YACT,eAAe;SAChB;KACF,CAAC;AACJ,CAAC,CAAC;AA3DW,QAAA,YAAY,gBA2DvB","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 { useId } from 'react';\n\nimport {\n type FormFieldControlProps,\n type FormFieldMessageSeverity,\n type FormFieldProps,\n type FormFieldState,\n} from './form-control-types';\n\ntype UseFormFieldOptions = FormFieldProps & {\n /**\n * Base for the generated ids, so a component that mints sibling ids of its\n * own (like the Combobox listbox and panel ids) can share one base.\n * Defaults to a generated id.\n */\n baseId?: string;\n /**\n * Overrides the generated control id, for controls that already name their\n * id (the Combobox trigger is `${baseId}-trigger`).\n */\n controlId?: string;\n /**\n * Ids referenced by `aria-describedby` before the message id, skipping\n * falsy entries (such as the TextInput clear/loading hint).\n */\n extraDescribedByIds?: (string | false | undefined)[];\n};\n\ntype UseFormFieldResult = {\n field: FormFieldState;\n /** ARIA attributes to spread onto the control the field describes. */\n controlProps: FormFieldControlProps;\n};\n\n/**\n * Resolves the shared form field state: id generation, which of help and\n * error is displayed - an error always replaces the help text - and the ARIA\n * wiring of the control. The parts are rendered by `FormFieldLabel` and\n * `FormFieldMessage`.\n */\nexport const useFormField = ({\n baseId,\n controlId,\n label,\n helpText,\n errorText,\n isRequired = false,\n hasRequiredIndicator = false,\n hasVisuallyHiddenLabel = false,\n extraDescribedByIds = [],\n}: UseFormFieldOptions): UseFormFieldResult => {\n const generatedBaseId = useId();\n const base = baseId ?? generatedBaseId;\n const labelId = `${base}-label`;\n const helpTextId = `${base}-help-text`;\n const errorTextId = `${base}-error-text`;\n const resolvedControlId = controlId ?? `${base}-control`;\n\n const hasError = Boolean(errorText);\n const hasHelpText = Boolean(helpText) && !hasError;\n const messageSeverity: FormFieldMessageSeverity | undefined = hasError\n ? 'error'\n : hasHelpText\n ? 'help'\n : undefined;\n const message = hasError ? errorText : hasHelpText ? helpText : undefined;\n const messageId = hasError\n ? errorTextId\n : hasHelpText\n ? helpTextId\n : undefined;\n\n const describedByIds = [...extraDescribedByIds, messageId].filter(\n (id): id is string => typeof id === 'string' && id !== '',\n );\n\n return {\n controlProps: {\n 'aria-describedby':\n describedByIds.length > 0 ? describedByIds.join(' ') : undefined,\n 'aria-invalid': hasError ? true : undefined,\n },\n field: {\n controlId: resolvedControlId,\n errorText,\n errorTextId,\n hasError,\n hasRequiredIndicator,\n hasVisuallyHiddenLabel,\n helpText,\n helpTextId,\n isRequired,\n label,\n labelId,\n message,\n messageId,\n messageSeverity,\n },\n };\n};\n"]}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.useInlineFieldLabel = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- /**
8
+ /*!
9
9
  *
10
10
  * Copyright (c) "Neo4j"
11
11
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"use-inline-field-label.js","sourceRoot":"","sources":["../../../../src/_common/form-control/use-inline-field-label.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,iCAA2C;AAE3C,oCAAgD;AAmChD;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,aAAa,EACb,KAAK,EACL,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,KAAK,GACQ,EAA6B,EAAE;IAC1D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK,EAAE,CAAC;YAC7D,IAAA,4BAAoB,EAClB,GAAG,aAAa,uGAAuG,CACxH,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAEtC,MAAM,YAAY,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChC,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CACL,iCACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAA,oBAAU,EAAC,4BAA4B,EAAE;oBAClD,cAAc,EAAE,UAAU;oBAC1B,eAAe,EAAE,WAAW;iBAC7B,CAAC,YAED,KAAK,GACD,CACR,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAErC,OAAO;QACL,cAAc,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE;YAClD,cAAc,EAAE,UAAU;YAC1B,WAAW,EAAE,OAAO;SACrB,CAAC;QACF,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AA7CW,QAAA,mBAAmB,uBA6C9B","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';\nimport { useEffect, useMemo } from 'react';\n\nimport { needleWarningMessage } from '../utils';\n\ntype UseInlineFieldLabelOptions = {\n /** Component name used in the missing-label console warning. */\n componentName: string;\n /** The label rendered next to the control, inside its wrapping `<label>`. */\n label: React.ReactNode;\n // TODO v5: only needed while naming a selection control is split across\n // `label` and `ariaLabel`. Whenever the label alone names the control, as it\n // does on Combobox, the warning below has nothing left to check.\n /** The aria label naming the control when the label is not a string. */\n ariaLabel: string | undefined;\n /** Dims the label and the control it belongs to. */\n isDisabled?: boolean;\n /** Lets the field take the full available width of its container. */\n isFluid?: boolean;\n /**\n * Truncates an overflowing string label to one line with an ellipsis (the\n * `title` set on the span keeps the full text reachable). Radio behavior\n * today; a candidate to unify across all selection controls in v5.\n */\n isTruncated?: boolean;\n};\n\ntype UseInlineFieldLabelResult = {\n /** The label, rendered next to the control. */\n labelContent: React.ReactNode;\n /**\n * Classes for the `<label>` that wraps the control and the label, which the\n * adopting component renders. Owned here so that the shared classes stay an\n * implementation detail of this module.\n */\n fieldClassName: string;\n};\n\n/**\n * The inline label of a selection control (Checkbox, Radio, Switch): the\n * control and its label text sit side by side inside one wrapping `<label>`.\n * A string label is wrapped in a titled span so a truncated label stays\n * readable through its tooltip; a custom node is rendered as given, which is\n * also why it needs `ariaLabel` to name the control. Warns when neither a\n * label nor an aria label is provided.\n *\n * Returns the classes of the wrapping label along with its content, so that\n * an adopting component never names a shared class itself. Typography and\n * color sit on that wrapper rather than on the span here, so that a custom\n * node inherits them too.\n *\n * TODO v5: wrap a custom node as well, once the DOM of a custom label can\n * change. This would own all label styling, and the difference between the\n * full-strength inline label and the weaker label above a control could then\n * become a prop here instead of living in two stylesheet classes.\n */\nexport const useInlineFieldLabel = ({\n componentName,\n label,\n ariaLabel,\n isDisabled = false,\n isFluid = false,\n isTruncated = false,\n}: UseInlineFieldLabelOptions): UseInlineFieldLabelResult => {\n useEffect(() => {\n if (Boolean(label) === false && Boolean(ariaLabel) === false) {\n needleWarningMessage(\n `${componentName} needs a valid label or ariaLabel: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI`,\n );\n }\n }, [ariaLabel, componentName, label]);\n\n const labelContent = useMemo(() => {\n if (Boolean(label) === false) {\n return null;\n }\n\n if (typeof label === 'string') {\n return (\n <span\n title={label}\n className={classNames('ndl-form-inline-label-text', {\n 'ndl-disabled': isDisabled,\n 'ndl-truncated': isTruncated,\n })}\n >\n {label}\n </span>\n );\n }\n\n return label;\n }, [label, isDisabled, isTruncated]);\n\n return {\n fieldClassName: classNames('ndl-form-inline-field', {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n }),\n labelContent,\n };\n};\n"]}
1
+ {"version":3,"file":"use-inline-field-label.js","sourceRoot":"","sources":["../../../../src/_common/form-control/use-inline-field-label.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,iCAA2C;AAE3C,o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]\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';\nimport { useEffect, useMemo } from 'react';\n\nimport { needleWarningMessage } from '../utils';\n\ntype UseInlineFieldLabelOptions = {\n /** Component name used in the missing-label console warning. */\n componentName: string;\n /** The label rendered next to the control, inside its wrapping `<label>`. */\n label: React.ReactNode;\n // TODO v5: only needed while naming a selection control is split across\n // `label` and `ariaLabel`. Whenever the label alone names the control, as it\n // does on Combobox, the warning below has nothing left to check.\n /** The aria label naming the control when the label is not a string. */\n ariaLabel: string | undefined;\n /** Dims the label and the control it belongs to. */\n isDisabled?: boolean;\n /** Lets the field take the full available width of its container. */\n isFluid?: boolean;\n /**\n * Truncates an overflowing string label to one line with an ellipsis (the\n * `title` set on the span keeps the full text reachable). Radio behavior\n * today; a candidate to unify across all selection controls in v5.\n */\n isTruncated?: boolean;\n};\n\ntype UseInlineFieldLabelResult = {\n /** The label, rendered next to the control. */\n labelContent: React.ReactNode;\n /**\n * Classes for the `<label>` that wraps the control and the label, which the\n * adopting component renders. Owned here so that the shared classes stay an\n * implementation detail of this module.\n */\n fieldClassName: string;\n};\n\n/**\n * The inline label of a selection control (Checkbox, Radio, Switch): the\n * control and its label text sit side by side inside one wrapping `<label>`.\n * A string label is wrapped in a titled span so a truncated label stays\n * readable through its tooltip; a custom node is rendered as given, which is\n * also why it needs `ariaLabel` to name the control. Warns when neither a\n * label nor an aria label is provided.\n *\n * Returns the classes of the wrapping label along with its content, so that\n * an adopting component never names a shared class itself. Typography and\n * color sit on that wrapper rather than on the span here, so that a custom\n * node inherits them too.\n *\n * TODO v5: wrap a custom node as well, once the DOM of a custom label can\n * change. This would own all label styling, and the difference between the\n * full-strength inline label and the weaker label above a control could then\n * become a prop here instead of living in two stylesheet classes.\n */\nexport const useInlineFieldLabel = ({\n componentName,\n label,\n ariaLabel,\n isDisabled = false,\n isFluid = false,\n isTruncated = false,\n}: UseInlineFieldLabelOptions): UseInlineFieldLabelResult => {\n useEffect(() => {\n if (Boolean(label) === false && Boolean(ariaLabel) === false) {\n needleWarningMessage(\n `${componentName} needs a valid label or ariaLabel: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI`,\n );\n }\n }, [ariaLabel, componentName, label]);\n\n const labelContent = useMemo(() => {\n if (Boolean(label) === false) {\n return null;\n }\n\n if (typeof label === 'string') {\n return (\n <span\n title={label}\n className={classNames('ndl-form-inline-label-text', {\n 'ndl-disabled': isDisabled,\n 'ndl-truncated': isTruncated,\n })}\n >\n {label}\n </span>\n );\n }\n\n return label;\n }, [label, isDisabled, isTruncated]);\n\n return {\n fieldClassName: classNames('ndl-form-inline-field', {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n }),\n labelContent,\n };\n};\n"]}
@@ -1,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * Neo4j Sweden AB [http://neo4j.com]
@@ -49,7 +49,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
50
  exports.AnnouncementBanner = void 0;
51
51
  const jsx_runtime_1 = require("react/jsx-runtime");
52
- /**
52
+ /*!
53
53
  *
54
54
  * Copyright (c) "Neo4j"
55
55
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"AnnouncementBanner.js","sourceRoot":"","sources":["../../../src/announcement-banner/AnnouncementBanner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAAuE;AAMvE,4DAAuD;AACvD,kFAA+E;AAC/E,wGAAqG;AACrG,4GAAyG;AACzG,wGAAqG;AACrG,sFAAmF;AACnF,oFAAiF;AACjF,8CAA2C;AAwE3C,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAE3C,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,OAAO,GAIR,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,CAAC;IAC1E,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;QAC1B,IAAI,gBAAgB,IAAI,IAAI,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,SAAS;gBACZ,OAAO,uBAAC,2DAA4B,KAAG,CAAC;YAC1C,KAAK,QAAQ;gBACX,OAAO,uBAAC,uDAA0B,KAAG,CAAC;YACxC,KAAK,WAAW;gBACd,OAAO,uBAAC,qCAAiB,KAAG,CAAC;YAC/B,KAAK,MAAM;gBACT,OAAO,uBAAC,uDAA0B,KAAG,CAAC;YACxC,KAAK,SAAS;gBACZ,OAAO,uBAAC,iCAAe,KAAG,CAAC;YAC7B;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,CACL,iCAAM,SAAS,EAAC,qCAAqC,iBAAa,MAAM,YACrE,aAAa,GACT,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,yBAAyB,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AAS,EAAC,qCAAqC,EAC/C,IAAI,EAAE,UAAU,iBACJ,MAAM,YAEjB,YAAY,GACR,CACR,EACD,gCAAK,SAAS,EAAC,mCAAmC,EAAC,GAAG,EAAE,UAAU,YAChE,uBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAClE,QAAQ,GAC0B,GACjC,EACL,WAAW,IAAI,CACd,gCAAK,SAAS,EAAC,+BAA+B,YAC5C,uBAAC,mCAAe,IACd,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,YAEzC,uBAAC,mCAAgB,KAAG,GACJ,GACd,CACP,KACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE;IACpE,OAAO,EAAE,yBAAyB;IAClC,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAC;AAEM,gDAAkB","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 React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { BoltIconOutline } from '../icons/generated/heroIcons/BoltIconOutline';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { ExclamationTriangleIconSolid } from '../icons/generated/heroIcons/ExclamationTriangleIconSolid';\nimport { InformationCircleIconSolid } from '../icons/generated/heroIcons/InformationCircleIconSolid';\nimport { SparklesIconSolid } from '../icons/generated/heroIcons/SparklesIconSolid';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { Typography } from '../typography';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype AnnouncementBannerVariant =\n | 'info'\n | 'warning'\n | 'danger'\n | 'discovery'\n | 'neutral';\n\ntype AnnouncementBannerLiveRegion = 'status' | 'alert';\n\ntype PendingAnnouncement = {\n message: string;\n role: AnnouncementBannerLiveRegion;\n};\n\ntype AnnouncementBannerCommonProps = {\n /** Shows a status icon. The icon is based on the value of the `variant` prop */\n hasIcon?: boolean;\n\n /**\n * Decorative icon shown when `hasIcon` is true. Only used for `discovery`\n * and `neutral`; those variants fall back to Sparkles and Bolt. `info`,\n * `warning`, and `danger` always use their status icons.\n */\n icon?: React.ReactNode;\n\n /** Content to be shown in the announcement banner. */\n children?: React.ReactNode;\n\n /**\n * Announces the header when the banner appears or its header changes.\n * `status` announces politely, while `alert` interrupts the user. Leave this\n * unset for banners that are present during the page's initial render.\n * This is independent of the visual `variant`.\n */\n liveRegion?: AnnouncementBannerLiveRegion;\n\n /** The variant of the announcement banner */\n variant?: AnnouncementBannerVariant;\n};\n\ntype CloseableAnnouncementBannerProps = {\n /** If the banner is closeable. Renders an icon button on the right */\n isCloseable: true;\n\n /** Event handler for when the close icon is clicked */\n onClose: (\n error?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\ntype NonCloseableAnnouncementBannerProps = {\n isCloseable?: false;\n onClose?: never;\n};\n\ntype AnnouncementBannerCloseProps =\n | CloseableAnnouncementBannerProps\n | NonCloseableAnnouncementBannerProps;\n\ntype AnnouncementBannerProps = AnnouncementBannerCommonProps &\n AnnouncementBannerCloseProps;\n\nconst LIVE_REGION_REGISTRATION_DELAY = 100;\n\nconst StatusIcon = ({\n icon,\n variant,\n}: {\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}) => {\n const canUseCustomIcon = variant === 'discovery' || variant === 'neutral';\n const iconComponent = (() => {\n if (canUseCustomIcon && icon) {\n return icon;\n }\n\n switch (variant) {\n case 'warning':\n return <ExclamationTriangleIconSolid />;\n case 'danger':\n return <ExclamationCircleIconSolid />;\n case 'discovery':\n return <SparklesIconSolid />;\n case 'info':\n return <InformationCircleIconSolid />;\n case 'neutral':\n return <BoltIconOutline />;\n default:\n return null;\n }\n })();\n\n return (\n <span className=\"ndl-announcement-banner-status-icon\" aria-hidden=\"true\">\n {iconComponent}\n </span>\n );\n};\n\nconst AnnouncementBannerContext = React.createContext<{\n hasIcon: boolean;\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}>({\n hasIcon: false,\n variant: 'info',\n});\n\n/**\n * Short title or message for the announcement.\n */\nconst AnnouncementBannerHeader = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', { children: React.ReactNode }>) => {\n const { hasIcon, icon, variant } = useContext(AnnouncementBannerContext);\n const classes = classNames('ndl-announcement-banner-header', className);\n return (\n <Typography\n as=\"span\"\n variant=\"body-medium\"\n className={classes}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {hasIcon && <StatusIcon icon={icon} variant={variant} />}\n {children}\n </Typography>\n );\n};\n\n/**\n * Optional actions shown next to the announcement message.\n */\nconst AnnouncementBannerActions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-announcement-banner-actions', className);\n return (\n <div\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Full-width announcement bar intended to sit at the top of its parent.\n * It stays in normal document flow so sibling content is shifted down.\n *\n * @remarks\n * Place `AnnouncementBanner` as the first child of a full-width parent (for\n * example the page shell).\n */\nconst AnnouncementBannerComponent = <\n TElement extends React.ElementType = 'section',\n>({\n as,\n variant = 'info',\n hasIcon = false,\n icon,\n onClose,\n className,\n children,\n isCloseable = false,\n htmlAttributes,\n liveRegion,\n ref,\n ...restProps\n}: PolymorphicCommonProps<TElement, AnnouncementBannerProps>) => {\n const Element: React.ElementType = as ?? 'section';\n const contentRef = useRef<HTMLDivElement>(null);\n const [pendingAnnouncement, setPendingAnnouncement] =\n useState<PendingAnnouncement | null>(null);\n\n const classes = classNames('ndl-announcement-banner', className, {\n 'ndl-announcement-banner-closeable': isCloseable,\n 'ndl-danger': variant === 'danger',\n 'ndl-discovery': variant === 'discovery',\n 'ndl-info': variant === 'info',\n 'ndl-neutral': variant === 'neutral',\n 'ndl-warning': variant === 'warning',\n });\n\n const handleClose = (\n error:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => {\n if (onClose && typeof onClose === 'function') {\n onClose(error);\n }\n };\n\n useEffect(() => {\n if (!liveRegion || !contentRef.current) {\n setPendingAnnouncement(null);\n return;\n }\n\n const header = contentRef.current.querySelector(\n '.ndl-announcement-banner-header',\n );\n\n if (!header) {\n setPendingAnnouncement(null);\n return;\n }\n\n let timeoutId: number | undefined;\n\n const announceHeader = () => {\n window.clearTimeout(timeoutId);\n setPendingAnnouncement(null);\n\n const message = header.textContent?.trim();\n\n if (message) {\n timeoutId = window.setTimeout(() => {\n setPendingAnnouncement({ message, role: liveRegion });\n }, LIVE_REGION_REGISTRATION_DELAY);\n }\n };\n\n const observer = new MutationObserver(announceHeader);\n observer.observe(header, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n announceHeader();\n\n return () => {\n observer.disconnect();\n window.clearTimeout(timeoutId);\n };\n }, [liveRegion]);\n\n const announcement =\n pendingAnnouncement?.role === liveRegion\n ? (pendingAnnouncement?.message ?? '')\n : '';\n\n return (\n <Element className={classes} ref={ref} {...restProps} {...htmlAttributes}>\n {liveRegion && (\n <span\n className=\"ndl-announcement-banner-live-region\"\n role={liveRegion}\n aria-atomic=\"true\"\n >\n {announcement}\n </span>\n )}\n <div className=\"ndl-announcement-banner-container\" ref={contentRef}>\n <AnnouncementBannerContext.Provider value={{ hasIcon, icon, variant }}>\n {children}\n </AnnouncementBannerContext.Provider>\n </div>\n {isCloseable && (\n <div className=\"ndl-announcement-banner-close\">\n <CleanIconButton\n size=\"small\"\n onClick={handleClose}\n description={null}\n htmlAttributes={{ 'aria-label': 'Close' }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n )}\n </Element>\n );\n};\n\nconst AnnouncementBanner = Object.assign(AnnouncementBannerComponent, {\n Actions: AnnouncementBannerActions,\n Header: AnnouncementBannerHeader,\n});\n\nexport { AnnouncementBanner };\n"]}
1
+ {"version":3,"file":"AnnouncementBanner.js","sourceRoot":"","sources":["../../../src/announcement-banner/AnnouncementBanner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAAuE;AAMvE,4DAAuD;AACvD,kFAA+E;AAC/E,wGAAqG;AACrG,4GAAyG;AACzG,wGAAqG;AACrG,sFAAmF;AACnF,oFAAiF;AACjF,8CAA2C;AAwE3C,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAE3C,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,OAAO,GAIR,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,CAAC;IAC1E,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;QAC1B,IAAI,gBAAgB,IAAI,IAAI,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,QAA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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 React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { BoltIconOutline } from '../icons/generated/heroIcons/BoltIconOutline';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { ExclamationTriangleIconSolid } from '../icons/generated/heroIcons/ExclamationTriangleIconSolid';\nimport { InformationCircleIconSolid } from '../icons/generated/heroIcons/InformationCircleIconSolid';\nimport { SparklesIconSolid } from '../icons/generated/heroIcons/SparklesIconSolid';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { Typography } from '../typography';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype AnnouncementBannerVariant =\n | 'info'\n | 'warning'\n | 'danger'\n | 'discovery'\n | 'neutral';\n\ntype AnnouncementBannerLiveRegion = 'status' | 'alert';\n\ntype PendingAnnouncement = {\n message: string;\n role: AnnouncementBannerLiveRegion;\n};\n\ntype AnnouncementBannerCommonProps = {\n /** Shows a status icon. The icon is based on the value of the `variant` prop */\n hasIcon?: boolean;\n\n /**\n * Decorative icon shown when `hasIcon` is true. Only used for `discovery`\n * and `neutral`; those variants fall back to Sparkles and Bolt. `info`,\n * `warning`, and `danger` always use their status icons.\n */\n icon?: React.ReactNode;\n\n /** Content to be shown in the announcement banner. */\n children?: React.ReactNode;\n\n /**\n * Announces the header when the banner appears or its header changes.\n * `status` announces politely, while `alert` interrupts the user. Leave this\n * unset for banners that are present during the page's initial render.\n * This is independent of the visual `variant`.\n */\n liveRegion?: AnnouncementBannerLiveRegion;\n\n /** The variant of the announcement banner */\n variant?: AnnouncementBannerVariant;\n};\n\ntype CloseableAnnouncementBannerProps = {\n /** If the banner is closeable. Renders an icon button on the right */\n isCloseable: true;\n\n /** Event handler for when the close icon is clicked */\n onClose: (\n error?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\ntype NonCloseableAnnouncementBannerProps = {\n isCloseable?: false;\n onClose?: never;\n};\n\ntype AnnouncementBannerCloseProps =\n | CloseableAnnouncementBannerProps\n | NonCloseableAnnouncementBannerProps;\n\ntype AnnouncementBannerProps = AnnouncementBannerCommonProps &\n AnnouncementBannerCloseProps;\n\nconst LIVE_REGION_REGISTRATION_DELAY = 100;\n\nconst StatusIcon = ({\n icon,\n variant,\n}: {\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}) => {\n const canUseCustomIcon = variant === 'discovery' || variant === 'neutral';\n const iconComponent = (() => {\n if (canUseCustomIcon && icon) {\n return icon;\n }\n\n switch (variant) {\n case 'warning':\n return <ExclamationTriangleIconSolid />;\n case 'danger':\n return <ExclamationCircleIconSolid />;\n case 'discovery':\n return <SparklesIconSolid />;\n case 'info':\n return <InformationCircleIconSolid />;\n case 'neutral':\n return <BoltIconOutline />;\n default:\n return null;\n }\n })();\n\n return (\n <span className=\"ndl-announcement-banner-status-icon\" aria-hidden=\"true\">\n {iconComponent}\n </span>\n );\n};\n\nconst AnnouncementBannerContext = React.createContext<{\n hasIcon: boolean;\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}>({\n hasIcon: false,\n variant: 'info',\n});\n\n/**\n * Short title or message for the announcement.\n */\nconst AnnouncementBannerHeader = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', { children: React.ReactNode }>) => {\n const { hasIcon, icon, variant } = useContext(AnnouncementBannerContext);\n const classes = classNames('ndl-announcement-banner-header', className);\n return (\n <Typography\n as=\"span\"\n variant=\"body-medium\"\n className={classes}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {hasIcon && <StatusIcon icon={icon} variant={variant} />}\n {children}\n </Typography>\n );\n};\n\n/**\n * Optional actions shown next to the announcement message.\n */\nconst AnnouncementBannerActions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-announcement-banner-actions', className);\n return (\n <div\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Full-width announcement bar intended to sit at the top of its parent.\n * It stays in normal document flow so sibling content is shifted down.\n *\n * @remarks\n * Place `AnnouncementBanner` as the first child of a full-width parent (for\n * example the page shell).\n */\nconst AnnouncementBannerComponent = <\n TElement extends React.ElementType = 'section',\n>({\n as,\n variant = 'info',\n hasIcon = false,\n icon,\n onClose,\n className,\n children,\n isCloseable = false,\n htmlAttributes,\n liveRegion,\n ref,\n ...restProps\n}: PolymorphicCommonProps<TElement, AnnouncementBannerProps>) => {\n const Element: React.ElementType = as ?? 'section';\n const contentRef = useRef<HTMLDivElement>(null);\n const [pendingAnnouncement, setPendingAnnouncement] =\n useState<PendingAnnouncement | null>(null);\n\n const classes = classNames('ndl-announcement-banner', className, {\n 'ndl-announcement-banner-closeable': isCloseable,\n 'ndl-danger': variant === 'danger',\n 'ndl-discovery': variant === 'discovery',\n 'ndl-info': variant === 'info',\n 'ndl-neutral': variant === 'neutral',\n 'ndl-warning': variant === 'warning',\n });\n\n const handleClose = (\n error:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => {\n if (onClose && typeof onClose === 'function') {\n onClose(error);\n }\n };\n\n useEffect(() => {\n if (!liveRegion || !contentRef.current) {\n setPendingAnnouncement(null);\n return;\n }\n\n const header = contentRef.current.querySelector(\n '.ndl-announcement-banner-header',\n );\n\n if (!header) {\n setPendingAnnouncement(null);\n return;\n }\n\n let timeoutId: number | undefined;\n\n const announceHeader = () => {\n window.clearTimeout(timeoutId);\n setPendingAnnouncement(null);\n\n const message = header.textContent?.trim();\n\n if (message) {\n timeoutId = window.setTimeout(() => {\n setPendingAnnouncement({ message, role: liveRegion });\n }, LIVE_REGION_REGISTRATION_DELAY);\n }\n };\n\n const observer = new MutationObserver(announceHeader);\n observer.observe(header, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n announceHeader();\n\n return () => {\n observer.disconnect();\n window.clearTimeout(timeoutId);\n };\n }, [liveRegion]);\n\n const announcement =\n pendingAnnouncement?.role === liveRegion\n ? (pendingAnnouncement?.message ?? '')\n : '';\n\n return (\n <Element className={classes} ref={ref} {...restProps} {...htmlAttributes}>\n {liveRegion && (\n <span\n className=\"ndl-announcement-banner-live-region\"\n role={liveRegion}\n aria-atomic=\"true\"\n >\n {announcement}\n </span>\n )}\n <div className=\"ndl-announcement-banner-container\" ref={contentRef}>\n <AnnouncementBannerContext.Provider value={{ hasIcon, icon, variant }}>\n {children}\n </AnnouncementBannerContext.Provider>\n </div>\n {isCloseable && (\n <div className=\"ndl-announcement-banner-close\">\n <CleanIconButton\n size=\"small\"\n onClick={handleClose}\n description={null}\n htmlAttributes={{ 'aria-label': 'Close' }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n )}\n </Element>\n );\n};\n\nconst AnnouncementBanner = Object.assign(AnnouncementBannerComponent, {\n Actions: AnnouncementBannerActions,\n Header: AnnouncementBannerHeader,\n});\n\nexport { AnnouncementBanner };\n"]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/announcement-banner/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,uDAAqC","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 './AnnouncementBanner';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/announcement-banner/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,uDAAqC","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 './AnnouncementBanner';\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-closeable.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-closeable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,0BAAkB,IACjB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,YAElD,uBAAC,0BAAkB,CAAC,MAAM,sDAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner\n isCloseable={true}\n onClose={() => alert('Announcement banner closed')}\n >\n <AnnouncementBanner.Header>\n This announcement can be dismissed.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-closeable.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-closeable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,0BAAkB,IACjB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,YAElD,uBAAC,0BAAkB,CAAC,MAAM,sDAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner\n isCloseable={true}\n onClose={() => alert('Announcement banner closed')}\n >\n <AnnouncementBanner.Header>\n This announcement can be dismissed.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-custom-icons.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-custom-icons.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAA8E;AAE9E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,0CAA0C,aACvD,uBAAC,0BAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,uBAAC,0BAAkB,CAAC,MAAM,2DAEE,GACT,EACrB,uBAAC,0BAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,uBAAC,qBAAa,KAAG,YAEvB,uBAAC,0BAAkB,CAAC,MAAM,oDAEE,GACT,EACrB,uBAAC,0BAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,uBAAC,0BAAkB,CAAC,MAAM,qDAEE,GACT,EACrB,uBAAC,0BAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,uBAAC,6BAAqB,KAAG,YAE/B,uBAAC,0BAAkB,CAAC,MAAM,oDAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\nimport { GiftIconSolid, RocketLaunchIconSolid } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery with the default Sparkles icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n icon={<GiftIconSolid />}\n >\n <AnnouncementBanner.Header>\n Discovery with a custom gift icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral with the default Bolt icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"neutral\"\n hasIcon={true}\n icon={<RocketLaunchIconSolid />}\n >\n <AnnouncementBanner.Header>\n Neutral with a custom rocket icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-custom-icons.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-custom-icons.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAA8E;AAE9E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,0CAA0C,aACvD,uBAAC,0BAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,uBAAC,0BAAkB,CAAC,MAAM,2DAEE,GACT,EACrB,uBAAC,0BAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,uBAAC,qBAAa,KAAG,YAEvB,uBAAC,0BAAkB,CAAC,MAAM,oDAEE,GACT,EACrB,uBAAC,0BAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,uBAAC,0BAAkB,CAAC,MAAM,qDAEE,GACT,EACrB,uBAAC,0BAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,uBAAC,6BAAqB,KAAG,YAE/B,uBAAC,0BAAkB,CAAC,MAAM,oDAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\nimport { GiftIconSolid, RocketLaunchIconSolid } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery with the default Sparkles icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n icon={<GiftIconSolid />}\n >\n <AnnouncementBanner.Header>\n Discovery with a custom gift icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral with the default Bolt icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"neutral\"\n hasIcon={true}\n icon={<RocketLaunchIconSolid />}\n >\n <AnnouncementBanner.Header>\n Neutral with a custom rocket icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-default.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,0BAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,uBAAC,0BAAkB,CAAC,MAAM,qEAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-default.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,0BAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,uBAAC,0BAAkB,CAAC,MAAM,qEAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-injected-non-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-non-urgent.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAI0B;AAC1B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,uBAAC,0BAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,UAAU,EAAC,QAAQ,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAElC,uBAAC,0BAAkB,CAAC,MAAM,yEAEE,GACT,CACtB,EACD,iCAAK,SAAS,EAAC,uEAAuE,aACpF,uBAAC,sBAAc,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAC/D,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,GACvC,EACjB,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,8GAEP,qEAA0C,EAAC,GAAG,gDAE3D,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 {\n AnnouncementBanner,\n OutlinedButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n liveRegion=\"status\"\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n New Aura features are available for your organization.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default\">\n <OutlinedButton onClick={() => setIsVisible((visible) => !visible)}>\n {isVisible ? 'Hide announcement' : 'Show announcement'}\n </OutlinedButton>\n <Typography variant=\"body-medium\">\n The page is already loaded. Toggle the announcement in to simulate a\n later campaign or poll. <code>liveRegion=&quot;status&quot;</code>{' '}\n announces politely without interrupting.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-injected-non-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-non-urgent.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAI0B;AAC1B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,uBAAC,0BAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,UAAU,EAAC,QAAQ,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAElC,uBAAC,0BAAkB,CAAC,MAAM,yEAEE,GACT,CACtB,EACD,iCAAK,SAAS,EAAC,uEAAuE,aACpF,uBAAC,sBAAc,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAC/D,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,GACvC,EACjB,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,8GAEP,qEAA0C,EAAC,GAAG,gDAE3D,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 {\n AnnouncementBanner,\n OutlinedButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n liveRegion=\"status\"\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n New Aura features are available for your organization.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default\">\n <OutlinedButton onClick={() => setIsVisible((visible) => !visible)}>\n {isVisible ? 'Hide announcement' : 'Show announcement'}\n </OutlinedButton>\n <Typography variant=\"body-medium\">\n The page is already loaded. Toggle the announcement in to simulate a\n later campaign or poll. <code>liveRegion=&quot;status&quot;</code>{' '}\n announces politely without interrupting.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-injected-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-urgent.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAI0B;AAC1B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,uBAAC,0BAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,OAAO,YACpE,uBAAC,0BAAkB,CAAC,MAAM,iFAEE,GACT,CACtB,EACD,iCAAK,SAAS,EAAC,uEAAuE,aACpF,uBAAC,sBAAc,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAC/D,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,GACvC,EACjB,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,wHAEI,GAAG,EACtC,oEAAyC,4EAE9B,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 {\n AnnouncementBanner,\n OutlinedButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n {isVisible && (\n <AnnouncementBanner variant=\"danger\" hasIcon={true} liveRegion=\"alert\">\n <AnnouncementBanner.Header>\n Error: connection to the database was lost. Reconnecting…\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default\">\n <OutlinedButton onClick={() => setIsVisible((visible) => !visible)}>\n {isVisible ? 'Hide announcement' : 'Show announcement'}\n </OutlinedButton>\n <Typography variant=\"body-medium\">\n The page is already loaded. Toggle the announcement in to simulate a\n connection loss or session expiry.{' '}\n <code>liveRegion=&quot;alert&quot;</code> interrupts the screen reader\n because the message is time-sensitive.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-injected-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-urgent.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAI0B;AAC1B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,uBAAC,0BAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,OAAO,YACpE,uBAAC,0BAAkB,CAAC,MAAM,iFAEE,GACT,CACtB,EACD,iCAAK,SAAS,EAAC,uEAAuE,aACpF,uBAAC,sBAAc,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAC/D,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,GACvC,EACjB,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,wHAEI,GAAG,EACtC,oEAAyC,4EAE9B,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 {\n AnnouncementBanner,\n OutlinedButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n {isVisible && (\n <AnnouncementBanner variant=\"danger\" hasIcon={true} liveRegion=\"alert\">\n <AnnouncementBanner.Header>\n Error: connection to the database was lost. Reconnecting…\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default\">\n <OutlinedButton onClick={() => setIsVisible((visible) => !visible)}>\n {isVisible ? 'Hide announcement' : 'Show announcement'}\n </OutlinedButton>\n <Typography variant=\"body-medium\">\n The page is already loaded. Toggle the announcement in to simulate a\n connection loss or session expiry.{' '}\n <code>liveRegion=&quot;alert&quot;</code> interrupts the screen reader\n because the message is time-sensitive.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-present-at-page-render.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-present-at-page-render.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkE;AAElE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACzC,uBAAC,0BAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,uBAAC,0BAAkB,CAAC,MAAM,mGAGE,GACT,EACrB,gCAAK,SAAS,EAAC,sCAAsC,YACnD,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,gLAIpB,GACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning: your marketplace subscription will be deprecated on September\n 19, 2026.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <div className=\"n-p-token-24 n-bg-neutral-bg-default\">\n <Typography variant=\"body-medium\">\n This banner is part of the initial page render, so `liveRegion` is\n omitted. Screen reader users hear it when they reach it in the page,\n not as an interruption.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-present-at-page-render.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-present-at-page-render.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkE;AAElE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACzC,uBAAC,0BAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,uBAAC,0BAAkB,CAAC,MAAM,mGAGE,GACT,EACrB,gCAAK,SAAS,EAAC,sCAAsC,YACnD,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,gLAIpB,GACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { AnnouncementBanner, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning: your marketplace subscription will be deprecated on September\n 19, 2026.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <div className=\"n-p-token-24 n-bg-neutral-bg-default\">\n <Typography variant=\"body-medium\">\n This banner is part of the initial page render, so `liveRegion` is\n omitted. Screen reader users hear it when they reach it in the page,\n not as an interruption.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
- /**
4
+ /*!
5
5
  *
6
6
  * Copyright (c) "Neo4j"
7
7
  * Neo4j Sweden AB [http://neo4j.com]