@scattered-light/loomiere-mojave 0.22.5 → 0.23.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.
@@ -152,7 +152,7 @@ Looks: this brand can look 2 ways. With no `data-look` it is Mojave; `data-look=
152
152
 
153
153
  ### Components
154
154
 
155
- The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `AppBar`, `Autocomplete`, `Avatar`, `Badge`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Collection`, `CollectionCards`, `CollectionPagination`, `CollectionToolbar`, `Combobox`, `ContextMenu`, `DataList`, `DataTable`, `DatePicker`, `DescriptionList`, `Dialog`, `Drawer`, `EditableList`, `EmptyState`, `Field`, `Fieldset`, `Form`, `Input`, `ListDetail`, `Menu`, `Menubar`, `Meter`, `MoneyField`, `MultiSelect`, `NavigationMenu`, `NumberField`, `OTPField`, `PickerButton`, `PickerSplit`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Sheet`, `SideNav`, `Slider`, `SplitButton`, `Splitter`, `StatCard`, `StatFigure`, `Switch`, `Table`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`).
155
+ The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `AppBar`, `Autocomplete`, `Avatar`, `Badge`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Collection`, `CollectionCards`, `CollectionPagination`, `CollectionToolbar`, `Combobox`, `ContextMenu`, `DataList`, `DataTable`, `DatePicker`, `DescriptionList`, `Dialog`, `Drawer`, `EditableList`, `EmptyState`, `Field`, `Fieldset`, `Form`, `FormGrid`, `Input`, `ListDetail`, `Menu`, `Menubar`, `Meter`, `MoneyField`, `MultiSelect`, `NavigationMenu`, `NumberField`, `OTPField`, `PickerButton`, `PickerSplit`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Sheet`, `SideNav`, `Slider`, `SplitButton`, `Splitter`, `StatCard`, `StatFigure`, `Switch`, `Table`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`).
156
156
 
157
157
  Icons are Material Symbols Outlined by ligature name (`<span class="material-symbols-outlined">search</span>`, or `Loomiere.MaterialSymbol name="search"`), sized by the `.icon-<tier>` utilities to match the text beside them.
158
158
 
@@ -146,6 +146,8 @@
146
146
  "design-system/components/Fieldset/preview.html",
147
147
  "design-system/components/Form/README.md",
148
148
  "design-system/components/Form/preview.html",
149
+ "design-system/components/FormGrid/README.md",
150
+ "design-system/components/FormGrid/preview.html",
149
151
  "design-system/components/Input/README.md",
150
152
  "design-system/components/Input/preview.html",
151
153
  "design-system/components/ListDetail/README.md",
@@ -144,7 +144,7 @@ Looks: this brand can look 2 ways. With no `data-look` it is Mojave; `data-look=
144
144
 
145
145
  ## Components
146
146
 
147
- The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `AppBar`, `Autocomplete`, `Avatar`, `Badge`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Collection`, `CollectionCards`, `CollectionPagination`, `CollectionToolbar`, `Combobox`, `ContextMenu`, `DataList`, `DataTable`, `DatePicker`, `DescriptionList`, `Dialog`, `Drawer`, `EditableList`, `EmptyState`, `Field`, `Fieldset`, `Form`, `Input`, `ListDetail`, `Menu`, `Menubar`, `Meter`, `MoneyField`, `MultiSelect`, `NavigationMenu`, `NumberField`, `OTPField`, `PickerButton`, `PickerSplit`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Sheet`, `SideNav`, `Slider`, `SplitButton`, `Splitter`, `StatCard`, `StatFigure`, `Switch`, `Table`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`).
147
+ The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `AppBar`, `Autocomplete`, `Avatar`, `Badge`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Collection`, `CollectionCards`, `CollectionPagination`, `CollectionToolbar`, `Combobox`, `ContextMenu`, `DataList`, `DataTable`, `DatePicker`, `DescriptionList`, `Dialog`, `Drawer`, `EditableList`, `EmptyState`, `Field`, `Fieldset`, `Form`, `FormGrid`, `Input`, `ListDetail`, `Menu`, `Menubar`, `Meter`, `MoneyField`, `MultiSelect`, `NavigationMenu`, `NumberField`, `OTPField`, `PickerButton`, `PickerSplit`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Sheet`, `SideNav`, `Slider`, `SplitButton`, `Splitter`, `StatCard`, `StatFigure`, `Switch`, `Table`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`).
148
148
 
149
149
  Icons are Material Symbols Outlined by ligature name (`<span class="material-symbols-outlined">search</span>`, or `Loomiere.MaterialSymbol name="search"`), sized by the `.icon-<tier>` utilities to match the text beside them.
150
150
 
