@scattered-light/loomiere-base-ui 0.10.0 → 0.12.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 (80) hide show
  1. package/README.md +8 -0
  2. package/dist/{chunk-PV5YOQMN.js → chunk-2NAYVQ2U.js} +3 -3
  3. package/dist/{chunk-PV5YOQMN.js.map → chunk-2NAYVQ2U.js.map} +1 -1
  4. package/dist/custom/collection/index.d.ts +31 -2
  5. package/dist/custom/collection/index.js +63 -24
  6. package/dist/custom/collection/index.js.map +1 -1
  7. package/dist/custom/index.d.ts +1 -1
  8. package/dist/custom/index.js +1 -1
  9. package/dist/design-system/components/DataTable/README.md +1 -1
  10. package/dist/design-system/components/DataTable/preview.html +171 -171
  11. package/dist/design-system/components/SideNav/README.md +1 -1
  12. package/dist/design-system/components/bundle.js +6 -6
  13. package/dist/design-system/components/index.d.ts +1 -1
  14. package/dist/design-system/components/styles.css +112 -68
  15. package/dist/{index-D88kSSlM.d.ts → index-D4DT1VE-.d.ts} +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/styles/components/Accordion.css +1 -1
  19. package/dist/styles/components/AlertDialog.css +1 -1
  20. package/dist/styles/components/Autocomplete.css +1 -1
  21. package/dist/styles/components/Avatar.css +1 -1
  22. package/dist/styles/components/Button.css +1 -1
  23. package/dist/styles/components/Checkbox.css +1 -1
  24. package/dist/styles/components/CheckboxGroup.css +1 -1
  25. package/dist/styles/components/Collapsible.css +1 -1
  26. package/dist/styles/components/Combobox.css +1 -1
  27. package/dist/styles/components/ContextMenu.css +1 -1
  28. package/dist/styles/components/Dialog.css +1 -1
  29. package/dist/styles/components/Drawer.css +1 -1
  30. package/dist/styles/components/Field.css +1 -1
  31. package/dist/styles/components/Fieldset.css +1 -1
  32. package/dist/styles/components/Form.css +1 -1
  33. package/dist/styles/components/Input.css +1 -1
  34. package/dist/styles/components/Menu.css +1 -1
  35. package/dist/styles/components/Menubar.css +1 -1
  36. package/dist/styles/components/Meter.css +1 -1
  37. package/dist/styles/components/NavigationMenu.css +1 -1
  38. package/dist/styles/components/NumberField.css +1 -1
  39. package/dist/styles/components/OTPField.css +1 -1
  40. package/dist/styles/components/Popover.css +1 -1
  41. package/dist/styles/components/PreviewCard.css +1 -1
  42. package/dist/styles/components/Progress.css +1 -1
  43. package/dist/styles/components/Radio.css +1 -1
  44. package/dist/styles/components/ScrollArea.css +1 -1
  45. package/dist/styles/components/Select.css +1 -1
  46. package/dist/styles/components/Separator.css +1 -1
  47. package/dist/styles/components/Slider.css +1 -1
  48. package/dist/styles/components/Switch.css +1 -1
  49. package/dist/styles/components/Tabs.css +1 -1
  50. package/dist/styles/components/Toast.css +1 -1
  51. package/dist/styles/components/Toggle.css +1 -1
  52. package/dist/styles/components/ToggleGroup.css +1 -1
  53. package/dist/styles/components/Toolbar.css +1 -1
  54. package/dist/styles/components/Tooltip.css +1 -1
  55. package/dist/styles/custom/AppBar.css +1 -1
  56. package/dist/styles/custom/Badge.css +1 -1
  57. package/dist/styles/custom/Collection.css +1 -1
  58. package/dist/styles/custom/CollectionPagination.css +1 -1
  59. package/dist/styles/custom/CollectionToolbar.css +1 -1
  60. package/dist/styles/custom/DataList.css +1 -1
  61. package/dist/styles/custom/DataTable.css +44 -1
  62. package/dist/styles/custom/DatePicker.css +1 -1
  63. package/dist/styles/custom/DescriptionList.css +1 -1
  64. package/dist/styles/custom/EditableList.css +1 -1
  65. package/dist/styles/custom/EmptyState.css +1 -1
  66. package/dist/styles/custom/ListDetail.css +1 -1
  67. package/dist/styles/custom/MoneyField.css +1 -1
  68. package/dist/styles/custom/PickerButton.css +1 -1
  69. package/dist/styles/custom/Sheet.css +1 -1
  70. package/dist/styles/custom/SideNav.css +10 -9
  71. package/dist/styles/custom/Splitter.css +1 -1
  72. package/dist/styles/custom/StatFigure.css +1 -1
  73. package/dist/styles/custom/Table.css +1 -1
  74. package/dist/styles/index.css +1 -1
  75. package/dist/styles/reset/accessibility.css +1 -1
  76. package/dist/styles/reset/reset-accessibility.css +1 -1
  77. package/dist/styles/reset/reset-tailwind.css +1 -1
  78. package/dist/styles/reset/reset.css +1 -1
  79. package/dist/styles/tailwind.css +1 -1
  80. package/package.json +2 -2
