@scattered-light/loomiere-base-ui 0.6.1 → 0.7.1

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 (100) hide show
  1. package/README.md +135 -5
  2. package/dist/chunk-JUUPOOQQ.js +3723 -0
  3. package/dist/chunk-JUUPOOQQ.js.map +1 -0
  4. package/dist/chunk-M7KJASGK.js +802 -0
  5. package/dist/chunk-M7KJASGK.js.map +1 -0
  6. package/dist/chunk-Y2CPBMFJ.js +147 -0
  7. package/dist/chunk-Y2CPBMFJ.js.map +1 -0
  8. package/dist/custom/collection/index.d.ts +540 -0
  9. package/dist/custom/collection/index.js +1489 -0
  10. package/dist/custom/collection/index.js.map +1 -0
  11. package/dist/custom/index.d.ts +5 -0
  12. package/dist/custom/index.js +4 -0
  13. package/dist/custom/index.js.map +1 -0
  14. package/dist/design-system/components/Badge/README.md +35 -0
  15. package/dist/design-system/components/Badge/preview.html +19 -0
  16. package/dist/design-system/components/Collection/README.md +14 -0
  17. package/dist/design-system/components/CollectionPagination/README.md +15 -0
  18. package/dist/design-system/components/CollectionToolbar/README.md +29 -0
  19. package/dist/design-system/components/DataList/README.md +39 -0
  20. package/dist/design-system/components/DataList/preview.html +475 -0
  21. package/dist/design-system/components/DataTable/README.md +41 -0
  22. package/dist/design-system/components/DataTable/preview.html +475 -0
  23. package/dist/design-system/components/DatePicker/README.md +55 -0
  24. package/dist/design-system/components/DatePicker/preview.html +475 -0
  25. package/dist/design-system/components/EditableList/README.md +33 -0
  26. package/dist/design-system/components/EditableList/preview.html +475 -0
  27. package/dist/design-system/components/EmptyState/README.md +60 -0
  28. package/dist/design-system/components/EmptyState/preview.html +475 -0
  29. package/dist/design-system/components/ListDetail/README.md +43 -0
  30. package/dist/design-system/components/ListDetail/preview.html +475 -0
  31. package/dist/design-system/components/MoneyField/README.md +52 -0
  32. package/dist/design-system/components/MoneyField/preview.html +475 -0
  33. package/dist/design-system/components/Splitter/README.md +42 -0
  34. package/dist/design-system/components/Splitter/preview.html +475 -0
  35. package/dist/design-system/components/Table/README.md +2 -1
  36. package/dist/design-system/components/Table/preview.html +1 -1
  37. package/dist/design-system/components/bundle.js +7 -5
  38. package/dist/design-system/components/index.d.ts +3 -21
  39. package/dist/design-system/components/styles.css +2349 -186
  40. package/dist/index-ChJXlxzq.d.ts +809 -0
  41. package/dist/index.d.ts +3 -21
  42. package/dist/index.js +176 -891
  43. package/dist/index.js.map +1 -1
  44. package/dist/styles/components/Accordion.css +1 -1
  45. package/dist/styles/components/AlertDialog.css +1 -1
  46. package/dist/styles/components/Autocomplete.css +1 -1
  47. package/dist/styles/components/Avatar.css +1 -1
  48. package/dist/styles/components/Button.css +1 -1
  49. package/dist/styles/components/Checkbox.css +1 -1
  50. package/dist/styles/components/CheckboxGroup.css +1 -1
  51. package/dist/styles/components/Collapsible.css +1 -1
  52. package/dist/styles/components/Combobox.css +1 -1
  53. package/dist/styles/components/ContextMenu.css +1 -1
  54. package/dist/styles/components/Dialog.css +1 -1
  55. package/dist/styles/components/Drawer.css +1 -1
  56. package/dist/styles/components/Field.css +1 -1
  57. package/dist/styles/components/Fieldset.css +1 -1
  58. package/dist/styles/components/Form.css +1 -1
  59. package/dist/styles/components/Input.css +1 -1
  60. package/dist/styles/components/Menu.css +1 -1
  61. package/dist/styles/components/Menubar.css +1 -1
  62. package/dist/styles/components/Meter.css +1 -1
  63. package/dist/styles/components/NavigationMenu.css +1 -1
  64. package/dist/styles/components/NumberField.css +1 -1
  65. package/dist/styles/components/OTPField.css +1 -1
  66. package/dist/styles/components/Popover.css +1 -1
  67. package/dist/styles/components/PreviewCard.css +1 -1
  68. package/dist/styles/components/Progress.css +1 -1
  69. package/dist/styles/components/Radio.css +1 -1
  70. package/dist/styles/components/ScrollArea.css +1 -1
  71. package/dist/styles/components/Select.css +1 -1
  72. package/dist/styles/components/Separator.css +1 -1
  73. package/dist/styles/components/Slider.css +1 -1
  74. package/dist/styles/components/Switch.css +1 -1
  75. package/dist/styles/components/Tabs.css +1 -1
  76. package/dist/styles/components/Toast.css +1 -1
  77. package/dist/styles/components/Toggle.css +1 -1
  78. package/dist/styles/components/ToggleGroup.css +1 -1
  79. package/dist/styles/components/Toolbar.css +1 -1
  80. package/dist/styles/components/Tooltip.css +1 -1
  81. package/dist/styles/custom/Badge.css +104 -0
  82. package/dist/styles/custom/Collection.css +15 -0
  83. package/dist/styles/custom/CollectionPagination.css +24 -0
  84. package/dist/styles/custom/CollectionToolbar.css +140 -0
  85. package/dist/styles/custom/DataList.css +123 -0
  86. package/dist/styles/custom/DataTable.css +120 -0
  87. package/dist/styles/custom/DatePicker.css +572 -0
  88. package/dist/styles/custom/EditableList.css +98 -0
  89. package/dist/styles/custom/EmptyState.css +255 -0
  90. package/dist/styles/custom/ListDetail.css +126 -0
  91. package/dist/styles/custom/MoneyField.css +344 -0
  92. package/dist/styles/custom/Splitter.css +207 -0
  93. package/dist/styles/{components → custom}/Table.css +31 -4
  94. package/dist/styles/index.css +12 -2
  95. package/dist/styles/reset/accessibility.css +1 -1
  96. package/dist/styles/reset/reset-accessibility.css +1 -1
  97. package/dist/styles/reset/reset-tailwind.css +1 -1
  98. package/dist/styles/reset/reset.css +1 -1
  99. package/dist/styles/tailwind.css +12 -2
  100. package/package.json +35 -7
