@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
@@ -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,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAmChD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,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,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK,EAAE,CAAC;YAC7D,oBAAoB,CAClB,GAAG,aAAa,uGAAuG,CACxH,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAEtC,MAAM,YAAY,GAAG,OAAO,CAAC,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,eACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CAAC,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,UAAU,CAAC,uBAAuB,EAAE;YAClD,cAAc,EAAE,UAAU;YAC1B,WAAW,EAAE,OAAO;SACrB,CAAC;QACF,YAAY;KACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\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,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAmChD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,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,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK,EAAE,CAAC;YAC7D,oBAAoB,CAClB,GAAG,aAAa,uGAAuG,CACxH,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAEtC,MAAM,YAAY,GAAG,OAAO,CAAC,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,eACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CAAC,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,UAAU,CAAC,uBAAuB,EAAE;YAClD,cAAc,EAAE,UAAU;YAC1B,WAAW,EAAE,OAAO;SACrB,CAAC;QACF,YAAY;KACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\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]
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- /**
13
+ /*!
14
14
  *
15
15
  * Copyright (c) "Neo4j"
16
16
  * 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,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,g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,EAAE,IAAI,EACjB,cAAc,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,YAEzC,KAAC,gBAAgB,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;AAEH,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\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,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;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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o4j 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,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * 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,cAAc,sBAAsB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './AnnouncementBanner';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/announcement-banner/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,sBAAsB,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './AnnouncementBanner';\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IACjB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,YAElD,KAAC,kBAAkB,CAAC,MAAM,sDAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IACjB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,YAElD,KAAC,kBAAkB,CAAC,MAAM,sDAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,2DAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,aAAa,KAAG,YAEvB,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,qDAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,qBAAqB,KAAG,YAE/B,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,2DAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,aAAa,KAAG,YAEvB,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,qDAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,qBAAqB,KAAG,YAE/B,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,qEAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,qEAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,KAAC,kBAAkB,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,KAAC,kBAAkB,CAAC,MAAM,yEAEE,GACT,CACtB,EACD,eAAK,SAAS,EAAC,uEAAuE,aACpF,KAAC,cAAc,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,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8GAEP,mDAA0C,EAAC,GAAG,gDAE3D,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,KAAC,kBAAkB,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,KAAC,kBAAkB,CAAC,MAAM,yEAEE,GACT,CACtB,EACD,eAAK,SAAS,EAAC,uEAAuE,aACpF,KAAC,cAAc,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,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8GAEP,mDAA0C,EAAC,GAAG,gDAE3D,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,OAAO,YACpE,KAAC,kBAAkB,CAAC,MAAM,iFAEE,GACT,CACtB,EACD,eAAK,SAAS,EAAC,uEAAuE,aACpF,KAAC,cAAc,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,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wHAEI,GAAG,EACtC,kDAAyC,4EAE9B,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,OAAO,YACpE,KAAC,kBAAkB,CAAC,MAAM,iFAEE,GACT,CACtB,EACD,eAAK,SAAS,EAAC,uEAAuE,aACpF,KAAC,cAAc,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,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wHAEI,GAAG,EACtC,kDAAyC,4EAE9B,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,mGAGE,GACT,EACrB,cAAK,SAAS,EAAC,sCAAsC,YACnD,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,gLAIpB,GACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,mGAGE,GACT,EACrB,cAAK,SAAS,EAAC,sCAAsC,YACnD,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,gLAIpB,GACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-variants.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,oCAA8C,GACrD,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,sCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,yCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>Info announcement</AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"warning\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Danger announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-variants.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,oCAA8C,GACrD,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,sCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,yCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>Info announcement</AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"warning\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Danger announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-with-actions.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-actions.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,kBAAkB,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,aAClD,KAAC,kBAAkB,CAAC,MAAM,6CAEE,EAC5B,MAAC,kBAAkB,CAAC,OAAO,eACzB,KAAC,cAAc,0BAAyB,EACxC,KAAC,UAAU,6BAAwB,IACR,IACV,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner hasIcon={true} variant=\"warning\">\n <AnnouncementBanner.Header>\n Your trial ends in 3 days.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Upgrade</OutlinedButton>\n <TextButton>Learn more</TextButton>\n </AnnouncementBanner.Actions>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-with-actions.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-actions.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,kBAAkB,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,aAClD,KAAC,kBAAkB,CAAC,MAAM,6CAEE,EAC5B,MAAC,kBAAkB,CAAC,OAAO,eACzB,KAAC,cAAc,0BAAyB,EACxC,KAAC,UAAU,6BAAwB,IACR,IACV,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner hasIcon={true} variant=\"warning\">\n <AnnouncementBanner.Header>\n Your trial ends in 3 days.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Upgrade</OutlinedButton>\n <TextButton>Learn more</TextButton>\n </AnnouncementBanner.Actions>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"announcement-banner-with-page-content.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-page-content.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACtD,SAAS,IAAI,CACZ,MAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAElC,KAAC,kBAAkB,CAAC,MAAM,qEAEE,EAC5B,KAAC,kBAAkB,CAAC,OAAO,cACzB,KAAC,cAAc,6BAA4B,GAChB,IACV,CACtB,EACD,eAAK,SAAS,EAAC,4GAA4G,aACxH,CAAC,SAAS,IAAI,CACb,wBACE,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,wCAEhC,GACT,CACP,EACD,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,2BAAwB,EACrD,KAAC,cAAc,4BAA2B,EAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,6sBAYpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,owBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,izBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oVAMpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,kpBAWpB,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(true);\n\n return (\n <div className=\"n-flex n-flex-col n-max-w-[768px] n-h-52\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"warning\"\n hasIcon={true}\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Learn more</OutlinedButton>\n </AnnouncementBanner.Actions>\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-flex-1 n-min-h-0 n-overflow-y-auto\">\n {!isVisible && (\n <div>\n <TextButton onClick={() => setIsVisible(true)}>\n Show announcement again\n </TextButton>\n </div>\n )}\n <Typography variant=\"title-2\">Page title</Typography>\n <OutlinedButton>Can focus</OutlinedButton>\n <Typography variant=\"body-medium\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque\n tempus, quam non molestie faucibus, orci nibh bibendum urna, ut\n lacinia orci dui a augue. Nullam at risus quam. Fusce pulvinar, metus\n vitae finibus dapibus, nisi ipsum venenatis sapien, at facilisis eros\n massa ac nunc. Aliquam sed odio orci. Vivamus condimentum sit amet\n ipsum bibendum sollicitudin. Etiam eget vehicula urna, et ullamcorper\n libero. Interdum et malesuada fames ac ante ipsum primis in faucibus.\n Proin sodales euismod sem, posuere maximus libero interdum semper.\n Nunc mollis posuere arcu non elementum. Vivamus sed laoreet mauris.\n Etiam fringilla arcu convallis erat vehicula iaculis. Pellentesque\n dictum aliquam cursus.\n </Typography>\n <Typography variant=\"body-medium\">\n Integer vehicula turpis quis risus aliquet congue. Vivamus\n pellentesque nibh ac blandit varius. Fusce placerat lacus ut mauris\n porta, nec facilisis risus pulvinar. Nullam elementum nulla ut laoreet\n imperdiet. Maecenas eget erat erat. Phasellus in turpis placerat,\n imperdiet ante nec, tincidunt nisl. Donec a lacus neque. Nullam\n iaculis ante molestie ultrices semper. Sed non lorem ullamcorper\n ligula elementum convallis. Aenean egestas risus quis tortor cursus\n dapibus. Nulla hendrerit at orci ut scelerisque. Nullam vel bibendum\n tellus. Praesent efficitur ultrices lectus at posuere. Maecenas\n facilisis lacus ac turpis malesuada, sit amet imperdiet ipsum\n condimentum. Donec et nibh eget justo luctus ornare. Maecenas suscipit\n nulla at ullamcorper congue.\n </Typography>\n <Typography variant=\"body-medium\">\n Vestibulum vehicula nibh mi, ultrices condimentum massa venenatis sit\n amet. Pellentesque accumsan mollis ex, id lobortis lacus venenatis id.\n Proin sem dui, mollis id gravida ac, vulputate et lacus. In pharetra\n nunc odio, in fermentum elit dignissim at. Nunc ut justo elit. Proin\n ligula orci, faucibus vitae vehicula nec, faucibus sit amet erat.\n Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque\n pharetra venenatis rutrum. Sed pharetra turpis id arcu maximus,\n interdum rhoncus eros mollis. Donec vitae sapien et odio interdum\n bibendum. Quisque eleifend, sem ut ornare mollis, orci nunc dapibus\n odio, aliquam fringilla augue nulla id magna. Phasellus consectetur,\n velit egestas sodales ultricies, odio nunc facilisis libero, vel\n vehicula nisi quam quis nisl. Proin vel massa libero.\n </Typography>\n <Typography variant=\"body-medium\">\n Sed mollis lacinia tincidunt. Curabitur blandit pellentesque\n consequat. Maecenas mollis pharetra dolor in ornare. Cras vel nibh eu\n nisi venenatis convallis id vel nisl. Curabitur et viverra nisl.\n Phasellus et finibus turpis. Praesent scelerisque vel lectus at\n imperdiet. Curabitur porta egestas magna ullamcorper hendrerit.\n </Typography>\n <Typography variant=\"body-medium\">\n Curabitur hendrerit egestas mi, ut venenatis turpis sagittis nec.\n Proin consectetur, nisi et vehicula placerat, tellus augue luctus\n odio, in commodo mauris urna nec libero. Maecenas eu placerat sapien,\n in aliquam tellus. Sed pharetra nunc id urna iaculis tincidunt. In hac\n habitasse platea dictumst. Donec tincidunt risus vitae congue congue.\n Fusce consequat ut justo ut tristique. Nunc ut urna quis neque\n consequat venenatis. Praesent nec feugiat orci. Vestibulum rutrum dui\n lacus, sit amet vulputate dolor finibus ut. Donec placerat urna eu\n fringilla convallis. Praesent sollicitudin felis at lacus semper, vel\n convallis magna scelerisque.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"announcement-banner-with-page-content.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-page-content.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACtD,SAAS,IAAI,CACZ,MAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAElC,KAAC,kBAAkB,CAAC,MAAM,qEAEE,EAC5B,KAAC,kBAAkB,CAAC,OAAO,cACzB,KAAC,cAAc,6BAA4B,GAChB,IACV,CACtB,EACD,eAAK,SAAS,EAAC,4GAA4G,aACxH,CAAC,SAAS,IAAI,CACb,wBACE,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,wCAEhC,GACT,CACP,EACD,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,2BAAwB,EACrD,KAAC,cAAc,4BAA2B,EAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,6sBAYpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,owBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,izBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oVAMpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,kpBAWpB,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(true);\n\n return (\n <div className=\"n-flex n-flex-col n-max-w-[768px] n-h-52\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"warning\"\n hasIcon={true}\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Learn more</OutlinedButton>\n </AnnouncementBanner.Actions>\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-flex-1 n-min-h-0 n-overflow-y-auto\">\n {!isVisible && (\n <div>\n <TextButton onClick={() => setIsVisible(true)}>\n Show announcement again\n </TextButton>\n </div>\n )}\n <Typography variant=\"title-2\">Page title</Typography>\n <OutlinedButton>Can focus</OutlinedButton>\n <Typography variant=\"body-medium\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque\n tempus, quam non molestie faucibus, orci nibh bibendum urna, ut\n lacinia orci dui a augue. Nullam at risus quam. Fusce pulvinar, metus\n vitae finibus dapibus, nisi ipsum venenatis sapien, at facilisis eros\n massa ac nunc. Aliquam sed odio orci. Vivamus condimentum sit amet\n ipsum bibendum sollicitudin. Etiam eget vehicula urna, et ullamcorper\n libero. Interdum et malesuada fames ac ante ipsum primis in faucibus.\n Proin sodales euismod sem, posuere maximus libero interdum semper.\n Nunc mollis posuere arcu non elementum. Vivamus sed laoreet mauris.\n Etiam fringilla arcu convallis erat vehicula iaculis. Pellentesque\n dictum aliquam cursus.\n </Typography>\n <Typography variant=\"body-medium\">\n Integer vehicula turpis quis risus aliquet congue. Vivamus\n pellentesque nibh ac blandit varius. Fusce placerat lacus ut mauris\n porta, nec facilisis risus pulvinar. Nullam elementum nulla ut laoreet\n imperdiet. Maecenas eget erat erat. Phasellus in turpis placerat,\n imperdiet ante nec, tincidunt nisl. Donec a lacus neque. Nullam\n iaculis ante molestie ultrices semper. Sed non lorem ullamcorper\n ligula elementum convallis. Aenean egestas risus quis tortor cursus\n dapibus. Nulla hendrerit at orci ut scelerisque. Nullam vel bibendum\n tellus. Praesent efficitur ultrices lectus at posuere. Maecenas\n facilisis lacus ac turpis malesuada, sit amet imperdiet ipsum\n condimentum. Donec et nibh eget justo luctus ornare. Maecenas suscipit\n nulla at ullamcorper congue.\n </Typography>\n <Typography variant=\"body-medium\">\n Vestibulum vehicula nibh mi, ultrices condimentum massa venenatis sit\n amet. Pellentesque accumsan mollis ex, id lobortis lacus venenatis id.\n Proin sem dui, mollis id gravida ac, vulputate et lacus. In pharetra\n nunc odio, in fermentum elit dignissim at. Nunc ut justo elit. Proin\n ligula orci, faucibus vitae vehicula nec, faucibus sit amet erat.\n Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque\n pharetra venenatis rutrum. Sed pharetra turpis id arcu maximus,\n interdum rhoncus eros mollis. Donec vitae sapien et odio interdum\n bibendum. Quisque eleifend, sem ut ornare mollis, orci nunc dapibus\n odio, aliquam fringilla augue nulla id magna. Phasellus consectetur,\n velit egestas sodales ultricies, odio nunc facilisis libero, vel\n vehicula nisi quam quis nisl. Proin vel massa libero.\n </Typography>\n <Typography variant=\"body-medium\">\n Sed mollis lacinia tincidunt. Curabitur blandit pellentesque\n consequat. Maecenas mollis pharetra dolor in ornare. Cras vel nibh eu\n nisi venenatis convallis id vel nisl. Curabitur et viverra nisl.\n Phasellus et finibus turpis. Praesent scelerisque vel lectus at\n imperdiet. Curabitur porta egestas magna ullamcorper hendrerit.\n </Typography>\n <Typography variant=\"body-medium\">\n Curabitur hendrerit egestas mi, ut venenatis turpis sagittis nec.\n Proin consectetur, nisi et vehicula placerat, tellus augue luctus\n odio, in commodo mauris urna nec libero. Maecenas eu placerat sapien,\n in aliquam tellus. Sed pharetra nunc id urna iaculis tincidunt. In hac\n habitasse platea dictumst. Donec tincidunt risus vitae congue congue.\n Fusce consequat ut justo ut tristique. Nunc ut urna quis neque\n consequat venenatis. Praesent nec feugiat orci. Vestibulum rutrum dui\n lacus, sit amet vulputate dolor finibus ut. Donec placerat urna eu\n fringilla convallis. Praesent sollicitudin felis at lacus semper, vel\n convallis magna scelerisque.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAC7G,OAAO,EAAE,OAAO,IAAI,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AACtH,OAAO,EAAE,OAAO,IAAI,mCAAmC,EAAE,MAAM,iDAAiD,CAAC;AACjH,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAE1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,iCAAiC,MAAM,2CAA2C,CAAC;AAC1F,OAAO,mCAAmC,MAAM,8CAA8C,CAAC;AAC/F,OAAO,+BAA+B,MAAM,yCAAyC,CAAC;AACtF,OAAO,yCAAyC,MAAM,qDAAqD,CAAC;AAC5G,OAAO,sCAAsC,MAAM,iDAAiD,CAAC;AACrG,OAAO,2CAA2C,MAAM,wDAAwD,CAAC;AACjH,OAAO,gCAAgC,MAAM,0CAA0C,CAAC;AACxF,OAAO,mCAAmC,MAAM,8CAA8C,CAAC;AAC/F,OAAO,uCAAuC,MAAM,mDAAmD,CAAC;AAExG,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAC7D,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,mBAAmB,CAC9D,gCAAgC,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CACjE,mCAAmC,CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAC/D,iCAAiC,CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CACjE,mCAAmC,CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CACrE,uCAAuC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,mBAAmB,CACzE,2CAA2C,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,mBAAmB,CACvE,yCAAyC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,mBAAmB,CACpE,sCAAsC,CACvC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as AnnouncementBannerDefault } from './announcement-banner-default.story';\nexport { default as AnnouncementBannerVariants } from './announcement-banner-variants.story';\nexport { default as AnnouncementBannerCustomIcons } from './announcement-banner-custom-icons.story';\nexport { default as AnnouncementBannerCloseable } from './announcement-banner-closeable.story';\nexport { default as AnnouncementBannerWithActions } from './announcement-banner-with-actions.story';\nexport { default as AnnouncementBannerWithPageContent } from './announcement-banner-with-page-content.story';\nexport { default as AnnouncementBannerPresentAtPageRender } from './announcement-banner-present-at-page-render.story';\nexport { default as AnnouncementBannerInjectedNonUrgent } from './announcement-banner-injected-non-urgent.story';\nexport { default as AnnouncementBannerInjectedUrgent } from './announcement-banner-injected-urgent.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AnnouncementBannerCloseableSrcRaw from './announcement-banner-closeable.story?raw';\nimport AnnouncementBannerCustomIconsSrcRaw from './announcement-banner-custom-icons.story?raw';\nimport AnnouncementBannerDefaultSrcRaw from './announcement-banner-default.story?raw';\nimport AnnouncementBannerInjectedNonUrgentSrcRaw from './announcement-banner-injected-non-urgent.story?raw';\nimport AnnouncementBannerInjectedUrgentSrcRaw from './announcement-banner-injected-urgent.story?raw';\nimport AnnouncementBannerPresentAtPageRenderSrcRaw from './announcement-banner-present-at-page-render.story?raw';\nimport AnnouncementBannerVariantsSrcRaw from './announcement-banner-variants.story?raw';\nimport AnnouncementBannerWithActionsSrcRaw from './announcement-banner-with-actions.story?raw';\nimport AnnouncementBannerWithPageContentSrcRaw from './announcement-banner-with-page-content.story?raw';\n\nexport const AnnouncementBannerDefaultSrc = removeLicenseHeader(\n AnnouncementBannerDefaultSrcRaw,\n);\n\nexport const AnnouncementBannerVariantsSrc = removeLicenseHeader(\n AnnouncementBannerVariantsSrcRaw,\n);\n\nexport const AnnouncementBannerCustomIconsSrc = removeLicenseHeader(\n AnnouncementBannerCustomIconsSrcRaw,\n);\n\nexport const AnnouncementBannerCloseableSrc = removeLicenseHeader(\n AnnouncementBannerCloseableSrcRaw,\n);\n\nexport const AnnouncementBannerWithActionsSrc = removeLicenseHeader(\n AnnouncementBannerWithActionsSrcRaw,\n);\n\nexport const AnnouncementBannerWithPageContentSrc = removeLicenseHeader(\n AnnouncementBannerWithPageContentSrcRaw,\n);\n\nexport const AnnouncementBannerPresentAtPageRenderSrc = removeLicenseHeader(\n AnnouncementBannerPresentAtPageRenderSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedNonUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedNonUrgentSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedUrgentSrcRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAC7G,OAAO,EAAE,OAAO,IAAI,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;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["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as AnnouncementBannerDefault } from './announcement-banner-default.story';\nexport { default as AnnouncementBannerVariants } from './announcement-banner-variants.story';\nexport { default as AnnouncementBannerCustomIcons } from './announcement-banner-custom-icons.story';\nexport { default as AnnouncementBannerCloseable } from './announcement-banner-closeable.story';\nexport { default as AnnouncementBannerWithActions } from './announcement-banner-with-actions.story';\nexport { default as AnnouncementBannerWithPageContent } from './announcement-banner-with-page-content.story';\nexport { default as AnnouncementBannerPresentAtPageRender } from './announcement-banner-present-at-page-render.story';\nexport { default as AnnouncementBannerInjectedNonUrgent } from './announcement-banner-injected-non-urgent.story';\nexport { default as AnnouncementBannerInjectedUrgent } from './announcement-banner-injected-urgent.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AnnouncementBannerCloseableSrcRaw from './announcement-banner-closeable.story?raw';\nimport AnnouncementBannerCustomIconsSrcRaw from './announcement-banner-custom-icons.story?raw';\nimport AnnouncementBannerDefaultSrcRaw from './announcement-banner-default.story?raw';\nimport AnnouncementBannerInjectedNonUrgentSrcRaw from './announcement-banner-injected-non-urgent.story?raw';\nimport AnnouncementBannerInjectedUrgentSrcRaw from './announcement-banner-injected-urgent.story?raw';\nimport AnnouncementBannerPresentAtPageRenderSrcRaw from './announcement-banner-present-at-page-render.story?raw';\nimport AnnouncementBannerVariantsSrcRaw from './announcement-banner-variants.story?raw';\nimport AnnouncementBannerWithActionsSrcRaw from './announcement-banner-with-actions.story?raw';\nimport AnnouncementBannerWithPageContentSrcRaw from './announcement-banner-with-page-content.story?raw';\n\nexport const AnnouncementBannerDefaultSrc = removeLicenseHeader(\n AnnouncementBannerDefaultSrcRaw,\n);\n\nexport const AnnouncementBannerVariantsSrc = removeLicenseHeader(\n AnnouncementBannerVariantsSrcRaw,\n);\n\nexport const AnnouncementBannerCustomIconsSrc = removeLicenseHeader(\n AnnouncementBannerCustomIconsSrcRaw,\n);\n\nexport const AnnouncementBannerCloseableSrc = removeLicenseHeader(\n AnnouncementBannerCloseableSrcRaw,\n);\n\nexport const AnnouncementBannerWithActionsSrc = removeLicenseHeader(\n AnnouncementBannerWithActionsSrcRaw,\n);\n\nexport const AnnouncementBannerWithPageContentSrc = removeLicenseHeader(\n AnnouncementBannerWithPageContentSrcRaw,\n);\n\nexport const AnnouncementBannerPresentAtPageRenderSrc = removeLicenseHeader(\n AnnouncementBannerPresentAtPageRenderSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedNonUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedNonUrgentSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedUrgentSrcRaw,\n);\n"]}
@@ -1,4 +1,4 @@
1
- /**
1
+ /*!
2
2
  *
3
3
  * Copyright (c) "Neo4j"
4
4
  * Neo4j Sweden AB [http://neo4j.com]
@@ -33,11 +33,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
33
  import { useMergeRefs } from '@floating-ui/react';
34
34
  import classNames from 'classnames';
35
35
  import { useEffect, useRef } from 'react';
36
- import { useInlineFieldLabel } from '../_common/form-control';
36
+ import { useFormFieldGroup, useInlineFieldLabel, } from '../_common/form-control';
37
37
  import { useSemiControlledInput } from '../_common/use-semi-controlled-input';
38
38
  export const Checkbox = (_a) => {
39
39
  var _b;
40
40
  var { isChecked, isDefaultChecked, isIndeterminate = false, isFluid = false, isDisabled = false, hasLeadingLabel, ariaLabel, onChange, onClick, value, label, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["isChecked", "isDefaultChecked", "isIndeterminate", "isFluid", "isDisabled", "hasLeadingLabel", "ariaLabel", "onChange", "onClick", "value", "label", "className", "style", "htmlAttributes", "ref"]);
41
+ const group = useFormFieldGroup('checkbox');
42
+ const _c = htmlAttributes !== null && htmlAttributes !== void 0 ? htmlAttributes : {}, { 'aria-describedby': htmlAriaDescribedBy, 'aria-invalid': htmlAriaInvalid } = _c, inputHtmlAttributes = __rest(_c, ['aria-describedby', 'aria-invalid']);
43
+ const isDisabledState = isDisabled || (group === null || group === void 0 ? void 0 : group.isDisabled) === true;
41
44
  const internalRef = useRef(null);
42
45
  const mergedRefs = useMergeRefs([internalRef, ref]);
43
46
  const [isCheckedState, internalOnChange] = useSemiControlledInput({
@@ -47,7 +50,7 @@ export const Checkbox = (_a) => {
47
50
  state: (_b = isChecked !== null && isChecked !== void 0 ? isChecked : isDefaultChecked) !== null && _b !== void 0 ? _b : false,
48
51
  });
49
52
  const checkboxClasses = classNames('ndl-checkbox', className, {
50
- 'ndl-disabled': isDisabled,
53
+ 'ndl-disabled': isDisabledState,
51
54
  });
52
55
  useEffect(() => {
53
56
  if (internalRef.current) {
@@ -57,10 +60,10 @@ export const Checkbox = (_a) => {
57
60
  const { labelContent, fieldClassName } = useInlineFieldLabel({
58
61
  ariaLabel,
59
62
  componentName: 'Checkbox',
60
- isDisabled,
63
+ isDisabled: isDisabledState,
61
64
  isFluid,
62
65
  label,
63
66
  });
64
- return (_jsxs("label", { className: fieldClassName, children: [hasLeadingLabel === true && labelContent, _jsx("input", Object.assign({ ref: mergedRefs, type: "checkbox", "aria-label": ariaLabel, disabled: isDisabled, checked: isCheckedState, onClick: onClick, onChange: internalOnChange, value: value, style: style, className: checkboxClasses }, restProps, htmlAttributes)), Boolean(hasLeadingLabel) === false && labelContent] }));
67
+ return (_jsxs("label", { className: fieldClassName, children: [hasLeadingLabel === true && labelContent, _jsx("input", Object.assign({ ref: mergedRefs, type: "checkbox", "aria-label": ariaLabel, "aria-describedby": htmlAriaDescribedBy, "aria-invalid": (group === null || group === void 0 ? void 0 : group.hasError) === true ? true : htmlAriaInvalid, disabled: isDisabledState, checked: isCheckedState, name: group === null || group === void 0 ? void 0 : group.name, onClick: onClick, onChange: internalOnChange, value: value, style: style, className: checkboxClasses }, restProps, inputHtmlAttributes)), Boolean(hasLeadingLabel) === false && labelContent] }));
65
68
  };
66
69
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAuC9E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAiBa,EAAE,EAAE;;QAjBjB,EACvB,SAAS,EACT,gBAAgB,EAChB,eAAe,GAAG,KAAK,EACvB,OAAO,GAAG,KAAK,EACf,UAAU,GAAG,KAAK,EAClB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEiC,EADjC,SAAS,cAhBW,qMAiBxB,CADa;IAEZ,MAAM,WAAW,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;IAEpD,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,sBAAsB,CAAC;QAChE,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,SAAS,KAAK,SAAS;QACrC,QAAQ;QACR,KAAK,EAAE,MAAA,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,gBAAgB,mCAAI,KAAK;KAC9C,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE;QAC5D,cAAc,EAAE,UAAU;KAC3B,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YACxB,WAAW,CAAC,OAAO,CAAC,aAAa,GAAG,eAAe,CAAC;QACtD,CAAC;IACH,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,mBAAmB,CAAC;QAC3D,SAAS;QACT,aAAa,EAAE,UAAU;QACzB,UAAU;QACV,OAAO;QACP,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,CACL,iBAAO,SAAS,EAAE,cAAc,aAC7B,eAAe,KAAK,IAAI,IAAI,YAAY,EACzC,8BACE,GAAG,EAAE,UAAU,EACf,IAAI,EAAC,UAAU,gBACH,SAAS,EACrB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,eAAe,IACtB,SAAS,EACT,cAAc,EAClB,EACD,OAAO,CAAC,eAAe,CAAC,KAAK,KAAK,IAAI,YAAY,IAC7C,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { useEffect, useRef } from 'react';\n\nimport { useInlineFieldLabel } from '../_common/form-control';\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\n\ntype CheckboxProps = {\n /** Whether the checkbox is checked */\n isChecked?: boolean;\n /** Checks the input by default in uncontrolled mode */\n isDefaultChecked?: boolean; // isDefaultChecked sounds weird to me?\n /** Whether the checkbox is indeterminate */\n isIndeterminate?: boolean;\n /** Whether the checkbox is disabled */\n isDisabled?: boolean;\n /** Whether the checkbox & label should take the full available width of its container */\n isFluid?: boolean;\n /** The value of the checkbox */\n value?: HtmlAttributes<'input'>['value']; // should this be required?\n /** Whether the label should be displayed before the checkbox */\n hasLeadingLabel?: boolean;\n /** The callback function triggered when the checkbox value changes */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** The callback function triggered when the checkbox is clicked */\n onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;\n} & (\n | {\n /** The aria label of the checkbox. Required if the label is not a string. */\n ariaLabel: string;\n // TODO v5: inconsistent naming. Naming the checkbox takes a union of\n // `label` and `ariaLabel`, so the accessible name comes from a different\n // prop depending on what the label renders. Combobox instead requires the\n // label and clips it with `hasVisuallyHiddenLabel`, and TextInput reaches\n // for htmlAttributes['aria-label'].\n /** The label of the checkbox. If not a string, supply an aria label for screen reader support. */\n label?: undefined;\n }\n | {\n ariaLabel?: string;\n label: React.ReactNode;\n }\n);\n\nexport const Checkbox = ({\n isChecked,\n isDefaultChecked,\n isIndeterminate = false,\n isFluid = false,\n isDisabled = false,\n hasLeadingLabel,\n ariaLabel,\n onChange,\n onClick,\n value,\n label,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'input', CheckboxProps>) => {\n const internalRef = useRef<HTMLInputElement>(null);\n const mergedRefs = useMergeRefs([internalRef, ref]);\n\n const [isCheckedState, internalOnChange] = useSemiControlledInput({\n inputType: 'checkbox',\n isControlled: isChecked !== undefined,\n onChange,\n state: isChecked ?? isDefaultChecked ?? false,\n });\n\n const checkboxClasses = classNames('ndl-checkbox', className, {\n 'ndl-disabled': isDisabled,\n });\n\n useEffect(() => {\n if (internalRef.current) {\n internalRef.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n const { labelContent, fieldClassName } = useInlineFieldLabel({\n ariaLabel,\n componentName: 'Checkbox',\n isDisabled,\n isFluid,\n label,\n });\n\n return (\n <label className={fieldClassName}>\n {hasLeadingLabel === true && labelContent}\n <input\n ref={mergedRefs}\n type=\"checkbox\"\n aria-label={ariaLabel}\n disabled={isDisabled}\n checked={isCheckedState}\n onClick={onClick}\n onChange={internalOnChange}\n value={value}\n style={style}\n className={checkboxClasses}\n {...restProps}\n {...htmlAttributes}\n />\n {Boolean(hasLeadingLabel) === false && labelContent}\n </label>\n );\n};\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAuC9E,MAAM,CAAC,MAAM,QAA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AC;IACH,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,mBAAmB,CAAC;QAC3D,SAAS;QACT,aAAa,EAAE,UAAU;QACzB,UAAU,EAAE,eAAe;QAC3B,OAAO;QACP,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,CACL,iBAAO,SAAS,EAAE,cAAc,aAC7B,eAAe,KAAK,IAAI,IAAI,YAAY,EACzC,8BACE,GAAG,EAAE,UAAU,EACf,IAAI,EAAC,UAAU,gBACH,SAAS,sBACH,mBAAmB,kBACvB,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,MAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAC/D,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,eAAe,IACtB,SAAS,EACT,mBAAmB,EACvB,EACD,OAAO,CAAC,eAAe,CAAC,KAAK,KAAK,IAAI,YAAY,IAC7C,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useMergeRefs } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { useEffect, useRef } from 'react';\n\nimport {\n useFormFieldGroup,\n useInlineFieldLabel,\n} from '../_common/form-control';\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\n\ntype CheckboxProps = {\n /** Whether the checkbox is checked */\n isChecked?: boolean;\n /** Checks the input by default in uncontrolled mode */\n isDefaultChecked?: boolean; // isDefaultChecked sounds weird to me?\n /** Whether the checkbox is indeterminate */\n isIndeterminate?: boolean;\n /** Whether the checkbox is disabled */\n isDisabled?: boolean;\n /** Whether the checkbox & label should take the full available width of its container */\n isFluid?: boolean;\n /** The value of the checkbox */\n value?: HtmlAttributes<'input'>['value']; // should this be required?\n /** Whether the label should be displayed before the checkbox */\n hasLeadingLabel?: boolean;\n /** The callback function triggered when the checkbox value changes */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** The callback function triggered when the checkbox is clicked */\n onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;\n} & (\n | {\n /** The aria label of the checkbox. Required if the label is not a string. */\n ariaLabel: string;\n // TODO v5: inconsistent naming. Naming the checkbox takes a union of\n // `label` and `ariaLabel`, so the accessible name comes from a different\n // prop depending on what the label renders. Combobox instead requires the\n // label and clips it with `hasVisuallyHiddenLabel`, and TextInput reaches\n // for htmlAttributes['aria-label'].\n /** The label of the checkbox. If not a string, supply an aria label for screen reader support. */\n label?: undefined;\n }\n | {\n ariaLabel?: string;\n label: React.ReactNode;\n }\n);\n\nexport const Checkbox = ({\n isChecked,\n isDefaultChecked,\n isIndeterminate = false,\n isFluid = false,\n isDisabled = false,\n hasLeadingLabel,\n ariaLabel,\n onChange,\n onClick,\n value,\n label,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'input', CheckboxProps>) => {\n const group = useFormFieldGroup('checkbox');\n const {\n 'aria-describedby': htmlAriaDescribedBy,\n 'aria-invalid': htmlAriaInvalid,\n ...inputHtmlAttributes\n } = htmlAttributes ?? {};\n const isDisabledState = isDisabled || group?.isDisabled === true;\n const internalRef = useRef<HTMLInputElement>(null);\n const mergedRefs = useMergeRefs([internalRef, ref]);\n\n const [isCheckedState, internalOnChange] = useSemiControlledInput({\n inputType: 'checkbox',\n isControlled: isChecked !== undefined,\n onChange,\n state: isChecked ?? isDefaultChecked ?? false,\n });\n\n const checkboxClasses = classNames('ndl-checkbox', className, {\n 'ndl-disabled': isDisabledState,\n });\n\n useEffect(() => {\n if (internalRef.current) {\n internalRef.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n const { labelContent, fieldClassName } = useInlineFieldLabel({\n ariaLabel,\n componentName: 'Checkbox',\n isDisabled: isDisabledState,\n isFluid,\n label,\n });\n\n return (\n <label className={fieldClassName}>\n {hasLeadingLabel === true && labelContent}\n <input\n ref={mergedRefs}\n type=\"checkbox\"\n aria-label={ariaLabel}\n aria-describedby={htmlAriaDescribedBy}\n aria-invalid={group?.hasError === true ? true : htmlAriaInvalid}\n disabled={isDisabledState}\n checked={isCheckedState}\n name={group?.name}\n onClick={onClick}\n onChange={internalOnChange}\n value={value}\n style={style}\n className={checkboxClasses}\n {...restProps}\n {...inputHtmlAttributes}\n />\n {Boolean(hasLeadingLabel) === false && labelContent}\n </label>\n );\n};\n"]}
@@ -0,0 +1,49 @@
1
+ /*!
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ var __rest = (this && this.__rest) || function (s, e) {
23
+ var t = {};
24
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
25
+ t[p] = s[p];
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
27
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
28
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
29
+ t[p[i]] = s[p[i]];
30
+ }
31
+ return t;
32
+ };
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ import { FieldsetBase } from '../fieldset/Fieldset';
35
+ /**
36
+ * Groups atomic `Checkbox` components under an accessible legend.
37
+ *
38
+ * @remarks
39
+ * Checked state remains on each `Checkbox`. Browsers cannot natively validate
40
+ * an “at least one” checkbox requirement, so applications should set
41
+ * `errorText` after validating a required group.
42
+ */
43
+ const CheckboxGroup = (_a) => {
44
+ var { name, isDisabled = false, isRequired = false } = _a, props = __rest(_a, ["name", "isDisabled", "isRequired"]);
45
+ return (_jsx(FieldsetBase, Object.assign({}, props, { isDisabled: isDisabled, isRequired: isRequired, fieldGroup: { controlType: 'checkbox', name } })));
46
+ };
47
+ CheckboxGroup.displayName = 'CheckboxGroup';
48
+ export { CheckboxGroup };
49
+ //# sourceMappingURL=CheckboxGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/checkbox-group/CheckboxGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,OAAO,EAAE,YAAY,EAAsB,MAAM,sBAAsB,CAAC;AAOxE;;;;;;;GAOG;AACH,MAAM,aAAa,GAAG,CAAC,EAKuB,EAAE,EAAE;QAL3B,EACrB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,OAE0B,EADzC,KAAK,cAJa,oCAKtB,CADS;IACyC,OAAA,CACjD,KAAC,YAAY,oBACP,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,IAC7C,CACH,CAAA;CAAA,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type CommonProps } from '../_common/types';\nimport { FieldsetBase, type FieldsetProps } from '../fieldset/Fieldset';\n\ntype CheckboxGroupProps = FieldsetProps & {\n /** Shared native name for checkbox form values */\n name?: string;\n};\n\n/**\n * Groups atomic `Checkbox` components under an accessible legend.\n *\n * @remarks\n * Checked state remains on each `Checkbox`. Browsers cannot natively validate\n * an “at least one” checkbox requirement, so applications should set\n * `errorText` after validating a required group.\n */\nconst CheckboxGroup = ({\n name,\n isDisabled = false,\n isRequired = false,\n ...props\n}: CommonProps<'fieldset', CheckboxGroupProps>) => (\n <FieldsetBase\n {...props}\n isDisabled={isDisabled}\n isRequired={isRequired}\n fieldGroup={{ controlType: 'checkbox', name }}\n />\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\nexport { CheckboxGroup };\n"]}