datocms-react-ui 3.1.0-next.5 → 3.1.0-next.9

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 (607) hide show
  1. package/README.md +3 -2
  2. package/dist/DateInput.d.ts +2 -0
  3. package/dist/DateInput.js +2 -0
  4. package/dist/DateTimeInput.d.ts +2 -0
  5. package/dist/DateTimeInput.js +2 -0
  6. package/dist/DateTimeRangeInput.d.ts +2 -0
  7. package/dist/DateTimeRangeInput.js +2 -0
  8. package/dist/FieldTypeAvatar.d.ts +2 -0
  9. package/dist/FieldTypeAvatar.js +2 -0
  10. package/dist/FieldTypeName.d.ts +2 -0
  11. package/dist/FieldTypeName.js +2 -0
  12. package/dist/FilterBuilder.d.ts +2 -0
  13. package/dist/FilterBuilder.js +2 -0
  14. package/dist/LICENSE-lucide.txt +43 -0
  15. package/dist/RecordRow.d.ts +2 -0
  16. package/dist/RecordRow.js +2 -0
  17. package/dist/UploadCard.js +2 -2
  18. package/dist/UploadPreview.d.ts +2 -2
  19. package/dist/UploadPreview.js +1 -1
  20. package/dist/UserRow.d.ts +2 -0
  21. package/dist/UserRow.js +2 -0
  22. package/dist/react-ui/src/Canvas.d.ts +7 -1
  23. package/dist/react-ui/src/Canvas.js +26 -4
  24. package/dist/react-ui/src/ctxAnswer.js +21 -0
  25. package/dist/react-ui/src/ctxDateSettings.js +7 -5
  26. package/dist/react-ui/src/ctxRecordPresentation.js +34 -0
  27. package/dist/react-ui/src/ctxUploads.js +23 -0
  28. package/dist/styles.css +669 -63
  29. package/dist/ui-public/icons/index.js +313 -379
  30. package/dist/ui-public/icons/lucide/app-window.js +33 -0
  31. package/dist/ui-public/icons/lucide/arrow-big-down.js +22 -0
  32. package/dist/ui-public/icons/lucide/arrow-down-a-z.js +28 -0
  33. package/dist/ui-public/icons/lucide/arrow-down-from-line.js +26 -0
  34. package/dist/ui-public/icons/lucide/arrow-down.js +22 -0
  35. package/dist/ui-public/icons/lucide/arrow-left.js +22 -0
  36. package/dist/ui-public/icons/lucide/arrow-right-left.js +27 -0
  37. package/dist/ui-public/icons/lucide/arrow-right.js +22 -0
  38. package/dist/ui-public/icons/lucide/arrow-up-down.js +27 -0
  39. package/dist/ui-public/icons/lucide/arrow-up-from-line.js +26 -0
  40. package/dist/ui-public/icons/lucide/arrow-up.js +22 -0
  41. package/dist/ui-public/icons/lucide/ban.js +26 -0
  42. package/dist/ui-public/icons/lucide/book.js +22 -0
  43. package/dist/ui-public/icons/lucide/bookmark.js +22 -0
  44. package/dist/ui-public/icons/lucide/braces.js +22 -0
  45. package/dist/ui-public/icons/lucide/calendar.js +33 -0
  46. package/dist/ui-public/icons/{regular → lucide}/check.js +9 -3
  47. package/dist/ui-public/icons/{regular → lucide}/chevron-down.js +9 -3
  48. package/dist/ui-public/icons/{regular → lucide}/chevron-left.js +9 -3
  49. package/dist/ui-public/icons/{regular → lucide}/chevron-right.js +9 -3
  50. package/dist/ui-public/icons/lucide/chevrons-down.js +22 -0
  51. package/dist/ui-public/icons/lucide/chevrons-left.js +22 -0
  52. package/dist/ui-public/icons/lucide/chevrons-right.js +22 -0
  53. package/dist/ui-public/icons/lucide/circle-arrow-up.js +30 -0
  54. package/dist/ui-public/icons/lucide/circle-check.js +26 -0
  55. package/dist/ui-public/icons/lucide/circle-dot.js +30 -0
  56. package/dist/ui-public/icons/lucide/circle-exclamation-point.js +40 -0
  57. package/dist/ui-public/icons/lucide/circle-question-mark.js +30 -0
  58. package/dist/ui-public/icons/lucide/clock.js +26 -0
  59. package/dist/ui-public/icons/lucide/code.js +22 -0
  60. package/dist/ui-public/icons/lucide/command.js +22 -0
  61. package/dist/ui-public/icons/lucide/copy-plus.js +44 -0
  62. package/dist/ui-public/icons/lucide/copy.js +29 -0
  63. package/dist/ui-public/icons/lucide/corner-left-up.js +22 -0
  64. package/dist/ui-public/icons/lucide/database.js +31 -0
  65. package/dist/ui-public/icons/lucide/download.js +26 -0
  66. package/dist/ui-public/icons/lucide/earth.js +31 -0
  67. package/dist/ui-public/icons/lucide/ellipsis-vertical.js +38 -0
  68. package/dist/ui-public/icons/lucide/ellipsis.js +38 -0
  69. package/dist/ui-public/icons/lucide/external-link.js +26 -0
  70. package/dist/ui-public/icons/lucide/eye-off.js +27 -0
  71. package/dist/ui-public/icons/lucide/eye.js +26 -0
  72. package/dist/ui-public/icons/lucide/file-code.js +27 -0
  73. package/dist/ui-public/icons/lucide/file-output.js +27 -0
  74. package/dist/ui-public/icons/lucide/flask-conical.js +26 -0
  75. package/dist/ui-public/icons/lucide/fold-vertical.js +31 -0
  76. package/dist/ui-public/icons/lucide/folder-open.js +22 -0
  77. package/dist/ui-public/icons/lucide/folder-plus.js +26 -0
  78. package/dist/ui-public/icons/lucide/folder.js +22 -0
  79. package/dist/ui-public/icons/lucide/folders.js +22 -0
  80. package/dist/ui-public/icons/lucide/funnel.js +22 -0
  81. package/dist/ui-public/icons/lucide/gift.js +33 -0
  82. package/dist/ui-public/icons/lucide/git-branch.js +34 -0
  83. package/dist/ui-public/icons/lucide/git-fork.js +40 -0
  84. package/dist/ui-public/icons/lucide/globe.js +30 -0
  85. package/dist/ui-public/icons/lucide/grip-vertical.js +53 -0
  86. package/dist/ui-public/icons/lucide/hand.js +27 -0
  87. package/dist/ui-public/icons/lucide/hard-hat.js +33 -0
  88. package/dist/ui-public/icons/lucide/hash.js +47 -0
  89. package/dist/ui-public/icons/lucide/heading-1.js +27 -0
  90. package/dist/ui-public/icons/lucide/heading-2.js +27 -0
  91. package/dist/ui-public/icons/lucide/heading-3.js +28 -0
  92. package/dist/ui-public/icons/lucide/heading-4.js +28 -0
  93. package/dist/ui-public/icons/lucide/heading-5.js +28 -0
  94. package/dist/ui-public/icons/lucide/heading-6.js +32 -0
  95. package/dist/ui-public/icons/lucide/highlighter.js +22 -0
  96. package/dist/ui-public/icons/lucide/hourglass.js +27 -0
  97. package/dist/ui-public/icons/lucide/house.js +22 -0
  98. package/dist/ui-public/icons/lucide/image.js +37 -0
  99. package/dist/ui-public/icons/lucide/images.js +38 -0
  100. package/dist/ui-public/icons/lucide/info.js +30 -0
  101. package/dist/ui-public/icons/lucide/italic.js +41 -0
  102. package/dist/ui-public/icons/lucide/keyboard.js +38 -0
  103. package/dist/ui-public/icons/lucide/languages.js +29 -0
  104. package/dist/ui-public/icons/lucide/layers.js +26 -0
  105. package/dist/ui-public/icons/lucide/layout-grid.js +51 -0
  106. package/dist/ui-public/icons/lucide/letter-b.js +22 -0
  107. package/dist/ui-public/icons/lucide/letter-text.js +28 -0
  108. package/dist/ui-public/icons/lucide/life-buoy.js +37 -0
  109. package/dist/ui-public/icons/lucide/link.js +22 -0
  110. package/dist/ui-public/icons/lucide/list-indent-decrease.js +27 -0
  111. package/dist/ui-public/icons/lucide/list-indent-increase.js +27 -0
  112. package/dist/ui-public/icons/lucide/list-ordered.js +29 -0
  113. package/dist/ui-public/icons/lucide/list-tree.js +28 -0
  114. package/dist/ui-public/icons/lucide/list.js +29 -0
  115. package/dist/ui-public/icons/lucide/log-out.js +26 -0
  116. package/dist/ui-public/icons/lucide/mail.js +28 -0
  117. package/dist/ui-public/icons/lucide/map-pin.js +26 -0
  118. package/dist/ui-public/icons/lucide/map-pinned.js +30 -0
  119. package/dist/ui-public/icons/lucide/maximize.js +27 -0
  120. package/dist/ui-public/icons/lucide/menu.js +26 -0
  121. package/dist/ui-public/icons/lucide/messages-square.js +22 -0
  122. package/dist/ui-public/icons/lucide/minimize.js +27 -0
  123. package/dist/ui-public/icons/lucide/minus.js +22 -0
  124. package/dist/ui-public/icons/lucide/notepad-text.js +36 -0
  125. package/dist/ui-public/icons/lucide/octagon-exclamation-point.js +26 -0
  126. package/dist/ui-public/icons/lucide/palette.js +48 -0
  127. package/dist/ui-public/icons/lucide/panel-left.js +28 -0
  128. package/dist/ui-public/icons/lucide/panel-right.js +28 -0
  129. package/dist/ui-public/icons/lucide/pause.js +34 -0
  130. package/dist/ui-public/icons/lucide/pen.js +22 -0
  131. package/dist/ui-public/icons/lucide/pilcrow.js +26 -0
  132. package/dist/ui-public/icons/lucide/pipette.js +26 -0
  133. package/dist/ui-public/icons/lucide/play.js +22 -0
  134. package/dist/ui-public/icons/lucide/plus.js +22 -0
  135. package/dist/ui-public/icons/lucide/quote.js +22 -0
  136. package/dist/ui-public/icons/lucide/redo-2.js +22 -0
  137. package/dist/ui-public/icons/lucide/refresh-cw.js +27 -0
  138. package/dist/ui-public/icons/lucide/rotate-ccw-clock.js +26 -0
  139. package/dist/ui-public/icons/lucide/rotate-ccw.js +22 -0
  140. package/dist/ui-public/icons/lucide/rows-3.js +32 -0
  141. package/dist/ui-public/icons/lucide/search.js +26 -0
  142. package/dist/ui-public/icons/lucide/send.js +22 -0
  143. package/dist/ui-public/icons/lucide/settings-2.js +35 -0
  144. package/dist/ui-public/icons/lucide/settings.js +26 -0
  145. package/dist/ui-public/icons/lucide/sliders-horizontal.js +32 -0
  146. package/dist/ui-public/icons/lucide/smartphone.js +29 -0
  147. package/dist/ui-public/icons/lucide/square-arrow-left.js +32 -0
  148. package/dist/ui-public/icons/lucide/square-arrow-up-right.js +32 -0
  149. package/dist/ui-public/icons/lucide/square-code.js +32 -0
  150. package/dist/ui-public/icons/lucide/square-dashed.js +35 -0
  151. package/dist/ui-public/icons/lucide/square-pen.js +22 -0
  152. package/dist/ui-public/icons/lucide/square-plus.js +32 -0
  153. package/dist/ui-public/icons/lucide/square-terminal.js +33 -0
  154. package/dist/ui-public/icons/lucide/store.js +26 -0
  155. package/dist/ui-public/icons/lucide/strikethrough.js +31 -0
  156. package/dist/ui-public/icons/lucide/table.js +33 -0
  157. package/dist/ui-public/icons/lucide/tag.js +27 -0
  158. package/dist/ui-public/icons/lucide/text-align-center.js +26 -0
  159. package/dist/ui-public/icons/lucide/text-align-end.js +26 -0
  160. package/dist/ui-public/icons/lucide/text-align-justify.js +26 -0
  161. package/dist/ui-public/icons/lucide/text-align-start.js +26 -0
  162. package/dist/ui-public/icons/lucide/toggle-right.js +32 -0
  163. package/dist/ui-public/icons/lucide/toolbox.js +28 -0
  164. package/dist/ui-public/icons/lucide/trash.js +28 -0
  165. package/dist/ui-public/icons/lucide/triangle-exclamation-point.js +26 -0
  166. package/dist/ui-public/icons/lucide/underline.js +27 -0
  167. package/dist/ui-public/icons/lucide/undo-2.js +22 -0
  168. package/dist/ui-public/icons/lucide/unfold-vertical.js +31 -0
  169. package/dist/ui-public/icons/lucide/user-lock.js +37 -0
  170. package/dist/ui-public/icons/lucide/user-minus.js +35 -0
  171. package/dist/ui-public/icons/lucide/user-round-arrow-left.js +31 -0
  172. package/dist/ui-public/icons/lucide/user.js +26 -0
  173. package/dist/ui-public/icons/lucide/x.js +22 -0
  174. package/dist/ui-public/locales/en.js +76 -5
  175. package/dist/ui-public/src/Message.d.ts +3 -4
  176. package/dist/ui-public/src/UiTextKey.d.ts +1 -1
  177. package/dist/ui-public/src/actions/Actions/ActionTooltip.js +1 -1
  178. package/dist/ui-public/src/actions/Actions/registry.d.ts +2 -2
  179. package/dist/ui-public/src/actions/Actions/registry.js +2 -2
  180. package/dist/ui-public/src/actions/Button.d.ts +16 -11
  181. package/dist/ui-public/src/actions/Button.js +7 -1
  182. package/dist/ui-public/src/actions/Dropdown/Menu.d.ts +2 -2
  183. package/dist/ui-public/src/actions/Dropdown/Option.d.ts +7 -7
  184. package/dist/ui-public/src/actions/Dropdown/index.d.ts +1 -1
  185. package/dist/ui-public/src/actions/Dropdown/triggers/ButtonTrigger.d.ts +5 -5
  186. package/dist/ui-public/src/actions/Dropdown/triggers/DropdownTriggerButton.d.ts +2 -2
  187. package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.d.ts +6 -6
  188. package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.js +1 -1
  189. package/dist/ui-public/src/actions/EditorToolbar/Button.d.ts +1 -1
  190. package/dist/ui-public/src/actions/MultipleSelectionActionBar.d.ts +1 -1
  191. package/dist/ui-public/src/actions/SplitButton/Caret.js +2 -2
  192. package/dist/ui-public/src/actions/SplitButton/Halves.js +1 -1
  193. package/dist/ui-public/src/actions/SplitButton/index.d.ts +3 -3
  194. package/dist/ui-public/src/actions/disabledReason.d.ts +4 -4
  195. package/dist/ui-public/src/actions/disabledReason.js +1 -1
  196. package/dist/ui-public/src/content/Avatar.d.ts +3 -3
  197. package/dist/ui-public/src/content/Avatar.js +2 -2
  198. package/dist/ui-public/src/content/CodeSnippet.d.ts +1 -1
  199. package/dist/ui-public/src/content/CopyableValue.d.ts +1 -1
  200. package/dist/ui-public/src/content/EnvironmentPill.d.ts +1 -1
  201. package/dist/ui-public/src/content/EnvironmentPill.js +1 -1
  202. package/dist/ui-public/src/content/FieldTypeAvatar.d.ts +22 -0
  203. package/dist/ui-public/src/content/FieldTypeAvatar.js +35 -0
  204. package/dist/ui-public/src/content/FieldTypeName.d.ts +19 -0
  205. package/dist/ui-public/src/content/FieldTypeName.js +25 -0
  206. package/dist/ui-public/src/content/IconAvatar.d.ts +3 -2
  207. package/dist/ui-public/src/content/ItemStatus.d.ts +1 -1
  208. package/dist/ui-public/src/content/Pill.d.ts +1 -1
  209. package/dist/ui-public/src/content/SmartDate.d.ts +1 -1
  210. package/dist/ui-public/src/content/UploadPreview/asset.js +200 -0
  211. package/dist/ui-public/src/content/UploadPreview/audio.js +120 -0
  212. package/dist/ui-public/src/content/{UploadPreview.d.ts → UploadPreview/box.d.ts} +10 -10
  213. package/dist/ui-public/src/content/{UploadPreview.js → UploadPreview/box.js} +7 -7
  214. package/dist/ui-public/src/content/{uploadPreviewFit.d.ts → UploadPreview/fit.d.ts} +2 -2
  215. package/dist/ui-public/src/content/{uploadPreviewFit.js → UploadPreview/fit.js} +3 -3
  216. package/dist/ui-public/src/content/UploadPreview/index.d.ts +61 -0
  217. package/dist/ui-public/src/content/UploadPreview/index.js +36 -0
  218. package/dist/ui-public/src/content/UploadPreview/presentation.js +63 -0
  219. package/dist/ui-public/src/content/UploadPreview/thumbhash.js +91 -0
  220. package/dist/ui-public/src/content/UploadPreview/upload.d.ts +104 -0
  221. package/dist/ui-public/src/content/UploadPreview/upload.js +112 -0
  222. package/dist/ui-public/src/content/UploadThreatTriangle.js +1 -1
  223. package/dist/ui-public/src/content/UsageMeter.d.ts +1 -1
  224. package/dist/ui-public/src/content/ValidityTriangles.d.ts +1 -1
  225. package/dist/ui-public/src/content/ValidityTriangles.js +1 -1
  226. package/dist/ui-public/src/feedback/BlankSlate.d.ts +5 -5
  227. package/dist/ui-public/src/feedback/Callout.d.ts +5 -5
  228. package/dist/ui-public/src/feedback/Callout.js +1 -1
  229. package/dist/ui-public/src/feedback/ProgressBar.d.ts +4 -4
  230. package/dist/ui-public/src/feedback/Spinner.d.ts +6 -6
  231. package/dist/ui-public/src/feedback/Spinner.js +1 -1
  232. package/dist/ui-public/src/form/DateInput.d.ts +13 -0
  233. package/dist/ui-public/src/form/DateInput.js +16 -0
  234. package/dist/ui-public/src/form/DateTimeInput/Base.d.ts +89 -0
  235. package/dist/ui-public/src/form/DateTimeInput/Base.js +330 -0
  236. package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.d.ts +29 -0
  237. package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.js +195 -0
  238. package/dist/ui-public/src/form/DateTimeInput/dateText.js +38 -0
  239. package/dist/ui-public/src/form/DateTimeInput/index.d.ts +10 -0
  240. package/dist/ui-public/src/form/DateTimeInput/index.js +18 -0
  241. package/dist/ui-public/src/form/DateTimeInput/value.js +31 -0
  242. package/dist/ui-public/src/form/DateTimeRangeInput/Panel.js +167 -0
  243. package/dist/ui-public/src/form/DateTimeRangeInput/index.d.ts +123 -0
  244. package/dist/ui-public/src/form/DateTimeRangeInput/index.js +186 -0
  245. package/dist/ui-public/src/form/DateTimeRangeInput/rangeLabel.js +46 -0
  246. package/dist/ui-public/src/form/FieldHint.d.ts +2 -2
  247. package/dist/ui-public/src/form/FieldWrapper.d.ts +9 -9
  248. package/dist/ui-public/src/form/FieldWrapper.js +3 -3
  249. package/dist/ui-public/src/form/FilterBuilder/Editor.js +123 -0
  250. package/dist/ui-public/src/form/FilterBuilder/index.d.ts +9 -0
  251. package/dist/ui-public/src/form/FilterBuilder/index.js +294 -0
  252. package/dist/ui-public/src/form/FilterBuilder/types.d.ts +188 -0
  253. package/dist/ui-public/src/form/FilterBuilder/values.js +86 -0
  254. package/dist/ui-public/src/form/InputGroup.d.ts +2 -2
  255. package/dist/ui-public/src/form/InputGroup.js +1 -1
  256. package/dist/ui-public/src/form/KeyValueList.d.ts +1 -1
  257. package/dist/ui-public/src/form/Label.d.ts +2 -2
  258. package/dist/ui-public/src/form/PasswordInput.js +1 -9
  259. package/dist/ui-public/src/form/RadioGroupInput.d.ts +2 -2
  260. package/dist/ui-public/src/form/RadioGroupInput.js +1 -1
  261. package/dist/ui-public/src/form/SelectInput/SelectMenu.d.ts +2 -2
  262. package/dist/ui-public/src/form/SelectInput/index.d.ts +3 -3
  263. package/dist/ui-public/src/form/SwitchInput.d.ts +2 -2
  264. package/dist/ui-public/src/form/SwitchList.d.ts +1 -1
  265. package/dist/ui-public/src/form/SwitchList.js +1 -1
  266. package/dist/ui-public/src/form/TableList.d.ts +2 -2
  267. package/dist/ui-public/src/form/TextareaInput.js +1 -1
  268. package/dist/ui-public/src/form/inputProps.d.ts +6 -6
  269. package/dist/ui-public/src/hooks/useAsyncSelectOptions.d.ts +1 -1
  270. package/dist/ui-public/src/hooks/useSmartRowClick.d.ts +1 -1
  271. package/dist/ui-public/src/hooks/useSmartRowClick.js +1 -1
  272. package/dist/ui-public/src/layout/Page/PageGroup.d.ts +2 -2
  273. package/dist/ui-public/src/layout/Page/PageGroup.js +1 -1
  274. package/dist/ui-public/src/layout/Pane/FormHeader.d.ts +1 -1
  275. package/dist/ui-public/src/layout/Pane/FormHeader.js +1 -1
  276. package/dist/ui-public/src/layout/Pane/ListFilter.d.ts +1 -1
  277. package/dist/ui-public/src/layout/Pane/ListPresets.d.ts +1 -1
  278. package/dist/ui-public/src/layout/Pane/PaneHeader.d.ts +1 -1
  279. package/dist/ui-public/src/layout/Pane/index.d.ts +8 -8
  280. package/dist/ui-public/src/layout/Pane/index.js +17 -8
  281. package/dist/ui-public/src/layout/SidebarPanel.d.ts +1 -1
  282. package/dist/ui-public/src/layout/SplitPane/Rail.js +1 -1
  283. package/dist/ui-public/src/layout/SplitPane/index.d.ts +6 -6
  284. package/dist/ui-public/src/layout/SplitPane/index.js +16 -2
  285. package/dist/ui-public/src/layout/Toolbar/AddNewButton.d.ts +2 -2
  286. package/dist/ui-public/src/layout/Toolbar/FilterToggle.d.ts +1 -1
  287. package/dist/ui-public/src/layout/Toolbar/FilterToggle.js +12 -4
  288. package/dist/ui-public/src/layout/Toolbar/Help.d.ts +3 -3
  289. package/dist/ui-public/src/layout/Toolbar/Help.js +2 -2
  290. package/dist/ui-public/src/layout/Toolbar/Note.d.ts +1 -1
  291. package/dist/ui-public/src/layout/Toolbar/Note.js +1 -1
  292. package/dist/ui-public/src/layout/Toolbar/Pagination.d.ts +1 -1
  293. package/dist/ui-public/src/layout/Toolbar/Pagination.js +1 -1
  294. package/dist/ui-public/src/layout/Toolbar/PresetsTitle.d.ts +3 -3
  295. package/dist/ui-public/src/layout/Toolbar/PresetsTitle.js +2 -2
  296. package/dist/ui-public/src/layout/Toolbar/PrimaryButton.d.ts +3 -3
  297. package/dist/ui-public/src/layout/Toolbar/Root.d.ts +1 -1
  298. package/dist/ui-public/src/layout/Toolbar/Root.js +4 -1
  299. package/dist/ui-public/src/layout/Toolbar/ToolbarTitleTrigger.js +1 -1
  300. package/dist/ui-public/src/lists/CardList.d.ts +3 -3
  301. package/dist/ui-public/src/lists/EmptySlot.d.ts +1 -1
  302. package/dist/ui-public/src/lists/InfoList/User.d.ts +1 -1
  303. package/dist/ui-public/src/lists/InfoList/Value.d.ts +1 -1
  304. package/dist/ui-public/src/lists/InfoList/Value.js +1 -1
  305. package/dist/ui-public/src/lists/InfoList/index.d.ts +3 -3
  306. package/dist/ui-public/src/lists/InfoList/index.js +1 -1
  307. package/dist/ui-public/src/lists/MediaCard.d.ts +7 -7
  308. package/dist/ui-public/src/lists/RecordRow/Image.d.ts +24 -0
  309. package/dist/ui-public/src/lists/RecordRow/Image.js +22 -0
  310. package/dist/ui-public/src/lists/RecordRow/List.d.ts +26 -0
  311. package/dist/ui-public/src/lists/RecordRow/List.js +30 -0
  312. package/dist/ui-public/src/lists/RecordRow/context.js +31 -0
  313. package/dist/ui-public/src/lists/RecordRow/index.d.ts +94 -0
  314. package/dist/ui-public/src/lists/RecordRow/index.js +122 -0
  315. package/dist/ui-public/src/lists/RecordRow/presentation.js +73 -0
  316. package/dist/ui-public/src/lists/RecordRow/types.d.ts +58 -0
  317. package/dist/ui-public/src/lists/RowList.d.ts +5 -5
  318. package/dist/ui-public/src/lists/SettingsList.d.ts +3 -3
  319. package/dist/ui-public/src/lists/SettingsList.js +2 -2
  320. package/dist/ui-public/src/lists/Table/Row.d.ts +5 -5
  321. package/dist/ui-public/src/lists/Table/Table.d.ts +3 -3
  322. package/dist/ui-public/src/lists/Table/TreeToggle.d.ts +2 -2
  323. package/dist/ui-public/src/lists/Table/TreeToggle.js +5 -4
  324. package/dist/ui-public/src/lists/Table/cells/LinkCell.d.ts +1 -1
  325. package/dist/ui-public/src/lists/TreeRow/Action.d.ts +1 -1
  326. package/dist/ui-public/src/lists/TreeRow/Action.js +1 -1
  327. package/dist/ui-public/src/lists/TreeRow/Link.d.ts +1 -1
  328. package/dist/ui-public/src/lists/TreeRow/Link.js +1 -1
  329. package/dist/ui-public/src/lists/UploadCard.d.ts +66 -3
  330. package/dist/ui-public/src/lists/UploadCard.js +116 -7
  331. package/dist/ui-public/src/lists/UserRow.d.ts +122 -0
  332. package/dist/ui-public/src/lists/UserRow.js +104 -0
  333. package/dist/ui-public/src/lists/dnd/DragHandle.d.ts +2 -2
  334. package/dist/ui-public/src/lists/dnd/SortableList.d.ts +1 -1
  335. package/dist/ui-public/src/lists/dnd/dropTargetClassName.d.ts +1 -1
  336. package/dist/ui-public/src/lists/dnd/tree/SortableTree.d.ts +2 -2
  337. package/dist/ui-public/src/navigation/Chevron.d.ts +4 -4
  338. package/dist/ui-public/src/navigation/Chevron.js +1 -1
  339. package/dist/ui-public/src/navigation/Link.d.ts +5 -5
  340. package/dist/ui-public/src/navigation/Link.js +1 -1
  341. package/dist/ui-public/src/navigation/NavList.d.ts +1 -1
  342. package/dist/ui-public/src/navigation/NavList.js +1 -1
  343. package/dist/ui-public/src/navigation/NavigationProvider.d.ts +1 -1
  344. package/dist/ui-public/src/navigation/SegmentedControl.d.ts +2 -2
  345. package/dist/ui-public/src/navigation/SettingsMenu.d.ts +8 -8
  346. package/dist/ui-public/src/navigation/SettingsMenu.js +1 -1
  347. package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNode.d.ts +4 -4
  348. package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNodeActions.d.ts +3 -0
  349. package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNodeActions.js +2 -1
  350. package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.d.ts +1 -1
  351. package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.js +1 -1
  352. package/dist/ui-public/src/overlays/HoverCard/index.js +1 -1
  353. package/dist/ui-public/src/overlays/NewZIndex.d.ts +1 -1
  354. package/dist/ui-public/src/overlays/NewZIndex.js +1 -1
  355. package/dist/ui-public/src/overlays/Popover.d.ts +1 -1
  356. package/dist/ui-public/src/overlays/PortalWrapper.js +1 -1
  357. package/dist/ui-public/src/overlays/useModalClose.js +3 -3
  358. package/dist/ui-public/src/patterns/ListDetail/FloatingDetail.js +71 -0
  359. package/dist/ui-public/src/patterns/ListDetail/Overview.js +2 -2
  360. package/dist/ui-public/src/patterns/ListDetail/Page.d.ts +8 -9
  361. package/dist/ui-public/src/patterns/ListDetail/Page.js +12 -9
  362. package/dist/ui-public/src/patterns/ListDetail/Panel.d.ts +2 -2
  363. package/dist/ui-public/src/patterns/ListDetail/Panel.js +12 -11
  364. package/dist/ui-public/src/patterns/ListDetail/Split.d.ts +25 -11
  365. package/dist/ui-public/src/patterns/ListDetail/Split.js +99 -115
  366. package/dist/ui-public/src/patterns/ListDetail/index.d.ts +4 -3
  367. package/dist/ui-public/src/patterns/ListDetail/useDetailWidthDrag.js +43 -0
  368. package/dist/ui-public/src/patterns/ListFormPage.d.ts +3 -3
  369. package/dist/ui-public/src/patterns/ListFormPage.js +1 -1
  370. package/dist/ui-public/src/semantic/Heading.d.ts +1 -1
  371. package/dist/ui-public/src/semantic/Heading.js +1 -1
  372. package/dist/ui-public/src/semantic/Image.js +1 -1
  373. package/dist/ui-public/src/semantic/Nav.d.ts +3 -3
  374. package/dist/ui-public/src/semantic/Nav.js +3 -3
  375. package/dist/ui-public/src/semantic/RawButton.d.ts +3 -3
  376. package/dist/ui-public/src/semantic/RawButton.js +1 -1
  377. package/dist/ui-public/src/semantic/Search.d.ts +1 -1
  378. package/dist/ui-public/src/semantic/Search.js +1 -1
  379. package/dist/ui-public/src/utils/fieldTypes.d.ts +29 -0
  380. package/dist/ui-public/src/utils/fieldTypes.js +94 -0
  381. package/dist/ui-public/src/utils/format.d.ts +21 -0
  382. package/dist/ui-public/src/utils/format.js +20 -0
  383. package/dist/ui-public/src/utils/formatDate.d.ts +10 -2
  384. package/dist/ui-public/src/utils/formatDate.js +4 -4
  385. package/dist/ui-public/src/utils/tickBatcher.js +44 -0
  386. package/dist/ui-public/src/utils/timezones.js +277 -0
  387. package/dist/ui-public/src/utils/weekStartForLocale.js +25 -0
  388. package/dist/utils/fieldTypes.d.ts +1 -0
  389. package/dist/utils/fieldTypes.js +2 -0
  390. package/dist/utils/format.d.ts +1 -0
  391. package/dist/utils/format.js +2 -0
  392. package/package.json +3 -3
  393. package/dist/ui-public/icons/brands/gitlab.js +0 -15
  394. package/dist/ui-public/icons/brands/markdown.js +0 -15
  395. package/dist/ui-public/icons/custom/fieldgroup-boolean.js +0 -18
  396. package/dist/ui-public/icons/custom/fieldgroup-color.js +0 -18
  397. package/dist/ui-public/icons/custom/fieldgroup-datetime.js +0 -49
  398. package/dist/ui-public/icons/custom/fieldgroup-json.js +0 -18
  399. package/dist/ui-public/icons/custom/fieldgroup-location.js +0 -19
  400. package/dist/ui-public/icons/custom/fieldgroup-media.js +0 -18
  401. package/dist/ui-public/icons/custom/fieldgroup-number.js +0 -18
  402. package/dist/ui-public/icons/custom/fieldgroup-reference.js +0 -18
  403. package/dist/ui-public/icons/custom/fieldgroup-rich_text.js +0 -18
  404. package/dist/ui-public/icons/custom/fieldgroup-seo.js +0 -22
  405. package/dist/ui-public/icons/custom/fieldgroup-structured_text.js +0 -61
  406. package/dist/ui-public/icons/custom/language.js +0 -16
  407. package/dist/ui-public/icons/custom/masonry.js +0 -21
  408. package/dist/ui-public/icons/light/eye-slash.js +0 -16
  409. package/dist/ui-public/icons/light/eye.js +0 -16
  410. package/dist/ui-public/icons/regular/align-left.js +0 -15
  411. package/dist/ui-public/icons/regular/arrow-down-a-z.js +0 -16
  412. package/dist/ui-public/icons/regular/arrow-down-from-line.js +0 -16
  413. package/dist/ui-public/icons/regular/arrow-down-to-line.js +0 -15
  414. package/dist/ui-public/icons/regular/arrow-down.js +0 -16
  415. package/dist/ui-public/icons/regular/arrow-left.js +0 -16
  416. package/dist/ui-public/icons/regular/arrow-right-arrow-left.js +0 -16
  417. package/dist/ui-public/icons/regular/arrow-right-from-bracket.js +0 -16
  418. package/dist/ui-public/icons/regular/arrow-right.js +0 -16
  419. package/dist/ui-public/icons/regular/arrow-rotate-left.js +0 -15
  420. package/dist/ui-public/icons/regular/arrow-rotate-right.js +0 -16
  421. package/dist/ui-public/icons/regular/arrow-turn-up.js +0 -16
  422. package/dist/ui-public/icons/regular/arrow-up-arrow-down.js +0 -16
  423. package/dist/ui-public/icons/regular/arrow-up-from-line.js +0 -16
  424. package/dist/ui-public/icons/regular/arrow-up-right-from-square.js +0 -16
  425. package/dist/ui-public/icons/regular/arrow-up-to-line.js +0 -15
  426. package/dist/ui-public/icons/regular/arrow-up.js +0 -16
  427. package/dist/ui-public/icons/regular/arrows-from-line.js +0 -16
  428. package/dist/ui-public/icons/regular/arrows-rotate.js +0 -16
  429. package/dist/ui-public/icons/regular/arrows-to-line.js +0 -16
  430. package/dist/ui-public/icons/regular/arrows-turn-to-dots.js +0 -15
  431. package/dist/ui-public/icons/regular/badge-check.js +0 -15
  432. package/dist/ui-public/icons/regular/ballot-check.js +0 -15
  433. package/dist/ui-public/icons/regular/ban.js +0 -16
  434. package/dist/ui-public/icons/regular/bars.js +0 -16
  435. package/dist/ui-public/icons/regular/bold.js +0 -15
  436. package/dist/ui-public/icons/regular/bolt.js +0 -15
  437. package/dist/ui-public/icons/regular/book.js +0 -16
  438. package/dist/ui-public/icons/regular/bookmark.js +0 -16
  439. package/dist/ui-public/icons/regular/brackets-curly.js +0 -15
  440. package/dist/ui-public/icons/regular/browser.js +0 -16
  441. package/dist/ui-public/icons/regular/calendar-clock.js +0 -15
  442. package/dist/ui-public/icons/regular/calendar.js +0 -16
  443. package/dist/ui-public/icons/regular/chart-area.js +0 -15
  444. package/dist/ui-public/icons/regular/chevrons-down.js +0 -16
  445. package/dist/ui-public/icons/regular/chevrons-left.js +0 -16
  446. package/dist/ui-public/icons/regular/chevrons-right.js +0 -16
  447. package/dist/ui-public/icons/regular/circle-arrow-up.js +0 -16
  448. package/dist/ui-public/icons/regular/circle-check.js +0 -16
  449. package/dist/ui-public/icons/regular/circle-dot.js +0 -16
  450. package/dist/ui-public/icons/regular/circle-exclamation.js +0 -16
  451. package/dist/ui-public/icons/regular/circle-info.js +0 -16
  452. package/dist/ui-public/icons/regular/circle-question.js +0 -16
  453. package/dist/ui-public/icons/regular/clapperboard-play.js +0 -15
  454. package/dist/ui-public/icons/regular/clipboard.js +0 -15
  455. package/dist/ui-public/icons/regular/clock-rotate-left.js +0 -16
  456. package/dist/ui-public/icons/regular/clock.js +0 -16
  457. package/dist/ui-public/icons/regular/clone.js +0 -16
  458. package/dist/ui-public/icons/regular/cloud-arrow-down.js +0 -15
  459. package/dist/ui-public/icons/regular/code-branch.js +0 -16
  460. package/dist/ui-public/icons/regular/code-fork.js +0 -16
  461. package/dist/ui-public/icons/regular/command.js +0 -16
  462. package/dist/ui-public/icons/regular/comments.js +0 -16
  463. package/dist/ui-public/icons/regular/copy.js +0 -16
  464. package/dist/ui-public/icons/regular/cube.js +0 -15
  465. package/dist/ui-public/icons/regular/cubes.js +0 -15
  466. package/dist/ui-public/icons/regular/dash.js +0 -16
  467. package/dist/ui-public/icons/regular/database.js +0 -16
  468. package/dist/ui-public/icons/regular/diamond.js +0 -15
  469. package/dist/ui-public/icons/regular/down.js +0 -16
  470. package/dist/ui-public/icons/regular/download.js +0 -16
  471. package/dist/ui-public/icons/regular/earth-europe.js +0 -16
  472. package/dist/ui-public/icons/regular/ellipsis-vertical.js +0 -16
  473. package/dist/ui-public/icons/regular/ellipsis.js +0 -16
  474. package/dist/ui-public/icons/regular/envelope.js +0 -16
  475. package/dist/ui-public/icons/regular/expand.js +0 -16
  476. package/dist/ui-public/icons/regular/eye-dropper.js +0 -16
  477. package/dist/ui-public/icons/regular/eye.js +0 -16
  478. package/dist/ui-public/icons/regular/file-export.js +0 -16
  479. package/dist/ui-public/icons/regular/file-lines.js +0 -15
  480. package/dist/ui-public/icons/regular/file-shield.js +0 -15
  481. package/dist/ui-public/icons/regular/file.js +0 -15
  482. package/dist/ui-public/icons/regular/filter.js +0 -16
  483. package/dist/ui-public/icons/regular/fire-flame-curved.js +0 -15
  484. package/dist/ui-public/icons/regular/flask-gear.js +0 -16
  485. package/dist/ui-public/icons/regular/flask.js +0 -16
  486. package/dist/ui-public/icons/regular/folder-gear.js +0 -15
  487. package/dist/ui-public/icons/regular/folder-magnifying-glass.js +0 -15
  488. package/dist/ui-public/icons/regular/folder-open.js +0 -16
  489. package/dist/ui-public/icons/regular/folder-plus.js +0 -16
  490. package/dist/ui-public/icons/regular/folder.js +0 -16
  491. package/dist/ui-public/icons/regular/folders.js +0 -16
  492. package/dist/ui-public/icons/regular/gear.js +0 -16
  493. package/dist/ui-public/icons/regular/gift.js +0 -16
  494. package/dist/ui-public/icons/regular/globe.js +0 -16
  495. package/dist/ui-public/icons/regular/grid-2.js +0 -16
  496. package/dist/ui-public/icons/regular/grip-dots-vertical.js +0 -16
  497. package/dist/ui-public/icons/regular/hand.js +0 -16
  498. package/dist/ui-public/icons/regular/hourglass-clock.js +0 -16
  499. package/dist/ui-public/icons/regular/house.js +0 -16
  500. package/dist/ui-public/icons/regular/images.js +0 -16
  501. package/dist/ui-public/icons/regular/input-numeric.js +0 -15
  502. package/dist/ui-public/icons/regular/input-text.js +0 -15
  503. package/dist/ui-public/icons/regular/keyboard.js +0 -16
  504. package/dist/ui-public/icons/regular/layer-group.js +0 -16
  505. package/dist/ui-public/icons/regular/life-ring.js +0 -16
  506. package/dist/ui-public/icons/regular/link-simple.js +0 -15
  507. package/dist/ui-public/icons/regular/link.js +0 -16
  508. package/dist/ui-public/icons/regular/list-tree.js +0 -16
  509. package/dist/ui-public/icons/regular/list.js +0 -16
  510. package/dist/ui-public/icons/regular/magnifying-glass-chart.js +0 -15
  511. package/dist/ui-public/icons/regular/magnifying-glass.js +0 -16
  512. package/dist/ui-public/icons/regular/map-location-dot.js +0 -16
  513. package/dist/ui-public/icons/regular/memo.js +0 -16
  514. package/dist/ui-public/icons/regular/mobile-screen-button.js +0 -16
  515. package/dist/ui-public/icons/regular/octagon-exclamation.js +0 -16
  516. package/dist/ui-public/icons/regular/palette.js +0 -16
  517. package/dist/ui-public/icons/regular/paper-plane.js +0 -16
  518. package/dist/ui-public/icons/regular/paragraph.js +0 -15
  519. package/dist/ui-public/icons/regular/paste.js +0 -15
  520. package/dist/ui-public/icons/regular/pause.js +0 -16
  521. package/dist/ui-public/icons/regular/pen-paintbrush.js +0 -15
  522. package/dist/ui-public/icons/regular/pen-to-square.js +0 -16
  523. package/dist/ui-public/icons/regular/pen.js +0 -16
  524. package/dist/ui-public/icons/regular/people-arrows.js +0 -16
  525. package/dist/ui-public/icons/regular/photo-film.js +0 -15
  526. package/dist/ui-public/icons/regular/play.js +0 -16
  527. package/dist/ui-public/icons/regular/puzzle-piece.js +0 -15
  528. package/dist/ui-public/icons/regular/receipt.js +0 -16
  529. package/dist/ui-public/icons/regular/rectangle-barcode.js +0 -15
  530. package/dist/ui-public/icons/regular/rectangle-list.js +0 -15
  531. package/dist/ui-public/icons/regular/right-left.js +0 -15
  532. package/dist/ui-public/icons/regular/rotate-left.js +0 -16
  533. package/dist/ui-public/icons/regular/shield.js +0 -15
  534. package/dist/ui-public/icons/regular/sidebar-flip.js +0 -16
  535. package/dist/ui-public/icons/regular/sidebar.js +0 -16
  536. package/dist/ui-public/icons/regular/sliders.js +0 -16
  537. package/dist/ui-public/icons/regular/sparkles.js +0 -15
  538. package/dist/ui-public/icons/regular/square-caret-down.js +0 -15
  539. package/dist/ui-public/icons/regular/square-check.js +0 -15
  540. package/dist/ui-public/icons/regular/square-dashed.js +0 -15
  541. package/dist/ui-public/icons/regular/square-left.js +0 -16
  542. package/dist/ui-public/icons/regular/square-terminal.js +0 -16
  543. package/dist/ui-public/icons/regular/square-up-right.js +0 -16
  544. package/dist/ui-public/icons/regular/store.js +0 -16
  545. package/dist/ui-public/icons/regular/swap-arrows.js +0 -15
  546. package/dist/ui-public/icons/regular/table.js +0 -16
  547. package/dist/ui-public/icons/regular/tag.js +0 -16
  548. package/dist/ui-public/icons/regular/toggle-on.js +0 -15
  549. package/dist/ui-public/icons/regular/toolbox.js +0 -16
  550. package/dist/ui-public/icons/regular/trash-undo.js +0 -15
  551. package/dist/ui-public/icons/regular/trash.js +0 -16
  552. package/dist/ui-public/icons/regular/triangle-exclamation.js +0 -16
  553. package/dist/ui-public/icons/regular/turn-up.js +0 -16
  554. package/dist/ui-public/icons/regular/user-group.js +0 -15
  555. package/dist/ui-public/icons/regular/user-helmet-safety.js +0 -16
  556. package/dist/ui-public/icons/regular/user-lock.js +0 -16
  557. package/dist/ui-public/icons/regular/user-minus.js +0 -16
  558. package/dist/ui-public/icons/regular/user-tie.js +0 -15
  559. package/dist/ui-public/icons/regular/user.js +0 -16
  560. package/dist/ui-public/icons/regular/users.js +0 -15
  561. package/dist/ui-public/icons/regular/video.js +0 -15
  562. package/dist/ui-public/icons/regular/webhook.js +0 -15
  563. package/dist/ui-public/icons/regular/wrench.js +0 -15
  564. package/dist/ui-public/icons/regular/xmark.js +0 -16
  565. package/dist/ui-public/icons/solid/align-center.js +0 -16
  566. package/dist/ui-public/icons/solid/align-justify.js +0 -16
  567. package/dist/ui-public/icons/solid/align-left.js +0 -16
  568. package/dist/ui-public/icons/solid/align-right.js +0 -16
  569. package/dist/ui-public/icons/solid/arrow-rotate-left.js +0 -16
  570. package/dist/ui-public/icons/solid/arrow-rotate-right.js +0 -16
  571. package/dist/ui-public/icons/solid/bold.js +0 -16
  572. package/dist/ui-public/icons/solid/circle-exclamation.js +0 -16
  573. package/dist/ui-public/icons/solid/closed-captioning.js +0 -15
  574. package/dist/ui-public/icons/solid/code.js +0 -16
  575. package/dist/ui-public/icons/solid/compress.js +0 -16
  576. package/dist/ui-public/icons/solid/download.js +0 -15
  577. package/dist/ui-public/icons/solid/expand.js +0 -16
  578. package/dist/ui-public/icons/solid/file-arrow-down.js +0 -15
  579. package/dist/ui-public/icons/solid/file-code.js +0 -16
  580. package/dist/ui-public/icons/solid/grid-2.js +0 -16
  581. package/dist/ui-public/icons/solid/h1.js +0 -16
  582. package/dist/ui-public/icons/solid/h2.js +0 -16
  583. package/dist/ui-public/icons/solid/h3.js +0 -16
  584. package/dist/ui-public/icons/solid/h4.js +0 -16
  585. package/dist/ui-public/icons/solid/h5.js +0 -16
  586. package/dist/ui-public/icons/solid/h6.js +0 -16
  587. package/dist/ui-public/icons/solid/highlighter.js +0 -16
  588. package/dist/ui-public/icons/solid/horizontal-rule.js +0 -16
  589. package/dist/ui-public/icons/solid/image.js +0 -16
  590. package/dist/ui-public/icons/solid/indent.js +0 -16
  591. package/dist/ui-public/icons/solid/italic.js +0 -16
  592. package/dist/ui-public/icons/solid/link.js +0 -16
  593. package/dist/ui-public/icons/solid/list-ol.js +0 -16
  594. package/dist/ui-public/icons/solid/list-ul.js +0 -16
  595. package/dist/ui-public/icons/solid/location-dot.js +0 -16
  596. package/dist/ui-public/icons/solid/music.js +0 -15
  597. package/dist/ui-public/icons/solid/outdent.js +0 -16
  598. package/dist/ui-public/icons/solid/paragraph.js +0 -16
  599. package/dist/ui-public/icons/solid/plus.js +0 -16
  600. package/dist/ui-public/icons/solid/quote-right.js +0 -16
  601. package/dist/ui-public/icons/solid/rectangle-code.js +0 -16
  602. package/dist/ui-public/icons/solid/square-plus.js +0 -16
  603. package/dist/ui-public/icons/solid/strikethrough.js +0 -16
  604. package/dist/ui-public/icons/solid/subtitles.js +0 -15
  605. package/dist/ui-public/icons/solid/table.js +0 -16
  606. package/dist/ui-public/icons/solid/triangle-exclamation.js +0 -16
  607. package/dist/ui-public/icons/solid/underline.js +0 -16
