@namroodinc/liquid-editorial 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/README.md +64 -10
  2. package/UPGRADING.md +514 -0
  3. package/dist/chunks/{Avatar-DdFEOumt.js → Avatar-BK8IdL5W.js} +2 -2
  4. package/dist/chunks/{Avatar-DdFEOumt.js.map → Avatar-BK8IdL5W.js.map} +1 -1
  5. package/dist/chunks/{Avatar-B_2lI7fS.cjs → Avatar-DPnrvkwd.cjs} +2 -2
  6. package/dist/chunks/{Avatar-B_2lI7fS.cjs.map → Avatar-DPnrvkwd.cjs.map} +1 -1
  7. package/dist/chunks/CollectionView-BNYx29b1.cjs +2 -0
  8. package/dist/chunks/CollectionView-BNYx29b1.cjs.map +1 -0
  9. package/dist/chunks/{CollectionView-Cr12UFWa.js → CollectionView-Vj84E26b.js} +28 -29
  10. package/dist/chunks/CollectionView-Vj84E26b.js.map +1 -0
  11. package/dist/chunks/ColourField-C1qjpIfB.cjs +2 -0
  12. package/dist/chunks/ColourField-C1qjpIfB.cjs.map +1 -0
  13. package/dist/chunks/{ColourField-B-tjjBfA.js → ColourField-Ce2oaVcd.js} +122 -122
  14. package/dist/chunks/ColourField-Ce2oaVcd.js.map +1 -0
  15. package/dist/chunks/DatePicker-BCnzFJFF.cjs +2 -0
  16. package/dist/chunks/DatePicker-BCnzFJFF.cjs.map +1 -0
  17. package/dist/chunks/DatePicker-CnVmsCwO.js +298 -0
  18. package/dist/chunks/DatePicker-CnVmsCwO.js.map +1 -0
  19. package/dist/chunks/Drawer-BDX9_qHA.cjs +2 -0
  20. package/dist/chunks/Drawer-BDX9_qHA.cjs.map +1 -0
  21. package/dist/chunks/Drawer-DTtgAZO2.js +172 -0
  22. package/dist/chunks/Drawer-DTtgAZO2.js.map +1 -0
  23. package/dist/chunks/EntryPicker-Baqn0SQM.cjs +2 -0
  24. package/dist/chunks/EntryPicker-Baqn0SQM.cjs.map +1 -0
  25. package/dist/chunks/EntryPicker-DIYjKmBf.js +803 -0
  26. package/dist/chunks/EntryPicker-DIYjKmBf.js.map +1 -0
  27. package/dist/chunks/FormEditor-B7Pm_ZzT.cjs +2 -0
  28. package/dist/chunks/FormEditor-B7Pm_ZzT.cjs.map +1 -0
  29. package/dist/chunks/{FormEditor-ucTbDyQt.js → FormEditor-HqqFmu7s.js} +223 -200
  30. package/dist/chunks/FormEditor-HqqFmu7s.js.map +1 -0
  31. package/dist/chunks/{LoadState-B7GTDlWv.js → LoadState-B056EPu7.js} +20 -19
  32. package/dist/chunks/LoadState-B056EPu7.js.map +1 -0
  33. package/dist/chunks/LoadState-BXLG-SkQ.cjs +2 -0
  34. package/dist/chunks/LoadState-BXLG-SkQ.cjs.map +1 -0
  35. package/dist/chunks/NumberField-CVsK4l9P.js +178 -0
  36. package/dist/chunks/NumberField-CVsK4l9P.js.map +1 -0
  37. package/dist/chunks/NumberField-Ccjpa_1d.cjs +2 -0
  38. package/dist/chunks/NumberField-Ccjpa_1d.cjs.map +1 -0
  39. package/dist/chunks/{RichTextEditor-CNkwWist.js → RichTextEditor-CuZnjiy2.js} +93 -93
  40. package/dist/chunks/RichTextEditor-CuZnjiy2.js.map +1 -0
  41. package/dist/chunks/RichTextEditor-DcbLho2Q.cjs +2 -0
  42. package/dist/chunks/RichTextEditor-DcbLho2Q.cjs.map +1 -0
  43. package/dist/chunks/dialogLabel-2HRYMHbF.cjs +2 -0
  44. package/dist/chunks/dialogLabel-2HRYMHbF.cjs.map +1 -0
  45. package/dist/chunks/dialogLabel-D18maX-p.js +176 -0
  46. package/dist/chunks/dialogLabel-D18maX-p.js.map +1 -0
  47. package/dist/chunks/frame-CzadNYgy.js +164 -0
  48. package/dist/chunks/frame-CzadNYgy.js.map +1 -0
  49. package/dist/chunks/frame-Mh99nmhR.cjs +2 -0
  50. package/dist/chunks/frame-Mh99nmhR.cjs.map +1 -0
  51. package/dist/chunks/group-CJA3-3s5.js +35 -0
  52. package/dist/chunks/group-CJA3-3s5.js.map +1 -0
  53. package/dist/chunks/group-DRSLOsXu.cjs +2 -0
  54. package/dist/chunks/group-DRSLOsXu.cjs.map +1 -0
  55. package/dist/chunks/limit-BNo4dlRj.cjs +2 -0
  56. package/dist/chunks/limit-BNo4dlRj.cjs.map +1 -0
  57. package/dist/chunks/limit-s9zfxIMC.js +16 -0
  58. package/dist/chunks/limit-s9zfxIMC.js.map +1 -0
  59. package/dist/chunks/overlayLayer-IuoPVwTO.js +158 -0
  60. package/dist/chunks/overlayLayer-IuoPVwTO.js.map +1 -0
  61. package/dist/chunks/overlayLayer-seJG-EFn.cjs +2 -0
  62. package/dist/chunks/overlayLayer-seJG-EFn.cjs.map +1 -0
  63. package/dist/chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js +7 -0
  64. package/dist/chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js.map +1 -0
  65. package/dist/chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs +2 -0
  66. package/dist/chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs.map +1 -0
  67. package/dist/chunks/{useLimit-DXe_VmYl.cjs → useLimit-CCv6sAUS.cjs} +2 -2
  68. package/dist/chunks/useLimit-CCv6sAUS.cjs.map +1 -0
  69. package/dist/chunks/{useLimit-BOmHKdJE.js → useLimit-DZOKm4S_.js} +2 -2
  70. package/dist/chunks/useLimit-DZOKm4S_.js.map +1 -0
  71. package/dist/chunks/useTooltip-BXAvQwt4.cjs +2 -0
  72. package/dist/chunks/useTooltip-BXAvQwt4.cjs.map +1 -0
  73. package/dist/chunks/useTooltip-BrC7FdeH.js +75 -0
  74. package/dist/chunks/useTooltip-BrC7FdeH.js.map +1 -0
  75. package/dist/components/AppShell/index.cjs +1 -1
  76. package/dist/components/AppShell/index.cjs.map +1 -1
  77. package/dist/components/AppShell/index.js +4 -4
  78. package/dist/components/AppShell/index.js.map +1 -1
  79. package/dist/components/Avatar/index.cjs +1 -1
  80. package/dist/components/Avatar/index.js +1 -1
  81. package/dist/components/Badge/index.cjs +1 -1
  82. package/dist/components/Badge/index.cjs.map +1 -1
  83. package/dist/components/Badge/index.d.cts +3 -0
  84. package/dist/components/Badge/index.d.cts.map +1 -1
  85. package/dist/components/Badge/index.d.ts +3 -0
  86. package/dist/components/Badge/index.d.ts.map +1 -1
  87. package/dist/components/Badge/index.js +11 -10
  88. package/dist/components/Badge/index.js.map +1 -1
  89. package/dist/components/Badge/style.css +25 -2
  90. package/dist/components/Button/index.cjs.map +1 -1
  91. package/dist/components/Button/index.d.cts +4 -2
  92. package/dist/components/Button/index.d.cts.map +1 -1
  93. package/dist/components/Button/index.d.ts +4 -2
  94. package/dist/components/Button/index.d.ts.map +1 -1
  95. package/dist/components/Button/index.js.map +1 -1
  96. package/dist/components/Choice/index.cjs +1 -1
  97. package/dist/components/Choice/index.cjs.map +1 -1
  98. package/dist/components/Choice/index.d.cts +13 -2
  99. package/dist/components/Choice/index.d.cts.map +1 -1
  100. package/dist/components/Choice/index.d.ts +13 -2
  101. package/dist/components/Choice/index.d.ts.map +1 -1
  102. package/dist/components/Choice/index.js +55 -35
  103. package/dist/components/Choice/index.js.map +1 -1
  104. package/dist/components/Choice/style.css +7 -2
  105. package/dist/components/CollectionView/filters.d.cts.map +1 -1
  106. package/dist/components/CollectionView/filters.d.ts.map +1 -1
  107. package/dist/components/CollectionView/index.cjs +1 -1
  108. package/dist/components/CollectionView/index.js +1 -1
  109. package/dist/components/ColourField/index.cjs +1 -1
  110. package/dist/components/ColourField/index.d.cts.map +1 -1
  111. package/dist/components/ColourField/index.d.ts.map +1 -1
  112. package/dist/components/ColourField/index.js +1 -1
  113. package/dist/components/DatePicker/index.cjs +1 -1
  114. package/dist/components/DatePicker/index.d.cts.map +1 -1
  115. package/dist/components/DatePicker/index.d.ts.map +1 -1
  116. package/dist/components/DatePicker/index.js +1 -1
  117. package/dist/components/Drawer/content.d.cts +27 -0
  118. package/dist/components/Drawer/content.d.cts.map +1 -0
  119. package/dist/components/Drawer/content.d.ts +27 -0
  120. package/dist/components/Drawer/content.d.ts.map +1 -0
  121. package/dist/components/Drawer/head.d.cts +10 -0
  122. package/dist/components/Drawer/head.d.cts.map +1 -0
  123. package/dist/components/Drawer/head.d.ts +10 -0
  124. package/dist/components/Drawer/head.d.ts.map +1 -0
  125. package/dist/components/Drawer/index.cjs +1 -2
  126. package/dist/components/Drawer/index.d.cts +24 -0
  127. package/dist/components/Drawer/index.d.cts.map +1 -1
  128. package/dist/components/Drawer/index.d.ts +24 -0
  129. package/dist/components/Drawer/index.d.ts.map +1 -1
  130. package/dist/components/Drawer/index.js +1 -102
  131. package/dist/components/Drawer/style.css +70 -0
  132. package/dist/components/EditLayout/index.cjs +1 -1
  133. package/dist/components/EditLayout/index.cjs.map +1 -1
  134. package/dist/components/EditLayout/index.d.cts.map +1 -1
  135. package/dist/components/EditLayout/index.d.ts.map +1 -1
  136. package/dist/components/EditLayout/index.js +65 -64
  137. package/dist/components/EditLayout/index.js.map +1 -1
  138. package/dist/components/EditLayout/style.css +12 -5
  139. package/dist/components/EntryPicker/blocked.d.cts +21 -0
  140. package/dist/components/EntryPicker/blocked.d.cts.map +1 -0
  141. package/dist/components/EntryPicker/blocked.d.ts +21 -0
  142. package/dist/components/EntryPicker/blocked.d.ts.map +1 -0
  143. package/dist/components/EntryPicker/chosen.d.cts +16 -0
  144. package/dist/components/EntryPicker/chosen.d.cts.map +1 -0
  145. package/dist/components/EntryPicker/chosen.d.ts +16 -0
  146. package/dist/components/EntryPicker/chosen.d.ts.map +1 -0
  147. package/dist/components/EntryPicker/dialog.d.cts +26 -0
  148. package/dist/components/EntryPicker/dialog.d.cts.map +1 -0
  149. package/dist/components/EntryPicker/dialog.d.ts +26 -0
  150. package/dist/components/EntryPicker/dialog.d.ts.map +1 -0
  151. package/dist/components/EntryPicker/feedback.d.cts +20 -0
  152. package/dist/components/EntryPicker/feedback.d.cts.map +1 -0
  153. package/dist/components/EntryPicker/feedback.d.ts +20 -0
  154. package/dist/components/EntryPicker/feedback.d.ts.map +1 -0
  155. package/dist/components/EntryPicker/index.cjs +1 -1
  156. package/dist/components/EntryPicker/index.d.cts +4 -38
  157. package/dist/components/EntryPicker/index.d.cts.map +1 -1
  158. package/dist/components/EntryPicker/index.d.ts +4 -38
  159. package/dist/components/EntryPicker/index.d.ts.map +1 -1
  160. package/dist/components/EntryPicker/index.js +1 -1
  161. package/dist/components/EntryPicker/item.d.cts +34 -0
  162. package/dist/components/EntryPicker/item.d.cts.map +1 -0
  163. package/dist/components/EntryPicker/item.d.ts +34 -0
  164. package/dist/components/EntryPicker/item.d.ts.map +1 -0
  165. package/dist/components/EntryPicker/limit.d.cts +25 -2
  166. package/dist/components/EntryPicker/limit.d.cts.map +1 -1
  167. package/dist/components/EntryPicker/limit.d.ts +25 -2
  168. package/dist/components/EntryPicker/limit.d.ts.map +1 -1
  169. package/dist/components/EntryPicker/results.d.cts +10 -0
  170. package/dist/components/EntryPicker/results.d.cts.map +1 -0
  171. package/dist/components/EntryPicker/results.d.ts +10 -0
  172. package/dist/components/EntryPicker/results.d.ts.map +1 -0
  173. package/dist/components/EntryPicker/selected-items.d.cts +11 -0
  174. package/dist/components/EntryPicker/selected-items.d.cts.map +1 -0
  175. package/dist/components/EntryPicker/selected-items.d.ts +11 -0
  176. package/dist/components/EntryPicker/selected-items.d.ts.map +1 -0
  177. package/dist/components/EntryPicker/style.css +203 -21
  178. package/dist/components/EntryPicker/types.d.cts +69 -0
  179. package/dist/components/EntryPicker/types.d.cts.map +1 -0
  180. package/dist/components/EntryPicker/types.d.ts +69 -0
  181. package/dist/components/EntryPicker/types.d.ts.map +1 -0
  182. package/dist/components/EntryPicker/use-picker-data.d.cts +40 -0
  183. package/dist/components/EntryPicker/use-picker-data.d.cts.map +1 -0
  184. package/dist/components/EntryPicker/use-picker-data.d.ts +40 -0
  185. package/dist/components/EntryPicker/use-picker-data.d.ts.map +1 -0
  186. package/dist/components/EntryPicker/use-picker-scroll.d.cts +14 -0
  187. package/dist/components/EntryPicker/use-picker-scroll.d.cts.map +1 -0
  188. package/dist/components/EntryPicker/use-picker-scroll.d.ts +14 -0
  189. package/dist/components/EntryPicker/use-picker-scroll.d.ts.map +1 -0
  190. package/dist/components/EntryPicker/use-selected-items.d.cts +21 -0
  191. package/dist/components/EntryPicker/use-selected-items.d.cts.map +1 -0
  192. package/dist/components/EntryPicker/use-selected-items.d.ts +21 -0
  193. package/dist/components/EntryPicker/use-selected-items.d.ts.map +1 -0
  194. package/dist/components/Field/frame.d.cts.map +1 -1
  195. package/dist/components/Field/frame.d.ts.map +1 -1
  196. package/dist/components/Field/group.d.cts +1 -1
  197. package/dist/components/Field/group.d.cts.map +1 -1
  198. package/dist/components/Field/group.d.ts +1 -1
  199. package/dist/components/Field/group.d.ts.map +1 -1
  200. package/dist/components/Field/index.cjs +1 -1
  201. package/dist/components/Field/index.js +1 -1
  202. package/dist/components/Field/{limit-reading.d.cts → limit-announcer.d.cts} +1 -4
  203. package/dist/components/Field/limit-announcer.d.cts.map +1 -0
  204. package/dist/components/Field/{limit-reading.d.ts → limit-announcer.d.ts} +1 -4
  205. package/dist/components/Field/limit-announcer.d.ts.map +1 -0
  206. package/dist/components/Field/limit.d.cts +1 -5
  207. package/dist/components/Field/limit.d.cts.map +1 -1
  208. package/dist/components/Field/limit.d.ts +1 -5
  209. package/dist/components/Field/limit.d.ts.map +1 -1
  210. package/dist/components/Field/style.css +0 -39
  211. package/dist/components/Field/types.d.cts +9 -3
  212. package/dist/components/Field/types.d.cts.map +1 -1
  213. package/dist/components/Field/types.d.ts +9 -3
  214. package/dist/components/Field/types.d.ts.map +1 -1
  215. package/dist/components/Field/useLimit.d.cts +1 -1
  216. package/dist/components/Field/useLimit.d.cts.map +1 -1
  217. package/dist/components/Field/useLimit.d.ts +1 -1
  218. package/dist/components/Field/useLimit.d.ts.map +1 -1
  219. package/dist/components/FieldAffix/index.cjs +1 -1
  220. package/dist/components/FieldAffix/index.cjs.map +1 -1
  221. package/dist/components/FieldAffix/index.d.cts.map +1 -1
  222. package/dist/components/FieldAffix/index.d.ts.map +1 -1
  223. package/dist/components/FieldAffix/index.js +2 -1
  224. package/dist/components/FieldAffix/index.js.map +1 -1
  225. package/dist/components/FormEditor/README.md +128 -14
  226. package/dist/components/FormEditor/control.d.cts +3 -2
  227. package/dist/components/FormEditor/control.d.cts.map +1 -1
  228. package/dist/components/FormEditor/control.d.ts +3 -2
  229. package/dist/components/FormEditor/control.d.ts.map +1 -1
  230. package/dist/components/FormEditor/index.cjs +1 -1
  231. package/dist/components/FormEditor/index.d.cts +3 -2
  232. package/dist/components/FormEditor/index.d.cts.map +1 -1
  233. package/dist/components/FormEditor/index.d.ts +3 -2
  234. package/dist/components/FormEditor/index.d.ts.map +1 -1
  235. package/dist/components/FormEditor/index.js +1 -1
  236. package/dist/components/FormEditor/model.d.cts +20 -5
  237. package/dist/components/FormEditor/model.d.cts.map +1 -1
  238. package/dist/components/FormEditor/model.d.ts +20 -5
  239. package/dist/components/FormEditor/model.d.ts.map +1 -1
  240. package/dist/components/ImageCropper/index.cjs +1 -1
  241. package/dist/components/ImageCropper/index.cjs.map +1 -1
  242. package/dist/components/ImageCropper/index.d.cts.map +1 -1
  243. package/dist/components/ImageCropper/index.d.ts.map +1 -1
  244. package/dist/components/ImageCropper/index.js +27 -26
  245. package/dist/components/ImageCropper/index.js.map +1 -1
  246. package/dist/components/LimitReading/index.cjs +2 -0
  247. package/dist/components/LimitReading/index.cjs.map +1 -0
  248. package/dist/components/LimitReading/index.d.cts +5 -0
  249. package/dist/components/LimitReading/index.d.cts.map +1 -0
  250. package/dist/components/LimitReading/index.d.ts +5 -0
  251. package/dist/components/LimitReading/index.d.ts.map +1 -0
  252. package/dist/components/LimitReading/index.js +71 -0
  253. package/dist/components/LimitReading/index.js.map +1 -0
  254. package/dist/components/LimitReading/limit.d.cts +9 -0
  255. package/dist/components/LimitReading/limit.d.cts.map +1 -0
  256. package/dist/components/LimitReading/limit.d.ts +9 -0
  257. package/dist/components/LimitReading/limit.d.ts.map +1 -0
  258. package/dist/components/LimitReading/style.css +69 -0
  259. package/dist/components/LimitReading/types.d.cts +22 -0
  260. package/dist/components/LimitReading/types.d.cts.map +1 -0
  261. package/dist/components/LimitReading/types.d.ts +22 -0
  262. package/dist/components/LimitReading/types.d.ts.map +1 -0
  263. package/dist/components/LoadState/error.d.cts +3 -1
  264. package/dist/components/LoadState/error.d.cts.map +1 -1
  265. package/dist/components/LoadState/error.d.ts +3 -1
  266. package/dist/components/LoadState/error.d.ts.map +1 -1
  267. package/dist/components/LoadState/index.cjs +1 -1
  268. package/dist/components/LoadState/index.d.cts +3 -1
  269. package/dist/components/LoadState/index.d.cts.map +1 -1
  270. package/dist/components/LoadState/index.d.ts +3 -1
  271. package/dist/components/LoadState/index.d.ts.map +1 -1
  272. package/dist/components/LoadState/index.js +1 -1
  273. package/dist/components/Menu/index.cjs +1 -1
  274. package/dist/components/Menu/index.cjs.map +1 -1
  275. package/dist/components/Menu/index.d.cts.map +1 -1
  276. package/dist/components/Menu/index.d.ts.map +1 -1
  277. package/dist/components/Menu/index.js +50 -49
  278. package/dist/components/Menu/index.js.map +1 -1
  279. package/dist/components/Modal/index.cjs +1 -1
  280. package/dist/components/Modal/index.cjs.map +1 -1
  281. package/dist/components/Modal/index.d.cts +12 -0
  282. package/dist/components/Modal/index.d.cts.map +1 -1
  283. package/dist/components/Modal/index.d.ts +12 -0
  284. package/dist/components/Modal/index.d.ts.map +1 -1
  285. package/dist/components/Modal/index.js +73 -64
  286. package/dist/components/Modal/index.js.map +1 -1
  287. package/dist/components/Modal/style.css +19 -0
  288. package/dist/components/NumberField/index.cjs +1 -1
  289. package/dist/components/NumberField/index.d.cts +1 -1
  290. package/dist/components/NumberField/index.d.cts.map +1 -1
  291. package/dist/components/NumberField/index.d.ts +1 -1
  292. package/dist/components/NumberField/index.d.ts.map +1 -1
  293. package/dist/components/NumberField/index.js +1 -1
  294. package/dist/components/NumberField/style.css +1 -1
  295. package/dist/components/Popover/index.cjs +1 -1
  296. package/dist/components/Popover/index.cjs.map +1 -1
  297. package/dist/components/Popover/index.d.cts +1 -1
  298. package/dist/components/Popover/index.d.cts.map +1 -1
  299. package/dist/components/Popover/index.d.ts +1 -1
  300. package/dist/components/Popover/index.d.ts.map +1 -1
  301. package/dist/components/Popover/index.js +57 -55
  302. package/dist/components/Popover/index.js.map +1 -1
  303. package/dist/components/Popover/style.css +6 -0
  304. package/dist/components/Popover/useTooltip.d.cts +2 -1
  305. package/dist/components/Popover/useTooltip.d.cts.map +1 -1
  306. package/dist/components/Popover/useTooltip.d.ts +2 -1
  307. package/dist/components/Popover/useTooltip.d.ts.map +1 -1
  308. package/dist/components/RichTextEditor/expansion.d.cts.map +1 -1
  309. package/dist/components/RichTextEditor/expansion.d.ts.map +1 -1
  310. package/dist/components/RichTextEditor/index.cjs +1 -1
  311. package/dist/components/RichTextEditor/index.js +1 -1
  312. package/dist/components/SearchField/index.cjs +1 -1
  313. package/dist/components/SearchField/index.cjs.map +1 -1
  314. package/dist/components/SearchField/index.d.cts +6 -1
  315. package/dist/components/SearchField/index.d.cts.map +1 -1
  316. package/dist/components/SearchField/index.d.ts +6 -1
  317. package/dist/components/SearchField/index.d.ts.map +1 -1
  318. package/dist/components/SearchField/index.js +32 -26
  319. package/dist/components/SearchField/index.js.map +1 -1
  320. package/dist/components/Select/index.cjs +1 -1
  321. package/dist/components/Select/index.cjs.map +1 -1
  322. package/dist/components/Select/index.d.cts.map +1 -1
  323. package/dist/components/Select/index.d.ts.map +1 -1
  324. package/dist/components/Select/index.js +73 -72
  325. package/dist/components/Select/index.js.map +1 -1
  326. package/dist/components/SelectionCard/index.cjs +1 -1
  327. package/dist/components/SelectionCard/index.js +1 -1
  328. package/dist/components/SortableList/index.cjs +1 -1
  329. package/dist/components/SortableList/index.cjs.map +1 -1
  330. package/dist/components/SortableList/index.d.cts +2 -0
  331. package/dist/components/SortableList/index.d.cts.map +1 -1
  332. package/dist/components/SortableList/index.d.ts +2 -0
  333. package/dist/components/SortableList/index.d.ts.map +1 -1
  334. package/dist/components/SortableList/index.js +14 -13
  335. package/dist/components/SortableList/index.js.map +1 -1
  336. package/dist/components/SubNav/index.cjs +1 -1
  337. package/dist/components/SubNav/index.cjs.map +1 -1
  338. package/dist/components/SubNav/index.d.cts.map +1 -1
  339. package/dist/components/SubNav/index.d.ts.map +1 -1
  340. package/dist/components/SubNav/index.js +40 -31
  341. package/dist/components/SubNav/index.js.map +1 -1
  342. package/dist/components/SubNav/style.css +0 -14
  343. package/dist/components/Table/style.css +6 -1
  344. package/dist/components/TagsInput/index.cjs +1 -1
  345. package/dist/components/TagsInput/index.js +1 -1
  346. package/dist/components/TextField/index.cjs +1 -1
  347. package/dist/components/TextField/index.js +1 -1
  348. package/dist/components/Time/index.cjs +1 -1
  349. package/dist/components/Time/index.js +1 -1
  350. package/dist/index.cjs +1 -1
  351. package/dist/index.d.cts +5 -3
  352. package/dist/index.d.cts.map +1 -1
  353. package/dist/index.d.ts +5 -3
  354. package/dist/index.d.ts.map +1 -1
  355. package/dist/index.js +50 -48
  356. package/dist/internal/dialogFocus.d.cts +2 -0
  357. package/dist/internal/dialogFocus.d.cts.map +1 -1
  358. package/dist/internal/dialogFocus.d.ts +2 -0
  359. package/dist/internal/dialogFocus.d.ts.map +1 -1
  360. package/dist/internal/dialogLabel.d.cts +10 -0
  361. package/dist/internal/dialogLabel.d.cts.map +1 -0
  362. package/dist/internal/dialogLabel.d.ts +10 -0
  363. package/dist/internal/dialogLabel.d.ts.map +1 -0
  364. package/dist/internal/dialogStack.d.cts +11 -3
  365. package/dist/internal/dialogStack.d.cts.map +1 -1
  366. package/dist/internal/dialogStack.d.ts +11 -3
  367. package/dist/internal/dialogStack.d.ts.map +1 -1
  368. package/dist/internal/movableHost.d.cts +9 -5
  369. package/dist/internal/movableHost.d.cts.map +1 -1
  370. package/dist/internal/movableHost.d.ts +9 -5
  371. package/dist/internal/movableHost.d.ts.map +1 -1
  372. package/dist/internal/overlayLayer.d.cts +33 -0
  373. package/dist/internal/overlayLayer.d.cts.map +1 -0
  374. package/dist/internal/overlayLayer.d.ts +33 -0
  375. package/dist/internal/overlayLayer.d.ts.map +1 -0
  376. package/dist/internal/portalScope.d.cts.map +1 -1
  377. package/dist/internal/portalScope.d.ts.map +1 -1
  378. package/dist/internal/useDialogPortal.d.cts +9 -0
  379. package/dist/internal/useDialogPortal.d.cts.map +1 -0
  380. package/dist/internal/useDialogPortal.d.ts +9 -0
  381. package/dist/internal/useDialogPortal.d.ts.map +1 -0
  382. package/dist/internal/useIsomorphicLayoutEffect.d.cts +7 -0
  383. package/dist/internal/useIsomorphicLayoutEffect.d.cts.map +1 -0
  384. package/dist/internal/useIsomorphicLayoutEffect.d.ts +7 -0
  385. package/dist/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
  386. package/dist/internal/useLatest.d.cts +7 -0
  387. package/dist/internal/useLatest.d.cts.map +1 -0
  388. package/dist/internal/useLatest.d.ts +7 -0
  389. package/dist/internal/useLatest.d.ts.map +1 -0
  390. package/dist/internal/useModalDialog.d.cts +5 -1
  391. package/dist/internal/useModalDialog.d.cts.map +1 -1
  392. package/dist/internal/useModalDialog.d.ts +5 -1
  393. package/dist/internal/useModalDialog.d.ts.map +1 -1
  394. package/dist/styles.css +1 -0
  395. package/dist/tokens.css +2 -2
  396. package/package.json +1 -1
  397. package/dist/chunks/CollectionView-BIuOL917.cjs +0 -2
  398. package/dist/chunks/CollectionView-BIuOL917.cjs.map +0 -1
  399. package/dist/chunks/CollectionView-Cr12UFWa.js.map +0 -1
  400. package/dist/chunks/ColourField-B-tjjBfA.js.map +0 -1
  401. package/dist/chunks/ColourField-ynUP1pfN.cjs +0 -2
  402. package/dist/chunks/ColourField-ynUP1pfN.cjs.map +0 -1
  403. package/dist/chunks/DatePicker-01sor8iD.cjs +0 -2
  404. package/dist/chunks/DatePicker-01sor8iD.cjs.map +0 -1
  405. package/dist/chunks/DatePicker-DJAqXUDJ.js +0 -297
  406. package/dist/chunks/DatePicker-DJAqXUDJ.js.map +0 -1
  407. package/dist/chunks/EntryPicker-B88N69zH.js +0 -180
  408. package/dist/chunks/EntryPicker-B88N69zH.js.map +0 -1
  409. package/dist/chunks/EntryPicker-daSkD4aR.cjs +0 -2
  410. package/dist/chunks/EntryPicker-daSkD4aR.cjs.map +0 -1
  411. package/dist/chunks/FormEditor-C_4JbAnS.cjs +0 -2
  412. package/dist/chunks/FormEditor-C_4JbAnS.cjs.map +0 -1
  413. package/dist/chunks/FormEditor-ucTbDyQt.js.map +0 -1
  414. package/dist/chunks/LoadState-B7GTDlWv.js.map +0 -1
  415. package/dist/chunks/LoadState-C7tQ6fIP.cjs +0 -2
  416. package/dist/chunks/LoadState-C7tQ6fIP.cjs.map +0 -1
  417. package/dist/chunks/NumberField-1EYJdwDY.cjs +0 -2
  418. package/dist/chunks/NumberField-1EYJdwDY.cjs.map +0 -1
  419. package/dist/chunks/NumberField-DizR4NJv.js +0 -178
  420. package/dist/chunks/NumberField-DizR4NJv.js.map +0 -1
  421. package/dist/chunks/RichTextEditor-CNkwWist.js.map +0 -1
  422. package/dist/chunks/RichTextEditor-DAnjElUO.cjs +0 -2
  423. package/dist/chunks/RichTextEditor-DAnjElUO.cjs.map +0 -1
  424. package/dist/chunks/frame-C8TwdWBC.cjs +0 -2
  425. package/dist/chunks/frame-C8TwdWBC.cjs.map +0 -1
  426. package/dist/chunks/frame-DaC03_n-.js +0 -203
  427. package/dist/chunks/frame-DaC03_n-.js.map +0 -1
  428. package/dist/chunks/group-C6EOgTgM.js +0 -34
  429. package/dist/chunks/group-C6EOgTgM.js.map +0 -1
  430. package/dist/chunks/group-QSnlx4jX.cjs +0 -2
  431. package/dist/chunks/group-QSnlx4jX.cjs.map +0 -1
  432. package/dist/chunks/limit-BX6-o1a2.cjs +0 -2
  433. package/dist/chunks/limit-BX6-o1a2.cjs.map +0 -1
  434. package/dist/chunks/limit-ChteDN4T.js +0 -18
  435. package/dist/chunks/limit-ChteDN4T.js.map +0 -1
  436. package/dist/chunks/movableHost-CajG9_5Z.cjs +0 -2
  437. package/dist/chunks/movableHost-CajG9_5Z.cjs.map +0 -1
  438. package/dist/chunks/movableHost-NJj_FsAu.js +0 -23
  439. package/dist/chunks/movableHost-NJj_FsAu.js.map +0 -1
  440. package/dist/chunks/portalScope-AzzPM54i.js +0 -105
  441. package/dist/chunks/portalScope-AzzPM54i.js.map +0 -1
  442. package/dist/chunks/portalScope-BVA1-Ypu.cjs +0 -2
  443. package/dist/chunks/portalScope-BVA1-Ypu.cjs.map +0 -1
  444. package/dist/chunks/useLimit-BOmHKdJE.js.map +0 -1
  445. package/dist/chunks/useLimit-DXe_VmYl.cjs.map +0 -1
  446. package/dist/chunks/useModalDialog-Cgus9408.cjs +0 -2
  447. package/dist/chunks/useModalDialog-Cgus9408.cjs.map +0 -1
  448. package/dist/chunks/useModalDialog-Dh-_6A0j.js +0 -85
  449. package/dist/chunks/useModalDialog-Dh-_6A0j.js.map +0 -1
  450. package/dist/chunks/useTooltip-C5gvEoYk.js +0 -74
  451. package/dist/chunks/useTooltip-C5gvEoYk.js.map +0 -1
  452. package/dist/chunks/useTooltip-bTE_a2Xn.cjs +0 -2
  453. package/dist/chunks/useTooltip-bTE_a2Xn.cjs.map +0 -1
  454. package/dist/components/Drawer/index.cjs.map +0 -1
  455. package/dist/components/Drawer/index.js.map +0 -1
  456. package/dist/components/Field/limit-reading.d.cts.map +0 -1
  457. package/dist/components/Field/limit-reading.d.ts.map +0 -1
