@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.
- package/dist/exports/AGENTS.md +1 -1
- package/dist/exports/base-ui.css +5574 -0
- package/dist/exports/base-ui.md +535 -0
- package/dist/exports/catalog.json +34 -0
- package/dist/exports/design-system/README.md +1 -1
- package/dist/exports/design-system/components/Badge/README.md +2 -1
- package/dist/exports/design-system/components/Badge/preview.html +457 -1
- package/dist/exports/design-system/components/ChecklistNotice/README.md +53 -0
- package/dist/exports/design-system/components/ChecklistNotice/preview.html +475 -0
- package/dist/exports/design-system/components/ChipPicker/README.md +43 -0
- package/dist/exports/design-system/components/ChipPicker/preview.html +475 -0
- package/dist/exports/design-system/components/DataTable/README.md +9 -2
- package/dist/exports/design-system/components/DataTable/preview.html +202 -202
- package/dist/exports/design-system/components/EmptyState/README.md +17 -3
- package/dist/exports/design-system/components/EmptyState/preview.html +170 -170
- package/dist/exports/design-system/components/FileDropZone/README.md +38 -0
- package/dist/exports/design-system/components/FileDropZone/preview.html +19 -0
- package/dist/exports/design-system/components/LineItemGrid/README.md +53 -0
- package/dist/exports/design-system/components/LineItemGrid/preview.html +475 -0
- package/dist/exports/design-system/components/MultiSelect/README.md +8 -2
- package/dist/exports/design-system/components/MultiSelect/preview.html +2 -2
- package/dist/exports/design-system/components/Notice/README.md +6 -2
- package/dist/exports/design-system/components/Notice/preview.html +2 -2
- package/dist/exports/design-system/components/ParameterBar/README.md +68 -0
- package/dist/exports/design-system/components/ParameterBar/preview.html +475 -0
- package/dist/exports/design-system/components/RadioCard/README.md +43 -0
- package/dist/exports/design-system/components/RadioCard/preview.html +19 -0
- package/dist/exports/design-system/components/Shortcuts/README.md +80 -0
- package/dist/exports/design-system/components/Shortcuts/preview.html +19 -0
- package/dist/exports/design-system/components/SourcePreview/README.md +45 -0
- package/dist/exports/design-system/components/SourcePreview/preview.html +19 -0
- package/dist/exports/design-system/components/SplitButton/README.md +2 -1
- package/dist/exports/design-system/components/SplitButton/preview.html +2 -2
- package/dist/exports/design-system/components/StatBand/README.md +34 -0
- package/dist/exports/design-system/components/StatBand/preview.html +475 -0
- package/dist/exports/design-system/components/Stepper/README.md +34 -0
- package/dist/exports/design-system/components/Stepper/preview.html +19 -0
- package/dist/exports/design-system/components/SummaryStrip/README.md +36 -0
- package/dist/exports/design-system/components/SummaryStrip/preview.html +19 -0
- package/dist/exports/design-system/components/Table/README.md +2 -1
- package/dist/exports/design-system/components/Tabs/README.md +2 -1
- package/dist/exports/design-system/components/Tabs/preview.html +1 -1
- package/dist/exports/design-system/components/Text/README.md +29 -0
- package/dist/exports/design-system/components/Text/preview.html +19 -0
- package/dist/exports/design-system/components/bundle.css +2851 -433
- package/dist/exports/design-system/components/bundle.js +7 -7
- package/dist/exports/design-system/components/index.d.ts +7 -24
- package/package.json +2 -2
|
@@ -12,10 +12,16 @@ Base UI docs: https://base-ui.com/react/components/multi-select
|
|
|
12
12
|
|---|---|
|
|
13
13
|
| `MultiSelectPopup` | |
|
|
14
14
|
| `MultiSelectList` | |
|
|
15
|
-
| `MultiSelectOption` |
|
|
15
|
+
| `MultiSelectOption` | `data-disabled` |
|
|
16
16
|
| `MultiSelectOptionLabel` | |
|
|
17
|
+
| `MultiSelectOptionHint` | |
|
|
17
18
|
| `MultiSelectOptionCount` | |
|
|
18
19
|
| `MultiSelectFooter` | |
|
|
20
|
+
| `MultiSelectField` | `data-disabled` |
|
|
21
|
+
| `MultiSelectTrigger` | |
|
|
22
|
+
| `MultiSelectFieldLabel` | |
|
|
23
|
+
| `MultiSelectFind` | |
|
|
24
|
+
| `MultiSelectGroupLabel` | |
|
|
19
25
|
|
|
20
26
|
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.
|
|
21
27
|
|
|
@@ -32,4 +38,4 @@ export const Default: Story = {
|
|
|
32
38
|
};
|
|
33
39
|
```
|
|
34
40
|
|
|
35
|
-
The preview also shows `WithSelection`, `ManySelected`.
|
|
41
|
+
The preview also shows `WithSelection`, `ManySelected`, `LabelAbove`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @dsCard group="Components" height=
|
|
1
|
+
<!-- @dsCard group="Components" height=480 subtitle="Default / WithSelection / ManySelected / LabelAbove" -->
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
|
14
14
|
<script>
|
|
15
|
-
(()=>{var
|
|
15
|
+
(()=>{var F=Object.create;var m=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),C=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},V=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of L(e))!x.call(t,a)&&a!==n&&m(t,a,{get:()=>e[a],enumerable:!(o=A(e,a))||o.enumerable});return t};var v=(t,e,n)=>(n=t!=null?F(h(t)):{},V(e||!t||!t.__esModule?m(n,"default",{value:t,enumerable:!0}):n,t));var g=b((T,y)=>{y.exports=window.React});var R=b((W,S)=>{S.exports=window.Loomiere});var p={};C(p,{CountedWithFind:()=>j,Default:()=>M,DisabledOptions:()=>P,LabelAbove:()=>N,ManySelected:()=>H,WithSelection:()=>D,default:()=>d});var r=v(g(),1),l=v(R(),1);var u=window.React;function s(t,e,n){let{children:o,...a}=e||{};return n!==void 0&&(a.key=n),o===void 0?u.createElement(t,a):Array.isArray(o)?u.createElement(t,a,...o):u.createElement(t,a,o)}var $=u.Fragment;var w={title:"Components/Lib/MultiSelect",component:l.MultiSelect,parameters:{layout:"centered"},tags:["autodocs","ds:lib"],args:{label:"Status",options:[],value:[],onValueChange:()=>{}}},d=w,f=[{value:"active",label:"Active",count:41},{value:"inactive",label:"Inactive",count:6},{value:"available",label:"Available from master",count:12}],M={render:function(){let[e,n]=r.useState([]);return s(l.MultiSelect,{label:"Status",allLabel:"All statuses",options:f,value:e,onValueChange:n})}},D={render:function(){let[e,n]=r.useState(["active","inactive"]);return s(l.MultiSelect,{label:"Status",allLabel:"All statuses",options:f,value:e,onValueChange:n})}},H={render:function(){let e=["Assets","Liabilities","Equity","Income","Cost of sales","Expenses"].map((a,c)=>({value:a,label:a,count:3+c})),[n,o]=r.useState(["Assets","Income","Expenses"]);return s(l.MultiSelect,{label:"Type",allLabel:"All types",options:e,value:n,onValueChange:o})}},N={render:function(){let[e,n]=r.useState([]),o=["1000 Bank","1500 Equipment","2000 Accounts Payable","4000 Revenue","6100 Rent"].map(a=>({value:a,label:a}));return s(l.MultiSelect,{label:"Accounts",labelPlacement:"above",allLabel:"All accounts",options:o,value:e,onValueChange:n})}},P={render:function(){let[e,n]=r.useState(["a"]);return s(l.MultiSelect,{label:"Entities",allLabel:"All Entities",options:[{value:"a",label:"Fictional Personal Holdings",count:3},{value:"b",label:"Fictional Retirement Holdings",count:1},{value:"c",label:"Fictional Family Trust",disabled:!0,hint:"No investments"}],value:e,onValueChange:n})}},j={render:function(){let[e,n]=r.useState(["a"]),o=["Fictional Personal Holdings","Fictional Design LLC","Fictional Family Trust","Fictional Rentals LLC","Fictional Retirement Holdings","Fictional Roth","Fictional Bakery Co.","Fictional Dental Group","Fictional Holdings Co."].map((a,c)=>({value:c===0?"a":`o${c}`,label:a,...c===1?{disabled:!0,hint:"No investments"}:{}}));return s(l.MultiSelect,{label:"Entities",labelPlacement:"above",noun:"Entities",findLabel:"Find an Entity",allLabel:"All Entities",options:o,value:e,onValueChange:n})}};var i=window.React,E=d||{},k=["Default","WithSelection","ManySelected","LabelAbove"];function I({id:t}){let e=p[t],n={...E.args||{},...e.args||{}};return(e.render||(a=>i.createElement(E.component,a)))(n,{args:n,id:t,name:t})}var O=k.map(t=>i.createElement("section",{key:t,className:"ds-story"},i.createElement("p",{className:"ds-story-name"},t.replace(/([a-z])([A-Z])/g,"$1 $2")),i.createElement("div",{className:"ds-story-body"},i.createElement(I,{id:t}))));window.ReactDOM.createRoot(document.getElementById("root")).render(i.createElement(i.Fragment,null,O));})();
|
|
16
16
|
|
|
17
17
|
</script>
|
|
18
18
|
</body>
|
|
@@ -10,7 +10,11 @@ Base UI docs: https://base-ui.com/react/components/notice
|
|
|
10
10
|
|
|
11
11
|
| Class | Data attributes it answers to |
|
|
12
12
|
|---|---|
|
|
13
|
-
| `Notice` | `data-status`: `error`, `warning`, `success`, `info`; `data-technical` |
|
|
13
|
+
| `Notice` | `data-status`: `error`, `warning`, `success`, `info`; `data-technical`; `data-layout`: `row` |
|
|
14
|
+
| `NoticeTag` | |
|
|
15
|
+
| `NoticeBody` | |
|
|
16
|
+
| `NoticeHeading` | |
|
|
17
|
+
| `NoticeAction` | |
|
|
14
18
|
|
|
15
19
|
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.
|
|
16
20
|
|
|
@@ -27,4 +31,4 @@ export const Default: Story = {
|
|
|
27
31
|
/** Every status, the neutral notice, and the technical style. */
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
The preview also shows `Statuses`, `InAForm`.
|
|
34
|
+
The preview also shows `Statuses`, `InAForm`, `WithHeadingAndAction`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @dsCard group="Components" height=
|
|
1
|
+
<!-- @dsCard group="Components" height=480 subtitle="Default / Statuses / InAForm / WithHeadingAndAction" -->
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
|
14
14
|
<script>
|
|
15
|
-
(()=>{var
|
|
15
|
+
(()=>{var y=Object.create;var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),x=(e,n)=>{for(var o in n)l(e,o,{get:n[o],enumerable:!0})},N=(e,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of g(n))!b.call(e,s)&&s!==o&&l(e,s,{get:()=>n[s],enumerable:!(r=f(n,s))||r.enumerable});return e};var S=(e,n,o)=>(o=e!=null?y(v(e)):{},N(n||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e));var p=w((j,u)=>{u.exports=window.Loomiere});var m={};x(m,{Default:()=>R,InAForm:()=>F,Statuses:()=>A,WithHeadingAndAction:()=>B,default:()=>d});var a=S(p(),1);var i=window.React;function t(e,n,o){let{children:r,...s}=n||{};return o!==void 0&&(s.key=o),r===void 0?i.createElement(e,s):Array.isArray(r)?i.createElement(e,s,...r):i.createElement(e,s,r)}var L=i.Fragment;var E={title:"Components/Lib/Notice",component:a.Notice,parameters:{layout:"padded"},tags:["autodocs","ds:lib"]},d=E,R={args:{status:"error",children:"Email or password is incorrect, or the account is temporarily locked."},render:e=>t(a.Notice,{...e,style:{maxWidth:420}})},A={render:()=>t("div",{style:{display:"grid",gap:"var(--sl-space-3)",maxWidth:420},children:[t(a.Notice,{announce:!1,children:"Neutral: a note about this page."}),t(a.Notice,{status:"info",announce:!1,children:"Info: the import runs overnight."}),t(a.Notice,{status:"success",announce:!1,children:"If that email has an account, we've sent a link to it."}),t(a.Notice,{status:"warning",announce:!1,children:"Two accounts have no opening balance."}),t(a.Notice,{status:"error",announce:!1,children:"Can't reach the server. Check the connection and try again."}),t(a.Notice,{technical:!0,announce:!1,children:"This computer's keychain is unavailable: access denied by the system"})]})},F={render:()=>t("form",{style:{display:"grid",gap:"var(--sl-space-3)",maxWidth:360},onSubmit:e=>e.preventDefault(),children:[t(a.Field.Root,{children:[t(a.Field.Label,{children:"Email"}),t(a.Input,{type:"email",defaultValue:"jordan@example.com"})]}),t(a.Button,{type:"submit",children:"Sign in"}),t(a.Notice,{status:"error",announce:!1,children:"Enter your password"})]})},B={render:()=>t("div",{style:{display:"grid",gap:"var(--sl-space-3)",maxWidth:960},children:[t(a.Notice,{status:"warning",announce:!1,tag:t(a.Badge,{shape:"square",children:"Incomplete"}),heading:"3 excluded \xB7 Draft incomplete",action:t(a.Button,{emphasis:"standard",children:"Review details"}),children:t("p",{children:"3 For Review items can't be counted as they are, so these totals leave them out. The books don't change."})}),t(a.Notice,{announce:!1,tag:t(a.Badge,{shape:"square",emphasis:"bold",children:"Snapshot"}),heading:"Historical snapshot \xB7 Draft, not posted",action:t(a.Button,{emphasis:"standard",children:"Return to live Draft"}),children:t("p",{children:"Preserved accounting state. Later classification and posting changes are left out."})})]})};var c=window.React,h=d||{},D=["Default","Statuses","InAForm","WithHeadingAndAction"];function k({id:e}){let n=m[e],o={...h.args||{},...n.args||{}};return(n.render||(s=>c.createElement(h.component,s)))(o,{args:o,id:e,name:e})}var I=D.map(e=>c.createElement("section",{key:e,className:"ds-story"},c.createElement("p",{className:"ds-story-name"},e.replace(/([a-z])([A-Z])/g,"$1 $2")),c.createElement("div",{className:"ds-story-body"},c.createElement(k,{id:e}))));window.ReactDOM.createRoot(document.getElementById("root")).render(c.createElement(c.Fragment,null,I));})();
|
|
16
16
|
|
|
17
17
|
</script>
|
|
18
18
|
</body>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# ParameterBar
|
|
2
|
+
|
|
3
|
+
The Base UI ParameterBar styled by the theme. Settings for a result, in one wrapping row on the tray: the app's fields at the start, the status line, the Run button and any extra actions at the end. Fields align on their controls (align-items: flex-end), so a field with a description does not push its neighbours' inputs down. When the bar is narrow the end group wraps onto its own line, at the start. data-changed (a setting changed since the last run) turns the status line to the warning text color. The bar itself does not dim anything; the app dims its own stale result. ParameterBarLocked is a fixed setting: the field label over the value as text with a lock, on no box, at the control's height so it lines up with the inputs beside it.
|
|
4
|
+
|
|
5
|
+
Use `Loomiere.ParameterBar` (`import { ParameterBar } from '@base-ui/react/parameter-bar'` 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/parameter-bar
|
|
8
|
+
|
|
9
|
+
## Classes
|
|
10
|
+
|
|
11
|
+
| Class | Data attributes it answers to |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `ParameterBar` | `data-changed` |
|
|
14
|
+
| `ParameterBarFields` | |
|
|
15
|
+
| `FieldRoot` | |
|
|
16
|
+
| `ParameterBarEnd` | |
|
|
17
|
+
| `ParameterBarStatus` | |
|
|
18
|
+
| `ParameterBarLocked` | |
|
|
19
|
+
| `ParameterBarLockedValue` | |
|
|
20
|
+
| `ParameterBarLockedText` | |
|
|
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 ParameterBar stories (`Default`):
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
args: { label: 'Report settings', onRun: () => undefined },
|
|
31
|
+
render: function Render() {
|
|
32
|
+
const [asOf, setAsOf] = React.useState('2026-10-31');
|
|
33
|
+
const [ran, setRan] = React.useState<string | null>(null);
|
|
34
|
+
const changed = ran !== null && ran !== asOf;
|
|
35
|
+
return (
|
|
36
|
+
<div style={{ display: 'grid', gap: 'var(--sl-space-4)' }}>
|
|
37
|
+
<ParameterBar
|
|
38
|
+
label="Report settings"
|
|
39
|
+
onRun={() => setRan(asOf)}
|
|
40
|
+
runLabel="Run"
|
|
41
|
+
changed={changed}
|
|
42
|
+
status={ran === null ? 'Not run yet' : `Ran for ${ran}`}
|
|
43
|
+
>
|
|
44
|
+
<Field.Root>
|
|
45
|
+
<Field.Label>As of</Field.Label>
|
|
46
|
+
<Input type="date" value={asOf} onChange={(event) => setAsOf(event.target.value)} />
|
|
47
|
+
</Field.Root>
|
|
48
|
+
<Field.Root>
|
|
49
|
+
<Field.Label>Minimum amount</Field.Label>
|
|
50
|
+
<Input inputMode="decimal" placeholder="No minimum" />
|
|
51
|
+
</Field.Root>
|
|
52
|
+
</ParameterBar>
|
|
53
|
+
<div style={{ opacity: changed ? 0.5 : 1 }}>{ran ? `Balance Sheet as of ${ran}` : 'The report appears here.'}</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
play: async ({ canvasElement }) => {
|
|
58
|
+
const canvas = within(canvasElement);
|
|
59
|
+
await expect(canvas.getByRole('status')).toHaveTextContent('Not run yet');
|
|
60
|
+
await userEvent.click(canvas.getByRole('button', { name: 'Run' }));
|
|
61
|
+
await expect(canvas.getByRole('status')).toHaveTextContent('Ran for 2026-10-31');
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** A setting the page fixes, such as an Entity report locked to its Entity: text with a lock, not a disabled control. */
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The preview also shows `LockedField`, `Narrow`.
|