@dcs-tech/ui 0.2.0 → 0.3.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 (283) hide show
  1. package/README.md +31 -0
  2. package/dist/ChartImageMenu-gvNAYVkY.js +2938 -0
  3. package/dist/Charts-COljjy0x.js +1759 -0
  4. package/dist/SummaryChart-D4jcOv-K.js +31 -0
  5. package/dist/SummaryImage-BSbatHym.js +19 -0
  6. package/dist/SummarySeeAll-vnaL3pdy.js +97 -0
  7. package/dist/defaults-BbLB8QmD.js +709 -0
  8. package/dist/exportContext-CAX8VPrP.js +243 -0
  9. package/dist/exportEngine-C4n1MiOw.js +891 -0
  10. package/dist/fuseSearch-vLQR3O5a.js +37 -0
  11. package/dist/index.js +19289 -9411
  12. package/dist/style.css +1 -1
  13. package/dist/summaryChartData-CU_W5ocv.js +82 -0
  14. package/dist/types/published/dcs-ui/src/index.d.ts +0 -28
  15. package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -33
  16. package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -12
  17. package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -21
  18. package/dist/types/shared-logic/src/report/canvas.d.ts +0 -55
  19. package/dist/types/shared-logic/src/report/conditions.d.ts +0 -14
  20. package/dist/types/shared-logic/src/report/constants.d.ts +0 -39
  21. package/dist/types/shared-logic/src/report/dataset.d.ts +0 -26
  22. package/dist/types/shared-logic/src/report/edit.d.ts +0 -62
  23. package/dist/types/shared-logic/src/report/fields.d.ts +0 -51
  24. package/dist/types/shared-logic/src/report/format.d.ts +0 -22
  25. package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -30
  26. package/dist/types/shared-logic/src/report/layout.d.ts +1 -55
  27. package/dist/types/shared-logic/src/report/metrics.d.ts +0 -45
  28. package/dist/types/shared-logic/src/report/migrate.d.ts +0 -60
  29. package/dist/types/shared-logic/src/report/paginate.d.ts +0 -32
  30. package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -21
  31. package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -27
  32. package/dist/types/shared-logic/src/report/resolve.d.ts +0 -29
  33. package/dist/types/shared-logic/src/report/scope.d.ts +0 -28
  34. package/dist/types/shared-logic/src/report/storage.d.ts +0 -76
  35. package/dist/types/shared-logic/src/report/validate.d.ts +0 -18
  36. package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -35
  37. package/dist/types/shared-logic/src/ui/chipinput.logic.d.ts +0 -12
  38. package/dist/types/shared-logic/src/ui/collapsible.logic.d.ts +0 -7
  39. package/dist/types/shared-logic/src/ui/colorScheme.d.ts +0 -14
  40. package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -11
  41. package/dist/types/shared-logic/src/ui/datePicker.logic.d.ts +136 -0
  42. package/dist/types/shared-logic/src/ui/editableTable.logic.d.ts +0 -27
  43. package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +2 -14
  44. package/dist/types/shared-logic/src/ui/form.logic.d.ts +0 -8
  45. package/dist/types/shared-logic/src/ui/index.d.ts +3 -29
  46. package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -60
  47. package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -24
  48. package/dist/types/shared-logic/src/ui/popover.logic.d.ts +22 -20
  49. package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -35
  50. package/dist/types/shared-logic/src/ui/quickAddGrid.logic.d.ts +183 -0
  51. package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -14
  52. package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -34
  53. package/dist/types/shared-logic/src/ui/tableSummary.logic.d.ts +0 -19
  54. package/dist/types/shared-logic/src/ui/timeField.logic.d.ts +26 -0
  55. package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -24
  56. package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -8
  57. package/dist/types/shared-types/src/report/bands.d.ts +0 -20
  58. package/dist/types/shared-types/src/report/blocks.d.ts +0 -59
  59. package/dist/types/shared-types/src/report/conditions.d.ts +0 -13
  60. package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
  61. package/dist/types/shared-types/src/report/document.d.ts +0 -80
  62. package/dist/types/shared-types/src/report/primitives.d.ts +0 -40
  63. package/dist/types/shared-types/src/report/registry.d.ts +0 -46
  64. package/dist/types/shared-types/src/report/storage.d.ts +0 -31
  65. package/dist/types/shared-types/src/report/template.d.ts +0 -60
  66. package/dist/types/shared-types/src/ui/button.types.d.ts +0 -11
  67. package/dist/types/shared-types/src/ui/checkbox.types.d.ts +0 -4
  68. package/dist/types/shared-types/src/ui/chipinput.types.d.ts +0 -10
  69. package/dist/types/shared-types/src/ui/collapsible.types.d.ts +0 -18
  70. package/dist/types/shared-types/src/ui/common.types.d.ts +0 -11
  71. package/dist/types/shared-types/src/ui/control.types.d.ts +0 -97
  72. package/dist/types/shared-types/src/ui/datePicker.types.d.ts +46 -0
  73. package/dist/types/shared-types/src/ui/editableTable.types.d.ts +0 -79
  74. package/dist/types/shared-types/src/ui/field.types.d.ts +4 -124
  75. package/dist/types/shared-types/src/ui/fieldWrapper.types.d.ts +0 -10
  76. package/dist/types/shared-types/src/ui/fields.types.d.ts +0 -45
  77. package/dist/types/shared-types/src/ui/form.types.d.ts +0 -30
  78. package/dist/types/shared-types/src/ui/index.d.ts +1 -16
  79. package/dist/types/shared-types/src/ui/input.types.d.ts +0 -4
  80. package/dist/types/shared-types/src/ui/keyboard.types.d.ts +2 -109
  81. package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -22
  82. package/dist/types/shared-types/src/ui/radio.types.d.ts +0 -6
  83. package/dist/types/shared-types/src/ui/select.types.d.ts +0 -41
  84. package/dist/types/shared-types/src/ui/suggest.types.d.ts +0 -10
  85. package/dist/types/shared-types/src/ui/switch.types.d.ts +0 -4
  86. package/dist/types/shared-types/src/ui/table.types.d.ts +0 -59
  87. package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -25
  88. package/dist/types/shared-types/src/ui/typography.types.d.ts +0 -4
  89. package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -9
  90. package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -19
  91. package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -14
  92. package/dist/types/shared-web-ui/src/Badge/Badge.d.ts +0 -11
  93. package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -52
  94. package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -16
  95. package/dist/types/shared-web-ui/src/Charts/AnchoredMenu.d.ts +17 -0
  96. package/dist/types/shared-web-ui/src/Charts/BarList.d.ts +12 -0
  97. package/dist/types/shared-web-ui/src/Charts/CalendarHeatmap.d.ts +17 -0
  98. package/dist/types/shared-web-ui/src/Charts/Chart.d.ts +20 -0
  99. package/dist/types/shared-web-ui/src/Charts/ChartIcon.d.ts +5 -0
  100. package/dist/types/shared-web-ui/src/Charts/ChartImageMenu.d.ts +4 -0
  101. package/dist/types/shared-web-ui/src/Charts/ChartTable.d.ts +8 -0
  102. package/dist/types/shared-web-ui/src/Charts/ChartTooltip.d.ts +44 -0
  103. package/dist/types/shared-web-ui/src/Charts/ChartView.d.ts +15 -0
  104. package/dist/types/shared-web-ui/src/Charts/ColumnChart.d.ts +15 -0
  105. package/dist/types/shared-web-ui/src/Charts/Donut.d.ts +14 -0
  106. package/dist/types/shared-web-ui/src/Charts/Funnel.d.ts +10 -0
  107. package/dist/types/shared-web-ui/src/Charts/Gauge.d.ts +15 -0
  108. package/dist/types/shared-web-ui/src/Charts/Legend.d.ts +6 -0
  109. package/dist/types/shared-web-ui/src/Charts/LineChart.d.ts +13 -0
  110. package/dist/types/shared-web-ui/src/Charts/NumberTrend.d.ts +21 -0
  111. package/dist/types/shared-web-ui/src/Charts/Progress.d.ts +12 -0
  112. package/dist/types/shared-web-ui/src/Charts/StackedBar.d.ts +11 -0
  113. package/dist/types/shared-web-ui/src/Charts/Treemap.d.ts +12 -0
  114. package/dist/types/shared-web-ui/src/Charts/chartData.d.ts +69 -0
  115. package/dist/types/shared-web-ui/src/Charts/chartImage.d.ts +121 -0
  116. package/dist/types/shared-web-ui/src/Charts/geometry.d.ts +178 -0
  117. package/dist/types/shared-web-ui/src/Charts/index.d.ts +32 -0
  118. package/dist/types/shared-web-ui/src/Charts/labels.d.ts +46 -0
  119. package/dist/types/shared-web-ui/src/Charts/menuPlacement.d.ts +25 -0
  120. package/dist/types/shared-web-ui/src/Charts/palette.d.ts +81 -0
  121. package/dist/types/shared-web-ui/src/Charts/parts.d.ts +24 -0
  122. package/dist/types/shared-web-ui/src/Charts/pointer.d.ts +41 -0
  123. package/dist/types/shared-web-ui/src/Charts/types.d.ts +51 -0
  124. package/dist/types/shared-web-ui/src/Charts/ui.d.ts +3 -0
  125. package/dist/types/shared-web-ui/src/Charts/useBoxSize.d.ts +6 -0
  126. package/dist/types/shared-web-ui/src/Charts/useLegendFit.d.ts +1 -0
  127. package/dist/types/shared-web-ui/src/Collapsible/CollapsibleItem.d.ts +0 -2
  128. package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -15
  129. package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -27
  130. package/dist/types/shared-web-ui/src/DataTable/DataTable.d.ts +16 -0
  131. package/dist/types/shared-web-ui/src/DataTable/DisplayPopover.d.ts +22 -0
  132. package/dist/types/shared-web-ui/src/DataTable/HeaderMenu.d.ts +31 -0
  133. package/dist/types/shared-web-ui/src/DataTable/ManageModal.d.ts +31 -0
  134. package/dist/types/shared-web-ui/src/DataTable/SingleRowView.d.ts +9 -0
  135. package/dist/types/shared-web-ui/src/DataTable/SortModal.d.ts +16 -0
  136. package/dist/types/shared-web-ui/src/DataTable/StatusRow.d.ts +49 -0
  137. package/dist/types/shared-web-ui/src/DataTable/TableColumnModal.d.ts +18 -0
  138. package/dist/types/shared-web-ui/src/DataTable/TableControls.d.ts +48 -0
  139. package/dist/types/shared-web-ui/src/DataTable/TablePagination.d.ts +38 -0
  140. package/dist/types/shared-web-ui/src/DataTable/TableScrollStrip.d.ts +2 -0
  141. package/dist/types/shared-web-ui/src/DataTable/TableToolbar.d.ts +69 -0
  142. package/dist/types/shared-web-ui/src/DataTable/TableView.d.ts +61 -0
  143. package/dist/types/shared-web-ui/src/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
  144. package/dist/types/shared-web-ui/src/DataTable/bulk/TableToast.d.ts +13 -0
  145. package/dist/types/shared-web-ui/src/DataTable/bulk/bulkActions.d.ts +23 -0
  146. package/dist/types/shared-web-ui/src/DataTable/cards/CardFieldsEditor.d.ts +16 -0
  147. package/dist/types/shared-web-ui/src/DataTable/cards/CardView.d.ts +50 -0
  148. package/dist/types/shared-web-ui/src/DataTable/cards/cardFields.d.ts +32 -0
  149. package/dist/types/shared-web-ui/src/DataTable/cards/rowParts.d.ts +38 -0
  150. package/dist/types/shared-web-ui/src/DataTable/data/useServerData.d.ts +28 -0
  151. package/dist/types/shared-web-ui/src/DataTable/defaults.d.ts +18 -0
  152. package/dist/types/shared-web-ui/src/DataTable/detail/BuiltInDetail.d.ts +10 -0
  153. package/dist/types/shared-web-ui/src/DataTable/detail/DetailHost.d.ts +13 -0
  154. package/dist/types/shared-web-ui/src/DataTable/export/ExportPopover.d.ts +18 -0
  155. package/dist/types/shared-web-ui/src/DataTable/export/ExportPreviewModal.d.ts +11 -0
  156. package/dist/types/shared-web-ui/src/DataTable/export/ExportSettingsModal.d.ts +31 -0
  157. package/dist/types/shared-web-ui/src/DataTable/export/ExportTemplateCards.d.ts +19 -0
  158. package/dist/types/shared-web-ui/src/DataTable/export/exportContext.d.ts +10 -0
  159. package/dist/types/shared-web-ui/src/DataTable/export/exportEngine.d.ts +77 -0
  160. package/dist/types/shared-web-ui/src/DataTable/export/exportRows.d.ts +10 -0
  161. package/dist/types/shared-web-ui/src/DataTable/export/templateDisplay.d.ts +7 -0
  162. package/dist/types/shared-web-ui/src/DataTable/export/templateOptions.d.ts +6 -0
  163. package/dist/types/shared-web-ui/src/DataTable/export/useTableExport.d.ts +53 -0
  164. package/dist/types/shared-web-ui/src/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
  165. package/dist/types/shared-web-ui/src/DataTable/filters/FilterConditionRow.d.ts +11 -0
  166. package/dist/types/shared-web-ui/src/DataTable/filters/FilterGroup.d.ts +12 -0
  167. package/dist/types/shared-web-ui/src/DataTable/filters/FilterModal.d.ts +14 -0
  168. package/dist/types/shared-web-ui/src/DataTable/filters/FilterRow.d.ts +20 -0
  169. package/dist/types/shared-web-ui/src/DataTable/filters/columnFilterModel.d.ts +29 -0
  170. package/dist/types/shared-web-ui/src/DataTable/filters/filterEngine.d.ts +16 -0
  171. package/dist/types/shared-web-ui/src/DataTable/filters/filterRowModel.d.ts +28 -0
  172. package/dist/types/shared-web-ui/src/DataTable/filters/quickFilterMatch.d.ts +3 -0
  173. package/dist/types/shared-web-ui/src/DataTable/grouping/GroupUi.d.ts +36 -0
  174. package/dist/types/shared-web-ui/src/DataTable/grouping/groupModel.d.ts +82 -0
  175. package/dist/types/shared-web-ui/src/DataTable/grouping/useGrouping.d.ts +39 -0
  176. package/dist/types/shared-web-ui/src/DataTable/host.d.ts +14 -0
  177. package/dist/types/shared-web-ui/src/DataTable/index.d.ts +18 -0
  178. package/dist/types/shared-web-ui/src/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
  179. package/dist/types/shared-web-ui/src/DataTable/keyboard/shortcuts.d.ts +22 -0
  180. package/dist/types/shared-web-ui/src/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
  181. package/dist/types/shared-web-ui/src/DataTable/labels.d.ts +618 -0
  182. package/dist/types/shared-web-ui/src/DataTable/layout/LayoutSwitcher.d.ts +9 -0
  183. package/dist/types/shared-web-ui/src/DataTable/layout/layouts.d.ts +20 -0
  184. package/dist/types/shared-web-ui/src/DataTable/layout/scrollArea.d.ts +2 -0
  185. package/dist/types/shared-web-ui/src/DataTable/layout/useFillHeight.d.ts +11 -0
  186. package/dist/types/shared-web-ui/src/DataTable/menu/RowMenu.d.ts +56 -0
  187. package/dist/types/shared-web-ui/src/DataTable/menu/buildRowMenu.d.ts +35 -0
  188. package/dist/types/shared-web-ui/src/DataTable/menu/clipboard.d.ts +4 -0
  189. package/dist/types/shared-web-ui/src/DataTable/menu/valueFilter.d.ts +15 -0
  190. package/dist/types/shared-web-ui/src/DataTable/motion/useRowMotion.d.ts +32 -0
  191. package/dist/types/shared-web-ui/src/DataTable/persistence/adapters.d.ts +6 -0
  192. package/dist/types/shared-web-ui/src/DataTable/persistence/reconcile.d.ts +64 -0
  193. package/dist/types/shared-web-ui/src/DataTable/persistence/useColumnPersistence.d.ts +51 -0
  194. package/dist/types/shared-web-ui/src/DataTable/persistence/useManagePrefs.d.ts +23 -0
  195. package/dist/types/shared-web-ui/src/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
  196. package/dist/types/shared-web-ui/src/DataTable/pinning.d.ts +10 -0
  197. package/dist/types/shared-web-ui/src/DataTable/rows/RowActions.d.ts +15 -0
  198. package/dist/types/shared-web-ui/src/DataTable/rows/rowPress.d.ts +35 -0
  199. package/dist/types/shared-web-ui/src/DataTable/sharing/Sharing.d.ts +21 -0
  200. package/dist/types/shared-web-ui/src/DataTable/split/SplitView.d.ts +29 -0
  201. package/dist/types/shared-web-ui/src/DataTable/summary/ManageSummaryCards.d.ts +18 -0
  202. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryChart.d.ts +11 -0
  203. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryControls.d.ts +33 -0
  204. package/dist/types/shared-web-ui/src/DataTable/summary/SummaryImage.d.ts +12 -0
  205. package/dist/types/shared-web-ui/src/DataTable/summary/SummarySeeAll.d.ts +17 -0
  206. package/dist/types/shared-web-ui/src/DataTable/summary/TableSummary.d.ts +34 -0
  207. package/dist/types/shared-web-ui/src/DataTable/summary/summaryCatalogue.d.ts +64 -0
  208. package/dist/types/shared-web-ui/src/DataTable/summary/summaryChartData.d.ts +9 -0
  209. package/dist/types/shared-web-ui/src/DataTable/summary/summaryModel.d.ts +152 -0
  210. package/dist/types/shared-web-ui/src/DataTable/summary/summaryWidth.d.ts +22 -0
  211. package/dist/types/shared-web-ui/src/DataTable/summary/useTableSummary.d.ts +18 -0
  212. package/dist/types/shared-web-ui/src/DataTable/types.d.ts +1145 -0
  213. package/dist/types/shared-web-ui/src/DataTable/ui-local/AutoHeight.d.ts +9 -0
  214. package/dist/types/shared-web-ui/src/DataTable/ui-local/DateRangePicker.d.ts +16 -0
  215. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
  216. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
  217. package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
  218. package/dist/types/shared-web-ui/src/DataTable/ui-local/ReactModal.d.ts +20 -0
  219. package/dist/types/shared-web-ui/src/DataTable/ui.d.ts +13 -0
  220. package/dist/types/shared-web-ui/src/DataTable/useDataChangeTracker.d.ts +11 -0
  221. package/dist/types/shared-web-ui/src/DataTable/useTable.d.ts +12 -0
  222. package/dist/types/shared-web-ui/src/DataTable/vendor/columnOrder.d.ts +1 -0
  223. package/dist/types/shared-web-ui/src/DataTable/vendor/diff.d.ts +5 -0
  224. package/dist/types/shared-web-ui/src/DataTable/vendor/fileActions.d.ts +19 -0
  225. package/dist/types/shared-web-ui/src/DataTable/vendor/index.d.ts +3 -0
  226. package/dist/types/shared-web-ui/src/DataTable/virtual/useVirtualLines.d.ts +27 -0
  227. package/dist/types/shared-web-ui/src/DatePicker/Calendar.d.ts +14 -0
  228. package/dist/types/shared-web-ui/src/DatePicker/DatePicker.d.ts +5 -0
  229. package/dist/types/shared-web-ui/src/DatePicker/TimeField.d.ts +16 -0
  230. package/dist/types/shared-web-ui/src/DatePicker/index.d.ts +4 -0
  231. package/dist/types/shared-web-ui/src/DatePicker/useOneMonthPane.d.ts +2 -0
  232. package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -45
  233. package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -36
  234. package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +24 -24
  235. package/dist/types/shared-web-ui/src/EditableTable/EditableTable.d.ts +0 -5
  236. package/dist/types/shared-web-ui/src/EditableTable/EditableTableCell.d.ts +0 -18
  237. package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -11
  238. package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -11
  239. package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -32
  240. package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -15
  241. package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -9
  242. package/dist/types/shared-web-ui/src/FieldContext/useField.d.ts +0 -27
  243. package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -23
  244. package/dist/types/shared-web-ui/src/FieldContext/useFormKeyboard.d.ts +0 -3
  245. package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -15
  246. package/dist/types/shared-web-ui/src/Floating/index.d.ts +3 -0
  247. package/dist/types/shared-web-ui/src/Floating/layers.d.ts +4 -0
  248. package/dist/types/shared-web-ui/src/Floating/scrollLock.d.ts +2 -0
  249. package/dist/types/shared-web-ui/src/Floating/useFloatingLayer.d.ts +20 -0
  250. package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +6 -25
  251. package/dist/types/shared-web-ui/src/Popover/floatingPosition.d.ts +17 -0
  252. package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -8
  253. package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -11
  254. package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -2
  255. package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -13
  256. package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
  257. package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -22
  258. package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -8
  259. package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -1
  260. package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -12
  261. package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -30
  262. package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -39
  263. package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -24
  264. package/dist/types/shared-web-ui/src/Scroll/ScrollRule.d.ts +2 -0
  265. package/dist/types/shared-web-ui/src/Scroll/ScrollStrip.d.ts +9 -0
  266. package/dist/types/shared-web-ui/src/Scroll/index.d.ts +4 -0
  267. package/dist/types/shared-web-ui/src/Scroll/labels.d.ts +5 -0
  268. package/dist/types/shared-web-ui/src/Scroll/scrollActivity.d.ts +14 -0
  269. package/dist/types/shared-web-ui/src/Scroll/ui.d.ts +1 -0
  270. package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -31
  271. package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -15
  272. package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -43
  273. package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -14
  274. package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -9
  275. package/dist/types/shared-web-ui/src/Toast/toast.types.d.ts +0 -13
  276. package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -16
  277. package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -9
  278. package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -14
  279. package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -41
  280. package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -8
  281. package/dist/types/shared-web-ui/src/index.d.ts +5 -0
  282. package/dist/ui-DJFwpPdX.js +4997 -0
  283. package/package.json +9 -7