package/README.md CHANGED
@@ -166,6 +166,14 @@ Pieces for pages that read like an accountant's working paper. They use the them
166
166
 
167
167
  Totals in a plain table are rows: `<tr data-total="subtotal">` rules a line above, `<tr data-total="grand">` adds a double rule under. Put `data-rule="none"` on label and blank cells so the rules only run under the figures. In a DataTable, `totalStyle="subtotal"` or `"grand"` does the same to the footer (the default, `"band"`, keeps the header tray).
168
168
 
169
+ A tree in a DataTable (`getSubRows`) has options for a register of parents and children, such as clients and their Entities:
170
+
171
+ - `useCollection({ pageBy: 'top-level', pageSize: 5 })` pages by parents, so a page holds whole parents with their children. The pager counts parents: pass `collection.pageTotal` as `total`. `collection.pageRows` is the leaf rows of the page, children of collapsed parents included.
172
+ - `totalRows={[{ scope: 'page', label }, { scope: 'all', label }]}` writes several footer rows. A `page` row totals the current page and is ruled as a subtotal; an `all` row totals every filtered row and is ruled as the grand total. `label` is text or a function of the collection, such as `(c) => \`Page ${c.page} of ${c.pageCount} subtotal\``.
173
+ - A `rowHeader` column's `cell` now draws the row's name: put a second line or a count beside it. The row's link or button keeps the plain name as its accessible name.
174
+ - `treeLines` draws an elbow from each child's name back up to its parent. `disclosure="small"` shrinks the expand button so a parent is as tall as its children. `getRowKind={(row) => 'link'}` marks a row (`data-kind="link"`) whose name reads as a link, for a row such as "3 more Entities".
175
+
176
+
169
177
  ### App bar: AppBar, PickerButton and a segmented ToggleGroup
170
178
 
171
179
  `AppBar` is the bar across the top of an app window: one row on a line in the rule color, so an ink-rule brand gets the working-paper rule under it. `AppBarSpacer` pushes what follows it to the end, and a vertical `Separator` is a short divider between icon actions. Icon actions are quiet `Button`s holding only an icon, with an `aria-label`.
@@ -3609,7 +3609,7 @@ var SideNavToggle = React10.forwardRef(function SideNavToggle2({ className, coll
3609
3609
  if (!event.defaultPrevented) onCollapsedChange(!collapsed);
3610
3610
  },
3611
3611
  ...props,
3612
- children: /* @__PURE__ */ jsx("svg", { className: "SideNavToggleIcon", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 3.5 5.5 8l4.5 4.5" }) })
3612
+ children: /* @__PURE__ */ jsx("svg", { className: "SideNavToggleIcon", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 3.5 5.5 8l4.5 4.5" }) })
3613
3613
  }
3614
3614
  );
3615
3615
  });
@@ -3833,5 +3833,5 @@ var EditableList = {
3833
3833
  };
3834
3834
 
3835
3835
  export { AppBar, AppBarSpacer, Badge, CURRENCY_SEARCH_THRESHOLD, Calendar, CurrencySelect, DatePicker, DatePresets, DescriptionItem, DescriptionList, Drawer, EditableList, Field, ListDetail, ListDetailDetail, ListDetailList, ListDetailRoot, MAX_MINOR_UNITS, MoneyField, MoneyFieldAffix, MoneyFieldGroup, MoneyFieldInput, MoneyFieldRoot, NumberField, PickerButton, Popover, Sheet, SideNav, SideNavGroup, SideNavItem, SideNavToggle, Splitter, SplitterHandle, SplitterPanel, SplitterRoot, StatFigure, addDays, addMonths, affixSide, applyKey, applyStored, ariaPercents, builtinPresets, clampDate, createPanels, cssSize, currencyName, currencySymbol, daysInMonth, defaultPresets, defaultWeekStartsOn, endOfWeek, formatDay, formatFull, formatMoney2 as formatMoney, fromMinorUnits, getCurrencyDigits, handleTarget, inclusiveDays, isValidCurrency, isoWeek, last30Days, last7Days, lastMonth, lastWeek, layoutOf, lengthBlockReason, measure, monthCells, moveFocusDate, nextMonth, nextWeek, normalizePaste, orderRange, parseDate, parseDecimalString, parseSize, presetInBounds, resetToDefault, resizeByDelta, resolvePreset, roundHalfExpand, roundingChangesValue, sameSelection, serializeSize, settle, sizeText, startOfWeek, syncPanels, thisMonth, thisQuarter, thisWeek, toDecimalString, toMinorUnits, today, todayDate, toggleCollapsed, tomorrow, useListDetail, valueText, yearToDate, yesterday };
3836
- //# sourceMappingURL=chunk-PV5YOQMN.js.map
3837
- //# sourceMappingURL=chunk-PV5YOQMN.js.map
3836
+ //# sourceMappingURL=chunk-2NAYVQ2U.js.map
3837
+ //# sourceMappingURL=chunk-2NAYVQ2U.js.map