@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,37 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface MenuProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * A dropdown menu — the user context menu in the top bar, and the tab-overflow
8
+ * list. A thin styled wrapper over Headless UI so focus management, keyboard
9
+ * nav, and outside-click come for free; the tokens keep it on-brand.
10
+ */
11
+ export declare function Menu({ children, className }: MenuProps): import("react").JSX.Element;
12
+ export declare namespace Menu {
13
+ var Trigger: ({ className, ...props }: ComponentPropsWithoutRef<"button">) => import("react").JSX.Element;
14
+ var Items: ({ children, className, }: {
15
+ children: ReactNode;
16
+ className?: string;
17
+ }) => import("react").JSX.Element;
18
+ var Item: ({ className, tone, ...props }: MenuItemProps) => import("react").JSX.Element;
19
+ var Link: ({ className, ...props }: ComponentPropsWithoutRef<"a">) => import("react").JSX.Element;
20
+ }
21
+ /** How an entry reads: an ordinary action, or one that destroys something. */
22
+ export type MenuItemTone = 'neutral' | 'destructive';
23
+ export interface MenuItemProps extends ComponentPropsWithoutRef<'button'> {
24
+ /**
25
+ * `destructive` colours the entry as a deletion.
26
+ *
27
+ * It exists because an overflow menu is where a destructive verb ends up once
28
+ * the visible actions are full, and a `Button` in that position would carry
29
+ * `variant="destructive"` — a menu that cannot say the same thing makes the
30
+ * appearance of a verb depend on how many siblings it happens to have.
31
+ *
32
+ * Colour is not the affordance, and must not be the only warning: a verb
33
+ * whose descriptor carries `confirm` still asks before it fires.
34
+ */
35
+ tone?: MenuItemTone;
36
+ }
37
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/menu/menu.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,SAAS,+BAStD;yBATe,IAAI;2CAWsB,wBAAwB,CAAC,QAAQ,CAAC;0CAiBzE;QACD,QAAQ,EAAE,SAAS,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;8CAwCwD,aAAa;wCAyB/B,wBAAwB,CAAC,GAAG,CAAC;;AAhDpE,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,QAAQ,CAAC;IACvE;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB"}
@@ -0,0 +1,71 @@
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 { Menu as HuiMenu, MenuButton, MenuItem as HuiMenuItem, MenuItems } from '@headlessui/react';
6
+ import { cn } from '../../utils/cn.js';
7
+ /**
8
+ * A dropdown menu — the user context menu in the top bar, and the tab-overflow
9
+ * list. A thin styled wrapper over Headless UI so focus management, keyboard
10
+ * nav, and outside-click come for free; the tokens keep it on-brand.
11
+ */ export function Menu({ children, className }) {
12
+ return /*#__PURE__*/ _jsx(HuiMenu, {
13
+ as: "div",
14
+ className: cn('relative inline-block text-left', className),
15
+ children: children
16
+ });
17
+ }
18
+ function Trigger(_0) {
19
+ let { className } = _0, props = _object_without_properties_loose(_0, [
20
+ "className"
21
+ ]);
22
+ return /*#__PURE__*/ _jsx(MenuButton, _extends({
23
+ className: cn('inline-flex items-center gap-2xs rounded-lg px-2xs py-3xs text-step-sm text-content', 'transition duration-200 ease-smooth hover:bg-surface', 'focus-ring', className)
24
+ }, props));
25
+ }
26
+ function Items({ children, className }) {
27
+ return /*#__PURE__*/ _jsx(MenuItems, {
28
+ className: cn('right-0 absolute z-50 mt-2xs min-w-[12rem] rounded-lg border border-border bg-surface-elevated p-3xs shadow-overlay', // The panel itself is a focus-managed CONTAINER, not a target: the ring
29
+ // belongs on the item inside it. Stripping the outline here is
30
+ // correct, and is not a missing `focus-ring`.
31
+ 'focus:outline-none', className),
32
+ children: children
33
+ });
34
+ }
35
+ const ITEM_TONE_CLASS = {
36
+ neutral: 'text-content data-focus:text-content',
37
+ destructive: 'text-danger data-focus:text-danger'
38
+ };
39
+ function Item(_0) {
40
+ let { className, tone = 'neutral' } = _0, props = _object_without_properties_loose(_0, [
41
+ "className",
42
+ "tone"
43
+ ]);
44
+ return /*#__PURE__*/ _jsx(HuiMenuItem, _extends({
45
+ as: "button",
46
+ className: cn('flex w-full items-center gap-2xs rounded-md px-2xs py-3xs text-step-sm', 'data-focus:bg-surface', ITEM_TONE_CLASS[tone], 'disabled:cursor-not-allowed disabled:opacity-50', className)
47
+ }, props));
48
+ }
49
+ /**
50
+ * A navigating menu entry.
51
+ *
52
+ * A plain anchor rather than a router link: the entries that need this are the
53
+ * account menu's, and those point at a different app on a different origin,
54
+ * where a client-side transition is not an option anyway. Callers wanting an
55
+ * in-app transition should pass their router's link through `as`-style
56
+ * composition at the call site instead.
57
+ */ function Link(_0) {
58
+ let { className } = _0, props = _object_without_properties_loose(_0, [
59
+ "className"
60
+ ]);
61
+ return /*#__PURE__*/ _jsx(HuiMenuItem, _extends({
62
+ as: "a",
63
+ className: cn('flex w-full items-center gap-2xs rounded-md px-2xs py-3xs text-step-sm text-content no-underline', 'data-focus:bg-surface data-focus:text-content', className)
64
+ }, props));
65
+ }
66
+ Menu.Trigger = Trigger;
67
+ Menu.Items = Items;
68
+ Menu.Item = Item;
69
+ Menu.Link = Link;
70
+
71
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/menu/menu.tsx"],"sourcesContent":["'use client';\n\nimport {\n Menu as HuiMenu,\n MenuButton,\n MenuItem as HuiMenuItem,\n MenuItems,\n} from '@headlessui/react';\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\nexport interface MenuProps {\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A dropdown menu — the user context menu in the top bar, and the tab-overflow\n * list. A thin styled wrapper over Headless UI so focus management, keyboard\n * nav, and outside-click come for free; the tokens keep it on-brand.\n */\nexport function Menu({ children, className }: MenuProps) {\n return (\n <HuiMenu\n as=\"div\"\n className={cn('relative inline-block text-left', className)}\n >\n {children}\n </HuiMenu>\n );\n}\n\nfunction Trigger({ className, ...props }: ComponentPropsWithoutRef<'button'>) {\n return (\n <MenuButton\n className={cn(\n 'inline-flex items-center gap-2xs rounded-lg px-2xs py-3xs text-step-sm text-content',\n 'transition duration-200 ease-smooth hover:bg-surface',\n 'focus-ring',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Items({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) {\n return (\n <MenuItems\n className={cn(\n 'right-0 absolute z-50 mt-2xs min-w-[12rem] rounded-lg border border-border bg-surface-elevated p-3xs shadow-overlay',\n // The panel itself is a focus-managed CONTAINER, not a target: the ring\n // belongs on the item inside it. Stripping the outline here is\n // correct, and is not a missing `focus-ring`.\n 'focus:outline-none',\n className,\n )}\n >\n {children}\n </MenuItems>\n );\n}\n\n/** How an entry reads: an ordinary action, or one that destroys something. */\nexport type MenuItemTone = 'neutral' | 'destructive';\n\nexport interface MenuItemProps extends ComponentPropsWithoutRef<'button'> {\n /**\n * `destructive` colours the entry as a deletion.\n *\n * It exists because an overflow menu is where a destructive verb ends up once\n * the visible actions are full, and a `Button` in that position would carry\n * `variant=\"destructive\"` — a menu that cannot say the same thing makes the\n * appearance of a verb depend on how many siblings it happens to have.\n *\n * Colour is not the affordance, and must not be the only warning: a verb\n * whose descriptor carries `confirm` still asks before it fires.\n */\n tone?: MenuItemTone;\n}\n\nconst ITEM_TONE_CLASS: Record<MenuItemTone, string> = {\n neutral: 'text-content data-focus:text-content',\n destructive: 'text-danger data-focus:text-danger',\n};\n\nfunction Item({ className, tone = 'neutral', ...props }: MenuItemProps) {\n return (\n <HuiMenuItem\n as=\"button\"\n className={cn(\n 'flex w-full items-center gap-2xs rounded-md px-2xs py-3xs text-step-sm',\n 'data-focus:bg-surface',\n ITEM_TONE_CLASS[tone],\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * A navigating menu entry.\n *\n * A plain anchor rather than a router link: the entries that need this are the\n * account menu's, and those point at a different app on a different origin,\n * where a client-side transition is not an option anyway. Callers wanting an\n * in-app transition should pass their router's link through `as`-style\n * composition at the call site instead.\n */\nfunction Link({ className, ...props }: ComponentPropsWithoutRef<'a'>) {\n return (\n <HuiMenuItem\n as=\"a\"\n className={cn(\n 'flex w-full items-center gap-2xs rounded-md px-2xs py-3xs text-step-sm text-content no-underline',\n 'data-focus:bg-surface data-focus:text-content',\n className,\n )}\n {...props}\n />\n );\n}\n\nMenu.Trigger = Trigger;\nMenu.Items = Items;\nMenu.Item = Item;\nMenu.Link = Link;\n"],"names":["Menu","HuiMenu","MenuButton","MenuItem","HuiMenuItem","MenuItems","cn","children","className","as","Trigger","props","Items","ITEM_TONE_CLASS","neutral","destructive","Item","tone","Link"],"mappings":"AAAA;;;;AAEA,SACEA,QAAQC,OAAO,EACfC,UAAU,EACVC,YAAYC,WAAW,EACvBC,SAAS,QACJ,oBAAoB;AAG3B,SAASC,EAAE,QAAQ,oBAAoB;AAOvC;;;;CAIC,GACD,OAAO,SAASN,KAAK,EAAEO,QAAQ,EAAEC,SAAS,EAAa;IACrD,qBACE,KAACP;QACCQ,IAAG;QACHD,WAAWF,GAAG,mCAAmCE;kBAEhDD;;AAGP;AAEA,SAASG,QAAQ,EAA2D;QAA3D,EAAEF,SAAS,EAAgD,OAA3CG;;;IAC/B,qBACE,KAACT;QACCM,WAAWF,GACT,uFACA,wDACA,cACAE;OAEEG;AAGV;AAEA,SAASC,MAAM,EACbL,QAAQ,EACRC,SAAS,EAIV;IACC,qBACE,KAACH;QACCG,WAAWF,GACT,uHACA,wEAAwE;QACxE,+DAA+D;QAC/D,8CAA8C;QAC9C,sBACAE;kBAGDD;;AAGP;AAoBA,MAAMM,kBAAgD;IACpDC,SAAS;IACTC,aAAa;AACf;AAEA,SAASC,KAAK,EAAwD;QAAxD,EAAER,SAAS,EAAES,OAAO,SAAS,EAA2B,OAAtBN;;;;IAC9C,qBACE,KAACP;QACCK,IAAG;QACHD,WAAWF,GACT,0EACA,yBACAO,eAAe,CAACI,KAAK,EACrB,mDACAT;OAEEG;AAGV;AAEA;;;;;;;;CAQC,GACD,SAASO,KAAK,EAAsD;QAAtD,EAAEV,SAAS,EAA2C,OAAtCG;;;IAC5B,qBACE,KAACP;QACCK,IAAG;QACHD,WAAWF,GACT,oGACA,iDACAE;OAEEG;AAGV;AAEAX,KAAKU,OAAO,GAAGA;AACfV,KAAKY,KAAK,GAAGA;AACbZ,KAAKgB,IAAI,GAAGA;AACZhB,KAAKkB,IAAI,GAAGA"}
@@ -0,0 +1,2 @@
1
+ export * from './pagination.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/pagination/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './pagination.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/pagination/index.ts"],"sourcesContent":["export * from './pagination.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB"}
@@ -0,0 +1,13 @@
1
+ export declare const DEFAULT_PAGE_SIZE_OPTIONS: readonly [10, 25, 50, 100];
2
+ export interface PaginationProps {
3
+ currentPage: number;
4
+ pageSize: number;
5
+ totalItems: number;
6
+ onPageChange: (page: number) => void;
7
+ onPageSizeChange?: (pageSize: number) => void;
8
+ pageSizeOptions?: readonly number[];
9
+ className?: string;
10
+ }
11
+ /** Page stepper plus an optional page-size selector. */
12
+ export declare function Pagination({ currentPage, pageSize, totalItems, onPageChange, onPageSizeChange, pageSizeOptions, className, }: PaginationProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/pagination/pagination.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB,4BAA6B,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,eAA2C,EAC3C,SAAS,GACV,EAAE,eAAe,+BAwDjB"}
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useT } from '../../../i18n/index.js';
4
+ import { Button } from '../../atoms/button/index.js';
5
+ import { Select } from '../../atoms/field/index.js';
6
+ import { Text } from '../../atoms/text/index.js';
7
+ import { cn } from '../../utils/cn.js';
8
+ export const DEFAULT_PAGE_SIZE_OPTIONS = [
9
+ 10,
10
+ 25,
11
+ 50,
12
+ 100
13
+ ];
14
+ /** Page stepper plus an optional page-size selector. */ export function Pagination({ currentPage, pageSize, totalItems, onPageChange, onPageSizeChange, pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, className }) {
15
+ const t = useT();
16
+ const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
17
+ return /*#__PURE__*/ _jsxs("div", {
18
+ className: cn('flex flex-wrap items-center justify-between gap-2xs', className),
19
+ children: [
20
+ /*#__PURE__*/ _jsx(Text, {
21
+ step: -1,
22
+ tone: "muted",
23
+ children: t('pagination.summary', {
24
+ current: currentPage,
25
+ total: totalPages,
26
+ items: totalItems
27
+ })
28
+ }),
29
+ /*#__PURE__*/ _jsxs("div", {
30
+ className: "flex items-center gap-2xs",
31
+ children: [
32
+ onPageSizeChange && /*#__PURE__*/ _jsxs("label", {
33
+ className: "flex items-center gap-3xs text-step-sm text-content-muted",
34
+ children: [
35
+ t('pagination.rows'),
36
+ /*#__PURE__*/ _jsx(Select, {
37
+ value: pageSize,
38
+ onChange: (event)=>onPageSizeChange(Number(event.target.value)),
39
+ children: pageSizeOptions.map((option)=>/*#__PURE__*/ _jsx("option", {
40
+ value: option,
41
+ children: option
42
+ }, option))
43
+ })
44
+ ]
45
+ }),
46
+ /*#__PURE__*/ _jsx(Button, {
47
+ type: "button",
48
+ variant: "secondary",
49
+ size: "sm",
50
+ disabled: currentPage <= 1,
51
+ onClick: ()=>onPageChange(currentPage - 1),
52
+ children: t('pagination.previous')
53
+ }),
54
+ /*#__PURE__*/ _jsx(Button, {
55
+ type: "button",
56
+ variant: "secondary",
57
+ size: "sm",
58
+ disabled: currentPage >= totalPages,
59
+ onClick: ()=>onPageChange(currentPage + 1),
60
+ children: t('pagination.next')
61
+ })
62
+ ]
63
+ })
64
+ ]
65
+ });
66
+ }
67
+
68
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/pagination/pagination.tsx"],"sourcesContent":["'use client';\n\nimport { useT } from '../../../i18n/index.js';\nimport { Button } from '../../atoms/button/index.js';\nimport { Select } from '../../atoms/field/index.js';\nimport { Text } from '../../atoms/text/index.js';\nimport { cn } from '../../utils/cn.js';\n\nexport const DEFAULT_PAGE_SIZE_OPTIONS = [10, 25, 50, 100] as const;\n\nexport interface PaginationProps {\n currentPage: number;\n pageSize: number;\n totalItems: number;\n onPageChange: (page: number) => void;\n onPageSizeChange?: (pageSize: number) => void;\n pageSizeOptions?: readonly number[];\n className?: string;\n}\n\n/** Page stepper plus an optional page-size selector. */\nexport function Pagination({\n currentPage,\n pageSize,\n totalItems,\n onPageChange,\n onPageSizeChange,\n pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,\n className,\n}: PaginationProps) {\n const t = useT();\n const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));\n\n return (\n <div\n className={cn(\n 'flex flex-wrap items-center justify-between gap-2xs',\n className,\n )}\n >\n <Text step={-1} tone=\"muted\">\n {t('pagination.summary', {\n current: currentPage,\n total: totalPages,\n items: totalItems,\n })}\n </Text>\n\n <div className=\"flex items-center gap-2xs\">\n {onPageSizeChange && (\n <label className=\"flex items-center gap-3xs text-step-sm text-content-muted\">\n {t('pagination.rows')}\n <Select\n value={pageSize}\n onChange={event => onPageSizeChange(Number(event.target.value))}\n >\n {pageSizeOptions.map(option => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </Select>\n </label>\n )}\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={currentPage <= 1}\n onClick={() => onPageChange(currentPage - 1)}\n >\n {t('pagination.previous')}\n </Button>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={currentPage >= totalPages}\n onClick={() => onPageChange(currentPage + 1)}\n >\n {t('pagination.next')}\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["useT","Button","Select","Text","cn","DEFAULT_PAGE_SIZE_OPTIONS","Pagination","currentPage","pageSize","totalItems","onPageChange","onPageSizeChange","pageSizeOptions","className","t","totalPages","Math","max","ceil","div","step","tone","current","total","items","label","value","onChange","event","Number","target","map","option","type","variant","size","disabled","onClick"],"mappings":"AAAA;;AAEA,SAASA,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SAASC,EAAE,QAAQ,oBAAoB;AAEvC,OAAO,MAAMC,4BAA4B;IAAC;IAAI;IAAI;IAAI;CAAI,CAAU;AAYpE,sDAAsD,GACtD,OAAO,SAASC,WAAW,EACzBC,WAAW,EACXC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,gBAAgB,EAChBC,kBAAkBP,yBAAyB,EAC3CQ,SAAS,EACO;IAChB,MAAMC,IAAId;IACV,MAAMe,aAAaC,KAAKC,GAAG,CAAC,GAAGD,KAAKE,IAAI,CAACT,aAAaD;IAEtD,qBACE,MAACW;QACCN,WAAWT,GACT,uDACAS;;0BAGF,KAACV;gBAAKiB,MAAM,CAAC;gBAAGC,MAAK;0BAClBP,EAAE,sBAAsB;oBACvBQ,SAASf;oBACTgB,OAAOR;oBACPS,OAAOf;gBACT;;0BAGF,MAACU;gBAAIN,WAAU;;oBACZF,kCACC,MAACc;wBAAMZ,WAAU;;4BACdC,EAAE;0CACH,KAACZ;gCACCwB,OAAOlB;gCACPmB,UAAUC,CAAAA,QAASjB,iBAAiBkB,OAAOD,MAAME,MAAM,CAACJ,KAAK;0CAE5Dd,gBAAgBmB,GAAG,CAACC,CAAAA,uBACnB,KAACA;wCAAoBN,OAAOM;kDACzBA;uCADUA;;;;kCAOrB,KAAC/B;wBACCgC,MAAK;wBACLC,SAAQ;wBACRC,MAAK;wBACLC,UAAU7B,eAAe;wBACzB8B,SAAS,IAAM3B,aAAaH,cAAc;kCAEzCO,EAAE;;kCAEL,KAACb;wBACCgC,MAAK;wBACLC,SAAQ;wBACRC,MAAK;wBACLC,UAAU7B,eAAeQ;wBACzBsB,SAAS,IAAM3B,aAAaH,cAAc;kCAEzCO,EAAE;;;;;;AAKb"}
@@ -0,0 +1,2 @@
1
+ export * from './sort-builder.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/sort-builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './sort-builder.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/sort-builder/index.ts"],"sourcesContent":["export * from './sort-builder.js';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB"}
@@ -0,0 +1,18 @@
1
+ import type { Entity, EntityFieldDescriptor, EntitySorting } from '@entifix/core';
2
+ export interface SortBuilderProps<TEntity extends Entity> {
3
+ /** Sortable members, already resolved from the entity metadata. */
4
+ descriptors: readonly EntityFieldDescriptor[];
5
+ /** The sorting currently applied, used to seed the rows. */
6
+ value?: EntitySorting<TEntity>;
7
+ onChange: (sorting: EntitySorting<TEntity>) => void;
8
+ }
9
+ /**
10
+ * Builds an `EntitySorting` value — a precedence-ordered map, so the list order
11
+ * here *is* the sort priority. Reordering uses explicit buttons for the same
12
+ * reasons as the column settings.
13
+ *
14
+ * As in the filter builder, editing is a draft and `onChange` fires only on
15
+ * **Apply**: each emission is a round trip to the server.
16
+ */
17
+ export declare function SortBuilder<TEntity extends Entity>({ descriptors, value: applied, onChange, }: SortBuilderProps<TEntity>): import("react").JSX.Element;
18
+ //# sourceMappingURL=sort-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-builder.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/sort-builder/sort-builder.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EACrB,aAAa,EAEd,MAAM,eAAe,CAAC;AA2CvB,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM;IACtD,mEAAmE;IACnE,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC9C,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,SAAS,MAAM,EAAE,EAClD,WAAW,EACX,KAAK,EAAE,OAAO,EACd,QAAQ,GACT,EAAE,gBAAgB,CAAC,OAAO,CAAC,+BAwK3B"}
@@ -0,0 +1,185 @@
1
+ 'use client';
2
+ import { _ as _extends } from "@swc/helpers/_/_extends";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { useCallback, useState } from 'react';
5
+ import { useT } from '../../../i18n/index.js';
6
+ import { Button } from '../../atoms/button/index.js';
7
+ import { Select } from '../../atoms/field/index.js';
8
+ import { Text } from '../../atoms/text/index.js';
9
+ /**
10
+ * Rebuilds the rows from an already-applied sorting, so reopening the panel
11
+ * shows what is actually in effect. The numeric keys are the precedence, so
12
+ * they are walked in order.
13
+ */ function toDrafts(sorting, descriptors) {
14
+ if (!sorting) return [];
15
+ return Object.keys(sorting).map(Number).sort((left, right)=>left - right).flatMap((priority)=>{
16
+ const entry = sorting[priority];
17
+ if (!entry) return [];
18
+ // Rows address members by accessor name; an applied value carries the
19
+ // wire key, which is the same string unless the member declared an alias.
20
+ const descriptor = descriptors.find((candidate)=>candidate.key === String(entry.property) || candidate.name === String(entry.property));
21
+ return descriptor ? [
22
+ {
23
+ property: descriptor.name,
24
+ type: entry.type
25
+ }
26
+ ] : [];
27
+ });
28
+ }
29
+ /**
30
+ * Builds an `EntitySorting` value — a precedence-ordered map, so the list order
31
+ * here *is* the sort priority. Reordering uses explicit buttons for the same
32
+ * reasons as the column settings.
33
+ *
34
+ * As in the filter builder, editing is a draft and `onChange` fires only on
35
+ * **Apply**: each emission is a round trip to the server.
36
+ */ export function SortBuilder({ descriptors, value: applied, onChange }) {
37
+ const [drafts, setDrafts] = useState(()=>toDrafts(applied, descriptors));
38
+ const apply = useCallback((next)=>{
39
+ const sorting = next.reduce((accumulator, draft, index)=>{
40
+ const descriptor = descriptors.find((entry)=>entry.name === draft.property);
41
+ if (descriptor) {
42
+ accumulator[index] = {
43
+ property: descriptor.key,
44
+ type: draft.type
45
+ };
46
+ }
47
+ return accumulator;
48
+ }, {});
49
+ onChange(sorting);
50
+ }, [
51
+ descriptors,
52
+ onChange
53
+ ]);
54
+ const t = useT();
55
+ /** Edits the draft only — nothing reaches the caller until Apply. */ const update = (next)=>setDrafts(next);
56
+ const shift = (index, delta)=>{
57
+ const target = index + delta;
58
+ // Defence in depth: the buttons are already disabled at both ends, so this
59
+ // is unreachable through the UI — but an out-of-range splice would silently
60
+ // corrupt the list rather than no-op.
61
+ /* v8 ignore next */ if (target < 0 || target >= drafts.length) return;
62
+ const next = [
63
+ ...drafts
64
+ ];
65
+ const [moved] = next.splice(index, 1);
66
+ next.splice(target, 0, moved);
67
+ update(next);
68
+ };
69
+ if (descriptors.length === 0) {
70
+ return /*#__PURE__*/ _jsx(Text, {
71
+ step: -1,
72
+ tone: "muted",
73
+ children: t('sort.none')
74
+ });
75
+ }
76
+ return /*#__PURE__*/ _jsxs("div", {
77
+ className: "flex flex-col gap-2xs",
78
+ children: [
79
+ drafts.map((draft, index)=>/*#__PURE__*/ _jsxs("div", {
80
+ className: "flex flex-wrap items-center gap-2xs",
81
+ children: [
82
+ /*#__PURE__*/ _jsx(Text, {
83
+ step: -2,
84
+ tone: "muted",
85
+ children: index === 0 ? t('sort.by') : t('sort.then')
86
+ }),
87
+ /*#__PURE__*/ _jsx(Select, {
88
+ "aria-label": t('sort.member'),
89
+ value: draft.property,
90
+ onChange: (event)=>update(drafts.map((entry, position)=>position === index ? _extends({}, entry, {
91
+ property: event.target.value
92
+ }) : entry)),
93
+ children: descriptors.map((descriptor)=>/*#__PURE__*/ _jsx("option", {
94
+ value: descriptor.name,
95
+ children: descriptor.label
96
+ }, descriptor.name))
97
+ }),
98
+ /*#__PURE__*/ _jsxs(Select, {
99
+ "aria-label": t('sort.direction'),
100
+ value: draft.type,
101
+ onChange: (event)=>update(drafts.map((entry, position)=>position === index ? _extends({}, entry, {
102
+ type: event.target.value
103
+ }) : entry)),
104
+ children: [
105
+ /*#__PURE__*/ _jsx("option", {
106
+ value: "asc",
107
+ children: t('sort.ascending')
108
+ }),
109
+ /*#__PURE__*/ _jsx("option", {
110
+ value: "desc",
111
+ children: t('sort.descending')
112
+ })
113
+ ]
114
+ }),
115
+ /*#__PURE__*/ _jsx(Button, {
116
+ type: "button",
117
+ variant: "ghost",
118
+ size: "sm",
119
+ "aria-label": t('sort.raisePriority'),
120
+ disabled: index === 0,
121
+ onClick: ()=>shift(index, -1),
122
+ children: "↑"
123
+ }),
124
+ /*#__PURE__*/ _jsx(Button, {
125
+ type: "button",
126
+ variant: "ghost",
127
+ size: "sm",
128
+ "aria-label": t('sort.lowerPriority'),
129
+ disabled: index === drafts.length - 1,
130
+ onClick: ()=>shift(index, 1),
131
+ children: "↓"
132
+ }),
133
+ /*#__PURE__*/ _jsx(Button, {
134
+ type: "button",
135
+ variant: "ghost",
136
+ size: "sm",
137
+ "aria-label": t('sort.remove'),
138
+ onClick: ()=>update(drafts.filter((_, position)=>position !== index)),
139
+ children: "✕"
140
+ })
141
+ ]
142
+ }, `${draft.property}-${index}`)),
143
+ /*#__PURE__*/ _jsxs("div", {
144
+ className: "flex flex-wrap items-center gap-2xs",
145
+ children: [
146
+ /*#__PURE__*/ _jsx(Button, {
147
+ type: "button",
148
+ variant: "secondary",
149
+ size: "sm",
150
+ onClick: ()=>update([
151
+ ...drafts,
152
+ {
153
+ property: descriptors[0].name,
154
+ type: 'asc'
155
+ }
156
+ ]),
157
+ children: t('sort.add')
158
+ }),
159
+ /*#__PURE__*/ _jsx(Button, {
160
+ type: "button",
161
+ variant: "primary",
162
+ size: "sm",
163
+ "aria-label": t('sort.applyAria'),
164
+ onClick: ()=>apply(drafts),
165
+ children: t('sort.apply')
166
+ }),
167
+ /*#__PURE__*/ _jsx(Button, {
168
+ type: "button",
169
+ variant: "ghost",
170
+ size: "sm",
171
+ "aria-label": t('sort.clearAria'),
172
+ onClick: ()=>{
173
+ setDrafts([]);
174
+ // Applying the emptied form is what restores the default order.
175
+ apply([]);
176
+ },
177
+ children: t('sort.clear')
178
+ })
179
+ ]
180
+ })
181
+ ]
182
+ });
183
+ }
184
+
185
+ //# sourceMappingURL=sort-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/sort-builder/sort-builder.tsx"],"sourcesContent":["'use client';\n\nimport type {\n Entity,\n EntityFieldDescriptor,\n EntitySorting,\n EntitySortType,\n} from '@entifix/core';\nimport { useCallback, useState } from 'react';\n\nimport { useT } from '../../../i18n/index.js';\nimport { Button } from '../../atoms/button/index.js';\nimport { Select } from '../../atoms/field/index.js';\nimport { Text } from '../../atoms/text/index.js';\n\ninterface SortDraft {\n property: string;\n type: EntitySortType;\n}\n\n/**\n * Rebuilds the rows from an already-applied sorting, so reopening the panel\n * shows what is actually in effect. The numeric keys are the precedence, so\n * they are walked in order.\n */\nfunction toDrafts<TEntity extends Entity>(\n sorting: EntitySorting<TEntity> | undefined,\n descriptors: readonly EntityFieldDescriptor[],\n): SortDraft[] {\n if (!sorting) return [];\n\n return Object.keys(sorting)\n .map(Number)\n .sort((left, right) => left - right)\n .flatMap(priority => {\n const entry = sorting[priority];\n if (!entry) return [];\n // Rows address members by accessor name; an applied value carries the\n // wire key, which is the same string unless the member declared an alias.\n const descriptor = descriptors.find(\n candidate =>\n candidate.key === String(entry.property) ||\n candidate.name === String(entry.property),\n );\n return descriptor\n ? [{ property: descriptor.name, type: entry.type }]\n : [];\n });\n}\n\nexport interface SortBuilderProps<TEntity extends Entity> {\n /** Sortable members, already resolved from the entity metadata. */\n descriptors: readonly EntityFieldDescriptor[];\n /** The sorting currently applied, used to seed the rows. */\n value?: EntitySorting<TEntity>;\n onChange: (sorting: EntitySorting<TEntity>) => void;\n}\n\n/**\n * Builds an `EntitySorting` value — a precedence-ordered map, so the list order\n * here *is* the sort priority. Reordering uses explicit buttons for the same\n * reasons as the column settings.\n *\n * As in the filter builder, editing is a draft and `onChange` fires only on\n * **Apply**: each emission is a round trip to the server.\n */\nexport function SortBuilder<TEntity extends Entity>({\n descriptors,\n value: applied,\n onChange,\n}: SortBuilderProps<TEntity>) {\n const [drafts, setDrafts] = useState<SortDraft[]>(() =>\n toDrafts(applied, descriptors),\n );\n\n const apply = useCallback(\n (next: SortDraft[]) => {\n const sorting = next.reduce<EntitySorting<TEntity>>(\n (accumulator, draft, index) => {\n const descriptor = descriptors.find(\n entry => entry.name === draft.property,\n );\n if (descriptor) {\n accumulator[index] = {\n property: descriptor.key as keyof TEntity,\n type: draft.type,\n };\n }\n return accumulator;\n },\n {} as EntitySorting<TEntity>,\n );\n onChange(sorting);\n },\n [descriptors, onChange],\n );\n\n const t = useT();\n\n /** Edits the draft only — nothing reaches the caller until Apply. */\n const update = (next: SortDraft[]) => setDrafts(next);\n\n const shift = (index: number, delta: number) => {\n const target = index + delta;\n // Defence in depth: the buttons are already disabled at both ends, so this\n // is unreachable through the UI — but an out-of-range splice would silently\n // corrupt the list rather than no-op.\n /* v8 ignore next */\n if (target < 0 || target >= drafts.length) return;\n const next = [...drafts];\n const [moved] = next.splice(index, 1);\n next.splice(target, 0, moved);\n update(next);\n };\n\n if (descriptors.length === 0) {\n return (\n <Text step={-1} tone=\"muted\">\n {t('sort.none')}\n </Text>\n );\n }\n\n return (\n <div className=\"flex flex-col gap-2xs\">\n {drafts.map((draft, index) => (\n <div\n key={`${draft.property}-${index}`}\n className=\"flex flex-wrap items-center gap-2xs\"\n >\n <Text step={-2} tone=\"muted\">\n {index === 0 ? t('sort.by') : t('sort.then')}\n </Text>\n <Select\n aria-label={t('sort.member')}\n value={draft.property}\n onChange={event =>\n update(\n drafts.map((entry, position) =>\n position === index\n ? { ...entry, property: event.target.value }\n : entry,\n ),\n )\n }\n >\n {descriptors.map(descriptor => (\n <option key={descriptor.name} value={descriptor.name}>\n {descriptor.label}\n </option>\n ))}\n </Select>\n <Select\n aria-label={t('sort.direction')}\n value={draft.type}\n onChange={event =>\n update(\n drafts.map((entry, position) =>\n position === index\n ? { ...entry, type: event.target.value as EntitySortType }\n : entry,\n ),\n )\n }\n >\n <option value=\"asc\">{t('sort.ascending')}</option>\n <option value=\"desc\">{t('sort.descending')}</option>\n </Select>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={t('sort.raisePriority')}\n disabled={index === 0}\n onClick={() => shift(index, -1)}\n >\n ↑\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={t('sort.lowerPriority')}\n disabled={index === drafts.length - 1}\n onClick={() => shift(index, 1)}\n >\n ↓\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={t('sort.remove')}\n onClick={() =>\n update(drafts.filter((_, position) => position !== index))\n }\n >\n ✕\n </Button>\n </div>\n ))}\n\n <div className=\"flex flex-wrap items-center gap-2xs\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={() =>\n update([...drafts, { property: descriptors[0].name, type: 'asc' }])\n }\n >\n {t('sort.add')}\n </Button>\n <Button\n type=\"button\"\n variant=\"primary\"\n size=\"sm\"\n aria-label={t('sort.applyAria')}\n onClick={() => apply(drafts)}\n >\n {t('sort.apply')}\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={t('sort.clearAria')}\n onClick={() => {\n setDrafts([]);\n // Applying the emptied form is what restores the default order.\n apply([]);\n }}\n >\n {t('sort.clear')}\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["useCallback","useState","useT","Button","Select","Text","toDrafts","sorting","descriptors","Object","keys","map","Number","sort","left","right","flatMap","priority","entry","descriptor","find","candidate","key","String","property","name","type","SortBuilder","value","applied","onChange","drafts","setDrafts","apply","next","reduce","accumulator","draft","index","t","update","shift","delta","target","length","moved","splice","step","tone","div","className","aria-label","event","position","option","label","variant","size","disabled","onClick","filter","_"],"mappings":"AAAA;;;AAQA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,QAAQ;AAE9C,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SAASC,IAAI,QAAQ,4BAA4B;AAOjD;;;;CAIC,GACD,SAASC,SACPC,OAA2C,EAC3CC,WAA6C;IAE7C,IAAI,CAACD,SAAS,OAAO,EAAE;IAEvB,OAAOE,OAAOC,IAAI,CAACH,SAChBI,GAAG,CAACC,QACJC,IAAI,CAAC,CAACC,MAAMC,QAAUD,OAAOC,OAC7BC,OAAO,CAACC,CAAAA;QACP,MAAMC,QAAQX,OAAO,CAACU,SAAS;QAC/B,IAAI,CAACC,OAAO,OAAO,EAAE;QACrB,sEAAsE;QACtE,0EAA0E;QAC1E,MAAMC,aAAaX,YAAYY,IAAI,CACjCC,CAAAA,YACEA,UAAUC,GAAG,KAAKC,OAAOL,MAAMM,QAAQ,KACvCH,UAAUI,IAAI,KAAKF,OAAOL,MAAMM,QAAQ;QAE5C,OAAOL,aACH;YAAC;gBAAEK,UAAUL,WAAWM,IAAI;gBAAEC,MAAMR,MAAMQ,IAAI;YAAC;SAAE,GACjD,EAAE;IACR;AACJ;AAUA;;;;;;;CAOC,GACD,OAAO,SAASC,YAAoC,EAClDnB,WAAW,EACXoB,OAAOC,OAAO,EACdC,QAAQ,EACkB;IAC1B,MAAM,CAACC,QAAQC,UAAU,GAAG/B,SAAsB,IAChDK,SAASuB,SAASrB;IAGpB,MAAMyB,QAAQjC,YACZ,CAACkC;QACC,MAAM3B,UAAU2B,KAAKC,MAAM,CACzB,CAACC,aAAaC,OAAOC;YACnB,MAAMnB,aAAaX,YAAYY,IAAI,CACjCF,CAAAA,QAASA,MAAMO,IAAI,KAAKY,MAAMb,QAAQ;YAExC,IAAIL,YAAY;gBACdiB,WAAW,CAACE,MAAM,GAAG;oBACnBd,UAAUL,WAAWG,GAAG;oBACxBI,MAAMW,MAAMX,IAAI;gBAClB;YACF;YACA,OAAOU;QACT,GACA,CAAC;QAEHN,SAASvB;IACX,GACA;QAACC;QAAasB;KAAS;IAGzB,MAAMS,IAAIrC;IAEV,mEAAmE,GACnE,MAAMsC,SAAS,CAACN,OAAsBF,UAAUE;IAEhD,MAAMO,QAAQ,CAACH,OAAeI;QAC5B,MAAMC,SAASL,QAAQI;QACvB,2EAA2E;QAC3E,4EAA4E;QAC5E,sCAAsC;QACtC,kBAAkB,GAClB,IAAIC,SAAS,KAAKA,UAAUZ,OAAOa,MAAM,EAAE;QAC3C,MAAMV,OAAO;eAAIH;SAAO;QACxB,MAAM,CAACc,MAAM,GAAGX,KAAKY,MAAM,CAACR,OAAO;QACnCJ,KAAKY,MAAM,CAACH,QAAQ,GAAGE;QACvBL,OAAON;IACT;IAEA,IAAI1B,YAAYoC,MAAM,KAAK,GAAG;QAC5B,qBACE,KAACvC;YAAK0C,MAAM,CAAC;YAAGC,MAAK;sBAClBT,EAAE;;IAGT;IAEA,qBACE,MAACU;QAAIC,WAAU;;YACZnB,OAAOpB,GAAG,CAAC,CAAC0B,OAAOC,sBAClB,MAACW;oBAECC,WAAU;;sCAEV,KAAC7C;4BAAK0C,MAAM,CAAC;4BAAGC,MAAK;sCAClBV,UAAU,IAAIC,EAAE,aAAaA,EAAE;;sCAElC,KAACnC;4BACC+C,cAAYZ,EAAE;4BACdX,OAAOS,MAAMb,QAAQ;4BACrBM,UAAUsB,CAAAA,QACRZ,OACET,OAAOpB,GAAG,CAAC,CAACO,OAAOmC,WACjBA,aAAaf,QACT,aAAKpB;wCAAOM,UAAU4B,MAAMT,MAAM,CAACf,KAAK;yCACxCV;sCAKTV,YAAYG,GAAG,CAACQ,CAAAA,2BACf,KAACmC;oCAA6B1B,OAAOT,WAAWM,IAAI;8CACjDN,WAAWoC,KAAK;mCADNpC,WAAWM,IAAI;;sCAKhC,MAACrB;4BACC+C,cAAYZ,EAAE;4BACdX,OAAOS,MAAMX,IAAI;4BACjBI,UAAUsB,CAAAA,QACRZ,OACET,OAAOpB,GAAG,CAAC,CAACO,OAAOmC,WACjBA,aAAaf,QACT,aAAKpB;wCAAOQ,MAAM0B,MAAMT,MAAM,CAACf,KAAK;yCACpCV;;8CAKV,KAACoC;oCAAO1B,OAAM;8CAAOW,EAAE;;8CACvB,KAACe;oCAAO1B,OAAM;8CAAQW,EAAE;;;;sCAE1B,KAACpC;4BACCuB,MAAK;4BACL8B,SAAQ;4BACRC,MAAK;4BACLN,cAAYZ,EAAE;4BACdmB,UAAUpB,UAAU;4BACpBqB,SAAS,IAAMlB,MAAMH,OAAO,CAAC;sCAC9B;;sCAGD,KAACnC;4BACCuB,MAAK;4BACL8B,SAAQ;4BACRC,MAAK;4BACLN,cAAYZ,EAAE;4BACdmB,UAAUpB,UAAUP,OAAOa,MAAM,GAAG;4BACpCe,SAAS,IAAMlB,MAAMH,OAAO;sCAC7B;;sCAGD,KAACnC;4BACCuB,MAAK;4BACL8B,SAAQ;4BACRC,MAAK;4BACLN,cAAYZ,EAAE;4BACdoB,SAAS,IACPnB,OAAOT,OAAO6B,MAAM,CAAC,CAACC,GAAGR,WAAaA,aAAaf;sCAEtD;;;mBArEI,GAAGD,MAAMb,QAAQ,CAAC,CAAC,EAAEc,OAAO;0BA2ErC,MAACW;gBAAIC,WAAU;;kCACb,KAAC/C;wBACCuB,MAAK;wBACL8B,SAAQ;wBACRC,MAAK;wBACLE,SAAS,IACPnB,OAAO;mCAAIT;gCAAQ;oCAAEP,UAAUhB,WAAW,CAAC,EAAE,CAACiB,IAAI;oCAAEC,MAAM;gCAAM;6BAAE;kCAGnEa,EAAE;;kCAEL,KAACpC;wBACCuB,MAAK;wBACL8B,SAAQ;wBACRC,MAAK;wBACLN,cAAYZ,EAAE;wBACdoB,SAAS,IAAM1B,MAAMF;kCAEpBQ,EAAE;;kCAEL,KAACpC;wBACCuB,MAAK;wBACL8B,SAAQ;wBACRC,MAAK;wBACLN,cAAYZ,EAAE;wBACdoB,SAAS;4BACP3B,UAAU,EAAE;4BACZ,gEAAgE;4BAChEC,MAAM,EAAE;wBACV;kCAECM,EAAE;;;;;;AAKb"}
@@ -0,0 +1,2 @@
1
+ export * from './stack.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/stack/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './stack.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/stack/index.ts"],"sourcesContent":["export * from './stack.js';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa"}
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export type SpacingToken = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl';
3
+ export interface StackProps extends ComponentPropsWithoutRef<'div'> {
4
+ direction?: 'row' | 'column';
5
+ /** Gap between children, from the fluid Utopia spacing scale. */
6
+ gap?: SpacingToken;
7
+ align?: 'start' | 'center' | 'end' | 'stretch';
8
+ wrap?: boolean;
9
+ }
10
+ /** Flex container that spaces children with a fluid spacing token. */
11
+ export declare function Stack({ direction, gap, align, wrap, className, ...props }: StackProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/stack/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,YAAY,GACtB,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAehE,MAAM,WAAW,UAAW,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACjE,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,iEAAiE;IACjE,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AASD,sEAAsE;AACtE,wBAAgB,KAAK,CAAC,EACpB,SAAoB,EACpB,GAAS,EACT,KAAiB,EACjB,IAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,+BAcZ"}
@@ -0,0 +1,36 @@
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
+ // Static class strings so Tailwind's scanner keeps them.
6
+ const GAP = {
7
+ '3xs': 'gap-3xs',
8
+ '2xs': 'gap-2xs',
9
+ xs: 'gap-xs',
10
+ s: 'gap-s',
11
+ m: 'gap-m',
12
+ l: 'gap-l',
13
+ xl: 'gap-xl',
14
+ '2xl': 'gap-2xl',
15
+ '3xl': 'gap-3xl'
16
+ };
17
+ const ALIGN = {
18
+ start: 'items-start',
19
+ center: 'items-center',
20
+ end: 'items-end',
21
+ stretch: 'items-stretch'
22
+ };
23
+ /** Flex container that spaces children with a fluid spacing token. */ export function Stack(_0) {
24
+ let { direction = 'column', gap = 'm', align = 'stretch', wrap = false, className } = _0, props = _object_without_properties_loose(_0, [
25
+ "direction",
26
+ "gap",
27
+ "align",
28
+ "wrap",
29
+ "className"
30
+ ]);
31
+ return /*#__PURE__*/ _jsx("div", _extends({
32
+ className: cn('flex', direction === 'row' ? 'flex-row' : 'flex-col', GAP[gap], ALIGN[align], wrap && 'flex-wrap', className)
33
+ }, props));
34
+ }
35
+
36
+ //# sourceMappingURL=stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/stack/stack.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\nexport type SpacingToken =\n '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl';\n\n// Static class strings so Tailwind's scanner keeps them.\nconst GAP: Record<SpacingToken, string> = {\n '3xs': 'gap-3xs',\n '2xs': 'gap-2xs',\n xs: 'gap-xs',\n s: 'gap-s',\n m: 'gap-m',\n l: 'gap-l',\n xl: 'gap-xl',\n '2xl': 'gap-2xl',\n '3xl': 'gap-3xl',\n};\n\nexport interface StackProps extends ComponentPropsWithoutRef<'div'> {\n direction?: 'row' | 'column';\n /** Gap between children, from the fluid Utopia spacing scale. */\n gap?: SpacingToken;\n align?: 'start' | 'center' | 'end' | 'stretch';\n wrap?: boolean;\n}\n\nconst ALIGN = {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n} as const;\n\n/** Flex container that spaces children with a fluid spacing token. */\nexport function Stack({\n direction = 'column',\n gap = 'm',\n align = 'stretch',\n wrap = false,\n className,\n ...props\n}: StackProps) {\n return (\n <div\n className={cn(\n 'flex',\n direction === 'row' ? 'flex-row' : 'flex-col',\n GAP[gap],\n ALIGN[align],\n wrap && 'flex-wrap',\n className,\n )}\n {...props}\n />\n );\n}\n"],"names":["cn","GAP","xs","s","m","l","xl","ALIGN","start","center","end","stretch","Stack","direction","gap","align","wrap","className","props","div"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AAKvC,yDAAyD;AACzD,MAAMC,MAAoC;IACxC,OAAO;IACP,OAAO;IACPC,IAAI;IACJC,GAAG;IACHC,GAAG;IACHC,GAAG;IACHC,IAAI;IACJ,OAAO;IACP,OAAO;AACT;AAUA,MAAMC,QAAQ;IACZC,OAAO;IACPC,QAAQ;IACRC,KAAK;IACLC,SAAS;AACX;AAEA,oEAAoE,GACpE,OAAO,SAASC,MAAM,EAOT;QAPS,EACpBC,YAAY,QAAQ,EACpBC,MAAM,GAAG,EACTC,QAAQ,SAAS,EACjBC,OAAO,KAAK,EACZC,SAAS,EAEE,OADRC;;;;;;;IAEH,qBACE,KAACC;QACCF,WAAWjB,GACT,QACAa,cAAc,QAAQ,aAAa,YACnCZ,GAAG,CAACa,IAAI,EACRP,KAAK,CAACQ,MAAM,EACZC,QAAQ,aACRC;OAEEC;AAGV"}
@@ -0,0 +1,2 @@
1
+ export * from './tab-strip.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/tab-strip/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './tab-strip.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/tab-strip/index.ts"],"sourcesContent":["export * from './tab-strip.js';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB"}
@@ -0,0 +1,29 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export type TabStripProps = ComponentPropsWithoutRef<'div'>;
3
+ /**
4
+ * The workspace tab strip: a horizontally scrolling row of {@link Tab}s sitting
5
+ * on the workspace surface. Presentational only — the open set, order, and
6
+ * active tab come from the caller (the tabs store lives in the shell).
7
+ */
8
+ export declare function TabStrip({ className, children, ...props }: TabStripProps): import("react").JSX.Element;
9
+ /** `dirty` = unsaved draft; `saving` = autosave in flight; `error` = save failed. */
10
+ export type TabState = 'idle' | 'dirty' | 'saving' | 'error';
11
+ export interface TabProps {
12
+ label: string;
13
+ active?: boolean;
14
+ state?: TabState;
15
+ onSelect?: () => void;
16
+ onClose?: () => void;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * One tab. The active tab lifts onto the surface (`bg-surface-elevated` +
21
+ * `-mb-px` so its base dissolves into the content plane below — the seam), and
22
+ * a non-idle tab shows the autosave dot: it breathes while `saving`, turns
23
+ * `danger` on `error`. The one place the chrome gets loud, on purpose.
24
+ */
25
+ export declare function Tab({ label, active, state, onSelect, onClose, className, }: TabProps): import("react").JSX.Element;
26
+ export type TabAddButtonProps = ComponentPropsWithoutRef<'button'>;
27
+ /** The "+" that opens a new tab. */
28
+ export declare function TabAddButton({ className, ...props }: TabAddButtonProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=tab-strip.d.ts.map