@@ -0,0 +1,41 @@
1
+ # FormGrid
2
+
3
+ The Base UI FormGrid styled by the theme. Fields on a grid. Columns are as wide as the space allows up to --form-grid-columns (the columns prop), never narrower than 12rem, so a narrow drawer gets one column and a wide dialog two or more. Cells share rows, so controls line up. A FormGridItem with data-span="full" crosses every column; data-align="end" sits a cell on the row's bottom. Uses the same spacing as Form.
4
+
5
+ Use `Loomiere.FormGrid` (`import { FormGrid } from '@base-ui/react/form-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/form-grid
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `FormGrid` | |
14
+ | `FormGridItem` | `data-span`: `full`; `data-align`: `end` |
15
+
16
+ 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.
17
+
18
+ ## Example
19
+
20
+ From the FormGrid stories (`Default`):
21
+
22
+ ```tsx
23
+ export const Default: Story = {
24
+ render: () => (
25
+ <div style={{ maxWidth: 640 }}>
26
+ <Form>
27
+ <FormGrid>
28
+ <Fields />
29
+ </FormGrid>
30
+ <FormActions>
31
+ <Button>Save</Button>
32
+ </FormActions>
33
+ </Form>
34
+ </div>
35
+ ),
36
+ };
37
+
38
+ /** In a narrow space the grid drops to one column. */
39
+ ```
40
+
41
+ The preview also shows `Narrow`, `ThreeColumns`.
@@ -0,0 +1,19 @@
1
+ <!-- @dsCard group="Components" height=360 subtitle="Default / Narrow / ThreeColumns" -->
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 R=Object.create;var m=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var w=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),E=(t,r)=>{for(var a in r)m(t,a,{get:r[a],enumerable:!0})},g=(t,r,a,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of h(r))!L.call(t,n)&&n!==a&&m(t,n,{get:()=>r[n],enumerable:!(l=b(r,n))||l.enumerable});return t};var S=(t,r,a)=>(a=t!=null?R(x(t)):{},g(r||!t||!t.__esModule?m(a,"default",{value:t,enumerable:!0}):a,t));var y=w((I,F)=>{F.exports=window.Loomiere});var p={};E(p,{Default:()=>G,Narrow:()=>C,ThreeColumns:()=>A,default:()=>i});var o=S(y(),1);var s=window.React;function e(t,r,a){let{children:l,...n}=r||{};return a!==void 0&&(n.key=a),l===void 0?s.createElement(t,n):Array.isArray(l)?s.createElement(t,n,...l):s.createElement(t,n,l)}var u=s.Fragment;var v={title:"Components/Lib/FormGrid",component:o.FormGrid,parameters:{layout:"padded"},tags:["autodocs","ds:lib"]},i=v;function c(){return e(u,{children:[e(o.Field.Root,{name:"first",children:[e(o.Field.Label,{children:"First name"}),e(o.Field.Control,{placeholder:"Jordan"})]}),e(o.Field.Root,{name:"last",children:[e(o.Field.Label,{children:"Last name"}),e(o.Field.Control,{placeholder:"Rivera"})]}),e(o.Field.Root,{name:"email",children:[e(o.Field.Label,{children:"Email"}),e(o.Field.Control,{type:"email",placeholder:"jordan@example.com"})]}),e(o.Field.Root,{name:"phone",children:[e(o.Field.Label,{children:"Phone"}),e(o.Field.Control,{placeholder:"555-0100"})]}),e(o.FormGridItem,{span:"full",children:e(o.Field.Root,{name:"address",children:[e(o.Field.Label,{children:"Address"}),e(o.Field.Control,{placeholder:"1200 Desert View Rd"})]})})]})}var G={render:()=>e("div",{style:{maxWidth:640},children:e(o.Form,{children:[e(o.FormGrid,{children:e(c,{})}),e(o.FormActions,{children:e(o.Button,{children:"Save"})})]})})},C={render:()=>e("div",{style:{maxWidth:360},children:e(o.FormGrid,{children:e(c,{})})})},A={render:()=>e("div",{style:{maxWidth:840},children:e(o.FormGrid,{columns:3,children:[e(c,{}),e(o.FormGridItem,{align:"end",children:e(o.Button,{children:"Add"})})]})})};var d=window.React,f=i||{},j=["Default","Narrow","ThreeColumns"];function D({id:t}){let r=p[t],a={...f.args||{},...r.args||{}};return(r.render||(n=>d.createElement(f.component,n)))(a,{args:a,id:t,name:t})}var N=j.map(t=>d.createElement("section",{key:t,className:"ds-story"},d.createElement("p",{className:"ds-story-name"},t.replace(/([a-z])([A-Z])/g,"$1 $2")),d.createElement("div",{className:"ds-story-body"},d.createElement(D,{id:t}))));window.ReactDOM.createRoot(document.getElementById("root")).render(d.createElement(d.Fragment,null,N));})();
16
+
17
+ </script>
18
+ </body>
19
+ </html>