@@ -1,131 +1,34 @@
1
1
  import type { ReactNode } from 'react';
2
- /**
3
- * The one vocabulary every control in @pdfinvoice/shared-web-ui speaks.
4
- *
5
- * Before this file each component re-spelled its own `Size`, `Layout` and
6
- * `Color` unions by hand. They agreed today by coincidence, not by
7
- * construction — `ButtonSize` and `FieldSize` listed the same six literals in
8
- * two places, and `ChipInputLayout` said `vertical` for the thing every other
9
- * control called `default`. Anything declared here is declared once; the
10
- * per-component names remain, as aliases, so call sites and the published
11
- * barrel are unaffected.
12
- *
13
- * Adding a step or a colour here widens every control at once — which is the
14
- * point, and also the hazard: a literal with no CSS behind it ships a variant
15
- * that renders as nothing. Widen the stylesheet in the same stroke.
16
- */
17
- /**
18
- * The size scale. Every control resolves to this, so `size="small"` means the
19
- * same height, padding and font on an Input, a Checkbox and a Button standing
20
- * next to each other.
21
- *
22
- * Each step maps to `--field-height-*`, `--field-padding-x/y-*`,
23
- * `--control-size-*` and `--font-size-*` in @pdfinvoice/shared-styles.
24
- */
25
2
  export type ControlSize = 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl';
