@scattered-light/loomiere-mojave 0.25.0 → 0.41.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 (45) hide show
  1. package/dist/exports/AGENTS.md +1 -1
  2. package/dist/exports/base-ui.css +5574 -0
  3. package/dist/exports/base-ui.md +535 -0
  4. package/dist/exports/catalog.json +28 -0
  5. package/dist/exports/design-system/README.md +1 -1
  6. package/dist/exports/design-system/components/Badge/README.md +1 -1
  7. package/dist/exports/design-system/components/Badge/preview.html +43 -43
  8. package/dist/exports/design-system/components/ChecklistNotice/README.md +8 -4
  9. package/dist/exports/design-system/components/ChecklistNotice/preview.html +71 -71
  10. package/dist/exports/design-system/components/ChipPicker/README.md +43 -0
  11. package/dist/exports/design-system/components/ChipPicker/preview.html +475 -0
  12. package/dist/exports/design-system/components/DataTable/README.md +7 -1
  13. package/dist/exports/design-system/components/DataTable/preview.html +202 -202
  14. package/dist/exports/design-system/components/EmptyState/README.md +1 -1
  15. package/dist/exports/design-system/components/FileDropZone/README.md +38 -0
  16. package/dist/exports/design-system/components/FileDropZone/preview.html +19 -0
  17. package/dist/exports/design-system/components/LineItemGrid/README.md +7 -4
  18. package/dist/exports/design-system/components/LineItemGrid/preview.html +154 -154
  19. package/dist/exports/design-system/components/MultiSelect/README.md +8 -2
  20. package/dist/exports/design-system/components/MultiSelect/preview.html +2 -2
  21. package/dist/exports/design-system/components/Notice/README.md +6 -2
  22. package/dist/exports/design-system/components/Notice/preview.html +2 -2
  23. package/dist/exports/design-system/components/RadioCard/README.md +43 -0
  24. package/dist/exports/design-system/components/RadioCard/preview.html +19 -0
  25. package/dist/exports/design-system/components/Shortcuts/README.md +80 -0
  26. package/dist/exports/design-system/components/Shortcuts/preview.html +19 -0
  27. package/dist/exports/design-system/components/SourcePreview/README.md +45 -0
  28. package/dist/exports/design-system/components/SourcePreview/preview.html +19 -0
  29. package/dist/exports/design-system/components/SplitButton/README.md +2 -1
  30. package/dist/exports/design-system/components/SplitButton/preview.html +2 -2
  31. package/dist/exports/design-system/components/StatBand/README.md +34 -0
  32. package/dist/exports/design-system/components/StatBand/preview.html +475 -0
  33. package/dist/exports/design-system/components/Stepper/README.md +34 -0
  34. package/dist/exports/design-system/components/Stepper/preview.html +19 -0
  35. package/dist/exports/design-system/components/SummaryStrip/README.md +36 -0
  36. package/dist/exports/design-system/components/SummaryStrip/preview.html +19 -0
  37. package/dist/exports/design-system/components/Table/README.md +2 -1
  38. package/dist/exports/design-system/components/Tabs/README.md +2 -1
  39. package/dist/exports/design-system/components/Tabs/preview.html +1 -1
  40. package/dist/exports/design-system/components/Text/README.md +29 -0
  41. package/dist/exports/design-system/components/Text/preview.html +19 -0
  42. package/dist/exports/design-system/components/bundle.css +2229 -414
  43. package/dist/exports/design-system/components/bundle.js +7 -7
  44. package/dist/exports/design-system/components/index.d.ts +5 -3
  45. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  # EmptyState
2
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.
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-amplify, the page title size, still body-base so the sentence doesn't grow with the heading. A brand that raises title-condense (Tulvo sets it to xl) would otherwise get a spacious title smaller than the standard one. 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-amplify. 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
4
 
5
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
6
 
