@scattered-light/loomiere-mojave 0.24.1 → 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 (48) 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 +34 -0
  5. package/dist/exports/design-system/README.md +1 -1
  6. package/dist/exports/design-system/components/Badge/README.md +2 -1
  7. package/dist/exports/design-system/components/Badge/preview.html +457 -1
  8. package/dist/exports/design-system/components/ChecklistNotice/README.md +53 -0
  9. package/dist/exports/design-system/components/ChecklistNotice/preview.html +475 -0
  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 +9 -2
  13. package/dist/exports/design-system/components/DataTable/preview.html +202 -202
  14. package/dist/exports/design-system/components/EmptyState/README.md +17 -3
  15. package/dist/exports/design-system/components/EmptyState/preview.html +170 -170
  16. package/dist/exports/design-system/components/FileDropZone/README.md +38 -0
  17. package/dist/exports/design-system/components/FileDropZone/preview.html +19 -0
  18. package/dist/exports/design-system/components/LineItemGrid/README.md +53 -0
  19. package/dist/exports/design-system/components/LineItemGrid/preview.html +475 -0
  20. package/dist/exports/design-system/components/MultiSelect/README.md +8 -2
  21. package/dist/exports/design-system/components/MultiSelect/preview.html +2 -2
  22. package/dist/exports/design-system/components/Notice/README.md +6 -2
  23. package/dist/exports/design-system/components/Notice/preview.html +2 -2
  24. package/dist/exports/design-system/components/ParameterBar/README.md +68 -0
  25. package/dist/exports/design-system/components/ParameterBar/preview.html +475 -0
  26. package/dist/exports/design-system/components/RadioCard/README.md +43 -0
  27. package/dist/exports/design-system/components/RadioCard/preview.html +19 -0
  28. package/dist/exports/design-system/components/Shortcuts/README.md +80 -0
  29. package/dist/exports/design-system/components/Shortcuts/preview.html +19 -0
  30. package/dist/exports/design-system/components/SourcePreview/README.md +45 -0
  31. package/dist/exports/design-system/components/SourcePreview/preview.html +19 -0
  32. package/dist/exports/design-system/components/SplitButton/README.md +2 -1
  33. package/dist/exports/design-system/components/SplitButton/preview.html +2 -2
  34. package/dist/exports/design-system/components/StatBand/README.md +34 -0
  35. package/dist/exports/design-system/components/StatBand/preview.html +475 -0
  36. package/dist/exports/design-system/components/Stepper/README.md +34 -0
  37. package/dist/exports/design-system/components/Stepper/preview.html +19 -0
  38. package/dist/exports/design-system/components/SummaryStrip/README.md +36 -0
  39. package/dist/exports/design-system/components/SummaryStrip/preview.html +19 -0
  40. package/dist/exports/design-system/components/Table/README.md +2 -1
  41. package/dist/exports/design-system/components/Tabs/README.md +2 -1
  42. package/dist/exports/design-system/components/Tabs/preview.html +1 -1
  43. package/dist/exports/design-system/components/Text/README.md +29 -0
  44. package/dist/exports/design-system/components/Text/preview.html +19 -0
  45. package/dist/exports/design-system/components/bundle.css +2851 -433
  46. package/dist/exports/design-system/components/bundle.js +7 -7
  47. package/dist/exports/design-system/components/index.d.ts +7 -24
  48. package/package.json +2 -2
@@ -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>
@@ -0,0 +1,53 @@
1
+ # LineItemGrid
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. 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
+
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
+
7
+ Base UI docs: https://base-ui.com/react/components/line-item-grid
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `LineItemGrid` | `data-read-only`; `data-look`: `statement` |
14
+ | `LineItemGridScroll` | |
15
+ | `LineItemGridTable` | `data-look`: `statement` |
16
+ | `Input` | |
17
+ | `FieldRoot` | |
18
+ | `ComboboxRoot` | |
19
+ | `MoneyField` | |
20
+ | `SelectTrigger` | |
21
+ | `LineItemGridNumberCol` | |
22
+ | `LineItemGridRemoveCol` | |
23
+ | `LineItemGridNumber` | |
24
+ | `LineItemGridRemove` | |
25
+ | `LineItemGridAdd` | |
26
+ | `LineItemGridAddHint` | |
27
+ | `Table` | |
28
+ | `LineItemGridSummary` | |
29
+
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.
31
+
32
+ ## Example
33
+
34
+ From the LineItemGrid stories (`Default`):
35
+
36
+ ```tsx
37
+ export const Default: Story = {
38
+ args: { label: '', columns: [], rows: [], getRowId: () => '', renderCell: () => null },
39
+ render: () => <Editor />,
40
+ play: async ({ canvasElement }) => {
41
+ const canvas = within(canvasElement);
42
+ await expect(canvas.getByText(/out of balance/)).toBeTruthy();
43
+ await userEvent.click(canvas.getByRole('button', { name: 'Add line' }));
44
+ await expect(canvas.getByRole('textbox', { name: 'Account, line 3' })).toHaveFocus();
45
+ await userEvent.click(canvas.getByRole('button', { name: 'Remove line 3' }));
46
+ await expect(canvas.queryByRole('textbox', { name: 'Account, line 3' })).toBeNull();
47
+ },
48
+ };
49
+
50
+ /** A posted entry: text in the cells, no add or remove. */
51
+ ```
52
+
53
+ The preview also shows `ReadOnly`, `RuledTotals`, `Statement`.