@@ -1,28 +1,28 @@
1
1
  import { Button as e } from "../components/Button/index.js";
2
2
  import { Field as t } from "../components/Field/index.js";
3
3
  import { TextArea as n, TextField as r } from "../components/TextField/index.js";
4
- import { n as i, r as a, t as o } from "./RichTextEditor-CNkwWist.js";
4
+ import { n as i, r as a, t as o } from "./RichTextEditor-CuZnjiy2.js";
5
5
  import { Container as s } from "../components/Container/index.js";
6
- import { n as c, t as l } from "./EntryPicker-B88N69zH.js";
7
- import { n as u } from "./decimal-hq_W9D3s.js";
8
- import { t as d } from "./NumberField-DizR4NJv.js";
9
- import { Select as f } from "../components/Select/index.js";
10
- import { Switch as p } from "../components/Switch/index.js";
11
- import { i as m } from "./colour-CYEF4Q_n.js";
12
- import { t as h } from "./ColourField-B-tjjBfA.js";
13
- import { i as g, n as _, r as v, t as y } from "./Slider-Cab6NqhK.js";
14
- import { a as ee, n as b } from "./DatePicker-DJAqXUDJ.js";
15
- import { TagsInput as x } from "../components/TagsInput/index.js";
16
- import { Checkbox as S, ChoiceGroup as C, Radio as te } from "../components/Choice/index.js";
17
- import { CheckboxCard as ne, RadioCard as re, SelectionCardGroup as w } from "../components/SelectionCard/index.js";
18
- import { useMemo as T, useState as E } from "react";
19
- import { Fragment as ie, jsx as D, jsxs as O } from "react/jsx-runtime";
6
+ import { n as c, r as l, t as u } from "./EntryPicker-DIYjKmBf.js";
7
+ import { Checkbox as d, ChoiceGroup as f, Radio as p } from "../components/Choice/index.js";
8
+ import { n as m } from "./decimal-hq_W9D3s.js";
9
+ import { t as h } from "./NumberField-CVsK4l9P.js";
10
+ import { Select as g } from "../components/Select/index.js";
11
+ import { Switch as _ } from "../components/Switch/index.js";
12
+ import { i as v } from "./colour-CYEF4Q_n.js";
13
+ import { t as y } from "./ColourField-Ce2oaVcd.js";
14
+ import { i as b, n as x, r as S, t as ee } from "./Slider-Cab6NqhK.js";
15
+ import { a as te, n as ne } from "./DatePicker-CnVmsCwO.js";
16
+ import { TagsInput as re } from "../components/TagsInput/index.js";
17
+ import { CheckboxCard as C, RadioCard as w, SelectionCardGroup as T } from "../components/SelectionCard/index.js";
18
+ import { useMemo as E, useState as D } from "react";
19
+ import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
20
20
  //#region src/components/RichTextEditor/expanded-width.ts
