@scattered-light/loomiere-mojave 0.6.0 → 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 (40) hide show
  1. package/dist/exports/AGENTS.md +24 -8
  2. package/dist/exports/catalog.json +21 -0
  3. package/dist/exports/chakra.js +333 -0
  4. package/dist/exports/design-system/README.md +23 -7
  5. package/dist/exports/design-system/components/Badge/README.md +35 -0
  6. package/dist/exports/design-system/components/Badge/preview.html +19 -0
  7. package/dist/exports/design-system/components/Collection/README.md +14 -0
  8. package/dist/exports/design-system/components/CollectionPagination/README.md +15 -0
  9. package/dist/exports/design-system/components/CollectionToolbar/README.md +29 -0
  10. package/dist/exports/design-system/components/DataList/README.md +39 -0
  11. package/dist/exports/design-system/components/DataList/preview.html +475 -0
  12. package/dist/exports/design-system/components/DataTable/README.md +41 -0
  13. package/dist/exports/design-system/components/DataTable/preview.html +475 -0
  14. package/dist/exports/design-system/components/DatePicker/README.md +55 -0
  15. package/dist/exports/design-system/components/DatePicker/preview.html +475 -0
  16. package/dist/exports/design-system/components/EditableList/README.md +33 -0
  17. package/dist/exports/design-system/components/EditableList/preview.html +475 -0
  18. package/dist/exports/design-system/components/EmptyState/README.md +60 -0
  19. package/dist/exports/design-system/components/EmptyState/preview.html +475 -0
  20. package/dist/exports/design-system/components/ListDetail/README.md +43 -0
  21. package/dist/exports/design-system/components/ListDetail/preview.html +475 -0
  22. package/dist/exports/design-system/components/MoneyField/README.md +52 -0
  23. package/dist/exports/design-system/components/MoneyField/preview.html +475 -0
  24. package/dist/exports/design-system/components/Splitter/README.md +42 -0
  25. package/dist/exports/design-system/components/Splitter/preview.html +475 -0
  26. package/dist/exports/design-system/components/Table/README.md +2 -1
  27. package/dist/exports/design-system/components/Table/preview.html +1 -1
  28. package/dist/exports/design-system/components/bundle.css +2461 -190
  29. package/dist/exports/design-system/components/bundle.js +7 -5
  30. package/dist/exports/design-system/components/index.d.ts +3 -21
  31. package/dist/exports/design-system/tokens.json +15 -0
  32. package/dist/exports/figma.json +1 -1
  33. package/dist/exports/mui.js +727 -0
  34. package/dist/exports/tailwind.css +36 -0
  35. package/dist/exports/tokens.dtcg.json +320 -2
  36. package/dist/tokens.css +112 -4
  37. package/dist/tokens.d.ts +94 -0
  38. package/dist/tokens.js +95 -1
  39. package/dist/tokens.json +580 -2
  40. package/package.json +2 -2