26
- /**
27
- * The default every control falls back to when neither a `size` prop nor an
28
- * enclosing FieldContext supplies one.
29
- *
30
- * It is `small` because this is a dense ERP: the invoice grid is the busiest
31
- * screen in the product and sets the house density. Previously the fields
32
- * defaulted to `small` and the toggles to `medium`, so a Checkbox beside an
33
- * Input was a step larger with no props passed on either.
34
- */
35
3
  export declare const DEFAULT_CONTROL_SIZE: ControlSize;
36
- /**
37
- * Surface treatment for controls that render a text-entry surface — Input,
38
- * Select, Suggest, ChipInput. They share one border/background/radius/focus
39
- * definition, so an outlined Select is the same surface as the outlined Input
40
- * beside it.
41
- *
42
- * `underlined` only makes sense here: it draws a rule beneath the text line.
43
- */
44
4
  export type ControlVariant = 'outlined' | 'filled' | 'standard' | 'underlined' | 'cell';
45
- /**
46
- * Surface treatment for the box-shaped toggles — Checkbox and Radio.
47
- *
48
- * Deliberately NOT ControlVariant: a checkbox has no text line to underline, so
49
- * `underlined` would be a valid type with no styling behind it and the control
50
- * would render with no border or fill. Switch has no variant at all — it has a
51
- * single track/thumb look by design.
52
- */
53
5
  export type ToggleVariant = 'outlined' | 'filled' | 'standard' | 'cell';
