@entifix/react-controls 0.1.0-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 (471) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/i18n/catalog/en.d.ts +10 -0
  4. package/dist/i18n/catalog/en.d.ts.map +1 -0
  5. package/dist/i18n/catalog/en.js +211 -0
  6. package/dist/i18n/catalog/en.js.map +1 -0
  7. package/dist/i18n/catalog/es.d.ts +275 -0
  8. package/dist/i18n/catalog/es.d.ts.map +1 -0
  9. package/dist/i18n/catalog/es.js +261 -0
  10. package/dist/i18n/catalog/es.js.map +1 -0
  11. package/dist/i18n/catalog/index.d.ts +403 -0
  12. package/dist/i18n/catalog/index.d.ts.map +1 -0
  13. package/dist/i18n/catalog/index.js +23 -0
  14. package/dist/i18n/catalog/index.js.map +1 -0
  15. package/dist/i18n/entity-labels.d.ts +29 -0
  16. package/dist/i18n/entity-labels.d.ts.map +1 -0
  17. package/dist/i18n/entity-labels.js +49 -0
  18. package/dist/i18n/entity-labels.js.map +1 -0
  19. package/dist/i18n/fallback-catalogs.d.ts +5 -0
  20. package/dist/i18n/fallback-catalogs.d.ts.map +1 -0
  21. package/dist/i18n/fallback-catalogs.js +34 -0
  22. package/dist/i18n/fallback-catalogs.js.map +1 -0
  23. package/dist/i18n/i18n-context.d.ts +62 -0
  24. package/dist/i18n/i18n-context.d.ts.map +1 -0
  25. package/dist/i18n/i18n-context.js +128 -0
  26. package/dist/i18n/i18n-context.js.map +1 -0
  27. package/dist/i18n/index.d.ts +5 -0
  28. package/dist/i18n/index.d.ts.map +1 -0
  29. package/dist/i18n/index.js +6 -0
  30. package/dist/i18n/index.js.map +1 -0
  31. package/dist/i18n/spec-support/catalogs.d.ts +2 -0
  32. package/dist/i18n/spec-support/catalogs.d.ts.map +1 -0
  33. package/dist/i18n/spec-support/catalogs.js +142 -0
  34. package/dist/i18n/spec-support/catalogs.js.map +1 -0
  35. package/dist/i18next/index.d.ts +20 -0
  36. package/dist/i18next/index.d.ts.map +1 -0
  37. package/dist/i18next/index.js +60 -0
  38. package/dist/i18next/index.js.map +1 -0
  39. package/dist/index.d.ts +46 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +47 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/preferences/index.d.ts +7 -0
  44. package/dist/preferences/index.d.ts.map +1 -0
  45. package/dist/preferences/index.js +8 -0
  46. package/dist/preferences/index.js.map +1 -0
  47. package/dist/preferences/indexeddb-ui-preferences-state.d.ts +16 -0
  48. package/dist/preferences/indexeddb-ui-preferences-state.d.ts.map +1 -0
  49. package/dist/preferences/indexeddb-ui-preferences-state.js +50 -0
  50. package/dist/preferences/indexeddb-ui-preferences-state.js.map +1 -0
  51. package/dist/preferences/local-storage-ui-preferences-state.d.ts +16 -0
  52. package/dist/preferences/local-storage-ui-preferences-state.d.ts.map +1 -0
  53. package/dist/preferences/local-storage-ui-preferences-state.js +51 -0
  54. package/dist/preferences/local-storage-ui-preferences-state.js.map +1 -0
  55. package/dist/preferences/ui-preferences-context.d.ts +16 -0
  56. package/dist/preferences/ui-preferences-context.d.ts.map +1 -0
  57. package/dist/preferences/ui-preferences-context.js +31 -0
  58. package/dist/preferences/ui-preferences-context.js.map +1 -0
  59. package/dist/preferences/ui-preferences-state.d.ts +23 -0
  60. package/dist/preferences/ui-preferences-state.d.ts.map +1 -0
  61. package/dist/preferences/ui-preferences-state.js +5 -0
  62. package/dist/preferences/ui-preferences-state.js.map +1 -0
  63. package/dist/preferences/use-ui-preference.d.ts +20 -0
  64. package/dist/preferences/use-ui-preference.d.ts.map +1 -0
  65. package/dist/preferences/use-ui-preference.js +72 -0
  66. package/dist/preferences/use-ui-preference.js.map +1 -0
  67. package/dist/preferences/use-viewport-mode.d.ts +33 -0
  68. package/dist/preferences/use-viewport-mode.d.ts.map +1 -0
  69. package/dist/preferences/use-viewport-mode.js +53 -0
  70. package/dist/preferences/use-viewport-mode.js.map +1 -0
  71. package/dist/primitives.d.ts +25 -0
  72. package/dist/primitives.d.ts.map +1 -0
  73. package/dist/primitives.js +54 -0
  74. package/dist/primitives.js.map +1 -0
  75. package/dist/theme/index.d.ts +3 -0
  76. package/dist/theme/index.d.ts.map +1 -0
  77. package/dist/theme/index.js +4 -0
  78. package/dist/theme/index.js.map +1 -0
  79. package/dist/theme/theme-context.d.ts +26 -0
  80. package/dist/theme/theme-context.d.ts.map +1 -0
  81. package/dist/theme/theme-context.js +79 -0
  82. package/dist/theme/theme-context.js.map +1 -0
  83. package/dist/theme/types.d.ts +22 -0
  84. package/dist/theme/types.d.ts.map +1 -0
  85. package/dist/theme/types.js +6 -0
  86. package/dist/theme/types.js.map +1 -0
  87. package/dist/ui/actions/action-surfaces.d.ts +59 -0
  88. package/dist/ui/actions/action-surfaces.d.ts.map +1 -0
  89. package/dist/ui/actions/action-surfaces.js +109 -0
  90. package/dist/ui/actions/action-surfaces.js.map +1 -0
  91. package/dist/ui/actions/index.d.ts +2 -0
  92. package/dist/ui/actions/index.d.ts.map +1 -0
  93. package/dist/ui/actions/index.js +3 -0
  94. package/dist/ui/actions/index.js.map +1 -0
  95. package/dist/ui/atoms/button/button-link.d.ts +27 -0
  96. package/dist/ui/atoms/button/button-link.d.ts.map +1 -0
  97. package/dist/ui/atoms/button/button-link.js +23 -0
  98. package/dist/ui/atoms/button/button-link.js.map +1 -0
  99. package/dist/ui/atoms/button/button-recipe.d.ts +19 -0
  100. package/dist/ui/atoms/button/button-recipe.d.ts.map +1 -0
  101. package/dist/ui/atoms/button/button-recipe.js +42 -0
  102. package/dist/ui/atoms/button/button-recipe.js.map +1 -0
  103. package/dist/ui/atoms/button/button.d.ts +7 -0
  104. package/dist/ui/atoms/button/button.d.ts.map +1 -0
  105. package/dist/ui/atoms/button/button.js +22 -0
  106. package/dist/ui/atoms/button/button.js.map +1 -0
  107. package/dist/ui/atoms/button/index.d.ts +4 -0
  108. package/dist/ui/atoms/button/index.d.ts.map +1 -0
  109. package/dist/ui/atoms/button/index.js +5 -0
  110. package/dist/ui/atoms/button/index.js.map +1 -0
  111. package/dist/ui/atoms/cell-value/cell-value.d.ts +12 -0
  112. package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -0
  113. package/dist/ui/atoms/cell-value/cell-value.js +101 -0
  114. package/dist/ui/atoms/cell-value/cell-value.js.map +1 -0
  115. package/dist/ui/atoms/cell-value/index.d.ts +2 -0
  116. package/dist/ui/atoms/cell-value/index.d.ts.map +1 -0
  117. package/dist/ui/atoms/cell-value/index.js +3 -0
  118. package/dist/ui/atoms/cell-value/index.js.map +1 -0
  119. package/dist/ui/atoms/field/checkbox.d.ts +35 -0
  120. package/dist/ui/atoms/field/checkbox.d.ts.map +1 -0
  121. package/dist/ui/atoms/field/checkbox.js +46 -0
  122. package/dist/ui/atoms/field/checkbox.js.map +1 -0
  123. package/dist/ui/atoms/field/field.d.ts +4 -0
  124. package/dist/ui/atoms/field/field.d.ts.map +1 -0
  125. package/dist/ui/atoms/field/field.js +29 -0
  126. package/dist/ui/atoms/field/field.js.map +1 -0
  127. package/dist/ui/atoms/field/index.d.ts +3 -0
  128. package/dist/ui/atoms/field/index.d.ts.map +1 -0
  129. package/dist/ui/atoms/field/index.js +4 -0
  130. package/dist/ui/atoms/field/index.js.map +1 -0
  131. package/dist/ui/atoms/field-control/field-control.d.ts +50 -0
  132. package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -0
  133. package/dist/ui/atoms/field-control/field-control.js +82 -0
  134. package/dist/ui/atoms/field-control/field-control.js.map +1 -0
  135. package/dist/ui/atoms/field-control/index.d.ts +2 -0
  136. package/dist/ui/atoms/field-control/index.d.ts.map +1 -0
  137. package/dist/ui/atoms/field-control/index.js +3 -0
  138. package/dist/ui/atoms/field-control/index.js.map +1 -0
  139. package/dist/ui/atoms/skeleton/index.d.ts +2 -0
  140. package/dist/ui/atoms/skeleton/index.d.ts.map +1 -0
  141. package/dist/ui/atoms/skeleton/index.js +3 -0
  142. package/dist/ui/atoms/skeleton/index.js.map +1 -0
  143. package/dist/ui/atoms/skeleton/skeleton.d.ts +21 -0
  144. package/dist/ui/atoms/skeleton/skeleton.d.ts.map +1 -0
  145. package/dist/ui/atoms/skeleton/skeleton.js +33 -0
  146. package/dist/ui/atoms/skeleton/skeleton.js.map +1 -0
  147. package/dist/ui/atoms/table/index.d.ts +2 -0
  148. package/dist/ui/atoms/table/index.d.ts.map +1 -0
  149. package/dist/ui/atoms/table/index.js +3 -0
  150. package/dist/ui/atoms/table/index.js.map +1 -0
  151. package/dist/ui/atoms/table/table.d.ts +30 -0
  152. package/dist/ui/atoms/table/table.d.ts.map +1 -0
  153. package/dist/ui/atoms/table/table.js +84 -0
  154. package/dist/ui/atoms/table/table.js.map +1 -0
  155. package/dist/ui/atoms/text/index.d.ts +2 -0
  156. package/dist/ui/atoms/text/index.d.ts.map +1 -0
  157. package/dist/ui/atoms/text/index.js +3 -0
  158. package/dist/ui/atoms/text/index.js.map +1 -0
  159. package/dist/ui/atoms/text/text.d.ts +86 -0
  160. package/dist/ui/atoms/text/text.d.ts.map +1 -0
  161. package/dist/ui/atoms/text/text.js +221 -0
  162. package/dist/ui/atoms/text/text.js.map +1 -0
  163. package/dist/ui/layout/_demo.d.ts +6 -0
  164. package/dist/ui/layout/_demo.d.ts.map +1 -0
  165. package/dist/ui/layout/_demo.js +11 -0
  166. package/dist/ui/layout/_demo.js.map +1 -0
  167. package/dist/ui/layout/_shared.d.ts +9 -0
  168. package/dist/ui/layout/_shared.d.ts.map +1 -0
  169. package/dist/ui/layout/_shared.js +30 -0
  170. package/dist/ui/layout/_shared.js.map +1 -0
  171. package/dist/ui/layout/box/box.d.ts +10 -0
  172. package/dist/ui/layout/box/box.d.ts.map +1 -0
  173. package/dist/ui/layout/box/box.js +28 -0
  174. package/dist/ui/layout/box/box.js.map +1 -0
  175. package/dist/ui/layout/box/index.d.ts +2 -0
  176. package/dist/ui/layout/box/index.d.ts.map +1 -0
  177. package/dist/ui/layout/box/index.js +3 -0
  178. package/dist/ui/layout/box/index.js.map +1 -0
  179. package/dist/ui/layout/center/center.d.ts +13 -0
  180. package/dist/ui/layout/center/center.d.ts.map +1 -0
  181. package/dist/ui/layout/center/center.js +22 -0
  182. package/dist/ui/layout/center/center.js.map +1 -0
  183. package/dist/ui/layout/center/index.d.ts +2 -0
  184. package/dist/ui/layout/center/index.d.ts.map +1 -0
  185. package/dist/ui/layout/center/index.js +3 -0
  186. package/dist/ui/layout/center/index.js.map +1 -0
  187. package/dist/ui/layout/cluster/cluster.d.ts +11 -0
  188. package/dist/ui/layout/cluster/cluster.d.ts.map +1 -0
  189. package/dist/ui/layout/cluster/cluster.js +19 -0
  190. package/dist/ui/layout/cluster/cluster.js.map +1 -0
  191. package/dist/ui/layout/cluster/index.d.ts +2 -0
  192. package/dist/ui/layout/cluster/index.d.ts.map +1 -0
  193. package/dist/ui/layout/cluster/index.js +3 -0
  194. package/dist/ui/layout/cluster/index.js.map +1 -0
  195. package/dist/ui/layout/cover/cover.d.ts +26 -0
  196. package/dist/ui/layout/cover/cover.d.ts.map +1 -0
  197. package/dist/ui/layout/cover/cover.js +57 -0
  198. package/dist/ui/layout/cover/cover.js.map +1 -0
  199. package/dist/ui/layout/cover/index.d.ts +2 -0
  200. package/dist/ui/layout/cover/index.d.ts.map +1 -0
  201. package/dist/ui/layout/cover/index.js +3 -0
  202. package/dist/ui/layout/cover/index.js.map +1 -0
  203. package/dist/ui/layout/grid/grid.d.ts +14 -0
  204. package/dist/ui/layout/grid/grid.d.ts.map +1 -0
  205. package/dist/ui/layout/grid/grid.js +25 -0
  206. package/dist/ui/layout/grid/grid.js.map +1 -0
  207. package/dist/ui/layout/grid/index.d.ts +2 -0
  208. package/dist/ui/layout/grid/index.d.ts.map +1 -0
  209. package/dist/ui/layout/grid/index.js +3 -0
  210. package/dist/ui/layout/grid/index.js.map +1 -0
  211. package/dist/ui/layout/sidebar/index.d.ts +2 -0
  212. package/dist/ui/layout/sidebar/index.d.ts.map +1 -0
  213. package/dist/ui/layout/sidebar/index.js +3 -0
  214. package/dist/ui/layout/sidebar/index.js.map +1 -0
  215. package/dist/ui/layout/sidebar/sidebar.d.ts +33 -0
  216. package/dist/ui/layout/sidebar/sidebar.d.ts.map +1 -0
  217. package/dist/ui/layout/sidebar/sidebar.js +54 -0
  218. package/dist/ui/layout/sidebar/sidebar.js.map +1 -0
  219. package/dist/ui/layout/switcher/index.d.ts +2 -0
  220. package/dist/ui/layout/switcher/index.d.ts.map +1 -0
  221. package/dist/ui/layout/switcher/index.js +3 -0
  222. package/dist/ui/layout/switcher/index.js.map +1 -0
  223. package/dist/ui/layout/switcher/switcher.d.ts +15 -0
  224. package/dist/ui/layout/switcher/switcher.d.ts.map +1 -0
  225. package/dist/ui/layout/switcher/switcher.js +26 -0
  226. package/dist/ui/layout/switcher/switcher.js.map +1 -0
  227. package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts +27 -0
  228. package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  229. package/dist/ui/molecules/breadcrumbs/breadcrumbs.js +50 -0
  230. package/dist/ui/molecules/breadcrumbs/breadcrumbs.js.map +1 -0
  231. package/dist/ui/molecules/breadcrumbs/index.d.ts +2 -0
  232. package/dist/ui/molecules/breadcrumbs/index.d.ts.map +1 -0
  233. package/dist/ui/molecules/breadcrumbs/index.js +3 -0
  234. package/dist/ui/molecules/breadcrumbs/index.js.map +1 -0
  235. package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts +47 -0
  236. package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts.map +1 -0
  237. package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js +63 -0
  238. package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js.map +1 -0
  239. package/dist/ui/molecules/bulk-action-bar/index.d.ts +2 -0
  240. package/dist/ui/molecules/bulk-action-bar/index.d.ts.map +1 -0
  241. package/dist/ui/molecules/bulk-action-bar/index.js +3 -0
  242. package/dist/ui/molecules/bulk-action-bar/index.js.map +1 -0
  243. package/dist/ui/molecules/bulk-result/bulk-result.d.ts +31 -0
  244. package/dist/ui/molecules/bulk-result/bulk-result.d.ts.map +1 -0
  245. package/dist/ui/molecules/bulk-result/bulk-result.js +86 -0
  246. package/dist/ui/molecules/bulk-result/bulk-result.js.map +1 -0
  247. package/dist/ui/molecules/bulk-result/index.d.ts +2 -0
  248. package/dist/ui/molecules/bulk-result/index.d.ts.map +1 -0
  249. package/dist/ui/molecules/bulk-result/index.js +3 -0
  250. package/dist/ui/molecules/bulk-result/index.js.map +1 -0
  251. package/dist/ui/molecules/card/card.d.ts +5 -0
  252. package/dist/ui/molecules/card/card.d.ts.map +1 -0
  253. package/dist/ui/molecules/card/card.js +14 -0
  254. package/dist/ui/molecules/card/card.js.map +1 -0
  255. package/dist/ui/molecules/card/index.d.ts +2 -0
  256. package/dist/ui/molecules/card/index.d.ts.map +1 -0
  257. package/dist/ui/molecules/card/index.js +3 -0
  258. package/dist/ui/molecules/card/index.js.map +1 -0
  259. package/dist/ui/molecules/column-settings/column-settings.d.ts +29 -0
  260. package/dist/ui/molecules/column-settings/column-settings.d.ts.map +1 -0
  261. package/dist/ui/molecules/column-settings/column-settings.js +117 -0
  262. package/dist/ui/molecules/column-settings/column-settings.js.map +1 -0
  263. package/dist/ui/molecules/column-settings/index.d.ts +2 -0
  264. package/dist/ui/molecules/column-settings/index.d.ts.map +1 -0
  265. package/dist/ui/molecules/column-settings/index.js +3 -0
  266. package/dist/ui/molecules/column-settings/index.js.map +1 -0
  267. package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts +31 -0
  268. package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts.map +1 -0
  269. package/dist/ui/molecules/confirm-dialog/confirm-dialog.js +68 -0
  270. package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -0
  271. package/dist/ui/molecules/confirm-dialog/index.d.ts +2 -0
  272. package/dist/ui/molecules/confirm-dialog/index.d.ts.map +1 -0
  273. package/dist/ui/molecules/confirm-dialog/index.js +3 -0
  274. package/dist/ui/molecules/confirm-dialog/index.js.map +1 -0
  275. package/dist/ui/molecules/drawer/drawer.d.ts +25 -0
  276. package/dist/ui/molecules/drawer/drawer.d.ts.map +1 -0
  277. package/dist/ui/molecules/drawer/drawer.js +60 -0
  278. package/dist/ui/molecules/drawer/drawer.js.map +1 -0
  279. package/dist/ui/molecules/drawer/index.d.ts +2 -0
  280. package/dist/ui/molecules/drawer/index.d.ts.map +1 -0
  281. package/dist/ui/molecules/drawer/index.js +3 -0
  282. package/dist/ui/molecules/drawer/index.js.map +1 -0
  283. package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts +36 -0
  284. package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -0
  285. package/dist/ui/molecules/entity-link-input/entity-link-input.js +191 -0
  286. package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -0
  287. package/dist/ui/molecules/entity-link-input/index.d.ts +2 -0
  288. package/dist/ui/molecules/entity-link-input/index.d.ts.map +1 -0
  289. package/dist/ui/molecules/entity-link-input/index.js +3 -0
  290. package/dist/ui/molecules/entity-link-input/index.js.map +1 -0
  291. package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts +19 -0
  292. package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts.map +1 -0
  293. package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +78 -0
  294. package/dist/ui/molecules/entity-link-picker/entity-link-picker.js.map +1 -0
  295. package/dist/ui/molecules/entity-link-picker/index.d.ts +2 -0
  296. package/dist/ui/molecules/entity-link-picker/index.d.ts.map +1 -0
  297. package/dist/ui/molecules/entity-link-picker/index.js +3 -0
  298. package/dist/ui/molecules/entity-link-picker/index.js.map +1 -0
  299. package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts +30 -0
  300. package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts.map +1 -0
  301. package/dist/ui/molecules/entity-record-card/entity-record-card.js +39 -0
  302. package/dist/ui/molecules/entity-record-card/entity-record-card.js.map +1 -0
  303. package/dist/ui/molecules/entity-record-card/index.d.ts +2 -0
  304. package/dist/ui/molecules/entity-record-card/index.d.ts.map +1 -0
  305. package/dist/ui/molecules/entity-record-card/index.js +3 -0
  306. package/dist/ui/molecules/entity-record-card/index.js.map +1 -0
  307. package/dist/ui/molecules/filter-builder/filter-builder.d.ts +19 -0
  308. package/dist/ui/molecules/filter-builder/filter-builder.d.ts.map +1 -0
  309. package/dist/ui/molecules/filter-builder/filter-builder.js +333 -0
  310. package/dist/ui/molecules/filter-builder/filter-builder.js.map +1 -0
  311. package/dist/ui/molecules/filter-builder/filter-operators.d.ts +20 -0
  312. package/dist/ui/molecules/filter-builder/filter-operators.d.ts.map +1 -0
  313. package/dist/ui/molecules/filter-builder/filter-operators.js +56 -0
  314. package/dist/ui/molecules/filter-builder/filter-operators.js.map +1 -0
  315. package/dist/ui/molecules/filter-builder/index.d.ts +3 -0
  316. package/dist/ui/molecules/filter-builder/index.d.ts.map +1 -0
  317. package/dist/ui/molecules/filter-builder/index.js +4 -0
  318. package/dist/ui/molecules/filter-builder/index.js.map +1 -0
  319. package/dist/ui/molecules/loading-boundary/index.d.ts +2 -0
  320. package/dist/ui/molecules/loading-boundary/index.d.ts.map +1 -0
  321. package/dist/ui/molecules/loading-boundary/index.js +3 -0
  322. package/dist/ui/molecules/loading-boundary/index.js.map +1 -0
  323. package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts +27 -0
  324. package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts.map +1 -0
  325. package/dist/ui/molecules/loading-boundary/loading-boundary.js +42 -0
  326. package/dist/ui/molecules/loading-boundary/loading-boundary.js.map +1 -0
  327. package/dist/ui/molecules/menu/index.d.ts +2 -0
  328. package/dist/ui/molecules/menu/index.d.ts.map +1 -0
  329. package/dist/ui/molecules/menu/index.js +3 -0
  330. package/dist/ui/molecules/menu/index.js.map +1 -0
  331. package/dist/ui/molecules/menu/menu.d.ts +37 -0
  332. package/dist/ui/molecules/menu/menu.d.ts.map +1 -0
  333. package/dist/ui/molecules/menu/menu.js +71 -0
  334. package/dist/ui/molecules/menu/menu.js.map +1 -0
  335. package/dist/ui/molecules/pagination/index.d.ts +2 -0
  336. package/dist/ui/molecules/pagination/index.d.ts.map +1 -0
  337. package/dist/ui/molecules/pagination/index.js +3 -0
  338. package/dist/ui/molecules/pagination/index.js.map +1 -0
  339. package/dist/ui/molecules/pagination/pagination.d.ts +13 -0
  340. package/dist/ui/molecules/pagination/pagination.d.ts.map +1 -0
  341. package/dist/ui/molecules/pagination/pagination.js +68 -0
  342. package/dist/ui/molecules/pagination/pagination.js.map +1 -0
  343. package/dist/ui/molecules/sort-builder/index.d.ts +2 -0
  344. package/dist/ui/molecules/sort-builder/index.d.ts.map +1 -0
  345. package/dist/ui/molecules/sort-builder/index.js +3 -0
  346. package/dist/ui/molecules/sort-builder/index.js.map +1 -0
  347. package/dist/ui/molecules/sort-builder/sort-builder.d.ts +18 -0
  348. package/dist/ui/molecules/sort-builder/sort-builder.d.ts.map +1 -0
  349. package/dist/ui/molecules/sort-builder/sort-builder.js +185 -0
  350. package/dist/ui/molecules/sort-builder/sort-builder.js.map +1 -0
  351. package/dist/ui/molecules/stack/index.d.ts +2 -0
  352. package/dist/ui/molecules/stack/index.d.ts.map +1 -0
  353. package/dist/ui/molecules/stack/index.js +3 -0
  354. package/dist/ui/molecules/stack/index.js.map +1 -0
  355. package/dist/ui/molecules/stack/stack.d.ts +12 -0
  356. package/dist/ui/molecules/stack/stack.d.ts.map +1 -0
  357. package/dist/ui/molecules/stack/stack.js +36 -0
  358. package/dist/ui/molecules/stack/stack.js.map +1 -0
  359. package/dist/ui/molecules/tab-strip/index.d.ts +2 -0
  360. package/dist/ui/molecules/tab-strip/index.d.ts.map +1 -0
  361. package/dist/ui/molecules/tab-strip/index.js +3 -0
  362. package/dist/ui/molecules/tab-strip/index.js.map +1 -0
  363. package/dist/ui/molecules/tab-strip/tab-strip.d.ts +29 -0
  364. package/dist/ui/molecules/tab-strip/tab-strip.d.ts.map +1 -0
  365. package/dist/ui/molecules/tab-strip/tab-strip.js +82 -0
  366. package/dist/ui/molecules/tab-strip/tab-strip.js.map +1 -0
  367. package/dist/ui/molecules/table-toolbar/index.d.ts +2 -0
  368. package/dist/ui/molecules/table-toolbar/index.d.ts.map +1 -0
  369. package/dist/ui/molecules/table-toolbar/index.js +3 -0
  370. package/dist/ui/molecules/table-toolbar/index.js.map +1 -0
  371. package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts +13 -0
  372. package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts.map +1 -0
  373. package/dist/ui/molecules/table-toolbar/table-toolbar.js +28 -0
  374. package/dist/ui/molecules/table-toolbar/table-toolbar.js.map +1 -0
  375. package/dist/ui/molecules/theme-switcher/index.d.ts +2 -0
  376. package/dist/ui/molecules/theme-switcher/index.d.ts.map +1 -0
  377. package/dist/ui/molecules/theme-switcher/index.js +3 -0
  378. package/dist/ui/molecules/theme-switcher/index.js.map +1 -0
  379. package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts +6 -0
  380. package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts.map +1 -0
  381. package/dist/ui/molecules/theme-switcher/theme-switcher.js +24 -0
  382. package/dist/ui/molecules/theme-switcher/theme-switcher.js.map +1 -0
  383. package/dist/ui/organisms/command-palette/command-palette.d.ts +67 -0
  384. package/dist/ui/organisms/command-palette/command-palette.d.ts.map +1 -0
  385. package/dist/ui/organisms/command-palette/command-palette.js +226 -0
  386. package/dist/ui/organisms/command-palette/command-palette.js.map +1 -0
  387. package/dist/ui/organisms/command-palette/index.d.ts +2 -0
  388. package/dist/ui/organisms/command-palette/index.d.ts.map +1 -0
  389. package/dist/ui/organisms/command-palette/index.js +3 -0
  390. package/dist/ui/organisms/command-palette/index.js.map +1 -0
  391. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts +43 -0
  392. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts.map +1 -0
  393. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js +281 -0
  394. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js.map +1 -0
  395. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts +49 -0
  396. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts.map +1 -0
  397. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js +3 -0
  398. package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js.map +1 -0
  399. package/dist/ui/organisms/entity-detail-grid/index.d.ts +3 -0
  400. package/dist/ui/organisms/entity-detail-grid/index.d.ts.map +1 -0
  401. package/dist/ui/organisms/entity-detail-grid/index.js +4 -0
  402. package/dist/ui/organisms/entity-detail-grid/index.js.map +1 -0
  403. package/dist/ui/organisms/entity-form/entity-form-slots.d.ts +53 -0
  404. package/dist/ui/organisms/entity-form/entity-form-slots.d.ts.map +1 -0
  405. package/dist/ui/organisms/entity-form/entity-form-slots.js +44 -0
  406. package/dist/ui/organisms/entity-form/entity-form-slots.js.map +1 -0
  407. package/dist/ui/organisms/entity-form/entity-form.d.ts +4 -0
  408. package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -0
  409. package/dist/ui/organisms/entity-form/entity-form.js +494 -0
  410. package/dist/ui/organisms/entity-form/entity-form.js.map +1 -0
  411. package/dist/ui/organisms/entity-form/entity-form.types.d.ts +151 -0
  412. package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -0
  413. package/dist/ui/organisms/entity-form/entity-form.types.js +3 -0
  414. package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -0
  415. package/dist/ui/organisms/entity-form/index.d.ts +5 -0
  416. package/dist/ui/organisms/entity-form/index.d.ts.map +1 -0
  417. package/dist/ui/organisms/entity-form/index.js +6 -0
  418. package/dist/ui/organisms/entity-form/index.js.map +1 -0
  419. package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts +13 -0
  420. package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts.map +1 -0
  421. package/dist/ui/organisms/entity-form/use-entity-form-fields.js +50 -0
  422. package/dist/ui/organisms/entity-form/use-entity-form-fields.js.map +1 -0
  423. package/dist/ui/organisms/entity-table/entity-table-slots.d.ts +55 -0
  424. package/dist/ui/organisms/entity-table/entity-table-slots.d.ts.map +1 -0
  425. package/dist/ui/organisms/entity-table/entity-table-slots.js +50 -0
  426. package/dist/ui/organisms/entity-table/entity-table-slots.js.map +1 -0
  427. package/dist/ui/organisms/entity-table/entity-table.d.ts +4 -0
  428. package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -0
  429. package/dist/ui/organisms/entity-table/entity-table.js +529 -0
  430. package/dist/ui/organisms/entity-table/entity-table.js.map +1 -0
  431. package/dist/ui/organisms/entity-table/entity-table.types.d.ts +126 -0
  432. package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -0
  433. package/dist/ui/organisms/entity-table/entity-table.types.js +3 -0
  434. package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -0
  435. package/dist/ui/organisms/entity-table/index.d.ts +5 -0
  436. package/dist/ui/organisms/entity-table/index.d.ts.map +1 -0
  437. package/dist/ui/organisms/entity-table/index.js +6 -0
  438. package/dist/ui/organisms/entity-table/index.js.map +1 -0
  439. package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts +29 -0
  440. package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts.map +1 -0
  441. package/dist/ui/organisms/entity-table/use-entity-table-columns.js +103 -0
  442. package/dist/ui/organisms/entity-table/use-entity-table-columns.js.map +1 -0
  443. package/dist/ui/organisms/top-bar/index.d.ts +2 -0
  444. package/dist/ui/organisms/top-bar/index.d.ts.map +1 -0
  445. package/dist/ui/organisms/top-bar/index.js +3 -0
  446. package/dist/ui/organisms/top-bar/index.js.map +1 -0
  447. package/dist/ui/organisms/top-bar/top-bar.d.ts +20 -0
  448. package/dist/ui/organisms/top-bar/top-bar.d.ts.map +1 -0
  449. package/dist/ui/organisms/top-bar/top-bar.js +43 -0
  450. package/dist/ui/organisms/top-bar/top-bar.js.map +1 -0
  451. package/dist/ui/organisms/wizard/index.d.ts +3 -0
  452. package/dist/ui/organisms/wizard/index.d.ts.map +1 -0
  453. package/dist/ui/organisms/wizard/index.js +4 -0
  454. package/dist/ui/organisms/wizard/index.js.map +1 -0
  455. package/dist/ui/organisms/wizard/wizard.d.ts +21 -0
  456. package/dist/ui/organisms/wizard/wizard.d.ts.map +1 -0
  457. package/dist/ui/organisms/wizard/wizard.js +260 -0
  458. package/dist/ui/organisms/wizard/wizard.js.map +1 -0
  459. package/dist/ui/organisms/wizard/wizard.types.d.ts +83 -0
  460. package/dist/ui/organisms/wizard/wizard.types.d.ts.map +1 -0
  461. package/dist/ui/organisms/wizard/wizard.types.js +3 -0
  462. package/dist/ui/organisms/wizard/wizard.types.js.map +1 -0
  463. package/dist/ui/utils/cn.d.ts +4 -0
  464. package/dist/ui/utils/cn.d.ts.map +1 -0
  465. package/dist/ui/utils/cn.js +5 -0
  466. package/dist/ui/utils/cn.js.map +1 -0
  467. package/dist/ui/utils/use-hotkey.d.ts +31 -0
  468. package/dist/ui/utils/use-hotkey.d.ts.map +1 -0
  469. package/dist/ui/utils/use-hotkey.js +69 -0
  470. package/dist/ui/utils/use-hotkey.js.map +1 -0
  471. package/package.json +118 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-link.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,kBAAkB;IAC1E;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,+BAMjB"}
