@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.
- package/README.md +31 -0
- package/dist/ChartImageMenu-gvNAYVkY.js +2938 -0
- package/dist/Charts-COljjy0x.js +1759 -0
- package/dist/SummaryChart-D4jcOv-K.js +31 -0
- package/dist/SummaryImage-BSbatHym.js +19 -0
- package/dist/SummarySeeAll-vnaL3pdy.js +97 -0
- package/dist/defaults-BbLB8QmD.js +709 -0
- package/dist/exportContext-CAX8VPrP.js +243 -0
- package/dist/exportEngine-C4n1MiOw.js +891 -0
- package/dist/fuseSearch-vLQR3O5a.js +37 -0
- package/dist/index.js +19289 -9411
- package/dist/style.css +1 -1
- package/dist/summaryChartData-CU_W5ocv.js +82 -0
- package/dist/types/published/dcs-ui/src/index.d.ts +0 -28
- package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -33
- package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -12
- package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -21
- package/dist/types/shared-logic/src/report/canvas.d.ts +0 -55
- package/dist/types/shared-logic/src/report/conditions.d.ts +0 -14
- package/dist/types/shared-logic/src/report/constants.d.ts +0 -39
- package/dist/types/shared-logic/src/report/dataset.d.ts +0 -26
- package/dist/types/shared-logic/src/report/edit.d.ts +0 -62
- package/dist/types/shared-logic/src/report/fields.d.ts +0 -51
- package/dist/types/shared-logic/src/report/format.d.ts +0 -22
- package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -30
- package/dist/types/shared-logic/src/report/layout.d.ts +1 -55
- package/dist/types/shared-logic/src/report/metrics.d.ts +0 -45
- package/dist/types/shared-logic/src/report/migrate.d.ts +0 -60
- package/dist/types/shared-logic/src/report/paginate.d.ts +0 -32
- package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -21
- package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -27
- package/dist/types/shared-logic/src/report/resolve.d.ts +0 -29
- package/dist/types/shared-logic/src/report/scope.d.ts +0 -28
- package/dist/types/shared-logic/src/report/storage.d.ts +0 -76
- package/dist/types/shared-logic/src/report/validate.d.ts +0 -18
- package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/chipinput.logic.d.ts +0 -12
- package/dist/types/shared-logic/src/ui/collapsible.logic.d.ts +0 -7
- package/dist/types/shared-logic/src/ui/colorScheme.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -11
- package/dist/types/shared-logic/src/ui/datePicker.logic.d.ts +136 -0
- package/dist/types/shared-logic/src/ui/editableTable.logic.d.ts +0 -27
- package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +2 -14
- package/dist/types/shared-logic/src/ui/form.logic.d.ts +0 -8
- package/dist/types/shared-logic/src/ui/index.d.ts +3 -29
- package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -60
- package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/popover.logic.d.ts +22 -20
- package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -35
- package/dist/types/shared-logic/src/ui/quickAddGrid.logic.d.ts +183 -0
- package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -14
- package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -34
- package/dist/types/shared-logic/src/ui/tableSummary.logic.d.ts +0 -19
- package/dist/types/shared-logic/src/ui/timeField.logic.d.ts +26 -0
- package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -24
- package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -8
- package/dist/types/shared-types/src/report/bands.d.ts +0 -20
- package/dist/types/shared-types/src/report/blocks.d.ts +0 -59
- package/dist/types/shared-types/src/report/conditions.d.ts +0 -13
- package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
- package/dist/types/shared-types/src/report/document.d.ts +0 -80
- package/dist/types/shared-types/src/report/primitives.d.ts +0 -40
- package/dist/types/shared-types/src/report/registry.d.ts +0 -46
- package/dist/types/shared-types/src/report/storage.d.ts +0 -31
- package/dist/types/shared-types/src/report/template.d.ts +0 -60
- package/dist/types/shared-types/src/ui/button.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/checkbox.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/chipinput.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/collapsible.types.d.ts +0 -18
- package/dist/types/shared-types/src/ui/common.types.d.ts +0 -11
- package/dist/types/shared-types/src/ui/control.types.d.ts +0 -97
- package/dist/types/shared-types/src/ui/datePicker.types.d.ts +46 -0
- package/dist/types/shared-types/src/ui/editableTable.types.d.ts +0 -79
- package/dist/types/shared-types/src/ui/field.types.d.ts +4 -124
- package/dist/types/shared-types/src/ui/fieldWrapper.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/fields.types.d.ts +0 -45
- package/dist/types/shared-types/src/ui/form.types.d.ts +0 -30
- package/dist/types/shared-types/src/ui/index.d.ts +1 -16
- package/dist/types/shared-types/src/ui/input.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/keyboard.types.d.ts +2 -109
- package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -22
- package/dist/types/shared-types/src/ui/radio.types.d.ts +0 -6
- package/dist/types/shared-types/src/ui/select.types.d.ts +0 -41
- package/dist/types/shared-types/src/ui/suggest.types.d.ts +0 -10
- package/dist/types/shared-types/src/ui/switch.types.d.ts +0 -4
- package/dist/types/shared-types/src/ui/table.types.d.ts +0 -59
- package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -25
- package/dist/types/shared-types/src/ui/typography.types.d.ts +0 -4
- package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -9
- package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -19
- package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Badge/Badge.d.ts +0 -11
- package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -52
- package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Charts/AnchoredMenu.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/BarList.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/CalendarHeatmap.d.ts +17 -0
- package/dist/types/shared-web-ui/src/Charts/Chart.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Charts/ChartIcon.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Charts/ChartImageMenu.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTable.d.ts +8 -0
- package/dist/types/shared-web-ui/src/Charts/ChartTooltip.d.ts +44 -0
- package/dist/types/shared-web-ui/src/Charts/ChartView.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/ColumnChart.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Donut.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Charts/Funnel.d.ts +10 -0
- package/dist/types/shared-web-ui/src/Charts/Gauge.d.ts +15 -0
- package/dist/types/shared-web-ui/src/Charts/Legend.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/LineChart.d.ts +13 -0
- package/dist/types/shared-web-ui/src/Charts/NumberTrend.d.ts +21 -0
- package/dist/types/shared-web-ui/src/Charts/Progress.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/StackedBar.d.ts +11 -0
- package/dist/types/shared-web-ui/src/Charts/Treemap.d.ts +12 -0
- package/dist/types/shared-web-ui/src/Charts/chartData.d.ts +69 -0
- package/dist/types/shared-web-ui/src/Charts/chartImage.d.ts +121 -0
- package/dist/types/shared-web-ui/src/Charts/geometry.d.ts +178 -0
- package/dist/types/shared-web-ui/src/Charts/index.d.ts +32 -0
- package/dist/types/shared-web-ui/src/Charts/labels.d.ts +46 -0
- package/dist/types/shared-web-ui/src/Charts/menuPlacement.d.ts +25 -0
- package/dist/types/shared-web-ui/src/Charts/palette.d.ts +81 -0
- package/dist/types/shared-web-ui/src/Charts/parts.d.ts +24 -0
- package/dist/types/shared-web-ui/src/Charts/pointer.d.ts +41 -0
- package/dist/types/shared-web-ui/src/Charts/types.d.ts +51 -0
- package/dist/types/shared-web-ui/src/Charts/ui.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Charts/useBoxSize.d.ts +6 -0
- package/dist/types/shared-web-ui/src/Charts/useLegendFit.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Collapsible/CollapsibleItem.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -15
- package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -27
- package/dist/types/shared-web-ui/src/DataTable/DataTable.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/DisplayPopover.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/HeaderMenu.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/ManageModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/SingleRowView.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/SortModal.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/StatusRow.d.ts +49 -0
- package/dist/types/shared-web-ui/src/DataTable/TableColumnModal.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/TableControls.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/TablePagination.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/TableScrollStrip.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/TableToolbar.d.ts +69 -0
- package/dist/types/shared-web-ui/src/DataTable/TableView.d.ts +61 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/TableToast.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/bulk/bulkActions.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardFieldsEditor.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/CardView.d.ts +50 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/cardFields.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/cards/rowParts.d.ts +38 -0
- package/dist/types/shared-web-ui/src/DataTable/data/useServerData.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/defaults.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/BuiltInDetail.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/detail/DetailHost.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPopover.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportPreviewModal.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportSettingsModal.d.ts +31 -0
- package/dist/types/shared-web-ui/src/DataTable/export/ExportTemplateCards.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportContext.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportEngine.d.ts +77 -0
- package/dist/types/shared-web-ui/src/DataTable/export/exportRows.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateDisplay.d.ts +7 -0
- package/dist/types/shared-web-ui/src/DataTable/export/templateOptions.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/export/useTableExport.d.ts +53 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterConditionRow.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterGroup.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterModal.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/FilterRow.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/columnFilterModel.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterEngine.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/filterRowModel.d.ts +28 -0
- package/dist/types/shared-web-ui/src/DataTable/filters/quickFilterMatch.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/GroupUi.d.ts +36 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/groupModel.d.ts +82 -0
- package/dist/types/shared-web-ui/src/DataTable/grouping/useGrouping.d.ts +39 -0
- package/dist/types/shared-web-ui/src/DataTable/host.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/index.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/shortcuts.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
- package/dist/types/shared-web-ui/src/DataTable/labels.d.ts +618 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/LayoutSwitcher.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/layouts.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/scrollArea.d.ts +2 -0
- package/dist/types/shared-web-ui/src/DataTable/layout/useFillHeight.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/RowMenu.d.ts +56 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/buildRowMenu.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/clipboard.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/menu/valueFilter.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/motion/useRowMotion.d.ts +32 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/adapters.d.ts +6 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/reconcile.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useColumnPersistence.d.ts +51 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useManagePrefs.d.ts +23 -0
- package/dist/types/shared-web-ui/src/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/pinning.d.ts +10 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/RowActions.d.ts +15 -0
- package/dist/types/shared-web-ui/src/DataTable/rows/rowPress.d.ts +35 -0
- package/dist/types/shared-web-ui/src/DataTable/sharing/Sharing.d.ts +21 -0
- package/dist/types/shared-web-ui/src/DataTable/split/SplitView.d.ts +29 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/ManageSummaryCards.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryChart.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryControls.d.ts +33 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummaryImage.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/SummarySeeAll.d.ts +17 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/TableSummary.d.ts +34 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryCatalogue.d.ts +64 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryChartData.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryModel.d.ts +152 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/summaryWidth.d.ts +22 -0
- package/dist/types/shared-web-ui/src/DataTable/summary/useTableSummary.d.ts +18 -0
- package/dist/types/shared-web-ui/src/DataTable/types.d.ts +1145 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/AutoHeight.d.ts +9 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DateRangePicker.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
- package/dist/types/shared-web-ui/src/DataTable/ui-local/ReactModal.d.ts +20 -0
- package/dist/types/shared-web-ui/src/DataTable/ui.d.ts +13 -0
- package/dist/types/shared-web-ui/src/DataTable/useDataChangeTracker.d.ts +11 -0
- package/dist/types/shared-web-ui/src/DataTable/useTable.d.ts +12 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/columnOrder.d.ts +1 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/diff.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/fileActions.d.ts +19 -0
- package/dist/types/shared-web-ui/src/DataTable/vendor/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/DataTable/virtual/useVirtualLines.d.ts +27 -0
- package/dist/types/shared-web-ui/src/DatePicker/Calendar.d.ts +14 -0
- package/dist/types/shared-web-ui/src/DatePicker/DatePicker.d.ts +5 -0
- package/dist/types/shared-web-ui/src/DatePicker/TimeField.d.ts +16 -0
- package/dist/types/shared-web-ui/src/DatePicker/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/DatePicker/useOneMonthPane.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -45
- package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -36
- package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +24 -24
- package/dist/types/shared-web-ui/src/EditableTable/EditableTable.d.ts +0 -5
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableCell.d.ts +0 -18
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -11
- package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -32
- package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -15
- package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -9
- package/dist/types/shared-web-ui/src/FieldContext/useField.d.ts +0 -27
- package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -23
- package/dist/types/shared-web-ui/src/FieldContext/useFormKeyboard.d.ts +0 -3
- package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Floating/index.d.ts +3 -0
- package/dist/types/shared-web-ui/src/Floating/layers.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Floating/scrollLock.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Floating/useFloatingLayer.d.ts +20 -0
- package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +6 -25
- package/dist/types/shared-web-ui/src/Popover/floatingPosition.d.ts +17 -0
- package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -11
- package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -13
- package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
- package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -22
- package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -8
- package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -1
- package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -12
- package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -30
- package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -39
- package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -24
- package/dist/types/shared-web-ui/src/Scroll/ScrollRule.d.ts +2 -0
- package/dist/types/shared-web-ui/src/Scroll/ScrollStrip.d.ts +9 -0
- package/dist/types/shared-web-ui/src/Scroll/index.d.ts +4 -0
- package/dist/types/shared-web-ui/src/Scroll/labels.d.ts +5 -0
- package/dist/types/shared-web-ui/src/Scroll/scrollActivity.d.ts +14 -0
- package/dist/types/shared-web-ui/src/Scroll/ui.d.ts +1 -0
- package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -31
- package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -15
- package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -43
- package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -14
- package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -9
- package/dist/types/shared-web-ui/src/Toast/toast.types.d.ts +0 -13
- package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -16
- package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -9
- package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -14
- package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -41
- package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -8
- package/dist/types/shared-web-ui/src/index.d.ts +5 -0
- package/dist/ui-DJFwpPdX.js +4997 -0
- package/package.json +9 -7
|
@@ -1,83 +1,50 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quoin designer — the contracts its editors are built against.
|
|
3
|
-
*
|
|
4
|
-
* Every editor receives the template, the registry, and ONE way to change the template: `edit`,
|
|
5
|
-
* which runs a pure operation from `shared-logic/report/edit` through the designer's undo history.
|
|
6
|
-
* No editor keeps its own copy of the template or writes to it any other way — that is what makes
|
|
7
|
-
* undo, the live preview and the Save gate properties of the designer rather than of each control.
|
|
8
|
-
*/
|
|
9
1
|
import type { FieldType, PlaceholderFormat, ReportConditionGroup, ReportRegistry, ReportTemplate, TableBlock, TextStyle } from '../../../published/dcs-ui/src/publicTypes';
|
|
10
2
|
import type { AlignedRowsTarget, DesignerSelection, FieldPlace } from '../../../published/dcs-ui/src/publicLogic';
|
|
11
|
-
/** `coalesceKey` groups a run of keystrokes on one thing into a single undo step. */
|
|
12
3
|
export type TemplateEdit = (change: (t: ReportTemplate) => ReportTemplate, coalesceKey?: string) => void;
|
|
13
4
|
export interface EditorContext {
|
|
14
5
|
template: ReportTemplate;
|
|
15
6
|
registry: ReportRegistry;
|
|
16
7
|
edit: TemplateEdit;
|
|
17
8
|
onSelect: (selection: DesignerSelection) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Which tab a panel was left on, kept OUTSIDE the panel.
|
|
20
|
-
*
|
|
21
|
-
* Panel state used to live in the panel, so returning from a column re-mounted the table editor
|
|
22
|
-
* on its first tab — you left from Columns and came back to Data, with the column you were
|
|
23
|
-
* editing off screen behind a tab you had to find again. Held here, leaving and coming back
|
|
24
|
-
* lands where you were.
|
|
25
|
-
*/
|
|
26
9
|
panelTab?: (key: string, fallback: string) => string;
|
|
27
10
|
setPanelTab?: (key: string, value: string) => void;
|
|
28
11
|
}
|
|
29
|
-
/** Where a table-scoped editor points. */
|
|
30
12
|
export interface TableAddress {
|
|
31
13
|
bandId: string;
|
|
32
14
|
blockId: string;
|
|
33
15
|
}
|
|
34
|
-
/**
|
|
35
|
-
* "Print this only when …" — a list of rules matched all/any. Offers only the fields that resolve
|
|
36
|
-
* where the condition sits (`place`, and `table` when inside one). `null` removes the condition.
|
|
37
|
-
*/
|
|
38
16
|
export interface ConditionEditorProps {
|
|
39
17
|
registry: ReportRegistry;
|
|
40
18
|
template: ReportTemplate;
|
|
41
19
|
table?: Pick<TableBlock, 'data'>;
|
|
42
|
-
/** Defaults to `condition`. */
|
|
43
20
|
place?: FieldPlace;
|
|
44
21
|
value?: ReportConditionGroup;
|
|
45
22
|
onChange: (group: ReportConditionGroup | null) => void;
|
|
46
|
-
/** Heading shown above the rules. Defaults to "Show only when". */
|
|
47
23
|
label?: string;
|
|
48
24
|
}
|
|
49
25
|
export type StyleControl = 'bold' | 'italic' | 'underline' | 'fontSize' | 'textCase' | 'color' | 'fill';
|
|
50
|
-
/** A compact row of style toggles and inputs. `undefined` means "no style of its own". */
|
|
51
26
|
export interface StyleEditorProps {
|
|
52
27
|
value?: TextStyle;
|
|
53
28
|
onChange: (style: TextStyle | undefined) => void;
|
|
54
|
-
/** Defaults to bold, italic, underline, font size and text case. */
|
|
55
29
|
controls?: StyleControl[];
|
|
56
30
|
}
|
|
57
|
-
/** How a value prints: number decimals/grouping/sign, date pattern, prefix, suffix, empty text. */
|
|
58
31
|
export interface FormatEditorProps {
|
|
59
32
|
value?: PlaceholderFormat;
|
|
60
|
-
/** Picks the sensible first choice of format type. */
|
|
61
33
|
fieldType?: FieldType;
|
|
62
34
|
onChange: (format: PlaceholderFormat | undefined) => void;
|
|
63
35
|
}
|
|
64
|
-
/** One field of a row set, as a Select. */
|
|
65
36
|
export interface FieldSelectProps {
|
|
66
37
|
registry: ReportRegistry;
|
|
67
38
|
rowSet?: string;
|
|
68
39
|
value?: string;
|
|
69
40
|
onChange: (key: string | undefined) => void;
|
|
70
41
|
label?: string;
|
|
71
|
-
/** When set, a first option meaning "none", with this label. */
|
|
72
42
|
noneLabel?: string;
|
|
73
|
-
/** Narrow the fields offered. */
|
|
74
43
|
only?: 'aggregatable' | 'number';
|
|
75
44
|
}
|
|
76
|
-
/** Several fields of a row set, as checkboxes. */
|
|
77
45
|
export interface FieldSetProps {
|
|
78
46
|
label: string;
|
|
79
47
|
hint?: string;
|
|
80
|
-
/** `group` sorts the chooser into named blocks; the group `Internal` is hidden until asked for. */
|
|
81
48
|
fields: Array<{
|
|
82
49
|
key: string;
|
|
83
50
|
label: string;
|
|
@@ -86,21 +53,15 @@ export interface FieldSetProps {
|
|
|
86
53
|
selected: string[];
|
|
87
54
|
onChange: (keys: string[]) => void;
|
|
88
55
|
}
|
|
89
|
-
/** A table block: its data, heading, sections, closing rows, look, and the list of its columns. */
|
|
90
56
|
export interface TableEditorProps extends EditorContext, TableAddress {
|
|
91
57
|
}
|
|
92
|
-
/** One column of a table. */
|
|
93
58
|
export interface ColumnEditorProps extends EditorContext, TableAddress {
|
|
94
59
|
columnId: string;
|
|
95
60
|
}
|
|
96
|
-
/** Rows aligned to a table's columns: its closing rows, or its sections' heading or subtotal rows. */
|
|
97
61
|
export interface AlignedRowsEditorProps extends EditorContext, TableAddress {
|
|
98
62
|
target: AlignedRowsTarget;
|
|
99
63
|
}
|
|
100
|
-
/** Any block that is not a table: text, image, QR, barcode, line, space — plus the settings every block has. */
|
|
101
64
|
export interface BlockEditorProps extends EditorContext, TableAddress {
|
|
102
65
|
}
|
|
103
|
-
/** The template's print options. */
|
|
104
66
|
export type OptionsEditorProps = EditorContext;
|
|
105
|
-
/** The page watermark. */
|
|
106
67
|
export type WatermarkEditorProps = EditorContext;
|
|
@@ -1,44 +1,20 @@
|
|
|
1
1
|
import type { ReportContext, ReportRegistry, ReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
|
|
2
2
|
import { type CanvasHighlight, type CanvasTarget, type ValidationIssue } from '../../../published/dcs-ui/src/publicLogic';
|
|
3
|
-
/**
|
|
4
|
-
* Quoin — a live preview of a template.
|
|
5
|
-
*
|
|
6
|
-
* This is the designer's canvas, built before the designer. It renders through the HTML renderer
|
|
7
|
-
* rather than pdfmake, which means no PDF toolchain in a shared package, redraw on every
|
|
8
|
-
* keystroke, and — because the engine owns the layout — the same page boxes, column widths and
|
|
9
|
-
* line breaks the PDF will have.
|
|
10
|
-
*
|
|
11
|
-
* It never throws. A template being edited is malformed most of the time; a preview that blanks
|
|
12
|
-
* or crashes while someone is halfway through typing a field name is useless. Errors are shown
|
|
13
|
-
* beside the pages, and whatever still renders is rendered.
|
|
14
|
-
*
|
|
15
|
-
* With `onTargetClick` it is also a surface to select from: the renderer tags every band and block
|
|
16
|
-
* with its id, a click reports the nearest ones, and `highlight` outlines the current selection.
|
|
17
|
-
* The outline is CSS added beside the pages rather than a change to the rendered HTML, so selecting
|
|
18
|
-
* something never re-runs layout.
|
|
19
|
-
*/
|
|
20
3
|
export interface ReportPreviewProps {
|
|
21
4
|
template: ReportTemplate;
|
|
22
5
|
context: ReportContext;
|
|
23
6
|
registry: ReportRegistry;
|
|
24
|
-
/** Page edges and shadow. Off when embedding for print. */
|
|
25
7
|
pageChrome?: boolean;
|
|
26
|
-
/** Hide the issue list even when there are issues — the designer may show them elsewhere. */
|
|
27
8
|
hideIssues?: boolean;
|
|
28
|
-
/** Scale the pages, so a full A4 fits a panel. 1 = actual size. */
|
|
29
9
|
zoom?: number;
|
|
30
10
|
className?: string;
|
|
31
|
-
/** Called after each render with what validation found and how many pages resulted. */
|
|
32
11
|
onRender?: (info: {
|
|
33
12
|
issues: ValidationIssue[];
|
|
34
13
|
pageCount: number;
|
|
35
14
|
error?: string;
|
|
36
15
|
}) => void;
|
|
37
|
-
/** Elements to outline as selected — see `canvasHighlight` in shared-logic. */
|
|
38
16
|
highlight?: CanvasHighlight[];
|
|
39
|
-
/** A click on the pages, as the ids of the band and block under the pointer. */
|
|
40
17
|
onTargetClick?: (target: CanvasTarget) => void;
|
|
41
18
|
}
|
|
42
19
|
export declare const ReportPreview: ({ template, context, registry, pageChrome, hideIssues, zoom, className, onRender, highlight, onTargetClick, }: ReportPreviewProps) => import("react").JSX.Element;
|
|
43
|
-
/** Whether a template is safe to save, for a designer's Save button. */
|
|
44
20
|
export declare const canSaveTemplate: (template: ReportTemplate, registry: ReportRegistry) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type ScrollLabels } from './labels';
|
|
3
|
+
export interface ScrollStripProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
frameClassName?: string;
|
|
6
|
+
step?: number;
|
|
7
|
+
labels?: Partial<ScrollLabels>;
|
|
8
|
+
}
|
|
9
|
+
export declare function ScrollStrip({ children, className, frameClassName, step, labels, ...rest }: ScrollStripProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ScrollRule, useScrollRule } from './ScrollRule';
|
|
2
|
+
export { ScrollStrip, type ScrollStripProps } from './ScrollStrip';
|
|
3
|
+
export { SCROLL_FADE_SELECTOR, SCROLL_IDLE_MS, SCROLLING_CLASS, applyScrollEdges, installScrollActivity, isScrollActivityInstalled, readScrollEdges, type ScrollAxis, type ScrollEdges, } from './scrollActivity';
|
|
4
|
+
export { DEFAULT_SCROLL_LABELS, type ScrollLabels } from './labels';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SCROLLING_CLASS = "is-scrolling";
|
|
2
|
+
export declare const SCROLL_IDLE_MS = 1000;
|
|
3
|
+
export declare const SCROLL_FADE_SELECTOR = ".scroll-fade-x, .scroll-fade-y";
|
|
4
|
+
export type ScrollAxis = 'x' | 'y';
|
|
5
|
+
export interface ScrollEdges {
|
|
6
|
+
start: boolean;
|
|
7
|
+
end: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function readScrollEdges(el: Element, axis: ScrollAxis): ScrollEdges;
|
|
10
|
+
export declare function applyScrollEdges(el: Element): void;
|
|
11
|
+
export declare function installScrollActivity(options?: {
|
|
12
|
+
idleMs?: number;
|
|
13
|
+
}): () => void;
|
|
14
|
+
export declare const isScrollActivityInstalled: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from '../Button';
|
|
@@ -2,38 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import type { NavItem } from '../../../published/dcs-ui/src/publicTypes';
|
|
3
3
|
export type SidebarDensity = 'compact' | 'comfortable';
|
|
4
4
|
export interface SidebarProps {
|
|
5
|
-
/** Already filtered and authorised by the caller. Depth is unbounded. */
|
|
6
5
|
items: NavItem[];
|
|
7
|
-
/** `id` of the current page. Ancestors are marked as on-trail automatically. */
|
|
8
6
|
activeId?: string | null;
|
|
9
7
|
onSelect?: (item: NavItem) => void;
|
|
10
|
-
/** Element for each row — `NavLink`, `Link`, `a`. Defaults to `a` when an item has `href`. */
|
|
11
8
|
as?: React.ElementType;
|
|
12
|
-
/**
|
|
13
|
-
* Row density. **`compact` by default** — a nav list is scanned, not read, and generous
|
|
14
|
-
* padding pushes real destinations below the fold. `comfortable` for touch.
|
|
15
|
-
*/
|
|
16
9
|
density?: SidebarDensity;
|
|
17
|
-
/**
|
|
18
|
-
* Icon-only rail. Children move into a hover flyout rather than disappearing.
|
|
19
|
-
* **Ignored below 600px**, where the sidebar is a drawer — a permanent 56px strip on a
|
|
20
|
-
* phone costs space and says little.
|
|
21
|
-
*/
|
|
22
10
|
collapsed?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Drawer state below 600px, where the sidebar is off-canvas. Above it the sidebar is a
|
|
25
|
-
* column in the layout and this does nothing, so a desktop-only app can ignore it.
|
|
26
|
-
*/
|
|
27
11
|
open?: boolean;
|
|
28
|
-
/** Fired by the scrim and by Escape while the drawer is open. */
|
|
29
12
|
onClose?: () => void;
|
|
30
13
|
defaultExpandedIds?: string[];
|
|
31
14
|
expandedIds?: string[];
|
|
32
15
|
onExpandedChange?: (ids: string[]) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Trailing controls for a row — a pin, a rename. Revealed on hover or focus-within, so a
|
|
35
|
-
* long list is not a wall of icons. The library stays out of what the action MEANS.
|
|
36
|
-
*/
|
|
37
16
|
renderItemActions?: (item: NavItem) => React.ReactNode;
|
|
38
17
|
header?: React.ReactNode;
|
|
39
18
|
footer?: React.ReactNode;
|
|
@@ -41,15 +20,5 @@ export interface SidebarProps {
|
|
|
41
20
|
style?: React.CSSProperties;
|
|
42
21
|
'aria-label'?: string;
|
|
43
22
|
}
|
|
44
|
-
/**
|
|
45
|
-
* A navigation rail over the shared `NavItem` shape.
|
|
46
|
-
*
|
|
47
|
-
* It renders; it decides nothing. Building items from a route registry and filtering them by
|
|
48
|
-
* permission is app logic — which is also what makes a **dynamic** registry work with no
|
|
49
|
-
* special support: a runtime-generated branch is just a different array.
|
|
50
|
-
*
|
|
51
|
-
* The active TRAIL comes from `navTrailIds` in shared-logic, the same function Breadcrumbs uses
|
|
52
|
-
* to render the path, so the two cannot disagree about where you are.
|
|
53
|
-
*/
|
|
54
23
|
declare const Sidebar: React.FC<SidebarProps>;
|
|
55
24
|
export default Sidebar;
|
|
@@ -2,32 +2,17 @@ import React from 'react';
|
|
|
2
2
|
export type SkeletonVariant = 'text' | 'rect' | 'circle';
|
|
3
3
|
export type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
|
|
4
4
|
export interface SkeletonProps {
|
|
5
|
-
/** Shape of the placeholder. Default `'text'`. */
|
|
6
5
|
variant?: SkeletonVariant;
|
|
7
6
|
width?: number | string;
|
|
8
7
|
height?: number | string;
|
|
9
|
-
/** Border-radius override (number = px). */
|
|
10
8
|
radius?: number | string;
|
|
11
|
-
/** Repeat the placeholder N times, stacked. Default 1. */
|
|
12
9
|
count?: number;
|
|
13
|
-
/** Gap between repeats (number = px). Default 8. */
|
|
14
10
|
gap?: number | string;
|
|
15
|
-
/** Width of the LAST line when `count > 1`, for a natural paragraph finish. Default '65%'. */
|
|
16
11
|
lastLineWidth?: number | string;
|
|
17
12
|
animation?: SkeletonAnimation;
|
|
18
|
-
/** Render inline-block instead of block. */
|
|
19
13
|
inline?: boolean;
|
|
20
14
|
className?: string;
|
|
21
15
|
style?: React.CSSProperties;
|
|
22
16
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Loading placeholder.
|
|
25
|
-
*
|
|
26
|
-
* Hookless and DOM-free on purpose: it renders identically on a server, which keeps it
|
|
27
|
-
* eligible for a future server-safe entry point alongside Badge, Avatar and Card.
|
|
28
|
-
*
|
|
29
|
-
* Always `aria-hidden` — a screen reader should hear the loading STATE from the region that
|
|
30
|
-
* owns it (`aria-busy`, or a live region), not a description of grey rectangles.
|
|
31
|
-
*/
|
|
32
17
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
33
18
|
export default Skeleton;
|
|
@@ -2,78 +2,35 @@ import React from 'react';
|
|
|
2
2
|
export type TabsVariant = 'line' | 'pill' | 'enclosed';
|
|
3
3
|
export type TabsSize = 'small' | 'medium';
|
|
4
4
|
export interface TabItem {
|
|
5
|
-
/** Identifies the tab. Matched against `value` to decide the active one. */
|
|
6
5
|
value: string;
|
|
7
6
|
label: React.ReactNode;
|
|
8
7
|
icon?: React.ReactNode;
|
|
9
|
-
/** Trailing count or marker. */
|
|
10
8
|
badge?: React.ReactNode;
|
|
11
9
|
disabled?: boolean;
|
|
12
|
-
/** Plain link target. Presence of this (or `as`) switches the strip to NAVIGATION mode. */
|
|
13
10
|
href?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Extra props for this item's element — how a router link gets its target, e.g.
|
|
16
|
-
* `{ to: '/businesses' }` for react-router's `NavLink`. Router-agnostic on purpose.
|
|
17
|
-
*/
|
|
18
11
|
props?: Record<string, unknown>;
|
|
19
12
|
}
|
|
20
13
|
export interface TabsProps {
|
|
21
14
|
items: TabItem[];
|
|
22
|
-
/** The active tab's `value`. */
|
|
23
15
|
value?: string;
|
|
24
|
-
/** Panel mode only — navigation mode leaves activation to the router. */
|
|
25
16
|
onChange?: (value: string, item: TabItem) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Element to render each tab with — `NavLink`, `Link`, `a`. Supplying it (or any item
|
|
28
|
-
* `href`) switches to NAVIGATION mode; see the semantics note on the component.
|
|
29
|
-
*/
|
|
30
17
|
as?: React.ElementType;
|
|
31
18
|
variant?: TabsVariant;
|
|
32
19
|
size?: TabsSize;
|
|
33
|
-
/** Stretch tabs to fill the strip. */
|
|
34
20
|
fullWidth?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Panel mode: move activation with arrow focus. Default true, which is right when panels
|
|
37
|
-
* are cheap to render; set false when switching a tab costs a fetch.
|
|
38
|
-
*/
|
|
39
21
|
activateOnFocus?: boolean;
|
|
40
|
-
/** Ties panels to tabs. Auto-generated if omitted. */
|
|
41
22
|
idPrefix?: string;
|
|
42
23
|
className?: string;
|
|
43
24
|
style?: React.CSSProperties;
|
|
44
25
|
'aria-label'?: string;
|
|
45
26
|
}
|
|
46
|
-
/**
|
|
47
|
-
* A tab strip in one of two modes, inferred from the items.
|
|
48
|
-
*
|
|
49
|
-
* **Panel mode** (default) — buttons in a `role="tablist"`, following the WAI-ARIA tabs
|
|
50
|
-
* pattern: roving tabindex, arrows, Home/End, disabled skipped.
|
|
51
|
-
*
|
|
52
|
-
* **Navigation mode** — used as soon as an item has `href` or `as` is supplied. Renders a
|
|
53
|
-
* `<nav>` of ordinary links: **no `role="tab"`, no roving tabindex**, and the active link gets
|
|
54
|
-
* `aria-current="page"`.
|
|
55
|
-
*
|
|
56
|
-
* That split is not cosmetic. `role="tab"` promises the element controls a panel in the SAME
|
|
57
|
-
* document; putting it on a link that navigates away lies to a screen reader, and the roving
|
|
58
|
-
* tabindex the pattern requires would also remove every other tab from the tab order — wrong
|
|
59
|
-
* for what is really a nav bar. Both apps here navigate by route (the console's `NavLink`s,
|
|
60
|
-
* the client's `useParams` + component map), so navigation mode is the common case, not the
|
|
61
|
-
* afterthought.
|
|
62
|
-
*/
|
|
63
27
|
declare const Tabs: React.FC<TabsProps>;
|
|
64
28
|
export interface TabPanelProps {
|
|
65
|
-
/** Must match the tab's `value`. */
|
|
66
29
|
value: string;
|
|
67
|
-
/** The strip's `idPrefix`, so the panel can point back at its tab. */
|
|
68
30
|
idPrefix: string;
|
|
69
|
-
/** Rendered only when active. */
|
|
70
31
|
active: boolean;
|
|
71
32
|
children?: React.ReactNode;
|
|
72
33
|
className?: string;
|
|
73
34
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Panel-mode content, wired to its tab. Panel mode only — in navigation mode the router owns
|
|
76
|
-
* what is on screen and there is nothing here to label.
|
|
77
|
-
*/
|
|
78
35
|
export declare const TabPanel: React.FC<TabPanelProps>;
|
|
79
36
|
export default Tabs;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToastApi, ToastDefaults } from './toast.types';
|
|
3
|
-
/**
|
|
4
|
-
* Fire a toast from anywhere below the `UIProvider`.
|
|
5
|
-
*
|
|
6
|
-
* Throws without one rather than no-opping: a swallowed error toast is worse than a crash at
|
|
7
|
-
* wire-up time, because the failure it was reporting then disappears silently too.
|
|
8
|
-
*/
|
|
9
3
|
export declare const useToast: () => ToastApi;
|
|
10
4
|
export interface ToastHostProps {
|
|
11
5
|
defaults?: ToastDefaults;
|
|
12
6
|
children?: React.ReactNode;
|
|
13
7
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Rendered once by `UIProvider`. Owns the toast queue and the position regions.
|
|
16
|
-
*
|
|
17
|
-
* Central hosting is the point: `react-toastify` needs a `<ToastContainer>` mounted by hand,
|
|
18
|
-
* which every consuming app has to remember and configure identically. Here the provider does
|
|
19
|
-
* it, and the provider is also the abstraction boundary — this implementation can change
|
|
20
|
-
* without any call site knowing.
|
|
21
|
-
*/
|
|
22
8
|
export declare const ToastHost: React.FC<ToastHostProps>;
|
|
@@ -2,18 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ToastRecord } from './toast.types';
|
|
3
3
|
interface ToastItemProps {
|
|
4
4
|
toast: ToastRecord;
|
|
5
|
-
/** Window focus is tracked once by the host, not per toast. */
|
|
6
5
|
windowFocused: boolean;
|
|
7
6
|
onDismiss: (id: string) => void;
|
|
8
7
|
exitDuration: number;
|
|
9
8
|
}
|
|
10
|
-
/**
|
|
11
|
-
* One toast. Owns its own dismiss timer so `pauseOnHover` can be per-toast rather than
|
|
12
|
-
* freezing the whole stack.
|
|
13
|
-
*
|
|
14
|
-
* The timer keeps a REMAINING budget rather than restarting: pausing subtracts elapsed time,
|
|
15
|
-
* resuming schedules what's left. Restarting on every hover would make a toast the user keeps
|
|
16
|
-
* brushing past effectively permanent.
|
|
17
|
-
*/
|
|
18
9
|
declare const ToastItem: React.FC<ToastItemProps>;
|
|
19
10
|
export default ToastItem;
|
|
@@ -3,22 +3,15 @@ export type ToastType = 'default' | 'success' | 'error' | 'warning' | 'info';
|
|
|
3
3
|
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
4
4
|
export interface ToastOptions {
|
|
5
5
|
type?: ToastType;
|
|
6
|
-
/** ms, or `false` to stay until dismissed. Default 5000. */
|
|
7
6
|
autoClose?: number | false;
|
|
8
7
|
position?: ToastPosition;
|
|
9
8
|
hideProgressBar?: boolean;
|
|
10
|
-
/** Click anywhere on the toast to dismiss. Default true. */
|
|
11
9
|
closeOnClick?: boolean;
|
|
12
10
|
pauseOnHover?: boolean;
|
|
13
|
-
/** Pause the timer while the window is in the background. Default true. */
|
|
14
11
|
pauseOnFocusLoss?: boolean;
|
|
15
|
-
/** Swipe sideways to dismiss. Default true. */
|
|
16
12
|
draggable?: boolean;
|
|
17
|
-
/** `false` hides it; a node replaces the default ✕. */
|
|
18
13
|
closeButton?: boolean | React.ReactNode;
|
|
19
|
-
/** `false` hides it; a node replaces the per-type glyph. */
|
|
20
14
|
icon?: React.ReactNode | false;
|
|
21
|
-
/** Supply to update or dedupe an existing toast instead of stacking a new one. */
|
|
22
15
|
id?: string;
|
|
23
16
|
onClose?: () => void;
|
|
24
17
|
className?: string;
|
|
@@ -28,23 +21,17 @@ export interface ToastRecord extends ToastOptions {
|
|
|
28
21
|
id: string;
|
|
29
22
|
message: React.ReactNode;
|
|
30
23
|
}
|
|
31
|
-
/** Defaults for every toast, set once on `UIProvider`. */
|
|
32
24
|
export interface ToastDefaults extends Omit<ToastOptions, 'id' | 'onClose'> {
|
|
33
|
-
/** Most recent first. Default false, matching the client's existing container. */
|
|
34
25
|
newestOnTop?: boolean;
|
|
35
|
-
/** Max visible at once; the rest queue. Default 4. */
|
|
36
26
|
limit?: number;
|
|
37
27
|
}
|
|
38
28
|
export interface ToastApi {
|
|
39
|
-
/** Returns the id, so it can be updated or dismissed later. */
|
|
40
29
|
toast: (message: React.ReactNode, opts?: ToastOptions) => string;
|
|
41
30
|
success: (message: React.ReactNode, opts?: ToastOptions) => string;
|
|
42
31
|
error: (message: React.ReactNode, opts?: ToastOptions) => string;
|
|
43
32
|
warning: (message: React.ReactNode, opts?: ToastOptions) => string;
|
|
44
33
|
info: (message: React.ReactNode, opts?: ToastOptions) => string;
|
|
45
|
-
/** Change a live toast in place — a pending toast becoming success or error. */
|
|
46
34
|
update: (id: string, message: React.ReactNode, opts?: ToastOptions) => void;
|
|
47
|
-
/** One id, or all of them when omitted. */
|
|
48
35
|
dismiss: (id?: string) => void;
|
|
49
36
|
isActive: (id: string) => boolean;
|
|
50
37
|
}
|
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TooltipProp, TooltipProps } from '../../../published/dcs-ui/src/publicTypes';
|
|
3
|
-
/**
|
|
4
|
-
* Wraps any single element in a tooltip:
|
|
5
|
-
*
|
|
6
|
-
* <Tooltip content="Delete row"><IconButton …/></Tooltip>
|
|
7
|
-
*
|
|
8
|
-
* The child is cloned, not wrapped — the old client tooltip put a <div> around
|
|
9
|
-
* its trigger, which silently broke flex and grid layouts wherever it was used.
|
|
10
|
-
*
|
|
11
|
-
* Components with their own `tooltip` prop (Button, the fields, Collapsible,
|
|
12
|
-
* Typography) call `useTooltip` directly instead of nesting this.
|
|
13
|
-
*/
|
|
14
3
|
export declare const Tooltip: React.FC<TooltipProps>;
|
|
15
4
|
export interface TooltipHelpIconProps {
|
|
16
5
|
tooltip: TooltipProp;
|
|
17
|
-
/** Names the icon for screen readers. The tooltip itself is the description. */
|
|
18
6
|
label?: string;
|
|
19
7
|
}
|
|
20
|
-
/**
|
|
21
|
-
* The ⓘ that sits after a field label. It is a real button so it is reachable by
|
|
22
|
-
* Tab — a plain <span> tooltip is invisible to keyboard users.
|
|
23
|
-
*/
|
|
24
8
|
export declare const TooltipHelpIcon: React.FC<TooltipHelpIconProps>;
|
|
25
9
|
export default Tooltip;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TooltipProp } from '../../../published/dcs-ui/src/publicTypes';
|
|
3
3
|
export interface UseTooltipResult {
|
|
4
|
-
/** Spread onto whatever element should trigger the tooltip. */
|
|
5
4
|
triggerProps: {
|
|
6
5
|
onPointerEnter: (event: React.PointerEvent<HTMLElement>) => void;
|
|
7
6
|
onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
|
|
@@ -10,15 +9,7 @@ export interface UseTooltipResult {
|
|
|
10
9
|
onBlur: () => void;
|
|
11
10
|
'aria-describedby'?: string;
|
|
12
11
|
};
|
|
13
|
-
/** Render next to the trigger. Empty when there is no tooltip. */
|
|
14
12
|
tooltipNode: React.ReactNode;
|
|
15
|
-
/** True when a tooltip is actually configured. */
|
|
16
13
|
hasTooltip: boolean;
|
|
17
14
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Hover/focus tooltip built on the Popover API: the tip lives in the top layer,
|
|
20
|
-
* so no portal, no z-index management, and no clipping by an `overflow: hidden`
|
|
21
|
-
* ancestor — which is what breaks tooltips inside table cells and inside
|
|
22
|
-
* Collapsible items (they carry `contain: layout style paint`).
|
|
23
|
-
*/
|
|
24
15
|
export declare function useTooltip(tooltip: TooltipProp | undefined): UseTooltipResult;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where floating layers (Select and Suggest dropdowns today; Dialog and Popover when they
|
|
3
|
-
* land) render.
|
|
4
|
-
*
|
|
5
|
-
* `null` means "no provider" — every consumer falls back to `document.body`, which is what
|
|
6
|
-
* they did before this context existed. So adding the context changed nothing for apps that
|
|
7
|
-
* do not mount a `UIProvider`.
|
|
8
|
-
*
|
|
9
|
-
* Why it is worth having one owned node rather than body: everything floating shares a single
|
|
10
|
-
* stacking context that the library controls. Portalling straight to body puts each layer in
|
|
11
|
-
* whatever z-index race the host app happens to have — the class of problem behind the
|
|
12
|
-
* loading overlay that covered a confirm dialog and locked the app.
|
|
13
|
-
*/
|
|
14
1
|
export declare const UIPortalContext: import("react").Context<HTMLElement | null>;
|
|
15
|
-
/** The container floating layers should portal into. Falls back to `document.body`. */
|
|
16
2
|
export declare const useUIPortalContainer: () => HTMLElement | null;
|
|
@@ -4,51 +4,10 @@ import type { ToastDefaults } from '../Toast/toast.types';
|
|
|
4
4
|
import { type ResolvedUITheme, type UITheme } from './UIThemeContext';
|
|
5
5
|
export interface UIProviderProps extends Pick<FieldProviderProps, 'size' | 'variant' | 'layout'> {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Theme to apply, written to `data-theme` on the root element.
|
|
9
|
-
*
|
|
10
|
-
* **Omit it entirely** if the host app already manages `data-theme` — the provider then
|
|
11
|
-
* never touches the DOM, and `useUITheme` throws rather than pretending to be in charge.
|
|
12
|
-
* `'system'` follows the OS and keeps following it.
|
|
13
|
-
*/
|
|
14
7
|
theme?: UITheme;
|
|
15
|
-
/** Called whenever the theme changes, including the first resolve of `'system'`. */
|
|
16
8
|
onThemeChange?: (resolved: ResolvedUITheme, requested: UITheme) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Node for floating layers to portal into. Pass one to control placement yourself;
|
|
19
|
-
* omit and the provider creates and owns a single container appended to `<body>`.
|
|
20
|
-
* Pass `false` to opt out entirely, leaving every layer on `document.body`.
|
|
21
|
-
*/
|
|
22
9
|
portalContainer?: HTMLElement | false;
|
|
23
|
-
/**
|
|
24
|
-
* Defaults for every toast — position, autoClose, limit, newestOnTop. The host is mounted
|
|
25
|
-
* either way; this only configures it, so `useToast()` works with no setup.
|
|
26
|
-
*/
|
|
27
10
|
toast?: ToastDefaults;
|
|
28
11
|
}
|
|
29
|
-
/**
|
|
30
|
-
* One optional wrapper for everything a design system needs at RUNTIME: the theme, a stacking
|
|
31
|
-
* context for floating layers, and field defaults for the tree below.
|
|
32
|
-
*
|
|
33
|
-
* Optional is the point. Every component works standalone with sensible defaults — this only
|
|
34
|
-
* ADDS. A library that throws without its provider turns a one-line install into a setup
|
|
35
|
-
* chore.
|
|
36
|
-
*
|
|
37
|
-
* Its real value is not the saved setup line, it is that it is an abstraction boundary: the
|
|
38
|
-
* portal container can change, a toast host can appear, theming can gain persistence — none
|
|
39
|
-
* of which is a breaking change for anyone already wrapping their app.
|
|
40
|
-
*
|
|
41
|
-
* It DOES host the dialog and toast layers (`useDialog`, `useToast`), because both need a host
|
|
42
|
-
* somewhere and making every call site render one is the mistake this replaces.
|
|
43
|
-
*
|
|
44
|
-
* NOT here on purpose:
|
|
45
|
-
* - **Stylesheet.** `import '@dcs-tech/ui/style.css'` stays explicit. Side-effect importing
|
|
46
|
-
* it from the bundle takes CSS-order control away from consumers and breaks in setups that
|
|
47
|
-
* do not process CSS imports out of node_modules.
|
|
48
|
-
*
|
|
49
|
-
* It also hosts the toast layer (`useToast`), for the same reason — and because owning it is
|
|
50
|
-
* what removes `react-toastify`'s `<ToastContainer>` mount contract, which every consuming app
|
|
51
|
-
* would otherwise have to remember and configure identically.
|
|
52
|
-
*/
|
|
53
12
|
declare const UIProvider: React.FC<UIProviderProps>;
|
|
54
13
|
export default UIProvider;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** What the app asks for. `system` follows the OS and keeps following it. */
|
|
2
1
|
export type UITheme = 'light' | 'dark' | 'system';
|
|
3
|
-
/** What is actually on screen — `system` is resolved to one of the two. */
|
|
4
2
|
export type ResolvedUITheme = 'light' | 'dark';
|
|
5
3
|
export interface UIThemeValue {
|
|
6
4
|
theme: UITheme;
|
|
@@ -8,10 +6,4 @@ export interface UIThemeValue {
|
|
|
8
6
|
setTheme: (theme: UITheme) => void;
|
|
9
7
|
}
|
|
10
8
|
export declare const UIThemeContext: import("react").Context<UIThemeValue | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Read or change the theme.
|
|
13
|
-
*
|
|
14
|
-
* Throws outside a `UIProvider` that manages theme, rather than returning a plausible
|
|
15
|
-
* default: a silent `'light'` would make a broken toggle look like a working one.
|
|
16
|
-
*/
|
|
17
9
|
export declare const useUITheme: () => UIThemeValue;
|
|
@@ -22,6 +22,8 @@ export { Input } from './Input';
|
|
|
22
22
|
export type { InputProps, InputType, InputVariant, InputSize, InputLayout, ValidationConfig, IconConfig, } from './Input';
|
|
23
23
|
export { Select, useSelect } from './Select';
|
|
24
24
|
export type { SelectProps, SelectOption, SelectSize, SelectLayout, SelectState, SelectEvent, SelectAccessibilityConfig, UseSelectReturn, UseSelectConfig, MultiSelectConfig, SearchConfig, SortConfig, ReorderConfig, GroupConfig, VirtualScrollConfig, KeyboardConfig, DropdownPosition, PositionConfig, EmptyStateConfig, LoadingConfig, ChipProps, GroupDisplayProps, OptionItemProps, AutoScrollState, DropdownDimensions, OptionValue, } from './Select';
|
|
25
|
+
export { DatePicker, Calendar } from './DatePicker';
|
|
26
|
+
export type { DatePickerProps, DatePickerBaseProps, DatePickerSingleProps, DatePickerRangeProps, DateRangeValue, DateDisplayFormat, DateTextOrder, CalendarProps, } from './DatePicker';
|
|
25
27
|
export { Suggest, SuggestionList, useSuggest } from './Suggest';
|
|
26
28
|
export { FORMATTER_UTILITY_CLASSES, SUGGEST_SEARCH_ENGINE_OPTIONS, SUGGEST_SEARCH_MODE_OPTIONS, } from './Suggest';
|
|
27
29
|
export type { SuggestProps, SuggestSize, SuggestLayout, SuggestSearchEngine, SuggestSearchMode, RenderKey, SuggestionConfig, SuggestionItemProps, SuggestionListProps, SuggestionGroup, UseSuggestOptions, UseSuggestReturn, SuggestSearchOptions, } from './Suggest';
|
|
@@ -37,6 +39,9 @@ export { parseFormat, resolveFormat, extractPlaceholders, validateFormat, } from
|
|
|
37
39
|
export type { ChipInputProps, ChipInputSize, ChipInputLayout, ChipKey, ChipSource, ChipSources, ChipSuggestionItem, GroupedSuggestions, ParsedSegment, ResolveOptions, ExtractedPlaceholder, FormatValidationResult, UseChipSuggestionsOptions, UseChipSuggestionsReturn, } from './ChipInput';
|
|
38
40
|
export { EditableTable, EditableTableRow, EditableTableActions, EditableTableCell, EditableTableSummary, useEditableTable } from './EditableTable';
|
|
39
41
|
export type { EditableTableProps, EditableTableRowProps, EditableTableActionsProps, EditableTableColumnDefinition, EditableTableFocusState, EditableTableCopyConfig, EditableTableAddConfig, EditableTableDeleteConfig, EditableTableFooterConfig, EditableTableSummaryContext, EditableTableSummaryActions, TableColumnDisplayProps, TableSummaryConfig, ColumnSummaryConfig, SummaryItem, SummaryGroup, CellStyle, ColumnAlign, ColumnSticky, } from './EditableTable';
|
|
42
|
+
export * from './DataTable';
|
|
43
|
+
export * from './Charts';
|
|
44
|
+
export * from './Scroll';
|
|
40
45
|
export { ColorSchemeSelect } from './ColorSchemeSelect';
|
|
41
46
|
export type { ColorSchemeSelectProps } from './ColorSchemeSelect';
|
|
42
47
|
export { UIProvider, useUIPortalContainer, useUITheme } from './UIProvider';
|