@@ -0,0 +1,60 @@
1
+ # EmptyState
2
+
3
+ Loomiere component, not part of Base UI. The block a page, pane, table, list or popup shows when it has nothing to show. One look for every kind. data-kind only picks the media tone and, in the component, the default icon and whether the block is announced. Sizes are empty.* (tokens/semantic/empty.json). No border and no fill: the container provides those. The circle uses the subtle emphasis level (--sl-e-bg, --sl-e-fg), the same variables Badge uses. data-status on the media recolors it. A parent data-color does too: the subtle chrome pin skips this circle when a color scope is on an ancestor (Badge keeps the pin). A brand pair re-points fill and text, not that chrome scope. The circle stays chrome subtle inside a pair, the same as Badge, so a pair does not get its own selector. High contrast and the vision themes come with those variables. The title stays text-primary and the description text-secondary: an error's title is not red, because a sentence has to stay readable. Neutral kinds use the chrome palette, which is what subtle resolves to when no status is set. Text is a whole style per size, not a font-size on its own. Compact is a table row or a popup, so the title is subtitle-condense (bold, the row's size) and the description is body-condense. Standard is a pane: title-condense, the section heading, with body-base under it. Spacious is a page: title-magnify, the next title up, still body-base so the sentence doesn't grow with the heading. Unselected is the quiet pane beside a list, so it drops the circle, the icon is text-tertiary, and the title steps down one tier: subtitle-minimize where the others use a condense style (there is no title at minimize), and title-condense where the others use title-magnify. Compact is a row (icon, text, actions) centered across the cell. Standard and spacious are a column. They take margin-block: auto so a flex or grid column centers them in the leftover space; in normal flow that margin is zero, so a page that isn't a column doesn't grow a hole. There is no data-fill attribute. The icon for unselected is left_click: the pane is waiting for a choice in the list beside it, which an empty inbox would not say. A popup's empty slot already pads a plain sentence (popup-empty). When the child is an EmptyState, that padding drops so the two don't add. Menu.Empty has no popup-empty padding of its own, so it needs nothing here.
4
+
5
+ Use `Loomiere.EmptyState`, this package's component: it puts the class names on for you (`import { EmptyState } from '@scattered-light/loomiere-base-ui'`, or from `@scattered-light/loomiere-base-ui/custom`).
6
+
7
+ Not a Base UI part, so there is no base-ui.com page for it.
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `EmptyState` | `data-size`: `compact`, `spacious`, `standard`; `data-kind`: `unselected` |
14
+ | `EmptyStateMedia` | `data-custom` |
15
+ | `EmptyStateText` | |
16
+ | `EmptyStateTitle` | |
17
+ | `EmptyStateDescription` | |
18
+ | `EmptyStateActions` | |
19
+ | `ComboboxEmpty` | |
20
+ | `AutocompleteEmpty` | |
21
+
22
+ Base UI sets the state attributes (`data-checked`, `data-open`, `data-disabled`...) itself. Set `data-size`, `data-emphasis`, `data-variant` and `data-color` yourself; `data-color` takes any palette name (`primary`, `secondary`, `error`...) and repaints the part in it.
23
+
24
+ ## Example
25
+
26
+ From the EmptyState stories (`Default`):
27
+
28
+ ```tsx
29
+ export const Default: Story = {
30
+ render: () => (
31
+ <table className="Table">
32
+ <thead>
33
+ <tr>
34
+ <th scope="col">Payee</th>
35
+ <th scope="col">Date</th>
36
+ <th scope="col" data-align="end">Amount</th>
37
+ <th scope="col">Status</th>
38
+ </tr>
39
+ </thead>
40
+ <tbody>
41
+ <tr>
42
+ <td data-empty colSpan={4}>
43
+ <EmptyState
44
+ size="compact"
45
+ kind="no-results"
46
+ title="No transactions match"
47
+ description="Try a different date range, or clear the filters."
48
+ actions={<Button emphasis="standard">Clear filters</Button>}
49
+ />
50
+ </td>
51
+ </tr>
52
+ </tbody>
53
+ </table>
54
+ ),
55
+ };
56
+
57
+ /** Starts with rows. Filtering to nothing announces the no-results title once. */
58
+ ```
59
+
60
+ The preview also shows `AfterFilter`, `Start`, `NoResults`.