@scattered-light/loomiere-mojave 0.21.2 → 0.22.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`, `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`, `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
 
@@ -158,6 +158,8 @@
158
158
  "design-system/components/Meter/preview.html",
159
159
  "design-system/components/MoneyField/README.md",
160
160
  "design-system/components/MoneyField/preview.html",
161
+ "design-system/components/MultiSelect/README.md",
162
+ "design-system/components/MultiSelect/preview.html",
161
163
  "design-system/components/NavigationMenu/README.md",
162
164
  "design-system/components/NavigationMenu/preview.html",
163
165
  "design-system/components/NumberField/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`, `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`, `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,35 @@
1
+ # MultiSelect
2
+
3
+ The Base UI MultiSelect styled by the theme. A PickerButton trigger that opens a popover of checkbox rows (label, count at the end) and a footer with "Show all" and "Done". The rows reuse the Checkbox look; the counts are mono so they line up. The popup is at least as wide as its widest row and never narrower than popup.min-width.
4
+
5
+ Use `Loomiere.MultiSelect` (`import { MultiSelect } from '@base-ui/react/multi-select'` 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/multi-select
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `MultiSelectPopup` | |
14
+ | `MultiSelectList` | |
15
+ | `MultiSelectOption` | |
16
+ | `MultiSelectOptionLabel` | |
17
+ | `MultiSelectOptionCount` | |
18
+ | `MultiSelectFooter` | |
19
+
20
+ 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
+
22
+ ## Example
23
+
24
+ From the MultiSelect stories (`Default`):
25
+
26
+ ```tsx
27
+ export const Default: Story = {
28
+ render: function Render() {
29
+ const [value, setValue] = React.useState<string[]>([]);
30
+ return <MultiSelect label="Status" allLabel="All statuses" options={statuses} value={value} onValueChange={setValue} />;
31
+ },
32
+ };
33
+ ```
34
+
35
+ The preview also shows `WithSelection`, `ManySelected`.
@@ -0,0 +1,19 @@
1
+ <!-- @dsCard group="Components" height=360 subtitle="Default / WithSelection / ManySelected" -->
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 i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),V=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},C=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of A(t))!M.call(e,n)&&n!==a&&i(e,n,{get:()=>t[n],enumerable:!(o=w(t,n))||o.enumerable});return e};var y=(e,t,a)=>(a=e!=null?x(h(e)):{},C(t||!e||!e.__esModule?i(a,"default",{value:e,enumerable:!0}):a,e));var f=d((W,S)=>{S.exports=window.React});var b=d(($,v)=>{v.exports=window.Loomiere});var p={};V(p,{Default:()=>j,ManySelected:()=>I,WithSelection:()=>D,default:()=>m});var u=y(f(),1),r=y(b(),1);var l=window.React;function c(e,t,a){let{children:o,...n}=t||{};return a!==void 0&&(n.key=a),o===void 0?l.createElement(e,n):Array.isArray(o)?l.createElement(e,n,...o):l.createElement(e,n,o)}var q=l.Fragment;var L={title:"Components/Lib/MultiSelect",component:r.MultiSelect,parameters:{layout:"centered"},tags:["autodocs","ds:lib"],args:{label:"Status",options:[],value:[],onValueChange:()=>{}}},m=L,g=[{value:"active",label:"Active",count:41},{value:"inactive",label:"Inactive",count:6},{value:"available",label:"Available from master",count:12}],j={render:function(){let[t,a]=u.useState([]);return c(r.MultiSelect,{label:"Status",allLabel:"All statuses",options:g,value:t,onValueChange:a})}},D={render:function(){let[t,a]=u.useState(["active","inactive"]);return c(r.MultiSelect,{label:"Status",allLabel:"All statuses",options:g,value:t,onValueChange:a})}},I={render:function(){let t=["Assets","Liabilities","Equity","Income","Cost of sales","Expenses"].map((n,R)=>({value:n,label:n,count:3+R})),[a,o]=u.useState(["Assets","Income","Expenses"]);return c(r.MultiSelect,{label:"Type",allLabel:"All types",options:t,value:a,onValueChange:o})}};var s=window.React,E=m||{},F=["Default","WithSelection","ManySelected"];function N({id:e}){let t=p[e],a={...E.args||{},...t.args||{}};return(t.render||(n=>s.createElement(E.component,n)))(a,{args:a,id:e,name:e})}var O=F.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(N,{id:e}))));window.ReactDOM.createRoot(document.getElementById("root")).render(s.createElement(s.Fragment,null,O));})();
16
+
17
+ </script>
18
+ </body>
19
+ </html>