@@ -0,0 +1,38 @@
1
+ # FileDropZone
2
+
3
+ The Base UI FileDropZone styled by the theme. A dashed, quiet box with one line of text and its buttons. It fills when a file is dragged over it. Colors are the fill and border roles, so a brand restyles it without a component token.
4
+
5
+ Use `Loomiere.FileDropZone` (`import { FileDropZone } from '@base-ui/react/file-drop-zone'` in an app) and give each part the class below; the styles target those classes, not Base UI's own markup.
6
+
7
+ Base UI docs: https://base-ui.com/react/components/file-drop-zone
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `FileDropZone` | `data-over`; `data-disabled` |
14
+ | `FileDropZoneText` | |
15
+ | `FileDropZoneActions` | |
16
+
17
+ 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.
18
+
19
+ ## Example
20
+
21
+ From the FileDropZone stories (`Default`):
22
+
23
+ ```tsx
24
+ export const Default: Story = {
25
+ render: function Render() {
26
+ const [name, setName] = React.useState('');
27
+ return (
28
+ <FileDropZone onFiles={(files) => setName(files[0]?.name ?? '')} accept=".pdf,.csv">
29
+ {name ? `Chosen: ${name}` : 'Drop the statement here, or choose a file.'}
30
+ </FileDropZone>
31
+ );
32
+ },
33
+ };
34
+
35
+ /** More buttons sit beside Choose file. */
36
+ ```
37
+
38
+ The preview also shows `WithActions`, `Disabled`.
@@ -0,0 +1,19 @@
1
+ <!-- @dsCard group="Components" height=360 subtitle="Default / WithActions / Disabled" -->
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <style>
7
+ body { margin: 0; padding: var(--sl-space-4, 16px); background: var(--sl-surface-canvas); color: var(--sl-text-primary); }
8
+ #root { display: grid; gap: var(--sl-space-5, 20px); }
9
+ .ds-story-name { margin: 0 0 var(--sl-space-2, 8px); font: var(--sl-font-label-minimize-font, 500 10px sans-serif); color: var(--sl-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>
15
+ (()=>{var x=Object.create;var m=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R=(e,t)=>{for(var o in t)m(e,o,{get:t[o],enumerable:!0})},Z=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of F(t))!b.call(e,r)&&r!==o&&m(e,r,{get:()=>t[r],enumerable:!(n=E(t,r))||n.enumerable});return e};var f=(e,t,o)=>(o=e!=null?x(S(e)):{},Z(t||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e));var u=p((O,y)=>{y.exports=window.React});var h=p(($,D)=>{D.exports=window.Loomiere});var d={};R(d,{Default:()=>j,Disabled:()=>N,WithActions:()=>L,default:()=>l});var g=f(u(),1),a=f(h(),1);var c=window.React;function i(e,t,o){let{children:n,...r}=t||{};return o!==void 0&&(r.key=o),n===void 0?c.createElement(e,r):Array.isArray(n)?c.createElement(e,r,...n):c.createElement(e,r,n)}var C=c.Fragment;var A={title:"Components/Lib/FileDropZone",component:a.FileDropZone,parameters:{layout:"padded"},tags:["autodocs","ds:lib"],args:{onFiles:()=>{}}},l=A,j={render:function(){let[t,o]=g.useState("");return i(a.FileDropZone,{onFiles:n=>o(n[0]?.name??""),accept:".pdf,.csv",children:t?`Chosen: ${t}`:"Drop the statement here, or choose a file."})}},L={render:()=>i(a.FileDropZone,{onFiles:()=>{},actions:i(a.Button,{emphasis:"standard",children:"Link from Document Library"}),children:"Drop the statement here, or choose a file."})},N={args:{disabled:!0,children:"Saving\u2026"}};var s=window.React,w=l||{},k=["Default","WithActions","Disabled"];function v({id:e}){let t=d[e],o={...w.args||{},...t.args||{}};return(t.render||(r=>s.createElement(w.component,r)))(o,{args:o,id:e,name:e})}var B=k.map(e=>s.createElement("section",{key:e,className:"ds-story"},s.createElement("p",{className:"ds-story-name"},e.replace(/([a-z])([A-Z])/g,"$1 $2")),s.createElement("div",{className:"ds-story-body"},s.createElement(v,{id:e}))));window.ReactDOM.createRoot(document.getElementById("root")).render(s.createElement(s.Fragment,null,B));})();
16
+
17
+ </script>
18
+ </body>
19
+ </html>
@@ -1,6 +1,6 @@
1
1
  # LineItemGrid
2
2
 
3
- The Base UI LineItemGrid styled by the theme. Editable lines (a journal entry, an invoice) on the Table styles. Cells hold controls, so their padding drops to the table's block padding and the controls fill the cell. The line-number column is narrow and in the tertiary color; the remove column is as narrow as its button. Footer rows stick to the bottom of the scroll box (maxHeight caps it): the table clips instead of hiding its overflow, because overflow: hidden would make the table the scroll container and the footer would never stick. A footer row's data-tone colors its figures with the status text colors (the -dark steps, which pass as text on the tray). The words in the cell carry the state; color only adds.
3
+ The Base UI LineItemGrid styled by the theme. Editable lines (a journal entry, an invoice) on the Table styles. Cells hold controls, so their padding drops to the table's block padding and the controls fill the cell. The line-number column is narrow and in the tertiary color; the remove column is as narrow as its button. Footer rows stick to the bottom of the scroll box (maxHeight caps it): the table clips instead of hiding its overflow, because overflow: hidden would make the table the scroll container and the footer would never stick. A footer row's data-tone colors its figures with the status text colors (the -dark steps, which pass as text on the tray). The words in the cell carry the state; color only adds. look="statement" (data-look) puts the lines on a statement's terms: the Table's statement rows with caps 11px headers, 6px cell padding, no frame and rows tall enough for their controls. The footer rows move under the Add button into .LineItemGridSummary: a box on the base surface with a 1px border and the sheet's heavy rule on top, label left and figure right, a toned row in its status color, and the grand total over a dark rule with a double rule under its figure.
4
4
 
5
5
  Use `Loomiere.LineItemGrid` (`import { LineItemGrid } from '@base-ui/react/line-item-grid'` in an app) and give each part the class below; the styles target those classes, not Base UI's own markup.
6
6
 
@@ -10,9 +10,9 @@ Base UI docs: https://base-ui.com/react/components/line-item-grid
10
10
 
11
11
  | Class | Data attributes it answers to |
12
12
  |---|---|
13
- | `LineItemGrid` | `data-read-only` |
13
+ | `LineItemGrid` | `data-read-only`; `data-look`: `statement` |
14
14
  | `LineItemGridScroll` | |
15
- | `LineItemGridTable` | |
15
+ | `LineItemGridTable` | `data-look`: `statement` |
16
16
  | `Input` | |
17
17
  | `FieldRoot` | |
18
18
  | `ComboboxRoot` | |
@@ -23,6 +23,9 @@ Base UI docs: https://base-ui.com/react/components/line-item-grid
23
23
  | `LineItemGridNumber` | |
24
24
  | `LineItemGridRemove` | |
25
25
  | `LineItemGridAdd` | |
26
+ | `LineItemGridAddHint` | |
27
+ | `Table` | |
28
+ | `LineItemGridSummary` | |
26
29
 
27
30
  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.
28
31
 
@@ -47,4 +50,4 @@ export const Default: Story = {
47
50
  /** A posted entry: text in the cells, no add or remove. */
48
51
  ```
49
52
 
50
- The preview also shows `ReadOnly`.
53
+ The preview also shows `ReadOnly`, `RuledTotals`, `Statement`.