21
21
  var ae = ["wide", "full"], oe = [
22
22
  "sm",
23
23
  "md",
24
24
  "lg"
25
- ], k = /* @__PURE__ */ new Set([
25
+ ], se = /* @__PURE__ */ new Set([
26
26
  "shortText",
27
27
  "longText",
28
28
  "richText",
@@ -45,11 +45,11 @@ function A(e) {
45
45
  let t = /* @__PURE__ */ new Set();
46
46
  for (let n of e.fields) {
47
47
  if (!n.id?.trim() || t.has(n.id)) throw Error("Form field IDs must be nonempty and unique.");
48
- if (!k.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
49
- n.type !== "divider" && (se(n), P(n), le(n)), t.add(n.id);
48
+ if (!se.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
49
+ n.type !== "divider" && (ce(n), P(n), ue(n)), t.add(n.id);
50
50
  }
51
51
  }
52
- function se(e) {
52
+ function ce(e) {
53
53
  switch (e.type) {
54
54
  case "select":
55
55
  case "radioGroup":
@@ -59,7 +59,7 @@ function se(e) {
59
59
  case "number": return I(e);
60
60
  }
61
61
  }
62
- var ce = /* @__PURE__ */ new Set([
62
+ var le = /* @__PURE__ */ new Set([
63
63
  "shortText",
64
64
  "longText",
65
65
  "tags",
@@ -67,24 +67,24 @@ var ce = /* @__PURE__ */ new Set([
67
67
  "reference"
68
68
  ]);
69
69
  function j(e) {
70
- return ce.has(e.type);
70
+ return le.has(e.type);
71
71
  }
72
- function le(e) {
72
+ function ue(e) {
73
73
  if (j(e)) {
74
74
  if (e.limitDisplay !== void 0 && !["used", "remaining"].includes(e.limitDisplay)) throw Error(`Field ${e.id} needs a limitDisplay of used or remaining.`);
75
75
  if (e.limitVisibility !== void 0 && !["always", "nearLimit"].includes(e.limitVisibility)) throw Error(`Field ${e.id} needs a limitVisibility of always or nearLimit.`);
76
76
  if (e.showLimitRing !== void 0 && typeof e.showLimitRing != "boolean") throw Error(`Field ${e.id} needs a boolean showLimitRing.`);
77
77
  }
78
78
  }
79
- function ue(e, t, n) {
79
+ function de(e, t, n, r) {
80
80
  return j(e) ? {
81
81
  limitDisplay: e.limitDisplay,
82
82
  limitVisibility: e.limitVisibility,
83
83
  showLimitRing: e.showLimitRing,
84
- limit: de(e, t, n ?? [])
84
+ limit: fe(e, t, n ?? [], r)
85
85
  } : {};
86
86
  }
87
- function de(e, t, n) {
87
+ function fe(e, t, n, r) {
88
88
  switch (e.type) {
89
89
  case "shortText":
90
90
  case "longText": return e.maxLength === void 0 ? void 0 : {
@@ -92,30 +92,49 @@ function de(e, t, n) {
92
92
  max: e.maxLength
93
93
  };
94
94
  case "tags": return e.max === void 0 ? void 0 : {
95
- count: J(t).length,
95
+ count: q(t).length,
96
96
  max: e.max
97
97
  };
98
- default: return c(N(e), n.length, B(e).max);
98
+ default: {
99
+ let { mode: t, max: i } = N(e, r);
100
+ return l(t, n.length, i);
101
+ }
102
+ }
103
+ }
104
+ function pe(e, t, n, r) {
105
+ if (n !== void 0 && (e.type === "asset" || e.type === "reference")) {
106
+ let { mode: t, max: i } = N(e, r);
107
+ return c(t, n.length, i);
99
108
  }
109
+ return e.type === "checkboxGroup" ? q(t).length : void 0;
100
110
  }
101
111
  function M(e) {
102
112
  return typeof e == "string" ? e : "";
103
113
  }
104
- function N(e) {
105
- return e.multiple ? "multiple" : "single";
114
+ function N(e, t) {
115
+ let n = t?.mode ?? (e.multiple ? "multiple" : "single");
116
+ if (!e.multiple) return {
117
+ mode: n,
118
+ max: n === "multiple" ? 1 : void 0
119
+ };
120
+ let r = [B(e).max, t?.max].filter((e) => e !== void 0 && Number.isFinite(e));
121
+ return {
122
+ mode: n,
123
+ max: r.length > 0 ? Math.min(...r) : void 0
124
+ };
106
125
  }
107
126
  function P(e) {
108
127
  if (e.width !== void 0 && !oe.includes(e.width)) throw Error(`Field ${e.id} needs a width of sm, md or lg.`);
109
128
  if (e.type === "richText" && e.expandedWidth !== void 0 && !ae.includes(e.expandedWidth)) throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`);
110
129
  }
111
130
  function F(e) {
112
- let { min: t, max: n, step: r } = g(e);
131
+ let { min: t, max: n, step: r } = b(e);
113
132
  if (![
114
133
  t,
115
134
  n,
116
135
  r
117
136
  ].every(Number.isFinite) || t >= n || r <= 0) throw Error(`Slider field ${e.id} needs finite min < max and a positive step.`);
118
- if (e.type === "rangeSlider" && r > u(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
137
+ if (e.type === "rangeSlider" && r > m(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
119
138
  }
120
139
  function I(e) {
121
140
  let { min: t, max: n, step: r = "any" } = e;
@@ -157,70 +176,70 @@ function B(e) {
157
176
  isReorderable: s
158
177
  };
159
178
  }
160
- function V(e, t) {
179
+ function me(e, t) {
161
180
  let { key: n } = R[e.type];
162
- return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => U(e, n) ? [e[n]] : []);
181
+ return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => H(e, n) ? [e[n]] : []);
163
182
  }
164
- function H(e) {
183
+ function V(e) {
165
184
  if (typeof e != "string") return;
166
185
  let t = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(?:Z|\+00:00)$/.exec(e);
167
186
  if (!t) return;
168
187
  let n = `${t[1]}:${t[2] ?? "00"}.${(t[3] ?? "").padEnd(3, "0")}Z`, r = new Date(n);
169
188
  if (Number.isFinite(r.getTime()) && r.toISOString() === n) return n;
170
189
  }
171
- function U(e, t) {
190
+ function H(e, t) {
172
191
  return !!e && typeof e == "object" && t in e && typeof e[t] == "string" && e[t].trim().length > 0;
173
192
  }
174
- function W(e) {
175
- return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(W);
193
+ function U(e) {
194
+ return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(U);
176
195
  }
177
- function G(e) {
196
+ function W(e) {
178
197
  return `${z(e)} is required.`;
179
198
  }
180
- function K(e, t) {
199
+ function G(e, t) {
181
200
  if (typeof t != "string") return "Enter text.";
182
- if (e.required && !t.trim()) return G(e);
201
+ if (e.required && !t.trim()) return W(e);
183
202
  if ((e.type === "shortText" || e.type === "longText") && e.maxLength !== void 0 && t.length > e.maxLength) return `Enter no more than ${e.maxLength} characters.`;
184
203
  }
185
- function fe(e, t) {
204
+ function he(e, t) {
186
205
  let n = i(t);
187
206
  if (n) return n;
188
- if (e.required && !W(t)) return G(e);
207
+ if (e.required && !U(t)) return W(e);
189
208
  }
190
- function q(e, t) {
209
+ function K(e, t) {
191
210
  if (typeof t != "string") return "Choose an available option.";
192
- if (t === "") return e.required ? G(e) : void 0;
211
+ if (t === "") return e.required ? W(e) : void 0;
193
212
  if ((e.type === "select" || e.type === "radioGroup") && e.options.length > 0 && !e.options.some((e) => e.value === t)) return "Choose an available option.";
194
213
  }
195
- function J(e) {
214
+ function q(e) {
196
215
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
197
216
  }
198
- function Y(e, t) {
217
+ function J(e, t) {
199
218
  if (!Array.isArray(t) || !t.every((e) => typeof e == "string" && e.trim()) || new Set(t).size !== t.length) return "Enter a list of unique, nonempty text values.";
200
- if (e.required && !t.length) return G(e);
219
+ if (e.required && !t.length) return W(e);
201
220
  if (e.type === "tags" && e.max !== void 0 && t.length > e.max) return `Enter no more than ${e.max} tags.`;
202
221
  if (e.type === "checkboxGroup" && e.options.length && t.some((t) => !e.options.some((e) => e.value === t))) return "Choose available options.";
203
222
  }
204
- function X(e, t) {
223
+ function Y(e, t) {
205
224
  if (typeof t != "number" || !Number.isFinite(t)) return "Enter a finite number.";
206
- let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? g(e) : e.type === "number" ? e : {};
225
+ let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? b(e) : e.type === "number" ? e : {};
207
226
  if (n !== void 0 && t < n) return `Enter a number of at least ${n}.`;
208
227
  if (r !== void 0 && t > r) return `Enter a number no greater than ${r}.`;
209
228
  }
210
- function pe(e, t) {
229
+ function ge(e, t) {
211
230
  if (typeof t != "string") return "Enter a valid calendar date (YYYY-MM-DD).";
212
- if (!t) return e.required ? G(e) : void 0;
213
- if (!ee(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
231
+ if (!t) return e.required ? W(e) : void 0;
232
+ if (!te(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
214
233
  if (e.type === "date") {
215
234
  if (e.min && t < e.min) return `Choose a date on or after ${e.min}.`;
216
235
  if (e.max && t > e.max) return `Choose a date on or before ${e.max}.`;
217
236
  }
218
237
  }
219
- function Z(e, t) {
220
- return typeof e == "number" && Number.isFinite(e) ? v(e, t) : void 0;
238
+ function X(e, t) {
239
+ return typeof e == "number" && Number.isFinite(e) ? S(e, t) : void 0;
221
240
  }
222
- function me(e, t) {
223
- let n = e, r = Z(n?.min, t), i = Z(n?.max, t);
241
+ function _e(e, t) {
242
+ let n = e, r = X(n?.min, t), i = X(n?.max, t);
224
243
  if (r === void 0 && i === void 0) return;
225
244
  let [a, o] = [r ?? t.min, i ?? t.max].sort((e, t) => e - t);
226
245
  return {
@@ -228,56 +247,56 @@ function me(e, t) {
228
247
  max: o
229
248
  };
230
249
  }
231
- function he(e, t) {
250
+ function ve(e, t) {
232
251
  if (!t || typeof t != "object" || Array.isArray(t)) return "Enter a range.";
233
- let n = t, r = n.min, i = n.max, a = X(e, r) ?? X(e, i);
252
+ let n = t, r = n.min, i = n.max, a = Y(e, r) ?? Y(e, i);
234
253
  if (a) return a;
235
254
  if (r > i) return "The start must not be greater than the end.";
236
- if (e.type === "rangeSlider" && u(i, -r) < g(e).step) return "Keep the range endpoints at least one step apart.";
255
+ if (e.type === "rangeSlider" && m(i, -r) < b(e).step) return "Keep the range endpoints at least one step apart.";
237
256
  }
238
- function ge(e, t) {
239
- return typeof t == "string" ? t.trim() ? m(t) ? void 0 : "Enter a valid colour." : e.required ? G(e) : void 0 : "Enter a valid colour.";
257
+ function ye(e, t) {
258
+ return typeof t == "string" ? t.trim() ? v(t) ? void 0 : "Enter a valid colour." : e.required ? W(e) : void 0 : "Enter a valid colour.";
240
259
  }
241
- function Q(e, t) {
260
+ function Z(e, t) {
242
261
  if (e.type !== "asset" && e.type !== "reference") return;
243
262
  let { key: n, itemLabel: r, itemsLabel: i } = R[e.type];
244
- if (!e.multiple) return U(t, n) ? void 0 : `Choose an ${r}.`;
245
- if (!Array.isArray(t) || !t.every((e) => U(e, n))) return `Choose a list of ${i}.`;
246
- if (e.required && t.length === 0) return G(e);
263
+ if (!e.multiple) return H(t, n) ? void 0 : `Choose an ${r}.`;
264
+ if (!Array.isArray(t) || !t.every((e) => H(e, n))) return `Choose a list of ${i}.`;
265
+ if (e.required && t.length === 0) return W(e);
247
266
  let a = e.picker?.max;
248
267
  if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${B(e).itemsLabel}.`;
249
268
  }
250
- var _e = {
251
- shortText: K,
252
- longText: K,
253
- richText: fe,
254
- number: X,
255
- slider: X,
256
- rangeSlider: he,
257
- date: pe,
258
- colour: ge,
259
- radioGroup: q,
260
- checkboxGroup: Y,
261
- tags: Y,
269
+ var be = {
270
+ shortText: G,
271
+ longText: G,
272
+ richText: he,
273
+ number: Y,
274
+ slider: Y,
275
+ rangeSlider: ve,
276
+ date: ge,
277
+ colour: ye,
278
+ radioGroup: K,
279
+ checkboxGroup: J,
280
+ tags: J,
262
281
  boolean: (e, t) => typeof t == "boolean" ? void 0 : "Choose a boolean value.",
263
- dateTime: (e, t) => H(t) ? void 0 : "Enter a valid UTC date and time.",
264
- select: q,
265
- asset: Q,
266
- reference: Q
282
+ dateTime: (e, t) => V(t) ? void 0 : "Enter a valid UTC date and time.",
283
+ select: K,
284
+ asset: Z,
285
+ reference: Z
267
286
  };
268
- function $(e, t) {
269
- return t === void 0 ? e.required ? G(e) : void 0 : _e[e.type](e, t);
287
+ function Q(e, t) {
288
+ return t === void 0 ? e.required ? W(e) : void 0 : be[e.type](e, t);
270
289
  }
271
- function ve(e, t) {
290
+ function xe(e, t) {
272
291
  return A(e), Object.fromEntries(e.fields.flatMap((e) => {
273
292
  if (e.type === "divider") return [];
274
- let n = $(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
293
+ let n = Q(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
275
294
  return n ? [[e.id, n]] : [];
276
295
  }));
277
296
  }
278
297
  //#endregion
279
298
  //#region src/components/FormEditor/choice-control.tsx
280
- function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
299
+ function Se({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
281
300
  let s = {
282
301
  name: n,
283
302
  value: t.value,
@@ -289,29 +308,29 @@ function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
289
308
  }
290
309
  };
291
310
  if (e.appearance === "card") {
292
- let n = e.type === "radioGroup" ? re : ne;
293
- return /* @__PURE__ */ D(n, {
311
+ let n = e.type === "radioGroup" ? w : C;
312
+ return /* @__PURE__ */ O(n, {
294
313
  ...s,
295
314
  title: t.label,
296
315
  description: t.description
297
316
  });
298
317
  }
299
- let c = e.type === "radioGroup" ? te : S;
300
- return /* @__PURE__ */ D(c, {
318
+ let c = e.type === "radioGroup" ? p : d;
319
+ return /* @__PURE__ */ O(c, {
301
320
  ...s,
302
- children: /* @__PURE__ */ O("span", { children: [t.label, t.description && /* @__PURE__ */ D("span", {
321
+ children: /* @__PURE__ */ k("span", { children: [t.label, t.description && /* @__PURE__ */ O("span", {
303
322
  className: "ds-form-editor__option-description",
304
323
  children: t.description
305
324
  })] })
306
325
  });
307
326
  }
308
- function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
309
- let s = t.type === "checkboxGroup", c = s ? J(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? w : C;
310
- return /* @__PURE__ */ O(ie, { children: [/* @__PURE__ */ D(l, {
327
+ function Ce({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
328
+ let s = t.type === "checkboxGroup", c = s ? q(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? T : f;
329
+ return /* @__PURE__ */ k(ie, { children: [/* @__PURE__ */ O(l, {
311
330
  ...a,
312
331
  label: t.label,
313
332
  columns: t.columns ?? (t.appearance === "card" ? 2 : 1),
314
- children: t.options.map((e) => /* @__PURE__ */ D(ye, {
333
+ children: t.options.map((e) => /* @__PURE__ */ O(Se, {
315
334
  field: t,
316
335
  option: e,
317
336
  name: a.id,
@@ -322,7 +341,7 @@ function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
322
341
  o(s ? c.includes(e.value) ? c.filter((t) => t !== e.value) : [...c, e.value] : e.value);
323
342
  }
324
343
  }, e.value))
325
- }), !s && !i && c.length > 0 && /* @__PURE__ */ O(e, {
344
+ }), !s && !i && c.length > 0 && /* @__PURE__ */ k(e, {
326
345
  variant: "simple",
327
346
  size: "sm",
328
347
  isDisabled: r,
@@ -332,9 +351,9 @@ function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
332
351
  }
333
352
  //#endregion
334
353
  //#region src/components/FormEditor/additional-control.tsx
335
- function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
336
- let a = g(e), o = Z(t, a);
337
- return /* @__PURE__ */ D(_, {
354
+ function we({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
355
+ let a = b(e), o = X(t, a);
356
+ return /* @__PURE__ */ O(x, {
338
357
  ...r,
339
358
  ...a,
340
359
  prefix: e.prefix,
@@ -350,9 +369,9 @@ function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
350
369
  }
351
370
  });
352
371
  }
353
- function Se({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
354
- let a = g(e), o = me(t, a);
355
- return /* @__PURE__ */ D(y, {
372
+ function Te({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
373
+ let a = b(e), o = _e(t, a);
374
+ return /* @__PURE__ */ O(ee, {
356
375
  ...r,
357
376
  ...a,
358
377
  prefix: e.prefix,
@@ -373,7 +392,7 @@ function Se({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
373
392
  }
374
393
  });
375
394
  }
376
- function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
395
+ function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
377
396
  let o = {
378
397
  stored: t,
379
398
  isDisabled: n,
@@ -383,19 +402,19 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
383
402
  };
384
403
  switch (e.type) {
385
404
  case "radioGroup":
386
- case "checkboxGroup": return /* @__PURE__ */ D(be, {
405
+ case "checkboxGroup": return /* @__PURE__ */ O(Ce, {
387
406
  field: e,
388
407
  ...o
389
408
  });
390
- case "rangeSlider": return /* @__PURE__ */ D(Se, {
409
+ case "rangeSlider": return /* @__PURE__ */ O(Te, {
391
410
  field: e,
392
411
  ...o
393
412
  });
394
- case "slider": return /* @__PURE__ */ D(xe, {
413
+ case "slider": return /* @__PURE__ */ O(we, {
395
414
  field: e,
396
415
  ...o
397
416
  });
398
- case "colour": return /* @__PURE__ */ D(h, {
417
+ case "colour": return /* @__PURE__ */ O(y, {
399
418
  ...i,
400
419
  required: r,
401
420
  placeholder: e.placeholder,
@@ -409,20 +428,20 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
409
428
  value: typeof t == "string" ? t : "",
410
429
  onInput: (e) => {
411
430
  let t = e.currentTarget.value;
412
- t.trim() && !m(t) && a(t);
431
+ t.trim() && !v(t) && a(t);
413
432
  },
414
433
  onValueChange: (e) => a(e === "" ? void 0 : e)
415
434
  });
416
- case "tags": return /* @__PURE__ */ D(x, {
435
+ case "tags": return /* @__PURE__ */ O(re, {
417
436
  ...i,
418
437
  required: r,
419
438
  placeholder: e.placeholder,
420
439
  max: e.max,
421
440
  isDisabled: n,
422
- value: J(t),
441
+ value: q(t),
423
442
  onValueChange: a
424
443
  });
425
- case "date": return /* @__PURE__ */ D(b, {
444
+ case "date": return /* @__PURE__ */ O(ne, {
426
445
  ...i,
427
446
  placeholder: e.placeholder,
428
447
  min: e.min,
@@ -438,7 +457,7 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
438
457
  }
439
458
  //#endregion
440
459
  //#region src/components/FormEditor/control.tsx
441
- function we(e, t) {
460
+ function De(e, t) {
442
461
  if (e.type === "asset") {
443
462
  let n = t.map((e) => ({ assetId: e }));
444
463
  return e.multiple ? n : n[0];
@@ -446,8 +465,8 @@ function we(e, t) {
446
465
  let n = t.map((e) => ({ entryId: e }));
447
466
  return e.multiple ? n : n[0];
448
467
  }
449
- function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
450
- return /* @__PURE__ */ D(d, {
468
+ function $({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
469
+ return /* @__PURE__ */ O(h, {
451
470
  ...i,
452
471
  required: r,
453
472
  isDisabled: n,
@@ -467,9 +486,9 @@ function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
467
486
  }
468
487
  });
469
488
  }
470
- function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
489
+ function Oe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
471
490
  let o = !r && !e.options.some((e) => e.value === "");
472
- return /* @__PURE__ */ D(f, {
491
+ return /* @__PURE__ */ O(g, {
473
492
  ...i,
474
493
  "aria-required": r || void 0,
475
494
  isDisabled: n,
@@ -484,183 +503,187 @@ function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
484
503
  onValueChange: (e) => a(e === "" ? void 0 : e)
485
504
  });
486
505
  }
487
- function De({ field: e, selected: t, items: n, isDisabled: r, accessibility: i, onChange: a }) {
488
- return /* @__PURE__ */ D(l, {
489
- ...i,
506
+ function ke({ field: e, selected: t, items: n, source: r, isDisabled: i, accessibility: a, onChange: o }) {
507
+ return /* @__PURE__ */ O(u, {
508
+ ...a,
509
+ ...r,
490
510
  items: n,
491
511
  value: t,
492
512
  ...B(e),
493
- mode: N(e),
494
- isDisabled: r,
495
- onValueChange: (t) => a(we(e, t))
513
+ ...N(e, r),
514
+ isDisabled: i,
515
+ onValueChange: (t) => o(De(e, t))
496
516
  });
497
517
  }
498
- function Oe({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessibility: { required: l, ...u }, onChange: d }) {
499
- let f = {
518
+ function Ae({ field: e, stored: t, selected: i, items: s, source: c, isDisabled: l, accessibility: { required: u, ...d }, onChange: f }) {
519
+ let p = {
500
520
  stored: t,
501
- isDisabled: c,
502
- required: l,
503
- accessibility: u,
504
- onChange: d
521
+ isDisabled: l,
522
+ required: u,
523
+ accessibility: d,
524
+ onChange: f
505
525
  };
506
526
  switch (e.type) {
507
- case "shortText": return /* @__PURE__ */ D(r, {
508
- ...u,
509
- required: l,
510
- disabled: c,
527
+ case "shortText": return /* @__PURE__ */ O(r, {
528
+ ...d,
529
+ required: u,
530
+ disabled: l,
511
531
  placeholder: e.placeholder,
512
532
  type: e.inputType,
513
533
  maxLength: e.maxLength,
514
534
  readOnly: e.readOnly,
515
535
  autoFocus: e.autoFocus,
516
536
  value: M(t),
517
- onChange: (e) => d(e.target.value)
537
+ onChange: (e) => f(e.target.value)
518
538
  });
519
- case "longText": return /* @__PURE__ */ D(n, {
520
- ...u,
521
- required: l,
522
- disabled: c,
539
+ case "longText": return /* @__PURE__ */ O(n, {
540
+ ...d,
541
+ required: u,
542
+ disabled: l,
523
543
  placeholder: e.placeholder,
524
544
  rows: e.rows,
525
545
  maxLength: e.maxLength,
526
546
  readOnly: e.readOnly,
527
547
  autoFocus: e.autoFocus,
528
548
  value: M(t),
529
- onChange: (e) => d(e.target.value)
549
+ onChange: (e) => f(e.target.value)
530
550
  });
531
- case "number": return /* @__PURE__ */ D(Te, {
551
+ case "number": return /* @__PURE__ */ O($, {
532
552
  field: e,
533
- ...f
553
+ ...p
534
554
  });
535
- case "boolean": return /* @__PURE__ */ D(p, {
536
- ...u,
537
- isDisabled: c,
555
+ case "boolean": return /* @__PURE__ */ O(_, {
556
+ ...d,
557
+ isDisabled: l,
538
558
  autoFocus: e.autoFocus,
539
559
  isSelected: t === !0,
540
- onSelectedChange: d
560
+ onSelectedChange: f
541
561
  });
542
- case "dateTime": return /* @__PURE__ */ D(r, {
543
- ...u,
544
- required: l,
545
- disabled: c,
562
+ case "dateTime": return /* @__PURE__ */ O(r, {
563
+ ...d,
564
+ required: u,
565
+ disabled: l,
546
566
  type: "datetime-local",
547
567
  step: "0.001",
548
568
  autoFocus: e.autoFocus,
549
- value: H(t)?.slice(0, -1) ?? "",
550
- onChange: (e) => d(H(`${e.target.value}Z`))
569
+ value: V(t)?.slice(0, -1) ?? "",
570
+ onChange: (e) => f(V(`${e.target.value}Z`))
551
571
  });
552
- case "richText": return /* @__PURE__ */ D(o, {
553
- ...u,
572
+ case "richText": return /* @__PURE__ */ O(o, {
573
+ ...d,
554
574
  expandedWidth: e.expandedWidth,
555
575
  label: e.label,
556
- isRequired: l,
557
- isDisabled: c,
576
+ isRequired: u,
577
+ isDisabled: l,
558
578
  placeholder: e.placeholder,
559
579
  format: "json",
560
580
  value: t === void 0 ? a : t,
561
- onChange: d
581
+ onChange: f
562
582
  });
563
- case "select": return /* @__PURE__ */ D(Ee, {
583
+ case "select": return /* @__PURE__ */ O(Oe, {
564
584
  field: e,
565
- ...f
585
+ ...p
566
586
  });
567
587
  case "asset":
568
- case "reference": return /* @__PURE__ */ D(De, {
588
+ case "reference": return /* @__PURE__ */ O(ke, {
569
589
  field: e,
570
590
  items: s,
591
+ source: c,
571
592
  selected: i ?? [],
572
- ...f
593
+ ...p
573
594
  });
574
- default: return /* @__PURE__ */ D(Ce, {
595
+ default: return /* @__PURE__ */ O(Ee, {
575
596
  field: e,
576
- ...f
597
+ ...p
577
598
  });
578
599
  }
579
600
  }
580
601
  //#endregion
581
602
  //#region src/components/FormEditor/index.tsx
582
- function ke({ field: e, stored: n, items: r, isDisabled: i, error: a, isErrorVisible: o, onChange: c }) {
583
- let l = T(() => a === void 0 && o ? $(e, n) : void 0, [
584
- a,
603
+ function je({ field: e, stored: n, items: r, source: i, isDisabled: a, error: o, isErrorVisible: c, onChange: l }) {
604
+ let u = E(() => o === void 0 && c ? Q(e, n) : void 0, [
585
605
  o,
606
+ c,
586
607
  e,
587
608
  n
588
- ]), u = T(() => e.type === "asset" || e.type === "reference" ? V(e, n) : void 0, [e, n]);
589
- return /* @__PURE__ */ D(s, {
609
+ ]), d = E(() => e.type === "asset" || e.type === "reference" ? me(e, n) : void 0, [e, n]);
610
+ return /* @__PURE__ */ O(s, {
590
611
  width: e.width,
591
612
  padded: !1,
592
613
  center: !1,
593
614
  className: "ds-form-editor__field",
594
- children: /* @__PURE__ */ D(t, {
595
- ...ue(e, n, u),
615
+ children: /* @__PURE__ */ O(t, {
616
+ ...de(e, n, d, i),
596
617
  label: e.type === "dateTime" ? `${e.label} (UTC)` : z(e),
597
618
  hint: e.hint,
598
619
  labelHint: e.labelHint,
599
- error: a ?? l,
620
+ error: o ?? u,
600
621
  isRequired: e.required,
601
- count: u?.length ?? (e.type === "checkboxGroup" ? J(n).length : void 0),
602
- isGroup: u !== void 0 || Ae.has(e.type),
603
- children: (t) => /* @__PURE__ */ D(Oe, {
622
+ count: pe(e, n, d, i),
623
+ isGroup: d !== void 0 || Me.has(e.type),
624
+ children: (t) => /* @__PURE__ */ O(Ae, {
604
625
  field: e,
605
626
  stored: n,
606
- selected: u,
627
+ selected: d,
607
628
  items: r,
608
- isDisabled: i,
629
+ source: i,
630
+ isDisabled: a,
609
631
  accessibility: t,
610
- onChange: c
632
+ onChange: l
611
633
  })
612
634
  })
613
635
  });
614
636
  }
615
- var Ae = /* @__PURE__ */ new Set([
637
+ var Me = /* @__PURE__ */ new Set([
616
638
  "radioGroup",
617
639
  "checkboxGroup",
618
640
  "rangeSlider"
619
- ]), je = /* @__PURE__ */ new Set([
641
+ ]), Ne = /* @__PURE__ */ new Set([
620
642
  "slider",
621
643
  "rangeSlider",
622
644
  "date",
623
645
  "colour"
624
646
  ]);
625
- function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, errors: a = {}, isDisabled: o = !1, showAllErrors: s = !1, columns: c = 1, minColumnWidth: l = "16rem", className: u, style: d, ...f }) {
626
- let [p, m] = E(n), [h, g] = E(() => /* @__PURE__ */ new Set()), _ = t ?? p;
627
- T(() => A(e), [e]);
628
- let v = (e, n) => {
629
- let i = { ..._ };
630
- n === void 0 ? delete i[e] : i[e] = n, t === void 0 && m(i), g((t) => new Set(t).add(e)), r?.(i, { fieldId: e });
631
- }, y = c === "auto" ? { "--form-editor-min-column": l } : {
632
- "--form-editor-columns": c,
633
- "--form-editor-min-column": l
647
+ function Pe({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, pickerSources: a = {}, errors: o = {}, isDisabled: s = !1, showAllErrors: c = !1, columns: l = 1, minColumnWidth: u = "16rem", className: d, style: f, ...p }) {
648
+ let [m, h] = D(n), [g, _] = D(() => /* @__PURE__ */ new Set()), v = t ?? m;
649
+ E(() => A(e), [e]);
650
+ let y = (e, n) => {
651
+ let i = { ...v };
652
+ n === void 0 ? delete i[e] : i[e] = n, t === void 0 && h(i), _((t) => new Set(t).add(e)), r?.(i, { fieldId: e });
653
+ }, b = l === "auto" ? { "--form-editor-min-column": u } : {
654
+ "--form-editor-columns": l,
655
+ "--form-editor-min-column": u
634
656
  };
635
- return /* @__PURE__ */ D("div", {
657
+ return /* @__PURE__ */ O("div", {
636
658
  className: [
637
659
  "ds-form-editor",
638
- c === "auto" && "ds-form-editor--auto",
639
- u
660
+ l === "auto" && "ds-form-editor--auto",
661
+ d
640
662
  ].filter(Boolean).join(" "),
641
663
  style: {
642
- ...y,
643
- ...d
664
+ ...b,
665
+ ...f
644
666
  },
645
- ...f,
667
+ ...p,
646
668
  children: e.fields.map((e) => {
647
- if (e.type === "divider") return /* @__PURE__ */ D("hr", { className: "ds-form-editor__divider" }, e.id);
648
- let t = Object.hasOwn(_, e.id) ? _[e.id] : void 0, n = o || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, c = typeof t == "string" ? t.trim() !== "" : t !== void 0, l = s || h.has(e.id) || c && je.has(e.type) || e.type === "number" && typeof t == "number";
649
- return /* @__PURE__ */ D(ke, {
669
+ if (e.type === "divider") return /* @__PURE__ */ O("hr", { className: "ds-form-editor__divider" }, e.id);
670
+ let t = Object.hasOwn(v, e.id) ? v[e.id] : void 0, n = s || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, l = typeof t == "string" ? t.trim() !== "" : t !== void 0, u = c || g.has(e.id) || l && Ne.has(e.type) || e.type === "number" && typeof t == "number";
671
+ return /* @__PURE__ */ O(je, {
650
672
  field: e,
651
673
  stored: t,
652
674
  items: i[e.id] ?? [],
675
+ source: a[e.id],
653
676
  isDisabled: n,
654
- error: a[e.id],
655
- isErrorVisible: l,
677
+ error: o[e.id],
678
+ isErrorVisible: u,
656
679
  onChange: (t) => {
657
- r || v(e.id, t);
680
+ r || y(e.id, t);
658
681
  }
659
682
  }, e.id);
660
683
  })
661
684
  });
662
685
  }
663
686
  //#endregion
664
- export { ve as n, Me as t };
687
+ export { xe as n, Pe as t };
665
688
 
666
- //# sourceMappingURL=FormEditor-ucTbDyQt.js.map
689
+ //# sourceMappingURL=FormEditor-HqqFmu7s.js.map