@neo4j-ndl/react 4.18.13 → 4.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/lib/LICENSES.txt +54 -0
  2. package/lib/NOTICE.txt +8 -0
  3. package/lib/cjs/_common/use-semi-controlled-state.js +6 -1
  4. package/lib/cjs/_common/use-semi-controlled-state.js.map +1 -1
  5. package/lib/cjs/combobox/Combobox.js +1031 -0
  6. package/lib/cjs/combobox/Combobox.js.map +1 -0
  7. package/lib/cjs/combobox/combobox-types.js +23 -0
  8. package/lib/cjs/combobox/combobox-types.js.map +1 -0
  9. package/lib/cjs/combobox/combobox-utils.js +129 -0
  10. package/lib/cjs/combobox/combobox-utils.js.map +1 -0
  11. package/lib/cjs/combobox/index.js +26 -0
  12. package/lib/cjs/combobox/index.js.map +1 -0
  13. package/lib/cjs/combobox/stories/combobox-action-on-select.story.js +82 -0
  14. package/lib/cjs/combobox/stories/combobox-action-on-select.story.js.map +1 -0
  15. package/lib/cjs/combobox/stories/combobox-actions.story.js +78 -0
  16. package/lib/cjs/combobox/stories/combobox-actions.story.js.map +1 -0
  17. package/lib/cjs/combobox/stories/combobox-async.story.js +75 -0
  18. package/lib/cjs/combobox/stories/combobox-async.story.js.map +1 -0
  19. package/lib/cjs/combobox/stories/combobox-clean.story.js +38 -0
  20. package/lib/cjs/combobox/stories/combobox-clean.story.js.map +1 -0
  21. package/lib/cjs/combobox/stories/combobox-creatable.story.js +41 -0
  22. package/lib/cjs/combobox/stories/combobox-creatable.story.js.map +1 -0
  23. package/lib/cjs/combobox/stories/combobox-custom-multi.story.js +45 -0
  24. package/lib/cjs/combobox/stories/combobox-custom-multi.story.js.map +1 -0
  25. package/lib/cjs/combobox/stories/combobox-custom-single.story.js +44 -0
  26. package/lib/cjs/combobox/stories/combobox-custom-single.story.js.map +1 -0
  27. package/lib/cjs/combobox/stories/combobox-custom-trigger.story.js +60 -0
  28. package/lib/cjs/combobox/stories/combobox-custom-trigger.story.js.map +1 -0
  29. package/lib/cjs/combobox/stories/combobox-default.story.js +42 -0
  30. package/lib/cjs/combobox/stories/combobox-default.story.js.map +1 -0
  31. package/lib/cjs/combobox/stories/combobox-descriptions.story.js +45 -0
  32. package/lib/cjs/combobox/stories/combobox-descriptions.story.js.map +1 -0
  33. package/lib/cjs/combobox/stories/combobox-disabled.story.js +34 -0
  34. package/lib/cjs/combobox/stories/combobox-disabled.story.js.map +1 -0
  35. package/lib/cjs/combobox/stories/combobox-fluid.story.js +34 -0
  36. package/lib/cjs/combobox/stories/combobox-fluid.story.js.map +1 -0
  37. package/lib/cjs/combobox/stories/combobox-groups.story.js +49 -0
  38. package/lib/cjs/combobox/stories/combobox-groups.story.js.map +1 -0
  39. package/lib/cjs/combobox/stories/combobox-hidden-label.story.js +33 -0
  40. package/lib/cjs/combobox/stories/combobox-hidden-label.story.js.map +1 -0
  41. package/lib/cjs/combobox/stories/combobox-icons.story.js +46 -0
  42. package/lib/cjs/combobox/stories/combobox-icons.story.js.map +1 -0
  43. package/lib/cjs/combobox/stories/combobox-in-dialog.story.js +40 -0
  44. package/lib/cjs/combobox/stories/combobox-in-dialog.story.js.map +1 -0
  45. package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js +40 -0
  46. package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -0
  47. package/lib/cjs/combobox/stories/combobox-in-popover.story.js +36 -0
  48. package/lib/cjs/combobox/stories/combobox-in-popover.story.js.map +1 -0
  49. package/lib/cjs/combobox/stories/combobox-large-data-set.story.js +36 -0
  50. package/lib/cjs/combobox/stories/combobox-large-data-set.story.js.map +1 -0
  51. package/lib/cjs/combobox/stories/combobox-max-rows.story.js +42 -0
  52. package/lib/cjs/combobox/stories/combobox-max-rows.story.js.map +1 -0
  53. package/lib/cjs/combobox/stories/combobox-multi.story.js +45 -0
  54. package/lib/cjs/combobox/stories/combobox-multi.story.js.map +1 -0
  55. package/lib/cjs/combobox/stories/combobox-native-form.story.js +49 -0
  56. package/lib/cjs/combobox/stories/combobox-native-form.story.js.map +1 -0
  57. package/lib/cjs/combobox/stories/combobox-select-only.story.js +38 -0
  58. package/lib/cjs/combobox/stories/combobox-select-only.story.js.map +1 -0
  59. package/lib/cjs/combobox/stories/combobox-sizes.story.js +33 -0
  60. package/lib/cjs/combobox/stories/combobox-sizes.story.js.map +1 -0
  61. package/lib/cjs/combobox/stories/combobox-unlimited-rows.story.js +42 -0
  62. package/lib/cjs/combobox/stories/combobox-unlimited-rows.story.js.map +1 -0
  63. package/lib/cjs/combobox/stories/combobox-validation.story.js +33 -0
  64. package/lib/cjs/combobox/stories/combobox-validation.story.js.map +1 -0
  65. package/lib/cjs/combobox/stories/index.js +133 -0
  66. package/lib/cjs/combobox/stories/index.js.map +1 -0
  67. package/lib/cjs/combobox/use-combobox-multi-value-overflow.js +173 -0
  68. package/lib/cjs/combobox/use-combobox-multi-value-overflow.js.map +1 -0
  69. package/lib/cjs/combobox/use-combobox-popover.js +80 -0
  70. package/lib/cjs/combobox/use-combobox-popover.js.map +1 -0
  71. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  72. package/lib/cjs/dismissible-tag/DismissibleTag.js +1 -1
  73. package/lib/cjs/dismissible-tag/DismissibleTag.js.map +1 -1
  74. package/lib/cjs/icons/generated/custom/PencilSparkle.js +30 -0
  75. package/lib/cjs/icons/generated/custom/PencilSparkle.js.map +1 -0
  76. package/lib/cjs/icons/generated/custom/index.js +4 -2
  77. package/lib/cjs/icons/generated/custom/index.js.map +1 -1
  78. package/lib/cjs/index.js +1 -0
  79. package/lib/cjs/index.js.map +1 -1
  80. package/lib/cjs/select/Select.js +3 -0
  81. package/lib/cjs/select/Select.js.map +1 -1
  82. package/lib/cjs/text-area/TextArea.js.map +1 -1
  83. package/lib/cjs/text-input/TextInput.js.map +1 -1
  84. package/lib/esm/_common/use-semi-controlled-state.js +6 -1
  85. package/lib/esm/_common/use-semi-controlled-state.js.map +1 -1
  86. package/lib/esm/combobox/Combobox.js +1024 -0
  87. package/lib/esm/combobox/Combobox.js.map +1 -0
  88. package/lib/esm/combobox/combobox-types.js +22 -0
  89. package/lib/esm/combobox/combobox-types.js.map +1 -0
  90. package/lib/esm/combobox/combobox-utils.js +112 -0
  91. package/lib/esm/combobox/combobox-utils.js.map +1 -0
  92. package/lib/esm/combobox/index.js +22 -0
  93. package/lib/esm/combobox/index.js.map +1 -0
  94. package/lib/esm/combobox/stories/combobox-action-on-select.story.js +80 -0
  95. package/lib/esm/combobox/stories/combobox-action-on-select.story.js.map +1 -0
  96. package/lib/esm/combobox/stories/combobox-actions.story.js +76 -0
  97. package/lib/esm/combobox/stories/combobox-actions.story.js.map +1 -0
  98. package/lib/esm/combobox/stories/combobox-async.story.js +73 -0
  99. package/lib/esm/combobox/stories/combobox-async.story.js.map +1 -0
  100. package/lib/esm/combobox/stories/combobox-clean.story.js +36 -0
  101. package/lib/esm/combobox/stories/combobox-clean.story.js.map +1 -0
  102. package/lib/esm/combobox/stories/combobox-creatable.story.js +39 -0
  103. package/lib/esm/combobox/stories/combobox-creatable.story.js.map +1 -0
  104. package/lib/esm/combobox/stories/combobox-custom-multi.story.js +43 -0
  105. package/lib/esm/combobox/stories/combobox-custom-multi.story.js.map +1 -0
  106. package/lib/esm/combobox/stories/combobox-custom-single.story.js +42 -0
  107. package/lib/esm/combobox/stories/combobox-custom-single.story.js.map +1 -0
  108. package/lib/esm/combobox/stories/combobox-custom-trigger.story.js +58 -0
  109. package/lib/esm/combobox/stories/combobox-custom-trigger.story.js.map +1 -0
  110. package/lib/esm/combobox/stories/combobox-default.story.js +40 -0
  111. package/lib/esm/combobox/stories/combobox-default.story.js.map +1 -0
  112. package/lib/esm/combobox/stories/combobox-descriptions.story.js +43 -0
  113. package/lib/esm/combobox/stories/combobox-descriptions.story.js.map +1 -0
  114. package/lib/esm/combobox/stories/combobox-disabled.story.js +32 -0
  115. package/lib/esm/combobox/stories/combobox-disabled.story.js.map +1 -0
  116. package/lib/esm/combobox/stories/combobox-fluid.story.js +32 -0
  117. package/lib/esm/combobox/stories/combobox-fluid.story.js.map +1 -0
  118. package/lib/esm/combobox/stories/combobox-groups.story.js +47 -0
  119. package/lib/esm/combobox/stories/combobox-groups.story.js.map +1 -0
  120. package/lib/esm/combobox/stories/combobox-hidden-label.story.js +31 -0
  121. package/lib/esm/combobox/stories/combobox-hidden-label.story.js.map +1 -0
  122. package/lib/esm/combobox/stories/combobox-icons.story.js +44 -0
  123. package/lib/esm/combobox/stories/combobox-icons.story.js.map +1 -0
  124. package/lib/esm/combobox/stories/combobox-in-dialog.story.js +38 -0
  125. package/lib/esm/combobox/stories/combobox-in-dialog.story.js.map +1 -0
  126. package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js +38 -0
  127. package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -0
  128. package/lib/esm/combobox/stories/combobox-in-popover.story.js +34 -0
  129. package/lib/esm/combobox/stories/combobox-in-popover.story.js.map +1 -0
  130. package/lib/esm/combobox/stories/combobox-large-data-set.story.js +34 -0
  131. package/lib/esm/combobox/stories/combobox-large-data-set.story.js.map +1 -0
  132. package/lib/esm/combobox/stories/combobox-max-rows.story.js +40 -0
  133. package/lib/esm/combobox/stories/combobox-max-rows.story.js.map +1 -0
  134. package/lib/esm/combobox/stories/combobox-multi.story.js +43 -0
  135. package/lib/esm/combobox/stories/combobox-multi.story.js.map +1 -0
  136. package/lib/esm/combobox/stories/combobox-native-form.story.js +47 -0
  137. package/lib/esm/combobox/stories/combobox-native-form.story.js.map +1 -0
  138. package/lib/esm/combobox/stories/combobox-select-only.story.js +36 -0
  139. package/lib/esm/combobox/stories/combobox-select-only.story.js.map +1 -0
  140. package/lib/esm/combobox/stories/combobox-sizes.story.js +31 -0
  141. package/lib/esm/combobox/stories/combobox-sizes.story.js.map +1 -0
  142. package/lib/esm/combobox/stories/combobox-unlimited-rows.story.js +40 -0
  143. package/lib/esm/combobox/stories/combobox-unlimited-rows.story.js.map +1 -0
  144. package/lib/esm/combobox/stories/combobox-validation.story.js +31 -0
  145. package/lib/esm/combobox/stories/combobox-validation.story.js.map +1 -0
  146. package/lib/esm/combobox/stories/index.js +100 -0
  147. package/lib/esm/combobox/stories/index.js.map +1 -0
  148. package/lib/esm/combobox/use-combobox-multi-value-overflow.js +166 -0
  149. package/lib/esm/combobox/use-combobox-multi-value-overflow.js.map +1 -0
  150. package/lib/esm/combobox/use-combobox-popover.js +77 -0
  151. package/lib/esm/combobox/use-combobox-popover.js.map +1 -0
  152. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  153. package/lib/esm/dismissible-tag/DismissibleTag.js +1 -1
  154. package/lib/esm/dismissible-tag/DismissibleTag.js.map +1 -1
  155. package/lib/esm/icons/generated/custom/PencilSparkle.js +28 -0
  156. package/lib/esm/icons/generated/custom/PencilSparkle.js.map +1 -0
  157. package/lib/esm/icons/generated/custom/index.js +1 -0
  158. package/lib/esm/icons/generated/custom/index.js.map +1 -1
  159. package/lib/esm/index.js +1 -0
  160. package/lib/esm/index.js.map +1 -1
  161. package/lib/esm/select/Select.js +3 -0
  162. package/lib/esm/select/Select.js.map +1 -1
  163. package/lib/esm/text-area/TextArea.js.map +1 -1
  164. package/lib/esm/text-input/TextInput.js.map +1 -1
  165. package/lib/types/_common/use-semi-controlled-state.d.ts +5 -1
  166. package/lib/types/_common/use-semi-controlled-state.d.ts.map +1 -1
  167. package/lib/types/combobox/Combobox.d.ts +24 -0
  168. package/lib/types/combobox/Combobox.d.ts.map +1 -0
  169. package/lib/types/combobox/combobox-types.d.ts +419 -0
  170. package/lib/types/combobox/combobox-types.d.ts.map +1 -0
  171. package/lib/types/combobox/combobox-utils.d.ts +81 -0
  172. package/lib/types/combobox/combobox-utils.d.ts.map +1 -0
  173. package/lib/types/combobox/index.d.ts +23 -0
  174. package/lib/types/combobox/index.d.ts.map +1 -0
  175. package/lib/types/combobox/stories/combobox-action-on-select.story.d.ts +24 -0
  176. package/lib/types/combobox/stories/combobox-action-on-select.story.d.ts.map +1 -0
  177. package/lib/types/combobox/stories/combobox-actions.story.d.ts +24 -0
  178. package/lib/types/combobox/stories/combobox-actions.story.d.ts.map +1 -0
  179. package/lib/types/combobox/stories/combobox-async.story.d.ts +24 -0
  180. package/lib/types/combobox/stories/combobox-async.story.d.ts.map +1 -0
  181. package/lib/types/combobox/stories/combobox-clean.story.d.ts +24 -0
  182. package/lib/types/combobox/stories/combobox-clean.story.d.ts.map +1 -0
  183. package/lib/types/combobox/stories/combobox-creatable.story.d.ts +24 -0
  184. package/lib/types/combobox/stories/combobox-creatable.story.d.ts.map +1 -0
  185. package/lib/types/combobox/stories/combobox-custom-multi.story.d.ts +24 -0
  186. package/lib/types/combobox/stories/combobox-custom-multi.story.d.ts.map +1 -0
  187. package/lib/types/combobox/stories/combobox-custom-single.story.d.ts +24 -0
  188. package/lib/types/combobox/stories/combobox-custom-single.story.d.ts.map +1 -0
  189. package/lib/types/combobox/stories/combobox-custom-trigger.story.d.ts +24 -0
  190. package/lib/types/combobox/stories/combobox-custom-trigger.story.d.ts.map +1 -0
  191. package/lib/types/combobox/stories/combobox-default.story.d.ts +24 -0
  192. package/lib/types/combobox/stories/combobox-default.story.d.ts.map +1 -0
  193. package/lib/types/combobox/stories/combobox-descriptions.story.d.ts +24 -0
  194. package/lib/types/combobox/stories/combobox-descriptions.story.d.ts.map +1 -0
  195. package/lib/types/combobox/stories/combobox-disabled.story.d.ts +24 -0
  196. package/lib/types/combobox/stories/combobox-disabled.story.d.ts.map +1 -0
  197. package/lib/types/combobox/stories/combobox-fluid.story.d.ts +24 -0
  198. package/lib/types/combobox/stories/combobox-fluid.story.d.ts.map +1 -0
  199. package/lib/types/combobox/stories/combobox-groups.story.d.ts +24 -0
  200. package/lib/types/combobox/stories/combobox-groups.story.d.ts.map +1 -0
  201. package/lib/types/combobox/stories/combobox-hidden-label.story.d.ts +24 -0
  202. package/lib/types/combobox/stories/combobox-hidden-label.story.d.ts.map +1 -0
  203. package/lib/types/combobox/stories/combobox-icons.story.d.ts +24 -0
  204. package/lib/types/combobox/stories/combobox-icons.story.d.ts.map +1 -0
  205. package/lib/types/combobox/stories/combobox-in-dialog.story.d.ts +24 -0
  206. package/lib/types/combobox/stories/combobox-in-dialog.story.d.ts.map +1 -0
  207. package/lib/types/combobox/stories/combobox-in-popover-dialog.story.d.ts +24 -0
  208. package/lib/types/combobox/stories/combobox-in-popover-dialog.story.d.ts.map +1 -0
  209. package/lib/types/combobox/stories/combobox-in-popover.story.d.ts +24 -0
  210. package/lib/types/combobox/stories/combobox-in-popover.story.d.ts.map +1 -0
  211. package/lib/types/combobox/stories/combobox-large-data-set.story.d.ts +24 -0
  212. package/lib/types/combobox/stories/combobox-large-data-set.story.d.ts.map +1 -0
  213. package/lib/types/combobox/stories/combobox-max-rows.story.d.ts +24 -0
  214. package/lib/types/combobox/stories/combobox-max-rows.story.d.ts.map +1 -0
  215. package/lib/types/combobox/stories/combobox-multi.story.d.ts +24 -0
  216. package/lib/types/combobox/stories/combobox-multi.story.d.ts.map +1 -0
  217. package/lib/types/combobox/stories/combobox-native-form.story.d.ts +24 -0
  218. package/lib/types/combobox/stories/combobox-native-form.story.d.ts.map +1 -0
  219. package/lib/types/combobox/stories/combobox-select-only.story.d.ts +24 -0
  220. package/lib/types/combobox/stories/combobox-select-only.story.d.ts.map +1 -0
  221. package/lib/types/combobox/stories/combobox-sizes.story.d.ts +24 -0
  222. package/lib/types/combobox/stories/combobox-sizes.story.d.ts.map +1 -0
  223. package/lib/types/combobox/stories/combobox-unlimited-rows.story.d.ts +24 -0
  224. package/lib/types/combobox/stories/combobox-unlimited-rows.story.d.ts.map +1 -0
  225. package/lib/types/combobox/stories/combobox-validation.story.d.ts +24 -0
  226. package/lib/types/combobox/stories/combobox-validation.story.d.ts.map +1 -0
  227. package/lib/types/combobox/stories/index.d.ts +73 -0
  228. package/lib/types/combobox/stories/index.d.ts.map +1 -0
  229. package/lib/types/combobox/use-combobox-multi-value-overflow.d.ts +76 -0
  230. package/lib/types/combobox/use-combobox-multi-value-overflow.d.ts.map +1 -0
  231. package/lib/types/combobox/use-combobox-popover.d.ts +66 -0
  232. package/lib/types/combobox/use-combobox-popover.d.ts.map +1 -0
  233. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  234. package/lib/types/dismissible-tag/DismissibleTag.d.ts.map +1 -1
  235. package/lib/types/icons/generated/custom/PencilSparkle.d.ts +29 -0
  236. package/lib/types/icons/generated/custom/PencilSparkle.d.ts.map +1 -0
  237. package/lib/types/icons/generated/custom/index.d.ts +1 -0
  238. package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
  239. package/lib/types/index.d.ts +1 -0
  240. package/lib/types/index.d.ts.map +1 -1
  241. package/lib/types/select/Select.d.ts +3 -0
  242. package/lib/types/select/Select.d.ts.map +1 -1
  243. package/lib/types/text-input/TextInput.d.ts.map +1 -1
  244. package/package.json +10 -4
  245. package/skills/ndl-react/SKILL.md +20 -0
  246. package/skills/ndl-react/components/combobox.md +1487 -0
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIL,KAAK,EACL,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,O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cesContent":["/**\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 {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { InformationCircleIconOutline } from '../icons/generated/heroIcons/InformationCircleIconOutline';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: decide if this naming is okay, or change it\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const helpTextId = useId();\n const errorTextId = useId();\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-form-item-label', {\n 'ndl-fluid': isFluid,\n 'ndl-form-item-no-label': hasEmptyLabelValue,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n const shouldRenderHint = isClearable || isLoading;\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (isClearable && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-large': size === 'large',\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n });\n\n const combinedAriaDescribedby = useMemo(() => {\n const ariaDescribedby = [];\n\n if (hintId && shouldRenderHint) {\n ariaDescribedby.push(hintId);\n }\n if (helpText && !errorText) {\n ariaDescribedby.push(helpTextId);\n } else if (errorText) {\n ariaDescribedby.push(errorTextId);\n }\n return ariaDescribedby.join(' ');\n }, [hintId, shouldRenderHint, helpText, errorText, helpTextId, errorTextId]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-label-text-wrapper\">\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n className=\"ndl-label-text\"\n >\n {label}\n </Typography>\n {Boolean(moreInformationText) && (\n <Tooltip {...tooltipProps?.root} type=\"simple\">\n <Tooltip.Trigger\n {...tooltipProps?.trigger}\n className={informationIconClasses}\n hasButtonWrapper\n >\n <div\n tabIndex={0}\n role=\"button\"\n aria-label=\"Information icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {showRequiredOrOptionalLabel && (\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n className=\"ndl-form-item-optional\"\n >\n {isRequired === true ? 'Required' : 'Optional'}\n </Typography>\n )}\n </div>\n </Skeleton>\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n aria-describedby={combinedAriaDescribedby}\n aria-invalid={Boolean(errorText)}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {isClearable && 'Press Escape to clear input.'}\n </span>\n )}\n {isClearable && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline className=\"n-size-4\" />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n {Boolean(helpText) && !errorText && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n isLoading={isSkeletonLoading}\n >\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-form-message\"\n htmlAttributes={{\n 'aria-live': 'polite',\n id: helpTextId,\n }}\n >\n {helpText}\n </Typography>\n </Skeleton>\n )}\n {Boolean(errorText) && (\n // TODO v4: We might want to have a min width for the container for the messages to help skeleton loading.\n // Currently the message fills 100% of the width while the rest of the text input has a set width.\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n width=\"fit-content\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-form-message\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <Typography\n className=\"ndl-error-text\"\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n htmlAttributes={{\n 'aria-live': 'polite',\n id: errorTextId,\n }}\n >\n {errorText}\n </Typography>\n </div>\n </Skeleton>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIL,KAAK,EACL,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe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AS,EACP,IAAI,KAAK,OAAO;4CACd,CAAC,CAAC,oBAAoB;4CACtB,CAAC,CAAC,mBAAmB,GAEzB,CACH,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,GACG,CACP,IACG,IACG,IACL,EACP,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,IAAI,CAClC,KAAC,QAAQ,IACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,EACnB,SAAS,EAAE,iBAAiB,YAE5B,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EACxD,SAAS,EAAC,kBAAkB,EAC5B,cAAc,EAAE;wBACd,WAAW,EAAE,QAAQ;wBACrB,EAAE,EAAE,UAAU;qBACf,YAEA,QAAQ,GACE,GACJ,CACZ,EACA,OAAO,CAAC,SAAS,CAAC,IAAI;YACrB,0GAA0G;YAC1G,kGAAkG;YAClG,KAAC,QAAQ,kBACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,EACnB,KAAK,EAAC,aAAa,IACf,aAAa,IACjB,SAAS,EAAE,iBAAiB,YAE5B,eAAK,SAAS,EAAC,kBAAkB,aAC/B,cAAK,SAAS,EAAC,gBAAgB,YAC7B,KAAC,0BAA0B,KAAG,GAC1B,EACN,KAAC,UAAU,IACT,SAAS,EAAC,gBAAgB,EAC1B,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EACxD,cAAc,EAAE;gCACd,WAAW,EAAE,QAAQ;gCACrB,EAAE,EAAE,WAAW;6BAChB,YAEA,SAAS,GACC,IACT,IACG,CACZ,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\nimport {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { InformationCircleIconOutline } from '../icons/generated/heroIcons/InformationCircleIconOutline';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: rename to hasRequiredIndicator, matching Combobox. That also drops\n // the naming-convention disable below, since has is an allowed prefix.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const helpTextId = useId();\n const errorTextId = useId();\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-form-item-label', {\n 'ndl-fluid': isFluid,\n 'ndl-form-item-no-label': hasEmptyLabelValue,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n const shouldRenderHint = isClearable || isLoading;\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (isClearable && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n const informationIconClasses = classNames({\n 'ndl-information-icon-large': size === 'large',\n 'ndl-information-icon-small': size === 'small' || size === 'medium',\n });\n\n const combinedAriaDescribedby = useMemo(() => {\n const ariaDescribedby = [];\n\n if (hintId && shouldRenderHint) {\n ariaDescribedby.push(hintId);\n }\n if (helpText && !errorText) {\n ariaDescribedby.push(helpTextId);\n } else if (errorText) {\n ariaDescribedby.push(errorTextId);\n }\n return ariaDescribedby.join(' ');\n }, [hintId, shouldRenderHint, helpText, errorText, helpTextId, errorTextId]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-label-text-wrapper\">\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n className=\"ndl-label-text\"\n >\n {label}\n </Typography>\n {Boolean(moreInformationText) && (\n <Tooltip {...tooltipProps?.root} type=\"simple\">\n <Tooltip.Trigger\n {...tooltipProps?.trigger}\n className={informationIconClasses}\n hasButtonWrapper\n >\n <div\n tabIndex={0}\n role=\"button\"\n aria-label=\"Information icon\"\n >\n <InformationCircleIconOutline />\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content {...tooltipProps?.content}>\n {moreInformationText}\n </Tooltip.Content>\n </Tooltip>\n )}\n {showRequiredOrOptionalLabel && (\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n className=\"ndl-form-item-optional\"\n >\n {isRequired === true ? 'Required' : 'Optional'}\n </Typography>\n )}\n </div>\n </Skeleton>\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n aria-describedby={combinedAriaDescribedby}\n aria-invalid={Boolean(errorText)}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {isClearable && 'Press Escape to clear input.'}\n </span>\n )}\n {isClearable && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline className=\"n-size-4\" />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n {Boolean(helpText) && !errorText && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n isLoading={isSkeletonLoading}\n >\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-form-message\"\n htmlAttributes={{\n 'aria-live': 'polite',\n id: helpTextId,\n }}\n >\n {helpText}\n </Typography>\n </Skeleton>\n )}\n {Boolean(errorText) && (\n // TODO v4: We might want to have a min width for the container for the messages to help skeleton loading.\n // Currently the message fills 100% of the width while the rest of the text input has a set width.\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n width=\"fit-content\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-form-message\">\n <div className=\"ndl-error-icon\">\n <ExclamationCircleIconSolid />\n </div>\n <Typography\n className=\"ndl-error-text\"\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n htmlAttributes={{\n 'aria-live': 'polite',\n id: errorTextId,\n }}\n >\n {errorText}\n </Typography>\n </div>\n </Skeleton>\n )}\n </div>\n );\n};\n"]}
@@ -24,6 +24,10 @@ type UseSemiControlledStateProps<T> = {
24
24
  onChange?: (next: T) => void;
25
25
  isControlled?: boolean;
26
26
  };
27
- export declare function useSemicontrolledState<T>({ state, onChange, isControlled, }: UseSemiControlledStateProps<T>): [T, (setState: SetStateAction<T>) => void];
27
+ export declare function useSemicontrolledState<T>({ state, onChange, isControlled, }: UseSemiControlledStateProps<T>): [
28
+ T,
29
+ (setState: SetStateAction<T>) => void,
30
+ (state: T) => void
31
+ ];
28
32
  export {};
29
33
  //# sourceMappingURL=use-semi-controlled-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-semi-controlled-state.d.ts","sourceRoot":"","sources":["../../../src/_common/use-semi-controlled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAE9C,KAAK,2BAA2B,CAAC,CAAC,IAAI;IACpC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,EACxC,KAAK,EACL,QAAQ,EACR,YAAY,GACb,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAmB7E"}
1
+ {"version":3,"file":"use-semi-controlled-state.d.ts","sourceRoot":"","sources":["../../../src/_common/use-semi-controlled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAE9C,KAAK,2BAA2B,CAAC,CAAC,IAAI;IACpC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,EACxC,KAAK,EACL,QAAQ,EACR,YAAY,GACb,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG;IAClC,CAAC;IACD,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI;IACrC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI;CACnB,CA4BA"}
@@ -0,0 +1,24 @@
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
+ import { type CommonProps } from '../_common/types';
22
+ import { type ComboboxOption, type ComboboxProps } from './combobox-types';
23
+ export declare const Combobox: <TOption extends ComboboxOption = ComboboxOption>({ label, name, formId, autoComplete, triggerRef, hasVisuallyHiddenLabel, helpText, errorText, isRequired, hasRequiredIndicator, options, value, defaultValue, onChange, isMulti, isSearchable, searchValue, defaultSearchValue, onSearchChange, filterOption, searchPlaceholder, isLoading, loadingMessage, isCreatable, onCreateOption, createOption, formatCreateLabel, isValidNewOption, actions, maxRows, isOpen, onOpenChange, isClearable, placeholder, isDisabled, size, isFluid, isClean, isPortaled, portalTarget, floatingStrategy, renderTrigger, components, className, style, htmlAttributes, ref, }: CommonProps<"div", ComboboxProps<TOption>>) => import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=Combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/combobox/Combobox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAWH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmBpD,OAAO,EAOL,KAAK,cAAc,EAKnB,KAAK,aAAa,EAInB,MAAM,kBAAkB,CAAC;AA4F1B,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,cAAc,GAAG,cAAc,EAAE,mlBAgDvE,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,4CAgzB5C,CAAC"}
@@ -0,0 +1,419 @@
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
+ type ComboboxOption = {
22
+ label: string;
23
+ value: string;
24
+ /** If the option is disabled */
25
+ isDisabled?: boolean;
26
+ /** A visual element to display before the label. Incompatible with multi select. */
27
+ leadingVisual?: React.ReactNode;
28
+ /** A description to display below the label. */
29
+ description?: string;
30
+ };
31
+ type ComboboxOptionGroup<TOption extends ComboboxOption = ComboboxOption> = {
32
+ label: string;
33
+ options: TOption[];
34
+ };
35
+ type ComboboxFilterOption<TOption extends ComboboxOption = ComboboxOption> = ((option: TOption, searchValue: string) => boolean) | false;
36
+ type ComboboxSize = 'small' | 'medium' | 'large';
37
+ /**
38
+ * A row at the end of the panel that acts instead of selecting.
39
+ *
40
+ * @remarks
41
+ * Deliberately not a `ComboboxOption`, since an action never becomes part of
42
+ * the value. Use it for something that leads out of the selection, such as a
43
+ * link into a create flow.
44
+ */
45
+ type ComboboxAction = {
46
+ /** Text of the row. */
47
+ label: string;
48
+ /**
49
+ * Called when the row is activated, with the current search value so the
50
+ * action can carry the query with it. The selection is left untouched.
51
+ */
52
+ onSelect: (context: {
53
+ searchValue: string;
54
+ }) => void;
55
+ /** A description to display below the label. */
56
+ description?: string;
57
+ /** A visual element to display before the label. */
58
+ leadingVisual?: React.ReactNode;
59
+ /** If the action is disabled. */
60
+ isDisabled?: boolean;
61
+ /**
62
+ * Whether a divider is rendered above the action, separating it from the
63
+ * action before it. Ignored on the first action, which already sits below
64
+ * the divider that separates actions from options.
65
+ */
66
+ hasDivider?: boolean;
67
+ };
68
+ type ComboboxBaseProps<TOption extends ComboboxOption = ComboboxOption> = {
69
+ /** Accessible label for the combobox. Rendered above the control. */
70
+ label: string;
71
+ /**
72
+ * Name used to submit the selected option value through a native form.
73
+ * Above 300 options, only the selection is mirrored to the form, so browser
74
+ * autofill no longer offers the option list.
75
+ */
76
+ name?: string;
77
+ /** Id of the form the combobox belongs to when it is outside that form. */
78
+ formId?: string;
79
+ /** Hint for browser autofill on the native form control. */
80
+ autoComplete?: string;
81
+ /** Ref to the focusable combobox trigger. */
82
+ triggerRef?: React.Ref<HTMLElement>;
83
+ /** Whether the label is clipped out of the layout, leaving it to screen readers only. */
84
+ hasVisuallyHiddenLabel?: boolean;
85
+ /** Assistive text below the control. Replaced by `errorText` while there is an error. */
86
+ helpText?: React.ReactNode;
87
+ /** Error message below the control. Puts the control in its error state. */
88
+ errorText?: React.ReactNode;
89
+ /**
90
+ * Whether a selection is required. Sets `aria-required` and, when `name` is
91
+ * provided, enables native form validation.
92
+ */
93
+ isRequired?: boolean;
94
+ /** Whether Required or Optional is shown at the end of the label row. */
95
+ hasRequiredIndicator?: boolean;
96
+ /** The options to display in the combobox. Either an array of options or an array of option groups. */
97
+ options: TOption[] | ComboboxOptionGroup<TOption>[];
98
+ /**
99
+ * Whether a search input is rendered inside the panel. On by default; turn
100
+ * it off for a short list (roughly 10 options or fewer) where filtering
101
+ * adds nothing.
102
+ */
103
+ isSearchable?: boolean;
104
+ /** The search value in controlled mode. */
105
+ searchValue?: string;
106
+ /** The initial search value in uncontrolled mode. */
107
+ defaultSearchValue?: string;
108
+ /** Called when the search value changes. */
109
+ onSearchChange?: (searchValue: string) => void;
110
+ /**
111
+ * How options are matched against the search value. Defaults to a
112
+ * case-insensitive match on the option label. Pass `false` to skip internal
113
+ * filtering when the options are already filtered, such as when searching
114
+ * server side.
115
+ */
116
+ filterOption?: ComboboxFilterOption<TOption>;
117
+ /** Placeholder for the search input, which also names it. */
118
+ searchPlaceholder?: string;
119
+ /**
120
+ * Whether the panel is waiting for options. Replaces the empty message while
121
+ * there are no options.
122
+ */
123
+ isLoading?: boolean;
124
+ /** Text of the loading status. Defaults to `Loading...`. */
125
+ loadingMessage?: React.ReactNode;
126
+ /**
127
+ * Whether the search value can be turned into a new option, shown as an extra
128
+ * row at the end of the list. Requires `isSearchable`.
129
+ */
130
+ isCreatable?: boolean;
131
+ /**
132
+ * Called after a created option has been selected, so it can be persisted
133
+ * into `options`. Created options are not added to `options` by the combobox.
134
+ */
135
+ onCreateOption?: (option: TOption) => void;
136
+ /**
137
+ * Builds the option to create from the search value. Defaults to using the
138
+ * search value as both label and value, which is only enough when the options
139
+ * carry no fields of their own beyond `ComboboxOption`.
140
+ */
141
+ createOption?: (searchValue: string) => TOption;
142
+ /** Text of the create row. Defaults to `Create "<search value>"`. */
143
+ formatCreateLabel?: (searchValue: string) => React.ReactNode;
144
+ /**
145
+ * Whether the search value can become a new option. Defaults to requiring a
146
+ * non-blank value that does not exactly match an existing option or a
147
+ * currently selected one.
148
+ */
149
+ isValidNewOption?: (searchValue: string, options: TOption[]) => boolean;
150
+ /**
151
+ * Rows that act instead of selecting, pinned below the scrolling options
152
+ * after a divider so they stay visible however long the list is. They are
153
+ * always shown, never filtered by the search value, and never part of the
154
+ * selection.
155
+ */
156
+ actions?: ComboboxAction[];
157
+ /** Whether the panel is controlled open. */
158
+ isOpen?: boolean;
159
+ /** Called when the panel opens or closes. */
160
+ onOpenChange?: (isOpen: boolean) => void;
161
+ /** Whether a button for clearing the selection is rendered in the trigger. */
162
+ isClearable?: boolean;
163
+ /** Text shown in the trigger while nothing is selected. */
164
+ placeholder?: string;
165
+ /** Whether the combobox is disabled. */
166
+ isDisabled?: boolean;
167
+ /** Size of the combobox control. */
168
+ size?: ComboboxSize;
169
+ /** Whether the combobox fills the available width. */
170
+ isFluid?: boolean;
171
+ /** Whether the control hugs its content without a background or resting outline. */
172
+ isClean?: boolean;
173
+ /** Whether the panel is wrapped in a floating portal. Defaults to true outside a dialog. */
174
+ isPortaled?: boolean;
175
+ /** Portal target element. Defaults to `document.body`. */
176
+ portalTarget?: HTMLElement | null;
177
+ /** Positioning strategy used by Floating UI. */
178
+ floatingStrategy?: 'absolute' | 'fixed';
179
+ /**
180
+ * Replaces the built-in trigger. Spread `triggerProps` onto the focusable
181
+ * element that should open the panel; the panel is anchored to it. The root
182
+ * element then lays out as `display: contents`, so the trigger is placed by
183
+ * whatever contains the combobox, and `isFluid`, `isClean`, `size`,
184
+ * `className` and `style` no longer shape it.
185
+ */
186
+ renderTrigger?: (triggerProps: ComboboxTriggerProps, state: ComboboxTriggerState<TOption>) => React.ReactNode;
187
+ /**
188
+ * Replaces how selected values and option labels are presented, keeping the
189
+ * behavior and the ARIA of the combobox.
190
+ */
191
+ components?: ComboboxComponents<TOption>;
192
+ };
193
+ /**
194
+ * Presentation overrides for the parts of the combobox that show an option.
195
+ *
196
+ * @remarks
197
+ * Each override is handed the option itself, so widening the option type is
198
+ * what gives them typed access to fields of your own, such as a color. Only
199
+ * presentation is replaced; selection, filtering, keyboard interaction and the
200
+ * ARIA of the surrounding elements stay with the combobox. Use `renderTrigger`
201
+ * instead to replace the control as a whole.
202
+ */
203
+ type ComboboxComponents<TOption extends ComboboxOption = ComboboxOption> = {
204
+ /** Replaces the tag rendered per selected option in multi select. */
205
+ MultiValue?: React.ComponentType<ComboboxMultiValueProps<TOption>>;
206
+ /** Replaces the value shown in the trigger in single select. Must be non-interactive. */
207
+ SingleValue?: React.ComponentType<ComboboxSingleValueProps<TOption>>;
208
+ /** Replaces the label of an option. The selection and description chrome stays. */
209
+ OptionLabel?: React.ComponentType<ComboboxOptionLabelProps<TOption>>;
210
+ };
211
+ /** Props of a `MultiValue` override, rendered once per selected option. */
212
+ type ComboboxMultiValueProps<TOption extends ComboboxOption = ComboboxOption> = {
213
+ option: TOption;
214
+ /** Position of the option in the selection. */
215
+ index: number;
216
+ isDisabled: boolean;
217
+ size: ComboboxSize;
218
+ /**
219
+ * Deselects this option. Nothing calls it unless the override renders an
220
+ * affordance for it, which also makes focus after the removal its own
221
+ * responsibility.
222
+ */
223
+ remove: () => void;
224
+ };
225
+ /** Props of a `SingleValue` override, rendered inside the trigger. */
226
+ type ComboboxSingleValueProps<TOption extends ComboboxOption = ComboboxOption> = {
227
+ option: TOption;
228
+ isDisabled: boolean;
229
+ size: ComboboxSize;
230
+ };
231
+ /** Props of an `OptionLabel` override, rendered inside each option. */
232
+ type ComboboxOptionLabelProps<TOption extends ComboboxOption = ComboboxOption> = {
233
+ option: TOption;
234
+ isSelected: boolean;
235
+ isDisabled: boolean;
236
+ /** Whether the option currently holds virtual focus. */
237
+ isFocused: boolean;
238
+ isMulti: boolean;
239
+ size: ComboboxSize;
240
+ };
241
+ /**
242
+ * Props that must be spread onto a custom trigger element. Includes the
243
+ * Floating UI reference props, so the element it lands on becomes the anchor
244
+ * the panel is positioned against.
245
+ */
246
+ type ComboboxTriggerProps = React.HTMLAttributes<HTMLElement> & {
247
+ ref: React.Ref<HTMLElement>;
248
+ role: 'combobox';
249
+ 'aria-haspopup': 'dialog' | 'listbox';
250
+ 'aria-expanded': boolean;
251
+ 'aria-disabled': boolean | undefined;
252
+ 'aria-invalid': boolean | undefined;
253
+ 'aria-required': boolean | undefined;
254
+ 'aria-controls': string | undefined;
255
+ 'aria-activedescendant': string | undefined;
256
+ 'aria-describedby': string | undefined;
257
+ 'aria-label'?: string;
258
+ 'aria-labelledby'?: string;
259
+ };
260
+ /**
261
+ * The label, help text, and error text of the combobox, for rendering them from
262
+ * a custom trigger.
263
+ *
264
+ * @remarks
265
+ * A custom trigger is named through `aria-label` and carries the
266
+ * `aria-describedby` of whichever message is currently shown, so it has to
267
+ * render that message with the id it is handed here.
268
+ */
269
+ type ComboboxFieldState = {
270
+ label: string;
271
+ hasVisuallyHiddenLabel: boolean;
272
+ helpText?: React.ReactNode;
273
+ errorText?: React.ReactNode;
274
+ hasError: boolean;
275
+ isRequired: boolean;
276
+ hasRequiredIndicator: boolean;
277
+ /** Id the trigger's `aria-labelledby` points at when the label is rendered. */
278
+ labelId: string;
279
+ /** Id of the trigger, so a rendered `<label>` can point at it with `htmlFor`. */
280
+ triggerId: string;
281
+ /** Ids the trigger's `aria-describedby` points at. Only one is used at a time. */
282
+ helpTextId: string;
283
+ errorTextId: string;
284
+ };
285
+ /** Current combobox state, for rendering a custom trigger. */
286
+ type ComboboxTriggerState<TOption extends ComboboxOption = ComboboxOption> = {
287
+ isOpen: boolean;
288
+ isMulti: boolean;
289
+ isDisabled: boolean;
290
+ /** The selected options, as a list in both single and multi select. */
291
+ selectedOptions: TOption[];
292
+ /** Clears the whole selection. */
293
+ clear: () => void;
294
+ /** Deselects a single option. */
295
+ remove: (option: TOption) => void;
296
+ /** The label and messages of the combobox, so a custom trigger can present them. */
297
+ field: ComboboxFieldState;
298
+ };
299
+ type ComboboxSingleProps<TOption extends ComboboxOption = ComboboxOption> = {
300
+ /** The selected option in controlled mode. */
301
+ value?: TOption | null;
302
+ /** The initially selected option in uncontrolled mode. */
303
+ defaultValue?: TOption | null;
304
+ /** Called when the selected option changes. `null` when the selection is cleared. */
305
+ onChange?: (value: TOption | null) => void;
306
+ /** Whether multiple options can be selected. */
307
+ isMulti?: false;
308
+ maxRows?: never;
309
+ };
310
+ type ComboboxMultiProps<TOption extends ComboboxOption = ComboboxOption> = {
311
+ /** The selected options in controlled mode. */
312
+ value?: TOption[];
313
+ /** The initially selected options in uncontrolled mode. */
314
+ defaultValue?: TOption[];
315
+ /** Called when the selected options change. */
316
+ onChange?: (value: TOption[]) => void;
317
+ /** Whether multiple options can be selected. */
318
+ isMulti: true;
319
+ /**
320
+ * Maximum number of rows the selected tags may wrap into, a single row by
321
+ * default. Tags that do not fit are collapsed into a read-only counter tag,
322
+ * such as `+4`, at the end of the last row. Pass `null` to let the control
323
+ * grow with the selection.
324
+ */
325
+ maxRows?: number | null;
326
+ };
327
+ type ComboboxProps<TOption extends ComboboxOption = ComboboxOption> = ComboboxBaseProps<TOption> & (ComboboxSingleProps<TOption> | ComboboxMultiProps<TOption>);
328
+ type ComboboxPanelProps = {
329
+ children?: React.ReactNode;
330
+ ref?: React.Ref<HTMLDivElement>;
331
+ id?: string;
332
+ className?: string;
333
+ style?: React.CSSProperties;
334
+ /**
335
+ * Set when the panel is a dialog popup, which is the case while the search
336
+ * input inside it holds DOM focus.
337
+ */
338
+ ariaLabel?: string;
339
+ isDialog?: boolean;
340
+ } & Record<string, unknown>;
341
+ type ComboboxControlProps<TOption extends ComboboxOption = ComboboxOption> = {
342
+ triggerProps: ComboboxTriggerProps;
343
+ state: ComboboxTriggerState<TOption>;
344
+ field: ComboboxFieldState;
345
+ placeholder: string;
346
+ isClearable: boolean;
347
+ isClean: boolean;
348
+ size: ComboboxSize;
349
+ /** Maximum number of rows the selected tags may wrap into in multi select. `null` is unlimited. */
350
+ maxRows?: number | null;
351
+ components: ComboboxComponents<TOption>;
352
+ /** Floating UI reference props, so clicking anywhere in the control opens the panel. */
353
+ referenceProps: React.HTMLAttributes<HTMLDivElement>;
354
+ referenceRef: React.Ref<HTMLDivElement>;
355
+ };
356
+ type ComboboxEmptyStateProps = {
357
+ children?: React.ReactNode;
358
+ };
359
+ type ComboboxInputProps = {
360
+ ref?: React.Ref<HTMLInputElement>;
361
+ ariaLabel: string;
362
+ value: string;
363
+ onValueChange: (searchValue: string) => void;
364
+ placeholder?: string;
365
+ /** Id of the listbox the input controls, when the listbox is rendered. */
366
+ listboxId?: string;
367
+ /** Id of the virtually focused option, when one is active. */
368
+ activeOptionId?: string;
369
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
370
+ };
371
+ type ComboboxListBoxProps = {
372
+ ariaLabel: string;
373
+ children?: React.ReactNode;
374
+ isMulti?: boolean;
375
+ id?: string;
376
+ /** Ids of the pinned action rows the listbox owns without containing. */
377
+ ownsIds?: string;
378
+ };
379
+ type ComboboxGroupProps = {
380
+ children?: React.ReactNode;
381
+ label: string;
382
+ };
383
+ type ComboboxOptionProps = {
384
+ children?: React.ReactNode;
385
+ /** Left out on rows that cannot be selected, which drops `aria-selected`. */
386
+ isSelected?: boolean;
387
+ isDisabled?: boolean;
388
+ isFocused?: boolean;
389
+ /** Whether the option is the row that creates a new option from the search value. */
390
+ isCreate?: boolean;
391
+ /** Whether the option is an action row, which acts instead of selecting. */
392
+ isAction?: boolean;
393
+ id?: string;
394
+ onClick?: () => void;
395
+ /** Called when the pointer moves over the option, so hover can drive virtual focus. */
396
+ onHover?: () => void;
397
+ /**
398
+ * One-based position in the full list. Only set while the listbox is
399
+ * virtualized, where the DOM no longer holds every option.
400
+ */
401
+ posInSet?: number;
402
+ /** Total options in the full list. Only set while the listbox is virtualized. */
403
+ setSize?: number;
404
+ };
405
+ type ComboboxOptionContentProps = {
406
+ label: string;
407
+ /**
408
+ * Replaces the label text. Rendered in place of the label typography rather
409
+ * than inside it, so it can be any element rather than inline text.
410
+ */
411
+ customLabel?: React.ReactNode;
412
+ description?: string;
413
+ leadingVisual?: React.ReactNode;
414
+ isDisabled?: boolean;
415
+ isSelected?: boolean;
416
+ isMulti?: boolean;
417
+ };
418
+ export type { ComboboxProps, ComboboxAction, ComboboxComponents, ComboboxControlProps, ComboboxFieldState, ComboboxMultiValueProps, ComboboxOptionLabelProps, ComboboxSingleValueProps, ComboboxTriggerProps, ComboboxTriggerState, ComboboxPanelProps, ComboboxEmptyStateProps, ComboboxFilterOption, ComboboxInputProps, ComboboxListBoxProps, ComboboxGroupProps, ComboboxOptionProps, ComboboxOptionContentProps, ComboboxOption, ComboboxOptionGroup, ComboboxSize, };
419
+ //# sourceMappingURL=combobox-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox-types.d.ts","sourceRoot":"","sources":["../../../src/combobox/combobox-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,gDAAgD;IAChD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