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