@@ -0,0 +1,19 @@
1
+ <!-- @dsCard group="Display" height=480 subtitle="Default / Emphasis / Statuses / Sizes" -->
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 B=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var w=(t,s)=>()=>(s||t((s={exports:{}}).exports,s),s.exports),b=(t,s)=>{for(var r in s)l(t,r,{get:s[r],enumerable:!0})},h=(t,s,r,d)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of S(s))!x.call(t,o)&&o!==r&&l(t,o,{get:()=>s[o],enumerable:!(d=v(s,o))||d.enumerable});return t};var E=(t,s,r)=>(r=t!=null?B(f(t)):{},h(s||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t));var p=w((q,u)=>{u.exports=window.Loomiere});var m={};b(m,{Count:()=>j,Default:()=>C,Dot:()=>F,Emphasis:()=>D,Icon:()=>M,InColor:()=>A,InStatus:()=>N,Sizes:()=>k,Statuses:()=>R,default:()=>g});var a=E(p(),1);var c=window.React;function e(t,s,r){let{children:d,...o}=s||{};return r!==void 0&&(o.key=r),d===void 0?c.createElement(t,o):Array.isArray(d)?c.createElement(t,o,...d):c.createElement(t,o,d)}var P=c.Fragment;var z={title:"Components/Lib/Badge",component:a.Badge,parameters:{layout:"centered"},tags:["autodocs","ds:lib"],argTypes:{children:{control:"text",description:"Badge label"}}},g=z,n={display:"flex",gap:"12px",alignItems:"center",flexWrap:"wrap"},I=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",width:"20",height:"20",children:e("path",{d:"M10 2a8 8 0 100 16 8 8 0 000-16z"})}),C={render:()=>e("div",{style:n,children:[e(a.Badge,{status:"info",children:"Info"}),e(a.Badge,{status:"success",children:"Success"}),e(a.Badge,{status:"warning",children:"Warning"}),e(a.Badge,{status:"error",children:"Error"}),e(a.Badge,{children:"3"})]})},D={render:()=>e("div",{style:n,children:[e(a.Badge,{emphasis:"bold",children:"Bold"}),e(a.Badge,{emphasis:"standard",children:"Standard"}),e(a.Badge,{emphasis:"subtle",children:"Subtle"}),e(a.Badge,{children:"Default"}),e(a.Badge,{emphasis:"quiet",children:"Quiet"})]})},R={render:()=>e("div",{style:n,children:[e(a.Badge,{status:"info",children:"Info"}),e(a.Badge,{status:"success",children:"Success"}),e(a.Badge,{status:"warning",children:"Warning"}),e(a.Badge,{status:"error",children:"Error"})]})},k={render:()=>e("div",{style:n,children:[e(a.Badge,{size:"minimize",children:"Minimize"}),e(a.Badge,{children:"Condense"}),e(a.Badge,{size:"base",children:"Base"})]})},F={render:()=>e("div",{style:n,children:[e(a.Badge,{dot:!0,status:"info",children:"Live"}),e(a.Badge,{dot:!0,status:"success",children:"Saved"}),e(a.Badge,{dot:!0,status:"warning",children:"Pending"}),e(a.Badge,{dot:!0,status:"error",children:"Failed"})]})},M={render:()=>e("div",{style:n,children:[e(a.Badge,{status:"success",children:[e("span",{className:"material-symbols-outlined",children:"check"}),"Saved"]}),e(a.Badge,{status:"error",children:[e(I,{}),"Failed"]})]})},j={render:()=>e("div",{style:n,children:[e(a.Badge,{size:"minimize","aria-label":"3 unread",children:"3"}),e(a.Badge,{"aria-label":"3 unread",children:"3"}),e(a.Badge,{size:"base","aria-label":"3 unread",children:"3"}),e(a.Badge,{"aria-label":"12 unread",children:"12"})]})},N={render:()=>e("div",{style:n,children:["info","success","warning","error"].map(t=>e("div",{"data-status":t,children:e(a.Badge,{children:["In ",t]})},t))})},A={render:()=>e("div",{style:n,children:["primary","secondary","error"].map(t=>e("div",{"data-color":t,children:e(a.Badge,{emphasis:"bold",children:t})},t))})};var i=window.React,y=g||{},L=["Default","Emphasis","Statuses","Sizes"];function O({id:t}){let s=m[t],r={...y.args||{},...s.args||{}};return(s.render||(o=>i.createElement(y.component,o)))(r,{args:r,id:t,name:t})}var W=L.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(O,{id:t}))));window.ReactDOM.createRoot(document.getElementById("root")).render(i.createElement(i.Fragment,null,W));})();
16
+
17
+ </script>
18
+ </body>
19
+ </html>
@@ -0,0 +1,14 @@
1
+ # Collection
2
+
3
+ The Base UI Collection styled by the theme. DataTable, DataList, the toolbar and the pagination, in one place so the two views share the table concept. Sections: toolbar, table additions, groups, list, pagination, sizes. Each section is its own file so the design system can name the part. This file brings them in. The selection bar replaces the trailing controls (filters, sort, actions) and leaves the tabs and the search where they are, so selecting rows does not grow the toolbar.
4
+
5
+ Use `Loomiere.Collection` (`import { Collection } from '@base-ui/react/collection'` 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/collection
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+
14
+ 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.
@@ -0,0 +1,15 @@
1
+ # CollectionPagination
2
+
3
+ Loomiere component, not part of Base UI. Not tied to a collection. Anything with a page, a page count and a total can use it. Previous and Next are quiet buttons. The count reads "1–25 of 312".
4
+
5
+ Use `Loomiere.CollectionPagination` from `@scattered-light/loomiere-base-ui/custom/collection`. Install `@tanstack/react-table` (peer, optional). It is not on the main entry, so an app that only imports Badge does not need it.
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
+ | `CollectionPagination` | |
14
+
15
+ 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.
@@ -0,0 +1,29 @@
1
+ # CollectionToolbar
2
+
3
+ Loomiere component, not part of Base UI. The wrap follows the toolbar's own width, not the window: a table in a narrow pane wraps even when the page is wide. Search grows to fill the row beside the trailing controls, and wraps to its own line before it shrinks under collection.search-min-width. Under the narrow width it takes the full row and filters wrap under it. A container query cannot read the width token, so the component also sets data-narrow. The search icon and the clear button sit inside the field. The browser's own search cancel is hidden by the reset, so the clear button is the only one, in every browser.
4
+
5
+ Use `Loomiere.CollectionToolbar` from `@scattered-light/loomiere-base-ui/custom/collection`. Install `@tanstack/react-table` (peer, optional). It is not on the main entry, so an app that only imports Badge does not need it.
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
+ | `CollectionToolbar` | `data-narrow` |
14
+ | `CollectionToolbarMain` | |
15
+ | `CollectionSelectionBar` | |
16
+ | `CollectionSort` | |
17
+ | `CollectionSearch` | |
18
+ | `CollectionSearchField` | `data-filled` |
19
+ | `Input` | |
20
+ | `CollectionSearchIcon` | |
21
+ | `CollectionSearchClear` | |
22
+ | `CollectionToolbarTrailing` | |
23
+ | `SelectTrigger` | |
24
+ | `ComboboxInputWrapper` | |
25
+ | `CollectionToolbarActions` | |
26
+ | `CollectionView` | `data-narrow` |
27
+ | `CollectionCount` | |
28
+
29
+ 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.
@@ -0,0 +1,39 @@
1
+ # DataList
2
+
3
+ Loomiere component, not part of Base UI. The same rows as the table, in one container with the table's borders, hover, selected and current states. Not a stack of floating cards: the two views should read as one family. variant=cards adds the surface radius and a gap when a queue should read as separate items.
4
+
5
+ Use `Loomiere.DataList` from `@scattered-light/loomiere-base-ui/custom/collection`. Install `@tanstack/react-table` (peer, optional). It is not on the main entry, so an app that only imports Badge does not need it.
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
+ | `DataList` | `data-size`: `md`; `data-variant`: `cards`; `data-loading` |
14
+ | `DataListPrimary` | |
15
+ | `DataListSecondary` | |
16
+ | `DataListMeta` | |
17
+ | `DataListSummary` | |
18
+ | `DataListBody` | |
19
+ | `DataListAmount` | |
20
+ | `DataListGroup` | |
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 DataList stories (`BesideTheTable`):
27
+
28
+ ```tsx
29
+ export const BesideTheTable: Story = {
30
+ render: () => (
31
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 24 }}>
32
+ <FeeTable pageSize={5} />
33
+ <FeeList rows={fees.slice(0, 8)} />
34
+ </div>
35
+ ),
36
+ };
37
+ ```
38
+
39
+ The preview also shows `ReviewQueue`, `ExtraDoesNotActivate`, `Sort`.