54
- /** How a control arranges its label against its control box. */
55
6
  export type ControlLayout = 'default' | 'horizontal' | 'inline' | 'cell';
56
- /** Where a toggle's own label sits relative to its box. */
57
7
  export type ControlLabelPosition = 'start' | 'end' | 'top' | 'bottom';
58
- /**
59
- * The palette's semantic axis. Each member has its own hue variable in
60
- * `tokens.css` and its own `--on-*` contrast text.
61
- *
62
- * Components take a subset via `Extract`/`Exclude` rather than re-listing:
63
- * `neutral` is a button/surface idea, not a state a field can be in.
64
- */
65
8
  export type SemanticColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral';
66
- /** What a form control can be tinted: every semantic except the neutral surface. */
67
9
  export type FieldColor = Exclude<SemanticColor, 'neutral'>;
68
- /**
69
- * The minimum a change event carries.
70
- *
71
- * A native `ChangeEvent<HTMLInputElement>` satisfies this structurally, which
72
- * is the whole trick: Input, Checkbox, Radio, Switch and Suggest keep emitting
73
- * real DOM events (so `currentTarget` and `preventDefault` survive), while
74
- * Select and ChipInput — which have no DOM event to forward — emit this shape.
75
- * A single handler typed `(e: FieldChangeEvent) => void` therefore accepts a
76
- * change from any field, which is what Fields, EditableTable and the keyboard
77
- * grid need in order to write one handler per row instead of one per widget.
78
- *
79
- * Keep this narrow. Every property added here is one more thing the synthetic
80
- * emitters have to fabricate.
81
- */
82
10
  export interface FieldChangeTarget<V = any> {
83
11
  name?: string;
84
12
  value: V;
85
- /** Mirrors the DOM `type` so `createChangeHandler` can branch on it. */
86
13
  type?: string;
87
- /** Only meaningful for checkbox/radio inputs. */
88
14
  checked?: boolean;
89
15
  }
90
16
  export interface FieldChangeEvent<V = any> {
91
17
  target: FieldChangeTarget<V>;
92
18
  }
93
- /**
94
- * What a container (Form, Fields, an editable-table row) hands down to the
95
- * fields inside it. Every member optional and unset by default — a field has to
96
- * be able to tell "nobody said" from "someone said small".
97
- */
98
19
  export interface FieldContextValue {
99
20
  size?: ControlSize;
100
21
  variant?: ControlVariant;
101
22
  layout?: ControlLayout;
102
23
  disabled?: boolean;
103
24
  readOnly?: boolean;
104
- /**
105
- * The keyboard policy for everything beneath. This is how a grid says
106
- * "every cell in here is in grid mode" and a form says "Enter moves to the
107
- * next field" — once, rather than on every field.
108
- *
109
- * @see FieldKeyboardConfig in `keyboard.types`. Typed structurally here to
110
- * keep `control.types` a leaf that imports nothing.
111
- */
112
25
  keyboard?: import('./keyboard.types').FieldKeyboardConfig;
113
26
  }
114
27
  export interface FieldProviderProps extends FieldContextValue {
115
28
  children?: ReactNode;
116
29
  }