@@ -0,0 +1,23 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { cn } from '../../utils/cn.js';
5
+ import { button } from './button-recipe.js';
6
+ export function ButtonLink(_0) {
7
+ let { variant, size, className, children } = _0, props = _object_without_properties_loose(_0, [
8
+ "variant",
9
+ "size",
10
+ "className",
11
+ "children"
12
+ ]);
13
+ return /*#__PURE__*/ _jsx("a", _extends({
14
+ className: cn(button({
15
+ variant,
16
+ size
17
+ }), className)
18
+ }, props, {
19
+ children: children
20
+ }));
21
+ }
22
+
23
+ //# sourceMappingURL=button-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/button/button-link.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { cn } from '../../utils/cn.js';\nimport { button, type ButtonVariantProps } from './button-recipe.js';\n\n/**\n * An anchor wearing {@link Button}'s clothes — and, unlike `Button`, a\n * **server** component.\n *\n * Most call-to-action buttons are not buttons: \"View product\", \"Browse\n * category\" and \"Keep shopping\" navigate, and a `<button>` that navigates is\n * both worse for the visitor (no middle-click, no open-in-new-tab, no status\n * bar) and more expensive for the page, because `Button` carries a\n * `'use client'` and would turn every card in a grid into its own client\n * boundary.\n *\n * Reach for `Button` when something actually happens on click; reach for this\n * when the click is a link. It takes no event handlers on purpose — accepting\n * one would quietly demand a client parent to pass it.\n */\nexport interface ButtonLinkProps\n extends Omit<ComponentPropsWithoutRef<'a'>, 'onClick'>, ButtonVariantProps {\n /**\n * Required: a link with no content is invisible to a screen reader and\n * unclickable to everyone else. `jsx-a11y/anchor-has-content` cannot see\n * through the prop spread below, so the type is what enforces it.\n */\n children: ReactNode;\n}\n\nexport function ButtonLink({\n variant,\n size,\n className,\n children,\n ...props\n}: ButtonLinkProps) {\n return (\n <a className={cn(button({ variant, size }), className)} {...props}>\n {children}\n </a>\n );\n}\n"],"names":["cn","button","ButtonLink","variant","size","className","children","props","a"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AACvC,SAASC,MAAM,QAAiC,qBAAqB;AA2BrE,OAAO,SAASC,WAAW,EAMT;QANS,EACzBC,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,QAAQ,EAEQ,OADbC;;;;;;IAEH,qBACE,KAACC;QAAEH,WAAWL,GAAGC,OAAO;YAAEE;YAASC;QAAK,IAAIC;OAAgBE;kBACzDD;;AAGP"}
@@ -0,0 +1,19 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ /**
3
+ * The button's visual recipe, kept in its own module so it can be shared with
4
+ * components that must **not** be client ones.
5
+ *
6
+ * `Button` is `'use client'` for a single reason — it renders HeadlessUI's
7
+ * `Button` — and a server page that puts one inside every card in a grid pays a
8
+ * client boundary per card. `cva` and the token classes have no such
9
+ * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes
10
+ * and still render entirely on the server.
11
+ */
12
+ export declare const button: (props?: ({
13
+ variant?: "destructive" | "primary" | "secondary" | "ghost" | null | undefined;
14
+ size?: "sm" | "md" | "lg" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ export type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;
17
+ export type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;
18
+ export type ButtonVariantProps = VariantProps<typeof button>;
19
+ //# sourceMappingURL=button-recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;8EAmClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAChF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { cva } from 'class-variance-authority';
2
+ /**
3
+ * The button's visual recipe, kept in its own module so it can be shared with
4
+ * components that must **not** be client ones.
5
+ *
6
+ * `Button` is `'use client'` for a single reason — it renders HeadlessUI's
7
+ * `Button` — and a server page that puts one inside every card in a grid pays a
8
+ * client boundary per card. `cva` and the token classes have no such
9
+ * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes
10
+ * and still render entirely on the server.
11
+ */ export const button = cva([
12
+ 'inline-flex items-center justify-center rounded-lg font-medium',
13
+ 'transition duration-200 ease-smooth active:scale-[0.97]',
14
+ 'focus-ring',
15
+ 'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100'
16
+ ], {
17
+ variants: {
18
+ variant: {
19
+ primary: 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',
20
+ secondary: 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',
21
+ ghost: 'bg-transparent text-content hover:bg-surface-elevated',
22
+ // For an act that destroys something — ending every session a user
23
+ // holds, deleting a record. The `--color-danger*` tokens already
24
+ // existed and were being reached for as raw classes at call sites; this
25
+ // only gives them a name, so a destructive action looks the same
26
+ // wherever it appears rather than depending on who wrote the screen.
27
+ destructive: 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card'
28
+ },
29
+ // Padding uses the fluid spacing tokens so buttons scale with the viewport.
30
+ size: {
31
+ sm: 'px-xs py-3xs text-step-0',
32
+ md: 'px-s py-2xs text-step-0',
33
+ lg: 'px-m py-xs text-step-1'
34
+ }
35
+ },
36
+ defaultVariants: {
37
+ variant: 'primary',
38
+ size: 'md'
39
+ }
40
+ });
41
+
42
+ //# sourceMappingURL=button-recipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * The button's visual recipe, kept in its own module so it can be shared with\n * components that must **not** be client ones.\n *\n * `Button` is `'use client'` for a single reason — it renders HeadlessUI's\n * `Button` — and a server page that puts one inside every card in a grid pays a\n * client boundary per card. `cva` and the token classes have no such\n * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes\n * and still render entirely on the server.\n */\nexport const button = cva(\n [\n 'inline-flex items-center justify-center rounded-lg font-medium',\n 'transition duration-200 ease-smooth active:scale-[0.97]',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',\n secondary:\n 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',\n ghost: 'bg-transparent text-content hover:bg-surface-elevated',\n // For an act that destroys something — ending every session a user\n // holds, deleting a record. The `--color-danger*` tokens already\n // existed and were being reached for as raw classes at call sites; this\n // only gives them a name, so a destructive action looks the same\n // wherever it appears rather than depending on who wrote the screen.\n destructive:\n 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card',\n },\n // Padding uses the fluid spacing tokens so buttons scale with the viewport.\n size: {\n sm: 'px-xs py-3xs text-step-0',\n md: 'px-s py-2xs text-step-0',\n lg: 'px-m py-xs text-step-1',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;\nexport type ButtonVariantProps = VariantProps<typeof button>;\n"],"names":["cva","button","variants","variant","primary","secondary","ghost","destructive","size","sm","md","lg","defaultVariants"],"mappings":"AAAA,SAASA,GAAG,QAA2B,2BAA2B;AAElE;;;;;;;;;CASC,GACD,OAAO,MAAMC,SAASD,IACpB;IACE;IACA;IACA;IACA;CACD,EACD;IACEE,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WACE;YACFC,OAAO;YACP,mEAAmE;YACnE,iEAAiE;YACjE,wEAAwE;YACxE,iEAAiE;YACjE,qEAAqE;YACrEC,aACE;QACJ;QACA,4EAA4E;QAC5EC,MAAM;YACJC,IAAI;YACJC,IAAI;YACJC,IAAI;QACN;IACF;IACAC,iBAAiB;QACfT,SAAS;QACTK,MAAM;IACR;AACF,GACA"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import { type ButtonVariantProps } from './button-recipe.js';
3
+ export type { ButtonSize, ButtonVariant } from './button-recipe.js';
4
+ export interface ButtonProps extends ComponentPropsWithoutRef<'button'>, ButtonVariantProps {
5
+ }
6
+ export declare function Button({ variant, size, className, ...props }: ButtonProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAErE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,WAAW,WACf,SAAQ,wBAAwB,CAAC,QAAQ,CAAC,EAAE,kBAAkB;CAAG;AAEnE,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,+BAOzE"}
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import { _ as _extends } from "@swc/helpers/_/_extends";
3
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { Button as HeadlessButton } from '@headlessui/react';
6
+ import { cn } from '../../utils/cn.js';
7
+ import { button } from './button-recipe.js';
8
+ export function Button(_0) {
9
+ let { variant, size, className } = _0, props = _object_without_properties_loose(_0, [
10
+ "variant",
11
+ "size",
12
+ "className"
13
+ ]);
14
+ return /*#__PURE__*/ _jsx(HeadlessButton, _extends({
15
+ className: cn(button({
16
+ variant,
17
+ size
18
+ }), className)
19
+ }, props));
20
+ }
21
+
22
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/button/button.tsx"],"sourcesContent":["'use client';\n\nimport { Button as HeadlessButton } from '@headlessui/react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\nimport { button, type ButtonVariantProps } from './button-recipe.js';\n\nexport type { ButtonSize, ButtonVariant } from './button-recipe.js';\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, ButtonVariantProps {}\n\nexport function Button({ variant, size, className, ...props }: ButtonProps) {\n return (\n <HeadlessButton\n className={cn(button({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"names":["Button","HeadlessButton","cn","button","variant","size","className","props"],"mappings":"AAAA;;;;AAEA,SAASA,UAAUC,cAAc,QAAQ,oBAAoB;AAG7D,SAASC,EAAE,QAAQ,oBAAoB;AACvC,SAASC,MAAM,QAAiC,qBAAqB;AAOrE,OAAO,SAASH,OAAO,EAAmD;QAAnD,EAAEI,OAAO,EAAEC,IAAI,EAAEC,SAAS,EAAyB,OAApBC;;;;;IACpD,qBACE,KAACN;QACCK,WAAWJ,GAAGC,OAAO;YAAEC;YAASC;QAAK,IAAIC;OACrCC;AAGV"}
@@ -0,0 +1,4 @@
1
+ export * from './button.js';
2
+ export * from './button-link.js';
3
+ export * from './button-recipe.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './button.js';
2
+ export * from './button-link.js';
3
+ export * from './button-recipe.js';
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/button/index.ts"],"sourcesContent":["export * from './button.js';\nexport * from './button-link.js';\nexport * from './button-recipe.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB"}
@@ -0,0 +1,12 @@
1
+ import { type EntityFieldDescriptor } from '@entifix/core';
2
+ export interface CellValueProps {
3
+ value: unknown;
4
+ descriptor: EntityFieldDescriptor;
5
+ }
6
+ /**
7
+ * Renders one entity member according to its metadata type. Centralizing this
8
+ * is what lets a table stay generic: a link, a date and a number all arrive as
9
+ * "the value of an accessor", and only the descriptor decides how they read.
10
+ */
11
+ export declare function CellValue({ value, descriptor }: CellValueProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=cell-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-value.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/cell-value/cell-value.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,qBAAqB,EAG3B,MAAM,eAAe,CAAC;AAqHvB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,cAAc,+BA6B9D"}
@@ -0,0 +1,101 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { EntityCollectionLink, EntityLink } from '@entifix/core';
4
+ import { useEnumLabel, useFormatters, useT } from '../../../i18n/index.js';
5
+ /** Stand-in for an absent value, so an empty cell still reads as intentional. */ const EMPTY = '—';
6
+ /**
7
+ * A link reads as its target's label when the target is loaded (embedded or
8
+ * resolved), and as the bare foreign key when it is not — the same cell markup
9
+ * covers both shapes a relation can arrive in.
10
+ */ function entityLabel(target, linkLabelProperty) {
11
+ const label = target == null ? void 0 : target[linkLabelProperty];
12
+ return label == null ? undefined : String(label);
13
+ }
14
+ function formatLink(link, linkLabelProperty) {
15
+ var _entityLabel;
16
+ return (_entityLabel = entityLabel(link.value, linkLabelProperty)) != null ? _entityLabel : link.id == null ? EMPTY : String(link.id);
17
+ }
18
+ function formatCollectionLink(link, linkLabelProperty) {
19
+ const loaded = link.values;
20
+ if (loaded !== undefined) {
21
+ return loaded.map((target, index)=>{
22
+ var _entityLabel, _ref, _target_id;
23
+ return (_entityLabel = entityLabel(target, linkLabelProperty)) != null ? _entityLabel : String((_ref = (_target_id = target.id) != null ? _target_id : link.ids[index]) != null ? _ref : '');
24
+ }).join(', ');
25
+ }
26
+ return link.ids.map(String).join(', ');
27
+ }
28
+ function formatByType(value, type, linkLabelProperty, formatting) {
29
+ switch(type){
30
+ case 'date':
31
+ return formatting.formatters.date(value instanceof Date ? value : String(value));
32
+ case 'number':
33
+ return typeof value === 'number' ? formatting.formatters.number(value) : String(value);
34
+ case 'boolean':
35
+ return value ? formatting.yes : formatting.no;
36
+ case 'enum':
37
+ return formatting.enumLabel(String(value));
38
+ case 'link':
39
+ return value instanceof EntityLink ? formatLink(value, linkLabelProperty) : String(value);
40
+ case 'linkCollection':
41
+ return value instanceof EntityCollectionLink ? formatCollectionLink(value, linkLabelProperty) : String(value);
42
+ case 'scalarCollection':
43
+ // The same comma list the draft holds, spaced for reading. Not `String`:
44
+ // an array's own `toString` joins on a bare comma, which reads as one
45
+ // run-on token in a narrow column.
46
+ return Array.isArray(value) ? value.join(', ') : String(value);
47
+ case 'composition':
48
+ // Owned rows have no useful one-line form — a receipt's lines are not a
49
+ // sentence — and the master's own screen is where they are read and
50
+ // edited. So the cell reports the count and stops.
51
+ return Array.isArray(value) ? formatting.rowCount(value.length) : String(value);
52
+ default:
53
+ return String(value);
54
+ }
55
+ }
56
+ /**
57
+ * Tabular figures, applied once, here — not on `--font-sans` and not per call
58
+ * site. A column of numbers or dates must align on the digit; a paragraph must
59
+ * not, because proportional figures are what prose is set in. The descriptor
60
+ * already knows which is which, so the cell is the only place that has to.
61
+ */ const NUMERIC_CLASS = {
62
+ number: 'tabular-nums',
63
+ date: 'tabular-nums'
64
+ };
65
+ /**
66
+ * Renders one entity member according to its metadata type. Centralizing this
67
+ * is what lets a table stay generic: a link, a date and a number all arrive as
68
+ * "the value of an accessor", and only the descriptor decides how they read.
69
+ */ export function CellValue({ value, descriptor }) {
70
+ var _NUMERIC_CLASS_descriptor_type;
71
+ const t = useT();
72
+ const formatters = useFormatters();
73
+ const enumLabel = useEnumLabel();
74
+ if (value === undefined || value === null) {
75
+ return /*#__PURE__*/ _jsx("span", {
76
+ className: "text-content-muted",
77
+ children: EMPTY
78
+ });
79
+ }
80
+ const text = formatByType(value, descriptor.type, descriptor.linkLabelProperty, {
81
+ formatters,
82
+ yes: t('value.yes'),
83
+ no: t('value.no'),
84
+ enumLabel: (raw)=>enumLabel(descriptor, raw),
85
+ rowCount: (count)=>t('value.rowCount', {
86
+ count
87
+ })
88
+ });
89
+ if (text === '') {
90
+ return /*#__PURE__*/ _jsx("span", {
91
+ className: "text-content-muted",
92
+ children: EMPTY
93
+ });
94
+ }
95
+ return /*#__PURE__*/ _jsx("span", {
96
+ className: (_NUMERIC_CLASS_descriptor_type = NUMERIC_CLASS[descriptor.type]) != null ? _NUMERIC_CLASS_descriptor_type : undefined,
97
+ children: text
98
+ });
99
+ }
100
+
101
+ //# sourceMappingURL=cell-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/cell-value/cell-value.tsx"],"sourcesContent":["'use client';\n\nimport type { Formatters } from '@entifix/core';\nimport {\n type Entity,\n EntityCollectionLink,\n type EntityFieldDescriptor,\n EntityLink,\n type MetaAccessorType,\n} from '@entifix/core';\n\nimport { useEnumLabel, useFormatters, useT } from '../../../i18n/index.js';\n\n/** Stand-in for an absent value, so an empty cell still reads as intentional. */\nconst EMPTY = '—';\n\n/**\n * A link reads as its target's label when the target is loaded (embedded or\n * resolved), and as the bare foreign key when it is not — the same cell markup\n * covers both shapes a relation can arrive in.\n */\nfunction entityLabel(\n target: Entity | undefined,\n linkLabelProperty: string,\n): string | undefined {\n const label = (target as Record<string, unknown> | undefined)?.[\n linkLabelProperty\n ];\n return label == null ? undefined : String(label);\n}\n\nfunction formatLink(\n link: EntityLink<Entity>,\n linkLabelProperty: string,\n): string {\n return (\n entityLabel(link.value, linkLabelProperty) ??\n (link.id == null ? EMPTY : String(link.id))\n );\n}\n\nfunction formatCollectionLink(\n link: EntityCollectionLink<Entity>,\n linkLabelProperty: string,\n): string {\n const loaded = link.values;\n if (loaded !== undefined) {\n return loaded\n .map(\n (target, index) =>\n entityLabel(target, linkLabelProperty) ??\n String(target.id ?? link.ids[index] ?? ''),\n )\n .join(', ');\n }\n return link.ids.map(String).join(', ');\n}\n\n/**\n * Everything locale-dependent, resolved once by the component and handed down.\n * The formatters carry an explicit locale, which is what keeps a date rendered\n * on the server byte-identical to the same date rendered in the browser.\n */\ninterface CellFormatting {\n readonly formatters: Formatters;\n readonly yes: string;\n readonly no: string;\n readonly enumLabel: (value: string) => string;\n readonly rowCount: (count: number) => string;\n}\n\nfunction formatByType(\n value: unknown,\n type: MetaAccessorType,\n linkLabelProperty: string,\n formatting: CellFormatting,\n): string {\n switch (type) {\n case 'date':\n return formatting.formatters.date(\n value instanceof Date ? value : String(value),\n );\n case 'number':\n return typeof value === 'number'\n ? formatting.formatters.number(value)\n : String(value);\n case 'boolean':\n return value ? formatting.yes : formatting.no;\n case 'enum':\n return formatting.enumLabel(String(value));\n case 'link':\n return value instanceof EntityLink\n ? formatLink(value, linkLabelProperty)\n : String(value);\n case 'linkCollection':\n return value instanceof EntityCollectionLink\n ? formatCollectionLink(value, linkLabelProperty)\n : String(value);\n case 'scalarCollection':\n // The same comma list the draft holds, spaced for reading. Not `String`:\n // an array's own `toString` joins on a bare comma, which reads as one\n // run-on token in a narrow column.\n return Array.isArray(value) ? value.join(', ') : String(value);\n case 'composition':\n // Owned rows have no useful one-line form — a receipt's lines are not a\n // sentence — and the master's own screen is where they are read and\n // edited. So the cell reports the count and stops.\n return Array.isArray(value)\n ? formatting.rowCount(value.length)\n : String(value);\n default:\n return String(value);\n }\n}\n\n/**\n * Tabular figures, applied once, here — not on `--font-sans` and not per call\n * site. A column of numbers or dates must align on the digit; a paragraph must\n * not, because proportional figures are what prose is set in. The descriptor\n * already knows which is which, so the cell is the only place that has to.\n */\nconst NUMERIC_CLASS: Partial<Record<MetaAccessorType, string>> = {\n number: 'tabular-nums',\n date: 'tabular-nums',\n};\n\nexport interface CellValueProps {\n value: unknown;\n descriptor: EntityFieldDescriptor;\n}\n\n/**\n * Renders one entity member according to its metadata type. Centralizing this\n * is what lets a table stay generic: a link, a date and a number all arrive as\n * \"the value of an accessor\", and only the descriptor decides how they read.\n */\nexport function CellValue({ value, descriptor }: CellValueProps) {\n const t = useT();\n const formatters = useFormatters();\n const enumLabel = useEnumLabel();\n\n if (value === undefined || value === null) {\n return <span className=\"text-content-muted\">{EMPTY}</span>;\n }\n\n const text = formatByType(\n value,\n descriptor.type,\n descriptor.linkLabelProperty,\n {\n formatters,\n yes: t('value.yes'),\n no: t('value.no'),\n enumLabel: raw => enumLabel(descriptor, raw),\n rowCount: count => t('value.rowCount', { count }),\n },\n );\n\n if (text === '') {\n return <span className=\"text-content-muted\">{EMPTY}</span>;\n }\n\n return (\n <span className={NUMERIC_CLASS[descriptor.type] ?? undefined}>{text}</span>\n );\n}\n"],"names":["EntityCollectionLink","EntityLink","useEnumLabel","useFormatters","useT","EMPTY","entityLabel","target","linkLabelProperty","label","undefined","String","formatLink","link","value","id","formatCollectionLink","loaded","values","map","index","ids","join","formatByType","type","formatting","formatters","date","Date","number","yes","no","enumLabel","Array","isArray","rowCount","length","NUMERIC_CLASS","CellValue","descriptor","t","span","className","text","raw","count"],"mappings":"AAAA;;AAGA,SAEEA,oBAAoB,EAEpBC,UAAU,QAEL,gBAAgB;AAEvB,SAASC,YAAY,EAAEC,aAAa,EAAEC,IAAI,QAAQ,yBAAyB;AAE3E,+EAA+E,GAC/E,MAAMC,QAAQ;AAEd;;;;CAIC,GACD,SAASC,YACPC,MAA0B,EAC1BC,iBAAyB;IAEzB,MAAMC,QAASF,0BAAD,AAACA,MAAgD,CAC7DC,kBACD;IACD,OAAOC,SAAS,OAAOC,YAAYC,OAAOF;AAC5C;AAEA,SAASG,WACPC,IAAwB,EACxBL,iBAAyB;QAGvBF;IADF,QACEA,eAAAA,YAAYO,KAAKC,KAAK,EAAEN,8BAAxBF,eACCO,KAAKE,EAAE,IAAI,OAAOV,QAAQM,OAAOE,KAAKE,EAAE;AAE7C;AAEA,SAASC,qBACPH,IAAkC,EAClCL,iBAAyB;IAEzB,MAAMS,SAASJ,KAAKK,MAAM;IAC1B,IAAID,WAAWP,WAAW;QACxB,OAAOO,OACJE,GAAG,CACF,CAACZ,QAAQa;gBACPd,cACOC,MAAAA;oBADPD,eAAAA,YAAYC,QAAQC,8BAApBF,eACAK,QAAOJ,QAAAA,aAAAA,OAAOQ,EAAE,YAATR,aAAaM,KAAKQ,GAAG,CAACD,MAAM,YAA5Bb,OAAgC;WAE1Ce,IAAI,CAAC;IACV;IACA,OAAOT,KAAKQ,GAAG,CAACF,GAAG,CAACR,QAAQW,IAAI,CAAC;AACnC;AAeA,SAASC,aACPT,KAAc,EACdU,IAAsB,EACtBhB,iBAAyB,EACzBiB,UAA0B;IAE1B,OAAQD;QACN,KAAK;YACH,OAAOC,WAAWC,UAAU,CAACC,IAAI,CAC/Bb,iBAAiBc,OAAOd,QAAQH,OAAOG;QAE3C,KAAK;YACH,OAAO,OAAOA,UAAU,WACpBW,WAAWC,UAAU,CAACG,MAAM,CAACf,SAC7BH,OAAOG;QACb,KAAK;YACH,OAAOA,QAAQW,WAAWK,GAAG,GAAGL,WAAWM,EAAE;QAC/C,KAAK;YACH,OAAON,WAAWO,SAAS,CAACrB,OAAOG;QACrC,KAAK;YACH,OAAOA,iBAAiBb,aACpBW,WAAWE,OAAON,qBAClBG,OAAOG;QACb,KAAK;YACH,OAAOA,iBAAiBd,uBACpBgB,qBAAqBF,OAAON,qBAC5BG,OAAOG;QACb,KAAK;YACH,yEAAyE;YACzE,sEAAsE;YACtE,mCAAmC;YACnC,OAAOmB,MAAMC,OAAO,CAACpB,SAASA,MAAMQ,IAAI,CAAC,QAAQX,OAAOG;QAC1D,KAAK;YACH,wEAAwE;YACxE,oEAAoE;YACpE,mDAAmD;YACnD,OAAOmB,MAAMC,OAAO,CAACpB,SACjBW,WAAWU,QAAQ,CAACrB,MAAMsB,MAAM,IAChCzB,OAAOG;QACb;YACE,OAAOH,OAAOG;IAClB;AACF;AAEA;;;;;CAKC,GACD,MAAMuB,gBAA2D;IAC/DR,QAAQ;IACRF,MAAM;AACR;AAOA;;;;CAIC,GACD,OAAO,SAASW,UAAU,EAAExB,KAAK,EAAEyB,UAAU,EAAkB;QA2B1CF;IA1BnB,MAAMG,IAAIpC;IACV,MAAMsB,aAAavB;IACnB,MAAM6B,YAAY9B;IAElB,IAAIY,UAAUJ,aAAaI,UAAU,MAAM;QACzC,qBAAO,KAAC2B;YAAKC,WAAU;sBAAsBrC;;IAC/C;IAEA,MAAMsC,OAAOpB,aACXT,OACAyB,WAAWf,IAAI,EACfe,WAAW/B,iBAAiB,EAC5B;QACEkB;QACAI,KAAKU,EAAE;QACPT,IAAIS,EAAE;QACNR,WAAWY,CAAAA,MAAOZ,UAAUO,YAAYK;QACxCT,UAAUU,CAAAA,QAASL,EAAE,kBAAkB;gBAAEK;YAAM;IACjD;IAGF,IAAIF,SAAS,IAAI;QACf,qBAAO,KAACF;YAAKC,WAAU;sBAAsBrC;;IAC/C;IAEA,qBACE,KAACoC;QAAKC,SAAS,GAAEL,iCAAAA,aAAa,CAACE,WAAWf,IAAI,CAAC,YAA9Ba,iCAAkC3B;kBAAYiC;;AAEnE"}
@@ -0,0 +1,2 @@
1
+ export * from './cell-value.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/cell-value/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './cell-value.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/cell-value/index.ts"],"sourcesContent":["export * from './cell-value.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB"}
@@ -0,0 +1,35 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ export interface CheckboxProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type'> {
3
+ /**
4
+ * The visible caption. Omit it for a box whose meaning comes from where it
5
+ * sits — a row's selection box, where the column header is the caption and
6
+ * the row itself is the subject — and pass `aria-label` instead, so the
7
+ * control still announces itself to a screen reader. A box with neither is
8
+ * unlabelled.
9
+ */
10
+ label?: string;
11
+ /**
12
+ * The third state: some of the rows below are selected, but not all.
13
+ *
14
+ * It is a DOM **property**, not an attribute, so React cannot set it from
15
+ * JSX — `<input indeterminate>` is silently dropped — and it has to be
16
+ * written through a ref after render. That is the whole reason this component
17
+ * is separate from its siblings in `field.tsx`, and the reason it carries
18
+ * `'use client'`: those two are hook-free and stay server-renderable, because
19
+ * the storefront's search page is a Server Component that imports `TextInput`
20
+ * and must not pull a client boundary into a prerendered route.
21
+ */
22
+ indeterminate?: boolean;
23
+ }
24
+ /**
25
+ * A checkbox, with its caption when it has one.
26
+ *
27
+ * Two shapes, and the difference is not cosmetic. With `label` it renders the
28
+ * caption inside a `<label>` and the whole pair is the click target — the form
29
+ * control every other field is. Without one it renders a bare box that takes
30
+ * its meaning from its position, which is what a selection column needs: a
31
+ * caption per row would repeat the column header on every line, and the row's
32
+ * own cells are already the subject.
33
+ */
34
+ export declare function Checkbox({ label, className, indeterminate, ...props }: CheckboxProps): import("react").JSX.Element;
35
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,OAAO,CAAC;AAIzE,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,wBAAwB,CAAC,OAAO,CAAC,EACjC,MAAM,CACP;IACC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,aAAqB,EACrB,GAAG,KAAK,EACT,EAAE,aAAa,+BAiCf"}
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+ import { _ as _extends } from "@swc/helpers/_/_extends";
3
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { useEffect, useRef } from 'react';
6
+ import { cn } from '../../utils/cn.js';
7
+ /**
8
+ * A checkbox, with its caption when it has one.
9
+ *
10
+ * Two shapes, and the difference is not cosmetic. With `label` it renders the
11
+ * caption inside a `<label>` and the whole pair is the click target — the form
12
+ * control every other field is. Without one it renders a bare box that takes
13
+ * its meaning from its position, which is what a selection column needs: a
14
+ * caption per row would repeat the column header on every line, and the row's
15
+ * own cells are already the subject.
16
+ */ export function Checkbox(_0) {
17
+ let { label, className, indeterminate = false } = _0, props = _object_without_properties_loose(_0, [
18
+ "label",
19
+ "className",
20
+ "indeterminate"
21
+ ]);
22
+ const ref = useRef(null);
23
+ useEffect(()=>{
24
+ // The effect only runs once the input is mounted, so the ref is always
25
+ // filled here; the guard is what keeps a future refactor that renders the
26
+ // box conditionally from throwing rather than no-op'ing.
27
+ /* v8 ignore next */ if (ref.current) ref.current.indeterminate = indeterminate;
28
+ }, [
29
+ indeterminate
30
+ ]);
31
+ const box = /*#__PURE__*/ _jsx("input", _extends({
32
+ ref: ref,
33
+ type: "checkbox",
34
+ className: cn('size-4 accent-primary', label ? undefined : className)
35
+ }, props));
36
+ if (label === undefined) return box;
37
+ return /*#__PURE__*/ _jsxs("label", {
38
+ className: cn('flex cursor-pointer items-center gap-2xs text-step-sm text-content', className),
39
+ children: [
40
+ box,
41
+ label
42
+ ]
43
+ });
44
+ }
45
+
46
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/field/checkbox.tsx"],"sourcesContent":["'use client';\n\nimport { type ComponentPropsWithoutRef, useEffect, useRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\nexport interface CheckboxProps extends Omit<\n ComponentPropsWithoutRef<'input'>,\n 'type'\n> {\n /**\n * The visible caption. Omit it for a box whose meaning comes from where it\n * sits — a row's selection box, where the column header is the caption and\n * the row itself is the subject — and pass `aria-label` instead, so the\n * control still announces itself to a screen reader. A box with neither is\n * unlabelled.\n */\n label?: string;\n /**\n * The third state: some of the rows below are selected, but not all.\n *\n * It is a DOM **property**, not an attribute, so React cannot set it from\n * JSX — `<input indeterminate>` is silently dropped — and it has to be\n * written through a ref after render. That is the whole reason this component\n * is separate from its siblings in `field.tsx`, and the reason it carries\n * `'use client'`: those two are hook-free and stay server-renderable, because\n * the storefront's search page is a Server Component that imports `TextInput`\n * and must not pull a client boundary into a prerendered route.\n */\n indeterminate?: boolean;\n}\n\n/**\n * A checkbox, with its caption when it has one.\n *\n * Two shapes, and the difference is not cosmetic. With `label` it renders the\n * caption inside a `<label>` and the whole pair is the click target — the form\n * control every other field is. Without one it renders a bare box that takes\n * its meaning from its position, which is what a selection column needs: a\n * caption per row would repeat the column header on every line, and the row's\n * own cells are already the subject.\n */\nexport function Checkbox({\n label,\n className,\n indeterminate = false,\n ...props\n}: CheckboxProps) {\n const ref = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n // The effect only runs once the input is mounted, so the ref is always\n // filled here; the guard is what keeps a future refactor that renders the\n // box conditionally from throwing rather than no-op'ing.\n /* v8 ignore next */\n if (ref.current) ref.current.indeterminate = indeterminate;\n }, [indeterminate]);\n\n const box = (\n <input\n ref={ref}\n type=\"checkbox\"\n className={cn('size-4 accent-primary', label ? undefined : className)}\n {...props}\n />\n );\n\n if (label === undefined) return box;\n\n return (\n <label\n className={cn(\n 'flex cursor-pointer items-center gap-2xs text-step-sm text-content',\n className,\n )}\n >\n {box}\n {label}\n </label>\n );\n}\n"],"names":["useEffect","useRef","cn","Checkbox","label","className","indeterminate","props","ref","current","box","input","type","undefined"],"mappings":"AAAA;;;;AAEA,SAAwCA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAEzE,SAASC,EAAE,QAAQ,oBAAoB;AA4BvC;;;;;;;;;CASC,GACD,OAAO,SAASC,SAAS,EAKT;QALS,EACvBC,KAAK,EACLC,SAAS,EACTC,gBAAgB,KAAK,EAEP,OADXC;;;;;IAEH,MAAMC,MAAMP,OAAyB;IAErCD,UAAU;QACR,uEAAuE;QACvE,0EAA0E;QAC1E,yDAAyD;QACzD,kBAAkB,GAClB,IAAIQ,IAAIC,OAAO,EAAED,IAAIC,OAAO,CAACH,aAAa,GAAGA;IAC/C,GAAG;QAACA;KAAc;IAElB,MAAMI,oBACJ,KAACC;QACCH,KAAKA;QACLI,MAAK;QACLP,WAAWH,GAAG,yBAAyBE,QAAQS,YAAYR;OACvDE;IAIR,IAAIH,UAAUS,WAAW,OAAOH;IAEhC,qBACE,MAACN;QACCC,WAAWH,GACT,sEACAG;;YAGDK;YACAN;;;AAGP"}
@@ -0,0 +1,4 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export declare function TextInput({ className, ...props }: ComponentPropsWithoutRef<'input'>): import("react").JSX.Element;
3
+ export declare function Select({ className, ...props }: ComponentPropsWithoutRef<'select'>): import("react").JSX.Element;
4
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAatD,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,OAAO,CAAC,+BAEnC;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,QAAQ,CAAC,+BAEpC"}
@@ -0,0 +1,29 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { cn } from '../../utils/cn.js';
5
+ /** Shared shell for the interactive form controls below. */ const CONTROL_CLASS = [
6
+ 'rounded-lg border border-border bg-surface-elevated px-2xs py-3xs',
7
+ 'text-step-sm text-content',
8
+ 'transition-colors duration-200 ease-smooth',
9
+ 'focus-ring',
10
+ 'disabled:cursor-not-allowed disabled:opacity-50'
11
+ ].join(' ');
12
+ export function TextInput(_0) {
13
+ let { className } = _0, props = _object_without_properties_loose(_0, [
14
+ "className"
15
+ ]);
16
+ return /*#__PURE__*/ _jsx("input", _extends({
17
+ className: cn(CONTROL_CLASS, className)
18
+ }, props));
19
+ }
20
+ export function Select(_0) {
21
+ let { className } = _0, props = _object_without_properties_loose(_0, [
22
+ "className"
23
+ ]);
24
+ return /*#__PURE__*/ _jsx("select", _extends({
25
+ className: cn(CONTROL_CLASS, className)
26
+ }, props));
27
+ }
28
+
29
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/field/field.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\n/** Shared shell for the interactive form controls below. */\nconst CONTROL_CLASS = [\n 'rounded-lg border border-border bg-surface-elevated px-2xs py-3xs',\n 'text-step-sm text-content',\n 'transition-colors duration-200 ease-smooth',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n].join(' ');\n\nexport function TextInput({\n className,\n ...props\n}: ComponentPropsWithoutRef<'input'>) {\n return <input className={cn(CONTROL_CLASS, className)} {...props} />;\n}\n\nexport function Select({\n className,\n ...props\n}: ComponentPropsWithoutRef<'select'>) {\n return <select className={cn(CONTROL_CLASS, className)} {...props} />;\n}\n"],"names":["cn","CONTROL_CLASS","join","TextInput","className","props","input","Select","select"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AAEvC,0DAA0D,GAC1D,MAAMC,gBAAgB;IACpB;IACA;IACA;IACA;IACA;CACD,CAACC,IAAI,CAAC;AAEP,OAAO,SAASC,UAAU,EAGU;QAHV,EACxBC,SAAS,EAEyB,OAD/BC;;;IAEH,qBAAO,KAACC;QAAMF,WAAWJ,GAAGC,eAAeG;OAAgBC;AAC7D;AAEA,OAAO,SAASE,OAAO,EAGc;QAHd,EACrBH,SAAS,EAE0B,OADhCC;;;IAEH,qBAAO,KAACG;QAAOJ,WAAWJ,GAAGC,eAAeG;OAAgBC;AAC9D"}
@@ -0,0 +1,3 @@
1
+ export * from './checkbox.js';
2
+ export * from './field.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './checkbox.js';
2
+ export * from './field.js';
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/field/index.ts"],"sourcesContent":["export * from './checkbox.js';\nexport * from './field.js';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,aAAa"}
@@ -0,0 +1,50 @@
1
+ import type { EntityFieldDescriptor } from '@entifix/core';
2
+ export interface FieldControlProps {
3
+ descriptor: EntityFieldDescriptor;
4
+ /**
5
+ * ARIA wiring the caller owns, because only the caller knows the shape it is
6
+ * rendered into.
7
+ *
8
+ * A form labels its control with a `<label for>` and needs none of this; a
9
+ * detail grid's cell has no label of its own — the column header is the
10
+ * label, and the cell's message is the description — so it points at both by
11
+ * id. Passing them through here rather than duplicating the type→input map
12
+ * in the grid is what keeps one control deciding what a `date` member looks
13
+ * like.
14
+ */
15
+ 'aria-labelledby'?: string;
16
+ 'aria-describedby'?: string;
17
+ 'aria-invalid'?: boolean;
18
+ /**
19
+ * The draft value as a string — the shape a native input round-trips. A form
20
+ * holds its whole draft as `Record<string, string>` and reconstructs typed
21
+ * values only at submit, so the control never sees a domain value.
22
+ */
23
+ value: string;
24
+ onChange: (value: string) => void;
25
+ id?: string;
26
+ }
27
+ /**
28
+ * The edit-mode inverse of {@link CellValue}: it turns one metadata descriptor
29
+ * into the input that edits it. Centralizing the type→control choice is what
30
+ * lets a form stay generic, the same way `CellValue` keeps a table generic.
31
+ *
32
+ * A relation (`link`/`linkCollection`) is rendered read-only here, deliberately:
33
+ * editing one needs a picker that can search and page the target, which is a
34
+ * different control with different dependencies. So this atom stays a pure
35
+ * type→input map and a relation never falls back to a broken text box.
36
+ *
37
+ * For a to-one `link` that is only half the story — `EntityForm` wires the
38
+ * picker in one level up from its `linkSources`, so the member does get an
39
+ * editor, just not from here. A `linkCollection` has no editor anywhere yet
40
+ * (#26), and read-only is all it gets. A `composition` is the same: its rows
41
+ * need a detail grid (#122), and a text box holding `[object Object]` would be
42
+ * strictly worse than an honest disabled field.
43
+ *
44
+ * A `scalarCollection` is the exception among the collections and falls through
45
+ * to the plain text input on purpose: a `string[]` has a lossless comma form,
46
+ * so the draft it round-trips through *is* editable text. Splitting on the
47
+ * comma is `reconstructEntity`'s half of that same contract.
48
+ */
49
+ export declare function FieldControl({ descriptor, value, onChange, id, ...aria }: FieldControlProps): import("react").JSX.Element;
50
+ //# sourceMappingURL=field-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-control.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field-control/field-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,eAAe,CAAC;AAK7E,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,qBAAqB,CAAC;IAClC;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAQD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,KAAK,EACL,QAAQ,EACR,EAAE,EACF,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAkDnB"}