@@ -0,0 +1,104 @@
1
+ /**
2
+ * The metadata of an asset in one locale. An older plugin SDK gives
3
+ * `default_field_metadata` keyed by locale (`{ en: { alt, title } }`); the
4
+ * API and the newer SDKs give it keyed by field (`{ alt: { en } }`). The
5
+ * helpers read the two shapes.
6
+ */
7
+ type LocaleMetadata = {
8
+ alt?: string | null;
9
+ title?: string | null;
10
+ poster_time?: number | null;
11
+ };
12
+ type FieldKeyedMetadata = {
13
+ alt: {
14
+ [locale: string]: string | null;
15
+ };
16
+ title: {
17
+ [locale: string]: string | null;
18
+ };
19
+ poster_time?: number | null;
20
+ };
21
+ type LocaleKeyedMetadata = {
22
+ [locale: string]: LocaleMetadata;
23
+ };
24
+ /**
25
+ * An asset of the Media Area as the API and `ctx` give it (for example
26
+ * `ctx.selectUpload()` or `ctx.loadUploads()`). The preview reads only these
27
+ * fields.
28
+ */
29
+ export type UploadPreviewUpload = {
30
+ id?: string;
31
+ attributes: {
32
+ /** The full URL of the file */
33
+ url: string;
34
+ filename?: string;
35
+ format: string | null;
36
+ size: number;
37
+ width: number | null;
38
+ height: number | null;
39
+ mime_type: string | null;
40
+ md5?: string | null;
41
+ thumbhash?: string | null;
42
+ mux_playback_id?: string | null;
43
+ default_field_metadata?: FieldKeyedMetadata | LocaleKeyedMetadata;
44
+ };
45
+ meta?: {
46
+ antivirus?: {
47
+ status?: string | null;
48
+ } | null;
49
+ };
50
+ };
51
+ type Attributes = UploadPreviewUpload['attributes'];
52
+ /**
53
+ * The metadata of an asset in the value of a file or gallery field. Each
54
+ * value is null when the field uses the default of the asset.
55
+ */
56
+ export type UploadFieldValue = {
57
+ alt?: string | null;
58
+ title?: string | null;
59
+ /** The frame of a video, in seconds */
60
+ poster_time?: number | null;
61
+ };
62
+ /**
63
+ * The default alternate text and title of an asset, from the Media Area. Each
64
+ * value is the one of the first locale of `locales` that is not null, as the
65
+ * gallery field of DatoCMS reads it: an empty text does not fall back.
66
+ */
67
+ export declare function uploadDefaultMetadata(upload: UploadPreviewUpload, locales: string[]): {
68
+ alt: string | null;
69
+ title: string | null;
70
+ };
71
+ /**
72
+ * The default frame of a video, in seconds, from the Media Area. Null for the
73
+ * default frame of the video service.
74
+ */
75
+ export declare function uploadDefaultPosterTime(upload: UploadPreviewUpload): number | null;
76
+ /** The image service of DatoCMS transforms (crops, resizes) this format */
77
+ export declare function formatSupportsTransformations(format: string | null): boolean;
78
+ /** The browser shows a file of this format in an image */
79
+ export declare function formatShownByBrowser(format: string | null): boolean;
80
+ export type UploadPreviewKind =
81
+ /** A file that the image service resizes */
82
+ 'image'
83
+ /** A small file that the browser shows as it is (an SVG) */
84
+ | 'file-image'
85
+ /** A video with its frame */
86
+ | 'video'
87
+ /** A video that the video service still encodes */
88
+ | 'video-encoding' | 'audio'
89
+ /** Any other file: the icon of its format */
90
+ | 'file';
91
+ /** What the preview of an asset shows */
92
+ export declare function uploadPreviewKind(attributes: Attributes): UploadPreviewKind;
93
+ /**
94
+ * The URL of the file, with a parameter that changes when the file changes:
95
+ * the browser does not show an old copy from its cache. A change of the
96
+ * metadata does not change it.
97
+ */
98
+ export declare function uploadFileUrl(attributes: Attributes, params?: Record<string, string | number>): string;
99
+ /**
100
+ * The URL of a frame of a video, at this width in image pixels. Without
101
+ * `posterTime`, the frame is the one of the video service.
102
+ */
103
+ export declare function videoFrameUrl(muxPlaybackId: string, width: number, posterTime: number | null): string;
104
+ export {};
@@ -0,0 +1,112 @@
1
+ //#region ../ui-public/src/content/UploadPreview/upload.ts
2
+ function isFieldKeyed(metadata) {
3
+ return typeof metadata.alt === "object" && metadata.alt !== null && !("alt" in metadata.alt) && !("title" in metadata.alt);
4
+ }
5
+ /**
6
+ * The default alternate text and title of an asset, from the Media Area. Each
7
+ * value is the one of the first locale of `locales` that is not null, as the
8
+ * gallery field of DatoCMS reads it: an empty text does not fall back.
9
+ */
10
+ function uploadDefaultMetadata(upload, locales) {
11
+ const metadata = upload.attributes.default_field_metadata;
12
+ function first(field) {
13
+ if (!metadata) return null;
14
+ for (const locale of locales) {
15
+ const value = isFieldKeyed(metadata) ? metadata[field][locale] : metadata[locale]?.[field];
16
+ if (value != null) return value;
17
+ }
18
+ return null;
19
+ }
20
+ return {
21
+ alt: first("alt"),
22
+ title: first("title")
23
+ };
24
+ }
25
+ /**
26
+ * The default frame of a video, in seconds, from the Media Area. Null for the
27
+ * default frame of the video service.
28
+ */
29
+ function uploadDefaultPosterTime(upload) {
30
+ const metadata = upload.attributes.default_field_metadata;
31
+ if (!metadata) return null;
32
+ if (isFieldKeyed(metadata)) return metadata.poster_time ?? null;
33
+ return Object.values(metadata)[0]?.poster_time ?? null;
34
+ }
35
+ var formatsWithTransformations = /* @__PURE__ */ new Set([
36
+ "ai",
37
+ "avif",
38
+ "bmp",
39
+ "gif",
40
+ "heic",
41
+ "ico",
42
+ "icns",
43
+ "jpg",
44
+ "jpeg",
45
+ "pct",
46
+ "png",
47
+ "psd",
48
+ "tif",
49
+ "tiff",
50
+ "webp"
51
+ ]);
52
+ var formatsShownByBrowser = /* @__PURE__ */ new Set([
53
+ "bmp",
54
+ "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8m70VvY++Cr6Evv+/er/1wHDA7MFnwePCX8Lbw1jD1MRRxM7FS8XIxkbGw8dBx7/IPci8yTrJuco4yrfLNsu2zDXMtc01zbXONs62zzfPuNA50LrRPNG+0j/SwdNE08bUSdTL1U7V0dZV1tjXXNfg2GTY6Nls2fHadtr724DcBdyK3RDdlt4c3qLfKd+v4DbgveFE4cziU+Lb42Pj6+Rz5PzlhOYN5pbnH+ep6DLovOlG6dDqW+rl63Dr++yG7RHtnO4o7rTvQO/M8Fjw5fFy8f/yjPMZ86f0NPTC9VD13vZt9vv3ivgZ+Kj5OPnH+lf65/t3/Af8mP0p/br+S/7c/23//wAAABNjb2xybmNseAABAA0ABoAAAAAYaXBtYQAAAAAAAAABAAEFAQKDBAUAAAAqbWRhdBIACggYAAaICGg0IDIUE8ADDDDEAgkAA1C2y8ymNlTjVUA=";
62
+ var probeStarted = false;
63
+ function probeBrowserFormats() {
64
+ if (probeStarted || typeof Image === "undefined") return;
65
+ probeStarted = true;
66
+ const image = new Image();
67
+ image.onload = () => {
68
+ if (image.width === 1) formatsShownByBrowser.add("avif");
69
+ };
70
+ image.src = AVIF_PROBE;
71
+ }
72
+ /** The image service of DatoCMS transforms (crops, resizes) this format */
73
+ function formatSupportsTransformations(format) {
74
+ return !!format && formatsWithTransformations.has(format.toLowerCase());
75
+ }
76
+ /** The browser shows a file of this format in an image */
77
+ function formatShownByBrowser(format) {
78
+ probeBrowserFormats();
79
+ return !!format && formatsShownByBrowser.has(format.toLowerCase());
80
+ }
81
+ var MAX_SIZE_OF_FILE_SHOWN_AS_IT_IS = 35e4;
82
+ /** What the preview of an asset shows */
83
+ function uploadPreviewKind(attributes) {
84
+ const { format, width, height, size } = attributes;
85
+ if (attributes.mime_type?.startsWith("audio")) return "audio";
86
+ if (attributes.mux_playback_id && width && height) return "video";
87
+ if (attributes.mux_playback_id && !format) return "video-encoding";
88
+ if (!width || !height) return "file";
89
+ if (formatSupportsTransformations(format)) return "image";
90
+ if (formatShownByBrowser(format) && size && size < MAX_SIZE_OF_FILE_SHOWN_AS_IT_IS) return "file-image";
91
+ return "file";
92
+ }
93
+ /**
94
+ * The URL of the file, with a parameter that changes when the file changes:
95
+ * the browser does not show an old copy from its cache. A change of the
96
+ * metadata does not change it.
97
+ */
98
+ function uploadFileUrl(attributes, params = {}) {
99
+ const url = new URL(attributes.url);
100
+ if (attributes.md5) url.searchParams.set("ts", attributes.md5.substring(0, 8));
101
+ for (const [key, value] of Object.entries(params)) url.searchParams.set(key, String(value));
102
+ return url.toString();
103
+ }
104
+ /**
105
+ * The URL of a frame of a video, at this width in image pixels. Without
106
+ * `posterTime`, the frame is the one of the video service.
107
+ */
108
+ function videoFrameUrl(muxPlaybackId, width, posterTime) {
109
+ return `https://image.mux.com/${muxPlaybackId}/thumbnail.jpg?width=${width}${posterTime != null ? `&time=${posterTime}` : ""}`;
110
+ }
111
+ //#endregion
112
+ export { formatShownByBrowser, formatSupportsTransformations, uploadDefaultMetadata, uploadDefaultPosterTime, uploadFileUrl, uploadPreviewKind, videoFrameUrl };
@@ -6,7 +6,7 @@ import React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region ../ui-public/src/content/UploadThreatTriangle.tsx
8
8
  function UploadThreatIcon() {
9
- return /* @__PURE__ */ jsx(Status.TriangleExclamationSolidIcon, { className: "ValidityTriangle--threat" });
9
+ return /* @__PURE__ */ jsx(Status.TriangleExclamationIcon, { className: "ValidityTriangle--threat" });
10
10
  }
11
11
  /**
12
12
  * The triangle of an upload that the antivirus found infected. Render it
@@ -19,7 +19,7 @@ export type UsageMeterProps = {
19
19
  * @default false
20
20
  */
21
21
  blocked?: boolean;
22
- /** Only for the size and the place of the meter, not for its look */
22
+ /** Only for the size and the position of the meter, not for its look */
23
23
  className?: string;
24
24
  };
25
25
  /** The usage against a limit, with the part over the limit in color */
@@ -18,7 +18,7 @@ export type ItemValidityTrianglesProps = {
18
18
  currentValid?: boolean | null | undefined;
19
19
  /**
20
20
  * True when the model has a draft mode. Without it, the current version
21
- * is the published version, thus the current triangle does not show.
21
+ * is the published version, so the current triangle does not show.
22
22
  */
23
23
  draftModeActive: boolean | null | undefined;
24
24
  };
@@ -7,7 +7,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region ../ui-public/src/content/ValidityTriangles.tsx
8
8
  /** The solid triangle of a published version that is not valid */
9
9
  function InvalidPublishedVersionIcon({ className }) {
10
- return /* @__PURE__ */ jsx(Status.TriangleExclamationSolidIcon, { className: classNames("ValidityTriangle--published", className) });
10
+ return /* @__PURE__ */ jsx(Status.TriangleExclamationIcon, { className: classNames("ValidityTriangle--published", className) });
11
11
  }
12
12
  /** The outline triangle of a current version that is not valid */
13
13
  function InvalidCurrentVersionIcon({ className }) {
@@ -10,20 +10,20 @@ export type BlankSlateDocsLink = {
10
10
  href: string;
11
11
  };
12
12
  /**
13
- * While the content loads: a spinner shows in the place of the icon. The
14
- * title then tells what loads. Without a title, the spinner tells that the
13
+ * While the content loads, a spinner shows instead of the icon. The
14
+ * title then says what loads. Without a title, the spinner says that the
15
15
  * content loads.
16
16
  */
17
17
  type Loading = {
18
- /** Shows a spinner in the place of the icon */
18
+ /** Shows a spinner instead of the icon */
19
19
  loading: true;
20
20
  /** What loads, for example "Loading the invoices" */
21
21
  title?: Message;
22
- /** The spinner takes the place of the icon */
22
+ /** The spinner replaces the icon */
23
23
  icon?: never;
24
24
  error?: never;
25
25
  };
26
- /** The content is ready: the blank slate tells why there is nothing to show */
26
+ /** The content is ready: the blank slate says why there is nothing to show */
27
27
  type Loaded = {
28
28
  loading?: false;
29
29
  /**
@@ -2,10 +2,10 @@ import React, { ReactNode } from 'react';
2
2
  import { type Message } from '../Message.js';
3
3
  export type CalloutProps = {
4
4
  /**
5
- * "neutral" gives information. "warning" tells about a problem or a risk
5
+ * "neutral" gives information. "warning" says that there is a problem or a risk
6
6
  * with the current data, for example a token that shows only once.
7
- * "danger" tells about an error, for example the error of a form.
8
- * "success" tells that the current data is in a good state, for example
7
+ * "danger" says that there is an error, for example the error of a form.
8
+ * "success" says that the current data is in a good state, for example
9
9
  * a usage that is within the limits.
10
10
  *
11
11
  * When a "warning" or "danger" callout appears, screen readers read it
@@ -18,13 +18,13 @@ export type CalloutProps = {
18
18
  icon?: ReactNode;
19
19
  /** A short line in bold above the text, for example "Some invoices are due" */
20
20
  title?: Message;
21
- /** Only for the place of the callout (margin), not for its look */
21
+ /** Only for the position of the callout (margin), not for its look */
22
22
  className?: string;
23
23
  /** The message. A next step is a link in the text. */
24
24
  children?: ReactNode;
25
25
  };
26
26
  /**
27
- * A message about the current data. For the text that tells what a page is
27
+ * A message about the current data. For the text that says what a page is
28
28
  * for, use Toolbar.Help. A callout has no buttons: a next step is a link in
29
29
  * the text, and a link only opens a page. An action that fixes the problem
30
30
  * goes in the row of the value, or in a Page.Group with a tone (a callout in
@@ -5,7 +5,7 @@ import classNames from "classnames";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region ../ui-public/src/feedback/Callout.tsx
7
7
  /**
8
- * A message about the current data. For the text that tells what a page is
8
+ * A message about the current data. For the text that says what a page is
9
9
  * for, use Toolbar.Help. A callout has no buttons: a next step is a link in
10
10
  * the text, and a link only opens a page. An action that fixes the problem
11
11
  * goes in the row of the value, or in a Page.Group with a tone (a callout in
@@ -14,14 +14,14 @@ export type ProgressBarProps = {
14
14
  ariaLabel: TextMessage;
15
15
  /**
16
16
  * "inline" is a 4px bar as wide as its parent. "edge" is a 2px bar on the
17
- * bottom edge of the nearest positioned parent, thus it does not cover the
18
- * content: use it on a card or a row.
17
+ * bottom edge of the nearest positioned parent, so it does not cover the
18
+ * content. Use it on a card or a row.
19
19
  * @default "inline"
20
20
  */
21
21
  placement?: 'inline' | 'edge';
22
22
  /**
23
- * Only for the place of the bar (width, margin), not for its look. The bar
24
- * is as wide as its parent: the caller knows the width that fits its
23
+ * Only for the position of the bar (width, margin), not for its look. The bar
24
+ * is as wide as its parent. You know the width that fits your
25
25
  * layout, for example a maximum width in a table column.
26
26
  */
27
27
  className?: string;
@@ -9,17 +9,17 @@ export type SpinnerProps = {
9
9
  */
10
10
  inline?: boolean;
11
11
  /**
12
- * The text that a screen reader tells: the spinner is a status. Give
13
- * `false` when a visible text or `aria-busy` already tells that the
14
- * content loads: then the spinner is only a decoration.
12
+ * The text that a screen reader says. The spinner is a status. Give
13
+ * `false` when a visible text or `aria-busy` already says that the
14
+ * content loads. Then the spinner is only a decoration.
15
15
  * @default "Loading"
16
16
  */
17
17
  label?: TextMessage | false;
18
- /** Only for the place of the spinner (margin, z-index), not for its look */
18
+ /** Only for the position of the spinner (margin, z-index), not for its look */
19
19
  className?: string;
20
20
  };
21
21
  /**
22
- * A spinner that tells that something loads. It has two sizes: 32px to load
22
+ * A spinner that shows that something loads. It has two sizes: 32px to load
23
23
  * an area, 16px (an icon) in a line of text or in a control. The box is the
24
24
  * size of the spinner.
25
25
  */
@@ -50,7 +50,7 @@ export type SpinnerOverlayProps = {
50
50
  veil?: boolean;
51
51
  /** See the label of Spinner */
52
52
  label?: TextMessage | false;
53
- /** Only for the place of the overlay (z-index), not for its look */
53
+ /** Only for the position of the overlay (z-index), not for its look */
54
54
  className?: string;
55
55
  };
56
56
  /**
@@ -3,7 +3,7 @@ import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region ../ui-public/src/feedback/Spinner.tsx
5
5
  /**
6
- * A spinner that tells that something loads. It has two sizes: 32px to load
6
+ * A spinner that shows that something loads. It has two sizes: 32px to load
7
7
  * an area, 16px (an icon) in a line of text or in a control. The box is the
8
8
  * size of the spinner.
9
9
  */
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { type DateInputCommonProps } from './DateTimeInput/Base.js';
3
+ /**
4
+ * The props of `DateInput`. The value is a date as `"yyyy-MM-dd"`, for
5
+ * example `"2026-11-17"`, or `null`.
6
+ */
7
+ export type DateInputProps = DateInputCommonProps;
8
+ export type { DateInputVariant, SelectableDays } from './DateTimeInput/Base.js';
9
+ /**
10
+ * An input for a date, with a calendar. The user types the date in the
11
+ * format of their settings, or picks the day in the calendar.
12
+ */
13
+ export default function DateInput(props: DateInputProps): React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import DateTimeInputBase from "./DateTimeInput/Base.js";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region ../ui-public/src/form/DateInput.tsx
5
+ /**
6
+ * An input for a date, with a calendar. The user types the date in the
7
+ * format of their settings, or picks the day in the calendar.
8
+ */
9
+ function DateInput(props) {
10
+ return /* @__PURE__ */ jsx(DateTimeInputBase, {
11
+ ...props,
12
+ withTime: false
13
+ });
14
+ }
15
+ //#endregion
16
+ export { DateInput as default };
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ import { type TextMessage } from '../../Message.js';
3
+ import { type PopoverProps } from '../../overlays/Popover.js';
4
+ import { type FieldInputProps } from '../FieldWrapper.js';
5
+ import { BaseInputComponentPropsFieldWithReadOnly } from '../inputProps.js';
6
+ import { type SelectableDays } from './CalendarGrid.js';
7
+ export type { SelectableDays } from './CalendarGrid.js';
8
+ /** The look of the input, and the props that only one look has */
9
+ export type DateInputVariant =
10
+ /** A field with a border, a calendar button and a clear button */
11
+ {
12
+ /**
13
+ * The look of the input. "default" is a field with a border and a
14
+ * calendar button. "filter" has no border, no buttons and a small
15
+ * text, for the value of a filter: the calendar opens when the user
16
+ * clicks the date.
17
+ * @default 'default'
18
+ */
19
+ variant?: 'default';
20
+ /**
21
+ * Shows a button that clears the value, when the input has a value.
22
+ * @default true
23
+ */
24
+ clearable?: boolean;
25
+ /**
26
+ * The field is as wide as its content, not as wide as its container.
27
+ * @default false
28
+ */
29
+ autosize?: boolean;
30
+ }
31
+ /**
32
+ * The value of a filter: no border, no buttons, a small text. It is as
33
+ * wide as its content.
34
+ */
35
+ | {
36
+ variant: 'filter';
37
+ clearable?: never;
38
+ autosize?: never;
39
+ };
40
+ /** The props that `DateInput` and `DateTimeInput` share */
41
+ export type DateInputCommonProps = BaseInputComponentPropsFieldWithReadOnly<string | null> & Omit<FieldInputProps, 'id'> & DateInputVariant & {
42
+ /**
43
+ * The accessible name of the date text. Give it when the input is not in
44
+ * a `FieldWrapper` with a `label`.
45
+ */
46
+ ariaLabel?: TextMessage;
47
+ /**
48
+ * The side of the field where the calendar opens. It moves to the other
49
+ * side when there is no space.
50
+ * @default 'bottom-start'
51
+ */
52
+ calendarPlacement?: PopoverProps['placement'];
53
+ /**
54
+ * The days that the user can pick in the calendar. "future" is today and
55
+ * the days after it, "past" is today and the days before it. The
56
+ * calendar disables the other days. The user can still type a date out
57
+ * of the limit: check the value in your code.
58
+ * @default 'all'
59
+ */
60
+ selectableDays?: SelectableDays;
61
+ };
62
+ /**
63
+ * The props of `DateTimeInput`. The value is an ISO 8601 date and time with
64
+ * an offset, for example `"2026-11-17T09:30:00+01:00"`, or `null`.
65
+ */
66
+ export type DateTimeInputProps = DateInputCommonProps & {
67
+ /**
68
+ * The time has the seconds. Without them, the user types the hours and
69
+ * the minutes, and the seconds of the value are 0.
70
+ * @default true
71
+ */
72
+ seconds?: boolean;
73
+ /**
74
+ * When the field shows the time zone menu. "always" shows it. "whenDifferent"
75
+ * shows it only when the time zone of the user is not the time zone of the
76
+ * project, so the user sees which time zone the time is in.
77
+ * @default 'always'
78
+ */
79
+ timezoneSelect?: 'always' | 'whenDifferent';
80
+ };
81
+ type DateTimeInputBaseProps = DateTimeInputProps & {
82
+ withTime: boolean;
83
+ };
84
+ /**
85
+ * The input of `DateInput` and of `DateTimeInput`. A date has no time zone:
86
+ * it uses the time zone of the project for the instant of its midnight, and
87
+ * shows the same day.
88
+ */
89
+ export default function DateTimeInputBase({ value, onChange, onBlur, disabled: disabledProp, readOnly, withTime, seconds, timezoneSelect, variant, clearable, calendarPlacement, selectableDays, autosize, ariaLabel, id, name, ...ariaProps }: DateTimeInputBaseProps): React.JSX.Element;