117
- /**
118
- * What an editable-table cell needs to tell the widget sitting in it.
119
- *
120
- * These five used to be five separate public props on Input, Select and Suggest
121
- * — with Suggest re-declaring them inline and typing `registerCellRef` against
122
- * `HTMLInputElement` where Input typed `HTMLElement`. Grouping them keeps the
123
- * grid's plumbing out of the props panel and gives the two implementations one
124
- * signature to agree on.
125
- */
126
30
  export interface FieldCellContext {
127
31
  rowIndex?: number;
128
- /** Lower-case to match the `data-cellindex` attribute the DOM carries. */
129
32
  cellindex?: number;
130
33
  onCellFocus?: (rowIndex: number, cellindex: number) => void;
131
34
  registerCellRef?: (rowIndex: number, cellindex: number, ref: HTMLElement | null) => void;
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FieldChangeEvent } from './control.types';
3
+ import type { FieldPopupProps, TextFieldProps } from './field.types';
4
+ export type DateDisplayFormat = 'dd-mm-yyyy' | 'dd/mm/yyyy' | 'yyyy-mm-dd';
5
+ export type DateTextOrder = 'dmy' | 'mdy' | 'ymd';
6
+ export interface DateRangeValue {
7
+ from: string;
8
+ to: string;
9
+ }
10
+ export interface DatePickerBaseProps extends Omit<TextFieldProps<string, HTMLInputElement, FieldChangeEvent<string>>, 'value' | 'onChange'>, FieldPopupProps {
11
+ withTime?: boolean;
12
+ min?: string;
13
+ max?: string;
14
+ displayFormat?: DateDisplayFormat;
15
+ textOrder?: DateTextOrder;
16
+ weekStart?: number;
17
+ months?: number;
18
+ currentMonthSide?: 'left' | 'right';
19
+ showOutsideDays?: boolean;
20
+ presets?: boolean | string[];
21
+ fyStartMonth?: number;
22
+ monthNames?: string[];
23
+ weekdayNames?: string[];
24
+ clearLabel?: string;
25
+ applyLabel?: string;
26
+ timeToggle?: boolean;
27
+ placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
28
+ showCalendarIcon?: boolean;
29
+ clearable?: boolean;
30
+ placeholder?: string;
31
+ hint?: ReactNode;
32
+ error?: ReactNode;
33
+ }
34
+ export interface DatePickerSingleProps extends DatePickerBaseProps {
35
+ range?: false;
36
+ value?: string;
37
+ onChange?: (event: FieldChangeEvent<string>) => void;
38
+ onApply?: (value: string) => void;
39
+ }
40
+ export interface DatePickerRangeProps extends DatePickerBaseProps {
41
+ range: true;
42
+ value?: DateRangeValue;
43
+ onChange?: (event: FieldChangeEvent<DateRangeValue>) => void;
44
+ onApply?: (value: DateRangeValue) => void;
45
+ }
46
+ export type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
@@ -2,15 +2,7 @@ import type { ReactNode, CSSProperties, ChangeEvent, KeyboardEvent } from 'react
2
2
  import type { FieldKeyboardConfig } from './keyboard.types';
3
3
  import type { TableColumnDisplayProps, TableSummaryConfig, SummaryLicenseConfig } from './table.types';
4
4
  import type { CheckboxFieldDefinition, InputFieldDefinition, SwitchFieldDefinition, SelectFieldDefinition, SuggestFieldDefinition, RadioFieldDefinition, ButtonFieldDefinition, ChildFieldDefinition } from './fields.types';
5
- /**
6
- * A column: a field definition (what edits the value) plus the Table's display
7
- * props (how the cell is laid out and what it shows when read-only).
8
- *
9
- * Intersected rather than added to `BaseFieldDefinition` so an ordinary form
10
- * field never grows a meaningless `width` or `sticky`.
11
- */
12
5
  export type EditableTableColumnDefinition<T = any> = (InputFieldDefinition<T> | SwitchFieldDefinition<T> | SelectFieldDefinition<T> | SuggestFieldDefinition<T> | RadioFieldDefinition<T> | CheckboxFieldDefinition<T> | ButtonFieldDefinition<T> | ChildFieldDefinition<T>) & TableColumnDisplayProps<T>;
13
- /** Row operations a summary can drive — so a screen can put "Add from stock" beside its totals. */
14
6
  export interface EditableTableSummaryActions {
15
7
  addRow: () => void;
16
8
  copyRow: () => void;
@@ -19,7 +11,6 @@ export interface EditableTableSummaryActions {
19
11
  }
20
12
  export interface EditableTableSummaryContext<T = any> {
21
13
  rows: T[];
22
- /** Resolved column totals, keyed by column `name`. */
23
14
  totals: Record<string, number | string>;
24
15
  focusedRowIndex: number | null;
25
16
  actions: EditableTableSummaryActions;
@@ -46,24 +37,12 @@ export interface EditableTableAddConfig {
46
37
  rowData: any;
47
38
  tableData: any[];
48
39
  }) => Record<string, any>;
49
- /**
50
- * The consumer's own veto on creating a row. Runs after the built-in policy below.
51
- * (Was declared but never called before 2026-09-17 — it is wired now.)
52
- */
53
40
  canAdd?: (context: {
54
41
  rowIndex: number;
55
42
  rowData: any;
56
43
  tableData: any[];
57
44
  }) => boolean;
58
- /**
59
- * Allow a new row while a BLANK one is already there. Default `false`: holding Enter at
60
- * the end of a table used to append an empty row per press, so an invoice ended with a
61
- * tail of blanks. With the default, the blank row must be filled before the next appears.
62
- */
63
45
  allowWhenBlankRow?: boolean;
64
- /**
65
- * Allow a new row while some row still fails a `'block'` rule. Default `false`.
66
- */
67
46
  allowWhenInvalid?: boolean;
68
47
  }
69
48
  export interface EditableTableDeleteConfig {
@@ -74,51 +53,31 @@ export interface EditableTableDeleteConfig {
74
53
  tableData: any[];
75
54
  }) => boolean;
76
55
  }
77
- /** One cell that failed, with the message the cell is showing. */
78
56
  export interface EditableTableRowFailure {
79
57
  cellindex: number;
80
- /** The column's `name`, so a caller can report "Qty" without knowing column order. */
81
58
  column: string;
82
59
  message: string;
83
60
  severity: 'block' | 'warn';
84
61
  }
85
62
  export interface EditableTableRowValidity {
86
63
  rowIndex: number;
87
- /** No failures at all — warnings included. */
88
64
  valid: boolean;
89
- /** At least one `'block'` failure: this row is what refuses a new row, and your save. */
90
65
  blocked: boolean;
91
66
  failures: EditableTableRowFailure[];
92
67
  }
93
68
  export interface EditableTableValidity {
94
- /** Every row passes, warnings included. */
95
69
  valid: boolean;
96
- /** Nothing is BLOCKING — the answer a save button wants. */
97
70
  blocked: boolean;
98
- /** Only the rows with something to report. An untouched row is never judged. */
99
71
  rows: EditableTableRowValidity[];
100
- /** Where to send the operator first, or `null`. */
101
72
  firstBlocking: {
102
73
  rowIndex: number;
103
74
  cellindex: number;
104
75
  message: string;
105
76
  } | null;
106
77
  }
107
- /**
108
- * The table's imperative handle — the same shape of thing as `FormMethods`, obtained the
109
- * same way (a `ref`), because a table is the other half of the same entry screen.
110
- *
111
- * The validity answers are already computed for the red edges; this hands them out, so a
112
- * consumer's save asks "may I?" instead of re-implementing a single rule. For LIVE state —
113
- * a Save button that disables itself as someone types — use the `onValidityChange` prop: a
114
- * ref is imperative and re-renders nothing.
115
- */
116
78
  export interface EditableTableMethods<T = any> {
117
- /** Resolve every row's rules now. Synchronous: the rules are pure. */
118
79
  validate: () => EditableTableValidity;
119
- /** `true` when nothing blocks — the one-line form of `validate()`. */
120
80
  isValid: () => boolean;
121
- /** Focus the first blocking cell; `false` when there is nothing to go to. */
122
81
  focusFirstInvalid: () => boolean;
123
82
  getRows: () => T[];
124
83
  getRowValidity: (rowIndex: number) => EditableTableRowValidity;
@@ -151,48 +110,18 @@ export interface EditableTableProps<T = any> {
151
110
  title?: string | ReactNode;
152
111
  footerConfig?: EditableTableFooterConfig;
153
112
  onFocusChange?: (focus: EditableTableFocusState) => void;
154
- /**
155
- * Fires when the table's validity changes — for live UI, such as a Save button that
156
- * disables itself. The imperative `ref` answers the same question at save time.
157
- */
158
113
  onValidityChange?: (validity: EditableTableValidity) => void;
159
- /**
160
- * Animate rows arriving and leaving, and flash the cell focus lands on afterwards.
161
- * Default `true`. `prefers-reduced-motion` switches it off regardless — including the
162
- * short delay a leaving row needs, so nobody gets a slower delete for no animation.
163
- */
164
114
  animateRows?: boolean;
165
115
  copyConfig?: EditableTableCopyConfig;
166
116
  addConfig?: EditableTableAddConfig;
167
117
  deleteConfig?: EditableTableDeleteConfig;
168
- /** Icons for action buttons — replaces direct react-icons imports */
169
118
  addIcon?: ReactNode;
170
119
  copyIcon?: ReactNode;
171
120
  deleteIcon?: ReactNode;
172
121
  additionalActions?: EditableTableAdditionalAction<T>[];
173
- /**
174
- * The area under the table — for everything that is not a column total.
175
- *
176
- * The config form is the client Table's `TableSummaryConfig`, unchanged, so a
177
- * summary written for a report table works here as-is. The render form is the
178
- * escape hatch: rows, resolved totals and the row actions, for custom figures
179
- * or action buttons. Column totals themselves come from each column's
180
- * `summable` / `summary` and render in the pinned footer row.
181
- */
182
122
  summary?: TableSummaryConfig<T> | ((context: EditableTableSummaryContext<T>) => ReactNode);
183
- /** Wraps a license-gated summary entry. Without it, gated entries render ungated. */
184
123
  renderLicense?: (license: SummaryLicenseConfig, children: ReactNode) => ReactNode;
185
- /**
186
- * Height of the scrolling body. Bounded on purpose: the header pins to its top
187
- * and the totals row to its bottom, so however many rows are added both stay
188
- * visible. Default `'min(70vh, 700px)'`.
189
- */
190
124
  maxHeight?: number | string;
191
- /**
192
- * Keyboard policy for every cell. Merged over `GRID_CELL_KEYBOARD_DEFAULTS`,
193
- * so a table names only what it wants to change — most often `editKey`,
194
- * since the default `Insert` is absent from Mac and compact keyboards.
195
- */
196
125
  keyboard?: FieldKeyboardConfig;
197
126
  [key: string]: any;
198
127
  }
@@ -203,11 +132,6 @@ export interface EditableTableRowProps<T = any> {
203
132
  columnFields: EditableTableColumnDefinition<any>[];
204
133
  editableTableData: T;
205
134
  onChange: (event: ChangeEvent<any>, rowIndex: number) => void;
206
- /**
207
- * @deprecated Cells reach the grid through `keyboard.onNavigate`, which the
208
- * table sets once on a `FieldProvider`. Optional so a custom row renderer
209
- * that still passes one keeps compiling.
210
- */
211
135
  onKeyDown?: (event: KeyboardEvent<any>, rowIndex: number) => void;
212
136
  onSelect?: (selected: any, fieldName: string, rowIndex: number) => void;
213
137
  onCellFocus: (rowIndex: number, cellindex: number) => void;
@@ -216,11 +140,8 @@ export interface EditableTableRowProps<T = any> {
216
140
  isFocusedRow: boolean;
217
141
  focusedCellIndex: number | null;
218
142
  tableDataKey?: string;
219
- /** Render prop for authorize — passed through to Fields */
220
143
  renderAuthorize?: (authorize: any, children: ReactNode) => ReactNode;
221
- /** Render prop for tooltip — passed through to Fields */
222
144
  renderTooltip?: (tooltipProps: any, children: ReactNode) => ReactNode;
223
- /** Component registry — passed through to Fields */
224
145
  componentRegistry?: any;
225
146
  [key: string]: any;
226
147
  }
@@ -3,46 +3,6 @@ import type { DataAttributes } from './common.types';
3
3
  import type { FieldTooltipSupport } from './fieldWrapper.types';
4
4
  import type { ControlLabelPosition, ControlLayout, ControlSize, ControlVariant, FieldCellContext, FieldChangeEvent, FieldColor, ToggleVariant } from './control.types';
5
5
  import type { FieldKeyboardConfig } from './keyboard.types';
6
- /**
7
- * The one field contract.
8
- *
9
- * `control.types` unified the *vocabulary* — `ControlSize`, `ControlVariant`,
10
- * `FieldChangeEvent` — so the values could no longer drift. It did not unify
11
- * the *shape*: all seven fields still spelled out their own prop lists by hand,
12
- * and they had already drifted apart in ways nothing could catch.
13
- *
14
- * What the audit found, before this file existed:
15
- *
16
- * - `name`, `label`, `size`, `disabled`, `readOnly`, `required`, `error`,
17
- * `autoFocus`, `tabIndex`, `onFocus`, `onBlur` and `className` were
18
- * re-declared by hand in **all seven** props files. Checkbox declared `name`
19
- * three times, in three different sub-interfaces.
20
- * - `onFocus`/`onBlur` had **five different signatures**, and Select disagreed
21
- * with itself: `onBlur: (e: SelectEvent)` beside `onFocus: (e: FocusEvent)`,
22
- * declared 65 lines apart in two sub-interfaces.
23
- * - `onKeyDown` existed on **three of seven**. Checkbox, Radio, Switch and
24
- * ChipInput could not participate in grid navigation at all.
25
- * - The helper line under a field was `hint` on Input/Suggest/ChipInput and
26
- * `helperText` on Checkbox/Radio/Switch — for the same slot in the same
27
- * FieldWrapper.
28
- * - `FieldCellContext` reached three of seven, and Select imported it under the
29
- * alias `InputEditableTableCellProps` — named after a different component.
30
- *
31
- * Every axis below is declared **once**. A field's own props file holds only
32
- * what is genuinely its own; adding an axis later edits this file, not seven.
33
- */
34
- /**
35
- * `C` — the change event a field emits — is a parameter rather than a fixed
36
- * `FieldChangeEvent`, and deliberately so. Input, Suggest and the toggles
37
- * forward a **real DOM event**, so their consumers keep `currentTarget` and
38
- * `preventDefault()`; Select and ChipInput have no DOM event and emit the
39
- * synthetic shape. Fixing `C` to `FieldChangeEvent` would unify the declaration
40
- * by quietly taking capability away from five fields.
41
- *
42
- * A container still writes one handler for all of them: `FieldChangeEvent` is
43
- * what a DOM `ChangeEvent` structurally satisfies, so a handler typed against
44
- * the narrow shape is assignable to every field's `onChange`.
45
- */
46
6
  export interface FieldIdentityProps<V = any, C = FieldChangeEvent<V>> {
47
7
  id?: string;
48
8
  name?: string;
@@ -50,41 +10,20 @@ export interface FieldIdentityProps<V = any, C = FieldChangeEvent<V>> {
50
10
  defaultValue?: V;
51
11
  onChange?: (event: C) => void;
52
12
  }
53
- /**
54
- * What every field shares. Resolved by `useFieldSurface`
55
- * (own prop → FieldContext → default), never by a destructuring default.
56
- */
57
13
  export interface FieldSurfaceProps {
58
14
  size?: ControlSize;
59
15
  disabled?: boolean;
60
16
  readOnly?: boolean;
61
17
  }
62
- /** Fields that render a text-entry surface: Input, Select, Suggest, ChipInput. */
63
18
  export interface ControlSurfaceProps extends FieldSurfaceProps {
64
19
  variant?: ControlVariant;
65
20
  layout?: ControlLayout;
66
21
  }
67
- /**
68
- * The box-shaped toggles: Checkbox, Radio, Switch.
69
- *
70
- * Separate from `ControlSurfaceProps` on purpose. A toggle has no text line, so
71
- * `variant: 'underlined'` would type-check and render a box with neither border
72
- * nor fill, and `layout` has nothing to arrange — a toggle positions its label
73
- * with `labelPosition`. Handing toggles the text-field surface would make both
74
- * expressible and meaningless.
75
- */
76
22
  export interface ToggleSurfaceProps extends FieldSurfaceProps {
77
23
  variant?: ToggleVariant;
78
24
  color?: FieldColor;
79
25
  labelPosition?: ControlLabelPosition;
80
26
  }
81
- /**
82
- * The label / helper / error furniture, all of which FieldWrapper renders.
83
- *
84
- * `ReactNode` rather than `string` for label, hint and error: the toggles
85
- * already passed rich content through the wrapper while Input's types claimed
86
- * `string`, so the wrapper's real contract was the wider one.
87
- */
88
27
  export interface FieldChromeProps {
89
28
  label?: ReactNode;
90
29
  hint?: ReactNode;
@@ -95,83 +34,36 @@ export interface FieldChromeProps {
95
34
  style?: CSSProperties;
96
35
  fullWidth?: boolean;
97
36
  }
98
- /**
99
- * Re-declared per field before this existed, in four of the seven, with the
100
- * other three simply dropping them.
101
- */
102
37
  export interface FieldA11yProps {
103
38
  'aria-label'?: string;
104
39
  'aria-labelledby'?: string;
105
40
  'aria-describedby'?: string;
106
41
  'aria-required'?: boolean;
107
42
  'aria-invalid'?: boolean;
43
+ 'aria-activedescendant'?: string;
44
+ 'aria-controls'?: string;
108
45
  }
109
- /**
110
- * The focus event a container writes its handler against — the widest one, so
111
- * `Fields` can pass a single `onBlur` to all seven fields.
112
- */
113
46
  export type FieldFocusEvent = FocusEvent<HTMLElement>;
114
- /**
115
- * One focus/key signature, parameterised by the element the field actually
116
- * focuses — `HTMLInputElement` for Input and the toggles, `HTMLDivElement` for
117
- * Select's trigger, and so on.
118
- *
119
- * Parameterised rather than widened to a flat `HTMLElement` because widening
120
- * would break every consumer whose handler is annotated with the narrow event
121
- * type. A container's handler is unaffected either way: TypeScript checks
122
- * function parameters contravariantly, so a broadly-typed
123
- * `(e: KeyboardEvent) => void` — which is what the grid and form pass down —
124
- * remains assignable to every field's `onKeyDown`.
125
- */
126
47
  export interface FieldInteractionProps<E extends HTMLElement = HTMLElement> {
127
48
  autoFocus?: boolean;
128
49
  tabIndex?: number;
129
50
  onFocus?: (event: FocusEvent<E>) => void;
130
51
  onBlur?: (event: FocusEvent<E>) => void;
131
52
  onKeyDown?: (event: KeyboardEvent<E>) => void;
132
- /** @see FieldKeyboardConfig — arrow/Enter/edit-key policy. */
133
53
  keyboard?: FieldKeyboardConfig;
134
54
  }
135
- /**
136
- * Why a popup opened or closed.
137
- *
138
- * A boolean is not enough for the grid. "Closed because the user picked an
139
- * option" must return the cell to navigate mode, while "closed because Escape"
140
- * must leave it in edit mode with the typed text intact — two different
141
- * behaviours that a bare `onOpenChange(false)` cannot distinguish.
142
- */
143
55
  export type OpenReason = 'type' | 'focus' | 'key' | 'click' | 'select' | 'escape' | 'blur' | 'programmatic';
144
- /**
145
- * Fields with a popup: Select, Suggest, and any date/lookup field added later.
146
- *
147
- * Before this, popup state was private to each component — only Select had
148
- * `onOpen`/`onClose`, neither field accepted `open`, and nothing could be
149
- * controlled from outside. The grid's rule that an open popup owns the arrow
150
- * keys had no state to read.
151
- */
152
56
  export interface FieldPopupProps {
153
- /** Controlled. Omit for the field to own its own state. */
154
57
  open?: boolean;
155
58
  defaultOpen?: boolean;
156
59
  onOpenChange?: (open: boolean, reason: OpenReason) => void;
157
60
  }
158
- /**
159
- * What `ref` points at, for every field.
160
- *
161
- * It used to be four different DOM nodes and no behaviour, which is why the
162
- * editable table resorted to `document.querySelector('.smartselect-trigger')`
163
- * to move focus — there was no other way to focus a Select from outside it.
164
- *
165
- * `element` keeps the old capability available, so nothing that a DOM ref could
166
- * do becomes impossible.
167
- */
168
61
  export interface FieldHandle {
169
62
  focus(opts?: {
170
63
  select?: boolean;
171
64
  caret?: 'start' | 'end';
172
65
  }): void;
173
66
  blur(): void;
174
- /** Navigate → edit. `seed` replaces the value, as type-to-replace does. */
175
67
  beginEdit(seed?: string): void;
176
68
  endEdit(commit: boolean): void;
177
69
  openPopup(reason?: OpenReason): void;
@@ -179,22 +71,10 @@ export interface FieldHandle {
179
71
  readonly isOpen: boolean;
180
72
  readonly element: HTMLElement | null;
181
73
  }
182
- /**
183
- * Everything every field has, whatever it renders.
184
- *
185
- * Surface is **not** included: text fields and toggles take different surface
186
- * axes (see `ControlSurfaceProps` / `ToggleSurfaceProps`), and merging them
187
- * would give a Checkbox a `layout` and an `underlined` variant that mean
188
- * nothing. Each field extends this plus the surface interface for its family.
189
- *
190
- * @typeParam V — the value type
191
- * @typeParam E — the element the field focuses
192
- * @typeParam C — the change event it emits
193
- */
194
74
  export type BaseFieldProps<V = any, E extends HTMLElement = HTMLElement, C = FieldChangeEvent<V>> = FieldIdentityProps<V, C> & FieldChromeProps & FieldA11yProps & FieldInteractionProps<E> & FieldCellContext & FieldTooltipSupport & DataAttributes;
195
- /** The text-entry families: Input, Select, Suggest, ChipInput. */
196
75
  export type TextFieldProps<V = any, E extends HTMLElement = HTMLElement, C = FieldChangeEvent<V>> = BaseFieldProps<V, E, C> & ControlSurfaceProps & {
197
76
  placeholder?: string;
77
+ inputMode?: 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' | 'none';
78
+ spellCheck?: boolean;
198
79
  };
199
- /** The toggle family: Checkbox, Radio, Switch. */
200
80
  export type ToggleFieldProps<V = any, E extends HTMLElement = HTMLInputElement, C = FieldChangeEvent<V>> = BaseFieldProps<V, E, C> & ToggleSurfaceProps;
@@ -1,26 +1,16 @@
1
1
  import { CSSProperties, ReactNode, Ref } from 'react';
2
2
  import type { TooltipProp, TooltipTrigger } from './tooltip.types';
3
3
  import type { ControlLayout, ControlSize, ControlVariant } from './control.types';
4
- /** @see ControlLayout — the shared vocabulary in `control.types`. */
5
4
  export type FieldLayout = ControlLayout;
6
- /** @see ControlSize — the shared vocabulary in `control.types`. */
7
5
  export type FieldSize = ControlSize;
8
- /** @see ControlVariant — the shared vocabulary in `control.types`. */
9
6
  export type FieldVariant = ControlVariant;
10
7
  export type { ToggleVariant } from './control.types';
11
- /**
12
- * Every control that renders through FieldWrapper accepts these, so a tooltip
13
- * behaves identically on an Input, a Select or a Checkbox.
14
- */
15
8
  export interface FieldTooltipSupport {
16
9
  tooltip?: TooltipProp;
17
- /** `icon` (default) puts a ⓘ after the label; `control` uses the field itself. */
18
10
  tooltipTrigger?: TooltipTrigger;
19
11
  }
20
12
  export interface FieldWrapperProps extends FieldTooltipSupport {
21
13
  label?: ReactNode;
22
- /** ReactNode, not string: Checkbox/Radio/Switch allow rich error and helper
23
- content, and they render their messages through this wrapper too. */
24
14
  error?: ReactNode;
25
15
  hint?: ReactNode;
26
16
  required?: boolean;
@@ -48,30 +48,10 @@ export type ConditionRegexObject<T> = {
48
48
  export type ConditionFunction<T> = (data: T, context?: ConditionContext) => boolean;
49
49
  export type ConditionSimpleKey<T> = NestedKeys<T>;
50
50
  export type Condition<T> = boolean | ConditionSimpleKey<T> | ConditionObject<T> | ConditionRegexObject<T> | ConditionFunction<T> | Array<ConditionSimpleKey<T> | ConditionObject<T> | ConditionRegexObject<T> | ConditionFunction<T>>;
51
- /**
52
- * One rule on one cell.
53
- *
54
- * Rules are **per cell and dynamic**, not per row and not static: a minimum-quantity rule
55
- * belongs on Qty and S.Qty but not on Price, and it may not apply at all depending on other
56
- * settings ("unsaved items allowed" switches the item rule off). So a rule speaks the same
57
- * `Condition` vocabulary `disabled` and `render` already use — it sees the whole row, the
58
- * defaults and the cell's position, and it can be a plain function when that is simpler.
59
- */
60
51
  export interface CellRule<T> {
61
- /** When this rule APPLIES at all. Omitted = always. */
62
52
  when?: Condition<T>;
63
- /** The cell is VALID while this holds. */
64
53
  valid: Condition<T>;
65
- /** Shown on the cell itself — red edge, message in the control's tooltip. */
66
54
  message: string;
67
- /**
68
- * `'block'` (default) also traps in-grid keyboard movement in the cell until it is valid,
69
- * and refuses a new row. `'warn'` only marks it.
70
- *
71
- * Neither severity hijacks the mouse, Tab out of the grid, or Escape: a pointer cannot be
72
- * trapped without fighting the browser, so an invalid cell keeps its mark and blocks what
73
- * it can — the next row, and the consumer's save.
74
- */
75
55
  severity?: 'block' | 'warn';
76
56
  }
77
57
  export interface ConditionContext {
@@ -130,30 +110,17 @@ export interface EditableTableCustomPropContext<T> extends FieldEditableTablePro
130
110
  basePath: string;
131
111
  field: FieldDefinition<T>;
132
112
  }
133
- /**
134
- * What a cell can ask its table to DO.
135
- *
136
- * Handed to a button cell's `onClick` so the button can act on its own row — delete it,
137
- * copy it, write back what a modal returned — without the column definition closing over
138
- * the table's state. Optional to use; a button that only reads `rowData` ignores it.
139
- */
140
113
  export interface EditableTableCellActions {
141
114
  addRow: (insertIndex?: number) => void;
142
115
  copyRow: (insertIndex?: number) => void;
143
116
  deleteRow: (rowIndex?: number) => void;
144
117
  focusCell: (rowIndex: number, cellindex: number) => void;
145
- /** Merge a patch into one row — the write-back path for a modal or a lookup. */
146
118
  updateRow: (rowIndex: number, patch: Record<string, any>) => void;
147
119
  }
148
- /**
149
- * Everything a button cell knows about where it was pressed. One argument, so a handler
150
- * that needs none of it stays `() => doThing()`.
151
- */
152
120
  export interface ButtonCellContext<T> {
153
121
  rowIndex: number;
154
122
  cellindex: number;
155
123
  rowData: any;
156
- /** This column's own value in that row, when the column names one. */
157
124
  value: any;
158
125
  tableData: any[];
159
126
  actions: EditableTableCellActions;
@@ -169,13 +136,7 @@ export interface FieldEditableTableProps<T> {
169
136
  onCellFocus?: (rowIndex: number, cellindex: number) => void;
170
137
  registerCellRef: (rowIndex: number, cellindex: number, ref: any) => void;
171
138
  onSelect?: (...args: any[]) => void;
172
- /** The table's own row operations, for cells that act (see `EditableTableCellActions`). */
173
139
  actions?: EditableTableCellActions;
174
- /**
175
- * @deprecated A cell reaches its container through `keyboard.onNavigate`,
176
- * which the grid sets once on a `FieldProvider`. Optional so a custom row
177
- * renderer that still supplies one keeps compiling.
178
- */
179
140
  onKeyDown?: (event: any) => void;
180
141
  [key: string]: any;
181
142
  }
@@ -184,7 +145,6 @@ export interface BaseFieldDefinition<T> {
184
145
  header?: string;
185
146
  render?: Condition<T>;
186
147
  disabled?: Condition<T>;
187
- /** Validation for THIS cell — see `CellRule`. Evaluated per row, in order; first failure wins. */
188
148
  rules?: Array<CellRule<T>>;
189
149
  authorize?: FieldAuthorize;
190
150
  tooltip?: FieldTooltipProps;
@@ -226,11 +186,6 @@ export interface CheckboxFieldDefinition<T> extends BaseFieldDefinition<T> {
226
186
  export interface ButtonFieldDefinition<T> extends BaseFieldDefinition<T> {
227
187
  field: 'button';
228
188
  fprop?: Partial<ButtonProps>;
229
- /**
230
- * Column-level click, with the row/cell context and the table's actions — the generic
231
- * form, since a button in row 7 must not need a column definition built for row 7.
232
- * `fprop.onClick` still works and still receives only the DOM event.
233
- */
234
189
  onClick?: (context: ButtonCellContext<T>) => void;
235
190
  }
236
191
  export interface ChildFieldDefinition<T> extends BaseFieldDefinition<T> {